This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
don't forbid brace groups with g++ 4.2.2
authorRobin Barker <RMBarker@cpan.org>
Wed, 30 Jan 2008 18:42:25 +0000 (18:42 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 31 Jan 2008 15:39:14 +0000 (15:39 +0000)
From: "Robin Barker" <Robin.Barker@npl.co.uk>
Message-ID: <46A0F33545E63740BC7563DE59CA9C6D093A17@exchsvr2.npl.ad.local>

p4raw-id: //depot/perl@33152

perl.h

diff --git a/perl.h b/perl.h
index 8c5772f..ba95492 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -448,8 +448,12 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER));
 
 /* gcc (-ansi) -pedantic doesn't allow gcc statement expressions,
  * g++ allows them but seems to have problems with them
 
 /* gcc (-ansi) -pedantic doesn't allow gcc statement expressions,
  * g++ allows them but seems to have problems with them
- * (insane errors ensue). */
-#if defined(PERL_GCC_PEDANTIC) || (defined(__GNUC__) && defined(__cplusplus))
+ * (insane errors ensue).
+ * g++ does not give insane errors now (RMB 2008-01-30, gcc 4.2.2).
+ */
+#if defined(PERL_GCC_PEDANTIC) || \
+    (defined(__GNUC__) && defined(__cplusplus) && \
+       ((__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ < 2))))
 #  ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
 #    define PERL_GCC_BRACE_GROUPS_FORBIDDEN
 #  endif
 #  ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
 #    define PERL_GCC_BRACE_GROUPS_FORBIDDEN
 #  endif