diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2008-10-06 21:35:02 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2008-10-06 21:35:02 +0000 |
commit | c9f9eb5d07ca96c57d89e5cb8ba3b3dfe588e151 (patch) | |
tree | 1143aed4f086c080db0a92f3dcf75640658aa713 /gcc/testsuite/gcc.dg/misc-column.c | |
parent | 7a3446ec7cdc75bedc1e0b47daea93146c5f8a78 (diff) | |
download | gcc-c9f9eb5d07ca96c57d89e5cb8ba3b3dfe588e151.zip gcc-c9f9eb5d07ca96c57d89e5cb8ba3b3dfe588e151.tar.gz gcc-c9f9eb5d07ca96c57d89e5cb8ba3b3dfe588e151.tar.bz2 |
c-decl.c (finish_decl): Pass input_location to build_unary_op.
* c-decl.c (finish_decl): Pass input_location to build_unary_op.
* c-typeck.c (array_to_pointer_conversion): Pass location to
build_unary_op.
(function_to_pointer_conversion): Use error_at and warning_at.
(build_indirect_ref): Same.
(build_array_ref): Pass location to build_binary_op.
(parser_build_unary_op): Do not set location after calling
build_unary_op.
(build_unary_op): Add location argument. Use it throughout. Set
EXPR_LOCATION before returning new tree.
(build_modify_expr): Same.
(build_binary_op): Use location throughout. Set EXPR_LOCATION before
returning node.
* c-omp.c (c_finish_omp_atomic): Pass location to build_unary_op,
build_indirect_ref, build_modify_expr.
(c_finish_omp_for): Same. Use error_at instead of error.
* c-common.c (c_common_truthvalue_conversion): Pass location to
build_unary_op.
(warn_for_div_by_zero): Add location argument.
* c-common.h: Add argument to build_modify_expr, build_indirect_ref,
build_unary_op, warn_for_div_by_zero.
* c-parser.c (c_parser_typeof_specifier): Use
protected_set_expr_location.
(c_parser_statement_after_labels): Same.
(c_parser_condition): Same.
(c_parser_expr_no_commas): Pass correct location to build_modify_expr.
(c_parser_conditional_expression): Use protected_set_expr_location.
(c_parser_unary_expression): Pass location to build_indirect_ref.
(c_parser_postfix_expression_after_primary): Pass location to
build_indirect_ref, build_unary_op.
(c_parser_omp_for_loop): Set the increment expression's EXPR_LOCATION.
objc/
* objc-act.c (objc_build_string_object): Pass location to
build_unary_op.
(init_def_list): Same.
(init_objc_symtab): Same.
(init_module_descriptor): Same.
(build_module_initializer_routine): Same.
(generate_static_references): Same.
(build_typed_selector_reference): Same.
(add_objc_string): Same.
(objc_substitute_decl): Same.
(objc_build_ivar_assignment): Same.
(objc_build_global_assignment): Same.
(objc_build_strong_cast_assignment): Same.
(generate_protocols): Same.
(build_protocol_initializer): Same.
(build_dispatch_table_initializer): Same.
(generate_protocol_list): Same.
(build_category_initializer): Same.
(build_shared_structure_initializer): Same.
(generate_shared_structures): Same.
(objc_build_protocol_expr): Same.
(build_ivar_reference): Same.
(get_super_receiver): Same.
build_modify_expr.
testsuite/
* gcc.dg/gomp/for-1.c: Test column.
* gcc.dg/misc-column.c: Add column tests for unary arguments.
cp/
* typeck.c (build_x_indirect_ref): Add location argument.
(cp_build_binary_op): Pass location to warn_for_div_by_zero.
(cp_build_unary_op): Add location argument.
(cp_build_modify_expr): Same.
* class.c (build_base_path): Pass location to build_indirect_ref.
* semantics.c (handle_omp_for_class_iterator): Pass elocus to
build_modify_expr.
From-SVN: r140914
Diffstat (limited to 'gcc/testsuite/gcc.dg/misc-column.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/misc-column.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/misc-column.c b/gcc/testsuite/gcc.dg/misc-column.c index f84a553..a24427e 100644 --- a/gcc/testsuite/gcc.dg/misc-column.c +++ b/gcc/testsuite/gcc.dg/misc-column.c @@ -1,5 +1,6 @@ /* { dg-options "-fshow-column -Wall -Wfloat-equal -pedantic" } */ +int i, j; float a, b; int *p; @@ -26,4 +27,14 @@ void foo (void) if (p < 0) /* { dg-warning "9:ordered comparison of pointer with" } */ bar(); + + -q; /* { dg-error "3:wrong type argument to unary" } */ + + ~q; /* { dg-error "3:wrong type argument to bit" } */ + + ++*q; /* { dg-error "3:wrong type argument to increment" } */ + + i = j / 0; /* { dg-warning "9:division by zero" } */ + + i /= 0; /* { dg-warning "5:division by zero" } */ } |