+2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/2914
+ * decl.c (pushtag): Don't push into a complete type's scope.
+
2001-06-06 Jason Merrill <jason_merrill@redhat.com>
* cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
b = current_binding_level;
while (b->tag_transparent
- || (globalize && b->parm_flag == 2))
+ || (b->parm_flag == 2
+ && (globalize
+ /* We may be defining a new type in the initializer
+ of a static member variable. We allow this when
+ not pedantic, and it is particularly useful for
+ type punning via an anonymous union. */
+ || COMPLETE_TYPE_P (b->this_class))))
b = b->level_chain;
b->tags = tree_cons (name, type, b->tags);
+2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.old-deja/g++.ext/anon3.C: New test.
+
2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.other/conv7.C: New test.
--- /dev/null
+// Build don't link:
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 6 Jun 2001 <nathan@codesourcery.com>
+
+// Bug 2914. New types can be created in a static member
+// initializer. These should not be injected into the member's class's
+// scope.
+
+class DoubleSupport
+{
+ public:
+ static void toDouble();
+
+ static const double s_NaN;
+ static const double s_positiveInfinity;
+ static const double s_negativeInfinity;
+ static const double s_positiveZero;
+ static const double s_negativeZero;
+ static const unsigned long* s_NaNFirstDWORD;
+ static const unsigned long* s_NaNSecondDWORD;
+};
+
+const double DoubleSupport::s_positiveInfinity =
+(__extension__ ((union { unsigned char __c[8]; double __d; })
+ { __c: { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } }).__d);
+
+struct other
+{
+};
+
+
+void
+DoubleSupport::toDouble()
+{
+}