Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Automated report: NetBSD-current/i386 build failure



Christos Zoulas wrote:
> >--- man_validate.o ---
> >/tmp/bracket/build/2018.08.15.14.31.22-i386/src/external/bsd/mdocml/lib/libmandoc/../../dist/man_validate.c: In function 'man_node_validate':
> >/tmp/bracket/build/2018.08.15.14.31.22-i386/src/external/bsd/mdocml/lib/libmandoc/../../dist/man_validate.c:95:49: error: array subscript is below array
> > static const v_check *man_valids = __man_valids - MAN_TH;
> 
> This is intended....

The code in case has "undefined behavior" per the C11 standard,
section 6.5.6.8:

  When an expression that has integer type is added to or subtracted
  from a pointer [...] If both the pointer operand and the result point
  to elements of the same array object, or one past the last element of
  the array object, the evaluation shall not produce an overflow;
  otherwise, the behavior is undefined.

-- 
Andreas Gustafsson, gson%gson.org@localhost


Home | Main Index | Thread Index | Old Index