Re: asm volatile statement reordering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 17, 2017 at 3:17 AM, David Brown <david@xxxxxxxxxxxxxxx> wrote:
> ...
> If gcc cannot guarantee this, then pretty much every OS and every
> embedded system programmed using gcc works by luck rather than design.
> Sequences like the one in my link are very common, deep down in many
> systems.

Right, but its not GCC's fault. Using volatile and hoping that things
works as expected has always been held together with duct tape and a
prayer. Also see Ian Lance Taylor's
https://www.airs.com/blog/archives/154.

GCC guesses wrong on occasion. It will remove code that has value that
but does not produce an output because the language does not allow us
to express it.

The C language lacks what we need to express what we need to do. Its a
failure of the C (and C++) committees. Its not a GCC failure.

Jeff



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux