From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D6A01385828E; Fri, 6 Oct 2023 12:32:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6A01385828E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696595579; bh=jL2usBBUlx8UPLwOKQTDB/tLH5FZzk59t/AjV1ezfXQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SZwjbnR0HFY7c3Wni5035/ZJEoG3/i2M4k3rWyz5eDgpz+toiuV0JcYpHUXDhMcwt sZdsj+gFf3gJ5K5bPIdsZsvO3Wf0asUog7yCsxgZW4pBskKmFhpDSNM38mxhZkH8zZ KlWdbnn0GaD7Qci5Wq8mwFmP/QJWRadRlJliPEuY= From: "k.frolov at samsung dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/111708] Calling external global function instead of local static function. Date: Fri, 06 Oct 2023 12:32:59 +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: k.frolov at samsung dot com 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: 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 --- Comment #5 from Kirill Frolov --- C standard states,that: 6.2.2 Linkages of identifiers 7) If, within a translation unit, the same identifier appears with both internal and external linkage, the behavior is undefined.=20 So, I think only ICC has adequate behaviour. Other compilers miss at least warning message.=