diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/class.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/parse/using4.C | 20 |
4 files changed, 31 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d53fb51..5ee1f91 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2013-09-18 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/58457 + * class.c (instantiate_type): Loosen a bit the gcc_assert. + 2013-09-18 Marek Polacek <polacek@redhat.com> PR sanitize/58443 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 3d34b92..9e0229f 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -7627,7 +7627,7 @@ instantiate_type (tree lhstype, tree rhs, tsubst_flags_t flags) dependent on overload resolution. */ gcc_assert (TREE_CODE (rhs) == ADDR_EXPR || TREE_CODE (rhs) == COMPONENT_REF - || really_overloaded_fn (rhs) + || is_overloaded_fn (rhs) || (flag_ms_extensions && TREE_CODE (rhs) == FUNCTION_DECL)); /* This should really only be used when attempting to distinguish diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 348691e..60c0baa 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-09-18 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/58457 + * g++.dg/parse/using4.C: New. + 2013-09-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * gcc.c-torture/execute/pr58419.c (b): Change type to signed char. diff --git a/gcc/testsuite/g++.dg/parse/using4.C b/gcc/testsuite/g++.dg/parse/using4.C new file mode 100644 index 0000000..2abe399 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/using4.C @@ -0,0 +1,20 @@ +// PR c++/58457 + +struct allocator +{ + void operator delete (void*); + void* operator new (__SIZE_TYPE__, void*); +}; + +struct type : public allocator +{ + type() {} + using allocator::operator new; + using allocator::operator delete; +}; + +int main() +{ + new (0) type; + return 0; +} |