From mboxrd@z Thu Jan 1 00:00:00 1970 From: phd@siemens.dk To: gcc-gnats@gcc.gnu.org Subject: c++/3252: a struct member cannot have a name that is also a typedef Date: Tue, 19 Jun 2001 02:16:00 -0000 Message-id: <20010619091230.10184.qmail@sourceware.cygnus.com> X-SW-Source: 2001-06/msg00770.html List-Id: >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: