Martijn van Beurden
2013-Apr-19 18:00 UTC
[flac-dev] Preprocessor error when trying to build integer-only
Hi, I was wondering how much worse FLAC performance would be if it was compiled integer-only, but while trying to do so (by adding #define FLAC__INTEGER_ONLY_LIBRARY 1 to config.h, just on x86_64-linux) I got this error> ./include/private/bitmath.h:134:5: error: operator '&&' has no left > operandbitmath.h:134 is the following line> #if && defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && > __GNUC_MINOR__ >= 4))I really wonder why anyone would have left it like this. Maybe something went wrong? Removing the first && solved the problem and it compiled nicely. This is current git (2de567f), all tests passed after this small change.
Ulrich Klauer
2013-Apr-19 18:50 UTC
[flac-dev] Preprocessor error when trying to build integer-only
Martijn van Beurden wrote:> > #if && defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))> I really wonder why anyone would have left it like this. Maybe > something went wrong? Removing the first && solved the problem > and it compiled nicely.I'd assume some kind of editing mistake. Probably, in an earlier draft of commit 387b727, there was an additional condition that proved unnecessary and got removed, but not completely. And you were apparently the first to try an integer-only build in about a year. :-) Ulrich
Erik de Castro Lopo
2013-Apr-21 09:57 UTC
[flac-dev] Preprocessor error when trying to build integer-only
Martijn van Beurden wrote:> Hi, > > I was wondering how much worse FLAC performance would be if it was > compiled integer-only, but while trying to do so (by adding #define > FLAC__INTEGER_ONLY_LIBRARY 1 to config.h, just on x86_64-linux) I got > this error > > > ./include/private/bitmath.h:134:5: error: operator '&&' has no left > > operand > > bitmath.h:134 is the following line > > > #if && defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && > > __GNUC_MINOR__ >= 4)) > > I really wonder why anyone would have left it like this. Maybe something > went wrong? Removing the first && solved the problem and it compiled > nicely. This is current git (2de567f), all tests passed after this small > change.Fixed in git HEAD. Thanks for the problem report. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/