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