[cfe-dev] wint_t definition

Andrew Jeffery andrew at aj.id.au
Mon Jan 4 18:48:11 PST 2010


Hi all,

In playing around with Clang I came across the attached C snippet which 
compiles with GCC but fails with Clang. This appears to be because GCC 
defines the wint_t type in stddef.h where Clang doesn't (changing the 
wctype.h include to wchar.h does away with the whole issue: wchar_t is 
defined and the wint_t issue becomes non-existent).

Should Clang be defining wint_t in stddef.h or is GCC at fault here 
(i.e. shouldn't be defining it there)? This bug shows up when 
configuring pkg-config's bundled glib[1]; at a high level, trying to 
build the bundled glib fails because some unrecognised parameters are 
passed to Clang. The parameters being passed to Clang were different to 
the ones being passed to GCC, so I had a poke around in the config.log 
to check for something going awry and found this issue*. Should I file a 
bug?

Cheers,

Andrew

* It may not be the cause of the change in parameters, but it seemed 
like a problem that should be fixed.

[1] http://pkg-config.freedesktop.org/wiki/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iswalnum.c
Type: text/x-c
Size: 97 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100105/1599294d/attachment.bin>


More information about the cfe-dev mailing list