]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/c/ChangeLog
Add range_idx param to range_label::get_text
[thirdparty/gcc.git] / gcc / c / ChangeLog
1 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2
3 * c-objc-common.c (range_label_for_type_mismatch::get_text):
4 Update for new param.
5 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
6 Likewise.
7
8 2018-09-17 Martin Jambor <mjambor@suse.cz>
9
10 PR c/63886
11 * c-parser.c: (warn_for_abs): New function.
12 (c_parser_postfix_expression_after_primary): Call it.
13
14 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
15
16 * c-typeck.c (digest_init): Shorten overlength strings.
17
18 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
19
20 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
21
22 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
23
24 * c-decl.c (finish_decl): Call braced_list_to_string here ...
25 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
26
27 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
28
29 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
30 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
31
32 2018-08-27 David Malcolm <dmalcolm@redhat.com>
33
34 PR 87091
35 * c-decl.c (implicitly_declare): Update call to
36 maybe_add_include_fixit to suggest overriding the location, as it
37 is for a note.
38 * c-objc-common.c (c_tree_printer): Update for conversion of
39 show_caret_p to a tri-state.
40
41 2018-08-27 Martin Liska <mliska@suse.cz>
42
43 * c-decl.c (locate_old_decl): Use new function
44 fndecl_built_in_p and remove check for FUNCTION_DECL if
45 possible.
46 (diagnose_mismatched_decls): Likewise.
47 (merge_decls): Likewise.
48 (warn_if_shadowing): Likewise.
49 (pushdecl): Likewise.
50 (implicitly_declare): Likewise.
51 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
52 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
53 * c-typeck.c (build_function_call_vec): Likewise.
54 (convert_arguments): Likewise.
55
56 2018-08-20 David Malcolm <dmalcolm@redhat.com>
57
58 PR other/84889
59 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
60 (diagnose_mismatched_decls): Likewise, in various places.
61 (warn_if_shadowing): Likewise.
62 (implicit_decl_warning): Likewise.
63 (implicitly_declare): Likewise.
64 (undeclared_variable): Likewise.
65 (declare_label): Likewise.
66 (grokdeclarator): Likewise.
67 (start_function): Likewise.
68 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
69 (c_parser_parameter_declaration): Likewise.
70 (c_parser_binary_expression): Likewise.
71 * c-typeck.c (c_expr_sizeof_expr): Likewise.
72 (parser_build_binary_op): Likewise.
73 (build_unary_op): Likewise.
74 (error_init): Likewise.
75 (pedwarn_init): Likewise.
76 (warning_init): Likewise.
77 (convert_for_assignment): Likewise.
78
79 2018-08-15 David Malcolm <dmalcolm@redhat.com>
80
81 * c-objc-common.c: Include "gcc-rich-location.h".
82 (c_tree_printer): Move implemenation of '%T' to...
83 (print_type): ...this new function.
84 (range_label_for_type_mismatch::get_text): New function.
85 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
86 range for the various ic_argpass cases.
87 (class maybe_range_label_for_tree_type_mismatch): New class.
88 (build_binary_op): Use it when calling binary_op_error.
89
90 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
91
92 * c-decl.c (start_decl): Do not warn if variables is named as main
93 and is a local variable.
94
95 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
96
97 PR c/19315
98 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
99 objects of unknown size.
100
101 2018-08-13 Martin Sebor <msebor@redhat.com>
102
103 PR tree-optimization/71625
104 * c-parser.c (c_parser_declaration_or_fndef): Call
105 braced_list_to_string.
106
107 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
108
109 PR c/86690
110 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
111 errors.
112
113 2018-08-01 Martin Sebor <msebor@redhat.com>
114
115 PR tree-optimization/86650
116 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
117 and TREE_BLOCK (t) from within percent_K_format to this callsite.
118
119 2018-08-01 Jakub Jelinek <jakub@redhat.com>
120
121 PR c/85704
122 * c-typeck.c (init_field_decl_cmp): New function.
123 (output_pending_init_elements): Use it for field comparisons
124 instead of pure bit_position comparisons.
125
126 2018-07-12 Jakub Jelinek <jakub@redhat.com>
127
128 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
129 type here, instead add "omp declare target implicit" attribute.
130 (finish_decl): Diagnose vars without mappable type here.
131
132 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
133 Thomas Schwinge <thomas@codesourcery.com>
134 Cesar Philippidis <cesar@codesourcery.com>
135
136 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
137 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
138 to their non-present_or_* counterparts. Make 'self' an alias to
139 PRAGMA_OACC_CLAUSE_HOST.
140 (c_parser_oacc_data_clause): Update GOMP mappings for
141 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
142 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
143 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
144 Remove support for present_or_* clauses.
145 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
146 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
147 (OACC_DECLARE_CLAUSE_MASK): Likewise.
148 (OACC_DATA_CLAUSE_MASK): Likewise.
149 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
150 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
151 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
152 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
153 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
154
155 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
156
157 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
158 * gimple-parser.c (c_parser_gimple_statement): Likewise.
159 (c_parser_gimple_unary_expression): Likewise.
160
161 2018-06-15 Jakub Jelinek <jakub@redhat.com>
162
163 PR c/86093
164 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
165 before doing POINTER_DIFF_EXPR.
166
167 2018-06-07 Marek Polacek <polacek@redhat.com>
168
169 PR c/85318
170 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
171 for loop initial declarations.
172
173 2018-05-30 David Pagan <dave.pagan@oracle.com>
174
175 PR c/55976
176 * c-decl.c (grokdeclarator): Update check for return type warnings.
177 (start_function): Likewise.
178 (finish_function): Likewise.
179 * c-typeck.c (c_finish_return): Update check for return type warnings.
180 Pass OPT_Wreturn_type to pedwarn when appropriate.
181
182 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
183
184 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
185 __FMA_EXPR handlng.
186
187 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
188
189 * gimple-parser.c: Include internal-fn.h.
190 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
191 (c_parser_gimple_call_internal): New function.
192 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
193 Fix typos in comment.
194
195 2018-05-10 Jakub Jelinek <jakub@redhat.com>
196
197 PR c++/85662
198 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
199 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
200 fold_convert_loc.
201 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
202 fold_offsetof_1, pass argtype as TYPE to it and drop the
203 fold_convert_loc.
204
205 2018-05-02 David Pagan <dave.pagan@oracle.com>
206
207 PR c/30552
208 * c-decl.c (old_style_parameter_scope): New function.
209 * c-parser.c (c_parser_postfix_expression): Check for statement
210 expressions in old-style function parameter list declarations.
211 * c-parser.h (old_style_parameter_scope): New extern declaration.
212
213 2018-04-25 Jakub Jelinek <jakub@redhat.com>
214
215 PR sanitizer/84307
216 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
217 it is not TREE_STATIC.
218 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
219 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
220 its COMPOUND_LITERAL_EXPR_DECL.
221
222 2018-03-21 Joseph Myers <joseph@codesourcery.com>
223
224 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
225 where all functions return the same _FloatN or _FloatNx type,
226 treat integer types as _Float64 instead of double.
227
228 2018-03-21 Jakub Jelinek <jakub@redhat.com>
229
230 PR c/84999
231 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
232 building vector comparison, diagnose it and return error_mark_node.
233
234 2018-03-15 Jakub Jelinek <jakub@redhat.com>
235
236 PR c/84853
237 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
238 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
239 INTEGER_TYPE element type.
240
241 2018-03-13 David Pagan <dave.pagan@oracle.com>
242
243 PR c/46921
244 * c-typeck.c (output_init_element): Ensure field initializer
245 expression is always evaluated if there are side effects.
246
247 2018-03-06 Jakub Jelinek <jakub@redhat.com>
248
249 PR c/84721
250 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
251 !building_stmt_list_p ().
252
253 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
254
255 PR c/84305
256 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
257 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
258 and include the BIND_EXPR in the list of things that need to be
259 pre-evaluated.
260
261 2018-02-09 Nathan Sidwell <nathan@acm.org>
262
263 PR c/84293
264 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
265 to strict_aliasing_warning.
266
267 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
268
269 * c-typeck.c (really_start_incremental_init, push_init_level,
270 set_nonincremental_init, output_init_element, process_init_element):
271 Use DECL_UNNAMED_BIT_FIELD.
272
273 2018-01-31 Marek Polacek <polacek@redhat.com>
274
275 PR c/81779
276 * c-parser.c (c_parser_compound_statement_nostart): Call
277 expansion_point_location_if_in_system_header.
278
279 2018-01-17 David Malcolm <dmalcolm@redhat.com>
280
281 PR c++/83814
282 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
283 the C part.
284
285 2018-01-13 Jakub Jelinek <jakub@redhat.com>
286
287 PR c/83801
288 * c-tree.h (decl_constant_value_1): Add a bool argument.
289 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
290 returning a CONSTRUCTOR if it is true. Use error_operand_p.
291 (decl_constant_value): Adjust caller.
292 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
293 decl_constant_value_1 as IN_INIT. Otherwise, punt if
294 decl_constant_value returns initializer that has BLKmode or
295 array type.
296 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
297
298 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
299 Alan Hayward <alan.hayward@arm.com>
300 David Sherwood <david.sherwood@arm.com>
301
302 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
303 TYPE_VECTOR_SUBPARTS.
304
305 2018-01-03 Jakub Jelinek <jakub@redhat.com>
306
307 Update copyright years.
308
309 2018-01-01 Jakub Jelinek <jakub@redhat.com>
310
311 PR c/83595
312 * c-parser.c (c_parser_braced_init, c_parser_initelt,
313 c_parser_conditional_expression, c_parser_cast_expression,
314 c_parser_sizeof_expression, c_parser_alignof_expression,
315 c_parser_postfix_expression, c_parser_omp_declare_reduction,
316 c_parser_transaction_expression): Use set_error () method instead
317 of setting value member to error_mark_node.
318
319 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
320
321 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
322 and _Float<N>X built-in functions.
323
324 2017-12-22 Jakub Jelinek <jakub@redhat.com>
325
326 PR debug/83550
327 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
328 TYPE_STUB_DECL and call rest_of_type_compilation before processing
329 incomplete vars rather than after it.
330
331 PR debug/83547
332 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
333 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
334 and consider empty ones if there are no other stmts. For
335 -Wunused-value walk all statements before the one only followed by
336 DEBUG_BEGIN_STMTs.
337
338 2017-12-22 Mike Stump <mikestump@comcast.net>
339 Eric Botcazou <ebotcazou@adacore.com>
340
341 * c-parser.c (c_parser_while_statement): Add unroll parameter and
342 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
343 (c_parser_do_statement): Likewise.
344 (c_parser_for_statement): Likewise.
345 (c_parser_statement_after_labels): Adjust calls to above.
346 (c_parse_pragma_ivdep): New static function.
347 (c_parser_pragma_unroll): Likewise.
348 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
349 <PRAGMA_UNROLL>: New case.
350
351 2017-12-19 Jakub Jelinek <jakub@redhat.com>
352
353 * c-typeck.c (comptypes_internal, function_types_compatible_p,
354 perform_integral_promotions, digest_init): Replace Yoda conditions
355 with typical order conditions.
356 * c-decl.c (check_bitfield_type_and_width): Likewise.
357
358 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
359
360 * c-typeck.c (c_safe_arg_type_equiv_p,
361 c_safe_function_type_cast_p): New function.
362 (build_c_cast): Implement -Wcast-function-type.
363
364 2017-12-14 Richard Biener <rguenther@suse.de>
365
366 PR c/83415
367 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
368 like REALPART_EXPR for the behavior of whether its operand
369 is an lvalue.
370
371 2017-12-12 Marek Polacek <polacek@redhat.com>
372
373 PR c/82679
374 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
375
376 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
377
378 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
379 * c-parser.c (add_debug_begin_stmt): New.
380 (c_parser_declaration_or_fndef): Call it.
381 (c_parser_compound_statement_nostart): Likewise.
382 (c_parser_statement_after_labels): Likewise.
383 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
384
385 2017-12-07 Joseph Myers <joseph@codesourcery.com>
386
387 * c-decl.c (build_compound_literal): Add parameter alignas_align
388 and set alignment of decl if nonzero.
389 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
390 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
391 qualifier.
392 (c_parser_struct_declaration): Update syntax comment.
393 (c_parser_type_name): Add alignas_ok argument and pass it to
394 c_parser_declspecs.
395 (c_parser_cast_expression): Pass true to c_parser_type_name and
396 give error if a cast used an _Alignas specifier.
397 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
398 give error if sizeof (type-name) used an _Alignas specifier.
399 (c_parser_alignof_expression): Pass true to c_parser_type_name and
400 give error if _Alignof (type-name) used an _Alignas specifier.
401 (c_parser_postfix_expression_after_paren_type): Check specified
402 alignment for a compound literal and pass it to
403 build_compound_literal.
404 * c-parser.h (c_parser_type_name): Update prototype.
405 * c-tree.h (build_compound_literal): Update prototype.
406
407 2017-12-07 Martin Sebor <msebor@redhat.com>
408
409 PR c/81544
410 * c-decl.c (c_decl_attributes): Look up existing declaration and
411 pass it to decl_attributes.
412
413 2017-12-06 David Malcolm <dmalcolm@redhat.com>
414
415 PR c/83236
416 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
417 reserved for use by the implementation.
418
419 2017-12-06 David Malcolm <dmalcolm@redhat.com>
420
421 * c-decl.c: Include "c-family/c-spellcheck.h".
422
423 2017-12-05 Martin Liska <mliska@suse.cz>
424 Jakub Jelinek <jakub@redhat.com>
425
426 * c-typeck.c (pointer_diff): Add new argument and instrument
427 pointer subtraction.
428 (build_binary_op): Similar for pointer comparison.
429
430 2017-12-01 Jakub Jelinek <jakub@redhat.com>
431
432 PR c/79153
433 * c-parser.c: Include tree-iterator.h.
434 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
435 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
436 on it.
437
438 PR c/83222
439 * c-tree.h (decl_constant_value_1): Declare.
440 * c-typeck.c (decl_constant_value_1): New function.
441 (decl_constant_value): Use it.
442 * c-fold.c (c_fully_fold_internal): If in_init, use
443 decl_constant_value_1 instead of decl_constant_value.
444
445 2017-11-30 Jakub Jelinek <jakub@redhat.com>
446
447 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
448
449 2017-11-28 Jakub Jelinek <jakub@redhat.com>
450
451 PR sanitizer/81275
452 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
453 c_switch_covers_all_cases_p returns true.
454
455 2017-11-28 Julia Koval <julia.koval@intel.com>
456 Sebastian Peryt <sebastian.peryt@intel.com>
457
458 * Make-lang.in (c/c-array-notation.o): Remove.
459 * c-array-notation.c: Delete.
460 * c-decl.c: Remove cilkplus condition.
461 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
462 c_parser_cilk_verify_simd, c_parser_array_notation,
463 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
464 c_parser_cilk_simd_fn_vector_attrs,
465 c_finish_cilk_simd_fn_tokens): Delete.
466 (c_parser_declaration_or_fndef): Remove cilkplus condition.
467 (c_parser_direct_declarator_inner): Ditto.
468 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
469 (c_parser_attributes, c_parser_compound_statement,
470 c_parser_statement_after_labels, c_parser_if_statement,
471 c_parser_switch_statement, c_parser_while_statement,
472 c_parser_do_statement, c_parser_for_statement,
473 c_parser_unary_expression, c_parser_postfix_expression,
474 c_parser_postfix_expression_after_primary,
475 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
476 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
477 support.
478 * c-typeck.c (build_array_ref, build_function_call_vec,
479 convert_arguments,
480 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
481 c_finish_loop, build_binary_op): Remove cilkplus support.
482
483 2017-11-28 Jakub Jelinek <jakub@redhat.com>
484
485 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
486 of build3.
487
488 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
489
490 * Make-lang.in (c.install-plugin): Install backend import library.
491
492 2017-11-23 Jakub Jelinek <jakub@redhat.com>
493
494 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
495 pragma_stmt context.
496
497 2017-11-23 Mike Stump <mikestump@comcast.net>
498 Eric Botcazou <ebotcazou@adacore.com>
499
500 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
501 ANNOTATE_EXPR.
502 (c_parser_do_statement): Likewise.
503 (c_parser_for_statement): Likewise.
504
505 2017-11-22 David Malcolm <dmalcolm@redhat.com>
506
507 PR c++/62170
508 * c-objc-common.c (c_tree_printer): Convert penultimate param from
509 bool to bool *. Within '%T' handling, if showing an "aka", use
510 "quoted" param to add appropriate quoting.
511
512 2017-11-22 Marek Polacek <polacek@redhat.com>
513
514 PR c++/60336
515 PR middle-end/67239
516 PR target/68355
517 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
518
519 2017-11-21 David Malcolm <dmalcolm@redhat.com>
520
521 PR c/83056
522 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
523 earlier failed lookups.
524
525 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
526
527 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
528 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
529
530 2017-11-20 David Malcolm <dmalcolm@redhat.com>
531
532 PR c/81404
533 * c-decl.c: Include "c-family/known-headers.h".
534 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
535 to known-headers.cc.
536 (class suggest_missing_header): Move to known-header.h.
537 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
538 than get_c_name_hint.
539
540 2017-11-20 David Malcolm <dmalcolm@redhat.com>
541
542 * c-decl.c (get_c_name_hint): New function.
543 (class suggest_missing_header): New class.
544 (lookup_name_fuzzy): Call get_c_name_hint and use it to
545 suggest missing headers to the user.
546
547 2017-11-20 David Malcolm <dmalcolm@redhat.com>
548
549 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
550 Include "c-family/name-hint.h"
551 (implicit_decl_warning): Convert "hint" from
552 const char * to name_hint. Pass location to
553 lookup_name_fuzzy. Suppress any deferred diagnostic if the
554 warning was not printed.
555 (undeclared_variable): Likewise for "guessed_id".
556 (lookup_name_fuzzy): Convert return type from const char *
557 to name_hint. Add location_t param.
558 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
559 Include "c-family/name-hint.h"
560 (c_parser_declaration_or_fndef): Convert "hint" from
561 const char * to name_hint. Pass location to lookup_name_fuzzy.
562 (c_parser_parameter_declaration): Likewise.
563
564 2017-11-19 Jakub Jelinek <jakub@redhat.com>
565
566 PR c/66618
567 PR c/69960
568 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
569 where needed.
570 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
571 handle_omp_array_sections): Likewise.
572 (digest_init): Don't call decl_constant_value_for_optimization.
573 * c-tree.h (decl_constant_value_for_optimization): Removed.
574 * c-fold.c (c_fold_array_ref): New function.
575 (c_fully_fold_internal): Add LVAL argument, propagate it through
576 recursive calls. For VAR_P call decl_constant_value and
577 unshare if not LVAL and either optimizing or IN_INIT. Remove
578 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
579 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
580 (c_fully_fold): Add LVAL argument, pass it through to
581 c_fully_fold_internal.
582 (decl_constant_value_for_optimization): Removed.
583
584 2017-11-15 Joseph Myers <joseph@codesourcery.com>
585
586 PR c/81156
587 * c-parser.c (check_tgmath_function): New function.
588 (enum tgmath_parm_kind): New enum.
589 (c_parser_postfix_expression): Handle __builtin_tgmath.
590
591 2017-10-31 David Malcolm <dmalcolm@redhat.com>
592
593 * c-decl.c (implicit_decl_warning): Update for renaming of
594 pedwarn_at_rich_loc and warning_at_rich_loc.
595 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
596 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
597 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
598 (c_parser_struct_or_union_specifier): Likewise for renaming of
599 pedwarn_at_rich_loc.
600 (c_parser_parameter_declaration): Likewise for renaming of
601 error_at_rich_loc.
602 * c-typeck.c (build_component_ref): Likewise.
603 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
604 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
605 (set_init_label): Likewise for renaming of error_at_rich_loc.
606
607 2017-10-30 Richard Biener <rguenther@suse.de>
608
609 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
610 stmts.
611
612 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
613
614 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
615 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
616
617 2017-10-25 David Malcolm <dmalcolm@redhat.com>
618
619 PR c/7356
620 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
621 semicolons.
622
623 2017-10-25 Jakub Jelinek <jakub@redhat.com>
624
625 PR libstdc++/81706
626 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
627 newdecl to corresponding __builtin_ if any.
628
629 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
630
631 PR c++/82466
632 * c-decl.c (diagnose_mismatched_decls): Use
633 OPT_Wbuiltin_declaration_mismatch.
634
635 2017-10-12 David Malcolm <dmalcolm@redhat.com>
636
637 * c-parser.c (c_parser_require): Add "type_is_unique" param and
638 use it to guard calls to maybe_suggest_missing_token_insertion.
639 (c_parser_parms_list_declarator): Override default value of new
640 "type_is_unique" param to c_parser_require.
641 (c_parser_asm_statement): Likewise.
642 * c-parser.h (c_parser_require): Add "type_is_unique" param,
643 defaulting to true.
644
645 2017-10-11 Nathan Sidwell <nathan@acm.org>
646
647 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
648
649 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
650
651 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
652 operating on trees as wide_ints.
653 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
654 (c_tree_equal): Likewise.
655
656 2017-10-04 David Malcolm <dmalcolm@redhat.com>
657
658 * c-decl.c (push_parm_decl): Store c_parm's location into the
659 PARAM_DECL.
660 (build_c_parm): Add "loc" param and store it within the c_parm.
661 * c-parser.c (struct c_parser): Add "last_token_location" field.
662 (c_parser_consume_token): Store location of the token into the
663 new field.
664 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
665 when handling a FUNCTION_DECL, if it doesn't already have them.
666 (c_parser_parameter_declaration): Generate a location for the
667 parameter, and pass it to the call to build_c_parm.
668 * c-tree.h (struct c_parm): Add field "loc".
669 (build_c_parm): Add location_t param.
670 * c-typeck.c (get_fndecl_argument_location): New function.
671 (inform_for_arg): New function.
672 (convert_for_assignment): Use inform_for_arg when dealing with
673 ic_argpass.
674
675 2017-09-29 Jakub Jelinek <jakub@redhat.com>
676
677 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
678 width is non-NULL.
679 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
680 don't SET_DECL_C_BIT_FIELD here.
681
682 PR c/82340
683 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
684 instead of trying to set just TREE_READONLY manually.
685
686 2017-09-16 Tom de Vries <tom@codesourcery.com>
687
688 PR c/81875
689 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
690 cond itself.
691
692 2017-09-15 Joseph Myers <joseph@codesourcery.com>
693
694 PR c/82071
695 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
696 for C11.
697 (build_conditional_expr): For C11, generate result with excess
698 precision when one argument is an integer and the other is of a
699 type using excess precision.
700
701 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
702
703 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
704
705 2017-09-13 Marek Polacek <polacek@redhat.com>
706
707 PR c/82167
708 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
709 than expr.original_type.
710
711 2017-09-12 Nathan Sidwell <nathan@acm.org>
712
713 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
714 resort_sorted_fields): Moved from c-family/c-common.c.
715 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
716
717 2017-09-01 Joseph Myers <joseph@codesourcery.com>
718
719 PR c/82071
720 * c-typeck.c (build_atomic_assign): Handle argument with excess
721 precision. Ensure any EXCESS_PRECISION_EXPR is present in
722 argument passed to build_binary_op and convert_for_assignment but
723 not for call to c_fully_fold.
724 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
725 Ensure build_binary_op is called with argument with original
726 semantic type. Avoid calling c_fully_fold with an
727 EXCESS_PRECISION_EXPR from build_binary_op.
728
729 2017-09-01 Jakub Jelinek <jakub@redhat.com>
730
731 PR c/81887
732 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
733
734 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
735 Alan Hayward <alan.hayward@arm.com>
736 David Sherwood <david.sherwood@arm.com>
737
738 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
739 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
740 m1 and m2 to the signed equivalent of a fixed-point
741 SCALAR_TYPE_MODE.
742
743 2017-08-24 David Malcolm <dmalcolm@redhat.com>
744
745 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
746 than CAN_HAVE_LOCATION_P when determining whether to use the
747 location_t value within "value".
748
749 2017-08-21 David Malcolm <dmalcolm@redhat.com>
750
751 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
752 rather than peeking the location of the first token.
753 * c-tree.h (c_expr::get_location): New method.
754
755 2017-08-21 David Malcolm <dmalcolm@redhat.com>
756
757 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
758 to check_function_arguments.
759
760 2017-08-18 Marek Polacek <polacek@redhat.com>
761
762 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
763 commentary.
764
765 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
766
767 PR c/53037
768 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
769 (check_bitfield_type_and_width): Don't allow bit-field with
770 warn_if_not_aligned type.
771
772 2017-08-14 Martin Sebor <msebor@redhat.com>
773
774 PR c/81117
775 * c-objc-common.c (c_objc_common_init): Handle 'G'.
776
777 2017-08-11 Marek Polacek <polacek@redhat.com>
778
779 PR c/81795
780 * c-decl.c (pushtag): Only print inform if the warning was printed.
781 (grokdeclarator): Likewise.
782
783 2017-08-10 David Malcolm <dmalcolm@redhat.com>
784
785 * c-parser.c (c_parser_error): Rename to...
786 (c_parser_error_richloc): ...this, making static, and adding
787 "richloc" parameter, passing it to the c_parse_error call,
788 rather than calling c_parser_set_source_position_from_token.
789 (c_parser_error): Reintroduce, reimplementing in terms of the
790 above, converting return type from void to bool.
791 (class token_pair): New class.
792 (struct matching_paren_traits): New struct.
793 (matching_parens): New typedef.
794 (struct matching_brace_traits): New struct.
795 (matching_braces): New typedef.
796 (get_matching_symbol): New function.
797 (c_parser_require): Add param MATCHING_LOCATION, using it to
798 highlight matching "opening" tokens for missing "closing" tokens.
799 (c_parser_skip_until_found): Likewise.
800 (c_parser_static_assert_declaration_no_semi): Convert explicit
801 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
802 class matching_parens, so that the pertinent open parenthesis is
803 highlighted when there are problems locating the close
804 parenthesis.
805 (c_parser_struct_or_union_specifier): Likewise.
806 (c_parser_typeof_specifier): Likewise.
807 (c_parser_alignas_specifier): Likewise.
808 (c_parser_simple_asm_expr): Likewise.
809 (c_parser_braced_init): Likewise, for matching_braces.
810 (c_parser_paren_condition): Likewise, for matching_parens.
811 (c_parser_switch_statement): Likewise.
812 (c_parser_for_statement): Likewise.
813 (c_parser_asm_statement): Likewise.
814 (c_parser_asm_operands): Likewise.
815 (c_parser_cast_expression): Likewise.
816 (c_parser_sizeof_expression): Likewise.
817 (c_parser_alignof_expression): Likewise.
818 (c_parser_generic_selection): Likewise.
819 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
820 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
821 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
822 In case CPP_OPEN_PAREN, pass loc_open_paren to the
823 c_parser_skip_until_found call.
824 (c_parser_objc_class_definition): Use class matching_parens as
825 above.
826 (c_parser_objc_method_decl): Likewise.
827 (c_parser_objc_try_catch_finally_statement): Likewise.
828 (c_parser_objc_synchronized_statement): Likewise.
829 (c_parser_objc_at_property_declaration): Likewise.
830 (c_parser_oacc_wait_list): Likewise.
831 (c_parser_omp_var_list_parens): Likewise.
832 (c_parser_omp_clause_collapse): Likewise.
833 (c_parser_omp_clause_default): Likewise.
834 (c_parser_omp_clause_if): Likewise.
835 (c_parser_omp_clause_num_threads): Likewise.
836 (c_parser_omp_clause_num_tasks): Likewise.
837 (c_parser_omp_clause_grainsize): Likewise.
838 (c_parser_omp_clause_priority): Likewise.
839 (c_parser_omp_clause_hint): Likewise.
840 (c_parser_omp_clause_defaultmap): Likewise.
841 (c_parser_oacc_single_int_clause): Likewise.
842 (c_parser_omp_clause_ordered): Likewise.
843 (c_parser_omp_clause_reduction): Likewise.
844 (c_parser_omp_clause_schedule): Likewise.
845 (c_parser_omp_clause_num_teams): Likewise.
846 (c_parser_omp_clause_thread_limit): Likewise.
847 (c_parser_omp_clause_aligned): Likewise.
848 (c_parser_omp_clause_linear): Likewise.
849 (c_parser_omp_clause_safelen): Likewise.
850 (c_parser_omp_clause_simdlen): Likewise.
851 (c_parser_omp_clause_depend): Likewise.
852 (c_parser_omp_clause_map): Likewise.
853 (c_parser_omp_clause_device): Likewise.
854 (c_parser_omp_clause_dist_schedule): Likewise.
855 (c_parser_omp_clause_proc_bind): Likewise.
856 (c_parser_omp_clause_uniform): Likewise.
857 (c_parser_omp_for_loop): Likewise.
858 (c_parser_cilk_clause_vectorlength): Likewise.
859 (c_parser_cilk_clause_linear): Likewise.
860 (c_parser_transaction_expression): Likewise.
861 * c-parser.h (c_parser_require): Add param matching_location with
862 default UNKNOWN_LOCATION.
863 (c_parser_error): Convert return type from void to bool.
864 (c_parser_skip_until_found): Add param matching_location with
865 default UNKNOWN_LOCATION.
866
867 2017-08-09 Marek Polacek <polacek@redhat.com>
868
869 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
870 * c-tree.h (build_external_ref): Update declaration.
871 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
872 (build_external_ref): Change the type of a parameter to bool.
873 (parser_build_binary_op): Use true/false instead of 1/0.
874 (pointer_diff): Likewise.
875 (build_modify_expr): Likewise.
876 (set_designator): Change the type of a parameter to bool.
877 (set_init_index): Use true/false instead of 1/0.
878 (set_init_label): Likewise.
879 (output_init_element): Change the type of a parameter to bool.
880 (output_pending_init_elements): Use true/false instead of 1/0.
881 (process_init_element): Likewise.
882 (build_binary_op): Change the type of a parameter to bool.
883
884 2017-08-09 Marek Polacek <polacek@redhat.com>
885
886 PR c/81233
887 * c-typeck.c (pedwarn_init): Make the function take a variable list.
888 Call emit_diagnostic_valist instead of pedwarn.
889 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
890 Print the relevant types in diagnostics.
891
892 2017-08-09 Marek Polacek <polacek@redhat.com>
893
894 PR c/81417
895 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
896 build_conditional_expr.
897 * c-parser.c (c_parser_conditional_expression): Create locations for
898 EXP1 and EXP2 from their source ranges. Pass the locations down to
899 build_conditional_expr.
900 * c-tree.h (build_conditional_expr): Update declaration.
901 * c-typeck.c (build_conditional_expr): Add location_t parameters.
902 For -Wsign-compare, also print the types.
903
904 2017-08-08 Martin Liska <mliska@suse.cz>
905
906 * c-convert.c: Include header files.
907 * c-typeck.c: Likewise.
908
909 2017-08-07 Martin Liska <mliska@suse.cz>
910
911 * c-parser.c (c_parser_attributes): Canonicalize name of an
912 attribute.
913
914 2017-08-02 Marek Polacek <polacek@redhat.com>
915
916 PR c/81289
917 * c-parser.c (c_parser_unary_expression): Use set_error.
918
919 PR c/81448
920 PR c/81306
921 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
922 warnings. Avoid walking MACRO_MAP_LOCATIONS.
923
924 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
925 Martin Liska <mliska@suse.cz>
926
927 * c-typeck.c (c_finish_goto_label): Build gimple predict
928 statement.
929
930 2017-07-31 Martin Liska <mliska@suse.cz>
931
932 PR sanitize/81530
933 * c-convert.c (convert): Guard condition with flag_sanitize_p
934 also with current_function_decl non-null equality.
935 * c-decl.c (grokdeclarator): Likewise.
936 * c-typeck.c (build_binary_op): Likewise.
937
938 2017-07-25 Marek Polacek <polacek@redhat.com>
939
940 * c-decl.c (grokfield): Remove local variable.
941
942 2017-07-25 Marek Polacek <polacek@redhat.com>
943
944 PR c/81364
945 * c-parser.c (c_parser_else_body): Don't warn about multistatement
946 macro expansion if the body is in { }.
947 (c_parser_while_statement): Likewise.
948 (c_parser_for_statement): Likewise.
949
950 2017-07-18 Nathan Sidwell <nathan@acm.org>
951
952 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
953
954 2017-07-14 David Malcolm <dmalcolm@redhat.com>
955
956 * c-decl.c (implicitly_declare): When suggesting a missing
957 #include, provide a fix-it hint.
958
959 2017-07-06 David Malcolm <dmalcolm@redhat.com>
960
961 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
962 and call that instead.
963 * c-tree.h (selftest::run_c_tests): New decl.
964
965 2017-06-26 Marek Polacek <polacek@redhat.com>
966
967 PR c/80116
968 * c-parser.c (c_parser_if_body): Set the location of the
969 body of the conditional after parsing all the labels. Call
970 warn_for_multistatement_macros.
971 (c_parser_else_body): Likewise.
972 (c_parser_switch_statement): Likewise.
973 (c_parser_while_statement): Likewise.
974 (c_parser_for_statement): Likewise.
975 (c_parser_statement): Add a default argument. Save the location
976 after labels have been parsed.
977 (c_parser_c99_block_statement): Likewise.
978
979 2017-06-19 Richard Biener <rguenther@suse.de>
980
981 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
982 negated _Literals to parse _Literal (int) -1.
983
984 2017-06-13 Martin Liska <mliska@suse.cz>
985
986 PR sanitize/78204
987 * c-convert.c (convert): Use sanitize_flags_p.
988 * c-decl.c (grokdeclarator): Likewise.
989 * c-typeck.c (convert_for_assignment): Likewise.
990 (c_finish_return): Likewise.
991 (build_binary_op): Likewise.
992
993 2017-06-08 Jakub Jelinek <jakub@redhat.com>
994
995 PR c/81006
996 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
997 to sizetype before size_binop.
998
999 2017-06-07 Jakub Jelinek <jakub@redhat.com>
1000
1001 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1002 of TDI_generic.
1003
1004 2017-06-06 Marek Polacek <polacek@redhat.com>
1005
1006 PR c/79983
1007 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1008 ref.
1009 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1010
1011 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1012
1013 * c-parser.c (c_parser_binary_expression): Implement the
1014 -Wsizeof_pointer_div warning.
1015 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1016 from a parenthesized expression.
1017 (c_parser_expr_list): Use c_last_sizeof_loc.
1018 * c-tree.h (c_last_sizeof_loc): New external.
1019 * c-typeck.c (c_last_sizeof_loc): New variable.
1020 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1021
1022 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1023
1024 PR testsuite/80580
1025 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1026
1027 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1028
1029 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1030 parameters.
1031
1032 2017-05-24 Martin Sebor <msebor@redhat.com>
1033
1034 PR c/80731
1035 * c-fold.c (c_fully_fold_internal): Adjust.
1036 * c-typeck.c (parser_build_unary_op): Adjust.
1037
1038 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1039
1040 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1041 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1042 "VECTOR_LENGTH".
1043
1044 2017-05-23 Marek Polacek <polacek@redhat.com>
1045
1046 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1047 quotes.
1048
1049 2017-05-22 Jakub Jelinek <jakub@redhat.com>
1050
1051 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1052 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1053 it returned invariant. Call tree_invariant_p unconditionally
1054 afterwards to decide whether to return expr or op0.
1055
1056 2017-05-22 Nathan Sidwell <nathan@acm.org>
1057
1058 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1059
1060 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1061
1062 * c-parser.c (c_parser_omp_clause_default): Handle
1063 "OMP_CLAUSE_DEFAULT_PRESENT".
1064
1065 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1066
1067 * config-lang.in (gtfiles): Add c-family/c-format.c.
1068
1069 2017-05-18 Nathan Sidwell <nathan@acm.org>
1070
1071 * c-decl.c (pushdecl_top_level): Delete unused function.
1072
1073 2017-05-18 Marek Polacek <polacek@redhat.com>
1074
1075 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1076 (check_earlier_gotos): Likewise.
1077 (define_label): Likewise.
1078 (pending_xref_error): Likewise.
1079 (smallest_type_quals_location): Likewise.
1080 (grokdeclarator): Likewise.
1081 (grokparms): Likewise.
1082 (identifier_global_value): Likewise.
1083 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1084 (find_init_member): Likewise.
1085
1086 2017-05-18 Marek Polacek <polacek@redhat.com>
1087
1088 * c-decl.c (start_decl): Use false/true instead of 0/1.
1089 (grokdeclarator): Likewise.
1090 (finish_struct): Likewise.
1091 (start_function): Change the return type to bool. Use false/true
1092 instead of 0/1.
1093 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1094 * c-tree.h (start_function): Update.
1095 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1096 (set_designator): Change the return type to bool. Use false/true
1097 instead of 0/1.
1098
1099 2017-05-17 Marek Polacek <polacek@redhat.com>
1100
1101 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1102 * c-typeck.c: Likewise.
1103
1104 2017-05-17 Marek Polacek <polacek@redhat.com>
1105
1106 PR sanitizer/80659
1107 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1108 DECL_IGNORED_P even for non-static compound literals.
1109
1110 2017-05-17 Martin Liska <mliska@suse.cz>
1111
1112 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1113 use it instead of int type.
1114
1115 2017-05-17 Marek Polacek <polacek@redhat.com>
1116
1117 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1118 call c_fully_fold.
1119 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1120 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1121 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1122 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1123 save_expr.
1124 (c_parser_conditional_expression): Likewise.
1125 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1126 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1127 (process_init_element): Likewise.
1128 (build_binary_op): Likewise.
1129 (handle_omp_array_sections_1): Likewise.
1130
1131 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1132
1133 * c-parser.c (c_parser_omp_clause_num_gangs)
1134 (c_parser_omp_clause_num_workers)
1135 (c_parser_omp_clause_vector_length): Merge functions into...
1136 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1137 all users.
1138
1139 2017-05-11 Nathan Sidwell <nathan@acm.org>
1140
1141 * gimple-parser.c: Don't #include tree-dump.h.
1142
1143 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1144
1145 PR testsuite/80580
1146 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1147
1148 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1149
1150 PR testsuite/80580
1151 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1152 incorrect __MEM syntax.
1153
1154 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1155
1156 PR testsuite/80580
1157 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1158 type of unary '*'.
1159
1160 2017-05-09 Nathan Sidwell <nathan@acm.org>
1161
1162 * c-tree.h (pushdecl): Declare.
1163
1164 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1165
1166 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1167 with diagnostic_report_diagnostic.
1168 * c-errors.c (pedwarn_c99): Likewise.
1169 (pedwarn_c90): Likewise.
1170
1171 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1172
1173 PR c++/80038
1174 * c-gimplify.c (c_gimplify_expr): Remove calls to
1175 cilk_gimplifY_call_params_in_spawned_fn.
1176
1177 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1178
1179 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1180 hint for removing extra semicolon.
1181
1182 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1183
1184 PR c/80468
1185 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1186 enabled, set specs->type to integer_type_node.
1187
1188 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1189
1190 * c-array-notation.c: Fix typo in comment.
1191
1192 2017-03-29 Marek Polacek <polacek@redhat.com>
1193
1194 PR c/79730
1195 * c-decl.c (finish_decl): Check VAR_P.
1196
1197 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1198
1199 PR middle-end/80162
1200 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1201 * c-typeck.c (c_mark_addressable): Likewise. Look through
1202 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1203 to ARRAY_TYPE.
1204 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1205
1206 2017-03-23 Marek Polacek <polacek@redhat.com>
1207
1208 * c-tree.h: Remove a C_RID_YYCODE reference.
1209
1210 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1211
1212 PR c/80097
1213 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1214 optional COMPOUND_EXPR with ubsan instrumentation.
1215
1216 2017-03-17 Marek Polacek <polacek@redhat.com>
1217
1218 * c-parser.c: Add C11 references.
1219
1220 2017-03-15 Marek Polacek <polacek@redhat.com>
1221
1222 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1223
1224 2017-03-11 Marek Polacek <polacek@redhat.com>
1225
1226 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1227
1228 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1229
1230 PR translation/79848
1231 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1232 "%qs".
1233 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1234
1235 2017-03-09 Marek Polacek <polacek@redhat.com>
1236
1237 PR sanitizer/79757
1238 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1239 parameter declarations with initializers.
1240
1241 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1242
1243 PR c/79969
1244 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1245 TYPE_STUB_DECL.
1246
1247 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1248
1249 PR c/79834
1250 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1251 for "may only be used in compound statements" diagnostics, change it
1252 such that the same translatable string is used for all pragmas. For
1253 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1254 diagnostics.
1255 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1256 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1257 "may only be used in compound statements" diagnostics, such that the
1258 same translatable string is used for all pragmas.
1259
1260 2017-03-04 Marek Polacek <polacek@redhat.com>
1261
1262 PR c/79847
1263 * c-decl.c (implicit_decl_warning): Add missing space.
1264
1265 2017-03-03 Marek Polacek <polacek@redhat.com>
1266
1267 PR c/79758
1268 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1269 current_function_prototype_arg_types is error_mark_node. Fix
1270 formatting. Use TREE_VALUE instead of TREE_TYPE.
1271
1272 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1273
1274 PR c/79837
1275 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1276 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1277 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1278 diagnostics.
1279
1280 PR c/79836
1281 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1282 instead of %<_Generic>.
1283 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1284 (c_parser_omp_target_exit_data): Use %<release%> instead of
1285 %<release>.
1286
1287 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1288
1289 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1290 instead of just cond ? "..." : "...".
1291 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1292 for "enter"/"exit" keyword.
1293 (c_finish_oacc_routine): Don't use %s to supply portions of the
1294 message.
1295
1296 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1297
1298 PR c++/79588
1299 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1300 handle -Wrestrict here.
1301 * c-typeck.c (build_function_call_vec): Adjust
1302 check_function_arguments caller.
1303
1304 2017-02-23 Richard Biener <rguenther@suse.de>
1305
1306 PR c/79684
1307 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1308 to initialize c_exprs to return.
1309 (c_parser_gimple_binary_expression): Likewise.
1310 (c_parser_gimple_unary_expression): Likewise.
1311 (c_parser_gimple_postfix_expression): Likewise.
1312
1313 2017-02-22 Marek Polacek <polacek@redhat.com>
1314
1315 PR c/79662
1316 * c-typeck.c (convert_arguments): Handle error_mark_node.
1317
1318 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1319
1320 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1321 value of c_parser_parse_ssa_name against error_mark_node and emit
1322 error if ssa name is anonymous and written as default definition.
1323
1324 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1325
1326 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1327 FMA_EXPR.
1328
1329 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1330
1331 PR c++/79512
1332 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1333 ignore #pragma omp target even when not followed by identifier.
1334
1335 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1336
1337 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1338 (c_parser_gimple_unary_expression): Likewise.
1339
1340 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1341
1342 * c-parser.c (c_parser_oacc_declare): Add missing space in
1343 diagnostics.
1344
1345 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1346
1347 PR c/79478
1348 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1349 set_c_expr_source_range when parsing ssa-name.
1350
1351 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1352 Richard Biener <rguenther@suse.de>
1353
1354 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1355 building IL when arguments are error_mark_node.
1356 (c_parser_gimple_unary_expression): Likewise.
1357 (c_parser_gimple_if_stmt): Likewise.
1358 (c_parser_gimple_switch_stmt): Likewise.
1359 (c_parser_gimple_return_stmt): Likewise.
1360 (c_parser_parse_ssa_name): When name lookup fails do not build
1361 an SSA name. Use undeclared rather than not declared in error
1362 reporting.
1363
1364 2017-02-09 Marek Polacek <polacek@redhat.com>
1365
1366 PR c/79428
1367 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1368 instead of c_parser_skip_until_found.
1369
1370 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1371
1372 PR c/79431
1373 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1374 symtab_node::get on automatic variables.
1375
1376 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1377 Chung-Lin Tang <cltang@codesourcery.com>
1378
1379 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1380 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1381 semantic checking.
1382 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1383
1384 2017-02-07 Richard Biener <rguenther@suse.de>
1385
1386 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1387 (c_parser_gimple_postfix_expression_after_primary):
1388 Do not use c_build_function_call_vec to avoid folding and promotion.
1389 Simplify.
1390
1391 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1392
1393 PR lto/79061
1394 * c-decl.c (pop_scope): Pass main_input_filename to
1395 build_translation_unit_decl.
1396
1397 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1398
1399 * c-parser.c: Include "read-rtl-function.h" and
1400 "run-rtl-passes.h".
1401 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1402 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1403 production. Update for renaming of field "gimple_pass" to
1404 "gimple_or_rtl_pass". If __RTL was seen, call
1405 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1406 to an auto_timevar, to cope with early exit.
1407 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1408 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1409 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1410 Handle RID_RTL.
1411 (c_parser_parse_rtl_body): New function.
1412 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1413 (struct c_declspecs): Rename field "gimple_pass" to
1414 "gimple_or_rtl_pass". Add field "rtl_p".
1415 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1416 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1417 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1418 (c_parser_gimple_or_rtl_pass_list): ...this.
1419
1420 2017-01-20 Marek Polacek <polacek@redhat.com>
1421
1422 PR c/64279
1423 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1424
1425 2017-01-13 Richard Biener <rguenther@suse.de>
1426
1427 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1428 nops.
1429
1430 2017-01-13 Richard Biener <rguenther@suse.de>
1431
1432 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1433 _Literal ( type-name ) number.
1434
1435 2017-01-12 Richard Biener <rguenther@suse.de>
1436
1437 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1438 __MEM.
1439
1440 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1441
1442 PR c++/72813
1443 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1444 PCH file.
1445
1446 2017-01-11 Richard Biener <rguenther@suse.de>
1447
1448 PR bootstrap/79052
1449 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1450 returns on parse errors.
1451
1452 2017-01-04 Marek Polacek <polacek@redhat.com>
1453
1454 PR c++/64767
1455 * c-parser.c (c_parser_postfix_expression): Mark zero character
1456 constants by setting original_type in c_expr.
1457 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1458 with a zero character constant.
1459 (char_type_p): New function.
1460
1461 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1462
1463 * c-parser.c (c_parser_declaration_or_fndef): Create a
1464 rich_location at init_loc and parse it to start_init.
1465 (last_init_list_comma): New global.
1466 (c_parser_braced_init): Update last_init_list_comma when parsing
1467 commas. Pass it to pop_init_level. Pass location of closing
1468 brace to pop_init_level.
1469 (c_parser_postfix_expression_after_paren_type): Create a
1470 rich_location at type_loc and parse it to start_init.
1471 (c_parser_omp_declare_reduction): Likewise for loc.
1472 * c-tree.h (start_init): Add rich_location * param.
1473 (pop_init_level): Add location_t param.
1474 * c-typeck.c (struct initializer_stack): Add field
1475 "missing_brace_richloc".
1476 (start_init): Add richloc param, use it to initialize
1477 the stack node's missing_brace_richloc.
1478 (last_init_list_comma): New decl.
1479 (finish_implicit_inits): Pass last_init_list_comma to
1480 pop_init_level.
1481 (push_init_level): When finding missing open braces, add fix-it
1482 hints to the richloc.
1483 (pop_init_level): Add "insert_before" param and pass it
1484 when calling pop_init_level. Add fixits about missing
1485 close braces to any richloc. Use the richloc for the
1486 -Wmissing-braces warning.
1487 (set_designator): Pass last_init_list_comma to pop_init_level.
1488 (process_init_element): Likewise.
1489
1490 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1491
1492 Update copyright years.
1493
1494 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1495
1496 PR bootstrap/78817
1497 * c-typeck.c (build_function_call_vec): If check_function_arguments
1498 returns true, set TREE_NO_WARNING on CALL_EXPR.
1499
1500 PR c/77767
1501 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1502 to *expr instead of overwriting it.
1503
1504 2016-12-20 Richard Biener <rguenther@suse.de>
1505
1506 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1507 error recovery.
1508 (c_parser_gimple_statement): Only build assigns for non-error
1509 stmts.
1510 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1511
1512 2016-12-14 Martin Jambor <mjambor@suse.cz>
1513
1514 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1515 omp-low.h.
1516 (c_finish_oacc_routine): Adjusted call to
1517 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1518 to use their new names.
1519 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1520 use its new name.
1521 (c_parser_oacc_update): Likewise.
1522 (c_parser_omp_simd): Likewise.
1523 (c_parser_omp_target_update): Likewise.
1524 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1525 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1526 name.
1527 (c_finish_omp_cancellation_point): Likewise.
1528 * gimple-parser.c: Do not include omp-low.h
1529
1530 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1531 James Norris <jnorris@codesourcery.com>
1532
1533 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1534 EXIT_DATA,WAIT} are not used in compound statements.
1535 (c_parser_oacc_enter_exit_data): Update diagnostics.
1536
1537 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1538
1539 PR c++/71973
1540 * c-decl.c (diagnose_mismatched_decls): Use
1541 OPT_Wbuiltin_declaration_mismatch here too.
1542
1543 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1544 Alan Hayward <alan.hayward@arm.com>
1545 David Sherwood <david.sherwood@arm.com>
1546
1547 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1548 (make_label, finish_struct): Likewise.
1549
1550 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1551 Richard Biener <rguenther@suse.de>
1552
1553 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1554 * config-lang.in (gtfiles): Add c/c-parser.h.
1555 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1556 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1557 * c-parser.c (enum c_id_kind, struct c_token,
1558 c_parser_next_token_is, c_parser_next_token_is_not,
1559 c_parser_next_token_is_keyword,
1560 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1561 Split out to ...
1562 * c-parser.h: ... new header.
1563 * c-parser.c: Include c-parser.h and gimple-parser.h.
1564 (c_parser_peek_token, c_parser_peek_2nd_token,
1565 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1566 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1567 c_parser_error, c_parser_require, c_parser_skip_until_found,
1568 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1569 c_parser_type_name): Export.
1570 (c_parser_tokens_buf): New function.
1571 (c_parser_error): Likewise.
1572 (c_parser_set_error): Likewise.
1573 (c_parser_declspecs): Handle RID_GIMPLE.
1574 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1575 via c_parser_parse_gimple_body.
1576 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1577 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1578 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1579 c_parser_error, c_parser_require, c_parser_skip_until_found,
1580 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1581 c_parser_type_name): Declare.
1582 (struct c_parser): Declare forward.
1583 (c_parser_tokens_buf): Declare.
1584 (c_parser_error): Likewise.
1585 (c_parser_set_error): Likewise.
1586 * gimple-parser.c: New file.
1587 * gimple-parser.h: Likewise.
1588
1589 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1590
1591 PR c/35503
1592 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1593 warn_for_restrict.
1594
1595 2016-09-11 Le-Chun Wu <lcwu@google.com>
1596 Mark Wielaard <mjw@redhat.com>
1597
1598 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1599 to the given -Wshadow= variant.
1600
1601 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1602
1603 * c-typeck.c: Include memmodel.h.
1604
1605 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1606
1607 PR target/77957
1608 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1609 instead of lhd_return_null_tree_v.
1610
1611 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1612
1613 PR c++/69733
1614 * c-decl.c (smallest_type_quals_location): New static function.
1615 (grokdeclarator): Try to find the correct location for an ignored
1616 qualifier.
1617
1618 2016-09-26 Marek Polacek <polacek@redhat.com>
1619
1620 PR c/7652
1621 * c-decl.c (pop_scope): Add gcc_fallthrough.
1622
1623 2016-09-26 Marek Polacek <polacek@redhat.com>
1624
1625 PR c/7652
1626 * c-parser.c (struct c_token): Add flags field.
1627 (c_lex_one_token): Pass it to c_lex_with_flags.
1628 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1629 into IFN_FALLTHROUGH.
1630 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1631 attribute fallthrough after a case label or default label.
1632 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1633
1634 2016-09-24 Marek Polacek <polacek@redhat.com>
1635
1636 PR c/77490
1637 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1638 have boolean value. Warn about ++/-- on booleans.
1639
1640 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1641
1642 * c-parser.c (incomplete_record_decls): Remove unnecessary
1643 = vNULL initialization of file scope vec.
1644
1645 2016-09-16 Marek Polacek <polacek@redhat.com>
1646
1647 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1648
1649 2016-09-14 Marek Polacek <polacek@redhat.com>
1650
1651 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1652 (fix_array_notation_expr): Likewise.
1653 * c-decl.c (finish_decl): Likewise.
1654 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1655 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1656 (function_to_pointer_conversion): Use false instead of 0.
1657 (convert_lvalue_to_rvalue): Likewise.
1658 (parser_build_unary_op): Likewise.
1659 (build_atomic_assign): Likewise.
1660 (build_unary_op): Change nonconvert parameter type to bool, use
1661 true/false instead of 1/0.
1662 (build_binary_op): Use true instead of 1.
1663
1664 2016-09-13 David Malcolm <dmalcolm@redhat.com>
1665
1666 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1667 of add_fixit_insert to add_fixit_insert_before.
1668
1669 2016-09-13 Marek Polacek <polacek@redhat.com>
1670
1671 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1672 it.
1673
1674 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1675
1676 PR c++/77496
1677 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1678 COMPOUND_EXPR to warn_for_omitted_condop.
1679
1680 2016-09-07 David Malcolm <dmalcolm@redhat.com>
1681
1682 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1683 c_get_substring_location for this new langhook.
1684
1685 2016-09-02 Jakub Jelinek <jakub@redhat.com>
1686
1687 PR c/65467
1688 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1689 flag_openmp.
1690 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1691 instead of mark_exp_read on low_bound/length expression.
1692 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1693 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1694 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1695 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1696 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1697 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1698 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1699 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1700 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1701 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1702 instead of mark_expr_read.
1703 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1704 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1705 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1706 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1707 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1708 array section bases outside of depend clause, for depend clause
1709 use convert_lvalue_to_rvalue on the base.
1710 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1711 linear, aligned, map, to and from clauses.
1712 (c_omp_clause_copy_ctor): New function.
1713
1714 2016-09-01 Marek Polacek <polacek@redhat.com>
1715
1716 PR c/7652
1717 * c-typeck.c (composite_type): Add FALLTHRU comment.
1718
1719 2016-08-31 David Malcolm <dmalcolm@redhat.com>
1720
1721 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1722 to the insertion fixits for "struct", "union", and "enum".
1723
1724 2016-08-30 David Malcolm <dmalcolm@redhat.com>
1725
1726 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1727 rather than add_fixit_misspelled_id.
1728 (undeclared_variable): Likewise.
1729 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1730 now-redundant "here" params from add_fixit_insert method calls.
1731 (c_parser_parameter_declaration): Likewise.
1732 * c-typeck.c (build_component_ref): Remove now-redundant range
1733 param from add_fixit_replace method calls.
1734
1735 2016-08-25 Marek Polacek <polacek@redhat.com>
1736
1737 * c-typeck.c (parser_build_binary_op): Pass LHS to
1738 warn_logical_not_parentheses.
1739
1740 2016-08-25 Marek Polacek <polacek@redhat.com>
1741
1742 PR c/77323
1743 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1744 or _FloatN or _FloatNx is not supported.
1745 (finish_declspecs): Set type to integer_type_node when _FloatN or
1746 _FloatNx is not supported.
1747
1748 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1749
1750 PR c/32187
1751 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1752 (struct c_declspecs): Add field floatn_nx_idx.
1753 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1754 and _FloatNx type specifiers.
1755 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1756 (c_parser_declspecs, c_parser_attribute_any_word)
1757 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1758 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1759 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1760 narrower than double.
1761
1762 2016-08-12 Jakub Jelinek <jakub@redhat.com>
1763 Martin Liska <mliska@suse.cz>
1764
1765 PR c/67410
1766 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1767 % to determine val element to change. Assert that
1768 wchar_bytes * charwidth fits into val array.
1769
1770 2016-08-12 Marek Polacek <polacek@redhat.com>
1771
1772 PR c/7652
1773 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1774 (c_parser_postfix_expression): Likewise.
1775 * c-typeck.c (build_unary_op): Adjust fall through comment.
1776 (c_mark_addressable): Likewise.
1777
1778 2016-08-11 Jakub Jelinek <jakub@redhat.com>
1779
1780 PR c/72816
1781 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1782 array member through typedef, for orig_qual_indirect == 0 clear
1783 orig_qual_type.
1784
1785 2016-08-08 David Malcolm <dmalcolm@redhat.com>
1786
1787 PR c/64955
1788 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1789 this up to selftest::run_c_tests.
1790 (selftest::run_c_tests): New function.
1791
1792 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1793
1794 * c-parser.c (struct oacc_routine_data): Add error_seen and
1795 fndecl_seen members.
1796 (c_finish_oacc_routine): Use these.
1797 (c_parser_declaration_or_fndef): Adjust.
1798 (c_parser_oacc_routine): Likewise. Support more C language
1799 constructs, and improve diagnostics. Move pragma context
1800 checking...
1801 (c_parser_pragma): ... here.
1802
1803 * c-parser.c (struct oacc_routine_data): New.
1804 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1805 Simplify code.
1806 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1807 declare target" attribute.
1808
1809 2016-08-01 Jan Beulich <jbeulich@suse.com>
1810
1811 * c-fold.c (c_fully_fold_internal): Also emit shift count
1812 warnings for vector types.
1813 * c-typeck.c (build_binary_op): Likewise.
1814
1815 2016-07-29 Marek Polacek <polacek@redhat.com>
1816
1817 PR c/71742
1818 * c-decl.c (finish_struct): Rephrase an error message.
1819
1820 PR c/71853
1821 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1822 to error node for invalid code.
1823
1824 PR c/71573
1825 * c-decl.c (implicitly_declare): Return decl early not only for
1826 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1827
1828 2016-07-29 Jakub Jelinek <jakub@redhat.com>
1829
1830 PR c/71969
1831 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1832 on GNU extern inline functions.
1833
1834 2016-07-29 Marek Polacek <polacek@redhat.com>
1835
1836 PR c/71583
1837 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1838 check expr.value.
1839
1840 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
1841
1842 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1843
1844 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1845
1846 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1847 spellcheck-tree.h
1848 (best_macro_match): Likewise, converting from a typedef to a
1849 subclass.
1850 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1851 (lookup_name_fuzzy): Update for change of best_macro_match to a
1852 subclass with a ctor that calls cpp_forall_identifiers.
1853
1854 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1855
1856 * c-decl.c (implicit_decl_warning): Update for conversion of
1857 return type of lookup_name_fuzzy to const char *.
1858 (undeclared_variable): Likewise.
1859 (lookup_name_fuzzy): Convert return type from tree to
1860 const char *.
1861 * c-parser.c (c_parser_declaration_or_fndef): Update for
1862 conversion of return type of lookup_name_fuzzy to const char *.
1863 (c_parser_parameter_declaration): Likewise.
1864
1865 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1866
1867 * c-parser.c (c_parser_oacc_declare): Don't scan for
1868 GOMP_MAP_POINTER.
1869 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1870 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1871 zero-length subarrays.
1872
1873 2016-07-15 Jakub Jelinek <jakub@redhat.com>
1874
1875 PR c/71858
1876 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1877 instead of FUZZY_LOOKUP_NAME.
1878 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1879 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1880
1881 2016-07-14 Jakub Jelinek <jakub@redhat.com>
1882
1883 PR c/71858
1884 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1885
1886 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1887
1888 * c-parser.c (c_parser_generic_selection): Make type of variable
1889 auto_vec.
1890 (c_parser_omp_declare_simd): Likewise.
1891
1892 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1893
1894 * c-decl.c (struct c_struct_parse_info): Change member types
1895 from vec to auto_vec.
1896 (start_struct): Adjust.
1897 (finish_struct): Likewise.
1898
1899 2016-07-02 Jakub Jelinek <jakub@redhat.com>
1900
1901 PR c/71719
1902 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1903
1904 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1905
1906 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1907 Move pragma context checking into...
1908 (c_parser_omp_cancellation_point): ... here, and improve
1909 diagnostic messages.
1910 * c-typeck.c (c_finish_omp_cancel)
1911 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1912
1913 2016-06-29 Jakub Jelinek <jakub@redhat.com>
1914
1915 PR c/71685
1916 * c-typeck.c (c_build_qualified_type): Don't clear
1917 C_TYPE_INCOMPLETE_VARS for the main variant.
1918
1919 2016-06-28 Martin Sebor <msebor@redhat.com>
1920
1921 PR c/71552
1922 * c-typeck.c (output_init_element): Diagnose incompatible types
1923 before non-constant initializers.
1924
1925 2016-06-28 Jakub Jelinek <jakub@redhat.com>
1926
1927 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1928
1929 2016-06-23 Andi Kleen <ak@linux.intel.com>
1930
1931 * Make-lang.in: Add support for autofdo.
1932
1933 2016-06-22 David Malcolm <dmalcolm@redhat.com>
1934
1935 PR c/70339
1936 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1937 (implicit_decl_warning): When issuing warnings for implicit
1938 declarations, attempt to provide a suggestion via
1939 lookup_name_fuzzy.
1940 (undeclared_variable): Likewise when issuing errors.
1941 (lookup_name_in_scope): Likewise.
1942 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1943 (best_macro_match): New typedef.
1944 (find_closest_macro_cpp_cb): New function.
1945 (lookup_name_fuzzy): New function.
1946 * c-parser.c: Include gcc-rich-location.h.
1947 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1948 (c_keyword_starts_typename): ...this new function.
1949 (c_parser_declaration_or_fndef): When issuing errors about
1950 missing "struct" etc, add a fixit. For other kinds of errors,
1951 attempt to provide a suggestion via lookup_name_fuzzy.
1952 (c_parser_parms_declarator): When looking ahead to detect typos in
1953 type names, also reject CPP_KEYWORD.
1954 (c_parser_parameter_declaration): When issuing errors about
1955 unknown type names, attempt to provide a suggestion via
1956 lookup_name_fuzzy.
1957 * c-tree.h (c_keyword_starts_typename): New prototype.
1958
1959 2016-06-20 Joseph Myers <joseph@codesourcery.com>
1960
1961 PR c/71601
1962 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1963 c_common_type returns error_mark_node.
1964
1965 2016-06-19 Martin Sebor <msebor@redhat.com>
1966
1967 PR c/69507
1968 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1969 __alignof__ (expression).
1970
1971 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1972
1973 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1974
1975 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1976
1977 * c-typeck.c (build_component_ref): Simplify fixit code by
1978 using gcc_rich_location::add_fixit_misspelled_id.
1979 (set_init_label): Likewise.
1980
1981 2016-06-13 David Malcolm <dmalcolm@redhat.com>
1982
1983 * c-parser.c (c_parser_initelt): Provide location of name for new
1984 location_t param of set_init_label.
1985 * c-tree.h (set_init_label): Add location_t param.
1986 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1987 param and use it when issuing error messages about unrecognized
1988 field names. Attempt to provide a fixit hint if appropriate,
1989 otherwise update the error message to provide the type name.
1990
1991 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1992
1993 PR c/71381
1994 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1995 Loosen checking.
1996
1997 2016-06-08 Martin Sebor <msebor@redhat.com>
1998 Jakub Jelinek <jakub@redhat.com>
1999
2000 PR c++/70507
2001 PR c/68120
2002 * c-typeck.c (convert_arguments): Don't promote last argument
2003 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2004
2005 2016-06-08 Marek Polacek <polacek@redhat.com>
2006
2007 PR c/71418
2008 * c-decl.c (grokdeclarator): Check TYPE_P.
2009
2010 PR c/71426
2011 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2012 code.
2013
2014 2016-06-07 David Malcolm <dmalcolm@redhat.com>
2015
2016 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2017 and structure element reference, capture the location of the
2018 element name token and pass it to build_component_ref.
2019 (c_parser_postfix_expression_after_primary): Likewise for
2020 structure element dereference.
2021 (c_parser_omp_variable_list): Likewise for
2022 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2023 * c-tree.h (build_component_ref): Add location_t param.
2024 * c-typeck.c (build_component_ref): Add location_t param
2025 COMPONENT_LOC. Use it, if available, when issuing hints about
2026 mispelled member names to provide a fixit replacement hint.
2027
2028 2016-06-06 Marek Polacek <polacek@redhat.com>
2029
2030 PR c/71362
2031 * c-parser.c (c_parser_direct_declarator): Set location.
2032
2033 2016-06-06 Marek Polacek <polacek@redhat.com>
2034
2035 * c-typeck.c (comptypes_internal): Handle comparisons of
2036 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2037 TYPE_REF_CAN_ALIAS_ALL.
2038
2039 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2040
2041 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2042 arguments as addressable when async clause exists.
2043
2044 2016-05-30 Jakub Jelinek <jakub@redhat.com>
2045
2046 PR c++/71349
2047 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2048 when combined with target construct.
2049
2050 2016-05-26 Jakub Jelinek <jakub@redhat.com>
2051
2052 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2053 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2054
2055 2016-05-25 Marek Polacek <polacek@redhat.com>
2056
2057 PR c/71265
2058 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2059
2060 PR c/71266
2061 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2062
2063 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2064
2065 * c-parser.c (c_parser_oacc_declare): Add support for
2066 GOMP_MAP_FIRSTPRIVATE_POINTER.
2067 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2068 argument with enum c_omp_region_type ort.
2069 (handle_omp_array_sections): Likewise. Update call to
2070 handle_omp_array_sections_1.
2071 (c_finish_omp_clauses): Add specific errors and warning messages for
2072 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2073 call to handle_omp_array_sections.
2074
2075 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2076
2077 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2078
2079 2016-05-24 Richard Biener <rguenther@suse.de>
2080
2081 PR middle-end/70434
2082 PR c/69504
2083 * c-typeck.c (build_array_ref): Do not complain about indexing
2084 non-lvalue vectors. Adjust for function name change.
2085
2086 2016-05-20 Martin Sebor <msebor@redhat.com>
2087
2088 PR c/71115
2089 * c-typeck.c (error_init): Use
2090 expansion_point_location_if_in_system_header.
2091 (warning_init): Same.
2092
2093 2016-05-19 David Malcolm <dmalcolm@redhat.com>
2094
2095 PR c/71171
2096 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2097 in error-handling.
2098 (c_parser_postfix_expression): Likewise.
2099 * c-tree.h (c_expr::set_error): New method.
2100 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2101 that result's range is initialized.
2102
2103 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2104
2105 * c-typeck.c (parser_build_unary_op): Fix formatting.
2106
2107 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2108
2109 * c-decl.c (grokdeclarator): Remove errmsg and use of
2110 targetm.invalid_return_type.
2111 (grokparms): Remove errmsg and use of
2112 targetm.invalid_parameter_type.
2113
2114 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2115
2116 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2117 function return type.
2118
2119 2016-05-12 Marek Polacek <polacek@redhat.com>
2120
2121 PR c/70756
2122 * c-decl.c (build_compound_literal): Pass LOC down to
2123 c_incomplete_type_error.
2124 * c-tree.h (require_complete_type): Adjust declaration.
2125 (c_incomplete_type_error): Likewise.
2126 * c-typeck.c (require_complete_type): Add location parameter, pass it
2127 down to c_incomplete_type_error.
2128 (c_incomplete_type_error): Add location parameter, pass it down to
2129 error_at.
2130 (build_component_ref): Pass location down to c_incomplete_type_error.
2131 (default_conversion): Pass location down to require_complete_type.
2132 (build_array_ref): Likewise.
2133 (build_function_call_vec): Likewise.
2134 (convert_arguments): Likewise.
2135 (build_unary_op): Likewise.
2136 (build_c_cast): Likewise.
2137 (build_modify_expr): Likewise.
2138 (convert_for_assignment): Likewise.
2139 (c_finish_omp_clauses): Likewise.
2140
2141 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2142
2143 PR c/43651
2144 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2145 is enabled.
2146 * c-errors.c (pedwarn_c90): Return true if warned.
2147 * c-tree.h (pedwarn_c90): Change return type to bool.
2148 (enum c_declspec_word): Add new enumerator cdw_atomic.
2149
2150 2016-05-11 Marek Polacek <polacek@redhat.com>
2151
2152 PR c++/71024
2153 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2154 diagnose_mismatched_attributes and call it.
2155
2156 2016-05-10 Marek Polacek <polacek@redhat.com>
2157
2158 PR c/70255
2159 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2160 on a declaration following the definition.
2161
2162 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2163
2164 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2165 parse it through to c_parser_c99_block_statement.
2166 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2167 caller.
2168
2169 2016-05-04 Marek Polacek <polacek@redhat.com>
2170
2171 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2172 OPT_Wdangling_else.
2173
2174 2016-05-04 Marek Polacek <polacek@redhat.com>
2175
2176 PR c/48778
2177 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2178 for macro expansions.
2179
2180 2016-05-03 Marek Polacek <polacek@redhat.com>
2181
2182 PR c/70859
2183 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2184 check_builtin_function_arguments.
2185
2186 2016-05-03 Richard Biener <rguenther@suse.de>
2187
2188 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2189 the checksum from the previous stage.
2190
2191 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2192
2193 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2194 c_finish_omp_clauses.
2195 (c_parser_omp_all_clauses): Likewise.
2196 (c_parser_oacc_cache): Likewise.
2197 (c_parser_oacc_loop): Likewise.
2198 (omp_split_clauses): Likewise.
2199 (c_parser_omp_declare_target): Likewise.
2200 (c_parser_cilk_all_clauses): Likewise.
2201 (c_parser_cilk_for): Likewise.
2202 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2203 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2204
2205 2016-05-02 Marek Polacek <polacek@redhat.com>
2206
2207 PR c/70851
2208 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2209 incomplete type.
2210
2211 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2212
2213 PR middle-end/70626
2214 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2215 OACC_LOOP_CLAUSE_MASK.
2216 (c_parser_oacc_kernels_parallel): Update call to
2217 c_oacc_split_loop_clauses.
2218
2219 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2220
2221 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2222 argument to build_modify_expr in two cases.
2223
2224 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2225
2226 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2227 warn_for_memset instead of warning directly here.
2228
2229 2016-04-26 Marek Polacek <polacek@redhat.com>
2230
2231 PR c/67784
2232 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2233 out of ...
2234 (c_parser_for_statement): ... here.
2235 (c_parser_if_statement): Use it.
2236 (c_parser_switch_statement): Use it.
2237 (c_parser_while_statement): Use it.
2238
2239 PR c/70791
2240 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2241
2242 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2243
2244 PR c++/69363
2245 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2246 instead of c_finish_cilk_clauses.
2247 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2248 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2249 floating-point variables in the linear clause for Cilk Plus.
2250
2251 2016-04-18 Michael Matz <matz@suse.de>
2252
2253 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2254 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2255
2256 2016-04-15 Marek Polacek <polacek@redhat.com>
2257
2258 PR c/70671
2259 * c-typeck.c (build_unary_op): Pass location down to error and
2260 warning call.
2261
2262 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2263
2264 PR c/70436
2265 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2266 where needed.
2267 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2268 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2269 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2270 Adjust c_parser_pragma callers.
2271 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2272 caller.
2273 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2274 c_parser_statement.
2275 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2276 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2277 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2278 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2279 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2280 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2281 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2282 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2283 down where needed.
2284 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2285 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2286 calls.
2287
2288 2016-04-13 Marek Polacek <polacek@redhat.com>
2289
2290 PR c/70436
2291 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2292 adjust callers.
2293 (c_parser_statement): Likewise.
2294 (c_parser_c99_block_statement): Likewise.
2295 (c_parser_while_statement): Likewise.
2296 (c_parser_for_statement): Likewise.
2297 (c_parser_if_body): Don't set IF_P here.
2298 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2299 about dangling else here.
2300 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2301 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2302 warn about dangling else here.
2303
2304 2016-04-04 Marek Polacek <polacek@redhat.com>
2305
2306 PR c/70307
2307 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2308
2309 2016-03-31 Marek Polacek <polacek@redhat.com>
2310
2311 PR c/70297
2312 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2313
2314 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2315
2316 PR c/70281
2317 * c-parser.c (c_parser_postfix_expression): Set the source range
2318 for uses of "__builtin_types_compatible_p".
2319
2320 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2321
2322 PR c/70280
2323 * c-typeck.c (composite_type): Don't count void_list_node
2324 into len, if the list is terminated by void_list_node, start
2325 with void_list_node instead of NULL for newargs. Stop
2326 at void_list_node.
2327
2328 2016-03-16 Marek Polacek <polacek@redhat.com>
2329
2330 PR c/70093
2331 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2332 nested functions returning VM types.
2333
2334 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2335
2336 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2337 when calling c_finish_omp_clauses.
2338
2339 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2340
2341 PR c/69824
2342 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2343 for later.
2344
2345 2016-03-04 Marek Polacek <polacek@redhat.com>
2346
2347 PR c/69798
2348 * c-parser.c (c_parser_postfix_expression): Call
2349 c_parser_cast_expression rather than c_parser_postfix_expression.
2350
2351 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2352
2353 PR c/69796
2354 PR c/69974
2355 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2356 of incomplete decls to error_mark_node.
2357
2358 2016-02-24 Marek Polacek <polacek@redhat.com>
2359
2360 PR c/69819
2361 * c-decl.c (finish_decl): Don't update the copy of the type of a
2362 different decl type.
2363
2364 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2365
2366 PR objc/69844
2367 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2368 in id_kind reclassification.
2369
2370 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2371
2372 PR c/69835
2373 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2374
2375 2016-02-16 James Norris <jnorris@codesourcery.com>
2376
2377 PR c/64748
2378 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2379
2380 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2381
2382 * c-decl.c (build_null_declspecs): Zero the entire struct.
2383
2384 PR c/69522
2385 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2386 callers changed. If nested_p is true, use it to call
2387 finish_implicit_inits.
2388 * c-tree.h (finish_implicit_inits): Declare.
2389 * c-typeck.c (finish_implicit_inits): New function. Move code
2390 from ...
2391 (push_init_level): ... here.
2392 (set_designator, process_init_element): Call finish_implicit_inits.
2393
2394 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2395
2396 PR c/69768
2397 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2398 arguments for -Waddress warning.
2399
2400 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2401
2402 PR c/69669
2403 * c-decl.c (finish_enum): When honoring mode attribute,
2404 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2405
2406 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2407
2408 PR debug/69518
2409 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2410 all type variants, not just TYPE_MAIN_VARIANT.
2411
2412 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2413
2414 PR debug/66869
2415 * c-decl.c (c_write_global_declarations_1): Warn with
2416 warn_unused_function if static prototype without definition
2417 is not C_DECL_USED.
2418
2419 2016-01-27 Marek Polacek <polacek@redhat.com>
2420
2421 PR c/68062
2422 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2423 to unsigned, if needed. Add -Wsign-compare warning.
2424
2425 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2426
2427 PR tree-optimization/69483
2428 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2429
2430 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2431
2432 PR c/24293
2433 * c-tree.h (incomplete_record_decls): Declare.
2434 * c-parser.c (incomplete_record_decls): Define.
2435 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2436 report error if any decl has zero size.
2437 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2438 or enum type to incomplete_record_decls.
2439
2440 2016-01-14 Tom de Vries <tom@codesourcery.com>
2441
2442 PR tree-optimization/68773
2443 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2444 set force_output.
2445
2446 2016-01-14 Marek Polacek <polacek@redhat.com>
2447
2448 PR c/69262
2449 * c-decl.c (grokdeclarator): Provide more information for invalid
2450 array declarations.
2451
2452 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2453
2454 * c-parser.c (c_parser_unary_expression): For dereferences, build
2455 a combined location before calling build_indirect_ref, so that
2456 error reports cover the full range, manually updating the c_expr
2457 src_range.
2458
2459 2016-01-06 Marek Polacek <polacek@redhat.com>
2460
2461 PR sanitizer/69099
2462 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2463 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2464 NULL.
2465
2466 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2467
2468 Update copyright years.
2469
2470 2016-01-04 Marek Polacek <polacek@redhat.com>
2471
2472 PR c/68908
2473 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2474 optimization to use __atomic_fetch_* built-in if possible.
2475
2476 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2477
2478 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2479 into...
2480 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2481 all users.
2482
2483 2015-12-22 Marek Polacek <polacek@redhat.com>
2484
2485 PR c/69002
2486 * c-typeck.c (build_component_ref): Warn when acessing elements of
2487 atomic structures or unions.
2488
2489 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2490
2491 * c-typeck.c: Include "gcc-rich-location.h".
2492 (build_binary_op): In the two places that call binary_op_error,
2493 create a gcc_rich_location and populate it with the location of
2494 the binary op and its two operands.
2495
2496 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2497
2498 * c-parser.c (c_parser_statement_after_labels): When calling
2499 c_finish_return, Use the return expression's location if it has
2500 one, falling back to the location of the first token within it.
2501 * c-typeck.c (c_finish_return): When issuing warnings about
2502 the incorrect presence/absence of a return value, issue a note
2503 showing the declaration of the function.
2504
2505 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2506
2507 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2508 to 4.
2509 (c_parser_peek_nth_token): New function.
2510 (c_parser_peek_conflict_marker): New function.
2511 (c_parser_error): Detect conflict markers and report them as such.
2512
2513 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2514
2515 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2516 to preserve range information for the primary expression
2517 in the call to c_parser_postfix_expression_after_primary.
2518
2519 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2520
2521 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2522 expression location, falling back on the first token location,
2523 rather than always using the latter.
2524
2525 2015-12-16 Marek Polacek <polacek@redhat.com>
2526
2527 PR c/64637
2528 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2529 available.
2530
2531 2015-12-15 Marek Polacek <polacek@redhat.com>
2532
2533 PR c/68907
2534 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2535 artificial decl.
2536
2537 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2538
2539 * c-parser.c (c_parser_alignof_expression): Capture location of
2540 closing parenthesis (if any), or of end of unary expression, and
2541 use it to build a src_range for the expression.
2542
2543 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2544
2545 PR c/68757
2546 * c-parser.c (c_parser_get_builtin_args): Add
2547 "out_close_paren_loc" param, and write back to it.
2548 (c_parser_postfix_expression): Capture the closing
2549 parenthesis location for RID_CHOOSE_EXPR,
2550 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2551 RID_BUILTIN_SHUFFLE and use it to set the source range
2552 for such expressions; within RID_BUILTIN_COMPLEX set
2553 the underlying location.
2554
2555 2015-12-07 Marek Polacek <polacek@redhat.com>
2556
2557 PR c/68668
2558 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2559 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2560
2561 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2562
2563 * c-tree.h (c_build_va_arg): Adjust prototype.
2564 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2565 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2566 parameter, adjust throughout and issue an error if EXPR is a component
2567 with reverse storage order.
2568
2569 2015-12-02 Jason Merrill <jason@redhat.com>
2570
2571 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2572 (c_fully_fold_internal, decl_constant_value_for_optimization):
2573 Move from c-common.c.
2574 * c-tree.h: Declare decl_constant_value_for_optimization.
2575 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2576
2577 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2578
2579 PR c/68162
2580 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2581 following link from declarator to next declarator. Track original
2582 qualified type and pass it to c_build_qualified_type.
2583 * c-typeck.c (c_build_qualified_type): Add arguments
2584 orig_qual_type and orig_qual_indirect.
2585
2586 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2587
2588 * c-parser.c (c_parser_omp_clause_name)
2589 (c_parser_oacc_all_clauses): Alphabetical sorting.
2590
2591 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2592
2593 PR c/68533
2594 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2595 for diagnostics.
2596
2597 2015-12-01 Julian Brown <julian@codesourcery.com>
2598 Cesar Philippidis <cesar@codesourcery.com>
2599 James Norris <James_Norris@mentor.com>
2600
2601 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2602 (c_parser_oacc_clause_use_device): New function.
2603 (c_parser_oacc_all_clauses): Add use_device support.
2604 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2605 (c_parser_oacc_host_data): New function.
2606 (c_parser_omp_construct): Add host_data support.
2607 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2608 * c-typeck.c (c_finish_oacc_host_data): New function.
2609 (c_finish_omp_clauses): Add use_device support.
2610
2611 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2612
2613 PR c/67106
2614 * c-decl.c: Set TYPE_PACKED in variants.
2615
2616 2015-11-27 Martin Liska <mliska@suse.cz>
2617
2618 PR c++/68312
2619 * c-array-notation.c (fix_builtin_array_notation_fn):
2620 Use release_vec_vec instead of vec::release.
2621 (build_array_notation_expr): Likewise.
2622 (fix_conditional_array_notations_1): Likewise.
2623 (fix_array_notation_expr): Likewise.
2624 (fix_array_notation_call_expr): Likewise.
2625
2626 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2627
2628 PR c/63326
2629 * c-parser.c (c_parser_compound_statement_nostart): If
2630 last_label is true, use pragma_stmt instead of pragma_compound
2631 as second c_parser_pragma argument.
2632 (c_parser_omp_ordered, c_parser_omp_target_update,
2633 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2634 false as second argument to c_parser_skip_to_pragma_eol after
2635 diagnosing standalone directives used in pragma_stmt context.
2636
2637 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2638
2639 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2640 with "if (ENABLE_OFFLOADING)".
2641
2642 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2643
2644 PR objc/68438
2645 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2646 for various Objective-C constructs: Class.name syntax,
2647 @selector(), @protocol(), @encode(), and [] message syntax.
2648
2649 2015-11-20 David Malcolm <dmalcolm@redhat.com>
2650
2651 PR 62314
2652 * c-typeck.c (should_suggest_deref_p): New function.
2653 (build_component_ref): Special-case POINTER_TYPE when
2654 generating a "not a structure of union" error message, and
2655 suggest a "->" rather than a ".", providing a fix-it hint.
2656
2657 2015-11-19 David Malcolm <dmalcolm@redhat.com>
2658
2659 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2660 candidate into a new function, find_closest_identifier.
2661
2662 2015-11-19 Marek Polacek <polacek@redhat.com>
2663
2664 PR c/68412
2665 * c-typeck.c (parser_build_binary_op): Properly handle
2666 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2667
2668 2015-11-17 David Malcolm <dmalcolm@redhat.com>
2669
2670 * c-parser.c (set_c_expr_source_range): Bulletproof both
2671 overloaded implementations against NULL expr->value.
2672 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2673 values.
2674 (c_parser_unary_expression): Likewise when handling addresses of
2675 labels.
2676 (c_parser_postfix_expression): Likewise for statement expressions,
2677 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2678 __builtin_va_arg, and for __builtin_offset_of.
2679 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2680 src_range using the range of the braced initializer.
2681 (c_parser_transaction_expression): Set src_range for "ret" to a
2682 sane pair of values.
2683
2684 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2685
2686 * c-parser.c (c_finish_omp_declare_simd): Look for
2687 "simd" attribute as well. Update error message.
2688
2689 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2690
2691 * c-parser.c (c_parser_omp_declare_target): Adjust.
2692
2693 2015-11-14 Jakub Jelinek <jakub@redhat.com>
2694
2695 * c-typeck.c (c_finish_omp_clauses): Don't mark
2696 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2697
2698 2015-11-14 Marek Polacek <polacek@redhat.com>
2699
2700 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2701 * c-typeck.c: Likewise.
2702
2703 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2704
2705 * c-decl.c (warn_defaults_to): Pass line_table to
2706 rich_location ctor.
2707 * c-errors.c (pedwarn_c99): Likewise.
2708 (pedwarn_c90): Likewise.
2709 * c-parser.c (set_c_expr_source_range): New functions.
2710 (c_token::get_range): New method.
2711 (c_token::get_finish): New method.
2712 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2713 based on the range from the start of the LHS to the end of the
2714 RHS.
2715 (c_parser_conditional_expression): Likewise, based on the range
2716 from the start of the cond.value to the end of exp2.value.
2717 (c_parser_binary_expression): Call set_c_expr_source_range on
2718 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2719 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2720 based on the cast_loc through to the end of the expr.
2721 (c_parser_unary_expression): Likewise, based on the
2722 op_loc through to the end of op.
2723 (c_parser_sizeof_expression) Likewise, based on the start of the
2724 sizeof token through to either the closing paren or the end of
2725 expr.
2726 (c_parser_postfix_expression): Likewise, using the token range,
2727 or from the open paren through to the close paren for
2728 parenthesized expressions.
2729 (c_parser_postfix_expression_after_primary): Likewise, for
2730 various kinds of expression.
2731 * c-tree.h (struct c_expr): Add field "src_range".
2732 (c_expr::get_start): New method.
2733 (c_expr::get_finish): New method.
2734 (set_c_expr_source_range): New decls.
2735 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2736 on ret for prefix unary ops.
2737 (parser_build_binary_op): Likewise, running from the start of
2738 arg1.value through to the end of arg2.value.
2739
2740 2015-11-13 Marek Polacek <polacek@redhat.com>
2741
2742 PR c/68320
2743 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2744
2745 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2746
2747 * c-typeck.c: Include spellcheck.h.
2748 (lookup_field_fuzzy_find_candidates): New function.
2749 (lookup_field_fuzzy): New function.
2750 (build_component_ref): If the field was not found, try using
2751 lookup_field_fuzzy and potentially offer a suggestion.
2752
2753 2015-11-12 James Norris <jnorris@codesourcery.com>
2754 Joseph Myers <joseph@codesourcery.com>
2755
2756 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2757 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2758 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2759 and PRAGMA_OMP_CLAUSE_LINK.
2760 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2761 and PRAGMA_OACC_CLAUSE_LINK.
2762 (OACC_DECLARE_CLAUSE_MASK): New definition.
2763 (c_parser_oacc_declare): New function.
2764
2765 2015-11-12 Marek Polacek <polacek@redhat.com>
2766
2767 PR c/67784
2768 * c-parser.c (c_parser_for_statement): Reclassify the token in
2769 a correct scope.
2770
2771 2015-11-11 Marek Polacek <polacek@redhat.com>
2772
2773 PR c/68107
2774 PR c++/68266
2775 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2776 checking the size of an array.
2777
2778 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2779
2780 * c-array-notation.c: Remove unused header files.
2781 * c-aux-info.c: Likewise.
2782 * c-convert.c: Likewise.
2783 * c-decl.c: Likewise.
2784 * c-errors.c: Likewise.
2785 * c-lang.c: Likewise.
2786 * c-objc-common.c: Likewise.
2787 * c-parser.c: Likewise.
2788 * c-typeck.c: Likewise.
2789 * gccspec.c: Likewise.
2790
2791 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2792 Cesar Philippidis <cesar@codesourcery.com>
2793 James Norris <jnorris@codesourcery.com>
2794 Julian Brown <julian@codesourcery.com>
2795 Nathan Sidwell <nathan@codesourcery.com>
2796
2797 c/
2798 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2799 routine arg.
2800 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2801 (c_parser_pragma): Parse 'acc routine'.
2802 (OACC_ROUTINE_CLAUSE_MARK): Define.
2803 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2804
2805 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2806
2807 PR debug/67192
2808 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2809 location of the backward-goto to the start of the loop body.
2810
2811 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2812
2813 PR debug/67192
2814 * c-parser.c (c_parser_while_statement): Finish the loop before
2815 parsing ahead for misleading indentation.
2816 (c_parser_for_statement): Likewise.
2817
2818 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2819
2820 * c-decl.c (finish_struct): If the structure has reverse storage
2821 order, rewrite the type of array fields with scalar component. Call
2822 maybe_apply_pragma_scalar_storage_order on entry.
2823 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2824 errors on bit-fields and reverse SSO here and not...
2825 (c_mark_addressable): ...here.
2826 (output_init_element): Adjust call to initializer_constant_valid_p.
2827 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2828
2829 2015-11-06 David Malcolm <dmalcolm@redhat.com>
2830
2831 * c-decl.c (warn_defaults_to): Update for change in signature
2832 of diagnostic_set_info.
2833 * c-errors.c (pedwarn_c99): Likewise.
2834 (pedwarn_c90): Likewise.
2835 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2836 for textinfo::set_location.
2837
2838 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2839 Thomas Schwinge <thomas@codesourcery.com>
2840 James Norris <jnorris@codesourcery.com>
2841
2842 * c-parser.c (c_parser_omp_clause_name): Add support for
2843 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2844 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2845 default(none) in OpenACC.
2846 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2847 arguments.
2848 (c_parser_oacc_clause_tile): New function.
2849 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2850 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2851 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2852 TILE}.
2853 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2854 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2855 FIRSTPRIVATE}.
2856 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2857 (c_parser_oacc_update): Update the error message for missing clauses.
2858 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2859 and OMP_CLAUSE_INDEPENDENT.
2860
2861 2015-11-05 Marek Polacek <polacek@redhat.com>
2862
2863 PR c/68090
2864 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2865 deal with pre-evaluation on invalid types.
2866
2867 2015-11-05 Jakub Jelinek <jakub@redhat.com>
2868 Ilya Verbin <ilya.verbin@intel.com>
2869
2870 * c-parser.c: Include context.h and gimple-expr.h.
2871 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2872 monotonic together with nonmonotonic.
2873 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2874 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2875 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2876 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2877 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2878 expressions on combined target teams before the target.
2879 (c_parser_omp_declare_target): If decl has "omp declare target" or
2880 "omp declare target link" attribute, and cgraph or varpool node already
2881 exists, then set corresponding flags. Call c_finish_omp_clauses
2882 in the parenthesized extended-list syntax case.
2883 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2884 declare target.
2885 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2886 on OMP_CLAUSE_REDUCTION array sections.
2887 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2888 into the constant offset, or for variable low-bound using
2889 POINTER_PLUS_EXPR. For structure element based array sections use
2890 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2891 (c_finish_omp_clauses): Drop generic_field_head, structure
2892 elements are now always mapped even as array section bases,
2893 diagnose same var in data sharing and mapping clauses. Diagnose if
2894 linear step on declare simd is neither a constant nor a uniform
2895 parameter. Look through POINTER_PLUS_EXPR for array section
2896 reductions. Diagnose the same var or function appearing multiple
2897 times on the same directive. Fix up wording for the to clause if t
2898 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2899 modifier on kinds other than dynamic or guided or nonmonotonic
2900 modifier together with ordered clause.
2901
2902 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2903 Chung-Lin Tang <cltang@codesourcery.com>
2904
2905 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2906
2907 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
2908
2909 * c-array-notation.c: Reorder #include's and remove duplicates.
2910 * c-aux-info.c: Likewise.
2911 * c-convert.c: Likewise.
2912 * c-decl.c: Likewise.
2913 * c-errors.c: Likewise.
2914 * c-lang.c: Likewise.
2915 * c-objc-common.c: Likewise.
2916 * c-parser.c: Likewise.
2917 * c-typeck.c: Likewise.
2918
2919 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
2920
2921 PR debug/66068
2922 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2923 after calling build_qualified_type.
2924
2925 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2926 Thomas Schwinge <thomas@codesourcery.com>
2927 James Norris <jnorris@codesourcery.com>
2928 Joseph Myers <joseph@codesourcery.com>
2929 Julian Brown <julian@codesourcery.com>
2930 Bernd Schmidt <bschmidt@redhat.com>
2931
2932 * c-parser.c (c_parser_oacc_shape_clause): New.
2933 (c_parser_oacc_simple_clause): New.
2934 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2935 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2936
2937 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2938 James Norris <jnorris@codesourcery.com>
2939 Cesar Philippidis <cesar@codesourcery.com>
2940
2941 PR c/64765
2942 PR c/64880
2943 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2944 parameters, and handle these. Adjust all users.
2945 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2946 into...
2947 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2948 all users.
2949 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2950 declare functions.
2951 (c_finish_omp_construct): Declare function.
2952 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2953 Merge functions into...
2954 (c_finish_omp_construct): ... this new function.
2955
2956 2015-10-22 Richard Biener <rguenther@suse.de>
2957
2958 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2959 before folding a MINUS_EXPR.
2960
2961 2015-10-21 Marek Polacek <polacek@redhat.com>
2962
2963 PR c/68024
2964 * c-decl.c (start_function): Warn about vararg functions without
2965 a prototype.
2966
2967 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2968
2969 * c-typeck.c (build_conditional_expr): Use boolean vector
2970 type for vector comparison.
2971 (build_vec_cmp): New.
2972 (build_binary_op): Use build_vec_cmp for comparison.
2973
2974 2015-10-20 Marek Polacek <polacek@redhat.com>
2975
2976 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2977
2978 2015-10-20 Marek Polacek <polacek@redhat.com>
2979
2980 PR c/67964
2981 * c-parser.c (c_parser_attributes): Break out of the loop if the
2982 token after an attribute isn't a comma.
2983
2984 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2985 Aldy Hernandez <aldyh@redhat.com>
2986
2987 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2988 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2989 (c_parser_omp_variable_list): Handle structure elements for
2990 map, to and from clauses. Handle array sections in reduction
2991 clause. Formatting fixes.
2992 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2993 if clause modifiers.
2994 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2995 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2996 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2997 c_parser_omp_clause_is_device_ptr): New functions.
2998 (c_parser_omp_clause_ordered): Parse optional parameter.
2999 (c_parser_omp_clause_reduction): Handle array reductions.
3000 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3001 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3002 functions.
3003 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3004 (c_parser_omp_clause_depend_sink): New function.
3005 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3006 (c_parser_omp_clause_map): Parse release/delete map kinds and
3007 optional always modifier.
3008 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3009 and c_finish_omp_clauses callers.
3010 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3011 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3012 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3013 (OMP_CRITICAL_CLAUSE_MASK): Define.
3014 (c_parser_omp_critical): Parse critical clauses.
3015 (c_parser_omp_for_loop): Handle doacross loops, adjust
3016 c_finish_omp_for and c_finish_omp_clauses callers.
3017 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3018 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3019 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3020 (c_parser_omp_for): Disallow ordered clause when combined with
3021 distribute. Disallow linear clause when combined with distribute
3022 and not combined with simd.
3023 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3024 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3025 parse clauses and if depend clause is found, don't parse a body.
3026 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3027 Allow target parallel without for after it.
3028 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3029 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3030 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3031 invalid kinds.
3032 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3033 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3034 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3035 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3036 functions.
3037 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3038 defaultmap and is_device_ptr clauses.
3039 (c_parser_omp_target): Parse target parallel and target simd. Set
3040 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3041 and target exit data. Diagnose invalid map kinds.
3042 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3043 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3044 construct.
3045 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3046 &omp_priv.
3047 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3048 (c_parser_omp_taskloop): New function.
3049 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3050 handle PRAGMA_OMP_TASKLOOP.
3051 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3052 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3053 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3054 Add IS_OMP argument, handle structure element bases, diagnose
3055 bitfields, pass IS_OMP recursively, diagnose known zero length
3056 array sections in depend clauses, handle array sections in reduction
3057 clause, diagnose negative length even for pointers.
3058 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3059 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3060 array sections in reduction clause, set
3061 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3062 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3063 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3064 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3065
3066 2015-10-06 Marek Polacek <polacek@redhat.com>
3067
3068 * c-parser.c (c_parser_statement_after_labels): Use
3069 protected_set_expr_location.
3070 (c_parser_omp_clause_num_gangs): Likewise.
3071 (c_parser_omp_clause_num_threads): Likewise.
3072 (c_parser_omp_clause_num_workers): Likewise.
3073 (c_parser_omp_clause_vector_length): Likewise.
3074 (c_parser_omp_clause_num_teams): Likewise.
3075 (c_parser_omp_clause_thread_limit): Likewise.
3076 * c-typeck.c (build_c_cast): Likewise.
3077 (c_cast_expr): Likewise.
3078
3079 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3080
3081 * c-typeck.c (c_tree_equal): Use real_equal instead of
3082 REAL_VALUES_EQUAL.
3083
3084 2015-10-04 Jason Merrill <jason@redhat.com>
3085
3086 * c-parser.c (c_lex_one_token): Handle @synchronized.
3087 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3088 can change whether the function is transaction_safe.
3089
3090 2015-10-02 Marek Polacek <polacek@redhat.com>
3091
3092 PR c/67730
3093 * c-typeck.c (convert_for_assignment): Use the expansion point
3094 location throughout.
3095
3096 2015-10-02 Marek Polacek <polacek@redhat.com>
3097
3098 PR c/64249
3099 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3100 and pass it down to c_parser_if_statement.
3101 (c_parser_else_body): Add CHAIN parameter and pass it down to
3102 c_parser_statement_after_labels.
3103 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3104 duplicated if-else-if conditions.
3105
3106 2015-10-01 Marek Polacek <polacek@redhat.com>
3107
3108 * c-typeck.c (convert_for_assignment): Improve commentary.
3109
3110 2015-09-30 Marek Polacek <polacek@redhat.com>
3111
3112 PR c/67730
3113 * c-typeck.c (c_finish_return): Use the expansion point location for
3114 certain "return with value" warnings.
3115
3116 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3117
3118 * c-parser.c (pragma_lex): Add loc argument.
3119
3120 2015-09-15 Marek Polacek <polacek@redhat.com>
3121
3122 PR c/67580
3123 * c-decl.c (tag_exists_p): New function.
3124 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3125 struct/union/enum keywords are missing.
3126 * c-tree.h (tag_exists_p): Declare.
3127
3128 2015-09-15 Marek Polacek <polacek@redhat.com>
3129
3130 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3131 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3132 Return NULL_TREE instead of 0.
3133 (lookup_name): Return NULL_TREE instead of 0.
3134 (lookup_name_in_scope): Likewise.
3135 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3136 (parser_xref_tag): Use false instead of 0.
3137 (start_struct): Use true instead of 1.
3138 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3139
3140 2015-09-14 Marek Polacek <polacek@redhat.com>
3141
3142 * c-typeck.c (set_nonincremental_init_from_string): Use
3143 HOST_WIDE_INT_M1U when shifting a negative value.
3144
3145 2015-09-09 Mark Wielaard <mjw@redhat.com>
3146
3147 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3148 parm against NULL.
3149
3150 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3151
3152 PR c/67502
3153 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3154 into OMP_FOR_PRE_BODY rather than before the loop.
3155
3156 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3157
3158 PR c/67501
3159 * c-parser.c (c_parser_oacc_all_clauses,
3160 c_parser_omp_all_clauses): Remove invalid clause from
3161 list of clauses even if parser->error is set.
3162
3163 PR c/67500
3164 * c-parser.c (c_parser_omp_clause_aligned,
3165 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3166 test for errors.
3167 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3168 error_mark_node.
3169
3170 PR c/67495
3171 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3172 instead of c_parser_unary_expression. If the result is !lvalue_p,
3173 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3174
3175 2015-09-04 Marek Polacek <polacek@redhat.com>
3176
3177 PR sanitizer/67279
3178 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3179
3180 2015-09-03 Martin Sebor <msebor@redhat.com>
3181
3182 PR c/66516
3183 * c-typeck.c (convert_arguments, parser_build_unary_op,
3184 build_conditional_expr, c_cast_expr, convert_for_assignment,
3185 build_binary_op, _objc_common_truthvalue_conversion): Call
3186 reject_gcc_builtin.
3187 (c_decl_implicit): Define.
3188
3189 2015-09-02 Marek Polacek <polacek@redhat.com>
3190
3191 PR c/67432
3192 * c-parser.c (c_parser_enum_specifier): Give a better error for
3193 an empty enum.
3194
3195 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3196
3197 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3198
3199 2015-08-12 Marek Polacek <polacek@redhat.com>
3200
3201 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3202 LOC to it.
3203
3204 2015-08-03 Marek Polacek <polacek@redhat.com>
3205
3206 PR c/67088
3207 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3208 Use it.
3209 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3210
3211 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3212
3213 * c-parser.c (c_parser_if_body): Take token_indent_info
3214 argument. Call warn_for_misleading_indentation even when the
3215 body is a semicolon. Extract token_indent_infos corresponding
3216 to the guard, body and next tokens. Adjust call to
3217 warn_for_misleading_indentation accordingly.
3218 (c_parser_else_body): Likewise.
3219 (c_parser_if_statement): Likewise.
3220 (c_parser_while_statement): Likewise.
3221 (c_parser_for_statement): Likewise.
3222
3223 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3224 Manuel López-Ibáñez <manu@gcc.gnu.org>
3225
3226 * c-decl.c (get_parm_info): Remove static var. Update warning
3227 message.
3228
3229 2015-07-27 Marek Polacek <polacek@redhat.com>
3230
3231 PR c++/66555
3232 PR c/54979
3233 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3234
3235 2015-07-20 Marek Polacek <polacek@redhat.com>
3236
3237 PR c++/55095
3238 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3239 (build_binary_op): Warn about left shift overflows.
3240
3241 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3242
3243 * c-array-notation.c: Adjust includes for flags.h changes.
3244 * c-objc-common.c: Likewise.
3245
3246 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3247
3248 * c-array-notation.c: Adjust includes.
3249 * c-aux-info.c: Likewise.
3250 * c-convert.c: Likewise.
3251 * c-decl.c: Likewise.
3252 * c-errors.c: Likewise.
3253 * c-lang.c: Likewise.
3254 * c-objc-common.c: Likewise.
3255 * c-parser.c: Likewise.
3256 * c-typeck.c: Likewise.
3257
3258 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3259
3260 PR fortran/66605
3261 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3262
3263 2015-06-29 Marek Polacek <polacek@redhat.com>
3264
3265 PR c/66322
3266 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3267 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3268 about -Wswitch-bool here.
3269 (do_case): Update c_add_case_label call.
3270 (c_finish_case): Update c_do_switch_warnings call.
3271
3272 2015-06-27 Marek Polacek <polacek@redhat.com>
3273
3274 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3275
3276 2015-06-26 Marek Polacek <polacek@redhat.com>
3277
3278 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3279 INDIRECT_REF_P.
3280 * c-typeck.c (array_to_pointer_conversion): Likewise.
3281 (build_unary_op): Likewise.
3282 (c_finish_return): Likewise.
3283
3284 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3285
3286 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3287 * c-parser.c: Likewise.
3288
3289 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3290
3291 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3292 instead of pointer_hash.
3293 (detect_field_duplicates): Likewise.
3294
3295 2015-06-25 Marek Polacek <polacek@redhat.com>
3296
3297 * c-array-notation.c: Use VAR_P throughout.
3298 * c-decl.c: Likewise.
3299 * c-objc-common.c: Likewise.
3300 * c-parser.c: Likewise.
3301 * c-typeck.c: Likewise.
3302
3303 2015-06-25 Marek Polacek <polacek@redhat.com>
3304
3305 * c-decl.c: Use is_global_var throughout.
3306 * c-parser.c: Likewise.
3307 * c-typeck.c: Likewise.
3308
3309 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3310
3311 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3312 * c-aux-info.c: Likewise.
3313 * c-convert.c: Likewise.
3314 * c-decl.c: Likewise.
3315 * c-errors.c: Likewise.
3316 * c-lang.c: Likewise.
3317 * c-objc-common.c: Likewise.
3318 * c-parser.c: Likewise.
3319 * c-typeck.c: Likewise.
3320
3321 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3322
3323 PR middle-end/66325
3324 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3325 variants.
3326
3327 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3328
3329 * c-decl.c (pop_scope): Register the main translation unit
3330 through the new debug hook.
3331
3332 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3333
3334 * c-array-notation.c : Adjust include files.
3335 * c-aux-info.c : Likewise.
3336 * c-convert.c : Likewise.
3337 * c-decl.c : Likewise.
3338 * c-errors.c : Likewise.
3339 * c-lang.c : Likewise.
3340 * c-lang.h : Likewise.
3341 * c-objc-common.c : Likewise.
3342 * c-parser.c : Likewise.
3343 * c-typeck.c : Likewise.
3344
3345 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3346
3347 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3348 immediately clobber it.
3349 (c_write_global_declarations_1): Remove call to
3350 check_global_declaration_1.
3351 (c_write_global_declarations_2): Remove.
3352 (c_write_final_cleanups): Rename from c_write_global_declarations.
3353 Remove call to finalize_compilation_unit.
3354 Remove calls to debugging hooks.
3355 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3356 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3357 * c-tree.h: Remove c_write_global_declarations.
3358
3359 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3360
3361 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3362 * c-aux-info.c: Likewise.
3363 * c-convert.c: Likewise.
3364 * c-decl.c: Likewise.
3365 * c-errors.c: Likewise.
3366 * c-lang.c: Likewise.
3367 * c-objc-common.c: Likewise.
3368 * c-parser.c: Likewise.
3369 * c-typeck.c: Likewise.
3370
3371 2015-06-04 Marek Polacek <polacek@redhat.com>
3372
3373 PR c/66341
3374 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3375 it is a lvalue.
3376
3377 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3378
3379 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3380 Warn for empty struct.
3381 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3382
3383 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3384
3385 * c-decl.c (start_function): Call plugin before parsing.
3386 (finish_function): Call plugin after parsing.
3387
3388 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3389
3390 PR c/49551
3391 * c-decl.c (merge_decls): Merge DECL_COMMON.
3392
3393 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3394
3395 * Make-lang.in (check_gcc_pallelize): Define.
3396
3397 2015-05-22 Marek Polacek <polacek@redhat.com>
3398
3399 PR c/47043
3400 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3401 attributes.
3402
3403 2015-05-21 Marek Polacek <polacek@redhat.com>
3404
3405 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3406 DECL_BUILT_IN.
3407
3408 2015-05-20 Marek Polacek <polacek@redhat.com>
3409
3410 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3411 * c-typeck.c: Likewise.
3412
3413 2015-05-19 Marek Polacek <polacek@redhat.com>
3414
3415 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3416
3417 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3418
3419 PR middle-end/66199
3420 * c-parser.c (c_parser_omp_for_loop): Don't add
3421 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3422 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3423 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3424 constructs.
3425
3426 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3427
3428 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3429 swaps.
3430
3431 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3432
3433 PR fortran/44054
3434 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3435 accessor function.
3436
3437 2015-05-14 Marek Polacek <polacek@redhat.com>
3438
3439 PR c/66066
3440 PR c/66127
3441 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3442 rather than with 0.
3443
3444 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3445
3446 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3447 to add a call to warn_for_misleading_indentation.
3448 (c_parser_else_body): Likewise, adding param "else_loc".
3449 (c_parser_if_statement): Check for misleading indentation.
3450 (c_parser_while_statement): Likewise.
3451 (c_parser_for_statement): Likewise.
3452
3453 2015-05-08 Marek Polacek <polacek@redhat.com>
3454
3455 PR c/64918
3456 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3457 (output_init_element): Likewise.
3458
3459 2015-05-07 Marek Polacek <polacek@redhat.com>
3460
3461 PR c/65179
3462 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3463 value.
3464
3465 2015-04-30 Marek Polacek <polacek@redhat.com>
3466
3467 * c-typeck.c (set_init_label): Call error_at instead of error and
3468 pass LOC to it.
3469
3470 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3471 the type of a decl.
3472
3473 * c-typeck.c (c_build_va_arg): Clarify the error message.
3474
3475 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3476
3477 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3478 OMP_STANDALONE_CLAUSES.
3479
3480 2015-04-28 Marek Polacek <polacek@redhat.com>
3481
3482 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3483
3484 2015-04-28 Marek Polacek <polacek@redhat.com>
3485
3486 PR c/65901
3487 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3488
3489 2015-04-25 Marek Polacek <polacek@redhat.com>
3490
3491 PR c/52085
3492 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3493 attribute.
3494
3495 2015-04-23 Marek Polacek <polacek@redhat.com>
3496
3497 PR c/65345
3498 * c-decl.c (set_labels_context_r): New function.
3499 (store_parm_decls): Call it via walk_tree_without_duplicates.
3500 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3501 instead of create_tmp_var. Build TARGET_EXPR instead of
3502 COMPOUND_EXPR.
3503 (build_atomic_assign): Use create_tmp_var_raw instead of
3504 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3505
3506 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3507
3508 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3509 (c_parser_omp_target_update): Add missed %> to error_at ().
3510
3511 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3512
3513 PR target/55143
3514 * c-decl.c (c_default_pointer_mode): Remove definition.
3515 * c-tree.h (c_default_pointer_mode): Remove declaration.
3516
3517 2015-03-27 Tobias Burnus <burnus@net-b.de>
3518
3519 PR c/65586
3520 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3521 error out.
3522 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3523 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3524 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3525
3526 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3527
3528 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3529 attribute for DECL_EXTERNAL VAR_DECLs.
3530
3531 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3532
3533 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3534 argument.
3535
3536 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3537
3538 PR c/65120
3539 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3540 before preparing arguments to warn_logical_not_parentheses.
3541
3542 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3543
3544 PR c/65120
3545 * c-typeck.c (parser_build_binary_op): Don't warn for
3546 !!x == y or !b == y where b is _Bool.
3547
3548 2015-03-09 Marek Polacek <polacek@redhat.com>
3549
3550 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3551 * c-decl.c (grokdeclarator): Likewise.
3552 * c-typeck.c (build_binary_op): Likewise.
3553
3554 2015-02-27 Marek Polacek <polacek@redhat.com>
3555
3556 PR c/65228
3557 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3558
3559 2015-02-14 Marek Polacek <polacek@redhat.com>
3560
3561 PR c/64768
3562 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3563 declared through a typedef name.
3564
3565 2015-02-13 Marek Polacek <polacek@redhat.com>
3566
3567 PR c/65050
3568 * c-decl.c (grokdeclarator): Print also the type when giving
3569 the error message about array's incomplete element type.
3570
3571 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3572
3573 PR c/64824
3574 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3575 check in the POP macro.
3576
3577 2015-02-09 Marek Polacek <polacek@redhat.com>
3578
3579 PR c/64856
3580 * c-typeck.c (process_init_element): Don't always wrap
3581 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3582 initializing a range of elements.
3583
3584 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3585
3586 PR c/64824
3587 PR c/64868
3588 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3589
3590 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3591
3592 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3593 processing enum declaration.
3594
3595 2015-01-29 Marek Polacek <polacek@redhat.com>
3596
3597 PR c/64709
3598 * c-typeck.c (pop_init_level): If constructor_elements has
3599 exactly one element with integer_zerop value, set constructor_zeroinit
3600 to 1. Remove braces around warning_init call.
3601
3602 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3603
3604 PR c/64766
3605 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3606 of FUNCTION_DECLs with error_mark_node.
3607
3608 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3609
3610 PR c/64778
3611 * c-typeck.c (convert_arguments): Return -1 if there are
3612 error_args, even if we've diagnosed too many arguments.
3613
3614 2015-01-21 Richard Biener <rguenther@suse.de>
3615
3616 PR middle-end/64313
3617 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3618 for builtins the user declared correctly.
3619
3620 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3621 Bernd Schmidt <bernds@codesourcery.com>
3622 Cesar Philippidis <cesar@codesourcery.com>
3623 James Norris <jnorris@codesourcery.com>
3624 Jakub Jelinek <jakub@redhat.com>
3625 Ilmir Usmanov <i.usmanov@samsung.com>
3626
3627 * c-parser.c: Include "gomp-constants.h".
3628 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3629 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3630 Use OMP_CLAUSE_SET_MAP_KIND.
3631 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3632 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3633 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3634 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3635 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3636 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3637 "copyout", "create", "delete", "deviceptr", "gang", "host",
3638 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3639 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3640 "present_or_create", "pcreate", "seq", "self", "vector",
3641 "vector_length", "wait", "worker".
3642 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3643 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3644 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3645 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3646 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3647 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3648 (c_parser_oacc_data_clause_deviceptr)
3649 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3650 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3651 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3652 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3653 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3654 (c_parser_oacc_parallel, c_parser_oacc_update)
3655 (c_parser_oacc_wait): New functions.
3656 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3657 (c_finish_oacc_data): New prototypes.
3658 * c-typeck.c: Include "gomp-constants.h".
3659 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3660 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3661 OMP_CLAUSE_SET_MAP_KIND.
3662 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3663 (c_finish_oacc_data): New functions.
3664 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3665 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3666 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3667 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3668 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3669 GOMP_MAP_FORCE_DEVICEPTR.
3670
3671 2015-01-09 Michael Collison <michael.collison@linaro.org>
3672
3673 * c-array-notation.c: Include hash-set.h, machmode.h,
3674 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3675 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3676 * c-aux-info.c: Ditto.
3677 * c-convert.c: Ditto.
3678 * c-decl.c: Ditto.
3679 * c-errors.c: Ditto.
3680 * c-lang.c: Dittoxs.
3681 * c-objc-common.c: Ditto.
3682 * c-parser.c: Ditto.
3683 * c-typeck.c: Include hash-set.h, machmode.h,
3684 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3685 fold-const.h, wide-int.h, inchash.h, real.h and
3686 fixed-value.h due to flattening of tree.h.
3687
3688 2015-01-07 Marek Polacek <polacek@redhat.com>
3689
3690 PR c/64417
3691 * c-typeck.c (process_init_element): Disallow initialization of
3692 a flexible array member with a string constant if the structure
3693 is in an array.
3694
3695 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3696
3697 PR sanitizer/64344
3698 * c-typeck.c (convert_for_assignment, c_finish_return): For
3699 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3700 types also set in_late_binary_op around convert call.
3701 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3702 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3703 result on expr as last argument to ubsan_instrument_float_cast,
3704 if in_late_binary_op, don't use c_save_expr but save_expr.
3705
3706 Update copyright years.
3707
3708 2015-01-05 Marek Polacek <polacek@redhat.com>
3709
3710 PR c/64423
3711 * c-typeck.c (build_array_ref): Pass loc down to
3712 warn_array_subscript_with_type_char.
3713
3714 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
3715
3716 * c-typeck.c: New behavious for pointers to arrays with qualifiers
3717 (common-pointer-type): For pointers to arrays take qualifiers from
3718 element type.
3719 (build_conditional_expr): Add warnings for lost qualifiers.
3720 (comp-target-types): Allow pointers to arrays with different qualifiers.
3721 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3722 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3723 to PEDWARN_FOR_QUALIFIERS.
3724
3725 2014-12-17 Jakub Jelinek <jakub@redhat.com>
3726
3727 PR sanitizer/64289
3728 * c-convert.c: Include ubsan.h.
3729 (convert): For real -> integral casts and
3730 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3731 instead instrument the float cast directly.
3732
3733 2014-11-29 Jakub Jelinek <jakub@redhat.com>
3734
3735 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3736 c_finish_stmt_expr): Remove NULL last argument from
3737 create_tmp_var_raw and create_tmp_var calls.
3738 * c-array-notation.c (fix_builtin_array_notation_fn,
3739 build_array_notation_expr, fix_conditional_array_notations_1,
3740 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3741
3742 2014-11-28 Marek Polacek <polacek@redhat.com>
3743
3744 PR c/63862
3745 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3746 convert the right operand to integer type.
3747
3748 2014-11-25 Marek Polacek <polacek@redhat.com>
3749
3750 PR c/63877
3751 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3752 for inline functions.
3753
3754 2014-11-21 Jakub Jelinek <jakub@redhat.com>
3755
3756 PR target/63764
3757 * c-typeck.c (build_array_ref): Adjust
3758 convert_vector_to_pointer_for_subscript caller. If it returns true,
3759 call non_lvalue_loc on the result.
3760
3761 2014-11-11 Richard Biener <rguenther@suse.de>
3762
3763 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3764 to true.
3765
3766 2014-11-10 Andi Kleen <ak@linux.intel.com>
3767
3768 PR c/60804
3769 * c-parser.c (c_parser_statement_after_labels): Call
3770 check_no_cilk.
3771 (c_parser_if_statement): Dito.
3772 (c_parser_switch_statement): Dito.
3773 (c_parser_while_statement): Dito.
3774 (c_parser_do_statement): Dito.
3775 (c_parser_for_statement): Dito.
3776 * c-typeck.c (c_finish_loop): Dito.
3777
3778 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3779
3780 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3781 OPT_Wshift_count_overflow in the warnings.
3782
3783 2014-10-30 Marek Polacek <polacek@redhat.com>
3784
3785 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3786 print the stripped version as well, if they're not the same.
3787
3788 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3789
3790 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3791 machine_mode.
3792
3793 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
3794
3795 * c-decl.c: Adjust include files.
3796 * c-parser.c: Ditto.
3797
3798 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3799 Tom Tromey <tromey@redhat.com>
3800
3801 * c-tree.h (enum c_oracle_request): New.
3802 (c_binding_oracle_function): New typedef.
3803 (c_binding_oracle, c_pushtag, c_bind): Declare.
3804 * c-decl.c (c_binding_oracle): New global.
3805 (I_SYMBOL_CHECKED): New macro.
3806 (i_symbol_binding): New function.
3807 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3808 (I_TAG_CHECKED): New macro.
3809 (i_tag_binding): New function.
3810 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3811 (I_LABEL_CHECKED): New macro.
3812 (i_label_binding): New function.
3813 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3814 (c_print_identifier): Save and restore c_binding_oracle.
3815 (c_pushtag, c_bind): New functions.
3816
3817 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
3818
3819 * c-typeck.c: Adjust include files.
3820
3821 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3822
3823 PR c++/53061
3824 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3825 initialization here...
3826 (c_initialize_diagnostics): ... but here. Set defaults after
3827 building pretty-printer.
3828
3829 2014-10-23 Marek Polacek <polacek@redhat.com>
3830
3831 PR c/63626
3832 * c-decl.c (pop_scope): Don't print warning in external_scope.
3833
3834 2014-10-19 Marek Polacek <polacek@redhat.com>
3835
3836 PR c/63567
3837 * c-typeck.c (output_init_element): Allow initializing objects with
3838 static storage duration with compound literals even in C99 and add
3839 pedwarn for it.
3840
3841 2014-10-17 Marek Polacek <polacek@redhat.com>
3842
3843 PR c/63567
3844 * c-typeck.c (digest_init): Allow initializing objects with static
3845 storage duration with compound literals even in C99 and add pedwarn
3846 for it.
3847
3848 2014-10-17 Marek Polacek <polacek@redhat.com>
3849
3850 PR c/63543
3851 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3852 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3853 error multiple times. Print the type.
3854
3855 2014-10-17 Marek Polacek <polacek@redhat.com>
3856
3857 PR c/63549
3858 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3859 type.
3860
3861 2014-10-17 Marek Polacek <polacek@redhat.com>
3862
3863 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3864 (start_function): Use OPT_Wimplicit_int instead of 0.
3865 (store_parm_decls_oldstyle): Likewise.
3866
3867 2014-10-17 Alan Modra <amodra@gmail.com>
3868
3869 PR middle-end/61848
3870 * c-decl.c (merge_decls): Don't merge section name or tls model
3871 to newdecl symtab node, instead merge to olddecl. Override
3872 existing olddecl section name. Set tls_model for all thread-local
3873 vars, not just OMP thread-private ones. Remove incorrect comment.
3874
3875 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
3876
3877 * c-decl.c: Adjust include files.
3878
3879 2014-10-14 DJ Delorie <dj@redhat.com>
3880
3881 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3882 (c_token_starts_typename): Check all __intN, not just __int128.
3883 (c_token_starts_declspecs): Likewise.
3884 (c_parser_declspecs): Likewise.
3885 (c_parser_attribute_any_word): Likewise.
3886 (c_parser_objc_selector): Likewise.
3887 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3888 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3889 is specified.
3890 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3891 __int128.
3892 (finish_declspecs): Likewise.
3893
3894 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3895
3896 * c-parser.c (c_parser_all_labels): New function to replace
3897 the duplicate code.
3898 (c_parser_statement): Call the new function.
3899
3900 2014-10-09 Marek Polacek <polacek@redhat.com>
3901
3902 PR c/63480
3903 * c-typeck.c (pop_init_level): Don't warn about initializing
3904 with { }.
3905
3906 2014-10-07 Marek Polacek <polacek@redhat.com>
3907
3908 PR c/59717
3909 * c-decl.c (header_for_builtin_fn): New function.
3910 (implicitly_declare): Suggest which header to include.
3911
3912 2014-10-07 Marek Polacek <polacek@redhat.com>
3913
3914 * c-convert.c (convert): Use error_operand_p.
3915 * c-typeck.c (require_complete_type): Likewise.
3916 (really_atomic_lvalue): Likewise.
3917 (digest_init): Likewise.
3918 (handle_omp_array_sections_1): Likewise.
3919
3920 2014-10-03 Marek Polacek <polacek@redhat.com>
3921
3922 PR c/63453
3923 * c-decl.c (pop_scope): Don't warn about "inline function declared
3924 but never defined" for functions marked with gnu_inline attribute.
3925
3926 2014-09-25 Jakub Jelinek <jakub@redhat.com>
3927
3928 PR c++/63249
3929 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3930 on low_bound and length.
3931
3932 2014-09-24 Marek Polacek <polacek@redhat.com>
3933
3934 PR c/61405
3935 PR c/53874
3936 * c-parser.c: Don't define CPP_KEYWORD.
3937 (c_parser_switch_statement): Pass original type to c_finish_case.
3938 * c-tree.h (c_finish_case): Update declaration.
3939 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3940 conditionally to c_do_switch_warnings.
3941
3942 2014-09-03 Marek Polacek <polacek@redhat.com>
3943
3944 PR c/62024
3945 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3946 conversions.
3947
3948 2014-09-02 Jakub Jelinek <jakub@redhat.com>
3949 Balaji V. Iyer <balaji.v.iyer@intel.com>
3950 Igor Zamyatin <igor.zamyatin@intel.com>
3951
3952 * c-parser.c (c_parser_cilk_for): New function.
3953 (c_parser_cilk_grainsize): Likewise.
3954 (c_get_temp_regvar): Likewise.
3955 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3956 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3957 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3958 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3959 case.
3960
3961 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3962
3963 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3964 with using HOST_WIDE_INT without truncation to 'int'
3965
3966 2014-08-22 Marek Polacek <polacek@redhat.com>
3967
3968 PR c++/62199
3969 * c-typeck.c (parser_build_binary_op): Adjust call to
3970 warn_logical_not_parentheses.
3971
3972 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3973
3974 PR other/62008
3975 * c-parser.c (c_parser_array_notation): Check for correct
3976 type of an array added.
3977
3978 2014-08-19 Marek Polacek <polacek@redhat.com>
3979
3980 PR c++/62153
3981 * c-typeck.c (build_binary_op): If either operand of a comparison
3982 is a boolean expression, call maybe_warn_bool_compare.
3983
3984 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3985
3986 PR c/45584
3987 * c-typeck.c (build_c_cast): Do a conversion even when the
3988 TYPE_MAIN_VARIANTs are the same.
3989
3990 2014-08-19 Marek Polacek <polacek@redhat.com>
3991
3992 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3993 pedwarn_c99 instead of pedwarn.
3994 (grokfield): Likewise.
3995 (warn_defaults_to): New function.
3996 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3997 Unconditionally call pedwarn_c99 instead of pedwarn.
3998 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3999 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4000 check flag_isoc11 before.
4001 * c-errors.c (pedwarn_c99): Change the return type to bool.
4002 Handle -Wc99-c11-compat.
4003 * c-parser.c (disable_extension_diagnostics): Handle
4004 warn_c99_c11_compat.
4005 (restore_extension_diagnostics): Likewise.
4006 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4007 instead of pedwarn, don't check flag_isoc11 before.
4008 (c_parser_declspecs): Likewise.
4009 (c_parser_alignas_specifier): Likewise.
4010 (c_parser_alignof_expression): Likewise.
4011 (c_parser_generic_selection): Likewise.
4012 * c-tree.h (pedwarn_c99): Update declaration.
4013 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4014 of pedwarn_c99.
4015
4016 2014-08-19 Marek Polacek <polacek@redhat.com>
4017
4018 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4019 to pedwarn_c90.
4020 * c-errors.c: Include "opts.h".
4021 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4022 * c-parser.c (disable_extension_diagnostics): Handle negative value
4023 of warn_c90_c99_compat, too.
4024 (restore_extension_diagnostics): Likewise.
4025 (c_parser_compound_statement_nostart): Pass
4026 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4027
4028 2014-08-12 Marek Polacek <polacek@redhat.com>
4029
4030 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4031 Add pedwarn.
4032 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4033 Likewise.
4034 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4035
4036 2014-08-10 Marek Polacek <polacek@redhat.com>
4037
4038 PR c/51849
4039 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4040 Call pedwarn_c90 instead of pedwarn.
4041 (check_bitfield_type_and_width): Likewise.
4042 (declspecs_add_qual): Likewise.
4043 (declspecs_add_type): Likewise.
4044 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4045 Adjust to only call pedwarn_c90.
4046 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4047 pedwarn_c90 instead of pedwarn.
4048 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4049 * c-parser.c (disable_extension_diagnostics): Handle
4050 warn_c90_c99_compat.
4051 (restore_extension_diagnostics): Likewise.
4052 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4053 pedwarn_c90 instead of pedwarn.
4054 (c_parser_initelt): Likewise.
4055 (c_parser_postfix_expression): Likewise.
4056 (c_parser_postfix_expression_after_paren_type): Likewise.
4057 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4058 * c-tree.h: Fix formatting.
4059 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4060 pedwarn_c90 instead of pedwarn.
4061
4062 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4063
4064 * c-typeck.c: Remove include of pointer-set.h.
4065
4066 2014-08-07 Marek Polacek <polacek@redhat.com>
4067
4068 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4069
4070 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4071
4072 * c-typeck.c: Use hash_map instead of pointer_map.
4073
4074 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4075
4076 * c-decl.c: Use hash_set instead of pointer_set.
4077
4078 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4079
4080 PR middle-end/61455
4081 * c-array-notation.c (expand_array_notations): Handling
4082 of DECL_EXPR added.
4083
4084 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
4085
4086 PR c++/60517
4087 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4088 a local variable.
4089
4090 2014-07-30 Tom Tromey <tromey@redhat.com>
4091
4092 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4093 field.
4094 (really_start_incremental_init, push_init_level): Initialize
4095 designator_depth.
4096 (pop_init_level): Set global designator_depth.
4097 (process_init_element): Check for designated_init attribute.
4098
4099 2014-07-20 Marek Polacek <polacek@redhat.com>
4100
4101 PR c/61852
4102 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4103 (implicitly_declare): Pass location to implicit_decl_warning.
4104
4105 2014-07-14 Jakub Jelinek <jakub@redhat.com>
4106
4107 PR middle-end/61294
4108 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4109 If non-NULL, call c_parser_check_literal_zero.
4110 (c_parser_check_literal_zero): New function.
4111 (c_parser_postfix_expression_after_primary): Adjust
4112 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4113
4114 2014-07-06 Marek Polacek <polacek@redhat.com>
4115
4116 PR c/6940
4117 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4118 * c-tree.h (C_ARRAY_PARAMETER): Define.
4119 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4120 function parameter.
4121
4122 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4123 Chen Gang <gang.chen.5i5j@gmail.com>
4124
4125 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4126 releasing symbol.
4127
4128 2014-07-01 Marek Polacek <polacek@redhat.com>
4129
4130 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4131 instead of 0 to WARN_FOR_ASSIGNMENT.
4132
4133 2014-07-01 Marek Polacek <polacek@redhat.com>
4134
4135 PR c/58286
4136 * c-typeck.c (convert_for_assignment): Pass
4137 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4138
4139 2014-06-30 Marek Polacek <polacek@redhat.com>
4140
4141 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4142 has no_sanitize_undefined attribute.
4143
4144 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4145
4146 PR middle-end/57541
4147 * c-array-notation.c (fix_builtin_array_notation_fn):
4148 Check for 0 arguments in builtin call. Check that bultin argument is
4149 correct.
4150 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4151 index.
4152
4153 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4154
4155 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4156 qualifiers in __auto_type for atomic types.
4157 (c_parser_typeof_specifier): Discard all type qualifiers in
4158 __typeof__ for atomic types.
4159
4160 2014-06-25 Marek Polacek <polacek@redhat.com>
4161
4162 PR c/61162
4163 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4164 the return expression to c_finish_return.
4165
4166 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4167
4168 * c-typeck.c (c_finish_omp_clauses): Make sure
4169 OMP_CLAUSE_LINEAR_STEP has correct type.
4170
4171 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4172
4173 * c-decl.c: Adjust.
4174
4175 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4176
4177 * c-parser.c (c_parser_omp_for_loop): For
4178 #pragma omp parallel for simd move lastprivate clause from parallel
4179 to for rather than simd.
4180
4181 2014-06-23 Marek Polacek <polacek@redhat.com>
4182
4183 * c-typeck.c (parser_build_binary_op): Don't call
4184 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4185
4186 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4187
4188 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4189 * c-decl.c (merge_decls): Likewise.
4190
4191 2014-06-09 Marek Polacek <polacek@redhat.com>
4192
4193 PR c/36446
4194 * c-typeck.c (error_init): Call inform instead of error_at.
4195 (pedwarn_init): Call inform instead of pedwarn.
4196 (warning_init): Call inform instead of warning_at.
4197
4198 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4199
4200 * c-decl.c (merge_decls): Use set_decl_section_name.
4201 (duplicate_decls): Remove node if it exists.
4202
4203 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4204
4205 PR c/53119
4206 * c-typeck.c (push_init_level, process_init_element,
4207 pop_init_level): Correct check for zero initialization, move
4208 missing brace warning to respect zero initialization.
4209
4210 2014-06-05 Marek Polacek <polacek@redhat.com>
4211
4212 PR c/56724
4213 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4214
4215 2014-06-05 Marek Polacek <polacek@redhat.com>
4216
4217 PR c/49706
4218 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4219 on the left hand side operand of a comparison.
4220
4221 2014-06-05 Marek Polacek <polacek@redhat.com>
4222
4223 PR c/48062
4224 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4225 Print note only if the warning was printed.
4226
4227 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4228
4229 PR c/58942
4230 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4231 with a pointer.
4232
4233 2014-06-03 Marek Polacek <polacek@redhat.com>
4234
4235 PR c/60439
4236 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4237 c_start_case.
4238 * c-tree.h (c_start_case): Update.
4239 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4240 switch condition has boolean value.
4241
4242 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4243
4244 * c-decl.c: Include builtins.h.
4245 * c-parser.c: Likewise.
4246
4247 2014-05-27 Marek Polacek <polacek@redhat.com>
4248
4249 PR c/56724
4250 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4251 error and warning calls to error_at and warning_at. Pass location of
4252 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4253 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4254 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4255
4256 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4257
4258 PR c/61191
4259 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4260 function parameters.
4261
4262 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4263
4264 * c-decl.c (merge_decls): Preserve symtab node pointers.
4265 (duplicate_decls): Free new decl.
4266
4267 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4268
4269 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4270 initialization.
4271
4272 * c-parser.c (c_parser_omp_target): Return bool values.
4273
4274 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4275
4276 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4277 num_teams_loc variable to num_thread_limit_loc.
4278
4279 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4280
4281 * c-array-notation.c (expand_array_notations): Use void_node
4282 instead of void_zero_node.
4283
4284 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4285
4286 * c-decl.c (finish_struct): Adjust.
4287 (finish_enum): Likewise.
4288 (bind): Adjust.
4289 (record_inline_static): Likewise.
4290 (push_scope): Likewise.
4291 (make_label): Likewise.
4292 (lookup_label_for_goto): Likewise.
4293 (finish_struct): Likewise.
4294 (finish_enum): Likewise.
4295 (store_parm_decls): Likewise.
4296 (c_push_function_context): Likewise.
4297 * c-lang.h: Remove usage of variable_size gty attribute.
4298 * c-parser.c (c_parse_init): Adjust.
4299 (c_parse_file): Likewise.
4300
4301 2014-05-13 Marek Polacek <polacek@redhat.com>
4302
4303 PR c/61162
4304 * c-typeck.c (convert_for_assignment): Pass location to
4305 WARN_FOR_ASSIGNMENT instead of input_location.
4306
4307 2014-05-10 Marek Polacek <polacek@redhat.com>
4308
4309 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4310 maybe_warn_string_init.
4311 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4312 maybe_warn_string_init.
4313 * c-tree.h (maybe_warn_string_init): Update declaration.
4314 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4315 Call pedwarn_init with loc instead of with input_location.
4316 (digest_init): Pass init_loc to maybe_warn_string_init.
4317 (pop_init_level): Call pedwarn_init with loc instead of with
4318 input_location.
4319 (set_init_index): Likewise.
4320 (process_init_element): Likewise.
4321
4322 2014-05-09 Marek Polacek <polacek@redhat.com>
4323
4324 PR c/61096
4325 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4326 (c_parser_initelt): Pass location to set_init_label. Pass array index
4327 location to set_init_index.
4328 * c-tree.h (push_init_level): Update declaration.
4329 (pop_init_level): Likewise.
4330 (set_init_index): Likewise.
4331 (set_init_label): Likewise.
4332 * c-typeck.c (error_init): Add location parameter. Call error_at
4333 instead of error.
4334 (digest_init): Pass init_loc to error_init.
4335 (really_start_incremental_init):
4336 (push_init_level): Add location parameter. Pass loc to pop_init_level
4337 and error_init.
4338 (pop_init_level): Likewise.
4339 (set_designator): Add location parameter. Pass loc to pop_init_level,
4340 push_init_level, and error_init.
4341 (set_init_index): Add location parameter. Pass loc to error_init and
4342 set_designator.
4343 (set_init_label): Likewise.
4344 (output_init_element): Pass loc to error_init.
4345 (process_init_element): Pass loc to error_init, pop_init_level,
4346 pedwarn_init, and push_init_level.
4347
4348 2014-05-09 Marek Polacek <polacek@redhat.com>
4349
4350 PR c/50459
4351 * c-parser.c (c_parser_attributes): Parse the arguments as an
4352 expression-list if the attribute takes identifier.
4353
4354 2014-05-08 Marek Polacek <polacek@redhat.com>
4355
4356 PR c/61053
4357 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4358 TYPE_ALIGN_UNIT.
4359
4360 2014-05-08 Marek Polacek <polacek@redhat.com>
4361
4362 PR c/61077
4363 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4364 of main.
4365
4366 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4367 Mike Stump <mikestump@comcast.net>
4368 Richard Sandiford <rdsandiford@googlemail.com>
4369
4370 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4371 (finish_enum): Use wide-int interfaces.
4372 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4373 * c-typeck.c (build_c_cast): Likewise.
4374 (set_nonincremental_init_from_string): Likewise.
4375 (c_tree_equal): Likewise.
4376
4377 2014-05-02 Marek Polacek <polacek@redhat.com>
4378
4379 PR c/25801
4380 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4381 Return size_one_node when the type is not complete.
4382 (pointer_diff): Remove comment.
4383 (build_unary_op): Improve error messages.
4384
4385 2014-05-02 Marek Polacek <polacek@redhat.com>
4386
4387 * c-typeck.c (c_finish_return): Separate warning_at calls.
4388
4389 2014-05-02 Marek Polacek <polacek@redhat.com>
4390
4391 * c-tree.h (error_init): Remove declaration.
4392 (pedwarn_init): Likewise.
4393 * c-typeck.c (error_init): Make static and move above.
4394 (pedwarn_init): Likewise.
4395 (warning_init): Move above.
4396 (maybe_warn_string_init): Likewise.
4397
4398 2014-05-01 Jeff Law <law@redhat.com>
4399
4400 Revert:
4401
4402 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4403 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4404 avoid goto.
4405
4406 2014-05-02 Marek Polacek <polacek@redhat.com>
4407
4408 PR c/60784
4409 * c-typeck.c (push_init_level): Set constructor_designated to
4410 p->designated for structures.
4411
4412 2014-05-01 Marek Polacek <polacek@redhat.com>
4413
4414 PR c/60915
4415 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4416 function-definition has an attribute after the declarator.
4417
4418 2014-05-01 Marek Polacek <polacek@redhat.com>
4419
4420 PR c/60257
4421 * c-typeck.c (warning_init): Add location_t parameter. Call
4422 warning_at instead of warning.
4423 (push_init_level): Pass input_location to warning_init.
4424 (add_pending_init): Add location_t parameter. Pass loc to
4425 warning_init.
4426 (set_nonincremental_init): Pass input_location to add_pending_init.
4427 (set_nonincremental_init_from_string): Likewise.
4428 (output_init_element): Pass loc to warning_init and to
4429 add_pending_init.
4430
4431 2014-05-01 Marek Polacek <polacek@redhat.com>
4432
4433 PR c/43395
4434 * c-typeck.c (c_finish_return): Distinguish between label and variable
4435 when warning about returning local address.
4436
4437 2014-05-01 Marek Polacek <polacek@redhat.com>
4438
4439 PR c/29467
4440 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4441 in C89 mode.
4442
4443 2014-05-01 Marek Polacek <polacek@redhat.com>
4444
4445 PR c/43245
4446 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4447 instead of 0 to WARN_FOR_QUALIFIERS.
4448
4449 2014-05-01 Marek Polacek <polacek@redhat.com>
4450
4451 PR c/56989
4452 * c-typeck.c (default_conversion): Use better location for
4453 error call.
4454
4455 2014-04-30 Marek Polacek <polacek@redhat.com>
4456
4457 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4458 also when SANITIZE_FLOAT_DIVIDE is on.
4459
4460 2014-04-30 Marek Polacek <polacek@redhat.com>
4461
4462 PR c/60139
4463 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4464 and pedwarn_init. Use loc insted of input_location.
4465
4466 2014-04-30 Marek Polacek <polacek@redhat.com>
4467
4468 PR c/60351
4469 * c-typeck.c (build_binary_op): Use location when warning about
4470 shift count.
4471
4472 2014-04-25 Marek Polacek <polacek@redhat.com>
4473
4474 PR c/18079
4475 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4476 always_inline/noinline and hot/cold attributes.
4477
4478 2014-04-25 Marek Polacek <polacek@redhat.com>
4479
4480 PR c/60114
4481 * c-parser.c (c_parser_initelt): Pass input_location to
4482 process_init_element.
4483 (c_parser_initval): Pass loc to process_init_element.
4484 * c-tree.h (process_init_element): Adjust declaration.
4485 * c-typeck.c (push_init_level): Pass input_location to
4486 process_init_element.
4487 (pop_init_level): Likewise.
4488 (set_designator): Likewise.
4489 (output_init_element): Add location_t parameter. Pass loc to
4490 digest_init.
4491 (output_pending_init_elements): Pass input_location to
4492 output_init_element.
4493 (process_init_element): Add location_t parameter. Pass loc to
4494 output_init_element.
4495
4496 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4497
4498 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4499 atomic-clause, allow comma in between atomic-clause and
4500 seq_cst.
4501
4502 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4503
4504 PR c/59073
4505 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4506 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4507
4508 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4509
4510 PR middle-end/60469
4511 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4512 create_tmp_var instead build_decl for creating temps.
4513 (build_array_notation_expr): Likewise.
4514 (fix_conditional_array_notations_1): Likewise.
4515 (fix_array_notation_expr): Likewise.
4516 (fix_array_notation_call_expr): Likewise.
4517
4518 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4519
4520 PR c++/60689
4521 * c-tree.h (c_build_function_call_vec): New prototype.
4522 * c-typeck.c (build_function_call_vec): Don't call
4523 resolve_overloaded_builtin here.
4524 (c_build_function_call_vec): New wrapper function around
4525 build_function_call_vec. Call resolve_overloaded_builtin here.
4526 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4527 Call c_build_function_call_vec instead of build_function_call_vec.
4528 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4529 * c-decl.c (finish_decl): Likewise.
4530
4531 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4532
4533 PR c/55383
4534 * c-typeck.c: Use correct format string in cast-qual warning
4535
4536 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4537
4538 * c-decl.c (c_decl_attributes): Use
4539 lang_hooks.types.omp_mappable_type.
4540 * c-typeck.c (c_finish_omp_clauses): Likewise.
4541
4542 2014-03-06 Marek Polacek <polacek@redhat.com>
4543
4544 PR c/60197
4545 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4546 of checking tree code.
4547
4548 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4549
4550 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4551 (c_parser_parameter_declaration): Likewise.
4552
4553 2014-02-19 Marek Polacek <polacek@redhat.com>
4554
4555 PR c/60195
4556 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4557 Call mark_exp_read on exp.value.
4558 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4559 TREE_ADDRESSABLE on old instead of val.
4560 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4561
4562 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4563
4564 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4565 C_EXPR_APPEND by vec_safe_push.
4566 * c-tree.h (C_EXPR_APPEND): Remove.
4567
4568 2014-01-31 Marek Polacek <polacek@redhat.com>
4569
4570 PR c/59963
4571 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4572 build_function_call_vec.
4573 (build_function_call): Likewise.
4574 (build_atomic_assign): Likewise.
4575 (build_function_call_vec): Add arg_loc parameter. Use it.
4576 (convert_arguments): Likewise.
4577 (convert_for_assignment): Rename rhs_loc to expr_loc.
4578 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4579 (c_parser_objc_keywordexpr): Likewise.
4580 (c_parser_postfix_expression_after_primary): Call
4581 build_function_call_vec with expr_loc rather than op_loc.
4582 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4583 build_function_call_vec.
4584 (c_parser_expr_list): Add locations parameter. Fill it with locations
4585 of function arguments.
4586 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4587
4588 2014-01-30 Marek Polacek <polacek@redhat.com>
4589
4590 PR c/59940
4591 * c-typeck.c (build_function_call_vec): Use loc parameter.
4592 (convert_arguments): Add location parameter. Use it.
4593 (ep_convert_and_check): Likewise.
4594 (build_atomic_assign): Adjust convert_for_assignment call.
4595 (build_modify_expr): Likewise.
4596 (digest_init): Likewise.
4597 (c_finish_return): Likewise.
4598 (build_conditional_expr): Adjust ep_convert_and_check calls.
4599 (convert_for_assignment): Add rhs_loc parameter. Use it.
4600 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4601 calls.
4602
4603 2014-01-30 Richard Biener <rguenther@suse.de>
4604
4605 PR c/59905
4606 * c-typeck.c (build_function_call_vec): Do not replace calls
4607 to a function via an incompatible type with a runtime abort.
4608
4609 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4610
4611 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4612 flag_enable_cilkplus with flag_cilkplus.
4613 (c_parser_direct_declarator_inner): Likewise.
4614 (c_parser_attribute_any_word): Likewise.
4615 (c_parser_attributes): Likewise.
4616 (c_parser_compound_statement): Likewise.
4617 (c_parser_statement_after_labels): Likewise.
4618 (c_parser_if_statement): Likewise.
4619 (c_parser_switch_statement): Likewise.
4620 (c_parser_do_statement): Likewise.
4621 (c_parser_for_statement): Likewise.
4622 (c_parser_unary_expression): Likewise.
4623 (c_parser_postfix_expression): Likewise.
4624 (c_parser_postfix_expression_after_primary): Likewise.
4625 (c_parser_postfix_expression_after_primary): Likewise.
4626 (c_parser_omp_clause_name): Likewise.
4627 (c_finish_omp_declare_simd): Likewise.
4628 (c_parser_cilk_verify_simd): Likewise.
4629 * c-typeck.c (build_array_ref): Likewise.
4630 (build_function_call_vec): Likewise.
4631 (convert_arguments): Likewise.
4632 (build_compound_expr): Likewise.
4633 (c_finish_return): Likewise.
4634 (c_finish_if_stmt): Likewise.
4635 (c_finish_loop): Likewise.
4636 (build_binary_op): Likewise.
4637
4638 2014-01-23 Marek Polacek <polacek@redhat.com>
4639
4640 PR c/59846
4641 * c-typeck.c (parser_build_binary_op): Use location instead of
4642 input_location.
4643 (build_binary_op): Pass location to shorten_compare.
4644
4645 2014-01-23 Marek Polacek <polacek@redhat.com>
4646
4647 PR c/58346
4648 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4649 an empty aggregate.
4650
4651 2014-01-23 Marek Polacek <polacek@redhat.com>
4652
4653 PR c/59871
4654 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4655 of a comma expression.
4656 (emit_side_effect_warnings): Likewise.
4657
4658 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4659
4660 PR c/59825
4661 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4662 function to use walk_tree and moved a lot of its functionality to
4663 expand_array_notations.
4664 (expand_array_notations): New function.
4665
4666 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4667
4668 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4669 attribute an attribute without value.
4670
4671 2014-01-23 Jakub Jelinek <jakub@redhat.com>
4672
4673 PR middle-end/58809
4674 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4675 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4676
4677 2014-01-22 Marek Polacek <polacek@redhat.com>
4678
4679 PR c/59891
4680 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4681 of remove_c_maybe_const_expr on op1 and op2.
4682
4683 2014-01-15 Jakub Jelinek <jakub@redhat.com>
4684
4685 PR c/58943
4686 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4687 effects, preevaluate rhs using SAVE_EXPR first.
4688
4689 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4690
4691 PR c++/59631
4692 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4693 statements with if-elseif statements.
4694
4695 2014-01-06 Marek Polacek <polacek@redhat.com>
4696
4697 PR c/57773
4698 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4699 defined bit-field types only in ISO C.
4700
4701 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4702
4703 Update copyright years
4704
4705 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4706
4707 * c-array-notation.c: Use the standard form for the copyright notice.
4708
4709 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4710
4711 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4712 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4713 field in parser is not empty. If not-empty, call the function
4714 c_parser_finish_omp_declare_simd.
4715 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4716 between SIMD-enabled functions and #pragma simd. Added new parameter.
4717 (c_parser_cilk_all_clauses): Modified the usage of the function
4718 c_parser_cilk_clause_vectorlength as mentioned above.
4719 (c_parser_cilk_simd_fn_vector_attrs): New function.
4720 (c_finish_cilk_simd_fn_tokens): Likewise.
4721 (is_cilkplus_vector_p): Likewise.
4722 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4723 "nomask," and "mask" strings in clause name.
4724 (c_parser_omp_all_clauses): Added 3 new case statements:
4725 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4726 PRAGMA_CILK_CLAUSE_NOMASK.
4727 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4728 check for vector attribute and if so call the function
4729 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4730 called the function c_finish_cilk_simd_fn_tokens.
4731 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4732 parser field is non-empty. If so, parse them as you would parse
4733 the omp declare simd pragma.
4734 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4735 Added a check when step is a parameter and flag it as error.
4736 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4737 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4738 pragma_omp_clause.
4739
4740 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4741
4742 * c-parser.c (c_parser_omp_parallel): Fix description.
4743
4744 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4745
4746 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4747 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4748 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4749 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4750
4751 2013-12-04 Joseph Myers <joseph@codesourcery.com>
4752
4753 PR c/52023
4754 * c-parser.c (c_parser_alignas_specifier): Use
4755 c_sizeof_or_alignof_type instead of c_alignof.
4756 (c_parser_alignof_expression): Likewise, with min_alignof
4757 parameter depending on alignof spelling used.
4758
4759 2013-12-04 Marek Polacek <polacek@redhat.com>
4760
4761 PR c/54113
4762 * c-decl.c (start_function): Don't warn for missing prototype for
4763 inline functions.
4764
4765 2013-12-03 Marek Polacek <polacek@redhat.com>
4766
4767 PR c/59351
4768 * c-decl.c (build_compound_literal): Allow compound literals with
4769 empty initial value.
4770
4771 2013-12-02 Joseph Myers <joseph@codesourcery.com>
4772
4773 PR c/58235
4774 * c-typeck.c (build_modify_expr): Diagnose assignment to
4775 expression with array type.
4776
4777 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4778
4779 PR c/42262
4780 * c-typeck.c (process_init_element): Do not treat a string as
4781 initializing a whole array when used with a designator for an
4782 individual element.
4783
4784 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4785
4786 PR c/57574
4787 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4788 an inline function following a static declaration.
4789
4790 2013-11-28 Jakub Jelinek <jakub@redhat.com>
4791
4792 PR c/59310
4793 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4794 to p_name before calling c_parser_omp_teams instead of after.
4795 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4796 argument. Remove unused p_name variable.
4797
4798 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
4799 Jakub Jelinek <jakub@redhat.com>
4800
4801 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4802 external_scope is NULL.
4803
4804 2013-11-27 Tom de Vries <tom@codesourcery.com>
4805 Marc Glisse <marc.glisse@inria.fr>
4806
4807 PR c++/59032
4808 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4809
4810 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
4811
4812 * c-typeck.c: Add required include files from gimple.h.
4813
4814 2013-11-22 David Malcolm <dmalcolm@redhat.com>
4815
4816 * c-decl.c (define_label, shadow_tag_warned)
4817 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4818 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4819 (declspecs_add_type): Remove use of in_system_header macro.
4820 * c-parser.c (c_parser_unary_expression): Likewise.
4821 * c-typeck.c (store_init_value, process_init_element)
4822 (c_start_case): Likewise.
4823
4824 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4825 macro.
4826
4827 * c-parser.c (c_parser_set_source_position_from_token): Remove
4828 reference to in_system_header from comment.
4829
4830 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4831
4832 * c-decl.c (grokdeclarator): Update comment to refer to
4833 tree_to_[su]hwi rather than tree_low_cst.
4834
4835 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4836
4837 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4838 tree_to_uhwi throughout.
4839
4840 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4841
4842 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4843 throughout.
4844
4845 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4846
4847 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4848 throughout.
4849
4850 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
4851
4852 * c-parser.c (c_parser_cilk_simd): New.
4853 (c_parser_cilk_verify_simd): New.
4854 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4855 (c_parser_omp_for_loop): Add case for NE_EXPR.
4856 Set c_break_label for CILK_SIMD.
4857 (c_parser_cilk_clause_vectorlength): New.
4858 (c_parser_cilk_clause_linear): New.
4859 (c_parser_cilk_clause_name): New.
4860 (c_parser_cilk_all_clauses): New.
4861 * c-typeck.c (build_unary_op): Pass location argument to
4862 readonly_error.
4863 (build_modify_expr): Same.
4864 (build_asm_expr): Same.
4865 (c_finish_bc_stmt): Error on break/continue in loops.
4866
4867 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
4868
4869 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4870
4871 2013-11-14 Diego Novillo <dnovillo@google.com>
4872
4873 * c-decl.c: Include print-tree.h.
4874 Include stor-layout.h.
4875 Include varasm.h.
4876 Include attribs.h.
4877 Include stringpool.h.
4878 * c-lang.c: Include fold-const.h.
4879 * c-parser.c: Include stringpool.h.
4880 Include attribs.h.
4881 Include stor-layout.h.
4882 Include varasm.h.
4883 Include trans-mem.h.
4884 * c-typeck.c: Include stor-layout.h.
4885 Include trans-mem.h.
4886 Include varasm.h.
4887 Include stmt.h.
4888
4889 2013-11-13 Joseph Myers <joseph@codesourcery.com>
4890
4891 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4892 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4893 __auto_type.
4894 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4895 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4896 RID_AUTO_TYPE.
4897 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4898 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4899 (c_parser_declarator, c_parser_direct_declarator_inner)
4900 (c_parser_parameter_declaration, c_parser_type_name): All callers
4901 changed.
4902 (c_parser_declaration_or_fndef): Handle declarations with type
4903 determined from the initializer.
4904
4905 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
4906
4907 * c-typeck.c: Include gimplify.h.
4908
4909 2013-11-12 Joseph Myers <joseph@codesourcery.com>
4910
4911 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4912 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4913 comment.
4914 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4915 or _Thread_local as appropriate in diagnostics.
4916 (build_null_declspecs): Initialize ret->thread_gnu_p.
4917 (declspecs_add_scspec): Handle either __thread or _Thread_local
4918 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4919 pedantic. Do not disallow _Thread_local extern and _Thread_local
4920 static.
4921
4922 2013-11-07 Joseph Myers <joseph@codesourcery.com>
4923 Andrew MacLeod <amacleod@redhat.com>
4924
4925 * c-aux-info.c (gen_type): Handle atomic qualifier.
4926 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4927 qualifiers when compating types.
4928 (shadow_tag_warned): Handle atomic_p in declspecs.
4929 (quals_from_declspecs): Likewise.
4930 (start_decl): Use c_type_promotes_to when promoting argument
4931 types.
4932 (grokdeclarator): Handle _Atomic.
4933 (get_parm_info): Diagnose any qualifier on "void" as only
4934 parameter.
4935 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4936 comparing types. Use c_type_promotes_to when promoting argument
4937 types.
4938 (finish_function): Use c_type_promotes_to when promoting argument
4939 types.
4940 (build_null_declspecs): Handle atomic_p in declspecs.
4941 (declspecs_add_qual): Handle RID_ATOMIC.
4942 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4943 (c_token_starts_declspecs): Handle RID_ATOMIC.
4944 (c_parser_declspecs): Handle atomic type specifiers and
4945 qualifiers.
4946 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4947 from types of expressions with atomic type.
4948 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4949 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4950 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4951 (c_parser_statement_after_labels, c_parser_switch_statement)
4952 (c_parser_for_statement, c_parser_expr_no_commas)
4953 (c_parser_conditional_expression, c_parser_binary_expression)
4954 (c_parser_cast_expression, c_parser_unary_expression)
4955 (c_parser_postfix_expression)
4956 (c_parser_postfix_expression_after_primary, c_parser_expression):
4957 Use convert_lvalue_to_rvalue.
4958 (c_parser_expression_conv, c_parser_expr_list): Document
4959 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4960 (c_parser_objc_synchronized_statement): Use
4961 convert_lvalue_to_rvalue.
4962 (c_parser_objc_selector): Handle RID_ATOMIC.
4963 (c_parser_objc_receiver, c_parser_array_notation): Use
4964 convert_lvalue_to_rvalue.
4965 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4966 _Atomic (type-name).
4967 (struct c_declspecs): Add atomic_p field.
4968 (convert_lvalue_to_rvalue): Declare.
4969 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4970 corresponding atomic types.
4971 (qualify_type): Don't add _Atomic qualifiers from second argument.
4972 (comp_target_types): Do not allow _Atomic mismatches.
4973 (type_lists_compatible_p): Do not remove atomic qualifiers when
4974 comparing types.
4975 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4976 (build_atomic_assign): New functions.
4977 (build_unary_op): Use build_atomic_assign for atomic increment and
4978 decrement.
4979 (build_conditional_expr): Do not treat _Atomic void as a qualified
4980 version of void.
4981 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4982 (find_anonymous_field_with_type, convert_to_anonymous_field)
4983 (convert_for_assignment): Do not remove atomic qualifiers when
4984 comparing types.
4985 (digest_init): Do not accept initialization of arrays of atomic
4986 elements by string constants.
4987 (build_asm_expr): Use convert_lvalue_to_rvalue.
4988 (build_binary_op): Do not treat _Atomic void as a qualified
4989 version of void.
4990
4991 2013-11-06 DJ Delorie <dj@redhat.com>
4992
4993 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4994 both explicit and builtin, print the location of the explicit one.
4995
4996 2013-11-05 Tobias Burnus <burnus@net-b.de>
4997
4998 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4999 c_parser_omp_distribute, c_parser_omp_teams,
5000 c_parser_omp_target, c_parser_omp_declare): Handle
5001 -fopenmp-simd.
5002
5003 2013-11-03 Marek Polacek <polacek@redhat.com>
5004
5005 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5006
5007 2013-11-01 Jakub Jelinek <jakub@redhat.com>
5008
5009 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5010 check_dup_generic at the end, unless remove is true.
5011 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5012 remove = true;.
5013 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5014
5015 2013-10-31 Jakub Jelinek <jakub@redhat.com>
5016
5017 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5018 with decl that is not pointer nor array.
5019
5020 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5021
5022 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5023 a spawning function is found.
5024 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5025 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5026 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5027 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5028 case.
5029 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5030 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5031 expr.
5032 (c_finish_return): Added a check to reject _Cilk_spawn in return
5033 expression.
5034 (build_cilk_spawn): New function.
5035 (build_cilk_sync): Likewise.
5036 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5037
5038 2013-10-27 Tobias Burnus <burnus@net-b.de>
5039
5040 PR other/33426
5041 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5042 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5043 (c_parser_statement_after_labels): Update calls.
5044
5045 2013-10-24 Tobias Burnus <burnus@net-b.de>
5046
5047 PR other/33426
5048 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5049 Handle PRAGMA_IVDEP.
5050 (c_parser_statement_after_labels): Update call.
5051
5052 2013-10-24 Marek Polacek <polacek@redhat.com>
5053
5054 * c-parser.c (c_parser_struct_declaration): Add a comment.
5055 (c_parser_declarator): Don't allow _Alignas here.
5056
5057 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
5058
5059 * c-parser.c: Include omp-low.h.
5060 * c-typeck.c: Likewise.
5061
5062 2013-10-17 Marek Polacek <polacek@redhat.com>
5063
5064 PR c/58267
5065 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5066 Document syntax of the array-declarator.
5067 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5068 are not permitted.
5069 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5070 (c_parser_struct_declaration): Likewise.
5071 (c_parser_declarator): Likewise.
5072 (c_parser_direct_declarator_inner): Likewise.
5073 (c_parser_parameter_declaration): Likewise.
5074 (c_parser_type_name): Likewise.
5075
5076 2013-10-11 Jakub Jelinek <jakub@redhat.com>
5077
5078 * c-lang.h (current_omp_declare_target_attribute): New extern
5079 decl.
5080 * c-parser.c: Include c-lang.h.
5081 (struct c_parser): Change tokens to c_token *.
5082 Add tokens_buf field. Change tokens_avail type to unsigned int.
5083 (c_parser_consume_token): If parser->tokens isn't
5084 &parser->tokens_buf[0], increment parser->tokens.
5085 (c_parser_consume_pragma): Likewise.
5086 (enum pragma_context): Add pragma_struct and pragma_param.
5087 (c_parser_external_declaration): Adjust
5088 c_parser_declaration_or_fndef caller.
5089 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5090 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5091 Adjust recursive call.
5092 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5093 of pragma_external.
5094 (c_parser_parameter_declaration): Use pragma_param instead of
5095 pragma_external.
5096 (c_parser_compound_statement_nostart, c_parser_label,
5097 c_parser_for_statement): Adjust
5098 c_parser_declaration_or_fndef callers.
5099 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5100 it through to c_parser_conditional_expression.
5101 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5102 pass it through to c_parser_binary_expression. Adjust recursive
5103 call.
5104 (c_parser_binary_expression): Remove prec argument, add
5105 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5106 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5107 binop matches it, use build2 instead of parser_build_binary_op.
5108 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5109 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5110 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5111 Handle pragma_struct and pragma_param the same as pragma_external.
5112 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5113 (c_parser_omp_variable_list): Parse array sections for
5114 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5115 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5116 (c_parser_omp_clause_reduction): Handle user defined reductions.
5117 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5118 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5119 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5120 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5121 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5122 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5123 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5124 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5125 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5126 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5127 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5128 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5129 (c_parser_omp_for_loop): Add CODE argument, pass it through
5130 to c_finish_omp_for. Change last argument to cclauses,
5131 and adjust uses to grab parallel clauses from the array of all
5132 the split clauses. Adjust c_parser_binary_expression,
5133 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5134 (omp_split_clauses): New function.
5135 (c_parser_omp_simd): New function.
5136 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5137 Allow the function to be called also when parsing combined constructs,
5138 and call c_parser_omp_simd when parsing for simd.
5139 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5140 #pragma omp section, require exactly one structured-block instead of
5141 sequence of statements.
5142 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5143 Allow the function to be called also when parsing combined constructs.
5144 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5145 Allow the function to be called also when parsing combined
5146 constructs.
5147 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5148 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5149 c_parser_omp_teams, c_parser_omp_target_data,
5150 c_parser_omp_target_update, c_parser_omp_target,
5151 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5152 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5153 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5154 (c_parser_omp_construct): Add p_name and mask vars. Handle
5155 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5156 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5157 and c_parser_omp_sections callers.
5158 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5159 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5160 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5161 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5162 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5163 OMP_CLAUSE_DEPEND.
5164 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5165 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5166 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5167 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5168 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5169 * c-typeck.c: Include tree-inline.h.
5170 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5171 handle_omp_array_sections_1, handle_omp_array_sections,
5172 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5173 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5174 user defined reductions.
5175 (c_tree_equal): New function.
5176 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5177 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5178 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5179 c_check_omp_declare_reduction_r): New prototypes.
5180 * c-decl.c (current_omp_declare_target_attribute): New variable.
5181 (c_decl_attributes): New function.
5182 (start_decl, start_function): Use it instead of decl_attributes.
5183 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5184 c_omp_reduction_decl, c_omp_reduction_lookup,
5185 c_check_omp_declare_reduction_r): New functions.
5186
5187 2013-09-25 Tom Tromey <tromey@redhat.com>
5188
5189 * Make-lang.in (c/gccspec.o): Remove.
5190 (CFLAGS-c/gccspec.o): New variable.
5191 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5192 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5193 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5194
5195 2013-09-25 Tom Tromey <tromey@redhat.com>
5196
5197 * Make-lang.in (c/gccspec.o): Don't use subshell.
5198
5199 2013-09-18 Marek Polacek <polacek@redhat.com>
5200
5201 PR sanitize/58443
5202 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5203 Remove unnecessary check.
5204
5205 2013-09-18 Marek Polacek <polacek@redhat.com>
5206
5207 PR sanitizer/58411
5208 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5209 no_sanitize_undefined attribute.
5210
5211 2013-09-13 Kai Tietz <ktietz@redhat.com>
5212
5213 PR target/57848
5214 * c-decl.c (c_builtin_function_ext_scope): Remove
5215 wrong assumption that it is never called on prexisting
5216 symbol.
5217
5218 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5219
5220 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5221
5222 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5223
5224 * c-objc-common.c (c_tree_printer): Tidy.
5225
5226 2013-08-30 Marek Polacek <polacek@redhat.com>
5227
5228 * c-typeck.c (build_binary_op): Add division by zero and shift
5229 instrumentation.
5230
5231 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5232 Joseph Myers <joseph@codesourcery.com>
5233
5234 PR c/35649
5235 * c-typeck.c (c_common_type): Prefer double_type_node over
5236 other REAL_TYPE types with the same precision.
5237 (convert_arguments): Likewise.
5238
5239 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5240
5241 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5242 (c_initialize_diagnostics): Call a destructor for the early printer.
5243
5244 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5245
5246 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5247 printer initialization.
5248
5249 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5250
5251 PR c/57490
5252 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5253 check for truth values.
5254 (expand_array_notation_exprs): Added truth values case. Removed an
5255 unwanted else. Added for-loop to walk through subtrees in default
5256 case.
5257
5258 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5259
5260 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5261
5262 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5263
5264 * c-parser.c (struct c_generic_association): Fix typo.
5265
5266 2013-07-23 Tom Tromey <tromey@redhat.com>
5267 Joseph Myers <joseph@codesourcery.com>
5268
5269 * c-parser.c (struct c_generic_association): New.
5270 (c_generic_association_d): New typedef.
5271 (c_parser_generic_selection): New function.
5272 (c_parser_postfix_expression): Handle RID_GENERIC.
5273
5274 2013-07-13 Jason Merrill <jason@redhat.com>
5275
5276 PR c++/57793
5277 * c-decl.c (finish_struct): Check for too-large class.
5278
5279 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5280
5281 PR c/57821
5282 * c-typeck.c (set_init_index): When folding, check for index overflow.
5283
5284 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5285
5286 * c-parser.c (c_parser_array_notation): Removed rejection of array
5287 notations in an array of function pointers.
5288
5289 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5290
5291 * c-array-notation.c (make_triplet_val_inv): New function.
5292 (create_cmp_incr): Likewise.
5293 (create_array_refs): Likewise.
5294 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5295 Also modularized common parts between functions and called the function.
5296 (build_array_notation_expr): Likewise.
5297 (fix_conditional_array_notations_1): Likewise.
5298 (fix_array_notation_expr): Likewise.
5299 (fix_array_notation_call_expr): Likewise.
5300
5301 2013-06-18 Marek Polacek <polacek@redhat.com>
5302
5303 PR c/57630
5304 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5305
5306 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5307
5308 * c-array-notation.c (build_array_notation_expr): Reject array notation
5309 mismatch between LHS and RHS even inside a call_expr. Also, removed
5310 a couple while statements that were dead code.
5311
5312 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5313
5314 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5315 excessive precision expressions in function parameters. Also removed
5316 couple unwanted while statements.
5317
5318 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5319
5320 * c-array-notation.c (expand_array_notation_exprs): Added
5321 ARRAY_NOTATION_REF case.
5322
5323 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5324
5325 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5326 function to c-family/array-notation-common.c.
5327 (is_cilkplus_reduce_builtin): Likewise.
5328 (find_rank): Likewise.
5329 (extract_array_notation_exprs): Likewise.
5330 (replace_array_notations): Likewise.
5331 (find_inv_trees): Likewise.
5332 (replace_inv_trees): Likewise.
5333 (contains_array_notation_expr): Likewise.
5334 (find_correct_array_notation_type): Likewise.
5335 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5336 (struct inv_list): Moved this to c-family/array-notation-common.c.
5337 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5338
5339 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5340
5341 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5342 reduction functions outside the for-loop. Added a check if the fundecl
5343 is non-NULL. Finally, removed an unwanted if-statement, and made the
5344 body unconditional.
5345
5346 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5347
5348 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5349 condition of the if-statement matches the rank of else-block and then-
5350 block when array notations are used.
5351 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5352 expression after the entire function body is parsed.
5353 (c_parser_expr_no_commas): Delayed creating array notation expressions
5354 to the end of function parsing.
5355 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5356 whole if-statement instead of just the condition.
5357 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5358
5359 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5360
5361 PR c/57474
5362 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5363 array to NULL_TREE if they are unused. Also added a check for the
5364 field to be NULL before its fields are used in future.
5365
5366 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5367
5368 PR bootstrap/57450
5369 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5370 (build_array_notation_expr): Likewise.
5371
5372 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5373
5374 * c-typeck.c (build_array_ref): Added a check to see if array's
5375 index is greater than one. If true, then emit an error.
5376 (build_function_call_vec): Exclude error reporting and checking
5377 for builtin array-notation functions.
5378 (convert_arguments): Likewise.
5379 (c_finish_return): Added a check for array notations as a return
5380 expression. If true, then emit an error.
5381 (c_finish_loop): Added a check for array notations in a loop
5382 condition. If true then emit an error.
5383 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5384 (build_binary_op): Added a check for array notation expr inside
5385 op1 and op0. If present, we call another function to find correct
5386 type.
5387 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5388 * c-parser.c (c_parser_compound_statement): Check if array
5389 notation code is used in tree, if so, then transform them into
5390 appropriate C code.
5391 (c_parser_expr_no_commas): Check if array notation is used in LHS
5392 or RHS, if so, then build array notation expression instead of
5393 regular modify.
5394 (c_parser_postfix_expression_after_primary): Added a check for
5395 colon(s) after square braces, if so then handle it like an array
5396 notation. Also, break up array notations in unary op if found.
5397 (c_parser_direct_declarator_inner): Added a check for array
5398 notation.
5399 (c_parser_compound_statement): Added a check for array notation in
5400 a stmt. If one is present, then expand array notation expr.
5401 (c_parser_if_statement): Likewise.
5402 (c_parser_switch_statement): Added a check for array notations in
5403 a switch statement's condition. If true, then output an error.
5404 (c_parser_while_statement): Similarly, but for a while.
5405 (c_parser_do_statement): Similarly, but for a do-while.
5406 (c_parser_for_statement): Similarly, but for a for-loop.
5407 (c_parser_unary_expression): Check if array notation is used in a
5408 pre-increment or pre-decrement expression. If true, then expand
5409 them.
5410 (c_parser_array_notation): New function.
5411 * c-array-notation.c: New file.
5412 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5413
5414 2013-05-23 Mike Stump <mikestump@comcast.net>
5415
5416 * c-typeck.c (convert_for_assignment): Handle references to memory
5417 spaces better.
5418
5419 2013-05-16 Jason Merrill <jason@redhat.com>
5420
5421 * Make-lang.in (cc1$(exeext)): Use link mutex.
5422
5423 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5424
5425 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5426 to simply use OPT_Wpointer_arith.
5427 (build_unary_op): Likewise.
5428
5429 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5430
5431 PR c/19449
5432 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5433 argument. If set, or it temporarily for parsing of the first
5434 argument into force_folding_builtin_constant_p.
5435 (c_parser_postfix_expression): Adjust callers.
5436
5437 2013-03-21 Richard Biener <rguenther@suse.de>
5438
5439 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5440 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5441
5442 2013-02-12 Marek Polacek <polacek@redhat.com>
5443
5444 PR c/44938
5445 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5446 origtypes to NULL.
5447
5448 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5449
5450 PR c/56078
5451 * c-typeck.c (set_nonincremental_init_from_string): If
5452 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5453 returned false.
5454 (process_init_element): Likewise.
5455
5456 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5457
5458 PR c++/55619
5459 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5460 argument, don't call default_function_array_conversion
5461 nor c_fully_fold here.
5462 (c_parser_asm_statement): Adjust callers.
5463 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5464 and outputs here, and call default_function_array_conversion
5465 on inputs that don't need to be addressable.
5466
5467 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5468
5469 PR c/39464
5470 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5471 warning require that both c_common_unsigned_type as well as
5472 c_common_signed_type is the same for both mvl and mvr types.
5473
5474 2012-11-16 Diego Novillo <dnovillo@google.com>
5475
5476 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5477
5478 * c-common.c: Use new vec API in vec.h.
5479 * c-common.h: Likewise.
5480 * c-gimplify.c: Likewise.
5481 * c-pragma.c: Likewise.
5482 * c-pretty-print.c: Likewise.
5483 * c-pretty-print.h: Likewise.
5484 * c-semantics.c: Likewise.
5485 * c-decl.c: Likewise.
5486 * c-parser.c: Likewise.
5487 * c-tree.h: Likewise.
5488 * c-typeck.c: Likewise.
5489
5490 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5491
5492 PR c++/54930
5493 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5494
5495 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5496
5497 PR c/53066
5498 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5499 shadows a function, unless the variable is a function or a
5500 pointer-to-function.
5501
5502 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5503
5504 PR c/54381
5505 * c-parser.c (struct c_tree_loc_pair): Removed.
5506 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5507 add location_t * and tree * arguments, fill in array of 3
5508 sizeof_arg trees and corresponding locs.
5509 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5510 c_parser_expr_list callers.
5511 (c_parser_postfix_expression_after_primary): Likewise. Pass
5512 array of 3 sizeof_arg trees and locs (corresponding to first
5513 3 arguments) to sizeof_pointer_memaccess_warning.
5514
5515 2012-10-09 Lawrence Crowl <crowl@google.com>
5516
5517 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5518 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5519 hash table.
5520
5521 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5522
5523 PR c++/54194
5524 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5525 call.
5526
5527 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5528
5529 PR c++/54427
5530 * c-typeck.c: Include c-common.h.
5531 (enum stv_conv): Moved to c-common.h.
5532 (scalar_to_vector): Moved to c-common.c.
5533 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5534 * Make-lang.in: c-typeck.c depends on c-common.h.
5535
5536 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5537
5538 * c-decl.c (c_write_global_declarations): Fix handling of
5539 -fdump-ada-spec*.
5540
5541 2012-09-30 Sharad Singhai <singhai@google.com>
5542
5543 * c-decl.c (c_write_global_declarations): Use a different method
5544 to determine if the dump has ben initialized.
5545
5546 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5547
5548 PR c/54552
5549 * c-typeck.c (c_cast_expr): When casting to a type requiring
5550 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5551 c_fully_fold first.
5552
5553 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5554
5555 PR c/54103
5556 * c-typeck.c (build_unary_op): Pass original argument of
5557 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5558 any C_MAYBE_CONST_EXPR, if it has integer operands.
5559 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5560 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5561 to c_objc_common_truthvalue_conversion, then remove any
5562 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5563 c_objc_common_truthvalue_conversion not
5564 c_common_truthvalue_conversion.
5565 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5566 call note_integer_operands for arguments with integer operands
5567 that are not integer constants.
5568
5569 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5570
5571 PR c/54559
5572 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5573 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5574
5575 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5576
5577 PR c/54428
5578 * c-convert.c (convert): Don't call fold_convert_loc if
5579 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5580 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5581 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5582
5583 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5584
5585 PR c/54355
5586 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5587 for nested and empty_ok arguments in the call to
5588 c_parser_declaration_or_fndef.
5589
5590 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5591
5592 * c-tree.h (c_last_sizeof_arg): Declare.
5593 * c-parser.c (struct c_tree_loc_pair): New type.
5594 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5595 non-NULL.
5596 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5597 (c_parser_postfix_expression_after_primary): Likewise. Call
5598 sizeof_pointer_memaccess_warning if needed.
5599 (sizeof_ptr_memacc_comptypes): New function.
5600 * c-typeck.c (c_last_sizeof_arg): New global variable.
5601 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5602
5603 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5604
5605 * c-lang.h (lang_decl): Add variable_size GTY option.
5606
5607 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5608
5609 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5610 * Make-lang.in: Fix dependencies.
5611
5612 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5613
5614 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5615 and add language Makefile hooks.
5616 * config-lang.in: New file.
5617 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5618 add the required "normal" config-lang.in rules.
5619 * c-lang.h: Moved from gcc/ to here.
5620 * c-tree.h: Likewise.
5621 * c-objc-common.c: Likewise.
5622 * c-objc-common.h: Likewise.
5623 * c-typeck.c: Likewise.
5624 * c-convert.c: Likewise.
5625 * c-lang.c: Likewise.
5626 * c-aux-info.c: Likewise.
5627 * c-errors.c: Likewise.
5628 * gccspec.c: Likewise.
5629 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5630 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5631 \f
5632 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5633
5634 Copying and distribution of this file, with or without modification,
5635 are permitted in any medium without royalty provided the copyright
5636 notice and this notice are preserved.