PR c/25880 improve message of warning for discarding qualifiers
Gabriel Dos Reis
gdr@integrable-solutions.net
Mon May 24 14:47:00 GMT 2010
On Mon, May 24, 2010 at 7:20 AM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> On Mon, 24 May 2010, Manuel López-Ibáñez wrote:
>
>> Do you mean?
>>
>> + pp_c_ws_string (pp, func_type ? "__atribute__((const))" : "const");
>> + previous = true;
>
> Yes.
>
>> Does it work the same for C++? This function is shared between the two FEs.
>
> I don't know the details of how C++ represents things, but the use of
> qualifiers on function declarations and function types to represent these
> attributes is a language-independent part of GCC's internal
> representation.
C++ has the notion of const member function, which is different from what
GCC means by a function attribute const.
Also CV qualifiers applied to function types in C++ is a very delicate
issue -- witness
the myriads attempt/fixes in both the front-end and the standard.
Printing the cv qualifiers
is even more confusing.
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
More information about the Gcc-patches
mailing list