Date: Mon, 13 Mar 2000 00:49:57 +1100 Original-Message-Id: <20000312134957.506922F02A@sharedtech.eyep.net> The following compiles under gcc, but results in the following error under g++: Errors: g++ -o apply1 apply1.c apply1.c: In function `void fn(int)': apply1.c:5: argument passing to `void * ()(unsigned int)' from `void *' Code: extern void fn1(); void fn (int b){ __builtin_apply( (void (*)())fn1, __builtin_apply_args(), 32); } Release: 2.95.2
Responsible-Changed-From-To: unassigned->gdr Responsible-Changed-Why: In charge.
State-Changed-From-To: analyzed->closed State-Changed-Why: This is not a bug. Mainline and gcc-3_0-branch produce 102.C: In function `void fn(int)': 102.C:5: cannot convert `void (*)()' to `void (*)(...)' for argument `1' to `void* __builtin_apply(void (*)(...), void*, unsigned int)' which seems to indicate that the first argument should be of type void (*)(...). Indeed rewriting the first argument of __builtin_apply as (void (*)(...))fn1 solves the problem. -- Gaby
From: gdr@gcc.gnu.org To: colin@field.medicine.adelaide.edu.au, gcc-gnats@gcc.gnu.org, gdr@gcc.gnu.org, martin@loewis.home.cs.tu-berlin.de, nobody@gcc.gnu.org Cc: Subject: Re: c++/102 Date: 21 Feb 2001 13:12:06 -0000 Synopsis: C++ bug in __builtin_apply() Responsible-Changed-From-To: unassigned->gdr Responsible-Changed-By: gdr Responsible-Changed-When: Wed Feb 21 05:12:05 2001 Responsible-Changed-Why: In charge. State-Changed-From-To: analyzed->closed State-Changed-By: gdr State-Changed-When: Wed Feb 21 05:12:05 2001 State-Changed-Why: This is not a bug. Mainline and gcc-3_0-branch produce 102.C: In function `void fn(int)': 102.C:5: cannot convert `void (*)()' to `void (*)(...)' for argument `1' to `void* __builtin_apply(void (*)(...), void*, unsigned int)' which seems to indicate that the first argument should be of type void (*)(...). Indeed rewriting the first argument of __builtin_apply as (void (*)(...))fn1 solves the problem. -- Gaby http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=102&database=gcc
Reopening to ...
To close as invalid per comment #2 and #3.