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