public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Martin Sebor <msebor@gmail.com>
Cc: Jason Merrill <jason@redhat.com>,
	Jakub Jelinek <jakub@redhat.com>,
	Marek Polacek <polacek@redhat.com>,
	Gcc Patch List <gcc-patches@gcc.gnu.org>
Subject: Re: [PING] Re: [PATCH] c/66516 - missing diagnostic on taking the address of a builtin function
Date: Wed, 02 Sep 2015 00:20:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.10.1509020018410.6278@digraph.polyomino.org.uk> (raw)
In-Reply-To: <55E625DA.7080203@gmail.com>

On Tue, 1 Sep 2015, Martin Sebor wrote:

> I also noticed uses of DECL_LANG_FLAG_4 in the definitions of
> what appear to be C-specific macros in c-family/c-common.h,
> and then uses of the same macro in definitions of a C++-specific
> macro in cp/cp-tree.h.

That seems like a bug waiting to happen, given that there is nothing 
obviously C-specific about the users in common code of those macros.

> In this light it seems to me that leaving the test for the flag
> as it was would be both in keeping with existing practice and
> preferable to introducing the hook.

The existing practice you found was of use of DECL_LANG_FLAG_* in defining 
macros.  Not direct use in C files, which is clearly much worse.  I 
suppose there's the option of defining the macro in c-common.h, but 
defining it in a way that includes an assertion that it's never evaluated 
for C++.

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2015-09-02  0:20 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22  0:36 Martin Sebor
2015-06-22 14:11 ` Joseph Myers
2015-06-22 14:41 ` Marek Polacek
2015-06-23  4:38   ` Martin Sebor
2015-06-23 10:29     ` Marek Polacek
2015-06-23 10:39       ` Jakub Jelinek
2015-06-23 15:12         ` Martin Sebor
2015-06-29  7:37           ` Martin Sebor
2015-07-02 14:20             ` Joseph Myers
2015-07-04 22:32               ` Martin Sebor
2015-07-14  3:37                 ` [PING] " Martin Sebor
2015-07-14 15:01                   ` Jason Merrill
2015-07-14 15:07                     ` Jason Merrill
2015-07-14 18:04                     ` Martin Sebor
2015-07-29  7:27                       ` Jason Merrill
2015-07-29 19:07                         ` Martin Sebor
2015-08-03 23:02                           ` Martin Sebor
2015-08-04 15:04                             ` Jason Merrill
2015-08-04 15:58                               ` Jeff Law
2015-08-04 15:19                             ` Joseph Myers
2015-08-28 20:10                         ` Martin Sebor
2015-08-28 20:49                           ` Joseph Myers
2015-08-29  0:57                             ` Martin Sebor
2015-09-01 15:01                               ` Martin Sebor
2015-09-01 17:29                                 ` Joseph Myers
2015-09-01 22:25                                   ` Martin Sebor
2015-09-02  0:20                                     ` Joseph Myers [this message]
2015-09-02 15:29                                     ` Jason Merrill
2015-09-02 22:13                                       ` Martin Sebor
2015-09-03 14:29                                         ` Jason Merrill
2015-09-03 14:53                                           ` Joseph Myers
2015-09-03 17:30                                         ` Jakub Jelinek
2015-09-03 18:28                                           ` Martin Sebor
2015-06-22 19:45 ` 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=alpine.DEB.2.10.1509020018410.6278@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jason@redhat.com \
    --cc=msebor@gmail.com \
    --cc=polacek@redhat.com \
    /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).