public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: acss@altavista.net To: gcc-gnats@gcc.gnu.org Subject: c++/4662: g++ recognize a c++ header file (.hpp) as c header file Date: Thu, 25 Oct 2001 16:26:00 -0000 [thread overview] Message-ID: <20011023190230.5023.qmail@sourceware.cygnus.com> (raw) >Number: 4662 >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:07 PDT 2001 >Closed-Date: >Last-Modified: >Originator: acss@altavista.net >Release: gcc 3.0.1 >Organization: >Environment: Sun SPARC Solaris 5.6 >Description: We have the same problem reported on #3866, with the following addition: 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:
next reply other threads:[~2001-10-25 16:26 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-10-25 16:26 acss [this message] 2001-11-20 18:06 aoliva 2001-11-20 18:06 aoliva 2002-01-27 17:03 rodrigc
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20011023190230.5023.qmail@sourceware.cygnus.com \ --to=acss@altavista.net \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).