From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26564 invoked by alias); 22 Apr 2003 17:56:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 26544 invoked by uid 71); 22 Apr 2003 17:56:01 -0000 Resent-Date: 22 Apr 2003 17:56:01 -0000 Resent-Message-ID: <20030422175601.26543.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, dgay@acm.org Received: (qmail 20651 invoked by uid 48); 22 Apr 2003 17:49:45 -0000 Message-Id: <20030422174945.20650.qmail@sources.redhat.com> Date: Tue, 22 Apr 2003 17:56:00 -0000 From: dgay@acm.org Reply-To: dgay@acm.org To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c/10455: typeof(fn) can be used to declare a variable of type function X-SW-Source: 2003-04/txt/msg00930.txt.bz2 List-Id: >Number: 10455 >Category: c >Synopsis: typeof(fn) can be used to declare a variable of type function >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Apr 22 17:56:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: dgay@acm.org >Release: avr-gcc-3.3 >Organization: >Environment: Linux 2.4.9-13 #1 Tue Oct 30 20:11:04 EST 2001 i686 unknown >Description: void g(void) { } typeof(g) x; can be used to declare a variable of type function, that can be subsequently called (calls the address of the variable, not its content...) Note that presumably typeof(g) *y; should be accepted... >How-To-Repeat: Compile the following source with -S: void g(void) { } typeof(g) x; void f(void) { x(); } >Fix: >Release-Note: >Audit-Trail: >Unformatted: