Hi Jakub,
On 01/10/2018 10:32 PM, Jakub Jelinek wrote:
On Wed, Jan 10, 2018 at 10:24:00PM +0100, Tim van Deurzen wrote:
On 01/10/2018 02:00 PM, Jonathan Wakely wrote:
On 9 Jan 2018 10:56 p.m., "Tim van Deurzen" wrote:
Just to confirm with you, it does make sense to conditionally
parse the token for operator<=> in libcpp (i.e. only when the cxx
standard being used is >=2a)? I'm just wondering if this does not
accidentally affect other front-ends using libcpp?
Other front ends won't setthe language to C++2a.
I think the relevant check is:
if (CPP_OPTION (pfile, lang) == CLK_CXX2A
|| CPP_OPTION (pfile, lang) == CLK_GNUCXX2A)
This can only be true for a C++ source file when the standard is C++2a.
Ok, good to know, then I'll proceed like this. Thank you!
Well, the usual way of doing stuff is add another field to
struct lang_flags, add it to the lang_defaults table, add it to
struct cpp_options too and then use CPP_OPTION (pfile, spaceship) or so,
e.g. look how va_opt etc. are implemented.
Jakub
I think, I got almost all of that at some point, but probably missed
something somewhere.
For now I will proceed with the cxx standard flags. If I add any kind of
warning or toggle I'll have a good idea where to start at this point.
Thank you!
Tim.