This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
C++ const initializer testcase
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: C++ const initializer testcase
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 7 Nov 2000 18:39:37 +0100
- Cc: gcc-patches at gcc dot gnu dot org
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
Hi!
This testcase dies with:
20267.C: In function `void __static_initialization_and_destruction_0(int,
int)':
20267.C:6: non-lvalue in unary &'
Alexandre Oliva said he sees no reason why this testcase should not be
valid, so I'd like to ask if this test is valid (and if so if I can commit
it after XFAILing it) or if it is illegal (then why).
2000-11-07 Jakub Jelinek <jakub@redhat.com>
* g++.old-deja/g++.other/init16.C: New test.
--- gcc/testsuite/g++.old-deja/g++.other/init16.C.jj Thu Aug 24 11:00:32 2000
+++ gcc/testsuite/g++.old-deja/g++.other/init16.C Fri Nov 3 16:13:21 2000
@@ -0,0 +1,8 @@
+// Build don't link:
+
+#include <string>
+
+struct foo {
+ string x;
+};
+extern const struct foo y = { "foo" };
Jakub