tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: Odd behavior of C compiler in V4.0C
@ 1997-12-09 15:32 Kevin Oberman
  0 siblings, 0 replies; only message in thread
From: Kevin Oberman @ 1997-12-09 15:32 UTC (permalink / raw)
  To: tru64-unix-managers

Sorry this was so late in coming, especially to those who deserve my
thanks for helping out with the problem.

Thanks to:
ali@platinum.com
Peter Chapin
Spider Boardman
Daniel S. Riley
and especially to  mario@zk3.dec.com (Joe Mario?)

No one could actually nail it down. I had to track it through the
convoluted string of includes in the program to realize that etags was 
deliberately turning off const with the lines
#undef const
#define const

Joe Mario pointed me right at the problem and, as it turned out, all I 
needed to do was move the re-definition of const a few lines back in
the code and all was well.

Thanks to all who helped with this one. If nothing else, I understand
the CPP operation much better than I used to.

For those who care, here is my original query:

I was trying to build XEmacs on my new Alpha and got an error I simply
do not understand.
cc: Error: /usr/include/unistd.h, line 570: In this declaration, the type of 
"rename" is not compatible with the type of a previous declaration of 
"rename" at line number 166 in file /usr/include/stdio.h.
extern int      rename __((const char *, const char *));
----------------^
cc: Error: /usr/include/errno.h, line 286: In this declaration, the type of 
"perror" is not compatible with the type of a previous declaration of 
"perror" at line number 216 in file /usr/include/stdio.h.
extern void perror __((const char *));
------------^

First, the claimed conflict is in the system header files. Second,
when I looked at the files in question, the definitions of "rename"
and "perror" are identical, as far as I can tell.
extern int rename __((const char *, const char *));
extern int      rename __((const char *, const char *));
extern void perror __((const char *));
extern void     perror __((const char *));

The only difference would appear to be space vs. tab. (And I even
tried changing one of the entries from a space to a tab, but that made
no difference.)

Can anyone explain this oddity? Am I mis-understanding what appears to
be a clear error?
-- 
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman@es.net			Phone: +1 510 486-8634

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-12-09 15:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-12-09 15:32 SUMMARY: Odd behavior of C compiler in V4.0C Kevin Oberman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox