On 26.04.2016 21:28, Marc Glisse wrote: > On Tue, 26 Apr 2016, Bernd Edlinger wrote: > >> For instance PR libstdc++/69881: gmp.h did this: >> >> #define __need_size_t /* tell gcc stddef.h we only want size_t */ >> #include <cstddef> /* for size_t */ >> >> I've persuaded Jonathan to work around that in libstdc++. >> >> Of course the in-tree build does work with less versions than >> otherwise. > > IIUC, the bug only shows up if you compile in C++11 or later, so > basically g++-6 or later, and there is a workaround in libstdc++ > starting from version 6 that means that it doesn't cause any problem. So > there might be a problem if someone tries to build gcc using CXX='g++-5 > -std=c++11' or CXX='clang++ -stdlib=libc++' on a glibc system (I don't > think others use __need_size_t?), but those are rather odd cases. >
Yea, but Jonathan did not like this workaround at all, and my personal preference would also just have been a better error message for this clearly invalid code. Bernd.