c++/5928: parse error before `or'

taneem@eyetap.org taneem@eyetap.org
Tue Mar 12 13:36:00 GMT 2002

>Number:         5928
>Category:       c++
>Synopsis:       parse error before `or'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 12 13:36:00 PST 2002
>Originator:     Taneem Ahmed
>Release:        gcc version 2.96
Redhat 7.2
gcc generates parse error on the following legal code:

#include <stdio.h>

int func(int or){
        return 0;

int main(int argc, char **argv){
        int or = 1;
        return 0;

> gcc or_error.cpp

or_error.cpp:3: parse error before `or'
or_error.cpp: In function `int main (int, char **)':
or_error.cpp:8: parse error before `or'
or_error.cpp:9: parse error before `or'

compile the code

Content-Type: text/x-c++src; name="or_error.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="or_error.cpp"


More information about the Gcc-bugs mailing list