Commit ee97d354 by Alexandre Petit-Bianco Committed by Alexandre Petit-Bianco

parse.y (fold_constant_for_init): Avoid bullish conversion.

2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* parse.y (fold_constant_for_init): Avoid bullish conversion.

(http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00506.html)

From-SVN: r35022
parent 185ce11b
2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (fold_constant_for_init): Avoid bullish conversion.
2000-07-13 Tom Tromey <tromey@cygnus.com> 2000-07-13 Tom Tromey <tromey@cygnus.com>
* lang-specs.h: Added %{I*}. * lang-specs.h: Added %{I*}.
......
...@@ -17508,12 +17508,9 @@ fold_constant_for_init (node, context) ...@@ -17508,12 +17508,9 @@ fold_constant_for_init (node, context)
tree op0, op1, val; tree op0, op1, val;
enum tree_code code = TREE_CODE (node); enum tree_code code = TREE_CODE (node);
if (code == STRING_CST) if (code == STRING_CST || code == INTEGER_CST || code == REAL_CST)
return node; return node;
if (code == INTEGER_CST || code == REAL_CST)
return convert (TREE_TYPE (context), node);
switch (code) switch (code)
{ {
case PLUS_EXPR: case PLUS_EXPR:
......
...@@ -14810,12 +14810,9 @@ fold_constant_for_init (node, context) ...@@ -14810,12 +14810,9 @@ fold_constant_for_init (node, context)
tree op0, op1, val; tree op0, op1, val;
enum tree_code code = TREE_CODE (node); enum tree_code code = TREE_CODE (node);
if (code == STRING_CST) if (code == STRING_CST || code == INTEGER_CST || code == REAL_CST)
return node; return node;
if (code == INTEGER_CST || code == REAL_CST)
return convert (TREE_TYPE (context), node);
switch (code) switch (code)
{ {
case PLUS_EXPR: case PLUS_EXPR:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment