]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
[64/77] Add a scalar_mode class
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
14e18d71
DM
12017-08-24 David Malcolm <dmalcolm@redhat.com>
2
3 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
4 than CAN_HAVE_LOCATION_P when determining whether to use the
5 location_t value within "value".
6
7f204c0f
DM
72017-08-21 David Malcolm <dmalcolm@redhat.com>
8
9 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
10 rather than peeking the location of the first token.
11 * c-tree.h (c_expr::get_location): New method.
12
2f687306
DM
132017-08-21 David Malcolm <dmalcolm@redhat.com>
14
15 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
16 to check_function_arguments.
17
3e7b80d7
MP
182017-08-18 Marek Polacek <polacek@redhat.com>
19
20 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
21 commentary.
22
00aa1fa2
L
232017-08-18 H.J. Lu <hongjiu.lu@intel.com>
24
25 PR c/53037
26 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
27 (check_bitfield_type_and_width): Don't allow bit-field with
28 warn_if_not_aligned type.
29
da67acb9
MS
302017-08-14 Martin Sebor <msebor@redhat.com>
31
32 PR c/81117
33 * c-objc-common.c (c_objc_common_init): Handle 'G'.
34
bb85aa74
MP
352017-08-11 Marek Polacek <polacek@redhat.com>
36
37 PR c/81795
38 * c-decl.c (pushtag): Only print inform if the warning was printed.
39 (grokdeclarator): Likewise.
40
32129a17
DM
412017-08-10 David Malcolm <dmalcolm@redhat.com>
42
43 * c-parser.c (c_parser_error): Rename to...
44 (c_parser_error_richloc): ...this, making static, and adding
45 "richloc" parameter, passing it to the c_parse_error call,
46 rather than calling c_parser_set_source_position_from_token.
47 (c_parser_error): Reintroduce, reimplementing in terms of the
48 above, converting return type from void to bool.
49 (class token_pair): New class.
50 (struct matching_paren_traits): New struct.
51 (matching_parens): New typedef.
52 (struct matching_brace_traits): New struct.
53 (matching_braces): New typedef.
54 (get_matching_symbol): New function.
55 (c_parser_require): Add param MATCHING_LOCATION, using it to
56 highlight matching "opening" tokens for missing "closing" tokens.
57 (c_parser_skip_until_found): Likewise.
58 (c_parser_static_assert_declaration_no_semi): Convert explicit
59 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
60 class matching_parens, so that the pertinent open parenthesis is
61 highlighted when there are problems locating the close
62 parenthesis.
63 (c_parser_struct_or_union_specifier): Likewise.
64 (c_parser_typeof_specifier): Likewise.
65 (c_parser_alignas_specifier): Likewise.
66 (c_parser_simple_asm_expr): Likewise.
67 (c_parser_braced_init): Likewise, for matching_braces.
68 (c_parser_paren_condition): Likewise, for matching_parens.
69 (c_parser_switch_statement): Likewise.
70 (c_parser_for_statement): Likewise.
71 (c_parser_asm_statement): Likewise.
72 (c_parser_asm_operands): Likewise.
73 (c_parser_cast_expression): Likewise.
74 (c_parser_sizeof_expression): Likewise.
75 (c_parser_alignof_expression): Likewise.
76 (c_parser_generic_selection): Likewise.
77 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
78 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
79 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
80 In case CPP_OPEN_PAREN, pass loc_open_paren to the
81 c_parser_skip_until_found call.
82 (c_parser_objc_class_definition): Use class matching_parens as
83 above.
84 (c_parser_objc_method_decl): Likewise.
85 (c_parser_objc_try_catch_finally_statement): Likewise.
86 (c_parser_objc_synchronized_statement): Likewise.
87 (c_parser_objc_at_property_declaration): Likewise.
88 (c_parser_oacc_wait_list): Likewise.
89 (c_parser_omp_var_list_parens): Likewise.
90 (c_parser_omp_clause_collapse): Likewise.
91 (c_parser_omp_clause_default): Likewise.
92 (c_parser_omp_clause_if): Likewise.
93 (c_parser_omp_clause_num_threads): Likewise.
94 (c_parser_omp_clause_num_tasks): Likewise.
95 (c_parser_omp_clause_grainsize): Likewise.
96 (c_parser_omp_clause_priority): Likewise.
97 (c_parser_omp_clause_hint): Likewise.
98 (c_parser_omp_clause_defaultmap): Likewise.
99 (c_parser_oacc_single_int_clause): Likewise.
100 (c_parser_omp_clause_ordered): Likewise.
101 (c_parser_omp_clause_reduction): Likewise.
102 (c_parser_omp_clause_schedule): Likewise.
103 (c_parser_omp_clause_num_teams): Likewise.
104 (c_parser_omp_clause_thread_limit): Likewise.
105 (c_parser_omp_clause_aligned): Likewise.
106 (c_parser_omp_clause_linear): Likewise.
107 (c_parser_omp_clause_safelen): Likewise.
108 (c_parser_omp_clause_simdlen): Likewise.
109 (c_parser_omp_clause_depend): Likewise.
110 (c_parser_omp_clause_map): Likewise.
111 (c_parser_omp_clause_device): Likewise.
112 (c_parser_omp_clause_dist_schedule): Likewise.
113 (c_parser_omp_clause_proc_bind): Likewise.
114 (c_parser_omp_clause_uniform): Likewise.
115 (c_parser_omp_for_loop): Likewise.
116 (c_parser_cilk_clause_vectorlength): Likewise.
117 (c_parser_cilk_clause_linear): Likewise.
118 (c_parser_transaction_expression): Likewise.
119 * c-parser.h (c_parser_require): Add param matching_location with
120 default UNKNOWN_LOCATION.
121 (c_parser_error): Convert return type from void to bool.
122 (c_parser_skip_until_found): Add param matching_location with
123 default UNKNOWN_LOCATION.
124
30af3a2b
MP
1252017-08-09 Marek Polacek <polacek@redhat.com>
126
127 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
128 * c-tree.h (build_external_ref): Update declaration.
129 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
130 (build_external_ref): Change the type of a parameter to bool.
131 (parser_build_binary_op): Use true/false instead of 1/0.
132 (pointer_diff): Likewise.
133 (build_modify_expr): Likewise.
134 (set_designator): Change the type of a parameter to bool.
135 (set_init_index): Use true/false instead of 1/0.
136 (set_init_label): Likewise.
137 (output_init_element): Change the type of a parameter to bool.
138 (output_pending_init_elements): Use true/false instead of 1/0.
139 (process_init_element): Likewise.
140 (build_binary_op): Change the type of a parameter to bool.
141
296c53ac
MP
1422017-08-09 Marek Polacek <polacek@redhat.com>
143
144 PR c/81233
145 * c-typeck.c (pedwarn_init): Make the function take a variable list.
146 Call emit_diagnostic_valist instead of pedwarn.
147 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
148 Print the relevant types in diagnostics.
149
a32c8316
MP
1502017-08-09 Marek Polacek <polacek@redhat.com>
151
152 PR c/81417
153 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
154 build_conditional_expr.
155 * c-parser.c (c_parser_conditional_expression): Create locations for
156 EXP1 and EXP2 from their source ranges. Pass the locations down to
157 build_conditional_expr.
158 * c-tree.h (build_conditional_expr): Update declaration.
159 * c-typeck.c (build_conditional_expr): Add location_t parameters.
160 For -Wsign-compare, also print the types.
161
314e6352
ML
1622017-08-08 Martin Liska <mliska@suse.cz>
163
164 * c-convert.c: Include header files.
165 * c-typeck.c: Likewise.
166
577eec56
ML
1672017-08-07 Martin Liska <mliska@suse.cz>
168
169 * c-parser.c (c_parser_attributes): Canonicalize name of an
170 attribute.
171
f7b6353a
MP
1722017-08-02 Marek Polacek <polacek@redhat.com>
173
174 PR c/81289
175 * c-parser.c (c_parser_unary_expression): Use set_error.
176
8a6eab34
MP
177 PR c/81448
178 PR c/81306
179 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
180 warnings. Avoid walking MACRO_MAP_LOCATIONS.
181
7fef86d3
JH
1822017-07-31 Jan Hubicka <hubicka@ucw.cz>
183 Martin Liska <mliska@suse.cz>
184
185 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 186 statement.
7fef86d3 187
f34ebeb2
ML
1882017-07-31 Martin Liska <mliska@suse.cz>
189
190 PR sanitize/81530
191 * c-convert.c (convert): Guard condition with flag_sanitize_p
192 also with current_function_decl non-null equality.
193 * c-decl.c (grokdeclarator): Likewise.
194 * c-typeck.c (build_binary_op): Likewise.
195
8595f67b
MP
1962017-07-25 Marek Polacek <polacek@redhat.com>
197
198 * c-decl.c (grokfield): Remove local variable.
199
d49718d6
MP
2002017-07-25 Marek Polacek <polacek@redhat.com>
201
202 PR c/81364
203 * c-parser.c (c_parser_else_body): Don't warn about multistatement
204 macro expansion if the body is in { }.
205 (c_parser_while_statement): Likewise.
206 (c_parser_for_statement): Likewise.
207
ff22eb12
NS
2082017-07-18 Nathan Sidwell <nathan@acm.org>
209
210 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
211
eea77d1f
DM
2122017-07-14 David Malcolm <dmalcolm@redhat.com>
213
214 * c-decl.c (implicitly_declare): When suggesting a missing
215 #include, provide a fix-it hint.
216
b6f43128
DM
2172017-07-06 David Malcolm <dmalcolm@redhat.com>
218
219 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
220 and call that instead.
221 * c-tree.h (selftest::run_c_tests): New decl.
222
3e2becc4
MP
2232017-06-26 Marek Polacek <polacek@redhat.com>
224
225 PR c/80116
226 * c-parser.c (c_parser_if_body): Set the location of the
227 body of the conditional after parsing all the labels. Call
228 warn_for_multistatement_macros.
229 (c_parser_else_body): Likewise.
230 (c_parser_switch_statement): Likewise.
231 (c_parser_while_statement): Likewise.
232 (c_parser_for_statement): Likewise.
233 (c_parser_statement): Add a default argument. Save the location
234 after labels have been parsed.
235 (c_parser_c99_block_statement): Likewise.
236
343ae898
RB
2372017-06-19 Richard Biener <rguenther@suse.de>
238
239 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
240 negated _Literals to parse _Literal (int) -1.
241
45b2222a
ML
2422017-06-13 Martin Liska <mliska@suse.cz>
243
244 PR sanitize/78204
245 * c-convert.c (convert): Use sanitize_flags_p.
246 * c-decl.c (grokdeclarator): Likewise.
247 * c-typeck.c (convert_for_assignment): Likewise.
248 (c_finish_return): Likewise.
249 (build_binary_op): Likewise.
250
8ab7005b
JJ
2512017-06-08 Jakub Jelinek <jakub@redhat.com>
252
253 PR c/81006
254 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
255 to sizetype before size_binop.
256
363dc72c
JJ
2572017-06-07 Jakub Jelinek <jakub@redhat.com>
258
259 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
260 of TDI_generic.
261
dc949728
MP
2622017-06-06 Marek Polacek <polacek@redhat.com>
263
264 PR c/79983
265 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
266 ref.
267 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
268
40ffd95f
BE
2692017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
270
271 * c-parser.c (c_parser_binary_expression): Implement the
272 -Wsizeof_pointer_div warning.
273 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
274 from a parenthesized expression.
275 (c_parser_expr_list): Use c_last_sizeof_loc.
276 * c-tree.h (c_last_sizeof_loc): New external.
277 * c-typeck.c (c_last_sizeof_loc): New variable.
278 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
279
9fc5e7a4
MM
2802017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
281
282 PR testsuite/80580
283 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
284
f012c8ef
DM
2852017-05-30 David Malcolm <dmalcolm@redhat.com>
286
287 * c-objc-common.c (c_tree_printer): Gain bool and const char **
288 parameters.
289
3cd211af
MS
2902017-05-24 Martin Sebor <msebor@redhat.com>
291
292 PR c/80731
293 * c-fold.c (c_fully_fold_internal): Adjust.
294 * c-typeck.c (parser_build_unary_op): Adjust.
295
fd71a9a2
TS
2962017-05-23 Thomas Schwinge <thomas@codesourcery.com>
297
298 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
299 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
300 "VECTOR_LENGTH".
301
92fa0f9e
MP
3022017-05-23 Marek Polacek <polacek@redhat.com>
303
304 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
305 quotes.
306
d11c168a
JJ
3072017-05-22 Jakub Jelinek <jakub@redhat.com>
308
309 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
310 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
311 it returned invariant. Call tree_invariant_p unconditionally
312 afterwards to decide whether to return expr or op0.
313
58aca9d9
NS
3142017-05-22 Nathan Sidwell <nathan@acm.org>
315
316 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
317
7fd549d2
TS
3182017-05-19 Thomas Schwinge <thomas@codesourcery.com>
319
320 * c-parser.c (c_parser_omp_clause_default): Handle
321 "OMP_CLAUSE_DEFAULT_PRESENT".
322
6ecd2339
BE
3232017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
324
325 * config-lang.in (gtfiles): Add c-family/c-format.c.
326
8a57ecff
NS
3272017-05-18 Nathan Sidwell <nathan@acm.org>
328
329 * c-decl.c (pushdecl_top_level): Delete unused function.
330
6574d78e
MP
3312017-05-18 Marek Polacek <polacek@redhat.com>
332
333 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
334 (check_earlier_gotos): Likewise.
335 (define_label): Likewise.
336 (pending_xref_error): Likewise.
337 (smallest_type_quals_location): Likewise.
338 (grokdeclarator): Likewise.
339 (grokparms): Likewise.
340 (identifier_global_value): Likewise.
341 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
342 (find_init_member): Likewise.
343
e3455240
MP
3442017-05-18 Marek Polacek <polacek@redhat.com>
345
346 * c-decl.c (start_decl): Use false/true instead of 0/1.
347 (grokdeclarator): Likewise.
348 (finish_struct): Likewise.
349 (start_function): Change the return type to bool. Use false/true
350 instead of 0/1.
351 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
352 * c-tree.h (start_function): Update.
353 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
354 (set_designator): Change the return type to bool. Use false/true
355 instead of 0/1.
356
3fa8871b
MP
3572017-05-17 Marek Polacek <polacek@redhat.com>
358
359 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
360 * c-typeck.c: Likewise.
361
142473df
MP
3622017-05-17 Marek Polacek <polacek@redhat.com>
363
364 PR sanitizer/80659
365 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
366 DECL_IGNORED_P even for non-static compound literals.
367
1a817418
ML
3682017-05-17 Martin Liska <mliska@suse.cz>
369
370 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
371 use it instead of int type.
372
b2fa0a8b
MP
3732017-05-17 Marek Polacek <polacek@redhat.com>
374
375 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
376 call c_fully_fold.
377 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
378 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
379 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
380 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
381 save_expr.
382 (c_parser_conditional_expression): Likewise.
383 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
384 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
385 (process_init_element): Likewise.
386 (build_binary_op): Likewise.
387 (handle_omp_array_sections_1): Likewise.
388
1e47f02b
TS
3892017-05-12 Thomas Schwinge <thomas@codesourcery.com>
390
391 * c-parser.c (c_parser_omp_clause_num_gangs)
392 (c_parser_omp_clause_num_workers)
393 (c_parser_omp_clause_vector_length): Merge functions into...
394 (c_parser_oacc_single_int_clause): ... this new function. Adjust
395 all users.
396
c24e924f
NS
3972017-05-11 Nathan Sidwell <nathan@acm.org>
398
399 * gimple-parser.c: Don't #include tree-dump.h.
400
c587104e
MM
4012017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
402
403 PR testsuite/80580
404 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
405
67ac9a9d
MM
4062017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
407
408 PR testsuite/80580
409 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
410 incorrect __MEM syntax.
411
ac4eb40f
MM
4122017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
413
414 PR testsuite/80580
415 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
416 type of unary '*'.
417
641da50a
NS
4182017-05-09 Nathan Sidwell <nathan@acm.org>
419
420 * c-tree.h (pushdecl): Declare.
421
56d35585
DM
4222017-05-05 David Malcolm <dmalcolm@redhat.com>
423
424 * c-decl.c (warn_defaults_to): Replace report_diagnostic
425 with diagnostic_report_diagnostic.
426 * c-errors.c (pedwarn_c99): Likewise.
427 (pedwarn_c90): Likewise.
428
815d9cc6
XR
4292017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
430
431 PR c++/80038
432 * c-gimplify.c (c_gimplify_expr): Remove calls to
433 cilk_gimplifY_call_params_in_spawned_fn.
434
1c4ea66f
DM
4352017-04-25 David Malcolm <dmalcolm@redhat.com>
436
437 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
438 hint for removing extra semicolon.
439
666f7903
JJ
4402017-04-21 Jakub Jelinek <jakub@redhat.com>
441
442 PR c/80468
443 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
444 enabled, set specs->type to integer_type_node.
445
5764ee3c
JW
4462017-04-03 Jonathan Wakely <jwakely@redhat.com>
447
448 * c-array-notation.c: Fix typo in comment.
449
10fa8dfb
MP
4502017-03-29 Marek Polacek <polacek@redhat.com>
451
452 PR c/79730
453 * c-decl.c (finish_decl): Check VAR_P.
454
a9e4a1a5
JJ
4552017-03-27 Jakub Jelinek <jakub@redhat.com>
456
457 PR middle-end/80162
458 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
459 * c-typeck.c (c_mark_addressable): Likewise. Look through
460 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
461 to ARRAY_TYPE.
462 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
463
ee3ff394
MP
4642017-03-23 Marek Polacek <polacek@redhat.com>
465
466 * c-tree.h: Remove a C_RID_YYCODE reference.
467
4d1b8e70
JJ
4682017-03-21 Jakub Jelinek <jakub@redhat.com>
469
470 PR c/80097
471 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
472 optional COMPOUND_EXPR with ubsan instrumentation.
473
31dc71a8
MP
4742017-03-17 Marek Polacek <polacek@redhat.com>
475
476 * c-parser.c: Add C11 references.
477
d579c385
MP
4782017-03-15 Marek Polacek <polacek@redhat.com>
479
480 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
481
85059a38
MP
4822017-03-11 Marek Polacek <polacek@redhat.com>
483
484 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
485
2f6f187a
DM
4862017-03-10 David Malcolm <dmalcolm@redhat.com>
487
488 PR translation/79848
489 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
490 "%qs".
491 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
492
36618428
MP
4932017-03-09 Marek Polacek <polacek@redhat.com>
494
495 PR sanitizer/79757
496 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
497 parameter declarations with initializers.
498
01e5af5a
JJ
4992017-03-09 Jakub Jelinek <jakub@redhat.com>
500
501 PR c/79969
502 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
503 TYPE_STUB_DECL.
504
a71dbc63
JJ
5052017-03-07 Jakub Jelinek <jakub@redhat.com>
506
507 PR c/79834
508 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
509 for "may only be used in compound statements" diagnostics, change it
510 such that the same translatable string is used for all pragmas. For
511 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
512 diagnostics.
513 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
514 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
515 "may only be used in compound statements" diagnostics, such that the
516 same translatable string is used for all pragmas.
517
1ff4bae6
MP
5182017-03-04 Marek Polacek <polacek@redhat.com>
519
520 PR c/79847
521 * c-decl.c (implicit_decl_warning): Add missing space.
522
7f5a7d78
MP
5232017-03-03 Marek Polacek <polacek@redhat.com>
524
525 PR c/79758
526 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
527 current_function_prototype_arg_types is error_mark_node. Fix
528 formatting. Use TREE_VALUE instead of TREE_TYPE.
529
883c8f06
JJ
5302017-03-03 Jakub Jelinek <jakub@redhat.com>
531
79c9b7a8
JJ
532 PR c/79837
533 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
534 %<min%> or %<max%> in the diagnostics, instead mention identifier.
535 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
536 diagnostics.
537
883c8f06
JJ
538 PR c/79836
539 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
540 instead of %<_Generic>.
541 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
542 (c_parser_omp_target_exit_data): Use %<release%> instead of
543 %<release>.
544
324ff1a0
JJ
5452017-02-28 Jakub Jelinek <jakub@redhat.com>
546
547 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
548 instead of just cond ? "..." : "...".
549 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
550 for "enter"/"exit" keyword.
551 (c_finish_oacc_routine): Don't use %s to supply portions of the
552 message.
553
4227c9ad
JJ
5542017-02-24 Jakub Jelinek <jakub@redhat.com>
555
556 PR c++/79588
557 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
558 handle -Wrestrict here.
559 * c-typeck.c (build_function_call_vec): Adjust
560 check_function_arguments caller.
561
5d972e66
RB
5622017-02-23 Richard Biener <rguenther@suse.de>
563
564 PR c/79684
565 * gimple-parser.c (c_parser_gimple_statement): Use set_error
566 to initialize c_exprs to return.
567 (c_parser_gimple_binary_expression): Likewise.
568 (c_parser_gimple_unary_expression): Likewise.
569 (c_parser_gimple_postfix_expression): Likewise.
570
61ac5ebe
MP
5712017-02-22 Marek Polacek <polacek@redhat.com>
572
573 PR c/79662
574 * c-typeck.c (convert_arguments): Handle error_mark_node.
575
41d1b0b1
PK
5762017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
577
578 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
579 value of c_parser_parse_ssa_name against error_mark_node and emit
580 error if ssa name is anonymous and written as default definition.
581
eab1f169
PK
5822017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
583
584 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
585 FMA_EXPR.
586
bcac0b4d
JJ
5872017-02-16 Jakub Jelinek <jakub@redhat.com>
588
589 PR c++/79512
590 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
591 ignore #pragma omp target even when not followed by identifier.
592
1be33173
PK
5932017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
594
595 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
596 (c_parser_gimple_unary_expression): Likewise.
597
aa326bfb
JJ
5982017-02-13 Jakub Jelinek <jakub@redhat.com>
599
600 * c-parser.c (c_parser_oacc_declare): Add missing space in
601 diagnostics.
602
8a398bc5
PK
6032017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
604
605 PR c/79478
606 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
607 set_c_expr_source_range when parsing ssa-name.
608
3dcde5ef
PG
6092017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
610 Richard Biener <rguenther@suse.de>
611
612 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
613 building IL when arguments are error_mark_node.
614 (c_parser_gimple_unary_expression): Likewise.
615 (c_parser_gimple_if_stmt): Likewise.
616 (c_parser_gimple_switch_stmt): Likewise.
617 (c_parser_gimple_return_stmt): Likewise.
618 (c_parser_parse_ssa_name): When name lookup fails do not build
619 an SSA name. Use undeclared rather than not declared in error
620 reporting.
621
192b048b
MP
6222017-02-09 Marek Polacek <polacek@redhat.com>
623
624 PR c/79428
625 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
626 instead of c_parser_skip_until_found.
627
56f71478
JJ
6282017-02-09 Jakub Jelinek <jakub@redhat.com>
629
630 PR c/79431
631 * c-parser.c (c_parser_omp_declare_target): Don't invoke
632 symtab_node::get on automatic variables.
633
02889d23
CLT
6342016-02-09 Nathan Sidwell <nathan@codesourcery.com>
635 Chung-Lin Tang <cltang@codesourcery.com>
636
637 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
638 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
639 semantic checking.
640 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
641
7af4b20d
RB
6422017-02-07 Richard Biener <rguenther@suse.de>
643
644 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
645 (c_parser_gimple_postfix_expression_after_primary):
646 Do not use c_build_function_call_vec to avoid folding and promotion.
647 Simplify.
648
e5e391d6
MO
6492017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
650
651 PR lto/79061
652 * c-decl.c (pop_scope): Pass main_input_filename to
653 build_translation_unit_decl.
654
c2e84327
DM
6552017-01-24 David Malcolm <dmalcolm@redhat.com>
656
657 * c-parser.c: Include "read-rtl-function.h" and
658 "run-rtl-passes.h".
659 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
660 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
661 production. Update for renaming of field "gimple_pass" to
662 "gimple_or_rtl_pass". If __RTL was seen, call
663 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
664 to an auto_timevar, to cope with early exit.
665 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
666 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
667 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
668 Handle RID_RTL.
669 (c_parser_parse_rtl_body): New function.
670 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
671 (struct c_declspecs): Rename field "gimple_pass" to
672 "gimple_or_rtl_pass". Add field "rtl_p".
673 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
674 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
675 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
676 (c_parser_gimple_or_rtl_pass_list): ...this.
677
2ebd93e1
MP
6782017-01-20 Marek Polacek <polacek@redhat.com>
679
680 PR c/64279
681 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
682
b1c95bb5
RB
6832017-01-13 Richard Biener <rguenther@suse.de>
684
685 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
686 nops.
687
25329913
RB
6882017-01-13 Richard Biener <rguenther@suse.de>
689
690 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
691 _Literal ( type-name ) number.
692
6bb4ea5c
RB
6932017-01-12 Richard Biener <rguenther@suse.de>
694
695 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
696 __MEM.
697
6b5b4e9c
JJ
6982017-01-11 Jakub Jelinek <jakub@redhat.com>
699
700 PR c++/72813
701 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
702 PCH file.
703
e3252775
RB
7042017-01-11 Richard Biener <rguenther@suse.de>
705
706 PR bootstrap/79052
707 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
708 returns on parse errors.
709
a9342885
MP
7102017-01-04 Marek Polacek <polacek@redhat.com>
711
712 PR c++/64767
713 * c-parser.c (c_parser_postfix_expression): Mark zero character
714 constants by setting original_type in c_expr.
715 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
716 with a zero character constant.
717 (char_type_p): New function.
718
5dd9a9d0
DM
7192017-01-04 David Malcolm <dmalcolm@redhat.com>
720
721 * c-parser.c (c_parser_declaration_or_fndef): Create a
722 rich_location at init_loc and parse it to start_init.
723 (last_init_list_comma): New global.
724 (c_parser_braced_init): Update last_init_list_comma when parsing
725 commas. Pass it to pop_init_level. Pass location of closing
726 brace to pop_init_level.
727 (c_parser_postfix_expression_after_paren_type): Create a
728 rich_location at type_loc and parse it to start_init.
729 (c_parser_omp_declare_reduction): Likewise for loc.
730 * c-tree.h (start_init): Add rich_location * param.
731 (pop_init_level): Add location_t param.
732 * c-typeck.c (struct initializer_stack): Add field
733 "missing_brace_richloc".
734 (start_init): Add richloc param, use it to initialize
735 the stack node's missing_brace_richloc.
736 (last_init_list_comma): New decl.
737 (finish_implicit_inits): Pass last_init_list_comma to
738 pop_init_level.
739 (push_init_level): When finding missing open braces, add fix-it
740 hints to the richloc.
741 (pop_init_level): Add "insert_before" param and pass it
742 when calling pop_init_level. Add fixits about missing
743 close braces to any richloc. Use the richloc for the
744 -Wmissing-braces warning.
745 (set_designator): Pass last_init_list_comma to pop_init_level.
746 (process_init_element): Likewise.
747
cbe34bb5
JJ
7482017-01-01 Jakub Jelinek <jakub@redhat.com>
749
750 Update copyright years.
751
d17680f3
JJ
7522016-12-21 Jakub Jelinek <jakub@redhat.com>
753
0dba7960
JJ
754 PR bootstrap/78817
755 * c-typeck.c (build_function_call_vec): If check_function_arguments
756 returns true, set TREE_NO_WARNING on CALL_EXPR.
757
d17680f3
JJ
758 PR c/77767
759 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
760 to *expr instead of overwriting it.
761
aa90531e
RB
7622016-12-20 Richard Biener <rguenther@suse.de>
763
764 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
765 error recovery.
766 (c_parser_gimple_statement): Only build assigns for non-error
767 stmts.
768 (c_parser_gimple_postfix_expression_after): Improve error recovery.
769
629b3d75
MJ
7702016-12-14 Martin Jambor <mjambor@suse.cz>
771
772 * c-parser.c: Include omp-general.h and omp-offload.h instead of
773 omp-low.h.
774 (c_finish_oacc_routine): Adjusted call to
775 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
776 to use their new names.
777 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
778 use its new name.
779 (c_parser_oacc_update): Likewise.
780 (c_parser_omp_simd): Likewise.
781 (c_parser_omp_target_update): Likewise.
782 * c-typeck.c: Include omp-general.h instead of omp-low.h.
783 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
784 name.
785 (c_finish_omp_cancellation_point): Likewise.
786 * gimple-parser.c: Do not include omp-low.h
787
c5af52eb
CP
7882016-12-02 Cesar Philippidis <cesar@codesourcery.com>
789 James Norris <jnorris@codesourcery.com>
790
791 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
792 EXIT_DATA,WAIT} are not used in compound statements.
793 (c_parser_oacc_enter_exit_data): Update diagnostics.
794
48330c93
BE
7952016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
796
797 PR c++/71973
798 * c-decl.c (diagnose_mismatched_decls): Use
799 OPT_Wbuiltin_declaration_mismatch here too.
800
899ca90e 8012016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
802 Alan Hayward <alan.hayward@arm.com>
803 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
804
805 * c-decl.c (merge_decls): Use SET_DECL_MODE.
806 (make_label, finish_struct): Likewise.
807
1ee62b92 8082016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 809 Richard Biener <rguenther@suse.de>
22b15758 810
8e745a17
JJ
811 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
812 * config-lang.in (gtfiles): Add c/c-parser.h.
813 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
814 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
815 * c-parser.c (enum c_id_kind, struct c_token,
816 c_parser_next_token_is, c_parser_next_token_is_not,
817 c_parser_next_token_is_keyword,
818 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
819 Split out to ...
820 * c-parser.h: ... new header.
821 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 822 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
823 c_token_starts_typename, c_parser_next_token_starts_declspecs,
824 c_parser_next_tokens_start_declaration, c_parser_consume_token,
825 c_parser_error, c_parser_require, c_parser_skip_until_found,
826 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
827 c_parser_type_name): Export.
828 (c_parser_tokens_buf): New function.
829 (c_parser_error): Likewise.
830 (c_parser_set_error): Likewise.
831 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
832 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
833 via c_parser_parse_gimple_body.
8e745a17
JJ
834 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
835 c_token_starts_typename, c_parser_next_token_starts_declspecs,
836 c_parser_next_tokens_start_declaration, c_parser_consume_token,
837 c_parser_error, c_parser_require, c_parser_skip_until_found,
838 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
839 c_parser_type_name): Declare.
1ee62b92
PG
840 (struct c_parser): Declare forward.
841 (c_parser_tokens_buf): Declare.
8e745a17
JJ
842 (c_parser_error): Likewise.
843 (c_parser_set_error): Likewise.
844 * gimple-parser.c: New file.
845 * gimple-parser.h: Likewise.
1ee62b92 846
22b15758
UB
8472016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
848
849 PR c/35503
850 * c-parser.c (c_parser_postfix_expression_after_primary): Call
851 warn_for_restrict.
852
84ff4775
LCW
8532016-09-11 Le-Chun Wu <lcwu@google.com>
854 Mark Wielaard <mjw@redhat.com>
855
856 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
857 to the given -Wshadow= variant.
858
4d0cdd0c
TP
8592016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
860
861 * c-typeck.c: Include memmodel.h.
862
1202f33e
JJ
8632016-10-13 Jakub Jelinek <jakub@redhat.com>
864
865 PR target/77957
866 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
867 instead of lhd_return_null_tree_v.
868
8a14afd0
BS
8692016-10-07 Bernd Schmidt <bschmidt@redhat.com>
870
871 PR c++/69733
872 * c-decl.c (smallest_type_quals_location): New static function.
873 (grokdeclarator): Try to find the correct location for an ignored
874 qualifier.
875
81fea426
MP
8762016-09-26 Marek Polacek <polacek@redhat.com>
877
878 PR c/7652
879 * c-decl.c (pop_scope): Add gcc_fallthrough.
880
8812016-09-26 Marek Polacek <polacek@redhat.com>
882
883 PR c/7652
884 * c-parser.c (struct c_token): Add flags field.
885 (c_lex_one_token): Pass it to c_lex_with_flags.
886 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
887 into IFN_FALLTHROUGH.
888 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
889 attribute fallthrough after a case label or default label.
890 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
891
9a2300e9
MP
8922016-09-24 Marek Polacek <polacek@redhat.com>
893
894 PR c/77490
895 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
896 have boolean value. Warn about ++/-- on booleans.
897
7de76362
JJ
8982016-09-23 Jakub Jelinek <jakub@redhat.com>
899
900 * c-parser.c (incomplete_record_decls): Remove unnecessary
901 = vNULL initialization of file scope vec.
902
5b73d2ab
MP
9032016-09-16 Marek Polacek <polacek@redhat.com>
904
905 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
906
e51fbec3
MP
9072016-09-14 Marek Polacek <polacek@redhat.com>
908
909 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
910 (fix_array_notation_expr): Likewise.
911 * c-decl.c (finish_decl): Likewise.
912 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
913 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
914 (function_to_pointer_conversion): Use false instead of 0.
915 (convert_lvalue_to_rvalue): Likewise.
916 (parser_build_unary_op): Likewise.
917 (build_atomic_assign): Likewise.
918 (build_unary_op): Change nonconvert parameter type to bool, use
919 true/false instead of 1/0.
920 (build_binary_op): Use true instead of 1.
921
254830ba
DM
9222016-09-13 David Malcolm <dmalcolm@redhat.com>
923
924 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
925 of add_fixit_insert to add_fixit_insert_before.
926
4c13ba17
MP
9272016-09-13 Marek Polacek <polacek@redhat.com>
928
929 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
930 it.
931
54dcdb88
BE
9322016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
933
934 PR c++/77496
935 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
936 COMPOUND_EXPR to warn_for_omitted_condop.
937
e5106e27
DM
9382016-09-07 David Malcolm <dmalcolm@redhat.com>
939
940 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
941 c_get_substring_location for this new langhook.
942
9dc5773f
JJ
9432016-09-02 Jakub Jelinek <jakub@redhat.com>
944
945 PR c/65467
946 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
947 flag_openmp.
948 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
949 instead of mark_exp_read on low_bound/length expression.
950 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
951 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
952 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
953 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
954 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
955 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
956 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
957 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
958 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
959 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
960 instead of mark_expr_read.
961 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
962 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
963 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
964 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
965 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
966 array section bases outside of depend clause, for depend clause
967 use convert_lvalue_to_rvalue on the base.
968 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
969 linear, aligned, map, to and from clauses.
970 (c_omp_clause_copy_ctor): New function.
971
295844f6
MP
9722016-09-01 Marek Polacek <polacek@redhat.com>
973
974 PR c/7652
975 * c-typeck.c (composite_type): Add FALLTHRU comment.
976
089af25c
DM
9772016-08-31 David Malcolm <dmalcolm@redhat.com>
978
979 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
980 to the insertion fixits for "struct", "union", and "enum".
981
f9087798
DM
9822016-08-30 David Malcolm <dmalcolm@redhat.com>
983
984 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
985 rather than add_fixit_misspelled_id.
986 (undeclared_variable): Likewise.
987 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
988 now-redundant "here" params from add_fixit_insert method calls.
989 (c_parser_parameter_declaration): Likewise.
990 * c-typeck.c (build_component_ref): Remove now-redundant range
991 param from add_fixit_replace method calls.
992
ebef225f
MP
9932016-08-25 Marek Polacek <polacek@redhat.com>
994
995 * c-typeck.c (parser_build_binary_op): Pass LHS to
996 warn_logical_not_parentheses.
997
fe377a48
MP
9982016-08-25 Marek Polacek <polacek@redhat.com>
999
1000 PR c/77323
1001 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1002 or _FloatN or _FloatNx is not supported.
1003 (finish_declspecs): Set type to integer_type_node when _FloatN or
1004 _FloatNx is not supported.
1005
c65699ef
JM
10062016-08-19 Joseph Myers <joseph@codesourcery.com>
1007
1008 PR c/32187
1009 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1010 (struct c_declspecs): Add field floatn_nx_idx.
1011 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1012 and _FloatNx type specifiers.
1013 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1014 (c_parser_declspecs, c_parser_attribute_any_word)
1015 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1016 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1017 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1018 narrower than double.
1019
2f1364c2
JJ
10202016-08-12 Jakub Jelinek <jakub@redhat.com>
1021 Martin Liska <mliska@suse.cz>
1022
1023 PR c/67410
1024 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1025 % to determine val element to change. Assert that
1026 wchar_bytes * charwidth fits into val array.
1027
191816a3
MP
10282016-08-12 Marek Polacek <polacek@redhat.com>
1029
1030 PR c/7652
1031 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1032 (c_parser_postfix_expression): Likewise.
1033 * c-typeck.c (build_unary_op): Adjust fall through comment.
1034 (c_mark_addressable): Likewise.
1035
b95a64bb
JJ
10362016-08-11 Jakub Jelinek <jakub@redhat.com>
1037
1038 PR c/72816
1039 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1040 array member through typedef, for orig_qual_indirect == 0 clear
1041 orig_qual_type.
1042
895aa8e1
DM
10432016-08-08 David Malcolm <dmalcolm@redhat.com>
1044
1045 PR c/64955
1046 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1047 this up to selftest::run_c_tests.
1048 (selftest::run_c_tests): New function.
1049
0b212d8c
TS
10502016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1051
ae9281fc
TS
1052 * c-parser.c (struct oacc_routine_data): Add error_seen and
1053 fndecl_seen members.
1054 (c_finish_oacc_routine): Use these.
1055 (c_parser_declaration_or_fndef): Adjust.
1056 (c_parser_oacc_routine): Likewise. Support more C language
1057 constructs, and improve diagnostics. Move pragma context
1058 checking...
1059 (c_parser_pragma): ... here.
1060
0b212d8c
TS
1061 * c-parser.c (struct oacc_routine_data): New.
1062 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1063 Simplify code.
1064 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1065 declare target" attribute.
1066
76e2c821
JB
10672016-08-01 Jan Beulich <jbeulich@suse.com>
1068
1069 * c-fold.c (c_fully_fold_internal): Also emit shift count
1070 warnings for vector types.
1071 * c-typeck.c (build_binary_op): Likewise.
1072
f618a472
MP
10732016-07-29 Marek Polacek <polacek@redhat.com>
1074
1075 PR c/71742
1076 * c-decl.c (finish_struct): Rephrase an error message.
1077
efd0786f
MP
1078 PR c/71853
1079 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1080 to error node for invalid code.
1081
e00dceaf
MP
1082 PR c/71573
1083 * c-decl.c (implicitly_declare): Return decl early not only for
1084 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1085
673a107a
JJ
10862016-07-29 Jakub Jelinek <jakub@redhat.com>
1087
1088 PR c/71969
1089 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1090 on GNU extern inline functions.
1091
a5b5c8b6
MP
10922016-07-29 Marek Polacek <polacek@redhat.com>
1093
1094 PR c/71583
1095 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1096 check expr.value.
1097
e3fe09c1
UB
10982016-07-22 Uros Bizjak <ubizjak@gmail.com>
1099
1100 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1101
7c8f7eaa
DM
11022016-07-20 David Malcolm <dmalcolm@redhat.com>
1103
1104 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1105 spellcheck-tree.h
1106 (best_macro_match): Likewise, converting from a typedef to a
1107 subclass.
1108 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1109 (lookup_name_fuzzy): Update for change of best_macro_match to a
1110 subclass with a ctor that calls cpp_forall_identifiers.
1111
de6a69ee
DM
11122016-07-20 David Malcolm <dmalcolm@redhat.com>
1113
1114 * c-decl.c (implicit_decl_warning): Update for conversion of
1115 return type of lookup_name_fuzzy to const char *.
1116 (undeclared_variable): Likewise.
1117 (lookup_name_fuzzy): Convert return type from tree to
1118 const char *.
1119 * c-parser.c (c_parser_declaration_or_fndef): Update for
1120 conversion of return type of lookup_name_fuzzy to const char *.
1121 (c_parser_parameter_declaration): Likewise.
1122
b1c9c068
CP
11232016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1124
1125 * c-parser.c (c_parser_oacc_declare): Don't scan for
1126 GOMP_MAP_POINTER.
1127 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1128 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1129 zero-length subarrays.
1130
ddbbcb19
JJ
11312016-07-15 Jakub Jelinek <jakub@redhat.com>
1132
1133 PR c/71858
1134 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1135 instead of FUZZY_LOOKUP_NAME.
1136 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1137 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1138
dd36b877
JJ
11392016-07-14 Jakub Jelinek <jakub@redhat.com>
1140
1141 PR c/71858
1142 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1143
8c681247
TS
11442016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1145
1146 * c-parser.c (c_parser_generic_selection): Make type of variable
1147 auto_vec.
1148 (c_parser_omp_declare_simd): Likewise.
1149
bf4fa671
TS
11502016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1151
1152 * c-decl.c (struct c_struct_parse_info): Change member types
1153 from vec to auto_vec.
1154 (start_struct): Adjust.
1155 (finish_struct): Likewise.
1156
557e8c49
JJ
11572016-07-02 Jakub Jelinek <jakub@redhat.com>
1158
1159 PR c/71719
1160 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1161
54d19c3b
TS
11622016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1163
1164 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1165 Move pragma context checking into...
1166 (c_parser_omp_cancellation_point): ... here, and improve
1167 diagnostic messages.
1168 * c-typeck.c (c_finish_omp_cancel)
1169 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1170
152ef731
JJ
11712016-06-29 Jakub Jelinek <jakub@redhat.com>
1172
1173 PR c/71685
1174 * c-typeck.c (c_build_qualified_type): Don't clear
1175 C_TYPE_INCOMPLETE_VARS for the main variant.
1176
11772016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1178
1179 PR c/71552
1180 * c-typeck.c (output_init_element): Diagnose incompatible types
1181 before non-constant initializers.
1182
e9ac1f86
JJ
11832016-06-28 Jakub Jelinek <jakub@redhat.com>
1184
1185 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1186
277d7ee0
AK
11872016-06-23 Andi Kleen <ak@linux.intel.com>
1188
1189 * Make-lang.in: Add support for autofdo.
1190
1a4f11c8
DM
11912016-06-22 David Malcolm <dmalcolm@redhat.com>
1192
1193 PR c/70339
1194 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1195 (implicit_decl_warning): When issuing warnings for implicit
1196 declarations, attempt to provide a suggestion via
1197 lookup_name_fuzzy.
1198 (undeclared_variable): Likewise when issuing errors.
1199 (lookup_name_in_scope): Likewise.
1200 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1201 (best_macro_match): New typedef.
1202 (find_closest_macro_cpp_cb): New function.
1203 (lookup_name_fuzzy): New function.
1204 * c-parser.c: Include gcc-rich-location.h.
1205 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1206 (c_keyword_starts_typename): ...this new function.
1207 (c_parser_declaration_or_fndef): When issuing errors about
1208 missing "struct" etc, add a fixit. For other kinds of errors,
1209 attempt to provide a suggestion via lookup_name_fuzzy.
1210 (c_parser_parms_declarator): When looking ahead to detect typos in
1211 type names, also reject CPP_KEYWORD.
1212 (c_parser_parameter_declaration): When issuing errors about
1213 unknown type names, attempt to provide a suggestion via
1214 lookup_name_fuzzy.
1215 * c-tree.h (c_keyword_starts_typename): New prototype.
1216
5a578671
JM
12172016-06-20 Joseph Myers <joseph@codesourcery.com>
1218
1219 PR c/71601
1220 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1221 c_common_type returns error_mark_node.
1222
3f8257db 12232016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1224
1225 PR c/69507
1226 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1227 __alignof__ (expression).
1228
6a3f203c
DM
12292016-06-14 David Malcolm <dmalcolm@redhat.com>
1230
1231 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1232
264757fb
DM
12332016-06-14 David Malcolm <dmalcolm@redhat.com>
1234
1235 * c-typeck.c (build_component_ref): Simplify fixit code by
1236 using gcc_rich_location::add_fixit_misspelled_id.
1237 (set_init_label): Likewise.
1238
f7e4f2e3
DM
12392016-06-13 David Malcolm <dmalcolm@redhat.com>
1240
1241 * c-parser.c (c_parser_initelt): Provide location of name for new
1242 location_t param of set_init_label.
1243 * c-tree.h (set_init_label): Add location_t param.
1244 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1245 param and use it when issuing error messages about unrecognized
1246 field names. Attempt to provide a fixit hint if appropriate,
1247 otherwise update the error message to provide the type name.
1248
4b1ffdb1
TS
12492016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1250
1251 PR c/71381
1252 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1253 Loosen checking.
1254
44a845ca
MS
12552016-06-08 Martin Sebor <msebor@redhat.com>
1256 Jakub Jelinek <jakub@redhat.com>
1257
1258 PR c++/70507
1259 PR c/68120
1260 * c-typeck.c (convert_arguments): Don't promote last argument
1261 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1262
92a5f2ba
MP
12632016-06-08 Marek Polacek <polacek@redhat.com>
1264
1265 PR c/71418
1266 * c-decl.c (grokdeclarator): Check TYPE_P.
1267
08203f73
MP
1268 PR c/71426
1269 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1270 code.
1271
6ffd47b7
DM
12722016-06-07 David Malcolm <dmalcolm@redhat.com>
1273
1274 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1275 and structure element reference, capture the location of the
1276 element name token and pass it to build_component_ref.
1277 (c_parser_postfix_expression_after_primary): Likewise for
1278 structure element dereference.
1279 (c_parser_omp_variable_list): Likewise for
1280 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1281 * c-tree.h (build_component_ref): Add location_t param.
1282 * c-typeck.c (build_component_ref): Add location_t param
1283 COMPONENT_LOC. Use it, if available, when issuing hints about
1284 mispelled member names to provide a fixit replacement hint.
1285
1f40cff3
MP
12862016-06-06 Marek Polacek <polacek@redhat.com>
1287
1288 PR c/71362
1289 * c-parser.c (c_parser_direct_declarator): Set location.
1290
5545a907
MP
12912016-06-06 Marek Polacek <polacek@redhat.com>
1292
1293 * c-typeck.c (comptypes_internal): Handle comparisons of
1294 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1295 TYPE_REF_CAN_ALIAS_ALL.
1296
b605f663
CLT
12972016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1298
1299 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1300 arguments as addressable when async clause exists.
1301
00631022
JJ
13022016-05-30 Jakub Jelinek <jakub@redhat.com>
1303
1304 PR c++/71349
1305 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1306 when combined with target construct.
1307
7211a097
JJ
13082016-05-26 Jakub Jelinek <jakub@redhat.com>
1309
1310 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1311 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1312
95efe6b6
MP
13132016-05-25 Marek Polacek <polacek@redhat.com>
1314
1315 PR c/71265
1316 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1317
a23faf7a
MP
1318 PR c/71266
1319 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1320
e46c7770
CP
13212016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1322
1323 * c-parser.c (c_parser_oacc_declare): Add support for
1324 GOMP_MAP_FIRSTPRIVATE_POINTER.
1325 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1326 argument with enum c_omp_region_type ort.
1327 (handle_omp_array_sections): Likewise. Update call to
1328 handle_omp_array_sections_1.
1329 (c_finish_omp_clauses): Add specific errors and warning messages for
1330 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1331 call to handle_omp_array_sections.
1332
a04e69c0
TS
13332016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1334
1335 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1336
f17a223d
RB
13372016-05-24 Richard Biener <rguenther@suse.de>
1338
1339 PR middle-end/70434
1340 PR c/69504
1341 * c-typeck.c (build_array_ref): Do not complain about indexing
1342 non-lvalue vectors. Adjust for function name change.
1343
79063edd
MS
13442016-05-20 Martin Sebor <msebor@redhat.com>
1345
1346 PR c/71115
1347 * c-typeck.c (error_init): Use
1348 expansion_point_location_if_in_system_header.
1349 (warning_init): Same.
1350
8a40fef3
DM
13512016-05-19 David Malcolm <dmalcolm@redhat.com>
1352
1353 PR c/71171
1354 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1355 in error-handling.
1356 (c_parser_postfix_expression): Likewise.
1357 * c-tree.h (c_expr::set_error): New method.
1358 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1359 that result's range is initialized.
1360
e9892350
JG
13612016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1362
1363 * c-typeck.c (parser_build_unary_op): Fix formatting.
1364
8fad45f5
MW
13652016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1366
1367 * c-decl.c (grokdeclarator): Remove errmsg and use of
1368 targetm.invalid_return_type.
1369 (grokparms): Remove errmsg and use of
1370 targetm.invalid_parameter_type.
1371
aa4b467b
JM
13722016-05-13 Joseph Myers <joseph@codesourcery.com>
1373
1374 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1375 function return type.
1376
4f2e1536
MP
13772016-05-12 Marek Polacek <polacek@redhat.com>
1378
1379 PR c/70756
1380 * c-decl.c (build_compound_literal): Pass LOC down to
1381 c_incomplete_type_error.
1382 * c-tree.h (require_complete_type): Adjust declaration.
1383 (c_incomplete_type_error): Likewise.
1384 * c-typeck.c (require_complete_type): Add location parameter, pass it
1385 down to c_incomplete_type_error.
1386 (c_incomplete_type_error): Add location parameter, pass it down to
1387 error_at.
1388 (build_component_ref): Pass location down to c_incomplete_type_error.
1389 (default_conversion): Pass location down to require_complete_type.
1390 (build_array_ref): Likewise.
1391 (build_function_call_vec): Likewise.
1392 (convert_arguments): Likewise.
1393 (build_unary_op): Likewise.
1394 (build_c_cast): Likewise.
1395 (build_modify_expr): Likewise.
1396 (convert_for_assignment): Likewise.
1397 (c_finish_omp_clauses): Likewise.
1398
d6e83a8d
MM
13992016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1400
1401 PR c/43651
1402 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1403 is enabled.
1404 * c-errors.c (pedwarn_c90): Return true if warned.
1405 * c-tree.h (pedwarn_c90): Change return type to bool.
1406 (enum c_declspec_word): Add new enumerator cdw_atomic.
1407
5c3a10fb
MP
14082016-05-11 Marek Polacek <polacek@redhat.com>
1409
1410 PR c++/71024
1411 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1412 diagnose_mismatched_attributes and call it.
1413
cf68d92c
MP
14142016-05-10 Marek Polacek <polacek@redhat.com>
1415
1416 PR c/70255
1417 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1418 on a declaration following the definition.
1419
351f85c5
JJ
14202016-05-05 Jakub Jelinek <jakub@redhat.com>
1421
1422 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1423 parse it through to c_parser_c99_block_statement.
1424 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1425 caller.
1426
deef7113
MP
14272016-05-04 Marek Polacek <polacek@redhat.com>
1428
1429 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1430 OPT_Wdangling_else.
1431
de55efd5
MP
14322016-05-04 Marek Polacek <polacek@redhat.com>
1433
1434 PR c/48778
1435 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1436 for macro expansions.
1437
79ce98bc
MP
14382016-05-03 Marek Polacek <polacek@redhat.com>
1439
1440 PR c/70859
1441 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1442 check_builtin_function_arguments.
1443
fb2647aa
RB
14442016-05-03 Richard Biener <rguenther@suse.de>
1445
1446 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1447 the checksum from the previous stage.
1448
77886428
CP
14492016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1450
1451 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1452 c_finish_omp_clauses.
1453 (c_parser_omp_all_clauses): Likewise.
1454 (c_parser_oacc_cache): Likewise.
1455 (c_parser_oacc_loop): Likewise.
1456 (omp_split_clauses): Likewise.
1457 (c_parser_omp_declare_target): Likewise.
1458 (c_parser_cilk_all_clauses): Likewise.
1459 (c_parser_cilk_for): Likewise.
1460 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1461 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1462
7176a4a0
MP
14632016-05-02 Marek Polacek <polacek@redhat.com>
1464
1465 PR c/70851
1466 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1467 incomplete type.
1468
e7ff0319
CP
14692016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1470
1471 PR middle-end/70626
1472 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1473 OACC_LOOP_CLAUSE_MASK.
1474 (c_parser_oacc_kernels_parallel): Update call to
1475 c_oacc_split_loop_clauses.
1476
9f405ce1
AM
14772016-04-28 Andrew MacLeod <amacleod@redhat.com>
1478
1479 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1480 argument to build_modify_expr in two cases.
1481
c1e1f433
BS
14822016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1483
1484 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1485 warn_for_memset instead of warning directly here.
1486
2448a956
MP
14872016-04-26 Marek Polacek <polacek@redhat.com>
1488
1489 PR c/67784
1490 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1491 out of ...
1492 (c_parser_for_statement): ... here.
1493 (c_parser_if_statement): Use it.
1494 (c_parser_switch_statement): Use it.
1495 (c_parser_while_statement): Use it.
1496
b02a5e26
MP
1497 PR c/70791
1498 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1499
477d4906
IV
15002016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1501
1502 PR c++/69363
1503 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1504 instead of c_finish_cilk_clauses.
1505 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1506 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1507 floating-point variables in the linear clause for Cilk Plus.
1508
fe37c7af
MM
15092016-04-18 Michael Matz <matz@suse.de>
1510
1511 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1512 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1513
949505a9
MP
15142016-04-15 Marek Polacek <polacek@redhat.com>
1515
1516 PR c/70671
1517 * c-typeck.c (build_unary_op): Pass location down to error and
1518 warning call.
1519
dda1bf61
JJ
15202016-04-15 Jakub Jelinek <jakub@redhat.com>
1521
1522 PR c/70436
1523 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1524 where needed.
1525 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1526 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1527 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1528 Adjust c_parser_pragma callers.
1529 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1530 caller.
1531 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1532 c_parser_statement.
1533 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1534 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1535 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1536 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1537 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1538 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1539 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1540 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1541 down where needed.
1542 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1543 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1544 calls.
1545
99cd9857
MP
15462016-04-13 Marek Polacek <polacek@redhat.com>
1547
1548 PR c/70436
1549 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1550 adjust callers.
1551 (c_parser_statement): Likewise.
1552 (c_parser_c99_block_statement): Likewise.
1553 (c_parser_while_statement): Likewise.
1554 (c_parser_for_statement): Likewise.
1555 (c_parser_if_body): Don't set IF_P here.
1556 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1557 about dangling else here.
1558 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1559 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1560 warn about dangling else here.
1561
f13355da
MP
15622016-04-04 Marek Polacek <polacek@redhat.com>
1563
1564 PR c/70307
1565 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1566
5fde6a45
MP
15672016-03-31 Marek Polacek <polacek@redhat.com>
1568
1569 PR c/70297
1570 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1571
4bbf545b
DM
15722016-03-18 David Malcolm <dmalcolm@redhat.com>
1573
1574 PR c/70281
1575 * c-parser.c (c_parser_postfix_expression): Set the source range
1576 for uses of "__builtin_types_compatible_p".
1577
fcc2b74f
JJ
15782016-03-17 Jakub Jelinek <jakub@redhat.com>
1579
1580 PR c/70280
1581 * c-typeck.c (composite_type): Don't count void_list_node
1582 into len, if the list is terminated by void_list_node, start
1583 with void_list_node instead of NULL for newargs. Stop
1584 at void_list_node.
1585
ab4c578f
MP
15862016-03-16 Marek Polacek <polacek@redhat.com>
1587
1588 PR c/70093
1589 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1590 nested functions returning VM types.
1591
96b3c82d
CP
15922016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1593
1594 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1595 when calling c_finish_omp_clauses.
1596
29b9828f
BS
15972016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1598
1599 PR c/69824
1600 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1601 for later.
1602
7ff6ca38
MP
16032016-03-04 Marek Polacek <polacek@redhat.com>
1604
1605 PR c/69798
1606 * c-parser.c (c_parser_postfix_expression): Call
1607 c_parser_cast_expression rather than c_parser_postfix_expression.
1608
686e2237
JJ
16092016-03-01 Jakub Jelinek <jakub@redhat.com>
1610
1611 PR c/69796
1612 PR c/69974
1613 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1614 of incomplete decls to error_mark_node.
1615
0b05329b
MP
16162016-02-24 Marek Polacek <polacek@redhat.com>
1617
1618 PR c/69819
1619 * c-decl.c (finish_decl): Don't update the copy of the type of a
1620 different decl type.
1621
067fbd8b
JJ
16222016-02-23 Jakub Jelinek <jakub@redhat.com>
1623
1624 PR objc/69844
1625 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1626 in id_kind reclassification.
1627
bf14eba2
JJ
16282016-02-16 Jakub Jelinek <jakub@redhat.com>
1629
1630 PR c/69835
1631 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1632
ba539195
JN
16332016-02-16 James Norris <jnorris@codesourcery.com>
1634
1635 PR c/64748
1636 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1637
16595a1f
BS
16382016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1639
f48dfe98
BS
1640 * c-decl.c (build_null_declspecs): Zero the entire struct.
1641
16595a1f
BS
1642 PR c/69522
1643 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1644 callers changed. If nested_p is true, use it to call
1645 finish_implicit_inits.
1646 * c-tree.h (finish_implicit_inits): Declare.
1647 * c-typeck.c (finish_implicit_inits): New function. Move code
1648 from ...
1649 (push_init_level): ... here.
1650 (set_designator, process_init_element): Call finish_implicit_inits.
1651
66756373
JJ
16522016-02-11 Jakub Jelinek <jakub@redhat.com>
1653
1654 PR c/69768
1655 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1656 arguments for -Waddress warning.
1657
1066e9b5
JJ
16582016-02-04 Jakub Jelinek <jakub@redhat.com>
1659
1660 PR c/69669
1661 * c-decl.c (finish_enum): When honoring mode attribute,
1662 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1663
3a5d2ba4
JJ
16642016-01-29 Jakub Jelinek <jakub@redhat.com>
1665
1666 PR debug/69518
1667 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1668 all type variants, not just TYPE_MAIN_VARIANT.
1669
cbdd8ae0
JJ
16702016-01-27 Jakub Jelinek <jakub@redhat.com>
1671
1672 PR debug/66869
1673 * c-decl.c (c_write_global_declarations_1): Warn with
1674 warn_unused_function if static prototype without definition
1675 is not C_DECL_USED.
1676
fa74a4bc
MP
16772016-01-27 Marek Polacek <polacek@redhat.com>
1678
1679 PR c/68062
1680 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1681 to unsigned, if needed. Add -Wsign-compare warning.
1682
13f92e8d
JJ
16832016-01-26 Jakub Jelinek <jakub@redhat.com>
1684
1685 PR tree-optimization/69483
1686 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1687
cd8e73dc 16882016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1689
1690 PR c/24293
1691 * c-tree.h (incomplete_record_decls): Declare.
1692 * c-parser.c (incomplete_record_decls): Define.
1693 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1694 report error if any decl has zero size.
1695 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1696 or enum type to incomplete_record_decls.
1697
e6d6ec9e
TV
16982016-01-14 Tom de Vries <tom@codesourcery.com>
1699
1700 PR tree-optimization/68773
1701 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1702 set force_output.
1703
00083992
MP
17042016-01-14 Marek Polacek <polacek@redhat.com>
1705
1706 PR c/69262
1707 * c-decl.c (grokdeclarator): Provide more information for invalid
1708 array declarations.
1709
7443cf13
DM
17102016-01-06 David Malcolm <dmalcolm@redhat.com>
1711
1712 * c-parser.c (c_parser_unary_expression): For dereferences, build
1713 a combined location before calling build_indirect_ref, so that
1714 error reports cover the full range, manually updating the c_expr
1715 src_range.
1716
6b131d5b
MP
17172016-01-06 Marek Polacek <polacek@redhat.com>
1718
1719 PR sanitizer/69099
1720 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1721 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1722 NULL.
1723
818ab71a
JJ
17242016-01-04 Jakub Jelinek <jakub@redhat.com>
1725
1726 Update copyright years.
1727
2fe0a208
MP
17282016-01-04 Marek Polacek <polacek@redhat.com>
1729
1730 PR c/68908
1731 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1732 optimization to use __atomic_fetch_* built-in if possible.
1733
c7b48c8a
TS
17342015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1735
1736 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1737 into...
1738 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1739 all users.
1740
fda5652f
MP
17412015-12-22 Marek Polacek <polacek@redhat.com>
1742
1743 PR c/69002
1744 * c-typeck.c (build_component_ref): Warn when acessing elements of
1745 atomic structures or unions.
1746
745e411d
DM
17472015-12-21 David Malcolm <dmalcolm@redhat.com>
1748
1749 * c-typeck.c: Include "gcc-rich-location.h".
1750 (build_binary_op): In the two places that call binary_op_error,
1751 create a gcc_rich_location and populate it with the location of
1752 the binary op and its two operands.
1753
94c40e19
DM
17542015-12-16 David Malcolm <dmalcolm@redhat.com>
1755
1756 * c-parser.c (c_parser_statement_after_labels): When calling
1757 c_finish_return, Use the return expression's location if it has
1758 one, falling back to the location of the first token within it.
1759 * c-typeck.c (c_finish_return): When issuing warnings about
1760 the incorrect presence/absence of a return value, issue a note
1761 showing the declaration of the function.
1762
de67c4c3
DM
17632015-12-16 David Malcolm <dmalcolm@redhat.com>
1764
1765 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1766 to 4.
1767 (c_parser_peek_nth_token): New function.
1768 (c_parser_peek_conflict_marker): New function.
1769 (c_parser_error): Detect conflict markers and report them as such.
1770
a10704e1
DM
17712015-12-16 David Malcolm <dmalcolm@redhat.com>
1772
1773 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1774 to preserve range information for the primary expression
1775 in the call to c_parser_postfix_expression_after_primary.
1776
8062bca6
DM
17772015-12-16 David Malcolm <dmalcolm@redhat.com>
1778
1779 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1780 expression location, falling back on the first token location,
1781 rather than always using the latter.
1782
d06f8b75
MP
17832015-12-16 Marek Polacek <polacek@redhat.com>
1784
1785 PR c/64637
1786 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1787 available.
1788
2994fb91
MP
17892015-12-15 Marek Polacek <polacek@redhat.com>
1790
1791 PR c/68907
1792 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1793 artificial decl.
1794
a1b93f8d
DM
17952015-12-08 David Malcolm <dmalcolm@redhat.com>
1796
1797 * c-parser.c (c_parser_alignof_expression): Capture location of
1798 closing parenthesis (if any), or of end of unary expression, and
1799 use it to build a src_range for the expression.
1800
46c6e1e2
DM
18012015-12-08 David Malcolm <dmalcolm@redhat.com>
1802
1803 PR c/68757
1804 * c-parser.c (c_parser_get_builtin_args): Add
1805 "out_close_paren_loc" param, and write back to it.
1806 (c_parser_postfix_expression): Capture the closing
1807 parenthesis location for RID_CHOOSE_EXPR,
1808 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1809 RID_BUILTIN_SHUFFLE and use it to set the source range
1810 for such expressions; within RID_BUILTIN_COMPLEX set
1811 the underlying location.
1812
66189108
MP
18132015-12-07 Marek Polacek <polacek@redhat.com>
1814
1815 PR c/68668
1816 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1817 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1818
f187980b
EB
18192015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1820
1821 * c-tree.h (c_build_va_arg): Adjust prototype.
1822 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1823 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1824 parameter, adjust throughout and issue an error if EXPR is a component
1825 with reverse storage order.
1826
4250754e
JM
18272015-12-02 Jason Merrill <jason@redhat.com>
1828
1829 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1830 (c_fully_fold_internal, decl_constant_value_for_optimization):
1831 Move from c-common.c.
1832 * c-tree.h: Declare decl_constant_value_for_optimization.
1833 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1834
e9e32ee6
JM
18352015-12-02 Joseph Myers <joseph@codesourcery.com>
1836
1837 PR c/68162
1838 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1839 following link from declarator to next declarator. Track original
1840 qualified type and pass it to c_build_qualified_type.
1841 * c-typeck.c (c_build_qualified_type): Add arguments
1842 orig_qual_type and orig_qual_indirect.
1843
ff7a55bf
TS
18442015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1845
1846 * c-parser.c (c_parser_omp_clause_name)
1847 (c_parser_oacc_all_clauses): Alphabetical sorting.
1848
657e4e47
JJ
18492015-12-02 Jakub Jelinek <jakub@redhat.com>
1850
1851 PR c/68533
1852 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1853 for diagnostics.
1854
37d5ad46
JB
18552015-12-01 Julian Brown <julian@codesourcery.com>
1856 Cesar Philippidis <cesar@codesourcery.com>
1857 James Norris <James_Norris@mentor.com>
1858
1859 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1860 (c_parser_oacc_clause_use_device): New function.
1861 (c_parser_oacc_all_clauses): Add use_device support.
1862 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1863 (c_parser_oacc_host_data): New function.
1864 (c_parser_omp_construct): Add host_data support.
1865 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1866 * c-typeck.c (c_finish_oacc_host_data): New function.
1867 (c_finish_omp_clauses): Add use_device support.
1868
a4850ce9
JH
18692015-11-29 Jan Hubicka <hubicka@ucw.cz>
1870
1871 PR c/67106
1872 * c-decl.c: Set TYPE_PACKED in variants.
1873
b58d3df2
ML
18742015-11-27 Martin Liska <mliska@suse.cz>
1875
1876 PR c++/68312
1877 * c-array-notation.c (fix_builtin_array_notation_fn):
1878 Use release_vec_vec instead of vec::release.
1879 (build_array_notation_expr): Likewise.
1880 (fix_conditional_array_notations_1): Likewise.
1881 (fix_array_notation_expr): Likewise.
1882 (fix_array_notation_call_expr): Likewise.
1883
aec17bfe
JJ
18842015-11-27 Jakub Jelinek <jakub@redhat.com>
1885
1886 PR c/63326
1887 * c-parser.c (c_parser_compound_statement_nostart): If
1888 last_label is true, use pragma_stmt instead of pragma_compound
1889 as second c_parser_pragma argument.
1890 (c_parser_omp_ordered, c_parser_omp_target_update,
1891 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1892 false as second argument to c_parser_skip_to_pragma_eol after
1893 diagnosing standalone directives used in pragma_stmt context.
1894
688c4de0
IV
18952015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1896
1897 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1898 with "if (ENABLE_OFFLOADING)".
1899
cbd03aee
DM
19002015-11-23 David Malcolm <dmalcolm@redhat.com>
1901
1902 PR objc/68438
1903 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1904 for various Objective-C constructs: Class.name syntax,
1905 @selector(), @protocol(), @encode(), and [] message syntax.
1906
a87a86e1
DM
19072015-11-20 David Malcolm <dmalcolm@redhat.com>
1908
1909 PR 62314
1910 * c-typeck.c (should_suggest_deref_p): New function.
1911 (build_component_ref): Special-case POINTER_TYPE when
1912 generating a "not a structure of union" error message, and
1913 suggest a "->" rather than a ".", providing a fix-it hint.
1914
8ece8dfb
DM
19152015-11-19 David Malcolm <dmalcolm@redhat.com>
1916
1917 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1918 candidate into a new function, find_closest_identifier.
1919
433068cc
MP
19202015-11-19 Marek Polacek <polacek@redhat.com>
1921
1922 PR c/68412
1923 * c-typeck.c (parser_build_binary_op): Properly handle
1924 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1925
bef08b71
DM
19262015-11-17 David Malcolm <dmalcolm@redhat.com>
1927
1928 * c-parser.c (set_c_expr_source_range): Bulletproof both
1929 overloaded implementations against NULL expr->value.
1930 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1931 values.
1932 (c_parser_unary_expression): Likewise when handling addresses of
1933 labels.
1934 (c_parser_postfix_expression): Likewise for statement expressions,
1935 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1936 __builtin_va_arg, and for __builtin_offset_of.
1937 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1938 src_range using the range of the braced initializer.
1939 (c_parser_transaction_expression): Set src_range for "ret" to a
1940 sane pair of values.
1941
fff77217
KY
19422015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1943
1944 * c-parser.c (c_finish_omp_declare_simd): Look for
1945 "simd" attribute as well. Update error message.
1946
1d899da2
TS
19472015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1948
1949 * c-parser.c (c_parser_omp_declare_target): Adjust.
1950
e4606348
JJ
19512015-11-14 Jakub Jelinek <jakub@redhat.com>
1952
1953 * c-typeck.c (c_finish_omp_clauses): Don't mark
1954 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1955
3e636daf
MP
19562015-11-14 Marek Polacek <polacek@redhat.com>
1957
1958 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1959 * c-typeck.c: Likewise.
1960
ebedc9a3
DM
19612015-11-13 David Malcolm <dmalcolm@redhat.com>
1962
1963 * c-decl.c (warn_defaults_to): Pass line_table to
1964 rich_location ctor.
1965 * c-errors.c (pedwarn_c99): Likewise.
1966 (pedwarn_c90): Likewise.
1967 * c-parser.c (set_c_expr_source_range): New functions.
1968 (c_token::get_range): New method.
1969 (c_token::get_finish): New method.
1970 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1971 based on the range from the start of the LHS to the end of the
1972 RHS.
1973 (c_parser_conditional_expression): Likewise, based on the range
1974 from the start of the cond.value to the end of exp2.value.
1975 (c_parser_binary_expression): Call set_c_expr_source_range on
1976 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1977 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1978 based on the cast_loc through to the end of the expr.
1979 (c_parser_unary_expression): Likewise, based on the
1980 op_loc through to the end of op.
1981 (c_parser_sizeof_expression) Likewise, based on the start of the
1982 sizeof token through to either the closing paren or the end of
1983 expr.
1984 (c_parser_postfix_expression): Likewise, using the token range,
1985 or from the open paren through to the close paren for
1986 parenthesized expressions.
1987 (c_parser_postfix_expression_after_primary): Likewise, for
1988 various kinds of expression.
1989 * c-tree.h (struct c_expr): Add field "src_range".
1990 (c_expr::get_start): New method.
1991 (c_expr::get_finish): New method.
1992 (set_c_expr_source_range): New decls.
1993 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1994 on ret for prefix unary ops.
1995 (parser_build_binary_op): Likewise, running from the start of
1996 arg1.value through to the end of arg2.value.
1997
ec8b536f
MP
19982015-11-13 Marek Polacek <polacek@redhat.com>
1999
2000 PR c/68320
2001 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2002
277fe616
DM
20032015-11-13 David Malcolm <dmalcolm@redhat.com>
2004
2005 * c-typeck.c: Include spellcheck.h.
2006 (lookup_field_fuzzy_find_candidates): New function.
2007 (lookup_field_fuzzy): New function.
2008 (build_component_ref): If the field was not found, try using
2009 lookup_field_fuzzy and potentially offer a suggestion.
2010
6e232ba4
JN
20112015-11-12 James Norris <jnorris@codesourcery.com>
2012 Joseph Myers <joseph@codesourcery.com>
2013
2014 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2015 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2016 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2017 and PRAGMA_OMP_CLAUSE_LINK.
2018 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2019 and PRAGMA_OACC_CLAUSE_LINK.
2020 (OACC_DECLARE_CLAUSE_MASK): New definition.
2021 (c_parser_oacc_declare): New function.
2022
9be4f715
MP
20232015-11-12 Marek Polacek <polacek@redhat.com>
2024
2025 PR c/67784
2026 * c-parser.c (c_parser_for_statement): Reclassify the token in
2027 a correct scope.
2028
e78bede6
MP
20292015-11-11 Marek Polacek <polacek@redhat.com>
2030
2031 PR c/68107
2032 PR c++/68266
2033 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2034 checking the size of an array.
2035
69f293c9
AM
20362015-11-11 Andrew MacLeod <amacleod@redhat.com>
2037
2038 * c-array-notation.c: Remove unused header files.
2039 * c-aux-info.c: Likewise.
2040 * c-convert.c: Likewise.
2041 * c-decl.c: Likewise.
2042 * c-errors.c: Likewise.
2043 * c-lang.c: Likewise.
2044 * c-objc-common.c: Likewise.
2045 * c-parser.c: Likewise.
2046 * c-typeck.c: Likewise.
2047 * gccspec.c: Likewise.
2048
3a40d81d
NS
20492015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2050 Cesar Philippidis <cesar@codesourcery.com>
2051 James Norris <jnorris@codesourcery.com>
2052 Julian Brown <julian@codesourcery.com>
2053 Nathan Sidwell <nathan@codesourcery.com>
2054
2055 c/
2056 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2057 routine arg.
2058 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2059 (c_parser_pragma): Parse 'acc routine'.
2060 (OACC_ROUTINE_CLAUSE_MARK): Define.
2061 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2062
fc402eec
AA
20632015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2064
2065 PR debug/67192
2066 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2067 location of the backward-goto to the start of the loop body.
2068
f6b0b3db
AA
20692015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2070
2071 PR debug/67192
2072 * c-parser.c (c_parser_while_statement): Finish the loop before
2073 parsing ahead for misleading indentation.
2074 (c_parser_for_statement): Likewise.
2075
ee45a32d
EB
20762015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2077
2078 * c-decl.c (finish_struct): If the structure has reverse storage
2079 order, rewrite the type of array fields with scalar component. Call
2080 maybe_apply_pragma_scalar_storage_order on entry.
2081 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2082 errors on bit-fields and reverse SSO here and not...
2083 (c_mark_addressable): ...here.
2084 (output_init_element): Adjust call to initializer_constant_valid_p.
2085 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2086
8a645150
DM
20872015-11-06 David Malcolm <dmalcolm@redhat.com>
2088
2089 * c-decl.c (warn_defaults_to): Update for change in signature
2090 of diagnostic_set_info.
2091 * c-errors.c (pedwarn_c99): Likewise.
2092 (pedwarn_c90): Likewise.
2093 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2094 for textinfo::set_location.
2095
7a5e4956
CP
20962015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2097 Thomas Schwinge <thomas@codesourcery.com>
2098 James Norris <jnorris@codesourcery.com>
2099
2100 * c-parser.c (c_parser_omp_clause_name): Add support for
2101 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2102 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2103 default(none) in OpenACC.
2104 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2105 arguments.
2106 (c_parser_oacc_clause_tile): New function.
2107 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2108 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2109 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2110 TILE}.
2111 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2112 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2113 FIRSTPRIVATE}.
2114 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2115 (c_parser_oacc_update): Update the error message for missing clauses.
2116 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2117 and OMP_CLAUSE_INDEPENDENT.
2118
bfcfbfa0
MP
21192015-11-05 Marek Polacek <polacek@redhat.com>
2120
2121 PR c/68090
2122 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2123 deal with pre-evaluation on invalid types.
2124
e01d41e5
JJ
21252015-11-05 Jakub Jelinek <jakub@redhat.com>
2126 Ilya Verbin <ilya.verbin@intel.com>
2127
2128 * c-parser.c: Include context.h and gimple-expr.h.
2129 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2130 monotonic together with nonmonotonic.
2131 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2132 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2133 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2134 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2135 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2136 expressions on combined target teams before the target.
2137 (c_parser_omp_declare_target): If decl has "omp declare target" or
2138 "omp declare target link" attribute, and cgraph or varpool node already
2139 exists, then set corresponding flags. Call c_finish_omp_clauses
2140 in the parenthesized extended-list syntax case.
2141 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2142 declare target.
2143 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2144 on OMP_CLAUSE_REDUCTION array sections.
2145 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2146 into the constant offset, or for variable low-bound using
2147 POINTER_PLUS_EXPR. For structure element based array sections use
2148 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2149 (c_finish_omp_clauses): Drop generic_field_head, structure
2150 elements are now always mapped even as array section bases,
2151 diagnose same var in data sharing and mapping clauses. Diagnose if
2152 linear step on declare simd is neither a constant nor a uniform
2153 parameter. Look through POINTER_PLUS_EXPR for array section
2154 reductions. Diagnose the same var or function appearing multiple
2155 times on the same directive. Fix up wording for the to clause if t
2156 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2157 modifier on kinds other than dynamic or guided or nonmonotonic
2158 modifier together with ordered clause.
2159
4bf9e5a8
TS
21602015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2161 Chung-Lin Tang <cltang@codesourcery.com>
2162
2163 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2164
2adfab87
AM
21652015-10-29 Andrew MacLeod <amacleod@redhat.com>
2166
2167 * c-array-notation.c: Reorder #include's and remove duplicates.
2168 * c-aux-info.c: Likewise.
2169 * c-convert.c: Likewise.
2170 * c-decl.c: Likewise.
2171 * c-errors.c: Likewise.
2172 * c-lang.c: Likewise.
2173 * c-objc-common.c: Likewise.
2174 * c-parser.c: Likewise.
2175 * c-typeck.c: Likewise.
2176
e922069e
JW
21772015-10-26 Jim Wilson <jim.wilson@linaro.org>
2178
2179 PR debug/66068
2180 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2181 after calling build_qualified_type.
2182
765dd391
CP
21832015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2184 Thomas Schwinge <thomas@codesourcery.com>
2185 James Norris <jnorris@codesourcery.com>
2186 Joseph Myers <joseph@codesourcery.com>
2187 Julian Brown <julian@codesourcery.com>
2188 Bernd Schmidt <bschmidt@redhat.com>
2189
2190 * c-parser.c (c_parser_oacc_shape_clause): New.
2191 (c_parser_oacc_simple_clause): New.
2192 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2193 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2194
88bae6f4
TS
21952015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2196 James Norris <jnorris@codesourcery.com>
2197 Cesar Philippidis <cesar@codesourcery.com>
2198
2199 PR c/64765
2200 PR c/64880
2201 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2202 parameters, and handle these. Adjust all users.
2203 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2204 into...
2205 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2206 all users.
2207 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2208 declare functions.
2209 (c_finish_omp_construct): Declare function.
2210 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2211 Merge functions into...
2212 (c_finish_omp_construct): ... this new function.
2213
a8fc2579
RB
22142015-10-22 Richard Biener <rguenther@suse.de>
2215
2216 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2217 before folding a MINUS_EXPR.
2218
e9122ef6
MP
22192015-10-21 Marek Polacek <polacek@redhat.com>
2220
2221 PR c/68024
2222 * c-decl.c (start_function): Warn about vararg functions without
2223 a prototype.
2224
9f47c7e5
IE
22252015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2226
2227 * c-typeck.c (build_conditional_expr): Use boolean vector
2228 type for vector comparison.
2229 (build_vec_cmp): New.
2230 (build_binary_op): Use build_vec_cmp for comparison.
2231
fa60eeb9
MP
22322015-10-20 Marek Polacek <polacek@redhat.com>
2233
2234 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2235
2c7020eb
MP
22362015-10-20 Marek Polacek <polacek@redhat.com>
2237
2238 PR c/67964
2239 * c-parser.c (c_parser_attributes): Break out of the loop if the
2240 token after an attribute isn't a comma.
2241
d9a6bd32
JJ
22422015-10-13 Jakub Jelinek <jakub@redhat.com>
2243 Aldy Hernandez <aldyh@redhat.com>
2244
2245 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2246 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2247 (c_parser_omp_variable_list): Handle structure elements for
2248 map, to and from clauses. Handle array sections in reduction
2249 clause. Formatting fixes.
2250 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2251 if clause modifiers.
2252 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2253 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2254 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2255 c_parser_omp_clause_is_device_ptr): New functions.
2256 (c_parser_omp_clause_ordered): Parse optional parameter.
2257 (c_parser_omp_clause_reduction): Handle array reductions.
2258 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2259 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2260 functions.
2261 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2262 (c_parser_omp_clause_depend_sink): New function.
2263 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2264 (c_parser_omp_clause_map): Parse release/delete map kinds and
2265 optional always modifier.
2266 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2267 and c_finish_omp_clauses callers.
2268 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2269 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2270 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2271 (OMP_CRITICAL_CLAUSE_MASK): Define.
2272 (c_parser_omp_critical): Parse critical clauses.
2273 (c_parser_omp_for_loop): Handle doacross loops, adjust
2274 c_finish_omp_for and c_finish_omp_clauses callers.
2275 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2276 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2277 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2278 (c_parser_omp_for): Disallow ordered clause when combined with
2279 distribute. Disallow linear clause when combined with distribute
2280 and not combined with simd.
2281 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2282 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2283 parse clauses and if depend clause is found, don't parse a body.
2284 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2285 Allow target parallel without for after it.
2286 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2287 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2288 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2289 invalid kinds.
2290 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2291 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2292 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2293 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2294 functions.
2295 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2296 defaultmap and is_device_ptr clauses.
2297 (c_parser_omp_target): Parse target parallel and target simd. Set
2298 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2299 and target exit data. Diagnose invalid map kinds.
2300 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2301 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2302 construct.
2303 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2304 &omp_priv.
2305 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2306 (c_parser_omp_taskloop): New function.
2307 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2308 handle PRAGMA_OMP_TASKLOOP.
2309 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2310 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2311 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2312 Add IS_OMP argument, handle structure element bases, diagnose
2313 bitfields, pass IS_OMP recursively, diagnose known zero length
2314 array sections in depend clauses, handle array sections in reduction
2315 clause, diagnose negative length even for pointers.
2316 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2317 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2318 array sections in reduction clause, set
2319 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2320 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2321 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2322 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2323
21ba0cea
MP
23242015-10-06 Marek Polacek <polacek@redhat.com>
2325
2326 * c-parser.c (c_parser_statement_after_labels): Use
2327 protected_set_expr_location.
2328 (c_parser_omp_clause_num_gangs): Likewise.
2329 (c_parser_omp_clause_num_threads): Likewise.
2330 (c_parser_omp_clause_num_workers): Likewise.
2331 (c_parser_omp_clause_vector_length): Likewise.
2332 (c_parser_omp_clause_num_teams): Likewise.
2333 (c_parser_omp_clause_thread_limit): Likewise.
2334 * c-typeck.c (build_c_cast): Likewise.
2335 (c_cast_expr): Likewise.
2336
624d31fe
RS
23372015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2338
2339 * c-typeck.c (c_tree_equal): Use real_equal instead of
2340 REAL_VALUES_EQUAL.
2341
b8fd7909
JM
23422015-10-04 Jason Merrill <jason@redhat.com>
2343
2344 * c-parser.c (c_lex_one_token): Handle @synchronized.
2345 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2346 can change whether the function is transaction_safe.
2347
1c7485af
MP
23482015-10-02 Marek Polacek <polacek@redhat.com>
2349
2350 PR c/67730
2351 * c-typeck.c (convert_for_assignment): Use the expansion point
2352 location throughout.
2353
3e3b8d63
MP
23542015-10-02 Marek Polacek <polacek@redhat.com>
2355
2356 PR c/64249
2357 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2358 and pass it down to c_parser_if_statement.
2359 (c_parser_else_body): Add CHAIN parameter and pass it down to
2360 c_parser_statement_after_labels.
2361 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2362 duplicated if-else-if conditions.
2363
aabef2de
MP
23642015-10-01 Marek Polacek <polacek@redhat.com>
2365
2366 * c-typeck.c (convert_for_assignment): Improve commentary.
2367
de8ddd5f
MP
23682015-09-30 Marek Polacek <polacek@redhat.com>
2369
2370 PR c/67730
2371 * c-typeck.c (c_finish_return): Use the expansion point location for
2372 certain "return with value" warnings.
2373
c4914de6
MLI
23742015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2375
2376 * c-parser.c (pragma_lex): Add loc argument.
2377
0e36f5c7
MP
23782015-09-15 Marek Polacek <polacek@redhat.com>
2379
2380 PR c/67580
2381 * c-decl.c (tag_exists_p): New function.
2382 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2383 struct/union/enum keywords are missing.
2384 * c-tree.h (tag_exists_p): Declare.
2385
2f3bb934
MP
23862015-09-15 Marek Polacek <polacek@redhat.com>
2387
2388 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2389 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2390 Return NULL_TREE instead of 0.
2391 (lookup_name): Return NULL_TREE instead of 0.
2392 (lookup_name_in_scope): Likewise.
2393 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2394 (parser_xref_tag): Use false instead of 0.
2395 (start_struct): Use true instead of 1.
2396 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2397
aa256c4a
MP
23982015-09-14 Marek Polacek <polacek@redhat.com>
2399
2400 * c-typeck.c (set_nonincremental_init_from_string): Use
2401 HOST_WIDE_INT_M1U when shifting a negative value.
2402
dbb68221
MW
24032015-09-09 Mark Wielaard <mjw@redhat.com>
2404
2405 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2406 parm against NULL.
2407
a8a098ac
JJ
24082015-09-10 Jakub Jelinek <jakub@redhat.com>
2409
2410 PR c/67502
2411 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2412 into OMP_FOR_PRE_BODY rather than before the loop.
2413
f4b189d5
JJ
24142015-09-09 Jakub Jelinek <jakub@redhat.com>
2415
0bb99c11
JJ
2416 PR c/67501
2417 * c-parser.c (c_parser_oacc_all_clauses,
2418 c_parser_omp_all_clauses): Remove invalid clause from
2419 list of clauses even if parser->error is set.
2420
fce5e5e3
JJ
2421 PR c/67500
2422 * c-parser.c (c_parser_omp_clause_aligned,
2423 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2424 test for errors.
2425 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2426 error_mark_node.
2427
f4b189d5
JJ
2428 PR c/67495
2429 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2430 instead of c_parser_unary_expression. If the result is !lvalue_p,
2431 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2432
b2aaf235
MP
24332015-09-04 Marek Polacek <polacek@redhat.com>
2434
2435 PR sanitizer/67279
2436 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2437
1807ffc1
MS
24382015-09-03 Martin Sebor <msebor@redhat.com>
2439
2440 PR c/66516
8b652e65
JJ
2441 * c-typeck.c (convert_arguments, parser_build_unary_op,
2442 build_conditional_expr, c_cast_expr, convert_for_assignment,
2443 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2444 reject_gcc_builtin.
2445 (c_decl_implicit): Define.
2446
d04ff417
MP
24472015-09-02 Marek Polacek <polacek@redhat.com>
2448
2449 PR c/67432
2450 * c-parser.c (c_parser_enum_specifier): Give a better error for
2451 an empty enum.
2452
a79683d5
TS
24532015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2454
2455 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2456
191a6b94
MP
24572015-08-12 Marek Polacek <polacek@redhat.com>
2458
2459 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2460 LOC to it.
2461
420a9d9b
MP
24622015-08-03 Marek Polacek <polacek@redhat.com>
2463
2464 PR c/67088
2465 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2466 Use it.
2467 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2468
992118a1
PP
24692015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2470
2471 * c-parser.c (c_parser_if_body): Take token_indent_info
2472 argument. Call warn_for_misleading_indentation even when the
2473 body is a semicolon. Extract token_indent_infos corresponding
2474 to the guard, body and next tokens. Adjust call to
2475 warn_for_misleading_indentation accordingly.
2476 (c_parser_else_body): Likewise.
2477 (c_parser_if_statement): Likewise.
2478 (c_parser_while_statement): Likewise.
2479 (c_parser_for_statement): Likewise.
2480
46308474
LFSM
24812015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2482 Manuel López-Ibáñez <manu@gcc.gnu.org>
2483
2484 * c-decl.c (get_parm_info): Remove static var. Update warning
2485 message.
2486
05b28fd6
MP
24872015-07-27 Marek Polacek <polacek@redhat.com>
2488
2489 PR c++/66555
2490 PR c/54979
2491 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2492
451b5e48
MP
24932015-07-20 Marek Polacek <polacek@redhat.com>
2494
2495 PR c++/55095
2496 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2497 (build_binary_op): Warn about left shift overflows.
2498
1916bcb5
AM
24992015-07-09 Andrew MacLeod <amacleod@redhat.com>
2500
2501 * c-array-notation.c: Adjust includes for flags.h changes.
2502 * c-objc-common.c: Likewise.
2503
c7131fb2
AM
25042015-07-07 Andrew MacLeod <amacleod@redhat.com>
2505
2506 * c-array-notation.c: Adjust includes.
2507 * c-aux-info.c: Likewise.
2508 * c-convert.c: Likewise.
2509 * c-decl.c: Likewise.
2510 * c-errors.c: Likewise.
2511 * c-lang.c: Likewise.
2512 * c-objc-common.c: Likewise.
2513 * c-parser.c: Likewise.
2514 * c-typeck.c: Likewise.
2515
da2e71c9
MLI
25162015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2517
2518 PR fortran/66605
2519 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2520
b155cfd9
MP
25212015-06-29 Marek Polacek <polacek@redhat.com>
2522
2523 PR c/66322
2524 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2525 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2526 about -Wswitch-bool here.
2527 (do_case): Update c_add_case_label call.
2528 (c_finish_case): Update c_do_switch_warnings call.
2529
31521951
MP
25302015-06-27 Marek Polacek <polacek@redhat.com>
2531
2532 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2533
22d03525
MP
25342015-06-26 Marek Polacek <polacek@redhat.com>
2535
2536 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2537 INDIRECT_REF_P.
2538 * c-typeck.c (array_to_pointer_conversion): Likewise.
2539 (build_unary_op): Likewise.
2540 (c_finish_return): Likewise.
2541
f0889939
AM
25422015-06-25 Andrew MacLeod <amacleod@redhat.com>
2543
2544 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2545 * c-parser.c: Likewise.
2546
8d67ee55
RS
25472015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2548
2549 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2550 instead of pointer_hash.
2551 (detect_field_duplicates): Likewise.
2552
0ae9bd27
MP
25532015-06-25 Marek Polacek <polacek@redhat.com>
2554
2555 * c-array-notation.c: Use VAR_P throughout.
2556 * c-decl.c: Likewise.
2557 * c-objc-common.c: Likewise.
2558 * c-parser.c: Likewise.
2559 * c-typeck.c: Likewise.
2560
62f9079a
MP
25612015-06-25 Marek Polacek <polacek@redhat.com>
2562
2563 * c-decl.c: Use is_global_var throughout.
2564 * c-parser.c: Likewise.
2565 * c-typeck.c: Likewise.
2566
abb226c9
AM
25672015-06-17 Andrew MacLeod <amacleod@redhat.com>
2568
2569 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2570 * c-aux-info.c: Likewise.
2571 * c-convert.c: Likewise.
2572 * c-decl.c: Likewise.
2573 * c-errors.c: Likewise.
2574 * c-lang.c: Likewise.
2575 * c-objc-common.c: Likewise.
2576 * c-parser.c: Likewise.
2577 * c-typeck.c: Likewise.
2578
8cbababc
JH
25792015-06-11 Jan Hubicka <hubicka@ucw.cz>
2580
2581 PR middle-end/66325
2582 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2583 variants.
2584
a0349665
PMR
25852015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2586
2587 * c-decl.c (pop_scope): Register the main translation unit
2588 through the new debug hook.
2589
13fdf2e2
AM
25902015-06-08 Andrew MacLeod <amacleod@redhat.com>
2591
2592 * c-array-notation.c : Adjust include files.
2593 * c-aux-info.c : Likewise.
2594 * c-convert.c : Likewise.
2595 * c-decl.c : Likewise.
2596 * c-errors.c : Likewise.
2597 * c-lang.c : Likewise.
2598 * c-lang.h : Likewise.
2599 * c-objc-common.c : Likewise.
2600 * c-parser.c : Likewise.
2601 * c-typeck.c : Likewise.
2602
d7438551
AH
26032015-06-05 Aldy Hernandez <aldyh@redhat.com>
2604
2605 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2606 immediately clobber it.
2607 (c_write_global_declarations_1): Remove call to
2608 check_global_declaration_1.
2609 (c_write_global_declarations_2): Remove.
2610 (c_write_final_cleanups): Rename from c_write_global_declarations.
2611 Remove call to finalize_compilation_unit.
2612 Remove calls to debugging hooks.
2613 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2614 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2615 * c-tree.h: Remove c_write_global_declarations.
2616
ecb9f223
AM
26172015-06-04 Andrew MacLeod <amacleod@redhat.com>
2618
2619 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2620 * c-aux-info.c: Likewise.
2621 * c-convert.c: Likewise.
2622 * c-decl.c: Likewise.
2623 * c-errors.c: Likewise.
2624 * c-lang.c: Likewise.
2625 * c-objc-common.c: Likewise.
2626 * c-parser.c: Likewise.
2627 * c-typeck.c: Likewise.
2628
9482b620
MP
26292015-06-04 Marek Polacek <polacek@redhat.com>
2630
2631 PR c/66341
2632 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2633 it is a lvalue.
2634
bc51ace3
PK
26352015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2636
2637 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2638 Warn for empty struct.
2639 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2640
ea5b45b6
AT
26412015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2642
2643 * c-decl.c (start_function): Call plugin before parsing.
2644 (finish_function): Call plugin after parsing.
2645
c2d47482
PK
26462015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2647
2648 PR c/49551
2649 * c-decl.c (merge_decls): Merge DECL_COMMON.
2650
a95492ab
JW
26512015-05-22 Jim Wilson <jim.wilson@linaro.org>
2652
2653 * Make-lang.in (check_gcc_pallelize): Define.
2654
fd5c817a
MP
26552015-05-22 Marek Polacek <polacek@redhat.com>
2656
2657 PR c/47043
2658 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2659 attributes.
2660
c7b70a3c
MP
26612015-05-21 Marek Polacek <polacek@redhat.com>
2662
2663 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2664 DECL_BUILT_IN.
2665
21b634ae
MP
26662015-05-20 Marek Polacek <polacek@redhat.com>
2667
2668 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2669 * c-typeck.c: Likewise.
2670
296a8c2f
MP
26712015-05-19 Marek Polacek <polacek@redhat.com>
2672
2673 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2674
41b37d5e
JJ
26752015-05-19 Jakub Jelinek <jakub@redhat.com>
2676
2677 PR middle-end/66199
2678 * c-parser.c (c_parser_omp_for_loop): Don't add
2679 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2680 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2681 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2682 constructs.
2683
fab27f52
MM
26842015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2685
2686 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2687 swaps.
fab27f52 2688
40de31cf
MLI
26892015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2690
2691 PR fortran/44054
2692 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2693 accessor function.
2694
3aa3c9fc
MP
26952015-05-14 Marek Polacek <polacek@redhat.com>
2696
2697 PR c/66066
2698 PR c/66127
2699 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2700 rather than with 0.
2701
c3388e62
DM
27022015-05-12 David Malcolm <dmalcolm@redhat.com>
2703
2704 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2705 to add a call to warn_for_misleading_indentation.
2706 (c_parser_else_body): Likewise, adding param "else_loc".
2707 (c_parser_if_statement): Check for misleading indentation.
2708 (c_parser_while_statement): Likewise.
2709 (c_parser_for_statement): Likewise.
2710
755e528f
MP
27112015-05-08 Marek Polacek <polacek@redhat.com>
2712
2713 PR c/64918
2714 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2715 (output_init_element): Likewise.
2716
0173bd2a
MP
27172015-05-07 Marek Polacek <polacek@redhat.com>
2718
2719 PR c/65179
2720 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2721 value.
2722
9babc352
MP
27232015-04-30 Marek Polacek <polacek@redhat.com>
2724
2725 * c-typeck.c (set_init_label): Call error_at instead of error and
2726 pass LOC to it.
2727
ac9f18db
MP
2728 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2729 the type of a decl.
2730
ec3fba51
MP
2731 * c-typeck.c (c_build_va_arg): Clarify the error message.
2732
b811915d
TS
27332015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2734
2735 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2736 OMP_STANDALONE_CLAUSES.
2737
f3075008
MP
27382015-04-28 Marek Polacek <polacek@redhat.com>
2739
2740 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2741
4e81b788
MP
27422015-04-28 Marek Polacek <polacek@redhat.com>
2743
2744 PR c/65901
2745 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2746
6c1db78e
MP
27472015-04-25 Marek Polacek <polacek@redhat.com>
2748
2749 PR c/52085
2750 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2751 attribute.
2752
5c4abbb8
MP
27532015-04-23 Marek Polacek <polacek@redhat.com>
2754
2755 PR c/65345
2756 * c-decl.c (set_labels_context_r): New function.
2757 (store_parm_decls): Call it via walk_tree_without_duplicates.
2758 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2759 instead of create_tmp_var. Build TARGET_EXPR instead of
2760 COMPOUND_EXPR.
2761 (build_atomic_assign): Use create_tmp_var_raw instead of
2762 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2763
06aca1d5
IV
27642015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2765
2766 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2767 (c_parser_omp_target_update): Add missed %> to error_at ().
2768
8fba1830
BRF
27692015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2770
2771 PR target/55143
2772 * c-decl.c (c_default_pointer_mode): Remove definition.
2773 * c-tree.h (c_default_pointer_mode): Remove declaration.
2774
62021f64
TB
27752015-03-27 Tobias Burnus <burnus@net-b.de>
2776
2777 PR c/65586
2778 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2779 error out.
2780 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2781 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2782 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2783
9b65e171
JJ
27842015-03-19 Jakub Jelinek <jakub@redhat.com>
2785
2786 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2787 attribute for DECL_EXTERNAL VAR_DECLs.
2788
17958621
JJ
27892015-03-11 Jakub Jelinek <jakub@redhat.com>
2790
2791 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2792 argument.
2793
7ccb1a11
JJ
27942015-03-10 Jakub Jelinek <jakub@redhat.com>
2795
2796 PR c/65120
2797 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2798 before preparing arguments to warn_logical_not_parentheses.
2799
01177669
JJ
28002015-03-09 Jakub Jelinek <jakub@redhat.com>
2801
2802 PR c/65120
2803 * c-typeck.c (parser_build_binary_op): Don't warn for
2804 !!x == y or !b == y where b is _Bool.
2805
802ac282
MP
28062015-03-09 Marek Polacek <polacek@redhat.com>
2807
2808 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2809 * c-decl.c (grokdeclarator): Likewise.
2810 * c-typeck.c (build_binary_op): Likewise.
2811
e5165b60
MP
28122015-02-27 Marek Polacek <polacek@redhat.com>
2813
2814 PR c/65228
2815 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2816
065d214c
MP
28172015-02-14 Marek Polacek <polacek@redhat.com>
2818
2819 PR c/64768
2820 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2821 declared through a typedef name.
2822
e5d9235b
MP
28232015-02-13 Marek Polacek <polacek@redhat.com>
2824
2825 PR c/65050
2826 * c-decl.c (grokdeclarator): Print also the type when giving
2827 the error message about array's incomplete element type.
2828
fa01ffcc
JJ
28292015-02-11 Jakub Jelinek <jakub@redhat.com>
2830
2831 PR c/64824
2832 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2833 check in the POP macro.
2834
c3e38a03
MP
28352015-02-09 Marek Polacek <polacek@redhat.com>
2836
2837 PR c/64856
2838 * c-typeck.c (process_init_element): Don't always wrap
2839 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2840 initializing a range of elements.
2841
4886ec8e
JJ
28422015-02-04 Jakub Jelinek <jakub@redhat.com>
2843
2844 PR c/64824
2845 PR c/64868
2846 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2847
c3e38a03 28482015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2849
2850 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2851 processing enum declaration.
2852
7b33f0c8
MP
28532015-01-29 Marek Polacek <polacek@redhat.com>
2854
2855 PR c/64709
2856 * c-typeck.c (pop_init_level): If constructor_elements has
2857 exactly one element with integer_zerop value, set constructor_zeroinit
2858 to 1. Remove braces around warning_init call.
2859
dea63e49
JJ
28602015-01-27 Jakub Jelinek <jakub@redhat.com>
2861
2862 PR c/64766
2863 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2864 of FUNCTION_DECLs with error_mark_node.
2865
d38f7dce
JJ
28662015-01-26 Jakub Jelinek <jakub@redhat.com>
2867
2868 PR c/64778
2869 * c-typeck.c (convert_arguments): Return -1 if there are
2870 error_args, even if we've diagnosed too many arguments.
2871
cbf5d0e7
RB
28722015-01-21 Richard Biener <rguenther@suse.de>
2873
2874 PR middle-end/64313
2875 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2876 for builtins the user declared correctly.
2877
41dbbb37
TS
28782015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2879 Bernd Schmidt <bernds@codesourcery.com>
2880 Cesar Philippidis <cesar@codesourcery.com>
2881 James Norris <jnorris@codesourcery.com>
2882 Jakub Jelinek <jakub@redhat.com>
2883 Ilmir Usmanov <i.usmanov@samsung.com>
2884
2885 * c-parser.c: Include "gomp-constants.h".
2886 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2887 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2888 Use OMP_CLAUSE_SET_MAP_KIND.
2889 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2890 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2891 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2892 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2893 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2894 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2895 "copyout", "create", "delete", "deviceptr", "gang", "host",
2896 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2897 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2898 "present_or_create", "pcreate", "seq", "self", "vector",
2899 "vector_length", "wait", "worker".
2900 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2901 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2902 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2903 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2904 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2905 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2906 (c_parser_oacc_data_clause_deviceptr)
2907 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2908 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2909 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2910 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2911 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2912 (c_parser_oacc_parallel, c_parser_oacc_update)
2913 (c_parser_oacc_wait): New functions.
2914 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2915 (c_finish_oacc_data): New prototypes.
2916 * c-typeck.c: Include "gomp-constants.h".
2917 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2918 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2919 OMP_CLAUSE_SET_MAP_KIND.
2920 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2921 (c_finish_oacc_data): New functions.
2922 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2923 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2924 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2925 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2926 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2927 GOMP_MAP_FORCE_DEVICEPTR.
2928
adfac8df
JJ
29292015-01-09 Michael Collison <michael.collison@linaro.org>
2930
2931 * c-array-notation.c: Include hash-set.h, machmode.h,
2932 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2933 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2934 * c-aux-info.c: Ditto.
2935 * c-convert.c: Ditto.
2936 * c-decl.c: Ditto.
2937 * c-errors.c: Ditto.
2938 * c-lang.c: Dittoxs.
2939 * c-objc-common.c: Ditto.
2940 * c-parser.c: Ditto.
2941 * c-typeck.c: Include hash-set.h, machmode.h,
2942 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2943 fold-const.h, wide-int.h, inchash.h, real.h and
2944 fixed-value.h due to flattening of tree.h.
2945
2cc901dc
MP
29462015-01-07 Marek Polacek <polacek@redhat.com>
2947
2948 PR c/64417
2949 * c-typeck.c (process_init_element): Disallow initialization of
2950 a flexible array member with a string constant if the structure
2951 is in an array.
2952
5624e564
JJ
29532015-01-05 Jakub Jelinek <jakub@redhat.com>
2954
e5341100
JJ
2955 PR sanitizer/64344
2956 * c-typeck.c (convert_for_assignment, c_finish_return): For
2957 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2958 types also set in_late_binary_op around convert call.
2959 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2960 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2961 result on expr as last argument to ubsan_instrument_float_cast,
2962 if in_late_binary_op, don't use c_save_expr but save_expr.
2963
5624e564
JJ
2964 Update copyright years.
2965
5bd012f8
MP
29662015-01-05 Marek Polacek <polacek@redhat.com>
2967
2968 PR c/64423
2969 * c-typeck.c (build_array_ref): Pass loc down to
2970 warn_array_subscript_with_type_char.
2971
3f8257db 29722014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2973
2974 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2975 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2976 element type.
8e745a17 2977 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2978 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2979 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2980 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2981 to PEDWARN_FOR_QUALIFIERS.
768952be 2982
8f94a8c4
JJ
29832014-12-17 Jakub Jelinek <jakub@redhat.com>
2984
2985 PR sanitizer/64289
2986 * c-convert.c: Include ubsan.h.
2987 (convert): For real -> integral casts and
2988 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2989 instead instrument the float cast directly.
2990
b731b390
JJ
29912014-11-29 Jakub Jelinek <jakub@redhat.com>
2992
2993 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2994 c_finish_stmt_expr): Remove NULL last argument from
2995 create_tmp_var_raw and create_tmp_var calls.
2996 * c-array-notation.c (fix_builtin_array_notation_fn,
2997 build_array_notation_expr, fix_conditional_array_notations_1,
2998 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2999
541e35a6
MP
30002014-11-28 Marek Polacek <polacek@redhat.com>
3001
3002 PR c/63862
3003 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3004 convert the right operand to integer type.
3005
b286be94
MP
30062014-11-25 Marek Polacek <polacek@redhat.com>
3007
3008 PR c/63877
3009 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3010 for inline functions.
3011
aa7da51a
JJ
30122014-11-21 Jakub Jelinek <jakub@redhat.com>
3013
3014 PR target/63764
3015 * c-typeck.c (build_array_ref): Adjust
3016 convert_vector_to_pointer_for_subscript caller. If it returns true,
3017 call non_lvalue_loc on the result.
3018
d876207f
RB
30192014-11-11 Richard Biener <rguenther@suse.de>
3020
3021 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3022 to true.
3023
e5e44252
AK
30242014-11-10 Andi Kleen <ak@linux.intel.com>
3025
3026 PR c/60804
3027 * c-parser.c (c_parser_statement_after_labels): Call
3028 check_no_cilk.
3029 (c_parser_if_statement): Dito.
3030 (c_parser_switch_statement): Dito.
3031 (c_parser_while_statement): Dito.
3032 (c_parser_do_statement): Dito.
3033 (c_parser_for_statement): Dito.
3034 * c-typeck.c (c_finish_loop): Dito.
3035
13c21655
PC
30362014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3037
3038 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3039 OPT_Wshift_count_overflow in the warnings.
3040
2d51fcef
MP
30412014-10-30 Marek Polacek <polacek@redhat.com>
3042
3043 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3044 print the stripped version as well, if they're not the same.
3045
ef4bddc2
RS
30462014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3047
3048 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3049 machine_mode.
3050
c582198b
AM
30512014-10-28 Andrew MacLeod <amacleod@redhat.com>
3052
3053 * c-decl.c: Adjust include files.
3054 * c-parser.c: Ditto.
3055
ddc8de03
PM
30562014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3057 Tom Tromey <tromey@redhat.com>
3058
3059 * c-tree.h (enum c_oracle_request): New.
3060 (c_binding_oracle_function): New typedef.
3061 (c_binding_oracle, c_pushtag, c_bind): Declare.
3062 * c-decl.c (c_binding_oracle): New global.
3063 (I_SYMBOL_CHECKED): New macro.
3064 (i_symbol_binding): New function.
3065 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3066 (I_TAG_CHECKED): New macro.
3067 (i_tag_binding): New function.
3068 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3069 (I_LABEL_CHECKED): New macro.
3070 (i_label_binding): New function.
3071 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3072 (c_print_identifier): Save and restore c_binding_oracle.
3073 (c_pushtag, c_bind): New functions.
3074
60393bbc
AM
30752014-10-27 Andrew MacLeod <amacleod@redhat.com>
3076
3077 * c-typeck.c: Adjust include files.
3078
d723bb7c
MLI
30792014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3080
3081 PR c++/53061
3082 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3083 initialization here...
3084 (c_initialize_diagnostics): ... but here. Set defaults after
3085 building pretty-printer.
3086
1bc5a451
MP
30872014-10-23 Marek Polacek <polacek@redhat.com>
3088
3089 PR c/63626
3090 * c-decl.c (pop_scope): Don't print warning in external_scope.
3091
4435bb92
MP
30922014-10-19 Marek Polacek <polacek@redhat.com>
3093
3094 PR c/63567
3095 * c-typeck.c (output_init_element): Allow initializing objects with
3096 static storage duration with compound literals even in C99 and add
3097 pedwarn for it.
3098
7278465e
MP
30992014-10-17 Marek Polacek <polacek@redhat.com>
3100
3101 PR c/63567
3102 * c-typeck.c (digest_init): Allow initializing objects with static
3103 storage duration with compound literals even in C99 and add pedwarn
3104 for it.
3105
d9b7be2e
MP
31062014-10-17 Marek Polacek <polacek@redhat.com>
3107
3108 PR c/63543
3109 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3110 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3111 error multiple times. Print the type.
3112
f406ae1f
MP
31132014-10-17 Marek Polacek <polacek@redhat.com>
3114
3115 PR c/63549
3116 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3117 type.
3118
92574c7c
MP
31192014-10-17 Marek Polacek <polacek@redhat.com>
3120
3121 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3122 (start_function): Use OPT_Wimplicit_int instead of 0.
3123 (store_parm_decls_oldstyle): Likewise.
3124
1bc4a978
MT
31252014-10-17 Alan Modra <amodra@gmail.com>
3126
3127 PR middle-end/61848
3128 * c-decl.c (merge_decls): Don't merge section name or tls model
3129 to newdecl symtab node, instead merge to olddecl. Override
3130 existing olddecl section name. Set tls_model for all thread-local
3131 vars, not just OMP thread-private ones. Remove incorrect comment.
3132
83685514
AM
31332014-10-16 Andrew MacLeod <amacleod@redhat.com>
3134
3135 * c-decl.c: Adjust include files.
3136
78a7c317
DD
31372014-10-14 DJ Delorie <dj@redhat.com>
3138
3139 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3140 (c_token_starts_typename): Check all __intN, not just __int128.
3141 (c_token_starts_declspecs): Likewise.
3142 (c_parser_declspecs): Likewise.
3143 (c_parser_attribute_any_word): Likewise.
3144 (c_parser_objc_selector): Likewise.
3145 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3146 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3147 is specified.
3148 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3149 __int128.
3150 (finish_declspecs): Likewise.
3151
74d98c1e
AB
31522014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3153
8e745a17 3154 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3155 the duplicate code.
8e745a17 3156 (c_parser_statement): Call the new function.
74d98c1e 3157
84937de2
MP
31582014-10-09 Marek Polacek <polacek@redhat.com>
3159
3160 PR c/63480
3161 * c-typeck.c (pop_init_level): Don't warn about initializing
3162 with { }.
3163
0382aaa0
MP
31642014-10-07 Marek Polacek <polacek@redhat.com>
3165
3166 PR c/59717
3167 * c-decl.c (header_for_builtin_fn): New function.
3168 (implicitly_declare): Suggest which header to include.
3169
7a0ca710
MP
31702014-10-07 Marek Polacek <polacek@redhat.com>
3171
3172 * c-convert.c (convert): Use error_operand_p.
3173 * c-typeck.c (require_complete_type): Likewise.
3174 (really_atomic_lvalue): Likewise.
3175 (digest_init): Likewise.
3176 (handle_omp_array_sections_1): Likewise.
3177
6bc8a126
MP
31782014-10-03 Marek Polacek <polacek@redhat.com>
3179
3180 PR c/63453
3181 * c-decl.c (pop_scope): Don't warn about "inline function declared
3182 but never defined" for functions marked with gnu_inline attribute.
3183
d90c0a59
JJ
31842014-09-25 Jakub Jelinek <jakub@redhat.com>
3185
3186 PR c++/63249
3187 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3188 on low_bound and length.
3189
083e891e
MP
31902014-09-24 Marek Polacek <polacek@redhat.com>
3191
3192 PR c/61405
3193 PR c/53874
3194 * c-parser.c: Don't define CPP_KEYWORD.
3195 (c_parser_switch_statement): Pass original type to c_finish_case.
3196 * c-tree.h (c_finish_case): Update declaration.
3197 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3198 conditionally to c_do_switch_warnings.
3199
8d95fe25
MP
32002014-09-03 Marek Polacek <polacek@redhat.com>
3201
3202 PR c/62024
3203 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3204 conversions.
3205
9a771876
JJ
32062014-09-02 Jakub Jelinek <jakub@redhat.com>
3207 Balaji V. Iyer <balaji.v.iyer@intel.com>
3208 Igor Zamyatin <igor.zamyatin@intel.com>
3209
3210 * c-parser.c (c_parser_cilk_for): New function.
3211 (c_parser_cilk_grainsize): Likewise.
3212 (c_get_temp_regvar): Likewise.
3213 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3214 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3215 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3216 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3217 case.
3218
b7679d96
CG
32192014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3220
3221 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3222 with using HOST_WIDE_INT without truncation to 'int'
3223
59ea0364
MP
32242014-08-22 Marek Polacek <polacek@redhat.com>
3225
3226 PR c++/62199
3227 * c-typeck.c (parser_build_binary_op): Adjust call to
3228 warn_logical_not_parentheses.
3229
671a475e
IZ
32302014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3231
3232 PR other/62008
3233 * c-parser.c (c_parser_array_notation): Check for correct
3234 type of an array added.
3235
04159acf
MP
32362014-08-19 Marek Polacek <polacek@redhat.com>
3237
3238 PR c++/62153
3239 * c-typeck.c (build_binary_op): If either operand of a comparison
3240 is a boolean expression, call maybe_warn_bool_compare.
3241
c77935ee
PP
32422014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3243
3244 PR c/45584
3245 * c-typeck.c (build_c_cast): Do a conversion even when the
3246 TYPE_MAIN_VARIANTs are the same.
3247
35aff4fb
MP
32482014-08-19 Marek Polacek <polacek@redhat.com>
3249
3250 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3251 pedwarn_c99 instead of pedwarn.
3252 (grokfield): Likewise.
3253 (warn_defaults_to): New function.
3254 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3255 Unconditionally call pedwarn_c99 instead of pedwarn.
3256 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3257 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3258 check flag_isoc11 before.
3259 * c-errors.c (pedwarn_c99): Change the return type to bool.
3260 Handle -Wc99-c11-compat.
3261 * c-parser.c (disable_extension_diagnostics): Handle
3262 warn_c99_c11_compat.
3263 (restore_extension_diagnostics): Likewise.
3264 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3265 instead of pedwarn, don't check flag_isoc11 before.
3266 (c_parser_declspecs): Likewise.
3267 (c_parser_alignas_specifier): Likewise.
3268 (c_parser_alignof_expression): Likewise.
3269 (c_parser_generic_selection): Likewise.
3270 * c-tree.h (pedwarn_c99): Update declaration.
3271 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3272 of pedwarn_c99.
3273
177cce46
MP
32742014-08-19 Marek Polacek <polacek@redhat.com>
3275
3276 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3277 to pedwarn_c90.
3278 * c-errors.c: Include "opts.h".
3279 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3280 * c-parser.c (disable_extension_diagnostics): Handle negative value
3281 of warn_c90_c99_compat, too.
3282 (restore_extension_diagnostics): Likewise.
3283 (c_parser_compound_statement_nostart): Pass
3284 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3285
6dc99c33
MP
32862014-08-12 Marek Polacek <polacek@redhat.com>
3287
3288 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3289 Add pedwarn.
3290 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3291 Likewise.
3292 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3293
3f8257db 32942014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3295
3296 PR c/51849
3297 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3298 Call pedwarn_c90 instead of pedwarn.
3299 (check_bitfield_type_and_width): Likewise.
3300 (declspecs_add_qual): Likewise.
3301 (declspecs_add_type): Likewise.
3302 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3303 Adjust to only call pedwarn_c90.
3304 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3305 pedwarn_c90 instead of pedwarn.
3306 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3307 * c-parser.c (disable_extension_diagnostics): Handle
3308 warn_c90_c99_compat.
3309 (restore_extension_diagnostics): Likewise.
3310 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3311 pedwarn_c90 instead of pedwarn.
3312 (c_parser_initelt): Likewise.
3313 (c_parser_postfix_expression): Likewise.
3314 (c_parser_postfix_expression_after_paren_type): Likewise.
3315 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3316 * c-tree.h: Fix formatting.
3317 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3318 pedwarn_c90 instead of pedwarn.
3319
9f25a338
TS
33202014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3321
3322 * c-typeck.c: Remove include of pointer-set.h.
3323
044331a8
MP
33242014-08-07 Marek Polacek <polacek@redhat.com>
3325
3326 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3327
b787e7a2
TS
33282014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3329
3330 * c-typeck.c: Use hash_map instead of pointer_map.
3331
6e2830c3
TS
33322014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3333
3334 * c-decl.c: Use hash_set instead of pointer_set.
3335
a7ee52fb
IZ
33362014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3337
3338 PR middle-end/61455
3339 * c-array-notation.c (expand_array_notations): Handling
3340 of DECL_EXPR added.
3341
b4dfdc11
MG
33422014-07-31 Marc Glisse <marc.glisse@inria.fr>
3343
3344 PR c++/60517
3345 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3346 a local variable.
3347
976d5a22
TT
33482014-07-30 Tom Tromey <tromey@redhat.com>
3349
3350 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3351 field.
3352 (really_start_incremental_init, push_init_level): Initialize
3353 designator_depth.
3354 (pop_init_level): Set global designator_depth.
3355 (process_init_element): Check for designated_init attribute.
3356
30281de2
MP
33572014-07-20 Marek Polacek <polacek@redhat.com>
3358
3359 PR c/61852
3360 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3361 (implicitly_declare): Pass location to implicit_decl_warning.
3362
b108f48f
JJ
33632014-07-14 Jakub Jelinek <jakub@redhat.com>
3364
3365 PR middle-end/61294
3366 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3367 If non-NULL, call c_parser_check_literal_zero.
3368 (c_parser_check_literal_zero): New function.
3369 (c_parser_postfix_expression_after_primary): Adjust
3370 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3371
773ec47f
MP
33722014-07-06 Marek Polacek <polacek@redhat.com>
3373
3374 PR c/6940
3375 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3376 * c-tree.h (C_ARRAY_PARAMETER): Define.
3377 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3378 function parameter.
3379
22e1cf1c 33802014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3381 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3382
3383 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3384 releasing symbol.
3385
52ec0ea3
MP
33862014-07-01 Marek Polacek <polacek@redhat.com>
3387
3388 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3389 instead of 0 to WARN_FOR_ASSIGNMENT.
3390
d5c3d343
MP
33912014-07-01 Marek Polacek <polacek@redhat.com>
3392
3393 PR c/58286
3394 * c-typeck.c (convert_for_assignment): Pass
3395 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3396
6a7253a4
MP
33972014-06-30 Marek Polacek <polacek@redhat.com>
3398
3399 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3400 has no_sanitize_undefined attribute.
3401
5e88a8f4
IZ
34022014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3403
3404 PR middle-end/57541
3405 * c-array-notation.c (fix_builtin_array_notation_fn):
3406 Check for 0 arguments in builtin call. Check that bultin argument is
3407 correct.
3408 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3409 index.
3410
9698b078
SH
34112014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3412
3413 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3414 qualifiers in __auto_type for atomic types.
3415 (c_parser_typeof_specifier): Discard all type qualifiers in
3416 __typeof__ for atomic types.
3417
6e07c515
MP
34182014-06-25 Marek Polacek <polacek@redhat.com>
3419
3420 PR c/61162
3421 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3422 the return expression to c_finish_return.
3423
da6f124d
JJ
34242014-06-25 Jakub Jelinek <jakub@redhat.com>
3425
3426 * c-typeck.c (c_finish_omp_clauses): Make sure
3427 OMP_CLAUSE_LINEAR_STEP has correct type.
3428
c203e8a7
TS
34292014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3430
3431 * c-decl.c: Adjust.
3432
56ad0e38
JJ
34332014-06-24 Jakub Jelinek <jakub@redhat.com>
3434
3435 * c-parser.c (c_parser_omp_for_loop): For
3436 #pragma omp parallel for simd move lastprivate clause from parallel
3437 to for rather than simd.
3438
47c2554f
MP
34392014-06-23 Marek Polacek <polacek@redhat.com>
3440
3441 * c-typeck.c (parser_build_binary_op): Don't call
3442 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3443
56363ffd
JH
34442014-06-15 Jan Hubicka <hubicka@ucw.cz>
3445
3446 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3447 * c-decl.c (merge_decls): Likewise.
3448
d7ff7ae5
MP
34492014-06-09 Marek Polacek <polacek@redhat.com>
3450
3451 PR c/36446
3452 * c-typeck.c (error_init): Call inform instead of error_at.
3453 (pedwarn_init): Call inform instead of pedwarn.
3454 (warning_init): Call inform instead of warning_at.
3455
24d047a3
JH
34562014-06-07 Jan Hubicka <hubicka@ucw.cz>
3457
3458 * c-decl.c (merge_decls): Use set_decl_section_name.
3459 (duplicate_decls): Remove node if it exists.
3460
9bac5cbb
G
34612014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3462
3463 PR c/53119
3464 * c-typeck.c (push_init_level, process_init_element,
3465 pop_init_level): Correct check for zero initialization, move
3466 missing brace warning to respect zero initialization.
3467
8ffcdea8
MP
34682014-06-05 Marek Polacek <polacek@redhat.com>
3469
3470 PR c/56724
3471 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3472
742938c9
MP
34732014-06-05 Marek Polacek <polacek@redhat.com>
3474
3475 PR c/49706
3476 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3477 on the left hand side operand of a comparison.
3478
6447c55d
MP
34792014-06-05 Marek Polacek <polacek@redhat.com>
3480
3481 PR c/48062
3482 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3483 Print note only if the warning was printed.
3484
9dc7743c
IZ
34852014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3486
3487 PR c/58942
3488 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3489 with a pointer.
3490
fedfecef
MP
34912014-06-03 Marek Polacek <polacek@redhat.com>
3492
3493 PR c/60439
3494 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3495 c_start_case.
3496 * c-tree.h (c_start_case): Update.
3497 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3498 switch condition has boolean value.
3499
9b2b7279
AM
35002014-06-02 Andrew MacLeod <amacleod@redhat.com>
3501
3502 * c-decl.c: Include builtins.h.
3503 * c-parser.c: Likewise.
3504
5c1bc275
MP
35052014-05-27 Marek Polacek <polacek@redhat.com>
3506
3507 PR c/56724
3508 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3509 error and warning calls to error_at and warning_at. Pass location of
3510 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3511 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3512 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3513
97563bc8
IZ
35142014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3515
3516 PR c/61191
3517 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3518 function parameters.
3519
aede2c10
JH
35202014-05-23 Jan Hubicka <hubicka@ucw.cz>
3521
3522 * c-decl.c (merge_decls): Preserve symtab node pointers.
3523 (duplicate_decls): Free new decl.
3524
edbba2ce
TS
35252014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3526
f3316c6d
TS
3527 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3528 initialization.
3529
edbba2ce
TS
3530 * c-parser.c (c_parser_omp_target): Return bool values.
3531
68c81f24
TS
35322014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3533
3534 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3535 num_teams_loc variable to num_thread_limit_loc.
3536
632f2871
RS
35372014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3538
3539 * c-array-notation.c (expand_array_notations): Use void_node
3540 instead of void_zero_node.
3541
766090c2
TS
35422014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3543
3544 * c-decl.c (finish_struct): Adjust.
3545 (finish_enum): Likewise.
3546 (bind): Adjust.
3547 (record_inline_static): Likewise.
3548 (push_scope): Likewise.
3549 (make_label): Likewise.
3550 (lookup_label_for_goto): Likewise.
3551 (finish_struct): Likewise.
3552 (finish_enum): Likewise.
3553 (store_parm_decls): Likewise.
3554 (c_push_function_context): Likewise.
3555 * c-lang.h: Remove usage of variable_size gty attribute.
3556 * c-parser.c (c_parse_init): Adjust.
3557 (c_parse_file): Likewise.
3558
2b107f6b
MP
35592014-05-13 Marek Polacek <polacek@redhat.com>
3560
3561 PR c/61162
3562 * c-typeck.c (convert_for_assignment): Pass location to
3563 WARN_FOR_ASSIGNMENT instead of input_location.
3564
d033409e
MP
35652014-05-10 Marek Polacek <polacek@redhat.com>
3566
3567 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3568 maybe_warn_string_init.
3569 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3570 maybe_warn_string_init.
3571 * c-tree.h (maybe_warn_string_init): Update declaration.
3572 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3573 Call pedwarn_init with loc instead of with input_location.
3574 (digest_init): Pass init_loc to maybe_warn_string_init.
3575 (pop_init_level): Call pedwarn_init with loc instead of with
3576 input_location.
3577 (set_init_index): Likewise.
3578 (process_init_element): Likewise.
3579
ea58ef42
MP
35802014-05-09 Marek Polacek <polacek@redhat.com>
3581
3582 PR c/61096
3583 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3584 (c_parser_initelt): Pass location to set_init_label. Pass array index
3585 location to set_init_index.
3586 * c-tree.h (push_init_level): Update declaration.
3587 (pop_init_level): Likewise.
3588 (set_init_index): Likewise.
3589 (set_init_label): Likewise.
3590 * c-typeck.c (error_init): Add location parameter. Call error_at
3591 instead of error.
3592 (digest_init): Pass init_loc to error_init.
3593 (really_start_incremental_init):
3594 (push_init_level): Add location parameter. Pass loc to pop_init_level
3595 and error_init.
3596 (pop_init_level): Likewise.
3597 (set_designator): Add location parameter. Pass loc to pop_init_level,
3598 push_init_level, and error_init.
3599 (set_init_index): Add location parameter. Pass loc to error_init and
3600 set_designator.
3601 (set_init_label): Likewise.
3602 (output_init_element): Pass loc to error_init.
3603 (process_init_element): Pass loc to error_init, pop_init_level,
3604 pedwarn_init, and push_init_level.
3605
661a0813
MP
36062014-05-09 Marek Polacek <polacek@redhat.com>
3607
3608 PR c/50459
3609 * c-parser.c (c_parser_attributes): Parse the arguments as an
3610 expression-list if the attribute takes identifier.
3611
2793eeab
MP
36122014-05-08 Marek Polacek <polacek@redhat.com>
3613
3614 PR c/61053
3615 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3616 TYPE_ALIGN_UNIT.
3617
f827930a
MP
36182014-05-08 Marek Polacek <polacek@redhat.com>
3619
3620 PR c/61077
3621 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3622 of main.
3623
1d60af08
KZ
36242014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3625 Mike Stump <mikestump@comcast.net>
3626 Richard Sandiford <rdsandiford@googlemail.com>
3627
3628 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3629 (finish_enum): Use wide-int interfaces.
3630 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3631 * c-typeck.c (build_c_cast): Likewise.
3632 (set_nonincremental_init_from_string): Likewise.
3633 (c_tree_equal): Likewise.
3634
a0e24419
MP
36352014-05-02 Marek Polacek <polacek@redhat.com>
3636
3637 PR c/25801
3638 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3639 Return size_one_node when the type is not complete.
3640 (pointer_diff): Remove comment.
3641 (build_unary_op): Improve error messages.
3642
19fc9faa
MP
36432014-05-02 Marek Polacek <polacek@redhat.com>
3644
3645 * c-typeck.c (c_finish_return): Separate warning_at calls.
3646
63bc4e87
MP
36472014-05-02 Marek Polacek <polacek@redhat.com>
3648
3649 * c-tree.h (error_init): Remove declaration.
3650 (pedwarn_init): Likewise.
3651 * c-typeck.c (error_init): Make static and move above.
3652 (pedwarn_init): Likewise.
3653 (warning_init): Move above.
3654 (maybe_warn_string_init): Likewise.
3655
4bd2511b
JL
36562014-05-01 Jeff Law <law@redhat.com>
3657
3658 Revert:
3659
3660 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3661 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3662 avoid goto.
3663
6a358dcb
MP
36642014-05-02 Marek Polacek <polacek@redhat.com>
3665
3666 PR c/60784
3667 * c-typeck.c (push_init_level): Set constructor_designated to
3668 p->designated for structures.
3669
ae5ebda4
MP
36702014-05-01 Marek Polacek <polacek@redhat.com>
3671
3672 PR c/60915
3673 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3674 function-definition has an attribute after the declarator.
3675
96b40f8d
MP
36762014-05-01 Marek Polacek <polacek@redhat.com>
3677
3678 PR c/60257
3679 * c-typeck.c (warning_init): Add location_t parameter. Call
3680 warning_at instead of warning.
3681 (push_init_level): Pass input_location to warning_init.
3682 (add_pending_init): Add location_t parameter. Pass loc to
3683 warning_init.
3684 (set_nonincremental_init): Pass input_location to add_pending_init.
3685 (set_nonincremental_init_from_string): Likewise.
3686 (output_init_element): Pass loc to warning_init and to
3687 add_pending_init.
3688
32e00768
MP
36892014-05-01 Marek Polacek <polacek@redhat.com>
3690
3691 PR c/43395
3692 * c-typeck.c (c_finish_return): Distinguish between label and variable
3693 when warning about returning local address.
3694
c9379ce2
MP
36952014-05-01 Marek Polacek <polacek@redhat.com>
3696
3697 PR c/29467
3698 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3699 in C89 mode.
3700
d00887e8
MP
37012014-05-01 Marek Polacek <polacek@redhat.com>
3702
3703 PR c/43245
3704 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3705 instead of 0 to WARN_FOR_QUALIFIERS.
3706
5436fa2e
MP
37072014-05-01 Marek Polacek <polacek@redhat.com>
3708
3709 PR c/56989
3710 * c-typeck.c (default_conversion): Use better location for
3711 error call.
3712
f8ed5150
MP
37132014-04-30 Marek Polacek <polacek@redhat.com>
3714
3715 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3716 also when SANITIZE_FLOAT_DIVIDE is on.
3717
8337d1db
MP
37182014-04-30 Marek Polacek <polacek@redhat.com>
3719
3720 PR c/60139
3721 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3722 and pedwarn_init. Use loc insted of input_location.
3723
c4bdc42f
MP
37242014-04-30 Marek Polacek <polacek@redhat.com>
3725
3726 PR c/60351
3727 * c-typeck.c (build_binary_op): Use location when warning about
3728 shift count.
3729
45484dcf
MP
37302014-04-25 Marek Polacek <polacek@redhat.com>
3731
3732 PR c/18079
3733 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3734 always_inline/noinline and hot/cold attributes.
3735
34cf811f
MP
37362014-04-25 Marek Polacek <polacek@redhat.com>
3737
3738 PR c/60114
3739 * c-parser.c (c_parser_initelt): Pass input_location to
3740 process_init_element.
3741 (c_parser_initval): Pass loc to process_init_element.
3742 * c-tree.h (process_init_element): Adjust declaration.
3743 * c-typeck.c (push_init_level): Pass input_location to
3744 process_init_element.
3745 (pop_init_level): Likewise.
3746 (set_designator): Likewise.
3747 (output_init_element): Add location_t parameter. Pass loc to
3748 digest_init.
3749 (output_pending_init_elements): Pass input_location to
3750 output_init_element.
3751 (process_init_element): Add location_t parameter. Pass loc to
3752 output_init_element.
3753
42056eac
JJ
37542014-04-24 Jakub Jelinek <jakub@redhat.com>
3755
3756 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3757 atomic-clause, allow comma in between atomic-clause and
3758 seq_cst.
3759
e162a134
JJ
37602014-04-22 Jakub Jelinek <jakub@redhat.com>
3761
3762 PR c/59073
3763 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3764 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3765
2f6babac
IZ
37662014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3767
3768 PR middle-end/60469
3769 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3770 create_tmp_var instead build_decl for creating temps.
3771 (build_array_notation_expr): Likewise.
3772 (fix_conditional_array_notations_1): Likewise.
3773 (fix_array_notation_expr): Likewise.
3774 (fix_array_notation_call_expr): Likewise.
3775
8edbfaa6
JJ
37762014-03-28 Jakub Jelinek <jakub@redhat.com>
3777
3778 PR c++/60689
3779 * c-tree.h (c_build_function_call_vec): New prototype.
3780 * c-typeck.c (build_function_call_vec): Don't call
3781 resolve_overloaded_builtin here.
3782 (c_build_function_call_vec): New wrapper function around
3783 build_function_call_vec. Call resolve_overloaded_builtin here.
3784 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3785 Call c_build_function_call_vec instead of build_function_call_vec.
3786 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3787 * c-decl.c (finish_decl): Likewise.
3788
7485aeea
MLI
37892014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3790
3791 PR c/55383
3792 * c-typeck.c: Use correct format string in cast-qual warning
3793
b17a8b07
TS
37942014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3795
3796 * c-decl.c (c_decl_attributes): Use
3797 lang_hooks.types.omp_mappable_type.
3798 * c-typeck.c (c_finish_omp_clauses): Likewise.
3799
3af9c5e9
MP
38002014-03-06 Marek Polacek <polacek@redhat.com>
3801
3802 PR c/60197
3803 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3804 of checking tree code.
3805
1c9f5f33
PK
38062014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3807
3808 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3809 (c_parser_parameter_declaration): Likewise.
3810
cc28fc7f
MP
38112014-02-19 Marek Polacek <polacek@redhat.com>
3812
3813 PR c/60195
3814 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3815 Call mark_exp_read on exp.value.
3816 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3817 TREE_ADDRESSABLE on old instead of val.
3818 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3819
b581c05c
PK
38202014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3821
3822 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3823 C_EXPR_APPEND by vec_safe_push.
3824 * c-tree.h (C_EXPR_APPEND): Remove.
3825
81e5eca8
MP
38262014-01-31 Marek Polacek <polacek@redhat.com>
3827
3828 PR c/59963
3829 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3830 build_function_call_vec.
3831 (build_function_call): Likewise.
3832 (build_atomic_assign): Likewise.
3833 (build_function_call_vec): Add arg_loc parameter. Use it.
3834 (convert_arguments): Likewise.
3835 (convert_for_assignment): Rename rhs_loc to expr_loc.
3836 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3837 (c_parser_objc_keywordexpr): Likewise.
3838 (c_parser_postfix_expression_after_primary): Call
3839 build_function_call_vec with expr_loc rather than op_loc.
3840 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3841 build_function_call_vec.
3842 (c_parser_expr_list): Add locations parameter. Fill it with locations
3843 of function arguments.
3844 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3845
68fca595
MP
38462014-01-30 Marek Polacek <polacek@redhat.com>
3847
3848 PR c/59940
3849 * c-typeck.c (build_function_call_vec): Use loc parameter.
3850 (convert_arguments): Add location parameter. Use it.
3851 (ep_convert_and_check): Likewise.
3852 (build_atomic_assign): Adjust convert_for_assignment call.
3853 (build_modify_expr): Likewise.
3854 (digest_init): Likewise.
3855 (c_finish_return): Likewise.
3856 (build_conditional_expr): Adjust ep_convert_and_check calls.
3857 (convert_for_assignment): Add rhs_loc parameter. Use it.
3858 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3859 calls.
3860
fa337f3a
RB
38612014-01-30 Richard Biener <rguenther@suse.de>
3862
3863 PR c/59905
3864 * c-typeck.c (build_function_call_vec): Do not replace calls
3865 to a function via an incompatible type with a runtime abort.
3866
b72271b9
BI
38672014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3868
3869 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3870 flag_enable_cilkplus with flag_cilkplus.
3871 (c_parser_direct_declarator_inner): Likewise.
3872 (c_parser_attribute_any_word): Likewise.
3873 (c_parser_attributes): Likewise.
3874 (c_parser_compound_statement): Likewise.
3875 (c_parser_statement_after_labels): Likewise.
3876 (c_parser_if_statement): Likewise.
3877 (c_parser_switch_statement): Likewise.
3878 (c_parser_do_statement): Likewise.
3879 (c_parser_for_statement): Likewise.
3880 (c_parser_unary_expression): Likewise.
3881 (c_parser_postfix_expression): Likewise.
3882 (c_parser_postfix_expression_after_primary): Likewise.
3883 (c_parser_postfix_expression_after_primary): Likewise.
3884 (c_parser_omp_clause_name): Likewise.
3885 (c_finish_omp_declare_simd): Likewise.
3886 (c_parser_cilk_verify_simd): Likewise.
3887 * c-typeck.c (build_array_ref): Likewise.
3888 (build_function_call_vec): Likewise.
3889 (convert_arguments): Likewise.
3890 (build_compound_expr): Likewise.
3891 (c_finish_return): Likewise.
3892 (c_finish_if_stmt): Likewise.
3893 (c_finish_loop): Likewise.
3894 (build_binary_op): Likewise.
3895
393e8e8b
MP
38962014-01-23 Marek Polacek <polacek@redhat.com>
3897
3898 PR c/59846
3899 * c-typeck.c (parser_build_binary_op): Use location instead of
3900 input_location.
3901 (build_binary_op): Pass location to shorten_compare.
3902
f04dda30
MP
39032014-01-23 Marek Polacek <polacek@redhat.com>
3904
3905 PR c/58346
3906 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3907 an empty aggregate.
3908
789eadcd
MP
39092014-01-23 Marek Polacek <polacek@redhat.com>
3910
3911 PR c/59871
3912 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3913 of a comma expression.
3914 (emit_side_effect_warnings): Likewise.
3915
40f14e9f
BI
39162014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3917
3918 PR c/59825
3919 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3920 function to use walk_tree and moved a lot of its functionality to
3921 expand_array_notations.
3922 (expand_array_notations): New function.
3923
74558dd9
BI
39242014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3925
3926 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3927 attribute an attribute without value.
3928
652fea39
JJ
39292014-01-23 Jakub Jelinek <jakub@redhat.com>
3930
3931 PR middle-end/58809
3932 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3933 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3934
f34f1c87
MP
39352014-01-22 Marek Polacek <polacek@redhat.com>
3936
3937 PR c/59891
3938 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3939 of remove_c_maybe_const_expr on op1 and op2.
3940
241f845a
JJ
39412014-01-15 Jakub Jelinek <jakub@redhat.com>
3942
3943 PR c/58943
3944 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3945 effects, preevaluate rhs using SAVE_EXPR first.
3946
9a74f20c
BI
39472014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3948
3949 PR c++/59631
3950 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3951 statements with if-elseif statements.
3952
96066ce1
MP
39532014-01-06 Marek Polacek <polacek@redhat.com>
3954
3955 PR c/57773
3956 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3957 defined bit-field types only in ISO C.
3958
23a5b65a
RS
39592014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3960
3961 Update copyright years
3962
f9030485
RS
39632014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3964
3965 * c-array-notation.c: Use the standard form for the copyright notice.
3966
41958c28
BI
39672013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3968
3969 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3970 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3971 field in parser is not empty. If not-empty, call the function
3972 c_parser_finish_omp_declare_simd.
3973 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3974 between SIMD-enabled functions and #pragma simd. Added new parameter.
3975 (c_parser_cilk_all_clauses): Modified the usage of the function
3976 c_parser_cilk_clause_vectorlength as mentioned above.
3977 (c_parser_cilk_simd_fn_vector_attrs): New function.
3978 (c_finish_cilk_simd_fn_tokens): Likewise.
3979 (is_cilkplus_vector_p): Likewise.
3980 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3981 "nomask," and "mask" strings in clause name.
3982 (c_parser_omp_all_clauses): Added 3 new case statements:
3983 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3984 PRAGMA_CILK_CLAUSE_NOMASK.
3985 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3986 check for vector attribute and if so call the function
3987 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3988 called the function c_finish_cilk_simd_fn_tokens.
3989 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3990 parser field is non-empty. If so, parse them as you would parse
3991 the omp declare simd pragma.
3992 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3993 Added a check when step is a parameter and flag it as error.
3994 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3995 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3996 pragma_omp_clause.
3997
cef0fd0e
TS
39982013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3999
4000 * c-parser.c (c_parser_omp_parallel): Fix description.
4001
12893402
BI
40022013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4003
4004 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4005 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4006 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4007 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4008
296674db
JM
40092013-12-04 Joseph Myers <joseph@codesourcery.com>
4010
4011 PR c/52023
4012 * c-parser.c (c_parser_alignas_specifier): Use
4013 c_sizeof_or_alignof_type instead of c_alignof.
4014 (c_parser_alignof_expression): Likewise, with min_alignof
4015 parameter depending on alignof spelling used.
4016
edd28054
MP
40172013-12-04 Marek Polacek <polacek@redhat.com>
4018
4019 PR c/54113
4020 * c-decl.c (start_function): Don't warn for missing prototype for
4021 inline functions.
4022
da0fc454
MP
40232013-12-03 Marek Polacek <polacek@redhat.com>
4024
4025 PR c/59351
4026 * c-decl.c (build_compound_literal): Allow compound literals with
4027 empty initial value.
4028
4c2ecab0
JM
40292013-12-02 Joseph Myers <joseph@codesourcery.com>
4030
4031 PR c/58235
4032 * c-typeck.c (build_modify_expr): Diagnose assignment to
4033 expression with array type.
4034
340baef7
JM
40352013-11-29 Joseph Myers <joseph@codesourcery.com>
4036
4037 PR c/42262
4038 * c-typeck.c (process_init_element): Do not treat a string as
4039 initializing a whole array when used with a designator for an
4040 individual element.
4041
6763b9f7
JM
40422013-11-29 Joseph Myers <joseph@codesourcery.com>
4043
4044 PR c/57574
4045 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4046 an inline function following a static declaration.
4047
e7bd1de1
JJ
40482013-11-28 Jakub Jelinek <jakub@redhat.com>
4049
4050 PR c/59310
4051 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4052 to p_name before calling c_parser_omp_teams instead of after.
4053 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4054 argument. Remove unused p_name variable.
4055
0136f8f0
AH
40562013-11-27 Aldy Hernandez <aldyh@redhat.com>
4057 Jakub Jelinek <jakub@redhat.com>
4058
4059 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4060 external_scope is NULL.
4061
241b71bb
TV
40622013-11-27 Tom de Vries <tom@codesourcery.com>
4063 Marc Glisse <marc.glisse@inria.fr>
4064
4065 PR c++/59032
4066 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4067
2fb9a547
AM
40682013-11-22 Andrew MacLeod <amacleod@redhat.com>
4069
4070 * c-typeck.c: Add required include files from gimple.h.
4071
8400e75e
DM
40722013-11-22 David Malcolm <dmalcolm@redhat.com>
4073
4074 * c-decl.c (define_label, shadow_tag_warned)
4075 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4076 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4077 (declspecs_add_type): Remove use of in_system_header macro.
4078 * c-parser.c (c_parser_unary_expression): Likewise.
4079 * c-typeck.c (store_init_value, process_init_element)
4080 (c_start_case): Likewise.
4081
4082 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4083 macro.
4084
4085 * c-parser.c (c_parser_set_source_position_from_token): Remove
4086 reference to in_system_header from comment.
4087
386b1f1f
RS
40882013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4089
4090 * c-decl.c (grokdeclarator): Update comment to refer to
4091 tree_to_[su]hwi rather than tree_low_cst.
4092
ae7e9ddd
RS
40932013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4094
4095 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4096 tree_to_uhwi throughout.
4097
9439e9a1
RS
40982013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4099
4100 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4101 throughout.
4102
9541ffee
RS
41032013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4104
4105 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4106 throughout.
4107
c02065fc
AH
41082013-11-15 Aldy Hernandez <aldyh@redhat.com>
4109
4110 * c-parser.c (c_parser_cilk_simd): New.
4111 (c_parser_cilk_verify_simd): New.
4112 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4113 (c_parser_omp_for_loop): Add case for NE_EXPR.
4114 Set c_break_label for CILK_SIMD.
4115 (c_parser_cilk_clause_vectorlength): New.
4116 (c_parser_cilk_clause_linear): New.
4117 (c_parser_cilk_clause_name): New.
4118 (c_parser_cilk_all_clauses): New.
4119 * c-typeck.c (build_unary_op): Pass location argument to
4120 readonly_error.
4121 (build_modify_expr): Same.
4122 (build_asm_expr): Same.
4123 (c_finish_bc_stmt): Error on break/continue in loops.
4124
18f429e2
AM
41252013-11-14 Andrew MacLeod <amacleod@redhat.com>
4126
4127 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4128
d8a2d370
DN
41292013-11-14 Diego Novillo <dnovillo@google.com>
4130
4131 * c-decl.c: Include print-tree.h.
4132 Include stor-layout.h.
4133 Include varasm.h.
4134 Include attribs.h.
4135 Include stringpool.h.
4136 * c-lang.c: Include fold-const.h.
4137 * c-parser.c: Include stringpool.h.
4138 Include attribs.h.
4139 Include stor-layout.h.
4140 Include varasm.h.
4141 Include trans-mem.h.
4142 * c-typeck.c: Include stor-layout.h.
4143 Include trans-mem.h.
4144 Include varasm.h.
4145 Include stmt.h.
4146
38b7bc7f
JM
41472013-11-13 Joseph Myers <joseph@codesourcery.com>
4148
4149 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4150 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4151 __auto_type.
4152 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4153 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4154 RID_AUTO_TYPE.
4155 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4156 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4157 (c_parser_declarator, c_parser_direct_declarator_inner)
4158 (c_parser_parameter_declaration, c_parser_type_name): All callers
4159 changed.
4160 (c_parser_declaration_or_fndef): Handle declarations with type
4161 determined from the initializer.
4162
45b0be94
AM
41632013-11-12 Andrew MacLeod <amacleod@redhat.com>
4164
18f429e2 4165 * c-typeck.c: Include gimplify.h.
45b0be94 4166
582d9b50
JM
41672013-11-12 Joseph Myers <joseph@codesourcery.com>
4168
4169 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4170 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4171 comment.
4172 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4173 or _Thread_local as appropriate in diagnostics.
4174 (build_null_declspecs): Initialize ret->thread_gnu_p.
4175 (declspecs_add_scspec): Handle either __thread or _Thread_local
4176 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4177 pedantic. Do not disallow _Thread_local extern and _Thread_local
4178 static.
4179
267bac10
JM
41802013-11-07 Joseph Myers <joseph@codesourcery.com>
4181 Andrew MacLeod <amacleod@redhat.com>
4182
4183 * c-aux-info.c (gen_type): Handle atomic qualifier.
4184 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4185 qualifiers when compating types.
4186 (shadow_tag_warned): Handle atomic_p in declspecs.
4187 (quals_from_declspecs): Likewise.
4188 (start_decl): Use c_type_promotes_to when promoting argument
4189 types.
4190 (grokdeclarator): Handle _Atomic.
4191 (get_parm_info): Diagnose any qualifier on "void" as only
4192 parameter.
4193 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4194 comparing types. Use c_type_promotes_to when promoting argument
4195 types.
4196 (finish_function): Use c_type_promotes_to when promoting argument
4197 types.
4198 (build_null_declspecs): Handle atomic_p in declspecs.
4199 (declspecs_add_qual): Handle RID_ATOMIC.
4200 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4201 (c_token_starts_declspecs): Handle RID_ATOMIC.
4202 (c_parser_declspecs): Handle atomic type specifiers and
4203 qualifiers.
4204 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4205 from types of expressions with atomic type.
4206 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4207 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4208 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4209 (c_parser_statement_after_labels, c_parser_switch_statement)
4210 (c_parser_for_statement, c_parser_expr_no_commas)
4211 (c_parser_conditional_expression, c_parser_binary_expression)
4212 (c_parser_cast_expression, c_parser_unary_expression)
4213 (c_parser_postfix_expression)
4214 (c_parser_postfix_expression_after_primary, c_parser_expression):
4215 Use convert_lvalue_to_rvalue.
4216 (c_parser_expression_conv, c_parser_expr_list): Document
4217 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4218 (c_parser_objc_synchronized_statement): Use
4219 convert_lvalue_to_rvalue.
4220 (c_parser_objc_selector): Handle RID_ATOMIC.
4221 (c_parser_objc_receiver, c_parser_array_notation): Use
4222 convert_lvalue_to_rvalue.
4223 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4224 _Atomic (type-name).
4225 (struct c_declspecs): Add atomic_p field.
4226 (convert_lvalue_to_rvalue): Declare.
4227 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4228 corresponding atomic types.
4229 (qualify_type): Don't add _Atomic qualifiers from second argument.
4230 (comp_target_types): Do not allow _Atomic mismatches.
4231 (type_lists_compatible_p): Do not remove atomic qualifiers when
4232 comparing types.
4233 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4234 (build_atomic_assign): New functions.
4235 (build_unary_op): Use build_atomic_assign for atomic increment and
4236 decrement.
4237 (build_conditional_expr): Do not treat _Atomic void as a qualified
4238 version of void.
4239 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4240 (find_anonymous_field_with_type, convert_to_anonymous_field)
4241 (convert_for_assignment): Do not remove atomic qualifiers when
4242 comparing types.
4243 (digest_init): Do not accept initialization of arrays of atomic
4244 elements by string constants.
4245 (build_asm_expr): Use convert_lvalue_to_rvalue.
4246 (build_binary_op): Do not treat _Atomic void as a qualified
4247 version of void.
4248
0c249d4b
DD
42492013-11-06 DJ Delorie <dj@redhat.com>
4250
4251 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4252 both explicit and builtin, print the location of the explicit one.
4253
6d7f7e0a
TB
42542013-11-05 Tobias Burnus <burnus@net-b.de>
4255
4256 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4257 c_parser_omp_distribute, c_parser_omp_teams,
4258 c_parser_omp_target, c_parser_omp_declare): Handle
4259 -fopenmp-simd.
4260
b906f4ca
MP
42612013-11-03 Marek Polacek <polacek@redhat.com>
4262
4263 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4264
ee1d5a02
JJ
42652013-11-01 Jakub Jelinek <jakub@redhat.com>
4266
4267 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4268 check_dup_generic at the end, unless remove is true.
4269 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4270 remove = true;.
4271 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4272
5a9785fb
JJ
42732013-10-31 Jakub Jelinek <jakub@redhat.com>
4274
4275 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4276 with decl that is not pointer nor array.
4277
939b37da
BI
42782013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4279
4280 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4281 a spawning function is found.
4282 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4283 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4284 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4285 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4286 case.
4287 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4288 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4289 expr.
4290 (c_finish_return): Added a check to reject _Cilk_spawn in return
4291 expression.
4292 (build_cilk_spawn): New function.
4293 (build_cilk_sync): Likewise.
4294 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4295
d4af74d4
TB
42962013-10-27 Tobias Burnus <burnus@net-b.de>
4297
4298 PR other/33426
4299 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4300 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4301 (c_parser_statement_after_labels): Update calls.
4302
d73749df 43032013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4304
4305 PR other/33426
4306 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4307 Handle PRAGMA_IVDEP.
4308 (c_parser_statement_after_labels): Update call.
4309
f28aa681
MP
43102013-10-24 Marek Polacek <polacek@redhat.com>
4311
4312 * c-parser.c (c_parser_struct_declaration): Add a comment.
4313 (c_parser_declarator): Don't allow _Alignas here.
4314
0645c1a2
AM
43152013-10-17 Andrew MacLeod <amacleod@redhat.com>
4316
4317 * c-parser.c: Include omp-low.h.
4318 * c-typeck.c: Likewise.
4319
568a31f2
MP
43202013-10-17 Marek Polacek <polacek@redhat.com>
4321
4322 PR c/58267
4323 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4324 Document syntax of the array-declarator.
4325 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4326 are not permitted.
4327 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4328 (c_parser_struct_declaration): Likewise.
4329 (c_parser_declarator): Likewise.
4330 (c_parser_direct_declarator_inner): Likewise.
4331 (c_parser_parameter_declaration): Likewise.
4332 (c_parser_type_name): Likewise.
4333
acf0174b
JJ
43342013-10-11 Jakub Jelinek <jakub@redhat.com>
4335
4336 * c-lang.h (current_omp_declare_target_attribute): New extern
4337 decl.
4338 * c-parser.c: Include c-lang.h.
4339 (struct c_parser): Change tokens to c_token *.
4340 Add tokens_buf field. Change tokens_avail type to unsigned int.
4341 (c_parser_consume_token): If parser->tokens isn't
4342 &parser->tokens_buf[0], increment parser->tokens.
4343 (c_parser_consume_pragma): Likewise.
4344 (enum pragma_context): Add pragma_struct and pragma_param.
4345 (c_parser_external_declaration): Adjust
4346 c_parser_declaration_or_fndef caller.
4347 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4348 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4349 Adjust recursive call.
4350 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4351 of pragma_external.
4352 (c_parser_parameter_declaration): Use pragma_param instead of
4353 pragma_external.
4354 (c_parser_compound_statement_nostart, c_parser_label,
4355 c_parser_for_statement): Adjust
4356 c_parser_declaration_or_fndef callers.
4357 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4358 it through to c_parser_conditional_expression.
4359 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4360 pass it through to c_parser_binary_expression. Adjust recursive
4361 call.
4362 (c_parser_binary_expression): Remove prec argument, add
4363 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4364 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4365 binop matches it, use build2 instead of parser_build_binary_op.
4366 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4367 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4368 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4369 Handle pragma_struct and pragma_param the same as pragma_external.
4370 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4371 (c_parser_omp_variable_list): Parse array sections for
4372 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4373 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4374 (c_parser_omp_clause_reduction): Handle user defined reductions.
4375 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4376 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4377 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4378 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4379 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4380 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4381 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4382 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4383 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4384 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4385 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4386 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4387 (c_parser_omp_for_loop): Add CODE argument, pass it through
4388 to c_finish_omp_for. Change last argument to cclauses,
4389 and adjust uses to grab parallel clauses from the array of all
4390 the split clauses. Adjust c_parser_binary_expression,
4391 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4392 (omp_split_clauses): New function.
4393 (c_parser_omp_simd): New function.
4394 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4395 Allow the function to be called also when parsing combined constructs,
4396 and call c_parser_omp_simd when parsing for simd.
4397 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4398 #pragma omp section, require exactly one structured-block instead of
4399 sequence of statements.
4400 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4401 Allow the function to be called also when parsing combined constructs.
4402 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4403 Allow the function to be called also when parsing combined
4404 constructs.
4405 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4406 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4407 c_parser_omp_teams, c_parser_omp_target_data,
4408 c_parser_omp_target_update, c_parser_omp_target,
4409 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4410 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4411 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4412 (c_parser_omp_construct): Add p_name and mask vars. Handle
4413 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4414 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4415 and c_parser_omp_sections callers.
4416 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4417 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4418 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4419 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4420 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4421 OMP_CLAUSE_DEPEND.
4422 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4423 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4424 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4425 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4426 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4427 * c-typeck.c: Include tree-inline.h.
4428 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4429 handle_omp_array_sections_1, handle_omp_array_sections,
4430 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4431 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4432 user defined reductions.
4433 (c_tree_equal): New function.
4434 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4435 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4436 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4437 c_check_omp_declare_reduction_r): New prototypes.
4438 * c-decl.c (current_omp_declare_target_attribute): New variable.
4439 (c_decl_attributes): New function.
4440 (start_decl, start_function): Use it instead of decl_attributes.
4441 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4442 c_omp_reduction_decl, c_omp_reduction_lookup,
4443 c_check_omp_declare_reduction_r): New functions.
4444
0a6c2227
TT
44452013-09-25 Tom Tromey <tromey@redhat.com>
4446
4447 * Make-lang.in (c/gccspec.o): Remove.
4448 (CFLAGS-c/gccspec.o): New variable.
4449 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4450 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4451 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4452
f3bc55f0
TT
44532013-09-25 Tom Tromey <tromey@redhat.com>
4454
4455 * Make-lang.in (c/gccspec.o): Don't use subshell.
4456
a24d975c
MP
44572013-09-18 Marek Polacek <polacek@redhat.com>
4458
4459 PR sanitize/58443
4460 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4461 Remove unnecessary check.
4462
ce6923c5
MP
44632013-09-18 Marek Polacek <polacek@redhat.com>
4464
4465 PR sanitizer/58411
4466 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4467 no_sanitize_undefined attribute.
4468
a1e51df9
KT
44692013-09-13 Kai Tietz <ktietz@redhat.com>
4470
4471 PR target/57848
4472 * c-decl.c (c_builtin_function_ext_scope): Remove
4473 wrong assumption that it is never called on prexisting
4474 symbol.
4475
0af94e6f
JR
44762013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4477
4478 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4479
20059c8b
GDR
44802013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4481
4482 * c-objc-common.c (c_tree_printer): Tidy.
4483
de5a5fa1
MP
44842013-08-30 Marek Polacek <polacek@redhat.com>
4485
4486 * c-typeck.c (build_binary_op): Add division by zero and shift
4487 instrumentation.
4488
2531a1d9 44892013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4490 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4491
6e2bcc98 4492 PR c/35649
2531a1d9
JR
4493 * c-typeck.c (c_common_type): Prefer double_type_node over
4494 other REAL_TYPE types with the same precision.
4495 (convert_arguments): Likewise.
4496
025311c4
GDR
44972013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4498
4499 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4500 (c_initialize_diagnostics): Call a destructor for the early printer.
4501
da6ca2b5
GDR
45022013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4503
4504 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4505 printer initialization.
4506
318cda85 45072013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4508
318cda85
BI
4509 PR c/57490
4510 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4511 check for truth values.
4512 (expand_array_notation_exprs): Added truth values case. Removed an
4513 unwanted else. Added for-loop to walk through subtrees in default
4514 case.
4515
b066401f
GDR
45162013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4517
4518 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4519
fb48aadc
JM
45202013-07-23 Joseph Myers <joseph@codesourcery.com>
4521
4522 * c-parser.c (struct c_generic_association): Fix typo.
4523
433cc7b0
TT
45242013-07-23 Tom Tromey <tromey@redhat.com>
4525 Joseph Myers <joseph@codesourcery.com>
4526
4527 * c-parser.c (struct c_generic_association): New.
4528 (c_generic_association_d): New typedef.
4529 (c_parser_generic_selection): New function.
4530 (c_parser_postfix_expression): Handle RID_GENERIC.
4531
26d40c3d
JM
45322013-07-13 Jason Merrill <jason@redhat.com>
4533
4534 PR c++/57793
4535 * c-decl.c (finish_struct): Check for too-large class.
4536
ecdbd01a 45372013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4538
4539 PR c/57821
4540 * c-typeck.c (set_init_index): When folding, check for index overflow.
4541
1141ed3f
BI
45422013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4543
4544 * c-parser.c (c_parser_array_notation): Removed rejection of array
4545 notations in an array of function pointers.
4546
713b46fa
BI
45472013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4548
4549 * c-array-notation.c (make_triplet_val_inv): New function.
4550 (create_cmp_incr): Likewise.
4551 (create_array_refs): Likewise.
4552 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4553 Also modularized common parts between functions and called the function.
4554 (build_array_notation_expr): Likewise.
4555 (fix_conditional_array_notations_1): Likewise.
4556 (fix_array_notation_expr): Likewise.
4557 (fix_array_notation_call_expr): Likewise.
4558
92f20202
MP
45592013-06-18 Marek Polacek <polacek@redhat.com>
4560
4561 PR c/57630
4562 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4563
73a23b06
BI
45642013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4565
4566 * c-array-notation.c (build_array_notation_expr): Reject array notation
4567 mismatch between LHS and RHS even inside a call_expr. Also, removed
4568 a couple while statements that were dead code.
4569
00b8517d
BI
45702013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4571
4572 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4573 excessive precision expressions in function parameters. Also removed
4574 couple unwanted while statements.
4575
1509bdda
BI
45762013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4577
4578 * c-array-notation.c (expand_array_notation_exprs): Added
4579 ARRAY_NOTATION_REF case.
4580
d60f1706
BI
45812013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4582
4583 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4584 function to c-family/array-notation-common.c.
4585 (is_cilkplus_reduce_builtin): Likewise.
4586 (find_rank): Likewise.
4587 (extract_array_notation_exprs): Likewise.
4588 (replace_array_notations): Likewise.
4589 (find_inv_trees): Likewise.
4590 (replace_inv_trees): Likewise.
4591 (contains_array_notation_expr): Likewise.
4592 (find_correct_array_notation_type): Likewise.
4593 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4594 (struct inv_list): Moved this to c-family/array-notation-common.c.
4595 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4596
6d6efbb3
BI
45972013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4598
4599 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4600 reduction functions outside the for-loop. Added a check if the fundecl
4601 is non-NULL. Finally, removed an unwanted if-statement, and made the
4602 body unconditional.
4603
25c22937
BI
46042013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4605
4606 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4607 condition of the if-statement matches the rank of else-block and then-
4608 block when array notations are used.
4609 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4610 expression after the entire function body is parsed.
4611 (c_parser_expr_no_commas): Delayed creating array notation expressions
4612 to the end of function parsing.
4613 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4614 whole if-statement instead of just the condition.
4615 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4616
edd25645
BI
46172013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4618
4619 PR c/57474
4620 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4621 array to NULL_TREE if they are unused. Also added a check for the
4622 field to be NULL before its fields are used in future.
4623
065ce7f1
RO
46242013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4625
4626 PR bootstrap/57450
4627 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4628 (build_array_notation_expr): Likewise.
4629
36536d79
BI
46302013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4631
4632 * c-typeck.c (build_array_ref): Added a check to see if array's
4633 index is greater than one. If true, then emit an error.
4634 (build_function_call_vec): Exclude error reporting and checking
4635 for builtin array-notation functions.
4636 (convert_arguments): Likewise.
4637 (c_finish_return): Added a check for array notations as a return
4638 expression. If true, then emit an error.
4639 (c_finish_loop): Added a check for array notations in a loop
4640 condition. If true then emit an error.
4641 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4642 (build_binary_op): Added a check for array notation expr inside
4643 op1 and op0. If present, we call another function to find correct
4644 type.
4645 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4646 * c-parser.c (c_parser_compound_statement): Check if array
4647 notation code is used in tree, if so, then transform them into
4648 appropriate C code.
4649 (c_parser_expr_no_commas): Check if array notation is used in LHS
4650 or RHS, if so, then build array notation expression instead of
4651 regular modify.
4652 (c_parser_postfix_expression_after_primary): Added a check for
4653 colon(s) after square braces, if so then handle it like an array
4654 notation. Also, break up array notations in unary op if found.
4655 (c_parser_direct_declarator_inner): Added a check for array
4656 notation.
4657 (c_parser_compound_statement): Added a check for array notation in
4658 a stmt. If one is present, then expand array notation expr.
4659 (c_parser_if_statement): Likewise.
4660 (c_parser_switch_statement): Added a check for array notations in
4661 a switch statement's condition. If true, then output an error.
4662 (c_parser_while_statement): Similarly, but for a while.
4663 (c_parser_do_statement): Similarly, but for a do-while.
4664 (c_parser_for_statement): Similarly, but for a for-loop.
4665 (c_parser_unary_expression): Check if array notation is used in a
4666 pre-increment or pre-decrement expression. If true, then expand
4667 them.
4668 (c_parser_array_notation): New function.
4669 * c-array-notation.c: New file.
4670 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4671
cd192ccc
MS
46722013-05-23 Mike Stump <mikestump@comcast.net>
4673
4674 * c-typeck.c (convert_for_assignment): Handle references to memory
4675 spaces better.
4676
427b248d
JM
46772013-05-16 Jason Merrill <jason@redhat.com>
4678
4679 * Make-lang.in (cc1$(exeext)): Use link mutex.
4680
44d90fe1
PC
46812013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4682
4683 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4684 to simply use OPT_Wpointer_arith.
4685 (build_unary_op): Likewise.
4686
4e7d7b3d
JJ
46872013-04-03 Jakub Jelinek <jakub@redhat.com>
4688
4689 PR c/19449
4690 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4691 argument. If set, or it temporarily for parsing of the first
4692 argument into force_folding_builtin_constant_p.
4693 (c_parser_postfix_expression): Adjust callers.
4694
839b422f
RB
46952013-03-21 Richard Biener <rguenther@suse.de>
4696
4697 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4698 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4699
2ee028f1
MP
47002013-02-12 Marek Polacek <polacek@redhat.com>
4701
4702 PR c/44938
4703 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4704 origtypes to NULL.
4705
8824edff
JJ
47062013-01-24 Jakub Jelinek <jakub@redhat.com>
4707
4708 PR c/56078
4709 * c-typeck.c (set_nonincremental_init_from_string): If
4710 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4711 returned false.
4712 (process_init_element): Likewise.
4713
eadd3d0d
JJ
47142012-12-20 Jakub Jelinek <jakub@redhat.com>
4715
4716 PR c++/55619
4717 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4718 argument, don't call default_function_array_conversion
4719 nor c_fully_fold here.
4720 (c_parser_asm_statement): Adjust callers.
4721 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4722 and outputs here, and call default_function_array_conversion
4723 on inputs that don't need to be addressable.
4724
f8a93a2e
JJ
47252012-12-18 Jakub Jelinek <jakub@redhat.com>
4726
4727 PR c/39464
4728 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4729 warning require that both c_common_unsigned_type as well as
4730 c_common_signed_type is the same for both mvl and mvr types.
4731
9771b263
DN
47322012-11-16 Diego Novillo <dnovillo@google.com>
4733
4734 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4735
4736 * c-common.c: Use new vec API in vec.h.
4737 * c-common.h: Likewise.
4738 * c-gimplify.c: Likewise.
4739 * c-pragma.c: Likewise.
4740 * c-pretty-print.c: Likewise.
4741 * c-pretty-print.h: Likewise.
4742 * c-semantics.c: Likewise.
4743 * c-decl.c: Likewise.
4744 * c-parser.c: Likewise.
4745 * c-tree.h: Likewise.
4746 * c-typeck.c: Likewise.
4747
880661a4
JW
47482012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4749
4750 PR c++/54930
4751 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4752
077d1abe
MLI
47532012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4754
4755 PR c/53066
4756 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4757 shadows a function, unless the variable is a function or a
4758 pointer-to-function.
4759
3a785c97
JJ
47602012-10-12 Jakub Jelinek <jakub@redhat.com>
4761
4762 PR c/54381
4763 * c-parser.c (struct c_tree_loc_pair): Removed.
4764 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4765 add location_t * and tree * arguments, fill in array of 3
4766 sizeof_arg trees and corresponding locs.
4767 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4768 c_parser_expr_list callers.
4769 (c_parser_postfix_expression_after_primary): Likewise. Pass
4770 array of 3 sizeof_arg trees and locs (corresponding to first
4771 3 arguments) to sizeof_pointer_memaccess_warning.
4772
703c8606
LC
47732012-10-09 Lawrence Crowl <crowl@google.com>
4774
4775 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4776 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4777 hash table.
4778
5d9de0d0
PC
47792012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4780
4781 PR c++/54194
4782 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4783 call.
4784
a212e43f
MG
47852012-10-09 Marc Glisse <marc.glisse@inria.fr>
4786
4787 PR c++/54427
4788 * c-typeck.c: Include c-common.h.
4789 (enum stv_conv): Moved to c-common.h.
4790 (scalar_to_vector): Moved to c-common.c.
4791 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4792 * Make-lang.in: c-typeck.c depends on c-common.h.
4793
3b78de56
AC
47942012-10-04 Arnaud Charlet <charlet@adacore.com>
4795
4796 * c-decl.c (c_write_global_declarations): Fix handling of
4797 -fdump-ada-spec*.
4798
78c60e3d
SS
47992012-09-30 Sharad Singhai <singhai@google.com>
4800
4801 * c-decl.c (c_write_global_declarations): Use a different method
4802 to determine if the dump has ben initialized.
4803
9f33203d
JM
48042012-09-14 Joseph Myers <joseph@codesourcery.com>
4805
4806 PR c/54552
4807 * c-typeck.c (c_cast_expr): When casting to a type requiring
4808 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4809 c_fully_fold first.
4810
a27d595d
JM
48112012-09-14 Joseph Myers <joseph@codesourcery.com>
4812
4813 PR c/54103
4814 * c-typeck.c (build_unary_op): Pass original argument of
4815 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4816 any C_MAYBE_CONST_EXPR, if it has integer operands.
4817 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4818 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4819 to c_objc_common_truthvalue_conversion, then remove any
4820 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4821 c_objc_common_truthvalue_conversion not
4822 c_common_truthvalue_conversion.
4823 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4824 call note_integer_operands for arguments with integer operands
4825 that are not integer constants.
4826
9feb29df
JJ
48272012-09-13 Jakub Jelinek <jakub@redhat.com>
4828
4829 PR c/54559
4830 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4831 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4832
d409320c
JJ
48332012-08-31 Jakub Jelinek <jakub@redhat.com>
4834
4835 PR c/54428
4836 * c-convert.c (convert): Don't call fold_convert_loc if
4837 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4838 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4839 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4840
6265d07c
JJ
48412012-08-24 Jakub Jelinek <jakub@redhat.com>
4842
4843 PR c/54355
4844 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4845 for nested and empty_ok arguments in the call to
4846 c_parser_declaration_or_fndef.
4847
1a4049e7
JJ
48482012-08-17 Jakub Jelinek <jakub@redhat.com>
4849
4850 * c-tree.h (c_last_sizeof_arg): Declare.
4851 * c-parser.c (struct c_tree_loc_pair): New type.
4852 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4853 non-NULL.
4854 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4855 (c_parser_postfix_expression_after_primary): Likewise. Call
4856 sizeof_pointer_memaccess_warning if needed.
4857 (sizeof_ptr_memacc_comptypes): New function.
4858 * c-typeck.c (c_last_sizeof_arg): New global variable.
4859 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4860
0229aee9
UB
48612012-07-24 Uros Bizjak <ubizjak@gmail.com>
4862
4863 * c-lang.h (lang_decl): Add variable_size GTY option.
4864
7ee2468b
SB
48652012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4866
4867 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4868 * Make-lang.in: Fix dependencies.
4869
d4a10d0a
SB
48702012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4871
4872 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4873 and add language Makefile hooks.
4874 * config-lang.in: New file.
4875 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4876 add the required "normal" config-lang.in rules.
4877 * c-lang.h: Moved from gcc/ to here.
4878 * c-tree.h: Likewise.
4879 * c-objc-common.c: Likewise.
4880 * c-objc-common.h: Likewise.
4881 * c-typeck.c: Likewise.
4882 * c-convert.c: Likewise.
4883 * c-lang.c: Likewise.
4884 * c-aux-info.c: Likewise.
4885 * c-errors.c: Likewise.
4886 * gccspec.c: Likewise.
4887 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4888 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4889\f
cbe34bb5 4890Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4891
4892Copying and distribution of this file, with or without modification,
4893are permitted in any medium without royalty provided the copyright
4894notice and this notice are preserved.