public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/18712] New: ARM <string.h> incompatible with -O2 -Werror=packed -Wsystem-headers
@ 2015-07-24 0:53 roland at gnu dot org
2015-07-24 0:53 ` [Bug libc/18712] " roland at gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: roland at gnu dot org @ 2015-07-24 0:53 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18712
Bug ID: 18712
Summary: ARM <string.h> incompatible with -O2 -Werror=packed
-Wsystem-headers
Product: glibc
Version: 2.19
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: roland at gnu dot org
CC: drepper.fsp at gmail dot com
Target Milestone: ---
This is a bit dubious, since you need -Wsystem-headers to see it in an actual
installation. But we strive to have warning-free headers even without the
system-header suppression.
$ arm-linux-gnueabihf-gcc -c -o /dev/null -xc <(echo '#include
<string.h>') -O2 -Werror=packed -Wsystem-headers
In file included from /usr/arm-linux-gnueabihf/include/string.h:635:0,
from /dev/fd/63:1:
/usr/arm-linux-gnueabihf/include/bits/string2.h:79:1: error: packed
attribute causes inefficient alignment [-Werror=packed]
__STRING2_COPY_TYPE (2);
^
/usr/arm-linux-gnueabihf/include/bits/string2.h:80:1: error: packed
attribute causes inefficient alignment [-Werror=packed]
__STRING2_COPY_TYPE (3);
^
/usr/arm-linux-gnueabihf/include/bits/string2.h:81:1: error: packed
attribute causes inefficient alignment [-Werror=packed]
__STRING2_COPY_TYPE (4);
^
/usr/arm-linux-gnueabihf/include/bits/string2.h:82:1: error: packed
attribute causes inefficient alignment [-Werror=packed]
__STRING2_COPY_TYPE (5);
^
/usr/arm-linux-gnueabihf/include/bits/string2.h:83:1: error: packed
attribute causes inefficient alignment [-Werror=packed]
__STRING2_COPY_TYPE (6);
^
/usr/arm-linux-gnueabihf/include/bits/string2.h:84:1: error: packed
attribute causes inefficient alignment [-Werror=packed]
__STRING2_COPY_TYPE (7);
^
/usr/arm-linux-gnueabihf/include/bits/string2.h:85:1: error: packed
attribute causes inefficient alignment [-Werror=packed]
__STRING2_COPY_TYPE (8);
^
cc1: some warnings being treated as errors
I could not figure out a way with __extension__ to avoid this warning. If
there is no way to do it, that should probably be a GCC bug. But perhaps there
is a way to get the same effect (looks like this is only used for
constant-folded cases) without using __attribute__ ((packed)). Or perhaps
these optimizations can just be turned off for new-enough GCC if it does all
that constant folding itself.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libc/18712] ARM <string.h> incompatible with -O2 -Werror=packed -Wsystem-headers
2015-07-24 0:53 [Bug libc/18712] New: ARM <string.h> incompatible with -O2 -Werror=packed -Wsystem-headers roland at gnu dot org
@ 2015-07-24 0:53 ` roland at gnu dot org
2015-07-24 16:06 ` [Bug libc/18712] bits/string2.h " jsm28 at gcc dot gnu.org
2015-08-27 22:29 ` [Bug string/18712] " jsm28 at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: roland at gnu dot org @ 2015-07-24 0:53 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18712
Roland McGrath <roland at gnu dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |jsm28 at gcc dot gnu.org
--- Comment #1 from Roland McGrath <roland at gnu dot org> ---
This exists in trunk and at least as far back as 2.19.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libc/18712] bits/string2.h incompatible with -O2 -Werror=packed -Wsystem-headers
2015-07-24 0:53 [Bug libc/18712] New: ARM <string.h> incompatible with -O2 -Werror=packed -Wsystem-headers roland at gnu dot org
2015-07-24 0:53 ` [Bug libc/18712] " roland at gnu dot org
@ 2015-07-24 16:06 ` jsm28 at gcc dot gnu.org
2015-08-27 22:29 ` [Bug string/18712] " jsm28 at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-07-24 16:06 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18712
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|jsm28 at gcc dot gnu.org |unassigned at gcc dot gnu.org
Summary|ARM <string.h> incompatible |bits/string2.h incompatible
|with -O2 -Werror=packed |with -O2 -Werror=packed
|-Wsystem-headers |-Wsystem-headers
--- Comment #2 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
This is nothing to do with ARM; exactly the same appears on other
strict-alignment configurations (e.g. MIPS), while non-strict-alignment
configurations (e.g. most Power processors) produce "error: packed attribute is
unnecessary". And bits/string2.h is architecture-independent.
I don't see *why* you get the "inefficient" warning, instead of "unnecessary"
in all cases (packed should make no difference to these structures, for normal
ABIs as opposed to e.g. old-ABI ARM). But if the warnings are bogus, that's a
GCC issue.
I'm not sure if the code using these types is active at all for current GCC
other than in the _FORCE_INLINES case.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug string/18712] bits/string2.h incompatible with -O2 -Werror=packed -Wsystem-headers
2015-07-24 0:53 [Bug libc/18712] New: ARM <string.h> incompatible with -O2 -Werror=packed -Wsystem-headers roland at gnu dot org
2015-07-24 0:53 ` [Bug libc/18712] " roland at gnu dot org
2015-07-24 16:06 ` [Bug libc/18712] bits/string2.h " jsm28 at gcc dot gnu.org
@ 2015-08-27 22:29 ` jsm28 at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-08-27 22:29 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18712
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|libc |string
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-27 22:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-24 0:53 [Bug libc/18712] New: ARM <string.h> incompatible with -O2 -Werror=packed -Wsystem-headers roland at gnu dot org
2015-07-24 0:53 ` [Bug libc/18712] " roland at gnu dot org
2015-07-24 16:06 ` [Bug libc/18712] bits/string2.h " jsm28 at gcc dot gnu.org
2015-08-27 22:29 ` [Bug string/18712] " jsm28 at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).