Re: [PATCH] c++: add test for DR 2855

2024-05-14 Thread Jason Merrill
On 5/14/24 13:54, Marek Polacek wrote: Tested x86_64-pc-linux-gnu, OK to add such a test? OK. -- >8 -- Let int8_t x = 127; This DR says that while x++; invokes UB, ++x; does not. The resolution was to make the first one valid. The following test verifies that we don't report

[PATCH] c++: add test for DR 2855

2024-05-14 Thread Marek Polacek
Tested x86_64-pc-linux-gnu, OK to add such a test? -- >8 -- Let int8_t x = 127; This DR says that while x++; invokes UB, ++x; does not. The resolution was to make the first one valid. The following test verifies that we don't report any errors in a constexpr context. DR 2855