Bug 4225 - documentation about CPLUS_INCLUDE_PATH vs. system headers incomplete
Summary: documentation about CPLUS_INCLUDE_PATH vs. system headers incomplete
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.0.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: documentation
Depends on:
Blocks:
 
Reported: 2001-09-04 08:26 UTC by abetton
Modified: 2016-01-14 13:35 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-12-11 21:51:15


Attachments
foo.tgz (230 bytes, application/x-gzip )
2003-05-21 15:16 UTC, abetton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description abetton 2001-09-04 08:26:00 UTC
1- An .h file declaring a C++ function

/tmp/foo/foo.h

<<
void foo(int x);

Release:
gcc 3.0.1

Environment:
Reading specs from /home/dsv5/packages/gcc-3.0.1/lib/gcc-lib/sparc-sun-solaris2.
7/3.0.1/specs
Configured with: /tmcenter/navis/ccpkg/data/gcc-3.0.1/configure --prefix=/home/d
sv5/packages/gcc-3.0.1 --enable-languages=c++,java --enable-shared --enable-thre
ads --with-gnu-ld --with-ld=/home/dsv5/packages/binutils-2.11.2/bin/ld --with-gn
u-as --with-as=/home/dsv5/packages/binutils-2.11.2/bin/as
Thread model: posix
gcc version 3.0.1

How-To-Repeat:
See description.
Comment 1 Alexandre Oliva 2001-09-04 15:26:59 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: I believe this is just a documentation issue.  We fail to say that CPLUS_INCLUDE_PATH marks the listed headers as system header files.  On some OSs, system header files are considered to be implicitly surrounded by `extern "C" {' '}'.
Comment 2 Wolfgang Bangerth 2002-11-15 20:04:43 UTC
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/4225: bad reference in an object file caused by the include
 method
Date: Fri, 15 Nov 2002 20:04:43 -0600 (CST)

 Presently (i.e. at the 3.2.1 stage), the documentation says:
   `CPATH'
   `C_INCLUDE_PATH'
   `CPLUS_INCLUDE_PATH'
   `OBJC_INCLUDE_PATH'
      [...]
 
      `CPATH' specifies a list of directories to be searched as if
      specified with `-I', but after any paths given with `-I' options
      on the command line.  The environment variable is used regardless
      of which language is being preprocessed.
 
      The remaining environment variables apply only when preprocessing
      the particular language indicated.  Each specifies a list of
      directories to be searched as if specified with `-isystem', but
      after any paths given with `-isystem' options on the command line.
 
 I.e., only the part that -isystem implies extern "C" on some systems is 
 now missing. Or at least I could not find it anywhere -isystem is 
 mentioned.
 
 W.
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth              email:           bangerth@ticam.utexas.edu
                                www: http://www.ticam.utexas.edu/~bangerth
 
 

Comment 3 Nathanael C. Nerode 2003-01-03 09:19:16 UTC
From: Nathanael Nerode <neroden@twcny.rr.com>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, abetton@rennes.jouve.fr,
   gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/4225: bad reference in an object file...
Date: Fri, 3 Jan 2003 09:19:16 -0500

 With current mainline (3.4) I get:
          U foo(int)
          U __gxx_personality_v0
 00000000 T main
 
 in *both* cases.
 
 Can this bug be closed?
 --Nathanael

Comment 4 Nathanael C. Nerode 2003-01-03 09:20:52 UTC
From: Nathanael Nerode <neroden@twcny.rr.com>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, abetton@rennes.jouve.fr,
   gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/4225: bad reference...
Date: Fri, 3 Jan 2003 09:20:52 -0500

 Aargh, I guess it can't, because I don't have access to any systems where 
 -isystem currently implies extern "C".  This is a doc bug.
 ...