From: Richard Kenner Date: Mon, 29 Nov 2004 00:49:14 +0000 (+0000) Subject: * expr.c (categorize_ctor_elements_1, case STRING_CST): New case. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=97f8d136d175358a78b71d6d17e1c96a5e5a016b;p=platform%2Fupstream%2Fgcc.git * expr.c (categorize_ctor_elements_1, case STRING_CST): New case. From-SVN: r91445 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 73e6ad9..9d39724 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-11-28 Richard Kenner + + * expr.c (categorize_ctor_elements_1, case STRING_CST): New case. + 2004-11-28 Matt Kraai PR diagnostic/17594 diff --git a/gcc/expr.c b/gcc/expr.c index 5819a98..a9ff0eb 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -4152,12 +4152,18 @@ categorize_ctor_elements_1 (tree ctor, HOST_WIDE_INT *p_nz_elts, if (!initializer_zerop (value)) nz_elts += mult; break; + + case STRING_CST: + nz_elts += mult * TREE_STRING_LENGTH (value); + break; + case COMPLEX_CST: if (!initializer_zerop (TREE_REALPART (value))) nz_elts += mult; if (!initializer_zerop (TREE_IMAGPART (value))) nz_elts += mult; break; + case VECTOR_CST: { tree v;