bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-apl] apl 1.7 Symbol.cc compile bug


From: carl hansen
Subject: [Bug-apl] apl 1.7 Symbol.cc compile bug
Date: Sat, 18 Mar 2017 19:36:27 -0700

g++ -DHAVE_CONFIG_H -I. -I..    -Werror -Wall -I sql -I/usr/include -I/usr/include/postgresql  -rdynamic -g -O2 -MT apl-SymbolTable.o -MD -MP -MF .deps/apl-SymbolTable.Tpo -c -o apl-SymbolTable.o `test -f 'SymbolTable.cc' || echo './'`SymbolTable.cc
In file included from Simple_string.hh:33:0,
                 from CDR_string.hh:24,
                 from CDR.hh:24,
                 from Symbol.cc:24:
Symbol.cc: In member function 'void Symbol::set_nc(NameClass, Function*)':
Symbol.cc:888:32: error: enum constant in boolean context [-Werror=int-in-bool-context]
    Assert(nc == NC_FUNCTION || NC_OPERATOR || NC_UNUSED_USER_NAME);
                                ^
line 888 Symbol.cc

    Assert(nc == NC_FUNCTION || NC_OPERATOR || NC_UNUSED_USER_NAME);
This is parsed by precedence rules as :
     Assert ( (nc == NC_FUNCTION ) || NC_OPERATOR || NC_UNUSED_USER_NAME);

should it be:
    Assert(nc == NC_FUNCTION || nc == NC_OPERATOR || nc == NC_UNUSED_USER_NAME);
 
?
In which case it compiles without complaint.
gcc 7


reply via email to

[Prev in Thread] Current Thread [Next in Thread]