public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] WARNING: in gcc 4.5.0 and 4.5.1 volatile is ignored
@ 2011-01-22 12:46 Alexander Holler
  2011-01-22 14:14 ` Wolfgang Denk
  2011-01-22 17:40 ` Dirk Behme
  0 siblings, 2 replies; 8+ messages in thread
From: Alexander Holler @ 2011-01-22 12:46 UTC (permalink / raw)
  To: u-boot

Hello,

because I've recently seen some other places where volatile is used to 
access registers without using read?() or write?() and many people seem 
to start using 4.5.1, I want to post this warning using a descriptive 
subject.

The keyword volatile might not have any effect when reading when gcc 
4.5.0 or 4.5.1 is used.

The appropriate bug seems to be that one:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45052

You might either change such code to use readb(), readw() or readl(), or 
you have to use either an older version of gcc or a version >= 4.5.2 (it 
is fixed in 4.5.2).

A patch for write?() and read?() is currently in the 
u-boot-arm-repository (but not in the master and not in 2010.12):

http://lists.denx.de/pipermail/u-boot/2011-January/084885.html

Regards,

Alexander

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

end of thread, other threads:[~2011-01-24 18:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-22 12:46 [U-Boot] WARNING: in gcc 4.5.0 and 4.5.1 volatile is ignored Alexander Holler
2011-01-22 14:14 ` Wolfgang Denk
2011-01-22 17:40 ` Dirk Behme
2011-01-22 18:03   ` Albert ARIBAUD
2011-01-22 19:30     ` Wolfgang Denk
2011-01-22 20:23       ` Albert ARIBAUD
2011-01-24 13:03         ` Wolfgang Denk
2011-01-24 18:18           ` Albert ARIBAUD

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