1 2017-08-10 David Malcolm <dmalcolm@redhat.com>
3 * c-parser.c (c_parser_error): Rename to...
4 (c_parser_error_richloc): ...this, making static, and adding
5 "richloc" parameter, passing it to the c_parse_error call,
6 rather than calling c_parser_set_source_position_from_token.
7 (c_parser_error): Reintroduce, reimplementing in terms of the
8 above, converting return type from void to bool.
9 (class token_pair): New class.
10 (struct matching_paren_traits): New struct.
11 (matching_parens): New typedef.
12 (struct matching_brace_traits): New struct.
13 (matching_braces): New typedef.
14 (get_matching_symbol): New function.
15 (c_parser_require): Add param MATCHING_LOCATION, using it to
16 highlight matching "opening" tokens for missing "closing" tokens.
17 (c_parser_skip_until_found): Likewise.
18 (c_parser_static_assert_declaration_no_semi): Convert explicit
19 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
20 class matching_parens, so that the pertinent open parenthesis is
21 highlighted when there are problems locating the close
23 (c_parser_struct_or_union_specifier): Likewise.
24 (c_parser_typeof_specifier): Likewise.
25 (c_parser_alignas_specifier): Likewise.
26 (c_parser_simple_asm_expr): Likewise.
27 (c_parser_braced_init): Likewise, for matching_braces.
28 (c_parser_paren_condition): Likewise, for matching_parens.
29 (c_parser_switch_statement): Likewise.
30 (c_parser_for_statement): Likewise.
31 (c_parser_asm_statement): Likewise.
32 (c_parser_asm_operands): Likewise.
33 (c_parser_cast_expression): Likewise.
34 (c_parser_sizeof_expression): Likewise.
35 (c_parser_alignof_expression): Likewise.
36 (c_parser_generic_selection): Likewise.
37 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
38 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
39 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
40 In case CPP_OPEN_PAREN, pass loc_open_paren to the
41 c_parser_skip_until_found call.
42 (c_parser_objc_class_definition): Use class matching_parens as
44 (c_parser_objc_method_decl): Likewise.
45 (c_parser_objc_try_catch_finally_statement): Likewise.
46 (c_parser_objc_synchronized_statement): Likewise.
47 (c_parser_objc_at_property_declaration): Likewise.
48 (c_parser_oacc_wait_list): Likewise.
49 (c_parser_omp_var_list_parens): Likewise.
50 (c_parser_omp_clause_collapse): Likewise.
51 (c_parser_omp_clause_default): Likewise.
52 (c_parser_omp_clause_if): Likewise.
53 (c_parser_omp_clause_num_threads): Likewise.
54 (c_parser_omp_clause_num_tasks): Likewise.
55 (c_parser_omp_clause_grainsize): Likewise.
56 (c_parser_omp_clause_priority): Likewise.
57 (c_parser_omp_clause_hint): Likewise.
58 (c_parser_omp_clause_defaultmap): Likewise.
59 (c_parser_oacc_single_int_clause): Likewise.
60 (c_parser_omp_clause_ordered): Likewise.
61 (c_parser_omp_clause_reduction): Likewise.
62 (c_parser_omp_clause_schedule): Likewise.
63 (c_parser_omp_clause_num_teams): Likewise.
64 (c_parser_omp_clause_thread_limit): Likewise.
65 (c_parser_omp_clause_aligned): Likewise.
66 (c_parser_omp_clause_linear): Likewise.
67 (c_parser_omp_clause_safelen): Likewise.
68 (c_parser_omp_clause_simdlen): Likewise.
69 (c_parser_omp_clause_depend): Likewise.
70 (c_parser_omp_clause_map): Likewise.
71 (c_parser_omp_clause_device): Likewise.
72 (c_parser_omp_clause_dist_schedule): Likewise.
73 (c_parser_omp_clause_proc_bind): Likewise.
74 (c_parser_omp_clause_uniform): Likewise.
75 (c_parser_omp_for_loop): Likewise.
76 (c_parser_cilk_clause_vectorlength): Likewise.
77 (c_parser_cilk_clause_linear): Likewise.
78 (c_parser_transaction_expression): Likewise.
79 * c-parser.h (c_parser_require): Add param matching_location with
80 default UNKNOWN_LOCATION.
81 (c_parser_error): Convert return type from void to bool.
82 (c_parser_skip_until_found): Add param matching_location with
83 default UNKNOWN_LOCATION.
85 2017-08-09 Marek Polacek <polacek@redhat.com>
87 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
88 * c-tree.h (build_external_ref): Update declaration.
89 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
90 (build_external_ref): Change the type of a parameter to bool.
91 (parser_build_binary_op): Use true/false instead of 1/0.
92 (pointer_diff): Likewise.
93 (build_modify_expr): Likewise.
94 (set_designator): Change the type of a parameter to bool.
95 (set_init_index): Use true/false instead of 1/0.
96 (set_init_label): Likewise.
97 (output_init_element): Change the type of a parameter to bool.
98 (output_pending_init_elements): Use true/false instead of 1/0.
99 (process_init_element): Likewise.
100 (build_binary_op): Change the type of a parameter to bool.
102 2017-08-09 Marek Polacek <polacek@redhat.com>
105 * c-typeck.c (pedwarn_init): Make the function take a variable list.
106 Call emit_diagnostic_valist instead of pedwarn.
107 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
108 Print the relevant types in diagnostics.
110 2017-08-09 Marek Polacek <polacek@redhat.com>
113 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
114 build_conditional_expr.
115 * c-parser.c (c_parser_conditional_expression): Create locations for
116 EXP1 and EXP2 from their source ranges. Pass the locations down to
117 build_conditional_expr.
118 * c-tree.h (build_conditional_expr): Update declaration.
119 * c-typeck.c (build_conditional_expr): Add location_t parameters.
120 For -Wsign-compare, also print the types.
122 2017-08-08 Martin Liska <mliska@suse.cz>
124 * c-convert.c: Include header files.
125 * c-typeck.c: Likewise.
127 2017-08-07 Martin Liska <mliska@suse.cz>
129 * c-parser.c (c_parser_attributes): Canonicalize name of an
132 2017-08-02 Marek Polacek <polacek@redhat.com>
135 * c-parser.c (c_parser_unary_expression): Use set_error.
139 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
140 warnings. Avoid walking MACRO_MAP_LOCATIONS.
142 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
143 Martin Liska <mliska@suse.cz>
145 * c-typeck.c (c_finish_goto_label): Build gimple predict
148 2017-07-31 Martin Liska <mliska@suse.cz>
151 * c-convert.c (convert): Guard condition with flag_sanitize_p
152 also with current_function_decl non-null equality.
153 * c-decl.c (grokdeclarator): Likewise.
154 * c-typeck.c (build_binary_op): Likewise.
156 2017-07-25 Marek Polacek <polacek@redhat.com>
158 * c-decl.c (grokfield): Remove local variable.
160 2017-07-25 Marek Polacek <polacek@redhat.com>
163 * c-parser.c (c_parser_else_body): Don't warn about multistatement
164 macro expansion if the body is in { }.
165 (c_parser_while_statement): Likewise.
166 (c_parser_for_statement): Likewise.
168 2017-07-18 Nathan Sidwell <nathan@acm.org>
170 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
172 2017-07-14 David Malcolm <dmalcolm@redhat.com>
174 * c-decl.c (implicitly_declare): When suggesting a missing
175 #include, provide a fix-it hint.
177 2017-07-06 David Malcolm <dmalcolm@redhat.com>
179 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
180 and call that instead.
181 * c-tree.h (selftest::run_c_tests): New decl.
183 2017-06-26 Marek Polacek <polacek@redhat.com>
186 * c-parser.c (c_parser_if_body): Set the location of the
187 body of the conditional after parsing all the labels. Call
188 warn_for_multistatement_macros.
189 (c_parser_else_body): Likewise.
190 (c_parser_switch_statement): Likewise.
191 (c_parser_while_statement): Likewise.
192 (c_parser_for_statement): Likewise.
193 (c_parser_statement): Add a default argument. Save the location
194 after labels have been parsed.
195 (c_parser_c99_block_statement): Likewise.
197 2017-06-19 Richard Biener <rguenther@suse.de>
199 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
200 negated _Literals to parse _Literal (int) -1.
202 2017-06-13 Martin Liska <mliska@suse.cz>
205 * c-convert.c (convert): Use sanitize_flags_p.
206 * c-decl.c (grokdeclarator): Likewise.
207 * c-typeck.c (convert_for_assignment): Likewise.
208 (c_finish_return): Likewise.
209 (build_binary_op): Likewise.
211 2017-06-08 Jakub Jelinek <jakub@redhat.com>
214 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
215 to sizetype before size_binop.
217 2017-06-07 Jakub Jelinek <jakub@redhat.com>
219 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
222 2017-06-06 Marek Polacek <polacek@redhat.com>
225 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
227 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
229 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
231 * c-parser.c (c_parser_binary_expression): Implement the
232 -Wsizeof_pointer_div warning.
233 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
234 from a parenthesized expression.
235 (c_parser_expr_list): Use c_last_sizeof_loc.
236 * c-tree.h (c_last_sizeof_loc): New external.
237 * c-typeck.c (c_last_sizeof_loc): New variable.
238 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
240 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
243 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
245 2017-05-30 David Malcolm <dmalcolm@redhat.com>
247 * c-objc-common.c (c_tree_printer): Gain bool and const char **
250 2017-05-24 Martin Sebor <msebor@redhat.com>
253 * c-fold.c (c_fully_fold_internal): Adjust.
254 * c-typeck.c (parser_build_unary_op): Adjust.
256 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
258 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
259 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
262 2017-05-23 Marek Polacek <polacek@redhat.com>
264 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
267 2017-05-22 Jakub Jelinek <jakub@redhat.com>
269 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
270 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
271 it returned invariant. Call tree_invariant_p unconditionally
272 afterwards to decide whether to return expr or op0.
274 2017-05-22 Nathan Sidwell <nathan@acm.org>
276 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
278 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
280 * c-parser.c (c_parser_omp_clause_default): Handle
281 "OMP_CLAUSE_DEFAULT_PRESENT".
283 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
285 * config-lang.in (gtfiles): Add c-family/c-format.c.
287 2017-05-18 Nathan Sidwell <nathan@acm.org>
289 * c-decl.c (pushdecl_top_level): Delete unused function.
291 2017-05-18 Marek Polacek <polacek@redhat.com>
293 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
294 (check_earlier_gotos): Likewise.
295 (define_label): Likewise.
296 (pending_xref_error): Likewise.
297 (smallest_type_quals_location): Likewise.
298 (grokdeclarator): Likewise.
299 (grokparms): Likewise.
300 (identifier_global_value): Likewise.
301 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
302 (find_init_member): Likewise.
304 2017-05-18 Marek Polacek <polacek@redhat.com>
306 * c-decl.c (start_decl): Use false/true instead of 0/1.
307 (grokdeclarator): Likewise.
308 (finish_struct): Likewise.
309 (start_function): Change the return type to bool. Use false/true
311 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
312 * c-tree.h (start_function): Update.
313 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
314 (set_designator): Change the return type to bool. Use false/true
317 2017-05-17 Marek Polacek <polacek@redhat.com>
319 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
320 * c-typeck.c: Likewise.
322 2017-05-17 Marek Polacek <polacek@redhat.com>
325 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
326 DECL_IGNORED_P even for non-static compound literals.
328 2017-05-17 Martin Liska <mliska@suse.cz>
330 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
331 use it instead of int type.
333 2017-05-17 Marek Polacek <polacek@redhat.com>
335 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
337 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
338 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
339 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
340 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
342 (c_parser_conditional_expression): Likewise.
343 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
344 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
345 (process_init_element): Likewise.
346 (build_binary_op): Likewise.
347 (handle_omp_array_sections_1): Likewise.
349 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
351 * c-parser.c (c_parser_omp_clause_num_gangs)
352 (c_parser_omp_clause_num_workers)
353 (c_parser_omp_clause_vector_length): Merge functions into...
354 (c_parser_oacc_single_int_clause): ... this new function. Adjust
357 2017-05-11 Nathan Sidwell <nathan@acm.org>
359 * gimple-parser.c: Don't #include tree-dump.h.
361 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
364 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
366 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
369 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
370 incorrect __MEM syntax.
372 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
375 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
378 2017-05-09 Nathan Sidwell <nathan@acm.org>
380 * c-tree.h (pushdecl): Declare.
382 2017-05-05 David Malcolm <dmalcolm@redhat.com>
384 * c-decl.c (warn_defaults_to): Replace report_diagnostic
385 with diagnostic_report_diagnostic.
386 * c-errors.c (pedwarn_c99): Likewise.
387 (pedwarn_c90): Likewise.
389 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
392 * c-gimplify.c (c_gimplify_expr): Remove calls to
393 cilk_gimplifY_call_params_in_spawned_fn.
395 2017-04-25 David Malcolm <dmalcolm@redhat.com>
397 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
398 hint for removing extra semicolon.
400 2017-04-21 Jakub Jelinek <jakub@redhat.com>
403 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
404 enabled, set specs->type to integer_type_node.
406 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
408 * c-array-notation.c: Fix typo in comment.
410 2017-03-29 Marek Polacek <polacek@redhat.com>
413 * c-decl.c (finish_decl): Check VAR_P.
415 2017-03-27 Jakub Jelinek <jakub@redhat.com>
418 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
419 * c-typeck.c (c_mark_addressable): Likewise. Look through
420 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
422 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
424 2017-03-23 Marek Polacek <polacek@redhat.com>
426 * c-tree.h: Remove a C_RID_YYCODE reference.
428 2017-03-21 Jakub Jelinek <jakub@redhat.com>
431 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
432 optional COMPOUND_EXPR with ubsan instrumentation.
434 2017-03-17 Marek Polacek <polacek@redhat.com>
436 * c-parser.c: Add C11 references.
438 2017-03-15 Marek Polacek <polacek@redhat.com>
440 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
442 2017-03-11 Marek Polacek <polacek@redhat.com>
444 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
446 2017-03-10 David Malcolm <dmalcolm@redhat.com>
449 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
451 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
453 2017-03-09 Marek Polacek <polacek@redhat.com>
456 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
457 parameter declarations with initializers.
459 2017-03-09 Jakub Jelinek <jakub@redhat.com>
462 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
465 2017-03-07 Jakub Jelinek <jakub@redhat.com>
468 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
469 for "may only be used in compound statements" diagnostics, change it
470 such that the same translatable string is used for all pragmas. For
471 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
473 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
474 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
475 "may only be used in compound statements" diagnostics, such that the
476 same translatable string is used for all pragmas.
478 2017-03-04 Marek Polacek <polacek@redhat.com>
481 * c-decl.c (implicit_decl_warning): Add missing space.
483 2017-03-03 Marek Polacek <polacek@redhat.com>
486 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
487 current_function_prototype_arg_types is error_mark_node. Fix
488 formatting. Use TREE_VALUE instead of TREE_TYPE.
490 2017-03-03 Jakub Jelinek <jakub@redhat.com>
493 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
494 %<min%> or %<max%> in the diagnostics, instead mention identifier.
495 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
499 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
500 instead of %<_Generic>.
501 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
502 (c_parser_omp_target_exit_data): Use %<release%> instead of
505 2017-02-28 Jakub Jelinek <jakub@redhat.com>
507 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
508 instead of just cond ? "..." : "...".
509 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
510 for "enter"/"exit" keyword.
511 (c_finish_oacc_routine): Don't use %s to supply portions of the
514 2017-02-24 Jakub Jelinek <jakub@redhat.com>
517 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
518 handle -Wrestrict here.
519 * c-typeck.c (build_function_call_vec): Adjust
520 check_function_arguments caller.
522 2017-02-23 Richard Biener <rguenther@suse.de>
525 * gimple-parser.c (c_parser_gimple_statement): Use set_error
526 to initialize c_exprs to return.
527 (c_parser_gimple_binary_expression): Likewise.
528 (c_parser_gimple_unary_expression): Likewise.
529 (c_parser_gimple_postfix_expression): Likewise.
531 2017-02-22 Marek Polacek <polacek@redhat.com>
534 * c-typeck.c (convert_arguments): Handle error_mark_node.
536 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
538 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
539 value of c_parser_parse_ssa_name against error_mark_node and emit
540 error if ssa name is anonymous and written as default definition.
542 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
544 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
547 2017-02-16 Jakub Jelinek <jakub@redhat.com>
550 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
551 ignore #pragma omp target even when not followed by identifier.
553 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
555 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
556 (c_parser_gimple_unary_expression): Likewise.
558 2017-02-13 Jakub Jelinek <jakub@redhat.com>
560 * c-parser.c (c_parser_oacc_declare): Add missing space in
563 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
566 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
567 set_c_expr_source_range when parsing ssa-name.
569 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
570 Richard Biener <rguenther@suse.de>
572 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
573 building IL when arguments are error_mark_node.
574 (c_parser_gimple_unary_expression): Likewise.
575 (c_parser_gimple_if_stmt): Likewise.
576 (c_parser_gimple_switch_stmt): Likewise.
577 (c_parser_gimple_return_stmt): Likewise.
578 (c_parser_parse_ssa_name): When name lookup fails do not build
579 an SSA name. Use undeclared rather than not declared in error
582 2017-02-09 Marek Polacek <polacek@redhat.com>
585 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
586 instead of c_parser_skip_until_found.
588 2017-02-09 Jakub Jelinek <jakub@redhat.com>
591 * c-parser.c (c_parser_omp_declare_target): Don't invoke
592 symtab_node::get on automatic variables.
594 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
595 Chung-Lin Tang <cltang@codesourcery.com>
597 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
598 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
600 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
602 2017-02-07 Richard Biener <rguenther@suse.de>
604 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
605 (c_parser_gimple_postfix_expression_after_primary):
606 Do not use c_build_function_call_vec to avoid folding and promotion.
609 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
612 * c-decl.c (pop_scope): Pass main_input_filename to
613 build_translation_unit_decl.
615 2017-01-24 David Malcolm <dmalcolm@redhat.com>
617 * c-parser.c: Include "read-rtl-function.h" and
619 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
620 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
621 production. Update for renaming of field "gimple_pass" to
622 "gimple_or_rtl_pass". If __RTL was seen, call
623 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
624 to an auto_timevar, to cope with early exit.
625 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
626 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
627 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
629 (c_parser_parse_rtl_body): New function.
630 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
631 (struct c_declspecs): Rename field "gimple_pass" to
632 "gimple_or_rtl_pass". Add field "rtl_p".
633 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
634 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
635 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
636 (c_parser_gimple_or_rtl_pass_list): ...this.
638 2017-01-20 Marek Polacek <polacek@redhat.com>
641 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
643 2017-01-13 Richard Biener <rguenther@suse.de>
645 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
648 2017-01-13 Richard Biener <rguenther@suse.de>
650 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
651 _Literal ( type-name ) number.
653 2017-01-12 Richard Biener <rguenther@suse.de>
655 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
658 2017-01-11 Jakub Jelinek <jakub@redhat.com>
661 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
664 2017-01-11 Richard Biener <rguenther@suse.de>
667 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
668 returns on parse errors.
670 2017-01-04 Marek Polacek <polacek@redhat.com>
673 * c-parser.c (c_parser_postfix_expression): Mark zero character
674 constants by setting original_type in c_expr.
675 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
676 with a zero character constant.
677 (char_type_p): New function.
679 2017-01-04 David Malcolm <dmalcolm@redhat.com>
681 * c-parser.c (c_parser_declaration_or_fndef): Create a
682 rich_location at init_loc and parse it to start_init.
683 (last_init_list_comma): New global.
684 (c_parser_braced_init): Update last_init_list_comma when parsing
685 commas. Pass it to pop_init_level. Pass location of closing
686 brace to pop_init_level.
687 (c_parser_postfix_expression_after_paren_type): Create a
688 rich_location at type_loc and parse it to start_init.
689 (c_parser_omp_declare_reduction): Likewise for loc.
690 * c-tree.h (start_init): Add rich_location * param.
691 (pop_init_level): Add location_t param.
692 * c-typeck.c (struct initializer_stack): Add field
693 "missing_brace_richloc".
694 (start_init): Add richloc param, use it to initialize
695 the stack node's missing_brace_richloc.
696 (last_init_list_comma): New decl.
697 (finish_implicit_inits): Pass last_init_list_comma to
699 (push_init_level): When finding missing open braces, add fix-it
700 hints to the richloc.
701 (pop_init_level): Add "insert_before" param and pass it
702 when calling pop_init_level. Add fixits about missing
703 close braces to any richloc. Use the richloc for the
704 -Wmissing-braces warning.
705 (set_designator): Pass last_init_list_comma to pop_init_level.
706 (process_init_element): Likewise.
708 2017-01-01 Jakub Jelinek <jakub@redhat.com>
710 Update copyright years.
712 2016-12-21 Jakub Jelinek <jakub@redhat.com>
715 * c-typeck.c (build_function_call_vec): If check_function_arguments
716 returns true, set TREE_NO_WARNING on CALL_EXPR.
719 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
720 to *expr instead of overwriting it.
722 2016-12-20 Richard Biener <rguenther@suse.de>
724 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
726 (c_parser_gimple_statement): Only build assigns for non-error
728 (c_parser_gimple_postfix_expression_after): Improve error recovery.
730 2016-12-14 Martin Jambor <mjambor@suse.cz>
732 * c-parser.c: Include omp-general.h and omp-offload.h instead of
734 (c_finish_oacc_routine): Adjusted call to
735 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
736 to use their new names.
737 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
739 (c_parser_oacc_update): Likewise.
740 (c_parser_omp_simd): Likewise.
741 (c_parser_omp_target_update): Likewise.
742 * c-typeck.c: Include omp-general.h instead of omp-low.h.
743 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
745 (c_finish_omp_cancellation_point): Likewise.
746 * gimple-parser.c: Do not include omp-low.h
748 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
749 James Norris <jnorris@codesourcery.com>
751 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
752 EXIT_DATA,WAIT} are not used in compound statements.
753 (c_parser_oacc_enter_exit_data): Update diagnostics.
755 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
758 * c-decl.c (diagnose_mismatched_decls): Use
759 OPT_Wbuiltin_declaration_mismatch here too.
761 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
762 Alan Hayward <alan.hayward@arm.com>
763 David Sherwood <david.sherwood@arm.com>
765 * c-decl.c (merge_decls): Use SET_DECL_MODE.
766 (make_label, finish_struct): Likewise.
768 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
769 Richard Biener <rguenther@suse.de>
771 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
772 * config-lang.in (gtfiles): Add c/c-parser.h.
773 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
774 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
775 * c-parser.c (enum c_id_kind, struct c_token,
776 c_parser_next_token_is, c_parser_next_token_is_not,
777 c_parser_next_token_is_keyword,
778 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
780 * c-parser.h: ... new header.
781 * c-parser.c: Include c-parser.h and gimple-parser.h.
782 (c_parser_peek_token, c_parser_peek_2nd_token,
783 c_token_starts_typename, c_parser_next_token_starts_declspecs,
784 c_parser_next_tokens_start_declaration, c_parser_consume_token,
785 c_parser_error, c_parser_require, c_parser_skip_until_found,
786 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
787 c_parser_type_name): Export.
788 (c_parser_tokens_buf): New function.
789 (c_parser_error): Likewise.
790 (c_parser_set_error): Likewise.
791 (c_parser_declspecs): Handle RID_GIMPLE.
792 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
793 via c_parser_parse_gimple_body.
794 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
795 c_token_starts_typename, c_parser_next_token_starts_declspecs,
796 c_parser_next_tokens_start_declaration, c_parser_consume_token,
797 c_parser_error, c_parser_require, c_parser_skip_until_found,
798 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
799 c_parser_type_name): Declare.
800 (struct c_parser): Declare forward.
801 (c_parser_tokens_buf): Declare.
802 (c_parser_error): Likewise.
803 (c_parser_set_error): Likewise.
804 * gimple-parser.c: New file.
805 * gimple-parser.h: Likewise.
807 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
810 * c-parser.c (c_parser_postfix_expression_after_primary): Call
813 2016-09-11 Le-Chun Wu <lcwu@google.com>
814 Mark Wielaard <mjw@redhat.com>
816 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
817 to the given -Wshadow= variant.
819 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
821 * c-typeck.c: Include memmodel.h.
823 2016-10-13 Jakub Jelinek <jakub@redhat.com>
826 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
827 instead of lhd_return_null_tree_v.
829 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
832 * c-decl.c (smallest_type_quals_location): New static function.
833 (grokdeclarator): Try to find the correct location for an ignored
836 2016-09-26 Marek Polacek <polacek@redhat.com>
839 * c-decl.c (pop_scope): Add gcc_fallthrough.
841 2016-09-26 Marek Polacek <polacek@redhat.com>
844 * c-parser.c (struct c_token): Add flags field.
845 (c_lex_one_token): Pass it to c_lex_with_flags.
846 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
847 into IFN_FALLTHROUGH.
848 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
849 attribute fallthrough after a case label or default label.
850 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
852 2016-09-24 Marek Polacek <polacek@redhat.com>
855 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
856 have boolean value. Warn about ++/-- on booleans.
858 2016-09-23 Jakub Jelinek <jakub@redhat.com>
860 * c-parser.c (incomplete_record_decls): Remove unnecessary
861 = vNULL initialization of file scope vec.
863 2016-09-16 Marek Polacek <polacek@redhat.com>
865 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
867 2016-09-14 Marek Polacek <polacek@redhat.com>
869 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
870 (fix_array_notation_expr): Likewise.
871 * c-decl.c (finish_decl): Likewise.
872 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
873 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
874 (function_to_pointer_conversion): Use false instead of 0.
875 (convert_lvalue_to_rvalue): Likewise.
876 (parser_build_unary_op): Likewise.
877 (build_atomic_assign): Likewise.
878 (build_unary_op): Change nonconvert parameter type to bool, use
879 true/false instead of 1/0.
880 (build_binary_op): Use true instead of 1.
882 2016-09-13 David Malcolm <dmalcolm@redhat.com>
884 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
885 of add_fixit_insert to add_fixit_insert_before.
887 2016-09-13 Marek Polacek <polacek@redhat.com>
889 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
892 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
895 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
896 COMPOUND_EXPR to warn_for_omitted_condop.
898 2016-09-07 David Malcolm <dmalcolm@redhat.com>
900 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
901 c_get_substring_location for this new langhook.
903 2016-09-02 Jakub Jelinek <jakub@redhat.com>
906 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
908 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
909 instead of mark_exp_read on low_bound/length expression.
910 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
911 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
912 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
913 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
914 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
915 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
916 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
917 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
918 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
919 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
920 instead of mark_expr_read.
921 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
922 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
923 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
924 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
925 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
926 array section bases outside of depend clause, for depend clause
927 use convert_lvalue_to_rvalue on the base.
928 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
929 linear, aligned, map, to and from clauses.
930 (c_omp_clause_copy_ctor): New function.
932 2016-09-01 Marek Polacek <polacek@redhat.com>
935 * c-typeck.c (composite_type): Add FALLTHRU comment.
937 2016-08-31 David Malcolm <dmalcolm@redhat.com>
939 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
940 to the insertion fixits for "struct", "union", and "enum".
942 2016-08-30 David Malcolm <dmalcolm@redhat.com>
944 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
945 rather than add_fixit_misspelled_id.
946 (undeclared_variable): Likewise.
947 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
948 now-redundant "here" params from add_fixit_insert method calls.
949 (c_parser_parameter_declaration): Likewise.
950 * c-typeck.c (build_component_ref): Remove now-redundant range
951 param from add_fixit_replace method calls.
953 2016-08-25 Marek Polacek <polacek@redhat.com>
955 * c-typeck.c (parser_build_binary_op): Pass LHS to
956 warn_logical_not_parentheses.
958 2016-08-25 Marek Polacek <polacek@redhat.com>
961 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
962 or _FloatN or _FloatNx is not supported.
963 (finish_declspecs): Set type to integer_type_node when _FloatN or
964 _FloatNx is not supported.
966 2016-08-19 Joseph Myers <joseph@codesourcery.com>
969 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
970 (struct c_declspecs): Add field floatn_nx_idx.
971 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
972 and _FloatNx type specifiers.
973 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
974 (c_parser_declspecs, c_parser_attribute_any_word)
975 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
976 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
977 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
978 narrower than double.
980 2016-08-12 Jakub Jelinek <jakub@redhat.com>
981 Martin Liska <mliska@suse.cz>
984 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
985 % to determine val element to change. Assert that
986 wchar_bytes * charwidth fits into val array.
988 2016-08-12 Marek Polacek <polacek@redhat.com>
991 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
992 (c_parser_postfix_expression): Likewise.
993 * c-typeck.c (build_unary_op): Adjust fall through comment.
994 (c_mark_addressable): Likewise.
996 2016-08-11 Jakub Jelinek <jakub@redhat.com>
999 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1000 array member through typedef, for orig_qual_indirect == 0 clear
1003 2016-08-08 David Malcolm <dmalcolm@redhat.com>
1006 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1007 this up to selftest::run_c_tests.
1008 (selftest::run_c_tests): New function.
1010 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1012 * c-parser.c (struct oacc_routine_data): Add error_seen and
1013 fndecl_seen members.
1014 (c_finish_oacc_routine): Use these.
1015 (c_parser_declaration_or_fndef): Adjust.
1016 (c_parser_oacc_routine): Likewise. Support more C language
1017 constructs, and improve diagnostics. Move pragma context
1019 (c_parser_pragma): ... here.
1021 * c-parser.c (struct oacc_routine_data): New.
1022 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1024 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1025 declare target" attribute.
1027 2016-08-01 Jan Beulich <jbeulich@suse.com>
1029 * c-fold.c (c_fully_fold_internal): Also emit shift count
1030 warnings for vector types.
1031 * c-typeck.c (build_binary_op): Likewise.
1033 2016-07-29 Marek Polacek <polacek@redhat.com>
1036 * c-decl.c (finish_struct): Rephrase an error message.
1039 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1040 to error node for invalid code.
1043 * c-decl.c (implicitly_declare): Return decl early not only for
1044 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1046 2016-07-29 Jakub Jelinek <jakub@redhat.com>
1049 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1050 on GNU extern inline functions.
1052 2016-07-29 Marek Polacek <polacek@redhat.com>
1055 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1058 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
1060 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1062 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1064 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1066 (best_macro_match): Likewise, converting from a typedef to a
1068 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1069 (lookup_name_fuzzy): Update for change of best_macro_match to a
1070 subclass with a ctor that calls cpp_forall_identifiers.
1072 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1074 * c-decl.c (implicit_decl_warning): Update for conversion of
1075 return type of lookup_name_fuzzy to const char *.
1076 (undeclared_variable): Likewise.
1077 (lookup_name_fuzzy): Convert return type from tree to
1079 * c-parser.c (c_parser_declaration_or_fndef): Update for
1080 conversion of return type of lookup_name_fuzzy to const char *.
1081 (c_parser_parameter_declaration): Likewise.
1083 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1085 * c-parser.c (c_parser_oacc_declare): Don't scan for
1087 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1088 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1089 zero-length subarrays.
1091 2016-07-15 Jakub Jelinek <jakub@redhat.com>
1094 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1095 instead of FUZZY_LOOKUP_NAME.
1096 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1097 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1099 2016-07-14 Jakub Jelinek <jakub@redhat.com>
1102 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1104 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1106 * c-parser.c (c_parser_generic_selection): Make type of variable
1108 (c_parser_omp_declare_simd): Likewise.
1110 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1112 * c-decl.c (struct c_struct_parse_info): Change member types
1113 from vec to auto_vec.
1114 (start_struct): Adjust.
1115 (finish_struct): Likewise.
1117 2016-07-02 Jakub Jelinek <jakub@redhat.com>
1120 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1122 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1124 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1125 Move pragma context checking into...
1126 (c_parser_omp_cancellation_point): ... here, and improve
1127 diagnostic messages.
1128 * c-typeck.c (c_finish_omp_cancel)
1129 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1131 2016-06-29 Jakub Jelinek <jakub@redhat.com>
1134 * c-typeck.c (c_build_qualified_type): Don't clear
1135 C_TYPE_INCOMPLETE_VARS for the main variant.
1137 2016-06-28 Martin Sebor <msebor@redhat.com>
1140 * c-typeck.c (output_init_element): Diagnose incompatible types
1141 before non-constant initializers.
1143 2016-06-28 Jakub Jelinek <jakub@redhat.com>
1145 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1147 2016-06-23 Andi Kleen <ak@linux.intel.com>
1149 * Make-lang.in: Add support for autofdo.
1151 2016-06-22 David Malcolm <dmalcolm@redhat.com>
1154 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1155 (implicit_decl_warning): When issuing warnings for implicit
1156 declarations, attempt to provide a suggestion via
1158 (undeclared_variable): Likewise when issuing errors.
1159 (lookup_name_in_scope): Likewise.
1160 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1161 (best_macro_match): New typedef.
1162 (find_closest_macro_cpp_cb): New function.
1163 (lookup_name_fuzzy): New function.
1164 * c-parser.c: Include gcc-rich-location.h.
1165 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1166 (c_keyword_starts_typename): ...this new function.
1167 (c_parser_declaration_or_fndef): When issuing errors about
1168 missing "struct" etc, add a fixit. For other kinds of errors,
1169 attempt to provide a suggestion via lookup_name_fuzzy.
1170 (c_parser_parms_declarator): When looking ahead to detect typos in
1171 type names, also reject CPP_KEYWORD.
1172 (c_parser_parameter_declaration): When issuing errors about
1173 unknown type names, attempt to provide a suggestion via
1175 * c-tree.h (c_keyword_starts_typename): New prototype.
1177 2016-06-20 Joseph Myers <joseph@codesourcery.com>
1180 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1181 c_common_type returns error_mark_node.
1183 2016-06-19 Martin Sebor <msebor@redhat.com>
1186 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1187 __alignof__ (expression).
1189 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1191 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1193 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1195 * c-typeck.c (build_component_ref): Simplify fixit code by
1196 using gcc_rich_location::add_fixit_misspelled_id.
1197 (set_init_label): Likewise.
1199 2016-06-13 David Malcolm <dmalcolm@redhat.com>
1201 * c-parser.c (c_parser_initelt): Provide location of name for new
1202 location_t param of set_init_label.
1203 * c-tree.h (set_init_label): Add location_t param.
1204 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1205 param and use it when issuing error messages about unrecognized
1206 field names. Attempt to provide a fixit hint if appropriate,
1207 otherwise update the error message to provide the type name.
1209 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1212 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1215 2016-06-08 Martin Sebor <msebor@redhat.com>
1216 Jakub Jelinek <jakub@redhat.com>
1220 * c-typeck.c (convert_arguments): Don't promote last argument
1221 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1223 2016-06-08 Marek Polacek <polacek@redhat.com>
1226 * c-decl.c (grokdeclarator): Check TYPE_P.
1229 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1232 2016-06-07 David Malcolm <dmalcolm@redhat.com>
1234 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1235 and structure element reference, capture the location of the
1236 element name token and pass it to build_component_ref.
1237 (c_parser_postfix_expression_after_primary): Likewise for
1238 structure element dereference.
1239 (c_parser_omp_variable_list): Likewise for
1240 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1241 * c-tree.h (build_component_ref): Add location_t param.
1242 * c-typeck.c (build_component_ref): Add location_t param
1243 COMPONENT_LOC. Use it, if available, when issuing hints about
1244 mispelled member names to provide a fixit replacement hint.
1246 2016-06-06 Marek Polacek <polacek@redhat.com>
1249 * c-parser.c (c_parser_direct_declarator): Set location.
1251 2016-06-06 Marek Polacek <polacek@redhat.com>
1253 * c-typeck.c (comptypes_internal): Handle comparisons of
1254 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1255 TYPE_REF_CAN_ALIAS_ALL.
1257 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1259 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1260 arguments as addressable when async clause exists.
1262 2016-05-30 Jakub Jelinek <jakub@redhat.com>
1265 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1266 when combined with target construct.
1268 2016-05-26 Jakub Jelinek <jakub@redhat.com>
1270 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1271 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1273 2016-05-25 Marek Polacek <polacek@redhat.com>
1276 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1279 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1281 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1283 * c-parser.c (c_parser_oacc_declare): Add support for
1284 GOMP_MAP_FIRSTPRIVATE_POINTER.
1285 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1286 argument with enum c_omp_region_type ort.
1287 (handle_omp_array_sections): Likewise. Update call to
1288 handle_omp_array_sections_1.
1289 (c_finish_omp_clauses): Add specific errors and warning messages for
1290 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1291 call to handle_omp_array_sections.
1293 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1295 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1297 2016-05-24 Richard Biener <rguenther@suse.de>
1301 * c-typeck.c (build_array_ref): Do not complain about indexing
1302 non-lvalue vectors. Adjust for function name change.
1304 2016-05-20 Martin Sebor <msebor@redhat.com>
1307 * c-typeck.c (error_init): Use
1308 expansion_point_location_if_in_system_header.
1309 (warning_init): Same.
1311 2016-05-19 David Malcolm <dmalcolm@redhat.com>
1314 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1316 (c_parser_postfix_expression): Likewise.
1317 * c-tree.h (c_expr::set_error): New method.
1318 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1319 that result's range is initialized.
1321 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1323 * c-typeck.c (parser_build_unary_op): Fix formatting.
1325 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1327 * c-decl.c (grokdeclarator): Remove errmsg and use of
1328 targetm.invalid_return_type.
1329 (grokparms): Remove errmsg and use of
1330 targetm.invalid_parameter_type.
1332 2016-05-13 Joseph Myers <joseph@codesourcery.com>
1334 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1335 function return type.
1337 2016-05-12 Marek Polacek <polacek@redhat.com>
1340 * c-decl.c (build_compound_literal): Pass LOC down to
1341 c_incomplete_type_error.
1342 * c-tree.h (require_complete_type): Adjust declaration.
1343 (c_incomplete_type_error): Likewise.
1344 * c-typeck.c (require_complete_type): Add location parameter, pass it
1345 down to c_incomplete_type_error.
1346 (c_incomplete_type_error): Add location parameter, pass it down to
1348 (build_component_ref): Pass location down to c_incomplete_type_error.
1349 (default_conversion): Pass location down to require_complete_type.
1350 (build_array_ref): Likewise.
1351 (build_function_call_vec): Likewise.
1352 (convert_arguments): Likewise.
1353 (build_unary_op): Likewise.
1354 (build_c_cast): Likewise.
1355 (build_modify_expr): Likewise.
1356 (convert_for_assignment): Likewise.
1357 (c_finish_omp_clauses): Likewise.
1359 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1362 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1364 * c-errors.c (pedwarn_c90): Return true if warned.
1365 * c-tree.h (pedwarn_c90): Change return type to bool.
1366 (enum c_declspec_word): Add new enumerator cdw_atomic.
1368 2016-05-11 Marek Polacek <polacek@redhat.com>
1371 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1372 diagnose_mismatched_attributes and call it.
1374 2016-05-10 Marek Polacek <polacek@redhat.com>
1377 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1378 on a declaration following the definition.
1380 2016-05-05 Jakub Jelinek <jakub@redhat.com>
1382 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1383 parse it through to c_parser_c99_block_statement.
1384 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1387 2016-05-04 Marek Polacek <polacek@redhat.com>
1389 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1392 2016-05-04 Marek Polacek <polacek@redhat.com>
1395 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1396 for macro expansions.
1398 2016-05-03 Marek Polacek <polacek@redhat.com>
1401 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1402 check_builtin_function_arguments.
1404 2016-05-03 Richard Biener <rguenther@suse.de>
1406 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1407 the checksum from the previous stage.
1409 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1411 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1412 c_finish_omp_clauses.
1413 (c_parser_omp_all_clauses): Likewise.
1414 (c_parser_oacc_cache): Likewise.
1415 (c_parser_oacc_loop): Likewise.
1416 (omp_split_clauses): Likewise.
1417 (c_parser_omp_declare_target): Likewise.
1418 (c_parser_cilk_all_clauses): Likewise.
1419 (c_parser_cilk_for): Likewise.
1420 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1421 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1423 2016-05-02 Marek Polacek <polacek@redhat.com>
1426 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1429 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1432 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1433 OACC_LOOP_CLAUSE_MASK.
1434 (c_parser_oacc_kernels_parallel): Update call to
1435 c_oacc_split_loop_clauses.
1437 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
1439 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1440 argument to build_modify_expr in two cases.
1442 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1444 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1445 warn_for_memset instead of warning directly here.
1447 2016-04-26 Marek Polacek <polacek@redhat.com>
1450 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1452 (c_parser_for_statement): ... here.
1453 (c_parser_if_statement): Use it.
1454 (c_parser_switch_statement): Use it.
1455 (c_parser_while_statement): Use it.
1458 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1460 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1463 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1464 instead of c_finish_cilk_clauses.
1465 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1466 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1467 floating-point variables in the linear clause for Cilk Plus.
1469 2016-04-18 Michael Matz <matz@suse.de>
1471 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1472 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1474 2016-04-15 Marek Polacek <polacek@redhat.com>
1477 * c-typeck.c (build_unary_op): Pass location down to error and
1480 2016-04-15 Jakub Jelinek <jakub@redhat.com>
1483 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1485 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1486 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1487 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1488 Adjust c_parser_pragma callers.
1489 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1491 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1493 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1494 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1495 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1496 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1497 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1498 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1499 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1500 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1502 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1503 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1506 2016-04-13 Marek Polacek <polacek@redhat.com>
1509 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1511 (c_parser_statement): Likewise.
1512 (c_parser_c99_block_statement): Likewise.
1513 (c_parser_while_statement): Likewise.
1514 (c_parser_for_statement): Likewise.
1515 (c_parser_if_body): Don't set IF_P here.
1516 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1517 about dangling else here.
1518 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1519 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1520 warn about dangling else here.
1522 2016-04-04 Marek Polacek <polacek@redhat.com>
1525 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1527 2016-03-31 Marek Polacek <polacek@redhat.com>
1530 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1532 2016-03-18 David Malcolm <dmalcolm@redhat.com>
1535 * c-parser.c (c_parser_postfix_expression): Set the source range
1536 for uses of "__builtin_types_compatible_p".
1538 2016-03-17 Jakub Jelinek <jakub@redhat.com>
1541 * c-typeck.c (composite_type): Don't count void_list_node
1542 into len, if the list is terminated by void_list_node, start
1543 with void_list_node instead of NULL for newargs. Stop
1546 2016-03-16 Marek Polacek <polacek@redhat.com>
1549 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1550 nested functions returning VM types.
1552 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1554 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1555 when calling c_finish_omp_clauses.
1557 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1560 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1563 2016-03-04 Marek Polacek <polacek@redhat.com>
1566 * c-parser.c (c_parser_postfix_expression): Call
1567 c_parser_cast_expression rather than c_parser_postfix_expression.
1569 2016-03-01 Jakub Jelinek <jakub@redhat.com>
1573 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1574 of incomplete decls to error_mark_node.
1576 2016-02-24 Marek Polacek <polacek@redhat.com>
1579 * c-decl.c (finish_decl): Don't update the copy of the type of a
1580 different decl type.
1582 2016-02-23 Jakub Jelinek <jakub@redhat.com>
1585 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1586 in id_kind reclassification.
1588 2016-02-16 Jakub Jelinek <jakub@redhat.com>
1591 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1593 2016-02-16 James Norris <jnorris@codesourcery.com>
1596 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1598 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1600 * c-decl.c (build_null_declspecs): Zero the entire struct.
1603 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1604 callers changed. If nested_p is true, use it to call
1605 finish_implicit_inits.
1606 * c-tree.h (finish_implicit_inits): Declare.
1607 * c-typeck.c (finish_implicit_inits): New function. Move code
1609 (push_init_level): ... here.
1610 (set_designator, process_init_element): Call finish_implicit_inits.
1612 2016-02-11 Jakub Jelinek <jakub@redhat.com>
1615 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1616 arguments for -Waddress warning.
1618 2016-02-04 Jakub Jelinek <jakub@redhat.com>
1621 * c-decl.c (finish_enum): When honoring mode attribute,
1622 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1624 2016-01-29 Jakub Jelinek <jakub@redhat.com>
1627 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1628 all type variants, not just TYPE_MAIN_VARIANT.
1630 2016-01-27 Jakub Jelinek <jakub@redhat.com>
1633 * c-decl.c (c_write_global_declarations_1): Warn with
1634 warn_unused_function if static prototype without definition
1637 2016-01-27 Marek Polacek <polacek@redhat.com>
1640 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1641 to unsigned, if needed. Add -Wsign-compare warning.
1643 2016-01-26 Jakub Jelinek <jakub@redhat.com>
1645 PR tree-optimization/69483
1646 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1648 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1651 * c-tree.h (incomplete_record_decls): Declare.
1652 * c-parser.c (incomplete_record_decls): Define.
1653 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1654 report error if any decl has zero size.
1655 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1656 or enum type to incomplete_record_decls.
1658 2016-01-14 Tom de Vries <tom@codesourcery.com>
1660 PR tree-optimization/68773
1661 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1664 2016-01-14 Marek Polacek <polacek@redhat.com>
1667 * c-decl.c (grokdeclarator): Provide more information for invalid
1670 2016-01-06 David Malcolm <dmalcolm@redhat.com>
1672 * c-parser.c (c_parser_unary_expression): For dereferences, build
1673 a combined location before calling build_indirect_ref, so that
1674 error reports cover the full range, manually updating the c_expr
1677 2016-01-06 Marek Polacek <polacek@redhat.com>
1680 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1681 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1684 2016-01-04 Jakub Jelinek <jakub@redhat.com>
1686 Update copyright years.
1688 2016-01-04 Marek Polacek <polacek@redhat.com>
1691 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1692 optimization to use __atomic_fetch_* built-in if possible.
1694 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1696 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1698 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1701 2015-12-22 Marek Polacek <polacek@redhat.com>
1704 * c-typeck.c (build_component_ref): Warn when acessing elements of
1705 atomic structures or unions.
1707 2015-12-21 David Malcolm <dmalcolm@redhat.com>
1709 * c-typeck.c: Include "gcc-rich-location.h".
1710 (build_binary_op): In the two places that call binary_op_error,
1711 create a gcc_rich_location and populate it with the location of
1712 the binary op and its two operands.
1714 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1716 * c-parser.c (c_parser_statement_after_labels): When calling
1717 c_finish_return, Use the return expression's location if it has
1718 one, falling back to the location of the first token within it.
1719 * c-typeck.c (c_finish_return): When issuing warnings about
1720 the incorrect presence/absence of a return value, issue a note
1721 showing the declaration of the function.
1723 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1725 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1727 (c_parser_peek_nth_token): New function.
1728 (c_parser_peek_conflict_marker): New function.
1729 (c_parser_error): Detect conflict markers and report them as such.
1731 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1733 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1734 to preserve range information for the primary expression
1735 in the call to c_parser_postfix_expression_after_primary.
1737 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1739 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1740 expression location, falling back on the first token location,
1741 rather than always using the latter.
1743 2015-12-16 Marek Polacek <polacek@redhat.com>
1746 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1749 2015-12-15 Marek Polacek <polacek@redhat.com>
1752 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1755 2015-12-08 David Malcolm <dmalcolm@redhat.com>
1757 * c-parser.c (c_parser_alignof_expression): Capture location of
1758 closing parenthesis (if any), or of end of unary expression, and
1759 use it to build a src_range for the expression.
1761 2015-12-08 David Malcolm <dmalcolm@redhat.com>
1764 * c-parser.c (c_parser_get_builtin_args): Add
1765 "out_close_paren_loc" param, and write back to it.
1766 (c_parser_postfix_expression): Capture the closing
1767 parenthesis location for RID_CHOOSE_EXPR,
1768 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1769 RID_BUILTIN_SHUFFLE and use it to set the source range
1770 for such expressions; within RID_BUILTIN_COMPLEX set
1771 the underlying location.
1773 2015-12-07 Marek Polacek <polacek@redhat.com>
1776 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1777 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1779 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1781 * c-tree.h (c_build_va_arg): Adjust prototype.
1782 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1783 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1784 parameter, adjust throughout and issue an error if EXPR is a component
1785 with reverse storage order.
1787 2015-12-02 Jason Merrill <jason@redhat.com>
1789 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1790 (c_fully_fold_internal, decl_constant_value_for_optimization):
1791 Move from c-common.c.
1792 * c-tree.h: Declare decl_constant_value_for_optimization.
1793 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1795 2015-12-02 Joseph Myers <joseph@codesourcery.com>
1798 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1799 following link from declarator to next declarator. Track original
1800 qualified type and pass it to c_build_qualified_type.
1801 * c-typeck.c (c_build_qualified_type): Add arguments
1802 orig_qual_type and orig_qual_indirect.
1804 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1806 * c-parser.c (c_parser_omp_clause_name)
1807 (c_parser_oacc_all_clauses): Alphabetical sorting.
1809 2015-12-02 Jakub Jelinek <jakub@redhat.com>
1812 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1815 2015-12-01 Julian Brown <julian@codesourcery.com>
1816 Cesar Philippidis <cesar@codesourcery.com>
1817 James Norris <James_Norris@mentor.com>
1819 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1820 (c_parser_oacc_clause_use_device): New function.
1821 (c_parser_oacc_all_clauses): Add use_device support.
1822 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1823 (c_parser_oacc_host_data): New function.
1824 (c_parser_omp_construct): Add host_data support.
1825 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1826 * c-typeck.c (c_finish_oacc_host_data): New function.
1827 (c_finish_omp_clauses): Add use_device support.
1829 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
1832 * c-decl.c: Set TYPE_PACKED in variants.
1834 2015-11-27 Martin Liska <mliska@suse.cz>
1837 * c-array-notation.c (fix_builtin_array_notation_fn):
1838 Use release_vec_vec instead of vec::release.
1839 (build_array_notation_expr): Likewise.
1840 (fix_conditional_array_notations_1): Likewise.
1841 (fix_array_notation_expr): Likewise.
1842 (fix_array_notation_call_expr): Likewise.
1844 2015-11-27 Jakub Jelinek <jakub@redhat.com>
1847 * c-parser.c (c_parser_compound_statement_nostart): If
1848 last_label is true, use pragma_stmt instead of pragma_compound
1849 as second c_parser_pragma argument.
1850 (c_parser_omp_ordered, c_parser_omp_target_update,
1851 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1852 false as second argument to c_parser_skip_to_pragma_eol after
1853 diagnosing standalone directives used in pragma_stmt context.
1855 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1857 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1858 with "if (ENABLE_OFFLOADING)".
1860 2015-11-23 David Malcolm <dmalcolm@redhat.com>
1863 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1864 for various Objective-C constructs: Class.name syntax,
1865 @selector(), @protocol(), @encode(), and [] message syntax.
1867 2015-11-20 David Malcolm <dmalcolm@redhat.com>
1870 * c-typeck.c (should_suggest_deref_p): New function.
1871 (build_component_ref): Special-case POINTER_TYPE when
1872 generating a "not a structure of union" error message, and
1873 suggest a "->" rather than a ".", providing a fix-it hint.
1875 2015-11-19 David Malcolm <dmalcolm@redhat.com>
1877 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1878 candidate into a new function, find_closest_identifier.
1880 2015-11-19 Marek Polacek <polacek@redhat.com>
1883 * c-typeck.c (parser_build_binary_op): Properly handle
1884 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1886 2015-11-17 David Malcolm <dmalcolm@redhat.com>
1888 * c-parser.c (set_c_expr_source_range): Bulletproof both
1889 overloaded implementations against NULL expr->value.
1890 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1892 (c_parser_unary_expression): Likewise when handling addresses of
1894 (c_parser_postfix_expression): Likewise for statement expressions,
1895 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1896 __builtin_va_arg, and for __builtin_offset_of.
1897 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1898 src_range using the range of the braced initializer.
1899 (c_parser_transaction_expression): Set src_range for "ret" to a
1900 sane pair of values.
1902 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1904 * c-parser.c (c_finish_omp_declare_simd): Look for
1905 "simd" attribute as well. Update error message.
1907 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1909 * c-parser.c (c_parser_omp_declare_target): Adjust.
1911 2015-11-14 Jakub Jelinek <jakub@redhat.com>
1913 * c-typeck.c (c_finish_omp_clauses): Don't mark
1914 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1916 2015-11-14 Marek Polacek <polacek@redhat.com>
1918 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1919 * c-typeck.c: Likewise.
1921 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1923 * c-decl.c (warn_defaults_to): Pass line_table to
1925 * c-errors.c (pedwarn_c99): Likewise.
1926 (pedwarn_c90): Likewise.
1927 * c-parser.c (set_c_expr_source_range): New functions.
1928 (c_token::get_range): New method.
1929 (c_token::get_finish): New method.
1930 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1931 based on the range from the start of the LHS to the end of the
1933 (c_parser_conditional_expression): Likewise, based on the range
1934 from the start of the cond.value to the end of exp2.value.
1935 (c_parser_binary_expression): Call set_c_expr_source_range on
1936 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1937 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1938 based on the cast_loc through to the end of the expr.
1939 (c_parser_unary_expression): Likewise, based on the
1940 op_loc through to the end of op.
1941 (c_parser_sizeof_expression) Likewise, based on the start of the
1942 sizeof token through to either the closing paren or the end of
1944 (c_parser_postfix_expression): Likewise, using the token range,
1945 or from the open paren through to the close paren for
1946 parenthesized expressions.
1947 (c_parser_postfix_expression_after_primary): Likewise, for
1948 various kinds of expression.
1949 * c-tree.h (struct c_expr): Add field "src_range".
1950 (c_expr::get_start): New method.
1951 (c_expr::get_finish): New method.
1952 (set_c_expr_source_range): New decls.
1953 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1954 on ret for prefix unary ops.
1955 (parser_build_binary_op): Likewise, running from the start of
1956 arg1.value through to the end of arg2.value.
1958 2015-11-13 Marek Polacek <polacek@redhat.com>
1961 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1963 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1965 * c-typeck.c: Include spellcheck.h.
1966 (lookup_field_fuzzy_find_candidates): New function.
1967 (lookup_field_fuzzy): New function.
1968 (build_component_ref): If the field was not found, try using
1969 lookup_field_fuzzy and potentially offer a suggestion.
1971 2015-11-12 James Norris <jnorris@codesourcery.com>
1972 Joseph Myers <joseph@codesourcery.com>
1974 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1975 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1976 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1977 and PRAGMA_OMP_CLAUSE_LINK.
1978 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1979 and PRAGMA_OACC_CLAUSE_LINK.
1980 (OACC_DECLARE_CLAUSE_MASK): New definition.
1981 (c_parser_oacc_declare): New function.
1983 2015-11-12 Marek Polacek <polacek@redhat.com>
1986 * c-parser.c (c_parser_for_statement): Reclassify the token in
1989 2015-11-11 Marek Polacek <polacek@redhat.com>
1993 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1994 checking the size of an array.
1996 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
1998 * c-array-notation.c: Remove unused header files.
1999 * c-aux-info.c: Likewise.
2000 * c-convert.c: Likewise.
2001 * c-decl.c: Likewise.
2002 * c-errors.c: Likewise.
2003 * c-lang.c: Likewise.
2004 * c-objc-common.c: Likewise.
2005 * c-parser.c: Likewise.
2006 * c-typeck.c: Likewise.
2007 * gccspec.c: Likewise.
2009 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2010 Cesar Philippidis <cesar@codesourcery.com>
2011 James Norris <jnorris@codesourcery.com>
2012 Julian Brown <julian@codesourcery.com>
2013 Nathan Sidwell <nathan@codesourcery.com>
2016 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2018 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2019 (c_parser_pragma): Parse 'acc routine'.
2020 (OACC_ROUTINE_CLAUSE_MARK): Define.
2021 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2023 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2026 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2027 location of the backward-goto to the start of the loop body.
2029 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2032 * c-parser.c (c_parser_while_statement): Finish the loop before
2033 parsing ahead for misleading indentation.
2034 (c_parser_for_statement): Likewise.
2036 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2038 * c-decl.c (finish_struct): If the structure has reverse storage
2039 order, rewrite the type of array fields with scalar component. Call
2040 maybe_apply_pragma_scalar_storage_order on entry.
2041 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2042 errors on bit-fields and reverse SSO here and not...
2043 (c_mark_addressable): ...here.
2044 (output_init_element): Adjust call to initializer_constant_valid_p.
2045 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2047 2015-11-06 David Malcolm <dmalcolm@redhat.com>
2049 * c-decl.c (warn_defaults_to): Update for change in signature
2050 of diagnostic_set_info.
2051 * c-errors.c (pedwarn_c99): Likewise.
2052 (pedwarn_c90): Likewise.
2053 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2054 for textinfo::set_location.
2056 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2057 Thomas Schwinge <thomas@codesourcery.com>
2058 James Norris <jnorris@codesourcery.com>
2060 * c-parser.c (c_parser_omp_clause_name): Add support for
2061 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2062 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2063 default(none) in OpenACC.
2064 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2066 (c_parser_oacc_clause_tile): New function.
2067 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2068 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2069 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2071 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2072 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2074 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2075 (c_parser_oacc_update): Update the error message for missing clauses.
2076 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2077 and OMP_CLAUSE_INDEPENDENT.
2079 2015-11-05 Marek Polacek <polacek@redhat.com>
2082 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2083 deal with pre-evaluation on invalid types.
2085 2015-11-05 Jakub Jelinek <jakub@redhat.com>
2086 Ilya Verbin <ilya.verbin@intel.com>
2088 * c-parser.c: Include context.h and gimple-expr.h.
2089 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2090 monotonic together with nonmonotonic.
2091 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2092 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2093 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2094 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2095 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2096 expressions on combined target teams before the target.
2097 (c_parser_omp_declare_target): If decl has "omp declare target" or
2098 "omp declare target link" attribute, and cgraph or varpool node already
2099 exists, then set corresponding flags. Call c_finish_omp_clauses
2100 in the parenthesized extended-list syntax case.
2101 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2103 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2104 on OMP_CLAUSE_REDUCTION array sections.
2105 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2106 into the constant offset, or for variable low-bound using
2107 POINTER_PLUS_EXPR. For structure element based array sections use
2108 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2109 (c_finish_omp_clauses): Drop generic_field_head, structure
2110 elements are now always mapped even as array section bases,
2111 diagnose same var in data sharing and mapping clauses. Diagnose if
2112 linear step on declare simd is neither a constant nor a uniform
2113 parameter. Look through POINTER_PLUS_EXPR for array section
2114 reductions. Diagnose the same var or function appearing multiple
2115 times on the same directive. Fix up wording for the to clause if t
2116 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2117 modifier on kinds other than dynamic or guided or nonmonotonic
2118 modifier together with ordered clause.
2120 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2121 Chung-Lin Tang <cltang@codesourcery.com>
2123 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2125 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
2127 * c-array-notation.c: Reorder #include's and remove duplicates.
2128 * c-aux-info.c: Likewise.
2129 * c-convert.c: Likewise.
2130 * c-decl.c: Likewise.
2131 * c-errors.c: Likewise.
2132 * c-lang.c: Likewise.
2133 * c-objc-common.c: Likewise.
2134 * c-parser.c: Likewise.
2135 * c-typeck.c: Likewise.
2137 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
2140 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2141 after calling build_qualified_type.
2143 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2144 Thomas Schwinge <thomas@codesourcery.com>
2145 James Norris <jnorris@codesourcery.com>
2146 Joseph Myers <joseph@codesourcery.com>
2147 Julian Brown <julian@codesourcery.com>
2148 Bernd Schmidt <bschmidt@redhat.com>
2150 * c-parser.c (c_parser_oacc_shape_clause): New.
2151 (c_parser_oacc_simple_clause): New.
2152 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2153 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2155 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2156 James Norris <jnorris@codesourcery.com>
2157 Cesar Philippidis <cesar@codesourcery.com>
2161 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2162 parameters, and handle these. Adjust all users.
2163 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2165 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2167 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2169 (c_finish_omp_construct): Declare function.
2170 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2171 Merge functions into...
2172 (c_finish_omp_construct): ... this new function.
2174 2015-10-22 Richard Biener <rguenther@suse.de>
2176 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2177 before folding a MINUS_EXPR.
2179 2015-10-21 Marek Polacek <polacek@redhat.com>
2182 * c-decl.c (start_function): Warn about vararg functions without
2185 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2187 * c-typeck.c (build_conditional_expr): Use boolean vector
2188 type for vector comparison.
2189 (build_vec_cmp): New.
2190 (build_binary_op): Use build_vec_cmp for comparison.
2192 2015-10-20 Marek Polacek <polacek@redhat.com>
2194 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2196 2015-10-20 Marek Polacek <polacek@redhat.com>
2199 * c-parser.c (c_parser_attributes): Break out of the loop if the
2200 token after an attribute isn't a comma.
2202 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2203 Aldy Hernandez <aldyh@redhat.com>
2205 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2206 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2207 (c_parser_omp_variable_list): Handle structure elements for
2208 map, to and from clauses. Handle array sections in reduction
2209 clause. Formatting fixes.
2210 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2211 if clause modifiers.
2212 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2213 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2214 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2215 c_parser_omp_clause_is_device_ptr): New functions.
2216 (c_parser_omp_clause_ordered): Parse optional parameter.
2217 (c_parser_omp_clause_reduction): Handle array reductions.
2218 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2219 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2221 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2222 (c_parser_omp_clause_depend_sink): New function.
2223 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2224 (c_parser_omp_clause_map): Parse release/delete map kinds and
2225 optional always modifier.
2226 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2227 and c_finish_omp_clauses callers.
2228 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2229 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2230 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2231 (OMP_CRITICAL_CLAUSE_MASK): Define.
2232 (c_parser_omp_critical): Parse critical clauses.
2233 (c_parser_omp_for_loop): Handle doacross loops, adjust
2234 c_finish_omp_for and c_finish_omp_clauses callers.
2235 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2236 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2237 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2238 (c_parser_omp_for): Disallow ordered clause when combined with
2239 distribute. Disallow linear clause when combined with distribute
2240 and not combined with simd.
2241 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2242 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2243 parse clauses and if depend clause is found, don't parse a body.
2244 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2245 Allow target parallel without for after it.
2246 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2247 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2248 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2250 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2251 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2252 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2253 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2255 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2256 defaultmap and is_device_ptr clauses.
2257 (c_parser_omp_target): Parse target parallel and target simd. Set
2258 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2259 and target exit data. Diagnose invalid map kinds.
2260 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2261 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2263 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2265 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2266 (c_parser_omp_taskloop): New function.
2267 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2268 handle PRAGMA_OMP_TASKLOOP.
2269 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2270 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2271 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2272 Add IS_OMP argument, handle structure element bases, diagnose
2273 bitfields, pass IS_OMP recursively, diagnose known zero length
2274 array sections in depend clauses, handle array sections in reduction
2275 clause, diagnose negative length even for pointers.
2276 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2277 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2278 array sections in reduction clause, set
2279 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2280 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2281 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2282 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2284 2015-10-06 Marek Polacek <polacek@redhat.com>
2286 * c-parser.c (c_parser_statement_after_labels): Use
2287 protected_set_expr_location.
2288 (c_parser_omp_clause_num_gangs): Likewise.
2289 (c_parser_omp_clause_num_threads): Likewise.
2290 (c_parser_omp_clause_num_workers): Likewise.
2291 (c_parser_omp_clause_vector_length): Likewise.
2292 (c_parser_omp_clause_num_teams): Likewise.
2293 (c_parser_omp_clause_thread_limit): Likewise.
2294 * c-typeck.c (build_c_cast): Likewise.
2295 (c_cast_expr): Likewise.
2297 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2299 * c-typeck.c (c_tree_equal): Use real_equal instead of
2302 2015-10-04 Jason Merrill <jason@redhat.com>
2304 * c-parser.c (c_lex_one_token): Handle @synchronized.
2305 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2306 can change whether the function is transaction_safe.
2308 2015-10-02 Marek Polacek <polacek@redhat.com>
2311 * c-typeck.c (convert_for_assignment): Use the expansion point
2312 location throughout.
2314 2015-10-02 Marek Polacek <polacek@redhat.com>
2317 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2318 and pass it down to c_parser_if_statement.
2319 (c_parser_else_body): Add CHAIN parameter and pass it down to
2320 c_parser_statement_after_labels.
2321 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2322 duplicated if-else-if conditions.
2324 2015-10-01 Marek Polacek <polacek@redhat.com>
2326 * c-typeck.c (convert_for_assignment): Improve commentary.
2328 2015-09-30 Marek Polacek <polacek@redhat.com>
2331 * c-typeck.c (c_finish_return): Use the expansion point location for
2332 certain "return with value" warnings.
2334 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2336 * c-parser.c (pragma_lex): Add loc argument.
2338 2015-09-15 Marek Polacek <polacek@redhat.com>
2341 * c-decl.c (tag_exists_p): New function.
2342 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2343 struct/union/enum keywords are missing.
2344 * c-tree.h (tag_exists_p): Declare.
2346 2015-09-15 Marek Polacek <polacek@redhat.com>
2348 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2349 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2350 Return NULL_TREE instead of 0.
2351 (lookup_name): Return NULL_TREE instead of 0.
2352 (lookup_name_in_scope): Likewise.
2353 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2354 (parser_xref_tag): Use false instead of 0.
2355 (start_struct): Use true instead of 1.
2356 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2358 2015-09-14 Marek Polacek <polacek@redhat.com>
2360 * c-typeck.c (set_nonincremental_init_from_string): Use
2361 HOST_WIDE_INT_M1U when shifting a negative value.
2363 2015-09-09 Mark Wielaard <mjw@redhat.com>
2365 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2368 2015-09-10 Jakub Jelinek <jakub@redhat.com>
2371 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2372 into OMP_FOR_PRE_BODY rather than before the loop.
2374 2015-09-09 Jakub Jelinek <jakub@redhat.com>
2377 * c-parser.c (c_parser_oacc_all_clauses,
2378 c_parser_omp_all_clauses): Remove invalid clause from
2379 list of clauses even if parser->error is set.
2382 * c-parser.c (c_parser_omp_clause_aligned,
2383 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2385 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2389 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2390 instead of c_parser_unary_expression. If the result is !lvalue_p,
2391 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2393 2015-09-04 Marek Polacek <polacek@redhat.com>
2396 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2398 2015-09-03 Martin Sebor <msebor@redhat.com>
2401 * c-typeck.c (convert_arguments, parser_build_unary_op,
2402 build_conditional_expr, c_cast_expr, convert_for_assignment,
2403 build_binary_op, _objc_common_truthvalue_conversion): Call
2405 (c_decl_implicit): Define.
2407 2015-09-02 Marek Polacek <polacek@redhat.com>
2410 * c-parser.c (c_parser_enum_specifier): Give a better error for
2413 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2415 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2417 2015-08-12 Marek Polacek <polacek@redhat.com>
2419 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2422 2015-08-03 Marek Polacek <polacek@redhat.com>
2425 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2427 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2429 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2431 * c-parser.c (c_parser_if_body): Take token_indent_info
2432 argument. Call warn_for_misleading_indentation even when the
2433 body is a semicolon. Extract token_indent_infos corresponding
2434 to the guard, body and next tokens. Adjust call to
2435 warn_for_misleading_indentation accordingly.
2436 (c_parser_else_body): Likewise.
2437 (c_parser_if_statement): Likewise.
2438 (c_parser_while_statement): Likewise.
2439 (c_parser_for_statement): Likewise.
2441 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2442 Manuel López-Ibáñez <manu@gcc.gnu.org>
2444 * c-decl.c (get_parm_info): Remove static var. Update warning
2447 2015-07-27 Marek Polacek <polacek@redhat.com>
2451 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2453 2015-07-20 Marek Polacek <polacek@redhat.com>
2456 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2457 (build_binary_op): Warn about left shift overflows.
2459 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
2461 * c-array-notation.c: Adjust includes for flags.h changes.
2462 * c-objc-common.c: Likewise.
2464 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
2466 * c-array-notation.c: Adjust includes.
2467 * c-aux-info.c: Likewise.
2468 * c-convert.c: Likewise.
2469 * c-decl.c: Likewise.
2470 * c-errors.c: Likewise.
2471 * c-lang.c: Likewise.
2472 * c-objc-common.c: Likewise.
2473 * c-parser.c: Likewise.
2474 * c-typeck.c: Likewise.
2476 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2479 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2481 2015-06-29 Marek Polacek <polacek@redhat.com>
2484 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2485 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2486 about -Wswitch-bool here.
2487 (do_case): Update c_add_case_label call.
2488 (c_finish_case): Update c_do_switch_warnings call.
2490 2015-06-27 Marek Polacek <polacek@redhat.com>
2492 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2494 2015-06-26 Marek Polacek <polacek@redhat.com>
2496 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2498 * c-typeck.c (array_to_pointer_conversion): Likewise.
2499 (build_unary_op): Likewise.
2500 (c_finish_return): Likewise.
2502 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
2504 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2505 * c-parser.c: Likewise.
2507 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2509 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2510 instead of pointer_hash.
2511 (detect_field_duplicates): Likewise.
2513 2015-06-25 Marek Polacek <polacek@redhat.com>
2515 * c-array-notation.c: Use VAR_P throughout.
2516 * c-decl.c: Likewise.
2517 * c-objc-common.c: Likewise.
2518 * c-parser.c: Likewise.
2519 * c-typeck.c: Likewise.
2521 2015-06-25 Marek Polacek <polacek@redhat.com>
2523 * c-decl.c: Use is_global_var throughout.
2524 * c-parser.c: Likewise.
2525 * c-typeck.c: Likewise.
2527 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
2529 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2530 * c-aux-info.c: Likewise.
2531 * c-convert.c: Likewise.
2532 * c-decl.c: Likewise.
2533 * c-errors.c: Likewise.
2534 * c-lang.c: Likewise.
2535 * c-objc-common.c: Likewise.
2536 * c-parser.c: Likewise.
2537 * c-typeck.c: Likewise.
2539 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
2542 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2545 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2547 * c-decl.c (pop_scope): Register the main translation unit
2548 through the new debug hook.
2550 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
2552 * c-array-notation.c : Adjust include files.
2553 * c-aux-info.c : Likewise.
2554 * c-convert.c : Likewise.
2555 * c-decl.c : Likewise.
2556 * c-errors.c : Likewise.
2557 * c-lang.c : Likewise.
2558 * c-lang.h : Likewise.
2559 * c-objc-common.c : Likewise.
2560 * c-parser.c : Likewise.
2561 * c-typeck.c : Likewise.
2563 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
2565 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2566 immediately clobber it.
2567 (c_write_global_declarations_1): Remove call to
2568 check_global_declaration_1.
2569 (c_write_global_declarations_2): Remove.
2570 (c_write_final_cleanups): Rename from c_write_global_declarations.
2571 Remove call to finalize_compilation_unit.
2572 Remove calls to debugging hooks.
2573 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2574 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2575 * c-tree.h: Remove c_write_global_declarations.
2577 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
2579 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2580 * c-aux-info.c: Likewise.
2581 * c-convert.c: Likewise.
2582 * c-decl.c: Likewise.
2583 * c-errors.c: Likewise.
2584 * c-lang.c: Likewise.
2585 * c-objc-common.c: Likewise.
2586 * c-parser.c: Likewise.
2587 * c-typeck.c: Likewise.
2589 2015-06-04 Marek Polacek <polacek@redhat.com>
2592 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2595 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2597 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2598 Warn for empty struct.
2599 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2601 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2603 * c-decl.c (start_function): Call plugin before parsing.
2604 (finish_function): Call plugin after parsing.
2606 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2609 * c-decl.c (merge_decls): Merge DECL_COMMON.
2611 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
2613 * Make-lang.in (check_gcc_pallelize): Define.
2615 2015-05-22 Marek Polacek <polacek@redhat.com>
2618 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2621 2015-05-21 Marek Polacek <polacek@redhat.com>
2623 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2626 2015-05-20 Marek Polacek <polacek@redhat.com>
2628 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2629 * c-typeck.c: Likewise.
2631 2015-05-19 Marek Polacek <polacek@redhat.com>
2633 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2635 2015-05-19 Jakub Jelinek <jakub@redhat.com>
2638 * c-parser.c (c_parser_omp_for_loop): Don't add
2639 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2640 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2641 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2644 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2646 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
2649 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2652 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2655 2015-05-14 Marek Polacek <polacek@redhat.com>
2659 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2662 2015-05-12 David Malcolm <dmalcolm@redhat.com>
2664 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2665 to add a call to warn_for_misleading_indentation.
2666 (c_parser_else_body): Likewise, adding param "else_loc".
2667 (c_parser_if_statement): Check for misleading indentation.
2668 (c_parser_while_statement): Likewise.
2669 (c_parser_for_statement): Likewise.
2671 2015-05-08 Marek Polacek <polacek@redhat.com>
2674 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2675 (output_init_element): Likewise.
2677 2015-05-07 Marek Polacek <polacek@redhat.com>
2680 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2683 2015-04-30 Marek Polacek <polacek@redhat.com>
2685 * c-typeck.c (set_init_label): Call error_at instead of error and
2688 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2691 * c-typeck.c (c_build_va_arg): Clarify the error message.
2693 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2695 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2696 OMP_STANDALONE_CLAUSES.
2698 2015-04-28 Marek Polacek <polacek@redhat.com>
2700 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2702 2015-04-28 Marek Polacek <polacek@redhat.com>
2705 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2707 2015-04-25 Marek Polacek <polacek@redhat.com>
2710 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2713 2015-04-23 Marek Polacek <polacek@redhat.com>
2716 * c-decl.c (set_labels_context_r): New function.
2717 (store_parm_decls): Call it via walk_tree_without_duplicates.
2718 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2719 instead of create_tmp_var. Build TARGET_EXPR instead of
2721 (build_atomic_assign): Use create_tmp_var_raw instead of
2722 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2724 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2726 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2727 (c_parser_omp_target_update): Add missed %> to error_at ().
2729 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2732 * c-decl.c (c_default_pointer_mode): Remove definition.
2733 * c-tree.h (c_default_pointer_mode): Remove declaration.
2735 2015-03-27 Tobias Burnus <burnus@net-b.de>
2738 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2740 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2741 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2742 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2744 2015-03-19 Jakub Jelinek <jakub@redhat.com>
2746 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2747 attribute for DECL_EXTERNAL VAR_DECLs.
2749 2015-03-11 Jakub Jelinek <jakub@redhat.com>
2751 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2754 2015-03-10 Jakub Jelinek <jakub@redhat.com>
2757 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2758 before preparing arguments to warn_logical_not_parentheses.
2760 2015-03-09 Jakub Jelinek <jakub@redhat.com>
2763 * c-typeck.c (parser_build_binary_op): Don't warn for
2764 !!x == y or !b == y where b is _Bool.
2766 2015-03-09 Marek Polacek <polacek@redhat.com>
2768 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2769 * c-decl.c (grokdeclarator): Likewise.
2770 * c-typeck.c (build_binary_op): Likewise.
2772 2015-02-27 Marek Polacek <polacek@redhat.com>
2775 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2777 2015-02-14 Marek Polacek <polacek@redhat.com>
2780 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2781 declared through a typedef name.
2783 2015-02-13 Marek Polacek <polacek@redhat.com>
2786 * c-decl.c (grokdeclarator): Print also the type when giving
2787 the error message about array's incomplete element type.
2789 2015-02-11 Jakub Jelinek <jakub@redhat.com>
2792 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2793 check in the POP macro.
2795 2015-02-09 Marek Polacek <polacek@redhat.com>
2798 * c-typeck.c (process_init_element): Don't always wrap
2799 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2800 initializing a range of elements.
2802 2015-02-04 Jakub Jelinek <jakub@redhat.com>
2806 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2808 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
2810 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2811 processing enum declaration.
2813 2015-01-29 Marek Polacek <polacek@redhat.com>
2816 * c-typeck.c (pop_init_level): If constructor_elements has
2817 exactly one element with integer_zerop value, set constructor_zeroinit
2818 to 1. Remove braces around warning_init call.
2820 2015-01-27 Jakub Jelinek <jakub@redhat.com>
2823 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2824 of FUNCTION_DECLs with error_mark_node.
2826 2015-01-26 Jakub Jelinek <jakub@redhat.com>
2829 * c-typeck.c (convert_arguments): Return -1 if there are
2830 error_args, even if we've diagnosed too many arguments.
2832 2015-01-21 Richard Biener <rguenther@suse.de>
2835 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2836 for builtins the user declared correctly.
2838 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2839 Bernd Schmidt <bernds@codesourcery.com>
2840 Cesar Philippidis <cesar@codesourcery.com>
2841 James Norris <jnorris@codesourcery.com>
2842 Jakub Jelinek <jakub@redhat.com>
2843 Ilmir Usmanov <i.usmanov@samsung.com>
2845 * c-parser.c: Include "gomp-constants.h".
2846 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2847 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2848 Use OMP_CLAUSE_SET_MAP_KIND.
2849 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2850 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2851 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2852 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2853 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2854 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2855 "copyout", "create", "delete", "deviceptr", "gang", "host",
2856 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2857 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2858 "present_or_create", "pcreate", "seq", "self", "vector",
2859 "vector_length", "wait", "worker".
2860 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2861 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2862 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2863 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2864 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2865 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2866 (c_parser_oacc_data_clause_deviceptr)
2867 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2868 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2869 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2870 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2871 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2872 (c_parser_oacc_parallel, c_parser_oacc_update)
2873 (c_parser_oacc_wait): New functions.
2874 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2875 (c_finish_oacc_data): New prototypes.
2876 * c-typeck.c: Include "gomp-constants.h".
2877 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2878 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2879 OMP_CLAUSE_SET_MAP_KIND.
2880 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2881 (c_finish_oacc_data): New functions.
2882 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2883 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2884 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2885 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2886 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2887 GOMP_MAP_FORCE_DEVICEPTR.
2889 2015-01-09 Michael Collison <michael.collison@linaro.org>
2891 * c-array-notation.c: Include hash-set.h, machmode.h,
2892 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2893 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2894 * c-aux-info.c: Ditto.
2895 * c-convert.c: Ditto.
2897 * c-errors.c: Ditto.
2898 * c-lang.c: Dittoxs.
2899 * c-objc-common.c: Ditto.
2900 * c-parser.c: Ditto.
2901 * c-typeck.c: Include hash-set.h, machmode.h,
2902 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2903 fold-const.h, wide-int.h, inchash.h, real.h and
2904 fixed-value.h due to flattening of tree.h.
2906 2015-01-07 Marek Polacek <polacek@redhat.com>
2909 * c-typeck.c (process_init_element): Disallow initialization of
2910 a flexible array member with a string constant if the structure
2913 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2916 * c-typeck.c (convert_for_assignment, c_finish_return): For
2917 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2918 types also set in_late_binary_op around convert call.
2919 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2920 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2921 result on expr as last argument to ubsan_instrument_float_cast,
2922 if in_late_binary_op, don't use c_save_expr but save_expr.
2924 Update copyright years.
2926 2015-01-05 Marek Polacek <polacek@redhat.com>
2929 * c-typeck.c (build_array_ref): Pass loc down to
2930 warn_array_subscript_with_type_char.
2932 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
2934 * c-typeck.c: New behavious for pointers to arrays with qualifiers
2935 (common-pointer-type): For pointers to arrays take qualifiers from
2937 (build_conditional_expr): Add warnings for lost qualifiers.
2938 (comp-target-types): Allow pointers to arrays with different qualifiers.
2939 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
2940 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
2941 to PEDWARN_FOR_QUALIFIERS.
2943 2014-12-17 Jakub Jelinek <jakub@redhat.com>
2946 * c-convert.c: Include ubsan.h.
2947 (convert): For real -> integral casts and
2948 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2949 instead instrument the float cast directly.
2951 2014-11-29 Jakub Jelinek <jakub@redhat.com>
2953 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2954 c_finish_stmt_expr): Remove NULL last argument from
2955 create_tmp_var_raw and create_tmp_var calls.
2956 * c-array-notation.c (fix_builtin_array_notation_fn,
2957 build_array_notation_expr, fix_conditional_array_notations_1,
2958 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2960 2014-11-28 Marek Polacek <polacek@redhat.com>
2963 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2964 convert the right operand to integer type.
2966 2014-11-25 Marek Polacek <polacek@redhat.com>
2969 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2970 for inline functions.
2972 2014-11-21 Jakub Jelinek <jakub@redhat.com>
2975 * c-typeck.c (build_array_ref): Adjust
2976 convert_vector_to_pointer_for_subscript caller. If it returns true,
2977 call non_lvalue_loc on the result.
2979 2014-11-11 Richard Biener <rguenther@suse.de>
2981 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2984 2014-11-10 Andi Kleen <ak@linux.intel.com>
2987 * c-parser.c (c_parser_statement_after_labels): Call
2989 (c_parser_if_statement): Dito.
2990 (c_parser_switch_statement): Dito.
2991 (c_parser_while_statement): Dito.
2992 (c_parser_do_statement): Dito.
2993 (c_parser_for_statement): Dito.
2994 * c-typeck.c (c_finish_loop): Dito.
2996 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2998 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2999 OPT_Wshift_count_overflow in the warnings.
3001 2014-10-30 Marek Polacek <polacek@redhat.com>
3003 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3004 print the stripped version as well, if they're not the same.
3006 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3008 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3011 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
3013 * c-decl.c: Adjust include files.
3014 * c-parser.c: Ditto.
3016 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3017 Tom Tromey <tromey@redhat.com>
3019 * c-tree.h (enum c_oracle_request): New.
3020 (c_binding_oracle_function): New typedef.
3021 (c_binding_oracle, c_pushtag, c_bind): Declare.
3022 * c-decl.c (c_binding_oracle): New global.
3023 (I_SYMBOL_CHECKED): New macro.
3024 (i_symbol_binding): New function.
3025 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3026 (I_TAG_CHECKED): New macro.
3027 (i_tag_binding): New function.
3028 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3029 (I_LABEL_CHECKED): New macro.
3030 (i_label_binding): New function.
3031 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3032 (c_print_identifier): Save and restore c_binding_oracle.
3033 (c_pushtag, c_bind): New functions.
3035 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
3037 * c-typeck.c: Adjust include files.
3039 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3042 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3043 initialization here...
3044 (c_initialize_diagnostics): ... but here. Set defaults after
3045 building pretty-printer.
3047 2014-10-23 Marek Polacek <polacek@redhat.com>
3050 * c-decl.c (pop_scope): Don't print warning in external_scope.
3052 2014-10-19 Marek Polacek <polacek@redhat.com>
3055 * c-typeck.c (output_init_element): Allow initializing objects with
3056 static storage duration with compound literals even in C99 and add
3059 2014-10-17 Marek Polacek <polacek@redhat.com>
3062 * c-typeck.c (digest_init): Allow initializing objects with static
3063 storage duration with compound literals even in C99 and add pedwarn
3066 2014-10-17 Marek Polacek <polacek@redhat.com>
3069 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3070 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3071 error multiple times. Print the type.
3073 2014-10-17 Marek Polacek <polacek@redhat.com>
3076 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3079 2014-10-17 Marek Polacek <polacek@redhat.com>
3081 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3082 (start_function): Use OPT_Wimplicit_int instead of 0.
3083 (store_parm_decls_oldstyle): Likewise.
3085 2014-10-17 Alan Modra <amodra@gmail.com>
3088 * c-decl.c (merge_decls): Don't merge section name or tls model
3089 to newdecl symtab node, instead merge to olddecl. Override
3090 existing olddecl section name. Set tls_model for all thread-local
3091 vars, not just OMP thread-private ones. Remove incorrect comment.
3093 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
3095 * c-decl.c: Adjust include files.
3097 2014-10-14 DJ Delorie <dj@redhat.com>
3099 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3100 (c_token_starts_typename): Check all __intN, not just __int128.
3101 (c_token_starts_declspecs): Likewise.
3102 (c_parser_declspecs): Likewise.
3103 (c_parser_attribute_any_word): Likewise.
3104 (c_parser_objc_selector): Likewise.
3105 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3106 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3108 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3110 (finish_declspecs): Likewise.
3112 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3114 * c-parser.c (c_parser_all_labels): New function to replace
3116 (c_parser_statement): Call the new function.
3118 2014-10-09 Marek Polacek <polacek@redhat.com>
3121 * c-typeck.c (pop_init_level): Don't warn about initializing
3124 2014-10-07 Marek Polacek <polacek@redhat.com>
3127 * c-decl.c (header_for_builtin_fn): New function.
3128 (implicitly_declare): Suggest which header to include.
3130 2014-10-07 Marek Polacek <polacek@redhat.com>
3132 * c-convert.c (convert): Use error_operand_p.
3133 * c-typeck.c (require_complete_type): Likewise.
3134 (really_atomic_lvalue): Likewise.
3135 (digest_init): Likewise.
3136 (handle_omp_array_sections_1): Likewise.
3138 2014-10-03 Marek Polacek <polacek@redhat.com>
3141 * c-decl.c (pop_scope): Don't warn about "inline function declared
3142 but never defined" for functions marked with gnu_inline attribute.
3144 2014-09-25 Jakub Jelinek <jakub@redhat.com>
3147 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3148 on low_bound and length.
3150 2014-09-24 Marek Polacek <polacek@redhat.com>
3154 * c-parser.c: Don't define CPP_KEYWORD.
3155 (c_parser_switch_statement): Pass original type to c_finish_case.
3156 * c-tree.h (c_finish_case): Update declaration.
3157 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3158 conditionally to c_do_switch_warnings.
3160 2014-09-03 Marek Polacek <polacek@redhat.com>
3163 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3166 2014-09-02 Jakub Jelinek <jakub@redhat.com>
3167 Balaji V. Iyer <balaji.v.iyer@intel.com>
3168 Igor Zamyatin <igor.zamyatin@intel.com>
3170 * c-parser.c (c_parser_cilk_for): New function.
3171 (c_parser_cilk_grainsize): Likewise.
3172 (c_get_temp_regvar): Likewise.
3173 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3174 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3175 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3176 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3179 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3181 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3182 with using HOST_WIDE_INT without truncation to 'int'
3184 2014-08-22 Marek Polacek <polacek@redhat.com>
3187 * c-typeck.c (parser_build_binary_op): Adjust call to
3188 warn_logical_not_parentheses.
3190 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3193 * c-parser.c (c_parser_array_notation): Check for correct
3194 type of an array added.
3196 2014-08-19 Marek Polacek <polacek@redhat.com>
3199 * c-typeck.c (build_binary_op): If either operand of a comparison
3200 is a boolean expression, call maybe_warn_bool_compare.
3202 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3205 * c-typeck.c (build_c_cast): Do a conversion even when the
3206 TYPE_MAIN_VARIANTs are the same.
3208 2014-08-19 Marek Polacek <polacek@redhat.com>
3210 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3211 pedwarn_c99 instead of pedwarn.
3212 (grokfield): Likewise.
3213 (warn_defaults_to): New function.
3214 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3215 Unconditionally call pedwarn_c99 instead of pedwarn.
3216 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3217 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3218 check flag_isoc11 before.
3219 * c-errors.c (pedwarn_c99): Change the return type to bool.
3220 Handle -Wc99-c11-compat.
3221 * c-parser.c (disable_extension_diagnostics): Handle
3222 warn_c99_c11_compat.
3223 (restore_extension_diagnostics): Likewise.
3224 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3225 instead of pedwarn, don't check flag_isoc11 before.
3226 (c_parser_declspecs): Likewise.
3227 (c_parser_alignas_specifier): Likewise.
3228 (c_parser_alignof_expression): Likewise.
3229 (c_parser_generic_selection): Likewise.
3230 * c-tree.h (pedwarn_c99): Update declaration.
3231 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3234 2014-08-19 Marek Polacek <polacek@redhat.com>
3236 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3238 * c-errors.c: Include "opts.h".
3239 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3240 * c-parser.c (disable_extension_diagnostics): Handle negative value
3241 of warn_c90_c99_compat, too.
3242 (restore_extension_diagnostics): Likewise.
3243 (c_parser_compound_statement_nostart): Pass
3244 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3246 2014-08-12 Marek Polacek <polacek@redhat.com>
3248 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3250 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3252 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3254 2014-08-10 Marek Polacek <polacek@redhat.com>
3257 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3258 Call pedwarn_c90 instead of pedwarn.
3259 (check_bitfield_type_and_width): Likewise.
3260 (declspecs_add_qual): Likewise.
3261 (declspecs_add_type): Likewise.
3262 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3263 Adjust to only call pedwarn_c90.
3264 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3265 pedwarn_c90 instead of pedwarn.
3266 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3267 * c-parser.c (disable_extension_diagnostics): Handle
3268 warn_c90_c99_compat.
3269 (restore_extension_diagnostics): Likewise.
3270 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3271 pedwarn_c90 instead of pedwarn.
3272 (c_parser_initelt): Likewise.
3273 (c_parser_postfix_expression): Likewise.
3274 (c_parser_postfix_expression_after_paren_type): Likewise.
3275 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3276 * c-tree.h: Fix formatting.
3277 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3278 pedwarn_c90 instead of pedwarn.
3280 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3282 * c-typeck.c: Remove include of pointer-set.h.
3284 2014-08-07 Marek Polacek <polacek@redhat.com>
3286 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3288 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3290 * c-typeck.c: Use hash_map instead of pointer_map.
3292 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3294 * c-decl.c: Use hash_set instead of pointer_set.
3296 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3299 * c-array-notation.c (expand_array_notations): Handling
3302 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
3305 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3308 2014-07-30 Tom Tromey <tromey@redhat.com>
3310 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3312 (really_start_incremental_init, push_init_level): Initialize
3314 (pop_init_level): Set global designator_depth.
3315 (process_init_element): Check for designated_init attribute.
3317 2014-07-20 Marek Polacek <polacek@redhat.com>
3320 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3321 (implicitly_declare): Pass location to implicit_decl_warning.
3323 2014-07-14 Jakub Jelinek <jakub@redhat.com>
3326 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3327 If non-NULL, call c_parser_check_literal_zero.
3328 (c_parser_check_literal_zero): New function.
3329 (c_parser_postfix_expression_after_primary): Adjust
3330 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3332 2014-07-06 Marek Polacek <polacek@redhat.com>
3335 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3336 * c-tree.h (C_ARRAY_PARAMETER): Define.
3337 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3340 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
3341 Chen Gang <gang.chen.5i5j@gmail.com>
3343 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3346 2014-07-01 Marek Polacek <polacek@redhat.com>
3348 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3349 instead of 0 to WARN_FOR_ASSIGNMENT.
3351 2014-07-01 Marek Polacek <polacek@redhat.com>
3354 * c-typeck.c (convert_for_assignment): Pass
3355 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3357 2014-06-30 Marek Polacek <polacek@redhat.com>
3359 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3360 has no_sanitize_undefined attribute.
3362 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3365 * c-array-notation.c (fix_builtin_array_notation_fn):
3366 Check for 0 arguments in builtin call. Check that bultin argument is
3368 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3371 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3373 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3374 qualifiers in __auto_type for atomic types.
3375 (c_parser_typeof_specifier): Discard all type qualifiers in
3376 __typeof__ for atomic types.
3378 2014-06-25 Marek Polacek <polacek@redhat.com>
3381 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3382 the return expression to c_finish_return.
3384 2014-06-25 Jakub Jelinek <jakub@redhat.com>
3386 * c-typeck.c (c_finish_omp_clauses): Make sure
3387 OMP_CLAUSE_LINEAR_STEP has correct type.
3389 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3393 2014-06-24 Jakub Jelinek <jakub@redhat.com>
3395 * c-parser.c (c_parser_omp_for_loop): For
3396 #pragma omp parallel for simd move lastprivate clause from parallel
3397 to for rather than simd.
3399 2014-06-23 Marek Polacek <polacek@redhat.com>
3401 * c-typeck.c (parser_build_binary_op): Don't call
3402 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3404 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
3406 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3407 * c-decl.c (merge_decls): Likewise.
3409 2014-06-09 Marek Polacek <polacek@redhat.com>
3412 * c-typeck.c (error_init): Call inform instead of error_at.
3413 (pedwarn_init): Call inform instead of pedwarn.
3414 (warning_init): Call inform instead of warning_at.
3416 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
3418 * c-decl.c (merge_decls): Use set_decl_section_name.
3419 (duplicate_decls): Remove node if it exists.
3421 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3424 * c-typeck.c (push_init_level, process_init_element,
3425 pop_init_level): Correct check for zero initialization, move
3426 missing brace warning to respect zero initialization.
3428 2014-06-05 Marek Polacek <polacek@redhat.com>
3431 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3433 2014-06-05 Marek Polacek <polacek@redhat.com>
3436 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3437 on the left hand side operand of a comparison.
3439 2014-06-05 Marek Polacek <polacek@redhat.com>
3442 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3443 Print note only if the warning was printed.
3445 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3448 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3451 2014-06-03 Marek Polacek <polacek@redhat.com>
3454 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3456 * c-tree.h (c_start_case): Update.
3457 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3458 switch condition has boolean value.
3460 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
3462 * c-decl.c: Include builtins.h.
3463 * c-parser.c: Likewise.
3465 2014-05-27 Marek Polacek <polacek@redhat.com>
3468 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3469 error and warning calls to error_at and warning_at. Pass location of
3470 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3471 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3472 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3474 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3477 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3478 function parameters.
3480 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
3482 * c-decl.c (merge_decls): Preserve symtab node pointers.
3483 (duplicate_decls): Free new decl.
3485 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3487 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3490 * c-parser.c (c_parser_omp_target): Return bool values.
3492 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3494 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3495 num_teams_loc variable to num_thread_limit_loc.
3497 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3499 * c-array-notation.c (expand_array_notations): Use void_node
3500 instead of void_zero_node.
3502 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3504 * c-decl.c (finish_struct): Adjust.
3505 (finish_enum): Likewise.
3507 (record_inline_static): Likewise.
3508 (push_scope): Likewise.
3509 (make_label): Likewise.
3510 (lookup_label_for_goto): Likewise.
3511 (finish_struct): Likewise.
3512 (finish_enum): Likewise.
3513 (store_parm_decls): Likewise.
3514 (c_push_function_context): Likewise.
3515 * c-lang.h: Remove usage of variable_size gty attribute.
3516 * c-parser.c (c_parse_init): Adjust.
3517 (c_parse_file): Likewise.
3519 2014-05-13 Marek Polacek <polacek@redhat.com>
3522 * c-typeck.c (convert_for_assignment): Pass location to
3523 WARN_FOR_ASSIGNMENT instead of input_location.
3525 2014-05-10 Marek Polacek <polacek@redhat.com>
3527 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3528 maybe_warn_string_init.
3529 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3530 maybe_warn_string_init.
3531 * c-tree.h (maybe_warn_string_init): Update declaration.
3532 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3533 Call pedwarn_init with loc instead of with input_location.
3534 (digest_init): Pass init_loc to maybe_warn_string_init.
3535 (pop_init_level): Call pedwarn_init with loc instead of with
3537 (set_init_index): Likewise.
3538 (process_init_element): Likewise.
3540 2014-05-09 Marek Polacek <polacek@redhat.com>
3543 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3544 (c_parser_initelt): Pass location to set_init_label. Pass array index
3545 location to set_init_index.
3546 * c-tree.h (push_init_level): Update declaration.
3547 (pop_init_level): Likewise.
3548 (set_init_index): Likewise.
3549 (set_init_label): Likewise.
3550 * c-typeck.c (error_init): Add location parameter. Call error_at
3552 (digest_init): Pass init_loc to error_init.
3553 (really_start_incremental_init):
3554 (push_init_level): Add location parameter. Pass loc to pop_init_level
3556 (pop_init_level): Likewise.
3557 (set_designator): Add location parameter. Pass loc to pop_init_level,
3558 push_init_level, and error_init.
3559 (set_init_index): Add location parameter. Pass loc to error_init and
3561 (set_init_label): Likewise.
3562 (output_init_element): Pass loc to error_init.
3563 (process_init_element): Pass loc to error_init, pop_init_level,
3564 pedwarn_init, and push_init_level.
3566 2014-05-09 Marek Polacek <polacek@redhat.com>
3569 * c-parser.c (c_parser_attributes): Parse the arguments as an
3570 expression-list if the attribute takes identifier.
3572 2014-05-08 Marek Polacek <polacek@redhat.com>
3575 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3578 2014-05-08 Marek Polacek <polacek@redhat.com>
3581 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3584 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3585 Mike Stump <mikestump@comcast.net>
3586 Richard Sandiford <rdsandiford@googlemail.com>
3588 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3589 (finish_enum): Use wide-int interfaces.
3590 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3591 * c-typeck.c (build_c_cast): Likewise.
3592 (set_nonincremental_init_from_string): Likewise.
3593 (c_tree_equal): Likewise.
3595 2014-05-02 Marek Polacek <polacek@redhat.com>
3598 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3599 Return size_one_node when the type is not complete.
3600 (pointer_diff): Remove comment.
3601 (build_unary_op): Improve error messages.
3603 2014-05-02 Marek Polacek <polacek@redhat.com>
3605 * c-typeck.c (c_finish_return): Separate warning_at calls.
3607 2014-05-02 Marek Polacek <polacek@redhat.com>
3609 * c-tree.h (error_init): Remove declaration.
3610 (pedwarn_init): Likewise.
3611 * c-typeck.c (error_init): Make static and move above.
3612 (pedwarn_init): Likewise.
3613 (warning_init): Move above.
3614 (maybe_warn_string_init): Likewise.
3616 2014-05-01 Jeff Law <law@redhat.com>
3620 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3621 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3624 2014-05-02 Marek Polacek <polacek@redhat.com>
3627 * c-typeck.c (push_init_level): Set constructor_designated to
3628 p->designated for structures.
3630 2014-05-01 Marek Polacek <polacek@redhat.com>
3633 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3634 function-definition has an attribute after the declarator.
3636 2014-05-01 Marek Polacek <polacek@redhat.com>
3639 * c-typeck.c (warning_init): Add location_t parameter. Call
3640 warning_at instead of warning.
3641 (push_init_level): Pass input_location to warning_init.
3642 (add_pending_init): Add location_t parameter. Pass loc to
3644 (set_nonincremental_init): Pass input_location to add_pending_init.
3645 (set_nonincremental_init_from_string): Likewise.
3646 (output_init_element): Pass loc to warning_init and to
3649 2014-05-01 Marek Polacek <polacek@redhat.com>
3652 * c-typeck.c (c_finish_return): Distinguish between label and variable
3653 when warning about returning local address.
3655 2014-05-01 Marek Polacek <polacek@redhat.com>
3658 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3661 2014-05-01 Marek Polacek <polacek@redhat.com>
3664 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3665 instead of 0 to WARN_FOR_QUALIFIERS.
3667 2014-05-01 Marek Polacek <polacek@redhat.com>
3670 * c-typeck.c (default_conversion): Use better location for
3673 2014-04-30 Marek Polacek <polacek@redhat.com>
3675 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3676 also when SANITIZE_FLOAT_DIVIDE is on.
3678 2014-04-30 Marek Polacek <polacek@redhat.com>
3681 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3682 and pedwarn_init. Use loc insted of input_location.
3684 2014-04-30 Marek Polacek <polacek@redhat.com>
3687 * c-typeck.c (build_binary_op): Use location when warning about
3690 2014-04-25 Marek Polacek <polacek@redhat.com>
3693 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3694 always_inline/noinline and hot/cold attributes.
3696 2014-04-25 Marek Polacek <polacek@redhat.com>
3699 * c-parser.c (c_parser_initelt): Pass input_location to
3700 process_init_element.
3701 (c_parser_initval): Pass loc to process_init_element.
3702 * c-tree.h (process_init_element): Adjust declaration.
3703 * c-typeck.c (push_init_level): Pass input_location to
3704 process_init_element.
3705 (pop_init_level): Likewise.
3706 (set_designator): Likewise.
3707 (output_init_element): Add location_t parameter. Pass loc to
3709 (output_pending_init_elements): Pass input_location to
3710 output_init_element.
3711 (process_init_element): Add location_t parameter. Pass loc to
3712 output_init_element.
3714 2014-04-24 Jakub Jelinek <jakub@redhat.com>
3716 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3717 atomic-clause, allow comma in between atomic-clause and
3720 2014-04-22 Jakub Jelinek <jakub@redhat.com>
3723 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3724 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3726 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3729 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3730 create_tmp_var instead build_decl for creating temps.
3731 (build_array_notation_expr): Likewise.
3732 (fix_conditional_array_notations_1): Likewise.
3733 (fix_array_notation_expr): Likewise.
3734 (fix_array_notation_call_expr): Likewise.
3736 2014-03-28 Jakub Jelinek <jakub@redhat.com>
3739 * c-tree.h (c_build_function_call_vec): New prototype.
3740 * c-typeck.c (build_function_call_vec): Don't call
3741 resolve_overloaded_builtin here.
3742 (c_build_function_call_vec): New wrapper function around
3743 build_function_call_vec. Call resolve_overloaded_builtin here.
3744 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3745 Call c_build_function_call_vec instead of build_function_call_vec.
3746 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3747 * c-decl.c (finish_decl): Likewise.
3749 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3752 * c-typeck.c: Use correct format string in cast-qual warning
3754 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3756 * c-decl.c (c_decl_attributes): Use
3757 lang_hooks.types.omp_mappable_type.
3758 * c-typeck.c (c_finish_omp_clauses): Likewise.
3760 2014-03-06 Marek Polacek <polacek@redhat.com>
3763 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3764 of checking tree code.
3766 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3768 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3769 (c_parser_parameter_declaration): Likewise.
3771 2014-02-19 Marek Polacek <polacek@redhat.com>
3774 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3775 Call mark_exp_read on exp.value.
3776 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3777 TREE_ADDRESSABLE on old instead of val.
3778 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3780 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3782 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3783 C_EXPR_APPEND by vec_safe_push.
3784 * c-tree.h (C_EXPR_APPEND): Remove.
3786 2014-01-31 Marek Polacek <polacek@redhat.com>
3789 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3790 build_function_call_vec.
3791 (build_function_call): Likewise.
3792 (build_atomic_assign): Likewise.
3793 (build_function_call_vec): Add arg_loc parameter. Use it.
3794 (convert_arguments): Likewise.
3795 (convert_for_assignment): Rename rhs_loc to expr_loc.
3796 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3797 (c_parser_objc_keywordexpr): Likewise.
3798 (c_parser_postfix_expression_after_primary): Call
3799 build_function_call_vec with expr_loc rather than op_loc.
3800 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3801 build_function_call_vec.
3802 (c_parser_expr_list): Add locations parameter. Fill it with locations
3803 of function arguments.
3804 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3806 2014-01-30 Marek Polacek <polacek@redhat.com>
3809 * c-typeck.c (build_function_call_vec): Use loc parameter.
3810 (convert_arguments): Add location parameter. Use it.
3811 (ep_convert_and_check): Likewise.
3812 (build_atomic_assign): Adjust convert_for_assignment call.
3813 (build_modify_expr): Likewise.
3814 (digest_init): Likewise.
3815 (c_finish_return): Likewise.
3816 (build_conditional_expr): Adjust ep_convert_and_check calls.
3817 (convert_for_assignment): Add rhs_loc parameter. Use it.
3818 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3821 2014-01-30 Richard Biener <rguenther@suse.de>
3824 * c-typeck.c (build_function_call_vec): Do not replace calls
3825 to a function via an incompatible type with a runtime abort.
3827 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3829 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3830 flag_enable_cilkplus with flag_cilkplus.
3831 (c_parser_direct_declarator_inner): Likewise.
3832 (c_parser_attribute_any_word): Likewise.
3833 (c_parser_attributes): Likewise.
3834 (c_parser_compound_statement): Likewise.
3835 (c_parser_statement_after_labels): Likewise.
3836 (c_parser_if_statement): Likewise.
3837 (c_parser_switch_statement): Likewise.
3838 (c_parser_do_statement): Likewise.
3839 (c_parser_for_statement): Likewise.
3840 (c_parser_unary_expression): Likewise.
3841 (c_parser_postfix_expression): Likewise.
3842 (c_parser_postfix_expression_after_primary): Likewise.
3843 (c_parser_postfix_expression_after_primary): Likewise.
3844 (c_parser_omp_clause_name): Likewise.
3845 (c_finish_omp_declare_simd): Likewise.
3846 (c_parser_cilk_verify_simd): Likewise.
3847 * c-typeck.c (build_array_ref): Likewise.
3848 (build_function_call_vec): Likewise.
3849 (convert_arguments): Likewise.
3850 (build_compound_expr): Likewise.
3851 (c_finish_return): Likewise.
3852 (c_finish_if_stmt): Likewise.
3853 (c_finish_loop): Likewise.
3854 (build_binary_op): Likewise.
3856 2014-01-23 Marek Polacek <polacek@redhat.com>
3859 * c-typeck.c (parser_build_binary_op): Use location instead of
3861 (build_binary_op): Pass location to shorten_compare.
3863 2014-01-23 Marek Polacek <polacek@redhat.com>
3866 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3869 2014-01-23 Marek Polacek <polacek@redhat.com>
3872 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3873 of a comma expression.
3874 (emit_side_effect_warnings): Likewise.
3876 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3879 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3880 function to use walk_tree and moved a lot of its functionality to
3881 expand_array_notations.
3882 (expand_array_notations): New function.
3884 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3886 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3887 attribute an attribute without value.
3889 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3892 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3893 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3895 2014-01-22 Marek Polacek <polacek@redhat.com>
3898 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3899 of remove_c_maybe_const_expr on op1 and op2.
3901 2014-01-15 Jakub Jelinek <jakub@redhat.com>
3904 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3905 effects, preevaluate rhs using SAVE_EXPR first.
3907 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3910 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3911 statements with if-elseif statements.
3913 2014-01-06 Marek Polacek <polacek@redhat.com>
3916 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3917 defined bit-field types only in ISO C.
3919 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3921 Update copyright years
3923 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3925 * c-array-notation.c: Use the standard form for the copyright notice.
3927 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3929 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3930 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3931 field in parser is not empty. If not-empty, call the function
3932 c_parser_finish_omp_declare_simd.
3933 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3934 between SIMD-enabled functions and #pragma simd. Added new parameter.
3935 (c_parser_cilk_all_clauses): Modified the usage of the function
3936 c_parser_cilk_clause_vectorlength as mentioned above.
3937 (c_parser_cilk_simd_fn_vector_attrs): New function.
3938 (c_finish_cilk_simd_fn_tokens): Likewise.
3939 (is_cilkplus_vector_p): Likewise.
3940 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3941 "nomask," and "mask" strings in clause name.
3942 (c_parser_omp_all_clauses): Added 3 new case statements:
3943 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3944 PRAGMA_CILK_CLAUSE_NOMASK.
3945 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3946 check for vector attribute and if so call the function
3947 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3948 called the function c_finish_cilk_simd_fn_tokens.
3949 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3950 parser field is non-empty. If so, parse them as you would parse
3951 the omp declare simd pragma.
3952 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3953 Added a check when step is a parameter and flag it as error.
3954 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3955 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3958 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3960 * c-parser.c (c_parser_omp_parallel): Fix description.
3962 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3964 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3965 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3966 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3967 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3969 2013-12-04 Joseph Myers <joseph@codesourcery.com>
3972 * c-parser.c (c_parser_alignas_specifier): Use
3973 c_sizeof_or_alignof_type instead of c_alignof.
3974 (c_parser_alignof_expression): Likewise, with min_alignof
3975 parameter depending on alignof spelling used.
3977 2013-12-04 Marek Polacek <polacek@redhat.com>
3980 * c-decl.c (start_function): Don't warn for missing prototype for
3983 2013-12-03 Marek Polacek <polacek@redhat.com>
3986 * c-decl.c (build_compound_literal): Allow compound literals with
3987 empty initial value.
3989 2013-12-02 Joseph Myers <joseph@codesourcery.com>
3992 * c-typeck.c (build_modify_expr): Diagnose assignment to
3993 expression with array type.
3995 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3998 * c-typeck.c (process_init_element): Do not treat a string as
3999 initializing a whole array when used with a designator for an
4002 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4005 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4006 an inline function following a static declaration.
4008 2013-11-28 Jakub Jelinek <jakub@redhat.com>
4011 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4012 to p_name before calling c_parser_omp_teams instead of after.
4013 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4014 argument. Remove unused p_name variable.
4016 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
4017 Jakub Jelinek <jakub@redhat.com>
4019 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4020 external_scope is NULL.
4022 2013-11-27 Tom de Vries <tom@codesourcery.com>
4023 Marc Glisse <marc.glisse@inria.fr>
4026 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4028 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
4030 * c-typeck.c: Add required include files from gimple.h.
4032 2013-11-22 David Malcolm <dmalcolm@redhat.com>
4034 * c-decl.c (define_label, shadow_tag_warned)
4035 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4036 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4037 (declspecs_add_type): Remove use of in_system_header macro.
4038 * c-parser.c (c_parser_unary_expression): Likewise.
4039 * c-typeck.c (store_init_value, process_init_element)
4040 (c_start_case): Likewise.
4042 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4045 * c-parser.c (c_parser_set_source_position_from_token): Remove
4046 reference to in_system_header from comment.
4048 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4050 * c-decl.c (grokdeclarator): Update comment to refer to
4051 tree_to_[su]hwi rather than tree_low_cst.
4053 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4055 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4056 tree_to_uhwi throughout.
4058 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4060 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4063 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4065 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4068 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
4070 * c-parser.c (c_parser_cilk_simd): New.
4071 (c_parser_cilk_verify_simd): New.
4072 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4073 (c_parser_omp_for_loop): Add case for NE_EXPR.
4074 Set c_break_label for CILK_SIMD.
4075 (c_parser_cilk_clause_vectorlength): New.
4076 (c_parser_cilk_clause_linear): New.
4077 (c_parser_cilk_clause_name): New.
4078 (c_parser_cilk_all_clauses): New.
4079 * c-typeck.c (build_unary_op): Pass location argument to
4081 (build_modify_expr): Same.
4082 (build_asm_expr): Same.
4083 (c_finish_bc_stmt): Error on break/continue in loops.
4085 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
4087 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4089 2013-11-14 Diego Novillo <dnovillo@google.com>
4091 * c-decl.c: Include print-tree.h.
4092 Include stor-layout.h.
4095 Include stringpool.h.
4096 * c-lang.c: Include fold-const.h.
4097 * c-parser.c: Include stringpool.h.
4099 Include stor-layout.h.
4101 Include trans-mem.h.
4102 * c-typeck.c: Include stor-layout.h.
4103 Include trans-mem.h.
4107 2013-11-13 Joseph Myers <joseph@codesourcery.com>
4109 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4110 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4112 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4113 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4115 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4116 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4117 (c_parser_declarator, c_parser_direct_declarator_inner)
4118 (c_parser_parameter_declaration, c_parser_type_name): All callers
4120 (c_parser_declaration_or_fndef): Handle declarations with type
4121 determined from the initializer.
4123 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
4125 * c-typeck.c: Include gimplify.h.
4127 2013-11-12 Joseph Myers <joseph@codesourcery.com>
4129 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4130 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4132 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4133 or _Thread_local as appropriate in diagnostics.
4134 (build_null_declspecs): Initialize ret->thread_gnu_p.
4135 (declspecs_add_scspec): Handle either __thread or _Thread_local
4136 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4137 pedantic. Do not disallow _Thread_local extern and _Thread_local
4140 2013-11-07 Joseph Myers <joseph@codesourcery.com>
4141 Andrew MacLeod <amacleod@redhat.com>
4143 * c-aux-info.c (gen_type): Handle atomic qualifier.
4144 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4145 qualifiers when compating types.
4146 (shadow_tag_warned): Handle atomic_p in declspecs.
4147 (quals_from_declspecs): Likewise.
4148 (start_decl): Use c_type_promotes_to when promoting argument
4150 (grokdeclarator): Handle _Atomic.
4151 (get_parm_info): Diagnose any qualifier on "void" as only
4153 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4154 comparing types. Use c_type_promotes_to when promoting argument
4156 (finish_function): Use c_type_promotes_to when promoting argument
4158 (build_null_declspecs): Handle atomic_p in declspecs.
4159 (declspecs_add_qual): Handle RID_ATOMIC.
4160 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4161 (c_token_starts_declspecs): Handle RID_ATOMIC.
4162 (c_parser_declspecs): Handle atomic type specifiers and
4164 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4165 from types of expressions with atomic type.
4166 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4167 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4168 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4169 (c_parser_statement_after_labels, c_parser_switch_statement)
4170 (c_parser_for_statement, c_parser_expr_no_commas)
4171 (c_parser_conditional_expression, c_parser_binary_expression)
4172 (c_parser_cast_expression, c_parser_unary_expression)
4173 (c_parser_postfix_expression)
4174 (c_parser_postfix_expression_after_primary, c_parser_expression):
4175 Use convert_lvalue_to_rvalue.
4176 (c_parser_expression_conv, c_parser_expr_list): Document
4177 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4178 (c_parser_objc_synchronized_statement): Use
4179 convert_lvalue_to_rvalue.
4180 (c_parser_objc_selector): Handle RID_ATOMIC.
4181 (c_parser_objc_receiver, c_parser_array_notation): Use
4182 convert_lvalue_to_rvalue.
4183 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4184 _Atomic (type-name).
4185 (struct c_declspecs): Add atomic_p field.
4186 (convert_lvalue_to_rvalue): Declare.
4187 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4188 corresponding atomic types.
4189 (qualify_type): Don't add _Atomic qualifiers from second argument.
4190 (comp_target_types): Do not allow _Atomic mismatches.
4191 (type_lists_compatible_p): Do not remove atomic qualifiers when
4193 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4194 (build_atomic_assign): New functions.
4195 (build_unary_op): Use build_atomic_assign for atomic increment and
4197 (build_conditional_expr): Do not treat _Atomic void as a qualified
4199 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4200 (find_anonymous_field_with_type, convert_to_anonymous_field)
4201 (convert_for_assignment): Do not remove atomic qualifiers when
4203 (digest_init): Do not accept initialization of arrays of atomic
4204 elements by string constants.
4205 (build_asm_expr): Use convert_lvalue_to_rvalue.
4206 (build_binary_op): Do not treat _Atomic void as a qualified
4209 2013-11-06 DJ Delorie <dj@redhat.com>
4211 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4212 both explicit and builtin, print the location of the explicit one.
4214 2013-11-05 Tobias Burnus <burnus@net-b.de>
4216 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4217 c_parser_omp_distribute, c_parser_omp_teams,
4218 c_parser_omp_target, c_parser_omp_declare): Handle
4221 2013-11-03 Marek Polacek <polacek@redhat.com>
4223 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4225 2013-11-01 Jakub Jelinek <jakub@redhat.com>
4227 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4228 check_dup_generic at the end, unless remove is true.
4229 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4231 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4233 2013-10-31 Jakub Jelinek <jakub@redhat.com>
4235 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4236 with decl that is not pointer nor array.
4238 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4240 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4241 a spawning function is found.
4242 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4243 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4244 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4245 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4247 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4248 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4250 (c_finish_return): Added a check to reject _Cilk_spawn in return
4252 (build_cilk_spawn): New function.
4253 (build_cilk_sync): Likewise.
4254 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4256 2013-10-27 Tobias Burnus <burnus@net-b.de>
4259 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4260 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4261 (c_parser_statement_after_labels): Update calls.
4263 2013-10-24 Tobias Burnus <burnus@net-b.de>
4266 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4267 Handle PRAGMA_IVDEP.
4268 (c_parser_statement_after_labels): Update call.
4270 2013-10-24 Marek Polacek <polacek@redhat.com>
4272 * c-parser.c (c_parser_struct_declaration): Add a comment.
4273 (c_parser_declarator): Don't allow _Alignas here.
4275 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
4277 * c-parser.c: Include omp-low.h.
4278 * c-typeck.c: Likewise.
4280 2013-10-17 Marek Polacek <polacek@redhat.com>
4283 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4284 Document syntax of the array-declarator.
4285 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4287 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4288 (c_parser_struct_declaration): Likewise.
4289 (c_parser_declarator): Likewise.
4290 (c_parser_direct_declarator_inner): Likewise.
4291 (c_parser_parameter_declaration): Likewise.
4292 (c_parser_type_name): Likewise.
4294 2013-10-11 Jakub Jelinek <jakub@redhat.com>
4296 * c-lang.h (current_omp_declare_target_attribute): New extern
4298 * c-parser.c: Include c-lang.h.
4299 (struct c_parser): Change tokens to c_token *.
4300 Add tokens_buf field. Change tokens_avail type to unsigned int.
4301 (c_parser_consume_token): If parser->tokens isn't
4302 &parser->tokens_buf[0], increment parser->tokens.
4303 (c_parser_consume_pragma): Likewise.
4304 (enum pragma_context): Add pragma_struct and pragma_param.
4305 (c_parser_external_declaration): Adjust
4306 c_parser_declaration_or_fndef caller.
4307 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4308 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4309 Adjust recursive call.
4310 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4312 (c_parser_parameter_declaration): Use pragma_param instead of
4314 (c_parser_compound_statement_nostart, c_parser_label,
4315 c_parser_for_statement): Adjust
4316 c_parser_declaration_or_fndef callers.
4317 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4318 it through to c_parser_conditional_expression.
4319 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4320 pass it through to c_parser_binary_expression. Adjust recursive
4322 (c_parser_binary_expression): Remove prec argument, add
4323 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4324 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4325 binop matches it, use build2 instead of parser_build_binary_op.
4326 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4327 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4328 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4329 Handle pragma_struct and pragma_param the same as pragma_external.
4330 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4331 (c_parser_omp_variable_list): Parse array sections for
4332 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4333 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4334 (c_parser_omp_clause_reduction): Handle user defined reductions.
4335 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4336 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4337 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4338 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4339 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4340 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4341 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4342 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4343 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4344 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4345 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4346 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4347 (c_parser_omp_for_loop): Add CODE argument, pass it through
4348 to c_finish_omp_for. Change last argument to cclauses,
4349 and adjust uses to grab parallel clauses from the array of all
4350 the split clauses. Adjust c_parser_binary_expression,
4351 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4352 (omp_split_clauses): New function.
4353 (c_parser_omp_simd): New function.
4354 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4355 Allow the function to be called also when parsing combined constructs,
4356 and call c_parser_omp_simd when parsing for simd.
4357 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4358 #pragma omp section, require exactly one structured-block instead of
4359 sequence of statements.
4360 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4361 Allow the function to be called also when parsing combined constructs.
4362 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4363 Allow the function to be called also when parsing combined
4365 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4366 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4367 c_parser_omp_teams, c_parser_omp_target_data,
4368 c_parser_omp_target_update, c_parser_omp_target,
4369 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4370 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4371 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4372 (c_parser_omp_construct): Add p_name and mask vars. Handle
4373 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4374 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4375 and c_parser_omp_sections callers.
4376 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4377 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4378 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4379 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4380 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4382 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4383 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4384 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4385 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4386 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4387 * c-typeck.c: Include tree-inline.h.
4388 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4389 handle_omp_array_sections_1, handle_omp_array_sections,
4390 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4391 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4392 user defined reductions.
4393 (c_tree_equal): New function.
4394 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4395 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4396 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4397 c_check_omp_declare_reduction_r): New prototypes.
4398 * c-decl.c (current_omp_declare_target_attribute): New variable.
4399 (c_decl_attributes): New function.
4400 (start_decl, start_function): Use it instead of decl_attributes.
4401 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4402 c_omp_reduction_decl, c_omp_reduction_lookup,
4403 c_check_omp_declare_reduction_r): New functions.
4405 2013-09-25 Tom Tromey <tromey@redhat.com>
4407 * Make-lang.in (c/gccspec.o): Remove.
4408 (CFLAGS-c/gccspec.o): New variable.
4409 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4410 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4411 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4413 2013-09-25 Tom Tromey <tromey@redhat.com>
4415 * Make-lang.in (c/gccspec.o): Don't use subshell.
4417 2013-09-18 Marek Polacek <polacek@redhat.com>
4420 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4421 Remove unnecessary check.
4423 2013-09-18 Marek Polacek <polacek@redhat.com>
4426 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4427 no_sanitize_undefined attribute.
4429 2013-09-13 Kai Tietz <ktietz@redhat.com>
4432 * c-decl.c (c_builtin_function_ext_scope): Remove
4433 wrong assumption that it is never called on prexisting
4436 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4438 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4440 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4442 * c-objc-common.c (c_tree_printer): Tidy.
4444 2013-08-30 Marek Polacek <polacek@redhat.com>
4446 * c-typeck.c (build_binary_op): Add division by zero and shift
4449 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
4450 Joseph Myers <joseph@codesourcery.com>
4453 * c-typeck.c (c_common_type): Prefer double_type_node over
4454 other REAL_TYPE types with the same precision.
4455 (convert_arguments): Likewise.
4457 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4459 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4460 (c_initialize_diagnostics): Call a destructor for the early printer.
4462 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4464 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4465 printer initialization.
4467 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
4470 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4471 check for truth values.
4472 (expand_array_notation_exprs): Added truth values case. Removed an
4473 unwanted else. Added for-loop to walk through subtrees in default
4476 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4478 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4480 2013-07-23 Joseph Myers <joseph@codesourcery.com>
4482 * c-parser.c (struct c_generic_association): Fix typo.
4484 2013-07-23 Tom Tromey <tromey@redhat.com>
4485 Joseph Myers <joseph@codesourcery.com>
4487 * c-parser.c (struct c_generic_association): New.
4488 (c_generic_association_d): New typedef.
4489 (c_parser_generic_selection): New function.
4490 (c_parser_postfix_expression): Handle RID_GENERIC.
4492 2013-07-13 Jason Merrill <jason@redhat.com>
4495 * c-decl.c (finish_struct): Check for too-large class.
4497 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
4500 * c-typeck.c (set_init_index): When folding, check for index overflow.
4502 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4504 * c-parser.c (c_parser_array_notation): Removed rejection of array
4505 notations in an array of function pointers.
4507 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4509 * c-array-notation.c (make_triplet_val_inv): New function.
4510 (create_cmp_incr): Likewise.
4511 (create_array_refs): Likewise.
4512 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4513 Also modularized common parts between functions and called the function.
4514 (build_array_notation_expr): Likewise.
4515 (fix_conditional_array_notations_1): Likewise.
4516 (fix_array_notation_expr): Likewise.
4517 (fix_array_notation_call_expr): Likewise.
4519 2013-06-18 Marek Polacek <polacek@redhat.com>
4522 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4524 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4526 * c-array-notation.c (build_array_notation_expr): Reject array notation
4527 mismatch between LHS and RHS even inside a call_expr. Also, removed
4528 a couple while statements that were dead code.
4530 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4532 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4533 excessive precision expressions in function parameters. Also removed
4534 couple unwanted while statements.
4536 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4538 * c-array-notation.c (expand_array_notation_exprs): Added
4539 ARRAY_NOTATION_REF case.
4541 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4543 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4544 function to c-family/array-notation-common.c.
4545 (is_cilkplus_reduce_builtin): Likewise.
4546 (find_rank): Likewise.
4547 (extract_array_notation_exprs): Likewise.
4548 (replace_array_notations): Likewise.
4549 (find_inv_trees): Likewise.
4550 (replace_inv_trees): Likewise.
4551 (contains_array_notation_expr): Likewise.
4552 (find_correct_array_notation_type): Likewise.
4553 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4554 (struct inv_list): Moved this to c-family/array-notation-common.c.
4555 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4557 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4559 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4560 reduction functions outside the for-loop. Added a check if the fundecl
4561 is non-NULL. Finally, removed an unwanted if-statement, and made the
4564 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4566 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4567 condition of the if-statement matches the rank of else-block and then-
4568 block when array notations are used.
4569 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4570 expression after the entire function body is parsed.
4571 (c_parser_expr_no_commas): Delayed creating array notation expressions
4572 to the end of function parsing.
4573 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4574 whole if-statement instead of just the condition.
4575 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4577 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4580 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4581 array to NULL_TREE if they are unused. Also added a check for the
4582 field to be NULL before its fields are used in future.
4584 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4587 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4588 (build_array_notation_expr): Likewise.
4590 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4592 * c-typeck.c (build_array_ref): Added a check to see if array's
4593 index is greater than one. If true, then emit an error.
4594 (build_function_call_vec): Exclude error reporting and checking
4595 for builtin array-notation functions.
4596 (convert_arguments): Likewise.
4597 (c_finish_return): Added a check for array notations as a return
4598 expression. If true, then emit an error.
4599 (c_finish_loop): Added a check for array notations in a loop
4600 condition. If true then emit an error.
4601 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4602 (build_binary_op): Added a check for array notation expr inside
4603 op1 and op0. If present, we call another function to find correct
4605 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4606 * c-parser.c (c_parser_compound_statement): Check if array
4607 notation code is used in tree, if so, then transform them into
4609 (c_parser_expr_no_commas): Check if array notation is used in LHS
4610 or RHS, if so, then build array notation expression instead of
4612 (c_parser_postfix_expression_after_primary): Added a check for
4613 colon(s) after square braces, if so then handle it like an array
4614 notation. Also, break up array notations in unary op if found.
4615 (c_parser_direct_declarator_inner): Added a check for array
4617 (c_parser_compound_statement): Added a check for array notation in
4618 a stmt. If one is present, then expand array notation expr.
4619 (c_parser_if_statement): Likewise.
4620 (c_parser_switch_statement): Added a check for array notations in
4621 a switch statement's condition. If true, then output an error.
4622 (c_parser_while_statement): Similarly, but for a while.
4623 (c_parser_do_statement): Similarly, but for a do-while.
4624 (c_parser_for_statement): Similarly, but for a for-loop.
4625 (c_parser_unary_expression): Check if array notation is used in a
4626 pre-increment or pre-decrement expression. If true, then expand
4628 (c_parser_array_notation): New function.
4629 * c-array-notation.c: New file.
4630 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4632 2013-05-23 Mike Stump <mikestump@comcast.net>
4634 * c-typeck.c (convert_for_assignment): Handle references to memory
4637 2013-05-16 Jason Merrill <jason@redhat.com>
4639 * Make-lang.in (cc1$(exeext)): Use link mutex.
4641 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4643 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4644 to simply use OPT_Wpointer_arith.
4645 (build_unary_op): Likewise.
4647 2013-04-03 Jakub Jelinek <jakub@redhat.com>
4650 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4651 argument. If set, or it temporarily for parsing of the first
4652 argument into force_folding_builtin_constant_p.
4653 (c_parser_postfix_expression): Adjust callers.
4655 2013-03-21 Richard Biener <rguenther@suse.de>
4657 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4658 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4660 2013-02-12 Marek Polacek <polacek@redhat.com>
4663 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4666 2013-01-24 Jakub Jelinek <jakub@redhat.com>
4669 * c-typeck.c (set_nonincremental_init_from_string): If
4670 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4672 (process_init_element): Likewise.
4674 2012-12-20 Jakub Jelinek <jakub@redhat.com>
4677 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4678 argument, don't call default_function_array_conversion
4679 nor c_fully_fold here.
4680 (c_parser_asm_statement): Adjust callers.
4681 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4682 and outputs here, and call default_function_array_conversion
4683 on inputs that don't need to be addressable.
4685 2012-12-18 Jakub Jelinek <jakub@redhat.com>
4688 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4689 warning require that both c_common_unsigned_type as well as
4690 c_common_signed_type is the same for both mvl and mvr types.
4692 2012-11-16 Diego Novillo <dnovillo@google.com>
4694 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4696 * c-common.c: Use new vec API in vec.h.
4697 * c-common.h: Likewise.
4698 * c-gimplify.c: Likewise.
4699 * c-pragma.c: Likewise.
4700 * c-pretty-print.c: Likewise.
4701 * c-pretty-print.h: Likewise.
4702 * c-semantics.c: Likewise.
4703 * c-decl.c: Likewise.
4704 * c-parser.c: Likewise.
4705 * c-tree.h: Likewise.
4706 * c-typeck.c: Likewise.
4708 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4711 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4713 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4716 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4717 shadows a function, unless the variable is a function or a
4718 pointer-to-function.
4720 2012-10-12 Jakub Jelinek <jakub@redhat.com>
4723 * c-parser.c (struct c_tree_loc_pair): Removed.
4724 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4725 add location_t * and tree * arguments, fill in array of 3
4726 sizeof_arg trees and corresponding locs.
4727 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4728 c_parser_expr_list callers.
4729 (c_parser_postfix_expression_after_primary): Likewise. Pass
4730 array of 3 sizeof_arg trees and locs (corresponding to first
4731 3 arguments) to sizeof_pointer_memaccess_warning.
4733 2012-10-09 Lawrence Crowl <crowl@google.com>
4735 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4736 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4739 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4742 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4745 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
4748 * c-typeck.c: Include c-common.h.
4749 (enum stv_conv): Moved to c-common.h.
4750 (scalar_to_vector): Moved to c-common.c.
4751 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4752 * Make-lang.in: c-typeck.c depends on c-common.h.
4754 2012-10-04 Arnaud Charlet <charlet@adacore.com>
4756 * c-decl.c (c_write_global_declarations): Fix handling of
4759 2012-09-30 Sharad Singhai <singhai@google.com>
4761 * c-decl.c (c_write_global_declarations): Use a different method
4762 to determine if the dump has ben initialized.
4764 2012-09-14 Joseph Myers <joseph@codesourcery.com>
4767 * c-typeck.c (c_cast_expr): When casting to a type requiring
4768 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4771 2012-09-14 Joseph Myers <joseph@codesourcery.com>
4774 * c-typeck.c (build_unary_op): Pass original argument of
4775 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4776 any C_MAYBE_CONST_EXPR, if it has integer operands.
4777 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4778 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4779 to c_objc_common_truthvalue_conversion, then remove any
4780 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4781 c_objc_common_truthvalue_conversion not
4782 c_common_truthvalue_conversion.
4783 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4784 call note_integer_operands for arguments with integer operands
4785 that are not integer constants.
4787 2012-09-13 Jakub Jelinek <jakub@redhat.com>
4790 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4791 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4793 2012-08-31 Jakub Jelinek <jakub@redhat.com>
4796 * c-convert.c (convert): Don't call fold_convert_loc if
4797 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4798 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4799 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4801 2012-08-24 Jakub Jelinek <jakub@redhat.com>
4804 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4805 for nested and empty_ok arguments in the call to
4806 c_parser_declaration_or_fndef.
4808 2012-08-17 Jakub Jelinek <jakub@redhat.com>
4810 * c-tree.h (c_last_sizeof_arg): Declare.
4811 * c-parser.c (struct c_tree_loc_pair): New type.
4812 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4814 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4815 (c_parser_postfix_expression_after_primary): Likewise. Call
4816 sizeof_pointer_memaccess_warning if needed.
4817 (sizeof_ptr_memacc_comptypes): New function.
4818 * c-typeck.c (c_last_sizeof_arg): New global variable.
4819 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4821 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
4823 * c-lang.h (lang_decl): Add variable_size GTY option.
4825 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4827 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4828 * Make-lang.in: Fix dependencies.
4830 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4832 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4833 and add language Makefile hooks.
4834 * config-lang.in: New file.
4835 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4836 add the required "normal" config-lang.in rules.
4837 * c-lang.h: Moved from gcc/ to here.
4838 * c-tree.h: Likewise.
4839 * c-objc-common.c: Likewise.
4840 * c-objc-common.h: Likewise.
4841 * c-typeck.c: Likewise.
4842 * c-convert.c: Likewise.
4843 * c-lang.c: Likewise.
4844 * c-aux-info.c: Likewise.
4845 * c-errors.c: Likewise.
4846 * gccspec.c: Likewise.
4847 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4848 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4850 Copyright (C) 2012-2017 Free Software Foundation, Inc.
4852 Copying and distribution of this file, with or without modification,
4853 are permitted in any medium without royalty provided the copyright
4854 notice and this notice are preserved.