This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/9381] attribute on member function pointer have no effect
- From: "techrazy dot yang at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jul 2008 07:41:10 -0000
- Subject: [Bug c++/9381] attribute on member function pointer have no effect
- References: <bug-9381-700@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from techrazy dot yang at gmail dot com 2008-07-11 07:41 -------
(In reply to comment #1)
> From: "Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de>
> To: drepper@redhat.com
> Cc: gcc-gnats@gcc.gnu.org
> Subject: Re: c++/9381: stdcall attribute ignored in member function pointer type
> Date: Tue, 21 Jan 2003 15:10:30 +0100
>
> On Tue, Jan 21, 2003 at 04:52:51AM -0000, drepper@redhat.com wrote:
> > The attached file is miscompiled since the stdcall attribute is ignored in the fp type definition. The result it that in the function bar the parameters are popped from the stack even though they have already been removed by the called fucntion (f1 in this case).
>
> The answer to this non bug used to be: "The placement of your __attribute__
> is wrong". This should be the proper placement:
>
> typedef int (__attribute__ ((stdcall)) foo::*fp)(int);
>
> However, with the new parser this gives a parse error :-(
> The following gives a warning with 3.4 but works with all gcc versions, it
> is documented as an extension though:
>
> typedef int (foo::*__attribute__ ((stdcall)) fp) (int);
I am afraid, but this did not work in gcc 4.3.0, now. I add this, but still
failed with a SIGFAULT...
I attach my litter test case file, please try to compile it with g++ 4.3.0, and
it will fail...
--
techrazy dot yang at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |techrazy dot yang at gmail
| |dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9381