Subject: Re: [boost] Bug report rejected as conformant
From: Edward Diener (eldiener_at_[hidden])
Date: 2018-01-13 20:14:55


On 1/13/2018 1:55 PM, Marc Glisse via Boost wrote:
> On Sat, 13 Jan 2018, Edward Diener via Boost wrote:
>
>> I recently reported a preprocessor bug in Oracle C++ 12.6 on their
>> online forum when compiling a C program example. I even cited the C11
>> standard in showing that Oracle C++ 12.6's actions were
>> non-conformant. The answer I was given, from an Oracle C++ developer
>> who said he was a member of the C++ standard committee, is that since
>> Oracle C++ 12.6 gives a warning message rather than a compiler error
>> the compiler was compliant with the C standard, since the standard
>> only requires a diagnostic message to be considered standard compliant
>> when it does not implement the compiler according to the standard, and
>> that a warning was a diagnostic message. Furthermore since there was a
>> way to force the particular warning to be considered an error, Oracle
>> was not going to change their compiler. At that point I "lost it" so
>> to speak.
>>
>> I cannot conceive that any C/C++ standard would specify that giving a
>> warning rather than an error, when not complying with the C/C++
>> standard, would then make the compiler compliant. Comments ?
>
> Uh, that's what all compilers do all the time when they implement
> extensions to the standard. With gcc, you even need to specify
> -Wpedantic to get those required diagnostics. I am really surprised that
> this is the first compiler for which you notice this...

So a compiler is allowed to implement an extension to the standard which
is non-compliant with the standard, and then claim compliance to the
standard by outputting a warning message instead ? In that case what
hope is there for the programmer to write C/C++ standard compliant code
using such a compiler, since the compiler is "inventing" a standard
which does not exist ?

Note that the error I reported was not when using any
-std=some_compilers_extension mode ( as in gcc's -std=gnu++nn mode as
opposed to -std=c++nn mode) but with -std=c11 mode, which is explained
as being an implementation of the c11 standard. In other words if I were
using an Oracle c11 mode, as in a hypothetical -std=oracle++c11, I would
not have complained about their extension to the standard or their
cavalier treatment of a bug as not being a bug because they produced a
warning. But that was not the case and the mode being used was the
-std=c11 mode, which evidently means to Oracle C++ whatever they feel
like defining as the c11 standard even if it does not follow the actual
c11 standard.