[committed] libstdc++: Replace reserved identifier _T with _Tp (PR 94901)

Jonathan Wakely jwakely@redhat.com
Fri May 1 13:45:23 GMT 2020


On 01/05/20 15:21 +0200, Jakub Jelinek via Libstdc++ wrote:
>On Fri, May 01, 2020 at 02:17:54PM +0100, Jonathan Wakely via Gcc-patches wrote:
>> The libstdc++ manual documents that _T can not be used, because it's a
>> macro in system headers on some targets.
>>
>> 	PR libstdc++/94901
>> 	* include/std/type_traits (__is_complete_or_unbounded): Replace
>> 	BADNAME _T with _Tp.
>> 	* testsuite/17_intro/badnames.cc: New test.
>>
>> Tested powerpc64le-linux and x86_64-linux, committed to master.
>>
>> This should be backported to gcc-10 too.
>
>Ok for 10 branch, thanks.
>
>> +#define _E9		_E9 is a BADNAME
>> +	// ..
>> +#define _E24		_E24 is a BADNAME
>
>Just wonder about the above, IMHO it is worth spelling them all in between
>too, otherwise we don't catch _E10 or _E13 or _E23 in libstdc++ headers.

OK, can do.

I decided it was pretty unlikely we'd have _E10 without hitting one of
the earlier ones, but I guess it's possible somebody would define _E12
to mean 10e12 or something.

I'll add that to master and then backport the enhanced version.




More information about the Libstdc++ mailing list