Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Simon Marchi <simon.marchi@polymtl.ca>,
	Andrew Burgess <andrew.burgess@embecosm.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH] gdbsupport: better detection of -Wmissing-prototypes support
Date: Fri, 24 Sep 2021 16:09:23 +0100	[thread overview]
Message-ID: <8b821ff9-49ac-60b7-5904-48441e8405a8@palves.net> (raw)
In-Reply-To: <c111b9a6-ce2a-0eed-f8f4-1de693aa755a@polymtl.ca>

On 2021-09-24 3:55 p.m., Simon Marchi wrote:
>> How about skipping checking for -Wmissing-prototypes support if compiling with gcc then?
> 
> The other solutions seemed a bit better to me, since they were adding
> less special cases and complexity, but in the end I don't really mind,
> as long as it works.

Imagine two different sets of warnings, warnings about "bad1", and warnings about "bad2" with
"bad1" and "bad2" being completely unrelated.

You want to enable warnings about "bad1", and not about "bad2".  The problem is that both
compilers A and B accept a "-Wfoo" switch, and that switch enables "bad1" warnings on compiler A,
and "bad2" warnings on compiler B.

How do you handle this?  Well, the most obvious fix would be to make it compiler specific, right?

Forcing linking or doing something special for ccache seems like special casing to me too.
More than a compiler check from the angle above, from the view that not enabling the warning
on GCC is just something that makes sense on its own.

In the end I don't mind which approach is taken either.  Opinions were asked, and I gave mine.  :-)

  reply	other threads:[~2021-09-24 15:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 12:29 Andrew Burgess
2021-09-24 13:16 ` Andrew Burgess
2021-09-24 13:40   ` Simon Marchi via Gdb-patches
2021-09-24 14:06     ` Pedro Alves
2021-09-24 14:22       ` Simon Marchi via Gdb-patches
2021-09-24 14:30         ` Pedro Alves
2021-09-24 14:55           ` Simon Marchi via Gdb-patches
2021-09-24 15:09             ` Pedro Alves [this message]
2021-09-24 15:14 ` [PATCHv2] " Andrew Burgess
2021-10-25 14:50   ` Simon Marchi via Gdb-patches

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=8b821ff9-49ac-60b7-5904-48441e8405a8@palves.net \
    --to=pedro@palves.net \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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