public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* New gcc 4.0.0 warnings seem spurious
@ 2005-04-26 15:10 Bruce Lilly
  2005-04-26 15:59 ` Joseph S. Myers
  0 siblings, 1 reply; 36+ messages in thread
From: Bruce Lilly @ 2005-04-26 15:10 UTC (permalink / raw)
  To: gcc

Demonstration code:
--------------------------
#define AAA 0x1U
#define BBB 0x2U

struct foo {
    unsigned int bar:8;
};

struct foo foos[] = {
    { ~(AAA) },
    { ~(BBB) },
    { ~(AAA|BBB) },
    { ~(AAA&BBB) }
};
--------------------------

compiling with gcc 3.x produced no warnings, as expected (no problems as
all values fit easily within the defined structure's bit field).

gcc 4.0.0 produces:

gcctest.c:9: warning: large integer implicitly truncated to unsigned type
gcctest.c:10: warning: large integer implicitly truncated to unsigned type
gcctest.c:11: warning: large integer implicitly truncated to unsigned type
gcctest.c:12: warning: large integer implicitly truncated to unsigned type

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2005-04-28 16:17 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-26 15:10 New gcc 4.0.0 warnings seem spurious Bruce Lilly
2005-04-26 15:59 ` Joseph S. Myers
2005-04-26 21:43   ` Bruce Lilly
2005-04-26 22:02     ` Zack Weinberg
2005-04-27 10:38       ` Vincent Lefevre
2005-04-27 11:16         ` Zack Weinberg
2005-04-27 11:30           ` Vincent Lefevre
2005-04-27 11:55             ` Andrew Haley
2005-04-27 12:07               ` Vincent Lefevre
2005-04-27 12:48                 ` Gabriel Dos Reis
2005-04-27 13:59                   ` Vincent Lefevre
2005-04-27 14:18                     ` Gabriel Dos Reis
2005-04-27 12:18             ` Gabriel Dos Reis
2005-04-27 14:16               ` Vincent Lefevre
2005-04-27 12:28             ` Neil Booth
2005-04-27 21:35               ` Mike Stump
2005-04-28 16:24                 ` Vincent Lefevre
2005-04-27 12:15           ` Gabriel Dos Reis
2005-04-27 11:26         ` Andrew Haley
2005-04-27 11:34           ` Vincent Lefevre
2005-04-27 11:56             ` Andrew Haley
2005-04-27 12:09               ` Vincent Lefevre
2005-04-27 13:47                 ` Gabriel Dos Reis
2005-04-27 14:14                   ` Vincent Lefevre
2005-04-27 14:20                     ` Gabriel Dos Reis
2005-04-27 12:32             ` Gabriel Dos Reis
2005-04-27 14:11               ` Vincent Lefevre
2005-04-27 14:18                 ` Gabriel Dos Reis
2005-04-27 15:05                   ` Vincent Lefevre
2005-04-27 15:15                     ` Dave Korn
2005-04-27 15:32                     ` Gabriel Dos Reis
2005-04-27 16:24                       ` Vincent Lefevre
2005-04-27 16:44                         ` Gabriel Dos Reis
2005-04-27 15:00                 ` Dave Korn
2005-04-27 15:29                   ` Vincent Lefevre
2005-04-27 12:14         ` Gabriel Dos Reis

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).