[Bug c/111708] Calling external global function instead of local static function.

2023-10-06 Thread k.frolov at samsung dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111708 --- 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. So, I think only

[Bug c/111708] Calling external global function instead of local static function.

2023-10-06 Thread k.frolov at samsung dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111708 --- Comment #4 from Kirill Frolov --- With updated source ICC still gives an error. MSVC works from my point of view correcly, same as Clang. Lets see to a C-standard (https://files.lhmouse.com/standards/ISO%20C%20N2176.pdf), section 6.2.2

[Bug c/111708] Calling external global function instead of local static function.

2023-10-06 Thread k.frolov at samsung dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111708 --- Comment #3 from Kirill Frolov --- Looks like example demonstrates undefined behaviour. This article (https://wiki.sei.cmu.edu/confluence/display/c/DCL36-C.+Do+not+declare+an+identifier+with+conflicting+linkage+classifications) contains

[Bug c/111708] New: Calling external global function instead of local static function.

2023-10-05 Thread k.frolov at samsung dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111708 Bug ID: 111708 Summary: Calling external global function instead of local static function. Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal