]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR target/81481 (Spills %xmm to stack in glibc strspn SSE 4.2 variant)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
2a389958
JJ
12017-09-29 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/82340
4 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
5 instead of trying to set just TREE_READONLY manually.
6
ebc6a85e
TV
72017-09-16 Tom de Vries <tom@codesourcery.com>
8
9 PR c/81875
10 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
11 cond itself.
12
bb75facd
JM
132017-09-15 Joseph Myers <joseph@codesourcery.com>
14
15 PR c/82071
16 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
17 for C11.
18 (build_conditional_expr): For C11, generate result with excess
19 precision when one argument is an integer and the other is of a
20 type using excess precision.
21
1d933576
BE
222017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
23
24 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
25
267bbb6f
MP
262017-09-13 Marek Polacek <polacek@redhat.com>
27
28 PR c/82167
29 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
30 than expr.original_type.
31
6836632e
NS
322017-09-12 Nathan Sidwell <nathan@acm.org>
33
34 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
35 resort_sorted_fields): Moved from c-family/c-common.c.
36 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
37
e035be33
JM
382017-09-01 Joseph Myers <joseph@codesourcery.com>
39
40 PR c/82071
41 * c-typeck.c (build_atomic_assign): Handle argument with excess
42 precision. Ensure any EXCESS_PRECISION_EXPR is present in
43 argument passed to build_binary_op and convert_for_assignment but
44 not for call to c_fully_fold.
45 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
46 Ensure build_binary_op is called with argument with original
47 semantic type. Avoid calling c_fully_fold with an
48 EXCESS_PRECISION_EXPR from build_binary_op.
49
d2e05fcb
JJ
502017-09-01 Jakub Jelinek <jakub@redhat.com>
51
52 PR c/81887
53 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
54
b397965c
RS
552017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
56 Alan Hayward <alan.hayward@arm.com>
57 David Sherwood <david.sherwood@arm.com>
58
59 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
60 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
61 m1 and m2 to the signed equivalent of a fixed-point
62 SCALAR_TYPE_MODE.
63
14e18d71
DM
642017-08-24 David Malcolm <dmalcolm@redhat.com>
65
66 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
67 than CAN_HAVE_LOCATION_P when determining whether to use the
68 location_t value within "value".
69
7f204c0f
DM
702017-08-21 David Malcolm <dmalcolm@redhat.com>
71
72 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
73 rather than peeking the location of the first token.
74 * c-tree.h (c_expr::get_location): New method.
75
2f687306
DM
762017-08-21 David Malcolm <dmalcolm@redhat.com>
77
78 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
79 to check_function_arguments.
80
3e7b80d7
MP
812017-08-18 Marek Polacek <polacek@redhat.com>
82
83 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
84 commentary.
85
00aa1fa2
L
862017-08-18 H.J. Lu <hongjiu.lu@intel.com>
87
88 PR c/53037
89 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
90 (check_bitfield_type_and_width): Don't allow bit-field with
91 warn_if_not_aligned type.
92
da67acb9
MS
932017-08-14 Martin Sebor <msebor@redhat.com>
94
95 PR c/81117
96 * c-objc-common.c (c_objc_common_init): Handle 'G'.
97
bb85aa74
MP
982017-08-11 Marek Polacek <polacek@redhat.com>
99
100 PR c/81795
101 * c-decl.c (pushtag): Only print inform if the warning was printed.
102 (grokdeclarator): Likewise.
103
32129a17
DM
1042017-08-10 David Malcolm <dmalcolm@redhat.com>
105
106 * c-parser.c (c_parser_error): Rename to...
107 (c_parser_error_richloc): ...this, making static, and adding
108 "richloc" parameter, passing it to the c_parse_error call,
109 rather than calling c_parser_set_source_position_from_token.
110 (c_parser_error): Reintroduce, reimplementing in terms of the
111 above, converting return type from void to bool.
112 (class token_pair): New class.
113 (struct matching_paren_traits): New struct.
114 (matching_parens): New typedef.
115 (struct matching_brace_traits): New struct.
116 (matching_braces): New typedef.
117 (get_matching_symbol): New function.
118 (c_parser_require): Add param MATCHING_LOCATION, using it to
119 highlight matching "opening" tokens for missing "closing" tokens.
120 (c_parser_skip_until_found): Likewise.
121 (c_parser_static_assert_declaration_no_semi): Convert explicit
122 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
123 class matching_parens, so that the pertinent open parenthesis is
124 highlighted when there are problems locating the close
125 parenthesis.
126 (c_parser_struct_or_union_specifier): Likewise.
127 (c_parser_typeof_specifier): Likewise.
128 (c_parser_alignas_specifier): Likewise.
129 (c_parser_simple_asm_expr): Likewise.
130 (c_parser_braced_init): Likewise, for matching_braces.
131 (c_parser_paren_condition): Likewise, for matching_parens.
132 (c_parser_switch_statement): Likewise.
133 (c_parser_for_statement): Likewise.
134 (c_parser_asm_statement): Likewise.
135 (c_parser_asm_operands): Likewise.
136 (c_parser_cast_expression): Likewise.
137 (c_parser_sizeof_expression): Likewise.
138 (c_parser_alignof_expression): Likewise.
139 (c_parser_generic_selection): Likewise.
140 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
141 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
142 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
143 In case CPP_OPEN_PAREN, pass loc_open_paren to the
144 c_parser_skip_until_found call.
145 (c_parser_objc_class_definition): Use class matching_parens as
146 above.
147 (c_parser_objc_method_decl): Likewise.
148 (c_parser_objc_try_catch_finally_statement): Likewise.
149 (c_parser_objc_synchronized_statement): Likewise.
150 (c_parser_objc_at_property_declaration): Likewise.
151 (c_parser_oacc_wait_list): Likewise.
152 (c_parser_omp_var_list_parens): Likewise.
153 (c_parser_omp_clause_collapse): Likewise.
154 (c_parser_omp_clause_default): Likewise.
155 (c_parser_omp_clause_if): Likewise.
156 (c_parser_omp_clause_num_threads): Likewise.
157 (c_parser_omp_clause_num_tasks): Likewise.
158 (c_parser_omp_clause_grainsize): Likewise.
159 (c_parser_omp_clause_priority): Likewise.
160 (c_parser_omp_clause_hint): Likewise.
161 (c_parser_omp_clause_defaultmap): Likewise.
162 (c_parser_oacc_single_int_clause): Likewise.
163 (c_parser_omp_clause_ordered): Likewise.
164 (c_parser_omp_clause_reduction): Likewise.
165 (c_parser_omp_clause_schedule): Likewise.
166 (c_parser_omp_clause_num_teams): Likewise.
167 (c_parser_omp_clause_thread_limit): Likewise.
168 (c_parser_omp_clause_aligned): Likewise.
169 (c_parser_omp_clause_linear): Likewise.
170 (c_parser_omp_clause_safelen): Likewise.
171 (c_parser_omp_clause_simdlen): Likewise.
172 (c_parser_omp_clause_depend): Likewise.
173 (c_parser_omp_clause_map): Likewise.
174 (c_parser_omp_clause_device): Likewise.
175 (c_parser_omp_clause_dist_schedule): Likewise.
176 (c_parser_omp_clause_proc_bind): Likewise.
177 (c_parser_omp_clause_uniform): Likewise.
178 (c_parser_omp_for_loop): Likewise.
179 (c_parser_cilk_clause_vectorlength): Likewise.
180 (c_parser_cilk_clause_linear): Likewise.
181 (c_parser_transaction_expression): Likewise.
182 * c-parser.h (c_parser_require): Add param matching_location with
183 default UNKNOWN_LOCATION.
184 (c_parser_error): Convert return type from void to bool.
185 (c_parser_skip_until_found): Add param matching_location with
186 default UNKNOWN_LOCATION.
187
30af3a2b
MP
1882017-08-09 Marek Polacek <polacek@redhat.com>
189
190 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
191 * c-tree.h (build_external_ref): Update declaration.
192 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
193 (build_external_ref): Change the type of a parameter to bool.
194 (parser_build_binary_op): Use true/false instead of 1/0.
195 (pointer_diff): Likewise.
196 (build_modify_expr): Likewise.
197 (set_designator): Change the type of a parameter to bool.
198 (set_init_index): Use true/false instead of 1/0.
199 (set_init_label): Likewise.
200 (output_init_element): Change the type of a parameter to bool.
201 (output_pending_init_elements): Use true/false instead of 1/0.
202 (process_init_element): Likewise.
203 (build_binary_op): Change the type of a parameter to bool.
204
296c53ac
MP
2052017-08-09 Marek Polacek <polacek@redhat.com>
206
207 PR c/81233
208 * c-typeck.c (pedwarn_init): Make the function take a variable list.
209 Call emit_diagnostic_valist instead of pedwarn.
210 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
211 Print the relevant types in diagnostics.
212
a32c8316
MP
2132017-08-09 Marek Polacek <polacek@redhat.com>
214
215 PR c/81417
216 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
217 build_conditional_expr.
218 * c-parser.c (c_parser_conditional_expression): Create locations for
219 EXP1 and EXP2 from their source ranges. Pass the locations down to
220 build_conditional_expr.
221 * c-tree.h (build_conditional_expr): Update declaration.
222 * c-typeck.c (build_conditional_expr): Add location_t parameters.
223 For -Wsign-compare, also print the types.
224
314e6352
ML
2252017-08-08 Martin Liska <mliska@suse.cz>
226
227 * c-convert.c: Include header files.
228 * c-typeck.c: Likewise.
229
577eec56
ML
2302017-08-07 Martin Liska <mliska@suse.cz>
231
232 * c-parser.c (c_parser_attributes): Canonicalize name of an
233 attribute.
234
f7b6353a
MP
2352017-08-02 Marek Polacek <polacek@redhat.com>
236
237 PR c/81289
238 * c-parser.c (c_parser_unary_expression): Use set_error.
239
8a6eab34
MP
240 PR c/81448
241 PR c/81306
242 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
243 warnings. Avoid walking MACRO_MAP_LOCATIONS.
244
7fef86d3
JH
2452017-07-31 Jan Hubicka <hubicka@ucw.cz>
246 Martin Liska <mliska@suse.cz>
247
248 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 249 statement.
7fef86d3 250
f34ebeb2
ML
2512017-07-31 Martin Liska <mliska@suse.cz>
252
253 PR sanitize/81530
254 * c-convert.c (convert): Guard condition with flag_sanitize_p
255 also with current_function_decl non-null equality.
256 * c-decl.c (grokdeclarator): Likewise.
257 * c-typeck.c (build_binary_op): Likewise.
258
8595f67b
MP
2592017-07-25 Marek Polacek <polacek@redhat.com>
260
261 * c-decl.c (grokfield): Remove local variable.
262
d49718d6
MP
2632017-07-25 Marek Polacek <polacek@redhat.com>
264
265 PR c/81364
266 * c-parser.c (c_parser_else_body): Don't warn about multistatement
267 macro expansion if the body is in { }.
268 (c_parser_while_statement): Likewise.
269 (c_parser_for_statement): Likewise.
270
ff22eb12
NS
2712017-07-18 Nathan Sidwell <nathan@acm.org>
272
273 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
274
eea77d1f
DM
2752017-07-14 David Malcolm <dmalcolm@redhat.com>
276
277 * c-decl.c (implicitly_declare): When suggesting a missing
278 #include, provide a fix-it hint.
279
b6f43128
DM
2802017-07-06 David Malcolm <dmalcolm@redhat.com>
281
282 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
283 and call that instead.
284 * c-tree.h (selftest::run_c_tests): New decl.
285
3e2becc4
MP
2862017-06-26 Marek Polacek <polacek@redhat.com>
287
288 PR c/80116
289 * c-parser.c (c_parser_if_body): Set the location of the
290 body of the conditional after parsing all the labels. Call
291 warn_for_multistatement_macros.
292 (c_parser_else_body): Likewise.
293 (c_parser_switch_statement): Likewise.
294 (c_parser_while_statement): Likewise.
295 (c_parser_for_statement): Likewise.
296 (c_parser_statement): Add a default argument. Save the location
297 after labels have been parsed.
298 (c_parser_c99_block_statement): Likewise.
299
343ae898
RB
3002017-06-19 Richard Biener <rguenther@suse.de>
301
302 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
303 negated _Literals to parse _Literal (int) -1.
304
45b2222a
ML
3052017-06-13 Martin Liska <mliska@suse.cz>
306
307 PR sanitize/78204
308 * c-convert.c (convert): Use sanitize_flags_p.
309 * c-decl.c (grokdeclarator): Likewise.
310 * c-typeck.c (convert_for_assignment): Likewise.
311 (c_finish_return): Likewise.
312 (build_binary_op): Likewise.
313
8ab7005b
JJ
3142017-06-08 Jakub Jelinek <jakub@redhat.com>
315
316 PR c/81006
317 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
318 to sizetype before size_binop.
319
363dc72c
JJ
3202017-06-07 Jakub Jelinek <jakub@redhat.com>
321
322 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
323 of TDI_generic.
324
dc949728
MP
3252017-06-06 Marek Polacek <polacek@redhat.com>
326
327 PR c/79983
328 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
329 ref.
330 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
331
40ffd95f
BE
3322017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
333
334 * c-parser.c (c_parser_binary_expression): Implement the
335 -Wsizeof_pointer_div warning.
336 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
337 from a parenthesized expression.
338 (c_parser_expr_list): Use c_last_sizeof_loc.
339 * c-tree.h (c_last_sizeof_loc): New external.
340 * c-typeck.c (c_last_sizeof_loc): New variable.
341 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
342
9fc5e7a4
MM
3432017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
344
345 PR testsuite/80580
346 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
347
f012c8ef
DM
3482017-05-30 David Malcolm <dmalcolm@redhat.com>
349
350 * c-objc-common.c (c_tree_printer): Gain bool and const char **
351 parameters.
352
3cd211af
MS
3532017-05-24 Martin Sebor <msebor@redhat.com>
354
355 PR c/80731
356 * c-fold.c (c_fully_fold_internal): Adjust.
357 * c-typeck.c (parser_build_unary_op): Adjust.
358
fd71a9a2
TS
3592017-05-23 Thomas Schwinge <thomas@codesourcery.com>
360
361 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
362 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
363 "VECTOR_LENGTH".
364
92fa0f9e
MP
3652017-05-23 Marek Polacek <polacek@redhat.com>
366
367 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
368 quotes.
369
d11c168a
JJ
3702017-05-22 Jakub Jelinek <jakub@redhat.com>
371
372 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
373 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
374 it returned invariant. Call tree_invariant_p unconditionally
375 afterwards to decide whether to return expr or op0.
376
58aca9d9
NS
3772017-05-22 Nathan Sidwell <nathan@acm.org>
378
379 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
380
7fd549d2
TS
3812017-05-19 Thomas Schwinge <thomas@codesourcery.com>
382
383 * c-parser.c (c_parser_omp_clause_default): Handle
384 "OMP_CLAUSE_DEFAULT_PRESENT".
385
6ecd2339
BE
3862017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
387
388 * config-lang.in (gtfiles): Add c-family/c-format.c.
389
8a57ecff
NS
3902017-05-18 Nathan Sidwell <nathan@acm.org>
391
392 * c-decl.c (pushdecl_top_level): Delete unused function.
393
6574d78e
MP
3942017-05-18 Marek Polacek <polacek@redhat.com>
395
396 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
397 (check_earlier_gotos): Likewise.
398 (define_label): Likewise.
399 (pending_xref_error): Likewise.
400 (smallest_type_quals_location): Likewise.
401 (grokdeclarator): Likewise.
402 (grokparms): Likewise.
403 (identifier_global_value): Likewise.
404 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
405 (find_init_member): Likewise.
406
e3455240
MP
4072017-05-18 Marek Polacek <polacek@redhat.com>
408
409 * c-decl.c (start_decl): Use false/true instead of 0/1.
410 (grokdeclarator): Likewise.
411 (finish_struct): Likewise.
412 (start_function): Change the return type to bool. Use false/true
413 instead of 0/1.
414 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
415 * c-tree.h (start_function): Update.
416 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
417 (set_designator): Change the return type to bool. Use false/true
418 instead of 0/1.
419
3fa8871b
MP
4202017-05-17 Marek Polacek <polacek@redhat.com>
421
422 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
423 * c-typeck.c: Likewise.
424
142473df
MP
4252017-05-17 Marek Polacek <polacek@redhat.com>
426
427 PR sanitizer/80659
428 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
429 DECL_IGNORED_P even for non-static compound literals.
430
1a817418
ML
4312017-05-17 Martin Liska <mliska@suse.cz>
432
433 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
434 use it instead of int type.
435
b2fa0a8b
MP
4362017-05-17 Marek Polacek <polacek@redhat.com>
437
438 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
439 call c_fully_fold.
440 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
441 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
442 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
443 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
444 save_expr.
445 (c_parser_conditional_expression): Likewise.
446 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
447 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
448 (process_init_element): Likewise.
449 (build_binary_op): Likewise.
450 (handle_omp_array_sections_1): Likewise.
451
1e47f02b
TS
4522017-05-12 Thomas Schwinge <thomas@codesourcery.com>
453
454 * c-parser.c (c_parser_omp_clause_num_gangs)
455 (c_parser_omp_clause_num_workers)
456 (c_parser_omp_clause_vector_length): Merge functions into...
457 (c_parser_oacc_single_int_clause): ... this new function. Adjust
458 all users.
459
c24e924f
NS
4602017-05-11 Nathan Sidwell <nathan@acm.org>
461
462 * gimple-parser.c: Don't #include tree-dump.h.
463
c587104e
MM
4642017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
465
466 PR testsuite/80580
467 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
468
67ac9a9d
MM
4692017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
470
471 PR testsuite/80580
472 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
473 incorrect __MEM syntax.
474
ac4eb40f
MM
4752017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
476
477 PR testsuite/80580
478 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
479 type of unary '*'.
480
641da50a
NS
4812017-05-09 Nathan Sidwell <nathan@acm.org>
482
483 * c-tree.h (pushdecl): Declare.
484
56d35585
DM
4852017-05-05 David Malcolm <dmalcolm@redhat.com>
486
487 * c-decl.c (warn_defaults_to): Replace report_diagnostic
488 with diagnostic_report_diagnostic.
489 * c-errors.c (pedwarn_c99): Likewise.
490 (pedwarn_c90): Likewise.
491
815d9cc6
XR
4922017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
493
494 PR c++/80038
495 * c-gimplify.c (c_gimplify_expr): Remove calls to
496 cilk_gimplifY_call_params_in_spawned_fn.
497
1c4ea66f
DM
4982017-04-25 David Malcolm <dmalcolm@redhat.com>
499
500 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
501 hint for removing extra semicolon.
502
666f7903
JJ
5032017-04-21 Jakub Jelinek <jakub@redhat.com>
504
505 PR c/80468
506 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
507 enabled, set specs->type to integer_type_node.
508
5764ee3c
JW
5092017-04-03 Jonathan Wakely <jwakely@redhat.com>
510
511 * c-array-notation.c: Fix typo in comment.
512
10fa8dfb
MP
5132017-03-29 Marek Polacek <polacek@redhat.com>
514
515 PR c/79730
516 * c-decl.c (finish_decl): Check VAR_P.
517
a9e4a1a5
JJ
5182017-03-27 Jakub Jelinek <jakub@redhat.com>
519
520 PR middle-end/80162
521 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
522 * c-typeck.c (c_mark_addressable): Likewise. Look through
523 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
524 to ARRAY_TYPE.
525 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
526
ee3ff394
MP
5272017-03-23 Marek Polacek <polacek@redhat.com>
528
529 * c-tree.h: Remove a C_RID_YYCODE reference.
530
4d1b8e70
JJ
5312017-03-21 Jakub Jelinek <jakub@redhat.com>
532
533 PR c/80097
534 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
535 optional COMPOUND_EXPR with ubsan instrumentation.
536
31dc71a8
MP
5372017-03-17 Marek Polacek <polacek@redhat.com>
538
539 * c-parser.c: Add C11 references.
540
d579c385
MP
5412017-03-15 Marek Polacek <polacek@redhat.com>
542
543 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
544
85059a38
MP
5452017-03-11 Marek Polacek <polacek@redhat.com>
546
547 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
548
2f6f187a
DM
5492017-03-10 David Malcolm <dmalcolm@redhat.com>
550
551 PR translation/79848
552 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
553 "%qs".
554 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
555
36618428
MP
5562017-03-09 Marek Polacek <polacek@redhat.com>
557
558 PR sanitizer/79757
559 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
560 parameter declarations with initializers.
561
01e5af5a
JJ
5622017-03-09 Jakub Jelinek <jakub@redhat.com>
563
564 PR c/79969
565 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
566 TYPE_STUB_DECL.
567
a71dbc63
JJ
5682017-03-07 Jakub Jelinek <jakub@redhat.com>
569
570 PR c/79834
571 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
572 for "may only be used in compound statements" diagnostics, change it
573 such that the same translatable string is used for all pragmas. For
574 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
575 diagnostics.
576 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
577 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
578 "may only be used in compound statements" diagnostics, such that the
579 same translatable string is used for all pragmas.
580
1ff4bae6
MP
5812017-03-04 Marek Polacek <polacek@redhat.com>
582
583 PR c/79847
584 * c-decl.c (implicit_decl_warning): Add missing space.
585
7f5a7d78
MP
5862017-03-03 Marek Polacek <polacek@redhat.com>
587
588 PR c/79758
589 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
590 current_function_prototype_arg_types is error_mark_node. Fix
591 formatting. Use TREE_VALUE instead of TREE_TYPE.
592
883c8f06
JJ
5932017-03-03 Jakub Jelinek <jakub@redhat.com>
594
79c9b7a8
JJ
595 PR c/79837
596 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
597 %<min%> or %<max%> in the diagnostics, instead mention identifier.
598 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
599 diagnostics.
600
883c8f06
JJ
601 PR c/79836
602 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
603 instead of %<_Generic>.
604 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
605 (c_parser_omp_target_exit_data): Use %<release%> instead of
606 %<release>.
607
324ff1a0
JJ
6082017-02-28 Jakub Jelinek <jakub@redhat.com>
609
610 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
611 instead of just cond ? "..." : "...".
612 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
613 for "enter"/"exit" keyword.
614 (c_finish_oacc_routine): Don't use %s to supply portions of the
615 message.
616
4227c9ad
JJ
6172017-02-24 Jakub Jelinek <jakub@redhat.com>
618
619 PR c++/79588
620 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
621 handle -Wrestrict here.
622 * c-typeck.c (build_function_call_vec): Adjust
623 check_function_arguments caller.
624
5d972e66
RB
6252017-02-23 Richard Biener <rguenther@suse.de>
626
627 PR c/79684
628 * gimple-parser.c (c_parser_gimple_statement): Use set_error
629 to initialize c_exprs to return.
630 (c_parser_gimple_binary_expression): Likewise.
631 (c_parser_gimple_unary_expression): Likewise.
632 (c_parser_gimple_postfix_expression): Likewise.
633
61ac5ebe
MP
6342017-02-22 Marek Polacek <polacek@redhat.com>
635
636 PR c/79662
637 * c-typeck.c (convert_arguments): Handle error_mark_node.
638
41d1b0b1
PK
6392017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
640
641 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
642 value of c_parser_parse_ssa_name against error_mark_node and emit
643 error if ssa name is anonymous and written as default definition.
644
eab1f169
PK
6452017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
646
647 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
648 FMA_EXPR.
649
bcac0b4d
JJ
6502017-02-16 Jakub Jelinek <jakub@redhat.com>
651
652 PR c++/79512
653 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
654 ignore #pragma omp target even when not followed by identifier.
655
1be33173
PK
6562017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
657
658 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
659 (c_parser_gimple_unary_expression): Likewise.
660
aa326bfb
JJ
6612017-02-13 Jakub Jelinek <jakub@redhat.com>
662
663 * c-parser.c (c_parser_oacc_declare): Add missing space in
664 diagnostics.
665
8a398bc5
PK
6662017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
667
668 PR c/79478
669 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
670 set_c_expr_source_range when parsing ssa-name.
671
3dcde5ef
PG
6722017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
673 Richard Biener <rguenther@suse.de>
674
675 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
676 building IL when arguments are error_mark_node.
677 (c_parser_gimple_unary_expression): Likewise.
678 (c_parser_gimple_if_stmt): Likewise.
679 (c_parser_gimple_switch_stmt): Likewise.
680 (c_parser_gimple_return_stmt): Likewise.
681 (c_parser_parse_ssa_name): When name lookup fails do not build
682 an SSA name. Use undeclared rather than not declared in error
683 reporting.
684
192b048b
MP
6852017-02-09 Marek Polacek <polacek@redhat.com>
686
687 PR c/79428
688 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
689 instead of c_parser_skip_until_found.
690
56f71478
JJ
6912017-02-09 Jakub Jelinek <jakub@redhat.com>
692
693 PR c/79431
694 * c-parser.c (c_parser_omp_declare_target): Don't invoke
695 symtab_node::get on automatic variables.
696
02889d23
CLT
6972016-02-09 Nathan Sidwell <nathan@codesourcery.com>
698 Chung-Lin Tang <cltang@codesourcery.com>
699
700 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
701 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
702 semantic checking.
703 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
704
7af4b20d
RB
7052017-02-07 Richard Biener <rguenther@suse.de>
706
707 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
708 (c_parser_gimple_postfix_expression_after_primary):
709 Do not use c_build_function_call_vec to avoid folding and promotion.
710 Simplify.
711
e5e391d6
MO
7122017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
713
714 PR lto/79061
715 * c-decl.c (pop_scope): Pass main_input_filename to
716 build_translation_unit_decl.
717
c2e84327
DM
7182017-01-24 David Malcolm <dmalcolm@redhat.com>
719
720 * c-parser.c: Include "read-rtl-function.h" and
721 "run-rtl-passes.h".
722 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
723 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
724 production. Update for renaming of field "gimple_pass" to
725 "gimple_or_rtl_pass". If __RTL was seen, call
726 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
727 to an auto_timevar, to cope with early exit.
728 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
729 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
730 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
731 Handle RID_RTL.
732 (c_parser_parse_rtl_body): New function.
733 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
734 (struct c_declspecs): Rename field "gimple_pass" to
735 "gimple_or_rtl_pass". Add field "rtl_p".
736 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
737 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
738 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
739 (c_parser_gimple_or_rtl_pass_list): ...this.
740
2ebd93e1
MP
7412017-01-20 Marek Polacek <polacek@redhat.com>
742
743 PR c/64279
744 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
745
b1c95bb5
RB
7462017-01-13 Richard Biener <rguenther@suse.de>
747
748 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
749 nops.
750
25329913
RB
7512017-01-13 Richard Biener <rguenther@suse.de>
752
753 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
754 _Literal ( type-name ) number.
755
6bb4ea5c
RB
7562017-01-12 Richard Biener <rguenther@suse.de>
757
758 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
759 __MEM.
760
6b5b4e9c
JJ
7612017-01-11 Jakub Jelinek <jakub@redhat.com>
762
763 PR c++/72813
764 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
765 PCH file.
766
e3252775
RB
7672017-01-11 Richard Biener <rguenther@suse.de>
768
769 PR bootstrap/79052
770 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
771 returns on parse errors.
772
a9342885
MP
7732017-01-04 Marek Polacek <polacek@redhat.com>
774
775 PR c++/64767
776 * c-parser.c (c_parser_postfix_expression): Mark zero character
777 constants by setting original_type in c_expr.
778 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
779 with a zero character constant.
780 (char_type_p): New function.
781
5dd9a9d0
DM
7822017-01-04 David Malcolm <dmalcolm@redhat.com>
783
784 * c-parser.c (c_parser_declaration_or_fndef): Create a
785 rich_location at init_loc and parse it to start_init.
786 (last_init_list_comma): New global.
787 (c_parser_braced_init): Update last_init_list_comma when parsing
788 commas. Pass it to pop_init_level. Pass location of closing
789 brace to pop_init_level.
790 (c_parser_postfix_expression_after_paren_type): Create a
791 rich_location at type_loc and parse it to start_init.
792 (c_parser_omp_declare_reduction): Likewise for loc.
793 * c-tree.h (start_init): Add rich_location * param.
794 (pop_init_level): Add location_t param.
795 * c-typeck.c (struct initializer_stack): Add field
796 "missing_brace_richloc".
797 (start_init): Add richloc param, use it to initialize
798 the stack node's missing_brace_richloc.
799 (last_init_list_comma): New decl.
800 (finish_implicit_inits): Pass last_init_list_comma to
801 pop_init_level.
802 (push_init_level): When finding missing open braces, add fix-it
803 hints to the richloc.
804 (pop_init_level): Add "insert_before" param and pass it
805 when calling pop_init_level. Add fixits about missing
806 close braces to any richloc. Use the richloc for the
807 -Wmissing-braces warning.
808 (set_designator): Pass last_init_list_comma to pop_init_level.
809 (process_init_element): Likewise.
810
cbe34bb5
JJ
8112017-01-01 Jakub Jelinek <jakub@redhat.com>
812
813 Update copyright years.
814
d17680f3
JJ
8152016-12-21 Jakub Jelinek <jakub@redhat.com>
816
0dba7960
JJ
817 PR bootstrap/78817
818 * c-typeck.c (build_function_call_vec): If check_function_arguments
819 returns true, set TREE_NO_WARNING on CALL_EXPR.
820
d17680f3
JJ
821 PR c/77767
822 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
823 to *expr instead of overwriting it.
824
aa90531e
RB
8252016-12-20 Richard Biener <rguenther@suse.de>
826
827 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
828 error recovery.
829 (c_parser_gimple_statement): Only build assigns for non-error
830 stmts.
831 (c_parser_gimple_postfix_expression_after): Improve error recovery.
832
629b3d75
MJ
8332016-12-14 Martin Jambor <mjambor@suse.cz>
834
835 * c-parser.c: Include omp-general.h and omp-offload.h instead of
836 omp-low.h.
837 (c_finish_oacc_routine): Adjusted call to
838 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
839 to use their new names.
840 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
841 use its new name.
842 (c_parser_oacc_update): Likewise.
843 (c_parser_omp_simd): Likewise.
844 (c_parser_omp_target_update): Likewise.
845 * c-typeck.c: Include omp-general.h instead of omp-low.h.
846 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
847 name.
848 (c_finish_omp_cancellation_point): Likewise.
849 * gimple-parser.c: Do not include omp-low.h
850
c5af52eb
CP
8512016-12-02 Cesar Philippidis <cesar@codesourcery.com>
852 James Norris <jnorris@codesourcery.com>
853
854 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
855 EXIT_DATA,WAIT} are not used in compound statements.
856 (c_parser_oacc_enter_exit_data): Update diagnostics.
857
48330c93
BE
8582016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
859
860 PR c++/71973
861 * c-decl.c (diagnose_mismatched_decls): Use
862 OPT_Wbuiltin_declaration_mismatch here too.
863
899ca90e 8642016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
865 Alan Hayward <alan.hayward@arm.com>
866 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
867
868 * c-decl.c (merge_decls): Use SET_DECL_MODE.
869 (make_label, finish_struct): Likewise.
870
1ee62b92 8712016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 872 Richard Biener <rguenther@suse.de>
22b15758 873
8e745a17
JJ
874 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
875 * config-lang.in (gtfiles): Add c/c-parser.h.
876 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
877 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
878 * c-parser.c (enum c_id_kind, struct c_token,
879 c_parser_next_token_is, c_parser_next_token_is_not,
880 c_parser_next_token_is_keyword,
881 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
882 Split out to ...
883 * c-parser.h: ... new header.
884 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 885 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
886 c_token_starts_typename, c_parser_next_token_starts_declspecs,
887 c_parser_next_tokens_start_declaration, c_parser_consume_token,
888 c_parser_error, c_parser_require, c_parser_skip_until_found,
889 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
890 c_parser_type_name): Export.
891 (c_parser_tokens_buf): New function.
892 (c_parser_error): Likewise.
893 (c_parser_set_error): Likewise.
894 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
895 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
896 via c_parser_parse_gimple_body.
8e745a17
JJ
897 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
898 c_token_starts_typename, c_parser_next_token_starts_declspecs,
899 c_parser_next_tokens_start_declaration, c_parser_consume_token,
900 c_parser_error, c_parser_require, c_parser_skip_until_found,
901 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
902 c_parser_type_name): Declare.
1ee62b92
PG
903 (struct c_parser): Declare forward.
904 (c_parser_tokens_buf): Declare.
8e745a17
JJ
905 (c_parser_error): Likewise.
906 (c_parser_set_error): Likewise.
907 * gimple-parser.c: New file.
908 * gimple-parser.h: Likewise.
1ee62b92 909
22b15758
UB
9102016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
911
912 PR c/35503
913 * c-parser.c (c_parser_postfix_expression_after_primary): Call
914 warn_for_restrict.
915
84ff4775
LCW
9162016-09-11 Le-Chun Wu <lcwu@google.com>
917 Mark Wielaard <mjw@redhat.com>
918
919 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
920 to the given -Wshadow= variant.
921
4d0cdd0c
TP
9222016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
923
924 * c-typeck.c: Include memmodel.h.
925
1202f33e
JJ
9262016-10-13 Jakub Jelinek <jakub@redhat.com>
927
928 PR target/77957
929 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
930 instead of lhd_return_null_tree_v.
931
8a14afd0
BS
9322016-10-07 Bernd Schmidt <bschmidt@redhat.com>
933
934 PR c++/69733
935 * c-decl.c (smallest_type_quals_location): New static function.
936 (grokdeclarator): Try to find the correct location for an ignored
937 qualifier.
938
81fea426
MP
9392016-09-26 Marek Polacek <polacek@redhat.com>
940
941 PR c/7652
942 * c-decl.c (pop_scope): Add gcc_fallthrough.
943
9442016-09-26 Marek Polacek <polacek@redhat.com>
945
946 PR c/7652
947 * c-parser.c (struct c_token): Add flags field.
948 (c_lex_one_token): Pass it to c_lex_with_flags.
949 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
950 into IFN_FALLTHROUGH.
951 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
952 attribute fallthrough after a case label or default label.
953 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
954
9a2300e9
MP
9552016-09-24 Marek Polacek <polacek@redhat.com>
956
957 PR c/77490
958 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
959 have boolean value. Warn about ++/-- on booleans.
960
7de76362
JJ
9612016-09-23 Jakub Jelinek <jakub@redhat.com>
962
963 * c-parser.c (incomplete_record_decls): Remove unnecessary
964 = vNULL initialization of file scope vec.
965
5b73d2ab
MP
9662016-09-16 Marek Polacek <polacek@redhat.com>
967
968 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
969
e51fbec3
MP
9702016-09-14 Marek Polacek <polacek@redhat.com>
971
972 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
973 (fix_array_notation_expr): Likewise.
974 * c-decl.c (finish_decl): Likewise.
975 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
976 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
977 (function_to_pointer_conversion): Use false instead of 0.
978 (convert_lvalue_to_rvalue): Likewise.
979 (parser_build_unary_op): Likewise.
980 (build_atomic_assign): Likewise.
981 (build_unary_op): Change nonconvert parameter type to bool, use
982 true/false instead of 1/0.
983 (build_binary_op): Use true instead of 1.
984
254830ba
DM
9852016-09-13 David Malcolm <dmalcolm@redhat.com>
986
987 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
988 of add_fixit_insert to add_fixit_insert_before.
989
4c13ba17
MP
9902016-09-13 Marek Polacek <polacek@redhat.com>
991
992 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
993 it.
994
54dcdb88
BE
9952016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
996
997 PR c++/77496
998 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
999 COMPOUND_EXPR to warn_for_omitted_condop.
1000
e5106e27
DM
10012016-09-07 David Malcolm <dmalcolm@redhat.com>
1002
1003 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1004 c_get_substring_location for this new langhook.
1005
9dc5773f
JJ
10062016-09-02 Jakub Jelinek <jakub@redhat.com>
1007
1008 PR c/65467
1009 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1010 flag_openmp.
1011 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1012 instead of mark_exp_read on low_bound/length expression.
1013 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1014 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1015 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1016 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1017 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1018 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1019 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1020 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1021 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1022 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1023 instead of mark_expr_read.
1024 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1025 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1026 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1027 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1028 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1029 array section bases outside of depend clause, for depend clause
1030 use convert_lvalue_to_rvalue on the base.
1031 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1032 linear, aligned, map, to and from clauses.
1033 (c_omp_clause_copy_ctor): New function.
1034
295844f6
MP
10352016-09-01 Marek Polacek <polacek@redhat.com>
1036
1037 PR c/7652
1038 * c-typeck.c (composite_type): Add FALLTHRU comment.
1039
089af25c
DM
10402016-08-31 David Malcolm <dmalcolm@redhat.com>
1041
1042 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1043 to the insertion fixits for "struct", "union", and "enum".
1044
f9087798
DM
10452016-08-30 David Malcolm <dmalcolm@redhat.com>
1046
1047 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1048 rather than add_fixit_misspelled_id.
1049 (undeclared_variable): Likewise.
1050 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1051 now-redundant "here" params from add_fixit_insert method calls.
1052 (c_parser_parameter_declaration): Likewise.
1053 * c-typeck.c (build_component_ref): Remove now-redundant range
1054 param from add_fixit_replace method calls.
1055
ebef225f
MP
10562016-08-25 Marek Polacek <polacek@redhat.com>
1057
1058 * c-typeck.c (parser_build_binary_op): Pass LHS to
1059 warn_logical_not_parentheses.
1060
fe377a48
MP
10612016-08-25 Marek Polacek <polacek@redhat.com>
1062
1063 PR c/77323
1064 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1065 or _FloatN or _FloatNx is not supported.
1066 (finish_declspecs): Set type to integer_type_node when _FloatN or
1067 _FloatNx is not supported.
1068
c65699ef
JM
10692016-08-19 Joseph Myers <joseph@codesourcery.com>
1070
1071 PR c/32187
1072 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1073 (struct c_declspecs): Add field floatn_nx_idx.
1074 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1075 and _FloatNx type specifiers.
1076 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1077 (c_parser_declspecs, c_parser_attribute_any_word)
1078 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1079 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1080 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1081 narrower than double.
1082
2f1364c2
JJ
10832016-08-12 Jakub Jelinek <jakub@redhat.com>
1084 Martin Liska <mliska@suse.cz>
1085
1086 PR c/67410
1087 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1088 % to determine val element to change. Assert that
1089 wchar_bytes * charwidth fits into val array.
1090
191816a3
MP
10912016-08-12 Marek Polacek <polacek@redhat.com>
1092
1093 PR c/7652
1094 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1095 (c_parser_postfix_expression): Likewise.
1096 * c-typeck.c (build_unary_op): Adjust fall through comment.
1097 (c_mark_addressable): Likewise.
1098
b95a64bb
JJ
10992016-08-11 Jakub Jelinek <jakub@redhat.com>
1100
1101 PR c/72816
1102 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1103 array member through typedef, for orig_qual_indirect == 0 clear
1104 orig_qual_type.
1105
895aa8e1
DM
11062016-08-08 David Malcolm <dmalcolm@redhat.com>
1107
1108 PR c/64955
1109 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1110 this up to selftest::run_c_tests.
1111 (selftest::run_c_tests): New function.
1112
0b212d8c
TS
11132016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1114
ae9281fc
TS
1115 * c-parser.c (struct oacc_routine_data): Add error_seen and
1116 fndecl_seen members.
1117 (c_finish_oacc_routine): Use these.
1118 (c_parser_declaration_or_fndef): Adjust.
1119 (c_parser_oacc_routine): Likewise. Support more C language
1120 constructs, and improve diagnostics. Move pragma context
1121 checking...
1122 (c_parser_pragma): ... here.
1123
0b212d8c
TS
1124 * c-parser.c (struct oacc_routine_data): New.
1125 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1126 Simplify code.
1127 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1128 declare target" attribute.
1129
76e2c821
JB
11302016-08-01 Jan Beulich <jbeulich@suse.com>
1131
1132 * c-fold.c (c_fully_fold_internal): Also emit shift count
1133 warnings for vector types.
1134 * c-typeck.c (build_binary_op): Likewise.
1135
f618a472
MP
11362016-07-29 Marek Polacek <polacek@redhat.com>
1137
1138 PR c/71742
1139 * c-decl.c (finish_struct): Rephrase an error message.
1140
efd0786f
MP
1141 PR c/71853
1142 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1143 to error node for invalid code.
1144
e00dceaf
MP
1145 PR c/71573
1146 * c-decl.c (implicitly_declare): Return decl early not only for
1147 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1148
673a107a
JJ
11492016-07-29 Jakub Jelinek <jakub@redhat.com>
1150
1151 PR c/71969
1152 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1153 on GNU extern inline functions.
1154
a5b5c8b6
MP
11552016-07-29 Marek Polacek <polacek@redhat.com>
1156
1157 PR c/71583
1158 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1159 check expr.value.
1160
e3fe09c1
UB
11612016-07-22 Uros Bizjak <ubizjak@gmail.com>
1162
1163 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1164
7c8f7eaa
DM
11652016-07-20 David Malcolm <dmalcolm@redhat.com>
1166
1167 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1168 spellcheck-tree.h
1169 (best_macro_match): Likewise, converting from a typedef to a
1170 subclass.
1171 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1172 (lookup_name_fuzzy): Update for change of best_macro_match to a
1173 subclass with a ctor that calls cpp_forall_identifiers.
1174
de6a69ee
DM
11752016-07-20 David Malcolm <dmalcolm@redhat.com>
1176
1177 * c-decl.c (implicit_decl_warning): Update for conversion of
1178 return type of lookup_name_fuzzy to const char *.
1179 (undeclared_variable): Likewise.
1180 (lookup_name_fuzzy): Convert return type from tree to
1181 const char *.
1182 * c-parser.c (c_parser_declaration_or_fndef): Update for
1183 conversion of return type of lookup_name_fuzzy to const char *.
1184 (c_parser_parameter_declaration): Likewise.
1185
b1c9c068
CP
11862016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1187
1188 * c-parser.c (c_parser_oacc_declare): Don't scan for
1189 GOMP_MAP_POINTER.
1190 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1191 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1192 zero-length subarrays.
1193
ddbbcb19
JJ
11942016-07-15 Jakub Jelinek <jakub@redhat.com>
1195
1196 PR c/71858
1197 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1198 instead of FUZZY_LOOKUP_NAME.
1199 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1200 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1201
dd36b877
JJ
12022016-07-14 Jakub Jelinek <jakub@redhat.com>
1203
1204 PR c/71858
1205 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1206
8c681247
TS
12072016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1208
1209 * c-parser.c (c_parser_generic_selection): Make type of variable
1210 auto_vec.
1211 (c_parser_omp_declare_simd): Likewise.
1212
bf4fa671
TS
12132016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1214
1215 * c-decl.c (struct c_struct_parse_info): Change member types
1216 from vec to auto_vec.
1217 (start_struct): Adjust.
1218 (finish_struct): Likewise.
1219
557e8c49
JJ
12202016-07-02 Jakub Jelinek <jakub@redhat.com>
1221
1222 PR c/71719
1223 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1224
54d19c3b
TS
12252016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1226
1227 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1228 Move pragma context checking into...
1229 (c_parser_omp_cancellation_point): ... here, and improve
1230 diagnostic messages.
1231 * c-typeck.c (c_finish_omp_cancel)
1232 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1233
152ef731
JJ
12342016-06-29 Jakub Jelinek <jakub@redhat.com>
1235
1236 PR c/71685
1237 * c-typeck.c (c_build_qualified_type): Don't clear
1238 C_TYPE_INCOMPLETE_VARS for the main variant.
1239
12402016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1241
1242 PR c/71552
1243 * c-typeck.c (output_init_element): Diagnose incompatible types
1244 before non-constant initializers.
1245
e9ac1f86
JJ
12462016-06-28 Jakub Jelinek <jakub@redhat.com>
1247
1248 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1249
277d7ee0
AK
12502016-06-23 Andi Kleen <ak@linux.intel.com>
1251
1252 * Make-lang.in: Add support for autofdo.
1253
1a4f11c8
DM
12542016-06-22 David Malcolm <dmalcolm@redhat.com>
1255
1256 PR c/70339
1257 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1258 (implicit_decl_warning): When issuing warnings for implicit
1259 declarations, attempt to provide a suggestion via
1260 lookup_name_fuzzy.
1261 (undeclared_variable): Likewise when issuing errors.
1262 (lookup_name_in_scope): Likewise.
1263 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1264 (best_macro_match): New typedef.
1265 (find_closest_macro_cpp_cb): New function.
1266 (lookup_name_fuzzy): New function.
1267 * c-parser.c: Include gcc-rich-location.h.
1268 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1269 (c_keyword_starts_typename): ...this new function.
1270 (c_parser_declaration_or_fndef): When issuing errors about
1271 missing "struct" etc, add a fixit. For other kinds of errors,
1272 attempt to provide a suggestion via lookup_name_fuzzy.
1273 (c_parser_parms_declarator): When looking ahead to detect typos in
1274 type names, also reject CPP_KEYWORD.
1275 (c_parser_parameter_declaration): When issuing errors about
1276 unknown type names, attempt to provide a suggestion via
1277 lookup_name_fuzzy.
1278 * c-tree.h (c_keyword_starts_typename): New prototype.
1279
5a578671
JM
12802016-06-20 Joseph Myers <joseph@codesourcery.com>
1281
1282 PR c/71601
1283 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1284 c_common_type returns error_mark_node.
1285
3f8257db 12862016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1287
1288 PR c/69507
1289 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1290 __alignof__ (expression).
1291
6a3f203c
DM
12922016-06-14 David Malcolm <dmalcolm@redhat.com>
1293
1294 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1295
264757fb
DM
12962016-06-14 David Malcolm <dmalcolm@redhat.com>
1297
1298 * c-typeck.c (build_component_ref): Simplify fixit code by
1299 using gcc_rich_location::add_fixit_misspelled_id.
1300 (set_init_label): Likewise.
1301
f7e4f2e3
DM
13022016-06-13 David Malcolm <dmalcolm@redhat.com>
1303
1304 * c-parser.c (c_parser_initelt): Provide location of name for new
1305 location_t param of set_init_label.
1306 * c-tree.h (set_init_label): Add location_t param.
1307 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1308 param and use it when issuing error messages about unrecognized
1309 field names. Attempt to provide a fixit hint if appropriate,
1310 otherwise update the error message to provide the type name.
1311
4b1ffdb1
TS
13122016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1313
1314 PR c/71381
1315 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1316 Loosen checking.
1317
44a845ca
MS
13182016-06-08 Martin Sebor <msebor@redhat.com>
1319 Jakub Jelinek <jakub@redhat.com>
1320
1321 PR c++/70507
1322 PR c/68120
1323 * c-typeck.c (convert_arguments): Don't promote last argument
1324 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1325
92a5f2ba
MP
13262016-06-08 Marek Polacek <polacek@redhat.com>
1327
1328 PR c/71418
1329 * c-decl.c (grokdeclarator): Check TYPE_P.
1330
08203f73
MP
1331 PR c/71426
1332 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1333 code.
1334
6ffd47b7
DM
13352016-06-07 David Malcolm <dmalcolm@redhat.com>
1336
1337 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1338 and structure element reference, capture the location of the
1339 element name token and pass it to build_component_ref.
1340 (c_parser_postfix_expression_after_primary): Likewise for
1341 structure element dereference.
1342 (c_parser_omp_variable_list): Likewise for
1343 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1344 * c-tree.h (build_component_ref): Add location_t param.
1345 * c-typeck.c (build_component_ref): Add location_t param
1346 COMPONENT_LOC. Use it, if available, when issuing hints about
1347 mispelled member names to provide a fixit replacement hint.
1348
1f40cff3
MP
13492016-06-06 Marek Polacek <polacek@redhat.com>
1350
1351 PR c/71362
1352 * c-parser.c (c_parser_direct_declarator): Set location.
1353
5545a907
MP
13542016-06-06 Marek Polacek <polacek@redhat.com>
1355
1356 * c-typeck.c (comptypes_internal): Handle comparisons of
1357 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1358 TYPE_REF_CAN_ALIAS_ALL.
1359
b605f663
CLT
13602016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1361
1362 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1363 arguments as addressable when async clause exists.
1364
00631022
JJ
13652016-05-30 Jakub Jelinek <jakub@redhat.com>
1366
1367 PR c++/71349
1368 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1369 when combined with target construct.
1370
7211a097
JJ
13712016-05-26 Jakub Jelinek <jakub@redhat.com>
1372
1373 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1374 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1375
95efe6b6
MP
13762016-05-25 Marek Polacek <polacek@redhat.com>
1377
1378 PR c/71265
1379 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1380
a23faf7a
MP
1381 PR c/71266
1382 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1383
e46c7770
CP
13842016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1385
1386 * c-parser.c (c_parser_oacc_declare): Add support for
1387 GOMP_MAP_FIRSTPRIVATE_POINTER.
1388 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1389 argument with enum c_omp_region_type ort.
1390 (handle_omp_array_sections): Likewise. Update call to
1391 handle_omp_array_sections_1.
1392 (c_finish_omp_clauses): Add specific errors and warning messages for
1393 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1394 call to handle_omp_array_sections.
1395
a04e69c0
TS
13962016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1397
1398 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1399
f17a223d
RB
14002016-05-24 Richard Biener <rguenther@suse.de>
1401
1402 PR middle-end/70434
1403 PR c/69504
1404 * c-typeck.c (build_array_ref): Do not complain about indexing
1405 non-lvalue vectors. Adjust for function name change.
1406
79063edd
MS
14072016-05-20 Martin Sebor <msebor@redhat.com>
1408
1409 PR c/71115
1410 * c-typeck.c (error_init): Use
1411 expansion_point_location_if_in_system_header.
1412 (warning_init): Same.
1413
8a40fef3
DM
14142016-05-19 David Malcolm <dmalcolm@redhat.com>
1415
1416 PR c/71171
1417 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1418 in error-handling.
1419 (c_parser_postfix_expression): Likewise.
1420 * c-tree.h (c_expr::set_error): New method.
1421 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1422 that result's range is initialized.
1423
e9892350
JG
14242016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1425
1426 * c-typeck.c (parser_build_unary_op): Fix formatting.
1427
8fad45f5
MW
14282016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1429
1430 * c-decl.c (grokdeclarator): Remove errmsg and use of
1431 targetm.invalid_return_type.
1432 (grokparms): Remove errmsg and use of
1433 targetm.invalid_parameter_type.
1434
aa4b467b
JM
14352016-05-13 Joseph Myers <joseph@codesourcery.com>
1436
1437 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1438 function return type.
1439
4f2e1536
MP
14402016-05-12 Marek Polacek <polacek@redhat.com>
1441
1442 PR c/70756
1443 * c-decl.c (build_compound_literal): Pass LOC down to
1444 c_incomplete_type_error.
1445 * c-tree.h (require_complete_type): Adjust declaration.
1446 (c_incomplete_type_error): Likewise.
1447 * c-typeck.c (require_complete_type): Add location parameter, pass it
1448 down to c_incomplete_type_error.
1449 (c_incomplete_type_error): Add location parameter, pass it down to
1450 error_at.
1451 (build_component_ref): Pass location down to c_incomplete_type_error.
1452 (default_conversion): Pass location down to require_complete_type.
1453 (build_array_ref): Likewise.
1454 (build_function_call_vec): Likewise.
1455 (convert_arguments): Likewise.
1456 (build_unary_op): Likewise.
1457 (build_c_cast): Likewise.
1458 (build_modify_expr): Likewise.
1459 (convert_for_assignment): Likewise.
1460 (c_finish_omp_clauses): Likewise.
1461
d6e83a8d
MM
14622016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1463
1464 PR c/43651
1465 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1466 is enabled.
1467 * c-errors.c (pedwarn_c90): Return true if warned.
1468 * c-tree.h (pedwarn_c90): Change return type to bool.
1469 (enum c_declspec_word): Add new enumerator cdw_atomic.
1470
5c3a10fb
MP
14712016-05-11 Marek Polacek <polacek@redhat.com>
1472
1473 PR c++/71024
1474 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1475 diagnose_mismatched_attributes and call it.
1476
cf68d92c
MP
14772016-05-10 Marek Polacek <polacek@redhat.com>
1478
1479 PR c/70255
1480 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1481 on a declaration following the definition.
1482
351f85c5
JJ
14832016-05-05 Jakub Jelinek <jakub@redhat.com>
1484
1485 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1486 parse it through to c_parser_c99_block_statement.
1487 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1488 caller.
1489
deef7113
MP
14902016-05-04 Marek Polacek <polacek@redhat.com>
1491
1492 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1493 OPT_Wdangling_else.
1494
de55efd5
MP
14952016-05-04 Marek Polacek <polacek@redhat.com>
1496
1497 PR c/48778
1498 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1499 for macro expansions.
1500
79ce98bc
MP
15012016-05-03 Marek Polacek <polacek@redhat.com>
1502
1503 PR c/70859
1504 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1505 check_builtin_function_arguments.
1506
fb2647aa
RB
15072016-05-03 Richard Biener <rguenther@suse.de>
1508
1509 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1510 the checksum from the previous stage.
1511
77886428
CP
15122016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1513
1514 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1515 c_finish_omp_clauses.
1516 (c_parser_omp_all_clauses): Likewise.
1517 (c_parser_oacc_cache): Likewise.
1518 (c_parser_oacc_loop): Likewise.
1519 (omp_split_clauses): Likewise.
1520 (c_parser_omp_declare_target): Likewise.
1521 (c_parser_cilk_all_clauses): Likewise.
1522 (c_parser_cilk_for): Likewise.
1523 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1524 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1525
7176a4a0
MP
15262016-05-02 Marek Polacek <polacek@redhat.com>
1527
1528 PR c/70851
1529 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1530 incomplete type.
1531
e7ff0319
CP
15322016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1533
1534 PR middle-end/70626
1535 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1536 OACC_LOOP_CLAUSE_MASK.
1537 (c_parser_oacc_kernels_parallel): Update call to
1538 c_oacc_split_loop_clauses.
1539
9f405ce1
AM
15402016-04-28 Andrew MacLeod <amacleod@redhat.com>
1541
1542 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1543 argument to build_modify_expr in two cases.
1544
c1e1f433
BS
15452016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1546
1547 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1548 warn_for_memset instead of warning directly here.
1549
2448a956
MP
15502016-04-26 Marek Polacek <polacek@redhat.com>
1551
1552 PR c/67784
1553 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1554 out of ...
1555 (c_parser_for_statement): ... here.
1556 (c_parser_if_statement): Use it.
1557 (c_parser_switch_statement): Use it.
1558 (c_parser_while_statement): Use it.
1559
b02a5e26
MP
1560 PR c/70791
1561 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1562
477d4906
IV
15632016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1564
1565 PR c++/69363
1566 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1567 instead of c_finish_cilk_clauses.
1568 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1569 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1570 floating-point variables in the linear clause for Cilk Plus.
1571
fe37c7af
MM
15722016-04-18 Michael Matz <matz@suse.de>
1573
1574 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1575 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1576
949505a9
MP
15772016-04-15 Marek Polacek <polacek@redhat.com>
1578
1579 PR c/70671
1580 * c-typeck.c (build_unary_op): Pass location down to error and
1581 warning call.
1582
dda1bf61
JJ
15832016-04-15 Jakub Jelinek <jakub@redhat.com>
1584
1585 PR c/70436
1586 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1587 where needed.
1588 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1589 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1590 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1591 Adjust c_parser_pragma callers.
1592 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1593 caller.
1594 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1595 c_parser_statement.
1596 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1597 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1598 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1599 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1600 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1601 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1602 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1603 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1604 down where needed.
1605 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1606 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1607 calls.
1608
99cd9857
MP
16092016-04-13 Marek Polacek <polacek@redhat.com>
1610
1611 PR c/70436
1612 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1613 adjust callers.
1614 (c_parser_statement): Likewise.
1615 (c_parser_c99_block_statement): Likewise.
1616 (c_parser_while_statement): Likewise.
1617 (c_parser_for_statement): Likewise.
1618 (c_parser_if_body): Don't set IF_P here.
1619 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1620 about dangling else here.
1621 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1622 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1623 warn about dangling else here.
1624
f13355da
MP
16252016-04-04 Marek Polacek <polacek@redhat.com>
1626
1627 PR c/70307
1628 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1629
5fde6a45
MP
16302016-03-31 Marek Polacek <polacek@redhat.com>
1631
1632 PR c/70297
1633 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1634
4bbf545b
DM
16352016-03-18 David Malcolm <dmalcolm@redhat.com>
1636
1637 PR c/70281
1638 * c-parser.c (c_parser_postfix_expression): Set the source range
1639 for uses of "__builtin_types_compatible_p".
1640
fcc2b74f
JJ
16412016-03-17 Jakub Jelinek <jakub@redhat.com>
1642
1643 PR c/70280
1644 * c-typeck.c (composite_type): Don't count void_list_node
1645 into len, if the list is terminated by void_list_node, start
1646 with void_list_node instead of NULL for newargs. Stop
1647 at void_list_node.
1648
ab4c578f
MP
16492016-03-16 Marek Polacek <polacek@redhat.com>
1650
1651 PR c/70093
1652 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1653 nested functions returning VM types.
1654
96b3c82d
CP
16552016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1656
1657 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1658 when calling c_finish_omp_clauses.
1659
29b9828f
BS
16602016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1661
1662 PR c/69824
1663 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1664 for later.
1665
7ff6ca38
MP
16662016-03-04 Marek Polacek <polacek@redhat.com>
1667
1668 PR c/69798
1669 * c-parser.c (c_parser_postfix_expression): Call
1670 c_parser_cast_expression rather than c_parser_postfix_expression.
1671
686e2237
JJ
16722016-03-01 Jakub Jelinek <jakub@redhat.com>
1673
1674 PR c/69796
1675 PR c/69974
1676 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1677 of incomplete decls to error_mark_node.
1678
0b05329b
MP
16792016-02-24 Marek Polacek <polacek@redhat.com>
1680
1681 PR c/69819
1682 * c-decl.c (finish_decl): Don't update the copy of the type of a
1683 different decl type.
1684
067fbd8b
JJ
16852016-02-23 Jakub Jelinek <jakub@redhat.com>
1686
1687 PR objc/69844
1688 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1689 in id_kind reclassification.
1690
bf14eba2
JJ
16912016-02-16 Jakub Jelinek <jakub@redhat.com>
1692
1693 PR c/69835
1694 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1695
ba539195
JN
16962016-02-16 James Norris <jnorris@codesourcery.com>
1697
1698 PR c/64748
1699 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1700
16595a1f
BS
17012016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1702
f48dfe98
BS
1703 * c-decl.c (build_null_declspecs): Zero the entire struct.
1704
16595a1f
BS
1705 PR c/69522
1706 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1707 callers changed. If nested_p is true, use it to call
1708 finish_implicit_inits.
1709 * c-tree.h (finish_implicit_inits): Declare.
1710 * c-typeck.c (finish_implicit_inits): New function. Move code
1711 from ...
1712 (push_init_level): ... here.
1713 (set_designator, process_init_element): Call finish_implicit_inits.
1714
66756373
JJ
17152016-02-11 Jakub Jelinek <jakub@redhat.com>
1716
1717 PR c/69768
1718 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1719 arguments for -Waddress warning.
1720
1066e9b5
JJ
17212016-02-04 Jakub Jelinek <jakub@redhat.com>
1722
1723 PR c/69669
1724 * c-decl.c (finish_enum): When honoring mode attribute,
1725 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1726
3a5d2ba4
JJ
17272016-01-29 Jakub Jelinek <jakub@redhat.com>
1728
1729 PR debug/69518
1730 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1731 all type variants, not just TYPE_MAIN_VARIANT.
1732
cbdd8ae0
JJ
17332016-01-27 Jakub Jelinek <jakub@redhat.com>
1734
1735 PR debug/66869
1736 * c-decl.c (c_write_global_declarations_1): Warn with
1737 warn_unused_function if static prototype without definition
1738 is not C_DECL_USED.
1739
fa74a4bc
MP
17402016-01-27 Marek Polacek <polacek@redhat.com>
1741
1742 PR c/68062
1743 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1744 to unsigned, if needed. Add -Wsign-compare warning.
1745
13f92e8d
JJ
17462016-01-26 Jakub Jelinek <jakub@redhat.com>
1747
1748 PR tree-optimization/69483
1749 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1750
cd8e73dc 17512016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1752
1753 PR c/24293
1754 * c-tree.h (incomplete_record_decls): Declare.
1755 * c-parser.c (incomplete_record_decls): Define.
1756 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1757 report error if any decl has zero size.
1758 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1759 or enum type to incomplete_record_decls.
1760
e6d6ec9e
TV
17612016-01-14 Tom de Vries <tom@codesourcery.com>
1762
1763 PR tree-optimization/68773
1764 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1765 set force_output.
1766
00083992
MP
17672016-01-14 Marek Polacek <polacek@redhat.com>
1768
1769 PR c/69262
1770 * c-decl.c (grokdeclarator): Provide more information for invalid
1771 array declarations.
1772
7443cf13
DM
17732016-01-06 David Malcolm <dmalcolm@redhat.com>
1774
1775 * c-parser.c (c_parser_unary_expression): For dereferences, build
1776 a combined location before calling build_indirect_ref, so that
1777 error reports cover the full range, manually updating the c_expr
1778 src_range.
1779
6b131d5b
MP
17802016-01-06 Marek Polacek <polacek@redhat.com>
1781
1782 PR sanitizer/69099
1783 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1784 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1785 NULL.
1786
818ab71a
JJ
17872016-01-04 Jakub Jelinek <jakub@redhat.com>
1788
1789 Update copyright years.
1790
2fe0a208
MP
17912016-01-04 Marek Polacek <polacek@redhat.com>
1792
1793 PR c/68908
1794 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1795 optimization to use __atomic_fetch_* built-in if possible.
1796
c7b48c8a
TS
17972015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1798
1799 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1800 into...
1801 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1802 all users.
1803
fda5652f
MP
18042015-12-22 Marek Polacek <polacek@redhat.com>
1805
1806 PR c/69002
1807 * c-typeck.c (build_component_ref): Warn when acessing elements of
1808 atomic structures or unions.
1809
745e411d
DM
18102015-12-21 David Malcolm <dmalcolm@redhat.com>
1811
1812 * c-typeck.c: Include "gcc-rich-location.h".
1813 (build_binary_op): In the two places that call binary_op_error,
1814 create a gcc_rich_location and populate it with the location of
1815 the binary op and its two operands.
1816
94c40e19
DM
18172015-12-16 David Malcolm <dmalcolm@redhat.com>
1818
1819 * c-parser.c (c_parser_statement_after_labels): When calling
1820 c_finish_return, Use the return expression's location if it has
1821 one, falling back to the location of the first token within it.
1822 * c-typeck.c (c_finish_return): When issuing warnings about
1823 the incorrect presence/absence of a return value, issue a note
1824 showing the declaration of the function.
1825
de67c4c3
DM
18262015-12-16 David Malcolm <dmalcolm@redhat.com>
1827
1828 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1829 to 4.
1830 (c_parser_peek_nth_token): New function.
1831 (c_parser_peek_conflict_marker): New function.
1832 (c_parser_error): Detect conflict markers and report them as such.
1833
a10704e1
DM
18342015-12-16 David Malcolm <dmalcolm@redhat.com>
1835
1836 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1837 to preserve range information for the primary expression
1838 in the call to c_parser_postfix_expression_after_primary.
1839
8062bca6
DM
18402015-12-16 David Malcolm <dmalcolm@redhat.com>
1841
1842 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1843 expression location, falling back on the first token location,
1844 rather than always using the latter.
1845
d06f8b75
MP
18462015-12-16 Marek Polacek <polacek@redhat.com>
1847
1848 PR c/64637
1849 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1850 available.
1851
2994fb91
MP
18522015-12-15 Marek Polacek <polacek@redhat.com>
1853
1854 PR c/68907
1855 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1856 artificial decl.
1857
a1b93f8d
DM
18582015-12-08 David Malcolm <dmalcolm@redhat.com>
1859
1860 * c-parser.c (c_parser_alignof_expression): Capture location of
1861 closing parenthesis (if any), or of end of unary expression, and
1862 use it to build a src_range for the expression.
1863
46c6e1e2
DM
18642015-12-08 David Malcolm <dmalcolm@redhat.com>
1865
1866 PR c/68757
1867 * c-parser.c (c_parser_get_builtin_args): Add
1868 "out_close_paren_loc" param, and write back to it.
1869 (c_parser_postfix_expression): Capture the closing
1870 parenthesis location for RID_CHOOSE_EXPR,
1871 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1872 RID_BUILTIN_SHUFFLE and use it to set the source range
1873 for such expressions; within RID_BUILTIN_COMPLEX set
1874 the underlying location.
1875
66189108
MP
18762015-12-07 Marek Polacek <polacek@redhat.com>
1877
1878 PR c/68668
1879 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1880 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1881
f187980b
EB
18822015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1883
1884 * c-tree.h (c_build_va_arg): Adjust prototype.
1885 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1886 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1887 parameter, adjust throughout and issue an error if EXPR is a component
1888 with reverse storage order.
1889
4250754e
JM
18902015-12-02 Jason Merrill <jason@redhat.com>
1891
1892 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1893 (c_fully_fold_internal, decl_constant_value_for_optimization):
1894 Move from c-common.c.
1895 * c-tree.h: Declare decl_constant_value_for_optimization.
1896 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1897
e9e32ee6
JM
18982015-12-02 Joseph Myers <joseph@codesourcery.com>
1899
1900 PR c/68162
1901 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1902 following link from declarator to next declarator. Track original
1903 qualified type and pass it to c_build_qualified_type.
1904 * c-typeck.c (c_build_qualified_type): Add arguments
1905 orig_qual_type and orig_qual_indirect.
1906
ff7a55bf
TS
19072015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1908
1909 * c-parser.c (c_parser_omp_clause_name)
1910 (c_parser_oacc_all_clauses): Alphabetical sorting.
1911
657e4e47
JJ
19122015-12-02 Jakub Jelinek <jakub@redhat.com>
1913
1914 PR c/68533
1915 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1916 for diagnostics.
1917
37d5ad46
JB
19182015-12-01 Julian Brown <julian@codesourcery.com>
1919 Cesar Philippidis <cesar@codesourcery.com>
1920 James Norris <James_Norris@mentor.com>
1921
1922 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1923 (c_parser_oacc_clause_use_device): New function.
1924 (c_parser_oacc_all_clauses): Add use_device support.
1925 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1926 (c_parser_oacc_host_data): New function.
1927 (c_parser_omp_construct): Add host_data support.
1928 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1929 * c-typeck.c (c_finish_oacc_host_data): New function.
1930 (c_finish_omp_clauses): Add use_device support.
1931
a4850ce9
JH
19322015-11-29 Jan Hubicka <hubicka@ucw.cz>
1933
1934 PR c/67106
1935 * c-decl.c: Set TYPE_PACKED in variants.
1936
b58d3df2
ML
19372015-11-27 Martin Liska <mliska@suse.cz>
1938
1939 PR c++/68312
1940 * c-array-notation.c (fix_builtin_array_notation_fn):
1941 Use release_vec_vec instead of vec::release.
1942 (build_array_notation_expr): Likewise.
1943 (fix_conditional_array_notations_1): Likewise.
1944 (fix_array_notation_expr): Likewise.
1945 (fix_array_notation_call_expr): Likewise.
1946
aec17bfe
JJ
19472015-11-27 Jakub Jelinek <jakub@redhat.com>
1948
1949 PR c/63326
1950 * c-parser.c (c_parser_compound_statement_nostart): If
1951 last_label is true, use pragma_stmt instead of pragma_compound
1952 as second c_parser_pragma argument.
1953 (c_parser_omp_ordered, c_parser_omp_target_update,
1954 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1955 false as second argument to c_parser_skip_to_pragma_eol after
1956 diagnosing standalone directives used in pragma_stmt context.
1957
688c4de0
IV
19582015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1959
1960 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1961 with "if (ENABLE_OFFLOADING)".
1962
cbd03aee
DM
19632015-11-23 David Malcolm <dmalcolm@redhat.com>
1964
1965 PR objc/68438
1966 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1967 for various Objective-C constructs: Class.name syntax,
1968 @selector(), @protocol(), @encode(), and [] message syntax.
1969
a87a86e1
DM
19702015-11-20 David Malcolm <dmalcolm@redhat.com>
1971
1972 PR 62314
1973 * c-typeck.c (should_suggest_deref_p): New function.
1974 (build_component_ref): Special-case POINTER_TYPE when
1975 generating a "not a structure of union" error message, and
1976 suggest a "->" rather than a ".", providing a fix-it hint.
1977
8ece8dfb
DM
19782015-11-19 David Malcolm <dmalcolm@redhat.com>
1979
1980 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1981 candidate into a new function, find_closest_identifier.
1982
433068cc
MP
19832015-11-19 Marek Polacek <polacek@redhat.com>
1984
1985 PR c/68412
1986 * c-typeck.c (parser_build_binary_op): Properly handle
1987 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1988
bef08b71
DM
19892015-11-17 David Malcolm <dmalcolm@redhat.com>
1990
1991 * c-parser.c (set_c_expr_source_range): Bulletproof both
1992 overloaded implementations against NULL expr->value.
1993 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1994 values.
1995 (c_parser_unary_expression): Likewise when handling addresses of
1996 labels.
1997 (c_parser_postfix_expression): Likewise for statement expressions,
1998 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1999 __builtin_va_arg, and for __builtin_offset_of.
2000 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2001 src_range using the range of the braced initializer.
2002 (c_parser_transaction_expression): Set src_range for "ret" to a
2003 sane pair of values.
2004
fff77217
KY
20052015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2006
2007 * c-parser.c (c_finish_omp_declare_simd): Look for
2008 "simd" attribute as well. Update error message.
2009
1d899da2
TS
20102015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2011
2012 * c-parser.c (c_parser_omp_declare_target): Adjust.
2013
e4606348
JJ
20142015-11-14 Jakub Jelinek <jakub@redhat.com>
2015
2016 * c-typeck.c (c_finish_omp_clauses): Don't mark
2017 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2018
3e636daf
MP
20192015-11-14 Marek Polacek <polacek@redhat.com>
2020
2021 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2022 * c-typeck.c: Likewise.
2023
ebedc9a3
DM
20242015-11-13 David Malcolm <dmalcolm@redhat.com>
2025
2026 * c-decl.c (warn_defaults_to): Pass line_table to
2027 rich_location ctor.
2028 * c-errors.c (pedwarn_c99): Likewise.
2029 (pedwarn_c90): Likewise.
2030 * c-parser.c (set_c_expr_source_range): New functions.
2031 (c_token::get_range): New method.
2032 (c_token::get_finish): New method.
2033 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2034 based on the range from the start of the LHS to the end of the
2035 RHS.
2036 (c_parser_conditional_expression): Likewise, based on the range
2037 from the start of the cond.value to the end of exp2.value.
2038 (c_parser_binary_expression): Call set_c_expr_source_range on
2039 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2040 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2041 based on the cast_loc through to the end of the expr.
2042 (c_parser_unary_expression): Likewise, based on the
2043 op_loc through to the end of op.
2044 (c_parser_sizeof_expression) Likewise, based on the start of the
2045 sizeof token through to either the closing paren or the end of
2046 expr.
2047 (c_parser_postfix_expression): Likewise, using the token range,
2048 or from the open paren through to the close paren for
2049 parenthesized expressions.
2050 (c_parser_postfix_expression_after_primary): Likewise, for
2051 various kinds of expression.
2052 * c-tree.h (struct c_expr): Add field "src_range".
2053 (c_expr::get_start): New method.
2054 (c_expr::get_finish): New method.
2055 (set_c_expr_source_range): New decls.
2056 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2057 on ret for prefix unary ops.
2058 (parser_build_binary_op): Likewise, running from the start of
2059 arg1.value through to the end of arg2.value.
2060
ec8b536f
MP
20612015-11-13 Marek Polacek <polacek@redhat.com>
2062
2063 PR c/68320
2064 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2065
277fe616
DM
20662015-11-13 David Malcolm <dmalcolm@redhat.com>
2067
2068 * c-typeck.c: Include spellcheck.h.
2069 (lookup_field_fuzzy_find_candidates): New function.
2070 (lookup_field_fuzzy): New function.
2071 (build_component_ref): If the field was not found, try using
2072 lookup_field_fuzzy and potentially offer a suggestion.
2073
6e232ba4
JN
20742015-11-12 James Norris <jnorris@codesourcery.com>
2075 Joseph Myers <joseph@codesourcery.com>
2076
2077 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2078 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2079 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2080 and PRAGMA_OMP_CLAUSE_LINK.
2081 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2082 and PRAGMA_OACC_CLAUSE_LINK.
2083 (OACC_DECLARE_CLAUSE_MASK): New definition.
2084 (c_parser_oacc_declare): New function.
2085
9be4f715
MP
20862015-11-12 Marek Polacek <polacek@redhat.com>
2087
2088 PR c/67784
2089 * c-parser.c (c_parser_for_statement): Reclassify the token in
2090 a correct scope.
2091
e78bede6
MP
20922015-11-11 Marek Polacek <polacek@redhat.com>
2093
2094 PR c/68107
2095 PR c++/68266
2096 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2097 checking the size of an array.
2098
69f293c9
AM
20992015-11-11 Andrew MacLeod <amacleod@redhat.com>
2100
2101 * c-array-notation.c: Remove unused header files.
2102 * c-aux-info.c: Likewise.
2103 * c-convert.c: Likewise.
2104 * c-decl.c: Likewise.
2105 * c-errors.c: Likewise.
2106 * c-lang.c: Likewise.
2107 * c-objc-common.c: Likewise.
2108 * c-parser.c: Likewise.
2109 * c-typeck.c: Likewise.
2110 * gccspec.c: Likewise.
2111
3a40d81d
NS
21122015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2113 Cesar Philippidis <cesar@codesourcery.com>
2114 James Norris <jnorris@codesourcery.com>
2115 Julian Brown <julian@codesourcery.com>
2116 Nathan Sidwell <nathan@codesourcery.com>
2117
2118 c/
2119 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2120 routine arg.
2121 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2122 (c_parser_pragma): Parse 'acc routine'.
2123 (OACC_ROUTINE_CLAUSE_MARK): Define.
2124 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2125
fc402eec
AA
21262015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2127
2128 PR debug/67192
2129 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2130 location of the backward-goto to the start of the loop body.
2131
f6b0b3db
AA
21322015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2133
2134 PR debug/67192
2135 * c-parser.c (c_parser_while_statement): Finish the loop before
2136 parsing ahead for misleading indentation.
2137 (c_parser_for_statement): Likewise.
2138
ee45a32d
EB
21392015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2140
2141 * c-decl.c (finish_struct): If the structure has reverse storage
2142 order, rewrite the type of array fields with scalar component. Call
2143 maybe_apply_pragma_scalar_storage_order on entry.
2144 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2145 errors on bit-fields and reverse SSO here and not...
2146 (c_mark_addressable): ...here.
2147 (output_init_element): Adjust call to initializer_constant_valid_p.
2148 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2149
8a645150
DM
21502015-11-06 David Malcolm <dmalcolm@redhat.com>
2151
2152 * c-decl.c (warn_defaults_to): Update for change in signature
2153 of diagnostic_set_info.
2154 * c-errors.c (pedwarn_c99): Likewise.
2155 (pedwarn_c90): Likewise.
2156 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2157 for textinfo::set_location.
2158
7a5e4956
CP
21592015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2160 Thomas Schwinge <thomas@codesourcery.com>
2161 James Norris <jnorris@codesourcery.com>
2162
2163 * c-parser.c (c_parser_omp_clause_name): Add support for
2164 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2165 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2166 default(none) in OpenACC.
2167 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2168 arguments.
2169 (c_parser_oacc_clause_tile): New function.
2170 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2171 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2172 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2173 TILE}.
2174 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2175 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2176 FIRSTPRIVATE}.
2177 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2178 (c_parser_oacc_update): Update the error message for missing clauses.
2179 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2180 and OMP_CLAUSE_INDEPENDENT.
2181
bfcfbfa0
MP
21822015-11-05 Marek Polacek <polacek@redhat.com>
2183
2184 PR c/68090
2185 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2186 deal with pre-evaluation on invalid types.
2187
e01d41e5
JJ
21882015-11-05 Jakub Jelinek <jakub@redhat.com>
2189 Ilya Verbin <ilya.verbin@intel.com>
2190
2191 * c-parser.c: Include context.h and gimple-expr.h.
2192 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2193 monotonic together with nonmonotonic.
2194 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2195 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2196 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2197 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2198 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2199 expressions on combined target teams before the target.
2200 (c_parser_omp_declare_target): If decl has "omp declare target" or
2201 "omp declare target link" attribute, and cgraph or varpool node already
2202 exists, then set corresponding flags. Call c_finish_omp_clauses
2203 in the parenthesized extended-list syntax case.
2204 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2205 declare target.
2206 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2207 on OMP_CLAUSE_REDUCTION array sections.
2208 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2209 into the constant offset, or for variable low-bound using
2210 POINTER_PLUS_EXPR. For structure element based array sections use
2211 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2212 (c_finish_omp_clauses): Drop generic_field_head, structure
2213 elements are now always mapped even as array section bases,
2214 diagnose same var in data sharing and mapping clauses. Diagnose if
2215 linear step on declare simd is neither a constant nor a uniform
2216 parameter. Look through POINTER_PLUS_EXPR for array section
2217 reductions. Diagnose the same var or function appearing multiple
2218 times on the same directive. Fix up wording for the to clause if t
2219 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2220 modifier on kinds other than dynamic or guided or nonmonotonic
2221 modifier together with ordered clause.
2222
4bf9e5a8
TS
22232015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2224 Chung-Lin Tang <cltang@codesourcery.com>
2225
2226 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2227
2adfab87
AM
22282015-10-29 Andrew MacLeod <amacleod@redhat.com>
2229
2230 * c-array-notation.c: Reorder #include's and remove duplicates.
2231 * c-aux-info.c: Likewise.
2232 * c-convert.c: Likewise.
2233 * c-decl.c: Likewise.
2234 * c-errors.c: Likewise.
2235 * c-lang.c: Likewise.
2236 * c-objc-common.c: Likewise.
2237 * c-parser.c: Likewise.
2238 * c-typeck.c: Likewise.
2239
e922069e
JW
22402015-10-26 Jim Wilson <jim.wilson@linaro.org>
2241
2242 PR debug/66068
2243 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2244 after calling build_qualified_type.
2245
765dd391
CP
22462015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2247 Thomas Schwinge <thomas@codesourcery.com>
2248 James Norris <jnorris@codesourcery.com>
2249 Joseph Myers <joseph@codesourcery.com>
2250 Julian Brown <julian@codesourcery.com>
2251 Bernd Schmidt <bschmidt@redhat.com>
2252
2253 * c-parser.c (c_parser_oacc_shape_clause): New.
2254 (c_parser_oacc_simple_clause): New.
2255 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2256 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2257
88bae6f4
TS
22582015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2259 James Norris <jnorris@codesourcery.com>
2260 Cesar Philippidis <cesar@codesourcery.com>
2261
2262 PR c/64765
2263 PR c/64880
2264 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2265 parameters, and handle these. Adjust all users.
2266 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2267 into...
2268 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2269 all users.
2270 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2271 declare functions.
2272 (c_finish_omp_construct): Declare function.
2273 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2274 Merge functions into...
2275 (c_finish_omp_construct): ... this new function.
2276
a8fc2579
RB
22772015-10-22 Richard Biener <rguenther@suse.de>
2278
2279 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2280 before folding a MINUS_EXPR.
2281
e9122ef6
MP
22822015-10-21 Marek Polacek <polacek@redhat.com>
2283
2284 PR c/68024
2285 * c-decl.c (start_function): Warn about vararg functions without
2286 a prototype.
2287
9f47c7e5
IE
22882015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2289
2290 * c-typeck.c (build_conditional_expr): Use boolean vector
2291 type for vector comparison.
2292 (build_vec_cmp): New.
2293 (build_binary_op): Use build_vec_cmp for comparison.
2294
fa60eeb9
MP
22952015-10-20 Marek Polacek <polacek@redhat.com>
2296
2297 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2298
2c7020eb
MP
22992015-10-20 Marek Polacek <polacek@redhat.com>
2300
2301 PR c/67964
2302 * c-parser.c (c_parser_attributes): Break out of the loop if the
2303 token after an attribute isn't a comma.
2304
d9a6bd32
JJ
23052015-10-13 Jakub Jelinek <jakub@redhat.com>
2306 Aldy Hernandez <aldyh@redhat.com>
2307
2308 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2309 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2310 (c_parser_omp_variable_list): Handle structure elements for
2311 map, to and from clauses. Handle array sections in reduction
2312 clause. Formatting fixes.
2313 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2314 if clause modifiers.
2315 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2316 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2317 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2318 c_parser_omp_clause_is_device_ptr): New functions.
2319 (c_parser_omp_clause_ordered): Parse optional parameter.
2320 (c_parser_omp_clause_reduction): Handle array reductions.
2321 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2322 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2323 functions.
2324 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2325 (c_parser_omp_clause_depend_sink): New function.
2326 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2327 (c_parser_omp_clause_map): Parse release/delete map kinds and
2328 optional always modifier.
2329 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2330 and c_finish_omp_clauses callers.
2331 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2332 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2333 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2334 (OMP_CRITICAL_CLAUSE_MASK): Define.
2335 (c_parser_omp_critical): Parse critical clauses.
2336 (c_parser_omp_for_loop): Handle doacross loops, adjust
2337 c_finish_omp_for and c_finish_omp_clauses callers.
2338 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2339 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2340 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2341 (c_parser_omp_for): Disallow ordered clause when combined with
2342 distribute. Disallow linear clause when combined with distribute
2343 and not combined with simd.
2344 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2345 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2346 parse clauses and if depend clause is found, don't parse a body.
2347 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2348 Allow target parallel without for after it.
2349 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2350 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2351 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2352 invalid kinds.
2353 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2354 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2355 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2356 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2357 functions.
2358 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2359 defaultmap and is_device_ptr clauses.
2360 (c_parser_omp_target): Parse target parallel and target simd. Set
2361 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2362 and target exit data. Diagnose invalid map kinds.
2363 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2364 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2365 construct.
2366 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2367 &omp_priv.
2368 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2369 (c_parser_omp_taskloop): New function.
2370 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2371 handle PRAGMA_OMP_TASKLOOP.
2372 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2373 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2374 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2375 Add IS_OMP argument, handle structure element bases, diagnose
2376 bitfields, pass IS_OMP recursively, diagnose known zero length
2377 array sections in depend clauses, handle array sections in reduction
2378 clause, diagnose negative length even for pointers.
2379 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2380 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2381 array sections in reduction clause, set
2382 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2383 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2384 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2385 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2386
21ba0cea
MP
23872015-10-06 Marek Polacek <polacek@redhat.com>
2388
2389 * c-parser.c (c_parser_statement_after_labels): Use
2390 protected_set_expr_location.
2391 (c_parser_omp_clause_num_gangs): Likewise.
2392 (c_parser_omp_clause_num_threads): Likewise.
2393 (c_parser_omp_clause_num_workers): Likewise.
2394 (c_parser_omp_clause_vector_length): Likewise.
2395 (c_parser_omp_clause_num_teams): Likewise.
2396 (c_parser_omp_clause_thread_limit): Likewise.
2397 * c-typeck.c (build_c_cast): Likewise.
2398 (c_cast_expr): Likewise.
2399
624d31fe
RS
24002015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2401
2402 * c-typeck.c (c_tree_equal): Use real_equal instead of
2403 REAL_VALUES_EQUAL.
2404
b8fd7909
JM
24052015-10-04 Jason Merrill <jason@redhat.com>
2406
2407 * c-parser.c (c_lex_one_token): Handle @synchronized.
2408 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2409 can change whether the function is transaction_safe.
2410
1c7485af
MP
24112015-10-02 Marek Polacek <polacek@redhat.com>
2412
2413 PR c/67730
2414 * c-typeck.c (convert_for_assignment): Use the expansion point
2415 location throughout.
2416
3e3b8d63
MP
24172015-10-02 Marek Polacek <polacek@redhat.com>
2418
2419 PR c/64249
2420 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2421 and pass it down to c_parser_if_statement.
2422 (c_parser_else_body): Add CHAIN parameter and pass it down to
2423 c_parser_statement_after_labels.
2424 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2425 duplicated if-else-if conditions.
2426
aabef2de
MP
24272015-10-01 Marek Polacek <polacek@redhat.com>
2428
2429 * c-typeck.c (convert_for_assignment): Improve commentary.
2430
de8ddd5f
MP
24312015-09-30 Marek Polacek <polacek@redhat.com>
2432
2433 PR c/67730
2434 * c-typeck.c (c_finish_return): Use the expansion point location for
2435 certain "return with value" warnings.
2436
c4914de6
MLI
24372015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2438
2439 * c-parser.c (pragma_lex): Add loc argument.
2440
0e36f5c7
MP
24412015-09-15 Marek Polacek <polacek@redhat.com>
2442
2443 PR c/67580
2444 * c-decl.c (tag_exists_p): New function.
2445 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2446 struct/union/enum keywords are missing.
2447 * c-tree.h (tag_exists_p): Declare.
2448
2f3bb934
MP
24492015-09-15 Marek Polacek <polacek@redhat.com>
2450
2451 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2452 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2453 Return NULL_TREE instead of 0.
2454 (lookup_name): Return NULL_TREE instead of 0.
2455 (lookup_name_in_scope): Likewise.
2456 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2457 (parser_xref_tag): Use false instead of 0.
2458 (start_struct): Use true instead of 1.
2459 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2460
aa256c4a
MP
24612015-09-14 Marek Polacek <polacek@redhat.com>
2462
2463 * c-typeck.c (set_nonincremental_init_from_string): Use
2464 HOST_WIDE_INT_M1U when shifting a negative value.
2465
dbb68221
MW
24662015-09-09 Mark Wielaard <mjw@redhat.com>
2467
2468 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2469 parm against NULL.
2470
a8a098ac
JJ
24712015-09-10 Jakub Jelinek <jakub@redhat.com>
2472
2473 PR c/67502
2474 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2475 into OMP_FOR_PRE_BODY rather than before the loop.
2476
f4b189d5
JJ
24772015-09-09 Jakub Jelinek <jakub@redhat.com>
2478
0bb99c11
JJ
2479 PR c/67501
2480 * c-parser.c (c_parser_oacc_all_clauses,
2481 c_parser_omp_all_clauses): Remove invalid clause from
2482 list of clauses even if parser->error is set.
2483
fce5e5e3
JJ
2484 PR c/67500
2485 * c-parser.c (c_parser_omp_clause_aligned,
2486 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2487 test for errors.
2488 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2489 error_mark_node.
2490
f4b189d5
JJ
2491 PR c/67495
2492 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2493 instead of c_parser_unary_expression. If the result is !lvalue_p,
2494 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2495
b2aaf235
MP
24962015-09-04 Marek Polacek <polacek@redhat.com>
2497
2498 PR sanitizer/67279
2499 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2500
1807ffc1
MS
25012015-09-03 Martin Sebor <msebor@redhat.com>
2502
2503 PR c/66516
8b652e65
JJ
2504 * c-typeck.c (convert_arguments, parser_build_unary_op,
2505 build_conditional_expr, c_cast_expr, convert_for_assignment,
2506 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2507 reject_gcc_builtin.
2508 (c_decl_implicit): Define.
2509
d04ff417
MP
25102015-09-02 Marek Polacek <polacek@redhat.com>
2511
2512 PR c/67432
2513 * c-parser.c (c_parser_enum_specifier): Give a better error for
2514 an empty enum.
2515
a79683d5
TS
25162015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2517
2518 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2519
191a6b94
MP
25202015-08-12 Marek Polacek <polacek@redhat.com>
2521
2522 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2523 LOC to it.
2524
420a9d9b
MP
25252015-08-03 Marek Polacek <polacek@redhat.com>
2526
2527 PR c/67088
2528 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2529 Use it.
2530 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2531
992118a1
PP
25322015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2533
2534 * c-parser.c (c_parser_if_body): Take token_indent_info
2535 argument. Call warn_for_misleading_indentation even when the
2536 body is a semicolon. Extract token_indent_infos corresponding
2537 to the guard, body and next tokens. Adjust call to
2538 warn_for_misleading_indentation accordingly.
2539 (c_parser_else_body): Likewise.
2540 (c_parser_if_statement): Likewise.
2541 (c_parser_while_statement): Likewise.
2542 (c_parser_for_statement): Likewise.
2543
46308474
LFSM
25442015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2545 Manuel López-Ibáñez <manu@gcc.gnu.org>
2546
2547 * c-decl.c (get_parm_info): Remove static var. Update warning
2548 message.
2549
05b28fd6
MP
25502015-07-27 Marek Polacek <polacek@redhat.com>
2551
2552 PR c++/66555
2553 PR c/54979
2554 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2555
451b5e48
MP
25562015-07-20 Marek Polacek <polacek@redhat.com>
2557
2558 PR c++/55095
2559 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2560 (build_binary_op): Warn about left shift overflows.
2561
1916bcb5
AM
25622015-07-09 Andrew MacLeod <amacleod@redhat.com>
2563
2564 * c-array-notation.c: Adjust includes for flags.h changes.
2565 * c-objc-common.c: Likewise.
2566
c7131fb2
AM
25672015-07-07 Andrew MacLeod <amacleod@redhat.com>
2568
2569 * c-array-notation.c: Adjust includes.
2570 * c-aux-info.c: Likewise.
2571 * c-convert.c: Likewise.
2572 * c-decl.c: Likewise.
2573 * c-errors.c: Likewise.
2574 * c-lang.c: Likewise.
2575 * c-objc-common.c: Likewise.
2576 * c-parser.c: Likewise.
2577 * c-typeck.c: Likewise.
2578
da2e71c9
MLI
25792015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2580
2581 PR fortran/66605
2582 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2583
b155cfd9
MP
25842015-06-29 Marek Polacek <polacek@redhat.com>
2585
2586 PR c/66322
2587 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2588 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2589 about -Wswitch-bool here.
2590 (do_case): Update c_add_case_label call.
2591 (c_finish_case): Update c_do_switch_warnings call.
2592
31521951
MP
25932015-06-27 Marek Polacek <polacek@redhat.com>
2594
2595 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2596
22d03525
MP
25972015-06-26 Marek Polacek <polacek@redhat.com>
2598
2599 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2600 INDIRECT_REF_P.
2601 * c-typeck.c (array_to_pointer_conversion): Likewise.
2602 (build_unary_op): Likewise.
2603 (c_finish_return): Likewise.
2604
f0889939
AM
26052015-06-25 Andrew MacLeod <amacleod@redhat.com>
2606
2607 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2608 * c-parser.c: Likewise.
2609
8d67ee55
RS
26102015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2611
2612 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2613 instead of pointer_hash.
2614 (detect_field_duplicates): Likewise.
2615
0ae9bd27
MP
26162015-06-25 Marek Polacek <polacek@redhat.com>
2617
2618 * c-array-notation.c: Use VAR_P throughout.
2619 * c-decl.c: Likewise.
2620 * c-objc-common.c: Likewise.
2621 * c-parser.c: Likewise.
2622 * c-typeck.c: Likewise.
2623
62f9079a
MP
26242015-06-25 Marek Polacek <polacek@redhat.com>
2625
2626 * c-decl.c: Use is_global_var throughout.
2627 * c-parser.c: Likewise.
2628 * c-typeck.c: Likewise.
2629
abb226c9
AM
26302015-06-17 Andrew MacLeod <amacleod@redhat.com>
2631
2632 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2633 * c-aux-info.c: Likewise.
2634 * c-convert.c: Likewise.
2635 * c-decl.c: Likewise.
2636 * c-errors.c: Likewise.
2637 * c-lang.c: Likewise.
2638 * c-objc-common.c: Likewise.
2639 * c-parser.c: Likewise.
2640 * c-typeck.c: Likewise.
2641
8cbababc
JH
26422015-06-11 Jan Hubicka <hubicka@ucw.cz>
2643
2644 PR middle-end/66325
2645 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2646 variants.
2647
a0349665
PMR
26482015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2649
2650 * c-decl.c (pop_scope): Register the main translation unit
2651 through the new debug hook.
2652
13fdf2e2
AM
26532015-06-08 Andrew MacLeod <amacleod@redhat.com>
2654
2655 * c-array-notation.c : Adjust include files.
2656 * c-aux-info.c : Likewise.
2657 * c-convert.c : Likewise.
2658 * c-decl.c : Likewise.
2659 * c-errors.c : Likewise.
2660 * c-lang.c : Likewise.
2661 * c-lang.h : Likewise.
2662 * c-objc-common.c : Likewise.
2663 * c-parser.c : Likewise.
2664 * c-typeck.c : Likewise.
2665
d7438551
AH
26662015-06-05 Aldy Hernandez <aldyh@redhat.com>
2667
2668 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2669 immediately clobber it.
2670 (c_write_global_declarations_1): Remove call to
2671 check_global_declaration_1.
2672 (c_write_global_declarations_2): Remove.
2673 (c_write_final_cleanups): Rename from c_write_global_declarations.
2674 Remove call to finalize_compilation_unit.
2675 Remove calls to debugging hooks.
2676 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2677 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2678 * c-tree.h: Remove c_write_global_declarations.
2679
ecb9f223
AM
26802015-06-04 Andrew MacLeod <amacleod@redhat.com>
2681
2682 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2683 * c-aux-info.c: Likewise.
2684 * c-convert.c: Likewise.
2685 * c-decl.c: Likewise.
2686 * c-errors.c: Likewise.
2687 * c-lang.c: Likewise.
2688 * c-objc-common.c: Likewise.
2689 * c-parser.c: Likewise.
2690 * c-typeck.c: Likewise.
2691
9482b620
MP
26922015-06-04 Marek Polacek <polacek@redhat.com>
2693
2694 PR c/66341
2695 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2696 it is a lvalue.
2697
bc51ace3
PK
26982015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2699
2700 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2701 Warn for empty struct.
2702 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2703
ea5b45b6
AT
27042015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2705
2706 * c-decl.c (start_function): Call plugin before parsing.
2707 (finish_function): Call plugin after parsing.
2708
c2d47482
PK
27092015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2710
2711 PR c/49551
2712 * c-decl.c (merge_decls): Merge DECL_COMMON.
2713
a95492ab
JW
27142015-05-22 Jim Wilson <jim.wilson@linaro.org>
2715
2716 * Make-lang.in (check_gcc_pallelize): Define.
2717
fd5c817a
MP
27182015-05-22 Marek Polacek <polacek@redhat.com>
2719
2720 PR c/47043
2721 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2722 attributes.
2723
c7b70a3c
MP
27242015-05-21 Marek Polacek <polacek@redhat.com>
2725
2726 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2727 DECL_BUILT_IN.
2728
21b634ae
MP
27292015-05-20 Marek Polacek <polacek@redhat.com>
2730
2731 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2732 * c-typeck.c: Likewise.
2733
296a8c2f
MP
27342015-05-19 Marek Polacek <polacek@redhat.com>
2735
2736 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2737
41b37d5e
JJ
27382015-05-19 Jakub Jelinek <jakub@redhat.com>
2739
2740 PR middle-end/66199
2741 * c-parser.c (c_parser_omp_for_loop): Don't add
2742 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2743 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2744 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2745 constructs.
2746
fab27f52
MM
27472015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2748
2749 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2750 swaps.
fab27f52 2751
40de31cf
MLI
27522015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2753
2754 PR fortran/44054
2755 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2756 accessor function.
2757
3aa3c9fc
MP
27582015-05-14 Marek Polacek <polacek@redhat.com>
2759
2760 PR c/66066
2761 PR c/66127
2762 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2763 rather than with 0.
2764
c3388e62
DM
27652015-05-12 David Malcolm <dmalcolm@redhat.com>
2766
2767 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2768 to add a call to warn_for_misleading_indentation.
2769 (c_parser_else_body): Likewise, adding param "else_loc".
2770 (c_parser_if_statement): Check for misleading indentation.
2771 (c_parser_while_statement): Likewise.
2772 (c_parser_for_statement): Likewise.
2773
755e528f
MP
27742015-05-08 Marek Polacek <polacek@redhat.com>
2775
2776 PR c/64918
2777 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2778 (output_init_element): Likewise.
2779
0173bd2a
MP
27802015-05-07 Marek Polacek <polacek@redhat.com>
2781
2782 PR c/65179
2783 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2784 value.
2785
9babc352
MP
27862015-04-30 Marek Polacek <polacek@redhat.com>
2787
2788 * c-typeck.c (set_init_label): Call error_at instead of error and
2789 pass LOC to it.
2790
ac9f18db
MP
2791 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2792 the type of a decl.
2793
ec3fba51
MP
2794 * c-typeck.c (c_build_va_arg): Clarify the error message.
2795
b811915d
TS
27962015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2797
2798 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2799 OMP_STANDALONE_CLAUSES.
2800
f3075008
MP
28012015-04-28 Marek Polacek <polacek@redhat.com>
2802
2803 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2804
4e81b788
MP
28052015-04-28 Marek Polacek <polacek@redhat.com>
2806
2807 PR c/65901
2808 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2809
6c1db78e
MP
28102015-04-25 Marek Polacek <polacek@redhat.com>
2811
2812 PR c/52085
2813 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2814 attribute.
2815
5c4abbb8
MP
28162015-04-23 Marek Polacek <polacek@redhat.com>
2817
2818 PR c/65345
2819 * c-decl.c (set_labels_context_r): New function.
2820 (store_parm_decls): Call it via walk_tree_without_duplicates.
2821 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2822 instead of create_tmp_var. Build TARGET_EXPR instead of
2823 COMPOUND_EXPR.
2824 (build_atomic_assign): Use create_tmp_var_raw instead of
2825 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2826
06aca1d5
IV
28272015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2828
2829 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2830 (c_parser_omp_target_update): Add missed %> to error_at ().
2831
8fba1830
BRF
28322015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2833
2834 PR target/55143
2835 * c-decl.c (c_default_pointer_mode): Remove definition.
2836 * c-tree.h (c_default_pointer_mode): Remove declaration.
2837
62021f64
TB
28382015-03-27 Tobias Burnus <burnus@net-b.de>
2839
2840 PR c/65586
2841 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2842 error out.
2843 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2844 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2845 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2846
9b65e171
JJ
28472015-03-19 Jakub Jelinek <jakub@redhat.com>
2848
2849 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2850 attribute for DECL_EXTERNAL VAR_DECLs.
2851
17958621
JJ
28522015-03-11 Jakub Jelinek <jakub@redhat.com>
2853
2854 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2855 argument.
2856
7ccb1a11
JJ
28572015-03-10 Jakub Jelinek <jakub@redhat.com>
2858
2859 PR c/65120
2860 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2861 before preparing arguments to warn_logical_not_parentheses.
2862
01177669
JJ
28632015-03-09 Jakub Jelinek <jakub@redhat.com>
2864
2865 PR c/65120
2866 * c-typeck.c (parser_build_binary_op): Don't warn for
2867 !!x == y or !b == y where b is _Bool.
2868
802ac282
MP
28692015-03-09 Marek Polacek <polacek@redhat.com>
2870
2871 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2872 * c-decl.c (grokdeclarator): Likewise.
2873 * c-typeck.c (build_binary_op): Likewise.
2874
e5165b60
MP
28752015-02-27 Marek Polacek <polacek@redhat.com>
2876
2877 PR c/65228
2878 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2879
065d214c
MP
28802015-02-14 Marek Polacek <polacek@redhat.com>
2881
2882 PR c/64768
2883 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2884 declared through a typedef name.
2885
e5d9235b
MP
28862015-02-13 Marek Polacek <polacek@redhat.com>
2887
2888 PR c/65050
2889 * c-decl.c (grokdeclarator): Print also the type when giving
2890 the error message about array's incomplete element type.
2891
fa01ffcc
JJ
28922015-02-11 Jakub Jelinek <jakub@redhat.com>
2893
2894 PR c/64824
2895 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2896 check in the POP macro.
2897
c3e38a03
MP
28982015-02-09 Marek Polacek <polacek@redhat.com>
2899
2900 PR c/64856
2901 * c-typeck.c (process_init_element): Don't always wrap
2902 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2903 initializing a range of elements.
2904
4886ec8e
JJ
29052015-02-04 Jakub Jelinek <jakub@redhat.com>
2906
2907 PR c/64824
2908 PR c/64868
2909 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2910
c3e38a03 29112015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2912
2913 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2914 processing enum declaration.
2915
7b33f0c8
MP
29162015-01-29 Marek Polacek <polacek@redhat.com>
2917
2918 PR c/64709
2919 * c-typeck.c (pop_init_level): If constructor_elements has
2920 exactly one element with integer_zerop value, set constructor_zeroinit
2921 to 1. Remove braces around warning_init call.
2922
dea63e49
JJ
29232015-01-27 Jakub Jelinek <jakub@redhat.com>
2924
2925 PR c/64766
2926 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2927 of FUNCTION_DECLs with error_mark_node.
2928
d38f7dce
JJ
29292015-01-26 Jakub Jelinek <jakub@redhat.com>
2930
2931 PR c/64778
2932 * c-typeck.c (convert_arguments): Return -1 if there are
2933 error_args, even if we've diagnosed too many arguments.
2934
cbf5d0e7
RB
29352015-01-21 Richard Biener <rguenther@suse.de>
2936
2937 PR middle-end/64313
2938 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2939 for builtins the user declared correctly.
2940
41dbbb37
TS
29412015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2942 Bernd Schmidt <bernds@codesourcery.com>
2943 Cesar Philippidis <cesar@codesourcery.com>
2944 James Norris <jnorris@codesourcery.com>
2945 Jakub Jelinek <jakub@redhat.com>
2946 Ilmir Usmanov <i.usmanov@samsung.com>
2947
2948 * c-parser.c: Include "gomp-constants.h".
2949 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2950 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2951 Use OMP_CLAUSE_SET_MAP_KIND.
2952 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2953 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2954 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2955 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2956 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2957 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2958 "copyout", "create", "delete", "deviceptr", "gang", "host",
2959 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2960 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2961 "present_or_create", "pcreate", "seq", "self", "vector",
2962 "vector_length", "wait", "worker".
2963 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2964 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2965 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2966 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2967 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2968 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2969 (c_parser_oacc_data_clause_deviceptr)
2970 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2971 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2972 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2973 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2974 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2975 (c_parser_oacc_parallel, c_parser_oacc_update)
2976 (c_parser_oacc_wait): New functions.
2977 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2978 (c_finish_oacc_data): New prototypes.
2979 * c-typeck.c: Include "gomp-constants.h".
2980 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2981 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2982 OMP_CLAUSE_SET_MAP_KIND.
2983 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2984 (c_finish_oacc_data): New functions.
2985 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2986 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2987 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2988 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2989 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2990 GOMP_MAP_FORCE_DEVICEPTR.
2991
adfac8df
JJ
29922015-01-09 Michael Collison <michael.collison@linaro.org>
2993
2994 * c-array-notation.c: Include hash-set.h, machmode.h,
2995 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2996 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2997 * c-aux-info.c: Ditto.
2998 * c-convert.c: Ditto.
2999 * c-decl.c: Ditto.
3000 * c-errors.c: Ditto.
3001 * c-lang.c: Dittoxs.
3002 * c-objc-common.c: Ditto.
3003 * c-parser.c: Ditto.
3004 * c-typeck.c: Include hash-set.h, machmode.h,
3005 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3006 fold-const.h, wide-int.h, inchash.h, real.h and
3007 fixed-value.h due to flattening of tree.h.
3008
2cc901dc
MP
30092015-01-07 Marek Polacek <polacek@redhat.com>
3010
3011 PR c/64417
3012 * c-typeck.c (process_init_element): Disallow initialization of
3013 a flexible array member with a string constant if the structure
3014 is in an array.
3015
5624e564
JJ
30162015-01-05 Jakub Jelinek <jakub@redhat.com>
3017
e5341100
JJ
3018 PR sanitizer/64344
3019 * c-typeck.c (convert_for_assignment, c_finish_return): For
3020 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3021 types also set in_late_binary_op around convert call.
3022 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3023 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3024 result on expr as last argument to ubsan_instrument_float_cast,
3025 if in_late_binary_op, don't use c_save_expr but save_expr.
3026
5624e564
JJ
3027 Update copyright years.
3028
5bd012f8
MP
30292015-01-05 Marek Polacek <polacek@redhat.com>
3030
3031 PR c/64423
3032 * c-typeck.c (build_array_ref): Pass loc down to
3033 warn_array_subscript_with_type_char.
3034
3f8257db 30352014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3036
3037 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3038 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3039 element type.
8e745a17 3040 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3041 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3042 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3043 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3044 to PEDWARN_FOR_QUALIFIERS.
768952be 3045
8f94a8c4
JJ
30462014-12-17 Jakub Jelinek <jakub@redhat.com>
3047
3048 PR sanitizer/64289
3049 * c-convert.c: Include ubsan.h.
3050 (convert): For real -> integral casts and
3051 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3052 instead instrument the float cast directly.
3053
b731b390
JJ
30542014-11-29 Jakub Jelinek <jakub@redhat.com>
3055
3056 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3057 c_finish_stmt_expr): Remove NULL last argument from
3058 create_tmp_var_raw and create_tmp_var calls.
3059 * c-array-notation.c (fix_builtin_array_notation_fn,
3060 build_array_notation_expr, fix_conditional_array_notations_1,
3061 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3062
541e35a6
MP
30632014-11-28 Marek Polacek <polacek@redhat.com>
3064
3065 PR c/63862
3066 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3067 convert the right operand to integer type.
3068
b286be94
MP
30692014-11-25 Marek Polacek <polacek@redhat.com>
3070
3071 PR c/63877
3072 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3073 for inline functions.
3074
aa7da51a
JJ
30752014-11-21 Jakub Jelinek <jakub@redhat.com>
3076
3077 PR target/63764
3078 * c-typeck.c (build_array_ref): Adjust
3079 convert_vector_to_pointer_for_subscript caller. If it returns true,
3080 call non_lvalue_loc on the result.
3081
d876207f
RB
30822014-11-11 Richard Biener <rguenther@suse.de>
3083
3084 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3085 to true.
3086
e5e44252
AK
30872014-11-10 Andi Kleen <ak@linux.intel.com>
3088
3089 PR c/60804
3090 * c-parser.c (c_parser_statement_after_labels): Call
3091 check_no_cilk.
3092 (c_parser_if_statement): Dito.
3093 (c_parser_switch_statement): Dito.
3094 (c_parser_while_statement): Dito.
3095 (c_parser_do_statement): Dito.
3096 (c_parser_for_statement): Dito.
3097 * c-typeck.c (c_finish_loop): Dito.
3098
13c21655
PC
30992014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3100
3101 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3102 OPT_Wshift_count_overflow in the warnings.
3103
2d51fcef
MP
31042014-10-30 Marek Polacek <polacek@redhat.com>
3105
3106 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3107 print the stripped version as well, if they're not the same.
3108
ef4bddc2
RS
31092014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3110
3111 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3112 machine_mode.
3113
c582198b
AM
31142014-10-28 Andrew MacLeod <amacleod@redhat.com>
3115
3116 * c-decl.c: Adjust include files.
3117 * c-parser.c: Ditto.
3118
ddc8de03
PM
31192014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3120 Tom Tromey <tromey@redhat.com>
3121
3122 * c-tree.h (enum c_oracle_request): New.
3123 (c_binding_oracle_function): New typedef.
3124 (c_binding_oracle, c_pushtag, c_bind): Declare.
3125 * c-decl.c (c_binding_oracle): New global.
3126 (I_SYMBOL_CHECKED): New macro.
3127 (i_symbol_binding): New function.
3128 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3129 (I_TAG_CHECKED): New macro.
3130 (i_tag_binding): New function.
3131 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3132 (I_LABEL_CHECKED): New macro.
3133 (i_label_binding): New function.
3134 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3135 (c_print_identifier): Save and restore c_binding_oracle.
3136 (c_pushtag, c_bind): New functions.
3137
60393bbc
AM
31382014-10-27 Andrew MacLeod <amacleod@redhat.com>
3139
3140 * c-typeck.c: Adjust include files.
3141
d723bb7c
MLI
31422014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3143
3144 PR c++/53061
3145 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3146 initialization here...
3147 (c_initialize_diagnostics): ... but here. Set defaults after
3148 building pretty-printer.
3149
1bc5a451
MP
31502014-10-23 Marek Polacek <polacek@redhat.com>
3151
3152 PR c/63626
3153 * c-decl.c (pop_scope): Don't print warning in external_scope.
3154
4435bb92
MP
31552014-10-19 Marek Polacek <polacek@redhat.com>
3156
3157 PR c/63567
3158 * c-typeck.c (output_init_element): Allow initializing objects with
3159 static storage duration with compound literals even in C99 and add
3160 pedwarn for it.
3161
7278465e
MP
31622014-10-17 Marek Polacek <polacek@redhat.com>
3163
3164 PR c/63567
3165 * c-typeck.c (digest_init): Allow initializing objects with static
3166 storage duration with compound literals even in C99 and add pedwarn
3167 for it.
3168
d9b7be2e
MP
31692014-10-17 Marek Polacek <polacek@redhat.com>
3170
3171 PR c/63543
3172 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3173 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3174 error multiple times. Print the type.
3175
f406ae1f
MP
31762014-10-17 Marek Polacek <polacek@redhat.com>
3177
3178 PR c/63549
3179 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3180 type.
3181
92574c7c
MP
31822014-10-17 Marek Polacek <polacek@redhat.com>
3183
3184 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3185 (start_function): Use OPT_Wimplicit_int instead of 0.
3186 (store_parm_decls_oldstyle): Likewise.
3187
1bc4a978
MT
31882014-10-17 Alan Modra <amodra@gmail.com>
3189
3190 PR middle-end/61848
3191 * c-decl.c (merge_decls): Don't merge section name or tls model
3192 to newdecl symtab node, instead merge to olddecl. Override
3193 existing olddecl section name. Set tls_model for all thread-local
3194 vars, not just OMP thread-private ones. Remove incorrect comment.
3195
83685514
AM
31962014-10-16 Andrew MacLeod <amacleod@redhat.com>
3197
3198 * c-decl.c: Adjust include files.
3199
78a7c317
DD
32002014-10-14 DJ Delorie <dj@redhat.com>
3201
3202 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3203 (c_token_starts_typename): Check all __intN, not just __int128.
3204 (c_token_starts_declspecs): Likewise.
3205 (c_parser_declspecs): Likewise.
3206 (c_parser_attribute_any_word): Likewise.
3207 (c_parser_objc_selector): Likewise.
3208 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3209 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3210 is specified.
3211 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3212 __int128.
3213 (finish_declspecs): Likewise.
3214
74d98c1e
AB
32152014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3216
8e745a17 3217 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3218 the duplicate code.
8e745a17 3219 (c_parser_statement): Call the new function.
74d98c1e 3220
84937de2
MP
32212014-10-09 Marek Polacek <polacek@redhat.com>
3222
3223 PR c/63480
3224 * c-typeck.c (pop_init_level): Don't warn about initializing
3225 with { }.
3226
0382aaa0
MP
32272014-10-07 Marek Polacek <polacek@redhat.com>
3228
3229 PR c/59717
3230 * c-decl.c (header_for_builtin_fn): New function.
3231 (implicitly_declare): Suggest which header to include.
3232
7a0ca710
MP
32332014-10-07 Marek Polacek <polacek@redhat.com>
3234
3235 * c-convert.c (convert): Use error_operand_p.
3236 * c-typeck.c (require_complete_type): Likewise.
3237 (really_atomic_lvalue): Likewise.
3238 (digest_init): Likewise.
3239 (handle_omp_array_sections_1): Likewise.
3240
6bc8a126
MP
32412014-10-03 Marek Polacek <polacek@redhat.com>
3242
3243 PR c/63453
3244 * c-decl.c (pop_scope): Don't warn about "inline function declared
3245 but never defined" for functions marked with gnu_inline attribute.
3246
d90c0a59
JJ
32472014-09-25 Jakub Jelinek <jakub@redhat.com>
3248
3249 PR c++/63249
3250 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3251 on low_bound and length.
3252
083e891e
MP
32532014-09-24 Marek Polacek <polacek@redhat.com>
3254
3255 PR c/61405
3256 PR c/53874
3257 * c-parser.c: Don't define CPP_KEYWORD.
3258 (c_parser_switch_statement): Pass original type to c_finish_case.
3259 * c-tree.h (c_finish_case): Update declaration.
3260 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3261 conditionally to c_do_switch_warnings.
3262
8d95fe25
MP
32632014-09-03 Marek Polacek <polacek@redhat.com>
3264
3265 PR c/62024
3266 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3267 conversions.
3268
9a771876
JJ
32692014-09-02 Jakub Jelinek <jakub@redhat.com>
3270 Balaji V. Iyer <balaji.v.iyer@intel.com>
3271 Igor Zamyatin <igor.zamyatin@intel.com>
3272
3273 * c-parser.c (c_parser_cilk_for): New function.
3274 (c_parser_cilk_grainsize): Likewise.
3275 (c_get_temp_regvar): Likewise.
3276 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3277 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3278 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3279 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3280 case.
3281
b7679d96
CG
32822014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3283
3284 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3285 with using HOST_WIDE_INT without truncation to 'int'
3286
59ea0364
MP
32872014-08-22 Marek Polacek <polacek@redhat.com>
3288
3289 PR c++/62199
3290 * c-typeck.c (parser_build_binary_op): Adjust call to
3291 warn_logical_not_parentheses.
3292
671a475e
IZ
32932014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3294
3295 PR other/62008
3296 * c-parser.c (c_parser_array_notation): Check for correct
3297 type of an array added.
3298
04159acf
MP
32992014-08-19 Marek Polacek <polacek@redhat.com>
3300
3301 PR c++/62153
3302 * c-typeck.c (build_binary_op): If either operand of a comparison
3303 is a boolean expression, call maybe_warn_bool_compare.
3304
c77935ee
PP
33052014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3306
3307 PR c/45584
3308 * c-typeck.c (build_c_cast): Do a conversion even when the
3309 TYPE_MAIN_VARIANTs are the same.
3310
35aff4fb
MP
33112014-08-19 Marek Polacek <polacek@redhat.com>
3312
3313 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3314 pedwarn_c99 instead of pedwarn.
3315 (grokfield): Likewise.
3316 (warn_defaults_to): New function.
3317 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3318 Unconditionally call pedwarn_c99 instead of pedwarn.
3319 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3320 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3321 check flag_isoc11 before.
3322 * c-errors.c (pedwarn_c99): Change the return type to bool.
3323 Handle -Wc99-c11-compat.
3324 * c-parser.c (disable_extension_diagnostics): Handle
3325 warn_c99_c11_compat.
3326 (restore_extension_diagnostics): Likewise.
3327 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3328 instead of pedwarn, don't check flag_isoc11 before.
3329 (c_parser_declspecs): Likewise.
3330 (c_parser_alignas_specifier): Likewise.
3331 (c_parser_alignof_expression): Likewise.
3332 (c_parser_generic_selection): Likewise.
3333 * c-tree.h (pedwarn_c99): Update declaration.
3334 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3335 of pedwarn_c99.
3336
177cce46
MP
33372014-08-19 Marek Polacek <polacek@redhat.com>
3338
3339 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3340 to pedwarn_c90.
3341 * c-errors.c: Include "opts.h".
3342 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3343 * c-parser.c (disable_extension_diagnostics): Handle negative value
3344 of warn_c90_c99_compat, too.
3345 (restore_extension_diagnostics): Likewise.
3346 (c_parser_compound_statement_nostart): Pass
3347 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3348
6dc99c33
MP
33492014-08-12 Marek Polacek <polacek@redhat.com>
3350
3351 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3352 Add pedwarn.
3353 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3354 Likewise.
3355 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3356
3f8257db 33572014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3358
3359 PR c/51849
3360 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3361 Call pedwarn_c90 instead of pedwarn.
3362 (check_bitfield_type_and_width): Likewise.
3363 (declspecs_add_qual): Likewise.
3364 (declspecs_add_type): Likewise.
3365 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3366 Adjust to only call pedwarn_c90.
3367 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3368 pedwarn_c90 instead of pedwarn.
3369 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3370 * c-parser.c (disable_extension_diagnostics): Handle
3371 warn_c90_c99_compat.
3372 (restore_extension_diagnostics): Likewise.
3373 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3374 pedwarn_c90 instead of pedwarn.
3375 (c_parser_initelt): Likewise.
3376 (c_parser_postfix_expression): Likewise.
3377 (c_parser_postfix_expression_after_paren_type): Likewise.
3378 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3379 * c-tree.h: Fix formatting.
3380 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3381 pedwarn_c90 instead of pedwarn.
3382
9f25a338
TS
33832014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3384
3385 * c-typeck.c: Remove include of pointer-set.h.
3386
044331a8
MP
33872014-08-07 Marek Polacek <polacek@redhat.com>
3388
3389 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3390
b787e7a2
TS
33912014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3392
3393 * c-typeck.c: Use hash_map instead of pointer_map.
3394
6e2830c3
TS
33952014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3396
3397 * c-decl.c: Use hash_set instead of pointer_set.
3398
a7ee52fb
IZ
33992014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3400
3401 PR middle-end/61455
3402 * c-array-notation.c (expand_array_notations): Handling
3403 of DECL_EXPR added.
3404
b4dfdc11
MG
34052014-07-31 Marc Glisse <marc.glisse@inria.fr>
3406
3407 PR c++/60517
3408 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3409 a local variable.
3410
976d5a22
TT
34112014-07-30 Tom Tromey <tromey@redhat.com>
3412
3413 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3414 field.
3415 (really_start_incremental_init, push_init_level): Initialize
3416 designator_depth.
3417 (pop_init_level): Set global designator_depth.
3418 (process_init_element): Check for designated_init attribute.
3419
30281de2
MP
34202014-07-20 Marek Polacek <polacek@redhat.com>
3421
3422 PR c/61852
3423 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3424 (implicitly_declare): Pass location to implicit_decl_warning.
3425
b108f48f
JJ
34262014-07-14 Jakub Jelinek <jakub@redhat.com>
3427
3428 PR middle-end/61294
3429 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3430 If non-NULL, call c_parser_check_literal_zero.
3431 (c_parser_check_literal_zero): New function.
3432 (c_parser_postfix_expression_after_primary): Adjust
3433 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3434
773ec47f
MP
34352014-07-06 Marek Polacek <polacek@redhat.com>
3436
3437 PR c/6940
3438 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3439 * c-tree.h (C_ARRAY_PARAMETER): Define.
3440 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3441 function parameter.
3442
22e1cf1c 34432014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3444 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3445
3446 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3447 releasing symbol.
3448
52ec0ea3
MP
34492014-07-01 Marek Polacek <polacek@redhat.com>
3450
3451 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3452 instead of 0 to WARN_FOR_ASSIGNMENT.
3453
d5c3d343
MP
34542014-07-01 Marek Polacek <polacek@redhat.com>
3455
3456 PR c/58286
3457 * c-typeck.c (convert_for_assignment): Pass
3458 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3459
6a7253a4
MP
34602014-06-30 Marek Polacek <polacek@redhat.com>
3461
3462 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3463 has no_sanitize_undefined attribute.
3464
5e88a8f4
IZ
34652014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3466
3467 PR middle-end/57541
3468 * c-array-notation.c (fix_builtin_array_notation_fn):
3469 Check for 0 arguments in builtin call. Check that bultin argument is
3470 correct.
3471 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3472 index.
3473
9698b078
SH
34742014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3475
3476 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3477 qualifiers in __auto_type for atomic types.
3478 (c_parser_typeof_specifier): Discard all type qualifiers in
3479 __typeof__ for atomic types.
3480
6e07c515
MP
34812014-06-25 Marek Polacek <polacek@redhat.com>
3482
3483 PR c/61162
3484 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3485 the return expression to c_finish_return.
3486
da6f124d
JJ
34872014-06-25 Jakub Jelinek <jakub@redhat.com>
3488
3489 * c-typeck.c (c_finish_omp_clauses): Make sure
3490 OMP_CLAUSE_LINEAR_STEP has correct type.
3491
c203e8a7
TS
34922014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3493
3494 * c-decl.c: Adjust.
3495
56ad0e38
JJ
34962014-06-24 Jakub Jelinek <jakub@redhat.com>
3497
3498 * c-parser.c (c_parser_omp_for_loop): For
3499 #pragma omp parallel for simd move lastprivate clause from parallel
3500 to for rather than simd.
3501
47c2554f
MP
35022014-06-23 Marek Polacek <polacek@redhat.com>
3503
3504 * c-typeck.c (parser_build_binary_op): Don't call
3505 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3506
56363ffd
JH
35072014-06-15 Jan Hubicka <hubicka@ucw.cz>
3508
3509 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3510 * c-decl.c (merge_decls): Likewise.
3511
d7ff7ae5
MP
35122014-06-09 Marek Polacek <polacek@redhat.com>
3513
3514 PR c/36446
3515 * c-typeck.c (error_init): Call inform instead of error_at.
3516 (pedwarn_init): Call inform instead of pedwarn.
3517 (warning_init): Call inform instead of warning_at.
3518
24d047a3
JH
35192014-06-07 Jan Hubicka <hubicka@ucw.cz>
3520
3521 * c-decl.c (merge_decls): Use set_decl_section_name.
3522 (duplicate_decls): Remove node if it exists.
3523
9bac5cbb
G
35242014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3525
3526 PR c/53119
3527 * c-typeck.c (push_init_level, process_init_element,
3528 pop_init_level): Correct check for zero initialization, move
3529 missing brace warning to respect zero initialization.
3530
8ffcdea8
MP
35312014-06-05 Marek Polacek <polacek@redhat.com>
3532
3533 PR c/56724
3534 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3535
742938c9
MP
35362014-06-05 Marek Polacek <polacek@redhat.com>
3537
3538 PR c/49706
3539 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3540 on the left hand side operand of a comparison.
3541
6447c55d
MP
35422014-06-05 Marek Polacek <polacek@redhat.com>
3543
3544 PR c/48062
3545 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3546 Print note only if the warning was printed.
3547
9dc7743c
IZ
35482014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3549
3550 PR c/58942
3551 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3552 with a pointer.
3553
fedfecef
MP
35542014-06-03 Marek Polacek <polacek@redhat.com>
3555
3556 PR c/60439
3557 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3558 c_start_case.
3559 * c-tree.h (c_start_case): Update.
3560 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3561 switch condition has boolean value.
3562
9b2b7279
AM
35632014-06-02 Andrew MacLeod <amacleod@redhat.com>
3564
3565 * c-decl.c: Include builtins.h.
3566 * c-parser.c: Likewise.
3567
5c1bc275
MP
35682014-05-27 Marek Polacek <polacek@redhat.com>
3569
3570 PR c/56724
3571 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3572 error and warning calls to error_at and warning_at. Pass location of
3573 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3574 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3575 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3576
97563bc8
IZ
35772014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3578
3579 PR c/61191
3580 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3581 function parameters.
3582
aede2c10
JH
35832014-05-23 Jan Hubicka <hubicka@ucw.cz>
3584
3585 * c-decl.c (merge_decls): Preserve symtab node pointers.
3586 (duplicate_decls): Free new decl.
3587
edbba2ce
TS
35882014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3589
f3316c6d
TS
3590 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3591 initialization.
3592
edbba2ce
TS
3593 * c-parser.c (c_parser_omp_target): Return bool values.
3594
68c81f24
TS
35952014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3596
3597 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3598 num_teams_loc variable to num_thread_limit_loc.
3599
632f2871
RS
36002014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3601
3602 * c-array-notation.c (expand_array_notations): Use void_node
3603 instead of void_zero_node.
3604
766090c2
TS
36052014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3606
3607 * c-decl.c (finish_struct): Adjust.
3608 (finish_enum): Likewise.
3609 (bind): Adjust.
3610 (record_inline_static): Likewise.
3611 (push_scope): Likewise.
3612 (make_label): Likewise.
3613 (lookup_label_for_goto): Likewise.
3614 (finish_struct): Likewise.
3615 (finish_enum): Likewise.
3616 (store_parm_decls): Likewise.
3617 (c_push_function_context): Likewise.
3618 * c-lang.h: Remove usage of variable_size gty attribute.
3619 * c-parser.c (c_parse_init): Adjust.
3620 (c_parse_file): Likewise.
3621
2b107f6b
MP
36222014-05-13 Marek Polacek <polacek@redhat.com>
3623
3624 PR c/61162
3625 * c-typeck.c (convert_for_assignment): Pass location to
3626 WARN_FOR_ASSIGNMENT instead of input_location.
3627
d033409e
MP
36282014-05-10 Marek Polacek <polacek@redhat.com>
3629
3630 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3631 maybe_warn_string_init.
3632 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3633 maybe_warn_string_init.
3634 * c-tree.h (maybe_warn_string_init): Update declaration.
3635 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3636 Call pedwarn_init with loc instead of with input_location.
3637 (digest_init): Pass init_loc to maybe_warn_string_init.
3638 (pop_init_level): Call pedwarn_init with loc instead of with
3639 input_location.
3640 (set_init_index): Likewise.
3641 (process_init_element): Likewise.
3642
ea58ef42
MP
36432014-05-09 Marek Polacek <polacek@redhat.com>
3644
3645 PR c/61096
3646 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3647 (c_parser_initelt): Pass location to set_init_label. Pass array index
3648 location to set_init_index.
3649 * c-tree.h (push_init_level): Update declaration.
3650 (pop_init_level): Likewise.
3651 (set_init_index): Likewise.
3652 (set_init_label): Likewise.
3653 * c-typeck.c (error_init): Add location parameter. Call error_at
3654 instead of error.
3655 (digest_init): Pass init_loc to error_init.
3656 (really_start_incremental_init):
3657 (push_init_level): Add location parameter. Pass loc to pop_init_level
3658 and error_init.
3659 (pop_init_level): Likewise.
3660 (set_designator): Add location parameter. Pass loc to pop_init_level,
3661 push_init_level, and error_init.
3662 (set_init_index): Add location parameter. Pass loc to error_init and
3663 set_designator.
3664 (set_init_label): Likewise.
3665 (output_init_element): Pass loc to error_init.
3666 (process_init_element): Pass loc to error_init, pop_init_level,
3667 pedwarn_init, and push_init_level.
3668
661a0813
MP
36692014-05-09 Marek Polacek <polacek@redhat.com>
3670
3671 PR c/50459
3672 * c-parser.c (c_parser_attributes): Parse the arguments as an
3673 expression-list if the attribute takes identifier.
3674
2793eeab
MP
36752014-05-08 Marek Polacek <polacek@redhat.com>
3676
3677 PR c/61053
3678 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3679 TYPE_ALIGN_UNIT.
3680
f827930a
MP
36812014-05-08 Marek Polacek <polacek@redhat.com>
3682
3683 PR c/61077
3684 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3685 of main.
3686
1d60af08
KZ
36872014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3688 Mike Stump <mikestump@comcast.net>
3689 Richard Sandiford <rdsandiford@googlemail.com>
3690
3691 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3692 (finish_enum): Use wide-int interfaces.
3693 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3694 * c-typeck.c (build_c_cast): Likewise.
3695 (set_nonincremental_init_from_string): Likewise.
3696 (c_tree_equal): Likewise.
3697
a0e24419
MP
36982014-05-02 Marek Polacek <polacek@redhat.com>
3699
3700 PR c/25801
3701 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3702 Return size_one_node when the type is not complete.
3703 (pointer_diff): Remove comment.
3704 (build_unary_op): Improve error messages.
3705
19fc9faa
MP
37062014-05-02 Marek Polacek <polacek@redhat.com>
3707
3708 * c-typeck.c (c_finish_return): Separate warning_at calls.
3709
63bc4e87
MP
37102014-05-02 Marek Polacek <polacek@redhat.com>
3711
3712 * c-tree.h (error_init): Remove declaration.
3713 (pedwarn_init): Likewise.
3714 * c-typeck.c (error_init): Make static and move above.
3715 (pedwarn_init): Likewise.
3716 (warning_init): Move above.
3717 (maybe_warn_string_init): Likewise.
3718
4bd2511b
JL
37192014-05-01 Jeff Law <law@redhat.com>
3720
3721 Revert:
3722
3723 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3724 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3725 avoid goto.
3726
6a358dcb
MP
37272014-05-02 Marek Polacek <polacek@redhat.com>
3728
3729 PR c/60784
3730 * c-typeck.c (push_init_level): Set constructor_designated to
3731 p->designated for structures.
3732
ae5ebda4
MP
37332014-05-01 Marek Polacek <polacek@redhat.com>
3734
3735 PR c/60915
3736 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3737 function-definition has an attribute after the declarator.
3738
96b40f8d
MP
37392014-05-01 Marek Polacek <polacek@redhat.com>
3740
3741 PR c/60257
3742 * c-typeck.c (warning_init): Add location_t parameter. Call
3743 warning_at instead of warning.
3744 (push_init_level): Pass input_location to warning_init.
3745 (add_pending_init): Add location_t parameter. Pass loc to
3746 warning_init.
3747 (set_nonincremental_init): Pass input_location to add_pending_init.
3748 (set_nonincremental_init_from_string): Likewise.
3749 (output_init_element): Pass loc to warning_init and to
3750 add_pending_init.
3751
32e00768
MP
37522014-05-01 Marek Polacek <polacek@redhat.com>
3753
3754 PR c/43395
3755 * c-typeck.c (c_finish_return): Distinguish between label and variable
3756 when warning about returning local address.
3757
c9379ce2
MP
37582014-05-01 Marek Polacek <polacek@redhat.com>
3759
3760 PR c/29467
3761 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3762 in C89 mode.
3763
d00887e8
MP
37642014-05-01 Marek Polacek <polacek@redhat.com>
3765
3766 PR c/43245
3767 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3768 instead of 0 to WARN_FOR_QUALIFIERS.
3769
5436fa2e
MP
37702014-05-01 Marek Polacek <polacek@redhat.com>
3771
3772 PR c/56989
3773 * c-typeck.c (default_conversion): Use better location for
3774 error call.
3775
f8ed5150
MP
37762014-04-30 Marek Polacek <polacek@redhat.com>
3777
3778 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3779 also when SANITIZE_FLOAT_DIVIDE is on.
3780
8337d1db
MP
37812014-04-30 Marek Polacek <polacek@redhat.com>
3782
3783 PR c/60139
3784 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3785 and pedwarn_init. Use loc insted of input_location.
3786
c4bdc42f
MP
37872014-04-30 Marek Polacek <polacek@redhat.com>
3788
3789 PR c/60351
3790 * c-typeck.c (build_binary_op): Use location when warning about
3791 shift count.
3792
45484dcf
MP
37932014-04-25 Marek Polacek <polacek@redhat.com>
3794
3795 PR c/18079
3796 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3797 always_inline/noinline and hot/cold attributes.
3798
34cf811f
MP
37992014-04-25 Marek Polacek <polacek@redhat.com>
3800
3801 PR c/60114
3802 * c-parser.c (c_parser_initelt): Pass input_location to
3803 process_init_element.
3804 (c_parser_initval): Pass loc to process_init_element.
3805 * c-tree.h (process_init_element): Adjust declaration.
3806 * c-typeck.c (push_init_level): Pass input_location to
3807 process_init_element.
3808 (pop_init_level): Likewise.
3809 (set_designator): Likewise.
3810 (output_init_element): Add location_t parameter. Pass loc to
3811 digest_init.
3812 (output_pending_init_elements): Pass input_location to
3813 output_init_element.
3814 (process_init_element): Add location_t parameter. Pass loc to
3815 output_init_element.
3816
42056eac
JJ
38172014-04-24 Jakub Jelinek <jakub@redhat.com>
3818
3819 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3820 atomic-clause, allow comma in between atomic-clause and
3821 seq_cst.
3822
e162a134
JJ
38232014-04-22 Jakub Jelinek <jakub@redhat.com>
3824
3825 PR c/59073
3826 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3827 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3828
2f6babac
IZ
38292014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3830
3831 PR middle-end/60469
3832 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3833 create_tmp_var instead build_decl for creating temps.
3834 (build_array_notation_expr): Likewise.
3835 (fix_conditional_array_notations_1): Likewise.
3836 (fix_array_notation_expr): Likewise.
3837 (fix_array_notation_call_expr): Likewise.
3838
8edbfaa6
JJ
38392014-03-28 Jakub Jelinek <jakub@redhat.com>
3840
3841 PR c++/60689
3842 * c-tree.h (c_build_function_call_vec): New prototype.
3843 * c-typeck.c (build_function_call_vec): Don't call
3844 resolve_overloaded_builtin here.
3845 (c_build_function_call_vec): New wrapper function around
3846 build_function_call_vec. Call resolve_overloaded_builtin here.
3847 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3848 Call c_build_function_call_vec instead of build_function_call_vec.
3849 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3850 * c-decl.c (finish_decl): Likewise.
3851
7485aeea
MLI
38522014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3853
3854 PR c/55383
3855 * c-typeck.c: Use correct format string in cast-qual warning
3856
b17a8b07
TS
38572014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3858
3859 * c-decl.c (c_decl_attributes): Use
3860 lang_hooks.types.omp_mappable_type.
3861 * c-typeck.c (c_finish_omp_clauses): Likewise.
3862
3af9c5e9
MP
38632014-03-06 Marek Polacek <polacek@redhat.com>
3864
3865 PR c/60197
3866 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3867 of checking tree code.
3868
1c9f5f33
PK
38692014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3870
3871 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3872 (c_parser_parameter_declaration): Likewise.
3873
cc28fc7f
MP
38742014-02-19 Marek Polacek <polacek@redhat.com>
3875
3876 PR c/60195
3877 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3878 Call mark_exp_read on exp.value.
3879 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3880 TREE_ADDRESSABLE on old instead of val.
3881 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3882
b581c05c
PK
38832014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3884
3885 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3886 C_EXPR_APPEND by vec_safe_push.
3887 * c-tree.h (C_EXPR_APPEND): Remove.
3888
81e5eca8
MP
38892014-01-31 Marek Polacek <polacek@redhat.com>
3890
3891 PR c/59963
3892 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3893 build_function_call_vec.
3894 (build_function_call): Likewise.
3895 (build_atomic_assign): Likewise.
3896 (build_function_call_vec): Add arg_loc parameter. Use it.
3897 (convert_arguments): Likewise.
3898 (convert_for_assignment): Rename rhs_loc to expr_loc.
3899 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3900 (c_parser_objc_keywordexpr): Likewise.
3901 (c_parser_postfix_expression_after_primary): Call
3902 build_function_call_vec with expr_loc rather than op_loc.
3903 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3904 build_function_call_vec.
3905 (c_parser_expr_list): Add locations parameter. Fill it with locations
3906 of function arguments.
3907 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3908
68fca595
MP
39092014-01-30 Marek Polacek <polacek@redhat.com>
3910
3911 PR c/59940
3912 * c-typeck.c (build_function_call_vec): Use loc parameter.
3913 (convert_arguments): Add location parameter. Use it.
3914 (ep_convert_and_check): Likewise.
3915 (build_atomic_assign): Adjust convert_for_assignment call.
3916 (build_modify_expr): Likewise.
3917 (digest_init): Likewise.
3918 (c_finish_return): Likewise.
3919 (build_conditional_expr): Adjust ep_convert_and_check calls.
3920 (convert_for_assignment): Add rhs_loc parameter. Use it.
3921 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3922 calls.
3923
fa337f3a
RB
39242014-01-30 Richard Biener <rguenther@suse.de>
3925
3926 PR c/59905
3927 * c-typeck.c (build_function_call_vec): Do not replace calls
3928 to a function via an incompatible type with a runtime abort.
3929
b72271b9
BI
39302014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3931
3932 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3933 flag_enable_cilkplus with flag_cilkplus.
3934 (c_parser_direct_declarator_inner): Likewise.
3935 (c_parser_attribute_any_word): Likewise.
3936 (c_parser_attributes): Likewise.
3937 (c_parser_compound_statement): Likewise.
3938 (c_parser_statement_after_labels): Likewise.
3939 (c_parser_if_statement): Likewise.
3940 (c_parser_switch_statement): Likewise.
3941 (c_parser_do_statement): Likewise.
3942 (c_parser_for_statement): Likewise.
3943 (c_parser_unary_expression): Likewise.
3944 (c_parser_postfix_expression): Likewise.
3945 (c_parser_postfix_expression_after_primary): Likewise.
3946 (c_parser_postfix_expression_after_primary): Likewise.
3947 (c_parser_omp_clause_name): Likewise.
3948 (c_finish_omp_declare_simd): Likewise.
3949 (c_parser_cilk_verify_simd): Likewise.
3950 * c-typeck.c (build_array_ref): Likewise.
3951 (build_function_call_vec): Likewise.
3952 (convert_arguments): Likewise.
3953 (build_compound_expr): Likewise.
3954 (c_finish_return): Likewise.
3955 (c_finish_if_stmt): Likewise.
3956 (c_finish_loop): Likewise.
3957 (build_binary_op): Likewise.
3958
393e8e8b
MP
39592014-01-23 Marek Polacek <polacek@redhat.com>
3960
3961 PR c/59846
3962 * c-typeck.c (parser_build_binary_op): Use location instead of
3963 input_location.
3964 (build_binary_op): Pass location to shorten_compare.
3965
f04dda30
MP
39662014-01-23 Marek Polacek <polacek@redhat.com>
3967
3968 PR c/58346
3969 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3970 an empty aggregate.
3971
789eadcd
MP
39722014-01-23 Marek Polacek <polacek@redhat.com>
3973
3974 PR c/59871
3975 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3976 of a comma expression.
3977 (emit_side_effect_warnings): Likewise.
3978
40f14e9f
BI
39792014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3980
3981 PR c/59825
3982 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3983 function to use walk_tree and moved a lot of its functionality to
3984 expand_array_notations.
3985 (expand_array_notations): New function.
3986
74558dd9
BI
39872014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3988
3989 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3990 attribute an attribute without value.
3991
652fea39
JJ
39922014-01-23 Jakub Jelinek <jakub@redhat.com>
3993
3994 PR middle-end/58809
3995 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3996 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3997
f34f1c87
MP
39982014-01-22 Marek Polacek <polacek@redhat.com>
3999
4000 PR c/59891
4001 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4002 of remove_c_maybe_const_expr on op1 and op2.
4003
241f845a
JJ
40042014-01-15 Jakub Jelinek <jakub@redhat.com>
4005
4006 PR c/58943
4007 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4008 effects, preevaluate rhs using SAVE_EXPR first.
4009
9a74f20c
BI
40102014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4011
4012 PR c++/59631
4013 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4014 statements with if-elseif statements.
4015
96066ce1
MP
40162014-01-06 Marek Polacek <polacek@redhat.com>
4017
4018 PR c/57773
4019 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4020 defined bit-field types only in ISO C.
4021
23a5b65a
RS
40222014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4023
4024 Update copyright years
4025
f9030485
RS
40262014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4027
4028 * c-array-notation.c: Use the standard form for the copyright notice.
4029
41958c28
BI
40302013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4031
4032 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4033 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4034 field in parser is not empty. If not-empty, call the function
4035 c_parser_finish_omp_declare_simd.
4036 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4037 between SIMD-enabled functions and #pragma simd. Added new parameter.
4038 (c_parser_cilk_all_clauses): Modified the usage of the function
4039 c_parser_cilk_clause_vectorlength as mentioned above.
4040 (c_parser_cilk_simd_fn_vector_attrs): New function.
4041 (c_finish_cilk_simd_fn_tokens): Likewise.
4042 (is_cilkplus_vector_p): Likewise.
4043 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4044 "nomask," and "mask" strings in clause name.
4045 (c_parser_omp_all_clauses): Added 3 new case statements:
4046 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4047 PRAGMA_CILK_CLAUSE_NOMASK.
4048 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4049 check for vector attribute and if so call the function
4050 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4051 called the function c_finish_cilk_simd_fn_tokens.
4052 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4053 parser field is non-empty. If so, parse them as you would parse
4054 the omp declare simd pragma.
4055 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4056 Added a check when step is a parameter and flag it as error.
4057 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4058 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4059 pragma_omp_clause.
4060
cef0fd0e
TS
40612013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4062
4063 * c-parser.c (c_parser_omp_parallel): Fix description.
4064
12893402
BI
40652013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4066
4067 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4068 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4069 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4070 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4071
296674db
JM
40722013-12-04 Joseph Myers <joseph@codesourcery.com>
4073
4074 PR c/52023
4075 * c-parser.c (c_parser_alignas_specifier): Use
4076 c_sizeof_or_alignof_type instead of c_alignof.
4077 (c_parser_alignof_expression): Likewise, with min_alignof
4078 parameter depending on alignof spelling used.
4079
edd28054
MP
40802013-12-04 Marek Polacek <polacek@redhat.com>
4081
4082 PR c/54113
4083 * c-decl.c (start_function): Don't warn for missing prototype for
4084 inline functions.
4085
da0fc454
MP
40862013-12-03 Marek Polacek <polacek@redhat.com>
4087
4088 PR c/59351
4089 * c-decl.c (build_compound_literal): Allow compound literals with
4090 empty initial value.
4091
4c2ecab0
JM
40922013-12-02 Joseph Myers <joseph@codesourcery.com>
4093
4094 PR c/58235
4095 * c-typeck.c (build_modify_expr): Diagnose assignment to
4096 expression with array type.
4097
340baef7
JM
40982013-11-29 Joseph Myers <joseph@codesourcery.com>
4099
4100 PR c/42262
4101 * c-typeck.c (process_init_element): Do not treat a string as
4102 initializing a whole array when used with a designator for an
4103 individual element.
4104
6763b9f7
JM
41052013-11-29 Joseph Myers <joseph@codesourcery.com>
4106
4107 PR c/57574
4108 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4109 an inline function following a static declaration.
4110
e7bd1de1
JJ
41112013-11-28 Jakub Jelinek <jakub@redhat.com>
4112
4113 PR c/59310
4114 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4115 to p_name before calling c_parser_omp_teams instead of after.
4116 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4117 argument. Remove unused p_name variable.
4118
0136f8f0
AH
41192013-11-27 Aldy Hernandez <aldyh@redhat.com>
4120 Jakub Jelinek <jakub@redhat.com>
4121
4122 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4123 external_scope is NULL.
4124
241b71bb
TV
41252013-11-27 Tom de Vries <tom@codesourcery.com>
4126 Marc Glisse <marc.glisse@inria.fr>
4127
4128 PR c++/59032
4129 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4130
2fb9a547
AM
41312013-11-22 Andrew MacLeod <amacleod@redhat.com>
4132
4133 * c-typeck.c: Add required include files from gimple.h.
4134
8400e75e
DM
41352013-11-22 David Malcolm <dmalcolm@redhat.com>
4136
4137 * c-decl.c (define_label, shadow_tag_warned)
4138 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4139 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4140 (declspecs_add_type): Remove use of in_system_header macro.
4141 * c-parser.c (c_parser_unary_expression): Likewise.
4142 * c-typeck.c (store_init_value, process_init_element)
4143 (c_start_case): Likewise.
4144
4145 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4146 macro.
4147
4148 * c-parser.c (c_parser_set_source_position_from_token): Remove
4149 reference to in_system_header from comment.
4150
386b1f1f
RS
41512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4152
4153 * c-decl.c (grokdeclarator): Update comment to refer to
4154 tree_to_[su]hwi rather than tree_low_cst.
4155
ae7e9ddd
RS
41562013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4157
4158 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4159 tree_to_uhwi throughout.
4160
9439e9a1
RS
41612013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4162
4163 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4164 throughout.
4165
9541ffee
RS
41662013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4167
4168 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4169 throughout.
4170
c02065fc
AH
41712013-11-15 Aldy Hernandez <aldyh@redhat.com>
4172
4173 * c-parser.c (c_parser_cilk_simd): New.
4174 (c_parser_cilk_verify_simd): New.
4175 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4176 (c_parser_omp_for_loop): Add case for NE_EXPR.
4177 Set c_break_label for CILK_SIMD.
4178 (c_parser_cilk_clause_vectorlength): New.
4179 (c_parser_cilk_clause_linear): New.
4180 (c_parser_cilk_clause_name): New.
4181 (c_parser_cilk_all_clauses): New.
4182 * c-typeck.c (build_unary_op): Pass location argument to
4183 readonly_error.
4184 (build_modify_expr): Same.
4185 (build_asm_expr): Same.
4186 (c_finish_bc_stmt): Error on break/continue in loops.
4187
18f429e2
AM
41882013-11-14 Andrew MacLeod <amacleod@redhat.com>
4189
4190 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4191
d8a2d370
DN
41922013-11-14 Diego Novillo <dnovillo@google.com>
4193
4194 * c-decl.c: Include print-tree.h.
4195 Include stor-layout.h.
4196 Include varasm.h.
4197 Include attribs.h.
4198 Include stringpool.h.
4199 * c-lang.c: Include fold-const.h.
4200 * c-parser.c: Include stringpool.h.
4201 Include attribs.h.
4202 Include stor-layout.h.
4203 Include varasm.h.
4204 Include trans-mem.h.
4205 * c-typeck.c: Include stor-layout.h.
4206 Include trans-mem.h.
4207 Include varasm.h.
4208 Include stmt.h.
4209
38b7bc7f
JM
42102013-11-13 Joseph Myers <joseph@codesourcery.com>
4211
4212 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4213 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4214 __auto_type.
4215 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4216 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4217 RID_AUTO_TYPE.
4218 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4219 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4220 (c_parser_declarator, c_parser_direct_declarator_inner)
4221 (c_parser_parameter_declaration, c_parser_type_name): All callers
4222 changed.
4223 (c_parser_declaration_or_fndef): Handle declarations with type
4224 determined from the initializer.
4225
45b0be94
AM
42262013-11-12 Andrew MacLeod <amacleod@redhat.com>
4227
18f429e2 4228 * c-typeck.c: Include gimplify.h.
45b0be94 4229
582d9b50
JM
42302013-11-12 Joseph Myers <joseph@codesourcery.com>
4231
4232 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4233 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4234 comment.
4235 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4236 or _Thread_local as appropriate in diagnostics.
4237 (build_null_declspecs): Initialize ret->thread_gnu_p.
4238 (declspecs_add_scspec): Handle either __thread or _Thread_local
4239 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4240 pedantic. Do not disallow _Thread_local extern and _Thread_local
4241 static.
4242
267bac10
JM
42432013-11-07 Joseph Myers <joseph@codesourcery.com>
4244 Andrew MacLeod <amacleod@redhat.com>
4245
4246 * c-aux-info.c (gen_type): Handle atomic qualifier.
4247 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4248 qualifiers when compating types.
4249 (shadow_tag_warned): Handle atomic_p in declspecs.
4250 (quals_from_declspecs): Likewise.
4251 (start_decl): Use c_type_promotes_to when promoting argument
4252 types.
4253 (grokdeclarator): Handle _Atomic.
4254 (get_parm_info): Diagnose any qualifier on "void" as only
4255 parameter.
4256 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4257 comparing types. Use c_type_promotes_to when promoting argument
4258 types.
4259 (finish_function): Use c_type_promotes_to when promoting argument
4260 types.
4261 (build_null_declspecs): Handle atomic_p in declspecs.
4262 (declspecs_add_qual): Handle RID_ATOMIC.
4263 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4264 (c_token_starts_declspecs): Handle RID_ATOMIC.
4265 (c_parser_declspecs): Handle atomic type specifiers and
4266 qualifiers.
4267 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4268 from types of expressions with atomic type.
4269 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4270 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4271 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4272 (c_parser_statement_after_labels, c_parser_switch_statement)
4273 (c_parser_for_statement, c_parser_expr_no_commas)
4274 (c_parser_conditional_expression, c_parser_binary_expression)
4275 (c_parser_cast_expression, c_parser_unary_expression)
4276 (c_parser_postfix_expression)
4277 (c_parser_postfix_expression_after_primary, c_parser_expression):
4278 Use convert_lvalue_to_rvalue.
4279 (c_parser_expression_conv, c_parser_expr_list): Document
4280 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4281 (c_parser_objc_synchronized_statement): Use
4282 convert_lvalue_to_rvalue.
4283 (c_parser_objc_selector): Handle RID_ATOMIC.
4284 (c_parser_objc_receiver, c_parser_array_notation): Use
4285 convert_lvalue_to_rvalue.
4286 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4287 _Atomic (type-name).
4288 (struct c_declspecs): Add atomic_p field.
4289 (convert_lvalue_to_rvalue): Declare.
4290 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4291 corresponding atomic types.
4292 (qualify_type): Don't add _Atomic qualifiers from second argument.
4293 (comp_target_types): Do not allow _Atomic mismatches.
4294 (type_lists_compatible_p): Do not remove atomic qualifiers when
4295 comparing types.
4296 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4297 (build_atomic_assign): New functions.
4298 (build_unary_op): Use build_atomic_assign for atomic increment and
4299 decrement.
4300 (build_conditional_expr): Do not treat _Atomic void as a qualified
4301 version of void.
4302 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4303 (find_anonymous_field_with_type, convert_to_anonymous_field)
4304 (convert_for_assignment): Do not remove atomic qualifiers when
4305 comparing types.
4306 (digest_init): Do not accept initialization of arrays of atomic
4307 elements by string constants.
4308 (build_asm_expr): Use convert_lvalue_to_rvalue.
4309 (build_binary_op): Do not treat _Atomic void as a qualified
4310 version of void.
4311
0c249d4b
DD
43122013-11-06 DJ Delorie <dj@redhat.com>
4313
4314 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4315 both explicit and builtin, print the location of the explicit one.
4316
6d7f7e0a
TB
43172013-11-05 Tobias Burnus <burnus@net-b.de>
4318
4319 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4320 c_parser_omp_distribute, c_parser_omp_teams,
4321 c_parser_omp_target, c_parser_omp_declare): Handle
4322 -fopenmp-simd.
4323
b906f4ca
MP
43242013-11-03 Marek Polacek <polacek@redhat.com>
4325
4326 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4327
ee1d5a02
JJ
43282013-11-01 Jakub Jelinek <jakub@redhat.com>
4329
4330 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4331 check_dup_generic at the end, unless remove is true.
4332 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4333 remove = true;.
4334 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4335
5a9785fb
JJ
43362013-10-31 Jakub Jelinek <jakub@redhat.com>
4337
4338 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4339 with decl that is not pointer nor array.
4340
939b37da
BI
43412013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4342
4343 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4344 a spawning function is found.
4345 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4346 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4347 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4348 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4349 case.
4350 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4351 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4352 expr.
4353 (c_finish_return): Added a check to reject _Cilk_spawn in return
4354 expression.
4355 (build_cilk_spawn): New function.
4356 (build_cilk_sync): Likewise.
4357 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4358
d4af74d4
TB
43592013-10-27 Tobias Burnus <burnus@net-b.de>
4360
4361 PR other/33426
4362 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4363 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4364 (c_parser_statement_after_labels): Update calls.
4365
d73749df 43662013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4367
4368 PR other/33426
4369 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4370 Handle PRAGMA_IVDEP.
4371 (c_parser_statement_after_labels): Update call.
4372
f28aa681
MP
43732013-10-24 Marek Polacek <polacek@redhat.com>
4374
4375 * c-parser.c (c_parser_struct_declaration): Add a comment.
4376 (c_parser_declarator): Don't allow _Alignas here.
4377
0645c1a2
AM
43782013-10-17 Andrew MacLeod <amacleod@redhat.com>
4379
4380 * c-parser.c: Include omp-low.h.
4381 * c-typeck.c: Likewise.
4382
568a31f2
MP
43832013-10-17 Marek Polacek <polacek@redhat.com>
4384
4385 PR c/58267
4386 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4387 Document syntax of the array-declarator.
4388 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4389 are not permitted.
4390 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4391 (c_parser_struct_declaration): Likewise.
4392 (c_parser_declarator): Likewise.
4393 (c_parser_direct_declarator_inner): Likewise.
4394 (c_parser_parameter_declaration): Likewise.
4395 (c_parser_type_name): Likewise.
4396
acf0174b
JJ
43972013-10-11 Jakub Jelinek <jakub@redhat.com>
4398
4399 * c-lang.h (current_omp_declare_target_attribute): New extern
4400 decl.
4401 * c-parser.c: Include c-lang.h.
4402 (struct c_parser): Change tokens to c_token *.
4403 Add tokens_buf field. Change tokens_avail type to unsigned int.
4404 (c_parser_consume_token): If parser->tokens isn't
4405 &parser->tokens_buf[0], increment parser->tokens.
4406 (c_parser_consume_pragma): Likewise.
4407 (enum pragma_context): Add pragma_struct and pragma_param.
4408 (c_parser_external_declaration): Adjust
4409 c_parser_declaration_or_fndef caller.
4410 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4411 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4412 Adjust recursive call.
4413 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4414 of pragma_external.
4415 (c_parser_parameter_declaration): Use pragma_param instead of
4416 pragma_external.
4417 (c_parser_compound_statement_nostart, c_parser_label,
4418 c_parser_for_statement): Adjust
4419 c_parser_declaration_or_fndef callers.
4420 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4421 it through to c_parser_conditional_expression.
4422 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4423 pass it through to c_parser_binary_expression. Adjust recursive
4424 call.
4425 (c_parser_binary_expression): Remove prec argument, add
4426 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4427 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4428 binop matches it, use build2 instead of parser_build_binary_op.
4429 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4430 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4431 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4432 Handle pragma_struct and pragma_param the same as pragma_external.
4433 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4434 (c_parser_omp_variable_list): Parse array sections for
4435 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4436 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4437 (c_parser_omp_clause_reduction): Handle user defined reductions.
4438 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4439 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4440 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4441 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4442 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4443 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4444 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4445 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4446 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4447 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4448 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4449 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4450 (c_parser_omp_for_loop): Add CODE argument, pass it through
4451 to c_finish_omp_for. Change last argument to cclauses,
4452 and adjust uses to grab parallel clauses from the array of all
4453 the split clauses. Adjust c_parser_binary_expression,
4454 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4455 (omp_split_clauses): New function.
4456 (c_parser_omp_simd): New function.
4457 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4458 Allow the function to be called also when parsing combined constructs,
4459 and call c_parser_omp_simd when parsing for simd.
4460 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4461 #pragma omp section, require exactly one structured-block instead of
4462 sequence of statements.
4463 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4464 Allow the function to be called also when parsing combined constructs.
4465 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4466 Allow the function to be called also when parsing combined
4467 constructs.
4468 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4469 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4470 c_parser_omp_teams, c_parser_omp_target_data,
4471 c_parser_omp_target_update, c_parser_omp_target,
4472 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4473 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4474 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4475 (c_parser_omp_construct): Add p_name and mask vars. Handle
4476 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4477 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4478 and c_parser_omp_sections callers.
4479 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4480 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4481 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4482 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4483 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4484 OMP_CLAUSE_DEPEND.
4485 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4486 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4487 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4488 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4489 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4490 * c-typeck.c: Include tree-inline.h.
4491 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4492 handle_omp_array_sections_1, handle_omp_array_sections,
4493 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4494 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4495 user defined reductions.
4496 (c_tree_equal): New function.
4497 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4498 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4499 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4500 c_check_omp_declare_reduction_r): New prototypes.
4501 * c-decl.c (current_omp_declare_target_attribute): New variable.
4502 (c_decl_attributes): New function.
4503 (start_decl, start_function): Use it instead of decl_attributes.
4504 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4505 c_omp_reduction_decl, c_omp_reduction_lookup,
4506 c_check_omp_declare_reduction_r): New functions.
4507
0a6c2227
TT
45082013-09-25 Tom Tromey <tromey@redhat.com>
4509
4510 * Make-lang.in (c/gccspec.o): Remove.
4511 (CFLAGS-c/gccspec.o): New variable.
4512 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4513 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4514 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4515
f3bc55f0
TT
45162013-09-25 Tom Tromey <tromey@redhat.com>
4517
4518 * Make-lang.in (c/gccspec.o): Don't use subshell.
4519
a24d975c
MP
45202013-09-18 Marek Polacek <polacek@redhat.com>
4521
4522 PR sanitize/58443
4523 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4524 Remove unnecessary check.
4525
ce6923c5
MP
45262013-09-18 Marek Polacek <polacek@redhat.com>
4527
4528 PR sanitizer/58411
4529 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4530 no_sanitize_undefined attribute.
4531
a1e51df9
KT
45322013-09-13 Kai Tietz <ktietz@redhat.com>
4533
4534 PR target/57848
4535 * c-decl.c (c_builtin_function_ext_scope): Remove
4536 wrong assumption that it is never called on prexisting
4537 symbol.
4538
0af94e6f
JR
45392013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4540
4541 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4542
20059c8b
GDR
45432013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4544
4545 * c-objc-common.c (c_tree_printer): Tidy.
4546
de5a5fa1
MP
45472013-08-30 Marek Polacek <polacek@redhat.com>
4548
4549 * c-typeck.c (build_binary_op): Add division by zero and shift
4550 instrumentation.
4551
2531a1d9 45522013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4553 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4554
6e2bcc98 4555 PR c/35649
2531a1d9
JR
4556 * c-typeck.c (c_common_type): Prefer double_type_node over
4557 other REAL_TYPE types with the same precision.
4558 (convert_arguments): Likewise.
4559
025311c4
GDR
45602013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4561
4562 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4563 (c_initialize_diagnostics): Call a destructor for the early printer.
4564
da6ca2b5
GDR
45652013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4566
4567 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4568 printer initialization.
4569
318cda85 45702013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4571
318cda85
BI
4572 PR c/57490
4573 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4574 check for truth values.
4575 (expand_array_notation_exprs): Added truth values case. Removed an
4576 unwanted else. Added for-loop to walk through subtrees in default
4577 case.
4578
b066401f
GDR
45792013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4580
4581 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4582
fb48aadc
JM
45832013-07-23 Joseph Myers <joseph@codesourcery.com>
4584
4585 * c-parser.c (struct c_generic_association): Fix typo.
4586
433cc7b0
TT
45872013-07-23 Tom Tromey <tromey@redhat.com>
4588 Joseph Myers <joseph@codesourcery.com>
4589
4590 * c-parser.c (struct c_generic_association): New.
4591 (c_generic_association_d): New typedef.
4592 (c_parser_generic_selection): New function.
4593 (c_parser_postfix_expression): Handle RID_GENERIC.
4594
26d40c3d
JM
45952013-07-13 Jason Merrill <jason@redhat.com>
4596
4597 PR c++/57793
4598 * c-decl.c (finish_struct): Check for too-large class.
4599
ecdbd01a 46002013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4601
4602 PR c/57821
4603 * c-typeck.c (set_init_index): When folding, check for index overflow.
4604
1141ed3f
BI
46052013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4606
4607 * c-parser.c (c_parser_array_notation): Removed rejection of array
4608 notations in an array of function pointers.
4609
713b46fa
BI
46102013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4611
4612 * c-array-notation.c (make_triplet_val_inv): New function.
4613 (create_cmp_incr): Likewise.
4614 (create_array_refs): Likewise.
4615 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4616 Also modularized common parts between functions and called the function.
4617 (build_array_notation_expr): Likewise.
4618 (fix_conditional_array_notations_1): Likewise.
4619 (fix_array_notation_expr): Likewise.
4620 (fix_array_notation_call_expr): Likewise.
4621
92f20202
MP
46222013-06-18 Marek Polacek <polacek@redhat.com>
4623
4624 PR c/57630
4625 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4626
73a23b06
BI
46272013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4628
4629 * c-array-notation.c (build_array_notation_expr): Reject array notation
4630 mismatch between LHS and RHS even inside a call_expr. Also, removed
4631 a couple while statements that were dead code.
4632
00b8517d
BI
46332013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4634
4635 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4636 excessive precision expressions in function parameters. Also removed
4637 couple unwanted while statements.
4638
1509bdda
BI
46392013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4640
4641 * c-array-notation.c (expand_array_notation_exprs): Added
4642 ARRAY_NOTATION_REF case.
4643
d60f1706
BI
46442013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4645
4646 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4647 function to c-family/array-notation-common.c.
4648 (is_cilkplus_reduce_builtin): Likewise.
4649 (find_rank): Likewise.
4650 (extract_array_notation_exprs): Likewise.
4651 (replace_array_notations): Likewise.
4652 (find_inv_trees): Likewise.
4653 (replace_inv_trees): Likewise.
4654 (contains_array_notation_expr): Likewise.
4655 (find_correct_array_notation_type): Likewise.
4656 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4657 (struct inv_list): Moved this to c-family/array-notation-common.c.
4658 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4659
6d6efbb3
BI
46602013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4661
4662 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4663 reduction functions outside the for-loop. Added a check if the fundecl
4664 is non-NULL. Finally, removed an unwanted if-statement, and made the
4665 body unconditional.
4666
25c22937
BI
46672013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4668
4669 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4670 condition of the if-statement matches the rank of else-block and then-
4671 block when array notations are used.
4672 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4673 expression after the entire function body is parsed.
4674 (c_parser_expr_no_commas): Delayed creating array notation expressions
4675 to the end of function parsing.
4676 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4677 whole if-statement instead of just the condition.
4678 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4679
edd25645
BI
46802013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4681
4682 PR c/57474
4683 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4684 array to NULL_TREE if they are unused. Also added a check for the
4685 field to be NULL before its fields are used in future.
4686
065ce7f1
RO
46872013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4688
4689 PR bootstrap/57450
4690 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4691 (build_array_notation_expr): Likewise.
4692
36536d79
BI
46932013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4694
4695 * c-typeck.c (build_array_ref): Added a check to see if array's
4696 index is greater than one. If true, then emit an error.
4697 (build_function_call_vec): Exclude error reporting and checking
4698 for builtin array-notation functions.
4699 (convert_arguments): Likewise.
4700 (c_finish_return): Added a check for array notations as a return
4701 expression. If true, then emit an error.
4702 (c_finish_loop): Added a check for array notations in a loop
4703 condition. If true then emit an error.
4704 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4705 (build_binary_op): Added a check for array notation expr inside
4706 op1 and op0. If present, we call another function to find correct
4707 type.
4708 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4709 * c-parser.c (c_parser_compound_statement): Check if array
4710 notation code is used in tree, if so, then transform them into
4711 appropriate C code.
4712 (c_parser_expr_no_commas): Check if array notation is used in LHS
4713 or RHS, if so, then build array notation expression instead of
4714 regular modify.
4715 (c_parser_postfix_expression_after_primary): Added a check for
4716 colon(s) after square braces, if so then handle it like an array
4717 notation. Also, break up array notations in unary op if found.
4718 (c_parser_direct_declarator_inner): Added a check for array
4719 notation.
4720 (c_parser_compound_statement): Added a check for array notation in
4721 a stmt. If one is present, then expand array notation expr.
4722 (c_parser_if_statement): Likewise.
4723 (c_parser_switch_statement): Added a check for array notations in
4724 a switch statement's condition. If true, then output an error.
4725 (c_parser_while_statement): Similarly, but for a while.
4726 (c_parser_do_statement): Similarly, but for a do-while.
4727 (c_parser_for_statement): Similarly, but for a for-loop.
4728 (c_parser_unary_expression): Check if array notation is used in a
4729 pre-increment or pre-decrement expression. If true, then expand
4730 them.
4731 (c_parser_array_notation): New function.
4732 * c-array-notation.c: New file.
4733 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4734
cd192ccc
MS
47352013-05-23 Mike Stump <mikestump@comcast.net>
4736
4737 * c-typeck.c (convert_for_assignment): Handle references to memory
4738 spaces better.
4739
427b248d
JM
47402013-05-16 Jason Merrill <jason@redhat.com>
4741
4742 * Make-lang.in (cc1$(exeext)): Use link mutex.
4743
44d90fe1
PC
47442013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4745
4746 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4747 to simply use OPT_Wpointer_arith.
4748 (build_unary_op): Likewise.
4749
4e7d7b3d
JJ
47502013-04-03 Jakub Jelinek <jakub@redhat.com>
4751
4752 PR c/19449
4753 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4754 argument. If set, or it temporarily for parsing of the first
4755 argument into force_folding_builtin_constant_p.
4756 (c_parser_postfix_expression): Adjust callers.
4757
839b422f
RB
47582013-03-21 Richard Biener <rguenther@suse.de>
4759
4760 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4761 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4762
2ee028f1
MP
47632013-02-12 Marek Polacek <polacek@redhat.com>
4764
4765 PR c/44938
4766 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4767 origtypes to NULL.
4768
8824edff
JJ
47692013-01-24 Jakub Jelinek <jakub@redhat.com>
4770
4771 PR c/56078
4772 * c-typeck.c (set_nonincremental_init_from_string): If
4773 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4774 returned false.
4775 (process_init_element): Likewise.
4776
eadd3d0d
JJ
47772012-12-20 Jakub Jelinek <jakub@redhat.com>
4778
4779 PR c++/55619
4780 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4781 argument, don't call default_function_array_conversion
4782 nor c_fully_fold here.
4783 (c_parser_asm_statement): Adjust callers.
4784 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4785 and outputs here, and call default_function_array_conversion
4786 on inputs that don't need to be addressable.
4787
f8a93a2e
JJ
47882012-12-18 Jakub Jelinek <jakub@redhat.com>
4789
4790 PR c/39464
4791 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4792 warning require that both c_common_unsigned_type as well as
4793 c_common_signed_type is the same for both mvl and mvr types.
4794
9771b263
DN
47952012-11-16 Diego Novillo <dnovillo@google.com>
4796
4797 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4798
4799 * c-common.c: Use new vec API in vec.h.
4800 * c-common.h: Likewise.
4801 * c-gimplify.c: Likewise.
4802 * c-pragma.c: Likewise.
4803 * c-pretty-print.c: Likewise.
4804 * c-pretty-print.h: Likewise.
4805 * c-semantics.c: Likewise.
4806 * c-decl.c: Likewise.
4807 * c-parser.c: Likewise.
4808 * c-tree.h: Likewise.
4809 * c-typeck.c: Likewise.
4810
880661a4
JW
48112012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4812
4813 PR c++/54930
4814 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4815
077d1abe
MLI
48162012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4817
4818 PR c/53066
4819 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4820 shadows a function, unless the variable is a function or a
4821 pointer-to-function.
4822
3a785c97
JJ
48232012-10-12 Jakub Jelinek <jakub@redhat.com>
4824
4825 PR c/54381
4826 * c-parser.c (struct c_tree_loc_pair): Removed.
4827 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4828 add location_t * and tree * arguments, fill in array of 3
4829 sizeof_arg trees and corresponding locs.
4830 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4831 c_parser_expr_list callers.
4832 (c_parser_postfix_expression_after_primary): Likewise. Pass
4833 array of 3 sizeof_arg trees and locs (corresponding to first
4834 3 arguments) to sizeof_pointer_memaccess_warning.
4835
703c8606
LC
48362012-10-09 Lawrence Crowl <crowl@google.com>
4837
4838 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4839 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4840 hash table.
4841
5d9de0d0
PC
48422012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4843
4844 PR c++/54194
4845 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4846 call.
4847
a212e43f
MG
48482012-10-09 Marc Glisse <marc.glisse@inria.fr>
4849
4850 PR c++/54427
4851 * c-typeck.c: Include c-common.h.
4852 (enum stv_conv): Moved to c-common.h.
4853 (scalar_to_vector): Moved to c-common.c.
4854 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4855 * Make-lang.in: c-typeck.c depends on c-common.h.
4856
3b78de56
AC
48572012-10-04 Arnaud Charlet <charlet@adacore.com>
4858
4859 * c-decl.c (c_write_global_declarations): Fix handling of
4860 -fdump-ada-spec*.
4861
78c60e3d
SS
48622012-09-30 Sharad Singhai <singhai@google.com>
4863
4864 * c-decl.c (c_write_global_declarations): Use a different method
4865 to determine if the dump has ben initialized.
4866
9f33203d
JM
48672012-09-14 Joseph Myers <joseph@codesourcery.com>
4868
4869 PR c/54552
4870 * c-typeck.c (c_cast_expr): When casting to a type requiring
4871 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4872 c_fully_fold first.
4873
a27d595d
JM
48742012-09-14 Joseph Myers <joseph@codesourcery.com>
4875
4876 PR c/54103
4877 * c-typeck.c (build_unary_op): Pass original argument of
4878 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4879 any C_MAYBE_CONST_EXPR, if it has integer operands.
4880 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4881 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4882 to c_objc_common_truthvalue_conversion, then remove any
4883 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4884 c_objc_common_truthvalue_conversion not
4885 c_common_truthvalue_conversion.
4886 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4887 call note_integer_operands for arguments with integer operands
4888 that are not integer constants.
4889
9feb29df
JJ
48902012-09-13 Jakub Jelinek <jakub@redhat.com>
4891
4892 PR c/54559
4893 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4894 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4895
d409320c
JJ
48962012-08-31 Jakub Jelinek <jakub@redhat.com>
4897
4898 PR c/54428
4899 * c-convert.c (convert): Don't call fold_convert_loc if
4900 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4901 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4902 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4903
6265d07c
JJ
49042012-08-24 Jakub Jelinek <jakub@redhat.com>
4905
4906 PR c/54355
4907 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4908 for nested and empty_ok arguments in the call to
4909 c_parser_declaration_or_fndef.
4910
1a4049e7
JJ
49112012-08-17 Jakub Jelinek <jakub@redhat.com>
4912
4913 * c-tree.h (c_last_sizeof_arg): Declare.
4914 * c-parser.c (struct c_tree_loc_pair): New type.
4915 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4916 non-NULL.
4917 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4918 (c_parser_postfix_expression_after_primary): Likewise. Call
4919 sizeof_pointer_memaccess_warning if needed.
4920 (sizeof_ptr_memacc_comptypes): New function.
4921 * c-typeck.c (c_last_sizeof_arg): New global variable.
4922 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4923
0229aee9
UB
49242012-07-24 Uros Bizjak <ubizjak@gmail.com>
4925
4926 * c-lang.h (lang_decl): Add variable_size GTY option.
4927
7ee2468b
SB
49282012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4929
4930 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4931 * Make-lang.in: Fix dependencies.
4932
d4a10d0a
SB
49332012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4934
4935 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4936 and add language Makefile hooks.
4937 * config-lang.in: New file.
4938 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4939 add the required "normal" config-lang.in rules.
4940 * c-lang.h: Moved from gcc/ to here.
4941 * c-tree.h: Likewise.
4942 * c-objc-common.c: Likewise.
4943 * c-objc-common.h: Likewise.
4944 * c-typeck.c: Likewise.
4945 * c-convert.c: Likewise.
4946 * c-lang.c: Likewise.
4947 * c-aux-info.c: Likewise.
4948 * c-errors.c: Likewise.
4949 * gccspec.c: Likewise.
4950 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4951 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4952\f
cbe34bb5 4953Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4954
4955Copying and distribution of this file, with or without modification,
4956are permitted in any medium without royalty provided the copyright
4957notice and this notice are preserved.