public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Koning, Paul" <Paul.Koning@dell.com>
To: Jason Merrill <jason@redhat.com>
Cc: Nathan Sidwell <nathan@acm.org>, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: C++: add -std={c,gnu}++{current,future}
Date: Tue, 30 Aug 2022 13:32:38 +0000	[thread overview]
Message-ID: <A386817D-7B3F-4B4B-8068-75FF43312528@dell.com> (raw)
In-Reply-To: <03ea18c4-b6d1-bcf0-a6d5-24624d34df6e@redhat.com>



> On Aug 30, 2022, at 9:22 AM, Jason Merrill via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
> 
> On 7/13/22 15:29, Nathan Sidwell wrote:
>> Inspired by a user question.  Jason, thoughts?
>> Since C++ is such a moving target, Microsoft have /std:c++latest
>> (AFAICT clang does not), to select the currently implemented version
>> of the working paper.  But the use of 'std:latest' is somewhat
>> ambiguous -- the current std is C++20 -- that's the latest std, the
>> next std will more than likely but not necessarily be C++23.  So this
>> adds:
>>   -std=c++current -- the current std (c++20)
>>   -std=c++future -- the working paper (c++2b)
>> also adds gnu++current and gnu++future to select the gnu-extended
>> variants.
> 
> I like this direction.
> 
> I imagine people using these to mean roughly beta and alpha, respectively.
> 
> Perhaps we also want -std=c++stable, which would currently be equivalent to the default (c++17) but might not always be.
> 
> Jason

I'm not so sure.

In general, switches have a fixed meaning.  These do not.  "Current" has an intuitive meaning, but the actual meaning is "whatever what current when the version you happen to be invoking was released".  "Future" is like that only stranger.

If I create a software package that uses one of these switches in its Makefile, what will happen?  In a few years, perhaps sooner, the outcome will change without any changes to my code.  The answer would be "don't use those switches", and that is a good answer, but if so why add these switches?

	paul


  reply	other threads:[~2022-08-30 13:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13 19:29 Nathan Sidwell
2022-08-30 12:20 ` Marek Polacek
2022-08-30 13:22 ` Jason Merrill
2022-08-30 13:32   ` Koning, Paul [this message]
2022-08-30 14:00   ` Marek Polacek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A386817D-7B3F-4B4B-8068-75FF43312528@dell.com \
    --to=paul.koning@dell.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=nathan@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).