Re: Why "global" variable can't be processed properly?

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

 



Hi horde,

> My mean is better to be compatible with most others.

That would be in direct conflict of one of the primary goals of C.

That goal being performance which can rival well-crafted assembly code.

That is one typical case why areas of C are specified as undefined behavior.
(The other cases seem to involve the complexity of the analysis being not
worth the effort to dictate language defined behavior.  Especially in
situations of wholistic source code analysis, such as you ran into.*)

But if you can get the other compilers to comply with GCC's behavior for
specified undefined behavior...  (I jest!)

Note:  GCC's behavior for specified undefined behavior has changed over the
years, and may even be different depending on optimization level and
specific optimization flags used.

Sincerely,
--Eljay

* Today's hardware is typically much bigger (larger RAM, faster CPU) than
the hardware upon which C originated.  Perhaps today such a wholistic
analysis is feasible.  But the C standards are what they are.



[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