]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Folding and check_function_arguments
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
9f936c86
JM
12018-10-17 Joseph Myers <joseph@codesourcery.com>
2
3 * c-errors.c (pedwarn_c11): New function.
4 * c-parser.c (disable_extension_diagnostics): Save
5 warn_c11_c2x_compat and set it to 0.
6 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
7 (c_parser_static_assert_declaration_no_semi): Handle
8 _Static_assert without string constant.
9 * c-tree.h (pedwarn_c11): New prototype.
10
033eb567
DM
112018-10-17 David Malcolm <dmalcolm@redhat.com>
12
13 * Make-lang.in (selftest-c): New.
14 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
15 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
16 from gcc/Makefile.in.
17
0edf3afe
RB
182018-10-02 Richard Biener <rguenther@suse.de>
19
20 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
21
8313a764
JM
222018-09-26 Joseph Myers <joseph@codesourcery.com>
23
24 PR c/87390
25 * c-typeck.c (build_binary_op): Use excess precision for
26 comparisons of integers and floating-point for C11 and later.
27
ce6f0888
MJ
282018-09-26 Martin Jambor <mjambor@suse.cz>
29
30 PR c/87347
31 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
32 comment.
33
9c4a4b3c
DM
342018-09-17 David Malcolm <dmalcolm@redhat.com>
35
36 * c-objc-common.c (range_label_for_type_mismatch::get_text):
37 Update for new param.
38 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
39 Likewise.
40
80c6d1f4
MJ
412018-09-17 Martin Jambor <mjambor@suse.cz>
42
43 PR c/63886
44 * c-parser.c: (warn_for_abs): New function.
45 (c_parser_postfix_expression_after_primary): Call it.
46
4a426e36
BE
472018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
48
49 * c-typeck.c (digest_init): Shorten overlength strings.
50
6d900107
BE
512018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
52
53 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
54
b5764229
BE
552018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
56
57 * c-decl.c (finish_decl): Call braced_list_to_string here ...
58 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
59
22eea6b2
AM
602018-08-30 Alexander Monakov <amonakov@ispras.ru>
61
62 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
63 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
64
85204e23
DM
652018-08-27 David Malcolm <dmalcolm@redhat.com>
66
67 PR 87091
68 * c-decl.c (implicitly_declare): Update call to
69 maybe_add_include_fixit to suggest overriding the location, as it
70 is for a note.
71 * c-objc-common.c (c_tree_printer): Update for conversion of
72 show_caret_p to a tri-state.
73
3d78e008
ML
742018-08-27 Martin Liska <mliska@suse.cz>
75
76 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
77 fndecl_built_in_p and remove check for FUNCTION_DECL if
78 possible.
3d78e008
ML
79 (diagnose_mismatched_decls): Likewise.
80 (merge_decls): Likewise.
81 (warn_if_shadowing): Likewise.
82 (pushdecl): Likewise.
83 (implicitly_declare): Likewise.
84 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
85 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
86 * c-typeck.c (build_function_call_vec): Likewise.
87 (convert_arguments): Likewise.
88
097f82ec
DM
892018-08-20 David Malcolm <dmalcolm@redhat.com>
90
91 PR other/84889
92 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
93 (diagnose_mismatched_decls): Likewise, in various places.
94 (warn_if_shadowing): Likewise.
95 (implicit_decl_warning): Likewise.
96 (implicitly_declare): Likewise.
97 (undeclared_variable): Likewise.
98 (declare_label): Likewise.
99 (grokdeclarator): Likewise.
100 (start_function): Likewise.
101 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
102 (c_parser_parameter_declaration): Likewise.
103 (c_parser_binary_expression): Likewise.
104 * c-typeck.c (c_expr_sizeof_expr): Likewise.
105 (parser_build_binary_op): Likewise.
106 (build_unary_op): Likewise.
107 (error_init): Likewise.
108 (pedwarn_init): Likewise.
109 (warning_init): Likewise.
110 (convert_for_assignment): Likewise.
111
96e6ae57
DM
1122018-08-15 David Malcolm <dmalcolm@redhat.com>
113
114 * c-objc-common.c: Include "gcc-rich-location.h".
115 (c_tree_printer): Move implemenation of '%T' to...
116 (print_type): ...this new function.
117 (range_label_for_type_mismatch::get_text): New function.
118 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
119 range for the various ic_argpass cases.
120 (class maybe_range_label_for_tree_type_mismatch): New class.
121 (build_binary_op): Use it when calling binary_op_error.
122
0cd020ae
PK
1232018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
124
125 * c-decl.c (start_decl): Do not warn if variables is named as main
126 and is a local variable.
127
72733314
IS
1282018-08-15 Iain Sandoe <iain@sandoe.co.uk>
129
130 PR c/19315
131 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
132 objects of unknown size.
133
23aa9f7c
MS
1342018-08-13 Martin Sebor <msebor@redhat.com>
135
136 PR tree-optimization/71625
137 * c-parser.c (c_parser_declaration_or_fndef): Call
138 braced_list_to_string.
139
e5e7e50d
BH
1402018-08-03 Bogdan Harjoc <harjoc@gmail.com>
141
142 PR c/86690
143 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
144 errors.
145
8a45b051
MS
1462018-08-01 Martin Sebor <msebor@redhat.com>
147
148 PR tree-optimization/86650
149 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
150 and TREE_BLOCK (t) from within percent_K_format to this callsite.
151
5922dcb5
JJ
1522018-08-01 Jakub Jelinek <jakub@redhat.com>
153
154 PR c/85704
155 * c-typeck.c (init_field_decl_cmp): New function.
156 (output_pending_init_elements): Use it for field comparisons
157 instead of pure bit_position comparisons.
158
9b452033
JJ
1592018-07-12 Jakub Jelinek <jakub@redhat.com>
160
161 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
162 type here, instead add "omp declare target implicit" attribute.
163 (finish_decl): Diagnose vars without mappable type here.
164
829c6349
CLT
1652018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
166 Thomas Schwinge <thomas@codesourcery.com>
167 Cesar Philippidis <cesar@codesourcery.com>
168
169 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
170 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
171 to their non-present_or_* counterparts. Make 'self' an alias to
172 PRAGMA_OACC_CLAUSE_HOST.
173 (c_parser_oacc_data_clause): Update GOMP mappings for
174 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
175 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
176 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
177 Remove support for present_or_* clauses.
178 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
179 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
180 (OACC_DECLARE_CLAUSE_MASK): Likewise.
181 (OACC_DATA_CLAUSE_MASK): Likewise.
182 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
183 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
184 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
185 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
186 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
187
e197e64e
KV
1882018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
189
190 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
191 * gimple-parser.c (c_parser_gimple_statement): Likewise.
192 (c_parser_gimple_unary_expression): Likewise.
193
487f2f61
JJ
1942018-06-15 Jakub Jelinek <jakub@redhat.com>
195
196 PR c/86093
197 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
198 before doing POINTER_DIFF_EXPR.
199
e4d44a37
MP
2002018-06-07 Marek Polacek <polacek@redhat.com>
201
202 PR c/85318
203 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
204 for loop initial declarations.
205
b67b9225
DP
2062018-05-30 David Pagan <dave.pagan@oracle.com>
207
208 PR c/55976
209 * c-decl.c (grokdeclarator): Update check for return type warnings.
210 (start_function): Likewise.
211 (finish_function): Likewise.
212 * c-typeck.c (c_finish_return): Update check for return type warnings.
213 Pass OPT_Wreturn_type to pedwarn when appropriate.
214
c566cc9f
RS
2152018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
216
217 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
218 __FMA_EXPR handlng.
219
e4f81565
RS
2202018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
221
222 * gimple-parser.c: Include internal-fn.h.
223 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
224 (c_parser_gimple_call_internal): New function.
225 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
226 Fix typos in comment.
227
79e7b1fe
JJ
2282018-05-10 Jakub Jelinek <jakub@redhat.com>
229
230 PR c++/85662
231 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
232 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
233 fold_convert_loc.
234 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
235 fold_offsetof_1, pass argtype as TYPE to it and drop the
236 fold_convert_loc.
237
f7584c81
DP
2382018-05-02 David Pagan <dave.pagan@oracle.com>
239
240 PR c/30552
241 * c-decl.c (old_style_parameter_scope): New function.
242 * c-parser.c (c_parser_postfix_expression): Check for statement
243 expressions in old-style function parameter list declarations.
244 * c-parser.h (old_style_parameter_scope): New extern declaration.
245
b33a0cb3
JJ
2462018-04-25 Jakub Jelinek <jakub@redhat.com>
247
248 PR sanitizer/84307
249 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
250 it is not TREE_STATIC.
251 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
252 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
253 its COMPOUND_LITERAL_EXPR_DECL.
254
c5c5822a
JM
2552018-03-21 Joseph Myers <joseph@codesourcery.com>
256
257 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
258 where all functions return the same _FloatN or _FloatNx type,
259 treat integer types as _Float64 instead of double.
260
aa1c9429
JJ
2612018-03-21 Jakub Jelinek <jakub@redhat.com>
262
263 PR c/84999
264 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
265 building vector comparison, diagnose it and return error_mark_node.
266
9bb45a95
JJ
2672018-03-15 Jakub Jelinek <jakub@redhat.com>
268
269 PR c/84853
270 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
271 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
272 INTEGER_TYPE element type.
273
ada6bad9
DP
2742018-03-13 David Pagan <dave.pagan@oracle.com>
275
276 PR c/46921
277 * c-typeck.c (output_init_element): Ensure field initializer
278 expression is always evaluated if there are side effects.
279
849bbdb9
JJ
2802018-03-06 Jakub Jelinek <jakub@redhat.com>
281
282 PR c/84721
283 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
284 !building_stmt_list_p ().
285
d74641bd
RS
2862018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
287
288 PR c/84305
289 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
290 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
291 and include the BIND_EXPR in the list of things that need to be
292 pre-evaluated.
293
0444aa9c
NS
2942018-02-09 Nathan Sidwell <nathan@acm.org>
295
296 PR c/84293
297 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
298 to strict_aliasing_warning.
299
7c30b12a
PC
3002018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
301
302 * c-typeck.c (really_start_incremental_init, push_init_level,
303 set_nonincremental_init, output_init_element, process_init_element):
304 Use DECL_UNNAMED_BIT_FIELD.
305
2be4dfcb
MP
3062018-01-31 Marek Polacek <polacek@redhat.com>
307
308 PR c/81779
309 * c-parser.c (c_parser_compound_statement_nostart): Call
310 expansion_point_location_if_in_system_header.
311
bb9869d5
DM
3122018-01-17 David Malcolm <dmalcolm@redhat.com>
313
314 PR c++/83814
315 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
316 the C part.
317
b4923738
JJ
3182018-01-13 Jakub Jelinek <jakub@redhat.com>
319
320 PR c/83801
321 * c-tree.h (decl_constant_value_1): Add a bool argument.
322 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
323 returning a CONSTRUCTOR if it is true. Use error_operand_p.
324 (decl_constant_value): Adjust caller.
325 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
326 decl_constant_value_1 as IN_INIT. Otherwise, punt if
327 decl_constant_value returns initializer that has BLKmode or
328 array type.
329 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
330
928686b1
RS
3312018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
332 Alan Hayward <alan.hayward@arm.com>
333 David Sherwood <david.sherwood@arm.com>
334
335 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
336 TYPE_VECTOR_SUBPARTS.
337
85ec4feb
JJ
3382018-01-03 Jakub Jelinek <jakub@redhat.com>
339
340 Update copyright years.
341
913884f7
JJ
3422018-01-01 Jakub Jelinek <jakub@redhat.com>
343
344 PR c/83595
345 * c-parser.c (c_parser_braced_init, c_parser_initelt,
346 c_parser_conditional_expression, c_parser_cast_expression,
347 c_parser_sizeof_expression, c_parser_alignof_expression,
348 c_parser_postfix_expression, c_parser_omp_declare_reduction,
349 c_parser_transaction_expression): Use set_error () method instead
350 of setting value member to error_mark_node.
351
c6cfa2bf
MM
3522017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
353
354 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
355 and _Float<N>X built-in functions.
356
11d29d63
JJ
3572017-12-22 Jakub Jelinek <jakub@redhat.com>
358
14ec014e
JJ
359 PR debug/83550
360 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
361 TYPE_STUB_DECL and call rest_of_type_compilation before processing
362 incomplete vars rather than after it.
363
11d29d63
JJ
364 PR debug/83547
365 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
366 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
367 and consider empty ones if there are no other stmts. For
368 -Wunused-value walk all statements before the one only followed by
369 DEBUG_BEGIN_STMTs.
370
170a8bd6 3712017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 372 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
373
374 * c-parser.c (c_parser_while_statement): Add unroll parameter and
375 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
376 (c_parser_do_statement): Likewise.
377 (c_parser_for_statement): Likewise.
378 (c_parser_statement_after_labels): Adjust calls to above.
379 (c_parse_pragma_ivdep): New static function.
380 (c_parser_pragma_unroll): Likewise.
381 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
382 <PRAGMA_UNROLL>: New case.
383
01512446
JJ
3842017-12-19 Jakub Jelinek <jakub@redhat.com>
385
386 * c-typeck.c (comptypes_internal, function_types_compatible_p,
387 perform_integral_promotions, digest_init): Replace Yoda conditions
388 with typical order conditions.
389 * c-decl.c (check_bitfield_type_and_width): Likewise.
390
c65e18d3
BE
3912017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
392
393 * c-typeck.c (c_safe_arg_type_equiv_p,
394 c_safe_function_type_cast_p): New function.
395 (build_c_cast): Implement -Wcast-function-type.
396
b7280579
RB
3972017-12-14 Richard Biener <rguenther@suse.de>
398
399 PR c/83415
400 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
401 like REALPART_EXPR for the behavior of whether its operand
402 is an lvalue.
403
49e6a6c0
MP
4042017-12-12 Marek Polacek <polacek@redhat.com>
405
406 PR c/82679
407 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
408
96a95ac1
AO
4092017-12-12 Alexandre Oliva <aoliva@redhat.com>
410
411 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
412 * c-parser.c (add_debug_begin_stmt): New.
413 (c_parser_declaration_or_fndef): Call it.
414 (c_parser_compound_statement_nostart): Likewise.
415 (c_parser_statement_after_labels): Likewise.
416 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
417
4b2b493f
JM
4182017-12-07 Joseph Myers <joseph@codesourcery.com>
419
420 * c-decl.c (build_compound_literal): Add parameter alignas_align
421 and set alignment of decl if nonzero.
422 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
423 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
424 qualifier.
425 (c_parser_struct_declaration): Update syntax comment.
426 (c_parser_type_name): Add alignas_ok argument and pass it to
427 c_parser_declspecs.
428 (c_parser_cast_expression): Pass true to c_parser_type_name and
429 give error if a cast used an _Alignas specifier.
430 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
431 give error if sizeof (type-name) used an _Alignas specifier.
432 (c_parser_alignof_expression): Pass true to c_parser_type_name and
433 give error if _Alignof (type-name) used an _Alignas specifier.
434 (c_parser_postfix_expression_after_paren_type): Check specified
435 alignment for a compound literal and pass it to
436 build_compound_literal.
437 * c-parser.h (c_parser_type_name): Update prototype.
438 * c-tree.h (build_compound_literal): Update prototype.
439
5d9ae53d
MS
4402017-12-07 Martin Sebor <msebor@redhat.com>
441
442 PR c/81544
443 * c-decl.c (c_decl_attributes): Look up existing declaration and
444 pass it to decl_attributes.
445
c79144f8
DM
4462017-12-06 David Malcolm <dmalcolm@redhat.com>
447
448 PR c/83236
449 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
450 reserved for use by the implementation.
451
613bc14f
DM
4522017-12-06 David Malcolm <dmalcolm@redhat.com>
453
454 * c-decl.c: Include "c-family/c-spellcheck.h".
455
05abad4c
ML
4562017-12-05 Martin Liska <mliska@suse.cz>
457 Jakub Jelinek <jakub@redhat.com>
458
459 * c-typeck.c (pointer_diff): Add new argument and instrument
460 pointer subtraction.
461 (build_binary_op): Similar for pointer comparison.
462
cc6534d4
JJ
4632017-12-01 Jakub Jelinek <jakub@redhat.com>
464
65791f42
JJ
465 PR c/79153
466 * c-parser.c: Include tree-iterator.h.
467 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
468 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
469 on it.
470
cc6534d4
JJ
471 PR c/83222
472 * c-tree.h (decl_constant_value_1): Declare.
473 * c-typeck.c (decl_constant_value_1): New function.
474 (decl_constant_value): Use it.
475 * c-fold.c (c_fully_fold_internal): If in_init, use
476 decl_constant_value_1 instead of decl_constant_value.
477
5de73c05
JJ
4782017-11-30 Jakub Jelinek <jakub@redhat.com>
479
480 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
481
058f0b9e
JJ
4822017-11-28 Jakub Jelinek <jakub@redhat.com>
483
484 PR sanitizer/81275
485 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
486 c_switch_covers_all_cases_p returns true.
487
5e9d6aa4 4882017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 489 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
490
491 * Make-lang.in (c/c-array-notation.o): Remove.
492 * c-array-notation.c: Delete.
493 * c-decl.c: Remove cilkplus condition.
494 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
495 c_parser_cilk_verify_simd, c_parser_array_notation,
496 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
497 c_parser_cilk_simd_fn_vector_attrs,
498 c_finish_cilk_simd_fn_tokens): Delete.
499 (c_parser_declaration_or_fndef): Remove cilkplus condition.
500 (c_parser_direct_declarator_inner): Ditto.
501 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
502 (c_parser_attributes, c_parser_compound_statement,
503 c_parser_statement_after_labels, c_parser_if_statement,
504 c_parser_switch_statement, c_parser_while_statement,
505 c_parser_do_statement, c_parser_for_statement,
506 c_parser_unary_expression, c_parser_postfix_expression,
507 c_parser_postfix_expression_after_primary,
508 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
509 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
510 support.
511 * c-typeck.c (build_array_ref, build_function_call_vec,
512 convert_arguments,
513 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
514 c_finish_loop, build_binary_op): Remove cilkplus support.
515
9e851845
JJ
5162017-11-28 Jakub Jelinek <jakub@redhat.com>
517
518 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
519 of build3.
520
8c7dbea9
BK
5212017-11-14 Boris Kolpackov <boris@codesynthesis.com>
522
523 * Make-lang.in (c.install-plugin): Install backend import library.
524
41521dee
JJ
5252017-11-23 Jakub Jelinek <jakub@redhat.com>
526
527 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
528 pragma_stmt context.
529
ac9effed
EB
5302017-11-23 Mike Stump <mikestump@comcast.net>
531 Eric Botcazou <ebotcazou@adacore.com>
532
533 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
534 ANNOTATE_EXPR.
535 (c_parser_do_statement): Likewise.
536 (c_parser_for_statement): Likewise.
537
ce95abc4
DM
5382017-11-22 David Malcolm <dmalcolm@redhat.com>
539
540 PR c++/62170
541 * c-objc-common.c (c_tree_printer): Convert penultimate param from
542 bool to bool *. Within '%T' handling, if showing an "aka", use
543 "quoted" param to add appropriate quoting.
544
974aedcc
MP
5452017-11-22 Marek Polacek <polacek@redhat.com>
546
547 PR c++/60336
548 PR middle-end/67239
549 PR target/68355
550 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
551
d4300cc6
DM
5522017-11-21 David Malcolm <dmalcolm@redhat.com>
553
554 PR c/83056
555 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
556 earlier failed lookups.
557
1af4ebf5
MG
5582017-11-21 Marc Glisse <marc.glisse@inria.fr>
559
560 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
561 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
562
26edace6
DM
5632017-11-20 David Malcolm <dmalcolm@redhat.com>
564
565 PR c/81404
566 * c-decl.c: Include "c-family/known-headers.h".
567 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
568 to known-headers.cc.
569 (class suggest_missing_header): Move to known-header.h.
570 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
571 than get_c_name_hint.
572
b1212255
DM
5732017-11-20 David Malcolm <dmalcolm@redhat.com>
574
575 * c-decl.c (get_c_name_hint): New function.
576 (class suggest_missing_header): New class.
577 (lookup_name_fuzzy): Call get_c_name_hint and use it to
578 suggest missing headers to the user.
579
6c7a259b
DM
5802017-11-20 David Malcolm <dmalcolm@redhat.com>
581
582 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
583 Include "c-family/name-hint.h"
584 (implicit_decl_warning): Convert "hint" from
585 const char * to name_hint. Pass location to
586 lookup_name_fuzzy. Suppress any deferred diagnostic if the
587 warning was not printed.
588 (undeclared_variable): Likewise for "guessed_id".
589 (lookup_name_fuzzy): Convert return type from const char *
590 to name_hint. Add location_t param.
591 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
592 Include "c-family/name-hint.h"
593 (c_parser_declaration_or_fndef): Convert "hint" from
594 const char * to name_hint. Pass location to lookup_name_fuzzy.
595 (c_parser_parameter_declaration): Likewise.
596
f9c59f7e
JJ
5972017-11-19 Jakub Jelinek <jakub@redhat.com>
598
599 PR c/66618
600 PR c/69960
601 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
602 where needed.
603 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
604 handle_omp_array_sections): Likewise.
605 (digest_init): Don't call decl_constant_value_for_optimization.
606 * c-tree.h (decl_constant_value_for_optimization): Removed.
607 * c-fold.c (c_fold_array_ref): New function.
608 (c_fully_fold_internal): Add LVAL argument, propagate it through
609 recursive calls. For VAR_P call decl_constant_value and
610 unshare if not LVAL and either optimizing or IN_INIT. Remove
611 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
612 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
613 (c_fully_fold): Add LVAL argument, pass it through to
614 c_fully_fold_internal.
615 (decl_constant_value_for_optimization): Removed.
616
3ca0dc60
JM
6172017-11-15 Joseph Myers <joseph@codesourcery.com>
618
619 PR c/81156
620 * c-parser.c (check_tgmath_function): New function.
621 (enum tgmath_parm_kind): New enum.
622 (c_parser_postfix_expression): Handle __builtin_tgmath.
623
64a5912c
DM
6242017-10-31 David Malcolm <dmalcolm@redhat.com>
625
626 * c-decl.c (implicit_decl_warning): Update for renaming of
627 pedwarn_at_rich_loc and warning_at_rich_loc.
628 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
629 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
630 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
631 (c_parser_struct_or_union_specifier): Likewise for renaming of
632 pedwarn_at_rich_loc.
633 (c_parser_parameter_declaration): Likewise for renaming of
634 error_at_rich_loc.
635 * c-typeck.c (build_component_ref): Likewise.
636 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
637 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
638 (set_init_label): Likewise for renaming of error_at_rich_loc.
639
c1136864
RB
6402017-10-30 Richard Biener <rguenther@suse.de>
641
642 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
643 stmts.
644
ee5fd23a
MM
6452017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
646
647 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
648 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
649
1a59ccf2
DM
6502017-10-25 David Malcolm <dmalcolm@redhat.com>
651
652 PR c/7356
653 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
654 semicolons.
655
bc1a75dd
JJ
6562017-10-25 Jakub Jelinek <jakub@redhat.com>
657
658 PR libstdc++/81706
659 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
660 newdecl to corresponding __builtin_ if any.
661
ff1ff960
PC
6622017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
663
664 PR c++/82466
665 * c-decl.c (diagnose_mismatched_decls): Use
666 OPT_Wbuiltin_declaration_mismatch.
667
62e1c678
DM
6682017-10-12 David Malcolm <dmalcolm@redhat.com>
669
670 * c-parser.c (c_parser_require): Add "type_is_unique" param and
671 use it to guard calls to maybe_suggest_missing_token_insertion.
672 (c_parser_parms_list_declarator): Override default value of new
673 "type_is_unique" param to c_parser_require.
674 (c_parser_asm_statement): Likewise.
675 * c-parser.h (c_parser_require): Add "type_is_unique" param,
676 defaulting to true.
677
a92f6726
NS
6782017-10-11 Nathan Sidwell <nathan@acm.org>
679
680 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
681
8e6cdc90
RS
6822017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
683
684 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
685 operating on trees as wide_ints.
686 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
687 (c_tree_equal): Likewise.
688
8139a48e
DM
6892017-10-04 David Malcolm <dmalcolm@redhat.com>
690
691 * c-decl.c (push_parm_decl): Store c_parm's location into the
692 PARAM_DECL.
693 (build_c_parm): Add "loc" param and store it within the c_parm.
694 * c-parser.c (struct c_parser): Add "last_token_location" field.
695 (c_parser_consume_token): Store location of the token into the
696 new field.
697 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
698 when handling a FUNCTION_DECL, if it doesn't already have them.
699 (c_parser_parameter_declaration): Generate a location for the
700 parameter, and pass it to the call to build_c_parm.
701 * c-tree.h (struct c_parm): Add field "loc".
702 (build_c_parm): Add location_t param.
703 * c-typeck.c (get_fndecl_argument_location): New function.
704 (inform_for_arg): New function.
705 (convert_for_assignment): Use inform_for_arg when dealing with
706 ic_argpass.
707
2a389958
JJ
7082017-09-29 Jakub Jelinek <jakub@redhat.com>
709
7d386d45
JJ
710 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
711 width is non-NULL.
712 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
713 don't SET_DECL_C_BIT_FIELD here.
714
2a389958
JJ
715 PR c/82340
716 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
717 instead of trying to set just TREE_READONLY manually.
718
ebc6a85e
TV
7192017-09-16 Tom de Vries <tom@codesourcery.com>
720
721 PR c/81875
722 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
723 cond itself.
724
bb75facd
JM
7252017-09-15 Joseph Myers <joseph@codesourcery.com>
726
727 PR c/82071
728 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
729 for C11.
730 (build_conditional_expr): For C11, generate result with excess
731 precision when one argument is an integer and the other is of a
732 type using excess precision.
733
1d933576
BE
7342017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
735
736 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
737
267bbb6f
MP
7382017-09-13 Marek Polacek <polacek@redhat.com>
739
740 PR c/82167
741 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
742 than expr.original_type.
743
6836632e
NS
7442017-09-12 Nathan Sidwell <nathan@acm.org>
745
746 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
747 resort_sorted_fields): Moved from c-family/c-common.c.
748 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
749
e035be33
JM
7502017-09-01 Joseph Myers <joseph@codesourcery.com>
751
752 PR c/82071
753 * c-typeck.c (build_atomic_assign): Handle argument with excess
754 precision. Ensure any EXCESS_PRECISION_EXPR is present in
755 argument passed to build_binary_op and convert_for_assignment but
756 not for call to c_fully_fold.
757 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
758 Ensure build_binary_op is called with argument with original
759 semantic type. Avoid calling c_fully_fold with an
760 EXCESS_PRECISION_EXPR from build_binary_op.
761
d2e05fcb
JJ
7622017-09-01 Jakub Jelinek <jakub@redhat.com>
763
764 PR c/81887
765 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
766
b397965c
RS
7672017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
768 Alan Hayward <alan.hayward@arm.com>
769 David Sherwood <david.sherwood@arm.com>
770
771 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
772 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
773 m1 and m2 to the signed equivalent of a fixed-point
774 SCALAR_TYPE_MODE.
775
14e18d71
DM
7762017-08-24 David Malcolm <dmalcolm@redhat.com>
777
778 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
779 than CAN_HAVE_LOCATION_P when determining whether to use the
780 location_t value within "value".
781
7f204c0f
DM
7822017-08-21 David Malcolm <dmalcolm@redhat.com>
783
784 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
785 rather than peeking the location of the first token.
786 * c-tree.h (c_expr::get_location): New method.
787
2f687306
DM
7882017-08-21 David Malcolm <dmalcolm@redhat.com>
789
790 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
791 to check_function_arguments.
792
3e7b80d7
MP
7932017-08-18 Marek Polacek <polacek@redhat.com>
794
795 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
796 commentary.
797
00aa1fa2
L
7982017-08-18 H.J. Lu <hongjiu.lu@intel.com>
799
800 PR c/53037
801 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
802 (check_bitfield_type_and_width): Don't allow bit-field with
803 warn_if_not_aligned type.
804
da67acb9
MS
8052017-08-14 Martin Sebor <msebor@redhat.com>
806
807 PR c/81117
808 * c-objc-common.c (c_objc_common_init): Handle 'G'.
809
bb85aa74
MP
8102017-08-11 Marek Polacek <polacek@redhat.com>
811
812 PR c/81795
813 * c-decl.c (pushtag): Only print inform if the warning was printed.
814 (grokdeclarator): Likewise.
815
32129a17
DM
8162017-08-10 David Malcolm <dmalcolm@redhat.com>
817
818 * c-parser.c (c_parser_error): Rename to...
819 (c_parser_error_richloc): ...this, making static, and adding
820 "richloc" parameter, passing it to the c_parse_error call,
821 rather than calling c_parser_set_source_position_from_token.
822 (c_parser_error): Reintroduce, reimplementing in terms of the
823 above, converting return type from void to bool.
824 (class token_pair): New class.
825 (struct matching_paren_traits): New struct.
826 (matching_parens): New typedef.
827 (struct matching_brace_traits): New struct.
828 (matching_braces): New typedef.
829 (get_matching_symbol): New function.
830 (c_parser_require): Add param MATCHING_LOCATION, using it to
831 highlight matching "opening" tokens for missing "closing" tokens.
832 (c_parser_skip_until_found): Likewise.
833 (c_parser_static_assert_declaration_no_semi): Convert explicit
834 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
835 class matching_parens, so that the pertinent open parenthesis is
836 highlighted when there are problems locating the close
837 parenthesis.
838 (c_parser_struct_or_union_specifier): Likewise.
839 (c_parser_typeof_specifier): Likewise.
840 (c_parser_alignas_specifier): Likewise.
841 (c_parser_simple_asm_expr): Likewise.
842 (c_parser_braced_init): Likewise, for matching_braces.
843 (c_parser_paren_condition): Likewise, for matching_parens.
844 (c_parser_switch_statement): Likewise.
845 (c_parser_for_statement): Likewise.
846 (c_parser_asm_statement): Likewise.
847 (c_parser_asm_operands): Likewise.
848 (c_parser_cast_expression): Likewise.
849 (c_parser_sizeof_expression): Likewise.
850 (c_parser_alignof_expression): Likewise.
851 (c_parser_generic_selection): Likewise.
852 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
853 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
854 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
855 In case CPP_OPEN_PAREN, pass loc_open_paren to the
856 c_parser_skip_until_found call.
857 (c_parser_objc_class_definition): Use class matching_parens as
858 above.
859 (c_parser_objc_method_decl): Likewise.
860 (c_parser_objc_try_catch_finally_statement): Likewise.
861 (c_parser_objc_synchronized_statement): Likewise.
862 (c_parser_objc_at_property_declaration): Likewise.
863 (c_parser_oacc_wait_list): Likewise.
864 (c_parser_omp_var_list_parens): Likewise.
865 (c_parser_omp_clause_collapse): Likewise.
866 (c_parser_omp_clause_default): Likewise.
867 (c_parser_omp_clause_if): Likewise.
868 (c_parser_omp_clause_num_threads): Likewise.
869 (c_parser_omp_clause_num_tasks): Likewise.
870 (c_parser_omp_clause_grainsize): Likewise.
871 (c_parser_omp_clause_priority): Likewise.
872 (c_parser_omp_clause_hint): Likewise.
873 (c_parser_omp_clause_defaultmap): Likewise.
874 (c_parser_oacc_single_int_clause): Likewise.
875 (c_parser_omp_clause_ordered): Likewise.
876 (c_parser_omp_clause_reduction): Likewise.
877 (c_parser_omp_clause_schedule): Likewise.
878 (c_parser_omp_clause_num_teams): Likewise.
879 (c_parser_omp_clause_thread_limit): Likewise.
880 (c_parser_omp_clause_aligned): Likewise.
881 (c_parser_omp_clause_linear): Likewise.
882 (c_parser_omp_clause_safelen): Likewise.
883 (c_parser_omp_clause_simdlen): Likewise.
884 (c_parser_omp_clause_depend): Likewise.
885 (c_parser_omp_clause_map): Likewise.
886 (c_parser_omp_clause_device): Likewise.
887 (c_parser_omp_clause_dist_schedule): Likewise.
888 (c_parser_omp_clause_proc_bind): Likewise.
889 (c_parser_omp_clause_uniform): Likewise.
890 (c_parser_omp_for_loop): Likewise.
891 (c_parser_cilk_clause_vectorlength): Likewise.
892 (c_parser_cilk_clause_linear): Likewise.
893 (c_parser_transaction_expression): Likewise.
894 * c-parser.h (c_parser_require): Add param matching_location with
895 default UNKNOWN_LOCATION.
896 (c_parser_error): Convert return type from void to bool.
897 (c_parser_skip_until_found): Add param matching_location with
898 default UNKNOWN_LOCATION.
899
30af3a2b
MP
9002017-08-09 Marek Polacek <polacek@redhat.com>
901
902 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
903 * c-tree.h (build_external_ref): Update declaration.
904 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
905 (build_external_ref): Change the type of a parameter to bool.
906 (parser_build_binary_op): Use true/false instead of 1/0.
907 (pointer_diff): Likewise.
908 (build_modify_expr): Likewise.
909 (set_designator): Change the type of a parameter to bool.
910 (set_init_index): Use true/false instead of 1/0.
911 (set_init_label): Likewise.
912 (output_init_element): Change the type of a parameter to bool.
913 (output_pending_init_elements): Use true/false instead of 1/0.
914 (process_init_element): Likewise.
915 (build_binary_op): Change the type of a parameter to bool.
916
296c53ac
MP
9172017-08-09 Marek Polacek <polacek@redhat.com>
918
919 PR c/81233
920 * c-typeck.c (pedwarn_init): Make the function take a variable list.
921 Call emit_diagnostic_valist instead of pedwarn.
922 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
923 Print the relevant types in diagnostics.
924
a32c8316
MP
9252017-08-09 Marek Polacek <polacek@redhat.com>
926
927 PR c/81417
928 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
929 build_conditional_expr.
930 * c-parser.c (c_parser_conditional_expression): Create locations for
931 EXP1 and EXP2 from their source ranges. Pass the locations down to
932 build_conditional_expr.
933 * c-tree.h (build_conditional_expr): Update declaration.
934 * c-typeck.c (build_conditional_expr): Add location_t parameters.
935 For -Wsign-compare, also print the types.
936
314e6352
ML
9372017-08-08 Martin Liska <mliska@suse.cz>
938
939 * c-convert.c: Include header files.
940 * c-typeck.c: Likewise.
941
577eec56
ML
9422017-08-07 Martin Liska <mliska@suse.cz>
943
944 * c-parser.c (c_parser_attributes): Canonicalize name of an
945 attribute.
946
f7b6353a
MP
9472017-08-02 Marek Polacek <polacek@redhat.com>
948
949 PR c/81289
950 * c-parser.c (c_parser_unary_expression): Use set_error.
951
8a6eab34
MP
952 PR c/81448
953 PR c/81306
954 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
955 warnings. Avoid walking MACRO_MAP_LOCATIONS.
956
7fef86d3
JH
9572017-07-31 Jan Hubicka <hubicka@ucw.cz>
958 Martin Liska <mliska@suse.cz>
959
960 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 961 statement.
7fef86d3 962
f34ebeb2
ML
9632017-07-31 Martin Liska <mliska@suse.cz>
964
965 PR sanitize/81530
966 * c-convert.c (convert): Guard condition with flag_sanitize_p
967 also with current_function_decl non-null equality.
968 * c-decl.c (grokdeclarator): Likewise.
969 * c-typeck.c (build_binary_op): Likewise.
970
8595f67b
MP
9712017-07-25 Marek Polacek <polacek@redhat.com>
972
973 * c-decl.c (grokfield): Remove local variable.
974
d49718d6
MP
9752017-07-25 Marek Polacek <polacek@redhat.com>
976
977 PR c/81364
978 * c-parser.c (c_parser_else_body): Don't warn about multistatement
979 macro expansion if the body is in { }.
980 (c_parser_while_statement): Likewise.
981 (c_parser_for_statement): Likewise.
982
ff22eb12
NS
9832017-07-18 Nathan Sidwell <nathan@acm.org>
984
985 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
986
eea77d1f
DM
9872017-07-14 David Malcolm <dmalcolm@redhat.com>
988
989 * c-decl.c (implicitly_declare): When suggesting a missing
990 #include, provide a fix-it hint.
991
b6f43128
DM
9922017-07-06 David Malcolm <dmalcolm@redhat.com>
993
994 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
995 and call that instead.
996 * c-tree.h (selftest::run_c_tests): New decl.
997
3e2becc4
MP
9982017-06-26 Marek Polacek <polacek@redhat.com>
999
1000 PR c/80116
1001 * c-parser.c (c_parser_if_body): Set the location of the
1002 body of the conditional after parsing all the labels. Call
1003 warn_for_multistatement_macros.
1004 (c_parser_else_body): Likewise.
1005 (c_parser_switch_statement): Likewise.
1006 (c_parser_while_statement): Likewise.
1007 (c_parser_for_statement): Likewise.
1008 (c_parser_statement): Add a default argument. Save the location
1009 after labels have been parsed.
1010 (c_parser_c99_block_statement): Likewise.
1011
343ae898
RB
10122017-06-19 Richard Biener <rguenther@suse.de>
1013
1014 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1015 negated _Literals to parse _Literal (int) -1.
1016
45b2222a
ML
10172017-06-13 Martin Liska <mliska@suse.cz>
1018
1019 PR sanitize/78204
1020 * c-convert.c (convert): Use sanitize_flags_p.
1021 * c-decl.c (grokdeclarator): Likewise.
1022 * c-typeck.c (convert_for_assignment): Likewise.
1023 (c_finish_return): Likewise.
1024 (build_binary_op): Likewise.
1025
8ab7005b
JJ
10262017-06-08 Jakub Jelinek <jakub@redhat.com>
1027
1028 PR c/81006
1029 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1030 to sizetype before size_binop.
1031
363dc72c
JJ
10322017-06-07 Jakub Jelinek <jakub@redhat.com>
1033
1034 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1035 of TDI_generic.
1036
dc949728
MP
10372017-06-06 Marek Polacek <polacek@redhat.com>
1038
1039 PR c/79983
1040 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1041 ref.
1042 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1043
40ffd95f
BE
10442017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1045
1046 * c-parser.c (c_parser_binary_expression): Implement the
1047 -Wsizeof_pointer_div warning.
1048 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1049 from a parenthesized expression.
1050 (c_parser_expr_list): Use c_last_sizeof_loc.
1051 * c-tree.h (c_last_sizeof_loc): New external.
1052 * c-typeck.c (c_last_sizeof_loc): New variable.
1053 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1054
9fc5e7a4
MM
10552017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1056
1057 PR testsuite/80580
1058 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1059
f012c8ef
DM
10602017-05-30 David Malcolm <dmalcolm@redhat.com>
1061
1062 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1063 parameters.
1064
3cd211af
MS
10652017-05-24 Martin Sebor <msebor@redhat.com>
1066
1067 PR c/80731
1068 * c-fold.c (c_fully_fold_internal): Adjust.
1069 * c-typeck.c (parser_build_unary_op): Adjust.
1070
fd71a9a2
TS
10712017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1072
1073 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1074 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1075 "VECTOR_LENGTH".
1076
92fa0f9e
MP
10772017-05-23 Marek Polacek <polacek@redhat.com>
1078
1079 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1080 quotes.
1081
d11c168a
JJ
10822017-05-22 Jakub Jelinek <jakub@redhat.com>
1083
1084 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1085 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1086 it returned invariant. Call tree_invariant_p unconditionally
1087 afterwards to decide whether to return expr or op0.
1088
58aca9d9
NS
10892017-05-22 Nathan Sidwell <nathan@acm.org>
1090
1091 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1092
7fd549d2
TS
10932017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1094
1095 * c-parser.c (c_parser_omp_clause_default): Handle
1096 "OMP_CLAUSE_DEFAULT_PRESENT".
1097
6ecd2339
BE
10982017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1099
1100 * config-lang.in (gtfiles): Add c-family/c-format.c.
1101
8a57ecff
NS
11022017-05-18 Nathan Sidwell <nathan@acm.org>
1103
1104 * c-decl.c (pushdecl_top_level): Delete unused function.
1105
6574d78e
MP
11062017-05-18 Marek Polacek <polacek@redhat.com>
1107
1108 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1109 (check_earlier_gotos): Likewise.
1110 (define_label): Likewise.
1111 (pending_xref_error): Likewise.
1112 (smallest_type_quals_location): Likewise.
1113 (grokdeclarator): Likewise.
1114 (grokparms): Likewise.
1115 (identifier_global_value): Likewise.
1116 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1117 (find_init_member): Likewise.
1118
e3455240
MP
11192017-05-18 Marek Polacek <polacek@redhat.com>
1120
1121 * c-decl.c (start_decl): Use false/true instead of 0/1.
1122 (grokdeclarator): Likewise.
1123 (finish_struct): Likewise.
1124 (start_function): Change the return type to bool. Use false/true
1125 instead of 0/1.
1126 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1127 * c-tree.h (start_function): Update.
1128 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1129 (set_designator): Change the return type to bool. Use false/true
1130 instead of 0/1.
1131
3fa8871b
MP
11322017-05-17 Marek Polacek <polacek@redhat.com>
1133
1134 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1135 * c-typeck.c: Likewise.
1136
142473df
MP
11372017-05-17 Marek Polacek <polacek@redhat.com>
1138
1139 PR sanitizer/80659
1140 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1141 DECL_IGNORED_P even for non-static compound literals.
1142
1a817418
ML
11432017-05-17 Martin Liska <mliska@suse.cz>
1144
1145 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1146 use it instead of int type.
1147
b2fa0a8b
MP
11482017-05-17 Marek Polacek <polacek@redhat.com>
1149
1150 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1151 call c_fully_fold.
1152 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1153 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1154 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1155 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1156 save_expr.
1157 (c_parser_conditional_expression): Likewise.
1158 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1159 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1160 (process_init_element): Likewise.
1161 (build_binary_op): Likewise.
1162 (handle_omp_array_sections_1): Likewise.
1163
1e47f02b
TS
11642017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1165
1166 * c-parser.c (c_parser_omp_clause_num_gangs)
1167 (c_parser_omp_clause_num_workers)
1168 (c_parser_omp_clause_vector_length): Merge functions into...
1169 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1170 all users.
1171
c24e924f
NS
11722017-05-11 Nathan Sidwell <nathan@acm.org>
1173
1174 * gimple-parser.c: Don't #include tree-dump.h.
1175
c587104e
MM
11762017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1177
1178 PR testsuite/80580
1179 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1180
67ac9a9d
MM
11812017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1182
1183 PR testsuite/80580
1184 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1185 incorrect __MEM syntax.
1186
ac4eb40f
MM
11872017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1188
1189 PR testsuite/80580
1190 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1191 type of unary '*'.
1192
641da50a
NS
11932017-05-09 Nathan Sidwell <nathan@acm.org>
1194
1195 * c-tree.h (pushdecl): Declare.
1196
56d35585
DM
11972017-05-05 David Malcolm <dmalcolm@redhat.com>
1198
1199 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1200 with diagnostic_report_diagnostic.
1201 * c-errors.c (pedwarn_c99): Likewise.
1202 (pedwarn_c90): Likewise.
1203
815d9cc6
XR
12042017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1205
92a285c1 1206 PR c++/80038
815d9cc6
XR
1207 * c-gimplify.c (c_gimplify_expr): Remove calls to
1208 cilk_gimplifY_call_params_in_spawned_fn.
1209
1c4ea66f
DM
12102017-04-25 David Malcolm <dmalcolm@redhat.com>
1211
1212 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1213 hint for removing extra semicolon.
1214
666f7903
JJ
12152017-04-21 Jakub Jelinek <jakub@redhat.com>
1216
1217 PR c/80468
1218 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1219 enabled, set specs->type to integer_type_node.
1220
5764ee3c
JW
12212017-04-03 Jonathan Wakely <jwakely@redhat.com>
1222
1223 * c-array-notation.c: Fix typo in comment.
1224
10fa8dfb
MP
12252017-03-29 Marek Polacek <polacek@redhat.com>
1226
1227 PR c/79730
1228 * c-decl.c (finish_decl): Check VAR_P.
1229
a9e4a1a5
JJ
12302017-03-27 Jakub Jelinek <jakub@redhat.com>
1231
1232 PR middle-end/80162
1233 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1234 * c-typeck.c (c_mark_addressable): Likewise. Look through
1235 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1236 to ARRAY_TYPE.
1237 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1238
ee3ff394
MP
12392017-03-23 Marek Polacek <polacek@redhat.com>
1240
1241 * c-tree.h: Remove a C_RID_YYCODE reference.
1242
4d1b8e70
JJ
12432017-03-21 Jakub Jelinek <jakub@redhat.com>
1244
1245 PR c/80097
1246 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1247 optional COMPOUND_EXPR with ubsan instrumentation.
1248
31dc71a8
MP
12492017-03-17 Marek Polacek <polacek@redhat.com>
1250
1251 * c-parser.c: Add C11 references.
1252
d579c385
MP
12532017-03-15 Marek Polacek <polacek@redhat.com>
1254
1255 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1256
85059a38
MP
12572017-03-11 Marek Polacek <polacek@redhat.com>
1258
1259 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1260
2f6f187a
DM
12612017-03-10 David Malcolm <dmalcolm@redhat.com>
1262
1263 PR translation/79848
1264 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1265 "%qs".
1266 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1267
36618428
MP
12682017-03-09 Marek Polacek <polacek@redhat.com>
1269
1270 PR sanitizer/79757
1271 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1272 parameter declarations with initializers.
1273
01e5af5a
JJ
12742017-03-09 Jakub Jelinek <jakub@redhat.com>
1275
1276 PR c/79969
1277 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1278 TYPE_STUB_DECL.
1279
a71dbc63
JJ
12802017-03-07 Jakub Jelinek <jakub@redhat.com>
1281
1282 PR c/79834
1283 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1284 for "may only be used in compound statements" diagnostics, change it
1285 such that the same translatable string is used for all pragmas. For
1286 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1287 diagnostics.
1288 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1289 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1290 "may only be used in compound statements" diagnostics, such that the
1291 same translatable string is used for all pragmas.
1292
1ff4bae6
MP
12932017-03-04 Marek Polacek <polacek@redhat.com>
1294
1295 PR c/79847
1296 * c-decl.c (implicit_decl_warning): Add missing space.
1297
7f5a7d78
MP
12982017-03-03 Marek Polacek <polacek@redhat.com>
1299
1300 PR c/79758
1301 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1302 current_function_prototype_arg_types is error_mark_node. Fix
1303 formatting. Use TREE_VALUE instead of TREE_TYPE.
1304
883c8f06
JJ
13052017-03-03 Jakub Jelinek <jakub@redhat.com>
1306
79c9b7a8
JJ
1307 PR c/79837
1308 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1309 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1310 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1311 diagnostics.
1312
883c8f06
JJ
1313 PR c/79836
1314 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1315 instead of %<_Generic>.
1316 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1317 (c_parser_omp_target_exit_data): Use %<release%> instead of
1318 %<release>.
1319
324ff1a0
JJ
13202017-02-28 Jakub Jelinek <jakub@redhat.com>
1321
1322 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1323 instead of just cond ? "..." : "...".
1324 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1325 for "enter"/"exit" keyword.
1326 (c_finish_oacc_routine): Don't use %s to supply portions of the
1327 message.
1328
4227c9ad
JJ
13292017-02-24 Jakub Jelinek <jakub@redhat.com>
1330
1331 PR c++/79588
1332 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1333 handle -Wrestrict here.
1334 * c-typeck.c (build_function_call_vec): Adjust
1335 check_function_arguments caller.
1336
5d972e66
RB
13372017-02-23 Richard Biener <rguenther@suse.de>
1338
1339 PR c/79684
1340 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1341 to initialize c_exprs to return.
1342 (c_parser_gimple_binary_expression): Likewise.
1343 (c_parser_gimple_unary_expression): Likewise.
1344 (c_parser_gimple_postfix_expression): Likewise.
1345
61ac5ebe
MP
13462017-02-22 Marek Polacek <polacek@redhat.com>
1347
1348 PR c/79662
1349 * c-typeck.c (convert_arguments): Handle error_mark_node.
1350
41d1b0b1
PK
13512017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1352
1353 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1354 value of c_parser_parse_ssa_name against error_mark_node and emit
1355 error if ssa name is anonymous and written as default definition.
1356
eab1f169
PK
13572017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1358
1359 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1360 FMA_EXPR.
1361
bcac0b4d
JJ
13622017-02-16 Jakub Jelinek <jakub@redhat.com>
1363
1364 PR c++/79512
1365 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1366 ignore #pragma omp target even when not followed by identifier.
1367
1be33173
PK
13682017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1369
1370 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1371 (c_parser_gimple_unary_expression): Likewise.
1372
aa326bfb
JJ
13732017-02-13 Jakub Jelinek <jakub@redhat.com>
1374
1375 * c-parser.c (c_parser_oacc_declare): Add missing space in
1376 diagnostics.
1377
8a398bc5
PK
13782017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1379
1380 PR c/79478
1381 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1382 set_c_expr_source_range when parsing ssa-name.
1383
3dcde5ef
PG
13842017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1385 Richard Biener <rguenther@suse.de>
1386
1387 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1388 building IL when arguments are error_mark_node.
1389 (c_parser_gimple_unary_expression): Likewise.
1390 (c_parser_gimple_if_stmt): Likewise.
1391 (c_parser_gimple_switch_stmt): Likewise.
1392 (c_parser_gimple_return_stmt): Likewise.
1393 (c_parser_parse_ssa_name): When name lookup fails do not build
1394 an SSA name. Use undeclared rather than not declared in error
1395 reporting.
1396
192b048b
MP
13972017-02-09 Marek Polacek <polacek@redhat.com>
1398
1399 PR c/79428
1400 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1401 instead of c_parser_skip_until_found.
1402
56f71478
JJ
14032017-02-09 Jakub Jelinek <jakub@redhat.com>
1404
1405 PR c/79431
1406 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1407 symtab_node::get on automatic variables.
1408
02889d23
CLT
14092016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1410 Chung-Lin Tang <cltang@codesourcery.com>
1411
1412 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1413 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1414 semantic checking.
1415 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1416
7af4b20d
RB
14172017-02-07 Richard Biener <rguenther@suse.de>
1418
1419 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1420 (c_parser_gimple_postfix_expression_after_primary):
1421 Do not use c_build_function_call_vec to avoid folding and promotion.
1422 Simplify.
1423
e5e391d6
MO
14242017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1425
1426 PR lto/79061
1427 * c-decl.c (pop_scope): Pass main_input_filename to
1428 build_translation_unit_decl.
1429
c2e84327
DM
14302017-01-24 David Malcolm <dmalcolm@redhat.com>
1431
1432 * c-parser.c: Include "read-rtl-function.h" and
1433 "run-rtl-passes.h".
1434 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1435 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1436 production. Update for renaming of field "gimple_pass" to
1437 "gimple_or_rtl_pass". If __RTL was seen, call
1438 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1439 to an auto_timevar, to cope with early exit.
1440 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1441 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1442 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1443 Handle RID_RTL.
1444 (c_parser_parse_rtl_body): New function.
1445 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1446 (struct c_declspecs): Rename field "gimple_pass" to
1447 "gimple_or_rtl_pass". Add field "rtl_p".
1448 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1449 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1450 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1451 (c_parser_gimple_or_rtl_pass_list): ...this.
1452
2ebd93e1
MP
14532017-01-20 Marek Polacek <polacek@redhat.com>
1454
1455 PR c/64279
1456 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1457
b1c95bb5
RB
14582017-01-13 Richard Biener <rguenther@suse.de>
1459
1460 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1461 nops.
1462
25329913
RB
14632017-01-13 Richard Biener <rguenther@suse.de>
1464
1465 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1466 _Literal ( type-name ) number.
1467
6bb4ea5c
RB
14682017-01-12 Richard Biener <rguenther@suse.de>
1469
1470 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1471 __MEM.
1472
6b5b4e9c
JJ
14732017-01-11 Jakub Jelinek <jakub@redhat.com>
1474
1475 PR c++/72813
1476 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1477 PCH file.
1478
e3252775
RB
14792017-01-11 Richard Biener <rguenther@suse.de>
1480
1481 PR bootstrap/79052
1482 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1483 returns on parse errors.
1484
a9342885
MP
14852017-01-04 Marek Polacek <polacek@redhat.com>
1486
1487 PR c++/64767
1488 * c-parser.c (c_parser_postfix_expression): Mark zero character
1489 constants by setting original_type in c_expr.
1490 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1491 with a zero character constant.
1492 (char_type_p): New function.
1493
5dd9a9d0
DM
14942017-01-04 David Malcolm <dmalcolm@redhat.com>
1495
1496 * c-parser.c (c_parser_declaration_or_fndef): Create a
1497 rich_location at init_loc and parse it to start_init.
1498 (last_init_list_comma): New global.
1499 (c_parser_braced_init): Update last_init_list_comma when parsing
1500 commas. Pass it to pop_init_level. Pass location of closing
1501 brace to pop_init_level.
1502 (c_parser_postfix_expression_after_paren_type): Create a
1503 rich_location at type_loc and parse it to start_init.
1504 (c_parser_omp_declare_reduction): Likewise for loc.
1505 * c-tree.h (start_init): Add rich_location * param.
1506 (pop_init_level): Add location_t param.
1507 * c-typeck.c (struct initializer_stack): Add field
1508 "missing_brace_richloc".
1509 (start_init): Add richloc param, use it to initialize
1510 the stack node's missing_brace_richloc.
1511 (last_init_list_comma): New decl.
1512 (finish_implicit_inits): Pass last_init_list_comma to
1513 pop_init_level.
1514 (push_init_level): When finding missing open braces, add fix-it
1515 hints to the richloc.
1516 (pop_init_level): Add "insert_before" param and pass it
1517 when calling pop_init_level. Add fixits about missing
1518 close braces to any richloc. Use the richloc for the
1519 -Wmissing-braces warning.
1520 (set_designator): Pass last_init_list_comma to pop_init_level.
1521 (process_init_element): Likewise.
1522
cbe34bb5
JJ
15232017-01-01 Jakub Jelinek <jakub@redhat.com>
1524
1525 Update copyright years.
1526
d17680f3
JJ
15272016-12-21 Jakub Jelinek <jakub@redhat.com>
1528
0dba7960
JJ
1529 PR bootstrap/78817
1530 * c-typeck.c (build_function_call_vec): If check_function_arguments
1531 returns true, set TREE_NO_WARNING on CALL_EXPR.
1532
d17680f3
JJ
1533 PR c/77767
1534 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1535 to *expr instead of overwriting it.
1536
aa90531e
RB
15372016-12-20 Richard Biener <rguenther@suse.de>
1538
1539 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1540 error recovery.
1541 (c_parser_gimple_statement): Only build assigns for non-error
1542 stmts.
1543 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1544
629b3d75
MJ
15452016-12-14 Martin Jambor <mjambor@suse.cz>
1546
1547 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1548 omp-low.h.
1549 (c_finish_oacc_routine): Adjusted call to
1550 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1551 to use their new names.
1552 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1553 use its new name.
1554 (c_parser_oacc_update): Likewise.
1555 (c_parser_omp_simd): Likewise.
1556 (c_parser_omp_target_update): Likewise.
1557 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1558 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1559 name.
1560 (c_finish_omp_cancellation_point): Likewise.
1561 * gimple-parser.c: Do not include omp-low.h
1562
c5af52eb
CP
15632016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1564 James Norris <jnorris@codesourcery.com>
1565
1566 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1567 EXIT_DATA,WAIT} are not used in compound statements.
1568 (c_parser_oacc_enter_exit_data): Update diagnostics.
1569
48330c93
BE
15702016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1571
1572 PR c++/71973
1573 * c-decl.c (diagnose_mismatched_decls): Use
1574 OPT_Wbuiltin_declaration_mismatch here too.
1575
899ca90e 15762016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1577 Alan Hayward <alan.hayward@arm.com>
1578 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1579
1580 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1581 (make_label, finish_struct): Likewise.
1582
1ee62b92 15832016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1584 Richard Biener <rguenther@suse.de>
22b15758 1585
8e745a17
JJ
1586 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1587 * config-lang.in (gtfiles): Add c/c-parser.h.
1588 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1589 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1590 * c-parser.c (enum c_id_kind, struct c_token,
1591 c_parser_next_token_is, c_parser_next_token_is_not,
1592 c_parser_next_token_is_keyword,
1593 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1594 Split out to ...
1595 * c-parser.h: ... new header.
1596 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1597 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1598 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1599 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1600 c_parser_error, c_parser_require, c_parser_skip_until_found,
1601 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1602 c_parser_type_name): Export.
1603 (c_parser_tokens_buf): New function.
1604 (c_parser_error): Likewise.
1605 (c_parser_set_error): Likewise.
1606 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1607 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1608 via c_parser_parse_gimple_body.
8e745a17
JJ
1609 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1610 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1611 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1612 c_parser_error, c_parser_require, c_parser_skip_until_found,
1613 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1614 c_parser_type_name): Declare.
1ee62b92
PG
1615 (struct c_parser): Declare forward.
1616 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1617 (c_parser_error): Likewise.
1618 (c_parser_set_error): Likewise.
1619 * gimple-parser.c: New file.
1620 * gimple-parser.h: Likewise.
1ee62b92 1621
22b15758
UB
16222016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1623
1624 PR c/35503
1625 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1626 warn_for_restrict.
1627
84ff4775
LCW
16282016-09-11 Le-Chun Wu <lcwu@google.com>
1629 Mark Wielaard <mjw@redhat.com>
1630
1631 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1632 to the given -Wshadow= variant.
1633
4d0cdd0c
TP
16342016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1635
1636 * c-typeck.c: Include memmodel.h.
1637
1202f33e
JJ
16382016-10-13 Jakub Jelinek <jakub@redhat.com>
1639
1640 PR target/77957
1641 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1642 instead of lhd_return_null_tree_v.
1643
8a14afd0
BS
16442016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1645
1646 PR c++/69733
1647 * c-decl.c (smallest_type_quals_location): New static function.
1648 (grokdeclarator): Try to find the correct location for an ignored
1649 qualifier.
1650
81fea426
MP
16512016-09-26 Marek Polacek <polacek@redhat.com>
1652
1653 PR c/7652
1654 * c-decl.c (pop_scope): Add gcc_fallthrough.
1655
16562016-09-26 Marek Polacek <polacek@redhat.com>
1657
1658 PR c/7652
1659 * c-parser.c (struct c_token): Add flags field.
1660 (c_lex_one_token): Pass it to c_lex_with_flags.
1661 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1662 into IFN_FALLTHROUGH.
1663 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1664 attribute fallthrough after a case label or default label.
1665 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1666
9a2300e9
MP
16672016-09-24 Marek Polacek <polacek@redhat.com>
1668
1669 PR c/77490
1670 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1671 have boolean value. Warn about ++/-- on booleans.
1672
7de76362
JJ
16732016-09-23 Jakub Jelinek <jakub@redhat.com>
1674
1675 * c-parser.c (incomplete_record_decls): Remove unnecessary
1676 = vNULL initialization of file scope vec.
1677
5b73d2ab
MP
16782016-09-16 Marek Polacek <polacek@redhat.com>
1679
1680 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1681
e51fbec3
MP
16822016-09-14 Marek Polacek <polacek@redhat.com>
1683
1684 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1685 (fix_array_notation_expr): Likewise.
1686 * c-decl.c (finish_decl): Likewise.
1687 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1688 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1689 (function_to_pointer_conversion): Use false instead of 0.
1690 (convert_lvalue_to_rvalue): Likewise.
1691 (parser_build_unary_op): Likewise.
1692 (build_atomic_assign): Likewise.
1693 (build_unary_op): Change nonconvert parameter type to bool, use
1694 true/false instead of 1/0.
1695 (build_binary_op): Use true instead of 1.
1696
254830ba
DM
16972016-09-13 David Malcolm <dmalcolm@redhat.com>
1698
1699 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1700 of add_fixit_insert to add_fixit_insert_before.
1701
4c13ba17
MP
17022016-09-13 Marek Polacek <polacek@redhat.com>
1703
1704 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1705 it.
1706
54dcdb88
BE
17072016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1708
1709 PR c++/77496
1710 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1711 COMPOUND_EXPR to warn_for_omitted_condop.
1712
e5106e27
DM
17132016-09-07 David Malcolm <dmalcolm@redhat.com>
1714
1715 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1716 c_get_substring_location for this new langhook.
1717
9dc5773f
JJ
17182016-09-02 Jakub Jelinek <jakub@redhat.com>
1719
1720 PR c/65467
1721 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1722 flag_openmp.
1723 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1724 instead of mark_exp_read on low_bound/length expression.
1725 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1726 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1727 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1728 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1729 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1730 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1731 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1732 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1733 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1734 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1735 instead of mark_expr_read.
1736 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1737 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1738 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1739 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1740 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1741 array section bases outside of depend clause, for depend clause
1742 use convert_lvalue_to_rvalue on the base.
1743 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1744 linear, aligned, map, to and from clauses.
1745 (c_omp_clause_copy_ctor): New function.
1746
295844f6
MP
17472016-09-01 Marek Polacek <polacek@redhat.com>
1748
1749 PR c/7652
1750 * c-typeck.c (composite_type): Add FALLTHRU comment.
1751
089af25c
DM
17522016-08-31 David Malcolm <dmalcolm@redhat.com>
1753
1754 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1755 to the insertion fixits for "struct", "union", and "enum".
1756
f9087798
DM
17572016-08-30 David Malcolm <dmalcolm@redhat.com>
1758
1759 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1760 rather than add_fixit_misspelled_id.
1761 (undeclared_variable): Likewise.
1762 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1763 now-redundant "here" params from add_fixit_insert method calls.
1764 (c_parser_parameter_declaration): Likewise.
1765 * c-typeck.c (build_component_ref): Remove now-redundant range
1766 param from add_fixit_replace method calls.
1767
ebef225f
MP
17682016-08-25 Marek Polacek <polacek@redhat.com>
1769
1770 * c-typeck.c (parser_build_binary_op): Pass LHS to
1771 warn_logical_not_parentheses.
1772
fe377a48
MP
17732016-08-25 Marek Polacek <polacek@redhat.com>
1774
1775 PR c/77323
1776 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1777 or _FloatN or _FloatNx is not supported.
1778 (finish_declspecs): Set type to integer_type_node when _FloatN or
1779 _FloatNx is not supported.
1780
c65699ef
JM
17812016-08-19 Joseph Myers <joseph@codesourcery.com>
1782
1783 PR c/32187
1784 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1785 (struct c_declspecs): Add field floatn_nx_idx.
1786 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1787 and _FloatNx type specifiers.
1788 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1789 (c_parser_declspecs, c_parser_attribute_any_word)
1790 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1791 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1792 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1793 narrower than double.
1794
2f1364c2
JJ
17952016-08-12 Jakub Jelinek <jakub@redhat.com>
1796 Martin Liska <mliska@suse.cz>
1797
1798 PR c/67410
1799 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1800 % to determine val element to change. Assert that
1801 wchar_bytes * charwidth fits into val array.
1802
191816a3
MP
18032016-08-12 Marek Polacek <polacek@redhat.com>
1804
1805 PR c/7652
1806 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1807 (c_parser_postfix_expression): Likewise.
1808 * c-typeck.c (build_unary_op): Adjust fall through comment.
1809 (c_mark_addressable): Likewise.
1810
b95a64bb
JJ
18112016-08-11 Jakub Jelinek <jakub@redhat.com>
1812
1813 PR c/72816
1814 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1815 array member through typedef, for orig_qual_indirect == 0 clear
1816 orig_qual_type.
1817
895aa8e1
DM
18182016-08-08 David Malcolm <dmalcolm@redhat.com>
1819
1820 PR c/64955
1821 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1822 this up to selftest::run_c_tests.
1823 (selftest::run_c_tests): New function.
1824
0b212d8c
TS
18252016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1826
ae9281fc
TS
1827 * c-parser.c (struct oacc_routine_data): Add error_seen and
1828 fndecl_seen members.
1829 (c_finish_oacc_routine): Use these.
1830 (c_parser_declaration_or_fndef): Adjust.
1831 (c_parser_oacc_routine): Likewise. Support more C language
1832 constructs, and improve diagnostics. Move pragma context
1833 checking...
1834 (c_parser_pragma): ... here.
1835
0b212d8c
TS
1836 * c-parser.c (struct oacc_routine_data): New.
1837 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1838 Simplify code.
1839 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1840 declare target" attribute.
1841
76e2c821
JB
18422016-08-01 Jan Beulich <jbeulich@suse.com>
1843
1844 * c-fold.c (c_fully_fold_internal): Also emit shift count
1845 warnings for vector types.
1846 * c-typeck.c (build_binary_op): Likewise.
1847
f618a472
MP
18482016-07-29 Marek Polacek <polacek@redhat.com>
1849
1850 PR c/71742
1851 * c-decl.c (finish_struct): Rephrase an error message.
1852
efd0786f
MP
1853 PR c/71853
1854 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1855 to error node for invalid code.
1856
e00dceaf
MP
1857 PR c/71573
1858 * c-decl.c (implicitly_declare): Return decl early not only for
1859 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1860
673a107a
JJ
18612016-07-29 Jakub Jelinek <jakub@redhat.com>
1862
1863 PR c/71969
1864 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1865 on GNU extern inline functions.
1866
a5b5c8b6
MP
18672016-07-29 Marek Polacek <polacek@redhat.com>
1868
1869 PR c/71583
1870 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1871 check expr.value.
1872
e3fe09c1
UB
18732016-07-22 Uros Bizjak <ubizjak@gmail.com>
1874
1875 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1876
7c8f7eaa
DM
18772016-07-20 David Malcolm <dmalcolm@redhat.com>
1878
1879 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1880 spellcheck-tree.h
1881 (best_macro_match): Likewise, converting from a typedef to a
1882 subclass.
1883 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1884 (lookup_name_fuzzy): Update for change of best_macro_match to a
1885 subclass with a ctor that calls cpp_forall_identifiers.
1886
de6a69ee
DM
18872016-07-20 David Malcolm <dmalcolm@redhat.com>
1888
1889 * c-decl.c (implicit_decl_warning): Update for conversion of
1890 return type of lookup_name_fuzzy to const char *.
1891 (undeclared_variable): Likewise.
1892 (lookup_name_fuzzy): Convert return type from tree to
1893 const char *.
1894 * c-parser.c (c_parser_declaration_or_fndef): Update for
1895 conversion of return type of lookup_name_fuzzy to const char *.
1896 (c_parser_parameter_declaration): Likewise.
1897
b1c9c068
CP
18982016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1899
1900 * c-parser.c (c_parser_oacc_declare): Don't scan for
1901 GOMP_MAP_POINTER.
1902 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1903 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1904 zero-length subarrays.
1905
ddbbcb19
JJ
19062016-07-15 Jakub Jelinek <jakub@redhat.com>
1907
1908 PR c/71858
1909 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1910 instead of FUZZY_LOOKUP_NAME.
1911 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1912 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1913
dd36b877
JJ
19142016-07-14 Jakub Jelinek <jakub@redhat.com>
1915
1916 PR c/71858
1917 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1918
8c681247
TS
19192016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1920
1921 * c-parser.c (c_parser_generic_selection): Make type of variable
1922 auto_vec.
1923 (c_parser_omp_declare_simd): Likewise.
1924
bf4fa671
TS
19252016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1926
1927 * c-decl.c (struct c_struct_parse_info): Change member types
1928 from vec to auto_vec.
1929 (start_struct): Adjust.
1930 (finish_struct): Likewise.
1931
557e8c49
JJ
19322016-07-02 Jakub Jelinek <jakub@redhat.com>
1933
1934 PR c/71719
1935 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1936
54d19c3b
TS
19372016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1938
1939 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1940 Move pragma context checking into...
1941 (c_parser_omp_cancellation_point): ... here, and improve
1942 diagnostic messages.
1943 * c-typeck.c (c_finish_omp_cancel)
1944 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1945
152ef731
JJ
19462016-06-29 Jakub Jelinek <jakub@redhat.com>
1947
1948 PR c/71685
1949 * c-typeck.c (c_build_qualified_type): Don't clear
1950 C_TYPE_INCOMPLETE_VARS for the main variant.
1951
19522016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1953
1954 PR c/71552
1955 * c-typeck.c (output_init_element): Diagnose incompatible types
1956 before non-constant initializers.
1957
e9ac1f86
JJ
19582016-06-28 Jakub Jelinek <jakub@redhat.com>
1959
1960 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1961
277d7ee0
AK
19622016-06-23 Andi Kleen <ak@linux.intel.com>
1963
1964 * Make-lang.in: Add support for autofdo.
1965
1a4f11c8
DM
19662016-06-22 David Malcolm <dmalcolm@redhat.com>
1967
1968 PR c/70339
1969 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1970 (implicit_decl_warning): When issuing warnings for implicit
1971 declarations, attempt to provide a suggestion via
1972 lookup_name_fuzzy.
1973 (undeclared_variable): Likewise when issuing errors.
1974 (lookup_name_in_scope): Likewise.
1975 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1976 (best_macro_match): New typedef.
1977 (find_closest_macro_cpp_cb): New function.
1978 (lookup_name_fuzzy): New function.
1979 * c-parser.c: Include gcc-rich-location.h.
1980 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1981 (c_keyword_starts_typename): ...this new function.
1982 (c_parser_declaration_or_fndef): When issuing errors about
1983 missing "struct" etc, add a fixit. For other kinds of errors,
1984 attempt to provide a suggestion via lookup_name_fuzzy.
1985 (c_parser_parms_declarator): When looking ahead to detect typos in
1986 type names, also reject CPP_KEYWORD.
1987 (c_parser_parameter_declaration): When issuing errors about
1988 unknown type names, attempt to provide a suggestion via
1989 lookup_name_fuzzy.
1990 * c-tree.h (c_keyword_starts_typename): New prototype.
1991
5a578671
JM
19922016-06-20 Joseph Myers <joseph@codesourcery.com>
1993
1994 PR c/71601
1995 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1996 c_common_type returns error_mark_node.
1997
3f8257db 19982016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1999
2000 PR c/69507
2001 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2002 __alignof__ (expression).
2003
6a3f203c
DM
20042016-06-14 David Malcolm <dmalcolm@redhat.com>
2005
2006 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2007
264757fb
DM
20082016-06-14 David Malcolm <dmalcolm@redhat.com>
2009
2010 * c-typeck.c (build_component_ref): Simplify fixit code by
2011 using gcc_rich_location::add_fixit_misspelled_id.
2012 (set_init_label): Likewise.
2013
f7e4f2e3
DM
20142016-06-13 David Malcolm <dmalcolm@redhat.com>
2015
2016 * c-parser.c (c_parser_initelt): Provide location of name for new
2017 location_t param of set_init_label.
2018 * c-tree.h (set_init_label): Add location_t param.
2019 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2020 param and use it when issuing error messages about unrecognized
2021 field names. Attempt to provide a fixit hint if appropriate,
2022 otherwise update the error message to provide the type name.
2023
4b1ffdb1
TS
20242016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2025
2026 PR c/71381
2027 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2028 Loosen checking.
2029
44a845ca
MS
20302016-06-08 Martin Sebor <msebor@redhat.com>
2031 Jakub Jelinek <jakub@redhat.com>
2032
2033 PR c++/70507
2034 PR c/68120
2035 * c-typeck.c (convert_arguments): Don't promote last argument
2036 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2037
92a5f2ba
MP
20382016-06-08 Marek Polacek <polacek@redhat.com>
2039
2040 PR c/71418
2041 * c-decl.c (grokdeclarator): Check TYPE_P.
2042
08203f73
MP
2043 PR c/71426
2044 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2045 code.
2046
6ffd47b7
DM
20472016-06-07 David Malcolm <dmalcolm@redhat.com>
2048
2049 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2050 and structure element reference, capture the location of the
2051 element name token and pass it to build_component_ref.
2052 (c_parser_postfix_expression_after_primary): Likewise for
2053 structure element dereference.
2054 (c_parser_omp_variable_list): Likewise for
2055 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2056 * c-tree.h (build_component_ref): Add location_t param.
2057 * c-typeck.c (build_component_ref): Add location_t param
2058 COMPONENT_LOC. Use it, if available, when issuing hints about
2059 mispelled member names to provide a fixit replacement hint.
2060
1f40cff3
MP
20612016-06-06 Marek Polacek <polacek@redhat.com>
2062
2063 PR c/71362
2064 * c-parser.c (c_parser_direct_declarator): Set location.
2065
5545a907
MP
20662016-06-06 Marek Polacek <polacek@redhat.com>
2067
2068 * c-typeck.c (comptypes_internal): Handle comparisons of
2069 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2070 TYPE_REF_CAN_ALIAS_ALL.
2071
b605f663
CLT
20722016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2073
2074 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2075 arguments as addressable when async clause exists.
2076
00631022
JJ
20772016-05-30 Jakub Jelinek <jakub@redhat.com>
2078
2079 PR c++/71349
2080 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2081 when combined with target construct.
2082
7211a097
JJ
20832016-05-26 Jakub Jelinek <jakub@redhat.com>
2084
2085 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2086 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2087
95efe6b6
MP
20882016-05-25 Marek Polacek <polacek@redhat.com>
2089
2090 PR c/71265
2091 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2092
a23faf7a
MP
2093 PR c/71266
2094 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2095
e46c7770
CP
20962016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2097
2098 * c-parser.c (c_parser_oacc_declare): Add support for
2099 GOMP_MAP_FIRSTPRIVATE_POINTER.
2100 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2101 argument with enum c_omp_region_type ort.
2102 (handle_omp_array_sections): Likewise. Update call to
2103 handle_omp_array_sections_1.
2104 (c_finish_omp_clauses): Add specific errors and warning messages for
2105 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2106 call to handle_omp_array_sections.
2107
a04e69c0
TS
21082016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2109
2110 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2111
f17a223d
RB
21122016-05-24 Richard Biener <rguenther@suse.de>
2113
2114 PR middle-end/70434
2115 PR c/69504
2116 * c-typeck.c (build_array_ref): Do not complain about indexing
2117 non-lvalue vectors. Adjust for function name change.
2118
79063edd
MS
21192016-05-20 Martin Sebor <msebor@redhat.com>
2120
2121 PR c/71115
2122 * c-typeck.c (error_init): Use
2123 expansion_point_location_if_in_system_header.
2124 (warning_init): Same.
2125
8a40fef3
DM
21262016-05-19 David Malcolm <dmalcolm@redhat.com>
2127
2128 PR c/71171
2129 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2130 in error-handling.
2131 (c_parser_postfix_expression): Likewise.
2132 * c-tree.h (c_expr::set_error): New method.
2133 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2134 that result's range is initialized.
2135
e9892350
JG
21362016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2137
2138 * c-typeck.c (parser_build_unary_op): Fix formatting.
2139
8fad45f5
MW
21402016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2141
2142 * c-decl.c (grokdeclarator): Remove errmsg and use of
2143 targetm.invalid_return_type.
2144 (grokparms): Remove errmsg and use of
2145 targetm.invalid_parameter_type.
2146
aa4b467b
JM
21472016-05-13 Joseph Myers <joseph@codesourcery.com>
2148
2149 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2150 function return type.
2151
4f2e1536
MP
21522016-05-12 Marek Polacek <polacek@redhat.com>
2153
2154 PR c/70756
2155 * c-decl.c (build_compound_literal): Pass LOC down to
2156 c_incomplete_type_error.
2157 * c-tree.h (require_complete_type): Adjust declaration.
2158 (c_incomplete_type_error): Likewise.
2159 * c-typeck.c (require_complete_type): Add location parameter, pass it
2160 down to c_incomplete_type_error.
2161 (c_incomplete_type_error): Add location parameter, pass it down to
2162 error_at.
2163 (build_component_ref): Pass location down to c_incomplete_type_error.
2164 (default_conversion): Pass location down to require_complete_type.
2165 (build_array_ref): Likewise.
2166 (build_function_call_vec): Likewise.
2167 (convert_arguments): Likewise.
2168 (build_unary_op): Likewise.
2169 (build_c_cast): Likewise.
2170 (build_modify_expr): Likewise.
2171 (convert_for_assignment): Likewise.
2172 (c_finish_omp_clauses): Likewise.
2173
d6e83a8d
MM
21742016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2175
2176 PR c/43651
2177 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2178 is enabled.
2179 * c-errors.c (pedwarn_c90): Return true if warned.
2180 * c-tree.h (pedwarn_c90): Change return type to bool.
2181 (enum c_declspec_word): Add new enumerator cdw_atomic.
2182
5c3a10fb
MP
21832016-05-11 Marek Polacek <polacek@redhat.com>
2184
2185 PR c++/71024
2186 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2187 diagnose_mismatched_attributes and call it.
2188
cf68d92c
MP
21892016-05-10 Marek Polacek <polacek@redhat.com>
2190
2191 PR c/70255
2192 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2193 on a declaration following the definition.
2194
351f85c5
JJ
21952016-05-05 Jakub Jelinek <jakub@redhat.com>
2196
2197 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2198 parse it through to c_parser_c99_block_statement.
2199 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2200 caller.
2201
deef7113
MP
22022016-05-04 Marek Polacek <polacek@redhat.com>
2203
2204 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2205 OPT_Wdangling_else.
2206
de55efd5
MP
22072016-05-04 Marek Polacek <polacek@redhat.com>
2208
2209 PR c/48778
2210 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2211 for macro expansions.
2212
79ce98bc
MP
22132016-05-03 Marek Polacek <polacek@redhat.com>
2214
2215 PR c/70859
2216 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2217 check_builtin_function_arguments.
2218
fb2647aa
RB
22192016-05-03 Richard Biener <rguenther@suse.de>
2220
2221 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2222 the checksum from the previous stage.
2223
77886428
CP
22242016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2225
2226 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2227 c_finish_omp_clauses.
2228 (c_parser_omp_all_clauses): Likewise.
2229 (c_parser_oacc_cache): Likewise.
2230 (c_parser_oacc_loop): Likewise.
2231 (omp_split_clauses): Likewise.
2232 (c_parser_omp_declare_target): Likewise.
2233 (c_parser_cilk_all_clauses): Likewise.
2234 (c_parser_cilk_for): Likewise.
2235 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2236 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2237
7176a4a0
MP
22382016-05-02 Marek Polacek <polacek@redhat.com>
2239
2240 PR c/70851
2241 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2242 incomplete type.
2243
e7ff0319
CP
22442016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2245
2246 PR middle-end/70626
2247 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2248 OACC_LOOP_CLAUSE_MASK.
2249 (c_parser_oacc_kernels_parallel): Update call to
2250 c_oacc_split_loop_clauses.
2251
9f405ce1
AM
22522016-04-28 Andrew MacLeod <amacleod@redhat.com>
2253
2254 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2255 argument to build_modify_expr in two cases.
2256
c1e1f433
BS
22572016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2258
2259 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2260 warn_for_memset instead of warning directly here.
2261
2448a956
MP
22622016-04-26 Marek Polacek <polacek@redhat.com>
2263
2264 PR c/67784
2265 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2266 out of ...
2267 (c_parser_for_statement): ... here.
2268 (c_parser_if_statement): Use it.
2269 (c_parser_switch_statement): Use it.
2270 (c_parser_while_statement): Use it.
2271
b02a5e26
MP
2272 PR c/70791
2273 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2274
477d4906
IV
22752016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2276
2277 PR c++/69363
2278 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2279 instead of c_finish_cilk_clauses.
2280 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2281 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2282 floating-point variables in the linear clause for Cilk Plus.
2283
fe37c7af
MM
22842016-04-18 Michael Matz <matz@suse.de>
2285
2286 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2287 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2288
949505a9
MP
22892016-04-15 Marek Polacek <polacek@redhat.com>
2290
2291 PR c/70671
2292 * c-typeck.c (build_unary_op): Pass location down to error and
2293 warning call.
2294
dda1bf61
JJ
22952016-04-15 Jakub Jelinek <jakub@redhat.com>
2296
2297 PR c/70436
2298 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2299 where needed.
2300 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2301 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2302 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2303 Adjust c_parser_pragma callers.
2304 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2305 caller.
2306 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2307 c_parser_statement.
2308 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2309 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2310 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2311 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2312 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2313 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2314 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2315 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2316 down where needed.
2317 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2318 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2319 calls.
2320
99cd9857
MP
23212016-04-13 Marek Polacek <polacek@redhat.com>
2322
2323 PR c/70436
2324 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2325 adjust callers.
2326 (c_parser_statement): Likewise.
2327 (c_parser_c99_block_statement): Likewise.
2328 (c_parser_while_statement): Likewise.
2329 (c_parser_for_statement): Likewise.
2330 (c_parser_if_body): Don't set IF_P here.
2331 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2332 about dangling else here.
2333 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2334 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2335 warn about dangling else here.
2336
f13355da
MP
23372016-04-04 Marek Polacek <polacek@redhat.com>
2338
2339 PR c/70307
2340 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2341
5fde6a45
MP
23422016-03-31 Marek Polacek <polacek@redhat.com>
2343
2344 PR c/70297
2345 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2346
4bbf545b
DM
23472016-03-18 David Malcolm <dmalcolm@redhat.com>
2348
2349 PR c/70281
2350 * c-parser.c (c_parser_postfix_expression): Set the source range
2351 for uses of "__builtin_types_compatible_p".
2352
fcc2b74f
JJ
23532016-03-17 Jakub Jelinek <jakub@redhat.com>
2354
2355 PR c/70280
2356 * c-typeck.c (composite_type): Don't count void_list_node
2357 into len, if the list is terminated by void_list_node, start
2358 with void_list_node instead of NULL for newargs. Stop
2359 at void_list_node.
2360
ab4c578f
MP
23612016-03-16 Marek Polacek <polacek@redhat.com>
2362
2363 PR c/70093
2364 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2365 nested functions returning VM types.
2366
96b3c82d
CP
23672016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2368
2369 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2370 when calling c_finish_omp_clauses.
2371
29b9828f
BS
23722016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2373
2374 PR c/69824
2375 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2376 for later.
2377
7ff6ca38
MP
23782016-03-04 Marek Polacek <polacek@redhat.com>
2379
2380 PR c/69798
2381 * c-parser.c (c_parser_postfix_expression): Call
2382 c_parser_cast_expression rather than c_parser_postfix_expression.
2383
686e2237
JJ
23842016-03-01 Jakub Jelinek <jakub@redhat.com>
2385
2386 PR c/69796
2387 PR c/69974
2388 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2389 of incomplete decls to error_mark_node.
2390
0b05329b
MP
23912016-02-24 Marek Polacek <polacek@redhat.com>
2392
2393 PR c/69819
2394 * c-decl.c (finish_decl): Don't update the copy of the type of a
2395 different decl type.
2396
067fbd8b
JJ
23972016-02-23 Jakub Jelinek <jakub@redhat.com>
2398
2399 PR objc/69844
2400 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2401 in id_kind reclassification.
2402
bf14eba2
JJ
24032016-02-16 Jakub Jelinek <jakub@redhat.com>
2404
2405 PR c/69835
2406 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2407
ba539195
JN
24082016-02-16 James Norris <jnorris@codesourcery.com>
2409
2410 PR c/64748
2411 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2412
16595a1f
BS
24132016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2414
f48dfe98
BS
2415 * c-decl.c (build_null_declspecs): Zero the entire struct.
2416
16595a1f
BS
2417 PR c/69522
2418 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2419 callers changed. If nested_p is true, use it to call
2420 finish_implicit_inits.
2421 * c-tree.h (finish_implicit_inits): Declare.
2422 * c-typeck.c (finish_implicit_inits): New function. Move code
2423 from ...
2424 (push_init_level): ... here.
2425 (set_designator, process_init_element): Call finish_implicit_inits.
2426
66756373
JJ
24272016-02-11 Jakub Jelinek <jakub@redhat.com>
2428
2429 PR c/69768
2430 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2431 arguments for -Waddress warning.
2432
1066e9b5
JJ
24332016-02-04 Jakub Jelinek <jakub@redhat.com>
2434
2435 PR c/69669
2436 * c-decl.c (finish_enum): When honoring mode attribute,
2437 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2438
3a5d2ba4
JJ
24392016-01-29 Jakub Jelinek <jakub@redhat.com>
2440
2441 PR debug/69518
2442 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2443 all type variants, not just TYPE_MAIN_VARIANT.
2444
cbdd8ae0
JJ
24452016-01-27 Jakub Jelinek <jakub@redhat.com>
2446
2447 PR debug/66869
2448 * c-decl.c (c_write_global_declarations_1): Warn with
2449 warn_unused_function if static prototype without definition
2450 is not C_DECL_USED.
2451
fa74a4bc
MP
24522016-01-27 Marek Polacek <polacek@redhat.com>
2453
2454 PR c/68062
2455 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2456 to unsigned, if needed. Add -Wsign-compare warning.
2457
13f92e8d
JJ
24582016-01-26 Jakub Jelinek <jakub@redhat.com>
2459
2460 PR tree-optimization/69483
2461 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2462
cd8e73dc 24632016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2464
2465 PR c/24293
2466 * c-tree.h (incomplete_record_decls): Declare.
2467 * c-parser.c (incomplete_record_decls): Define.
2468 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2469 report error if any decl has zero size.
2470 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2471 or enum type to incomplete_record_decls.
2472
e6d6ec9e
TV
24732016-01-14 Tom de Vries <tom@codesourcery.com>
2474
2475 PR tree-optimization/68773
2476 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2477 set force_output.
2478
00083992
MP
24792016-01-14 Marek Polacek <polacek@redhat.com>
2480
2481 PR c/69262
2482 * c-decl.c (grokdeclarator): Provide more information for invalid
2483 array declarations.
2484
7443cf13
DM
24852016-01-06 David Malcolm <dmalcolm@redhat.com>
2486
2487 * c-parser.c (c_parser_unary_expression): For dereferences, build
2488 a combined location before calling build_indirect_ref, so that
2489 error reports cover the full range, manually updating the c_expr
2490 src_range.
2491
6b131d5b
MP
24922016-01-06 Marek Polacek <polacek@redhat.com>
2493
2494 PR sanitizer/69099
2495 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2496 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2497 NULL.
2498
818ab71a
JJ
24992016-01-04 Jakub Jelinek <jakub@redhat.com>
2500
2501 Update copyright years.
2502
2fe0a208
MP
25032016-01-04 Marek Polacek <polacek@redhat.com>
2504
2505 PR c/68908
2506 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2507 optimization to use __atomic_fetch_* built-in if possible.
2508
c7b48c8a
TS
25092015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2510
2511 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2512 into...
2513 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2514 all users.
2515
fda5652f
MP
25162015-12-22 Marek Polacek <polacek@redhat.com>
2517
2518 PR c/69002
2519 * c-typeck.c (build_component_ref): Warn when acessing elements of
2520 atomic structures or unions.
2521
745e411d
DM
25222015-12-21 David Malcolm <dmalcolm@redhat.com>
2523
2524 * c-typeck.c: Include "gcc-rich-location.h".
2525 (build_binary_op): In the two places that call binary_op_error,
2526 create a gcc_rich_location and populate it with the location of
2527 the binary op and its two operands.
2528
94c40e19
DM
25292015-12-16 David Malcolm <dmalcolm@redhat.com>
2530
2531 * c-parser.c (c_parser_statement_after_labels): When calling
2532 c_finish_return, Use the return expression's location if it has
2533 one, falling back to the location of the first token within it.
2534 * c-typeck.c (c_finish_return): When issuing warnings about
2535 the incorrect presence/absence of a return value, issue a note
2536 showing the declaration of the function.
2537
de67c4c3
DM
25382015-12-16 David Malcolm <dmalcolm@redhat.com>
2539
2540 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2541 to 4.
2542 (c_parser_peek_nth_token): New function.
2543 (c_parser_peek_conflict_marker): New function.
2544 (c_parser_error): Detect conflict markers and report them as such.
2545
a10704e1
DM
25462015-12-16 David Malcolm <dmalcolm@redhat.com>
2547
2548 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2549 to preserve range information for the primary expression
2550 in the call to c_parser_postfix_expression_after_primary.
2551
8062bca6
DM
25522015-12-16 David Malcolm <dmalcolm@redhat.com>
2553
2554 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2555 expression location, falling back on the first token location,
2556 rather than always using the latter.
2557
d06f8b75
MP
25582015-12-16 Marek Polacek <polacek@redhat.com>
2559
2560 PR c/64637
2561 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2562 available.
2563
2994fb91
MP
25642015-12-15 Marek Polacek <polacek@redhat.com>
2565
2566 PR c/68907
2567 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2568 artificial decl.
2569
a1b93f8d
DM
25702015-12-08 David Malcolm <dmalcolm@redhat.com>
2571
2572 * c-parser.c (c_parser_alignof_expression): Capture location of
2573 closing parenthesis (if any), or of end of unary expression, and
2574 use it to build a src_range for the expression.
2575
46c6e1e2
DM
25762015-12-08 David Malcolm <dmalcolm@redhat.com>
2577
2578 PR c/68757
2579 * c-parser.c (c_parser_get_builtin_args): Add
2580 "out_close_paren_loc" param, and write back to it.
2581 (c_parser_postfix_expression): Capture the closing
2582 parenthesis location for RID_CHOOSE_EXPR,
2583 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2584 RID_BUILTIN_SHUFFLE and use it to set the source range
2585 for such expressions; within RID_BUILTIN_COMPLEX set
2586 the underlying location.
2587
66189108
MP
25882015-12-07 Marek Polacek <polacek@redhat.com>
2589
2590 PR c/68668
2591 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2592 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2593
f187980b
EB
25942015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2595
2596 * c-tree.h (c_build_va_arg): Adjust prototype.
2597 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2598 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2599 parameter, adjust throughout and issue an error if EXPR is a component
2600 with reverse storage order.
2601
4250754e
JM
26022015-12-02 Jason Merrill <jason@redhat.com>
2603
2604 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2605 (c_fully_fold_internal, decl_constant_value_for_optimization):
2606 Move from c-common.c.
2607 * c-tree.h: Declare decl_constant_value_for_optimization.
2608 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2609
e9e32ee6
JM
26102015-12-02 Joseph Myers <joseph@codesourcery.com>
2611
2612 PR c/68162
2613 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2614 following link from declarator to next declarator. Track original
2615 qualified type and pass it to c_build_qualified_type.
2616 * c-typeck.c (c_build_qualified_type): Add arguments
2617 orig_qual_type and orig_qual_indirect.
2618
ff7a55bf
TS
26192015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2620
2621 * c-parser.c (c_parser_omp_clause_name)
2622 (c_parser_oacc_all_clauses): Alphabetical sorting.
2623
657e4e47
JJ
26242015-12-02 Jakub Jelinek <jakub@redhat.com>
2625
2626 PR c/68533
2627 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2628 for diagnostics.
2629
37d5ad46
JB
26302015-12-01 Julian Brown <julian@codesourcery.com>
2631 Cesar Philippidis <cesar@codesourcery.com>
2632 James Norris <James_Norris@mentor.com>
2633
2634 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2635 (c_parser_oacc_clause_use_device): New function.
2636 (c_parser_oacc_all_clauses): Add use_device support.
2637 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2638 (c_parser_oacc_host_data): New function.
2639 (c_parser_omp_construct): Add host_data support.
2640 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2641 * c-typeck.c (c_finish_oacc_host_data): New function.
2642 (c_finish_omp_clauses): Add use_device support.
2643
a4850ce9
JH
26442015-11-29 Jan Hubicka <hubicka@ucw.cz>
2645
2646 PR c/67106
2647 * c-decl.c: Set TYPE_PACKED in variants.
2648
b58d3df2
ML
26492015-11-27 Martin Liska <mliska@suse.cz>
2650
2651 PR c++/68312
2652 * c-array-notation.c (fix_builtin_array_notation_fn):
2653 Use release_vec_vec instead of vec::release.
2654 (build_array_notation_expr): Likewise.
2655 (fix_conditional_array_notations_1): Likewise.
2656 (fix_array_notation_expr): Likewise.
2657 (fix_array_notation_call_expr): Likewise.
2658
aec17bfe
JJ
26592015-11-27 Jakub Jelinek <jakub@redhat.com>
2660
2661 PR c/63326
2662 * c-parser.c (c_parser_compound_statement_nostart): If
2663 last_label is true, use pragma_stmt instead of pragma_compound
2664 as second c_parser_pragma argument.
2665 (c_parser_omp_ordered, c_parser_omp_target_update,
2666 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2667 false as second argument to c_parser_skip_to_pragma_eol after
2668 diagnosing standalone directives used in pragma_stmt context.
2669
688c4de0
IV
26702015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2671
2672 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2673 with "if (ENABLE_OFFLOADING)".
2674
cbd03aee
DM
26752015-11-23 David Malcolm <dmalcolm@redhat.com>
2676
2677 PR objc/68438
2678 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2679 for various Objective-C constructs: Class.name syntax,
2680 @selector(), @protocol(), @encode(), and [] message syntax.
2681
a87a86e1
DM
26822015-11-20 David Malcolm <dmalcolm@redhat.com>
2683
2684 PR 62314
2685 * c-typeck.c (should_suggest_deref_p): New function.
2686 (build_component_ref): Special-case POINTER_TYPE when
2687 generating a "not a structure of union" error message, and
2688 suggest a "->" rather than a ".", providing a fix-it hint.
2689
8ece8dfb
DM
26902015-11-19 David Malcolm <dmalcolm@redhat.com>
2691
2692 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2693 candidate into a new function, find_closest_identifier.
2694
433068cc
MP
26952015-11-19 Marek Polacek <polacek@redhat.com>
2696
2697 PR c/68412
2698 * c-typeck.c (parser_build_binary_op): Properly handle
2699 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2700
bef08b71
DM
27012015-11-17 David Malcolm <dmalcolm@redhat.com>
2702
2703 * c-parser.c (set_c_expr_source_range): Bulletproof both
2704 overloaded implementations against NULL expr->value.
2705 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2706 values.
2707 (c_parser_unary_expression): Likewise when handling addresses of
2708 labels.
2709 (c_parser_postfix_expression): Likewise for statement expressions,
2710 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2711 __builtin_va_arg, and for __builtin_offset_of.
2712 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2713 src_range using the range of the braced initializer.
2714 (c_parser_transaction_expression): Set src_range for "ret" to a
2715 sane pair of values.
2716
fff77217
KY
27172015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2718
2719 * c-parser.c (c_finish_omp_declare_simd): Look for
2720 "simd" attribute as well. Update error message.
2721
1d899da2
TS
27222015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2723
2724 * c-parser.c (c_parser_omp_declare_target): Adjust.
2725
e4606348
JJ
27262015-11-14 Jakub Jelinek <jakub@redhat.com>
2727
2728 * c-typeck.c (c_finish_omp_clauses): Don't mark
2729 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2730
3e636daf
MP
27312015-11-14 Marek Polacek <polacek@redhat.com>
2732
2733 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2734 * c-typeck.c: Likewise.
2735
ebedc9a3
DM
27362015-11-13 David Malcolm <dmalcolm@redhat.com>
2737
2738 * c-decl.c (warn_defaults_to): Pass line_table to
2739 rich_location ctor.
2740 * c-errors.c (pedwarn_c99): Likewise.
2741 (pedwarn_c90): Likewise.
2742 * c-parser.c (set_c_expr_source_range): New functions.
2743 (c_token::get_range): New method.
2744 (c_token::get_finish): New method.
2745 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2746 based on the range from the start of the LHS to the end of the
2747 RHS.
2748 (c_parser_conditional_expression): Likewise, based on the range
2749 from the start of the cond.value to the end of exp2.value.
2750 (c_parser_binary_expression): Call set_c_expr_source_range on
2751 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2752 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2753 based on the cast_loc through to the end of the expr.
2754 (c_parser_unary_expression): Likewise, based on the
2755 op_loc through to the end of op.
2756 (c_parser_sizeof_expression) Likewise, based on the start of the
2757 sizeof token through to either the closing paren or the end of
2758 expr.
2759 (c_parser_postfix_expression): Likewise, using the token range,
2760 or from the open paren through to the close paren for
2761 parenthesized expressions.
2762 (c_parser_postfix_expression_after_primary): Likewise, for
2763 various kinds of expression.
2764 * c-tree.h (struct c_expr): Add field "src_range".
2765 (c_expr::get_start): New method.
2766 (c_expr::get_finish): New method.
2767 (set_c_expr_source_range): New decls.
2768 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2769 on ret for prefix unary ops.
2770 (parser_build_binary_op): Likewise, running from the start of
2771 arg1.value through to the end of arg2.value.
2772
ec8b536f
MP
27732015-11-13 Marek Polacek <polacek@redhat.com>
2774
2775 PR c/68320
2776 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2777
277fe616
DM
27782015-11-13 David Malcolm <dmalcolm@redhat.com>
2779
2780 * c-typeck.c: Include spellcheck.h.
2781 (lookup_field_fuzzy_find_candidates): New function.
2782 (lookup_field_fuzzy): New function.
2783 (build_component_ref): If the field was not found, try using
2784 lookup_field_fuzzy and potentially offer a suggestion.
2785
6e232ba4
JN
27862015-11-12 James Norris <jnorris@codesourcery.com>
2787 Joseph Myers <joseph@codesourcery.com>
2788
2789 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2790 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2791 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2792 and PRAGMA_OMP_CLAUSE_LINK.
2793 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2794 and PRAGMA_OACC_CLAUSE_LINK.
2795 (OACC_DECLARE_CLAUSE_MASK): New definition.
2796 (c_parser_oacc_declare): New function.
2797
9be4f715
MP
27982015-11-12 Marek Polacek <polacek@redhat.com>
2799
2800 PR c/67784
2801 * c-parser.c (c_parser_for_statement): Reclassify the token in
2802 a correct scope.
2803
e78bede6
MP
28042015-11-11 Marek Polacek <polacek@redhat.com>
2805
2806 PR c/68107
2807 PR c++/68266
2808 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2809 checking the size of an array.
2810
69f293c9
AM
28112015-11-11 Andrew MacLeod <amacleod@redhat.com>
2812
2813 * c-array-notation.c: Remove unused header files.
2814 * c-aux-info.c: Likewise.
2815 * c-convert.c: Likewise.
2816 * c-decl.c: Likewise.
2817 * c-errors.c: Likewise.
2818 * c-lang.c: Likewise.
2819 * c-objc-common.c: Likewise.
2820 * c-parser.c: Likewise.
2821 * c-typeck.c: Likewise.
2822 * gccspec.c: Likewise.
2823
3a40d81d
NS
28242015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2825 Cesar Philippidis <cesar@codesourcery.com>
2826 James Norris <jnorris@codesourcery.com>
2827 Julian Brown <julian@codesourcery.com>
2828 Nathan Sidwell <nathan@codesourcery.com>
2829
2830 c/
2831 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2832 routine arg.
2833 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2834 (c_parser_pragma): Parse 'acc routine'.
2835 (OACC_ROUTINE_CLAUSE_MARK): Define.
2836 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2837
fc402eec
AA
28382015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2839
2840 PR debug/67192
2841 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2842 location of the backward-goto to the start of the loop body.
2843
f6b0b3db
AA
28442015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2845
2846 PR debug/67192
2847 * c-parser.c (c_parser_while_statement): Finish the loop before
2848 parsing ahead for misleading indentation.
2849 (c_parser_for_statement): Likewise.
2850
ee45a32d
EB
28512015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2852
2853 * c-decl.c (finish_struct): If the structure has reverse storage
2854 order, rewrite the type of array fields with scalar component. Call
2855 maybe_apply_pragma_scalar_storage_order on entry.
2856 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2857 errors on bit-fields and reverse SSO here and not...
2858 (c_mark_addressable): ...here.
2859 (output_init_element): Adjust call to initializer_constant_valid_p.
2860 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2861
8a645150
DM
28622015-11-06 David Malcolm <dmalcolm@redhat.com>
2863
2864 * c-decl.c (warn_defaults_to): Update for change in signature
2865 of diagnostic_set_info.
2866 * c-errors.c (pedwarn_c99): Likewise.
2867 (pedwarn_c90): Likewise.
2868 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2869 for textinfo::set_location.
2870
7a5e4956
CP
28712015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2872 Thomas Schwinge <thomas@codesourcery.com>
2873 James Norris <jnorris@codesourcery.com>
2874
2875 * c-parser.c (c_parser_omp_clause_name): Add support for
2876 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2877 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2878 default(none) in OpenACC.
2879 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2880 arguments.
2881 (c_parser_oacc_clause_tile): New function.
2882 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2883 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2884 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2885 TILE}.
2886 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2887 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2888 FIRSTPRIVATE}.
2889 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2890 (c_parser_oacc_update): Update the error message for missing clauses.
2891 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2892 and OMP_CLAUSE_INDEPENDENT.
2893
bfcfbfa0
MP
28942015-11-05 Marek Polacek <polacek@redhat.com>
2895
2896 PR c/68090
2897 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2898 deal with pre-evaluation on invalid types.
2899
e01d41e5
JJ
29002015-11-05 Jakub Jelinek <jakub@redhat.com>
2901 Ilya Verbin <ilya.verbin@intel.com>
2902
2903 * c-parser.c: Include context.h and gimple-expr.h.
2904 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2905 monotonic together with nonmonotonic.
2906 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2907 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2908 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2909 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2910 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2911 expressions on combined target teams before the target.
2912 (c_parser_omp_declare_target): If decl has "omp declare target" or
2913 "omp declare target link" attribute, and cgraph or varpool node already
2914 exists, then set corresponding flags. Call c_finish_omp_clauses
2915 in the parenthesized extended-list syntax case.
2916 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2917 declare target.
2918 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2919 on OMP_CLAUSE_REDUCTION array sections.
2920 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2921 into the constant offset, or for variable low-bound using
2922 POINTER_PLUS_EXPR. For structure element based array sections use
2923 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2924 (c_finish_omp_clauses): Drop generic_field_head, structure
2925 elements are now always mapped even as array section bases,
2926 diagnose same var in data sharing and mapping clauses. Diagnose if
2927 linear step on declare simd is neither a constant nor a uniform
2928 parameter. Look through POINTER_PLUS_EXPR for array section
2929 reductions. Diagnose the same var or function appearing multiple
2930 times on the same directive. Fix up wording for the to clause if t
2931 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2932 modifier on kinds other than dynamic or guided or nonmonotonic
2933 modifier together with ordered clause.
2934
4bf9e5a8
TS
29352015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2936 Chung-Lin Tang <cltang@codesourcery.com>
2937
2938 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2939
2adfab87
AM
29402015-10-29 Andrew MacLeod <amacleod@redhat.com>
2941
2942 * c-array-notation.c: Reorder #include's and remove duplicates.
2943 * c-aux-info.c: Likewise.
2944 * c-convert.c: Likewise.
2945 * c-decl.c: Likewise.
2946 * c-errors.c: Likewise.
2947 * c-lang.c: Likewise.
2948 * c-objc-common.c: Likewise.
2949 * c-parser.c: Likewise.
2950 * c-typeck.c: Likewise.
2951
e922069e
JW
29522015-10-26 Jim Wilson <jim.wilson@linaro.org>
2953
2954 PR debug/66068
2955 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2956 after calling build_qualified_type.
2957
765dd391
CP
29582015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2959 Thomas Schwinge <thomas@codesourcery.com>
2960 James Norris <jnorris@codesourcery.com>
2961 Joseph Myers <joseph@codesourcery.com>
2962 Julian Brown <julian@codesourcery.com>
2963 Bernd Schmidt <bschmidt@redhat.com>
2964
2965 * c-parser.c (c_parser_oacc_shape_clause): New.
2966 (c_parser_oacc_simple_clause): New.
2967 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2968 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2969
88bae6f4
TS
29702015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2971 James Norris <jnorris@codesourcery.com>
2972 Cesar Philippidis <cesar@codesourcery.com>
2973
2974 PR c/64765
2975 PR c/64880
2976 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2977 parameters, and handle these. Adjust all users.
2978 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2979 into...
2980 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2981 all users.
2982 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2983 declare functions.
2984 (c_finish_omp_construct): Declare function.
2985 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2986 Merge functions into...
2987 (c_finish_omp_construct): ... this new function.
2988
a8fc2579
RB
29892015-10-22 Richard Biener <rguenther@suse.de>
2990
2991 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2992 before folding a MINUS_EXPR.
2993
e9122ef6
MP
29942015-10-21 Marek Polacek <polacek@redhat.com>
2995
2996 PR c/68024
2997 * c-decl.c (start_function): Warn about vararg functions without
2998 a prototype.
2999
9f47c7e5
IE
30002015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3001
3002 * c-typeck.c (build_conditional_expr): Use boolean vector
3003 type for vector comparison.
3004 (build_vec_cmp): New.
3005 (build_binary_op): Use build_vec_cmp for comparison.
3006
fa60eeb9
MP
30072015-10-20 Marek Polacek <polacek@redhat.com>
3008
3009 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3010
2c7020eb
MP
30112015-10-20 Marek Polacek <polacek@redhat.com>
3012
3013 PR c/67964
3014 * c-parser.c (c_parser_attributes): Break out of the loop if the
3015 token after an attribute isn't a comma.
3016
d9a6bd32
JJ
30172015-10-13 Jakub Jelinek <jakub@redhat.com>
3018 Aldy Hernandez <aldyh@redhat.com>
3019
3020 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3021 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3022 (c_parser_omp_variable_list): Handle structure elements for
3023 map, to and from clauses. Handle array sections in reduction
3024 clause. Formatting fixes.
3025 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3026 if clause modifiers.
3027 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3028 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3029 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3030 c_parser_omp_clause_is_device_ptr): New functions.
3031 (c_parser_omp_clause_ordered): Parse optional parameter.
3032 (c_parser_omp_clause_reduction): Handle array reductions.
3033 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3034 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3035 functions.
3036 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3037 (c_parser_omp_clause_depend_sink): New function.
3038 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3039 (c_parser_omp_clause_map): Parse release/delete map kinds and
3040 optional always modifier.
3041 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3042 and c_finish_omp_clauses callers.
3043 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3044 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3045 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3046 (OMP_CRITICAL_CLAUSE_MASK): Define.
3047 (c_parser_omp_critical): Parse critical clauses.
3048 (c_parser_omp_for_loop): Handle doacross loops, adjust
3049 c_finish_omp_for and c_finish_omp_clauses callers.
3050 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3051 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3052 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3053 (c_parser_omp_for): Disallow ordered clause when combined with
3054 distribute. Disallow linear clause when combined with distribute
3055 and not combined with simd.
3056 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3057 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3058 parse clauses and if depend clause is found, don't parse a body.
3059 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3060 Allow target parallel without for after it.
3061 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3062 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3063 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3064 invalid kinds.
3065 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3066 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3067 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3068 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3069 functions.
3070 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3071 defaultmap and is_device_ptr clauses.
3072 (c_parser_omp_target): Parse target parallel and target simd. Set
3073 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3074 and target exit data. Diagnose invalid map kinds.
3075 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3076 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3077 construct.
3078 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3079 &omp_priv.
3080 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3081 (c_parser_omp_taskloop): New function.
3082 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3083 handle PRAGMA_OMP_TASKLOOP.
3084 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3085 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3086 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3087 Add IS_OMP argument, handle structure element bases, diagnose
3088 bitfields, pass IS_OMP recursively, diagnose known zero length
3089 array sections in depend clauses, handle array sections in reduction
3090 clause, diagnose negative length even for pointers.
3091 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3092 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3093 array sections in reduction clause, set
3094 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3095 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3096 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3097 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3098
21ba0cea
MP
30992015-10-06 Marek Polacek <polacek@redhat.com>
3100
3101 * c-parser.c (c_parser_statement_after_labels): Use
3102 protected_set_expr_location.
3103 (c_parser_omp_clause_num_gangs): Likewise.
3104 (c_parser_omp_clause_num_threads): Likewise.
3105 (c_parser_omp_clause_num_workers): Likewise.
3106 (c_parser_omp_clause_vector_length): Likewise.
3107 (c_parser_omp_clause_num_teams): Likewise.
3108 (c_parser_omp_clause_thread_limit): Likewise.
3109 * c-typeck.c (build_c_cast): Likewise.
3110 (c_cast_expr): Likewise.
3111
624d31fe
RS
31122015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3113
3114 * c-typeck.c (c_tree_equal): Use real_equal instead of
3115 REAL_VALUES_EQUAL.
3116
b8fd7909
JM
31172015-10-04 Jason Merrill <jason@redhat.com>
3118
3119 * c-parser.c (c_lex_one_token): Handle @synchronized.
3120 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3121 can change whether the function is transaction_safe.
3122
1c7485af
MP
31232015-10-02 Marek Polacek <polacek@redhat.com>
3124
3125 PR c/67730
3126 * c-typeck.c (convert_for_assignment): Use the expansion point
3127 location throughout.
3128
3e3b8d63
MP
31292015-10-02 Marek Polacek <polacek@redhat.com>
3130
3131 PR c/64249
3132 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3133 and pass it down to c_parser_if_statement.
3134 (c_parser_else_body): Add CHAIN parameter and pass it down to
3135 c_parser_statement_after_labels.
3136 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3137 duplicated if-else-if conditions.
3138
aabef2de
MP
31392015-10-01 Marek Polacek <polacek@redhat.com>
3140
3141 * c-typeck.c (convert_for_assignment): Improve commentary.
3142
de8ddd5f
MP
31432015-09-30 Marek Polacek <polacek@redhat.com>
3144
3145 PR c/67730
3146 * c-typeck.c (c_finish_return): Use the expansion point location for
3147 certain "return with value" warnings.
3148
c4914de6
MLI
31492015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3150
3151 * c-parser.c (pragma_lex): Add loc argument.
3152
0e36f5c7
MP
31532015-09-15 Marek Polacek <polacek@redhat.com>
3154
3155 PR c/67580
3156 * c-decl.c (tag_exists_p): New function.
3157 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3158 struct/union/enum keywords are missing.
3159 * c-tree.h (tag_exists_p): Declare.
3160
2f3bb934
MP
31612015-09-15 Marek Polacek <polacek@redhat.com>
3162
3163 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3164 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3165 Return NULL_TREE instead of 0.
3166 (lookup_name): Return NULL_TREE instead of 0.
3167 (lookup_name_in_scope): Likewise.
3168 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3169 (parser_xref_tag): Use false instead of 0.
3170 (start_struct): Use true instead of 1.
3171 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3172
aa256c4a
MP
31732015-09-14 Marek Polacek <polacek@redhat.com>
3174
3175 * c-typeck.c (set_nonincremental_init_from_string): Use
3176 HOST_WIDE_INT_M1U when shifting a negative value.
3177
dbb68221
MW
31782015-09-09 Mark Wielaard <mjw@redhat.com>
3179
3180 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3181 parm against NULL.
3182
a8a098ac
JJ
31832015-09-10 Jakub Jelinek <jakub@redhat.com>
3184
3185 PR c/67502
3186 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3187 into OMP_FOR_PRE_BODY rather than before the loop.
3188
f4b189d5
JJ
31892015-09-09 Jakub Jelinek <jakub@redhat.com>
3190
0bb99c11
JJ
3191 PR c/67501
3192 * c-parser.c (c_parser_oacc_all_clauses,
3193 c_parser_omp_all_clauses): Remove invalid clause from
3194 list of clauses even if parser->error is set.
3195
fce5e5e3
JJ
3196 PR c/67500
3197 * c-parser.c (c_parser_omp_clause_aligned,
3198 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3199 test for errors.
3200 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3201 error_mark_node.
3202
f4b189d5
JJ
3203 PR c/67495
3204 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3205 instead of c_parser_unary_expression. If the result is !lvalue_p,
3206 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3207
b2aaf235
MP
32082015-09-04 Marek Polacek <polacek@redhat.com>
3209
3210 PR sanitizer/67279
3211 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3212
1807ffc1
MS
32132015-09-03 Martin Sebor <msebor@redhat.com>
3214
3215 PR c/66516
8b652e65
JJ
3216 * c-typeck.c (convert_arguments, parser_build_unary_op,
3217 build_conditional_expr, c_cast_expr, convert_for_assignment,
3218 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3219 reject_gcc_builtin.
3220 (c_decl_implicit): Define.
3221
d04ff417
MP
32222015-09-02 Marek Polacek <polacek@redhat.com>
3223
3224 PR c/67432
3225 * c-parser.c (c_parser_enum_specifier): Give a better error for
3226 an empty enum.
3227
a79683d5
TS
32282015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3229
3230 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3231
191a6b94
MP
32322015-08-12 Marek Polacek <polacek@redhat.com>
3233
3234 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3235 LOC to it.
3236
420a9d9b
MP
32372015-08-03 Marek Polacek <polacek@redhat.com>
3238
3239 PR c/67088
3240 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3241 Use it.
3242 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3243
992118a1
PP
32442015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3245
3246 * c-parser.c (c_parser_if_body): Take token_indent_info
3247 argument. Call warn_for_misleading_indentation even when the
3248 body is a semicolon. Extract token_indent_infos corresponding
3249 to the guard, body and next tokens. Adjust call to
3250 warn_for_misleading_indentation accordingly.
3251 (c_parser_else_body): Likewise.
3252 (c_parser_if_statement): Likewise.
3253 (c_parser_while_statement): Likewise.
3254 (c_parser_for_statement): Likewise.
3255
46308474
LFSM
32562015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3257 Manuel López-Ibáñez <manu@gcc.gnu.org>
3258
3259 * c-decl.c (get_parm_info): Remove static var. Update warning
3260 message.
3261
05b28fd6
MP
32622015-07-27 Marek Polacek <polacek@redhat.com>
3263
3264 PR c++/66555
3265 PR c/54979
3266 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3267
451b5e48
MP
32682015-07-20 Marek Polacek <polacek@redhat.com>
3269
3270 PR c++/55095
3271 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3272 (build_binary_op): Warn about left shift overflows.
3273
1916bcb5
AM
32742015-07-09 Andrew MacLeod <amacleod@redhat.com>
3275
3276 * c-array-notation.c: Adjust includes for flags.h changes.
3277 * c-objc-common.c: Likewise.
3278
c7131fb2
AM
32792015-07-07 Andrew MacLeod <amacleod@redhat.com>
3280
3281 * c-array-notation.c: Adjust includes.
3282 * c-aux-info.c: Likewise.
3283 * c-convert.c: Likewise.
3284 * c-decl.c: Likewise.
3285 * c-errors.c: Likewise.
3286 * c-lang.c: Likewise.
3287 * c-objc-common.c: Likewise.
3288 * c-parser.c: Likewise.
3289 * c-typeck.c: Likewise.
3290
da2e71c9
MLI
32912015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3292
3293 PR fortran/66605
3294 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3295
b155cfd9
MP
32962015-06-29 Marek Polacek <polacek@redhat.com>
3297
3298 PR c/66322
3299 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3300 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3301 about -Wswitch-bool here.
3302 (do_case): Update c_add_case_label call.
3303 (c_finish_case): Update c_do_switch_warnings call.
3304
31521951
MP
33052015-06-27 Marek Polacek <polacek@redhat.com>
3306
3307 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3308
22d03525
MP
33092015-06-26 Marek Polacek <polacek@redhat.com>
3310
3311 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3312 INDIRECT_REF_P.
3313 * c-typeck.c (array_to_pointer_conversion): Likewise.
3314 (build_unary_op): Likewise.
3315 (c_finish_return): Likewise.
3316
f0889939
AM
33172015-06-25 Andrew MacLeod <amacleod@redhat.com>
3318
3319 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3320 * c-parser.c: Likewise.
3321
8d67ee55
RS
33222015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3323
3324 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3325 instead of pointer_hash.
3326 (detect_field_duplicates): Likewise.
3327
0ae9bd27
MP
33282015-06-25 Marek Polacek <polacek@redhat.com>
3329
3330 * c-array-notation.c: Use VAR_P throughout.
3331 * c-decl.c: Likewise.
3332 * c-objc-common.c: Likewise.
3333 * c-parser.c: Likewise.
3334 * c-typeck.c: Likewise.
3335
62f9079a
MP
33362015-06-25 Marek Polacek <polacek@redhat.com>
3337
3338 * c-decl.c: Use is_global_var throughout.
3339 * c-parser.c: Likewise.
3340 * c-typeck.c: Likewise.
3341
abb226c9
AM
33422015-06-17 Andrew MacLeod <amacleod@redhat.com>
3343
3344 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3345 * c-aux-info.c: Likewise.
3346 * c-convert.c: Likewise.
3347 * c-decl.c: Likewise.
3348 * c-errors.c: Likewise.
3349 * c-lang.c: Likewise.
3350 * c-objc-common.c: Likewise.
3351 * c-parser.c: Likewise.
3352 * c-typeck.c: Likewise.
3353
8cbababc
JH
33542015-06-11 Jan Hubicka <hubicka@ucw.cz>
3355
3356 PR middle-end/66325
3357 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3358 variants.
3359
a0349665
PMR
33602015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3361
3362 * c-decl.c (pop_scope): Register the main translation unit
3363 through the new debug hook.
3364
13fdf2e2
AM
33652015-06-08 Andrew MacLeod <amacleod@redhat.com>
3366
3367 * c-array-notation.c : Adjust include files.
3368 * c-aux-info.c : Likewise.
3369 * c-convert.c : Likewise.
3370 * c-decl.c : Likewise.
3371 * c-errors.c : Likewise.
3372 * c-lang.c : Likewise.
3373 * c-lang.h : Likewise.
3374 * c-objc-common.c : Likewise.
3375 * c-parser.c : Likewise.
3376 * c-typeck.c : Likewise.
3377
d7438551
AH
33782015-06-05 Aldy Hernandez <aldyh@redhat.com>
3379
3380 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3381 immediately clobber it.
3382 (c_write_global_declarations_1): Remove call to
3383 check_global_declaration_1.
3384 (c_write_global_declarations_2): Remove.
3385 (c_write_final_cleanups): Rename from c_write_global_declarations.
3386 Remove call to finalize_compilation_unit.
3387 Remove calls to debugging hooks.
3388 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3389 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3390 * c-tree.h: Remove c_write_global_declarations.
3391
ecb9f223
AM
33922015-06-04 Andrew MacLeod <amacleod@redhat.com>
3393
3394 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3395 * c-aux-info.c: Likewise.
3396 * c-convert.c: Likewise.
3397 * c-decl.c: Likewise.
3398 * c-errors.c: Likewise.
3399 * c-lang.c: Likewise.
3400 * c-objc-common.c: Likewise.
3401 * c-parser.c: Likewise.
3402 * c-typeck.c: Likewise.
3403
9482b620
MP
34042015-06-04 Marek Polacek <polacek@redhat.com>
3405
3406 PR c/66341
3407 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3408 it is a lvalue.
3409
bc51ace3
PK
34102015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3411
3412 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3413 Warn for empty struct.
3414 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3415
ea5b45b6
AT
34162015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3417
3418 * c-decl.c (start_function): Call plugin before parsing.
3419 (finish_function): Call plugin after parsing.
3420
c2d47482
PK
34212015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3422
3423 PR c/49551
3424 * c-decl.c (merge_decls): Merge DECL_COMMON.
3425
a95492ab
JW
34262015-05-22 Jim Wilson <jim.wilson@linaro.org>
3427
3428 * Make-lang.in (check_gcc_pallelize): Define.
3429
fd5c817a
MP
34302015-05-22 Marek Polacek <polacek@redhat.com>
3431
3432 PR c/47043
3433 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3434 attributes.
3435
c7b70a3c
MP
34362015-05-21 Marek Polacek <polacek@redhat.com>
3437
3438 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3439 DECL_BUILT_IN.
3440
21b634ae
MP
34412015-05-20 Marek Polacek <polacek@redhat.com>
3442
3443 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3444 * c-typeck.c: Likewise.
3445
296a8c2f
MP
34462015-05-19 Marek Polacek <polacek@redhat.com>
3447
3448 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3449
41b37d5e
JJ
34502015-05-19 Jakub Jelinek <jakub@redhat.com>
3451
3452 PR middle-end/66199
3453 * c-parser.c (c_parser_omp_for_loop): Don't add
3454 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3455 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3456 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3457 constructs.
3458
fab27f52
MM
34592015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3460
3461 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3462 swaps.
fab27f52 3463
40de31cf
MLI
34642015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3465
3466 PR fortran/44054
3467 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3468 accessor function.
3469
3aa3c9fc
MP
34702015-05-14 Marek Polacek <polacek@redhat.com>
3471
3472 PR c/66066
3473 PR c/66127
3474 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3475 rather than with 0.
3476
c3388e62
DM
34772015-05-12 David Malcolm <dmalcolm@redhat.com>
3478
3479 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3480 to add a call to warn_for_misleading_indentation.
3481 (c_parser_else_body): Likewise, adding param "else_loc".
3482 (c_parser_if_statement): Check for misleading indentation.
3483 (c_parser_while_statement): Likewise.
3484 (c_parser_for_statement): Likewise.
3485
755e528f
MP
34862015-05-08 Marek Polacek <polacek@redhat.com>
3487
3488 PR c/64918
3489 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3490 (output_init_element): Likewise.
3491
0173bd2a
MP
34922015-05-07 Marek Polacek <polacek@redhat.com>
3493
3494 PR c/65179
3495 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3496 value.
3497
9babc352
MP
34982015-04-30 Marek Polacek <polacek@redhat.com>
3499
3500 * c-typeck.c (set_init_label): Call error_at instead of error and
3501 pass LOC to it.
3502
ac9f18db
MP
3503 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3504 the type of a decl.
3505
ec3fba51
MP
3506 * c-typeck.c (c_build_va_arg): Clarify the error message.
3507
b811915d
TS
35082015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3509
3510 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3511 OMP_STANDALONE_CLAUSES.
3512
f3075008
MP
35132015-04-28 Marek Polacek <polacek@redhat.com>
3514
3515 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3516
4e81b788
MP
35172015-04-28 Marek Polacek <polacek@redhat.com>
3518
3519 PR c/65901
3520 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3521
6c1db78e
MP
35222015-04-25 Marek Polacek <polacek@redhat.com>
3523
3524 PR c/52085
3525 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3526 attribute.
3527
5c4abbb8
MP
35282015-04-23 Marek Polacek <polacek@redhat.com>
3529
3530 PR c/65345
3531 * c-decl.c (set_labels_context_r): New function.
3532 (store_parm_decls): Call it via walk_tree_without_duplicates.
3533 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3534 instead of create_tmp_var. Build TARGET_EXPR instead of
3535 COMPOUND_EXPR.
3536 (build_atomic_assign): Use create_tmp_var_raw instead of
3537 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3538
06aca1d5
IV
35392015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3540
3541 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3542 (c_parser_omp_target_update): Add missed %> to error_at ().
3543
8fba1830
BRF
35442015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3545
3546 PR target/55143
3547 * c-decl.c (c_default_pointer_mode): Remove definition.
3548 * c-tree.h (c_default_pointer_mode): Remove declaration.
3549
62021f64
TB
35502015-03-27 Tobias Burnus <burnus@net-b.de>
3551
3552 PR c/65586
3553 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3554 error out.
3555 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3556 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3557 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3558
9b65e171
JJ
35592015-03-19 Jakub Jelinek <jakub@redhat.com>
3560
3561 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3562 attribute for DECL_EXTERNAL VAR_DECLs.
3563
17958621
JJ
35642015-03-11 Jakub Jelinek <jakub@redhat.com>
3565
3566 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3567 argument.
3568
7ccb1a11
JJ
35692015-03-10 Jakub Jelinek <jakub@redhat.com>
3570
3571 PR c/65120
3572 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3573 before preparing arguments to warn_logical_not_parentheses.
3574
01177669
JJ
35752015-03-09 Jakub Jelinek <jakub@redhat.com>
3576
3577 PR c/65120
3578 * c-typeck.c (parser_build_binary_op): Don't warn for
3579 !!x == y or !b == y where b is _Bool.
3580
802ac282
MP
35812015-03-09 Marek Polacek <polacek@redhat.com>
3582
3583 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3584 * c-decl.c (grokdeclarator): Likewise.
3585 * c-typeck.c (build_binary_op): Likewise.
3586
e5165b60
MP
35872015-02-27 Marek Polacek <polacek@redhat.com>
3588
3589 PR c/65228
3590 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3591
065d214c
MP
35922015-02-14 Marek Polacek <polacek@redhat.com>
3593
3594 PR c/64768
3595 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3596 declared through a typedef name.
3597
e5d9235b
MP
35982015-02-13 Marek Polacek <polacek@redhat.com>
3599
3600 PR c/65050
3601 * c-decl.c (grokdeclarator): Print also the type when giving
3602 the error message about array's incomplete element type.
3603
fa01ffcc
JJ
36042015-02-11 Jakub Jelinek <jakub@redhat.com>
3605
3606 PR c/64824
3607 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3608 check in the POP macro.
3609
c3e38a03
MP
36102015-02-09 Marek Polacek <polacek@redhat.com>
3611
3612 PR c/64856
3613 * c-typeck.c (process_init_element): Don't always wrap
3614 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3615 initializing a range of elements.
3616
4886ec8e
JJ
36172015-02-04 Jakub Jelinek <jakub@redhat.com>
3618
3619 PR c/64824
3620 PR c/64868
3621 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3622
c3e38a03 36232015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3624
3625 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3626 processing enum declaration.
3627
7b33f0c8
MP
36282015-01-29 Marek Polacek <polacek@redhat.com>
3629
3630 PR c/64709
3631 * c-typeck.c (pop_init_level): If constructor_elements has
3632 exactly one element with integer_zerop value, set constructor_zeroinit
3633 to 1. Remove braces around warning_init call.
3634
dea63e49
JJ
36352015-01-27 Jakub Jelinek <jakub@redhat.com>
3636
3637 PR c/64766
3638 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3639 of FUNCTION_DECLs with error_mark_node.
3640
d38f7dce
JJ
36412015-01-26 Jakub Jelinek <jakub@redhat.com>
3642
3643 PR c/64778
3644 * c-typeck.c (convert_arguments): Return -1 if there are
3645 error_args, even if we've diagnosed too many arguments.
3646
cbf5d0e7
RB
36472015-01-21 Richard Biener <rguenther@suse.de>
3648
3649 PR middle-end/64313
3650 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3651 for builtins the user declared correctly.
3652
41dbbb37
TS
36532015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3654 Bernd Schmidt <bernds@codesourcery.com>
3655 Cesar Philippidis <cesar@codesourcery.com>
3656 James Norris <jnorris@codesourcery.com>
3657 Jakub Jelinek <jakub@redhat.com>
3658 Ilmir Usmanov <i.usmanov@samsung.com>
3659
3660 * c-parser.c: Include "gomp-constants.h".
3661 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3662 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3663 Use OMP_CLAUSE_SET_MAP_KIND.
3664 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3665 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3666 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3667 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3668 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3669 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3670 "copyout", "create", "delete", "deviceptr", "gang", "host",
3671 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3672 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3673 "present_or_create", "pcreate", "seq", "self", "vector",
3674 "vector_length", "wait", "worker".
3675 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3676 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3677 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3678 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3679 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3680 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3681 (c_parser_oacc_data_clause_deviceptr)
3682 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3683 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3684 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3685 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3686 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3687 (c_parser_oacc_parallel, c_parser_oacc_update)
3688 (c_parser_oacc_wait): New functions.
3689 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3690 (c_finish_oacc_data): New prototypes.
3691 * c-typeck.c: Include "gomp-constants.h".
3692 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3693 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3694 OMP_CLAUSE_SET_MAP_KIND.
3695 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3696 (c_finish_oacc_data): New functions.
3697 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3698 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3699 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3700 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3701 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3702 GOMP_MAP_FORCE_DEVICEPTR.
3703
adfac8df
JJ
37042015-01-09 Michael Collison <michael.collison@linaro.org>
3705
3706 * c-array-notation.c: Include hash-set.h, machmode.h,
3707 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3708 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3709 * c-aux-info.c: Ditto.
3710 * c-convert.c: Ditto.
3711 * c-decl.c: Ditto.
3712 * c-errors.c: Ditto.
3713 * c-lang.c: Dittoxs.
3714 * c-objc-common.c: Ditto.
3715 * c-parser.c: Ditto.
3716 * c-typeck.c: Include hash-set.h, machmode.h,
3717 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3718 fold-const.h, wide-int.h, inchash.h, real.h and
3719 fixed-value.h due to flattening of tree.h.
3720
2cc901dc
MP
37212015-01-07 Marek Polacek <polacek@redhat.com>
3722
3723 PR c/64417
3724 * c-typeck.c (process_init_element): Disallow initialization of
3725 a flexible array member with a string constant if the structure
3726 is in an array.
3727
5624e564
JJ
37282015-01-05 Jakub Jelinek <jakub@redhat.com>
3729
e5341100
JJ
3730 PR sanitizer/64344
3731 * c-typeck.c (convert_for_assignment, c_finish_return): For
3732 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3733 types also set in_late_binary_op around convert call.
3734 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3735 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3736 result on expr as last argument to ubsan_instrument_float_cast,
3737 if in_late_binary_op, don't use c_save_expr but save_expr.
3738
5624e564
JJ
3739 Update copyright years.
3740
5bd012f8
MP
37412015-01-05 Marek Polacek <polacek@redhat.com>
3742
3743 PR c/64423
3744 * c-typeck.c (build_array_ref): Pass loc down to
3745 warn_array_subscript_with_type_char.
3746
3f8257db 37472014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3748
3749 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3750 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3751 element type.
8e745a17 3752 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3753 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3754 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3755 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3756 to PEDWARN_FOR_QUALIFIERS.
768952be 3757
8f94a8c4
JJ
37582014-12-17 Jakub Jelinek <jakub@redhat.com>
3759
3760 PR sanitizer/64289
3761 * c-convert.c: Include ubsan.h.
3762 (convert): For real -> integral casts and
3763 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3764 instead instrument the float cast directly.
3765
b731b390
JJ
37662014-11-29 Jakub Jelinek <jakub@redhat.com>
3767
3768 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3769 c_finish_stmt_expr): Remove NULL last argument from
3770 create_tmp_var_raw and create_tmp_var calls.
3771 * c-array-notation.c (fix_builtin_array_notation_fn,
3772 build_array_notation_expr, fix_conditional_array_notations_1,
3773 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3774
541e35a6
MP
37752014-11-28 Marek Polacek <polacek@redhat.com>
3776
3777 PR c/63862
3778 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3779 convert the right operand to integer type.
3780
b286be94
MP
37812014-11-25 Marek Polacek <polacek@redhat.com>
3782
3783 PR c/63877
3784 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3785 for inline functions.
3786
aa7da51a
JJ
37872014-11-21 Jakub Jelinek <jakub@redhat.com>
3788
3789 PR target/63764
3790 * c-typeck.c (build_array_ref): Adjust
3791 convert_vector_to_pointer_for_subscript caller. If it returns true,
3792 call non_lvalue_loc on the result.
3793
d876207f
RB
37942014-11-11 Richard Biener <rguenther@suse.de>
3795
3796 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3797 to true.
3798
e5e44252
AK
37992014-11-10 Andi Kleen <ak@linux.intel.com>
3800
3801 PR c/60804
3802 * c-parser.c (c_parser_statement_after_labels): Call
3803 check_no_cilk.
3804 (c_parser_if_statement): Dito.
3805 (c_parser_switch_statement): Dito.
3806 (c_parser_while_statement): Dito.
3807 (c_parser_do_statement): Dito.
3808 (c_parser_for_statement): Dito.
3809 * c-typeck.c (c_finish_loop): Dito.
3810
13c21655
PC
38112014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3812
3813 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3814 OPT_Wshift_count_overflow in the warnings.
3815
2d51fcef
MP
38162014-10-30 Marek Polacek <polacek@redhat.com>
3817
3818 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3819 print the stripped version as well, if they're not the same.
3820
ef4bddc2
RS
38212014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3822
3823 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3824 machine_mode.
3825
c582198b
AM
38262014-10-28 Andrew MacLeod <amacleod@redhat.com>
3827
3828 * c-decl.c: Adjust include files.
3829 * c-parser.c: Ditto.
3830
ddc8de03
PM
38312014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3832 Tom Tromey <tromey@redhat.com>
3833
3834 * c-tree.h (enum c_oracle_request): New.
3835 (c_binding_oracle_function): New typedef.
3836 (c_binding_oracle, c_pushtag, c_bind): Declare.
3837 * c-decl.c (c_binding_oracle): New global.
3838 (I_SYMBOL_CHECKED): New macro.
3839 (i_symbol_binding): New function.
3840 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3841 (I_TAG_CHECKED): New macro.
3842 (i_tag_binding): New function.
3843 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3844 (I_LABEL_CHECKED): New macro.
3845 (i_label_binding): New function.
3846 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3847 (c_print_identifier): Save and restore c_binding_oracle.
3848 (c_pushtag, c_bind): New functions.
3849
60393bbc
AM
38502014-10-27 Andrew MacLeod <amacleod@redhat.com>
3851
3852 * c-typeck.c: Adjust include files.
3853
d723bb7c
MLI
38542014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3855
3856 PR c++/53061
3857 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3858 initialization here...
3859 (c_initialize_diagnostics): ... but here. Set defaults after
3860 building pretty-printer.
3861
1bc5a451
MP
38622014-10-23 Marek Polacek <polacek@redhat.com>
3863
3864 PR c/63626
3865 * c-decl.c (pop_scope): Don't print warning in external_scope.
3866
4435bb92
MP
38672014-10-19 Marek Polacek <polacek@redhat.com>
3868
3869 PR c/63567
3870 * c-typeck.c (output_init_element): Allow initializing objects with
3871 static storage duration with compound literals even in C99 and add
3872 pedwarn for it.
3873
7278465e
MP
38742014-10-17 Marek Polacek <polacek@redhat.com>
3875
3876 PR c/63567
3877 * c-typeck.c (digest_init): Allow initializing objects with static
3878 storage duration with compound literals even in C99 and add pedwarn
3879 for it.
3880
d9b7be2e
MP
38812014-10-17 Marek Polacek <polacek@redhat.com>
3882
3883 PR c/63543
3884 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3885 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3886 error multiple times. Print the type.
3887
f406ae1f
MP
38882014-10-17 Marek Polacek <polacek@redhat.com>
3889
3890 PR c/63549
3891 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3892 type.
3893
92574c7c
MP
38942014-10-17 Marek Polacek <polacek@redhat.com>
3895
3896 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3897 (start_function): Use OPT_Wimplicit_int instead of 0.
3898 (store_parm_decls_oldstyle): Likewise.
3899
1bc4a978
MT
39002014-10-17 Alan Modra <amodra@gmail.com>
3901
3902 PR middle-end/61848
3903 * c-decl.c (merge_decls): Don't merge section name or tls model
3904 to newdecl symtab node, instead merge to olddecl. Override
3905 existing olddecl section name. Set tls_model for all thread-local
3906 vars, not just OMP thread-private ones. Remove incorrect comment.
3907
83685514
AM
39082014-10-16 Andrew MacLeod <amacleod@redhat.com>
3909
3910 * c-decl.c: Adjust include files.
3911
78a7c317
DD
39122014-10-14 DJ Delorie <dj@redhat.com>
3913
3914 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3915 (c_token_starts_typename): Check all __intN, not just __int128.
3916 (c_token_starts_declspecs): Likewise.
3917 (c_parser_declspecs): Likewise.
3918 (c_parser_attribute_any_word): Likewise.
3919 (c_parser_objc_selector): Likewise.
3920 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3921 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3922 is specified.
3923 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3924 __int128.
3925 (finish_declspecs): Likewise.
3926
74d98c1e
AB
39272014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3928
8e745a17 3929 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3930 the duplicate code.
8e745a17 3931 (c_parser_statement): Call the new function.
74d98c1e 3932
84937de2
MP
39332014-10-09 Marek Polacek <polacek@redhat.com>
3934
3935 PR c/63480
3936 * c-typeck.c (pop_init_level): Don't warn about initializing
3937 with { }.
3938
0382aaa0
MP
39392014-10-07 Marek Polacek <polacek@redhat.com>
3940
3941 PR c/59717
3942 * c-decl.c (header_for_builtin_fn): New function.
3943 (implicitly_declare): Suggest which header to include.
3944
7a0ca710
MP
39452014-10-07 Marek Polacek <polacek@redhat.com>
3946
3947 * c-convert.c (convert): Use error_operand_p.
3948 * c-typeck.c (require_complete_type): Likewise.
3949 (really_atomic_lvalue): Likewise.
3950 (digest_init): Likewise.
3951 (handle_omp_array_sections_1): Likewise.
3952
6bc8a126
MP
39532014-10-03 Marek Polacek <polacek@redhat.com>
3954
3955 PR c/63453
3956 * c-decl.c (pop_scope): Don't warn about "inline function declared
3957 but never defined" for functions marked with gnu_inline attribute.
3958
d90c0a59
JJ
39592014-09-25 Jakub Jelinek <jakub@redhat.com>
3960
3961 PR c++/63249
3962 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3963 on low_bound and length.
3964
083e891e
MP
39652014-09-24 Marek Polacek <polacek@redhat.com>
3966
3967 PR c/61405
3968 PR c/53874
3969 * c-parser.c: Don't define CPP_KEYWORD.
3970 (c_parser_switch_statement): Pass original type to c_finish_case.
3971 * c-tree.h (c_finish_case): Update declaration.
3972 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3973 conditionally to c_do_switch_warnings.
3974
8d95fe25
MP
39752014-09-03 Marek Polacek <polacek@redhat.com>
3976
3977 PR c/62024
3978 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3979 conversions.
3980
9a771876
JJ
39812014-09-02 Jakub Jelinek <jakub@redhat.com>
3982 Balaji V. Iyer <balaji.v.iyer@intel.com>
3983 Igor Zamyatin <igor.zamyatin@intel.com>
3984
3985 * c-parser.c (c_parser_cilk_for): New function.
3986 (c_parser_cilk_grainsize): Likewise.
3987 (c_get_temp_regvar): Likewise.
3988 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3989 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3990 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3991 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3992 case.
3993
b7679d96
CG
39942014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3995
3996 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3997 with using HOST_WIDE_INT without truncation to 'int'
3998
59ea0364
MP
39992014-08-22 Marek Polacek <polacek@redhat.com>
4000
4001 PR c++/62199
4002 * c-typeck.c (parser_build_binary_op): Adjust call to
4003 warn_logical_not_parentheses.
4004
671a475e
IZ
40052014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4006
4007 PR other/62008
4008 * c-parser.c (c_parser_array_notation): Check for correct
4009 type of an array added.
4010
04159acf
MP
40112014-08-19 Marek Polacek <polacek@redhat.com>
4012
4013 PR c++/62153
4014 * c-typeck.c (build_binary_op): If either operand of a comparison
4015 is a boolean expression, call maybe_warn_bool_compare.
4016
c77935ee
PP
40172014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4018
4019 PR c/45584
4020 * c-typeck.c (build_c_cast): Do a conversion even when the
4021 TYPE_MAIN_VARIANTs are the same.
4022
35aff4fb
MP
40232014-08-19 Marek Polacek <polacek@redhat.com>
4024
4025 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4026 pedwarn_c99 instead of pedwarn.
4027 (grokfield): Likewise.
4028 (warn_defaults_to): New function.
4029 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4030 Unconditionally call pedwarn_c99 instead of pedwarn.
4031 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4032 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4033 check flag_isoc11 before.
4034 * c-errors.c (pedwarn_c99): Change the return type to bool.
4035 Handle -Wc99-c11-compat.
4036 * c-parser.c (disable_extension_diagnostics): Handle
4037 warn_c99_c11_compat.
4038 (restore_extension_diagnostics): Likewise.
4039 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4040 instead of pedwarn, don't check flag_isoc11 before.
4041 (c_parser_declspecs): Likewise.
4042 (c_parser_alignas_specifier): Likewise.
4043 (c_parser_alignof_expression): Likewise.
4044 (c_parser_generic_selection): Likewise.
4045 * c-tree.h (pedwarn_c99): Update declaration.
4046 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4047 of pedwarn_c99.
4048
177cce46
MP
40492014-08-19 Marek Polacek <polacek@redhat.com>
4050
4051 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4052 to pedwarn_c90.
4053 * c-errors.c: Include "opts.h".
4054 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4055 * c-parser.c (disable_extension_diagnostics): Handle negative value
4056 of warn_c90_c99_compat, too.
4057 (restore_extension_diagnostics): Likewise.
4058 (c_parser_compound_statement_nostart): Pass
4059 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4060
6dc99c33
MP
40612014-08-12 Marek Polacek <polacek@redhat.com>
4062
4063 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4064 Add pedwarn.
4065 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4066 Likewise.
4067 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4068
3f8257db 40692014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4070
4071 PR c/51849
4072 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4073 Call pedwarn_c90 instead of pedwarn.
4074 (check_bitfield_type_and_width): Likewise.
4075 (declspecs_add_qual): Likewise.
4076 (declspecs_add_type): Likewise.
4077 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4078 Adjust to only call pedwarn_c90.
4079 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4080 pedwarn_c90 instead of pedwarn.
4081 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4082 * c-parser.c (disable_extension_diagnostics): Handle
4083 warn_c90_c99_compat.
4084 (restore_extension_diagnostics): Likewise.
4085 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4086 pedwarn_c90 instead of pedwarn.
4087 (c_parser_initelt): Likewise.
4088 (c_parser_postfix_expression): Likewise.
4089 (c_parser_postfix_expression_after_paren_type): Likewise.
4090 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4091 * c-tree.h: Fix formatting.
4092 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4093 pedwarn_c90 instead of pedwarn.
4094
9f25a338
TS
40952014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4096
4097 * c-typeck.c: Remove include of pointer-set.h.
4098
044331a8
MP
40992014-08-07 Marek Polacek <polacek@redhat.com>
4100
4101 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4102
b787e7a2
TS
41032014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4104
4105 * c-typeck.c: Use hash_map instead of pointer_map.
4106
6e2830c3
TS
41072014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4108
4109 * c-decl.c: Use hash_set instead of pointer_set.
4110
a7ee52fb
IZ
41112014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4112
4113 PR middle-end/61455
4114 * c-array-notation.c (expand_array_notations): Handling
4115 of DECL_EXPR added.
4116
b4dfdc11
MG
41172014-07-31 Marc Glisse <marc.glisse@inria.fr>
4118
4119 PR c++/60517
4120 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4121 a local variable.
4122
976d5a22
TT
41232014-07-30 Tom Tromey <tromey@redhat.com>
4124
4125 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4126 field.
4127 (really_start_incremental_init, push_init_level): Initialize
4128 designator_depth.
4129 (pop_init_level): Set global designator_depth.
4130 (process_init_element): Check for designated_init attribute.
4131
30281de2
MP
41322014-07-20 Marek Polacek <polacek@redhat.com>
4133
4134 PR c/61852
4135 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4136 (implicitly_declare): Pass location to implicit_decl_warning.
4137
b108f48f
JJ
41382014-07-14 Jakub Jelinek <jakub@redhat.com>
4139
4140 PR middle-end/61294
4141 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4142 If non-NULL, call c_parser_check_literal_zero.
4143 (c_parser_check_literal_zero): New function.
4144 (c_parser_postfix_expression_after_primary): Adjust
4145 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4146
773ec47f
MP
41472014-07-06 Marek Polacek <polacek@redhat.com>
4148
4149 PR c/6940
4150 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4151 * c-tree.h (C_ARRAY_PARAMETER): Define.
4152 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4153 function parameter.
4154
22e1cf1c 41552014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4156 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4157
4158 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4159 releasing symbol.
4160
52ec0ea3
MP
41612014-07-01 Marek Polacek <polacek@redhat.com>
4162
4163 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4164 instead of 0 to WARN_FOR_ASSIGNMENT.
4165
d5c3d343
MP
41662014-07-01 Marek Polacek <polacek@redhat.com>
4167
4168 PR c/58286
4169 * c-typeck.c (convert_for_assignment): Pass
4170 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4171
6a7253a4
MP
41722014-06-30 Marek Polacek <polacek@redhat.com>
4173
4174 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4175 has no_sanitize_undefined attribute.
4176
5e88a8f4
IZ
41772014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4178
4179 PR middle-end/57541
4180 * c-array-notation.c (fix_builtin_array_notation_fn):
4181 Check for 0 arguments in builtin call. Check that bultin argument is
4182 correct.
4183 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4184 index.
4185
9698b078
SH
41862014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4187
4188 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4189 qualifiers in __auto_type for atomic types.
4190 (c_parser_typeof_specifier): Discard all type qualifiers in
4191 __typeof__ for atomic types.
4192
6e07c515
MP
41932014-06-25 Marek Polacek <polacek@redhat.com>
4194
4195 PR c/61162
4196 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4197 the return expression to c_finish_return.
4198
da6f124d
JJ
41992014-06-25 Jakub Jelinek <jakub@redhat.com>
4200
4201 * c-typeck.c (c_finish_omp_clauses): Make sure
4202 OMP_CLAUSE_LINEAR_STEP has correct type.
4203
c203e8a7
TS
42042014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4205
4206 * c-decl.c: Adjust.
4207
56ad0e38
JJ
42082014-06-24 Jakub Jelinek <jakub@redhat.com>
4209
4210 * c-parser.c (c_parser_omp_for_loop): For
4211 #pragma omp parallel for simd move lastprivate clause from parallel
4212 to for rather than simd.
4213
47c2554f
MP
42142014-06-23 Marek Polacek <polacek@redhat.com>
4215
4216 * c-typeck.c (parser_build_binary_op): Don't call
4217 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4218
56363ffd
JH
42192014-06-15 Jan Hubicka <hubicka@ucw.cz>
4220
4221 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4222 * c-decl.c (merge_decls): Likewise.
4223
d7ff7ae5
MP
42242014-06-09 Marek Polacek <polacek@redhat.com>
4225
4226 PR c/36446
4227 * c-typeck.c (error_init): Call inform instead of error_at.
4228 (pedwarn_init): Call inform instead of pedwarn.
4229 (warning_init): Call inform instead of warning_at.
4230
24d047a3
JH
42312014-06-07 Jan Hubicka <hubicka@ucw.cz>
4232
4233 * c-decl.c (merge_decls): Use set_decl_section_name.
4234 (duplicate_decls): Remove node if it exists.
4235
9bac5cbb
G
42362014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4237
4238 PR c/53119
4239 * c-typeck.c (push_init_level, process_init_element,
4240 pop_init_level): Correct check for zero initialization, move
4241 missing brace warning to respect zero initialization.
4242
8ffcdea8
MP
42432014-06-05 Marek Polacek <polacek@redhat.com>
4244
4245 PR c/56724
4246 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4247
742938c9
MP
42482014-06-05 Marek Polacek <polacek@redhat.com>
4249
4250 PR c/49706
4251 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4252 on the left hand side operand of a comparison.
4253
6447c55d
MP
42542014-06-05 Marek Polacek <polacek@redhat.com>
4255
4256 PR c/48062
4257 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4258 Print note only if the warning was printed.
4259
9dc7743c
IZ
42602014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4261
4262 PR c/58942
4263 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4264 with a pointer.
4265
fedfecef
MP
42662014-06-03 Marek Polacek <polacek@redhat.com>
4267
4268 PR c/60439
4269 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4270 c_start_case.
4271 * c-tree.h (c_start_case): Update.
4272 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4273 switch condition has boolean value.
4274
9b2b7279
AM
42752014-06-02 Andrew MacLeod <amacleod@redhat.com>
4276
4277 * c-decl.c: Include builtins.h.
4278 * c-parser.c: Likewise.
4279
5c1bc275
MP
42802014-05-27 Marek Polacek <polacek@redhat.com>
4281
4282 PR c/56724
4283 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4284 error and warning calls to error_at and warning_at. Pass location of
4285 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4286 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4287 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4288
97563bc8
IZ
42892014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4290
4291 PR c/61191
4292 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4293 function parameters.
4294
aede2c10
JH
42952014-05-23 Jan Hubicka <hubicka@ucw.cz>
4296
4297 * c-decl.c (merge_decls): Preserve symtab node pointers.
4298 (duplicate_decls): Free new decl.
4299
edbba2ce
TS
43002014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4301
f3316c6d
TS
4302 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4303 initialization.
4304
edbba2ce
TS
4305 * c-parser.c (c_parser_omp_target): Return bool values.
4306
68c81f24
TS
43072014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4308
4309 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4310 num_teams_loc variable to num_thread_limit_loc.
4311
632f2871
RS
43122014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4313
4314 * c-array-notation.c (expand_array_notations): Use void_node
4315 instead of void_zero_node.
4316
766090c2
TS
43172014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4318
4319 * c-decl.c (finish_struct): Adjust.
4320 (finish_enum): Likewise.
4321 (bind): Adjust.
4322 (record_inline_static): Likewise.
4323 (push_scope): Likewise.
4324 (make_label): Likewise.
4325 (lookup_label_for_goto): Likewise.
4326 (finish_struct): Likewise.
4327 (finish_enum): Likewise.
4328 (store_parm_decls): Likewise.
4329 (c_push_function_context): Likewise.
4330 * c-lang.h: Remove usage of variable_size gty attribute.
4331 * c-parser.c (c_parse_init): Adjust.
4332 (c_parse_file): Likewise.
4333
2b107f6b
MP
43342014-05-13 Marek Polacek <polacek@redhat.com>
4335
4336 PR c/61162
4337 * c-typeck.c (convert_for_assignment): Pass location to
4338 WARN_FOR_ASSIGNMENT instead of input_location.
4339
d033409e
MP
43402014-05-10 Marek Polacek <polacek@redhat.com>
4341
4342 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4343 maybe_warn_string_init.
4344 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4345 maybe_warn_string_init.
4346 * c-tree.h (maybe_warn_string_init): Update declaration.
4347 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4348 Call pedwarn_init with loc instead of with input_location.
4349 (digest_init): Pass init_loc to maybe_warn_string_init.
4350 (pop_init_level): Call pedwarn_init with loc instead of with
4351 input_location.
4352 (set_init_index): Likewise.
4353 (process_init_element): Likewise.
4354
ea58ef42
MP
43552014-05-09 Marek Polacek <polacek@redhat.com>
4356
4357 PR c/61096
4358 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4359 (c_parser_initelt): Pass location to set_init_label. Pass array index
4360 location to set_init_index.
4361 * c-tree.h (push_init_level): Update declaration.
4362 (pop_init_level): Likewise.
4363 (set_init_index): Likewise.
4364 (set_init_label): Likewise.
4365 * c-typeck.c (error_init): Add location parameter. Call error_at
4366 instead of error.
4367 (digest_init): Pass init_loc to error_init.
4368 (really_start_incremental_init):
4369 (push_init_level): Add location parameter. Pass loc to pop_init_level
4370 and error_init.
4371 (pop_init_level): Likewise.
4372 (set_designator): Add location parameter. Pass loc to pop_init_level,
4373 push_init_level, and error_init.
4374 (set_init_index): Add location parameter. Pass loc to error_init and
4375 set_designator.
4376 (set_init_label): Likewise.
4377 (output_init_element): Pass loc to error_init.
4378 (process_init_element): Pass loc to error_init, pop_init_level,
4379 pedwarn_init, and push_init_level.
4380
661a0813
MP
43812014-05-09 Marek Polacek <polacek@redhat.com>
4382
4383 PR c/50459
4384 * c-parser.c (c_parser_attributes): Parse the arguments as an
4385 expression-list if the attribute takes identifier.
4386
2793eeab
MP
43872014-05-08 Marek Polacek <polacek@redhat.com>
4388
4389 PR c/61053
4390 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4391 TYPE_ALIGN_UNIT.
4392
f827930a
MP
43932014-05-08 Marek Polacek <polacek@redhat.com>
4394
4395 PR c/61077
4396 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4397 of main.
4398
1d60af08
KZ
43992014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4400 Mike Stump <mikestump@comcast.net>
4401 Richard Sandiford <rdsandiford@googlemail.com>
4402
4403 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4404 (finish_enum): Use wide-int interfaces.
4405 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4406 * c-typeck.c (build_c_cast): Likewise.
4407 (set_nonincremental_init_from_string): Likewise.
4408 (c_tree_equal): Likewise.
4409
a0e24419
MP
44102014-05-02 Marek Polacek <polacek@redhat.com>
4411
4412 PR c/25801
4413 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4414 Return size_one_node when the type is not complete.
4415 (pointer_diff): Remove comment.
4416 (build_unary_op): Improve error messages.
4417
19fc9faa
MP
44182014-05-02 Marek Polacek <polacek@redhat.com>
4419
4420 * c-typeck.c (c_finish_return): Separate warning_at calls.
4421
63bc4e87
MP
44222014-05-02 Marek Polacek <polacek@redhat.com>
4423
4424 * c-tree.h (error_init): Remove declaration.
4425 (pedwarn_init): Likewise.
4426 * c-typeck.c (error_init): Make static and move above.
4427 (pedwarn_init): Likewise.
4428 (warning_init): Move above.
4429 (maybe_warn_string_init): Likewise.
4430
4bd2511b
JL
44312014-05-01 Jeff Law <law@redhat.com>
4432
4433 Revert:
4434
4435 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4436 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4437 avoid goto.
4438
6a358dcb
MP
44392014-05-02 Marek Polacek <polacek@redhat.com>
4440
4441 PR c/60784
4442 * c-typeck.c (push_init_level): Set constructor_designated to
4443 p->designated for structures.
4444
ae5ebda4
MP
44452014-05-01 Marek Polacek <polacek@redhat.com>
4446
4447 PR c/60915
4448 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4449 function-definition has an attribute after the declarator.
4450
96b40f8d
MP
44512014-05-01 Marek Polacek <polacek@redhat.com>
4452
4453 PR c/60257
4454 * c-typeck.c (warning_init): Add location_t parameter. Call
4455 warning_at instead of warning.
4456 (push_init_level): Pass input_location to warning_init.
4457 (add_pending_init): Add location_t parameter. Pass loc to
4458 warning_init.
4459 (set_nonincremental_init): Pass input_location to add_pending_init.
4460 (set_nonincremental_init_from_string): Likewise.
4461 (output_init_element): Pass loc to warning_init and to
4462 add_pending_init.
4463
32e00768
MP
44642014-05-01 Marek Polacek <polacek@redhat.com>
4465
4466 PR c/43395
4467 * c-typeck.c (c_finish_return): Distinguish between label and variable
4468 when warning about returning local address.
4469
c9379ce2
MP
44702014-05-01 Marek Polacek <polacek@redhat.com>
4471
4472 PR c/29467
4473 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4474 in C89 mode.
4475
d00887e8
MP
44762014-05-01 Marek Polacek <polacek@redhat.com>
4477
4478 PR c/43245
4479 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4480 instead of 0 to WARN_FOR_QUALIFIERS.
4481
5436fa2e
MP
44822014-05-01 Marek Polacek <polacek@redhat.com>
4483
4484 PR c/56989
4485 * c-typeck.c (default_conversion): Use better location for
4486 error call.
4487
f8ed5150
MP
44882014-04-30 Marek Polacek <polacek@redhat.com>
4489
4490 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4491 also when SANITIZE_FLOAT_DIVIDE is on.
4492
8337d1db
MP
44932014-04-30 Marek Polacek <polacek@redhat.com>
4494
4495 PR c/60139
4496 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4497 and pedwarn_init. Use loc insted of input_location.
4498
c4bdc42f
MP
44992014-04-30 Marek Polacek <polacek@redhat.com>
4500
4501 PR c/60351
4502 * c-typeck.c (build_binary_op): Use location when warning about
4503 shift count.
4504
45484dcf
MP
45052014-04-25 Marek Polacek <polacek@redhat.com>
4506
4507 PR c/18079
4508 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4509 always_inline/noinline and hot/cold attributes.
4510
34cf811f
MP
45112014-04-25 Marek Polacek <polacek@redhat.com>
4512
4513 PR c/60114
4514 * c-parser.c (c_parser_initelt): Pass input_location to
4515 process_init_element.
4516 (c_parser_initval): Pass loc to process_init_element.
4517 * c-tree.h (process_init_element): Adjust declaration.
4518 * c-typeck.c (push_init_level): Pass input_location to
4519 process_init_element.
4520 (pop_init_level): Likewise.
4521 (set_designator): Likewise.
4522 (output_init_element): Add location_t parameter. Pass loc to
4523 digest_init.
4524 (output_pending_init_elements): Pass input_location to
4525 output_init_element.
4526 (process_init_element): Add location_t parameter. Pass loc to
4527 output_init_element.
4528
42056eac
JJ
45292014-04-24 Jakub Jelinek <jakub@redhat.com>
4530
4531 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4532 atomic-clause, allow comma in between atomic-clause and
4533 seq_cst.
4534
e162a134
JJ
45352014-04-22 Jakub Jelinek <jakub@redhat.com>
4536
4537 PR c/59073
4538 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4539 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4540
2f6babac
IZ
45412014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4542
4543 PR middle-end/60469
4544 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4545 create_tmp_var instead build_decl for creating temps.
4546 (build_array_notation_expr): Likewise.
4547 (fix_conditional_array_notations_1): Likewise.
4548 (fix_array_notation_expr): Likewise.
4549 (fix_array_notation_call_expr): Likewise.
4550
8edbfaa6
JJ
45512014-03-28 Jakub Jelinek <jakub@redhat.com>
4552
4553 PR c++/60689
4554 * c-tree.h (c_build_function_call_vec): New prototype.
4555 * c-typeck.c (build_function_call_vec): Don't call
4556 resolve_overloaded_builtin here.
4557 (c_build_function_call_vec): New wrapper function around
4558 build_function_call_vec. Call resolve_overloaded_builtin here.
4559 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4560 Call c_build_function_call_vec instead of build_function_call_vec.
4561 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4562 * c-decl.c (finish_decl): Likewise.
4563
7485aeea
MLI
45642014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4565
4566 PR c/55383
4567 * c-typeck.c: Use correct format string in cast-qual warning
4568
b17a8b07
TS
45692014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4570
4571 * c-decl.c (c_decl_attributes): Use
4572 lang_hooks.types.omp_mappable_type.
4573 * c-typeck.c (c_finish_omp_clauses): Likewise.
4574
3af9c5e9
MP
45752014-03-06 Marek Polacek <polacek@redhat.com>
4576
4577 PR c/60197
4578 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4579 of checking tree code.
4580
1c9f5f33
PK
45812014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4582
4583 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4584 (c_parser_parameter_declaration): Likewise.
4585
cc28fc7f
MP
45862014-02-19 Marek Polacek <polacek@redhat.com>
4587
4588 PR c/60195
4589 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4590 Call mark_exp_read on exp.value.
4591 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4592 TREE_ADDRESSABLE on old instead of val.
4593 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4594
b581c05c
PK
45952014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4596
4597 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4598 C_EXPR_APPEND by vec_safe_push.
4599 * c-tree.h (C_EXPR_APPEND): Remove.
4600
81e5eca8
MP
46012014-01-31 Marek Polacek <polacek@redhat.com>
4602
4603 PR c/59963
4604 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4605 build_function_call_vec.
4606 (build_function_call): Likewise.
4607 (build_atomic_assign): Likewise.
4608 (build_function_call_vec): Add arg_loc parameter. Use it.
4609 (convert_arguments): Likewise.
4610 (convert_for_assignment): Rename rhs_loc to expr_loc.
4611 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4612 (c_parser_objc_keywordexpr): Likewise.
4613 (c_parser_postfix_expression_after_primary): Call
4614 build_function_call_vec with expr_loc rather than op_loc.
4615 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4616 build_function_call_vec.
4617 (c_parser_expr_list): Add locations parameter. Fill it with locations
4618 of function arguments.
4619 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4620
68fca595
MP
46212014-01-30 Marek Polacek <polacek@redhat.com>
4622
4623 PR c/59940
4624 * c-typeck.c (build_function_call_vec): Use loc parameter.
4625 (convert_arguments): Add location parameter. Use it.
4626 (ep_convert_and_check): Likewise.
4627 (build_atomic_assign): Adjust convert_for_assignment call.
4628 (build_modify_expr): Likewise.
4629 (digest_init): Likewise.
4630 (c_finish_return): Likewise.
4631 (build_conditional_expr): Adjust ep_convert_and_check calls.
4632 (convert_for_assignment): Add rhs_loc parameter. Use it.
4633 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4634 calls.
4635
fa337f3a
RB
46362014-01-30 Richard Biener <rguenther@suse.de>
4637
4638 PR c/59905
4639 * c-typeck.c (build_function_call_vec): Do not replace calls
4640 to a function via an incompatible type with a runtime abort.
4641
b72271b9
BI
46422014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4643
4644 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4645 flag_enable_cilkplus with flag_cilkplus.
4646 (c_parser_direct_declarator_inner): Likewise.
4647 (c_parser_attribute_any_word): Likewise.
4648 (c_parser_attributes): Likewise.
4649 (c_parser_compound_statement): Likewise.
4650 (c_parser_statement_after_labels): Likewise.
4651 (c_parser_if_statement): Likewise.
4652 (c_parser_switch_statement): Likewise.
4653 (c_parser_do_statement): Likewise.
4654 (c_parser_for_statement): Likewise.
4655 (c_parser_unary_expression): Likewise.
4656 (c_parser_postfix_expression): Likewise.
4657 (c_parser_postfix_expression_after_primary): Likewise.
4658 (c_parser_postfix_expression_after_primary): Likewise.
4659 (c_parser_omp_clause_name): Likewise.
4660 (c_finish_omp_declare_simd): Likewise.
4661 (c_parser_cilk_verify_simd): Likewise.
4662 * c-typeck.c (build_array_ref): Likewise.
4663 (build_function_call_vec): Likewise.
4664 (convert_arguments): Likewise.
4665 (build_compound_expr): Likewise.
4666 (c_finish_return): Likewise.
4667 (c_finish_if_stmt): Likewise.
4668 (c_finish_loop): Likewise.
4669 (build_binary_op): Likewise.
4670
393e8e8b
MP
46712014-01-23 Marek Polacek <polacek@redhat.com>
4672
4673 PR c/59846
4674 * c-typeck.c (parser_build_binary_op): Use location instead of
4675 input_location.
4676 (build_binary_op): Pass location to shorten_compare.
4677
f04dda30
MP
46782014-01-23 Marek Polacek <polacek@redhat.com>
4679
4680 PR c/58346
4681 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4682 an empty aggregate.
4683
789eadcd
MP
46842014-01-23 Marek Polacek <polacek@redhat.com>
4685
4686 PR c/59871
4687 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4688 of a comma expression.
4689 (emit_side_effect_warnings): Likewise.
4690
40f14e9f
BI
46912014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4692
4693 PR c/59825
4694 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4695 function to use walk_tree and moved a lot of its functionality to
4696 expand_array_notations.
4697 (expand_array_notations): New function.
4698
74558dd9
BI
46992014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4700
4701 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4702 attribute an attribute without value.
4703
652fea39
JJ
47042014-01-23 Jakub Jelinek <jakub@redhat.com>
4705
4706 PR middle-end/58809
4707 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4708 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4709
f34f1c87
MP
47102014-01-22 Marek Polacek <polacek@redhat.com>
4711
4712 PR c/59891
4713 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4714 of remove_c_maybe_const_expr on op1 and op2.
4715
241f845a
JJ
47162014-01-15 Jakub Jelinek <jakub@redhat.com>
4717
4718 PR c/58943
4719 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4720 effects, preevaluate rhs using SAVE_EXPR first.
4721
9a74f20c
BI
47222014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4723
4724 PR c++/59631
4725 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4726 statements with if-elseif statements.
4727
96066ce1
MP
47282014-01-06 Marek Polacek <polacek@redhat.com>
4729
4730 PR c/57773
4731 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4732 defined bit-field types only in ISO C.
4733
23a5b65a
RS
47342014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4735
4736 Update copyright years
4737
f9030485
RS
47382014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4739
4740 * c-array-notation.c: Use the standard form for the copyright notice.
4741
41958c28
BI
47422013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4743
4744 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4745 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4746 field in parser is not empty. If not-empty, call the function
4747 c_parser_finish_omp_declare_simd.
4748 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4749 between SIMD-enabled functions and #pragma simd. Added new parameter.
4750 (c_parser_cilk_all_clauses): Modified the usage of the function
4751 c_parser_cilk_clause_vectorlength as mentioned above.
4752 (c_parser_cilk_simd_fn_vector_attrs): New function.
4753 (c_finish_cilk_simd_fn_tokens): Likewise.
4754 (is_cilkplus_vector_p): Likewise.
4755 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4756 "nomask," and "mask" strings in clause name.
4757 (c_parser_omp_all_clauses): Added 3 new case statements:
4758 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4759 PRAGMA_CILK_CLAUSE_NOMASK.
4760 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4761 check for vector attribute and if so call the function
4762 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4763 called the function c_finish_cilk_simd_fn_tokens.
4764 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4765 parser field is non-empty. If so, parse them as you would parse
4766 the omp declare simd pragma.
4767 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4768 Added a check when step is a parameter and flag it as error.
4769 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4770 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4771 pragma_omp_clause.
4772
cef0fd0e
TS
47732013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4774
4775 * c-parser.c (c_parser_omp_parallel): Fix description.
4776
12893402
BI
47772013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4778
4779 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4780 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4781 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4782 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4783
296674db
JM
47842013-12-04 Joseph Myers <joseph@codesourcery.com>
4785
4786 PR c/52023
4787 * c-parser.c (c_parser_alignas_specifier): Use
4788 c_sizeof_or_alignof_type instead of c_alignof.
4789 (c_parser_alignof_expression): Likewise, with min_alignof
4790 parameter depending on alignof spelling used.
4791
edd28054
MP
47922013-12-04 Marek Polacek <polacek@redhat.com>
4793
4794 PR c/54113
4795 * c-decl.c (start_function): Don't warn for missing prototype for
4796 inline functions.
4797
da0fc454
MP
47982013-12-03 Marek Polacek <polacek@redhat.com>
4799
4800 PR c/59351
4801 * c-decl.c (build_compound_literal): Allow compound literals with
4802 empty initial value.
4803
4c2ecab0
JM
48042013-12-02 Joseph Myers <joseph@codesourcery.com>
4805
4806 PR c/58235
4807 * c-typeck.c (build_modify_expr): Diagnose assignment to
4808 expression with array type.
4809
340baef7
JM
48102013-11-29 Joseph Myers <joseph@codesourcery.com>
4811
4812 PR c/42262
4813 * c-typeck.c (process_init_element): Do not treat a string as
4814 initializing a whole array when used with a designator for an
4815 individual element.
4816
6763b9f7
JM
48172013-11-29 Joseph Myers <joseph@codesourcery.com>
4818
4819 PR c/57574
4820 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4821 an inline function following a static declaration.
4822
e7bd1de1
JJ
48232013-11-28 Jakub Jelinek <jakub@redhat.com>
4824
4825 PR c/59310
4826 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4827 to p_name before calling c_parser_omp_teams instead of after.
4828 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4829 argument. Remove unused p_name variable.
4830
0136f8f0
AH
48312013-11-27 Aldy Hernandez <aldyh@redhat.com>
4832 Jakub Jelinek <jakub@redhat.com>
4833
4834 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4835 external_scope is NULL.
4836
241b71bb
TV
48372013-11-27 Tom de Vries <tom@codesourcery.com>
4838 Marc Glisse <marc.glisse@inria.fr>
4839
4840 PR c++/59032
4841 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4842
2fb9a547
AM
48432013-11-22 Andrew MacLeod <amacleod@redhat.com>
4844
4845 * c-typeck.c: Add required include files from gimple.h.
4846
8400e75e
DM
48472013-11-22 David Malcolm <dmalcolm@redhat.com>
4848
4849 * c-decl.c (define_label, shadow_tag_warned)
4850 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4851 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4852 (declspecs_add_type): Remove use of in_system_header macro.
4853 * c-parser.c (c_parser_unary_expression): Likewise.
4854 * c-typeck.c (store_init_value, process_init_element)
4855 (c_start_case): Likewise.
4856
4857 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4858 macro.
4859
4860 * c-parser.c (c_parser_set_source_position_from_token): Remove
4861 reference to in_system_header from comment.
4862
386b1f1f
RS
48632013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4864
4865 * c-decl.c (grokdeclarator): Update comment to refer to
4866 tree_to_[su]hwi rather than tree_low_cst.
4867
ae7e9ddd
RS
48682013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4869
4870 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4871 tree_to_uhwi throughout.
4872
9439e9a1
RS
48732013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4874
4875 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4876 throughout.
4877
9541ffee
RS
48782013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4879
4880 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4881 throughout.
4882
c02065fc
AH
48832013-11-15 Aldy Hernandez <aldyh@redhat.com>
4884
4885 * c-parser.c (c_parser_cilk_simd): New.
4886 (c_parser_cilk_verify_simd): New.
4887 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4888 (c_parser_omp_for_loop): Add case for NE_EXPR.
4889 Set c_break_label for CILK_SIMD.
4890 (c_parser_cilk_clause_vectorlength): New.
4891 (c_parser_cilk_clause_linear): New.
4892 (c_parser_cilk_clause_name): New.
4893 (c_parser_cilk_all_clauses): New.
4894 * c-typeck.c (build_unary_op): Pass location argument to
4895 readonly_error.
4896 (build_modify_expr): Same.
4897 (build_asm_expr): Same.
4898 (c_finish_bc_stmt): Error on break/continue in loops.
4899
18f429e2
AM
49002013-11-14 Andrew MacLeod <amacleod@redhat.com>
4901
4902 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4903
d8a2d370
DN
49042013-11-14 Diego Novillo <dnovillo@google.com>
4905
4906 * c-decl.c: Include print-tree.h.
4907 Include stor-layout.h.
4908 Include varasm.h.
4909 Include attribs.h.
4910 Include stringpool.h.
4911 * c-lang.c: Include fold-const.h.
4912 * c-parser.c: Include stringpool.h.
4913 Include attribs.h.
4914 Include stor-layout.h.
4915 Include varasm.h.
4916 Include trans-mem.h.
4917 * c-typeck.c: Include stor-layout.h.
4918 Include trans-mem.h.
4919 Include varasm.h.
4920 Include stmt.h.
4921
38b7bc7f
JM
49222013-11-13 Joseph Myers <joseph@codesourcery.com>
4923
4924 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4925 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4926 __auto_type.
4927 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4928 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4929 RID_AUTO_TYPE.
4930 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4931 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4932 (c_parser_declarator, c_parser_direct_declarator_inner)
4933 (c_parser_parameter_declaration, c_parser_type_name): All callers
4934 changed.
4935 (c_parser_declaration_or_fndef): Handle declarations with type
4936 determined from the initializer.
4937
45b0be94
AM
49382013-11-12 Andrew MacLeod <amacleod@redhat.com>
4939
18f429e2 4940 * c-typeck.c: Include gimplify.h.
45b0be94 4941
582d9b50
JM
49422013-11-12 Joseph Myers <joseph@codesourcery.com>
4943
4944 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4945 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4946 comment.
4947 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4948 or _Thread_local as appropriate in diagnostics.
4949 (build_null_declspecs): Initialize ret->thread_gnu_p.
4950 (declspecs_add_scspec): Handle either __thread or _Thread_local
4951 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4952 pedantic. Do not disallow _Thread_local extern and _Thread_local
4953 static.
4954
267bac10
JM
49552013-11-07 Joseph Myers <joseph@codesourcery.com>
4956 Andrew MacLeod <amacleod@redhat.com>
4957
4958 * c-aux-info.c (gen_type): Handle atomic qualifier.
4959 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4960 qualifiers when compating types.
4961 (shadow_tag_warned): Handle atomic_p in declspecs.
4962 (quals_from_declspecs): Likewise.
4963 (start_decl): Use c_type_promotes_to when promoting argument
4964 types.
4965 (grokdeclarator): Handle _Atomic.
4966 (get_parm_info): Diagnose any qualifier on "void" as only
4967 parameter.
4968 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4969 comparing types. Use c_type_promotes_to when promoting argument
4970 types.
4971 (finish_function): Use c_type_promotes_to when promoting argument
4972 types.
4973 (build_null_declspecs): Handle atomic_p in declspecs.
4974 (declspecs_add_qual): Handle RID_ATOMIC.
4975 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4976 (c_token_starts_declspecs): Handle RID_ATOMIC.
4977 (c_parser_declspecs): Handle atomic type specifiers and
4978 qualifiers.
4979 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4980 from types of expressions with atomic type.
4981 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4982 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4983 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4984 (c_parser_statement_after_labels, c_parser_switch_statement)
4985 (c_parser_for_statement, c_parser_expr_no_commas)
4986 (c_parser_conditional_expression, c_parser_binary_expression)
4987 (c_parser_cast_expression, c_parser_unary_expression)
4988 (c_parser_postfix_expression)
4989 (c_parser_postfix_expression_after_primary, c_parser_expression):
4990 Use convert_lvalue_to_rvalue.
4991 (c_parser_expression_conv, c_parser_expr_list): Document
4992 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4993 (c_parser_objc_synchronized_statement): Use
4994 convert_lvalue_to_rvalue.
4995 (c_parser_objc_selector): Handle RID_ATOMIC.
4996 (c_parser_objc_receiver, c_parser_array_notation): Use
4997 convert_lvalue_to_rvalue.
4998 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4999 _Atomic (type-name).
5000 (struct c_declspecs): Add atomic_p field.
5001 (convert_lvalue_to_rvalue): Declare.
5002 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5003 corresponding atomic types.
5004 (qualify_type): Don't add _Atomic qualifiers from second argument.
5005 (comp_target_types): Do not allow _Atomic mismatches.
5006 (type_lists_compatible_p): Do not remove atomic qualifiers when
5007 comparing types.
5008 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5009 (build_atomic_assign): New functions.
5010 (build_unary_op): Use build_atomic_assign for atomic increment and
5011 decrement.
5012 (build_conditional_expr): Do not treat _Atomic void as a qualified
5013 version of void.
5014 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5015 (find_anonymous_field_with_type, convert_to_anonymous_field)
5016 (convert_for_assignment): Do not remove atomic qualifiers when
5017 comparing types.
5018 (digest_init): Do not accept initialization of arrays of atomic
5019 elements by string constants.
5020 (build_asm_expr): Use convert_lvalue_to_rvalue.
5021 (build_binary_op): Do not treat _Atomic void as a qualified
5022 version of void.
5023
0c249d4b
DD
50242013-11-06 DJ Delorie <dj@redhat.com>
5025
5026 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5027 both explicit and builtin, print the location of the explicit one.
5028
6d7f7e0a
TB
50292013-11-05 Tobias Burnus <burnus@net-b.de>
5030
5031 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5032 c_parser_omp_distribute, c_parser_omp_teams,
5033 c_parser_omp_target, c_parser_omp_declare): Handle
5034 -fopenmp-simd.
5035
b906f4ca
MP
50362013-11-03 Marek Polacek <polacek@redhat.com>
5037
5038 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5039
ee1d5a02
JJ
50402013-11-01 Jakub Jelinek <jakub@redhat.com>
5041
5042 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5043 check_dup_generic at the end, unless remove is true.
5044 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5045 remove = true;.
5046 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5047
5a9785fb
JJ
50482013-10-31 Jakub Jelinek <jakub@redhat.com>
5049
5050 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5051 with decl that is not pointer nor array.
5052
939b37da
BI
50532013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5054
5055 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5056 a spawning function is found.
5057 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5058 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5059 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5060 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5061 case.
5062 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5063 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5064 expr.
5065 (c_finish_return): Added a check to reject _Cilk_spawn in return
5066 expression.
5067 (build_cilk_spawn): New function.
5068 (build_cilk_sync): Likewise.
5069 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5070
d4af74d4
TB
50712013-10-27 Tobias Burnus <burnus@net-b.de>
5072
5073 PR other/33426
5074 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5075 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5076 (c_parser_statement_after_labels): Update calls.
5077
d73749df 50782013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5079
5080 PR other/33426
5081 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5082 Handle PRAGMA_IVDEP.
5083 (c_parser_statement_after_labels): Update call.
5084
f28aa681
MP
50852013-10-24 Marek Polacek <polacek@redhat.com>
5086
5087 * c-parser.c (c_parser_struct_declaration): Add a comment.
5088 (c_parser_declarator): Don't allow _Alignas here.
5089
0645c1a2
AM
50902013-10-17 Andrew MacLeod <amacleod@redhat.com>
5091
5092 * c-parser.c: Include omp-low.h.
5093 * c-typeck.c: Likewise.
5094
568a31f2
MP
50952013-10-17 Marek Polacek <polacek@redhat.com>
5096
5097 PR c/58267
5098 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5099 Document syntax of the array-declarator.
5100 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5101 are not permitted.
5102 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5103 (c_parser_struct_declaration): Likewise.
5104 (c_parser_declarator): Likewise.
5105 (c_parser_direct_declarator_inner): Likewise.
5106 (c_parser_parameter_declaration): Likewise.
5107 (c_parser_type_name): Likewise.
5108
acf0174b
JJ
51092013-10-11 Jakub Jelinek <jakub@redhat.com>
5110
5111 * c-lang.h (current_omp_declare_target_attribute): New extern
5112 decl.
5113 * c-parser.c: Include c-lang.h.
5114 (struct c_parser): Change tokens to c_token *.
5115 Add tokens_buf field. Change tokens_avail type to unsigned int.
5116 (c_parser_consume_token): If parser->tokens isn't
5117 &parser->tokens_buf[0], increment parser->tokens.
5118 (c_parser_consume_pragma): Likewise.
5119 (enum pragma_context): Add pragma_struct and pragma_param.
5120 (c_parser_external_declaration): Adjust
5121 c_parser_declaration_or_fndef caller.
5122 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5123 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5124 Adjust recursive call.
5125 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5126 of pragma_external.
5127 (c_parser_parameter_declaration): Use pragma_param instead of
5128 pragma_external.
5129 (c_parser_compound_statement_nostart, c_parser_label,
5130 c_parser_for_statement): Adjust
5131 c_parser_declaration_or_fndef callers.
5132 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5133 it through to c_parser_conditional_expression.
5134 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5135 pass it through to c_parser_binary_expression. Adjust recursive
5136 call.
5137 (c_parser_binary_expression): Remove prec argument, add
5138 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5139 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5140 binop matches it, use build2 instead of parser_build_binary_op.
5141 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5142 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5143 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5144 Handle pragma_struct and pragma_param the same as pragma_external.
5145 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5146 (c_parser_omp_variable_list): Parse array sections for
5147 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5148 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5149 (c_parser_omp_clause_reduction): Handle user defined reductions.
5150 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5151 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5152 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5153 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5154 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5155 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5156 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5157 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5158 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5159 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5160 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5161 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5162 (c_parser_omp_for_loop): Add CODE argument, pass it through
5163 to c_finish_omp_for. Change last argument to cclauses,
5164 and adjust uses to grab parallel clauses from the array of all
5165 the split clauses. Adjust c_parser_binary_expression,
5166 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5167 (omp_split_clauses): New function.
5168 (c_parser_omp_simd): New function.
5169 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5170 Allow the function to be called also when parsing combined constructs,
5171 and call c_parser_omp_simd when parsing for simd.
5172 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5173 #pragma omp section, require exactly one structured-block instead of
5174 sequence of statements.
5175 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5176 Allow the function to be called also when parsing combined constructs.
5177 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5178 Allow the function to be called also when parsing combined
5179 constructs.
5180 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5181 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5182 c_parser_omp_teams, c_parser_omp_target_data,
5183 c_parser_omp_target_update, c_parser_omp_target,
5184 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5185 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5186 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5187 (c_parser_omp_construct): Add p_name and mask vars. Handle
5188 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5189 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5190 and c_parser_omp_sections callers.
5191 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5192 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5193 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5194 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5195 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5196 OMP_CLAUSE_DEPEND.
5197 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5198 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5199 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5200 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5201 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5202 * c-typeck.c: Include tree-inline.h.
5203 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5204 handle_omp_array_sections_1, handle_omp_array_sections,
5205 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5206 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5207 user defined reductions.
5208 (c_tree_equal): New function.
5209 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5210 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5211 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5212 c_check_omp_declare_reduction_r): New prototypes.
5213 * c-decl.c (current_omp_declare_target_attribute): New variable.
5214 (c_decl_attributes): New function.
5215 (start_decl, start_function): Use it instead of decl_attributes.
5216 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5217 c_omp_reduction_decl, c_omp_reduction_lookup,
5218 c_check_omp_declare_reduction_r): New functions.
5219
0a6c2227
TT
52202013-09-25 Tom Tromey <tromey@redhat.com>
5221
5222 * Make-lang.in (c/gccspec.o): Remove.
5223 (CFLAGS-c/gccspec.o): New variable.
5224 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5225 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5226 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5227
f3bc55f0
TT
52282013-09-25 Tom Tromey <tromey@redhat.com>
5229
5230 * Make-lang.in (c/gccspec.o): Don't use subshell.
5231
a24d975c
MP
52322013-09-18 Marek Polacek <polacek@redhat.com>
5233
5234 PR sanitize/58443
5235 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5236 Remove unnecessary check.
5237
ce6923c5
MP
52382013-09-18 Marek Polacek <polacek@redhat.com>
5239
5240 PR sanitizer/58411
5241 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5242 no_sanitize_undefined attribute.
5243
a1e51df9
KT
52442013-09-13 Kai Tietz <ktietz@redhat.com>
5245
5246 PR target/57848
5247 * c-decl.c (c_builtin_function_ext_scope): Remove
5248 wrong assumption that it is never called on prexisting
5249 symbol.
5250
0af94e6f
JR
52512013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5252
5253 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5254
20059c8b
GDR
52552013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5256
5257 * c-objc-common.c (c_tree_printer): Tidy.
5258
de5a5fa1
MP
52592013-08-30 Marek Polacek <polacek@redhat.com>
5260
5261 * c-typeck.c (build_binary_op): Add division by zero and shift
5262 instrumentation.
5263
2531a1d9 52642013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5265 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5266
6e2bcc98 5267 PR c/35649
2531a1d9
JR
5268 * c-typeck.c (c_common_type): Prefer double_type_node over
5269 other REAL_TYPE types with the same precision.
5270 (convert_arguments): Likewise.
5271
025311c4
GDR
52722013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5273
5274 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5275 (c_initialize_diagnostics): Call a destructor for the early printer.
5276
da6ca2b5
GDR
52772013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5278
5279 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5280 printer initialization.
5281
318cda85 52822013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5283
318cda85
BI
5284 PR c/57490
5285 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5286 check for truth values.
5287 (expand_array_notation_exprs): Added truth values case. Removed an
5288 unwanted else. Added for-loop to walk through subtrees in default
5289 case.
5290
b066401f
GDR
52912013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5292
5293 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5294
fb48aadc
JM
52952013-07-23 Joseph Myers <joseph@codesourcery.com>
5296
5297 * c-parser.c (struct c_generic_association): Fix typo.
5298
433cc7b0
TT
52992013-07-23 Tom Tromey <tromey@redhat.com>
5300 Joseph Myers <joseph@codesourcery.com>
5301
5302 * c-parser.c (struct c_generic_association): New.
5303 (c_generic_association_d): New typedef.
5304 (c_parser_generic_selection): New function.
5305 (c_parser_postfix_expression): Handle RID_GENERIC.
5306
26d40c3d
JM
53072013-07-13 Jason Merrill <jason@redhat.com>
5308
5309 PR c++/57793
5310 * c-decl.c (finish_struct): Check for too-large class.
5311
ecdbd01a 53122013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5313
5314 PR c/57821
5315 * c-typeck.c (set_init_index): When folding, check for index overflow.
5316
1141ed3f
BI
53172013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5318
5319 * c-parser.c (c_parser_array_notation): Removed rejection of array
5320 notations in an array of function pointers.
5321
713b46fa
BI
53222013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5323
5324 * c-array-notation.c (make_triplet_val_inv): New function.
5325 (create_cmp_incr): Likewise.
5326 (create_array_refs): Likewise.
5327 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5328 Also modularized common parts between functions and called the function.
5329 (build_array_notation_expr): Likewise.
5330 (fix_conditional_array_notations_1): Likewise.
5331 (fix_array_notation_expr): Likewise.
5332 (fix_array_notation_call_expr): Likewise.
5333
92f20202
MP
53342013-06-18 Marek Polacek <polacek@redhat.com>
5335
5336 PR c/57630
5337 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5338
73a23b06
BI
53392013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5340
5341 * c-array-notation.c (build_array_notation_expr): Reject array notation
5342 mismatch between LHS and RHS even inside a call_expr. Also, removed
5343 a couple while statements that were dead code.
5344
00b8517d
BI
53452013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5346
5347 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5348 excessive precision expressions in function parameters. Also removed
5349 couple unwanted while statements.
5350
1509bdda
BI
53512013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5352
5353 * c-array-notation.c (expand_array_notation_exprs): Added
5354 ARRAY_NOTATION_REF case.
5355
d60f1706
BI
53562013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5357
5358 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5359 function to c-family/array-notation-common.c.
5360 (is_cilkplus_reduce_builtin): Likewise.
5361 (find_rank): Likewise.
5362 (extract_array_notation_exprs): Likewise.
5363 (replace_array_notations): Likewise.
5364 (find_inv_trees): Likewise.
5365 (replace_inv_trees): Likewise.
5366 (contains_array_notation_expr): Likewise.
5367 (find_correct_array_notation_type): Likewise.
5368 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5369 (struct inv_list): Moved this to c-family/array-notation-common.c.
5370 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5371
6d6efbb3
BI
53722013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5373
5374 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5375 reduction functions outside the for-loop. Added a check if the fundecl
5376 is non-NULL. Finally, removed an unwanted if-statement, and made the
5377 body unconditional.
5378
25c22937
BI
53792013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5380
5381 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5382 condition of the if-statement matches the rank of else-block and then-
5383 block when array notations are used.
5384 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5385 expression after the entire function body is parsed.
5386 (c_parser_expr_no_commas): Delayed creating array notation expressions
5387 to the end of function parsing.
5388 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5389 whole if-statement instead of just the condition.
5390 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5391
edd25645
BI
53922013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5393
5394 PR c/57474
5395 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5396 array to NULL_TREE if they are unused. Also added a check for the
5397 field to be NULL before its fields are used in future.
5398
065ce7f1
RO
53992013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5400
5401 PR bootstrap/57450
5402 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5403 (build_array_notation_expr): Likewise.
5404
36536d79
BI
54052013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5406
5407 * c-typeck.c (build_array_ref): Added a check to see if array's
5408 index is greater than one. If true, then emit an error.
5409 (build_function_call_vec): Exclude error reporting and checking
5410 for builtin array-notation functions.
5411 (convert_arguments): Likewise.
5412 (c_finish_return): Added a check for array notations as a return
5413 expression. If true, then emit an error.
5414 (c_finish_loop): Added a check for array notations in a loop
5415 condition. If true then emit an error.
5416 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5417 (build_binary_op): Added a check for array notation expr inside
5418 op1 and op0. If present, we call another function to find correct
5419 type.
5420 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5421 * c-parser.c (c_parser_compound_statement): Check if array
5422 notation code is used in tree, if so, then transform them into
5423 appropriate C code.
5424 (c_parser_expr_no_commas): Check if array notation is used in LHS
5425 or RHS, if so, then build array notation expression instead of
5426 regular modify.
5427 (c_parser_postfix_expression_after_primary): Added a check for
5428 colon(s) after square braces, if so then handle it like an array
5429 notation. Also, break up array notations in unary op if found.
5430 (c_parser_direct_declarator_inner): Added a check for array
5431 notation.
5432 (c_parser_compound_statement): Added a check for array notation in
5433 a stmt. If one is present, then expand array notation expr.
5434 (c_parser_if_statement): Likewise.
5435 (c_parser_switch_statement): Added a check for array notations in
5436 a switch statement's condition. If true, then output an error.
5437 (c_parser_while_statement): Similarly, but for a while.
5438 (c_parser_do_statement): Similarly, but for a do-while.
5439 (c_parser_for_statement): Similarly, but for a for-loop.
5440 (c_parser_unary_expression): Check if array notation is used in a
5441 pre-increment or pre-decrement expression. If true, then expand
5442 them.
5443 (c_parser_array_notation): New function.
5444 * c-array-notation.c: New file.
5445 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5446
cd192ccc
MS
54472013-05-23 Mike Stump <mikestump@comcast.net>
5448
5449 * c-typeck.c (convert_for_assignment): Handle references to memory
5450 spaces better.
5451
427b248d
JM
54522013-05-16 Jason Merrill <jason@redhat.com>
5453
5454 * Make-lang.in (cc1$(exeext)): Use link mutex.
5455
44d90fe1
PC
54562013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5457
5458 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5459 to simply use OPT_Wpointer_arith.
5460 (build_unary_op): Likewise.
5461
4e7d7b3d
JJ
54622013-04-03 Jakub Jelinek <jakub@redhat.com>
5463
5464 PR c/19449
5465 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5466 argument. If set, or it temporarily for parsing of the first
5467 argument into force_folding_builtin_constant_p.
5468 (c_parser_postfix_expression): Adjust callers.
5469
839b422f
RB
54702013-03-21 Richard Biener <rguenther@suse.de>
5471
5472 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5473 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5474
2ee028f1
MP
54752013-02-12 Marek Polacek <polacek@redhat.com>
5476
5477 PR c/44938
5478 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5479 origtypes to NULL.
5480
8824edff
JJ
54812013-01-24 Jakub Jelinek <jakub@redhat.com>
5482
5483 PR c/56078
5484 * c-typeck.c (set_nonincremental_init_from_string): If
5485 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5486 returned false.
5487 (process_init_element): Likewise.
5488
eadd3d0d
JJ
54892012-12-20 Jakub Jelinek <jakub@redhat.com>
5490
5491 PR c++/55619
5492 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5493 argument, don't call default_function_array_conversion
5494 nor c_fully_fold here.
5495 (c_parser_asm_statement): Adjust callers.
5496 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5497 and outputs here, and call default_function_array_conversion
5498 on inputs that don't need to be addressable.
5499
f8a93a2e
JJ
55002012-12-18 Jakub Jelinek <jakub@redhat.com>
5501
5502 PR c/39464
5503 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5504 warning require that both c_common_unsigned_type as well as
5505 c_common_signed_type is the same for both mvl and mvr types.
5506
9771b263
DN
55072012-11-16 Diego Novillo <dnovillo@google.com>
5508
5509 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5510
5511 * c-common.c: Use new vec API in vec.h.
5512 * c-common.h: Likewise.
5513 * c-gimplify.c: Likewise.
5514 * c-pragma.c: Likewise.
5515 * c-pretty-print.c: Likewise.
5516 * c-pretty-print.h: Likewise.
5517 * c-semantics.c: Likewise.
5518 * c-decl.c: Likewise.
5519 * c-parser.c: Likewise.
5520 * c-tree.h: Likewise.
5521 * c-typeck.c: Likewise.
5522
880661a4
JW
55232012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5524
5525 PR c++/54930
5526 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5527
077d1abe
MLI
55282012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5529
5530 PR c/53066
5531 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5532 shadows a function, unless the variable is a function or a
5533 pointer-to-function.
5534
3a785c97
JJ
55352012-10-12 Jakub Jelinek <jakub@redhat.com>
5536
5537 PR c/54381
5538 * c-parser.c (struct c_tree_loc_pair): Removed.
5539 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5540 add location_t * and tree * arguments, fill in array of 3
5541 sizeof_arg trees and corresponding locs.
5542 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5543 c_parser_expr_list callers.
5544 (c_parser_postfix_expression_after_primary): Likewise. Pass
5545 array of 3 sizeof_arg trees and locs (corresponding to first
5546 3 arguments) to sizeof_pointer_memaccess_warning.
5547
703c8606
LC
55482012-10-09 Lawrence Crowl <crowl@google.com>
5549
5550 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5551 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5552 hash table.
5553
5d9de0d0
PC
55542012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5555
5556 PR c++/54194
5557 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5558 call.
5559
a212e43f
MG
55602012-10-09 Marc Glisse <marc.glisse@inria.fr>
5561
5562 PR c++/54427
5563 * c-typeck.c: Include c-common.h.
5564 (enum stv_conv): Moved to c-common.h.
5565 (scalar_to_vector): Moved to c-common.c.
5566 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5567 * Make-lang.in: c-typeck.c depends on c-common.h.
5568
3b78de56
AC
55692012-10-04 Arnaud Charlet <charlet@adacore.com>
5570
5571 * c-decl.c (c_write_global_declarations): Fix handling of
5572 -fdump-ada-spec*.
5573
78c60e3d
SS
55742012-09-30 Sharad Singhai <singhai@google.com>
5575
5576 * c-decl.c (c_write_global_declarations): Use a different method
5577 to determine if the dump has ben initialized.
5578
9f33203d
JM
55792012-09-14 Joseph Myers <joseph@codesourcery.com>
5580
5581 PR c/54552
5582 * c-typeck.c (c_cast_expr): When casting to a type requiring
5583 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5584 c_fully_fold first.
5585
a27d595d
JM
55862012-09-14 Joseph Myers <joseph@codesourcery.com>
5587
5588 PR c/54103
5589 * c-typeck.c (build_unary_op): Pass original argument of
5590 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5591 any C_MAYBE_CONST_EXPR, if it has integer operands.
5592 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5593 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5594 to c_objc_common_truthvalue_conversion, then remove any
5595 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5596 c_objc_common_truthvalue_conversion not
5597 c_common_truthvalue_conversion.
5598 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5599 call note_integer_operands for arguments with integer operands
5600 that are not integer constants.
5601
9feb29df
JJ
56022012-09-13 Jakub Jelinek <jakub@redhat.com>
5603
5604 PR c/54559
5605 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5606 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5607
d409320c
JJ
56082012-08-31 Jakub Jelinek <jakub@redhat.com>
5609
5610 PR c/54428
5611 * c-convert.c (convert): Don't call fold_convert_loc if
5612 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5613 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5614 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5615
6265d07c
JJ
56162012-08-24 Jakub Jelinek <jakub@redhat.com>
5617
5618 PR c/54355
5619 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5620 for nested and empty_ok arguments in the call to
5621 c_parser_declaration_or_fndef.
5622
1a4049e7
JJ
56232012-08-17 Jakub Jelinek <jakub@redhat.com>
5624
5625 * c-tree.h (c_last_sizeof_arg): Declare.
5626 * c-parser.c (struct c_tree_loc_pair): New type.
5627 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5628 non-NULL.
5629 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5630 (c_parser_postfix_expression_after_primary): Likewise. Call
5631 sizeof_pointer_memaccess_warning if needed.
5632 (sizeof_ptr_memacc_comptypes): New function.
5633 * c-typeck.c (c_last_sizeof_arg): New global variable.
5634 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5635
0229aee9
UB
56362012-07-24 Uros Bizjak <ubizjak@gmail.com>
5637
5638 * c-lang.h (lang_decl): Add variable_size GTY option.
5639
7ee2468b
SB
56402012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5641
5642 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5643 * Make-lang.in: Fix dependencies.
5644
d4a10d0a
SB
56452012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5646
5647 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5648 and add language Makefile hooks.
5649 * config-lang.in: New file.
5650 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5651 add the required "normal" config-lang.in rules.
5652 * c-lang.h: Moved from gcc/ to here.
5653 * c-tree.h: Likewise.
5654 * c-objc-common.c: Likewise.
5655 * c-objc-common.h: Likewise.
5656 * c-typeck.c: Likewise.
5657 * c-convert.c: Likewise.
5658 * c-lang.c: Likewise.
5659 * c-aux-info.c: Likewise.
5660 * c-errors.c: Likewise.
5661 * gccspec.c: Likewise.
5662 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5663 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5664\f
85ec4feb 5665Copyright (C) 2012-2018 Free Software Foundation, Inc.
d4a10d0a
SB
5666
5667Copying and distribution of this file, with or without modification,
5668are permitted in any medium without royalty provided the copyright
5669notice and this notice are preserved.