This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

C++ const initializer testcase


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]