[all-commits] [llvm/llvm-project] 088980: [libc] Fix warning on 'extern "C" int main' in tes...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Mon Aug 12 15:57:37 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0889809c706fd926b786bc2f8852646a17d7e21c
https://github.com/llvm/llvm-project/commit/0889809c706fd926b786bc2f8852646a17d7e21c
Author: Joseph Huber <huberjn at outlook.com>
Date: 2024-08-12 (Mon, 12 Aug 2024)
Changed paths:
M libc/test/UnitTest/LibcTestMain.cpp
Log Message:
-----------
[libc] Fix warning on 'extern "C" int main' in test suite (#102973)
Summary:
According to the C++ standard, The main function shall not be declared
with a linkage-specification. after some changes in
https://github.com/llvm/llvm-project/pull/101853 this started emitting
warnings when building / testing the C library. This source file is
shared with the overlay tests as well as the full build tests. The full
build tests are compiled with `-ffreestanding`, as are all the startup /
integration files. The standard says freestanding environment are all
implementation defined, so this is valid in those cases. This patch
simply prevents adding the linkage when we are compiling unit tests,
which are hosted. This is a continuation on
https://github.com/llvm/llvm-project/pull/102825.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list