Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 932457 - False positive QA warings for implicit declaration in configure when using clang, triggered by compiler built-in functions
Summary: False positive QA warings for implicit declaration in configure when using cl...
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL: https://bugs.gentoo.org/923760#c4
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-22 11:25 UTC by Karlson2k
Modified: 2024-05-22 12:05 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karlson2k 2024-05-22 11:25:48 UTC
clang inadequately reports "implicit function declaration" even if there is no function call in the code when the compiler has built-in replacement for popular function, like "stpncpy".
For example, the compiler may warn about
  (void) stpncpy;
This is definitely not implicit function declaration.

The warnings from compiler is propagated to portage QA warning, giving false positive results.

Looks like that functions without built-in equivalent do not trigger clang false positive warnings. See https://bugs.gentoo.org/923760#c4 for examples.

In overall, the construct "(void) function_name;" must not trigger QA warning as it is not an implicit function declaration.



Reproducible: Always
Comment 1 Eli Schwartz gentoo-dev 2024-05-22 11:45:34 UTC
I just wrote about this last night:

https://github.com/mesonbuild/meson/issues/9140#issuecomment-2123819144

It's a clang bug, open since 2017.
Comment 2 Karlson2k 2024-05-22 12:05:35 UTC
Thanks for the link.
I've updated the clang upstream bug as well: https://github.com/llvm/llvm-project/issues/33905#issuecomment-2124621376