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]
Other format: [Raw text]

[Bug c++/27739] New: "expected primary-expression before double" error caused by simple varaible name


Hello,
    I have tried to compile the following simple code using g++ version 3.4.4.

int main(int argc, char *argv[])
{
        double or;
        return 1;
}

The compiler returns the following errors:

main.cpp: In function `int main(int, char**)':
main.cpp:3: error: expected primary-expression before "double"
main.cpp:3: error: expected `;' before "double"
make: *** [dummy] Error 1


Renaming the variable something other than 'or' fixes the error. Nevertheless,
the error message isn't particularly clear!

Many thanks


-- 
           Summary: "expected primary-expression before double" error caused
                    by simple varaible name
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bugzilla at adamauton dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27739


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