ltcmelo / psychec

A compiler frontend for the C programming language
BSD 3-Clause "New" or "Revised" License
536 stars 39 forks source link

`__WCHAR_TYPE__` unsupported #32

Closed aytey closed 2 years ago

aytey commented 3 years ago

GCC version:

gcc (SUSE Linux) 10.2.1 20201202 [revision e563687cf9d3d1278f45aaebd03e0f66531076c9]

clang version:

clang version 11.0.1

Output of gcc -Werror -Wall -Wextra -Wpedantic -pedantic -std=c11 -c $FNAME

(return code 0)

Output of clang -Werror -Wall -Wextra -Wpedantic -pedantic -std=c11 -c $FNAME

(return code 0)

Output of cnip $FNAME

wchar.c:0:0 warning: missing type specifier, assume `int'wchar.c:0:15 error: expected `,' or `;' or `=' after declarator, got `wchar_t'
__WCHAR_TYPE__ wchar_t;
               ^

(return code 0)

Content of file

__WCHAR_TYPE__ wchar_t;

psychec version

commit d10dc1ddfb7ea845f59274a4d6ca5d021ab31423
Author: Leandro T. C. Melo <LTCMELO@GMAIL.COM>
Date:   Tue Mar 9 21:18:30 2021 -0300

    fix postfixing on compound literal
aytey commented 3 years ago

The output is not a copy-and-paste error; the message genuinely comes out mangled like that!

ltcmelo commented 2 years ago

Closing this issue as it is in reality a duplicate of issue #35 , WCHAR_TYPE is predefined macro from the same "group" as UINT32_TYPE.