c++/676: gcc ice on illegal use of conditional statements

web@boskawauter.student.utwente.nl web@boskawauter.student.utwente.nl
Mon Oct 23 08:06:00 GMT 2000


>Number:         676
>Category:       c++
>Synopsis:       gcc ice on illegal use of conditional statements
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 23 08:06:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     web@boskawauter.student.utwente.nl
>Release:        gcc version 2.96 20000731 (Red Hat Linux 7.0)
>Organization:
>Environment:
Red Hat Linux 7.0
>Description:
A simple program with repeated conditional statements
generates internal compiler errors:

tst.cc: In function `int main ()':
tst.cc:3: parse error before `if'
tst.cc:5: return-statement with no value, in function declared with a
non-void return type
tst.cc:6: Internal error #122.
tst.cc:6: Internal compiler error in finish_function, at
../gcc/cp/decl.c:14422
>How-To-Repeat:
Use the code below and type 'gcc -o tst.o tst.cc' or 'make tst'.

main()
{
  if if (1)
    return;
  return;
}
>Fix:

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


More information about the Gcc-bugs mailing list