public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/4661: g++ recognize a c++ header file (.hpp) as c header file
@ 2001-10-27 4:59 lerdsuwa
0 siblings, 0 replies; 2+ messages in thread
From: lerdsuwa @ 2001-10-27 4:59 UTC (permalink / raw)
To: acss, gcc-bugs, gcc-prs, nobody
Synopsis: g++ recognize a c++ header file (.hpp) as c header file
State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Sat Oct 27 04:59:44 2001
State-Changed-Why:
Duplicate of PR4662.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4661&database=gcc
^ permalink raw reply [flat|nested] 2+ messages in thread
* c++/4661: g++ recognize a c++ header file (.hpp) as c header file
@ 2001-10-25 16:26 acss
0 siblings, 0 replies; 2+ messages in thread
From: acss @ 2001-10-25 16:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 4661
>Category: c++
>Synopsis: g++ recognize a c++ header file (.hpp) as c header file
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 25 16:26:06 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: acss@altavista.net
>Release: gcc 3.0.1
>Organization:
>Environment:
Sun SPARC
Solaris 5.6
>Description:
C++ included headers, located outside current directory are evaluated as C headers.
If we include a .hpp file in a C++ source file (either with <> or "") and they are outside, we receive the lots of errors like:
In file included from smalldate.cpp:4:
/opt/tuxedo/include/smalldate.hpp:29: declaration of C function `const
middleware::smalldate middleware::operator-(const middleware::smalldate&,
int)' conflicts with
/opt/tuxedo/include/smalldate.hpp:27: previous declaration `const int
middleware::operator-(const middleware::smalldate&, const
middleware::smalldate&)' here
Actually, these are overloaded C++ functions ...
>How-To-Repeat:
cat> test.hpp
int test(int i);
int test(float f);
ctrl-D
mv test.hpp <somewhere on the C++ include path>
cat> test.cpp
#include <test.hpp>
int main() {
test(0);
}
ctrl-D
g++ -c test.cpp
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-10-27 4:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-27 4:59 c++/4661: g++ recognize a c++ header file (.hpp) as c header file lerdsuwa
-- strict thread matches above, loose matches on Subject: below --
2001-10-25 16:26 acss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).