This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/67132] gcc -D__WCHAR_TYPE__='unsigned int' should not complain about built-in types redefined


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).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]