From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6670 invoked by alias); 19 Dec 2008 03:17:40 -0000 Received: (qmail 6564 invoked by uid 48); 19 Dec 2008 03:16:20 -0000 Date: Fri, 19 Dec 2008 03:17:00 -0000 Message-ID: <20081219031620.6563.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/38575] free() accept argument that has the same name with standard/builtin function In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia 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: 2008-12/txt/msg01825.txt.bz2 ------- Comment #1 from pinskia at gcc dot gnu dot org 2008-12-19 03:16 ------- Yes you are passing free a function pointer. a function decays to a function pointer and an implicit conversion to void* happens. If you use -pedantic you get an error message as a function pointer cannot be converted to void* in standard C: t.c:4: error: ISO C forbids passing argument 1 of 'free' between function pointer and 'void *' /usr/include/stdlib.h:159: note: expected 'void *' but argument is of type 'int (*)(void)' -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38575