c++/2595: static const struct variable declaration inside struct declaration causes compiler error

ccarena@home.com ccarena@home.com
Thu Apr 19 19:16:00 GMT 2001


>Number:         2595
>Category:       c++
>Synopsis:       static const struct variable declaration inside struct declaration causes compiler error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 19 19:16:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Chris Arena
>Release:        g++ 2.9.6
>Organization:
>Environment:
Linux Redhat 7.0
>Description:
A static const variable declaration causes a compiler error when appearing inside the struct declaration.

>How-To-Repeat:
g++ -c -D_SHOW_ERROR test.cpp
>Fix:
Change the static const var to be a function returning the same value -- this is just a workaround. I don't know how to fix it at this time.
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list