public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* curious compiler-warning
@ 2005-07-11 23:00 david mosberger
  2005-07-12  1:55 ` James E Wilson
  2005-07-12  4:17 ` david mosberger
  0 siblings, 2 replies; 3+ messages in thread
From: david mosberger @ 2005-07-11 23:00 UTC (permalink / raw)
  To: linux-ia64

Hi Jim,

I tried to make the ia64-specific files in the Linux kernel compile
cleanly with gcc v4.0.1 and ended up with this curious warning
message:

arch/ia64/kernel/time.c:198: warning: format '%u' expects type
'unsigned int', but argument 5 has type 'unsigned int'

Argument 5 here is a bit field declared as:

  unsigned long field : 32;

and if I use a format of '%lu' (what we used so far), I also get a
warning, which wasn't the case with pre-4.x compilers.

Do you know what's wrong here?

Thanks,

  --david

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

* Re: curious compiler-warning
  2005-07-11 23:00 curious compiler-warning david mosberger
@ 2005-07-12  1:55 ` James E Wilson
  2005-07-12  4:17 ` david mosberger
  1 sibling, 0 replies; 3+ messages in thread
From: James E Wilson @ 2005-07-12  1:55 UTC (permalink / raw)
  To: linux-ia64

On Mon, 2005-07-11 at 16:00, david mosberger wrote:
> arch/ia64/kernel/time.c:198: warning: format '%u' expects type
> 'unsigned int', but argument 5 has type 'unsigned int'
> Argument 5 here is a bit field declared as:
>   unsigned long field : 32;

This looks like a bug to me.  There have been some significant changes
to the bit-field support over the last few years.  There were some cases
where we were non-conforming with respect to C89: getting sign/zero
extension wrong, performing operations with the wrong precision.  Plus
some changes were needed for C99 support.  It looks like these changes
have accidentally broken the -Wformat support.

Just taking a quick look, I don't see any existing bug report for this,
so I created a new one.  This is now FSF gcc bug 22421.
    http://gcc.gnu.org/bugzilla/show_bug.cgi?id"421




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

* Re: curious compiler-warning
  2005-07-11 23:00 curious compiler-warning david mosberger
  2005-07-12  1:55 ` James E Wilson
@ 2005-07-12  4:17 ` david mosberger
  1 sibling, 0 replies; 3+ messages in thread
From: david mosberger @ 2005-07-12  4:17 UTC (permalink / raw)
  To: linux-ia64

Thanks for creating the bug-report the analysis --- interesting read!

  --david

On 11 Jul 2005 18:56:07 -0700, James E Wilson <wilson@tuliptree.org> wrote:
> On Mon, 2005-07-11 at 16:00, david mosberger wrote:
> > arch/ia64/kernel/time.c:198: warning: format '%u' expects type
> > 'unsigned int', but argument 5 has type 'unsigned int'
> > Argument 5 here is a bit field declared as:
> >   unsigned long field : 32;
> 
> This looks like a bug to me.  There have been some significant changes
> to the bit-field support over the last few years.  There were some cases
> where we were non-conforming with respect to C89: getting sign/zero
> extension wrong, performing operations with the wrong precision.  Plus
> some changes were needed for C99 support.  It looks like these changes
> have accidentally broken the -Wformat support.
> 
> Just taking a quick look, I don't see any existing bug report for this,
> so I created a new one.  This is now FSF gcc bug 22421.
>     http://gcc.gnu.org/bugzilla/show_bug.cgi?id"421
> 
> 
> 
>

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

end of thread, other threads:[~2005-07-12  4:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-11 23:00 curious compiler-warning david mosberger
2005-07-12  1:55 ` James E Wilson
2005-07-12  4:17 ` david mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox