This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug driver/81358] libatomic not automatically linked with C11 code


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358

--- Comment #5 from Jeff Hammond <jeff.science at gmail dot com> ---
Indeed, _Atomic is a language keyword and doesn't require any headers (the
inclusion of stdatomic.h in this code is superfluous), so the "header->explicit
library" argument doesn't apply.

In any case, I do not see why language intrinsics that require headers should
require libraries.  Why is sqrt() from math.h different from fprintf() from
stdio.h?  Maybe POSIX requires that, but ISO C11 doesn't, and I'm using
-std=c11 not -std=posix.

--as-needed would greatly enhance user experience for both this and libm.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]