c++/6432: __builtin_apply() rejected by g++ - per PR 102

Colin McCormack colin@field.medicine.adelaide.edu.au
Tue Apr 23 18:20:00 GMT 2002


On Wednesday 24 April 2002 09:58, jason@gcc.gnu.org wrote:
> As Gaby said when closing PR 102, you can make this work by casting fn1
> to (void (*)(...)) instead of (void (*)()).

Gaby was mistaken.

Gaby must, as far as I can tell, have been compiling it under gcc and not g++.

Evidence (code modified as per Gaby's suggestion):

extern void fn1();
void fn (int b){
   __builtin_apply( (void (*)(...))fn1,
                   __builtin_apply_args(),
                   32);
}

Output:
g++ builtin_apply.cc
builtin_apply.cc: In function `void fn(int)':
builtin_apply.cc:5: argument passing to `void * ()(unsigned int)' from `void 
*'
Compilation exited abnormally with code 1 at Wed Apr 24 10:01:44

Conclusion:

Problem still exists.

Please re-open the PR.

Colin.

On Wednesday 24 April 2002 09:58, jason@gcc.gnu.org wrote:
> Synopsis: __builtin_apply() rejected by g++ - per PR 102
>
> State-Changed-From-To: open->analyzed
> State-Changed-By: jason
> State-Changed-When: Tue Apr 23 16:58:41 2002
> State-Changed-Why:
>     As Gaby said when closing PR 102, you can make this work by casting fn1
> to (void (*)(...)) instead of (void (*)()).
>
> 
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6432



More information about the Gcc-bugs mailing list