[cfe-dev] [RFC] Handling implementation limits

Eli Friedman via cfe-dev cfe-dev at lists.llvm.org
Mon Jan 6 11:50:36 PST 2020


> -----Original Message-----
> From: cfe-dev <cfe-dev-bounces at lists.llvm.org> On Behalf Of Mark de Wever
> via cfe-dev
> Sent: Sunday, January 5, 2020 7:42 AM
> To: Craig Topper <craig.topper at gmail.com>
> Cc: cfe-dev at lists.llvm.org
> Subject: [EXT] Re: [cfe-dev] [RFC] Handling implementation limits
>
> On Sat, Jan 04, 2020 at 01:52:55PM -0800, Craig Topper wrote:
> > Do you plan to also support things that aren’t implementation limits but
> > give warnings under -Wpedantic? For example the length of a string literal
> > in LiteralSupport.cpp. It checks for something like 509 for C, 4095 for C99
> > or 65536 for C++.
>
> These are part of the limits of the standards, else they can be added to
> the Non standard limits.

I'm not sure why we're generating warnings under -Wpedantic in this case, actually.  Neither C nor C++ actually forbids string literals longer than the limit; they just don't require implementations to accept them.  -Wpedantic is not supposed to contain portability warnings.

-Eli


More information about the cfe-dev mailing list