g++'s non-conformance

Anjul Srivastava anjul.srivastava@sanchez.com
Thu Dec 9 13:22:00 GMT 1999


Page: 12, ISO/IEC 14882:1998(E)

Table 2 -- alternative tokens

alternative    primary

    and          &&

------

g++ does not accept the following program:

main()
{
    return 1 and 2;
}

=====================

Page: 14, ISO/IEC 14882:1998(E)

2.11 Para 2

"Furthermore, the alternative representations shown in Table 4 for certain
operators and punctuators are reserved and shall not be used otherwise:"

------

g++ *does* accept the following program:

main()
{
    int and;

    return and=5;
}


More information about the Gcc mailing list