+2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
+
+ * class.c (check_field_decls): Pointers to member do not a
+ non-pod struct make, as per DR 148.
+
2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
* call.c (joust): cp_pedwarn when using gnu extension concerning
if (DECL_MUTABLE_P (x) || TYPE_HAS_MUTABLE_P (type))
CLASSTYPE_HAS_MUTABLE (t) = 1;
- if (! pod_type_p (type)
- /* For some reason, pointers to members are POD types themselves,
- but are not allowed in POD structs. Silly. */
- || TYPE_PTRMEM_P (type) || TYPE_PTRMEMFUNC_P (type))
+ if (! pod_type_p (type))
+ /* DR 148 now allows pointers to members (which are POD themselves),
+ to be allowed in POD structs. */
CLASSTYPE_NON_POD_P (t) = 1;
/* If any field is const, the structure type is pseudo-const. */
+2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.old-deja/g++.other/pod1.C: New test.
+
2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.ext/overload1.C: New test.
--- /dev/null
+// Build don't link:
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 28 Feb 2001 <nathan@codesourcery.com>
+
+// DR 148. Now allows pointer to members in POD struct.
+
+struct X
+{
+ int X::*m;
+ int (X::*f) ();
+};
+
+void Foo (int, ...);
+
+void Baz ()
+{
+ X x;
+
+ Foo (1, x);
+}