c++/6626: __attribute__ doen not works with function pointers
serge@mainconcept.de
serge@mainconcept.de
Fri May 10 11:36:00 GMT 2002
>Number: 6626
>Category: c++
>Synopsis: __attribute__ doen not works with function pointers
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Fri May 10 11:36:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Sergey Grigoriev
>Release: gcc version 3.1 20020423 (prerelease)
>Organization:
>Environment:
Cygwin
>Description:
__attribute__((__stdcall__)) void test(int *x)
{
*x = 1;
}
int main(void)
{
__attribute__((__stdcall__)) void (*local)(int *x);
//this line produces NO error in C++ and C
local = (void (*)(int*)) test;
//this line produces error in C++ (and works in C)
//error message: invalid conversion from `void (*)(int*)' to `void (*)(int*)'
local = test;
}
>How-To-Repeat:
see source in description
>Fix:
unknown
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list