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: memcpy / Language Lawyer / optimization question


Paul Schlie <schlie@comcast.net> writes:

> As a more general but related question: as C does not define/specify
> everything, and even occasionally specifies something as being explicitly
> "unspecified", giving license to the complier to express whatever incidental
> behavior it may have; has the GCC team adopted the strategy that it will
> strive to adopt and document the behavior which seems most generally useful
> and/or least-fragile in such circumstances (which it has license to do), as
> opposed to justifying any such behavior as being "legal" without regard to
> the consideration of adopting a more useful behavior, and/or emit warnings
> if the adopted behavior may have undesirable consequences when reasonable
> to do so; or is this also "unspecified"? :)

No, that strategy has not been adopted.  This avoids arguments about
what is "most generally useful" or "least-fragile".  What people
usually mean by such statements is "whatever compiler X does" or
"whatever the previous version of GCC does" or "this particular
behaviour that my program expects", and generally you can find
evidence in that form for many possible behaviours.


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