From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1268 invoked by alias); 28 Jul 2010 14:01:56 -0000 Received: (qmail 339 invoked by uid 48); 28 Jul 2010 14:01:40 -0000 Date: Wed, 28 Jul 2010 14:01:00 -0000 Message-ID: <20100728140140.334.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/45106] casting of variadic function pointers to normal function pointers causes segfaults on 64bit systems In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg03090.txt.bz2 ------- Comment #6 from rguenth at gcc dot gnu dot org 2010-07-28 14:01 ------- (In reply to comment #4) > Subject: Re: casting of variadic function pointers to normal > function pointers causes segfaults on 64bit systems > > I was afraid of this answer. > However in my application, I have no clue which type of function pointer > is transferred. Thus, I should always cast to the variadic function > pointer in order to define the %al register? > > Cheers, Robert That doesn't work either. You have to pass around some cookie that tells you the function prototype and cast to the appropriate one. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45106