summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99313.patch
blob: eadce6ec6c51154c4323c6f565a7496d46394bc4 (plain)
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
2010-07-15  Yao Qi  <yao@codesourcery.com>

	Merge from Sourcery G++ 4.4:

	2010-02-25  Maxim Kuvyrkov  <maxim@codesourcery.com>

	gcc/
	* tree.c (initializer_zerop): Handle STRING_CST.

 2010-07-15  Sandra Loosemore  <sandra@codesourcery.com>
 
 	Backport from mainline:

=== modified file 'gcc/tree.c'
--- old/gcc/tree.c	2010-04-01 15:18:07 +0000
+++ new/gcc/tree.c	2010-08-02 16:32:37 +0000
@@ -9335,6 +9335,19 @@
 	return true;
       }
 
+    case STRING_CST:
+      {
+	int i;
+
+	/* We need to loop through all elements to handle cases like
+	   "\0" and "\0foobar".  */
+	for (i = 0; i < TREE_STRING_LENGTH (init); ++i)
+	  if (TREE_STRING_POINTER (init)[i] != '\0')
+	    return false;
+
+	return true;
+      }
+
     default:
       return false;
     }