]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
[gcc.git] / gcc / c / ChangeLog
CommitLineData
80c6d1f4
MJ
12018-09-17 Martin Jambor <mjambor@suse.cz>
2
3 PR c/63886
4 * c-parser.c: (warn_for_abs): New function.
5 (c_parser_postfix_expression_after_primary): Call it.
6
4a426e36
BE
72018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
8
9 * c-typeck.c (digest_init): Shorten overlength strings.
10
6d900107
BE
112018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
12
13 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
14
b5764229
BE
152018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
16
17 * c-decl.c (finish_decl): Call braced_list_to_string here ...
18 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
19
22eea6b2
AM
202018-08-30 Alexander Monakov <amonakov@ispras.ru>
21
22 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
23 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
24
85204e23
DM
252018-08-27 David Malcolm <dmalcolm@redhat.com>
26
27 PR 87091
28 * c-decl.c (implicitly_declare): Update call to
29 maybe_add_include_fixit to suggest overriding the location, as it
30 is for a note.
31 * c-objc-common.c (c_tree_printer): Update for conversion of
32 show_caret_p to a tri-state.
33
3d78e008
ML
342018-08-27 Martin Liska <mliska@suse.cz>
35
36 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
37 fndecl_built_in_p and remove check for FUNCTION_DECL if
38 possible.
3d78e008
ML
39 (diagnose_mismatched_decls): Likewise.
40 (merge_decls): Likewise.
41 (warn_if_shadowing): Likewise.
42 (pushdecl): Likewise.
43 (implicitly_declare): Likewise.
44 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
45 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
46 * c-typeck.c (build_function_call_vec): Likewise.
47 (convert_arguments): Likewise.
48
097f82ec
DM
492018-08-20 David Malcolm <dmalcolm@redhat.com>
50
51 PR other/84889
52 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
53 (diagnose_mismatched_decls): Likewise, in various places.
54 (warn_if_shadowing): Likewise.
55 (implicit_decl_warning): Likewise.
56 (implicitly_declare): Likewise.
57 (undeclared_variable): Likewise.
58 (declare_label): Likewise.
59 (grokdeclarator): Likewise.
60 (start_function): Likewise.
61 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
62 (c_parser_parameter_declaration): Likewise.
63 (c_parser_binary_expression): Likewise.
64 * c-typeck.c (c_expr_sizeof_expr): Likewise.
65 (parser_build_binary_op): Likewise.
66 (build_unary_op): Likewise.
67 (error_init): Likewise.
68 (pedwarn_init): Likewise.
69 (warning_init): Likewise.
70 (convert_for_assignment): Likewise.
71
96e6ae57
DM
722018-08-15 David Malcolm <dmalcolm@redhat.com>
73
74 * c-objc-common.c: Include "gcc-rich-location.h".
75 (c_tree_printer): Move implemenation of '%T' to...
76 (print_type): ...this new function.
77 (range_label_for_type_mismatch::get_text): New function.
78 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
79 range for the various ic_argpass cases.
80 (class maybe_range_label_for_tree_type_mismatch): New class.
81 (build_binary_op): Use it when calling binary_op_error.
82
0cd020ae
PK
832018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
84
85 * c-decl.c (start_decl): Do not warn if variables is named as main
86 and is a local variable.
87
72733314
IS
882018-08-15 Iain Sandoe <iain@sandoe.co.uk>
89
90 PR c/19315
91 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
92 objects of unknown size.
93
23aa9f7c
MS
942018-08-13 Martin Sebor <msebor@redhat.com>
95
96 PR tree-optimization/71625
97 * c-parser.c (c_parser_declaration_or_fndef): Call
98 braced_list_to_string.
99
e5e7e50d
BH
1002018-08-03 Bogdan Harjoc <harjoc@gmail.com>
101
102 PR c/86690
103 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
104 errors.
105
8a45b051
MS
1062018-08-01 Martin Sebor <msebor@redhat.com>
107
108 PR tree-optimization/86650
109 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
110 and TREE_BLOCK (t) from within percent_K_format to this callsite.
111
5922dcb5
JJ
1122018-08-01 Jakub Jelinek <jakub@redhat.com>
113
114 PR c/85704
115 * c-typeck.c (init_field_decl_cmp): New function.
116 (output_pending_init_elements): Use it for field comparisons
117 instead of pure bit_position comparisons.
118
9b452033
JJ
1192018-07-12 Jakub Jelinek <jakub@redhat.com>
120
121 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
122 type here, instead add "omp declare target implicit" attribute.
123 (finish_decl): Diagnose vars without mappable type here.
124
829c6349
CLT
1252018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
126 Thomas Schwinge <thomas@codesourcery.com>
127 Cesar Philippidis <cesar@codesourcery.com>
128
129 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
130 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
131 to their non-present_or_* counterparts. Make 'self' an alias to
132 PRAGMA_OACC_CLAUSE_HOST.
133 (c_parser_oacc_data_clause): Update GOMP mappings for
134 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
135 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
136 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
137 Remove support for present_or_* clauses.
138 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
139 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
140 (OACC_DECLARE_CLAUSE_MASK): Likewise.
141 (OACC_DATA_CLAUSE_MASK): Likewise.
142 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
143 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
144 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
145 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
146 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
147
e197e64e
KV
1482018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
149
150 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
151 * gimple-parser.c (c_parser_gimple_statement): Likewise.
152 (c_parser_gimple_unary_expression): Likewise.
153
487f2f61
JJ
1542018-06-15 Jakub Jelinek <jakub@redhat.com>
155
156 PR c/86093
157 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
158 before doing POINTER_DIFF_EXPR.
159
e4d44a37
MP
1602018-06-07 Marek Polacek <polacek@redhat.com>
161
162 PR c/85318
163 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
164 for loop initial declarations.
165
b67b9225
DP
1662018-05-30 David Pagan <dave.pagan@oracle.com>
167
168 PR c/55976
169 * c-decl.c (grokdeclarator): Update check for return type warnings.
170 (start_function): Likewise.
171 (finish_function): Likewise.
172 * c-typeck.c (c_finish_return): Update check for return type warnings.
173 Pass OPT_Wreturn_type to pedwarn when appropriate.
174
c566cc9f
RS
1752018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
176
177 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
178 __FMA_EXPR handlng.
179
e4f81565
RS
1802018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
181
182 * gimple-parser.c: Include internal-fn.h.
183 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
184 (c_parser_gimple_call_internal): New function.
185 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
186 Fix typos in comment.
187
79e7b1fe
JJ
1882018-05-10 Jakub Jelinek <jakub@redhat.com>
189
190 PR c++/85662
191 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
192 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
193 fold_convert_loc.
194 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
195 fold_offsetof_1, pass argtype as TYPE to it and drop the
196 fold_convert_loc.
197
f7584c81
DP
1982018-05-02 David Pagan <dave.pagan@oracle.com>
199
200 PR c/30552
201 * c-decl.c (old_style_parameter_scope): New function.
202 * c-parser.c (c_parser_postfix_expression): Check for statement
203 expressions in old-style function parameter list declarations.
204 * c-parser.h (old_style_parameter_scope): New extern declaration.
205
b33a0cb3
JJ
2062018-04-25 Jakub Jelinek <jakub@redhat.com>
207
208 PR sanitizer/84307
209 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
210 it is not TREE_STATIC.
211 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
212 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
213 its COMPOUND_LITERAL_EXPR_DECL.
214
c5c5822a
JM
2152018-03-21 Joseph Myers <joseph@codesourcery.com>
216
217 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
218 where all functions return the same _FloatN or _FloatNx type,
219 treat integer types as _Float64 instead of double.
220
aa1c9429
JJ
2212018-03-21 Jakub Jelinek <jakub@redhat.com>
222
223 PR c/84999
224 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
225 building vector comparison, diagnose it and return error_mark_node.
226
9bb45a95
JJ
2272018-03-15 Jakub Jelinek <jakub@redhat.com>
228
229 PR c/84853
230 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
231 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
232 INTEGER_TYPE element type.
233
ada6bad9
DP
2342018-03-13 David Pagan <dave.pagan@oracle.com>
235
236 PR c/46921
237 * c-typeck.c (output_init_element): Ensure field initializer
238 expression is always evaluated if there are side effects.
239
849bbdb9
JJ
2402018-03-06 Jakub Jelinek <jakub@redhat.com>
241
242 PR c/84721
243 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
244 !building_stmt_list_p ().
245
d74641bd
RS
2462018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
247
248 PR c/84305
249 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
250 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
251 and include the BIND_EXPR in the list of things that need to be
252 pre-evaluated.
253
0444aa9c
NS
2542018-02-09 Nathan Sidwell <nathan@acm.org>
255
256 PR c/84293
257 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
258 to strict_aliasing_warning.
259
7c30b12a
PC
2602018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
261
262 * c-typeck.c (really_start_incremental_init, push_init_level,
263 set_nonincremental_init, output_init_element, process_init_element):
264 Use DECL_UNNAMED_BIT_FIELD.
265
2be4dfcb
MP
2662018-01-31 Marek Polacek <polacek@redhat.com>
267
268 PR c/81779
269 * c-parser.c (c_parser_compound_statement_nostart): Call
270 expansion_point_location_if_in_system_header.
271
bb9869d5
DM
2722018-01-17 David Malcolm <dmalcolm@redhat.com>
273
274 PR c++/83814
275 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
276 the C part.
277
b4923738
JJ
2782018-01-13 Jakub Jelinek <jakub@redhat.com>
279
280 PR c/83801
281 * c-tree.h (decl_constant_value_1): Add a bool argument.
282 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
283 returning a CONSTRUCTOR if it is true. Use error_operand_p.
284 (decl_constant_value): Adjust caller.
285 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
286 decl_constant_value_1 as IN_INIT. Otherwise, punt if
287 decl_constant_value returns initializer that has BLKmode or
288 array type.
289 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
290
928686b1
RS
2912018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
292 Alan Hayward <alan.hayward@arm.com>
293 David Sherwood <david.sherwood@arm.com>
294
295 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
296 TYPE_VECTOR_SUBPARTS.
297
85ec4feb
JJ
2982018-01-03 Jakub Jelinek <jakub@redhat.com>
299
300 Update copyright years.
301
913884f7
JJ
3022018-01-01 Jakub Jelinek <jakub@redhat.com>
303
304 PR c/83595
305 * c-parser.c (c_parser_braced_init, c_parser_initelt,
306 c_parser_conditional_expression, c_parser_cast_expression,
307 c_parser_sizeof_expression, c_parser_alignof_expression,
308 c_parser_postfix_expression, c_parser_omp_declare_reduction,
309 c_parser_transaction_expression): Use set_error () method instead
310 of setting value member to error_mark_node.
311
c6cfa2bf
MM
3122017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
313
314 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
315 and _Float<N>X built-in functions.
316
11d29d63
JJ
3172017-12-22 Jakub Jelinek <jakub@redhat.com>
318
14ec014e
JJ
319 PR debug/83550
320 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
321 TYPE_STUB_DECL and call rest_of_type_compilation before processing
322 incomplete vars rather than after it.
323
11d29d63
JJ
324 PR debug/83547
325 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
326 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
327 and consider empty ones if there are no other stmts. For
328 -Wunused-value walk all statements before the one only followed by
329 DEBUG_BEGIN_STMTs.
330
170a8bd6 3312017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 332 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
333
334 * c-parser.c (c_parser_while_statement): Add unroll parameter and
335 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
336 (c_parser_do_statement): Likewise.
337 (c_parser_for_statement): Likewise.
338 (c_parser_statement_after_labels): Adjust calls to above.
339 (c_parse_pragma_ivdep): New static function.
340 (c_parser_pragma_unroll): Likewise.
341 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
342 <PRAGMA_UNROLL>: New case.
343
01512446
JJ
3442017-12-19 Jakub Jelinek <jakub@redhat.com>
345
346 * c-typeck.c (comptypes_internal, function_types_compatible_p,
347 perform_integral_promotions, digest_init): Replace Yoda conditions
348 with typical order conditions.
349 * c-decl.c (check_bitfield_type_and_width): Likewise.
350
c65e18d3
BE
3512017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
352
353 * c-typeck.c (c_safe_arg_type_equiv_p,
354 c_safe_function_type_cast_p): New function.
355 (build_c_cast): Implement -Wcast-function-type.
356
b7280579
RB
3572017-12-14 Richard Biener <rguenther@suse.de>
358
359 PR c/83415
360 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
361 like REALPART_EXPR for the behavior of whether its operand
362 is an lvalue.
363
49e6a6c0
MP
3642017-12-12 Marek Polacek <polacek@redhat.com>
365
366 PR c/82679
367 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
368
96a95ac1
AO
3692017-12-12 Alexandre Oliva <aoliva@redhat.com>
370
371 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
372 * c-parser.c (add_debug_begin_stmt): New.
373 (c_parser_declaration_or_fndef): Call it.
374 (c_parser_compound_statement_nostart): Likewise.
375 (c_parser_statement_after_labels): Likewise.
376 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
377
4b2b493f
JM
3782017-12-07 Joseph Myers <joseph@codesourcery.com>
379
380 * c-decl.c (build_compound_literal): Add parameter alignas_align
381 and set alignment of decl if nonzero.
382 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
383 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
384 qualifier.
385 (c_parser_struct_declaration): Update syntax comment.
386 (c_parser_type_name): Add alignas_ok argument and pass it to
387 c_parser_declspecs.
388 (c_parser_cast_expression): Pass true to c_parser_type_name and
389 give error if a cast used an _Alignas specifier.
390 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
391 give error if sizeof (type-name) used an _Alignas specifier.
392 (c_parser_alignof_expression): Pass true to c_parser_type_name and
393 give error if _Alignof (type-name) used an _Alignas specifier.
394 (c_parser_postfix_expression_after_paren_type): Check specified
395 alignment for a compound literal and pass it to
396 build_compound_literal.
397 * c-parser.h (c_parser_type_name): Update prototype.
398 * c-tree.h (build_compound_literal): Update prototype.
399
5d9ae53d
MS
4002017-12-07 Martin Sebor <msebor@redhat.com>
401
402 PR c/81544
403 * c-decl.c (c_decl_attributes): Look up existing declaration and
404 pass it to decl_attributes.
405
c79144f8
DM
4062017-12-06 David Malcolm <dmalcolm@redhat.com>
407
408 PR c/83236
409 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
410 reserved for use by the implementation.
411
613bc14f
DM
4122017-12-06 David Malcolm <dmalcolm@redhat.com>
413
414 * c-decl.c: Include "c-family/c-spellcheck.h".
415
05abad4c
ML
4162017-12-05 Martin Liska <mliska@suse.cz>
417 Jakub Jelinek <jakub@redhat.com>
418
419 * c-typeck.c (pointer_diff): Add new argument and instrument
420 pointer subtraction.
421 (build_binary_op): Similar for pointer comparison.
422
cc6534d4
JJ
4232017-12-01 Jakub Jelinek <jakub@redhat.com>
424
65791f42
JJ
425 PR c/79153
426 * c-parser.c: Include tree-iterator.h.
427 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
428 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
429 on it.
430
cc6534d4
JJ
431 PR c/83222
432 * c-tree.h (decl_constant_value_1): Declare.
433 * c-typeck.c (decl_constant_value_1): New function.
434 (decl_constant_value): Use it.
435 * c-fold.c (c_fully_fold_internal): If in_init, use
436 decl_constant_value_1 instead of decl_constant_value.
437
5de73c05
JJ
4382017-11-30 Jakub Jelinek <jakub@redhat.com>
439
440 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
441
058f0b9e
JJ
4422017-11-28 Jakub Jelinek <jakub@redhat.com>
443
444 PR sanitizer/81275
445 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
446 c_switch_covers_all_cases_p returns true.
447
5e9d6aa4 4482017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 449 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
450
451 * Make-lang.in (c/c-array-notation.o): Remove.
452 * c-array-notation.c: Delete.
453 * c-decl.c: Remove cilkplus condition.
454 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
455 c_parser_cilk_verify_simd, c_parser_array_notation,
456 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
457 c_parser_cilk_simd_fn_vector_attrs,
458 c_finish_cilk_simd_fn_tokens): Delete.
459 (c_parser_declaration_or_fndef): Remove cilkplus condition.
460 (c_parser_direct_declarator_inner): Ditto.
461 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
462 (c_parser_attributes, c_parser_compound_statement,
463 c_parser_statement_after_labels, c_parser_if_statement,
464 c_parser_switch_statement, c_parser_while_statement,
465 c_parser_do_statement, c_parser_for_statement,
466 c_parser_unary_expression, c_parser_postfix_expression,
467 c_parser_postfix_expression_after_primary,
468 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
469 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
470 support.
471 * c-typeck.c (build_array_ref, build_function_call_vec,
472 convert_arguments,
473 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
474 c_finish_loop, build_binary_op): Remove cilkplus support.
475
9e851845
JJ
4762017-11-28 Jakub Jelinek <jakub@redhat.com>
477
478 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
479 of build3.
480
8c7dbea9
BK
4812017-11-14 Boris Kolpackov <boris@codesynthesis.com>
482
483 * Make-lang.in (c.install-plugin): Install backend import library.
484
41521dee
JJ
4852017-11-23 Jakub Jelinek <jakub@redhat.com>
486
487 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
488 pragma_stmt context.
489
ac9effed
EB
4902017-11-23 Mike Stump <mikestump@comcast.net>
491 Eric Botcazou <ebotcazou@adacore.com>
492
493 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
494 ANNOTATE_EXPR.
495 (c_parser_do_statement): Likewise.
496 (c_parser_for_statement): Likewise.
497
ce95abc4
DM
4982017-11-22 David Malcolm <dmalcolm@redhat.com>
499
500 PR c++/62170
501 * c-objc-common.c (c_tree_printer): Convert penultimate param from
502 bool to bool *. Within '%T' handling, if showing an "aka", use
503 "quoted" param to add appropriate quoting.
504
974aedcc
MP
5052017-11-22 Marek Polacek <polacek@redhat.com>
506
507 PR c++/60336
508 PR middle-end/67239
509 PR target/68355
510 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
511
d4300cc6
DM
5122017-11-21 David Malcolm <dmalcolm@redhat.com>
513
514 PR c/83056
515 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
516 earlier failed lookups.
517
1af4ebf5
MG
5182017-11-21 Marc Glisse <marc.glisse@inria.fr>
519
520 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
521 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
522
26edace6
DM
5232017-11-20 David Malcolm <dmalcolm@redhat.com>
524
525 PR c/81404
526 * c-decl.c: Include "c-family/known-headers.h".
527 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
528 to known-headers.cc.
529 (class suggest_missing_header): Move to known-header.h.
530 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
531 than get_c_name_hint.
532
b1212255
DM
5332017-11-20 David Malcolm <dmalcolm@redhat.com>
534
535 * c-decl.c (get_c_name_hint): New function.
536 (class suggest_missing_header): New class.
537 (lookup_name_fuzzy): Call get_c_name_hint and use it to
538 suggest missing headers to the user.
539
6c7a259b
DM
5402017-11-20 David Malcolm <dmalcolm@redhat.com>
541
542 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
543 Include "c-family/name-hint.h"
544 (implicit_decl_warning): Convert "hint" from
545 const char * to name_hint. Pass location to
546 lookup_name_fuzzy. Suppress any deferred diagnostic if the
547 warning was not printed.
548 (undeclared_variable): Likewise for "guessed_id".
549 (lookup_name_fuzzy): Convert return type from const char *
550 to name_hint. Add location_t param.
551 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
552 Include "c-family/name-hint.h"
553 (c_parser_declaration_or_fndef): Convert "hint" from
554 const char * to name_hint. Pass location to lookup_name_fuzzy.
555 (c_parser_parameter_declaration): Likewise.
556
f9c59f7e
JJ
5572017-11-19 Jakub Jelinek <jakub@redhat.com>
558
559 PR c/66618
560 PR c/69960
561 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
562 where needed.
563 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
564 handle_omp_array_sections): Likewise.
565 (digest_init): Don't call decl_constant_value_for_optimization.
566 * c-tree.h (decl_constant_value_for_optimization): Removed.
567 * c-fold.c (c_fold_array_ref): New function.
568 (c_fully_fold_internal): Add LVAL argument, propagate it through
569 recursive calls. For VAR_P call decl_constant_value and
570 unshare if not LVAL and either optimizing or IN_INIT. Remove
571 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
572 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
573 (c_fully_fold): Add LVAL argument, pass it through to
574 c_fully_fold_internal.
575 (decl_constant_value_for_optimization): Removed.
576
3ca0dc60
JM
5772017-11-15 Joseph Myers <joseph@codesourcery.com>
578
579 PR c/81156
580 * c-parser.c (check_tgmath_function): New function.
581 (enum tgmath_parm_kind): New enum.
582 (c_parser_postfix_expression): Handle __builtin_tgmath.
583
64a5912c
DM
5842017-10-31 David Malcolm <dmalcolm@redhat.com>
585
586 * c-decl.c (implicit_decl_warning): Update for renaming of
587 pedwarn_at_rich_loc and warning_at_rich_loc.
588 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
589 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
590 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
591 (c_parser_struct_or_union_specifier): Likewise for renaming of
592 pedwarn_at_rich_loc.
593 (c_parser_parameter_declaration): Likewise for renaming of
594 error_at_rich_loc.
595 * c-typeck.c (build_component_ref): Likewise.
596 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
597 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
598 (set_init_label): Likewise for renaming of error_at_rich_loc.
599
c1136864
RB
6002017-10-30 Richard Biener <rguenther@suse.de>
601
602 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
603 stmts.
604
ee5fd23a
MM
6052017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
606
607 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
608 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
609
1a59ccf2
DM
6102017-10-25 David Malcolm <dmalcolm@redhat.com>
611
612 PR c/7356
613 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
614 semicolons.
615
bc1a75dd
JJ
6162017-10-25 Jakub Jelinek <jakub@redhat.com>
617
618 PR libstdc++/81706
619 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
620 newdecl to corresponding __builtin_ if any.
621
ff1ff960
PC
6222017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
623
624 PR c++/82466
625 * c-decl.c (diagnose_mismatched_decls): Use
626 OPT_Wbuiltin_declaration_mismatch.
627
62e1c678
DM
6282017-10-12 David Malcolm <dmalcolm@redhat.com>
629
630 * c-parser.c (c_parser_require): Add "type_is_unique" param and
631 use it to guard calls to maybe_suggest_missing_token_insertion.
632 (c_parser_parms_list_declarator): Override default value of new
633 "type_is_unique" param to c_parser_require.
634 (c_parser_asm_statement): Likewise.
635 * c-parser.h (c_parser_require): Add "type_is_unique" param,
636 defaulting to true.
637
a92f6726
NS
6382017-10-11 Nathan Sidwell <nathan@acm.org>
639
640 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
641
8e6cdc90
RS
6422017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
643
644 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
645 operating on trees as wide_ints.
646 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
647 (c_tree_equal): Likewise.
648
8139a48e
DM
6492017-10-04 David Malcolm <dmalcolm@redhat.com>
650
651 * c-decl.c (push_parm_decl): Store c_parm's location into the
652 PARAM_DECL.
653 (build_c_parm): Add "loc" param and store it within the c_parm.
654 * c-parser.c (struct c_parser): Add "last_token_location" field.
655 (c_parser_consume_token): Store location of the token into the
656 new field.
657 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
658 when handling a FUNCTION_DECL, if it doesn't already have them.
659 (c_parser_parameter_declaration): Generate a location for the
660 parameter, and pass it to the call to build_c_parm.
661 * c-tree.h (struct c_parm): Add field "loc".
662 (build_c_parm): Add location_t param.
663 * c-typeck.c (get_fndecl_argument_location): New function.
664 (inform_for_arg): New function.
665 (convert_for_assignment): Use inform_for_arg when dealing with
666 ic_argpass.
667
2a389958
JJ
6682017-09-29 Jakub Jelinek <jakub@redhat.com>
669
7d386d45
JJ
670 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
671 width is non-NULL.
672 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
673 don't SET_DECL_C_BIT_FIELD here.
674
2a389958
JJ
675 PR c/82340
676 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
677 instead of trying to set just TREE_READONLY manually.
678
ebc6a85e
TV
6792017-09-16 Tom de Vries <tom@codesourcery.com>
680
681 PR c/81875
682 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
683 cond itself.
684
bb75facd
JM
6852017-09-15 Joseph Myers <joseph@codesourcery.com>
686
687 PR c/82071
688 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
689 for C11.
690 (build_conditional_expr): For C11, generate result with excess
691 precision when one argument is an integer and the other is of a
692 type using excess precision.
693
1d933576
BE
6942017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
695
696 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
697
267bbb6f
MP
6982017-09-13 Marek Polacek <polacek@redhat.com>
699
700 PR c/82167
701 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
702 than expr.original_type.
703
6836632e
NS
7042017-09-12 Nathan Sidwell <nathan@acm.org>
705
706 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
707 resort_sorted_fields): Moved from c-family/c-common.c.
708 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
709
e035be33
JM
7102017-09-01 Joseph Myers <joseph@codesourcery.com>
711
712 PR c/82071
713 * c-typeck.c (build_atomic_assign): Handle argument with excess
714 precision. Ensure any EXCESS_PRECISION_EXPR is present in
715 argument passed to build_binary_op and convert_for_assignment but
716 not for call to c_fully_fold.
717 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
718 Ensure build_binary_op is called with argument with original
719 semantic type. Avoid calling c_fully_fold with an
720 EXCESS_PRECISION_EXPR from build_binary_op.
721
d2e05fcb
JJ
7222017-09-01 Jakub Jelinek <jakub@redhat.com>
723
724 PR c/81887
725 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
726
b397965c
RS
7272017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
728 Alan Hayward <alan.hayward@arm.com>
729 David Sherwood <david.sherwood@arm.com>
730
731 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
732 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
733 m1 and m2 to the signed equivalent of a fixed-point
734 SCALAR_TYPE_MODE.
735
14e18d71
DM
7362017-08-24 David Malcolm <dmalcolm@redhat.com>
737
738 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
739 than CAN_HAVE_LOCATION_P when determining whether to use the
740 location_t value within "value".
741
7f204c0f
DM
7422017-08-21 David Malcolm <dmalcolm@redhat.com>
743
744 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
745 rather than peeking the location of the first token.
746 * c-tree.h (c_expr::get_location): New method.
747
2f687306
DM
7482017-08-21 David Malcolm <dmalcolm@redhat.com>
749
750 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
751 to check_function_arguments.
752
3e7b80d7
MP
7532017-08-18 Marek Polacek <polacek@redhat.com>
754
755 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
756 commentary.
757
00aa1fa2
L
7582017-08-18 H.J. Lu <hongjiu.lu@intel.com>
759
760 PR c/53037
761 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
762 (check_bitfield_type_and_width): Don't allow bit-field with
763 warn_if_not_aligned type.
764
da67acb9
MS
7652017-08-14 Martin Sebor <msebor@redhat.com>
766
767 PR c/81117
768 * c-objc-common.c (c_objc_common_init): Handle 'G'.
769
bb85aa74
MP
7702017-08-11 Marek Polacek <polacek@redhat.com>
771
772 PR c/81795
773 * c-decl.c (pushtag): Only print inform if the warning was printed.
774 (grokdeclarator): Likewise.
775
32129a17
DM
7762017-08-10 David Malcolm <dmalcolm@redhat.com>
777
778 * c-parser.c (c_parser_error): Rename to...
779 (c_parser_error_richloc): ...this, making static, and adding
780 "richloc" parameter, passing it to the c_parse_error call,
781 rather than calling c_parser_set_source_position_from_token.
782 (c_parser_error): Reintroduce, reimplementing in terms of the
783 above, converting return type from void to bool.
784 (class token_pair): New class.
785 (struct matching_paren_traits): New struct.
786 (matching_parens): New typedef.
787 (struct matching_brace_traits): New struct.
788 (matching_braces): New typedef.
789 (get_matching_symbol): New function.
790 (c_parser_require): Add param MATCHING_LOCATION, using it to
791 highlight matching "opening" tokens for missing "closing" tokens.
792 (c_parser_skip_until_found): Likewise.
793 (c_parser_static_assert_declaration_no_semi): Convert explicit
794 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
795 class matching_parens, so that the pertinent open parenthesis is
796 highlighted when there are problems locating the close
797 parenthesis.
798 (c_parser_struct_or_union_specifier): Likewise.
799 (c_parser_typeof_specifier): Likewise.
800 (c_parser_alignas_specifier): Likewise.
801 (c_parser_simple_asm_expr): Likewise.
802 (c_parser_braced_init): Likewise, for matching_braces.
803 (c_parser_paren_condition): Likewise, for matching_parens.
804 (c_parser_switch_statement): Likewise.
805 (c_parser_for_statement): Likewise.
806 (c_parser_asm_statement): Likewise.
807 (c_parser_asm_operands): Likewise.
808 (c_parser_cast_expression): Likewise.
809 (c_parser_sizeof_expression): Likewise.
810 (c_parser_alignof_expression): Likewise.
811 (c_parser_generic_selection): Likewise.
812 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
813 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
814 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
815 In case CPP_OPEN_PAREN, pass loc_open_paren to the
816 c_parser_skip_until_found call.
817 (c_parser_objc_class_definition): Use class matching_parens as
818 above.
819 (c_parser_objc_method_decl): Likewise.
820 (c_parser_objc_try_catch_finally_statement): Likewise.
821 (c_parser_objc_synchronized_statement): Likewise.
822 (c_parser_objc_at_property_declaration): Likewise.
823 (c_parser_oacc_wait_list): Likewise.
824 (c_parser_omp_var_list_parens): Likewise.
825 (c_parser_omp_clause_collapse): Likewise.
826 (c_parser_omp_clause_default): Likewise.
827 (c_parser_omp_clause_if): Likewise.
828 (c_parser_omp_clause_num_threads): Likewise.
829 (c_parser_omp_clause_num_tasks): Likewise.
830 (c_parser_omp_clause_grainsize): Likewise.
831 (c_parser_omp_clause_priority): Likewise.
832 (c_parser_omp_clause_hint): Likewise.
833 (c_parser_omp_clause_defaultmap): Likewise.
834 (c_parser_oacc_single_int_clause): Likewise.
835 (c_parser_omp_clause_ordered): Likewise.
836 (c_parser_omp_clause_reduction): Likewise.
837 (c_parser_omp_clause_schedule): Likewise.
838 (c_parser_omp_clause_num_teams): Likewise.
839 (c_parser_omp_clause_thread_limit): Likewise.
840 (c_parser_omp_clause_aligned): Likewise.
841 (c_parser_omp_clause_linear): Likewise.
842 (c_parser_omp_clause_safelen): Likewise.
843 (c_parser_omp_clause_simdlen): Likewise.
844 (c_parser_omp_clause_depend): Likewise.
845 (c_parser_omp_clause_map): Likewise.
846 (c_parser_omp_clause_device): Likewise.
847 (c_parser_omp_clause_dist_schedule): Likewise.
848 (c_parser_omp_clause_proc_bind): Likewise.
849 (c_parser_omp_clause_uniform): Likewise.
850 (c_parser_omp_for_loop): Likewise.
851 (c_parser_cilk_clause_vectorlength): Likewise.
852 (c_parser_cilk_clause_linear): Likewise.
853 (c_parser_transaction_expression): Likewise.
854 * c-parser.h (c_parser_require): Add param matching_location with
855 default UNKNOWN_LOCATION.
856 (c_parser_error): Convert return type from void to bool.
857 (c_parser_skip_until_found): Add param matching_location with
858 default UNKNOWN_LOCATION.
859
30af3a2b
MP
8602017-08-09 Marek Polacek <polacek@redhat.com>
861
862 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
863 * c-tree.h (build_external_ref): Update declaration.
864 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
865 (build_external_ref): Change the type of a parameter to bool.
866 (parser_build_binary_op): Use true/false instead of 1/0.
867 (pointer_diff): Likewise.
868 (build_modify_expr): Likewise.
869 (set_designator): Change the type of a parameter to bool.
870 (set_init_index): Use true/false instead of 1/0.
871 (set_init_label): Likewise.
872 (output_init_element): Change the type of a parameter to bool.
873 (output_pending_init_elements): Use true/false instead of 1/0.
874 (process_init_element): Likewise.
875 (build_binary_op): Change the type of a parameter to bool.
876
296c53ac
MP
8772017-08-09 Marek Polacek <polacek@redhat.com>
878
879 PR c/81233
880 * c-typeck.c (pedwarn_init): Make the function take a variable list.
881 Call emit_diagnostic_valist instead of pedwarn.
882 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
883 Print the relevant types in diagnostics.
884
a32c8316
MP
8852017-08-09 Marek Polacek <polacek@redhat.com>
886
887 PR c/81417
888 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
889 build_conditional_expr.
890 * c-parser.c (c_parser_conditional_expression): Create locations for
891 EXP1 and EXP2 from their source ranges. Pass the locations down to
892 build_conditional_expr.
893 * c-tree.h (build_conditional_expr): Update declaration.
894 * c-typeck.c (build_conditional_expr): Add location_t parameters.
895 For -Wsign-compare, also print the types.
896
314e6352
ML
8972017-08-08 Martin Liska <mliska@suse.cz>
898
899 * c-convert.c: Include header files.
900 * c-typeck.c: Likewise.
901
577eec56
ML
9022017-08-07 Martin Liska <mliska@suse.cz>
903
904 * c-parser.c (c_parser_attributes): Canonicalize name of an
905 attribute.
906
f7b6353a
MP
9072017-08-02 Marek Polacek <polacek@redhat.com>
908
909 PR c/81289
910 * c-parser.c (c_parser_unary_expression): Use set_error.
911
8a6eab34
MP
912 PR c/81448
913 PR c/81306
914 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
915 warnings. Avoid walking MACRO_MAP_LOCATIONS.
916
7fef86d3
JH
9172017-07-31 Jan Hubicka <hubicka@ucw.cz>
918 Martin Liska <mliska@suse.cz>
919
920 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 921 statement.
7fef86d3 922
f34ebeb2
ML
9232017-07-31 Martin Liska <mliska@suse.cz>
924
925 PR sanitize/81530
926 * c-convert.c (convert): Guard condition with flag_sanitize_p
927 also with current_function_decl non-null equality.
928 * c-decl.c (grokdeclarator): Likewise.
929 * c-typeck.c (build_binary_op): Likewise.
930
8595f67b
MP
9312017-07-25 Marek Polacek <polacek@redhat.com>
932
933 * c-decl.c (grokfield): Remove local variable.
934
d49718d6
MP
9352017-07-25 Marek Polacek <polacek@redhat.com>
936
937 PR c/81364
938 * c-parser.c (c_parser_else_body): Don't warn about multistatement
939 macro expansion if the body is in { }.
940 (c_parser_while_statement): Likewise.
941 (c_parser_for_statement): Likewise.
942
ff22eb12
NS
9432017-07-18 Nathan Sidwell <nathan@acm.org>
944
945 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
946
eea77d1f
DM
9472017-07-14 David Malcolm <dmalcolm@redhat.com>
948
949 * c-decl.c (implicitly_declare): When suggesting a missing
950 #include, provide a fix-it hint.
951
b6f43128
DM
9522017-07-06 David Malcolm <dmalcolm@redhat.com>
953
954 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
955 and call that instead.
956 * c-tree.h (selftest::run_c_tests): New decl.
957
3e2becc4
MP
9582017-06-26 Marek Polacek <polacek@redhat.com>
959
960 PR c/80116
961 * c-parser.c (c_parser_if_body): Set the location of the
962 body of the conditional after parsing all the labels. Call
963 warn_for_multistatement_macros.
964 (c_parser_else_body): Likewise.
965 (c_parser_switch_statement): Likewise.
966 (c_parser_while_statement): Likewise.
967 (c_parser_for_statement): Likewise.
968 (c_parser_statement): Add a default argument. Save the location
969 after labels have been parsed.
970 (c_parser_c99_block_statement): Likewise.
971
343ae898
RB
9722017-06-19 Richard Biener <rguenther@suse.de>
973
974 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
975 negated _Literals to parse _Literal (int) -1.
976
45b2222a
ML
9772017-06-13 Martin Liska <mliska@suse.cz>
978
979 PR sanitize/78204
980 * c-convert.c (convert): Use sanitize_flags_p.
981 * c-decl.c (grokdeclarator): Likewise.
982 * c-typeck.c (convert_for_assignment): Likewise.
983 (c_finish_return): Likewise.
984 (build_binary_op): Likewise.
985
8ab7005b
JJ
9862017-06-08 Jakub Jelinek <jakub@redhat.com>
987
988 PR c/81006
989 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
990 to sizetype before size_binop.
991
363dc72c
JJ
9922017-06-07 Jakub Jelinek <jakub@redhat.com>
993
994 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
995 of TDI_generic.
996
dc949728
MP
9972017-06-06 Marek Polacek <polacek@redhat.com>
998
999 PR c/79983
1000 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1001 ref.
1002 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1003
40ffd95f
BE
10042017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1005
1006 * c-parser.c (c_parser_binary_expression): Implement the
1007 -Wsizeof_pointer_div warning.
1008 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1009 from a parenthesized expression.
1010 (c_parser_expr_list): Use c_last_sizeof_loc.
1011 * c-tree.h (c_last_sizeof_loc): New external.
1012 * c-typeck.c (c_last_sizeof_loc): New variable.
1013 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1014
9fc5e7a4
MM
10152017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1016
1017 PR testsuite/80580
1018 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1019
f012c8ef
DM
10202017-05-30 David Malcolm <dmalcolm@redhat.com>
1021
1022 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1023 parameters.
1024
3cd211af
MS
10252017-05-24 Martin Sebor <msebor@redhat.com>
1026
1027 PR c/80731
1028 * c-fold.c (c_fully_fold_internal): Adjust.
1029 * c-typeck.c (parser_build_unary_op): Adjust.
1030
fd71a9a2
TS
10312017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1032
1033 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1034 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1035 "VECTOR_LENGTH".
1036
92fa0f9e
MP
10372017-05-23 Marek Polacek <polacek@redhat.com>
1038
1039 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1040 quotes.
1041
d11c168a
JJ
10422017-05-22 Jakub Jelinek <jakub@redhat.com>
1043
1044 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1045 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1046 it returned invariant. Call tree_invariant_p unconditionally
1047 afterwards to decide whether to return expr or op0.
1048
58aca9d9
NS
10492017-05-22 Nathan Sidwell <nathan@acm.org>
1050
1051 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1052
7fd549d2
TS
10532017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1054
1055 * c-parser.c (c_parser_omp_clause_default): Handle
1056 "OMP_CLAUSE_DEFAULT_PRESENT".
1057
6ecd2339
BE
10582017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1059
1060 * config-lang.in (gtfiles): Add c-family/c-format.c.
1061
8a57ecff
NS
10622017-05-18 Nathan Sidwell <nathan@acm.org>
1063
1064 * c-decl.c (pushdecl_top_level): Delete unused function.
1065
6574d78e
MP
10662017-05-18 Marek Polacek <polacek@redhat.com>
1067
1068 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1069 (check_earlier_gotos): Likewise.
1070 (define_label): Likewise.
1071 (pending_xref_error): Likewise.
1072 (smallest_type_quals_location): Likewise.
1073 (grokdeclarator): Likewise.
1074 (grokparms): Likewise.
1075 (identifier_global_value): Likewise.
1076 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1077 (find_init_member): Likewise.
1078
e3455240
MP
10792017-05-18 Marek Polacek <polacek@redhat.com>
1080
1081 * c-decl.c (start_decl): Use false/true instead of 0/1.
1082 (grokdeclarator): Likewise.
1083 (finish_struct): Likewise.
1084 (start_function): Change the return type to bool. Use false/true
1085 instead of 0/1.
1086 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1087 * c-tree.h (start_function): Update.
1088 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1089 (set_designator): Change the return type to bool. Use false/true
1090 instead of 0/1.
1091
3fa8871b
MP
10922017-05-17 Marek Polacek <polacek@redhat.com>
1093
1094 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1095 * c-typeck.c: Likewise.
1096
142473df
MP
10972017-05-17 Marek Polacek <polacek@redhat.com>
1098
1099 PR sanitizer/80659
1100 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1101 DECL_IGNORED_P even for non-static compound literals.
1102
1a817418
ML
11032017-05-17 Martin Liska <mliska@suse.cz>
1104
1105 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1106 use it instead of int type.
1107
b2fa0a8b
MP
11082017-05-17 Marek Polacek <polacek@redhat.com>
1109
1110 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1111 call c_fully_fold.
1112 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1113 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1114 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1115 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1116 save_expr.
1117 (c_parser_conditional_expression): Likewise.
1118 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1119 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1120 (process_init_element): Likewise.
1121 (build_binary_op): Likewise.
1122 (handle_omp_array_sections_1): Likewise.
1123
1e47f02b
TS
11242017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1125
1126 * c-parser.c (c_parser_omp_clause_num_gangs)
1127 (c_parser_omp_clause_num_workers)
1128 (c_parser_omp_clause_vector_length): Merge functions into...
1129 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1130 all users.
1131
c24e924f
NS
11322017-05-11 Nathan Sidwell <nathan@acm.org>
1133
1134 * gimple-parser.c: Don't #include tree-dump.h.
1135
c587104e
MM
11362017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1137
1138 PR testsuite/80580
1139 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1140
67ac9a9d
MM
11412017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1142
1143 PR testsuite/80580
1144 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1145 incorrect __MEM syntax.
1146
ac4eb40f
MM
11472017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1148
1149 PR testsuite/80580
1150 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1151 type of unary '*'.
1152
641da50a
NS
11532017-05-09 Nathan Sidwell <nathan@acm.org>
1154
1155 * c-tree.h (pushdecl): Declare.
1156
56d35585
DM
11572017-05-05 David Malcolm <dmalcolm@redhat.com>
1158
1159 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1160 with diagnostic_report_diagnostic.
1161 * c-errors.c (pedwarn_c99): Likewise.
1162 (pedwarn_c90): Likewise.
1163
815d9cc6
XR
11642017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1165
92a285c1 1166 PR c++/80038
815d9cc6
XR
1167 * c-gimplify.c (c_gimplify_expr): Remove calls to
1168 cilk_gimplifY_call_params_in_spawned_fn.
1169
1c4ea66f
DM
11702017-04-25 David Malcolm <dmalcolm@redhat.com>
1171
1172 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1173 hint for removing extra semicolon.
1174
666f7903
JJ
11752017-04-21 Jakub Jelinek <jakub@redhat.com>
1176
1177 PR c/80468
1178 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1179 enabled, set specs->type to integer_type_node.
1180
5764ee3c
JW
11812017-04-03 Jonathan Wakely <jwakely@redhat.com>
1182
1183 * c-array-notation.c: Fix typo in comment.
1184
10fa8dfb
MP
11852017-03-29 Marek Polacek <polacek@redhat.com>
1186
1187 PR c/79730
1188 * c-decl.c (finish_decl): Check VAR_P.
1189
a9e4a1a5
JJ
11902017-03-27 Jakub Jelinek <jakub@redhat.com>
1191
1192 PR middle-end/80162
1193 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1194 * c-typeck.c (c_mark_addressable): Likewise. Look through
1195 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1196 to ARRAY_TYPE.
1197 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1198
ee3ff394
MP
11992017-03-23 Marek Polacek <polacek@redhat.com>
1200
1201 * c-tree.h: Remove a C_RID_YYCODE reference.
1202
4d1b8e70
JJ
12032017-03-21 Jakub Jelinek <jakub@redhat.com>
1204
1205 PR c/80097
1206 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1207 optional COMPOUND_EXPR with ubsan instrumentation.
1208
31dc71a8
MP
12092017-03-17 Marek Polacek <polacek@redhat.com>
1210
1211 * c-parser.c: Add C11 references.
1212
d579c385
MP
12132017-03-15 Marek Polacek <polacek@redhat.com>
1214
1215 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1216
85059a38
MP
12172017-03-11 Marek Polacek <polacek@redhat.com>
1218
1219 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1220
2f6f187a
DM
12212017-03-10 David Malcolm <dmalcolm@redhat.com>
1222
1223 PR translation/79848
1224 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1225 "%qs".
1226 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1227
36618428
MP
12282017-03-09 Marek Polacek <polacek@redhat.com>
1229
1230 PR sanitizer/79757
1231 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1232 parameter declarations with initializers.
1233
01e5af5a
JJ
12342017-03-09 Jakub Jelinek <jakub@redhat.com>
1235
1236 PR c/79969
1237 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1238 TYPE_STUB_DECL.
1239
a71dbc63
JJ
12402017-03-07 Jakub Jelinek <jakub@redhat.com>
1241
1242 PR c/79834
1243 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1244 for "may only be used in compound statements" diagnostics, change it
1245 such that the same translatable string is used for all pragmas. For
1246 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1247 diagnostics.
1248 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1249 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1250 "may only be used in compound statements" diagnostics, such that the
1251 same translatable string is used for all pragmas.
1252
1ff4bae6
MP
12532017-03-04 Marek Polacek <polacek@redhat.com>
1254
1255 PR c/79847
1256 * c-decl.c (implicit_decl_warning): Add missing space.
1257
7f5a7d78
MP
12582017-03-03 Marek Polacek <polacek@redhat.com>
1259
1260 PR c/79758
1261 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1262 current_function_prototype_arg_types is error_mark_node. Fix
1263 formatting. Use TREE_VALUE instead of TREE_TYPE.
1264
883c8f06
JJ
12652017-03-03 Jakub Jelinek <jakub@redhat.com>
1266
79c9b7a8
JJ
1267 PR c/79837
1268 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1269 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1270 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1271 diagnostics.
1272
883c8f06
JJ
1273 PR c/79836
1274 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1275 instead of %<_Generic>.
1276 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1277 (c_parser_omp_target_exit_data): Use %<release%> instead of
1278 %<release>.
1279
324ff1a0
JJ
12802017-02-28 Jakub Jelinek <jakub@redhat.com>
1281
1282 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1283 instead of just cond ? "..." : "...".
1284 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1285 for "enter"/"exit" keyword.
1286 (c_finish_oacc_routine): Don't use %s to supply portions of the
1287 message.
1288
4227c9ad
JJ
12892017-02-24 Jakub Jelinek <jakub@redhat.com>
1290
1291 PR c++/79588
1292 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1293 handle -Wrestrict here.
1294 * c-typeck.c (build_function_call_vec): Adjust
1295 check_function_arguments caller.
1296
5d972e66
RB
12972017-02-23 Richard Biener <rguenther@suse.de>
1298
1299 PR c/79684
1300 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1301 to initialize c_exprs to return.
1302 (c_parser_gimple_binary_expression): Likewise.
1303 (c_parser_gimple_unary_expression): Likewise.
1304 (c_parser_gimple_postfix_expression): Likewise.
1305
61ac5ebe
MP
13062017-02-22 Marek Polacek <polacek@redhat.com>
1307
1308 PR c/79662
1309 * c-typeck.c (convert_arguments): Handle error_mark_node.
1310
41d1b0b1
PK
13112017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1312
1313 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1314 value of c_parser_parse_ssa_name against error_mark_node and emit
1315 error if ssa name is anonymous and written as default definition.
1316
eab1f169
PK
13172017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1318
1319 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1320 FMA_EXPR.
1321
bcac0b4d
JJ
13222017-02-16 Jakub Jelinek <jakub@redhat.com>
1323
1324 PR c++/79512
1325 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1326 ignore #pragma omp target even when not followed by identifier.
1327
1be33173
PK
13282017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1329
1330 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1331 (c_parser_gimple_unary_expression): Likewise.
1332
aa326bfb
JJ
13332017-02-13 Jakub Jelinek <jakub@redhat.com>
1334
1335 * c-parser.c (c_parser_oacc_declare): Add missing space in
1336 diagnostics.
1337
8a398bc5
PK
13382017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1339
1340 PR c/79478
1341 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1342 set_c_expr_source_range when parsing ssa-name.
1343
3dcde5ef
PG
13442017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1345 Richard Biener <rguenther@suse.de>
1346
1347 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1348 building IL when arguments are error_mark_node.
1349 (c_parser_gimple_unary_expression): Likewise.
1350 (c_parser_gimple_if_stmt): Likewise.
1351 (c_parser_gimple_switch_stmt): Likewise.
1352 (c_parser_gimple_return_stmt): Likewise.
1353 (c_parser_parse_ssa_name): When name lookup fails do not build
1354 an SSA name. Use undeclared rather than not declared in error
1355 reporting.
1356
192b048b
MP
13572017-02-09 Marek Polacek <polacek@redhat.com>
1358
1359 PR c/79428
1360 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1361 instead of c_parser_skip_until_found.
1362
56f71478
JJ
13632017-02-09 Jakub Jelinek <jakub@redhat.com>
1364
1365 PR c/79431
1366 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1367 symtab_node::get on automatic variables.
1368
02889d23
CLT
13692016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1370 Chung-Lin Tang <cltang@codesourcery.com>
1371
1372 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1373 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1374 semantic checking.
1375 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1376
7af4b20d
RB
13772017-02-07 Richard Biener <rguenther@suse.de>
1378
1379 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1380 (c_parser_gimple_postfix_expression_after_primary):
1381 Do not use c_build_function_call_vec to avoid folding and promotion.
1382 Simplify.
1383
e5e391d6
MO
13842017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1385
1386 PR lto/79061
1387 * c-decl.c (pop_scope): Pass main_input_filename to
1388 build_translation_unit_decl.
1389
c2e84327
DM
13902017-01-24 David Malcolm <dmalcolm@redhat.com>
1391
1392 * c-parser.c: Include "read-rtl-function.h" and
1393 "run-rtl-passes.h".
1394 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1395 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1396 production. Update for renaming of field "gimple_pass" to
1397 "gimple_or_rtl_pass". If __RTL was seen, call
1398 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1399 to an auto_timevar, to cope with early exit.
1400 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1401 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1402 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1403 Handle RID_RTL.
1404 (c_parser_parse_rtl_body): New function.
1405 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1406 (struct c_declspecs): Rename field "gimple_pass" to
1407 "gimple_or_rtl_pass". Add field "rtl_p".
1408 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1409 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1410 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1411 (c_parser_gimple_or_rtl_pass_list): ...this.
1412
2ebd93e1
MP
14132017-01-20 Marek Polacek <polacek@redhat.com>
1414
1415 PR c/64279
1416 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1417
b1c95bb5
RB
14182017-01-13 Richard Biener <rguenther@suse.de>
1419
1420 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1421 nops.
1422
25329913
RB
14232017-01-13 Richard Biener <rguenther@suse.de>
1424
1425 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1426 _Literal ( type-name ) number.
1427
6bb4ea5c
RB
14282017-01-12 Richard Biener <rguenther@suse.de>
1429
1430 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1431 __MEM.
1432
6b5b4e9c
JJ
14332017-01-11 Jakub Jelinek <jakub@redhat.com>
1434
1435 PR c++/72813
1436 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1437 PCH file.
1438
e3252775
RB
14392017-01-11 Richard Biener <rguenther@suse.de>
1440
1441 PR bootstrap/79052
1442 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1443 returns on parse errors.
1444
a9342885
MP
14452017-01-04 Marek Polacek <polacek@redhat.com>
1446
1447 PR c++/64767
1448 * c-parser.c (c_parser_postfix_expression): Mark zero character
1449 constants by setting original_type in c_expr.
1450 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1451 with a zero character constant.
1452 (char_type_p): New function.
1453
5dd9a9d0
DM
14542017-01-04 David Malcolm <dmalcolm@redhat.com>
1455
1456 * c-parser.c (c_parser_declaration_or_fndef): Create a
1457 rich_location at init_loc and parse it to start_init.
1458 (last_init_list_comma): New global.
1459 (c_parser_braced_init): Update last_init_list_comma when parsing
1460 commas. Pass it to pop_init_level. Pass location of closing
1461 brace to pop_init_level.
1462 (c_parser_postfix_expression_after_paren_type): Create a
1463 rich_location at type_loc and parse it to start_init.
1464 (c_parser_omp_declare_reduction): Likewise for loc.
1465 * c-tree.h (start_init): Add rich_location * param.
1466 (pop_init_level): Add location_t param.
1467 * c-typeck.c (struct initializer_stack): Add field
1468 "missing_brace_richloc".
1469 (start_init): Add richloc param, use it to initialize
1470 the stack node's missing_brace_richloc.
1471 (last_init_list_comma): New decl.
1472 (finish_implicit_inits): Pass last_init_list_comma to
1473 pop_init_level.
1474 (push_init_level): When finding missing open braces, add fix-it
1475 hints to the richloc.
1476 (pop_init_level): Add "insert_before" param and pass it
1477 when calling pop_init_level. Add fixits about missing
1478 close braces to any richloc. Use the richloc for the
1479 -Wmissing-braces warning.
1480 (set_designator): Pass last_init_list_comma to pop_init_level.
1481 (process_init_element): Likewise.
1482
cbe34bb5
JJ
14832017-01-01 Jakub Jelinek <jakub@redhat.com>
1484
1485 Update copyright years.
1486
d17680f3
JJ
14872016-12-21 Jakub Jelinek <jakub@redhat.com>
1488
0dba7960
JJ
1489 PR bootstrap/78817
1490 * c-typeck.c (build_function_call_vec): If check_function_arguments
1491 returns true, set TREE_NO_WARNING on CALL_EXPR.
1492
d17680f3
JJ
1493 PR c/77767
1494 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1495 to *expr instead of overwriting it.
1496
aa90531e
RB
14972016-12-20 Richard Biener <rguenther@suse.de>
1498
1499 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1500 error recovery.
1501 (c_parser_gimple_statement): Only build assigns for non-error
1502 stmts.
1503 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1504
629b3d75
MJ
15052016-12-14 Martin Jambor <mjambor@suse.cz>
1506
1507 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1508 omp-low.h.
1509 (c_finish_oacc_routine): Adjusted call to
1510 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1511 to use their new names.
1512 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1513 use its new name.
1514 (c_parser_oacc_update): Likewise.
1515 (c_parser_omp_simd): Likewise.
1516 (c_parser_omp_target_update): Likewise.
1517 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1518 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1519 name.
1520 (c_finish_omp_cancellation_point): Likewise.
1521 * gimple-parser.c: Do not include omp-low.h
1522
c5af52eb
CP
15232016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1524 James Norris <jnorris@codesourcery.com>
1525
1526 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1527 EXIT_DATA,WAIT} are not used in compound statements.
1528 (c_parser_oacc_enter_exit_data): Update diagnostics.
1529
48330c93
BE
15302016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1531
1532 PR c++/71973
1533 * c-decl.c (diagnose_mismatched_decls): Use
1534 OPT_Wbuiltin_declaration_mismatch here too.
1535
899ca90e 15362016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1537 Alan Hayward <alan.hayward@arm.com>
1538 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1539
1540 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1541 (make_label, finish_struct): Likewise.
1542
1ee62b92 15432016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1544 Richard Biener <rguenther@suse.de>
22b15758 1545
8e745a17
JJ
1546 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1547 * config-lang.in (gtfiles): Add c/c-parser.h.
1548 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1549 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1550 * c-parser.c (enum c_id_kind, struct c_token,
1551 c_parser_next_token_is, c_parser_next_token_is_not,
1552 c_parser_next_token_is_keyword,
1553 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1554 Split out to ...
1555 * c-parser.h: ... new header.
1556 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1557 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1558 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1559 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1560 c_parser_error, c_parser_require, c_parser_skip_until_found,
1561 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1562 c_parser_type_name): Export.
1563 (c_parser_tokens_buf): New function.
1564 (c_parser_error): Likewise.
1565 (c_parser_set_error): Likewise.
1566 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1567 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1568 via c_parser_parse_gimple_body.
8e745a17
JJ
1569 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1570 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1571 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1572 c_parser_error, c_parser_require, c_parser_skip_until_found,
1573 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1574 c_parser_type_name): Declare.
1ee62b92
PG
1575 (struct c_parser): Declare forward.
1576 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1577 (c_parser_error): Likewise.
1578 (c_parser_set_error): Likewise.
1579 * gimple-parser.c: New file.
1580 * gimple-parser.h: Likewise.
1ee62b92 1581
22b15758
UB
15822016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1583
1584 PR c/35503
1585 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1586 warn_for_restrict.
1587
84ff4775
LCW
15882016-09-11 Le-Chun Wu <lcwu@google.com>
1589 Mark Wielaard <mjw@redhat.com>
1590
1591 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1592 to the given -Wshadow= variant.
1593
4d0cdd0c
TP
15942016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1595
1596 * c-typeck.c: Include memmodel.h.
1597
1202f33e
JJ
15982016-10-13 Jakub Jelinek <jakub@redhat.com>
1599
1600 PR target/77957
1601 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1602 instead of lhd_return_null_tree_v.
1603
8a14afd0
BS
16042016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1605
1606 PR c++/69733
1607 * c-decl.c (smallest_type_quals_location): New static function.
1608 (grokdeclarator): Try to find the correct location for an ignored
1609 qualifier.
1610
81fea426
MP
16112016-09-26 Marek Polacek <polacek@redhat.com>
1612
1613 PR c/7652
1614 * c-decl.c (pop_scope): Add gcc_fallthrough.
1615
16162016-09-26 Marek Polacek <polacek@redhat.com>
1617
1618 PR c/7652
1619 * c-parser.c (struct c_token): Add flags field.
1620 (c_lex_one_token): Pass it to c_lex_with_flags.
1621 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1622 into IFN_FALLTHROUGH.
1623 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1624 attribute fallthrough after a case label or default label.
1625 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1626
9a2300e9
MP
16272016-09-24 Marek Polacek <polacek@redhat.com>
1628
1629 PR c/77490
1630 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1631 have boolean value. Warn about ++/-- on booleans.
1632
7de76362
JJ
16332016-09-23 Jakub Jelinek <jakub@redhat.com>
1634
1635 * c-parser.c (incomplete_record_decls): Remove unnecessary
1636 = vNULL initialization of file scope vec.
1637
5b73d2ab
MP
16382016-09-16 Marek Polacek <polacek@redhat.com>
1639
1640 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1641
e51fbec3
MP
16422016-09-14 Marek Polacek <polacek@redhat.com>
1643
1644 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1645 (fix_array_notation_expr): Likewise.
1646 * c-decl.c (finish_decl): Likewise.
1647 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1648 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1649 (function_to_pointer_conversion): Use false instead of 0.
1650 (convert_lvalue_to_rvalue): Likewise.
1651 (parser_build_unary_op): Likewise.
1652 (build_atomic_assign): Likewise.
1653 (build_unary_op): Change nonconvert parameter type to bool, use
1654 true/false instead of 1/0.
1655 (build_binary_op): Use true instead of 1.
1656
254830ba
DM
16572016-09-13 David Malcolm <dmalcolm@redhat.com>
1658
1659 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1660 of add_fixit_insert to add_fixit_insert_before.
1661
4c13ba17
MP
16622016-09-13 Marek Polacek <polacek@redhat.com>
1663
1664 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1665 it.
1666
54dcdb88
BE
16672016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1668
1669 PR c++/77496
1670 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1671 COMPOUND_EXPR to warn_for_omitted_condop.
1672
e5106e27
DM
16732016-09-07 David Malcolm <dmalcolm@redhat.com>
1674
1675 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1676 c_get_substring_location for this new langhook.
1677
9dc5773f
JJ
16782016-09-02 Jakub Jelinek <jakub@redhat.com>
1679
1680 PR c/65467
1681 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1682 flag_openmp.
1683 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1684 instead of mark_exp_read on low_bound/length expression.
1685 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1686 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1687 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1688 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1689 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1690 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1691 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1692 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1693 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1694 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1695 instead of mark_expr_read.
1696 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1697 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1698 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1699 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1700 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1701 array section bases outside of depend clause, for depend clause
1702 use convert_lvalue_to_rvalue on the base.
1703 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1704 linear, aligned, map, to and from clauses.
1705 (c_omp_clause_copy_ctor): New function.
1706
295844f6
MP
17072016-09-01 Marek Polacek <polacek@redhat.com>
1708
1709 PR c/7652
1710 * c-typeck.c (composite_type): Add FALLTHRU comment.
1711
089af25c
DM
17122016-08-31 David Malcolm <dmalcolm@redhat.com>
1713
1714 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1715 to the insertion fixits for "struct", "union", and "enum".
1716
f9087798
DM
17172016-08-30 David Malcolm <dmalcolm@redhat.com>
1718
1719 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1720 rather than add_fixit_misspelled_id.
1721 (undeclared_variable): Likewise.
1722 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1723 now-redundant "here" params from add_fixit_insert method calls.
1724 (c_parser_parameter_declaration): Likewise.
1725 * c-typeck.c (build_component_ref): Remove now-redundant range
1726 param from add_fixit_replace method calls.
1727
ebef225f
MP
17282016-08-25 Marek Polacek <polacek@redhat.com>
1729
1730 * c-typeck.c (parser_build_binary_op): Pass LHS to
1731 warn_logical_not_parentheses.
1732
fe377a48
MP
17332016-08-25 Marek Polacek <polacek@redhat.com>
1734
1735 PR c/77323
1736 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1737 or _FloatN or _FloatNx is not supported.
1738 (finish_declspecs): Set type to integer_type_node when _FloatN or
1739 _FloatNx is not supported.
1740
c65699ef
JM
17412016-08-19 Joseph Myers <joseph@codesourcery.com>
1742
1743 PR c/32187
1744 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1745 (struct c_declspecs): Add field floatn_nx_idx.
1746 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1747 and _FloatNx type specifiers.
1748 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1749 (c_parser_declspecs, c_parser_attribute_any_word)
1750 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1751 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1752 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1753 narrower than double.
1754
2f1364c2
JJ
17552016-08-12 Jakub Jelinek <jakub@redhat.com>
1756 Martin Liska <mliska@suse.cz>
1757
1758 PR c/67410
1759 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1760 % to determine val element to change. Assert that
1761 wchar_bytes * charwidth fits into val array.
1762
191816a3
MP
17632016-08-12 Marek Polacek <polacek@redhat.com>
1764
1765 PR c/7652
1766 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1767 (c_parser_postfix_expression): Likewise.
1768 * c-typeck.c (build_unary_op): Adjust fall through comment.
1769 (c_mark_addressable): Likewise.
1770
b95a64bb
JJ
17712016-08-11 Jakub Jelinek <jakub@redhat.com>
1772
1773 PR c/72816
1774 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1775 array member through typedef, for orig_qual_indirect == 0 clear
1776 orig_qual_type.
1777
895aa8e1
DM
17782016-08-08 David Malcolm <dmalcolm@redhat.com>
1779
1780 PR c/64955
1781 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1782 this up to selftest::run_c_tests.
1783 (selftest::run_c_tests): New function.
1784
0b212d8c
TS
17852016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1786
ae9281fc
TS
1787 * c-parser.c (struct oacc_routine_data): Add error_seen and
1788 fndecl_seen members.
1789 (c_finish_oacc_routine): Use these.
1790 (c_parser_declaration_or_fndef): Adjust.
1791 (c_parser_oacc_routine): Likewise. Support more C language
1792 constructs, and improve diagnostics. Move pragma context
1793 checking...
1794 (c_parser_pragma): ... here.
1795
0b212d8c
TS
1796 * c-parser.c (struct oacc_routine_data): New.
1797 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1798 Simplify code.
1799 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1800 declare target" attribute.
1801
76e2c821
JB
18022016-08-01 Jan Beulich <jbeulich@suse.com>
1803
1804 * c-fold.c (c_fully_fold_internal): Also emit shift count
1805 warnings for vector types.
1806 * c-typeck.c (build_binary_op): Likewise.
1807
f618a472
MP
18082016-07-29 Marek Polacek <polacek@redhat.com>
1809
1810 PR c/71742
1811 * c-decl.c (finish_struct): Rephrase an error message.
1812
efd0786f
MP
1813 PR c/71853
1814 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1815 to error node for invalid code.
1816
e00dceaf
MP
1817 PR c/71573
1818 * c-decl.c (implicitly_declare): Return decl early not only for
1819 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1820
673a107a
JJ
18212016-07-29 Jakub Jelinek <jakub@redhat.com>
1822
1823 PR c/71969
1824 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1825 on GNU extern inline functions.
1826
a5b5c8b6
MP
18272016-07-29 Marek Polacek <polacek@redhat.com>
1828
1829 PR c/71583
1830 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1831 check expr.value.
1832
e3fe09c1
UB
18332016-07-22 Uros Bizjak <ubizjak@gmail.com>
1834
1835 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1836
7c8f7eaa
DM
18372016-07-20 David Malcolm <dmalcolm@redhat.com>
1838
1839 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1840 spellcheck-tree.h
1841 (best_macro_match): Likewise, converting from a typedef to a
1842 subclass.
1843 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1844 (lookup_name_fuzzy): Update for change of best_macro_match to a
1845 subclass with a ctor that calls cpp_forall_identifiers.
1846
de6a69ee
DM
18472016-07-20 David Malcolm <dmalcolm@redhat.com>
1848
1849 * c-decl.c (implicit_decl_warning): Update for conversion of
1850 return type of lookup_name_fuzzy to const char *.
1851 (undeclared_variable): Likewise.
1852 (lookup_name_fuzzy): Convert return type from tree to
1853 const char *.
1854 * c-parser.c (c_parser_declaration_or_fndef): Update for
1855 conversion of return type of lookup_name_fuzzy to const char *.
1856 (c_parser_parameter_declaration): Likewise.
1857
b1c9c068
CP
18582016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1859
1860 * c-parser.c (c_parser_oacc_declare): Don't scan for
1861 GOMP_MAP_POINTER.
1862 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1863 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1864 zero-length subarrays.
1865
ddbbcb19
JJ
18662016-07-15 Jakub Jelinek <jakub@redhat.com>
1867
1868 PR c/71858
1869 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1870 instead of FUZZY_LOOKUP_NAME.
1871 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1872 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1873
dd36b877
JJ
18742016-07-14 Jakub Jelinek <jakub@redhat.com>
1875
1876 PR c/71858
1877 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1878
8c681247
TS
18792016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1880
1881 * c-parser.c (c_parser_generic_selection): Make type of variable
1882 auto_vec.
1883 (c_parser_omp_declare_simd): Likewise.
1884
bf4fa671
TS
18852016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1886
1887 * c-decl.c (struct c_struct_parse_info): Change member types
1888 from vec to auto_vec.
1889 (start_struct): Adjust.
1890 (finish_struct): Likewise.
1891
557e8c49
JJ
18922016-07-02 Jakub Jelinek <jakub@redhat.com>
1893
1894 PR c/71719
1895 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1896
54d19c3b
TS
18972016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1898
1899 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1900 Move pragma context checking into...
1901 (c_parser_omp_cancellation_point): ... here, and improve
1902 diagnostic messages.
1903 * c-typeck.c (c_finish_omp_cancel)
1904 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1905
152ef731
JJ
19062016-06-29 Jakub Jelinek <jakub@redhat.com>
1907
1908 PR c/71685
1909 * c-typeck.c (c_build_qualified_type): Don't clear
1910 C_TYPE_INCOMPLETE_VARS for the main variant.
1911
19122016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1913
1914 PR c/71552
1915 * c-typeck.c (output_init_element): Diagnose incompatible types
1916 before non-constant initializers.
1917
e9ac1f86
JJ
19182016-06-28 Jakub Jelinek <jakub@redhat.com>
1919
1920 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1921
277d7ee0
AK
19222016-06-23 Andi Kleen <ak@linux.intel.com>
1923
1924 * Make-lang.in: Add support for autofdo.
1925
1a4f11c8
DM
19262016-06-22 David Malcolm <dmalcolm@redhat.com>
1927
1928 PR c/70339
1929 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1930 (implicit_decl_warning): When issuing warnings for implicit
1931 declarations, attempt to provide a suggestion via
1932 lookup_name_fuzzy.
1933 (undeclared_variable): Likewise when issuing errors.
1934 (lookup_name_in_scope): Likewise.
1935 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1936 (best_macro_match): New typedef.
1937 (find_closest_macro_cpp_cb): New function.
1938 (lookup_name_fuzzy): New function.
1939 * c-parser.c: Include gcc-rich-location.h.
1940 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1941 (c_keyword_starts_typename): ...this new function.
1942 (c_parser_declaration_or_fndef): When issuing errors about
1943 missing "struct" etc, add a fixit. For other kinds of errors,
1944 attempt to provide a suggestion via lookup_name_fuzzy.
1945 (c_parser_parms_declarator): When looking ahead to detect typos in
1946 type names, also reject CPP_KEYWORD.
1947 (c_parser_parameter_declaration): When issuing errors about
1948 unknown type names, attempt to provide a suggestion via
1949 lookup_name_fuzzy.
1950 * c-tree.h (c_keyword_starts_typename): New prototype.
1951
5a578671
JM
19522016-06-20 Joseph Myers <joseph@codesourcery.com>
1953
1954 PR c/71601
1955 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1956 c_common_type returns error_mark_node.
1957
3f8257db 19582016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1959
1960 PR c/69507
1961 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1962 __alignof__ (expression).
1963
6a3f203c
DM
19642016-06-14 David Malcolm <dmalcolm@redhat.com>
1965
1966 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1967
264757fb
DM
19682016-06-14 David Malcolm <dmalcolm@redhat.com>
1969
1970 * c-typeck.c (build_component_ref): Simplify fixit code by
1971 using gcc_rich_location::add_fixit_misspelled_id.
1972 (set_init_label): Likewise.
1973
f7e4f2e3
DM
19742016-06-13 David Malcolm <dmalcolm@redhat.com>
1975
1976 * c-parser.c (c_parser_initelt): Provide location of name for new
1977 location_t param of set_init_label.
1978 * c-tree.h (set_init_label): Add location_t param.
1979 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1980 param and use it when issuing error messages about unrecognized
1981 field names. Attempt to provide a fixit hint if appropriate,
1982 otherwise update the error message to provide the type name.
1983
4b1ffdb1
TS
19842016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1985
1986 PR c/71381
1987 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1988 Loosen checking.
1989
44a845ca
MS
19902016-06-08 Martin Sebor <msebor@redhat.com>
1991 Jakub Jelinek <jakub@redhat.com>
1992
1993 PR c++/70507
1994 PR c/68120
1995 * c-typeck.c (convert_arguments): Don't promote last argument
1996 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1997
92a5f2ba
MP
19982016-06-08 Marek Polacek <polacek@redhat.com>
1999
2000 PR c/71418
2001 * c-decl.c (grokdeclarator): Check TYPE_P.
2002
08203f73
MP
2003 PR c/71426
2004 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2005 code.
2006
6ffd47b7
DM
20072016-06-07 David Malcolm <dmalcolm@redhat.com>
2008
2009 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2010 and structure element reference, capture the location of the
2011 element name token and pass it to build_component_ref.
2012 (c_parser_postfix_expression_after_primary): Likewise for
2013 structure element dereference.
2014 (c_parser_omp_variable_list): Likewise for
2015 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2016 * c-tree.h (build_component_ref): Add location_t param.
2017 * c-typeck.c (build_component_ref): Add location_t param
2018 COMPONENT_LOC. Use it, if available, when issuing hints about
2019 mispelled member names to provide a fixit replacement hint.
2020
1f40cff3
MP
20212016-06-06 Marek Polacek <polacek@redhat.com>
2022
2023 PR c/71362
2024 * c-parser.c (c_parser_direct_declarator): Set location.
2025
5545a907
MP
20262016-06-06 Marek Polacek <polacek@redhat.com>
2027
2028 * c-typeck.c (comptypes_internal): Handle comparisons of
2029 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2030 TYPE_REF_CAN_ALIAS_ALL.
2031
b605f663
CLT
20322016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2033
2034 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2035 arguments as addressable when async clause exists.
2036
00631022
JJ
20372016-05-30 Jakub Jelinek <jakub@redhat.com>
2038
2039 PR c++/71349
2040 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2041 when combined with target construct.
2042
7211a097
JJ
20432016-05-26 Jakub Jelinek <jakub@redhat.com>
2044
2045 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2046 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2047
95efe6b6
MP
20482016-05-25 Marek Polacek <polacek@redhat.com>
2049
2050 PR c/71265
2051 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2052
a23faf7a
MP
2053 PR c/71266
2054 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2055
e46c7770
CP
20562016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2057
2058 * c-parser.c (c_parser_oacc_declare): Add support for
2059 GOMP_MAP_FIRSTPRIVATE_POINTER.
2060 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2061 argument with enum c_omp_region_type ort.
2062 (handle_omp_array_sections): Likewise. Update call to
2063 handle_omp_array_sections_1.
2064 (c_finish_omp_clauses): Add specific errors and warning messages for
2065 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2066 call to handle_omp_array_sections.
2067
a04e69c0
TS
20682016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2069
2070 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2071
f17a223d
RB
20722016-05-24 Richard Biener <rguenther@suse.de>
2073
2074 PR middle-end/70434
2075 PR c/69504
2076 * c-typeck.c (build_array_ref): Do not complain about indexing
2077 non-lvalue vectors. Adjust for function name change.
2078
79063edd
MS
20792016-05-20 Martin Sebor <msebor@redhat.com>
2080
2081 PR c/71115
2082 * c-typeck.c (error_init): Use
2083 expansion_point_location_if_in_system_header.
2084 (warning_init): Same.
2085
8a40fef3
DM
20862016-05-19 David Malcolm <dmalcolm@redhat.com>
2087
2088 PR c/71171
2089 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2090 in error-handling.
2091 (c_parser_postfix_expression): Likewise.
2092 * c-tree.h (c_expr::set_error): New method.
2093 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2094 that result's range is initialized.
2095
e9892350
JG
20962016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2097
2098 * c-typeck.c (parser_build_unary_op): Fix formatting.
2099
8fad45f5
MW
21002016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2101
2102 * c-decl.c (grokdeclarator): Remove errmsg and use of
2103 targetm.invalid_return_type.
2104 (grokparms): Remove errmsg and use of
2105 targetm.invalid_parameter_type.
2106
aa4b467b
JM
21072016-05-13 Joseph Myers <joseph@codesourcery.com>
2108
2109 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2110 function return type.
2111
4f2e1536
MP
21122016-05-12 Marek Polacek <polacek@redhat.com>
2113
2114 PR c/70756
2115 * c-decl.c (build_compound_literal): Pass LOC down to
2116 c_incomplete_type_error.
2117 * c-tree.h (require_complete_type): Adjust declaration.
2118 (c_incomplete_type_error): Likewise.
2119 * c-typeck.c (require_complete_type): Add location parameter, pass it
2120 down to c_incomplete_type_error.
2121 (c_incomplete_type_error): Add location parameter, pass it down to
2122 error_at.
2123 (build_component_ref): Pass location down to c_incomplete_type_error.
2124 (default_conversion): Pass location down to require_complete_type.
2125 (build_array_ref): Likewise.
2126 (build_function_call_vec): Likewise.
2127 (convert_arguments): Likewise.
2128 (build_unary_op): Likewise.
2129 (build_c_cast): Likewise.
2130 (build_modify_expr): Likewise.
2131 (convert_for_assignment): Likewise.
2132 (c_finish_omp_clauses): Likewise.
2133
d6e83a8d
MM
21342016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2135
2136 PR c/43651
2137 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2138 is enabled.
2139 * c-errors.c (pedwarn_c90): Return true if warned.
2140 * c-tree.h (pedwarn_c90): Change return type to bool.
2141 (enum c_declspec_word): Add new enumerator cdw_atomic.
2142
5c3a10fb
MP
21432016-05-11 Marek Polacek <polacek@redhat.com>
2144
2145 PR c++/71024
2146 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2147 diagnose_mismatched_attributes and call it.
2148
cf68d92c
MP
21492016-05-10 Marek Polacek <polacek@redhat.com>
2150
2151 PR c/70255
2152 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2153 on a declaration following the definition.
2154
351f85c5
JJ
21552016-05-05 Jakub Jelinek <jakub@redhat.com>
2156
2157 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2158 parse it through to c_parser_c99_block_statement.
2159 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2160 caller.
2161
deef7113
MP
21622016-05-04 Marek Polacek <polacek@redhat.com>
2163
2164 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2165 OPT_Wdangling_else.
2166
de55efd5
MP
21672016-05-04 Marek Polacek <polacek@redhat.com>
2168
2169 PR c/48778
2170 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2171 for macro expansions.
2172
79ce98bc
MP
21732016-05-03 Marek Polacek <polacek@redhat.com>
2174
2175 PR c/70859
2176 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2177 check_builtin_function_arguments.
2178
fb2647aa
RB
21792016-05-03 Richard Biener <rguenther@suse.de>
2180
2181 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2182 the checksum from the previous stage.
2183
77886428
CP
21842016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2185
2186 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2187 c_finish_omp_clauses.
2188 (c_parser_omp_all_clauses): Likewise.
2189 (c_parser_oacc_cache): Likewise.
2190 (c_parser_oacc_loop): Likewise.
2191 (omp_split_clauses): Likewise.
2192 (c_parser_omp_declare_target): Likewise.
2193 (c_parser_cilk_all_clauses): Likewise.
2194 (c_parser_cilk_for): Likewise.
2195 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2196 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2197
7176a4a0
MP
21982016-05-02 Marek Polacek <polacek@redhat.com>
2199
2200 PR c/70851
2201 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2202 incomplete type.
2203
e7ff0319
CP
22042016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2205
2206 PR middle-end/70626
2207 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2208 OACC_LOOP_CLAUSE_MASK.
2209 (c_parser_oacc_kernels_parallel): Update call to
2210 c_oacc_split_loop_clauses.
2211
9f405ce1
AM
22122016-04-28 Andrew MacLeod <amacleod@redhat.com>
2213
2214 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2215 argument to build_modify_expr in two cases.
2216
c1e1f433
BS
22172016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2218
2219 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2220 warn_for_memset instead of warning directly here.
2221
2448a956
MP
22222016-04-26 Marek Polacek <polacek@redhat.com>
2223
2224 PR c/67784
2225 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2226 out of ...
2227 (c_parser_for_statement): ... here.
2228 (c_parser_if_statement): Use it.
2229 (c_parser_switch_statement): Use it.
2230 (c_parser_while_statement): Use it.
2231
b02a5e26
MP
2232 PR c/70791
2233 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2234
477d4906
IV
22352016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2236
2237 PR c++/69363
2238 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2239 instead of c_finish_cilk_clauses.
2240 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2241 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2242 floating-point variables in the linear clause for Cilk Plus.
2243
fe37c7af
MM
22442016-04-18 Michael Matz <matz@suse.de>
2245
2246 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2247 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2248
949505a9
MP
22492016-04-15 Marek Polacek <polacek@redhat.com>
2250
2251 PR c/70671
2252 * c-typeck.c (build_unary_op): Pass location down to error and
2253 warning call.
2254
dda1bf61
JJ
22552016-04-15 Jakub Jelinek <jakub@redhat.com>
2256
2257 PR c/70436
2258 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2259 where needed.
2260 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2261 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2262 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2263 Adjust c_parser_pragma callers.
2264 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2265 caller.
2266 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2267 c_parser_statement.
2268 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2269 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2270 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2271 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2272 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2273 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2274 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2275 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2276 down where needed.
2277 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2278 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2279 calls.
2280
99cd9857
MP
22812016-04-13 Marek Polacek <polacek@redhat.com>
2282
2283 PR c/70436
2284 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2285 adjust callers.
2286 (c_parser_statement): Likewise.
2287 (c_parser_c99_block_statement): Likewise.
2288 (c_parser_while_statement): Likewise.
2289 (c_parser_for_statement): Likewise.
2290 (c_parser_if_body): Don't set IF_P here.
2291 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2292 about dangling else here.
2293 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2294 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2295 warn about dangling else here.
2296
f13355da
MP
22972016-04-04 Marek Polacek <polacek@redhat.com>
2298
2299 PR c/70307
2300 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2301
5fde6a45
MP
23022016-03-31 Marek Polacek <polacek@redhat.com>
2303
2304 PR c/70297
2305 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2306
4bbf545b
DM
23072016-03-18 David Malcolm <dmalcolm@redhat.com>
2308
2309 PR c/70281
2310 * c-parser.c (c_parser_postfix_expression): Set the source range
2311 for uses of "__builtin_types_compatible_p".
2312
fcc2b74f
JJ
23132016-03-17 Jakub Jelinek <jakub@redhat.com>
2314
2315 PR c/70280
2316 * c-typeck.c (composite_type): Don't count void_list_node
2317 into len, if the list is terminated by void_list_node, start
2318 with void_list_node instead of NULL for newargs. Stop
2319 at void_list_node.
2320
ab4c578f
MP
23212016-03-16 Marek Polacek <polacek@redhat.com>
2322
2323 PR c/70093
2324 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2325 nested functions returning VM types.
2326
96b3c82d
CP
23272016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2328
2329 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2330 when calling c_finish_omp_clauses.
2331
29b9828f
BS
23322016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2333
2334 PR c/69824
2335 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2336 for later.
2337
7ff6ca38
MP
23382016-03-04 Marek Polacek <polacek@redhat.com>
2339
2340 PR c/69798
2341 * c-parser.c (c_parser_postfix_expression): Call
2342 c_parser_cast_expression rather than c_parser_postfix_expression.
2343
686e2237
JJ
23442016-03-01 Jakub Jelinek <jakub@redhat.com>
2345
2346 PR c/69796
2347 PR c/69974
2348 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2349 of incomplete decls to error_mark_node.
2350
0b05329b
MP
23512016-02-24 Marek Polacek <polacek@redhat.com>
2352
2353 PR c/69819
2354 * c-decl.c (finish_decl): Don't update the copy of the type of a
2355 different decl type.
2356
067fbd8b
JJ
23572016-02-23 Jakub Jelinek <jakub@redhat.com>
2358
2359 PR objc/69844
2360 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2361 in id_kind reclassification.
2362
bf14eba2
JJ
23632016-02-16 Jakub Jelinek <jakub@redhat.com>
2364
2365 PR c/69835
2366 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2367
ba539195
JN
23682016-02-16 James Norris <jnorris@codesourcery.com>
2369
2370 PR c/64748
2371 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2372
16595a1f
BS
23732016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2374
f48dfe98
BS
2375 * c-decl.c (build_null_declspecs): Zero the entire struct.
2376
16595a1f
BS
2377 PR c/69522
2378 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2379 callers changed. If nested_p is true, use it to call
2380 finish_implicit_inits.
2381 * c-tree.h (finish_implicit_inits): Declare.
2382 * c-typeck.c (finish_implicit_inits): New function. Move code
2383 from ...
2384 (push_init_level): ... here.
2385 (set_designator, process_init_element): Call finish_implicit_inits.
2386
66756373
JJ
23872016-02-11 Jakub Jelinek <jakub@redhat.com>
2388
2389 PR c/69768
2390 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2391 arguments for -Waddress warning.
2392
1066e9b5
JJ
23932016-02-04 Jakub Jelinek <jakub@redhat.com>
2394
2395 PR c/69669
2396 * c-decl.c (finish_enum): When honoring mode attribute,
2397 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2398
3a5d2ba4
JJ
23992016-01-29 Jakub Jelinek <jakub@redhat.com>
2400
2401 PR debug/69518
2402 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2403 all type variants, not just TYPE_MAIN_VARIANT.
2404
cbdd8ae0
JJ
24052016-01-27 Jakub Jelinek <jakub@redhat.com>
2406
2407 PR debug/66869
2408 * c-decl.c (c_write_global_declarations_1): Warn with
2409 warn_unused_function if static prototype without definition
2410 is not C_DECL_USED.
2411
fa74a4bc
MP
24122016-01-27 Marek Polacek <polacek@redhat.com>
2413
2414 PR c/68062
2415 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2416 to unsigned, if needed. Add -Wsign-compare warning.
2417
13f92e8d
JJ
24182016-01-26 Jakub Jelinek <jakub@redhat.com>
2419
2420 PR tree-optimization/69483
2421 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2422
cd8e73dc 24232016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2424
2425 PR c/24293
2426 * c-tree.h (incomplete_record_decls): Declare.
2427 * c-parser.c (incomplete_record_decls): Define.
2428 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2429 report error if any decl has zero size.
2430 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2431 or enum type to incomplete_record_decls.
2432
e6d6ec9e
TV
24332016-01-14 Tom de Vries <tom@codesourcery.com>
2434
2435 PR tree-optimization/68773
2436 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2437 set force_output.
2438
00083992
MP
24392016-01-14 Marek Polacek <polacek@redhat.com>
2440
2441 PR c/69262
2442 * c-decl.c (grokdeclarator): Provide more information for invalid
2443 array declarations.
2444
7443cf13
DM
24452016-01-06 David Malcolm <dmalcolm@redhat.com>
2446
2447 * c-parser.c (c_parser_unary_expression): For dereferences, build
2448 a combined location before calling build_indirect_ref, so that
2449 error reports cover the full range, manually updating the c_expr
2450 src_range.
2451
6b131d5b
MP
24522016-01-06 Marek Polacek <polacek@redhat.com>
2453
2454 PR sanitizer/69099
2455 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2456 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2457 NULL.
2458
818ab71a
JJ
24592016-01-04 Jakub Jelinek <jakub@redhat.com>
2460
2461 Update copyright years.
2462
2fe0a208
MP
24632016-01-04 Marek Polacek <polacek@redhat.com>
2464
2465 PR c/68908
2466 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2467 optimization to use __atomic_fetch_* built-in if possible.
2468
c7b48c8a
TS
24692015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2470
2471 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2472 into...
2473 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2474 all users.
2475
fda5652f
MP
24762015-12-22 Marek Polacek <polacek@redhat.com>
2477
2478 PR c/69002
2479 * c-typeck.c (build_component_ref): Warn when acessing elements of
2480 atomic structures or unions.
2481
745e411d
DM
24822015-12-21 David Malcolm <dmalcolm@redhat.com>
2483
2484 * c-typeck.c: Include "gcc-rich-location.h".
2485 (build_binary_op): In the two places that call binary_op_error,
2486 create a gcc_rich_location and populate it with the location of
2487 the binary op and its two operands.
2488
94c40e19
DM
24892015-12-16 David Malcolm <dmalcolm@redhat.com>
2490
2491 * c-parser.c (c_parser_statement_after_labels): When calling
2492 c_finish_return, Use the return expression's location if it has
2493 one, falling back to the location of the first token within it.
2494 * c-typeck.c (c_finish_return): When issuing warnings about
2495 the incorrect presence/absence of a return value, issue a note
2496 showing the declaration of the function.
2497
de67c4c3
DM
24982015-12-16 David Malcolm <dmalcolm@redhat.com>
2499
2500 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2501 to 4.
2502 (c_parser_peek_nth_token): New function.
2503 (c_parser_peek_conflict_marker): New function.
2504 (c_parser_error): Detect conflict markers and report them as such.
2505
a10704e1
DM
25062015-12-16 David Malcolm <dmalcolm@redhat.com>
2507
2508 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2509 to preserve range information for the primary expression
2510 in the call to c_parser_postfix_expression_after_primary.
2511
8062bca6
DM
25122015-12-16 David Malcolm <dmalcolm@redhat.com>
2513
2514 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2515 expression location, falling back on the first token location,
2516 rather than always using the latter.
2517
d06f8b75
MP
25182015-12-16 Marek Polacek <polacek@redhat.com>
2519
2520 PR c/64637
2521 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2522 available.
2523
2994fb91
MP
25242015-12-15 Marek Polacek <polacek@redhat.com>
2525
2526 PR c/68907
2527 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2528 artificial decl.
2529
a1b93f8d
DM
25302015-12-08 David Malcolm <dmalcolm@redhat.com>
2531
2532 * c-parser.c (c_parser_alignof_expression): Capture location of
2533 closing parenthesis (if any), or of end of unary expression, and
2534 use it to build a src_range for the expression.
2535
46c6e1e2
DM
25362015-12-08 David Malcolm <dmalcolm@redhat.com>
2537
2538 PR c/68757
2539 * c-parser.c (c_parser_get_builtin_args): Add
2540 "out_close_paren_loc" param, and write back to it.
2541 (c_parser_postfix_expression): Capture the closing
2542 parenthesis location for RID_CHOOSE_EXPR,
2543 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2544 RID_BUILTIN_SHUFFLE and use it to set the source range
2545 for such expressions; within RID_BUILTIN_COMPLEX set
2546 the underlying location.
2547
66189108
MP
25482015-12-07 Marek Polacek <polacek@redhat.com>
2549
2550 PR c/68668
2551 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2552 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2553
f187980b
EB
25542015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2555
2556 * c-tree.h (c_build_va_arg): Adjust prototype.
2557 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2558 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2559 parameter, adjust throughout and issue an error if EXPR is a component
2560 with reverse storage order.
2561
4250754e
JM
25622015-12-02 Jason Merrill <jason@redhat.com>
2563
2564 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2565 (c_fully_fold_internal, decl_constant_value_for_optimization):
2566 Move from c-common.c.
2567 * c-tree.h: Declare decl_constant_value_for_optimization.
2568 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2569
e9e32ee6
JM
25702015-12-02 Joseph Myers <joseph@codesourcery.com>
2571
2572 PR c/68162
2573 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2574 following link from declarator to next declarator. Track original
2575 qualified type and pass it to c_build_qualified_type.
2576 * c-typeck.c (c_build_qualified_type): Add arguments
2577 orig_qual_type and orig_qual_indirect.
2578
ff7a55bf
TS
25792015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2580
2581 * c-parser.c (c_parser_omp_clause_name)
2582 (c_parser_oacc_all_clauses): Alphabetical sorting.
2583
657e4e47
JJ
25842015-12-02 Jakub Jelinek <jakub@redhat.com>
2585
2586 PR c/68533
2587 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2588 for diagnostics.
2589
37d5ad46
JB
25902015-12-01 Julian Brown <julian@codesourcery.com>
2591 Cesar Philippidis <cesar@codesourcery.com>
2592 James Norris <James_Norris@mentor.com>
2593
2594 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2595 (c_parser_oacc_clause_use_device): New function.
2596 (c_parser_oacc_all_clauses): Add use_device support.
2597 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2598 (c_parser_oacc_host_data): New function.
2599 (c_parser_omp_construct): Add host_data support.
2600 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2601 * c-typeck.c (c_finish_oacc_host_data): New function.
2602 (c_finish_omp_clauses): Add use_device support.
2603
a4850ce9
JH
26042015-11-29 Jan Hubicka <hubicka@ucw.cz>
2605
2606 PR c/67106
2607 * c-decl.c: Set TYPE_PACKED in variants.
2608
b58d3df2
ML
26092015-11-27 Martin Liska <mliska@suse.cz>
2610
2611 PR c++/68312
2612 * c-array-notation.c (fix_builtin_array_notation_fn):
2613 Use release_vec_vec instead of vec::release.
2614 (build_array_notation_expr): Likewise.
2615 (fix_conditional_array_notations_1): Likewise.
2616 (fix_array_notation_expr): Likewise.
2617 (fix_array_notation_call_expr): Likewise.
2618
aec17bfe
JJ
26192015-11-27 Jakub Jelinek <jakub@redhat.com>
2620
2621 PR c/63326
2622 * c-parser.c (c_parser_compound_statement_nostart): If
2623 last_label is true, use pragma_stmt instead of pragma_compound
2624 as second c_parser_pragma argument.
2625 (c_parser_omp_ordered, c_parser_omp_target_update,
2626 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2627 false as second argument to c_parser_skip_to_pragma_eol after
2628 diagnosing standalone directives used in pragma_stmt context.
2629
688c4de0
IV
26302015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2631
2632 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2633 with "if (ENABLE_OFFLOADING)".
2634
cbd03aee
DM
26352015-11-23 David Malcolm <dmalcolm@redhat.com>
2636
2637 PR objc/68438
2638 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2639 for various Objective-C constructs: Class.name syntax,
2640 @selector(), @protocol(), @encode(), and [] message syntax.
2641
a87a86e1
DM
26422015-11-20 David Malcolm <dmalcolm@redhat.com>
2643
2644 PR 62314
2645 * c-typeck.c (should_suggest_deref_p): New function.
2646 (build_component_ref): Special-case POINTER_TYPE when
2647 generating a "not a structure of union" error message, and
2648 suggest a "->" rather than a ".", providing a fix-it hint.
2649
8ece8dfb
DM
26502015-11-19 David Malcolm <dmalcolm@redhat.com>
2651
2652 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2653 candidate into a new function, find_closest_identifier.
2654
433068cc
MP
26552015-11-19 Marek Polacek <polacek@redhat.com>
2656
2657 PR c/68412
2658 * c-typeck.c (parser_build_binary_op): Properly handle
2659 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2660
bef08b71
DM
26612015-11-17 David Malcolm <dmalcolm@redhat.com>
2662
2663 * c-parser.c (set_c_expr_source_range): Bulletproof both
2664 overloaded implementations against NULL expr->value.
2665 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2666 values.
2667 (c_parser_unary_expression): Likewise when handling addresses of
2668 labels.
2669 (c_parser_postfix_expression): Likewise for statement expressions,
2670 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2671 __builtin_va_arg, and for __builtin_offset_of.
2672 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2673 src_range using the range of the braced initializer.
2674 (c_parser_transaction_expression): Set src_range for "ret" to a
2675 sane pair of values.
2676
fff77217
KY
26772015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2678
2679 * c-parser.c (c_finish_omp_declare_simd): Look for
2680 "simd" attribute as well. Update error message.
2681
1d899da2
TS
26822015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2683
2684 * c-parser.c (c_parser_omp_declare_target): Adjust.
2685
e4606348
JJ
26862015-11-14 Jakub Jelinek <jakub@redhat.com>
2687
2688 * c-typeck.c (c_finish_omp_clauses): Don't mark
2689 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2690
3e636daf
MP
26912015-11-14 Marek Polacek <polacek@redhat.com>
2692
2693 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2694 * c-typeck.c: Likewise.
2695
ebedc9a3
DM
26962015-11-13 David Malcolm <dmalcolm@redhat.com>
2697
2698 * c-decl.c (warn_defaults_to): Pass line_table to
2699 rich_location ctor.
2700 * c-errors.c (pedwarn_c99): Likewise.
2701 (pedwarn_c90): Likewise.
2702 * c-parser.c (set_c_expr_source_range): New functions.
2703 (c_token::get_range): New method.
2704 (c_token::get_finish): New method.
2705 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2706 based on the range from the start of the LHS to the end of the
2707 RHS.
2708 (c_parser_conditional_expression): Likewise, based on the range
2709 from the start of the cond.value to the end of exp2.value.
2710 (c_parser_binary_expression): Call set_c_expr_source_range on
2711 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2712 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2713 based on the cast_loc through to the end of the expr.
2714 (c_parser_unary_expression): Likewise, based on the
2715 op_loc through to the end of op.
2716 (c_parser_sizeof_expression) Likewise, based on the start of the
2717 sizeof token through to either the closing paren or the end of
2718 expr.
2719 (c_parser_postfix_expression): Likewise, using the token range,
2720 or from the open paren through to the close paren for
2721 parenthesized expressions.
2722 (c_parser_postfix_expression_after_primary): Likewise, for
2723 various kinds of expression.
2724 * c-tree.h (struct c_expr): Add field "src_range".
2725 (c_expr::get_start): New method.
2726 (c_expr::get_finish): New method.
2727 (set_c_expr_source_range): New decls.
2728 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2729 on ret for prefix unary ops.
2730 (parser_build_binary_op): Likewise, running from the start of
2731 arg1.value through to the end of arg2.value.
2732
ec8b536f
MP
27332015-11-13 Marek Polacek <polacek@redhat.com>
2734
2735 PR c/68320
2736 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2737
277fe616
DM
27382015-11-13 David Malcolm <dmalcolm@redhat.com>
2739
2740 * c-typeck.c: Include spellcheck.h.
2741 (lookup_field_fuzzy_find_candidates): New function.
2742 (lookup_field_fuzzy): New function.
2743 (build_component_ref): If the field was not found, try using
2744 lookup_field_fuzzy and potentially offer a suggestion.
2745
6e232ba4
JN
27462015-11-12 James Norris <jnorris@codesourcery.com>
2747 Joseph Myers <joseph@codesourcery.com>
2748
2749 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2750 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2751 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2752 and PRAGMA_OMP_CLAUSE_LINK.
2753 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2754 and PRAGMA_OACC_CLAUSE_LINK.
2755 (OACC_DECLARE_CLAUSE_MASK): New definition.
2756 (c_parser_oacc_declare): New function.
2757
9be4f715
MP
27582015-11-12 Marek Polacek <polacek@redhat.com>
2759
2760 PR c/67784
2761 * c-parser.c (c_parser_for_statement): Reclassify the token in
2762 a correct scope.
2763
e78bede6
MP
27642015-11-11 Marek Polacek <polacek@redhat.com>
2765
2766 PR c/68107
2767 PR c++/68266
2768 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2769 checking the size of an array.
2770
69f293c9
AM
27712015-11-11 Andrew MacLeod <amacleod@redhat.com>
2772
2773 * c-array-notation.c: Remove unused header files.
2774 * c-aux-info.c: Likewise.
2775 * c-convert.c: Likewise.
2776 * c-decl.c: Likewise.
2777 * c-errors.c: Likewise.
2778 * c-lang.c: Likewise.
2779 * c-objc-common.c: Likewise.
2780 * c-parser.c: Likewise.
2781 * c-typeck.c: Likewise.
2782 * gccspec.c: Likewise.
2783
3a40d81d
NS
27842015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2785 Cesar Philippidis <cesar@codesourcery.com>
2786 James Norris <jnorris@codesourcery.com>
2787 Julian Brown <julian@codesourcery.com>
2788 Nathan Sidwell <nathan@codesourcery.com>
2789
2790 c/
2791 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2792 routine arg.
2793 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2794 (c_parser_pragma): Parse 'acc routine'.
2795 (OACC_ROUTINE_CLAUSE_MARK): Define.
2796 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2797
fc402eec
AA
27982015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2799
2800 PR debug/67192
2801 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2802 location of the backward-goto to the start of the loop body.
2803
f6b0b3db
AA
28042015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2805
2806 PR debug/67192
2807 * c-parser.c (c_parser_while_statement): Finish the loop before
2808 parsing ahead for misleading indentation.
2809 (c_parser_for_statement): Likewise.
2810
ee45a32d
EB
28112015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2812
2813 * c-decl.c (finish_struct): If the structure has reverse storage
2814 order, rewrite the type of array fields with scalar component. Call
2815 maybe_apply_pragma_scalar_storage_order on entry.
2816 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2817 errors on bit-fields and reverse SSO here and not...
2818 (c_mark_addressable): ...here.
2819 (output_init_element): Adjust call to initializer_constant_valid_p.
2820 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2821
8a645150
DM
28222015-11-06 David Malcolm <dmalcolm@redhat.com>
2823
2824 * c-decl.c (warn_defaults_to): Update for change in signature
2825 of diagnostic_set_info.
2826 * c-errors.c (pedwarn_c99): Likewise.
2827 (pedwarn_c90): Likewise.
2828 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2829 for textinfo::set_location.
2830
7a5e4956
CP
28312015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2832 Thomas Schwinge <thomas@codesourcery.com>
2833 James Norris <jnorris@codesourcery.com>
2834
2835 * c-parser.c (c_parser_omp_clause_name): Add support for
2836 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2837 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2838 default(none) in OpenACC.
2839 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2840 arguments.
2841 (c_parser_oacc_clause_tile): New function.
2842 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2843 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2844 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2845 TILE}.
2846 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2847 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2848 FIRSTPRIVATE}.
2849 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2850 (c_parser_oacc_update): Update the error message for missing clauses.
2851 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2852 and OMP_CLAUSE_INDEPENDENT.
2853
bfcfbfa0
MP
28542015-11-05 Marek Polacek <polacek@redhat.com>
2855
2856 PR c/68090
2857 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2858 deal with pre-evaluation on invalid types.
2859
e01d41e5
JJ
28602015-11-05 Jakub Jelinek <jakub@redhat.com>
2861 Ilya Verbin <ilya.verbin@intel.com>
2862
2863 * c-parser.c: Include context.h and gimple-expr.h.
2864 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2865 monotonic together with nonmonotonic.
2866 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2867 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2868 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2869 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2870 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2871 expressions on combined target teams before the target.
2872 (c_parser_omp_declare_target): If decl has "omp declare target" or
2873 "omp declare target link" attribute, and cgraph or varpool node already
2874 exists, then set corresponding flags. Call c_finish_omp_clauses
2875 in the parenthesized extended-list syntax case.
2876 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2877 declare target.
2878 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2879 on OMP_CLAUSE_REDUCTION array sections.
2880 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2881 into the constant offset, or for variable low-bound using
2882 POINTER_PLUS_EXPR. For structure element based array sections use
2883 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2884 (c_finish_omp_clauses): Drop generic_field_head, structure
2885 elements are now always mapped even as array section bases,
2886 diagnose same var in data sharing and mapping clauses. Diagnose if
2887 linear step on declare simd is neither a constant nor a uniform
2888 parameter. Look through POINTER_PLUS_EXPR for array section
2889 reductions. Diagnose the same var or function appearing multiple
2890 times on the same directive. Fix up wording for the to clause if t
2891 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2892 modifier on kinds other than dynamic or guided or nonmonotonic
2893 modifier together with ordered clause.
2894
4bf9e5a8
TS
28952015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2896 Chung-Lin Tang <cltang@codesourcery.com>
2897
2898 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2899
2adfab87
AM
29002015-10-29 Andrew MacLeod <amacleod@redhat.com>
2901
2902 * c-array-notation.c: Reorder #include's and remove duplicates.
2903 * c-aux-info.c: Likewise.
2904 * c-convert.c: Likewise.
2905 * c-decl.c: Likewise.
2906 * c-errors.c: Likewise.
2907 * c-lang.c: Likewise.
2908 * c-objc-common.c: Likewise.
2909 * c-parser.c: Likewise.
2910 * c-typeck.c: Likewise.
2911
e922069e
JW
29122015-10-26 Jim Wilson <jim.wilson@linaro.org>
2913
2914 PR debug/66068
2915 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2916 after calling build_qualified_type.
2917
765dd391
CP
29182015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2919 Thomas Schwinge <thomas@codesourcery.com>
2920 James Norris <jnorris@codesourcery.com>
2921 Joseph Myers <joseph@codesourcery.com>
2922 Julian Brown <julian@codesourcery.com>
2923 Bernd Schmidt <bschmidt@redhat.com>
2924
2925 * c-parser.c (c_parser_oacc_shape_clause): New.
2926 (c_parser_oacc_simple_clause): New.
2927 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2928 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2929
88bae6f4
TS
29302015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2931 James Norris <jnorris@codesourcery.com>
2932 Cesar Philippidis <cesar@codesourcery.com>
2933
2934 PR c/64765
2935 PR c/64880
2936 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2937 parameters, and handle these. Adjust all users.
2938 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2939 into...
2940 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2941 all users.
2942 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2943 declare functions.
2944 (c_finish_omp_construct): Declare function.
2945 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2946 Merge functions into...
2947 (c_finish_omp_construct): ... this new function.
2948
a8fc2579
RB
29492015-10-22 Richard Biener <rguenther@suse.de>
2950
2951 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2952 before folding a MINUS_EXPR.
2953
e9122ef6
MP
29542015-10-21 Marek Polacek <polacek@redhat.com>
2955
2956 PR c/68024
2957 * c-decl.c (start_function): Warn about vararg functions without
2958 a prototype.
2959
9f47c7e5
IE
29602015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2961
2962 * c-typeck.c (build_conditional_expr): Use boolean vector
2963 type for vector comparison.
2964 (build_vec_cmp): New.
2965 (build_binary_op): Use build_vec_cmp for comparison.
2966
fa60eeb9
MP
29672015-10-20 Marek Polacek <polacek@redhat.com>
2968
2969 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2970
2c7020eb
MP
29712015-10-20 Marek Polacek <polacek@redhat.com>
2972
2973 PR c/67964
2974 * c-parser.c (c_parser_attributes): Break out of the loop if the
2975 token after an attribute isn't a comma.
2976
d9a6bd32
JJ
29772015-10-13 Jakub Jelinek <jakub@redhat.com>
2978 Aldy Hernandez <aldyh@redhat.com>
2979
2980 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2981 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2982 (c_parser_omp_variable_list): Handle structure elements for
2983 map, to and from clauses. Handle array sections in reduction
2984 clause. Formatting fixes.
2985 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2986 if clause modifiers.
2987 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2988 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2989 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2990 c_parser_omp_clause_is_device_ptr): New functions.
2991 (c_parser_omp_clause_ordered): Parse optional parameter.
2992 (c_parser_omp_clause_reduction): Handle array reductions.
2993 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2994 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2995 functions.
2996 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2997 (c_parser_omp_clause_depend_sink): New function.
2998 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2999 (c_parser_omp_clause_map): Parse release/delete map kinds and
3000 optional always modifier.
3001 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3002 and c_finish_omp_clauses callers.
3003 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3004 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3005 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3006 (OMP_CRITICAL_CLAUSE_MASK): Define.
3007 (c_parser_omp_critical): Parse critical clauses.
3008 (c_parser_omp_for_loop): Handle doacross loops, adjust
3009 c_finish_omp_for and c_finish_omp_clauses callers.
3010 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3011 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3012 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3013 (c_parser_omp_for): Disallow ordered clause when combined with
3014 distribute. Disallow linear clause when combined with distribute
3015 and not combined with simd.
3016 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3017 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3018 parse clauses and if depend clause is found, don't parse a body.
3019 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3020 Allow target parallel without for after it.
3021 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3022 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3023 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3024 invalid kinds.
3025 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3026 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3027 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3028 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3029 functions.
3030 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3031 defaultmap and is_device_ptr clauses.
3032 (c_parser_omp_target): Parse target parallel and target simd. Set
3033 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3034 and target exit data. Diagnose invalid map kinds.
3035 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3036 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3037 construct.
3038 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3039 &omp_priv.
3040 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3041 (c_parser_omp_taskloop): New function.
3042 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3043 handle PRAGMA_OMP_TASKLOOP.
3044 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3045 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3046 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3047 Add IS_OMP argument, handle structure element bases, diagnose
3048 bitfields, pass IS_OMP recursively, diagnose known zero length
3049 array sections in depend clauses, handle array sections in reduction
3050 clause, diagnose negative length even for pointers.
3051 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3052 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3053 array sections in reduction clause, set
3054 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3055 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3056 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3057 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3058
21ba0cea
MP
30592015-10-06 Marek Polacek <polacek@redhat.com>
3060
3061 * c-parser.c (c_parser_statement_after_labels): Use
3062 protected_set_expr_location.
3063 (c_parser_omp_clause_num_gangs): Likewise.
3064 (c_parser_omp_clause_num_threads): Likewise.
3065 (c_parser_omp_clause_num_workers): Likewise.
3066 (c_parser_omp_clause_vector_length): Likewise.
3067 (c_parser_omp_clause_num_teams): Likewise.
3068 (c_parser_omp_clause_thread_limit): Likewise.
3069 * c-typeck.c (build_c_cast): Likewise.
3070 (c_cast_expr): Likewise.
3071
624d31fe
RS
30722015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3073
3074 * c-typeck.c (c_tree_equal): Use real_equal instead of
3075 REAL_VALUES_EQUAL.
3076
b8fd7909
JM
30772015-10-04 Jason Merrill <jason@redhat.com>
3078
3079 * c-parser.c (c_lex_one_token): Handle @synchronized.
3080 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3081 can change whether the function is transaction_safe.
3082
1c7485af
MP
30832015-10-02 Marek Polacek <polacek@redhat.com>
3084
3085 PR c/67730
3086 * c-typeck.c (convert_for_assignment): Use the expansion point
3087 location throughout.
3088
3e3b8d63
MP
30892015-10-02 Marek Polacek <polacek@redhat.com>
3090
3091 PR c/64249
3092 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3093 and pass it down to c_parser_if_statement.
3094 (c_parser_else_body): Add CHAIN parameter and pass it down to
3095 c_parser_statement_after_labels.
3096 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3097 duplicated if-else-if conditions.
3098
aabef2de
MP
30992015-10-01 Marek Polacek <polacek@redhat.com>
3100
3101 * c-typeck.c (convert_for_assignment): Improve commentary.
3102
de8ddd5f
MP
31032015-09-30 Marek Polacek <polacek@redhat.com>
3104
3105 PR c/67730
3106 * c-typeck.c (c_finish_return): Use the expansion point location for
3107 certain "return with value" warnings.
3108
c4914de6
MLI
31092015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3110
3111 * c-parser.c (pragma_lex): Add loc argument.
3112
0e36f5c7
MP
31132015-09-15 Marek Polacek <polacek@redhat.com>
3114
3115 PR c/67580
3116 * c-decl.c (tag_exists_p): New function.
3117 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3118 struct/union/enum keywords are missing.
3119 * c-tree.h (tag_exists_p): Declare.
3120
2f3bb934
MP
31212015-09-15 Marek Polacek <polacek@redhat.com>
3122
3123 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3124 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3125 Return NULL_TREE instead of 0.
3126 (lookup_name): Return NULL_TREE instead of 0.
3127 (lookup_name_in_scope): Likewise.
3128 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3129 (parser_xref_tag): Use false instead of 0.
3130 (start_struct): Use true instead of 1.
3131 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3132
aa256c4a
MP
31332015-09-14 Marek Polacek <polacek@redhat.com>
3134
3135 * c-typeck.c (set_nonincremental_init_from_string): Use
3136 HOST_WIDE_INT_M1U when shifting a negative value.
3137
dbb68221
MW
31382015-09-09 Mark Wielaard <mjw@redhat.com>
3139
3140 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3141 parm against NULL.
3142
a8a098ac
JJ
31432015-09-10 Jakub Jelinek <jakub@redhat.com>
3144
3145 PR c/67502
3146 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3147 into OMP_FOR_PRE_BODY rather than before the loop.
3148
f4b189d5
JJ
31492015-09-09 Jakub Jelinek <jakub@redhat.com>
3150
0bb99c11
JJ
3151 PR c/67501
3152 * c-parser.c (c_parser_oacc_all_clauses,
3153 c_parser_omp_all_clauses): Remove invalid clause from
3154 list of clauses even if parser->error is set.
3155
fce5e5e3
JJ
3156 PR c/67500
3157 * c-parser.c (c_parser_omp_clause_aligned,
3158 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3159 test for errors.
3160 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3161 error_mark_node.
3162
f4b189d5
JJ
3163 PR c/67495
3164 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3165 instead of c_parser_unary_expression. If the result is !lvalue_p,
3166 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3167
b2aaf235
MP
31682015-09-04 Marek Polacek <polacek@redhat.com>
3169
3170 PR sanitizer/67279
3171 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3172
1807ffc1
MS
31732015-09-03 Martin Sebor <msebor@redhat.com>
3174
3175 PR c/66516
8b652e65
JJ
3176 * c-typeck.c (convert_arguments, parser_build_unary_op,
3177 build_conditional_expr, c_cast_expr, convert_for_assignment,
3178 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3179 reject_gcc_builtin.
3180 (c_decl_implicit): Define.
3181
d04ff417
MP
31822015-09-02 Marek Polacek <polacek@redhat.com>
3183
3184 PR c/67432
3185 * c-parser.c (c_parser_enum_specifier): Give a better error for
3186 an empty enum.
3187
a79683d5
TS
31882015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3189
3190 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3191
191a6b94
MP
31922015-08-12 Marek Polacek <polacek@redhat.com>
3193
3194 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3195 LOC to it.
3196
420a9d9b
MP
31972015-08-03 Marek Polacek <polacek@redhat.com>
3198
3199 PR c/67088
3200 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3201 Use it.
3202 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3203
992118a1
PP
32042015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3205
3206 * c-parser.c (c_parser_if_body): Take token_indent_info
3207 argument. Call warn_for_misleading_indentation even when the
3208 body is a semicolon. Extract token_indent_infos corresponding
3209 to the guard, body and next tokens. Adjust call to
3210 warn_for_misleading_indentation accordingly.
3211 (c_parser_else_body): Likewise.
3212 (c_parser_if_statement): Likewise.
3213 (c_parser_while_statement): Likewise.
3214 (c_parser_for_statement): Likewise.
3215
46308474
LFSM
32162015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3217 Manuel López-Ibáñez <manu@gcc.gnu.org>
3218
3219 * c-decl.c (get_parm_info): Remove static var. Update warning
3220 message.
3221
05b28fd6
MP
32222015-07-27 Marek Polacek <polacek@redhat.com>
3223
3224 PR c++/66555
3225 PR c/54979
3226 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3227
451b5e48
MP
32282015-07-20 Marek Polacek <polacek@redhat.com>
3229
3230 PR c++/55095
3231 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3232 (build_binary_op): Warn about left shift overflows.
3233
1916bcb5
AM
32342015-07-09 Andrew MacLeod <amacleod@redhat.com>
3235
3236 * c-array-notation.c: Adjust includes for flags.h changes.
3237 * c-objc-common.c: Likewise.
3238
c7131fb2
AM
32392015-07-07 Andrew MacLeod <amacleod@redhat.com>
3240
3241 * c-array-notation.c: Adjust includes.
3242 * c-aux-info.c: Likewise.
3243 * c-convert.c: Likewise.
3244 * c-decl.c: Likewise.
3245 * c-errors.c: Likewise.
3246 * c-lang.c: Likewise.
3247 * c-objc-common.c: Likewise.
3248 * c-parser.c: Likewise.
3249 * c-typeck.c: Likewise.
3250
da2e71c9
MLI
32512015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3252
3253 PR fortran/66605
3254 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3255
b155cfd9
MP
32562015-06-29 Marek Polacek <polacek@redhat.com>
3257
3258 PR c/66322
3259 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3260 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3261 about -Wswitch-bool here.
3262 (do_case): Update c_add_case_label call.
3263 (c_finish_case): Update c_do_switch_warnings call.
3264
31521951
MP
32652015-06-27 Marek Polacek <polacek@redhat.com>
3266
3267 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3268
22d03525
MP
32692015-06-26 Marek Polacek <polacek@redhat.com>
3270
3271 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3272 INDIRECT_REF_P.
3273 * c-typeck.c (array_to_pointer_conversion): Likewise.
3274 (build_unary_op): Likewise.
3275 (c_finish_return): Likewise.
3276
f0889939
AM
32772015-06-25 Andrew MacLeod <amacleod@redhat.com>
3278
3279 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3280 * c-parser.c: Likewise.
3281
8d67ee55
RS
32822015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3283
3284 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3285 instead of pointer_hash.
3286 (detect_field_duplicates): Likewise.
3287
0ae9bd27
MP
32882015-06-25 Marek Polacek <polacek@redhat.com>
3289
3290 * c-array-notation.c: Use VAR_P throughout.
3291 * c-decl.c: Likewise.
3292 * c-objc-common.c: Likewise.
3293 * c-parser.c: Likewise.
3294 * c-typeck.c: Likewise.
3295
62f9079a
MP
32962015-06-25 Marek Polacek <polacek@redhat.com>
3297
3298 * c-decl.c: Use is_global_var throughout.
3299 * c-parser.c: Likewise.
3300 * c-typeck.c: Likewise.
3301
abb226c9
AM
33022015-06-17 Andrew MacLeod <amacleod@redhat.com>
3303
3304 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3305 * c-aux-info.c: Likewise.
3306 * c-convert.c: Likewise.
3307 * c-decl.c: Likewise.
3308 * c-errors.c: Likewise.
3309 * c-lang.c: Likewise.
3310 * c-objc-common.c: Likewise.
3311 * c-parser.c: Likewise.
3312 * c-typeck.c: Likewise.
3313
8cbababc
JH
33142015-06-11 Jan Hubicka <hubicka@ucw.cz>
3315
3316 PR middle-end/66325
3317 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3318 variants.
3319
a0349665
PMR
33202015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3321
3322 * c-decl.c (pop_scope): Register the main translation unit
3323 through the new debug hook.
3324
13fdf2e2
AM
33252015-06-08 Andrew MacLeod <amacleod@redhat.com>
3326
3327 * c-array-notation.c : Adjust include files.
3328 * c-aux-info.c : Likewise.
3329 * c-convert.c : Likewise.
3330 * c-decl.c : Likewise.
3331 * c-errors.c : Likewise.
3332 * c-lang.c : Likewise.
3333 * c-lang.h : Likewise.
3334 * c-objc-common.c : Likewise.
3335 * c-parser.c : Likewise.
3336 * c-typeck.c : Likewise.
3337
d7438551
AH
33382015-06-05 Aldy Hernandez <aldyh@redhat.com>
3339
3340 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3341 immediately clobber it.
3342 (c_write_global_declarations_1): Remove call to
3343 check_global_declaration_1.
3344 (c_write_global_declarations_2): Remove.
3345 (c_write_final_cleanups): Rename from c_write_global_declarations.
3346 Remove call to finalize_compilation_unit.
3347 Remove calls to debugging hooks.
3348 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3349 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3350 * c-tree.h: Remove c_write_global_declarations.
3351
ecb9f223
AM
33522015-06-04 Andrew MacLeod <amacleod@redhat.com>
3353
3354 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3355 * c-aux-info.c: Likewise.
3356 * c-convert.c: Likewise.
3357 * c-decl.c: Likewise.
3358 * c-errors.c: Likewise.
3359 * c-lang.c: Likewise.
3360 * c-objc-common.c: Likewise.
3361 * c-parser.c: Likewise.
3362 * c-typeck.c: Likewise.
3363
9482b620
MP
33642015-06-04 Marek Polacek <polacek@redhat.com>
3365
3366 PR c/66341
3367 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3368 it is a lvalue.
3369
bc51ace3
PK
33702015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3371
3372 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3373 Warn for empty struct.
3374 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3375
ea5b45b6
AT
33762015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3377
3378 * c-decl.c (start_function): Call plugin before parsing.
3379 (finish_function): Call plugin after parsing.
3380
c2d47482
PK
33812015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3382
3383 PR c/49551
3384 * c-decl.c (merge_decls): Merge DECL_COMMON.
3385
a95492ab
JW
33862015-05-22 Jim Wilson <jim.wilson@linaro.org>
3387
3388 * Make-lang.in (check_gcc_pallelize): Define.
3389
fd5c817a
MP
33902015-05-22 Marek Polacek <polacek@redhat.com>
3391
3392 PR c/47043
3393 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3394 attributes.
3395
c7b70a3c
MP
33962015-05-21 Marek Polacek <polacek@redhat.com>
3397
3398 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3399 DECL_BUILT_IN.
3400
21b634ae
MP
34012015-05-20 Marek Polacek <polacek@redhat.com>
3402
3403 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3404 * c-typeck.c: Likewise.
3405
296a8c2f
MP
34062015-05-19 Marek Polacek <polacek@redhat.com>
3407
3408 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3409
41b37d5e
JJ
34102015-05-19 Jakub Jelinek <jakub@redhat.com>
3411
3412 PR middle-end/66199
3413 * c-parser.c (c_parser_omp_for_loop): Don't add
3414 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3415 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3416 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3417 constructs.
3418
fab27f52
MM
34192015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3420
3421 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3422 swaps.
fab27f52 3423
40de31cf
MLI
34242015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3425
3426 PR fortran/44054
3427 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3428 accessor function.
3429
3aa3c9fc
MP
34302015-05-14 Marek Polacek <polacek@redhat.com>
3431
3432 PR c/66066
3433 PR c/66127
3434 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3435 rather than with 0.
3436
c3388e62
DM
34372015-05-12 David Malcolm <dmalcolm@redhat.com>
3438
3439 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3440 to add a call to warn_for_misleading_indentation.
3441 (c_parser_else_body): Likewise, adding param "else_loc".
3442 (c_parser_if_statement): Check for misleading indentation.
3443 (c_parser_while_statement): Likewise.
3444 (c_parser_for_statement): Likewise.
3445
755e528f
MP
34462015-05-08 Marek Polacek <polacek@redhat.com>
3447
3448 PR c/64918
3449 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3450 (output_init_element): Likewise.
3451
0173bd2a
MP
34522015-05-07 Marek Polacek <polacek@redhat.com>
3453
3454 PR c/65179
3455 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3456 value.
3457
9babc352
MP
34582015-04-30 Marek Polacek <polacek@redhat.com>
3459
3460 * c-typeck.c (set_init_label): Call error_at instead of error and
3461 pass LOC to it.
3462
ac9f18db
MP
3463 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3464 the type of a decl.
3465
ec3fba51
MP
3466 * c-typeck.c (c_build_va_arg): Clarify the error message.
3467
b811915d
TS
34682015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3469
3470 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3471 OMP_STANDALONE_CLAUSES.
3472
f3075008
MP
34732015-04-28 Marek Polacek <polacek@redhat.com>
3474
3475 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3476
4e81b788
MP
34772015-04-28 Marek Polacek <polacek@redhat.com>
3478
3479 PR c/65901
3480 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3481
6c1db78e
MP
34822015-04-25 Marek Polacek <polacek@redhat.com>
3483
3484 PR c/52085
3485 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3486 attribute.
3487
5c4abbb8
MP
34882015-04-23 Marek Polacek <polacek@redhat.com>
3489
3490 PR c/65345
3491 * c-decl.c (set_labels_context_r): New function.
3492 (store_parm_decls): Call it via walk_tree_without_duplicates.
3493 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3494 instead of create_tmp_var. Build TARGET_EXPR instead of
3495 COMPOUND_EXPR.
3496 (build_atomic_assign): Use create_tmp_var_raw instead of
3497 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3498
06aca1d5
IV
34992015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3500
3501 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3502 (c_parser_omp_target_update): Add missed %> to error_at ().
3503
8fba1830
BRF
35042015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3505
3506 PR target/55143
3507 * c-decl.c (c_default_pointer_mode): Remove definition.
3508 * c-tree.h (c_default_pointer_mode): Remove declaration.
3509
62021f64
TB
35102015-03-27 Tobias Burnus <burnus@net-b.de>
3511
3512 PR c/65586
3513 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3514 error out.
3515 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3516 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3517 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3518
9b65e171
JJ
35192015-03-19 Jakub Jelinek <jakub@redhat.com>
3520
3521 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3522 attribute for DECL_EXTERNAL VAR_DECLs.
3523
17958621
JJ
35242015-03-11 Jakub Jelinek <jakub@redhat.com>
3525
3526 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3527 argument.
3528
7ccb1a11
JJ
35292015-03-10 Jakub Jelinek <jakub@redhat.com>
3530
3531 PR c/65120
3532 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3533 before preparing arguments to warn_logical_not_parentheses.
3534
01177669
JJ
35352015-03-09 Jakub Jelinek <jakub@redhat.com>
3536
3537 PR c/65120
3538 * c-typeck.c (parser_build_binary_op): Don't warn for
3539 !!x == y or !b == y where b is _Bool.
3540
802ac282
MP
35412015-03-09 Marek Polacek <polacek@redhat.com>
3542
3543 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3544 * c-decl.c (grokdeclarator): Likewise.
3545 * c-typeck.c (build_binary_op): Likewise.
3546
e5165b60
MP
35472015-02-27 Marek Polacek <polacek@redhat.com>
3548
3549 PR c/65228
3550 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3551
065d214c
MP
35522015-02-14 Marek Polacek <polacek@redhat.com>
3553
3554 PR c/64768
3555 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3556 declared through a typedef name.
3557
e5d9235b
MP
35582015-02-13 Marek Polacek <polacek@redhat.com>
3559
3560 PR c/65050
3561 * c-decl.c (grokdeclarator): Print also the type when giving
3562 the error message about array's incomplete element type.
3563
fa01ffcc
JJ
35642015-02-11 Jakub Jelinek <jakub@redhat.com>
3565
3566 PR c/64824
3567 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3568 check in the POP macro.
3569
c3e38a03
MP
35702015-02-09 Marek Polacek <polacek@redhat.com>
3571
3572 PR c/64856
3573 * c-typeck.c (process_init_element): Don't always wrap
3574 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3575 initializing a range of elements.
3576
4886ec8e
JJ
35772015-02-04 Jakub Jelinek <jakub@redhat.com>
3578
3579 PR c/64824
3580 PR c/64868
3581 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3582
c3e38a03 35832015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3584
3585 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3586 processing enum declaration.
3587
7b33f0c8
MP
35882015-01-29 Marek Polacek <polacek@redhat.com>
3589
3590 PR c/64709
3591 * c-typeck.c (pop_init_level): If constructor_elements has
3592 exactly one element with integer_zerop value, set constructor_zeroinit
3593 to 1. Remove braces around warning_init call.
3594
dea63e49
JJ
35952015-01-27 Jakub Jelinek <jakub@redhat.com>
3596
3597 PR c/64766
3598 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3599 of FUNCTION_DECLs with error_mark_node.
3600
d38f7dce
JJ
36012015-01-26 Jakub Jelinek <jakub@redhat.com>
3602
3603 PR c/64778
3604 * c-typeck.c (convert_arguments): Return -1 if there are
3605 error_args, even if we've diagnosed too many arguments.
3606
cbf5d0e7
RB
36072015-01-21 Richard Biener <rguenther@suse.de>
3608
3609 PR middle-end/64313
3610 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3611 for builtins the user declared correctly.
3612
41dbbb37
TS
36132015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3614 Bernd Schmidt <bernds@codesourcery.com>
3615 Cesar Philippidis <cesar@codesourcery.com>
3616 James Norris <jnorris@codesourcery.com>
3617 Jakub Jelinek <jakub@redhat.com>
3618 Ilmir Usmanov <i.usmanov@samsung.com>
3619
3620 * c-parser.c: Include "gomp-constants.h".
3621 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3622 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3623 Use OMP_CLAUSE_SET_MAP_KIND.
3624 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3625 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3626 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3627 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3628 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3629 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3630 "copyout", "create", "delete", "deviceptr", "gang", "host",
3631 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3632 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3633 "present_or_create", "pcreate", "seq", "self", "vector",
3634 "vector_length", "wait", "worker".
3635 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3636 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3637 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3638 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3639 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3640 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3641 (c_parser_oacc_data_clause_deviceptr)
3642 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3643 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3644 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3645 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3646 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3647 (c_parser_oacc_parallel, c_parser_oacc_update)
3648 (c_parser_oacc_wait): New functions.
3649 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3650 (c_finish_oacc_data): New prototypes.
3651 * c-typeck.c: Include "gomp-constants.h".
3652 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3653 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3654 OMP_CLAUSE_SET_MAP_KIND.
3655 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3656 (c_finish_oacc_data): New functions.
3657 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3658 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3659 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3660 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3661 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3662 GOMP_MAP_FORCE_DEVICEPTR.
3663
adfac8df
JJ
36642015-01-09 Michael Collison <michael.collison@linaro.org>
3665
3666 * c-array-notation.c: Include hash-set.h, machmode.h,
3667 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3668 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3669 * c-aux-info.c: Ditto.
3670 * c-convert.c: Ditto.
3671 * c-decl.c: Ditto.
3672 * c-errors.c: Ditto.
3673 * c-lang.c: Dittoxs.
3674 * c-objc-common.c: Ditto.
3675 * c-parser.c: Ditto.
3676 * c-typeck.c: Include hash-set.h, machmode.h,
3677 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3678 fold-const.h, wide-int.h, inchash.h, real.h and
3679 fixed-value.h due to flattening of tree.h.
3680
2cc901dc
MP
36812015-01-07 Marek Polacek <polacek@redhat.com>
3682
3683 PR c/64417
3684 * c-typeck.c (process_init_element): Disallow initialization of
3685 a flexible array member with a string constant if the structure
3686 is in an array.
3687
5624e564
JJ
36882015-01-05 Jakub Jelinek <jakub@redhat.com>
3689
e5341100
JJ
3690 PR sanitizer/64344
3691 * c-typeck.c (convert_for_assignment, c_finish_return): For
3692 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3693 types also set in_late_binary_op around convert call.
3694 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3695 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3696 result on expr as last argument to ubsan_instrument_float_cast,
3697 if in_late_binary_op, don't use c_save_expr but save_expr.
3698
5624e564
JJ
3699 Update copyright years.
3700
5bd012f8
MP
37012015-01-05 Marek Polacek <polacek@redhat.com>
3702
3703 PR c/64423
3704 * c-typeck.c (build_array_ref): Pass loc down to
3705 warn_array_subscript_with_type_char.
3706
3f8257db 37072014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3708
3709 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3710 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3711 element type.
8e745a17 3712 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3713 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3714 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3715 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3716 to PEDWARN_FOR_QUALIFIERS.
768952be 3717
8f94a8c4
JJ
37182014-12-17 Jakub Jelinek <jakub@redhat.com>
3719
3720 PR sanitizer/64289
3721 * c-convert.c: Include ubsan.h.
3722 (convert): For real -> integral casts and
3723 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3724 instead instrument the float cast directly.
3725
b731b390
JJ
37262014-11-29 Jakub Jelinek <jakub@redhat.com>
3727
3728 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3729 c_finish_stmt_expr): Remove NULL last argument from
3730 create_tmp_var_raw and create_tmp_var calls.
3731 * c-array-notation.c (fix_builtin_array_notation_fn,
3732 build_array_notation_expr, fix_conditional_array_notations_1,
3733 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3734
541e35a6
MP
37352014-11-28 Marek Polacek <polacek@redhat.com>
3736
3737 PR c/63862
3738 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3739 convert the right operand to integer type.
3740
b286be94
MP
37412014-11-25 Marek Polacek <polacek@redhat.com>
3742
3743 PR c/63877
3744 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3745 for inline functions.
3746
aa7da51a
JJ
37472014-11-21 Jakub Jelinek <jakub@redhat.com>
3748
3749 PR target/63764
3750 * c-typeck.c (build_array_ref): Adjust
3751 convert_vector_to_pointer_for_subscript caller. If it returns true,
3752 call non_lvalue_loc on the result.
3753
d876207f
RB
37542014-11-11 Richard Biener <rguenther@suse.de>
3755
3756 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3757 to true.
3758
e5e44252
AK
37592014-11-10 Andi Kleen <ak@linux.intel.com>
3760
3761 PR c/60804
3762 * c-parser.c (c_parser_statement_after_labels): Call
3763 check_no_cilk.
3764 (c_parser_if_statement): Dito.
3765 (c_parser_switch_statement): Dito.
3766 (c_parser_while_statement): Dito.
3767 (c_parser_do_statement): Dito.
3768 (c_parser_for_statement): Dito.
3769 * c-typeck.c (c_finish_loop): Dito.
3770
13c21655
PC
37712014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3772
3773 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3774 OPT_Wshift_count_overflow in the warnings.
3775
2d51fcef
MP
37762014-10-30 Marek Polacek <polacek@redhat.com>
3777
3778 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3779 print the stripped version as well, if they're not the same.
3780
ef4bddc2
RS
37812014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3782
3783 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3784 machine_mode.
3785
c582198b
AM
37862014-10-28 Andrew MacLeod <amacleod@redhat.com>
3787
3788 * c-decl.c: Adjust include files.
3789 * c-parser.c: Ditto.
3790
ddc8de03
PM
37912014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3792 Tom Tromey <tromey@redhat.com>
3793
3794 * c-tree.h (enum c_oracle_request): New.
3795 (c_binding_oracle_function): New typedef.
3796 (c_binding_oracle, c_pushtag, c_bind): Declare.
3797 * c-decl.c (c_binding_oracle): New global.
3798 (I_SYMBOL_CHECKED): New macro.
3799 (i_symbol_binding): New function.
3800 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3801 (I_TAG_CHECKED): New macro.
3802 (i_tag_binding): New function.
3803 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3804 (I_LABEL_CHECKED): New macro.
3805 (i_label_binding): New function.
3806 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3807 (c_print_identifier): Save and restore c_binding_oracle.
3808 (c_pushtag, c_bind): New functions.
3809
60393bbc
AM
38102014-10-27 Andrew MacLeod <amacleod@redhat.com>
3811
3812 * c-typeck.c: Adjust include files.
3813
d723bb7c
MLI
38142014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3815
3816 PR c++/53061
3817 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3818 initialization here...
3819 (c_initialize_diagnostics): ... but here. Set defaults after
3820 building pretty-printer.
3821
1bc5a451
MP
38222014-10-23 Marek Polacek <polacek@redhat.com>
3823
3824 PR c/63626
3825 * c-decl.c (pop_scope): Don't print warning in external_scope.
3826
4435bb92
MP
38272014-10-19 Marek Polacek <polacek@redhat.com>
3828
3829 PR c/63567
3830 * c-typeck.c (output_init_element): Allow initializing objects with
3831 static storage duration with compound literals even in C99 and add
3832 pedwarn for it.
3833
7278465e
MP
38342014-10-17 Marek Polacek <polacek@redhat.com>
3835
3836 PR c/63567
3837 * c-typeck.c (digest_init): Allow initializing objects with static
3838 storage duration with compound literals even in C99 and add pedwarn
3839 for it.
3840
d9b7be2e
MP
38412014-10-17 Marek Polacek <polacek@redhat.com>
3842
3843 PR c/63543
3844 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3845 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3846 error multiple times. Print the type.
3847
f406ae1f
MP
38482014-10-17 Marek Polacek <polacek@redhat.com>
3849
3850 PR c/63549
3851 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3852 type.
3853
92574c7c
MP
38542014-10-17 Marek Polacek <polacek@redhat.com>
3855
3856 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3857 (start_function): Use OPT_Wimplicit_int instead of 0.
3858 (store_parm_decls_oldstyle): Likewise.
3859
1bc4a978
MT
38602014-10-17 Alan Modra <amodra@gmail.com>
3861
3862 PR middle-end/61848
3863 * c-decl.c (merge_decls): Don't merge section name or tls model
3864 to newdecl symtab node, instead merge to olddecl. Override
3865 existing olddecl section name. Set tls_model for all thread-local
3866 vars, not just OMP thread-private ones. Remove incorrect comment.
3867
83685514
AM
38682014-10-16 Andrew MacLeod <amacleod@redhat.com>
3869
3870 * c-decl.c: Adjust include files.
3871
78a7c317
DD
38722014-10-14 DJ Delorie <dj@redhat.com>
3873
3874 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3875 (c_token_starts_typename): Check all __intN, not just __int128.
3876 (c_token_starts_declspecs): Likewise.
3877 (c_parser_declspecs): Likewise.
3878 (c_parser_attribute_any_word): Likewise.
3879 (c_parser_objc_selector): Likewise.
3880 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3881 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3882 is specified.
3883 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3884 __int128.
3885 (finish_declspecs): Likewise.
3886
74d98c1e
AB
38872014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3888
8e745a17 3889 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3890 the duplicate code.
8e745a17 3891 (c_parser_statement): Call the new function.
74d98c1e 3892
84937de2
MP
38932014-10-09 Marek Polacek <polacek@redhat.com>
3894
3895 PR c/63480
3896 * c-typeck.c (pop_init_level): Don't warn about initializing
3897 with { }.
3898
0382aaa0
MP
38992014-10-07 Marek Polacek <polacek@redhat.com>
3900
3901 PR c/59717
3902 * c-decl.c (header_for_builtin_fn): New function.
3903 (implicitly_declare): Suggest which header to include.
3904
7a0ca710
MP
39052014-10-07 Marek Polacek <polacek@redhat.com>
3906
3907 * c-convert.c (convert): Use error_operand_p.
3908 * c-typeck.c (require_complete_type): Likewise.
3909 (really_atomic_lvalue): Likewise.
3910 (digest_init): Likewise.
3911 (handle_omp_array_sections_1): Likewise.
3912
6bc8a126
MP
39132014-10-03 Marek Polacek <polacek@redhat.com>
3914
3915 PR c/63453
3916 * c-decl.c (pop_scope): Don't warn about "inline function declared
3917 but never defined" for functions marked with gnu_inline attribute.
3918
d90c0a59
JJ
39192014-09-25 Jakub Jelinek <jakub@redhat.com>
3920
3921 PR c++/63249
3922 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3923 on low_bound and length.
3924
083e891e
MP
39252014-09-24 Marek Polacek <polacek@redhat.com>
3926
3927 PR c/61405
3928 PR c/53874
3929 * c-parser.c: Don't define CPP_KEYWORD.
3930 (c_parser_switch_statement): Pass original type to c_finish_case.
3931 * c-tree.h (c_finish_case): Update declaration.
3932 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3933 conditionally to c_do_switch_warnings.
3934
8d95fe25
MP
39352014-09-03 Marek Polacek <polacek@redhat.com>
3936
3937 PR c/62024
3938 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3939 conversions.
3940
9a771876
JJ
39412014-09-02 Jakub Jelinek <jakub@redhat.com>
3942 Balaji V. Iyer <balaji.v.iyer@intel.com>
3943 Igor Zamyatin <igor.zamyatin@intel.com>
3944
3945 * c-parser.c (c_parser_cilk_for): New function.
3946 (c_parser_cilk_grainsize): Likewise.
3947 (c_get_temp_regvar): Likewise.
3948 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3949 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3950 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3951 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3952 case.
3953
b7679d96
CG
39542014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3955
3956 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3957 with using HOST_WIDE_INT without truncation to 'int'
3958
59ea0364
MP
39592014-08-22 Marek Polacek <polacek@redhat.com>
3960
3961 PR c++/62199
3962 * c-typeck.c (parser_build_binary_op): Adjust call to
3963 warn_logical_not_parentheses.
3964
671a475e
IZ
39652014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3966
3967 PR other/62008
3968 * c-parser.c (c_parser_array_notation): Check for correct
3969 type of an array added.
3970
04159acf
MP
39712014-08-19 Marek Polacek <polacek@redhat.com>
3972
3973 PR c++/62153
3974 * c-typeck.c (build_binary_op): If either operand of a comparison
3975 is a boolean expression, call maybe_warn_bool_compare.
3976
c77935ee
PP
39772014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3978
3979 PR c/45584
3980 * c-typeck.c (build_c_cast): Do a conversion even when the
3981 TYPE_MAIN_VARIANTs are the same.
3982
35aff4fb
MP
39832014-08-19 Marek Polacek <polacek@redhat.com>
3984
3985 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3986 pedwarn_c99 instead of pedwarn.
3987 (grokfield): Likewise.
3988 (warn_defaults_to): New function.
3989 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3990 Unconditionally call pedwarn_c99 instead of pedwarn.
3991 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3992 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3993 check flag_isoc11 before.
3994 * c-errors.c (pedwarn_c99): Change the return type to bool.
3995 Handle -Wc99-c11-compat.
3996 * c-parser.c (disable_extension_diagnostics): Handle
3997 warn_c99_c11_compat.
3998 (restore_extension_diagnostics): Likewise.
3999 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4000 instead of pedwarn, don't check flag_isoc11 before.
4001 (c_parser_declspecs): Likewise.
4002 (c_parser_alignas_specifier): Likewise.
4003 (c_parser_alignof_expression): Likewise.
4004 (c_parser_generic_selection): Likewise.
4005 * c-tree.h (pedwarn_c99): Update declaration.
4006 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4007 of pedwarn_c99.
4008
177cce46
MP
40092014-08-19 Marek Polacek <polacek@redhat.com>
4010
4011 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4012 to pedwarn_c90.
4013 * c-errors.c: Include "opts.h".
4014 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4015 * c-parser.c (disable_extension_diagnostics): Handle negative value
4016 of warn_c90_c99_compat, too.
4017 (restore_extension_diagnostics): Likewise.
4018 (c_parser_compound_statement_nostart): Pass
4019 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4020
6dc99c33
MP
40212014-08-12 Marek Polacek <polacek@redhat.com>
4022
4023 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4024 Add pedwarn.
4025 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4026 Likewise.
4027 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4028
3f8257db 40292014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4030
4031 PR c/51849
4032 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4033 Call pedwarn_c90 instead of pedwarn.
4034 (check_bitfield_type_and_width): Likewise.
4035 (declspecs_add_qual): Likewise.
4036 (declspecs_add_type): Likewise.
4037 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4038 Adjust to only call pedwarn_c90.
4039 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4040 pedwarn_c90 instead of pedwarn.
4041 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4042 * c-parser.c (disable_extension_diagnostics): Handle
4043 warn_c90_c99_compat.
4044 (restore_extension_diagnostics): Likewise.
4045 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4046 pedwarn_c90 instead of pedwarn.
4047 (c_parser_initelt): Likewise.
4048 (c_parser_postfix_expression): Likewise.
4049 (c_parser_postfix_expression_after_paren_type): Likewise.
4050 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4051 * c-tree.h: Fix formatting.
4052 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4053 pedwarn_c90 instead of pedwarn.
4054
9f25a338
TS
40552014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4056
4057 * c-typeck.c: Remove include of pointer-set.h.
4058
044331a8
MP
40592014-08-07 Marek Polacek <polacek@redhat.com>
4060
4061 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4062
b787e7a2
TS
40632014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4064
4065 * c-typeck.c: Use hash_map instead of pointer_map.
4066
6e2830c3
TS
40672014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4068
4069 * c-decl.c: Use hash_set instead of pointer_set.
4070
a7ee52fb
IZ
40712014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4072
4073 PR middle-end/61455
4074 * c-array-notation.c (expand_array_notations): Handling
4075 of DECL_EXPR added.
4076
b4dfdc11
MG
40772014-07-31 Marc Glisse <marc.glisse@inria.fr>
4078
4079 PR c++/60517
4080 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4081 a local variable.
4082
976d5a22
TT
40832014-07-30 Tom Tromey <tromey@redhat.com>
4084
4085 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4086 field.
4087 (really_start_incremental_init, push_init_level): Initialize
4088 designator_depth.
4089 (pop_init_level): Set global designator_depth.
4090 (process_init_element): Check for designated_init attribute.
4091
30281de2
MP
40922014-07-20 Marek Polacek <polacek@redhat.com>
4093
4094 PR c/61852
4095 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4096 (implicitly_declare): Pass location to implicit_decl_warning.
4097
b108f48f
JJ
40982014-07-14 Jakub Jelinek <jakub@redhat.com>
4099
4100 PR middle-end/61294
4101 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4102 If non-NULL, call c_parser_check_literal_zero.
4103 (c_parser_check_literal_zero): New function.
4104 (c_parser_postfix_expression_after_primary): Adjust
4105 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4106
773ec47f
MP
41072014-07-06 Marek Polacek <polacek@redhat.com>
4108
4109 PR c/6940
4110 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4111 * c-tree.h (C_ARRAY_PARAMETER): Define.
4112 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4113 function parameter.
4114
22e1cf1c 41152014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4116 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4117
4118 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4119 releasing symbol.
4120
52ec0ea3
MP
41212014-07-01 Marek Polacek <polacek@redhat.com>
4122
4123 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4124 instead of 0 to WARN_FOR_ASSIGNMENT.
4125
d5c3d343
MP
41262014-07-01 Marek Polacek <polacek@redhat.com>
4127
4128 PR c/58286
4129 * c-typeck.c (convert_for_assignment): Pass
4130 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4131
6a7253a4
MP
41322014-06-30 Marek Polacek <polacek@redhat.com>
4133
4134 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4135 has no_sanitize_undefined attribute.
4136
5e88a8f4
IZ
41372014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4138
4139 PR middle-end/57541
4140 * c-array-notation.c (fix_builtin_array_notation_fn):
4141 Check for 0 arguments in builtin call. Check that bultin argument is
4142 correct.
4143 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4144 index.
4145
9698b078
SH
41462014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4147
4148 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4149 qualifiers in __auto_type for atomic types.
4150 (c_parser_typeof_specifier): Discard all type qualifiers in
4151 __typeof__ for atomic types.
4152
6e07c515
MP
41532014-06-25 Marek Polacek <polacek@redhat.com>
4154
4155 PR c/61162
4156 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4157 the return expression to c_finish_return.
4158
da6f124d
JJ
41592014-06-25 Jakub Jelinek <jakub@redhat.com>
4160
4161 * c-typeck.c (c_finish_omp_clauses): Make sure
4162 OMP_CLAUSE_LINEAR_STEP has correct type.
4163
c203e8a7
TS
41642014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4165
4166 * c-decl.c: Adjust.
4167
56ad0e38
JJ
41682014-06-24 Jakub Jelinek <jakub@redhat.com>
4169
4170 * c-parser.c (c_parser_omp_for_loop): For
4171 #pragma omp parallel for simd move lastprivate clause from parallel
4172 to for rather than simd.
4173
47c2554f
MP
41742014-06-23 Marek Polacek <polacek@redhat.com>
4175
4176 * c-typeck.c (parser_build_binary_op): Don't call
4177 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4178
56363ffd
JH
41792014-06-15 Jan Hubicka <hubicka@ucw.cz>
4180
4181 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4182 * c-decl.c (merge_decls): Likewise.
4183
d7ff7ae5
MP
41842014-06-09 Marek Polacek <polacek@redhat.com>
4185
4186 PR c/36446
4187 * c-typeck.c (error_init): Call inform instead of error_at.
4188 (pedwarn_init): Call inform instead of pedwarn.
4189 (warning_init): Call inform instead of warning_at.
4190
24d047a3
JH
41912014-06-07 Jan Hubicka <hubicka@ucw.cz>
4192
4193 * c-decl.c (merge_decls): Use set_decl_section_name.
4194 (duplicate_decls): Remove node if it exists.
4195
9bac5cbb
G
41962014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4197
4198 PR c/53119
4199 * c-typeck.c (push_init_level, process_init_element,
4200 pop_init_level): Correct check for zero initialization, move
4201 missing brace warning to respect zero initialization.
4202
8ffcdea8
MP
42032014-06-05 Marek Polacek <polacek@redhat.com>
4204
4205 PR c/56724
4206 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4207
742938c9
MP
42082014-06-05 Marek Polacek <polacek@redhat.com>
4209
4210 PR c/49706
4211 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4212 on the left hand side operand of a comparison.
4213
6447c55d
MP
42142014-06-05 Marek Polacek <polacek@redhat.com>
4215
4216 PR c/48062
4217 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4218 Print note only if the warning was printed.
4219
9dc7743c
IZ
42202014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4221
4222 PR c/58942
4223 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4224 with a pointer.
4225
fedfecef
MP
42262014-06-03 Marek Polacek <polacek@redhat.com>
4227
4228 PR c/60439
4229 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4230 c_start_case.
4231 * c-tree.h (c_start_case): Update.
4232 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4233 switch condition has boolean value.
4234
9b2b7279
AM
42352014-06-02 Andrew MacLeod <amacleod@redhat.com>
4236
4237 * c-decl.c: Include builtins.h.
4238 * c-parser.c: Likewise.
4239
5c1bc275
MP
42402014-05-27 Marek Polacek <polacek@redhat.com>
4241
4242 PR c/56724
4243 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4244 error and warning calls to error_at and warning_at. Pass location of
4245 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4246 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4247 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4248
97563bc8
IZ
42492014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4250
4251 PR c/61191
4252 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4253 function parameters.
4254
aede2c10
JH
42552014-05-23 Jan Hubicka <hubicka@ucw.cz>
4256
4257 * c-decl.c (merge_decls): Preserve symtab node pointers.
4258 (duplicate_decls): Free new decl.
4259
edbba2ce
TS
42602014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4261
f3316c6d
TS
4262 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4263 initialization.
4264
edbba2ce
TS
4265 * c-parser.c (c_parser_omp_target): Return bool values.
4266
68c81f24
TS
42672014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4268
4269 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4270 num_teams_loc variable to num_thread_limit_loc.
4271
632f2871
RS
42722014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4273
4274 * c-array-notation.c (expand_array_notations): Use void_node
4275 instead of void_zero_node.
4276
766090c2
TS
42772014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4278
4279 * c-decl.c (finish_struct): Adjust.
4280 (finish_enum): Likewise.
4281 (bind): Adjust.
4282 (record_inline_static): Likewise.
4283 (push_scope): Likewise.
4284 (make_label): Likewise.
4285 (lookup_label_for_goto): Likewise.
4286 (finish_struct): Likewise.
4287 (finish_enum): Likewise.
4288 (store_parm_decls): Likewise.
4289 (c_push_function_context): Likewise.
4290 * c-lang.h: Remove usage of variable_size gty attribute.
4291 * c-parser.c (c_parse_init): Adjust.
4292 (c_parse_file): Likewise.
4293
2b107f6b
MP
42942014-05-13 Marek Polacek <polacek@redhat.com>
4295
4296 PR c/61162
4297 * c-typeck.c (convert_for_assignment): Pass location to
4298 WARN_FOR_ASSIGNMENT instead of input_location.
4299
d033409e
MP
43002014-05-10 Marek Polacek <polacek@redhat.com>
4301
4302 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4303 maybe_warn_string_init.
4304 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4305 maybe_warn_string_init.
4306 * c-tree.h (maybe_warn_string_init): Update declaration.
4307 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4308 Call pedwarn_init with loc instead of with input_location.
4309 (digest_init): Pass init_loc to maybe_warn_string_init.
4310 (pop_init_level): Call pedwarn_init with loc instead of with
4311 input_location.
4312 (set_init_index): Likewise.
4313 (process_init_element): Likewise.
4314
ea58ef42
MP
43152014-05-09 Marek Polacek <polacek@redhat.com>
4316
4317 PR c/61096
4318 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4319 (c_parser_initelt): Pass location to set_init_label. Pass array index
4320 location to set_init_index.
4321 * c-tree.h (push_init_level): Update declaration.
4322 (pop_init_level): Likewise.
4323 (set_init_index): Likewise.
4324 (set_init_label): Likewise.
4325 * c-typeck.c (error_init): Add location parameter. Call error_at
4326 instead of error.
4327 (digest_init): Pass init_loc to error_init.
4328 (really_start_incremental_init):
4329 (push_init_level): Add location parameter. Pass loc to pop_init_level
4330 and error_init.
4331 (pop_init_level): Likewise.
4332 (set_designator): Add location parameter. Pass loc to pop_init_level,
4333 push_init_level, and error_init.
4334 (set_init_index): Add location parameter. Pass loc to error_init and
4335 set_designator.
4336 (set_init_label): Likewise.
4337 (output_init_element): Pass loc to error_init.
4338 (process_init_element): Pass loc to error_init, pop_init_level,
4339 pedwarn_init, and push_init_level.
4340
661a0813
MP
43412014-05-09 Marek Polacek <polacek@redhat.com>
4342
4343 PR c/50459
4344 * c-parser.c (c_parser_attributes): Parse the arguments as an
4345 expression-list if the attribute takes identifier.
4346
2793eeab
MP
43472014-05-08 Marek Polacek <polacek@redhat.com>
4348
4349 PR c/61053
4350 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4351 TYPE_ALIGN_UNIT.
4352
f827930a
MP
43532014-05-08 Marek Polacek <polacek@redhat.com>
4354
4355 PR c/61077
4356 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4357 of main.
4358
1d60af08
KZ
43592014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4360 Mike Stump <mikestump@comcast.net>
4361 Richard Sandiford <rdsandiford@googlemail.com>
4362
4363 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4364 (finish_enum): Use wide-int interfaces.
4365 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4366 * c-typeck.c (build_c_cast): Likewise.
4367 (set_nonincremental_init_from_string): Likewise.
4368 (c_tree_equal): Likewise.
4369
a0e24419
MP
43702014-05-02 Marek Polacek <polacek@redhat.com>
4371
4372 PR c/25801
4373 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4374 Return size_one_node when the type is not complete.
4375 (pointer_diff): Remove comment.
4376 (build_unary_op): Improve error messages.
4377
19fc9faa
MP
43782014-05-02 Marek Polacek <polacek@redhat.com>
4379
4380 * c-typeck.c (c_finish_return): Separate warning_at calls.
4381
63bc4e87
MP
43822014-05-02 Marek Polacek <polacek@redhat.com>
4383
4384 * c-tree.h (error_init): Remove declaration.
4385 (pedwarn_init): Likewise.
4386 * c-typeck.c (error_init): Make static and move above.
4387 (pedwarn_init): Likewise.
4388 (warning_init): Move above.
4389 (maybe_warn_string_init): Likewise.
4390
4bd2511b
JL
43912014-05-01 Jeff Law <law@redhat.com>
4392
4393 Revert:
4394
4395 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4396 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4397 avoid goto.
4398
6a358dcb
MP
43992014-05-02 Marek Polacek <polacek@redhat.com>
4400
4401 PR c/60784
4402 * c-typeck.c (push_init_level): Set constructor_designated to
4403 p->designated for structures.
4404
ae5ebda4
MP
44052014-05-01 Marek Polacek <polacek@redhat.com>
4406
4407 PR c/60915
4408 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4409 function-definition has an attribute after the declarator.
4410
96b40f8d
MP
44112014-05-01 Marek Polacek <polacek@redhat.com>
4412
4413 PR c/60257
4414 * c-typeck.c (warning_init): Add location_t parameter. Call
4415 warning_at instead of warning.
4416 (push_init_level): Pass input_location to warning_init.
4417 (add_pending_init): Add location_t parameter. Pass loc to
4418 warning_init.
4419 (set_nonincremental_init): Pass input_location to add_pending_init.
4420 (set_nonincremental_init_from_string): Likewise.
4421 (output_init_element): Pass loc to warning_init and to
4422 add_pending_init.
4423
32e00768
MP
44242014-05-01 Marek Polacek <polacek@redhat.com>
4425
4426 PR c/43395
4427 * c-typeck.c (c_finish_return): Distinguish between label and variable
4428 when warning about returning local address.
4429
c9379ce2
MP
44302014-05-01 Marek Polacek <polacek@redhat.com>
4431
4432 PR c/29467
4433 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4434 in C89 mode.
4435
d00887e8
MP
44362014-05-01 Marek Polacek <polacek@redhat.com>
4437
4438 PR c/43245
4439 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4440 instead of 0 to WARN_FOR_QUALIFIERS.
4441
5436fa2e
MP
44422014-05-01 Marek Polacek <polacek@redhat.com>
4443
4444 PR c/56989
4445 * c-typeck.c (default_conversion): Use better location for
4446 error call.
4447
f8ed5150
MP
44482014-04-30 Marek Polacek <polacek@redhat.com>
4449
4450 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4451 also when SANITIZE_FLOAT_DIVIDE is on.
4452
8337d1db
MP
44532014-04-30 Marek Polacek <polacek@redhat.com>
4454
4455 PR c/60139
4456 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4457 and pedwarn_init. Use loc insted of input_location.
4458
c4bdc42f
MP
44592014-04-30 Marek Polacek <polacek@redhat.com>
4460
4461 PR c/60351
4462 * c-typeck.c (build_binary_op): Use location when warning about
4463 shift count.
4464
45484dcf
MP
44652014-04-25 Marek Polacek <polacek@redhat.com>
4466
4467 PR c/18079
4468 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4469 always_inline/noinline and hot/cold attributes.
4470
34cf811f
MP
44712014-04-25 Marek Polacek <polacek@redhat.com>
4472
4473 PR c/60114
4474 * c-parser.c (c_parser_initelt): Pass input_location to
4475 process_init_element.
4476 (c_parser_initval): Pass loc to process_init_element.
4477 * c-tree.h (process_init_element): Adjust declaration.
4478 * c-typeck.c (push_init_level): Pass input_location to
4479 process_init_element.
4480 (pop_init_level): Likewise.
4481 (set_designator): Likewise.
4482 (output_init_element): Add location_t parameter. Pass loc to
4483 digest_init.
4484 (output_pending_init_elements): Pass input_location to
4485 output_init_element.
4486 (process_init_element): Add location_t parameter. Pass loc to
4487 output_init_element.
4488
42056eac
JJ
44892014-04-24 Jakub Jelinek <jakub@redhat.com>
4490
4491 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4492 atomic-clause, allow comma in between atomic-clause and
4493 seq_cst.
4494
e162a134
JJ
44952014-04-22 Jakub Jelinek <jakub@redhat.com>
4496
4497 PR c/59073
4498 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4499 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4500
2f6babac
IZ
45012014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4502
4503 PR middle-end/60469
4504 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4505 create_tmp_var instead build_decl for creating temps.
4506 (build_array_notation_expr): Likewise.
4507 (fix_conditional_array_notations_1): Likewise.
4508 (fix_array_notation_expr): Likewise.
4509 (fix_array_notation_call_expr): Likewise.
4510
8edbfaa6
JJ
45112014-03-28 Jakub Jelinek <jakub@redhat.com>
4512
4513 PR c++/60689
4514 * c-tree.h (c_build_function_call_vec): New prototype.
4515 * c-typeck.c (build_function_call_vec): Don't call
4516 resolve_overloaded_builtin here.
4517 (c_build_function_call_vec): New wrapper function around
4518 build_function_call_vec. Call resolve_overloaded_builtin here.
4519 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4520 Call c_build_function_call_vec instead of build_function_call_vec.
4521 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4522 * c-decl.c (finish_decl): Likewise.
4523
7485aeea
MLI
45242014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4525
4526 PR c/55383
4527 * c-typeck.c: Use correct format string in cast-qual warning
4528
b17a8b07
TS
45292014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4530
4531 * c-decl.c (c_decl_attributes): Use
4532 lang_hooks.types.omp_mappable_type.
4533 * c-typeck.c (c_finish_omp_clauses): Likewise.
4534
3af9c5e9
MP
45352014-03-06 Marek Polacek <polacek@redhat.com>
4536
4537 PR c/60197
4538 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4539 of checking tree code.
4540
1c9f5f33
PK
45412014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4542
4543 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4544 (c_parser_parameter_declaration): Likewise.
4545
cc28fc7f
MP
45462014-02-19 Marek Polacek <polacek@redhat.com>
4547
4548 PR c/60195
4549 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4550 Call mark_exp_read on exp.value.
4551 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4552 TREE_ADDRESSABLE on old instead of val.
4553 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4554
b581c05c
PK
45552014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4556
4557 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4558 C_EXPR_APPEND by vec_safe_push.
4559 * c-tree.h (C_EXPR_APPEND): Remove.
4560
81e5eca8
MP
45612014-01-31 Marek Polacek <polacek@redhat.com>
4562
4563 PR c/59963
4564 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4565 build_function_call_vec.
4566 (build_function_call): Likewise.
4567 (build_atomic_assign): Likewise.
4568 (build_function_call_vec): Add arg_loc parameter. Use it.
4569 (convert_arguments): Likewise.
4570 (convert_for_assignment): Rename rhs_loc to expr_loc.
4571 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4572 (c_parser_objc_keywordexpr): Likewise.
4573 (c_parser_postfix_expression_after_primary): Call
4574 build_function_call_vec with expr_loc rather than op_loc.
4575 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4576 build_function_call_vec.
4577 (c_parser_expr_list): Add locations parameter. Fill it with locations
4578 of function arguments.
4579 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4580
68fca595
MP
45812014-01-30 Marek Polacek <polacek@redhat.com>
4582
4583 PR c/59940
4584 * c-typeck.c (build_function_call_vec): Use loc parameter.
4585 (convert_arguments): Add location parameter. Use it.
4586 (ep_convert_and_check): Likewise.
4587 (build_atomic_assign): Adjust convert_for_assignment call.
4588 (build_modify_expr): Likewise.
4589 (digest_init): Likewise.
4590 (c_finish_return): Likewise.
4591 (build_conditional_expr): Adjust ep_convert_and_check calls.
4592 (convert_for_assignment): Add rhs_loc parameter. Use it.
4593 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4594 calls.
4595
fa337f3a
RB
45962014-01-30 Richard Biener <rguenther@suse.de>
4597
4598 PR c/59905
4599 * c-typeck.c (build_function_call_vec): Do not replace calls
4600 to a function via an incompatible type with a runtime abort.
4601
b72271b9
BI
46022014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4603
4604 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4605 flag_enable_cilkplus with flag_cilkplus.
4606 (c_parser_direct_declarator_inner): Likewise.
4607 (c_parser_attribute_any_word): Likewise.
4608 (c_parser_attributes): Likewise.
4609 (c_parser_compound_statement): Likewise.
4610 (c_parser_statement_after_labels): Likewise.
4611 (c_parser_if_statement): Likewise.
4612 (c_parser_switch_statement): Likewise.
4613 (c_parser_do_statement): Likewise.
4614 (c_parser_for_statement): Likewise.
4615 (c_parser_unary_expression): Likewise.
4616 (c_parser_postfix_expression): Likewise.
4617 (c_parser_postfix_expression_after_primary): Likewise.
4618 (c_parser_postfix_expression_after_primary): Likewise.
4619 (c_parser_omp_clause_name): Likewise.
4620 (c_finish_omp_declare_simd): Likewise.
4621 (c_parser_cilk_verify_simd): Likewise.
4622 * c-typeck.c (build_array_ref): Likewise.
4623 (build_function_call_vec): Likewise.
4624 (convert_arguments): Likewise.
4625 (build_compound_expr): Likewise.
4626 (c_finish_return): Likewise.
4627 (c_finish_if_stmt): Likewise.
4628 (c_finish_loop): Likewise.
4629 (build_binary_op): Likewise.
4630
393e8e8b
MP
46312014-01-23 Marek Polacek <polacek@redhat.com>
4632
4633 PR c/59846
4634 * c-typeck.c (parser_build_binary_op): Use location instead of
4635 input_location.
4636 (build_binary_op): Pass location to shorten_compare.
4637
f04dda30
MP
46382014-01-23 Marek Polacek <polacek@redhat.com>
4639
4640 PR c/58346
4641 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4642 an empty aggregate.
4643
789eadcd
MP
46442014-01-23 Marek Polacek <polacek@redhat.com>
4645
4646 PR c/59871
4647 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4648 of a comma expression.
4649 (emit_side_effect_warnings): Likewise.
4650
40f14e9f
BI
46512014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4652
4653 PR c/59825
4654 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4655 function to use walk_tree and moved a lot of its functionality to
4656 expand_array_notations.
4657 (expand_array_notations): New function.
4658
74558dd9
BI
46592014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4660
4661 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4662 attribute an attribute without value.
4663
652fea39
JJ
46642014-01-23 Jakub Jelinek <jakub@redhat.com>
4665
4666 PR middle-end/58809
4667 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4668 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4669
f34f1c87
MP
46702014-01-22 Marek Polacek <polacek@redhat.com>
4671
4672 PR c/59891
4673 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4674 of remove_c_maybe_const_expr on op1 and op2.
4675
241f845a
JJ
46762014-01-15 Jakub Jelinek <jakub@redhat.com>
4677
4678 PR c/58943
4679 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4680 effects, preevaluate rhs using SAVE_EXPR first.
4681
9a74f20c
BI
46822014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4683
4684 PR c++/59631
4685 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4686 statements with if-elseif statements.
4687
96066ce1
MP
46882014-01-06 Marek Polacek <polacek@redhat.com>
4689
4690 PR c/57773
4691 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4692 defined bit-field types only in ISO C.
4693
23a5b65a
RS
46942014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4695
4696 Update copyright years
4697
f9030485
RS
46982014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4699
4700 * c-array-notation.c: Use the standard form for the copyright notice.
4701
41958c28
BI
47022013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4703
4704 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4705 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4706 field in parser is not empty. If not-empty, call the function
4707 c_parser_finish_omp_declare_simd.
4708 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4709 between SIMD-enabled functions and #pragma simd. Added new parameter.
4710 (c_parser_cilk_all_clauses): Modified the usage of the function
4711 c_parser_cilk_clause_vectorlength as mentioned above.
4712 (c_parser_cilk_simd_fn_vector_attrs): New function.
4713 (c_finish_cilk_simd_fn_tokens): Likewise.
4714 (is_cilkplus_vector_p): Likewise.
4715 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4716 "nomask," and "mask" strings in clause name.
4717 (c_parser_omp_all_clauses): Added 3 new case statements:
4718 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4719 PRAGMA_CILK_CLAUSE_NOMASK.
4720 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4721 check for vector attribute and if so call the function
4722 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4723 called the function c_finish_cilk_simd_fn_tokens.
4724 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4725 parser field is non-empty. If so, parse them as you would parse
4726 the omp declare simd pragma.
4727 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4728 Added a check when step is a parameter and flag it as error.
4729 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4730 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4731 pragma_omp_clause.
4732
cef0fd0e
TS
47332013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4734
4735 * c-parser.c (c_parser_omp_parallel): Fix description.
4736
12893402
BI
47372013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4738
4739 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4740 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4741 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4742 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4743
296674db
JM
47442013-12-04 Joseph Myers <joseph@codesourcery.com>
4745
4746 PR c/52023
4747 * c-parser.c (c_parser_alignas_specifier): Use
4748 c_sizeof_or_alignof_type instead of c_alignof.
4749 (c_parser_alignof_expression): Likewise, with min_alignof
4750 parameter depending on alignof spelling used.
4751
edd28054
MP
47522013-12-04 Marek Polacek <polacek@redhat.com>
4753
4754 PR c/54113
4755 * c-decl.c (start_function): Don't warn for missing prototype for
4756 inline functions.
4757
da0fc454
MP
47582013-12-03 Marek Polacek <polacek@redhat.com>
4759
4760 PR c/59351
4761 * c-decl.c (build_compound_literal): Allow compound literals with
4762 empty initial value.
4763
4c2ecab0
JM
47642013-12-02 Joseph Myers <joseph@codesourcery.com>
4765
4766 PR c/58235
4767 * c-typeck.c (build_modify_expr): Diagnose assignment to
4768 expression with array type.
4769
340baef7
JM
47702013-11-29 Joseph Myers <joseph@codesourcery.com>
4771
4772 PR c/42262
4773 * c-typeck.c (process_init_element): Do not treat a string as
4774 initializing a whole array when used with a designator for an
4775 individual element.
4776
6763b9f7
JM
47772013-11-29 Joseph Myers <joseph@codesourcery.com>
4778
4779 PR c/57574
4780 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4781 an inline function following a static declaration.
4782
e7bd1de1
JJ
47832013-11-28 Jakub Jelinek <jakub@redhat.com>
4784
4785 PR c/59310
4786 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4787 to p_name before calling c_parser_omp_teams instead of after.
4788 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4789 argument. Remove unused p_name variable.
4790
0136f8f0
AH
47912013-11-27 Aldy Hernandez <aldyh@redhat.com>
4792 Jakub Jelinek <jakub@redhat.com>
4793
4794 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4795 external_scope is NULL.
4796
241b71bb
TV
47972013-11-27 Tom de Vries <tom@codesourcery.com>
4798 Marc Glisse <marc.glisse@inria.fr>
4799
4800 PR c++/59032
4801 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4802
2fb9a547
AM
48032013-11-22 Andrew MacLeod <amacleod@redhat.com>
4804
4805 * c-typeck.c: Add required include files from gimple.h.
4806
8400e75e
DM
48072013-11-22 David Malcolm <dmalcolm@redhat.com>
4808
4809 * c-decl.c (define_label, shadow_tag_warned)
4810 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4811 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4812 (declspecs_add_type): Remove use of in_system_header macro.
4813 * c-parser.c (c_parser_unary_expression): Likewise.
4814 * c-typeck.c (store_init_value, process_init_element)
4815 (c_start_case): Likewise.
4816
4817 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4818 macro.
4819
4820 * c-parser.c (c_parser_set_source_position_from_token): Remove
4821 reference to in_system_header from comment.
4822
386b1f1f
RS
48232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4824
4825 * c-decl.c (grokdeclarator): Update comment to refer to
4826 tree_to_[su]hwi rather than tree_low_cst.
4827
ae7e9ddd
RS
48282013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4829
4830 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4831 tree_to_uhwi throughout.
4832
9439e9a1
RS
48332013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4834
4835 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4836 throughout.
4837
9541ffee
RS
48382013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4839
4840 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4841 throughout.
4842
c02065fc
AH
48432013-11-15 Aldy Hernandez <aldyh@redhat.com>
4844
4845 * c-parser.c (c_parser_cilk_simd): New.
4846 (c_parser_cilk_verify_simd): New.
4847 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4848 (c_parser_omp_for_loop): Add case for NE_EXPR.
4849 Set c_break_label for CILK_SIMD.
4850 (c_parser_cilk_clause_vectorlength): New.
4851 (c_parser_cilk_clause_linear): New.
4852 (c_parser_cilk_clause_name): New.
4853 (c_parser_cilk_all_clauses): New.
4854 * c-typeck.c (build_unary_op): Pass location argument to
4855 readonly_error.
4856 (build_modify_expr): Same.
4857 (build_asm_expr): Same.
4858 (c_finish_bc_stmt): Error on break/continue in loops.
4859
18f429e2
AM
48602013-11-14 Andrew MacLeod <amacleod@redhat.com>
4861
4862 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4863
d8a2d370
DN
48642013-11-14 Diego Novillo <dnovillo@google.com>
4865
4866 * c-decl.c: Include print-tree.h.
4867 Include stor-layout.h.
4868 Include varasm.h.
4869 Include attribs.h.
4870 Include stringpool.h.
4871 * c-lang.c: Include fold-const.h.
4872 * c-parser.c: Include stringpool.h.
4873 Include attribs.h.
4874 Include stor-layout.h.
4875 Include varasm.h.
4876 Include trans-mem.h.
4877 * c-typeck.c: Include stor-layout.h.
4878 Include trans-mem.h.
4879 Include varasm.h.
4880 Include stmt.h.
4881
38b7bc7f
JM
48822013-11-13 Joseph Myers <joseph@codesourcery.com>
4883
4884 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4885 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4886 __auto_type.
4887 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4888 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4889 RID_AUTO_TYPE.
4890 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4891 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4892 (c_parser_declarator, c_parser_direct_declarator_inner)
4893 (c_parser_parameter_declaration, c_parser_type_name): All callers
4894 changed.
4895 (c_parser_declaration_or_fndef): Handle declarations with type
4896 determined from the initializer.
4897
45b0be94
AM
48982013-11-12 Andrew MacLeod <amacleod@redhat.com>
4899
18f429e2 4900 * c-typeck.c: Include gimplify.h.
45b0be94 4901
582d9b50
JM
49022013-11-12 Joseph Myers <joseph@codesourcery.com>
4903
4904 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4905 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4906 comment.
4907 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4908 or _Thread_local as appropriate in diagnostics.
4909 (build_null_declspecs): Initialize ret->thread_gnu_p.
4910 (declspecs_add_scspec): Handle either __thread or _Thread_local
4911 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4912 pedantic. Do not disallow _Thread_local extern and _Thread_local
4913 static.
4914
267bac10
JM
49152013-11-07 Joseph Myers <joseph@codesourcery.com>
4916 Andrew MacLeod <amacleod@redhat.com>
4917
4918 * c-aux-info.c (gen_type): Handle atomic qualifier.
4919 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4920 qualifiers when compating types.
4921 (shadow_tag_warned): Handle atomic_p in declspecs.
4922 (quals_from_declspecs): Likewise.
4923 (start_decl): Use c_type_promotes_to when promoting argument
4924 types.
4925 (grokdeclarator): Handle _Atomic.
4926 (get_parm_info): Diagnose any qualifier on "void" as only
4927 parameter.
4928 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4929 comparing types. Use c_type_promotes_to when promoting argument
4930 types.
4931 (finish_function): Use c_type_promotes_to when promoting argument
4932 types.
4933 (build_null_declspecs): Handle atomic_p in declspecs.
4934 (declspecs_add_qual): Handle RID_ATOMIC.
4935 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4936 (c_token_starts_declspecs): Handle RID_ATOMIC.
4937 (c_parser_declspecs): Handle atomic type specifiers and
4938 qualifiers.
4939 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4940 from types of expressions with atomic type.
4941 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4942 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4943 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4944 (c_parser_statement_after_labels, c_parser_switch_statement)
4945 (c_parser_for_statement, c_parser_expr_no_commas)
4946 (c_parser_conditional_expression, c_parser_binary_expression)
4947 (c_parser_cast_expression, c_parser_unary_expression)
4948 (c_parser_postfix_expression)
4949 (c_parser_postfix_expression_after_primary, c_parser_expression):
4950 Use convert_lvalue_to_rvalue.
4951 (c_parser_expression_conv, c_parser_expr_list): Document
4952 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4953 (c_parser_objc_synchronized_statement): Use
4954 convert_lvalue_to_rvalue.
4955 (c_parser_objc_selector): Handle RID_ATOMIC.
4956 (c_parser_objc_receiver, c_parser_array_notation): Use
4957 convert_lvalue_to_rvalue.
4958 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4959 _Atomic (type-name).
4960 (struct c_declspecs): Add atomic_p field.
4961 (convert_lvalue_to_rvalue): Declare.
4962 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4963 corresponding atomic types.
4964 (qualify_type): Don't add _Atomic qualifiers from second argument.
4965 (comp_target_types): Do not allow _Atomic mismatches.
4966 (type_lists_compatible_p): Do not remove atomic qualifiers when
4967 comparing types.
4968 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4969 (build_atomic_assign): New functions.
4970 (build_unary_op): Use build_atomic_assign for atomic increment and
4971 decrement.
4972 (build_conditional_expr): Do not treat _Atomic void as a qualified
4973 version of void.
4974 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4975 (find_anonymous_field_with_type, convert_to_anonymous_field)
4976 (convert_for_assignment): Do not remove atomic qualifiers when
4977 comparing types.
4978 (digest_init): Do not accept initialization of arrays of atomic
4979 elements by string constants.
4980 (build_asm_expr): Use convert_lvalue_to_rvalue.
4981 (build_binary_op): Do not treat _Atomic void as a qualified
4982 version of void.
4983
0c249d4b
DD
49842013-11-06 DJ Delorie <dj@redhat.com>
4985
4986 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4987 both explicit and builtin, print the location of the explicit one.
4988
6d7f7e0a
TB
49892013-11-05 Tobias Burnus <burnus@net-b.de>
4990
4991 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4992 c_parser_omp_distribute, c_parser_omp_teams,
4993 c_parser_omp_target, c_parser_omp_declare): Handle
4994 -fopenmp-simd.
4995
b906f4ca
MP
49962013-11-03 Marek Polacek <polacek@redhat.com>
4997
4998 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4999
ee1d5a02
JJ
50002013-11-01 Jakub Jelinek <jakub@redhat.com>
5001
5002 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5003 check_dup_generic at the end, unless remove is true.
5004 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5005 remove = true;.
5006 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5007
5a9785fb
JJ
50082013-10-31 Jakub Jelinek <jakub@redhat.com>
5009
5010 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5011 with decl that is not pointer nor array.
5012
939b37da
BI
50132013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5014
5015 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5016 a spawning function is found.
5017 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5018 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5019 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5020 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5021 case.
5022 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5023 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5024 expr.
5025 (c_finish_return): Added a check to reject _Cilk_spawn in return
5026 expression.
5027 (build_cilk_spawn): New function.
5028 (build_cilk_sync): Likewise.
5029 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5030
d4af74d4
TB
50312013-10-27 Tobias Burnus <burnus@net-b.de>
5032
5033 PR other/33426
5034 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5035 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5036 (c_parser_statement_after_labels): Update calls.
5037
d73749df 50382013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5039
5040 PR other/33426
5041 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5042 Handle PRAGMA_IVDEP.
5043 (c_parser_statement_after_labels): Update call.
5044
f28aa681
MP
50452013-10-24 Marek Polacek <polacek@redhat.com>
5046
5047 * c-parser.c (c_parser_struct_declaration): Add a comment.
5048 (c_parser_declarator): Don't allow _Alignas here.
5049
0645c1a2
AM
50502013-10-17 Andrew MacLeod <amacleod@redhat.com>
5051
5052 * c-parser.c: Include omp-low.h.
5053 * c-typeck.c: Likewise.
5054
568a31f2
MP
50552013-10-17 Marek Polacek <polacek@redhat.com>
5056
5057 PR c/58267
5058 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5059 Document syntax of the array-declarator.
5060 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5061 are not permitted.
5062 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5063 (c_parser_struct_declaration): Likewise.
5064 (c_parser_declarator): Likewise.
5065 (c_parser_direct_declarator_inner): Likewise.
5066 (c_parser_parameter_declaration): Likewise.
5067 (c_parser_type_name): Likewise.
5068
acf0174b
JJ
50692013-10-11 Jakub Jelinek <jakub@redhat.com>
5070
5071 * c-lang.h (current_omp_declare_target_attribute): New extern
5072 decl.
5073 * c-parser.c: Include c-lang.h.
5074 (struct c_parser): Change tokens to c_token *.
5075 Add tokens_buf field. Change tokens_avail type to unsigned int.
5076 (c_parser_consume_token): If parser->tokens isn't
5077 &parser->tokens_buf[0], increment parser->tokens.
5078 (c_parser_consume_pragma): Likewise.
5079 (enum pragma_context): Add pragma_struct and pragma_param.
5080 (c_parser_external_declaration): Adjust
5081 c_parser_declaration_or_fndef caller.
5082 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5083 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5084 Adjust recursive call.
5085 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5086 of pragma_external.
5087 (c_parser_parameter_declaration): Use pragma_param instead of
5088 pragma_external.
5089 (c_parser_compound_statement_nostart, c_parser_label,
5090 c_parser_for_statement): Adjust
5091 c_parser_declaration_or_fndef callers.
5092 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5093 it through to c_parser_conditional_expression.
5094 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5095 pass it through to c_parser_binary_expression. Adjust recursive
5096 call.
5097 (c_parser_binary_expression): Remove prec argument, add
5098 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5099 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5100 binop matches it, use build2 instead of parser_build_binary_op.
5101 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5102 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5103 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5104 Handle pragma_struct and pragma_param the same as pragma_external.
5105 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5106 (c_parser_omp_variable_list): Parse array sections for
5107 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5108 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5109 (c_parser_omp_clause_reduction): Handle user defined reductions.
5110 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5111 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5112 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5113 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5114 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5115 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5116 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5117 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5118 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5119 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5120 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5121 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5122 (c_parser_omp_for_loop): Add CODE argument, pass it through
5123 to c_finish_omp_for. Change last argument to cclauses,
5124 and adjust uses to grab parallel clauses from the array of all
5125 the split clauses. Adjust c_parser_binary_expression,
5126 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5127 (omp_split_clauses): New function.
5128 (c_parser_omp_simd): New function.
5129 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5130 Allow the function to be called also when parsing combined constructs,
5131 and call c_parser_omp_simd when parsing for simd.
5132 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5133 #pragma omp section, require exactly one structured-block instead of
5134 sequence of statements.
5135 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5136 Allow the function to be called also when parsing combined constructs.
5137 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5138 Allow the function to be called also when parsing combined
5139 constructs.
5140 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5141 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5142 c_parser_omp_teams, c_parser_omp_target_data,
5143 c_parser_omp_target_update, c_parser_omp_target,
5144 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5145 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5146 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5147 (c_parser_omp_construct): Add p_name and mask vars. Handle
5148 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5149 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5150 and c_parser_omp_sections callers.
5151 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5152 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5153 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5154 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5155 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5156 OMP_CLAUSE_DEPEND.
5157 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5158 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5159 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5160 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5161 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5162 * c-typeck.c: Include tree-inline.h.
5163 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5164 handle_omp_array_sections_1, handle_omp_array_sections,
5165 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5166 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5167 user defined reductions.
5168 (c_tree_equal): New function.
5169 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5170 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5171 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5172 c_check_omp_declare_reduction_r): New prototypes.
5173 * c-decl.c (current_omp_declare_target_attribute): New variable.
5174 (c_decl_attributes): New function.
5175 (start_decl, start_function): Use it instead of decl_attributes.
5176 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5177 c_omp_reduction_decl, c_omp_reduction_lookup,
5178 c_check_omp_declare_reduction_r): New functions.
5179
0a6c2227
TT
51802013-09-25 Tom Tromey <tromey@redhat.com>
5181
5182 * Make-lang.in (c/gccspec.o): Remove.
5183 (CFLAGS-c/gccspec.o): New variable.
5184 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5185 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5186 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5187
f3bc55f0
TT
51882013-09-25 Tom Tromey <tromey@redhat.com>
5189
5190 * Make-lang.in (c/gccspec.o): Don't use subshell.
5191
a24d975c
MP
51922013-09-18 Marek Polacek <polacek@redhat.com>
5193
5194 PR sanitize/58443
5195 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5196 Remove unnecessary check.
5197
ce6923c5
MP
51982013-09-18 Marek Polacek <polacek@redhat.com>
5199
5200 PR sanitizer/58411
5201 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5202 no_sanitize_undefined attribute.
5203
a1e51df9
KT
52042013-09-13 Kai Tietz <ktietz@redhat.com>
5205
5206 PR target/57848
5207 * c-decl.c (c_builtin_function_ext_scope): Remove
5208 wrong assumption that it is never called on prexisting
5209 symbol.
5210
0af94e6f
JR
52112013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5212
5213 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5214
20059c8b
GDR
52152013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5216
5217 * c-objc-common.c (c_tree_printer): Tidy.
5218
de5a5fa1
MP
52192013-08-30 Marek Polacek <polacek@redhat.com>
5220
5221 * c-typeck.c (build_binary_op): Add division by zero and shift
5222 instrumentation.
5223
2531a1d9 52242013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5225 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5226
6e2bcc98 5227 PR c/35649
2531a1d9
JR
5228 * c-typeck.c (c_common_type): Prefer double_type_node over
5229 other REAL_TYPE types with the same precision.
5230 (convert_arguments): Likewise.
5231
025311c4
GDR
52322013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5233
5234 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5235 (c_initialize_diagnostics): Call a destructor for the early printer.
5236
da6ca2b5
GDR
52372013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5238
5239 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5240 printer initialization.
5241
318cda85 52422013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5243
318cda85
BI
5244 PR c/57490
5245 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5246 check for truth values.
5247 (expand_array_notation_exprs): Added truth values case. Removed an
5248 unwanted else. Added for-loop to walk through subtrees in default
5249 case.
5250
b066401f
GDR
52512013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5252
5253 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5254
fb48aadc
JM
52552013-07-23 Joseph Myers <joseph@codesourcery.com>
5256
5257 * c-parser.c (struct c_generic_association): Fix typo.
5258
433cc7b0
TT
52592013-07-23 Tom Tromey <tromey@redhat.com>
5260 Joseph Myers <joseph@codesourcery.com>
5261
5262 * c-parser.c (struct c_generic_association): New.
5263 (c_generic_association_d): New typedef.
5264 (c_parser_generic_selection): New function.
5265 (c_parser_postfix_expression): Handle RID_GENERIC.
5266
26d40c3d
JM
52672013-07-13 Jason Merrill <jason@redhat.com>
5268
5269 PR c++/57793
5270 * c-decl.c (finish_struct): Check for too-large class.
5271
ecdbd01a 52722013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5273
5274 PR c/57821
5275 * c-typeck.c (set_init_index): When folding, check for index overflow.
5276
1141ed3f
BI
52772013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5278
5279 * c-parser.c (c_parser_array_notation): Removed rejection of array
5280 notations in an array of function pointers.
5281
713b46fa
BI
52822013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5283
5284 * c-array-notation.c (make_triplet_val_inv): New function.
5285 (create_cmp_incr): Likewise.
5286 (create_array_refs): Likewise.
5287 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5288 Also modularized common parts between functions and called the function.
5289 (build_array_notation_expr): Likewise.
5290 (fix_conditional_array_notations_1): Likewise.
5291 (fix_array_notation_expr): Likewise.
5292 (fix_array_notation_call_expr): Likewise.
5293
92f20202
MP
52942013-06-18 Marek Polacek <polacek@redhat.com>
5295
5296 PR c/57630
5297 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5298
73a23b06
BI
52992013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5300
5301 * c-array-notation.c (build_array_notation_expr): Reject array notation
5302 mismatch between LHS and RHS even inside a call_expr. Also, removed
5303 a couple while statements that were dead code.
5304
00b8517d
BI
53052013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5306
5307 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5308 excessive precision expressions in function parameters. Also removed
5309 couple unwanted while statements.
5310
1509bdda
BI
53112013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5312
5313 * c-array-notation.c (expand_array_notation_exprs): Added
5314 ARRAY_NOTATION_REF case.
5315
d60f1706
BI
53162013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5317
5318 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5319 function to c-family/array-notation-common.c.
5320 (is_cilkplus_reduce_builtin): Likewise.
5321 (find_rank): Likewise.
5322 (extract_array_notation_exprs): Likewise.
5323 (replace_array_notations): Likewise.
5324 (find_inv_trees): Likewise.
5325 (replace_inv_trees): Likewise.
5326 (contains_array_notation_expr): Likewise.
5327 (find_correct_array_notation_type): Likewise.
5328 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5329 (struct inv_list): Moved this to c-family/array-notation-common.c.
5330 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5331
6d6efbb3
BI
53322013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5333
5334 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5335 reduction functions outside the for-loop. Added a check if the fundecl
5336 is non-NULL. Finally, removed an unwanted if-statement, and made the
5337 body unconditional.
5338
25c22937
BI
53392013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5340
5341 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5342 condition of the if-statement matches the rank of else-block and then-
5343 block when array notations are used.
5344 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5345 expression after the entire function body is parsed.
5346 (c_parser_expr_no_commas): Delayed creating array notation expressions
5347 to the end of function parsing.
5348 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5349 whole if-statement instead of just the condition.
5350 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5351
edd25645
BI
53522013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5353
5354 PR c/57474
5355 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5356 array to NULL_TREE if they are unused. Also added a check for the
5357 field to be NULL before its fields are used in future.
5358
065ce7f1
RO
53592013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5360
5361 PR bootstrap/57450
5362 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5363 (build_array_notation_expr): Likewise.
5364
36536d79
BI
53652013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5366
5367 * c-typeck.c (build_array_ref): Added a check to see if array's
5368 index is greater than one. If true, then emit an error.
5369 (build_function_call_vec): Exclude error reporting and checking
5370 for builtin array-notation functions.
5371 (convert_arguments): Likewise.
5372 (c_finish_return): Added a check for array notations as a return
5373 expression. If true, then emit an error.
5374 (c_finish_loop): Added a check for array notations in a loop
5375 condition. If true then emit an error.
5376 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5377 (build_binary_op): Added a check for array notation expr inside
5378 op1 and op0. If present, we call another function to find correct
5379 type.
5380 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5381 * c-parser.c (c_parser_compound_statement): Check if array
5382 notation code is used in tree, if so, then transform them into
5383 appropriate C code.
5384 (c_parser_expr_no_commas): Check if array notation is used in LHS
5385 or RHS, if so, then build array notation expression instead of
5386 regular modify.
5387 (c_parser_postfix_expression_after_primary): Added a check for
5388 colon(s) after square braces, if so then handle it like an array
5389 notation. Also, break up array notations in unary op if found.
5390 (c_parser_direct_declarator_inner): Added a check for array
5391 notation.
5392 (c_parser_compound_statement): Added a check for array notation in
5393 a stmt. If one is present, then expand array notation expr.
5394 (c_parser_if_statement): Likewise.
5395 (c_parser_switch_statement): Added a check for array notations in
5396 a switch statement's condition. If true, then output an error.
5397 (c_parser_while_statement): Similarly, but for a while.
5398 (c_parser_do_statement): Similarly, but for a do-while.
5399 (c_parser_for_statement): Similarly, but for a for-loop.
5400 (c_parser_unary_expression): Check if array notation is used in a
5401 pre-increment or pre-decrement expression. If true, then expand
5402 them.
5403 (c_parser_array_notation): New function.
5404 * c-array-notation.c: New file.
5405 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5406
cd192ccc
MS
54072013-05-23 Mike Stump <mikestump@comcast.net>
5408
5409 * c-typeck.c (convert_for_assignment): Handle references to memory
5410 spaces better.
5411
427b248d
JM
54122013-05-16 Jason Merrill <jason@redhat.com>
5413
5414 * Make-lang.in (cc1$(exeext)): Use link mutex.
5415
44d90fe1
PC
54162013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5417
5418 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5419 to simply use OPT_Wpointer_arith.
5420 (build_unary_op): Likewise.
5421
4e7d7b3d
JJ
54222013-04-03 Jakub Jelinek <jakub@redhat.com>
5423
5424 PR c/19449
5425 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5426 argument. If set, or it temporarily for parsing of the first
5427 argument into force_folding_builtin_constant_p.
5428 (c_parser_postfix_expression): Adjust callers.
5429
839b422f
RB
54302013-03-21 Richard Biener <rguenther@suse.de>
5431
5432 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5433 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5434
2ee028f1
MP
54352013-02-12 Marek Polacek <polacek@redhat.com>
5436
5437 PR c/44938
5438 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5439 origtypes to NULL.
5440
8824edff
JJ
54412013-01-24 Jakub Jelinek <jakub@redhat.com>
5442
5443 PR c/56078
5444 * c-typeck.c (set_nonincremental_init_from_string): If
5445 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5446 returned false.
5447 (process_init_element): Likewise.
5448
eadd3d0d
JJ
54492012-12-20 Jakub Jelinek <jakub@redhat.com>
5450
5451 PR c++/55619
5452 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5453 argument, don't call default_function_array_conversion
5454 nor c_fully_fold here.
5455 (c_parser_asm_statement): Adjust callers.
5456 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5457 and outputs here, and call default_function_array_conversion
5458 on inputs that don't need to be addressable.
5459
f8a93a2e
JJ
54602012-12-18 Jakub Jelinek <jakub@redhat.com>
5461
5462 PR c/39464
5463 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5464 warning require that both c_common_unsigned_type as well as
5465 c_common_signed_type is the same for both mvl and mvr types.
5466
9771b263
DN
54672012-11-16 Diego Novillo <dnovillo@google.com>
5468
5469 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5470
5471 * c-common.c: Use new vec API in vec.h.
5472 * c-common.h: Likewise.
5473 * c-gimplify.c: Likewise.
5474 * c-pragma.c: Likewise.
5475 * c-pretty-print.c: Likewise.
5476 * c-pretty-print.h: Likewise.
5477 * c-semantics.c: Likewise.
5478 * c-decl.c: Likewise.
5479 * c-parser.c: Likewise.
5480 * c-tree.h: Likewise.
5481 * c-typeck.c: Likewise.
5482
880661a4
JW
54832012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5484
5485 PR c++/54930
5486 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5487
077d1abe
MLI
54882012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5489
5490 PR c/53066
5491 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5492 shadows a function, unless the variable is a function or a
5493 pointer-to-function.
5494
3a785c97
JJ
54952012-10-12 Jakub Jelinek <jakub@redhat.com>
5496
5497 PR c/54381
5498 * c-parser.c (struct c_tree_loc_pair): Removed.
5499 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5500 add location_t * and tree * arguments, fill in array of 3
5501 sizeof_arg trees and corresponding locs.
5502 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5503 c_parser_expr_list callers.
5504 (c_parser_postfix_expression_after_primary): Likewise. Pass
5505 array of 3 sizeof_arg trees and locs (corresponding to first
5506 3 arguments) to sizeof_pointer_memaccess_warning.
5507
703c8606
LC
55082012-10-09 Lawrence Crowl <crowl@google.com>
5509
5510 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5511 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5512 hash table.
5513
5d9de0d0
PC
55142012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5515
5516 PR c++/54194
5517 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5518 call.
5519
a212e43f
MG
55202012-10-09 Marc Glisse <marc.glisse@inria.fr>
5521
5522 PR c++/54427
5523 * c-typeck.c: Include c-common.h.
5524 (enum stv_conv): Moved to c-common.h.
5525 (scalar_to_vector): Moved to c-common.c.
5526 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5527 * Make-lang.in: c-typeck.c depends on c-common.h.
5528
3b78de56
AC
55292012-10-04 Arnaud Charlet <charlet@adacore.com>
5530
5531 * c-decl.c (c_write_global_declarations): Fix handling of
5532 -fdump-ada-spec*.
5533
78c60e3d
SS
55342012-09-30 Sharad Singhai <singhai@google.com>
5535
5536 * c-decl.c (c_write_global_declarations): Use a different method
5537 to determine if the dump has ben initialized.
5538
9f33203d
JM
55392012-09-14 Joseph Myers <joseph@codesourcery.com>
5540
5541 PR c/54552
5542 * c-typeck.c (c_cast_expr): When casting to a type requiring
5543 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5544 c_fully_fold first.
5545
a27d595d
JM
55462012-09-14 Joseph Myers <joseph@codesourcery.com>
5547
5548 PR c/54103
5549 * c-typeck.c (build_unary_op): Pass original argument of
5550 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5551 any C_MAYBE_CONST_EXPR, if it has integer operands.
5552 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5553 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5554 to c_objc_common_truthvalue_conversion, then remove any
5555 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5556 c_objc_common_truthvalue_conversion not
5557 c_common_truthvalue_conversion.
5558 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5559 call note_integer_operands for arguments with integer operands
5560 that are not integer constants.
5561
9feb29df
JJ
55622012-09-13 Jakub Jelinek <jakub@redhat.com>
5563
5564 PR c/54559
5565 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5566 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5567
d409320c
JJ
55682012-08-31 Jakub Jelinek <jakub@redhat.com>
5569
5570 PR c/54428
5571 * c-convert.c (convert): Don't call fold_convert_loc if
5572 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5573 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5574 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5575
6265d07c
JJ
55762012-08-24 Jakub Jelinek <jakub@redhat.com>
5577
5578 PR c/54355
5579 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5580 for nested and empty_ok arguments in the call to
5581 c_parser_declaration_or_fndef.
5582
1a4049e7
JJ
55832012-08-17 Jakub Jelinek <jakub@redhat.com>
5584
5585 * c-tree.h (c_last_sizeof_arg): Declare.
5586 * c-parser.c (struct c_tree_loc_pair): New type.
5587 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5588 non-NULL.
5589 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5590 (c_parser_postfix_expression_after_primary): Likewise. Call
5591 sizeof_pointer_memaccess_warning if needed.
5592 (sizeof_ptr_memacc_comptypes): New function.
5593 * c-typeck.c (c_last_sizeof_arg): New global variable.
5594 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5595
0229aee9
UB
55962012-07-24 Uros Bizjak <ubizjak@gmail.com>
5597
5598 * c-lang.h (lang_decl): Add variable_size GTY option.
5599
7ee2468b
SB
56002012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5601
5602 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5603 * Make-lang.in: Fix dependencies.
5604
d4a10d0a
SB
56052012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5606
5607 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5608 and add language Makefile hooks.
5609 * config-lang.in: New file.
5610 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5611 add the required "normal" config-lang.in rules.
5612 * c-lang.h: Moved from gcc/ to here.
5613 * c-tree.h: Likewise.
5614 * c-objc-common.c: Likewise.
5615 * c-objc-common.h: Likewise.
5616 * c-typeck.c: Likewise.
5617 * c-convert.c: Likewise.
5618 * c-lang.c: Likewise.
5619 * c-aux-info.c: Likewise.
5620 * c-errors.c: Likewise.
5621 * gccspec.c: Likewise.
5622 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5623 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5624\f
85ec4feb 5625Copyright (C) 2012-2018 Free Software Foundation, Inc.
d4a10d0a
SB
5626
5627Copying and distribution of this file, with or without modification,
5628are permitted in any medium without royalty provided the copyright
5629notice and this notice are preserved.
This page took 2.203783 seconds and 5 git commands to generate.