c++/1688: Includes causing extern "C" not to behave correctly (?)

Neil Booth neil@daikokuya.demon.co.uk
Sun Apr 1 00:00:00 GMT 2001


The following reply was made to PR c++/1688; it has been noted by GNATS.

From: Neil Booth <neil@daikokuya.demon.co.uk>
To: daniel@ncsu.edu
Cc: gcc-gnats@gcc.gnu.org, Zack Weinberg <zackw@Stanford.EDU>
Subject: Re: c++/1688: Includes causing extern "C" not to behave correctly (?)
Date: Thu, 18 Jan 2001 18:55:41 +0000

 Daniel Henninger wrote:-
 
 > > Look at the # LINENO directives created.  Are they different?  (The
 > > flag "4" at the end is to do with extern "C").
 > 
 > < # 1 "/usr/include/X11/Xlib.h" 1 3 4
 > > # 1 "/usr/openwin/include/X11/Xlib.h" 1
 > 
 > The second one is where -I/usr/openwin/include was directly specified in
 > the include path.  And of course:
 > stonecold [12:37pm] ~> ls -ld /usr/include/X11
 > lrwxrwxrwx   1 root     root          22 Jan 21  2000 /usr/include/X11 ->
 > ../openwin/include/X11
 > 
 > They are one in the same.  So the 4 at the end of the first has to do with
 > the extern "C" directive?  How about the 3?  What's that for?
 
 I think this is your problem.  We currently detect systemheader-ness
 (indicated by the flag "3") by the location the include file was
 found.  But we don't follow symlinks.
 
 Once something is recognised as a system header, warnings are
 suppressed, and maybe other behaviour changes too.
 
 Zack, I think this is the first complaint we've had about this :-( I'm
 not sure whether following symlinks is a good solution or not, though.
 
 Neil.


More information about the Gcc-prs mailing list