[C++ PATCH] Feature macros are long
Nathan Sidwell
nathan@acm.org
Wed Oct 30 17:42:00 GMT 2019
On 10/30/19 12:36 PM, Jakub Jelinek wrote:
> On Wed, Oct 30, 2019 at 12:33:00PM -0400, Nathan Sidwell wrote:
>> As discussed on IRC, this adds an L suffix to C++ feature macros, as
>> specified by the std. I'd forgotten that in preprocessor-land, expressions
>> are evaluated as longs anyway, but the user might be trying to printf these
>> constants, or similar, where the type suffix is significant.
>>
>> Jakub, Thomas:
>> cpp_define (pfile, "_OPENACC=201306");
>> cpp_define (pfile, "_OPENMP=201511");
>> those two macros might need suffixing too, but I don't have a std handy.
>
> "the _OPENMP macro name is defined to have the
> decimal value yyyymm where yyyy and mm are the year and month designations
> of the version of the OpenMP API that the implementation supports."
> I think that doesn't imply L suffix, but can ask.
'decimal value' is a confused term. It's a number with value, type and
representation. If it said the token yyyymmm where ..., I'd understand.
nathan
--
Nathan Sidwell
More information about the Gcc-patches
mailing list