This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: signed is undefined and has been since 1992 (in GCC)


On Tue, Jun 28, 2005 at 08:57:20AM -0400, Robert Dewar wrote:
> Gabriel Dos Reis wrote:
> =
> >Please do remember that this is hardware dependent.  If you have
> >problems with x86, it does not mean you have the same witha PPC or a
> >Sparc. 
> 
> But the whole idea of hardware semantics is bogus, since you are
> assuming some connection between C and the hardware which does not
> exist. C is not an assembly language.

Actually, those of us who work in hardware-software codesign and formal
verification consider exactly such problems, though it ends up being a
comparison of the behavior of two abstract machines, the (idealized)
processor model and the "C machine".

The distinction between an HLL and assembly language is that in the
latter, every program that is accepted by the tool is mapped into some
definite machine language (though the processor architecture will flag
the behavior of some instructions as undefined).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]