This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/4256: Headers in CPLUS_INCLUDE_PATH treated as C code



>Number:         4256
>Category:       c++
>Synopsis:       Headers in CPLUS_INCLUDE_PATH treated as C code
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 07 02:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jorgo Bakker
>Release:        gcc version 3.0.1
>Organization:
>Environment:
CPLUS_INCLUDE_PATH=include
>Description:
CPLUS_INCLUDE_PATH acts as if it is C_INCLUDE_PATH; treating
every header in that PATH as a C-header.
>How-To-Repeat:
$ c++ -v -c foo.cc 
Reading specs from /data/jbakker/local/solaris/gcc-3.0.1/bin/../lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/specs
Configured with: ../gcc-3.0.1/configure --prefix=/data/jbakker/tmp/gcc-3.0.1 --with-gnu-as --with-as=/data/jbakker/tmp/local/bin/as --with-gnu-ld --with-ld=/data/jbakker/tmp/local/bin/ld --disable-shared --disable-threads
Thread model: single
gcc version 3.0.1
 /data/jbakker/local/solaris/gcc-3.0.1/bin/../lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/cc1plus -v -iprefix /data/jbakker/local/solaris/gcc-3.0.1/bin/../lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/ -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=1 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D__EXTENSIONS__ -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc foo.cc -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase foo.cc -version -o /data/jbakker/tmp/ccDmFW9X.s
GNU CPP version 3.0.1 (cpplib) (sparc)
GNU C++ version 3.0.1 (sparc-sun-solaris2.6)
        compiled by GNU C version 3.0.1.
ignoring nonexistent directory "/data/jbakker/local/solaris/gcc-3.0.1/bin/../sparc-sun-solaris2.6/include"
ignoring nonexistent directory "/data/jbakker/tmp/gcc-3.0.1/sparc-sun-solaris2.6/include"
ignoring duplicate directory "/data/jbakker/tmp/gcc-3.0.1/include/g++-v3"
ignoring duplicate directory "/data/jbakker/tmp/gcc-3.0.1/include/g++-v3/sparc-sun-solaris2.6"
ignoring duplicate directory "/data/jbakker/tmp/gcc-3.0.1/include/g++-v3/backward"
ignoring duplicate directory "/data/jbakker/tmp/gcc-3.0.1/lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include"
#include "..." search starts here:
#include <...> search starts here:
 include
 /data/jbakker/local/solaris/gcc-3.0.1/bin/../include/g++-v3
 /data/jbakker/local/solaris/gcc-3.0.1/bin/../include/g++-v3/sparc-sun-solaris2.6
 /data/jbakker/local/solaris/gcc-3.0.1/bin/../include/g++-v3/backward
 /data/jbakker/local/solaris/gcc-3.0.1/bin/../lib/gcc-lib/sparc-sun-solaris2.6/3.0.1/include
 /usr/local/include
 /usr/include
End of search list.
In file included from foo.cc:1:
include/foo.h:4: declaration of C function `void foo(int)' conflicts with
include/foo.h:3: previous declaration `void foo(const char*)' here
include/foo.h:5: declaration of C function `void foo(double)' conflicts with
include/foo.h:4: previous declaration `void foo(int)' here
>Fix:
c++ -c -Iinclude foo.cc
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="foo.tgz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="foo.tgz"

H4sIAMmLmDsAA+3VvW7DIBAHcGY/xSld8qHUYMAeMvZJHEwUNylI2O4S5d1L61jtlE44Q/6/wRaH
JQ4dhw/evxrDkhKcl0oRI6KqGt/iNh6pKs5IVQpeCC7jrBCFZMTTpjUaur4OROx9X59ONtz5zoZu
joTm9dI6cx4aS4tDPAnHRda6nj7q1i1Xl2D7ITjiu2v26DQhkVv585RrkOKV1nf6n/jU/1qr8rv/
lVSMdMqkJk/e/1P9f7o/0Rr/3f+Cl1P9hdYiBgolC9z/c8hz2q63b5tNfGbZp28bikdhabzrejLH
OqxXu99w/Dn8HTZ+2J9tjDx6FwAAAAAAAAAAAAAAAAAAAM/tC6UVAOcAKAAA


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]