From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14601 invoked by alias); 25 Dec 2003 04:10:15 -0000 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 Received: (qmail 14594 invoked by uid 48); 25 Dec 2003 04:10:14 -0000 Date: Thu, 25 Dec 2003 04:49:00 -0000 Message-ID: <20031225041014.14592.qmail@sources.redhat.com> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030925121817.12401.uddeborg@carmen.se> References: <20030925121817.12401.uddeborg@carmen.se> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/12401] G++ generates boguous weak definition of library routine X-Bugzilla-Reason: CC X-SW-Source: 2003-12/txt/msg02640.txt.bz2 List-Id: ------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-25 04:10 ------- Acutally "extern inline" in C++ is difference that GCC's c extesion "extern inline", "extern inline" in C++ means that the function is extern but is declared in all translation unit as inline. >>From the C++ standard: 7.1.2 Function specifiers 4 An inline function shall be defined in every translation unit in which it is used and shall have exactly the same definition in every case (3.2). [Note:a call to the inline function may be encountered before its definition appears in the translation unit. ] If a function with external linkage is declared inline in one translation unit, it shall be declared inline in all translation units in which it appears; no diagnostic is required. An inlinefunction with external linkage shall have the same address in all translation units. Astatic local variable in anextern inlinefunction always refers to the same object. A string literal in an extern inlinefunction is the same object in different translation units. -- What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12401