On Thu, Aug 30, 2018 at 08:07:05PM +0200, Jakub Jelinek wrote: > On Thu, Jan 11, 2018 at 02:06:06PM +0000, Joseph Myers wrote: > > On Thu, 11 Jan 2018, David Brown wrote: > > > > > Maybe it is easier to say "gcc supports <=> in C++2a, and as an > > > extension also supports it in C and C++ of any standard" ? I don't > > > believe there is any way for it to conflict with existing valid code, so > > > it would do no harm as a gcc extension like that - and C users can then > > > use it too. > > > > As per previous IRC discussion, changing the lexing to support this > > pp-token can break valid code in previous standards, e.g. code > > concatenating <=> and >, then stringizing the result (the C++ proposal for > > adding this feature also notes some obscure cases where the character > > sequence <=> can actually occur as tokens, not just pp-tokens - > > "X<&Y::operator<=>" and "x+&operator<=>y" - so of course patches adding > > this feature should add testcases using such cases with older -std= > > options). > > > > Changes to cpp_avoid_paste (so that preprocessed output does not put a > > pp-token starting with > immediately after <=) do not need to be > > conditional on the standard version, however. > > Here is a patch that attempts to implement this (in libcpp + gcc/testsuite > only so far). > It needs to be parsed and handled in the C++ FE obviously, which is missing.
Thanks. Tim, have you had any success with this, or should I (or somebody else) feel free to take it over? Marek