c++/2537: namespace id's and bitmask names colliding

theonetruekenny@yahoo.com theonetruekenny@yahoo.com
Wed Apr 11 11:26:00 GMT 2001


>Number:         2537
>Category:       c++
>Synopsis:       namespace id's and bitmask names colliding
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 11 11:26:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Kenny Simpson
>Release:        GNU C++ version 3.0 20010409 (prerelease) (i386-pc-linux-gnu)
>Organization:
>Environment:
online compiler
>Description:
If I try to use a name for an identifier of a bitmask and
that name happens to be used by a namespace, gcc flags the
bitmask as being a syntax error.
>How-To-Repeat:
compile this:

namespace baz {}

namespace foo
{
  struct bar
  {
    unsigned baz:1;
  };
}


comment out the first line, and it compiles.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list