public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 1/3] Factor out jobserver_active_p.
Date: Wed, 10 Aug 2022 09:47:38 +0200	[thread overview]
Message-ID: <CAFiYyc0DkWM4O4kEPVWw-16SVP76fTjQYDgYP9xwNPOmtNipzQ@mail.gmail.com> (raw)
In-Reply-To: <82e413fb-d592-3885-9d93-28c717921523@suse.cz>

On Wed, Aug 10, 2022 at 9:17 AM Martin Liška <mliska@suse.cz> wrote:
>
> On 8/10/22 08:56, Richard Biener wrote:
> > C++ standard library includes have to go through system.h (#define
> > INCLUDE_STRING).
>
> Oh, yeah. That means I need to rely on the flat header files :/
>
> >
> > Does the API really have to use std::string?
>
> I would like to. My main motivation is std::string::rfind function that
> has no C equivalent (would be rstrstr).

The old code happily uses strstr though, not worrying about
finding the last instance of --jobserver-auth?

Anyway, I'm not going to insist - I just noticed the actual
users use .c_str on the error message and adjusting the
environment for a not working jobserver is done
inconsistently.  Since I'm coming from C I was more
expecting sth like

 bool jobserver_active = probe_jobserver (true /* diagnose */);

rather than pulling in a class instance from an all-inline
implementation.  But hey ;)


>
> Martin

  reply	other threads:[~2022-08-10  7:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 12:00 Martin Liška
2022-08-10  6:56 ` Richard Biener
2022-08-10  7:17   ` Martin Liška
2022-08-10  7:47     ` Richard Biener [this message]
2022-08-10  9:30       ` Martin Liška
2022-08-10 10:47         ` Richard Biener
2022-08-10 11:11           ` Martin Liška
2022-08-10 11:51             ` Richard Biener

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=CAFiYyc0DkWM4O4kEPVWw-16SVP76fTjQYDgYP9xwNPOmtNipzQ@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mliska@suse.cz \
    /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).