From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1DB463858031; Sun, 8 Oct 2023 08:36:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1DB463858031 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696754213; bh=YtdyppC8Sb2U8FgQ2nSngy+GNaoxjR0ZebZH+VgahhE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UM9C7Gr3XlgLZQQR1WxPZTuheHd0DdFFM8BzazXGD79kKVZ+A4cjpdOYDlCo1r0Ba XfLIPRpzaMx1Qk5hOm1HTo7lX4Az693MtNIk+H6FpjWAaB23v0pnA5DWz/zc0WeZ38 iCknFs7gaoi/qOA4wn8Rg5JMgrqQMkR9+XN3dyZk= From: "muecker at gwdg dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/111708] Calling external global function instead of local static function. Date: Sun, 08 Oct 2023 08:36:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: accepts-invalid, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: muecker at gwdg dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111708 Martin Uecker changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |muecker at gwdg dot de --- Comment #6 from Martin Uecker --- I think your nested declaration of "extern int f(int);" has external linkag= e, because the declaration with internal linkage is not visible (it is hidden = by the definition of the object with no linkage). So I agree this is compile-t= ime UB and we miss the warning which we have for objects.=