public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bernd Edlinger <bernd.edlinger@hotmail.de>
To: Jakub Jelinek <jakub@redhat.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	Jason Merrill	<jason@redhat.com>,
	Jonathan Wakely <jwakely@redhat.com>
Subject: Re: [C++ PATCH] Fix option handling when -std=gnu++14 is not used (PR 69865)
Date: Fri, 19 Feb 2016 11:09:00 -0000	[thread overview]
Message-ID: <HE1PR07MB09054F1EE94A5C0E57E41AAEE4A00@HE1PR07MB0905.eurprd07.prod.outlook.com> (raw)
In-Reply-To: <20160219105612.GA3017@tucnak.redhat.com>

On 19.02.2016 11:56, Jakub Jelinek wrote:
>
> On Fri, Feb 19, 2016 at 10:50:34AM +0000, Bernd Edlinger wrote:
> > While I think that we should probably not define __GNUC_GNU_INLINE__ at all for C++,
> > because it is meaningless, I am warned that this could break (already broken) header files.
> 
> It is not meaningless.  The various headers need to know if it is safe to
> use the gnu_inline attribute in C++.
> 
> In any case, the desirable state is that e.g. the -E -dD output should be
> identical if you explicitly request the default -std= version vs. if it is
> set implicitly.  We should verify it is the case even for C.
> 
>         Jakub

I absolutely agree with you.
The correct solution is probably doing this:

--- gcc/cp/cfns.h.jj	2016-01-04 15:30:50.000000000 +0100
+++ gcc/cp/cfns.h	2016-02-19 12:00:15.730375049 +0100
@@ -124,9 +124,6 @@
 
 #ifdef __GNUC__
 __inline
-#ifdef __GNUC_STDC_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
 #endif
 const char *
 libc_name_p (register const char *str, register unsigned int len)

and remove this hunk instead:

@@ -786,7 +790,7 @@ c_common_post_options (const char **pfilename)
   /* By default we use C99 inline semantics in GNU99 or C99 mode.  C99
      inline semantics are not supported in GNU89 or C89 mode.  */
   if (flag_gnu89_inline == -1)
-    flag_gnu89_inline = !flag_isoc99;
+    flag_gnu89_inline = c_dialect_cxx () || !flag_isoc99;
   else if (!flag_gnu89_inline && !flag_isoc99)
     error ("-fno-gnu89-inline is only supported in GNU99 or C99 mode");


Would you like that better?


Thanks
Bernd.

  reply	other threads:[~2016-02-19 11:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-19 10:50 Bernd Edlinger
2016-02-19 10:56 ` Jakub Jelinek
2016-02-19 11:09   ` Bernd Edlinger [this message]
2016-02-19 11:31     ` Jakub Jelinek
2016-02-19 11:53       ` Bernd Edlinger
2016-02-19 11:59         ` Jakub Jelinek
2016-02-19 12:10           ` Bernd Edlinger
2016-02-19 12:22           ` Jakub Jelinek
2016-02-19 12:26             ` Jakub Jelinek
2016-02-19 15:09               ` Bernd Edlinger
2016-02-19 15:09               ` Bernd Edlinger
2016-02-19 15:22                 ` Jakub Jelinek
2016-02-19 15:31                   ` Bernd Edlinger
2016-02-19 15:51                   ` Bernd Edlinger
2016-02-19 16:03                     ` Jason Merrill
2016-02-19 16:10                       ` Jakub Jelinek
2016-02-19 16:19                         ` Bernd Edlinger
2016-02-19 19:37                       ` Bernd Edlinger
2016-02-19 19:47                         ` Jason Merrill
2016-02-20  6:38                           ` Bernd Edlinger
2016-02-25 15:27                             ` Jakub Jelinek
2016-02-19 16:39                     ` Jakub Jelinek
2016-02-19 17:26                       ` Bernd Edlinger
2016-02-19 13:07             ` Bernd Edlinger

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=HE1PR07MB09054F1EE94A5C0E57E41AAEE4A00@HE1PR07MB0905.eurprd07.prod.outlook.com \
    --to=bernd.edlinger@hotmail.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jason@redhat.com \
    --cc=jwakely@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).