Mercurial > hg > CbC > CbC_gcc
diff gcc/c-common.c @ 47:3bfb6c00c1e0
update it from 4.4.2 to 4.4.3.
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 07 Feb 2010 17:44:34 +0900 |
parents | 855418dad1a3 |
children | 9907f3135723 77e2b8dfacca |
line wrap: on
line diff
--- a/gcc/c-common.c Sun Feb 07 17:43:48 2010 +0900 +++ b/gcc/c-common.c Sun Feb 07 17:44:34 2010 +0900 @@ -7633,15 +7633,14 @@ error ("cannot apply %<offsetof%> when %<operator[]%> is overloaded"); return error_mark_node; - case INTEGER_CST: - gcc_assert (integer_zerop (expr)); - return size_zero_node; - case NOP_EXPR: case INDIRECT_REF: - base = fold_offsetof_1 (TREE_OPERAND (expr, 0), stop_ref); - gcc_assert (base == error_mark_node || base == size_zero_node); - return base; + if (!integer_zerop (TREE_OPERAND (expr, 0))) + { + error ("cannot apply %<offsetof%> to a non constant address"); + return error_mark_node; + } + return size_zero_node; case COMPONENT_REF: base = fold_offsetof_1 (TREE_OPERAND (expr, 0), stop_ref);