aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/ChangeLog-2011
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-05-10 19:40:28 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2018-05-10 19:40:28 +0200
commit79e7b1fe3290f351f178dafee4b3df4ece61ba9c (patch)
treed48f413c93e9cc59329413239736490ef5c5f916 /gcc/fortran/ChangeLog-2011
parentc7b7749d9f2c68ca4f9cda52b21ef690aef009bd (diff)
downloadgcc-79e7b1fe3290f351f178dafee4b3df4ece61ba9c.zip
gcc-79e7b1fe3290f351f178dafee4b3df4ece61ba9c.tar.gz
gcc-79e7b1fe3290f351f178dafee4b3df4ece61ba9c.tar.bz2
re PR c++/85662 ("error: non-constant condition for static assertion" from __builtin_offsetof in C++)
PR c++/85662 * c-common.h (fold_offsetof_1): Removed. (fold_offsetof): Add TYPE argument defaulted to size_type_node and CTX argument defaulted to ERROR_MARK. * c-common.c (fold_offsetof_1): Renamed to ... (fold_offsetof): ... this. Remove wrapper function. Add TYPE argument, convert the pointer constant to TYPE and use size_binop with PLUS_EXPR instead of fold_build_pointer_plus if type is not a pointer type. Adjust recursive calls. * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the fold_convert_loc. * c-typeck.c (build_unary_op): Use fold_offsetof rather than fold_offsetof_1, pass argtype as TYPE to it and drop the fold_convert_loc. * cp-gimplify.c (cp_fold): Use fold_offsetof rather than fold_offsetof_1, pass TREE_TYPE (x) as TYPE to it and drop the fold_convert. * g++.dg/ext/offsetof2.C: New test. From-SVN: r260119
Diffstat (limited to 'gcc/fortran/ChangeLog-2011')
0 files changed, 0 insertions, 0 deletions