summaryrefslogtreecommitdiff
path: root/lang/cli/files/patch-tools::build::buildexe.c
blob: db12a47a24024976b1580f7a9859ab0617803898 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$FreeBSD$

--- tools/build/buildexe.c.orig	Sat Nov  2 04:25:49 2002
+++ tools/build/buildexe.c	Fri Apr 25 10:23:19 2003
@@ -1170,7 +1170,9 @@
         } else if (strstr(p, "invalid offsetof from non-POD type")) {
             // Ignore this
             goto notgcc;
-        }
+        } else if (strstr(p, "from ")) {
+	    goto notgcc;
+	}
         p1 = strchr(p, ':');
         if (!p1) {
             // not of the form "filename:..."
@@ -1194,6 +1196,20 @@
         }
         *p1 = '\0'; // null-terminate the line number
         p1++;
+
+	// Check that there is a sub-line number appeared in gcc 3.x
+	if (isdigit(*p1)) {
+	    // Skip over the line number and following collon
+	    do {
+		p1++;
+	    } while (isdigit(*p1));
+	    if (*p1 != ':') {
+		// not of the form "filename:linenum:sublinenum:"
+		goto notgcc;
+	    }
+	    p1++;
+	}
+
         if (TestPrefix(&p1, " warning: ")) {
           // Found a warning
           Warning = TRUE;