This is the mail archive of the gcc-patches@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]

Re: PATCH: BPs & cleanups for ARRAY_SIZE


>>>>> "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

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