sizeof size_t != sizeof unsigned long

Dirk Mueller mueller at kde.org
Sun Feb 22 17:42:00 GMT 2004


On Sunday 22 February 2004 18:07, Nicolas Goutte wrote:

> The check "sizeof size_t == sizeof unsigned long" fails (since at least
> Summer 2003) for RH 7.3 systems

No, it doesn't. This was a single case of a miserably broken system. The 
problem was that we checked for support of -Wformat related warnings in $CXX, 
but $CC was pointing to a different, older compiler (older than gcc 2.95). 
Therefore, the -Wformat check passed, we added the flags, and when we ran 
$CC, all $CC based tests failed. It is pure luck that this error message 
appeared, it could have been any other too. A real bug might be that it 
prefers "cc" over "gcc", which it should never do. However, the Redhat 7.3 
reporter didn't seem to be interested in tracing this problem down, so we 
have to wait till it happens again, since I cannot reproduce it. A preferable 
workaround would have been to disable --enable-warnings in the release 
tarballs. 

I'm not sure if it is a wise idea to check for such a severly broken system, 
since usually it is okay to compile C code with a different compiler than the 
C++ code (the usual case when using KCC). 

> and now it seems that it breaks for gcc 
> 2.95 systems too.

No, it doesn't. Plenty of KDE developers use 2.95, and gcc 2.95 supports the 
-Wformat attributes just fine (much unlike the broken redhat-gcc, which has a 
higher version number than 2.95, but actually supports less features). 

Again, without config.log its hard to say what goes wrong, but I guess here is 
again a case of "cc" pointing to a severly broken compiler. 


Dirk




More information about the kde-core-devel mailing list