[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-11 Thread bkorb at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #47 from bkorb at gnu dot org 2012-01-11 14:31:15 UTC ---
To eliminate any possible ambiguity, the patch is approved

On 01/10/12 23:49, andreast at gcc dot gnu.org wrote:
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

 Andreas Toblerandreast at gcc dot gnu.org  changed:

 What|Removed |Added
 
   Status|NEW |ASSIGNED

 --- Comment #46 from Andreas Toblerandreast at gcc dot gnu.org  2012-01-11 
 07:49:41 UTC ---
 I'm going to apply the patch from comment #45 this evening.

 Bootstraped several times, make check in fixincludes successful.

 This is the CL I prepared:

 2012-01-11  Bruce Korbbk...@gnu.org
  Steven G. Karglka...@gcc.gnu.org
  Andreas Toblerandre...@fgznet.ch

  PR bootstrap/57105
  PR preprocessor/51776
  * inclhack.def (cdef_cplusplus): Add a replacement for [[noreturn]].
  * fixincl.x: Regenerate.
  * tests/base/sys/cdefs.h: Update.

  * genfixes: Remove the 'Ver.' from the version check.


Index: inclhack.def
===
--- inclhack.def(revision 183089)
+++ inclhack.def(working copy)
@@ -20,6 +20,7 @@
  FIXINC_DEBUG = yes;
  #endif

+
  /* On AIX when _LARGE_FILES is defined stdio.h defines fopen to
   * fopen64 etc. and this causes problems when building with g++
   * because cstdio udefs everything from stdio.h, leaving us with
@@ -1028,6 +1029,22 @@
  test_text = '#define  vfscanf__svfscanf';
  };

+/*
+ * 'g++ -std=c++11' defines __cplusplus to 201103L, which suggests
+ * that it conforms to ISO/IEC 14882:2011.  Until G++ fully conforms,
+ * it should not set __cplusplus to that value.  It currently does
+ * not support the [[noreturn]] procedure attribute.
+ * When it does, this hack should be removed.
+ * SEE:  gcc.gnu.org/bugzilla/show_bug.cgi?id=51776
+ */
+fix = {
+hackname  = cdef_cplusplus;
+files = sys/cdefs.h;
+select= '\[\[noreturn\]\]';
+c_fix = format;
+c_fix_arg = '__attribute__((__noreturn__))';
+test_text = #define _Noreturn[[noreturn]];
+};

  /*
   *  Fix various macros used to define ioctl numbers.
Index: tests/base/sys/cdefs.h
===
--- tests/base/sys/cdefs.h(revision 183089)
+++ tests/base/sys/cdefs.h(working copy)
@@ -9,6 +9,11 @@



+#if defined( CDEF_CPLUSPLUS_CHECK )
+#define _Noreturn__attribute__((__noreturn__))
+#endif  /* CDEF_CPLUSPLUS_CHECK */
+
+
  #if defined( FREEBSD_GCC3_BREAKAGE_CHECK )
  #if __GNUC__ == 2  __GNUC_MINOR__ = 7
  #endif  /* FREEBSD_GCC3_BREAKAGE_CHECK */
Index: genfixes
===
--- genfixes(revision 183089)
+++ genfixes(working copy)
@@ -62,7 +62,7 @@
  AG=autogen $AG
  set -e

-if [ -z `${AG} -v | fgrep 'Ver. 5.'` ]
+if [ -z `${AG} -v | fgrep ' 5.'` ]
  then
echo AutoGen appears to be out of date or not correctly installed.
echo Please download and install:


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-11 Thread sgk at troutmask dot apl.washington.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #48 from Steve Kargl sgk at troutmask dot apl.washington.edu 
2012-01-11 16:23:14 UTC ---
On Wed, Jan 11, 2012 at 07:49:41AM +, andreast at gcc dot gnu.org wrote:
 
 This is the CL I prepared:
 
 2012-01-11  Bruce Korb bk...@gnu.org
 Steven G. Kargl  ka...@gcc.gnu.org
 Andreas Tobler  andre...@fgznet.ch
 
This is ok with me.  In general, I'm more concerned
with fixing bugs than attribution for a patch.


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-11 Thread andreast at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

Andreas Tobler andreast at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #49 from Andreas Tobler andreast at gcc dot gnu.org 2012-01-11 
18:35:12 UTC ---
H, I managed to put a wrong PR number into the CL

Here the commit:

http://gcc.gnu.org/ml/gcc-cvs/2012-01/msg00341.html


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-10 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #44 from Jason Merrill jason at gcc dot gnu.org 2012-01-10 
13:44:22 UTC ---
There is a conflict between the FreeBSD headers and G++, and we can fix it with
fixincludes.  Let's do that and move on.


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-10 Thread andreast at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

Andreas Tobler andreast at gcc dot gnu.org changed:

   What|Removed |Added

  Attachment #26207|0   |1
is obsolete||
 AssignedTo|unassigned at gcc dot   |andreast at gcc dot gnu.org
   |gnu.org |

--- Comment #45 from Andreas Tobler andreast at gcc dot gnu.org 2012-01-11 
07:46:27 UTC ---
Created attachment 26297
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=26297
patch


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-10 Thread andreast at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

Andreas Tobler andreast at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #46 from Andreas Tobler andreast at gcc dot gnu.org 2012-01-11 
07:49:41 UTC ---
I'm going to apply the patch from comment #45 this evening.

Bootstraped several times, make check in fixincludes successful.

This is the CL I prepared:

2012-01-11  Bruce Korb bk...@gnu.org
Steven G. Kargl  ka...@gcc.gnu.org
Andreas Tobler  andre...@fgznet.ch

PR bootstrap/57105
PR preprocessor/51776
* inclhack.def (cdef_cplusplus): Add a replacement for [[noreturn]].
* fixincl.x: Regenerate.
* tests/base/sys/cdefs.h: Update.

* genfixes: Remove the 'Ver.' from the version check.


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-09 Thread sgk at troutmask dot apl.washington.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #33 from Steve Kargl sgk at troutmask dot apl.washington.edu 
2012-01-09 20:13:08 UTC ---
On Fri, Jan 06, 2012 at 04:14:08PM +, bkorb at gnu dot org wrote:
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705
 
 --- Comment #32 from bkorb at gnu dot org 2012-01-06 16:14:08 UTC ---
 (In reply to comment #29)
  +c_fix_arg = __attribute__\(\(__noreturn__\)\);
 
 In a double quoted string, the backslash quotes always quote
 the character that follows.  Here, it yields a noop, which
 is fine because the c-fix-arg is scanned for %1 type markers,
 not regular expressions.
 

I used your patch with the above __attribute__ line.  I was
able to boostrap GCC on FreeBSD 10 without a hitch.  Can you
please commit your patch with the above change?


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-09 Thread andreast at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #34 from Andreas Tobler andreast at gcc dot gnu.org 2012-01-09 
20:32:00 UTC ---
Just to double check, shall I leave the backslash in this line?

c_fix_arg = __attribute__\(\(__noreturn__\)\);

And more important, do we have an ok for a commit of this patch?


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-09 Thread sgk at troutmask dot apl.washington.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #35 from Steve Kargl sgk at troutmask dot apl.washington.edu 
2012-01-09 21:33:23 UTC ---
On Mon, Jan 09, 2012 at 08:32:00PM +, andreast at gcc dot gnu.org wrote:
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705
 
 --- Comment #34 from Andreas Tobler andreast at gcc dot gnu.org 2012-01-09 
 20:32:00 UTC ---
 Just to double check, shall I leave the backslash in this line?
 
 c_fix_arg = __attribute__\(\(__noreturn__\)\);
 

This is the line I tested.  Note, Bruce's patch does not
have a mach= field, so the patch should apply to any OS
with a cdefs.h with [[noreturn]].  I'll also defer to 
Bruce on whether to keep the escaped ( and ) characters.

 And more important, do we have an ok for a commit of this patch?

That's a good question.


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-09 Thread chris at bubblescope dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #36 from Chris Jefferson chris at bubblescope dot net 2012-01-09 
21:45:10 UTC ---
By your reasoning, FreeBSD really may as well take out code which requires
__cplusplus == 201103L , as no compiler will support all of C++11 for several
years I am sure. I would be happy to help work on a patch for that if you like.


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-09 Thread bkorb at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #37 from bkorb at gnu dot org 2012-01-09 22:11:09 UTC ---
It is getting too confusing.

+/*
+ * 'g++ -std=c++11' defines __cplusplus to 201103L, which suggests
+ * that it conforms to ISO/IEC 14882:2011.  Until G++ fully conforms,
+ * it should not set __cplusplus to that value.  It currently does
+ * not support the [[noreturn]] procedure attribute.
+ * When it does, this hack should be removed.
+ * SEE:  gcc.gnu.org/bugzilla/show_bug.cgi?id=51776
+ */
+fix = {
+hackname  = cdef_cplusplus;
+files = sys/cdefs.h;
+select= '\[\[noreturn\]\]';
+c_fix = format;
+c_fix_arg = '__attribute__((__noreturn__))';
+test_text = #define _Noreturn [[noreturn]];
+};

This is the fix/hack that should be used.
There will also be a change required for tests/base/sys/cdefs.h.

The following is also correct, since I read a more recent GNU Coding
standards that makes it clear to not use Ver. in the version.

This is approved.  Regards, Bruce

Index: genfixes
===
--- genfixes(revision 182738)
+++ genfixes(working copy)
@@ -62,7 +62,7 @@ fi
 AG=autogen $AG
 set -e

-if [ -z `${AG} -v | fgrep 'Ver. 5.'` ]
+if [ -z `${AG} -v | fgrep ' 5.'` ]
 then
   echo AutoGen appears to be out of date or not correctly installed.
   echo Please download and install:


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-09 Thread sgk at troutmask dot apl.washington.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #38 from Steve Kargl sgk at troutmask dot apl.washington.edu 
2012-01-09 22:31:03 UTC ---
On Mon, Jan 09, 2012 at 09:45:10PM +, chris at bubblescope dot net wrote:

 By your reasoning, FreeBSD really may as well take out code which
 requires __cplusplus == 201103L , as no compiler will support all
 of C++11 for several years I am sure. I would be happy to help work
 on a patch for that if you like.


That's not what I wrote in comment #16, and see Jason's
reply in comment #24.  

I have no problem with g++ growing feature towards full
support of c++11.

I have no problems with libstdc++v3 using the limited set
of c++11 that are already available.

I do, however, have a problem with g++ defining
__cplusplus == 201103L in violation of ISO/IEC 14882:2011
Secs. 1.4 and 16.8 (note I only have n3242.pdf, so the
section numbers may be wrong in comparison to the ratified 
standard).

If you want to help and want to keep __cplusplus == 201103L,
please supply appropriate recipes for fixincludes to catch all
of the currently unimplemented c++11 features, which g++
currently claims to support.


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-09 Thread ed at 80386 dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #39 from Ed Schouten ed at 80386 dot nl 2012-01-09 22:37:41 UTC 
---
(In reply to comment #36)
 By your reasoning, FreeBSD really may as well take out code which requires
 __cplusplus == 201103L , as no compiler will support all of C++11 for several
 years I am sure. I would be happy to help work on a patch for that if you 
 like.

Chris,

You do realize [[noreturn]] is one of the most basic features one could
imagine, right? As you mentioned, no compiler will support all of C++11 for
several years, but the Clang shipped with FreeBSD 9 (released 1.5 months ago)
does support [[noreturn]], so I assume there is little or no interest to remove
the use of [[noreturn]].


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-09 Thread chris at bubblescope dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #40 from Chris Jefferson chris at bubblescope dot net 2012-01-09 
22:45:32 UTC ---
There are several C++11 features which clang does not support, which g++ does.
clang also defines __cplusplus == 201103L, despite not implementing large parts
of the C++11 standard.

Worse, clang does not have an equivalent of fixincludes, so if these g++-only
features were used, with clang you would be stuck with uncompilable code.

Perhaps the change to c++11 should have been done differently, but if we did
what you suggest we would be no better off, as no compiler (not g++, not clang,
not visual studio, not icc) would define __cplusplus == 201103L for several
years. In fact, no open source compiler would yet have defined it for C++03!

However, I can see this conversation is going around in circles.


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-09 Thread ed at 80386 dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #41 from Ed Schouten ed at 80386 dot nl 2012-01-09 22:48:35 UTC 
---
(In reply to comment #40)
 There are several C++11 features which clang does not support, which g++ does.
 clang also defines __cplusplus == 201103L, despite not implementing large 
 parts
 of the C++11 standard.
 
 Worse, clang does not have an equivalent of fixincludes, so if these g++-only
 features were used, with clang you would be stuck with uncompilable code.
 
 Perhaps the change to c++11 should have been done differently, but if we did
 what you suggest we would be no better off, as no compiler (not g++, not 
 clang,
 not visual studio, not icc) would define __cplusplus == 201103L for several
 years. In fact, no open source compiler would yet have defined it for C++03!
 
 However, I can see this conversation is going around in circles.

But this is where you completely miss the point: Clang does not invoke itself
with -std=c++11 during its own build procedure.


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-09 Thread joseph at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #42 from joseph at codesourcery dot com joseph at codesourcery dot 
com 2012-01-09 22:51:04 UTC ---
The obvious issue with C++11 attributes (such as [[noreturn]]) is that the 
syntactic bindings are (or were when I last looked at a draft) 
incompatible with the syntactic bindings for GNU __attribute__, so meaning 
that C++11 attribute support in GCC will need to deal with different 
syntactic forms of attributes in the same place binding differently.


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-09 Thread chris at bubblescope dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #43 from Chris Jefferson chris at bubblescope dot net 2012-01-09 
22:59:49 UTC ---
g++ only does this while compiling the C++ standard library. clang doesn't come
(by default) with a C++ standard library, so you have to use either libstdc++
(from g++) or libc++. While compiling libc++ (which is clang's implementation
of the standard library), clang is invoked with -std=c++0x. So clang is in
exactly the same state as g++ it seems to me.


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-06 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 CC||bkorb at gnu dot org, jason
   ||at gcc dot gnu.org,
   ||ljrittle at acm dot org

--- Comment #24 from Jason Merrill jason at gcc dot gnu.org 2012-01-06 
14:10:51 UTC ---
(In reply to comment #16)
 I have no problem with -std=c++11 enabling C++11 features and evening
 trying to apply a strict interpretation of C++11.  But, if g++ does
 not support the entire language at 201103L, then it should not advertise
 that it does.  

I sympathize with this position, and put off changing the value for that
reason.  But other compilers have started to define __cplusplus to the 201103L
as well even though they don't implement the whole standard either, since there
is no other portable way to distinguish between which standard is being
targeted.  So we decided to follow suit.  I think fixincludes is the right
answer here.

Adding FreeBSD and fixincludes maintainers to CC.


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-06 Thread bkorb at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #25 from bkorb at gnu dot org 2012-01-06 15:09:46 UTC ---
RE: Comment #16 through Comment #23 -- Do not use sed.  There is no compelling
reason to do so.  Please read the fixincludes README, wherein sed is
disparaged.  I'll add to that the fact that BSD has some non-POSIX treatments
of multi-line commands.  I think this is what you want (not specific to BSD):

+/*
+ * g++ -std=c++11 defines __cplusplus to 201103L, but does not
+ * properly support [[noreturn]].
+ */
+fix = {
+hackname  = cdef_cplusplus;
+files = sys/cdefs.h;
+select= '\[\[noreturn\]\]';
+c_fix = format;
+c_fix_arg = /* noreturn */;
+test_text = #define _Noreturn [[noreturn]];
+};

Note to self (Bruce): devise a way to compile this fix out
once GCC++ properly supports [[noreturn]].


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-06 Thread sgk at troutmask dot apl.washington.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #26 from Steve Kargl sgk at troutmask dot apl.washington.edu 
2012-01-06 15:22:09 UTC ---
On Fri, Jan 06, 2012 at 03:09:46PM +, bkorb at gnu dot org wrote:
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705
 
 --- Comment #25 from bkorb at gnu dot org 2012-01-06 15:09:46 UTC ---
 RE: Comment #16 through Comment #23 -- Do not use sed.  There is no compelling
 reason to do so.  Please read the fixincludes README, wherein sed is
 disparaged.  I'll add to that the fact that BSD has some non-POSIX treatments
 of multi-line commands.  I think this is what you want (not specific to BSD):
 
 +/*
 + * g++ -std=c++11 defines __cplusplus to 201103L, but does not
 + * properly support [[noreturn]].
 + */
 +fix = {
 +hackname  = cdef_cplusplus;
 +files = sys/cdefs.h;
 +select= '\[\[noreturn\]\]';
 +c_fix = format;
 +c_fix_arg = /* noreturn */;
 +test_text = #define _Noreturn [[noreturn]];
 +};
 
 Note to self (Bruce): devise a way to compile this fix out
 once GCC++ properly supports [[noreturn]].
 

I can test this tomorrow.


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-06 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #27 from Jakub Jelinek jakub at gcc dot gnu.org 2012-01-06 
15:30:23 UTC ---
I'd say:
  c_fix_arg = __attribute__((__noreturn__));
would be better.  Thanks for writing a comment that has just the important
facts in it and no emotions.


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-06 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 CC||redi at gcc dot gnu.org

--- Comment #28 from Jonathan Wakely redi at gcc dot gnu.org 2012-01-06 
15:34:07 UTC ---
(In reply to comment #25)
 Note to self (Bruce): devise a way to compile this fix out
 once GCC++ properly supports [[noreturn]].

I'll remember to add a comment to this PR once it's supported, to prod the CC
list


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-06 Thread andreast at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #29 from Andreas Tobler andreast at gcc dot gnu.org 2012-01-06 
15:57:51 UTC ---
Bootstrap in progress with the below.

Additions:

- Jakub's recent comment on c_fix_arg.
- extend mach to match FreeBSD10.* to FreeBSD19.* (Should give some time...)

+ * g++ -std=c++11 defines __cplusplus to 201103L, which lies about
+ * the level of support g++ has for the C++11 standard.
+ */
+fix = {
+hackname  = cdef_cplusplus;
+mach  = *-*-freebsd1[0-9].*;
+files = sys/cdefs.h;
+select= '\[\[noreturn\]\]';
+c_fix = format;
+c_fix_arg = __attribute__\(\(__noreturn__\)\);
+test_text = #define _Noreturn [[noreturn]];
+};
+/*


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-06 Thread bkorb at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #30 from bkorb at gnu dot org 2012-01-06 16:10:33 UTC ---
(In reply to comment #28)
 I'll remember to add a comment to this PR once ...
I fully intend to remember, too.
Probably the appropriate thing is a new bug #51776


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-06 Thread bkorb at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #32 from bkorb at gnu dot org 2012-01-06 16:14:08 UTC ---
(In reply to comment #29)
 +c_fix_arg = __attribute__\(\(__noreturn__\)\);

In a double quoted string, the backslash quotes always quote
the character that follows.  Here, it yields a noop, which
is fine because the c-fix-arg is scanned for %1 type markers,
not regular expressions.


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-06 Thread sgk at troutmask dot apl.washington.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

--- Comment #31 from Steve Kargl sgk at troutmask dot apl.washington.edu 
2012-01-06 16:11:08 UTC ---
On Fri, Jan 06, 2012 at 03:30:23PM +, jakub at gcc dot gnu.org wrote:
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705
 
 --- Comment #27 from Jakub Jelinek jakub at gcc dot gnu.org 2012-01-06 
 15:30:23 UTC ---
 I'd say:
   c_fix_arg = __attribute__((__noreturn__));
 would be better.  Thanks for writing a comment that has just the important
 facts in it and no emotions.
 

Apparently, you did not read my 2nd patch. 
There was no emotion in the comment.  Just
the facts.  I suppose the truth hurts sometime.

+/*
+ * 'g++ -std=c++11' defines __cplusplus to 201103L, which suggests
+ * that 'g++ -std=c++11' is a compiler conforming to the C++ programming
+ * language defined by ISO/IEC 14882:2011.  Setting __cplusplus to 
+ * 201103L appears to be a direct violation of ISO/IEC 14882:2011
+ * [as inferred from Secs. 1.4 and 16.8 in n3242.pdf (I'm not interested
+ * in spending CHF 352.00 for the actual standard)].  The standard
+ * conforming sys/cdefs.h header file on FreeBSD 10 (and above) needs be
+ * (un)damaged, so GCC can use 'g++ -std=c++11' to build libstdc++v3 
+ * during bootstrap. 
+ */


[Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L

2012-01-02 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-01-02
   Target Milestone|--- |4.7.0
Summary|FreeBSD uses unsupported|[4.7 Regression] FreeBSD
   |C++11 features when |uses unsupported C++11
   |__cplusplus == 201103L  |features when __cplusplus
   ||== 201103L
 Ever Confirmed|0   |1