This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14510] New: Bogus conflicting declaration error message
- From: "schmid at snake dot iap dot physik dot tu-darmstadt dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Mar 2004 06:55:27 -0000
- Subject: [Bug c++/14510] New: Bogus conflicting declaration error message
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I believe that there is no second declaration of the struct t_bind in the
following example. Therefore a rejection of the source code is not warranted. I
guess this is a regression. This example is taken from the current Ace
distribution.
g++ -v s.C
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/specs
Configured with: ../gcc/configure --enable-threads=posix --enable-languages=c,c
++,f77,objc --enable-__cxa_atexit --enable-libstdcxx-debug
Thread model: posix
gcc version 3.4.0 20040309 (prerelease)
/usr/local/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1plus -quiet -v -D_GNU_SOURCE
s.C -quiet -dumpbase s.C -mtune=pentiumpro -auxbase s -version -o /tmp/
ccUovTPT.s
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/lib/gcc/
i686-pc-linux-gnu/3.4.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/
i686-pc-linux-gnu
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/
backward
/usr/local/include
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include
/usr/include
End of search list.
GNU C++ version 3.4.0 20040309 (prerelease) (i686-pc-linux-gnu)
compiled by GNU C version 3.4.0 20040309 (prerelease).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64274
s.C:8: error: conflicting declaration 'struct t_bind'
s.C:1: error: 'struct t_bind' has a previous declaration as `struct t_bind'
s.C:8: error: `int ACE_OS::t_bind(t_bind*)' should have been declared inside
`ACE_OS'
source code s.C
struct t_bind { };
namespace ACE_OS
{
extern int t_bind (struct t_bind *req);
}
inline int ACE_OS::t_bind (struct t_bind *req) { }
--
Summary: Bogus conflicting declaration error message
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: critical
Priority: P1
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schmid at snake dot iap dot physik dot tu-darmstadt dot
de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14510