diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-03-19 01:35:01 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2004-03-19 01:35:01 +0000 |
commit | 9d363a56a8ff6587f8d32ea380b55fea77ea5f13 (patch) | |
tree | ff8a9efb7d2b4a67b0c26125354dd012254824f4 /gcc/c-common.c | |
parent | c3690d79a8c861f10b77954379e03dd96807a409 (diff) | |
download | gcc-9d363a56a8ff6587f8d32ea380b55fea77ea5f13.zip gcc-9d363a56a8ff6587f8d32ea380b55fea77ea5f13.tar.gz gcc-9d363a56a8ff6587f8d32ea380b55fea77ea5f13.tar.bz2 |
c-common.c (pointer_int_sum): Do not complain about using pointers to pointers-to-members.
* c-common.c (pointer_int_sum): Do not complain about using
pointers to pointers-to-members.
* call.c (build_conditional_expr): Do not call force_rvalue for
operands of void_type when the conditional expression itself has
void type.
* name-lookup.c (pushdecl): Don't consider a declaration of a
function named "main" to be an overload of a type named "main".
* parser.c (cp_parser_template_name): Perform name lookup when the
template name is proceeded by "template" if the qualifying scope
is non-dependent.
* typeck.c (composite_pointer_type_r): Correctly handle
pointer-to-member types.
(build_const_cast): Likewise.
* g++.dg/expr/cond5.C: New test.
* g++.dg/expr/constcast1.C: Likewise.
* g++.dg/expr/ptrmem2.C: Likewise.
* g++.dg/expr/ptrmem3.C: Likewise.
* g++.dg/lookup/main1.C: Likewise.
* g++.dg/template/lookup6.C: Likewise.
From-SVN: r79663
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 057ebee..49c9ccf 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -2484,12 +2484,6 @@ pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop) pedwarn ("pointer to member function used in arithmetic"); size_exp = integer_one_node; } - else if (TREE_CODE (TREE_TYPE (result_type)) == OFFSET_TYPE) - { - if (pedantic || warn_pointer_arith) - pedwarn ("pointer to a member used in arithmetic"); - size_exp = integer_one_node; - } else size_exp = size_in_bytes (TREE_TYPE (result_type)); |