diff options
author | Mark Mitchell <mark@codesourcery.com> | 2005-10-21 16:03:47 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2005-10-21 16:03:47 +0000 |
commit | d08fd9d6a3ba7908c0ca617706d27fda1929d5d1 (patch) | |
tree | 3f538af86373ecd129467ec75c2098c60a310cee /gcc/testsuite | |
parent | 8fafe21dc2d900a8843740ae5b3ba1a18e552844 (diff) | |
download | gcc-d08fd9d6a3ba7908c0ca617706d27fda1929d5d1.zip gcc-d08fd9d6a3ba7908c0ca617706d27fda1929d5d1.tar.gz gcc-d08fd9d6a3ba7908c0ca617706d27fda1929d5d1.tar.bz2 |
re PR c++/24260 (stdcall attribute is ignored at static member template functions)
PR c++/24260
* parser.c (cp_parser_init_declarator): Pass attributes to
grokfield.
PR c++/24260
* g++.dg/ext/tmplattr1.C: New test.
From-SVN: r105746
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/tmplattr1.C | 24 |
2 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index af14116..1f3dd7a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-10-21 Mark Mitchell <mark@codesourcery.com> + + PR c++/24260 + * g++.dg/ext/tmplattr1.C: New test. + 2005-10-21 Paul Thomas <pault@gcc.gnu.org> PR fortran/24440 diff --git a/gcc/testsuite/g++.dg/ext/tmplattr1.C b/gcc/testsuite/g++.dg/ext/tmplattr1.C new file mode 100644 index 0000000..111e344 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/tmplattr1.C @@ -0,0 +1,24 @@ +// PR c++/24260 +// { dg-do compile { target i?86-*-* x86_64-*-* } } +// { dg-require-effective-target ilp32 } + +#define stdcall __attribute__((stdcall)) + +struct T { + template <class S> + static int stdcall func(int arg1, int arg2); +}; + +template <class S> +int stdcall T::func(int arg1, int arg2) +{ + return arg1+arg2; +} + +struct dummy {}; + +void xx() +{ + int (stdcall *ptr2)(int,int) = &T::func<dummy>; +} + |