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++/745: ICE when using 'while' as a 'for' statement



>Number:         745
>Category:       c++
>Synopsis:       ICE when using 'while' as a 'for' statement
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 07 09:26:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     carll@online.no
>Release:        gcc version 2.96 20000731
>Organization:
>Environment:
Red Hat Linux 7.0
>Description:
Somehow I managed to write the following statement;
while (int x = 0; x < 10; x++) { }

it created the following error:
while_for.C: In function `int main ()':
while_for.C:2: parse error before `;'
while_for.C:2: parse error before `)'
while_for.C:2: Internal error #122.
while_for.C:2: Internal compiler error in finish_function, at
../gcc/cp/decl.c:14422
>How-To-Repeat:
gcc while_for.C -o wf
>Fix:
Detect it...
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="while_for.C"
Content-Disposition: inline; filename="while_for.C"

int main() {
 while (int x = 0; x < 10; x++) { }
}

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