c++/3252: a struct member cannot have a name that is also a typedef
phd@siemens.dk
phd@siemens.dk
Tue Jun 19 02:16:00 GMT 2001
>Number: 3252
>Category: c++
>Synopsis: a struct member cannot have a name that is also a typedef
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 19 02:16:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Peter Hegelund
>Release: Today's build
>Organization:
>Environment:
CodeSourcery
>Description:
typedef char text[11];
struct foo {
text text;
} FOO;
GCC Output
These are the results of processing your source code with the following command:
g++ [input]
Exit code: 256
Messages:
/usr/tmp/@20044.7.cc:3: declaration of `char foo::text[11]'
/usr/tmp/@20044.7.cc:1: changes meaning of `text' from `typedef char text[11]'
>How-To-Repeat:
>Fix:
Change first text to e.g. _text. Unfortunately the code comes out of our DB API generator! Code compiles fine with Microsoft C++ 12.00 aka Visual Studio 6.00
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list