This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/67132] gcc -D__WCHAR_TYPE__='unsigned int' should not complain about built-in types redefined
- From: "giacomo at tesio dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 11 Aug 2015 23:35:40 +0000
- Subject: [Bug c/67132] gcc -D__WCHAR_TYPE__='unsigned int' should not complain about built-in types redefined
- Auto-submitted: auto-generated
- References: <bug-67132-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67132
--- Comment #2 from Giacomo Tesio <giacomo at tesio dot it> ---
The warning about signedness if perfectly fine.
What I'd like to be able to do (without warnings) is to redefine tree built-in
types and constants at the command line.
Since it already works, the only issue is that GCC complains because his own
built-ins are already been defined at command line.
But from my tests, the command
gcc -D__WCHAR_TYPE__='unsigned int' -D__WCHAR_MAX__=4294967295U
-D__WCHAR_MIN__=0 hello.c -o hello
turns all L"" notations in an unsigned int * (instead of the int * they are by
default).
In other terms: in the expression
Rune *s = L"ÎÏÏÎÎÎÎÎÏ";
I don't want to suppress the warning about signedness, I want that the right
end side of the expression is desugared as an array of unsigned int. And I want
to be able to do that with options at the gcc command line.
And looks like it already works! But, gcc complains about the redefinition of
its own internal types. These are the warnings that I want to suppress, not
those about the signedness of the assigment (that are correct and useful).