1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-28 10:08:24 +00:00

Fix build with clang 6

/wrkdirs/usr/ports/devel/powerpc64-gcc/work/gcc-6.3.0/gcc/ubsan.c:1474:20: error: comparison between pointer and integer ('const char *' and 'int')
      || xloc.file == '\0' || xloc.file[0] == '\xff'
         ~~~~~~~~~ ^  ~~~~

PR:		224669
Reported by:	pkg-fallout
This commit is contained in:
Antoine Brodin 2018-01-20 20:32:20 +00:00
parent 46978fb686
commit c15935b440
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=459551

View File

@ -0,0 +1,11 @@
--- gcc/ubsan.c.orig 2016-12-07 22:39:29 UTC
+++ gcc/ubsan.c
@@ -1471,7 +1471,7 @@ ubsan_use_new_style_p (location_t loc)
expanded_location xloc = expand_location (loc);
if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0
- || xloc.file == '\0' || xloc.file[0] == '\xff'
+ || xloc.file[0] == '\0' || xloc.file[0] == '\xff'
|| xloc.file[1] == '\xff')
return false;