From: Edward Diener (eldiener_at_[hidden])
Date: 2020-09-18 01:07:38
On 9/17/2020 7:08 PM, Gavin Lambert via Boost wrote:
> On 18/09/2020 10:10, JoaquÃn M LÃ³pez MuÃ±oz wrote:
>>> I did discover that if gcc or clang is compiled at the C++03 level
>>> with -pedantic there will be a ton of warnings, and if with
>>> -pedantic-errros there will be a ton of errors for those warnings.
>> Donât warning disabling pragmas *around preprocessor definitions*
>> solve the issue?
> Depends on the specific warnings.Â Often the disables are needed at the
> call site instead or in addition.
> I've also seen some warnings raised by template code that are
> essentially impossible to pragma away (without disabling for the entire
> translation unit) as they get attributed to the instantiation "line"
> outside of all user code.Â Those are especially annoying.
As you presciently guessed it is impossible to change a "-Wpedantic" to
either a "warning" if -pedantic-errors is specified or to an "ignore" if
either -pedantic or -pedantic-errors is specified. I tried:
#pragma GCC diagnostic ignore "-Wpedantic"
#pragma GCC diagnostic warning "-Wpedantic"
and neither does anything.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk