On Sat, Sep 03, 2022 at 12:54:31PM +0200, Jakub Jelinek via Gcc-patches wrote: > On Sat, Sep 03, 2022 at 12:29:52PM +0200, Jakub Jelinek wrote: > > On Thu, Sep 01, 2022 at 03:00:28PM -0400, Jason Merrill wrote: > > > We might as well use the same flag name, and document it to mean what it > > > currently means for GCC. > > > > Ok, following patch introduces -Wunicode (on by default). > > > > > It looks like this is handling \N{abc}, for which "incomplete" seems like > > > the wrong description; it's complete, just wrong, and the diagnostic > > > doesn't > > > help correct it. > > > > And also will emit the is not a valid universal character with did you mean > > if it matches loosely, otherwise will use the not terminated with } after > > ... wording. > > > > Ok if it passes bootstrap/regtest? > > Actually, treating the !strict case like the strict case except for always > warning instead of error if outside of literals is simpler. > > The following version does that. The only difference on the testcases is in > the > int f = a\N{abc}); > cases where it emits different diagnostics.
And this version passed successfully bootstrap/regtest. Jakub