User Details
- User Since
- Jun 8 2022, 1:59 PM (9 w, 6 d)
Jul 14 2022
>>But can you add some test coverage for this?
In clang\test\Headers\limits.cpp there is:
_Static_assert(USHRT_MAX == (unsigned short)~0ULL, "");
However as I said this needs a 16 bits target. Looking at the RUN commands at the top of the file I think I can solve this by adding a new RUN command with "-triple msp430" (since my RL78 port is not upstream yet) so it can catch this. Would this be OK?
Jul 13 2022
Additionally, the type of a character constant in C is int.
This means that char32_t c4 = U'\U00064321'; is invalid in C. I know that is clang more strict with the standard than GCC, however I would like to mention that in GCC the value is not truncated to 16 bit which is I found this problem originally. I suppose we want to stick with the standard in clang.
Jun 9 2022
Regarding testing, it seems like this should change the diagnostic emitted for long x = 'abc' from "Character constant too long for its type" to "Multi-character character constant" when the target is AVR?
Currently on RL78 it returns this warning without any extra changes:
warning: multi-character character constant [-Wmultichar] long x = 'abc'; ^
@sammccall this is what you expect, correct?
I haven't built LLVM for AVR yet, I will do it and get back to you.