From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24483 invoked by alias); 20 Jun 2010 22:17:50 -0000 Received: (qmail 24402 invoked by alias); 20 Jun 2010 22:17:35 -0000 Date: Sun, 20 Jun 2010 22:17:00 -0000 Message-ID: <20100620221735.24401.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/44586] gcc does not warn about casting non-variadic types to variadic types In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "joseph at codesourcery dot com" 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-06/txt/msg01982.txt.bz2 ------- Comment #2 from joseph at codesourcery dot com 2010-06-20 22:17 ------- Subject: Re: gcc does not warn about casting non-variadic types to variadic types It's not the conversion that's undefined, but the call. You could have an option to warn for all function pointer conversions to incompatible function pointer types (but they have reasonable uses as there isn't a generic function pointer type like void *) - or you could have the optimizers detect calls to incompatibly cast types and warn then like the front ends does when the cast appears directly in the call. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44586