From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14417 invoked by alias); 26 Sep 2006 04:31:29 -0000 Received: (qmail 14403 invoked by uid 48); 26 Sep 2006 04:31:20 -0000 Date: Tue, 26 Sep 2006 04:31:00 -0000 Message-ID: <20060926043120.14402.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/25967] Add attribute naked for x86 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "acahalan at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-09/txt/msg02423.txt.bz2 List-Id: ------- Comment #2 from acahalan at gmail dot com 2006-09-26 04:31 ------- (In reply to comment #1) > A quick question here. Why not use a .s file instead? REASON #1 Sometimes people want to use --combine -fwhole-program, but the documentation for -fwhole-program starts with this: "Assume that the current compilation unit represents whole program being compiled." It is also implied, and stated elsewhere, that this only works for C. Thus it is apparently not allowed to have assembly, C++, Objective-C, Objective-C++, or weirder stuff. REASON #2 Using a .s file does not allow the naked function to have static scope. REASON #3 Even when it will work OK, the separate file is simply annoying. People naturally want to group functions together without being needlessly restricted. -- acahalan at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |acahalan at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25967