On Tue, Oct 20, 2015 at 02:19:51PM +0300, Maxim Ostapenko wrote:
> +   a) Location's filename must not be NULL.
> +   b) Location's filename must not be equal to "".
> +   c) Location's filename must not be equal to "\1".
> +   d) First two bytes of filename msut not contain '\xff' symbol.  */

must

> +
> +static bool
> +ubsan_use_new_style_p (location_t loc)
> +{
> +  if (loc == UNKNOWN_LOCATION)
> +    return false;
> +
> +  expanded_location xloc = expand_location (loc);
> +  if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0
> +      || strncmp (xloc.file, "", 1) == 0 || xloc.file[0] == '\xff'

I'd use || xloc.file == '\0' || xloc.file[0] == '\xff
instead, but not a big deal for me.

> +      || xloc.file[1] == '\xff')
> +    return false;
> +
> +  return true;
> +}
> +

Ok with the typo fix.

        Jakub

Reply via email to