This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/1788: gcc 2.95.2 gives ICE when declaring variables as static in classes



>Number:         1788
>Category:       c++
>Synopsis:       gcc 2.95.2 gives ICE when declaring variables as static in classes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 26 13:36:02 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Pär Lidén
>Release:        gcc 2.95.2
>Organization:
>Environment:
Slackware Linux 7.1 (Glibc 2.1.3)
gcc 2.95.2 is installed on top of the the original gcc 2.91.66 with a .tgz package.
>Description:
Under gcc 2.95.2 I get an internal error, but it does not say ICE however, it's some other kind of strange error.
With gcc 2.97 (online compilation) you won't get an internal error, but instead Virtual Memory Exhausted, which I assume indicates that there is still a problem. 
>How-To-Repeat:
g++ bug.cc
>Fix:
You could change the order of words before the type (the modificators or whatever they are called).
I write const int static.
If you instead write static const int the problem will dissappear. Honestly, I dont't know which is the right, but my (limited) C/C++ knowledge tells me that both ways are correct.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: unknown; name="Bug.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Bug.cc"

dGVtcGxhdGUgPHR5cGVuYW1lIFQ+CmNsYXNzIEZvbyAKewogICAgICBpbnQgdmVydGljZXNbZm9v
YmFyXTsKICAgICAgY29uc3QgaW50IHN0YXRpYyBmb29iYXI7Cn07Cgp0ZW1wbGF0ZSA8dHlwZW5h
bWUgVD4KY29uc3QgaW50IHN0YXRpYyBGb288VD46OmZvb2JhciA9IDQ7CgoKaW50IG1haW4oKQp7
CiAgICAgIEZvbzxpbnQ+IGZvbzsKICAgICAgcmV0dXJuKDApOwp9Cgo=

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]