public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/64577] New: No -Wpadded warning on padding bitfields
@ 2015-01-12 23:17 chengniansun at gmail dot com
2015-01-14 12:36 ` [Bug middle-end/64577] " mpolacek at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: chengniansun at gmail dot com @ 2015-01-12 23:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64577
Bug ID: 64577
Summary: No -Wpadded warning on padding bitfields
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: chengniansun at gmail dot com
It seems that GCC does not emit -Wpadded warnings on the padding of bit-fields.
$: cat t.c
struct S1 {
unsigned f0 : 17;
unsigned f1 : 17;
};
int main(void) {
struct S1 s1;
return 0;
}
$:
$: gcc-trunk -Wpadded t.c
t.c:4:1: warning: padding struct size to alignment boundary [-Wpadded]
};
^
$:
$: clang-trunk -Wpadded t.c
t.c:3:14: warning: padding struct 'struct S1' with 15 bits to align 'f1'
[-Wpadded]
unsigned f1 : 17;
^
t.c:1:8: warning: padding size of 'struct S1' with 15 bits to alignment
boundary [-Wpadded]
struct S1 {
^
2 warnings generated.
$:
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/64577] No -Wpadded warning on padding bitfields
2015-01-12 23:17 [Bug c/64577] New: No -Wpadded warning on padding bitfields chengniansun at gmail dot com
@ 2015-01-14 12:36 ` mpolacek at gcc dot gnu.org
2015-02-11 9:32 ` chengniansun at gmail dot com
2015-02-11 9:47 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-01-14 12:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64577
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
Component|c |middle-end
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
-Wpadded is implemented in stor-layout.c, so moving to middle-end component.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/64577] No -Wpadded warning on padding bitfields
2015-01-12 23:17 [Bug c/64577] New: No -Wpadded warning on padding bitfields chengniansun at gmail dot com
2015-01-14 12:36 ` [Bug middle-end/64577] " mpolacek at gcc dot gnu.org
@ 2015-02-11 9:32 ` chengniansun at gmail dot com
2015-02-11 9:47 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: chengniansun at gmail dot com @ 2015-02-11 9:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64577
--- Comment #2 from Chengnian Sun <chengniansun at gmail dot com> ---
(In reply to Marek Polacek from comment #1)
> -Wpadded is implemented in stor-layout.c, so moving to middle-end component.
Hi Marek,
Is this bug confirmed?
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/64577] No -Wpadded warning on padding bitfields
2015-01-12 23:17 [Bug c/64577] New: No -Wpadded warning on padding bitfields chengniansun at gmail dot com
2015-01-14 12:36 ` [Bug middle-end/64577] " mpolacek at gcc dot gnu.org
2015-02-11 9:32 ` chengniansun at gmail dot com
@ 2015-02-11 9:47 ` mpolacek at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-02-11 9:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64577
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-02-11
Ever confirmed|0 |1
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Ok, confirming, I think that warning could be useful.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-11 9:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-12 23:17 [Bug c/64577] New: No -Wpadded warning on padding bitfields chengniansun at gmail dot com
2015-01-14 12:36 ` [Bug middle-end/64577] " mpolacek at gcc dot gnu.org
2015-02-11 9:32 ` chengniansun at gmail dot com
2015-02-11 9:47 ` mpolacek 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).