This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Signed int overflow behavior in the security context
- From: Paul Schlie <schlie at comcast dot net>
- To: GCC Development <gcc at gcc dot gnu dot org>
- Date: Tue, 30 Jan 2007 07:59:03 -0500
- Subject: Re: Signed int overflow behavior in the security context
> Paul Jarc wrote:
>> Paul Schlie wrote:
>> is required to be well specified [...] as otherwise the language
>> couldn't be utilized to write even the most hardware drivers
>> required of all computer systems.
>
> In a sense, the language *can't* be used to write most hardware
> drivers. Drivers do invoke undefined behavior - that is, the standard
> makes no guarantees about their behavior - but the particular platform
> they are targeted for makes its own guarantees, so the code is still
> useful, e
The root of this discussion was based on whether or not GCC's relatively
aggressive assumption that an undefined behavior gave it the reasonable
and useful right to presume that any expression which may be interpreted
as having undefined semantics may be presumed to either mystically never
or always occur depending on it's whim, regardless of practical reality.
Overall, it would seem there should be a more practical and consistent basis
applied.