This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Implementing p0515 - spaceship operator


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!

Tim.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]