This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib 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]

Re: WCHAR_MAX question


The correct way it should be done is to have the compiler generate a macro for it. As it turns out, the gcc compiler has __WCHAR_MAX__ as one of it's default builtins which is why the code is defined as it is. See c-cppbuiltin.c in the gcc directory.

For non-gcc compilers, we are defaulting the maximum value which I do not think a bad thing as most wchar_t implementations use 4-byte values for obvious reasons.

I agree that the most right way is to use GCC's predefined macro like __WCHAR_MAX__. BUT! There is no such macro in gcc-3.2! What version of gcc did you mention? I did 'grep -r WCHAR_MAX gcc-3.2/*' and didn't found anything interesting...



-- Best Regards, Artem B. Bityuckiy, St.-Petersburg, Russia.


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