* [Bug c++/51773] error building libitm/aatree.cc on ARM
2012-01-06 9:50 [Bug c++/51773] New: error building libitm/aatree.cc on ARM vries at gcc dot gnu.org
@ 2012-01-06 10:50 ` redi at gcc dot gnu.org
2012-01-06 10:52 ` vries at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: redi at gcc dot gnu.org @ 2012-01-06 10:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51773
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-06 10:50:24 UTC ---
(In reply to comment #0)
> /home/vries/local/glibc-arm/base/src/gcc-mainline/libitm/local_type_traits:886:52:
> error: ISO C++ forbids declaration of '_Static_assert' with no type
Looks a though someone has done a
#define static_assert _Static-assert
Another glibc C11 change that breaks C++?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/51773] error building libitm/aatree.cc on ARM
2012-01-06 9:50 [Bug c++/51773] New: error building libitm/aatree.cc on ARM vries at gcc dot gnu.org
2012-01-06 10:50 ` [Bug c++/51773] " redi at gcc dot gnu.org
@ 2012-01-06 10:52 ` vries at gcc dot gnu.org
2012-01-06 10:56 ` redi at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: vries at gcc dot gnu.org @ 2012-01-06 10:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51773
--- Comment #2 from vries at gcc dot gnu.org 2012-01-06 10:51:51 UTC ---
Looks related to:
+ [BZ #13529]
+ * assert/assert.h (static_assert): Define.
+
diff --git a/assert/assert.h b/assert/assert.h
index 841f435..4022e28 100644
--- a/assert/assert.h
+++ b/assert/assert.h
@@ -113,3 +113,10 @@ __END_DECLS
# endif
#endif /* NDEBUG. */
+
+
+#ifdef __USE_ISOC11
+/* Static assertion. Requires support in the compiler. */
+# undef static_assert
+# define static_assert _Static_assert
+#endif
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/51773] error building libitm/aatree.cc on ARM
2012-01-06 9:50 [Bug c++/51773] New: error building libitm/aatree.cc on ARM vries at gcc dot gnu.org
2012-01-06 10:50 ` [Bug c++/51773] " redi at gcc dot gnu.org
2012-01-06 10:52 ` vries at gcc dot gnu.org
@ 2012-01-06 10:56 ` redi at gcc dot gnu.org
2012-01-06 11:07 ` redi at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: redi at gcc dot gnu.org @ 2012-01-06 10:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51773
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-06 10:56:31 UTC ---
http://sourceware.org/bugzilla/show_bug.cgi?id=13529
should be reproducible with:
#include <assert.h>
static_assert( true, "valid C++" );
this could be fixed in libstdc++ by providing a fixed assert.h with #undef
static_assert, but glibc shouldn't be defining the macro for __cplusplus in the
first place
does glibc also define macros for alignof, true, false, bool etc. in C++ mode?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/51773] error building libitm/aatree.cc on ARM
2012-01-06 9:50 [Bug c++/51773] New: error building libitm/aatree.cc on ARM vries at gcc dot gnu.org
` (2 preceding siblings ...)
2012-01-06 10:56 ` redi at gcc dot gnu.org
@ 2012-01-06 11:07 ` redi at gcc dot gnu.org
2012-01-06 11:47 ` joseph at codesourcery dot com
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: redi at gcc dot gnu.org @ 2012-01-06 11:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51773
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-06 11:06:50 UTC ---
this should be reported to glibc, like
http://sourceware.org/bugzilla/show_bug.cgi?id=13566
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/51773] error building libitm/aatree.cc on ARM
2012-01-06 9:50 [Bug c++/51773] New: error building libitm/aatree.cc on ARM vries at gcc dot gnu.org
` (3 preceding siblings ...)
2012-01-06 11:07 ` redi at gcc dot gnu.org
@ 2012-01-06 11:47 ` joseph at codesourcery dot com
2012-01-06 12:08 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: joseph at codesourcery dot com @ 2012-01-06 11:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51773
--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-01-06 11:47:15 UTC ---
On Fri, 6 Jan 2012, redi at gcc dot gnu.org wrote:
> does glibc also define macros for alignof, true, false, bool etc. in C++ mode?
Those C11 macros are defined in headers required to be provided by
freestanding implementations, so provided by GCC, not glibc - but it was
felt suitable to use assert.h for static_assert rather than creating a new
stdstatic_assert.h header for that macro. We already discussed C++
semantics for those headers, see
<http://gcc.gnu.org/ml/gcc-patches/2011-11/msg00847.html>.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/51773] error building libitm/aatree.cc on ARM
2012-01-06 9:50 [Bug c++/51773] New: error building libitm/aatree.cc on ARM vries at gcc dot gnu.org
` (4 preceding siblings ...)
2012-01-06 11:47 ` joseph at codesourcery dot com
@ 2012-01-06 12:08 ` redi at gcc dot gnu.org
2012-01-06 15:28 ` joseph at codesourcery dot com
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: redi at gcc dot gnu.org @ 2012-01-06 12:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51773
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-06 12:08:11 UTC ---
(In reply to comment #5)
> We already discussed C++
> semantics for those headers, see
> <http://gcc.gnu.org/ml/gcc-patches/2011-11/msg00847.html>.
Yep, I remember, I was just checking whether the new glibc changes altered
things - glad to hear they don't.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/51773] error building libitm/aatree.cc on ARM
2012-01-06 9:50 [Bug c++/51773] New: error building libitm/aatree.cc on ARM vries at gcc dot gnu.org
` (5 preceding siblings ...)
2012-01-06 12:08 ` redi at gcc dot gnu.org
@ 2012-01-06 15:28 ` joseph at codesourcery dot com
2012-01-06 15:33 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: joseph at codesourcery dot com @ 2012-01-06 15:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51773
--- Comment #7 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-01-06 15:28:16 UTC ---
On Fri, 6 Jan 2012, redi at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51773
>
> --- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-06 12:08:11 UTC ---
> (In reply to comment #5)
> > We already discussed C++
> > semantics for those headers, see
> > <http://gcc.gnu.org/ml/gcc-patches/2011-11/msg00847.html>.
>
> Yep, I remember, I was just checking whether the new glibc changes altered
> things - glad to hear they don't.
You probably want to check all the C11 features in glibc (listed as
dependencies of <http://sourceware.org/bugzilla/show_bug.cgi?id=13525> -
my original list was
<http://sourceware.org/ml/libc-alpha/2011-12/msg00051.html>) for whether
the headers do what you think they should for C++ (both C++03 and C++11) -
and update the glibc issues for anything needing more work for C++.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/51773] error building libitm/aatree.cc on ARM
2012-01-06 9:50 [Bug c++/51773] New: error building libitm/aatree.cc on ARM vries at gcc dot gnu.org
` (6 preceding siblings ...)
2012-01-06 15:28 ` joseph at codesourcery dot com
@ 2012-01-06 15:33 ` redi at gcc dot gnu.org
2012-01-06 15:44 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: redi at gcc dot gnu.org @ 2012-01-06 15:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51773
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-06 15:33:16 UTC ---
I've already glanced over them and added one comment, I'll go through them
properly asap
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/51773] error building libitm/aatree.cc on ARM
2012-01-06 9:50 [Bug c++/51773] New: error building libitm/aatree.cc on ARM vries at gcc dot gnu.org
` (7 preceding siblings ...)
2012-01-06 15:33 ` redi at gcc dot gnu.org
@ 2012-01-06 15:44 ` jakub at gcc dot gnu.org
2012-01-06 15:51 ` joseph at codesourcery dot com
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-06 15:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51773
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-06 15:43:19 UTC ---
I'm not sure if for -D_GNU_SOURCE we want a ::gets prototype in C++, it would
be better to just have std::gets only.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/51773] error building libitm/aatree.cc on ARM
2012-01-06 9:50 [Bug c++/51773] New: error building libitm/aatree.cc on ARM vries at gcc dot gnu.org
` (8 preceding siblings ...)
2012-01-06 15:44 ` jakub at gcc dot gnu.org
@ 2012-01-06 15:51 ` joseph at codesourcery dot com
2012-01-06 16:12 ` jakub at gcc dot gnu.org
2012-01-09 11:35 ` vries at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: joseph at codesourcery dot com @ 2012-01-06 15:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51773
--- Comment #10 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-01-06 15:51:20 UTC ---
On Fri, 6 Jan 2012, jakub at gcc dot gnu.org wrote:
> I'm not sure if for -D_GNU_SOURCE we want a ::gets prototype in C++, it would
> be better to just have std::gets only.
The trouble is we can't distinguish between a user's -D_GNU_SOURCE for C++
and the compiler's predefine (which it defines because the libstdc++
headers want to use C library functionality beyond that present in the
standard).
I'm testing a glibc patch that reenables gets for C++ <= C++11, disables
the static_assert define for C++ and disables the char16_t/char32_t
typedefs in uchar.h for C++11 (since they are keywords in C++11).
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/51773] error building libitm/aatree.cc on ARM
2012-01-06 9:50 [Bug c++/51773] New: error building libitm/aatree.cc on ARM vries at gcc dot gnu.org
` (9 preceding siblings ...)
2012-01-06 15:51 ` joseph at codesourcery dot com
@ 2012-01-06 16:12 ` jakub at gcc dot gnu.org
2012-01-09 11:35 ` vries at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-06 16:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51773
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-06 16:12:00 UTC ---
Sure, we'd need some coordination between glibc and libstdc++, or just a glibc
version check and defining the std::gets prototype in libstdc++.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/51773] error building libitm/aatree.cc on ARM
2012-01-06 9:50 [Bug c++/51773] New: error building libitm/aatree.cc on ARM vries at gcc dot gnu.org
` (10 preceding siblings ...)
2012-01-06 16:12 ` jakub at gcc dot gnu.org
@ 2012-01-09 11:35 ` vries at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: vries at gcc dot gnu.org @ 2012-01-09 11:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51773
vries at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |MOVED
--- Comment #12 from vries at gcc dot gnu.org 2012-01-09 11:33:46 UTC ---
(In reply to comment #10)
> I'm testing a glibc patch that reenables gets for C++ <= C++11, disables
> the static_assert define for C++ and disables the char16_t/char32_t
> typedefs in uchar.h for C++11 (since they are keywords in C++11).
2012-01-06 Joseph Myers <joseph@codesourcery.com>
[BZ #13566]
* assert/assert.h (static_assert): Don't define for C++.
* libio/stdio.h (gets): Do declare for C++ <= C++11.
* wcsmbs/uchar.h (char16_t, char32_t): Don't typedef for C++11.
Given this checkin in glibc, marking this as resolved - moved.
^ permalink raw reply [flat|nested] 13+ messages in thread