Page MenuHomePhabricator

SebastianPerta (Sebastian Perta)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 8 2022, 1:59 PM (9 w, 6 d)

Recent Activity

Jul 14 2022

SebastianPerta added a comment to D129689: [limits.h] USHRT_MAX fix for 16 bit architectures.

>>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 14 2022, 7:03 AM · Restricted Project

Jul 13 2022

SebastianPerta requested review of D129689: [limits.h] USHRT_MAX fix for 16 bit architectures.
Jul 13 2022, 12:57 PM · Restricted Project
SebastianPerta added a comment to D127363: [Lex] Fix for char32_t literal truncation on 16 bit architectures.

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.

Jul 13 2022, 12:13 PM · Restricted Project, Restricted Project

Jun 9 2022

SebastianPerta added a comment to D127363: [Lex] Fix for char32_t literal truncation on 16 bit architectures.

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.

Jun 9 2022, 10:42 AM · Restricted Project, Restricted Project

Jun 8 2022

SebastianPerta requested review of D127363: [Lex] Fix for char32_t literal truncation on 16 bit architectures.
Jun 8 2022, 4:41 PM · Restricted Project, Restricted Project