PATCH: BPs & cleanups for ARRAY_SIZE

Mark Mitchell mark@codesourcery.com
Wed Aug 23 16:02:00 GMT 2000


>>>>> "Alexandre" == Alexandre Oliva <aoliva@redhat.com> writes:

    Alexandre> But char* is supposed to be usable to iterate over raw
    Alexandre> memory.  It should be well-defined behavior.

On segmented architectures, this kind of thing didn't always work,
IIRC.

Of course, one of the big problems with building an error-checker is
deciding what to diagnose.  (I speak from experience at CenterLine,
which built some of the more popular error-checking tools.)  If you
point out things where code doesn't match the standards -- but does
work on all platforms of interest -- users often aren't too happy.

So, there are really two questions: is the code conformant, and should
we warn about it?

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


More information about the Gcc-patches mailing list