]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Improve switch code emission for a balanced tree (PR tree-optimization/86847).
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
bc35ef65 12018-08-20 David Malcolm <dmalcolm@redhat.com>
2
3 PR other/84889
4 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
5 (diagnose_mismatched_decls): Likewise, in various places.
6 (warn_if_shadowing): Likewise.
7 (implicit_decl_warning): Likewise.
8 (implicitly_declare): Likewise.
9 (undeclared_variable): Likewise.
10 (declare_label): Likewise.
11 (grokdeclarator): Likewise.
12 (start_function): Likewise.
13 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
14 (c_parser_parameter_declaration): Likewise.
15 (c_parser_binary_expression): Likewise.
16 * c-typeck.c (c_expr_sizeof_expr): Likewise.
17 (parser_build_binary_op): Likewise.
18 (build_unary_op): Likewise.
19 (error_init): Likewise.
20 (pedwarn_init): Likewise.
21 (warning_init): Likewise.
22 (convert_for_assignment): Likewise.
23
b7bb5264 242018-08-15 David Malcolm <dmalcolm@redhat.com>
25
26 * c-objc-common.c: Include "gcc-rich-location.h".
27 (c_tree_printer): Move implemenation of '%T' to...
28 (print_type): ...this new function.
29 (range_label_for_type_mismatch::get_text): New function.
30 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
31 range for the various ic_argpass cases.
32 (class maybe_range_label_for_tree_type_mismatch): New class.
33 (build_binary_op): Use it when calling binary_op_error.
34
11e1dba8 352018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
36
37 * c-decl.c (start_decl): Do not warn if variables is named as main
38 and is a local variable.
39
55a9a5ee 402018-08-15 Iain Sandoe <iain@sandoe.co.uk>
41
42 PR c/19315
43 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
44 objects of unknown size.
45
b2fc0527 462018-08-13 Martin Sebor <msebor@redhat.com>
47
48 PR tree-optimization/71625
49 * c-parser.c (c_parser_declaration_or_fndef): Call
50 braced_list_to_string.
51
40eafc9b 522018-08-03 Bogdan Harjoc <harjoc@gmail.com>
53
54 PR c/86690
55 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
56 errors.
57
a2e93b74 582018-08-01 Martin Sebor <msebor@redhat.com>
59
60 PR tree-optimization/86650
61 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
62 and TREE_BLOCK (t) from within percent_K_format to this callsite.
63
c1e4a7a5 642018-08-01 Jakub Jelinek <jakub@redhat.com>
65
66 PR c/85704
67 * c-typeck.c (init_field_decl_cmp): New function.
68 (output_pending_init_elements): Use it for field comparisons
69 instead of pure bit_position comparisons.
70
12f69ea4 712018-07-12 Jakub Jelinek <jakub@redhat.com>
72
73 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
74 type here, instead add "omp declare target implicit" attribute.
75 (finish_decl): Diagnose vars without mappable type here.
76
737cc978 772018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
78 Thomas Schwinge <thomas@codesourcery.com>
79 Cesar Philippidis <cesar@codesourcery.com>
80
81 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
82 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
83 to their non-present_or_* counterparts. Make 'self' an alias to
84 PRAGMA_OACC_CLAUSE_HOST.
85 (c_parser_oacc_data_clause): Update GOMP mappings for
86 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
87 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
88 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
89 Remove support for present_or_* clauses.
90 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
91 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
92 (OACC_DECLARE_CLAUSE_MASK): Likewise.
93 (OACC_DATA_CLAUSE_MASK): Likewise.
94 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
95 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
96 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
97 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
98 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
99
1c67942e 1002018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
101
102 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
103 * gimple-parser.c (c_parser_gimple_statement): Likewise.
104 (c_parser_gimple_unary_expression): Likewise.
105
0245ae71 1062018-06-15 Jakub Jelinek <jakub@redhat.com>
107
108 PR c/86093
109 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
110 before doing POINTER_DIFF_EXPR.
111
daca26ed 1122018-06-07 Marek Polacek <polacek@redhat.com>
113
114 PR c/85318
115 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
116 for loop initial declarations.
117
768cc20e 1182018-05-30 David Pagan <dave.pagan@oracle.com>
119
120 PR c/55976
121 * c-decl.c (grokdeclarator): Update check for return type warnings.
122 (start_function): Likewise.
123 (finish_function): Likewise.
124 * c-typeck.c (c_finish_return): Update check for return type warnings.
125 Pass OPT_Wreturn_type to pedwarn when appropriate.
126
143c3c9a 1272018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
128
129 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
130 __FMA_EXPR handlng.
131
0fe3dc7e 1322018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
133
134 * gimple-parser.c: Include internal-fn.h.
135 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
136 (c_parser_gimple_call_internal): New function.
137 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
138 Fix typos in comment.
139
3c43ed34 1402018-05-10 Jakub Jelinek <jakub@redhat.com>
141
142 PR c++/85662
143 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
144 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
145 fold_convert_loc.
146 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
147 fold_offsetof_1, pass argtype as TYPE to it and drop the
148 fold_convert_loc.
149
2fe6a798 1502018-05-02 David Pagan <dave.pagan@oracle.com>
151
152 PR c/30552
153 * c-decl.c (old_style_parameter_scope): New function.
154 * c-parser.c (c_parser_postfix_expression): Check for statement
155 expressions in old-style function parameter list declarations.
156 * c-parser.h (old_style_parameter_scope): New extern declaration.
157
be4b81f3 1582018-04-25 Jakub Jelinek <jakub@redhat.com>
159
160 PR sanitizer/84307
161 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
162 it is not TREE_STATIC.
163 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
164 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
165 its COMPOUND_LITERAL_EXPR_DECL.
166
f9f5e9c3 1672018-03-21 Joseph Myers <joseph@codesourcery.com>
168
169 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
170 where all functions return the same _FloatN or _FloatNx type,
171 treat integer types as _Float64 instead of double.
172
86f1f5d1 1732018-03-21 Jakub Jelinek <jakub@redhat.com>
174
175 PR c/84999
176 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
177 building vector comparison, diagnose it and return error_mark_node.
178
9040bba5 1792018-03-15 Jakub Jelinek <jakub@redhat.com>
180
181 PR c/84853
182 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
183 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
184 INTEGER_TYPE element type.
185
1b2ff8ae 1862018-03-13 David Pagan <dave.pagan@oracle.com>
187
188 PR c/46921
189 * c-typeck.c (output_init_element): Ensure field initializer
190 expression is always evaluated if there are side effects.
191
bda84b10 1922018-03-06 Jakub Jelinek <jakub@redhat.com>
193
194 PR c/84721
195 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
196 !building_stmt_list_p ().
197
20ebaa3d 1982018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
199
200 PR c/84305
201 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
202 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
203 and include the BIND_EXPR in the list of things that need to be
204 pre-evaluated.
205
d9757bb6 2062018-02-09 Nathan Sidwell <nathan@acm.org>
207
208 PR c/84293
209 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
210 to strict_aliasing_warning.
211
3cde3c29 2122018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
213
214 * c-typeck.c (really_start_incremental_init, push_init_level,
215 set_nonincremental_init, output_init_element, process_init_element):
216 Use DECL_UNNAMED_BIT_FIELD.
217
d3af137c 2182018-01-31 Marek Polacek <polacek@redhat.com>
219
220 PR c/81779
221 * c-parser.c (c_parser_compound_statement_nostart): Call
222 expansion_point_location_if_in_system_header.
223
510e5f39 2242018-01-17 David Malcolm <dmalcolm@redhat.com>
225
226 PR c++/83814
227 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
228 the C part.
229
eb2fdcf5 2302018-01-13 Jakub Jelinek <jakub@redhat.com>
231
232 PR c/83801
233 * c-tree.h (decl_constant_value_1): Add a bool argument.
234 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
235 returning a CONSTRUCTOR if it is true. Use error_operand_p.
236 (decl_constant_value): Adjust caller.
237 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
238 decl_constant_value_1 as IN_INIT. Otherwise, punt if
239 decl_constant_value returns initializer that has BLKmode or
240 array type.
241 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
242
f08ee65f 2432018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
244 Alan Hayward <alan.hayward@arm.com>
245 David Sherwood <david.sherwood@arm.com>
246
247 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
248 TYPE_VECTOR_SUBPARTS.
249
8e8f6434 2502018-01-03 Jakub Jelinek <jakub@redhat.com>
251
252 Update copyright years.
253
90e1517e 2542018-01-01 Jakub Jelinek <jakub@redhat.com>
255
256 PR c/83595
257 * c-parser.c (c_parser_braced_init, c_parser_initelt,
258 c_parser_conditional_expression, c_parser_cast_expression,
259 c_parser_sizeof_expression, c_parser_alignof_expression,
260 c_parser_postfix_expression, c_parser_omp_declare_reduction,
261 c_parser_transaction_expression): Use set_error () method instead
262 of setting value member to error_mark_node.
263
054e9558 2642017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
265
266 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
267 and _Float<N>X built-in functions.
268
2ea33951 2692017-12-22 Jakub Jelinek <jakub@redhat.com>
270
be7ed04d 271 PR debug/83550
272 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
273 TYPE_STUB_DECL and call rest_of_type_compilation before processing
274 incomplete vars rather than after it.
275
2ea33951 276 PR debug/83547
277 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
278 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
279 and consider empty ones if there are no other stmts. For
280 -Wunused-value walk all statements before the one only followed by
281 DEBUG_BEGIN_STMTs.
282
82841c8f 2832017-12-22 Mike Stump <mikestump@comcast.net>
284 Eric Botcazou <ebotcazou@adacore.com>
285
286 * c-parser.c (c_parser_while_statement): Add unroll parameter and
287 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
288 (c_parser_do_statement): Likewise.
289 (c_parser_for_statement): Likewise.
290 (c_parser_statement_after_labels): Adjust calls to above.
291 (c_parse_pragma_ivdep): New static function.
292 (c_parser_pragma_unroll): Likewise.
293 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
294 <PRAGMA_UNROLL>: New case.
295
c9281ef8 2962017-12-19 Jakub Jelinek <jakub@redhat.com>
297
298 * c-typeck.c (comptypes_internal, function_types_compatible_p,
299 perform_integral_promotions, digest_init): Replace Yoda conditions
300 with typical order conditions.
301 * c-decl.c (check_bitfield_type_and_width): Likewise.
302
d76c514d 3032017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
304
305 * c-typeck.c (c_safe_arg_type_equiv_p,
306 c_safe_function_type_cast_p): New function.
307 (build_c_cast): Implement -Wcast-function-type.
308
00e92272 3092017-12-14 Richard Biener <rguenther@suse.de>
310
311 PR c/83415
312 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
313 like REALPART_EXPR for the behavior of whether its operand
314 is an lvalue.
315
a7625351 3162017-12-12 Marek Polacek <polacek@redhat.com>
317
318 PR c/82679
319 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
320
90567983 3212017-12-12 Alexandre Oliva <aoliva@redhat.com>
322
323 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
324 * c-parser.c (add_debug_begin_stmt): New.
325 (c_parser_declaration_or_fndef): Call it.
326 (c_parser_compound_statement_nostart): Likewise.
327 (c_parser_statement_after_labels): Likewise.
328 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
329
a52dedf5 3302017-12-07 Joseph Myers <joseph@codesourcery.com>
331
332 * c-decl.c (build_compound_literal): Add parameter alignas_align
333 and set alignment of decl if nonzero.
334 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
335 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
336 qualifier.
337 (c_parser_struct_declaration): Update syntax comment.
338 (c_parser_type_name): Add alignas_ok argument and pass it to
339 c_parser_declspecs.
340 (c_parser_cast_expression): Pass true to c_parser_type_name and
341 give error if a cast used an _Alignas specifier.
342 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
343 give error if sizeof (type-name) used an _Alignas specifier.
344 (c_parser_alignof_expression): Pass true to c_parser_type_name and
345 give error if _Alignof (type-name) used an _Alignas specifier.
346 (c_parser_postfix_expression_after_paren_type): Check specified
347 alignment for a compound literal and pass it to
348 build_compound_literal.
349 * c-parser.h (c_parser_type_name): Update prototype.
350 * c-tree.h (build_compound_literal): Update prototype.
351
dab0e385 3522017-12-07 Martin Sebor <msebor@redhat.com>
353
354 PR c/81544
355 * c-decl.c (c_decl_attributes): Look up existing declaration and
356 pass it to decl_attributes.
357
08233401 3582017-12-06 David Malcolm <dmalcolm@redhat.com>
359
360 PR c/83236
361 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
362 reserved for use by the implementation.
363
aa0e50a0 3642017-12-06 David Malcolm <dmalcolm@redhat.com>
365
366 * c-decl.c: Include "c-family/c-spellcheck.h".
367
eabe2d94 3682017-12-05 Martin Liska <mliska@suse.cz>
369 Jakub Jelinek <jakub@redhat.com>
370
371 * c-typeck.c (pointer_diff): Add new argument and instrument
372 pointer subtraction.
373 (build_binary_op): Similar for pointer comparison.
374
a8f15ac7 3752017-12-01 Jakub Jelinek <jakub@redhat.com>
376
17cf92d6 377 PR c/79153
378 * c-parser.c: Include tree-iterator.h.
379 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
380 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
381 on it.
382
a8f15ac7 383 PR c/83222
384 * c-tree.h (decl_constant_value_1): Declare.
385 * c-typeck.c (decl_constant_value_1): New function.
386 (decl_constant_value): Use it.
387 * c-fold.c (c_fully_fold_internal): If in_init, use
388 decl_constant_value_1 instead of decl_constant_value.
389
7f38a6aa 3902017-11-30 Jakub Jelinek <jakub@redhat.com>
391
392 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
393
dfa10f0d 3942017-11-28 Jakub Jelinek <jakub@redhat.com>
395
396 PR sanitizer/81275
397 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
398 c_switch_covers_all_cases_p returns true.
399
efa02472 4002017-11-28 Julia Koval <julia.koval@intel.com>
401 Sebastian Peryt <sebastian.peryt@intel.com>
402
403 * Make-lang.in (c/c-array-notation.o): Remove.
404 * c-array-notation.c: Delete.
405 * c-decl.c: Remove cilkplus condition.
406 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
407 c_parser_cilk_verify_simd, c_parser_array_notation,
408 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
409 c_parser_cilk_simd_fn_vector_attrs,
410 c_finish_cilk_simd_fn_tokens): Delete.
411 (c_parser_declaration_or_fndef): Remove cilkplus condition.
412 (c_parser_direct_declarator_inner): Ditto.
413 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
414 (c_parser_attributes, c_parser_compound_statement,
415 c_parser_statement_after_labels, c_parser_if_statement,
416 c_parser_switch_statement, c_parser_while_statement,
417 c_parser_do_statement, c_parser_for_statement,
418 c_parser_unary_expression, c_parser_postfix_expression,
419 c_parser_postfix_expression_after_primary,
420 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
421 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
422 support.
423 * c-typeck.c (build_array_ref, build_function_call_vec,
424 convert_arguments,
425 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
426 c_finish_loop, build_binary_op): Remove cilkplus support.
427
bd37ce3e 4282017-11-28 Jakub Jelinek <jakub@redhat.com>
429
430 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
431 of build3.
432
864319e6 4332017-11-14 Boris Kolpackov <boris@codesynthesis.com>
434
435 * Make-lang.in (c.install-plugin): Install backend import library.
436
59b23ab9 4372017-11-23 Jakub Jelinek <jakub@redhat.com>
438
439 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
440 pragma_stmt context.
441
2a09b28c 4422017-11-23 Mike Stump <mikestump@comcast.net>
443 Eric Botcazou <ebotcazou@adacore.com>
444
445 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
446 ANNOTATE_EXPR.
447 (c_parser_do_statement): Likewise.
448 (c_parser_for_statement): Likewise.
449
8e4391a5 4502017-11-22 David Malcolm <dmalcolm@redhat.com>
451
452 PR c++/62170
453 * c-objc-common.c (c_tree_printer): Convert penultimate param from
454 bool to bool *. Within '%T' handling, if showing an "aka", use
455 "quoted" param to add appropriate quoting.
456
532d84ff 4572017-11-22 Marek Polacek <polacek@redhat.com>
458
459 PR c++/60336
460 PR middle-end/67239
461 PR target/68355
462 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
463
b8a6d52b 4642017-11-21 David Malcolm <dmalcolm@redhat.com>
465
466 PR c/83056
467 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
468 earlier failed lookups.
469
57e83b58 4702017-11-21 Marc Glisse <marc.glisse@inria.fr>
471
472 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
473 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
474
145fb49f 4752017-11-20 David Malcolm <dmalcolm@redhat.com>
476
477 PR c/81404
478 * c-decl.c: Include "c-family/known-headers.h".
479 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
480 to known-headers.cc.
481 (class suggest_missing_header): Move to known-header.h.
482 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
483 than get_c_name_hint.
484
0911a8d3 4852017-11-20 David Malcolm <dmalcolm@redhat.com>
486
487 * c-decl.c (get_c_name_hint): New function.
488 (class suggest_missing_header): New class.
489 (lookup_name_fuzzy): Call get_c_name_hint and use it to
490 suggest missing headers to the user.
491
dd008336 4922017-11-20 David Malcolm <dmalcolm@redhat.com>
493
494 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
495 Include "c-family/name-hint.h"
496 (implicit_decl_warning): Convert "hint" from
497 const char * to name_hint. Pass location to
498 lookup_name_fuzzy. Suppress any deferred diagnostic if the
499 warning was not printed.
500 (undeclared_variable): Likewise for "guessed_id".
501 (lookup_name_fuzzy): Convert return type from const char *
502 to name_hint. Add location_t param.
503 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
504 Include "c-family/name-hint.h"
505 (c_parser_declaration_or_fndef): Convert "hint" from
506 const char * to name_hint. Pass location to lookup_name_fuzzy.
507 (c_parser_parameter_declaration): Likewise.
508
69cd03b2 5092017-11-19 Jakub Jelinek <jakub@redhat.com>
510
511 PR c/66618
512 PR c/69960
513 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
514 where needed.
515 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
516 handle_omp_array_sections): Likewise.
517 (digest_init): Don't call decl_constant_value_for_optimization.
518 * c-tree.h (decl_constant_value_for_optimization): Removed.
519 * c-fold.c (c_fold_array_ref): New function.
520 (c_fully_fold_internal): Add LVAL argument, propagate it through
521 recursive calls. For VAR_P call decl_constant_value and
522 unshare if not LVAL and either optimizing or IN_INIT. Remove
523 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
524 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
525 (c_fully_fold): Add LVAL argument, pass it through to
526 c_fully_fold_internal.
527 (decl_constant_value_for_optimization): Removed.
528
aac64699 5292017-11-15 Joseph Myers <joseph@codesourcery.com>
530
531 PR c/81156
532 * c-parser.c (check_tgmath_function): New function.
533 (enum tgmath_parm_kind): New enum.
534 (c_parser_postfix_expression): Handle __builtin_tgmath.
535
3b6578b3 5362017-10-31 David Malcolm <dmalcolm@redhat.com>
537
538 * c-decl.c (implicit_decl_warning): Update for renaming of
539 pedwarn_at_rich_loc and warning_at_rich_loc.
540 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
541 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
542 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
543 (c_parser_struct_or_union_specifier): Likewise for renaming of
544 pedwarn_at_rich_loc.
545 (c_parser_parameter_declaration): Likewise for renaming of
546 error_at_rich_loc.
547 * c-typeck.c (build_component_ref): Likewise.
548 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
549 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
550 (set_init_label): Likewise for renaming of error_at_rich_loc.
551
c22b2783 5522017-10-30 Richard Biener <rguenther@suse.de>
553
554 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
555 stmts.
556
8c32188e 5572017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
558
559 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
560 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
561
133bd9b8 5622017-10-25 David Malcolm <dmalcolm@redhat.com>
563
564 PR c/7356
565 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
566 semicolons.
567
ac50cb09 5682017-10-25 Jakub Jelinek <jakub@redhat.com>
569
570 PR libstdc++/81706
571 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
572 newdecl to corresponding __builtin_ if any.
573
41ca0095 5742017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
575
576 PR c++/82466
577 * c-decl.c (diagnose_mismatched_decls): Use
578 OPT_Wbuiltin_declaration_mismatch.
579
74578794 5802017-10-12 David Malcolm <dmalcolm@redhat.com>
581
582 * c-parser.c (c_parser_require): Add "type_is_unique" param and
583 use it to guard calls to maybe_suggest_missing_token_insertion.
584 (c_parser_parms_list_declarator): Override default value of new
585 "type_is_unique" param to c_parser_require.
586 (c_parser_asm_statement): Likewise.
587 * c-parser.h (c_parser_require): Add "type_is_unique" param,
588 defaulting to true.
589
3bdf5a5d 5902017-10-11 Nathan Sidwell <nathan@acm.org>
591
592 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
593
e3d0f65c 5942017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
595
596 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
597 operating on trees as wide_ints.
598 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
599 (c_tree_equal): Likewise.
600
b6fde48e 6012017-10-04 David Malcolm <dmalcolm@redhat.com>
602
603 * c-decl.c (push_parm_decl): Store c_parm's location into the
604 PARAM_DECL.
605 (build_c_parm): Add "loc" param and store it within the c_parm.
606 * c-parser.c (struct c_parser): Add "last_token_location" field.
607 (c_parser_consume_token): Store location of the token into the
608 new field.
609 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
610 when handling a FUNCTION_DECL, if it doesn't already have them.
611 (c_parser_parameter_declaration): Generate a location for the
612 parameter, and pass it to the call to build_c_parm.
613 * c-tree.h (struct c_parm): Add field "loc".
614 (build_c_parm): Add location_t param.
615 * c-typeck.c (get_fndecl_argument_location): New function.
616 (inform_for_arg): New function.
617 (convert_for_assignment): Use inform_for_arg when dealing with
618 ic_argpass.
619
e786f452 6202017-09-29 Jakub Jelinek <jakub@redhat.com>
621
52f26f82 622 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
623 width is non-NULL.
624 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
625 don't SET_DECL_C_BIT_FIELD here.
626
e786f452 627 PR c/82340
628 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
629 instead of trying to set just TREE_READONLY manually.
630
93b7a91b 6312017-09-16 Tom de Vries <tom@codesourcery.com>
632
633 PR c/81875
634 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
635 cond itself.
636
3507457a 6372017-09-15 Joseph Myers <joseph@codesourcery.com>
638
639 PR c/82071
640 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
641 for C11.
642 (build_conditional_expr): For C11, generate result with excess
643 precision when one argument is an integer and the other is of a
644 type using excess precision.
645
7ceee42d 6462017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
647
648 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
649
2be90a05 6502017-09-13 Marek Polacek <polacek@redhat.com>
651
652 PR c/82167
653 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
654 than expr.original_type.
655
daf40ee6 6562017-09-12 Nathan Sidwell <nathan@acm.org>
657
658 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
659 resort_sorted_fields): Moved from c-family/c-common.c.
660 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
661
de7757ed 6622017-09-01 Joseph Myers <joseph@codesourcery.com>
663
664 PR c/82071
665 * c-typeck.c (build_atomic_assign): Handle argument with excess
666 precision. Ensure any EXCESS_PRECISION_EXPR is present in
667 argument passed to build_binary_op and convert_for_assignment but
668 not for call to c_fully_fold.
669 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
670 Ensure build_binary_op is called with argument with original
671 semantic type. Avoid calling c_fully_fold with an
672 EXCESS_PRECISION_EXPR from build_binary_op.
673
1e52a582 6742017-09-01 Jakub Jelinek <jakub@redhat.com>
675
676 PR c/81887
677 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
678
3d2b0034 6792017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
680 Alan Hayward <alan.hayward@arm.com>
681 David Sherwood <david.sherwood@arm.com>
682
683 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
684 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
685 m1 and m2 to the signed equivalent of a fixed-point
686 SCALAR_TYPE_MODE.
687
0bdd7941 6882017-08-24 David Malcolm <dmalcolm@redhat.com>
689
690 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
691 than CAN_HAVE_LOCATION_P when determining whether to use the
692 location_t value within "value".
693
43f0de17 6942017-08-21 David Malcolm <dmalcolm@redhat.com>
695
696 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
697 rather than peeking the location of the first token.
698 * c-tree.h (c_expr::get_location): New method.
699
a115c319 7002017-08-21 David Malcolm <dmalcolm@redhat.com>
701
702 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
703 to check_function_arguments.
704
23bafc2f 7052017-08-18 Marek Polacek <polacek@redhat.com>
706
707 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
708 commentary.
709
4bec7283 7102017-08-18 H.J. Lu <hongjiu.lu@intel.com>
711
712 PR c/53037
713 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
714 (check_bitfield_type_and_width): Don't allow bit-field with
715 warn_if_not_aligned type.
716
c8616982 7172017-08-14 Martin Sebor <msebor@redhat.com>
718
719 PR c/81117
720 * c-objc-common.c (c_objc_common_init): Handle 'G'.
721
0eb79e8b 7222017-08-11 Marek Polacek <polacek@redhat.com>
723
724 PR c/81795
725 * c-decl.c (pushtag): Only print inform if the warning was printed.
726 (grokdeclarator): Likewise.
727
3fe34694 7282017-08-10 David Malcolm <dmalcolm@redhat.com>
729
730 * c-parser.c (c_parser_error): Rename to...
731 (c_parser_error_richloc): ...this, making static, and adding
732 "richloc" parameter, passing it to the c_parse_error call,
733 rather than calling c_parser_set_source_position_from_token.
734 (c_parser_error): Reintroduce, reimplementing in terms of the
735 above, converting return type from void to bool.
736 (class token_pair): New class.
737 (struct matching_paren_traits): New struct.
738 (matching_parens): New typedef.
739 (struct matching_brace_traits): New struct.
740 (matching_braces): New typedef.
741 (get_matching_symbol): New function.
742 (c_parser_require): Add param MATCHING_LOCATION, using it to
743 highlight matching "opening" tokens for missing "closing" tokens.
744 (c_parser_skip_until_found): Likewise.
745 (c_parser_static_assert_declaration_no_semi): Convert explicit
746 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
747 class matching_parens, so that the pertinent open parenthesis is
748 highlighted when there are problems locating the close
749 parenthesis.
750 (c_parser_struct_or_union_specifier): Likewise.
751 (c_parser_typeof_specifier): Likewise.
752 (c_parser_alignas_specifier): Likewise.
753 (c_parser_simple_asm_expr): Likewise.
754 (c_parser_braced_init): Likewise, for matching_braces.
755 (c_parser_paren_condition): Likewise, for matching_parens.
756 (c_parser_switch_statement): Likewise.
757 (c_parser_for_statement): Likewise.
758 (c_parser_asm_statement): Likewise.
759 (c_parser_asm_operands): Likewise.
760 (c_parser_cast_expression): Likewise.
761 (c_parser_sizeof_expression): Likewise.
762 (c_parser_alignof_expression): Likewise.
763 (c_parser_generic_selection): Likewise.
764 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
765 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
766 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
767 In case CPP_OPEN_PAREN, pass loc_open_paren to the
768 c_parser_skip_until_found call.
769 (c_parser_objc_class_definition): Use class matching_parens as
770 above.
771 (c_parser_objc_method_decl): Likewise.
772 (c_parser_objc_try_catch_finally_statement): Likewise.
773 (c_parser_objc_synchronized_statement): Likewise.
774 (c_parser_objc_at_property_declaration): Likewise.
775 (c_parser_oacc_wait_list): Likewise.
776 (c_parser_omp_var_list_parens): Likewise.
777 (c_parser_omp_clause_collapse): Likewise.
778 (c_parser_omp_clause_default): Likewise.
779 (c_parser_omp_clause_if): Likewise.
780 (c_parser_omp_clause_num_threads): Likewise.
781 (c_parser_omp_clause_num_tasks): Likewise.
782 (c_parser_omp_clause_grainsize): Likewise.
783 (c_parser_omp_clause_priority): Likewise.
784 (c_parser_omp_clause_hint): Likewise.
785 (c_parser_omp_clause_defaultmap): Likewise.
786 (c_parser_oacc_single_int_clause): Likewise.
787 (c_parser_omp_clause_ordered): Likewise.
788 (c_parser_omp_clause_reduction): Likewise.
789 (c_parser_omp_clause_schedule): Likewise.
790 (c_parser_omp_clause_num_teams): Likewise.
791 (c_parser_omp_clause_thread_limit): Likewise.
792 (c_parser_omp_clause_aligned): Likewise.
793 (c_parser_omp_clause_linear): Likewise.
794 (c_parser_omp_clause_safelen): Likewise.
795 (c_parser_omp_clause_simdlen): Likewise.
796 (c_parser_omp_clause_depend): Likewise.
797 (c_parser_omp_clause_map): Likewise.
798 (c_parser_omp_clause_device): Likewise.
799 (c_parser_omp_clause_dist_schedule): Likewise.
800 (c_parser_omp_clause_proc_bind): Likewise.
801 (c_parser_omp_clause_uniform): Likewise.
802 (c_parser_omp_for_loop): Likewise.
803 (c_parser_cilk_clause_vectorlength): Likewise.
804 (c_parser_cilk_clause_linear): Likewise.
805 (c_parser_transaction_expression): Likewise.
806 * c-parser.h (c_parser_require): Add param matching_location with
807 default UNKNOWN_LOCATION.
808 (c_parser_error): Convert return type from void to bool.
809 (c_parser_skip_until_found): Add param matching_location with
810 default UNKNOWN_LOCATION.
811
623ee358 8122017-08-09 Marek Polacek <polacek@redhat.com>
813
814 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
815 * c-tree.h (build_external_ref): Update declaration.
816 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
817 (build_external_ref): Change the type of a parameter to bool.
818 (parser_build_binary_op): Use true/false instead of 1/0.
819 (pointer_diff): Likewise.
820 (build_modify_expr): Likewise.
821 (set_designator): Change the type of a parameter to bool.
822 (set_init_index): Use true/false instead of 1/0.
823 (set_init_label): Likewise.
824 (output_init_element): Change the type of a parameter to bool.
825 (output_pending_init_elements): Use true/false instead of 1/0.
826 (process_init_element): Likewise.
827 (build_binary_op): Change the type of a parameter to bool.
828
88539b96 8292017-08-09 Marek Polacek <polacek@redhat.com>
830
831 PR c/81233
832 * c-typeck.c (pedwarn_init): Make the function take a variable list.
833 Call emit_diagnostic_valist instead of pedwarn.
834 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
835 Print the relevant types in diagnostics.
836
cb4d9ee2 8372017-08-09 Marek Polacek <polacek@redhat.com>
838
839 PR c/81417
840 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
841 build_conditional_expr.
842 * c-parser.c (c_parser_conditional_expression): Create locations for
843 EXP1 and EXP2 from their source ranges. Pass the locations down to
844 build_conditional_expr.
845 * c-tree.h (build_conditional_expr): Update declaration.
846 * c-typeck.c (build_conditional_expr): Add location_t parameters.
847 For -Wsign-compare, also print the types.
848
30a86690 8492017-08-08 Martin Liska <mliska@suse.cz>
850
851 * c-convert.c: Include header files.
852 * c-typeck.c: Likewise.
853
1610e7fb 8542017-08-07 Martin Liska <mliska@suse.cz>
855
856 * c-parser.c (c_parser_attributes): Canonicalize name of an
857 attribute.
858
9b184593 8592017-08-02 Marek Polacek <polacek@redhat.com>
860
861 PR c/81289
862 * c-parser.c (c_parser_unary_expression): Use set_error.
863
ef85bba9 864 PR c/81448
865 PR c/81306
866 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
867 warnings. Avoid walking MACRO_MAP_LOCATIONS.
868
38ef3642 8692017-07-31 Jan Hubicka <hubicka@ucw.cz>
870 Martin Liska <mliska@suse.cz>
871
872 * c-typeck.c (c_finish_goto_label): Build gimple predict
9b184593 873 statement.
38ef3642 874
dadc219c 8752017-07-31 Martin Liska <mliska@suse.cz>
876
877 PR sanitize/81530
878 * c-convert.c (convert): Guard condition with flag_sanitize_p
879 also with current_function_decl non-null equality.
880 * c-decl.c (grokdeclarator): Likewise.
881 * c-typeck.c (build_binary_op): Likewise.
882
abec4134 8832017-07-25 Marek Polacek <polacek@redhat.com>
884
885 * c-decl.c (grokfield): Remove local variable.
886
662c96a9 8872017-07-25 Marek Polacek <polacek@redhat.com>
888
889 PR c/81364
890 * c-parser.c (c_parser_else_body): Don't warn about multistatement
891 macro expansion if the body is in { }.
892 (c_parser_while_statement): Likewise.
893 (c_parser_for_statement): Likewise.
894
a8de6c92 8952017-07-18 Nathan Sidwell <nathan@acm.org>
896
897 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
898
7f9c8569 8992017-07-14 David Malcolm <dmalcolm@redhat.com>
900
901 * c-decl.c (implicitly_declare): When suggesting a missing
902 #include, provide a fix-it hint.
903
7051d239 9042017-07-06 David Malcolm <dmalcolm@redhat.com>
905
906 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
907 and call that instead.
908 * c-tree.h (selftest::run_c_tests): New decl.
909
2bfb0686 9102017-06-26 Marek Polacek <polacek@redhat.com>
911
912 PR c/80116
913 * c-parser.c (c_parser_if_body): Set the location of the
914 body of the conditional after parsing all the labels. Call
915 warn_for_multistatement_macros.
916 (c_parser_else_body): Likewise.
917 (c_parser_switch_statement): Likewise.
918 (c_parser_while_statement): Likewise.
919 (c_parser_for_statement): Likewise.
920 (c_parser_statement): Add a default argument. Save the location
921 after labels have been parsed.
922 (c_parser_c99_block_statement): Likewise.
923
edd07ff6 9242017-06-19 Richard Biener <rguenther@suse.de>
925
926 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
927 negated _Literals to parse _Literal (int) -1.
928
9917317a 9292017-06-13 Martin Liska <mliska@suse.cz>
930
931 PR sanitize/78204
932 * c-convert.c (convert): Use sanitize_flags_p.
933 * c-decl.c (grokdeclarator): Likewise.
934 * c-typeck.c (convert_for_assignment): Likewise.
935 (c_finish_return): Likewise.
936 (build_binary_op): Likewise.
937
37ce62dc 9382017-06-08 Jakub Jelinek <jakub@redhat.com>
939
940 PR c/81006
941 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
942 to sizetype before size_binop.
943
73714718 9442017-06-07 Jakub Jelinek <jakub@redhat.com>
945
946 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
947 of TDI_generic.
948
1d1d0f37 9492017-06-06 Marek Polacek <polacek@redhat.com>
950
951 PR c/79983
952 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
953 ref.
954 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
955
0ca70bfd 9562017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
957
958 * c-parser.c (c_parser_binary_expression): Implement the
959 -Wsizeof_pointer_div warning.
960 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
961 from a parenthesized expression.
962 (c_parser_expr_list): Use c_last_sizeof_loc.
963 * c-tree.h (c_last_sizeof_loc): New external.
964 * c-typeck.c (c_last_sizeof_loc): New variable.
965 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
966
8c7a5be5 9672017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
968
969 PR testsuite/80580
970 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
971
4d1eda3a 9722017-05-30 David Malcolm <dmalcolm@redhat.com>
973
974 * c-objc-common.c (c_tree_printer): Gain bool and const char **
975 parameters.
976
645b0f8d 9772017-05-24 Martin Sebor <msebor@redhat.com>
978
979 PR c/80731
980 * c-fold.c (c_fully_fold_internal): Adjust.
981 * c-typeck.c (parser_build_unary_op): Adjust.
982
9d5c2cca 9832017-05-23 Thomas Schwinge <thomas@codesourcery.com>
984
985 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
986 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
987 "VECTOR_LENGTH".
988
50253e07 9892017-05-23 Marek Polacek <polacek@redhat.com>
990
991 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
992 quotes.
993
5c05c939 9942017-05-22 Jakub Jelinek <jakub@redhat.com>
995
996 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
997 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
998 it returned invariant. Call tree_invariant_p unconditionally
999 afterwards to decide whether to return expr or op0.
1000
88df6264 10012017-05-22 Nathan Sidwell <nathan@acm.org>
1002
1003 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1004
6acf639f 10052017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1006
1007 * c-parser.c (c_parser_omp_clause_default): Handle
1008 "OMP_CLAUSE_DEFAULT_PRESENT".
1009
1bccae6b 10102017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1011
1012 * config-lang.in (gtfiles): Add c-family/c-format.c.
1013
8eb8a179 10142017-05-18 Nathan Sidwell <nathan@acm.org>
1015
1016 * c-decl.c (pushdecl_top_level): Delete unused function.
1017
78173203 10182017-05-18 Marek Polacek <polacek@redhat.com>
1019
1020 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1021 (check_earlier_gotos): Likewise.
1022 (define_label): Likewise.
1023 (pending_xref_error): Likewise.
1024 (smallest_type_quals_location): Likewise.
1025 (grokdeclarator): Likewise.
1026 (grokparms): Likewise.
1027 (identifier_global_value): Likewise.
1028 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1029 (find_init_member): Likewise.
1030
2823920b 10312017-05-18 Marek Polacek <polacek@redhat.com>
1032
1033 * c-decl.c (start_decl): Use false/true instead of 0/1.
1034 (grokdeclarator): Likewise.
1035 (finish_struct): Likewise.
1036 (start_function): Change the return type to bool. Use false/true
1037 instead of 0/1.
1038 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1039 * c-tree.h (start_function): Update.
1040 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1041 (set_designator): Change the return type to bool. Use false/true
1042 instead of 0/1.
1043
72749341 10442017-05-17 Marek Polacek <polacek@redhat.com>
1045
1046 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1047 * c-typeck.c: Likewise.
1048
63b8aca5 10492017-05-17 Marek Polacek <polacek@redhat.com>
1050
1051 PR sanitizer/80659
1052 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1053 DECL_IGNORED_P even for non-static compound literals.
1054
3f6e5ced 10552017-05-17 Martin Liska <mliska@suse.cz>
1056
1057 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1058 use it instead of int type.
1059
d0869ea4 10602017-05-17 Marek Polacek <polacek@redhat.com>
1061
1062 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1063 call c_fully_fold.
1064 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1065 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1066 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1067 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1068 save_expr.
1069 (c_parser_conditional_expression): Likewise.
1070 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1071 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1072 (process_init_element): Likewise.
1073 (build_binary_op): Likewise.
1074 (handle_omp_array_sections_1): Likewise.
1075
641fc3ae 10762017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1077
1078 * c-parser.c (c_parser_omp_clause_num_gangs)
1079 (c_parser_omp_clause_num_workers)
1080 (c_parser_omp_clause_vector_length): Merge functions into...
1081 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1082 all users.
1083
930c75f4 10842017-05-11 Nathan Sidwell <nathan@acm.org>
1085
1086 * gimple-parser.c: Don't #include tree-dump.h.
1087
22ba59df 10882017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1089
1090 PR testsuite/80580
1091 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1092
e58d47fc 10932017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1094
1095 PR testsuite/80580
1096 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1097 incorrect __MEM syntax.
1098
a38eda85 10992017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1100
1101 PR testsuite/80580
1102 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1103 type of unary '*'.
1104
cdf05a3f 11052017-05-09 Nathan Sidwell <nathan@acm.org>
1106
1107 * c-tree.h (pushdecl): Declare.
1108
56b8400f 11092017-05-05 David Malcolm <dmalcolm@redhat.com>
1110
1111 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1112 with diagnostic_report_diagnostic.
1113 * c-errors.c (pedwarn_c99): Likewise.
1114 (pedwarn_c90): Likewise.
1115
92bc38e7 11162017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1117
1118 PR c++/80038
1119 * c-gimplify.c (c_gimplify_expr): Remove calls to
1120 cilk_gimplifY_call_params_in_spawned_fn.
1121
112e1c2c 11222017-04-25 David Malcolm <dmalcolm@redhat.com>
1123
1124 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1125 hint for removing extra semicolon.
1126
0b515531 11272017-04-21 Jakub Jelinek <jakub@redhat.com>
1128
1129 PR c/80468
1130 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1131 enabled, set specs->type to integer_type_node.
1132
2fbe7a32 11332017-04-03 Jonathan Wakely <jwakely@redhat.com>
1134
1135 * c-array-notation.c: Fix typo in comment.
1136
3582b9a6 11372017-03-29 Marek Polacek <polacek@redhat.com>
1138
1139 PR c/79730
1140 * c-decl.c (finish_decl): Check VAR_P.
1141
3385a573 11422017-03-27 Jakub Jelinek <jakub@redhat.com>
1143
1144 PR middle-end/80162
1145 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1146 * c-typeck.c (c_mark_addressable): Likewise. Look through
1147 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1148 to ARRAY_TYPE.
1149 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1150
5c1d51e3 11512017-03-23 Marek Polacek <polacek@redhat.com>
1152
1153 * c-tree.h: Remove a C_RID_YYCODE reference.
1154
048100df 11552017-03-21 Jakub Jelinek <jakub@redhat.com>
1156
1157 PR c/80097
1158 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1159 optional COMPOUND_EXPR with ubsan instrumentation.
1160
c153c724 11612017-03-17 Marek Polacek <polacek@redhat.com>
1162
1163 * c-parser.c: Add C11 references.
1164
51eb47a0 11652017-03-15 Marek Polacek <polacek@redhat.com>
1166
1167 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1168
726add0b 11692017-03-11 Marek Polacek <polacek@redhat.com>
1170
1171 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1172
ca1f4c7a 11732017-03-10 David Malcolm <dmalcolm@redhat.com>
1174
1175 PR translation/79848
1176 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1177 "%qs".
1178 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1179
e14b765f 11802017-03-09 Marek Polacek <polacek@redhat.com>
1181
1182 PR sanitizer/79757
1183 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1184 parameter declarations with initializers.
1185
7ad571b2 11862017-03-09 Jakub Jelinek <jakub@redhat.com>
1187
1188 PR c/79969
1189 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1190 TYPE_STUB_DECL.
1191
d87f668a 11922017-03-07 Jakub Jelinek <jakub@redhat.com>
1193
1194 PR c/79834
1195 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1196 for "may only be used in compound statements" diagnostics, change it
1197 such that the same translatable string is used for all pragmas. For
1198 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1199 diagnostics.
1200 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1201 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1202 "may only be used in compound statements" diagnostics, such that the
1203 same translatable string is used for all pragmas.
1204
16b0e324 12052017-03-04 Marek Polacek <polacek@redhat.com>
1206
1207 PR c/79847
1208 * c-decl.c (implicit_decl_warning): Add missing space.
1209
f2360ea5 12102017-03-03 Marek Polacek <polacek@redhat.com>
1211
1212 PR c/79758
1213 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1214 current_function_prototype_arg_types is error_mark_node. Fix
1215 formatting. Use TREE_VALUE instead of TREE_TYPE.
1216
d33f5911 12172017-03-03 Jakub Jelinek <jakub@redhat.com>
1218
408a47b2 1219 PR c/79837
1220 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1221 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1222 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1223 diagnostics.
1224
d33f5911 1225 PR c/79836
1226 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1227 instead of %<_Generic>.
1228 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1229 (c_parser_omp_target_exit_data): Use %<release%> instead of
1230 %<release>.
1231
1caf9cb4 12322017-02-28 Jakub Jelinek <jakub@redhat.com>
1233
1234 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1235 instead of just cond ? "..." : "...".
1236 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1237 for "enter"/"exit" keyword.
1238 (c_finish_oacc_routine): Don't use %s to supply portions of the
1239 message.
1240
bbd5521e 12412017-02-24 Jakub Jelinek <jakub@redhat.com>
1242
1243 PR c++/79588
1244 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1245 handle -Wrestrict here.
1246 * c-typeck.c (build_function_call_vec): Adjust
1247 check_function_arguments caller.
1248
a450df95 12492017-02-23 Richard Biener <rguenther@suse.de>
1250
1251 PR c/79684
1252 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1253 to initialize c_exprs to return.
1254 (c_parser_gimple_binary_expression): Likewise.
1255 (c_parser_gimple_unary_expression): Likewise.
1256 (c_parser_gimple_postfix_expression): Likewise.
1257
2567d975 12582017-02-22 Marek Polacek <polacek@redhat.com>
1259
1260 PR c/79662
1261 * c-typeck.c (convert_arguments): Handle error_mark_node.
1262
21bfe0d4 12632017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1264
1265 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1266 value of c_parser_parse_ssa_name against error_mark_node and emit
1267 error if ssa name is anonymous and written as default definition.
1268
a8deddc8 12692017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1270
1271 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1272 FMA_EXPR.
1273
79878c89 12742017-02-16 Jakub Jelinek <jakub@redhat.com>
1275
1276 PR c++/79512
1277 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1278 ignore #pragma omp target even when not followed by identifier.
1279
78c6d67e 12802017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1281
1282 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1283 (c_parser_gimple_unary_expression): Likewise.
1284
19efce70 12852017-02-13 Jakub Jelinek <jakub@redhat.com>
1286
1287 * c-parser.c (c_parser_oacc_declare): Add missing space in
1288 diagnostics.
1289
32b8484d 12902017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1291
1292 PR c/79478
1293 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1294 set_c_expr_source_range when parsing ssa-name.
1295
b91919ba 12962017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1297 Richard Biener <rguenther@suse.de>
1298
1299 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1300 building IL when arguments are error_mark_node.
1301 (c_parser_gimple_unary_expression): Likewise.
1302 (c_parser_gimple_if_stmt): Likewise.
1303 (c_parser_gimple_switch_stmt): Likewise.
1304 (c_parser_gimple_return_stmt): Likewise.
1305 (c_parser_parse_ssa_name): When name lookup fails do not build
1306 an SSA name. Use undeclared rather than not declared in error
1307 reporting.
1308
127144a0 13092017-02-09 Marek Polacek <polacek@redhat.com>
1310
1311 PR c/79428
1312 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1313 instead of c_parser_skip_until_found.
1314
b5c83b44 13152017-02-09 Jakub Jelinek <jakub@redhat.com>
1316
1317 PR c/79431
1318 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1319 symtab_node::get on automatic variables.
1320
719a7570 13212016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1322 Chung-Lin Tang <cltang@codesourcery.com>
1323
1324 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1325 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1326 semantic checking.
1327 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1328
29beab79 13292017-02-07 Richard Biener <rguenther@suse.de>
1330
1331 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1332 (c_parser_gimple_postfix_expression_after_primary):
1333 Do not use c_build_function_call_vec to avoid folding and promotion.
1334 Simplify.
1335
96afa092 13362017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1337
1338 PR lto/79061
1339 * c-decl.c (pop_scope): Pass main_input_filename to
1340 build_translation_unit_decl.
1341
175e0d6b 13422017-01-24 David Malcolm <dmalcolm@redhat.com>
1343
1344 * c-parser.c: Include "read-rtl-function.h" and
1345 "run-rtl-passes.h".
1346 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1347 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1348 production. Update for renaming of field "gimple_pass" to
1349 "gimple_or_rtl_pass". If __RTL was seen, call
1350 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1351 to an auto_timevar, to cope with early exit.
1352 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1353 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1354 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1355 Handle RID_RTL.
1356 (c_parser_parse_rtl_body): New function.
1357 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1358 (struct c_declspecs): Rename field "gimple_pass" to
1359 "gimple_or_rtl_pass". Add field "rtl_p".
1360 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1361 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1362 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1363 (c_parser_gimple_or_rtl_pass_list): ...this.
1364
3ef7eab1 13652017-01-20 Marek Polacek <polacek@redhat.com>
1366
1367 PR c/64279
1368 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1369
785353b9 13702017-01-13 Richard Biener <rguenther@suse.de>
1371
1372 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1373 nops.
1374
ac5f04c1 13752017-01-13 Richard Biener <rguenther@suse.de>
1376
1377 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1378 _Literal ( type-name ) number.
1379
2b11c996 13802017-01-12 Richard Biener <rguenther@suse.de>
1381
1382 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1383 __MEM.
1384
9a26d403 13852017-01-11 Jakub Jelinek <jakub@redhat.com>
1386
1387 PR c++/72813
1388 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1389 PCH file.
1390
a19c4dc1 13912017-01-11 Richard Biener <rguenther@suse.de>
1392
1393 PR bootstrap/79052
1394 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1395 returns on parse errors.
1396
6124217c 13972017-01-04 Marek Polacek <polacek@redhat.com>
1398
1399 PR c++/64767
1400 * c-parser.c (c_parser_postfix_expression): Mark zero character
1401 constants by setting original_type in c_expr.
1402 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1403 with a zero character constant.
1404 (char_type_p): New function.
1405
8ccda24a 14062017-01-04 David Malcolm <dmalcolm@redhat.com>
1407
1408 * c-parser.c (c_parser_declaration_or_fndef): Create a
1409 rich_location at init_loc and parse it to start_init.
1410 (last_init_list_comma): New global.
1411 (c_parser_braced_init): Update last_init_list_comma when parsing
1412 commas. Pass it to pop_init_level. Pass location of closing
1413 brace to pop_init_level.
1414 (c_parser_postfix_expression_after_paren_type): Create a
1415 rich_location at type_loc and parse it to start_init.
1416 (c_parser_omp_declare_reduction): Likewise for loc.
1417 * c-tree.h (start_init): Add rich_location * param.
1418 (pop_init_level): Add location_t param.
1419 * c-typeck.c (struct initializer_stack): Add field
1420 "missing_brace_richloc".
1421 (start_init): Add richloc param, use it to initialize
1422 the stack node's missing_brace_richloc.
1423 (last_init_list_comma): New decl.
1424 (finish_implicit_inits): Pass last_init_list_comma to
1425 pop_init_level.
1426 (push_init_level): When finding missing open braces, add fix-it
1427 hints to the richloc.
1428 (pop_init_level): Add "insert_before" param and pass it
1429 when calling pop_init_level. Add fixits about missing
1430 close braces to any richloc. Use the richloc for the
1431 -Wmissing-braces warning.
1432 (set_designator): Pass last_init_list_comma to pop_init_level.
1433 (process_init_element): Likewise.
1434
aad93da1 14352017-01-01 Jakub Jelinek <jakub@redhat.com>
1436
1437 Update copyright years.
1438
3713d2e2 14392016-12-21 Jakub Jelinek <jakub@redhat.com>
1440
184fac50 1441 PR bootstrap/78817
1442 * c-typeck.c (build_function_call_vec): If check_function_arguments
1443 returns true, set TREE_NO_WARNING on CALL_EXPR.
1444
3713d2e2 1445 PR c/77767
1446 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1447 to *expr instead of overwriting it.
1448
3e677d45 14492016-12-20 Richard Biener <rguenther@suse.de>
1450
1451 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1452 error recovery.
1453 (c_parser_gimple_statement): Only build assigns for non-error
1454 stmts.
1455 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1456
4954efd4 14572016-12-14 Martin Jambor <mjambor@suse.cz>
1458
1459 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1460 omp-low.h.
1461 (c_finish_oacc_routine): Adjusted call to
1462 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1463 to use their new names.
1464 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1465 use its new name.
1466 (c_parser_oacc_update): Likewise.
1467 (c_parser_omp_simd): Likewise.
1468 (c_parser_omp_target_update): Likewise.
1469 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1470 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1471 name.
1472 (c_finish_omp_cancellation_point): Likewise.
1473 * gimple-parser.c: Do not include omp-low.h
1474
4c50b884 14752016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1476 James Norris <jnorris@codesourcery.com>
1477
1478 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1479 EXIT_DATA,WAIT} are not used in compound statements.
1480 (c_parser_oacc_enter_exit_data): Update diagnostics.
1481
f1b3e1c9 14822016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1483
1484 PR c++/71973
1485 * c-decl.c (diagnose_mismatched_decls): Use
1486 OPT_Wbuiltin_declaration_mismatch here too.
1487
adc78298 14882016-11-18 Richard Sandiford <richard.sandiford@arm.com>
f1b3e1c9 1489 Alan Hayward <alan.hayward@arm.com>
1490 David Sherwood <david.sherwood@arm.com>
adc78298 1491
1492 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1493 (make_label, finish_struct): Likewise.
1494
b1f04d34 14952016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
a49621cf 1496 Richard Biener <rguenther@suse.de>
9b8f3aa1 1497
a49621cf 1498 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1499 * config-lang.in (gtfiles): Add c/c-parser.h.
1500 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1501 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1502 * c-parser.c (enum c_id_kind, struct c_token,
1503 c_parser_next_token_is, c_parser_next_token_is_not,
1504 c_parser_next_token_is_keyword,
1505 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1506 Split out to ...
1507 * c-parser.h: ... new header.
1508 * c-parser.c: Include c-parser.h and gimple-parser.h.
b1f04d34 1509 (c_parser_peek_token, c_parser_peek_2nd_token,
a49621cf 1510 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1511 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1512 c_parser_error, c_parser_require, c_parser_skip_until_found,
1513 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1514 c_parser_type_name): Export.
1515 (c_parser_tokens_buf): New function.
1516 (c_parser_error): Likewise.
1517 (c_parser_set_error): Likewise.
1518 (c_parser_declspecs): Handle RID_GIMPLE.
b1f04d34 1519 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1520 via c_parser_parse_gimple_body.
a49621cf 1521 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1522 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1523 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1524 c_parser_error, c_parser_require, c_parser_skip_until_found,
1525 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1526 c_parser_type_name): Declare.
b1f04d34 1527 (struct c_parser): Declare forward.
1528 (c_parser_tokens_buf): Declare.
a49621cf 1529 (c_parser_error): Likewise.
1530 (c_parser_set_error): Likewise.
1531 * gimple-parser.c: New file.
1532 * gimple-parser.h: Likewise.
b1f04d34 1533
9b8f3aa1 15342016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1535
1536 PR c/35503
1537 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1538 warn_for_restrict.
1539
50d3ad71 15402016-09-11 Le-Chun Wu <lcwu@google.com>
1541 Mark Wielaard <mjw@redhat.com>
1542
1543 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1544 to the given -Wshadow= variant.
1545
ad7b10a2 15462016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1547
1548 * c-typeck.c: Include memmodel.h.
1549
8a23256f 15502016-10-13 Jakub Jelinek <jakub@redhat.com>
1551
1552 PR target/77957
1553 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1554 instead of lhd_return_null_tree_v.
1555
30ac4925 15562016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1557
1558 PR c++/69733
1559 * c-decl.c (smallest_type_quals_location): New static function.
1560 (grokdeclarator): Try to find the correct location for an ignored
1561 qualifier.
1562
3c77f69c 15632016-09-26 Marek Polacek <polacek@redhat.com>
1564
1565 PR c/7652
1566 * c-decl.c (pop_scope): Add gcc_fallthrough.
1567
15682016-09-26 Marek Polacek <polacek@redhat.com>
1569
1570 PR c/7652
1571 * c-parser.c (struct c_token): Add flags field.
1572 (c_lex_one_token): Pass it to c_lex_with_flags.
1573 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1574 into IFN_FALLTHROUGH.
1575 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1576 attribute fallthrough after a case label or default label.
1577 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1578
481ce481 15792016-09-24 Marek Polacek <polacek@redhat.com>
1580
1581 PR c/77490
1582 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1583 have boolean value. Warn about ++/-- on booleans.
1584
16fb756f 15852016-09-23 Jakub Jelinek <jakub@redhat.com>
1586
1587 * c-parser.c (incomplete_record_decls): Remove unnecessary
1588 = vNULL initialization of file scope vec.
1589
d80c1c6c 15902016-09-16 Marek Polacek <polacek@redhat.com>
1591
1592 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1593
b99cc6da 15942016-09-14 Marek Polacek <polacek@redhat.com>
1595
1596 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1597 (fix_array_notation_expr): Likewise.
1598 * c-decl.c (finish_decl): Likewise.
1599 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1600 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1601 (function_to_pointer_conversion): Use false instead of 0.
1602 (convert_lvalue_to_rvalue): Likewise.
1603 (parser_build_unary_op): Likewise.
1604 (build_atomic_assign): Likewise.
1605 (build_unary_op): Change nonconvert parameter type to bool, use
1606 true/false instead of 1/0.
1607 (build_binary_op): Use true instead of 1.
1608
68ef907c 16092016-09-13 David Malcolm <dmalcolm@redhat.com>
1610
1611 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1612 of add_fixit_insert to add_fixit_insert_before.
1613
89bcb5a3 16142016-09-13 Marek Polacek <polacek@redhat.com>
1615
1616 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1617 it.
1618
7a21b590 16192016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1620
1621 PR c++/77496
1622 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1623 COMPOUND_EXPR to warn_for_omitted_condop.
1624
3da97ff7 16252016-09-07 David Malcolm <dmalcolm@redhat.com>
1626
1627 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1628 c_get_substring_location for this new langhook.
1629
0b80c4b2 16302016-09-02 Jakub Jelinek <jakub@redhat.com>
1631
1632 PR c/65467
1633 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1634 flag_openmp.
1635 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1636 instead of mark_exp_read on low_bound/length expression.
1637 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1638 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1639 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1640 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1641 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1642 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1643 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1644 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1645 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1646 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1647 instead of mark_expr_read.
1648 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1649 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1650 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1651 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1652 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1653 array section bases outside of depend clause, for depend clause
1654 use convert_lvalue_to_rvalue on the base.
1655 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1656 linear, aligned, map, to and from clauses.
1657 (c_omp_clause_copy_ctor): New function.
1658
c7afb782 16592016-09-01 Marek Polacek <polacek@redhat.com>
1660
1661 PR c/7652
1662 * c-typeck.c (composite_type): Add FALLTHRU comment.
1663
986530da 16642016-08-31 David Malcolm <dmalcolm@redhat.com>
1665
1666 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1667 to the insertion fixits for "struct", "union", and "enum".
1668
850c2009 16692016-08-30 David Malcolm <dmalcolm@redhat.com>
1670
1671 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1672 rather than add_fixit_misspelled_id.
1673 (undeclared_variable): Likewise.
1674 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1675 now-redundant "here" params from add_fixit_insert method calls.
1676 (c_parser_parameter_declaration): Likewise.
1677 * c-typeck.c (build_component_ref): Remove now-redundant range
1678 param from add_fixit_replace method calls.
1679
c4963714 16802016-08-25 Marek Polacek <polacek@redhat.com>
1681
1682 * c-typeck.c (parser_build_binary_op): Pass LHS to
1683 warn_logical_not_parentheses.
1684
49e1f4eb 16852016-08-25 Marek Polacek <polacek@redhat.com>
1686
1687 PR c/77323
1688 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1689 or _FloatN or _FloatNx is not supported.
1690 (finish_declspecs): Set type to integer_type_node when _FloatN or
1691 _FloatNx is not supported.
1692
82c85aba 16932016-08-19 Joseph Myers <joseph@codesourcery.com>
1694
1695 PR c/32187
1696 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1697 (struct c_declspecs): Add field floatn_nx_idx.
1698 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1699 and _FloatNx type specifiers.
1700 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1701 (c_parser_declspecs, c_parser_attribute_any_word)
1702 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1703 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1704 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1705 narrower than double.
1706
7175bb2a 17072016-08-12 Jakub Jelinek <jakub@redhat.com>
1708 Martin Liska <mliska@suse.cz>
1709
1710 PR c/67410
1711 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1712 % to determine val element to change. Assert that
1713 wchar_bytes * charwidth fits into val array.
1714
e3533433 17152016-08-12 Marek Polacek <polacek@redhat.com>
1716
1717 PR c/7652
1718 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1719 (c_parser_postfix_expression): Likewise.
1720 * c-typeck.c (build_unary_op): Adjust fall through comment.
1721 (c_mark_addressable): Likewise.
1722
74be5bc1 17232016-08-11 Jakub Jelinek <jakub@redhat.com>
1724
1725 PR c/72816
1726 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1727 array member through typedef, for orig_qual_indirect == 0 clear
1728 orig_qual_type.
1729
7af4d06b 17302016-08-08 David Malcolm <dmalcolm@redhat.com>
1731
1732 PR c/64955
1733 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1734 this up to selftest::run_c_tests.
1735 (selftest::run_c_tests): New function.
1736
5f429ee2 17372016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1738
1fa5d8ba 1739 * c-parser.c (struct oacc_routine_data): Add error_seen and
1740 fndecl_seen members.
1741 (c_finish_oacc_routine): Use these.
1742 (c_parser_declaration_or_fndef): Adjust.
1743 (c_parser_oacc_routine): Likewise. Support more C language
1744 constructs, and improve diagnostics. Move pragma context
1745 checking...
1746 (c_parser_pragma): ... here.
1747
5f429ee2 1748 * c-parser.c (struct oacc_routine_data): New.
1749 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1750 Simplify code.
1751 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1752 declare target" attribute.
1753
f3c032a4 17542016-08-01 Jan Beulich <jbeulich@suse.com>
1755
1756 * c-fold.c (c_fully_fold_internal): Also emit shift count
1757 warnings for vector types.
1758 * c-typeck.c (build_binary_op): Likewise.
1759
4ebf85be 17602016-07-29 Marek Polacek <polacek@redhat.com>
1761
1762 PR c/71742
1763 * c-decl.c (finish_struct): Rephrase an error message.
1764
9efe5be6 1765 PR c/71853
1766 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1767 to error node for invalid code.
1768
4c4548bb 1769 PR c/71573
1770 * c-decl.c (implicitly_declare): Return decl early not only for
1771 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1772
322d4184 17732016-07-29 Jakub Jelinek <jakub@redhat.com>
1774
1775 PR c/71969
1776 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1777 on GNU extern inline functions.
1778
35fddbd6 17792016-07-29 Marek Polacek <polacek@redhat.com>
1780
1781 PR c/71583
1782 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1783 check expr.value.
1784
59c1507a 17852016-07-22 Uros Bizjak <ubizjak@gmail.com>
1786
1787 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1788
d0f11d68 17892016-07-20 David Malcolm <dmalcolm@redhat.com>
1790
1791 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1792 spellcheck-tree.h
1793 (best_macro_match): Likewise, converting from a typedef to a
1794 subclass.
1795 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1796 (lookup_name_fuzzy): Update for change of best_macro_match to a
1797 subclass with a ctor that calls cpp_forall_identifiers.
1798
d208f6e6 17992016-07-20 David Malcolm <dmalcolm@redhat.com>
1800
1801 * c-decl.c (implicit_decl_warning): Update for conversion of
1802 return type of lookup_name_fuzzy to const char *.
1803 (undeclared_variable): Likewise.
1804 (lookup_name_fuzzy): Convert return type from tree to
1805 const char *.
1806 * c-parser.c (c_parser_declaration_or_fndef): Update for
1807 conversion of return type of lookup_name_fuzzy to const char *.
1808 (c_parser_parameter_declaration): Likewise.
1809
0ef9358d 18102016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1811
1812 * c-parser.c (c_parser_oacc_declare): Don't scan for
1813 GOMP_MAP_POINTER.
1814 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1815 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1816 zero-length subarrays.
1817
0dd7db3b 18182016-07-15 Jakub Jelinek <jakub@redhat.com>
1819
1820 PR c/71858
1821 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1822 instead of FUZZY_LOOKUP_NAME.
1823 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1824 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1825
28413b15 18262016-07-14 Jakub Jelinek <jakub@redhat.com>
1827
1828 PR c/71858
1829 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1830
e9258aee 18312016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1832
1833 * c-parser.c (c_parser_generic_selection): Make type of variable
1834 auto_vec.
1835 (c_parser_omp_declare_simd): Likewise.
1836
57f91a55 18372016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1838
1839 * c-decl.c (struct c_struct_parse_info): Change member types
1840 from vec to auto_vec.
1841 (start_struct): Adjust.
1842 (finish_struct): Likewise.
1843
c364d0f3 18442016-07-02 Jakub Jelinek <jakub@redhat.com>
1845
1846 PR c/71719
1847 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1848
44e775d8 18492016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1850
1851 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1852 Move pragma context checking into...
1853 (c_parser_omp_cancellation_point): ... here, and improve
1854 diagnostic messages.
1855 * c-typeck.c (c_finish_omp_cancel)
1856 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1857
1af10ce6 18582016-06-29 Jakub Jelinek <jakub@redhat.com>
1859
1860 PR c/71685
1861 * c-typeck.c (c_build_qualified_type): Don't clear
1862 C_TYPE_INCOMPLETE_VARS for the main variant.
1863
18642016-06-28 Martin Sebor <msebor@redhat.com>
9c3ffbcb 1865
1866 PR c/71552
1867 * c-typeck.c (output_init_element): Diagnose incompatible types
1868 before non-constant initializers.
1869
6eb2402f 18702016-06-28 Jakub Jelinek <jakub@redhat.com>
1871
1872 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1873
b4c71cbb 18742016-06-23 Andi Kleen <ak@linux.intel.com>
1875
1876 * Make-lang.in: Add support for autofdo.
1877
8469aece 18782016-06-22 David Malcolm <dmalcolm@redhat.com>
1879
1880 PR c/70339
1881 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1882 (implicit_decl_warning): When issuing warnings for implicit
1883 declarations, attempt to provide a suggestion via
1884 lookup_name_fuzzy.
1885 (undeclared_variable): Likewise when issuing errors.
1886 (lookup_name_in_scope): Likewise.
1887 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1888 (best_macro_match): New typedef.
1889 (find_closest_macro_cpp_cb): New function.
1890 (lookup_name_fuzzy): New function.
1891 * c-parser.c: Include gcc-rich-location.h.
1892 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1893 (c_keyword_starts_typename): ...this new function.
1894 (c_parser_declaration_or_fndef): When issuing errors about
1895 missing "struct" etc, add a fixit. For other kinds of errors,
1896 attempt to provide a suggestion via lookup_name_fuzzy.
1897 (c_parser_parms_declarator): When looking ahead to detect typos in
1898 type names, also reject CPP_KEYWORD.
1899 (c_parser_parameter_declaration): When issuing errors about
1900 unknown type names, attempt to provide a suggestion via
1901 lookup_name_fuzzy.
1902 * c-tree.h (c_keyword_starts_typename): New prototype.
1903
e218d07f 19042016-06-20 Joseph Myers <joseph@codesourcery.com>
1905
1906 PR c/71601
1907 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1908 c_common_type returns error_mark_node.
1909
92a44a68 19102016-06-19 Martin Sebor <msebor@redhat.com>
21897f47 1911
1912 PR c/69507
1913 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1914 __alignof__ (expression).
1915
f0d77991 19162016-06-14 David Malcolm <dmalcolm@redhat.com>
1917
1918 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1919
2a990300 19202016-06-14 David Malcolm <dmalcolm@redhat.com>
1921
1922 * c-typeck.c (build_component_ref): Simplify fixit code by
1923 using gcc_rich_location::add_fixit_misspelled_id.
1924 (set_init_label): Likewise.
1925
527790c1 19262016-06-13 David Malcolm <dmalcolm@redhat.com>
1927
1928 * c-parser.c (c_parser_initelt): Provide location of name for new
1929 location_t param of set_init_label.
1930 * c-tree.h (set_init_label): Add location_t param.
1931 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1932 param and use it when issuing error messages about unrecognized
1933 field names. Attempt to provide a fixit hint if appropriate,
1934 otherwise update the error message to provide the type name.
1935
ccfa030f 19362016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1937
1938 PR c/71381
1939 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1940 Loosen checking.
1941
732905bb 19422016-06-08 Martin Sebor <msebor@redhat.com>
1943 Jakub Jelinek <jakub@redhat.com>
1944
1945 PR c++/70507
1946 PR c/68120
1947 * c-typeck.c (convert_arguments): Don't promote last argument
1948 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1949
bafc7b1d 19502016-06-08 Marek Polacek <polacek@redhat.com>
1951
1952 PR c/71418
1953 * c-decl.c (grokdeclarator): Check TYPE_P.
1954
06e590e7 1955 PR c/71426
1956 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1957 code.
1958
7cfde92a 19592016-06-07 David Malcolm <dmalcolm@redhat.com>
1960
1961 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1962 and structure element reference, capture the location of the
1963 element name token and pass it to build_component_ref.
1964 (c_parser_postfix_expression_after_primary): Likewise for
1965 structure element dereference.
1966 (c_parser_omp_variable_list): Likewise for
1967 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1968 * c-tree.h (build_component_ref): Add location_t param.
1969 * c-typeck.c (build_component_ref): Add location_t param
1970 COMPONENT_LOC. Use it, if available, when issuing hints about
1971 mispelled member names to provide a fixit replacement hint.
1972
61f1f80c 19732016-06-06 Marek Polacek <polacek@redhat.com>
1974
1975 PR c/71362
1976 * c-parser.c (c_parser_direct_declarator): Set location.
1977
e4b92538 19782016-06-06 Marek Polacek <polacek@redhat.com>
1979
1980 * c-typeck.c (comptypes_internal): Handle comparisons of
1981 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1982 TYPE_REF_CAN_ALIAS_ALL.
1983
2234363c 19842016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1985
1986 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1987 arguments as addressable when async clause exists.
1988
b6431756 19892016-05-30 Jakub Jelinek <jakub@redhat.com>
1990
1991 PR c++/71349
1992 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1993 when combined with target construct.
1994
6feab9ce 19952016-05-26 Jakub Jelinek <jakub@redhat.com>
1996
1997 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1998 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1999
2c995da9 20002016-05-25 Marek Polacek <polacek@redhat.com>
2001
2002 PR c/71265
2003 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2004
abfbb5b5 2005 PR c/71266
2006 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2007
6d6a3fc3 20082016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2009
2010 * c-parser.c (c_parser_oacc_declare): Add support for
2011 GOMP_MAP_FIRSTPRIVATE_POINTER.
2012 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2013 argument with enum c_omp_region_type ort.
2014 (handle_omp_array_sections): Likewise. Update call to
2015 handle_omp_array_sections_1.
2016 (c_finish_omp_clauses): Add specific errors and warning messages for
2017 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2018 call to handle_omp_array_sections.
2019
c9d624bd 20202016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2021
2022 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2023
7345b977 20242016-05-24 Richard Biener <rguenther@suse.de>
2025
2026 PR middle-end/70434
2027 PR c/69504
2028 * c-typeck.c (build_array_ref): Do not complain about indexing
2029 non-lvalue vectors. Adjust for function name change.
2030
8bdfbc08 20312016-05-20 Martin Sebor <msebor@redhat.com>
2032
2033 PR c/71115
2034 * c-typeck.c (error_init): Use
2035 expansion_point_location_if_in_system_header.
2036 (warning_init): Same.
2037
97c71d71 20382016-05-19 David Malcolm <dmalcolm@redhat.com>
2039
2040 PR c/71171
2041 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2042 in error-handling.
2043 (c_parser_postfix_expression): Likewise.
2044 * c-tree.h (c_expr::set_error): New method.
2045 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2046 that result's range is initialized.
2047
e68d7b49 20482016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2049
2050 * c-typeck.c (parser_build_unary_op): Fix formatting.
2051
624115b4 20522016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2053
2054 * c-decl.c (grokdeclarator): Remove errmsg and use of
2055 targetm.invalid_return_type.
2056 (grokparms): Remove errmsg and use of
2057 targetm.invalid_parameter_type.
2058
90c88567 20592016-05-13 Joseph Myers <joseph@codesourcery.com>
2060
2061 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2062 function return type.
2063
22a3f7bd 20642016-05-12 Marek Polacek <polacek@redhat.com>
2065
2066 PR c/70756
2067 * c-decl.c (build_compound_literal): Pass LOC down to
2068 c_incomplete_type_error.
2069 * c-tree.h (require_complete_type): Adjust declaration.
2070 (c_incomplete_type_error): Likewise.
2071 * c-typeck.c (require_complete_type): Add location parameter, pass it
2072 down to c_incomplete_type_error.
2073 (c_incomplete_type_error): Add location parameter, pass it down to
2074 error_at.
2075 (build_component_ref): Pass location down to c_incomplete_type_error.
2076 (default_conversion): Pass location down to require_complete_type.
2077 (build_array_ref): Likewise.
2078 (build_function_call_vec): Likewise.
2079 (convert_arguments): Likewise.
2080 (build_unary_op): Likewise.
2081 (build_c_cast): Likewise.
2082 (build_modify_expr): Likewise.
2083 (convert_for_assignment): Likewise.
2084 (c_finish_omp_clauses): Likewise.
2085
54c4d22e 20862016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2087
2088 PR c/43651
2089 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2090 is enabled.
2091 * c-errors.c (pedwarn_c90): Return true if warned.
2092 * c-tree.h (pedwarn_c90): Change return type to bool.
2093 (enum c_declspec_word): Add new enumerator cdw_atomic.
2094
7f8012a5 20952016-05-11 Marek Polacek <polacek@redhat.com>
2096
2097 PR c++/71024
2098 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2099 diagnose_mismatched_attributes and call it.
2100
3fa82609 21012016-05-10 Marek Polacek <polacek@redhat.com>
2102
2103 PR c/70255
2104 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2105 on a declaration following the definition.
2106
871164c4 21072016-05-05 Jakub Jelinek <jakub@redhat.com>
2108
2109 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2110 parse it through to c_parser_c99_block_statement.
2111 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2112 caller.
2113
1d52c456 21142016-05-04 Marek Polacek <polacek@redhat.com>
2115
2116 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2117 OPT_Wdangling_else.
2118
a64030fe 21192016-05-04 Marek Polacek <polacek@redhat.com>
2120
2121 PR c/48778
2122 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2123 for macro expansions.
2124
5d4db8ef 21252016-05-03 Marek Polacek <polacek@redhat.com>
2126
2127 PR c/70859
2128 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2129 check_builtin_function_arguments.
2130
0bd2fc6e 21312016-05-03 Richard Biener <rguenther@suse.de>
2132
2133 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2134 the checksum from the previous stage.
2135
b5e88f74 21362016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2137
2138 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2139 c_finish_omp_clauses.
2140 (c_parser_omp_all_clauses): Likewise.
2141 (c_parser_oacc_cache): Likewise.
2142 (c_parser_oacc_loop): Likewise.
2143 (omp_split_clauses): Likewise.
2144 (c_parser_omp_declare_target): Likewise.
2145 (c_parser_cilk_all_clauses): Likewise.
2146 (c_parser_cilk_for): Likewise.
2147 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2148 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2149
dd185f6e 21502016-05-02 Marek Polacek <polacek@redhat.com>
2151
2152 PR c/70851
2153 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2154 incomplete type.
2155
4d0a8bac 21562016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2157
2158 PR middle-end/70626
2159 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2160 OACC_LOOP_CLAUSE_MASK.
2161 (c_parser_oacc_kernels_parallel): Update call to
2162 c_oacc_split_loop_clauses.
2163
d215eeca 21642016-04-28 Andrew MacLeod <amacleod@redhat.com>
2165
2166 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2167 argument to build_modify_expr in two cases.
2168
40385231 21692016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2170
2171 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2172 warn_for_memset instead of warning directly here.
2173
fa20ebd3 21742016-04-26 Marek Polacek <polacek@redhat.com>
2175
2176 PR c/67784
2177 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2178 out of ...
2179 (c_parser_for_statement): ... here.
2180 (c_parser_if_statement): Use it.
2181 (c_parser_switch_statement): Use it.
2182 (c_parser_while_statement): Use it.
2183
9db47803 2184 PR c/70791
2185 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2186
70574e60 21872016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2188
2189 PR c++/69363
2190 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2191 instead of c_finish_cilk_clauses.
2192 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2193 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2194 floating-point variables in the linear clause for Cilk Plus.
2195
5d4b30ea 21962016-04-18 Michael Matz <matz@suse.de>
2197
2198 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2199 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2200
eac243e7 22012016-04-15 Marek Polacek <polacek@redhat.com>
2202
2203 PR c/70671
2204 * c-typeck.c (build_unary_op): Pass location down to error and
2205 warning call.
2206
b4ba8358 22072016-04-15 Jakub Jelinek <jakub@redhat.com>
2208
2209 PR c/70436
2210 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2211 where needed.
2212 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2213 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2214 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2215 Adjust c_parser_pragma callers.
2216 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2217 caller.
2218 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2219 c_parser_statement.
2220 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2221 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2222 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2223 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2224 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2225 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2226 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2227 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2228 down where needed.
2229 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2230 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2231 calls.
2232
0241e4dc 22332016-04-13 Marek Polacek <polacek@redhat.com>
2234
2235 PR c/70436
2236 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2237 adjust callers.
2238 (c_parser_statement): Likewise.
2239 (c_parser_c99_block_statement): Likewise.
2240 (c_parser_while_statement): Likewise.
2241 (c_parser_for_statement): Likewise.
2242 (c_parser_if_body): Don't set IF_P here.
2243 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2244 about dangling else here.
2245 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2246 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2247 warn about dangling else here.
2248
c4f5465d 22492016-04-04 Marek Polacek <polacek@redhat.com>
2250
2251 PR c/70307
2252 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2253
7952b661 22542016-03-31 Marek Polacek <polacek@redhat.com>
2255
2256 PR c/70297
2257 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2258
5539bc70 22592016-03-18 David Malcolm <dmalcolm@redhat.com>
2260
2261 PR c/70281
2262 * c-parser.c (c_parser_postfix_expression): Set the source range
2263 for uses of "__builtin_types_compatible_p".
2264
29a514fa 22652016-03-17 Jakub Jelinek <jakub@redhat.com>
2266
2267 PR c/70280
2268 * c-typeck.c (composite_type): Don't count void_list_node
2269 into len, if the list is terminated by void_list_node, start
2270 with void_list_node instead of NULL for newargs. Stop
2271 at void_list_node.
2272
462ca422 22732016-03-16 Marek Polacek <polacek@redhat.com>
2274
2275 PR c/70093
2276 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2277 nested functions returning VM types.
2278
27dcb7a8 22792016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2280
2281 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2282 when calling c_finish_omp_clauses.
2283
2d1d2e55 22842016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2285
2286 PR c/69824
2287 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2288 for later.
2289
6560d1ad 22902016-03-04 Marek Polacek <polacek@redhat.com>
2291
2292 PR c/69798
2293 * c-parser.c (c_parser_postfix_expression): Call
2294 c_parser_cast_expression rather than c_parser_postfix_expression.
2295
40e9ce2d 22962016-03-01 Jakub Jelinek <jakub@redhat.com>
2297
2298 PR c/69796
2299 PR c/69974
2300 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2301 of incomplete decls to error_mark_node.
2302
f0ea75d1 23032016-02-24 Marek Polacek <polacek@redhat.com>
2304
2305 PR c/69819
2306 * c-decl.c (finish_decl): Don't update the copy of the type of a
2307 different decl type.
2308
d41ab738 23092016-02-23 Jakub Jelinek <jakub@redhat.com>
2310
2311 PR objc/69844
2312 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2313 in id_kind reclassification.
2314
7675e968 23152016-02-16 Jakub Jelinek <jakub@redhat.com>
2316
2317 PR c/69835
2318 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2319
28072426 23202016-02-16 James Norris <jnorris@codesourcery.com>
2321
2322 PR c/64748
2323 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2324
74a4140f 23252016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2326
7c25ed5c 2327 * c-decl.c (build_null_declspecs): Zero the entire struct.
2328
74a4140f 2329 PR c/69522
2330 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2331 callers changed. If nested_p is true, use it to call
2332 finish_implicit_inits.
2333 * c-tree.h (finish_implicit_inits): Declare.
2334 * c-typeck.c (finish_implicit_inits): New function. Move code
2335 from ...
2336 (push_init_level): ... here.
2337 (set_designator, process_init_element): Call finish_implicit_inits.
2338
40b38ace 23392016-02-11 Jakub Jelinek <jakub@redhat.com>
2340
2341 PR c/69768
2342 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2343 arguments for -Waddress warning.
2344
6b098e91 23452016-02-04 Jakub Jelinek <jakub@redhat.com>
2346
2347 PR c/69669
2348 * c-decl.c (finish_enum): When honoring mode attribute,
2349 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2350
ff5e28e9 23512016-01-29 Jakub Jelinek <jakub@redhat.com>
2352
2353 PR debug/69518
2354 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2355 all type variants, not just TYPE_MAIN_VARIANT.
2356
78e516eb 23572016-01-27 Jakub Jelinek <jakub@redhat.com>
2358
2359 PR debug/66869
2360 * c-decl.c (c_write_global_declarations_1): Warn with
2361 warn_unused_function if static prototype without definition
2362 is not C_DECL_USED.
2363
fee5e491 23642016-01-27 Marek Polacek <polacek@redhat.com>
2365
2366 PR c/68062
2367 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2368 to unsigned, if needed. Add -Wsign-compare warning.
2369
9bbfd060 23702016-01-26 Jakub Jelinek <jakub@redhat.com>
2371
2372 PR tree-optimization/69483
2373 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2374
6ebc6587 23752016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16d4186f 2376
2377 PR c/24293
2378 * c-tree.h (incomplete_record_decls): Declare.
2379 * c-parser.c (incomplete_record_decls): Define.
2380 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2381 report error if any decl has zero size.
2382 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2383 or enum type to incomplete_record_decls.
2384
4c39e3a5 23852016-01-14 Tom de Vries <tom@codesourcery.com>
2386
2387 PR tree-optimization/68773
2388 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2389 set force_output.
2390
77f35cec 23912016-01-14 Marek Polacek <polacek@redhat.com>
2392
2393 PR c/69262
2394 * c-decl.c (grokdeclarator): Provide more information for invalid
2395 array declarations.
2396
d74214f3 23972016-01-06 David Malcolm <dmalcolm@redhat.com>
2398
2399 * c-parser.c (c_parser_unary_expression): For dereferences, build
2400 a combined location before calling build_indirect_ref, so that
2401 error reports cover the full range, manually updating the c_expr
2402 src_range.
2403
be3c9981 24042016-01-06 Marek Polacek <polacek@redhat.com>
2405
2406 PR sanitizer/69099
2407 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2408 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2409 NULL.
2410
f1717362 24112016-01-04 Jakub Jelinek <jakub@redhat.com>
2412
2413 Update copyright years.
2414
d7d6a3ab 24152016-01-04 Marek Polacek <polacek@redhat.com>
2416
2417 PR c/68908
2418 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2419 optimization to use __atomic_fetch_* built-in if possible.
2420
9d5fd7c6 24212015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2422
2423 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2424 into...
2425 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2426 all users.
2427
37e2d32f 24282015-12-22 Marek Polacek <polacek@redhat.com>
2429
2430 PR c/69002
2431 * c-typeck.c (build_component_ref): Warn when acessing elements of
2432 atomic structures or unions.
2433
c0bf500c 24342015-12-21 David Malcolm <dmalcolm@redhat.com>
2435
2436 * c-typeck.c: Include "gcc-rich-location.h".
2437 (build_binary_op): In the two places that call binary_op_error,
2438 create a gcc_rich_location and populate it with the location of
2439 the binary op and its two operands.
2440
b9f9586a 24412015-12-16 David Malcolm <dmalcolm@redhat.com>
2442
2443 * c-parser.c (c_parser_statement_after_labels): When calling
2444 c_finish_return, Use the return expression's location if it has
2445 one, falling back to the location of the first token within it.
2446 * c-typeck.c (c_finish_return): When issuing warnings about
2447 the incorrect presence/absence of a return value, issue a note
2448 showing the declaration of the function.
2449
dbd79382 24502015-12-16 David Malcolm <dmalcolm@redhat.com>
2451
2452 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2453 to 4.
2454 (c_parser_peek_nth_token): New function.
2455 (c_parser_peek_conflict_marker): New function.
2456 (c_parser_error): Detect conflict markers and report them as such.
2457
e2093e02 24582015-12-16 David Malcolm <dmalcolm@redhat.com>
2459
2460 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2461 to preserve range information for the primary expression
2462 in the call to c_parser_postfix_expression_after_primary.
2463
b49f1fbb 24642015-12-16 David Malcolm <dmalcolm@redhat.com>
2465
2466 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2467 expression location, falling back on the first token location,
2468 rather than always using the latter.
2469
1d65bac2 24702015-12-16 Marek Polacek <polacek@redhat.com>
2471
2472 PR c/64637
2473 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2474 available.
2475
75e722a6 24762015-12-15 Marek Polacek <polacek@redhat.com>
2477
2478 PR c/68907
2479 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2480 artificial decl.
2481
7063d45b 24822015-12-08 David Malcolm <dmalcolm@redhat.com>
2483
2484 * c-parser.c (c_parser_alignof_expression): Capture location of
2485 closing parenthesis (if any), or of end of unary expression, and
2486 use it to build a src_range for the expression.
2487
f73b4782 24882015-12-08 David Malcolm <dmalcolm@redhat.com>
2489
2490 PR c/68757
2491 * c-parser.c (c_parser_get_builtin_args): Add
2492 "out_close_paren_loc" param, and write back to it.
2493 (c_parser_postfix_expression): Capture the closing
2494 parenthesis location for RID_CHOOSE_EXPR,
2495 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2496 RID_BUILTIN_SHUFFLE and use it to set the source range
2497 for such expressions; within RID_BUILTIN_COMPLEX set
2498 the underlying location.
2499
1b062945 25002015-12-07 Marek Polacek <polacek@redhat.com>
2501
2502 PR c/68668
2503 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2504 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2505
a4ab54ac 25062015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2507
2508 * c-tree.h (c_build_va_arg): Adjust prototype.
2509 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2510 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2511 parameter, adjust throughout and issue an error if EXPR is a component
2512 with reverse storage order.
2513
da562e32 25142015-12-02 Jason Merrill <jason@redhat.com>
2515
2516 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2517 (c_fully_fold_internal, decl_constant_value_for_optimization):
2518 Move from c-common.c.
2519 * c-tree.h: Declare decl_constant_value_for_optimization.
2520 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2521
89f16034 25222015-12-02 Joseph Myers <joseph@codesourcery.com>
2523
2524 PR c/68162
2525 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2526 following link from declarator to next declarator. Track original
2527 qualified type and pass it to c_build_qualified_type.
2528 * c-typeck.c (c_build_qualified_type): Add arguments
2529 orig_qual_type and orig_qual_indirect.
2530
2a7545d5 25312015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2532
2533 * c-parser.c (c_parser_omp_clause_name)
2534 (c_parser_oacc_all_clauses): Alphabetical sorting.
2535
ad80582d 25362015-12-02 Jakub Jelinek <jakub@redhat.com>
2537
2538 PR c/68533
2539 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2540 for diagnostics.
2541
571b3486 25422015-12-01 Julian Brown <julian@codesourcery.com>
2543 Cesar Philippidis <cesar@codesourcery.com>
2544 James Norris <James_Norris@mentor.com>
2545
2546 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2547 (c_parser_oacc_clause_use_device): New function.
2548 (c_parser_oacc_all_clauses): Add use_device support.
2549 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2550 (c_parser_oacc_host_data): New function.
2551 (c_parser_omp_construct): Add host_data support.
2552 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2553 * c-typeck.c (c_finish_oacc_host_data): New function.
2554 (c_finish_omp_clauses): Add use_device support.
2555
c4848393 25562015-11-29 Jan Hubicka <hubicka@ucw.cz>
2557
2558 PR c/67106
2559 * c-decl.c: Set TYPE_PACKED in variants.
2560
d4e328e9 25612015-11-27 Martin Liska <mliska@suse.cz>
2562
2563 PR c++/68312
2564 * c-array-notation.c (fix_builtin_array_notation_fn):
2565 Use release_vec_vec instead of vec::release.
2566 (build_array_notation_expr): Likewise.
2567 (fix_conditional_array_notations_1): Likewise.
2568 (fix_array_notation_expr): Likewise.
2569 (fix_array_notation_call_expr): Likewise.
2570
c5e4f591 25712015-11-27 Jakub Jelinek <jakub@redhat.com>
2572
2573 PR c/63326
2574 * c-parser.c (c_parser_compound_statement_nostart): If
2575 last_label is true, use pragma_stmt instead of pragma_compound
2576 as second c_parser_pragma argument.
2577 (c_parser_omp_ordered, c_parser_omp_target_update,
2578 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2579 false as second argument to c_parser_skip_to_pragma_eol after
2580 diagnosing standalone directives used in pragma_stmt context.
2581
c954a5bd 25822015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2583
2584 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2585 with "if (ENABLE_OFFLOADING)".
2586
daebf4f3 25872015-11-23 David Malcolm <dmalcolm@redhat.com>
2588
2589 PR objc/68438
2590 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2591 for various Objective-C constructs: Class.name syntax,
2592 @selector(), @protocol(), @encode(), and [] message syntax.
2593
734caf84 25942015-11-20 David Malcolm <dmalcolm@redhat.com>
2595
2596 PR 62314
2597 * c-typeck.c (should_suggest_deref_p): New function.
2598 (build_component_ref): Special-case POINTER_TYPE when
2599 generating a "not a structure of union" error message, and
2600 suggest a "->" rather than a ".", providing a fix-it hint.
2601
11d8dd6f 26022015-11-19 David Malcolm <dmalcolm@redhat.com>
2603
2604 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2605 candidate into a new function, find_closest_identifier.
2606
62efaf6b 26072015-11-19 Marek Polacek <polacek@redhat.com>
2608
2609 PR c/68412
2610 * c-typeck.c (parser_build_binary_op): Properly handle
2611 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2612
9dfffd6d 26132015-11-17 David Malcolm <dmalcolm@redhat.com>
2614
2615 * c-parser.c (set_c_expr_source_range): Bulletproof both
2616 overloaded implementations against NULL expr->value.
2617 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2618 values.
2619 (c_parser_unary_expression): Likewise when handling addresses of
2620 labels.
2621 (c_parser_postfix_expression): Likewise for statement expressions,
2622 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2623 __builtin_va_arg, and for __builtin_offset_of.
2624 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2625 src_range using the range of the braced initializer.
2626 (c_parser_transaction_expression): Set src_range for "ret" to a
2627 sane pair of values.
2628
c58a4cfd 26292015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2630
2631 * c-parser.c (c_finish_omp_declare_simd): Look for
2632 "simd" attribute as well. Update error message.
2633
5f3001a9 26342015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2635
2636 * c-parser.c (c_parser_omp_declare_target): Adjust.
2637
a9833286 26382015-11-14 Jakub Jelinek <jakub@redhat.com>
2639
2640 * c-typeck.c (c_finish_omp_clauses): Don't mark
2641 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2642
ef61516b 26432015-11-14 Marek Polacek <polacek@redhat.com>
2644
2645 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2646 * c-typeck.c: Likewise.
2647
a96cefb2 26482015-11-13 David Malcolm <dmalcolm@redhat.com>
2649
2650 * c-decl.c (warn_defaults_to): Pass line_table to
2651 rich_location ctor.
2652 * c-errors.c (pedwarn_c99): Likewise.
2653 (pedwarn_c90): Likewise.
2654 * c-parser.c (set_c_expr_source_range): New functions.
2655 (c_token::get_range): New method.
2656 (c_token::get_finish): New method.
2657 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2658 based on the range from the start of the LHS to the end of the
2659 RHS.
2660 (c_parser_conditional_expression): Likewise, based on the range
2661 from the start of the cond.value to the end of exp2.value.
2662 (c_parser_binary_expression): Call set_c_expr_source_range on
2663 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2664 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2665 based on the cast_loc through to the end of the expr.
2666 (c_parser_unary_expression): Likewise, based on the
2667 op_loc through to the end of op.
2668 (c_parser_sizeof_expression) Likewise, based on the start of the
2669 sizeof token through to either the closing paren or the end of
2670 expr.
2671 (c_parser_postfix_expression): Likewise, using the token range,
2672 or from the open paren through to the close paren for
2673 parenthesized expressions.
2674 (c_parser_postfix_expression_after_primary): Likewise, for
2675 various kinds of expression.
2676 * c-tree.h (struct c_expr): Add field "src_range".
2677 (c_expr::get_start): New method.
2678 (c_expr::get_finish): New method.
2679 (set_c_expr_source_range): New decls.
2680 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2681 on ret for prefix unary ops.
2682 (parser_build_binary_op): Likewise, running from the start of
2683 arg1.value through to the end of arg2.value.
2684
7a810b2f 26852015-11-13 Marek Polacek <polacek@redhat.com>
2686
2687 PR c/68320
2688 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2689
b67f0560 26902015-11-13 David Malcolm <dmalcolm@redhat.com>
2691
2692 * c-typeck.c: Include spellcheck.h.
2693 (lookup_field_fuzzy_find_candidates): New function.
2694 (lookup_field_fuzzy): New function.
2695 (build_component_ref): If the field was not found, try using
2696 lookup_field_fuzzy and potentially offer a suggestion.
2697
2fc5e987 26982015-11-12 James Norris <jnorris@codesourcery.com>
2699 Joseph Myers <joseph@codesourcery.com>
2700
2701 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2702 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2703 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2704 and PRAGMA_OMP_CLAUSE_LINK.
2705 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2706 and PRAGMA_OACC_CLAUSE_LINK.
2707 (OACC_DECLARE_CLAUSE_MASK): New definition.
2708 (c_parser_oacc_declare): New function.
2709
28a70e29 27102015-11-12 Marek Polacek <polacek@redhat.com>
2711
2712 PR c/67784
2713 * c-parser.c (c_parser_for_statement): Reclassify the token in
2714 a correct scope.
2715
81b1b2a8 27162015-11-11 Marek Polacek <polacek@redhat.com>
2717
2718 PR c/68107
2719 PR c++/68266
2720 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2721 checking the size of an array.
2722
6e803544 27232015-11-11 Andrew MacLeod <amacleod@redhat.com>
2724
2725 * c-array-notation.c: Remove unused header files.
2726 * c-aux-info.c: Likewise.
2727 * c-convert.c: Likewise.
2728 * c-decl.c: Likewise.
2729 * c-errors.c: Likewise.
2730 * c-lang.c: Likewise.
2731 * c-objc-common.c: Likewise.
2732 * c-parser.c: Likewise.
2733 * c-typeck.c: Likewise.
2734 * gccspec.c: Likewise.
2735
a1b7fe4b 27362015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2737 Cesar Philippidis <cesar@codesourcery.com>
2738 James Norris <jnorris@codesourcery.com>
2739 Julian Brown <julian@codesourcery.com>
2740 Nathan Sidwell <nathan@codesourcery.com>
2741
2742 c/
2743 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2744 routine arg.
2745 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2746 (c_parser_pragma): Parse 'acc routine'.
2747 (OACC_ROUTINE_CLAUSE_MARK): Define.
2748 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2749
7758d608 27502015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2751
2752 PR debug/67192
2753 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2754 location of the backward-goto to the start of the loop body.
2755
c2bf2fb2 27562015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2757
2758 PR debug/67192
2759 * c-parser.c (c_parser_while_statement): Finish the loop before
2760 parsing ahead for misleading indentation.
2761 (c_parser_for_statement): Likewise.
2762
292237f3 27632015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2764
2765 * c-decl.c (finish_struct): If the structure has reverse storage
2766 order, rewrite the type of array fields with scalar component. Call
2767 maybe_apply_pragma_scalar_storage_order on entry.
2768 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2769 errors on bit-fields and reverse SSO here and not...
2770 (c_mark_addressable): ...here.
2771 (output_init_element): Adjust call to initializer_constant_valid_p.
2772 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2773
f0479000 27742015-11-06 David Malcolm <dmalcolm@redhat.com>
2775
2776 * c-decl.c (warn_defaults_to): Update for change in signature
2777 of diagnostic_set_info.
2778 * c-errors.c (pedwarn_c99): Likewise.
2779 (pedwarn_c90): Likewise.
2780 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2781 for textinfo::set_location.
2782
ef014f95 27832015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2784 Thomas Schwinge <thomas@codesourcery.com>
2785 James Norris <jnorris@codesourcery.com>
2786
2787 * c-parser.c (c_parser_omp_clause_name): Add support for
2788 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2789 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2790 default(none) in OpenACC.
2791 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2792 arguments.
2793 (c_parser_oacc_clause_tile): New function.
2794 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2795 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2796 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2797 TILE}.
2798 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2799 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2800 FIRSTPRIVATE}.
2801 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2802 (c_parser_oacc_update): Update the error message for missing clauses.
2803 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2804 and OMP_CLAUSE_INDEPENDENT.
2805
f480ca9a 28062015-11-05 Marek Polacek <polacek@redhat.com>
2807
2808 PR c/68090
2809 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2810 deal with pre-evaluation on invalid types.
2811
9561765e 28122015-11-05 Jakub Jelinek <jakub@redhat.com>
2813 Ilya Verbin <ilya.verbin@intel.com>
2814
2815 * c-parser.c: Include context.h and gimple-expr.h.
2816 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2817 monotonic together with nonmonotonic.
2818 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2819 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2820 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2821 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2822 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2823 expressions on combined target teams before the target.
2824 (c_parser_omp_declare_target): If decl has "omp declare target" or
2825 "omp declare target link" attribute, and cgraph or varpool node already
2826 exists, then set corresponding flags. Call c_finish_omp_clauses
2827 in the parenthesized extended-list syntax case.
2828 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2829 declare target.
2830 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2831 on OMP_CLAUSE_REDUCTION array sections.
2832 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2833 into the constant offset, or for variable low-bound using
2834 POINTER_PLUS_EXPR. For structure element based array sections use
2835 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2836 (c_finish_omp_clauses): Drop generic_field_head, structure
2837 elements are now always mapped even as array section bases,
2838 diagnose same var in data sharing and mapping clauses. Diagnose if
2839 linear step on declare simd is neither a constant nor a uniform
2840 parameter. Look through POINTER_PLUS_EXPR for array section
2841 reductions. Diagnose the same var or function appearing multiple
2842 times on the same directive. Fix up wording for the to clause if t
2843 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2844 modifier on kinds other than dynamic or guided or nonmonotonic
2845 modifier together with ordered clause.
2846
9e10bfb7 28472015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2848 Chung-Lin Tang <cltang@codesourcery.com>
2849
2850 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2851
4cba6f60 28522015-10-29 Andrew MacLeod <amacleod@redhat.com>
2853
2854 * c-array-notation.c: Reorder #include's and remove duplicates.
2855 * c-aux-info.c: Likewise.
2856 * c-convert.c: Likewise.
2857 * c-decl.c: Likewise.
2858 * c-errors.c: Likewise.
2859 * c-lang.c: Likewise.
2860 * c-objc-common.c: Likewise.
2861 * c-parser.c: Likewise.
2862 * c-typeck.c: Likewise.
2863
7b15d957 28642015-10-26 Jim Wilson <jim.wilson@linaro.org>
2865
2866 PR debug/66068
2867 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2868 after calling build_qualified_type.
2869
62c48328 28702015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2871 Thomas Schwinge <thomas@codesourcery.com>
2872 James Norris <jnorris@codesourcery.com>
2873 Joseph Myers <joseph@codesourcery.com>
2874 Julian Brown <julian@codesourcery.com>
2875 Bernd Schmidt <bschmidt@redhat.com>
2876
2877 * c-parser.c (c_parser_oacc_shape_clause): New.
2878 (c_parser_oacc_simple_clause): New.
2879 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2880 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2881
2c4c8725 28822015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2883 James Norris <jnorris@codesourcery.com>
2884 Cesar Philippidis <cesar@codesourcery.com>
2885
2886 PR c/64765
2887 PR c/64880
2888 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2889 parameters, and handle these. Adjust all users.
2890 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2891 into...
2892 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2893 all users.
2894 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2895 declare functions.
2896 (c_finish_omp_construct): Declare function.
2897 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2898 Merge functions into...
2899 (c_finish_omp_construct): ... this new function.
2900
844cece0 29012015-10-22 Richard Biener <rguenther@suse.de>
2902
2903 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2904 before folding a MINUS_EXPR.
2905
5ce1b137 29062015-10-21 Marek Polacek <polacek@redhat.com>
2907
2908 PR c/68024
2909 * c-decl.c (start_function): Warn about vararg functions without
2910 a prototype.
2911
1f137e6d 29122015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2913
2914 * c-typeck.c (build_conditional_expr): Use boolean vector
2915 type for vector comparison.
2916 (build_vec_cmp): New.
2917 (build_binary_op): Use build_vec_cmp for comparison.
2918
8523243e 29192015-10-20 Marek Polacek <polacek@redhat.com>
2920
2921 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2922
3f73be3e 29232015-10-20 Marek Polacek <polacek@redhat.com>
2924
2925 PR c/67964
2926 * c-parser.c (c_parser_attributes): Break out of the loop if the
2927 token after an attribute isn't a comma.
2928
43895be5 29292015-10-13 Jakub Jelinek <jakub@redhat.com>
2930 Aldy Hernandez <aldyh@redhat.com>
2931
2932 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2933 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2934 (c_parser_omp_variable_list): Handle structure elements for
2935 map, to and from clauses. Handle array sections in reduction
2936 clause. Formatting fixes.
2937 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2938 if clause modifiers.
2939 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2940 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2941 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2942 c_parser_omp_clause_is_device_ptr): New functions.
2943 (c_parser_omp_clause_ordered): Parse optional parameter.
2944 (c_parser_omp_clause_reduction): Handle array reductions.
2945 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2946 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2947 functions.
2948 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2949 (c_parser_omp_clause_depend_sink): New function.
2950 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2951 (c_parser_omp_clause_map): Parse release/delete map kinds and
2952 optional always modifier.
2953 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2954 and c_finish_omp_clauses callers.
2955 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2956 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2957 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2958 (OMP_CRITICAL_CLAUSE_MASK): Define.
2959 (c_parser_omp_critical): Parse critical clauses.
2960 (c_parser_omp_for_loop): Handle doacross loops, adjust
2961 c_finish_omp_for and c_finish_omp_clauses callers.
2962 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2963 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2964 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2965 (c_parser_omp_for): Disallow ordered clause when combined with
2966 distribute. Disallow linear clause when combined with distribute
2967 and not combined with simd.
2968 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2969 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2970 parse clauses and if depend clause is found, don't parse a body.
2971 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2972 Allow target parallel without for after it.
2973 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2974 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2975 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2976 invalid kinds.
2977 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2978 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2979 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2980 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2981 functions.
2982 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2983 defaultmap and is_device_ptr clauses.
2984 (c_parser_omp_target): Parse target parallel and target simd. Set
2985 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2986 and target exit data. Diagnose invalid map kinds.
2987 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2988 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2989 construct.
2990 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2991 &omp_priv.
2992 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2993 (c_parser_omp_taskloop): New function.
2994 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2995 handle PRAGMA_OMP_TASKLOOP.
2996 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2997 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2998 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2999 Add IS_OMP argument, handle structure element bases, diagnose
3000 bitfields, pass IS_OMP recursively, diagnose known zero length
3001 array sections in depend clauses, handle array sections in reduction
3002 clause, diagnose negative length even for pointers.
3003 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3004 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3005 array sections in reduction clause, set
3006 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3007 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3008 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3009 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3010
789fbb51 30112015-10-06 Marek Polacek <polacek@redhat.com>
3012
3013 * c-parser.c (c_parser_statement_after_labels): Use
3014 protected_set_expr_location.
3015 (c_parser_omp_clause_num_gangs): Likewise.
3016 (c_parser_omp_clause_num_threads): Likewise.
3017 (c_parser_omp_clause_num_workers): Likewise.
3018 (c_parser_omp_clause_vector_length): Likewise.
3019 (c_parser_omp_clause_num_teams): Likewise.
3020 (c_parser_omp_clause_thread_limit): Likewise.
3021 * c-typeck.c (build_c_cast): Likewise.
3022 (c_cast_expr): Likewise.
3023
20cb53c9 30242015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3025
3026 * c-typeck.c (c_tree_equal): Use real_equal instead of
3027 REAL_VALUES_EQUAL.
3028
6d02e6b2 30292015-10-04 Jason Merrill <jason@redhat.com>
3030
3031 * c-parser.c (c_lex_one_token): Handle @synchronized.
3032 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3033 can change whether the function is transaction_safe.
3034
802c32cd 30352015-10-02 Marek Polacek <polacek@redhat.com>
3036
3037 PR c/67730
3038 * c-typeck.c (convert_for_assignment): Use the expansion point
3039 location throughout.
3040
ef17a71a 30412015-10-02 Marek Polacek <polacek@redhat.com>
3042
3043 PR c/64249
3044 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3045 and pass it down to c_parser_if_statement.
3046 (c_parser_else_body): Add CHAIN parameter and pass it down to
3047 c_parser_statement_after_labels.
3048 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3049 duplicated if-else-if conditions.
3050
7e93eb1a 30512015-10-01 Marek Polacek <polacek@redhat.com>
3052
3053 * c-typeck.c (convert_for_assignment): Improve commentary.
3054
ab4c803c 30552015-09-30 Marek Polacek <polacek@redhat.com>
3056
3057 PR c/67730
3058 * c-typeck.c (c_finish_return): Use the expansion point location for
3059 certain "return with value" warnings.
3060
ed536208 30612015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3062
3063 * c-parser.c (pragma_lex): Add loc argument.
3064
03e8b174 30652015-09-15 Marek Polacek <polacek@redhat.com>
3066
3067 PR c/67580
3068 * c-decl.c (tag_exists_p): New function.
3069 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3070 struct/union/enum keywords are missing.
3071 * c-tree.h (tag_exists_p): Declare.
3072
a39b4dc0 30732015-09-15 Marek Polacek <polacek@redhat.com>
3074
3075 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3076 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3077 Return NULL_TREE instead of 0.
3078 (lookup_name): Return NULL_TREE instead of 0.
3079 (lookup_name_in_scope): Likewise.
3080 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3081 (parser_xref_tag): Use false instead of 0.
3082 (start_struct): Use true instead of 1.
3083 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3084
85f5e2ee 30852015-09-14 Marek Polacek <polacek@redhat.com>
3086
3087 * c-typeck.c (set_nonincremental_init_from_string): Use
3088 HOST_WIDE_INT_M1U when shifting a negative value.
3089
739237d5 30902015-09-09 Mark Wielaard <mjw@redhat.com>
3091
3092 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3093 parm against NULL.
3094
d2b2788c 30952015-09-10 Jakub Jelinek <jakub@redhat.com>
3096
3097 PR c/67502
3098 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3099 into OMP_FOR_PRE_BODY rather than before the loop.
3100
deef87db 31012015-09-09 Jakub Jelinek <jakub@redhat.com>
3102
c43f93d7 3103 PR c/67501
3104 * c-parser.c (c_parser_oacc_all_clauses,
3105 c_parser_omp_all_clauses): Remove invalid clause from
3106 list of clauses even if parser->error is set.
3107
0fdcfb93 3108 PR c/67500
3109 * c-parser.c (c_parser_omp_clause_aligned,
3110 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3111 test for errors.
3112 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3113 error_mark_node.
3114
deef87db 3115 PR c/67495
3116 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3117 instead of c_parser_unary_expression. If the result is !lvalue_p,
3118 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3119
e96292e9 31202015-09-04 Marek Polacek <polacek@redhat.com>
3121
3122 PR sanitizer/67279
3123 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3124
547c6b1f 31252015-09-03 Martin Sebor <msebor@redhat.com>
3126
3127 PR c/66516
6ccd7236 3128 * c-typeck.c (convert_arguments, parser_build_unary_op,
3129 build_conditional_expr, c_cast_expr, convert_for_assignment,
3130 build_binary_op, _objc_common_truthvalue_conversion): Call
547c6b1f 3131 reject_gcc_builtin.
3132 (c_decl_implicit): Define.
3133
bd66724c 31342015-09-02 Marek Polacek <polacek@redhat.com>
3135
3136 PR c/67432
3137 * c-parser.c (c_parser_enum_specifier): Give a better error for
3138 an empty enum.
3139
6dc50383 31402015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3141
3142 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3143
7ad1d78d 31442015-08-12 Marek Polacek <polacek@redhat.com>
3145
3146 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3147 LOC to it.
3148
c9099388 31492015-08-03 Marek Polacek <polacek@redhat.com>
3150
3151 PR c/67088
3152 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3153 Use it.
3154 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3155
9255be07 31562015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3157
3158 * c-parser.c (c_parser_if_body): Take token_indent_info
3159 argument. Call warn_for_misleading_indentation even when the
3160 body is a semicolon. Extract token_indent_infos corresponding
3161 to the guard, body and next tokens. Adjust call to
3162 warn_for_misleading_indentation accordingly.
3163 (c_parser_else_body): Likewise.
3164 (c_parser_if_statement): Likewise.
3165 (c_parser_while_statement): Likewise.
3166 (c_parser_for_statement): Likewise.
3167
dbbd4c6d 31682015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3169 Manuel López-Ibáñez <manu@gcc.gnu.org>
3170
3171 * c-decl.c (get_parm_info): Remove static var. Update warning
3172 message.
3173
6784a472 31742015-07-27 Marek Polacek <polacek@redhat.com>
3175
3176 PR c++/66555
3177 PR c/54979
3178 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3179
8d669e79 31802015-07-20 Marek Polacek <polacek@redhat.com>
3181
3182 PR c++/55095
3183 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3184 (build_binary_op): Warn about left shift overflows.
3185
1eacc14a 31862015-07-09 Andrew MacLeod <amacleod@redhat.com>
3187
3188 * c-array-notation.c: Adjust includes for flags.h changes.
3189 * c-objc-common.c: Likewise.
3190
9ef16211 31912015-07-07 Andrew MacLeod <amacleod@redhat.com>
3192
3193 * c-array-notation.c: Adjust includes.
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
0949f227 32032015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3204
3205 PR fortran/66605
3206 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3207
be23b16f 32082015-06-29 Marek Polacek <polacek@redhat.com>
3209
3210 PR c/66322
3211 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3212 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3213 about -Wswitch-bool here.
3214 (do_case): Update c_add_case_label call.
3215 (c_finish_case): Update c_do_switch_warnings call.
3216
6290f0db 32172015-06-27 Marek Polacek <polacek@redhat.com>
3218
3219 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3220
aa3e402e 32212015-06-26 Marek Polacek <polacek@redhat.com>
3222
3223 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3224 INDIRECT_REF_P.
3225 * c-typeck.c (array_to_pointer_conversion): Likewise.
3226 (build_unary_op): Likewise.
3227 (c_finish_return): Likewise.
3228
ec2e0095 32292015-06-25 Andrew MacLeod <amacleod@redhat.com>
3230
3231 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3232 * c-parser.c: Likewise.
3233
770ff93b 32342015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3235
3236 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3237 instead of pointer_hash.
3238 (detect_field_duplicates): Likewise.
3239
f48c7f4a 32402015-06-25 Marek Polacek <polacek@redhat.com>
3241
3242 * c-array-notation.c: Use VAR_P throughout.
3243 * c-decl.c: Likewise.
3244 * c-objc-common.c: Likewise.
3245 * c-parser.c: Likewise.
3246 * c-typeck.c: Likewise.
3247
ce41e81a 32482015-06-25 Marek Polacek <polacek@redhat.com>
3249
3250 * c-decl.c: Use is_global_var throughout.
3251 * c-parser.c: Likewise.
3252 * c-typeck.c: Likewise.
3253
f2ab3bac 32542015-06-17 Andrew MacLeod <amacleod@redhat.com>
3255
3256 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3257 * c-aux-info.c: Likewise.
3258 * c-convert.c: Likewise.
3259 * c-decl.c: Likewise.
3260 * c-errors.c: Likewise.
3261 * c-lang.c: Likewise.
3262 * c-objc-common.c: Likewise.
3263 * c-parser.c: Likewise.
3264 * c-typeck.c: Likewise.
3265
647730ab 32662015-06-11 Jan Hubicka <hubicka@ucw.cz>
3267
3268 PR middle-end/66325
3269 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3270 variants.
3271
dd4b0a0d 32722015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3273
3274 * c-decl.c (pop_scope): Register the main translation unit
3275 through the new debug hook.
3276
64486212 32772015-06-08 Andrew MacLeod <amacleod@redhat.com>
3278
3279 * c-array-notation.c : Adjust include files.
3280 * c-aux-info.c : Likewise.
3281 * c-convert.c : Likewise.
3282 * c-decl.c : Likewise.
3283 * c-errors.c : Likewise.
3284 * c-lang.c : Likewise.
3285 * c-lang.h : Likewise.
3286 * c-objc-common.c : Likewise.
3287 * c-parser.c : Likewise.
3288 * c-typeck.c : Likewise.
3289
3a1c9df2 32902015-06-05 Aldy Hernandez <aldyh@redhat.com>
3291
3292 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3293 immediately clobber it.
3294 (c_write_global_declarations_1): Remove call to
3295 check_global_declaration_1.
3296 (c_write_global_declarations_2): Remove.
3297 (c_write_final_cleanups): Rename from c_write_global_declarations.
3298 Remove call to finalize_compilation_unit.
3299 Remove calls to debugging hooks.
3300 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3301 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3302 * c-tree.h: Remove c_write_global_declarations.
3303
f77c0292 33042015-06-04 Andrew MacLeod <amacleod@redhat.com>
3305
3306 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3307 * c-aux-info.c: Likewise.
3308 * c-convert.c: Likewise.
3309 * c-decl.c: Likewise.
3310 * c-errors.c: Likewise.
3311 * c-lang.c: Likewise.
3312 * c-objc-common.c: Likewise.
3313 * c-parser.c: Likewise.
3314 * c-typeck.c: Likewise.
3315
b44134dc 33162015-06-04 Marek Polacek <polacek@redhat.com>
3317
3318 PR c/66341
3319 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3320 it is a lvalue.
3321
d1df0bfc 33222015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3323
3324 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3325 Warn for empty struct.
3326 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3327
f8363c5d 33282015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3329
3330 * c-decl.c (start_function): Call plugin before parsing.
3331 (finish_function): Call plugin after parsing.
3332
5b9761f5 33332015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3334
3335 PR c/49551
3336 * c-decl.c (merge_decls): Merge DECL_COMMON.
3337
eeec71b4 33382015-05-22 Jim Wilson <jim.wilson@linaro.org>
3339
3340 * Make-lang.in (check_gcc_pallelize): Define.
3341
5a4c69dd 33422015-05-22 Marek Polacek <polacek@redhat.com>
3343
3344 PR c/47043
3345 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3346 attributes.
3347
5650b4ff 33482015-05-21 Marek Polacek <polacek@redhat.com>
3349
3350 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3351 DECL_BUILT_IN.
3352
b443c459 33532015-05-20 Marek Polacek <polacek@redhat.com>
3354
3355 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3356 * c-typeck.c: Likewise.
3357
9e73638f 33582015-05-19 Marek Polacek <polacek@redhat.com>
3359
3360 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3361
d7729e26 33622015-05-19 Jakub Jelinek <jakub@redhat.com>
3363
3364 PR middle-end/66199
3365 * c-parser.c (c_parser_omp_for_loop): Don't add
3366 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3367 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3368 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3369 constructs.
3370
dfcf26a5 33712015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3372
3373 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
9e73638f 3374 swaps.
dfcf26a5 3375
09172322 33762015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3377
3378 PR fortran/44054
3379 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3380 accessor function.
3381
aac24642 33822015-05-14 Marek Polacek <polacek@redhat.com>
3383
3384 PR c/66066
3385 PR c/66127
3386 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3387 rather than with 0.
3388
e5f01cba 33892015-05-12 David Malcolm <dmalcolm@redhat.com>
3390
3391 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3392 to add a call to warn_for_misleading_indentation.
3393 (c_parser_else_body): Likewise, adding param "else_loc".
3394 (c_parser_if_statement): Check for misleading indentation.
3395 (c_parser_while_statement): Likewise.
3396 (c_parser_for_statement): Likewise.
3397
dc5945dc 33982015-05-08 Marek Polacek <polacek@redhat.com>
3399
3400 PR c/64918
3401 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3402 (output_init_element): Likewise.
3403
cdc64059 34042015-05-07 Marek Polacek <polacek@redhat.com>
3405
3406 PR c/65179
3407 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3408 value.
3409
6fa7118e 34102015-04-30 Marek Polacek <polacek@redhat.com>
3411
3412 * c-typeck.c (set_init_label): Call error_at instead of error and
3413 pass LOC to it.
3414
98f44804 3415 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3416 the type of a decl.
3417
2cd7caae 3418 * c-typeck.c (c_build_va_arg): Clarify the error message.
3419
95cfd391 34202015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3421
3422 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3423 OMP_STANDALONE_CLAUSES.
3424
e65e39f8 34252015-04-28 Marek Polacek <polacek@redhat.com>
3426
3427 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3428
5580bf42 34292015-04-28 Marek Polacek <polacek@redhat.com>
3430
3431 PR c/65901
3432 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3433
c3468fc2 34342015-04-25 Marek Polacek <polacek@redhat.com>
3435
3436 PR c/52085
3437 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3438 attribute.
3439
0cd6b1b4 34402015-04-23 Marek Polacek <polacek@redhat.com>
3441
3442 PR c/65345
3443 * c-decl.c (set_labels_context_r): New function.
3444 (store_parm_decls): Call it via walk_tree_without_duplicates.
3445 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3446 instead of create_tmp_var. Build TARGET_EXPR instead of
3447 COMPOUND_EXPR.
3448 (build_atomic_assign): Use create_tmp_var_raw instead of
3449 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3450
05a827ce 34512015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3452
3453 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3454 (c_parser_omp_target_update): Add missed %> to error_at ().
3455
de801c28 34562015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3457
3458 PR target/55143
3459 * c-decl.c (c_default_pointer_mode): Remove definition.
3460 * c-tree.h (c_default_pointer_mode): Remove declaration.
3461
c3b1dca4 34622015-03-27 Tobias Burnus <burnus@net-b.de>
3463
3464 PR c/65586
3465 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3466 error out.
3467 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3468 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3469 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3470
1443772f 34712015-03-19 Jakub Jelinek <jakub@redhat.com>
3472
3473 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3474 attribute for DECL_EXTERNAL VAR_DECLs.
3475
76738f56 34762015-03-11 Jakub Jelinek <jakub@redhat.com>
3477
3478 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3479 argument.
3480
16f958b3 34812015-03-10 Jakub Jelinek <jakub@redhat.com>
3482
3483 PR c/65120
3484 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3485 before preparing arguments to warn_logical_not_parentheses.
3486
6054103a 34872015-03-09 Jakub Jelinek <jakub@redhat.com>
3488
3489 PR c/65120
3490 * c-typeck.c (parser_build_binary_op): Don't warn for
3491 !!x == y or !b == y where b is _Bool.
3492
de3a1e03 34932015-03-09 Marek Polacek <polacek@redhat.com>
3494
3495 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3496 * c-decl.c (grokdeclarator): Likewise.
3497 * c-typeck.c (build_binary_op): Likewise.
3498
084e6bf0 34992015-02-27 Marek Polacek <polacek@redhat.com>
3500
3501 PR c/65228
3502 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3503
4d7c4134 35042015-02-14 Marek Polacek <polacek@redhat.com>
3505
3506 PR c/64768
3507 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3508 declared through a typedef name.
3509
b1380826 35102015-02-13 Marek Polacek <polacek@redhat.com>
3511
3512 PR c/65050
3513 * c-decl.c (grokdeclarator): Print also the type when giving
3514 the error message about array's incomplete element type.
3515
35ff54b5 35162015-02-11 Jakub Jelinek <jakub@redhat.com>
3517
3518 PR c/64824
3519 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3520 check in the POP macro.
3521
46861609 35222015-02-09 Marek Polacek <polacek@redhat.com>
3523
3524 PR c/64856
3525 * c-typeck.c (process_init_element): Don't always wrap
3526 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3527 initializing a range of elements.
3528
bbf8fbec 35292015-02-04 Jakub Jelinek <jakub@redhat.com>
3530
3531 PR c/64824
3532 PR c/64868
3533 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3534
46861609 35352015-02-02 Bruno Loff <bruno.loff@gmail.com>
1f0ce3ac 3536
3537 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3538 processing enum declaration.
3539
70279be9 35402015-01-29 Marek Polacek <polacek@redhat.com>
3541
3542 PR c/64709
3543 * c-typeck.c (pop_init_level): If constructor_elements has
3544 exactly one element with integer_zerop value, set constructor_zeroinit
3545 to 1. Remove braces around warning_init call.
3546
591970b4 35472015-01-27 Jakub Jelinek <jakub@redhat.com>
3548
3549 PR c/64766
3550 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3551 of FUNCTION_DECLs with error_mark_node.
3552
87778dc4 35532015-01-26 Jakub Jelinek <jakub@redhat.com>
3554
3555 PR c/64778
3556 * c-typeck.c (convert_arguments): Return -1 if there are
3557 error_args, even if we've diagnosed too many arguments.
3558
cffdfb3d 35592015-01-21 Richard Biener <rguenther@suse.de>
3560
3561 PR middle-end/64313
3562 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3563 for builtins the user declared correctly.
3564
ca4c3545 35652015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3566 Bernd Schmidt <bernds@codesourcery.com>
3567 Cesar Philippidis <cesar@codesourcery.com>
3568 James Norris <jnorris@codesourcery.com>
3569 Jakub Jelinek <jakub@redhat.com>
3570 Ilmir Usmanov <i.usmanov@samsung.com>
3571
3572 * c-parser.c: Include "gomp-constants.h".
3573 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3574 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3575 Use OMP_CLAUSE_SET_MAP_KIND.
3576 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3577 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3578 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3579 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3580 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3581 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3582 "copyout", "create", "delete", "deviceptr", "gang", "host",
3583 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3584 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3585 "present_or_create", "pcreate", "seq", "self", "vector",
3586 "vector_length", "wait", "worker".
3587 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3588 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3589 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3590 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3591 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3592 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3593 (c_parser_oacc_data_clause_deviceptr)
3594 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3595 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3596 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3597 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3598 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3599 (c_parser_oacc_parallel, c_parser_oacc_update)
3600 (c_parser_oacc_wait): New functions.
3601 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3602 (c_finish_oacc_data): New prototypes.
3603 * c-typeck.c: Include "gomp-constants.h".
3604 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3605 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3606 OMP_CLAUSE_SET_MAP_KIND.
3607 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3608 (c_finish_oacc_data): New functions.
3609 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3610 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3611 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3612 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3613 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3614 GOMP_MAP_FORCE_DEVICEPTR.
3615
1f78217c 36162015-01-09 Michael Collison <michael.collison@linaro.org>
3617
3618 * c-array-notation.c: Include hash-set.h, machmode.h,
3619 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3620 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3621 * c-aux-info.c: Ditto.
3622 * c-convert.c: Ditto.
3623 * c-decl.c: Ditto.
3624 * c-errors.c: Ditto.
3625 * c-lang.c: Dittoxs.
3626 * c-objc-common.c: Ditto.
3627 * c-parser.c: Ditto.
3628 * c-typeck.c: Include hash-set.h, machmode.h,
3629 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3630 fold-const.h, wide-int.h, inchash.h, real.h and
3631 fixed-value.h due to flattening of tree.h.
3632
15e18a8c 36332015-01-07 Marek Polacek <polacek@redhat.com>
3634
3635 PR c/64417
3636 * c-typeck.c (process_init_element): Disallow initialization of
3637 a flexible array member with a string constant if the structure
3638 is in an array.
3639
d353bf18 36402015-01-05 Jakub Jelinek <jakub@redhat.com>
3641
823a9dd4 3642 PR sanitizer/64344
3643 * c-typeck.c (convert_for_assignment, c_finish_return): For
3644 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3645 types also set in_late_binary_op around convert call.
3646 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3647 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3648 result on expr as last argument to ubsan_instrument_float_cast,
3649 if in_late_binary_op, don't use c_save_expr but save_expr.
3650
d353bf18 3651 Update copyright years.
3652
92b63884 36532015-01-05 Marek Polacek <polacek@redhat.com>
3654
3655 PR c/64423
3656 * c-typeck.c (build_array_ref): Pass loc down to
3657 warn_array_subscript_with_type_char.
3658
92a44a68 36592014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
8a8211df 3660
3661 * c-typeck.c: New behavious for pointers to arrays with qualifiers
a49621cf 3662 (common-pointer-type): For pointers to arrays take qualifiers from
8a8211df 3663 element type.
a49621cf 3664 (build_conditional_expr): Add warnings for lost qualifiers.
8a8211df 3665 (comp-target-types): Allow pointers to arrays with different qualifiers.
a49621cf 3666 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
8a8211df 3667 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
a49621cf 3668 to PEDWARN_FOR_QUALIFIERS.
8a8211df 3669
35ea0139 36702014-12-17 Jakub Jelinek <jakub@redhat.com>
3671
3672 PR sanitizer/64289
3673 * c-convert.c: Include ubsan.h.
3674 (convert): For real -> integral casts and
3675 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3676 instead instrument the float cast directly.
3677
f9e245b2 36782014-11-29 Jakub Jelinek <jakub@redhat.com>
3679
3680 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3681 c_finish_stmt_expr): Remove NULL last argument from
3682 create_tmp_var_raw and create_tmp_var calls.
3683 * c-array-notation.c (fix_builtin_array_notation_fn,
3684 build_array_notation_expr, fix_conditional_array_notations_1,
3685 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3686
fce2dbd1 36872014-11-28 Marek Polacek <polacek@redhat.com>
3688
3689 PR c/63862
3690 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3691 convert the right operand to integer type.
3692
396c36b7 36932014-11-25 Marek Polacek <polacek@redhat.com>
3694
3695 PR c/63877
3696 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3697 for inline functions.
3698
c61ef207 36992014-11-21 Jakub Jelinek <jakub@redhat.com>
3700
3701 PR target/63764
3702 * c-typeck.c (build_array_ref): Adjust
3703 convert_vector_to_pointer_for_subscript caller. If it returns true,
3704 call non_lvalue_loc on the result.
3705
565353e8 37062014-11-11 Richard Biener <rguenther@suse.de>
3707
3708 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3709 to true.
3710
fdd735a7 37112014-11-10 Andi Kleen <ak@linux.intel.com>
3712
3713 PR c/60804
3714 * c-parser.c (c_parser_statement_after_labels): Call
3715 check_no_cilk.
3716 (c_parser_if_statement): Dito.
3717 (c_parser_switch_statement): Dito.
3718 (c_parser_while_statement): Dito.
3719 (c_parser_do_statement): Dito.
3720 (c_parser_for_statement): Dito.
3721 * c-typeck.c (c_finish_loop): Dito.
3722
0feb4de1 37232014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3724
3725 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3726 OPT_Wshift_count_overflow in the warnings.
3727
a3fec48a 37282014-10-30 Marek Polacek <polacek@redhat.com>
3729
3730 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3731 print the stripped version as well, if they're not the same.
3732
3754d046 37332014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3734
3735 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3736 machine_mode.
3737
1140c305 37382014-10-28 Andrew MacLeod <amacleod@redhat.com>
3739
3740 * c-decl.c: Adjust include files.
3741 * c-parser.c: Ditto.
3742
ab103e33 37432014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3744 Tom Tromey <tromey@redhat.com>
3745
3746 * c-tree.h (enum c_oracle_request): New.
3747 (c_binding_oracle_function): New typedef.
3748 (c_binding_oracle, c_pushtag, c_bind): Declare.
3749 * c-decl.c (c_binding_oracle): New global.
3750 (I_SYMBOL_CHECKED): New macro.
3751 (i_symbol_binding): New function.
3752 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3753 (I_TAG_CHECKED): New macro.
3754 (i_tag_binding): New function.
3755 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3756 (I_LABEL_CHECKED): New macro.
3757 (i_label_binding): New function.
3758 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3759 (c_print_identifier): Save and restore c_binding_oracle.
3760 (c_pushtag, c_bind): New functions.
3761
94ea8568 37622014-10-27 Andrew MacLeod <amacleod@redhat.com>
3763
3764 * c-typeck.c: Adjust include files.
3765
32ecf960 37662014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3767
3768 PR c++/53061
3769 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3770 initialization here...
3771 (c_initialize_diagnostics): ... but here. Set defaults after
3772 building pretty-printer.
3773
2981340f 37742014-10-23 Marek Polacek <polacek@redhat.com>
3775
3776 PR c/63626
3777 * c-decl.c (pop_scope): Don't print warning in external_scope.
3778
d303aeaf 37792014-10-19 Marek Polacek <polacek@redhat.com>
3780
3781 PR c/63567
3782 * c-typeck.c (output_init_element): Allow initializing objects with
3783 static storage duration with compound literals even in C99 and add
3784 pedwarn for it.
3785
bccf97da 37862014-10-17 Marek Polacek <polacek@redhat.com>
3787
3788 PR c/63567
3789 * c-typeck.c (digest_init): Allow initializing objects with static
3790 storage duration with compound literals even in C99 and add pedwarn
3791 for it.
3792
d9c77450 37932014-10-17 Marek Polacek <polacek@redhat.com>
3794
3795 PR c/63543
3796 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3797 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3798 error multiple times. Print the type.
3799
a2bbd0a7 38002014-10-17 Marek Polacek <polacek@redhat.com>
3801
3802 PR c/63549
3803 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3804 type.
3805
e610d2b2 38062014-10-17 Marek Polacek <polacek@redhat.com>
3807
3808 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3809 (start_function): Use OPT_Wimplicit_int instead of 0.
3810 (store_parm_decls_oldstyle): Likewise.
3811
6b6e56b6 38122014-10-17 Alan Modra <amodra@gmail.com>
3813
3814 PR middle-end/61848
3815 * c-decl.c (merge_decls): Don't merge section name or tls model
3816 to newdecl symtab node, instead merge to olddecl. Override
3817 existing olddecl section name. Set tls_model for all thread-local
3818 vars, not just OMP thread-private ones. Remove incorrect comment.
3819
a3020f2f 38202014-10-16 Andrew MacLeod <amacleod@redhat.com>
3821
3822 * c-decl.c: Adjust include files.
3823
9f75f026 38242014-10-14 DJ Delorie <dj@redhat.com>
3825
3826 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3827 (c_token_starts_typename): Check all __intN, not just __int128.
3828 (c_token_starts_declspecs): Likewise.
3829 (c_parser_declspecs): Likewise.
3830 (c_parser_attribute_any_word): Likewise.
3831 (c_parser_objc_selector): Likewise.
3832 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3833 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3834 is specified.
3835 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3836 __int128.
3837 (finish_declspecs): Likewise.
3838
4f284d4a 38392014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3840
a49621cf 3841 * c-parser.c (c_parser_all_labels): New function to replace
4f284d4a 3842 the duplicate code.
a49621cf 3843 (c_parser_statement): Call the new function.
4f284d4a 3844
61a892dc 38452014-10-09 Marek Polacek <polacek@redhat.com>
3846
3847 PR c/63480
3848 * c-typeck.c (pop_init_level): Don't warn about initializing
3849 with { }.
3850
4e888fd9 38512014-10-07 Marek Polacek <polacek@redhat.com>
3852
3853 PR c/59717
3854 * c-decl.c (header_for_builtin_fn): New function.
3855 (implicitly_declare): Suggest which header to include.
3856
224bdd51 38572014-10-07 Marek Polacek <polacek@redhat.com>
3858
3859 * c-convert.c (convert): Use error_operand_p.
3860 * c-typeck.c (require_complete_type): Likewise.
3861 (really_atomic_lvalue): Likewise.
3862 (digest_init): Likewise.
3863 (handle_omp_array_sections_1): Likewise.
3864
a2bc79db 38652014-10-03 Marek Polacek <polacek@redhat.com>
3866
3867 PR c/63453
3868 * c-decl.c (pop_scope): Don't warn about "inline function declared
3869 but never defined" for functions marked with gnu_inline attribute.
3870
4fc4088b 38712014-09-25 Jakub Jelinek <jakub@redhat.com>
3872
3873 PR c++/63249
3874 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3875 on low_bound and length.
3876
5213d6c9 38772014-09-24 Marek Polacek <polacek@redhat.com>
3878
3879 PR c/61405
3880 PR c/53874
3881 * c-parser.c: Don't define CPP_KEYWORD.
3882 (c_parser_switch_statement): Pass original type to c_finish_case.
3883 * c-tree.h (c_finish_case): Update declaration.
3884 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3885 conditionally to c_do_switch_warnings.
3886
6ea2b1bc 38872014-09-03 Marek Polacek <polacek@redhat.com>
3888
3889 PR c/62024
3890 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3891 conversions.
3892
40750995 38932014-09-02 Jakub Jelinek <jakub@redhat.com>
3894 Balaji V. Iyer <balaji.v.iyer@intel.com>
3895 Igor Zamyatin <igor.zamyatin@intel.com>
3896
3897 * c-parser.c (c_parser_cilk_for): New function.
3898 (c_parser_cilk_grainsize): Likewise.
3899 (c_get_temp_regvar): Likewise.
3900 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3901 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3902 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3903 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3904 case.
3905
8c583613 39062014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3907
3908 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3909 with using HOST_WIDE_INT without truncation to 'int'
3910
dc6229e8 39112014-08-22 Marek Polacek <polacek@redhat.com>
3912
3913 PR c++/62199
3914 * c-typeck.c (parser_build_binary_op): Adjust call to
3915 warn_logical_not_parentheses.
3916
5fdda74b 39172014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3918
3919 PR other/62008
3920 * c-parser.c (c_parser_array_notation): Check for correct
3921 type of an array added.
3922
78bf4156 39232014-08-19 Marek Polacek <polacek@redhat.com>
3924
3925 PR c++/62153
3926 * c-typeck.c (build_binary_op): If either operand of a comparison
3927 is a boolean expression, call maybe_warn_bool_compare.
3928
005b8fe7 39292014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3930
3931 PR c/45584
3932 * c-typeck.c (build_c_cast): Do a conversion even when the
3933 TYPE_MAIN_VARIANTs are the same.
3934
508ea33a 39352014-08-19 Marek Polacek <polacek@redhat.com>
3936
3937 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3938 pedwarn_c99 instead of pedwarn.
3939 (grokfield): Likewise.
3940 (warn_defaults_to): New function.
3941 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3942 Unconditionally call pedwarn_c99 instead of pedwarn.
3943 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3944 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3945 check flag_isoc11 before.
3946 * c-errors.c (pedwarn_c99): Change the return type to bool.
3947 Handle -Wc99-c11-compat.
3948 * c-parser.c (disable_extension_diagnostics): Handle
3949 warn_c99_c11_compat.
3950 (restore_extension_diagnostics): Likewise.
3951 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3952 instead of pedwarn, don't check flag_isoc11 before.
3953 (c_parser_declspecs): Likewise.
3954 (c_parser_alignas_specifier): Likewise.
3955 (c_parser_alignof_expression): Likewise.
3956 (c_parser_generic_selection): Likewise.
3957 * c-tree.h (pedwarn_c99): Update declaration.
3958 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3959 of pedwarn_c99.
3960
806fe15e 39612014-08-19 Marek Polacek <polacek@redhat.com>
3962
3963 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3964 to pedwarn_c90.
3965 * c-errors.c: Include "opts.h".
3966 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3967 * c-parser.c (disable_extension_diagnostics): Handle negative value
3968 of warn_c90_c99_compat, too.
3969 (restore_extension_diagnostics): Likewise.
3970 (c_parser_compound_statement_nostart): Pass
3971 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3972
89868e45 39732014-08-12 Marek Polacek <polacek@redhat.com>
3974
3975 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3976 Add pedwarn.
3977 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3978 Likewise.
3979 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3980
92a44a68 39812014-08-10 Marek Polacek <polacek@redhat.com>
890c2e2f 3982
3983 PR c/51849
3984 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3985 Call pedwarn_c90 instead of pedwarn.
3986 (check_bitfield_type_and_width): Likewise.
3987 (declspecs_add_qual): Likewise.
3988 (declspecs_add_type): Likewise.
3989 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3990 Adjust to only call pedwarn_c90.
3991 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3992 pedwarn_c90 instead of pedwarn.
3993 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3994 * c-parser.c (disable_extension_diagnostics): Handle
3995 warn_c90_c99_compat.
3996 (restore_extension_diagnostics): Likewise.
3997 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3998 pedwarn_c90 instead of pedwarn.
3999 (c_parser_initelt): Likewise.
4000 (c_parser_postfix_expression): Likewise.
4001 (c_parser_postfix_expression_after_paren_type): Likewise.
4002 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4003 * c-tree.h: Fix formatting.
4004 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4005 pedwarn_c90 instead of pedwarn.
4006
7149db5f 40072014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4008
4009 * c-typeck.c: Remove include of pointer-set.h.
4010
1c75251e 40112014-08-07 Marek Polacek <polacek@redhat.com>
4012
4013 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4014
06ecf488 40152014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4016
4017 * c-typeck.c: Use hash_map instead of pointer_map.
4018
431205b7 40192014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4020
4021 * c-decl.c: Use hash_set instead of pointer_set.
4022
3394c80c 40232014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4024
4025 PR middle-end/61455
4026 * c-array-notation.c (expand_array_notations): Handling
4027 of DECL_EXPR added.
4028
f22a2cb7 40292014-07-31 Marc Glisse <marc.glisse@inria.fr>
4030
4031 PR c++/60517
4032 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4033 a local variable.
4034
74691f46 40352014-07-30 Tom Tromey <tromey@redhat.com>
4036
4037 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4038 field.
4039 (really_start_incremental_init, push_init_level): Initialize
4040 designator_depth.
4041 (pop_init_level): Set global designator_depth.
4042 (process_init_element): Check for designated_init attribute.
4043
f9767fb6 40442014-07-20 Marek Polacek <polacek@redhat.com>
4045
4046 PR c/61852
4047 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4048 (implicitly_declare): Pass location to implicit_decl_warning.
4049
305d96bc 40502014-07-14 Jakub Jelinek <jakub@redhat.com>
4051
4052 PR middle-end/61294
4053 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4054 If non-NULL, call c_parser_check_literal_zero.
4055 (c_parser_check_literal_zero): New function.
4056 (c_parser_postfix_expression_after_primary): Adjust
4057 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4058
87d59e72 40592014-07-06 Marek Polacek <polacek@redhat.com>
4060
4061 PR c/6940
4062 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4063 * c-tree.h (C_ARRAY_PARAMETER): Define.
4064 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4065 function parameter.
4066
752098c8 40672014-07-02 Jan Hubicka <hubicka@ucw.cz>
92a44a68 4068 Chen Gang <gang.chen.5i5j@gmail.com>
752098c8 4069
4070 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4071 releasing symbol.
4072
1207866e 40732014-07-01 Marek Polacek <polacek@redhat.com>
4074
4075 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4076 instead of 0 to WARN_FOR_ASSIGNMENT.
4077
7a6bbb76 40782014-07-01 Marek Polacek <polacek@redhat.com>
4079
4080 PR c/58286
4081 * c-typeck.c (convert_for_assignment): Pass
4082 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4083
70575064 40842014-06-30 Marek Polacek <polacek@redhat.com>
4085
4086 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4087 has no_sanitize_undefined attribute.
4088
4879e4cf 40892014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4090
4091 PR middle-end/57541
4092 * c-array-notation.c (fix_builtin_array_notation_fn):
4093 Check for 0 arguments in builtin call. Check that bultin argument is
4094 correct.
4095 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4096 index.
4097
45c5b823 40982014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4099
4100 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4101 qualifiers in __auto_type for atomic types.
4102 (c_parser_typeof_specifier): Discard all type qualifiers in
4103 __typeof__ for atomic types.
4104
430b73ee 41052014-06-25 Marek Polacek <polacek@redhat.com>
4106
4107 PR c/61162
4108 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4109 the return expression to c_finish_return.
4110
9580cb79 41112014-06-25 Jakub Jelinek <jakub@redhat.com>
4112
4113 * c-typeck.c (c_finish_omp_clauses): Make sure
4114 OMP_CLAUSE_LINEAR_STEP has correct type.
4115
c1f445d2 41162014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4117
4118 * c-decl.c: Adjust.
4119
e471cc6f 41202014-06-24 Jakub Jelinek <jakub@redhat.com>
4121
4122 * c-parser.c (c_parser_omp_for_loop): For
4123 #pragma omp parallel for simd move lastprivate clause from parallel
4124 to for rather than simd.
4125
499b7390 41262014-06-23 Marek Polacek <polacek@redhat.com>
4127
4128 * c-typeck.c (parser_build_binary_op): Don't call
4129 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4130
5e68df57 41312014-06-15 Jan Hubicka <hubicka@ucw.cz>
4132
4133 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4134 * c-decl.c (merge_decls): Likewise.
4135
064b0d02 41362014-06-09 Marek Polacek <polacek@redhat.com>
4137
4138 PR c/36446
4139 * c-typeck.c (error_init): Call inform instead of error_at.
4140 (pedwarn_init): Call inform instead of pedwarn.
4141 (warning_init): Call inform instead of warning_at.
4142
71e19e54 41432014-06-07 Jan Hubicka <hubicka@ucw.cz>
4144
4145 * c-decl.c (merge_decls): Use set_decl_section_name.
4146 (duplicate_decls): Remove node if it exists.
4147
95cdf3fd 41482014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4149
4150 PR c/53119
4151 * c-typeck.c (push_init_level, process_init_element,
4152 pop_init_level): Correct check for zero initialization, move
4153 missing brace warning to respect zero initialization.
4154
a07f86a6 41552014-06-05 Marek Polacek <polacek@redhat.com>
4156
4157 PR c/56724
4158 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4159
32dc1512 41602014-06-05 Marek Polacek <polacek@redhat.com>
4161
4162 PR c/49706
4163 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4164 on the left hand side operand of a comparison.
4165
64cf1262 41662014-06-05 Marek Polacek <polacek@redhat.com>
4167
4168 PR c/48062
4169 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4170 Print note only if the warning was printed.
4171
071f6d39 41722014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4173
4174 PR c/58942
4175 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4176 with a pointer.
4177
c69ec07d 41782014-06-03 Marek Polacek <polacek@redhat.com>
4179
4180 PR c/60439
4181 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4182 c_start_case.
4183 * c-tree.h (c_start_case): Update.
4184 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4185 switch condition has boolean value.
4186
f7715905 41872014-06-02 Andrew MacLeod <amacleod@redhat.com>
4188
4189 * c-decl.c: Include builtins.h.
4190 * c-parser.c: Likewise.
4191
dcfff6f9 41922014-05-27 Marek Polacek <polacek@redhat.com>
4193
4194 PR c/56724
4195 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4196 error and warning calls to error_at and warning_at. Pass location of
4197 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4198 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4199 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4200
c048c42c 42012014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4202
4203 PR c/61191
4204 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4205 function parameters.
4206
8c016392 42072014-05-23 Jan Hubicka <hubicka@ucw.cz>
4208
4209 * c-decl.c (merge_decls): Preserve symtab node pointers.
4210 (duplicate_decls): Free new decl.
4211
184a718f 42122014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4213
6ce915ef 4214 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4215 initialization.
4216
184a718f 4217 * c-parser.c (c_parser_omp_target): Return bool values.
4218
22ac3f78 42192014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4220
4221 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4222 num_teams_loc variable to num_thread_limit_loc.
4223
3ab4693e 42242014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4225
4226 * c-array-notation.c (expand_array_notations): Use void_node
4227 instead of void_zero_node.
4228
25a27413 42292014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4230
4231 * c-decl.c (finish_struct): Adjust.
4232 (finish_enum): Likewise.
4233 (bind): Adjust.
4234 (record_inline_static): Likewise.
4235 (push_scope): Likewise.
4236 (make_label): Likewise.
4237 (lookup_label_for_goto): Likewise.
4238 (finish_struct): Likewise.
4239 (finish_enum): Likewise.
4240 (store_parm_decls): Likewise.
4241 (c_push_function_context): Likewise.
4242 * c-lang.h: Remove usage of variable_size gty attribute.
4243 * c-parser.c (c_parse_init): Adjust.
4244 (c_parse_file): Likewise.
4245
172b8440 42462014-05-13 Marek Polacek <polacek@redhat.com>
4247
4248 PR c/61162
4249 * c-typeck.c (convert_for_assignment): Pass location to
4250 WARN_FOR_ASSIGNMENT instead of input_location.
4251
c9e51d25 42522014-05-10 Marek Polacek <polacek@redhat.com>
4253
4254 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4255 maybe_warn_string_init.
4256 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4257 maybe_warn_string_init.
4258 * c-tree.h (maybe_warn_string_init): Update declaration.
4259 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4260 Call pedwarn_init with loc instead of with input_location.
4261 (digest_init): Pass init_loc to maybe_warn_string_init.
4262 (pop_init_level): Call pedwarn_init with loc instead of with
4263 input_location.
4264 (set_init_index): Likewise.
4265 (process_init_element): Likewise.
4266
53de1631 42672014-05-09 Marek Polacek <polacek@redhat.com>
4268
4269 PR c/61096
4270 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4271 (c_parser_initelt): Pass location to set_init_label. Pass array index
4272 location to set_init_index.
4273 * c-tree.h (push_init_level): Update declaration.
4274 (pop_init_level): Likewise.
4275 (set_init_index): Likewise.
4276 (set_init_label): Likewise.
4277 * c-typeck.c (error_init): Add location parameter. Call error_at
4278 instead of error.
4279 (digest_init): Pass init_loc to error_init.
4280 (really_start_incremental_init):
4281 (push_init_level): Add location parameter. Pass loc to pop_init_level
4282 and error_init.
4283 (pop_init_level): Likewise.
4284 (set_designator): Add location parameter. Pass loc to pop_init_level,
4285 push_init_level, and error_init.
4286 (set_init_index): Add location parameter. Pass loc to error_init and
4287 set_designator.
4288 (set_init_label): Likewise.
4289 (output_init_element): Pass loc to error_init.
4290 (process_init_element): Pass loc to error_init, pop_init_level,
4291 pedwarn_init, and push_init_level.
4292
3e5a8b00 42932014-05-09 Marek Polacek <polacek@redhat.com>
4294
4295 PR c/50459
4296 * c-parser.c (c_parser_attributes): Parse the arguments as an
4297 expression-list if the attribute takes identifier.
4298
c2c4ae8d 42992014-05-08 Marek Polacek <polacek@redhat.com>
4300
4301 PR c/61053
4302 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4303 TYPE_ALIGN_UNIT.
4304
2026249a 43052014-05-08 Marek Polacek <polacek@redhat.com>
4306
4307 PR c/61077
4308 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4309 of main.
4310
960d5a55 43112014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4312 Mike Stump <mikestump@comcast.net>
4313 Richard Sandiford <rdsandiford@googlemail.com>
4314
4315 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4316 (finish_enum): Use wide-int interfaces.
4317 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4318 * c-typeck.c (build_c_cast): Likewise.
4319 (set_nonincremental_init_from_string): Likewise.
4320 (c_tree_equal): Likewise.
4321
e0e14cbd 43222014-05-02 Marek Polacek <polacek@redhat.com>
4323
4324 PR c/25801
4325 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4326 Return size_one_node when the type is not complete.
4327 (pointer_diff): Remove comment.
4328 (build_unary_op): Improve error messages.
4329
27ff10cb 43302014-05-02 Marek Polacek <polacek@redhat.com>
4331
4332 * c-typeck.c (c_finish_return): Separate warning_at calls.
4333
68410ce9 43342014-05-02 Marek Polacek <polacek@redhat.com>
4335
4336 * c-tree.h (error_init): Remove declaration.
4337 (pedwarn_init): Likewise.
4338 * c-typeck.c (error_init): Make static and move above.
4339 (pedwarn_init): Likewise.
4340 (warning_init): Move above.
4341 (maybe_warn_string_init): Likewise.
4342
e8e27117 43432014-05-01 Jeff Law <law@redhat.com>
4344
4345 Revert:
4346
4347 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4348 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4349 avoid goto.
4350
971df357 43512014-05-02 Marek Polacek <polacek@redhat.com>
4352
4353 PR c/60784
4354 * c-typeck.c (push_init_level): Set constructor_designated to
4355 p->designated for structures.
4356
de548fe5 43572014-05-01 Marek Polacek <polacek@redhat.com>
4358
4359 PR c/60915
4360 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4361 function-definition has an attribute after the declarator.
4362
053a0ded 43632014-05-01 Marek Polacek <polacek@redhat.com>
4364
4365 PR c/60257
4366 * c-typeck.c (warning_init): Add location_t parameter. Call
4367 warning_at instead of warning.
4368 (push_init_level): Pass input_location to warning_init.
4369 (add_pending_init): Add location_t parameter. Pass loc to
4370 warning_init.
4371 (set_nonincremental_init): Pass input_location to add_pending_init.
4372 (set_nonincremental_init_from_string): Likewise.
4373 (output_init_element): Pass loc to warning_init and to
4374 add_pending_init.
4375
694296f2 43762014-05-01 Marek Polacek <polacek@redhat.com>
4377
4378 PR c/43395
4379 * c-typeck.c (c_finish_return): Distinguish between label and variable
4380 when warning about returning local address.
4381
86bbd7f9 43822014-05-01 Marek Polacek <polacek@redhat.com>
4383
4384 PR c/29467
4385 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4386 in C89 mode.
4387
e4ab2ef3 43882014-05-01 Marek Polacek <polacek@redhat.com>
4389
4390 PR c/43245
4391 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4392 instead of 0 to WARN_FOR_QUALIFIERS.
4393
ca3999cb 43942014-05-01 Marek Polacek <polacek@redhat.com>
4395
4396 PR c/56989
4397 * c-typeck.c (default_conversion): Use better location for
4398 error call.
4399
52cc0072 44002014-04-30 Marek Polacek <polacek@redhat.com>
4401
4402 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4403 also when SANITIZE_FLOAT_DIVIDE is on.
4404
af379dd3 44052014-04-30 Marek Polacek <polacek@redhat.com>
4406
4407 PR c/60139
4408 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4409 and pedwarn_init. Use loc insted of input_location.
4410
b069c2a0 44112014-04-30 Marek Polacek <polacek@redhat.com>
4412
4413 PR c/60351
4414 * c-typeck.c (build_binary_op): Use location when warning about
4415 shift count.
4416
4a026b48 44172014-04-25 Marek Polacek <polacek@redhat.com>
4418
4419 PR c/18079
4420 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4421 always_inline/noinline and hot/cold attributes.
4422
adc93f31 44232014-04-25 Marek Polacek <polacek@redhat.com>
4424
4425 PR c/60114
4426 * c-parser.c (c_parser_initelt): Pass input_location to
4427 process_init_element.
4428 (c_parser_initval): Pass loc to process_init_element.
4429 * c-tree.h (process_init_element): Adjust declaration.
4430 * c-typeck.c (push_init_level): Pass input_location to
4431 process_init_element.
4432 (pop_init_level): Likewise.
4433 (set_designator): Likewise.
4434 (output_init_element): Add location_t parameter. Pass loc to
4435 digest_init.
4436 (output_pending_init_elements): Pass input_location to
4437 output_init_element.
4438 (process_init_element): Add location_t parameter. Pass loc to
4439 output_init_element.
4440
e1029911 44412014-04-24 Jakub Jelinek <jakub@redhat.com>
4442
4443 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4444 atomic-clause, allow comma in between atomic-clause and
4445 seq_cst.
4446
9f0a7bc6 44472014-04-22 Jakub Jelinek <jakub@redhat.com>
4448
4449 PR c/59073
4450 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4451 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4452
094da06d 44532014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4454
4455 PR middle-end/60469
4456 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4457 create_tmp_var instead build_decl for creating temps.
4458 (build_array_notation_expr): Likewise.
4459 (fix_conditional_array_notations_1): Likewise.
4460 (fix_array_notation_expr): Likewise.
4461 (fix_array_notation_call_expr): Likewise.
4462
5a672e62 44632014-03-28 Jakub Jelinek <jakub@redhat.com>
4464
4465 PR c++/60689
4466 * c-tree.h (c_build_function_call_vec): New prototype.
4467 * c-typeck.c (build_function_call_vec): Don't call
4468 resolve_overloaded_builtin here.
4469 (c_build_function_call_vec): New wrapper function around
4470 build_function_call_vec. Call resolve_overloaded_builtin here.
4471 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4472 Call c_build_function_call_vec instead of build_function_call_vec.
4473 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4474 * c-decl.c (finish_decl): Likewise.
4475
f40f5e0e 44762014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4477
4478 PR c/55383
4479 * c-typeck.c: Use correct format string in cast-qual warning
4480
9ec099a3 44812014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4482
4483 * c-decl.c (c_decl_attributes): Use
4484 lang_hooks.types.omp_mappable_type.
4485 * c-typeck.c (c_finish_omp_clauses): Likewise.
4486
3bfdc94f 44872014-03-06 Marek Polacek <polacek@redhat.com>
4488
4489 PR c/60197
4490 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4491 of checking tree code.
4492
8f1128f8 44932014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4494
4495 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4496 (c_parser_parameter_declaration): Likewise.
4497
977b1853 44982014-02-19 Marek Polacek <polacek@redhat.com>
4499
4500 PR c/60195
4501 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4502 Call mark_exp_read on exp.value.
4503 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4504 TREE_ADDRESSABLE on old instead of val.
4505 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4506
825cd6ef 45072014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4508
4509 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4510 C_EXPR_APPEND by vec_safe_push.
4511 * c-tree.h (C_EXPR_APPEND): Remove.
4512
ec761d5a 45132014-01-31 Marek Polacek <polacek@redhat.com>
4514
4515 PR c/59963
4516 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4517 build_function_call_vec.
4518 (build_function_call): Likewise.
4519 (build_atomic_assign): Likewise.
4520 (build_function_call_vec): Add arg_loc parameter. Use it.
4521 (convert_arguments): Likewise.
4522 (convert_for_assignment): Rename rhs_loc to expr_loc.
4523 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4524 (c_parser_objc_keywordexpr): Likewise.
4525 (c_parser_postfix_expression_after_primary): Call
4526 build_function_call_vec with expr_loc rather than op_loc.
4527 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4528 build_function_call_vec.
4529 (c_parser_expr_list): Add locations parameter. Fill it with locations
4530 of function arguments.
4531 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4532
22a75734 45332014-01-30 Marek Polacek <polacek@redhat.com>
4534
4535 PR c/59940
4536 * c-typeck.c (build_function_call_vec): Use loc parameter.
4537 (convert_arguments): Add location parameter. Use it.
4538 (ep_convert_and_check): Likewise.
4539 (build_atomic_assign): Adjust convert_for_assignment call.
4540 (build_modify_expr): Likewise.
4541 (digest_init): Likewise.
4542 (c_finish_return): Likewise.
4543 (build_conditional_expr): Adjust ep_convert_and_check calls.
4544 (convert_for_assignment): Add rhs_loc parameter. Use it.
4545 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4546 calls.
4547
29f580ac 45482014-01-30 Richard Biener <rguenther@suse.de>
4549
4550 PR c/59905
4551 * c-typeck.c (build_function_call_vec): Do not replace calls
4552 to a function via an incompatible type with a runtime abort.
4553
a89e6c15 45542014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4555
4556 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4557 flag_enable_cilkplus with flag_cilkplus.
4558 (c_parser_direct_declarator_inner): Likewise.
4559 (c_parser_attribute_any_word): Likewise.
4560 (c_parser_attributes): Likewise.
4561 (c_parser_compound_statement): Likewise.
4562 (c_parser_statement_after_labels): Likewise.
4563 (c_parser_if_statement): Likewise.
4564 (c_parser_switch_statement): Likewise.
4565 (c_parser_do_statement): Likewise.
4566 (c_parser_for_statement): Likewise.
4567 (c_parser_unary_expression): Likewise.
4568 (c_parser_postfix_expression): Likewise.
4569 (c_parser_postfix_expression_after_primary): Likewise.
4570 (c_parser_postfix_expression_after_primary): Likewise.
4571 (c_parser_omp_clause_name): Likewise.
4572 (c_finish_omp_declare_simd): Likewise.
4573 (c_parser_cilk_verify_simd): Likewise.
4574 * c-typeck.c (build_array_ref): Likewise.
4575 (build_function_call_vec): Likewise.
4576 (convert_arguments): Likewise.
4577 (build_compound_expr): Likewise.
4578 (c_finish_return): Likewise.
4579 (c_finish_if_stmt): Likewise.
4580 (c_finish_loop): Likewise.
4581 (build_binary_op): Likewise.
4582
2623625f 45832014-01-23 Marek Polacek <polacek@redhat.com>
4584
4585 PR c/59846
4586 * c-typeck.c (parser_build_binary_op): Use location instead of
4587 input_location.
4588 (build_binary_op): Pass location to shorten_compare.
4589
46da3601 45902014-01-23 Marek Polacek <polacek@redhat.com>
4591
4592 PR c/58346
4593 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4594 an empty aggregate.
4595
9a9db3c1 45962014-01-23 Marek Polacek <polacek@redhat.com>
4597
4598 PR c/59871
4599 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4600 of a comma expression.
4601 (emit_side_effect_warnings): Likewise.
4602
69c9b607 46032014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4604
4605 PR c/59825
4606 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4607 function to use walk_tree and moved a lot of its functionality to
4608 expand_array_notations.
4609 (expand_array_notations): New function.
4610
7e005ab5 46112014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4612
4613 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4614 attribute an attribute without value.
4615
d6779b5f 46162014-01-23 Jakub Jelinek <jakub@redhat.com>
4617
4618 PR middle-end/58809
4619 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4620 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4621
ec431042 46222014-01-22 Marek Polacek <polacek@redhat.com>
4623
4624 PR c/59891
4625 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4626 of remove_c_maybe_const_expr on op1 and op2.
4627
1248c663 46282014-01-15 Jakub Jelinek <jakub@redhat.com>
4629
4630 PR c/58943
4631 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4632 effects, preevaluate rhs using SAVE_EXPR first.
4633
0bc789fc 46342014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4635
4636 PR c++/59631
4637 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4638 statements with if-elseif statements.
4639
6685d11c 46402014-01-06 Marek Polacek <polacek@redhat.com>
4641
4642 PR c/57773
4643 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4644 defined bit-field types only in ISO C.
4645
3aea1f79 46462014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4647
4648 Update copyright years
4649
e4f22041 46502014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4651
4652 * c-array-notation.c: Use the standard form for the copyright notice.
4653
74acc703 46542013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4655
4656 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4657 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4658 field in parser is not empty. If not-empty, call the function
4659 c_parser_finish_omp_declare_simd.
4660 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4661 between SIMD-enabled functions and #pragma simd. Added new parameter.
4662 (c_parser_cilk_all_clauses): Modified the usage of the function
4663 c_parser_cilk_clause_vectorlength as mentioned above.
4664 (c_parser_cilk_simd_fn_vector_attrs): New function.
4665 (c_finish_cilk_simd_fn_tokens): Likewise.
4666 (is_cilkplus_vector_p): Likewise.
4667 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4668 "nomask," and "mask" strings in clause name.
4669 (c_parser_omp_all_clauses): Added 3 new case statements:
4670 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4671 PRAGMA_CILK_CLAUSE_NOMASK.
4672 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4673 check for vector attribute and if so call the function
4674 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4675 called the function c_finish_cilk_simd_fn_tokens.
4676 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4677 parser field is non-empty. If so, parse them as you would parse
4678 the omp declare simd pragma.
4679 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4680 Added a check when step is a parameter and flag it as error.
4681 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4682 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4683 pragma_omp_clause.
4684
395dc01c 46852013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4686
4687 * c-parser.c (c_parser_omp_parallel): Fix description.
4688
433e804e 46892013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4690
4691 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4692 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4693 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4694 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4695
a179a7dc 46962013-12-04 Joseph Myers <joseph@codesourcery.com>
4697
4698 PR c/52023
4699 * c-parser.c (c_parser_alignas_specifier): Use
4700 c_sizeof_or_alignof_type instead of c_alignof.
4701 (c_parser_alignof_expression): Likewise, with min_alignof
4702 parameter depending on alignof spelling used.
4703
bdf1e3c7 47042013-12-04 Marek Polacek <polacek@redhat.com>
4705
4706 PR c/54113
4707 * c-decl.c (start_function): Don't warn for missing prototype for
4708 inline functions.
4709
05e8f674 47102013-12-03 Marek Polacek <polacek@redhat.com>
4711
4712 PR c/59351
4713 * c-decl.c (build_compound_literal): Allow compound literals with
4714 empty initial value.
4715
39f74d66 47162013-12-02 Joseph Myers <joseph@codesourcery.com>
4717
4718 PR c/58235
4719 * c-typeck.c (build_modify_expr): Diagnose assignment to
4720 expression with array type.
4721
f221adca 47222013-11-29 Joseph Myers <joseph@codesourcery.com>
4723
4724 PR c/42262
4725 * c-typeck.c (process_init_element): Do not treat a string as
4726 initializing a whole array when used with a designator for an
4727 individual element.
4728
75bce827 47292013-11-29 Joseph Myers <joseph@codesourcery.com>
4730
4731 PR c/57574
4732 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4733 an inline function following a static declaration.
4734
dc133326 47352013-11-28 Jakub Jelinek <jakub@redhat.com>
4736
4737 PR c/59310
4738 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4739 to p_name before calling c_parser_omp_teams instead of after.
4740 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4741 argument. Remove unused p_name variable.
4742
d09768a4 47432013-11-27 Aldy Hernandez <aldyh@redhat.com>
4744 Jakub Jelinek <jakub@redhat.com>
4745
4746 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4747 external_scope is NULL.
4748
73fd9cbe 47492013-11-27 Tom de Vries <tom@codesourcery.com>
4750 Marc Glisse <marc.glisse@inria.fr>
4751
4752 PR c++/59032
4753 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4754
bc61cadb 47552013-11-22 Andrew MacLeod <amacleod@redhat.com>
4756
4757 * c-typeck.c: Add required include files from gimple.h.
4758
3df42822 47592013-11-22 David Malcolm <dmalcolm@redhat.com>
4760
4761 * c-decl.c (define_label, shadow_tag_warned)
4762 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4763 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4764 (declspecs_add_type): Remove use of in_system_header macro.
4765 * c-parser.c (c_parser_unary_expression): Likewise.
4766 * c-typeck.c (store_init_value, process_init_element)
4767 (c_start_case): Likewise.
4768
4769 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4770 macro.
4771
4772 * c-parser.c (c_parser_set_source_position_from_token): Remove
4773 reference to in_system_header from comment.
4774
08f817b3 47752013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4776
4777 * c-decl.c (grokdeclarator): Update comment to refer to
4778 tree_to_[su]hwi rather than tree_low_cst.
4779
6a0712d4 47802013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4781
4782 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4783 tree_to_uhwi throughout.
4784
fcb97e84 47852013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4786
4787 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4788 throughout.
4789
35ec552a 47902013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4791
4792 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4793 throughout.
4794
f2697631 47952013-11-15 Aldy Hernandez <aldyh@redhat.com>
4796
4797 * c-parser.c (c_parser_cilk_simd): New.
4798 (c_parser_cilk_verify_simd): New.
4799 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4800 (c_parser_omp_for_loop): Add case for NE_EXPR.
4801 Set c_break_label for CILK_SIMD.
4802 (c_parser_cilk_clause_vectorlength): New.
4803 (c_parser_cilk_clause_linear): New.
4804 (c_parser_cilk_clause_name): New.
4805 (c_parser_cilk_all_clauses): New.
4806 * c-typeck.c (build_unary_op): Pass location argument to
4807 readonly_error.
4808 (build_modify_expr): Same.
4809 (build_asm_expr): Same.
4810 (c_finish_bc_stmt): Error on break/continue in loops.
4811
e795d6e1 48122013-11-14 Andrew MacLeod <amacleod@redhat.com>
4813
4814 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4815
9ed99284 48162013-11-14 Diego Novillo <dnovillo@google.com>
4817
4818 * c-decl.c: Include print-tree.h.
4819 Include stor-layout.h.
4820 Include varasm.h.
4821 Include attribs.h.
4822 Include stringpool.h.
4823 * c-lang.c: Include fold-const.h.
4824 * c-parser.c: Include stringpool.h.
4825 Include attribs.h.
4826 Include stor-layout.h.
4827 Include varasm.h.
4828 Include trans-mem.h.
4829 * c-typeck.c: Include stor-layout.h.
4830 Include trans-mem.h.
4831 Include varasm.h.
4832 Include stmt.h.
4833
4fba5eb9 48342013-11-13 Joseph Myers <joseph@codesourcery.com>
4835
4836 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4837 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4838 __auto_type.
4839 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4840 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4841 RID_AUTO_TYPE.
4842 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4843 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4844 (c_parser_declarator, c_parser_direct_declarator_inner)
4845 (c_parser_parameter_declaration, c_parser_type_name): All callers
4846 changed.
4847 (c_parser_declaration_or_fndef): Handle declarations with type
4848 determined from the initializer.
4849
a8783bee 48502013-11-12 Andrew MacLeod <amacleod@redhat.com>
4851
e795d6e1 4852 * c-typeck.c: Include gimplify.h.
a8783bee 4853
d184e0c0 48542013-11-12 Joseph Myers <joseph@codesourcery.com>
4855
4856 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4857 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4858 comment.
4859 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4860 or _Thread_local as appropriate in diagnostics.
4861 (build_null_declspecs): Initialize ret->thread_gnu_p.
4862 (declspecs_add_scspec): Handle either __thread or _Thread_local
4863 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4864 pedantic. Do not disallow _Thread_local extern and _Thread_local
4865 static.
4866
b560fabd 48672013-11-07 Joseph Myers <joseph@codesourcery.com>
4868 Andrew MacLeod <amacleod@redhat.com>
4869
4870 * c-aux-info.c (gen_type): Handle atomic qualifier.
4871 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4872 qualifiers when compating types.
4873 (shadow_tag_warned): Handle atomic_p in declspecs.
4874 (quals_from_declspecs): Likewise.
4875 (start_decl): Use c_type_promotes_to when promoting argument
4876 types.
4877 (grokdeclarator): Handle _Atomic.
4878 (get_parm_info): Diagnose any qualifier on "void" as only
4879 parameter.
4880 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4881 comparing types. Use c_type_promotes_to when promoting argument
4882 types.
4883 (finish_function): Use c_type_promotes_to when promoting argument
4884 types.
4885 (build_null_declspecs): Handle atomic_p in declspecs.
4886 (declspecs_add_qual): Handle RID_ATOMIC.
4887 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4888 (c_token_starts_declspecs): Handle RID_ATOMIC.
4889 (c_parser_declspecs): Handle atomic type specifiers and
4890 qualifiers.
4891 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4892 from types of expressions with atomic type.
4893 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4894 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4895 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4896 (c_parser_statement_after_labels, c_parser_switch_statement)
4897 (c_parser_for_statement, c_parser_expr_no_commas)
4898 (c_parser_conditional_expression, c_parser_binary_expression)
4899 (c_parser_cast_expression, c_parser_unary_expression)
4900 (c_parser_postfix_expression)
4901 (c_parser_postfix_expression_after_primary, c_parser_expression):
4902 Use convert_lvalue_to_rvalue.
4903 (c_parser_expression_conv, c_parser_expr_list): Document
4904 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4905 (c_parser_objc_synchronized_statement): Use
4906 convert_lvalue_to_rvalue.
4907 (c_parser_objc_selector): Handle RID_ATOMIC.
4908 (c_parser_objc_receiver, c_parser_array_notation): Use
4909 convert_lvalue_to_rvalue.
4910 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4911 _Atomic (type-name).
4912 (struct c_declspecs): Add atomic_p field.
4913 (convert_lvalue_to_rvalue): Declare.
4914 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4915 corresponding atomic types.
4916 (qualify_type): Don't add _Atomic qualifiers from second argument.
4917 (comp_target_types): Do not allow _Atomic mismatches.
4918 (type_lists_compatible_p): Do not remove atomic qualifiers when
4919 comparing types.
4920 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4921 (build_atomic_assign): New functions.
4922 (build_unary_op): Use build_atomic_assign for atomic increment and
4923 decrement.
4924 (build_conditional_expr): Do not treat _Atomic void as a qualified
4925 version of void.
4926 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4927 (find_anonymous_field_with_type, convert_to_anonymous_field)
4928 (convert_for_assignment): Do not remove atomic qualifiers when
4929 comparing types.
4930 (digest_init): Do not accept initialization of arrays of atomic
4931 elements by string constants.
4932 (build_asm_expr): Use convert_lvalue_to_rvalue.
4933 (build_binary_op): Do not treat _Atomic void as a qualified
4934 version of void.
4935
8b023e7c 49362013-11-06 DJ Delorie <dj@redhat.com>
4937
4938 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4939 both explicit and builtin, print the location of the explicit one.
4940
c630ef93 49412013-11-05 Tobias Burnus <burnus@net-b.de>
4942
4943 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4944 c_parser_omp_distribute, c_parser_omp_teams,
4945 c_parser_omp_target, c_parser_omp_declare): Handle
4946 -fopenmp-simd.
4947
2c4c3477 49482013-11-03 Marek Polacek <polacek@redhat.com>
4949
4950 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4951
df205251 49522013-11-01 Jakub Jelinek <jakub@redhat.com>
4953
4954 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4955 check_dup_generic at the end, unless remove is true.
4956 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4957 remove = true;.
4958 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4959
23871d0c 49602013-10-31 Jakub Jelinek <jakub@redhat.com>
4961
4962 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4963 with decl that is not pointer nor array.
4964
d037099f 49652013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4966
4967 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4968 a spawning function is found.
4969 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4970 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4971 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4972 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4973 case.
4974 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4975 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4976 expr.
4977 (c_finish_return): Added a check to reject _Cilk_spawn in return
4978 expression.
4979 (build_cilk_spawn): New function.
4980 (build_cilk_sync): Likewise.
4981 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4982
4c90c04c 49832013-10-27 Tobias Burnus <burnus@net-b.de>
4984
4985 PR other/33426
4986 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4987 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4988 (c_parser_statement_after_labels): Update calls.
4989
48a972c8 49902013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 4991
4992 PR other/33426
4993 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4994 Handle PRAGMA_IVDEP.
4995 (c_parser_statement_after_labels): Update call.
4996
12f86df0 49972013-10-24 Marek Polacek <polacek@redhat.com>
4998
4999 * c-parser.c (c_parser_struct_declaration): Add a comment.
5000 (c_parser_declarator): Don't allow _Alignas here.
5001
7740abd8 50022013-10-17 Andrew MacLeod <amacleod@redhat.com>
5003
5004 * c-parser.c: Include omp-low.h.
5005 * c-typeck.c: Likewise.
5006
43d03c23 50072013-10-17 Marek Polacek <polacek@redhat.com>
5008
5009 PR c/58267
5010 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5011 Document syntax of the array-declarator.
5012 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5013 are not permitted.
5014 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5015 (c_parser_struct_declaration): Likewise.
5016 (c_parser_declarator): Likewise.
5017 (c_parser_direct_declarator_inner): Likewise.
5018 (c_parser_parameter_declaration): Likewise.
5019 (c_parser_type_name): Likewise.
5020
bc7bff74 50212013-10-11 Jakub Jelinek <jakub@redhat.com>
5022
5023 * c-lang.h (current_omp_declare_target_attribute): New extern
5024 decl.
5025 * c-parser.c: Include c-lang.h.
5026 (struct c_parser): Change tokens to c_token *.
5027 Add tokens_buf field. Change tokens_avail type to unsigned int.
5028 (c_parser_consume_token): If parser->tokens isn't
5029 &parser->tokens_buf[0], increment parser->tokens.
5030 (c_parser_consume_pragma): Likewise.
5031 (enum pragma_context): Add pragma_struct and pragma_param.
5032 (c_parser_external_declaration): Adjust
5033 c_parser_declaration_or_fndef caller.
5034 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5035 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5036 Adjust recursive call.
5037 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5038 of pragma_external.
5039 (c_parser_parameter_declaration): Use pragma_param instead of
5040 pragma_external.
5041 (c_parser_compound_statement_nostart, c_parser_label,
5042 c_parser_for_statement): Adjust
5043 c_parser_declaration_or_fndef callers.
5044 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5045 it through to c_parser_conditional_expression.
5046 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5047 pass it through to c_parser_binary_expression. Adjust recursive
5048 call.
5049 (c_parser_binary_expression): Remove prec argument, add
5050 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5051 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5052 binop matches it, use build2 instead of parser_build_binary_op.
5053 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5054 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5055 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5056 Handle pragma_struct and pragma_param the same as pragma_external.
5057 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5058 (c_parser_omp_variable_list): Parse array sections for
5059 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5060 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5061 (c_parser_omp_clause_reduction): Handle user defined reductions.
5062 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5063 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5064 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5065 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5066 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5067 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5068 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5069 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5070 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5071 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5072 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5073 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5074 (c_parser_omp_for_loop): Add CODE argument, pass it through
5075 to c_finish_omp_for. Change last argument to cclauses,
5076 and adjust uses to grab parallel clauses from the array of all
5077 the split clauses. Adjust c_parser_binary_expression,
5078 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5079 (omp_split_clauses): New function.
5080 (c_parser_omp_simd): New function.
5081 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5082 Allow the function to be called also when parsing combined constructs,
5083 and call c_parser_omp_simd when parsing for simd.
5084 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5085 #pragma omp section, require exactly one structured-block instead of
5086 sequence of statements.
5087 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5088 Allow the function to be called also when parsing combined constructs.
5089 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5090 Allow the function to be called also when parsing combined
5091 constructs.
5092 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5093 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5094 c_parser_omp_teams, c_parser_omp_target_data,
5095 c_parser_omp_target_update, c_parser_omp_target,
5096 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5097 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5098 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5099 (c_parser_omp_construct): Add p_name and mask vars. Handle
5100 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5101 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5102 and c_parser_omp_sections callers.
5103 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5104 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5105 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5106 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5107 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5108 OMP_CLAUSE_DEPEND.
5109 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5110 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5111 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5112 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5113 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5114 * c-typeck.c: Include tree-inline.h.
5115 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5116 handle_omp_array_sections_1, handle_omp_array_sections,
5117 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5118 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5119 user defined reductions.
5120 (c_tree_equal): New function.
5121 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5122 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5123 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5124 c_check_omp_declare_reduction_r): New prototypes.
5125 * c-decl.c (current_omp_declare_target_attribute): New variable.
5126 (c_decl_attributes): New function.
5127 (start_decl, start_function): Use it instead of decl_attributes.
5128 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5129 c_omp_reduction_decl, c_omp_reduction_lookup,
5130 c_check_omp_declare_reduction_r): New functions.
5131
3ce7d1bd 51322013-09-25 Tom Tromey <tromey@redhat.com>
5133
5134 * Make-lang.in (c/gccspec.o): Remove.
5135 (CFLAGS-c/gccspec.o): New variable.
5136 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5137 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5138 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5139
96da1c1d 51402013-09-25 Tom Tromey <tromey@redhat.com>
5141
5142 * Make-lang.in (c/gccspec.o): Don't use subshell.
5143
1b309377 51442013-09-18 Marek Polacek <polacek@redhat.com>
5145
5146 PR sanitize/58443
5147 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5148 Remove unnecessary check.
5149
05f893e1 51502013-09-18 Marek Polacek <polacek@redhat.com>
5151
5152 PR sanitizer/58411
5153 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5154 no_sanitize_undefined attribute.
5155
bda0b9d2 51562013-09-13 Kai Tietz <ktietz@redhat.com>
5157
5158 PR target/57848
5159 * c-decl.c (c_builtin_function_ext_scope): Remove
5160 wrong assumption that it is never called on prexisting
5161 symbol.
5162
73437615 51632013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5164
5165 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5166
eaab24b9 51672013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5168
5169 * c-objc-common.c (c_tree_printer): Tidy.
5170
9e46467d 51712013-08-30 Marek Polacek <polacek@redhat.com>
5172
5173 * c-typeck.c (build_binary_op): Add division by zero and shift
5174 instrumentation.
5175
f8234178 51762013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
f9086116 5177 Joseph Myers <joseph@codesourcery.com>
f8234178 5178
c90a7d10 5179 PR c/35649
f8234178 5180 * c-typeck.c (c_common_type): Prefer double_type_node over
5181 other REAL_TYPE types with the same precision.
5182 (convert_arguments): Likewise.
5183
6f07f480 51842013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5185
5186 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5187 (c_initialize_diagnostics): Call a destructor for the early printer.
5188
eed6bc21 51892013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5190
5191 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5192 printer initialization.
5193
57717943 51942013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
eed6bc21 5195
57717943 5196 PR c/57490
5197 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5198 check for truth values.
5199 (expand_array_notation_exprs): Added truth values case. Removed an
5200 unwanted else. Added for-loop to walk through subtrees in default
5201 case.
5202
a94db6b0 52032013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5204
5205 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5206
e76163a9 52072013-07-23 Joseph Myers <joseph@codesourcery.com>
5208
5209 * c-parser.c (struct c_generic_association): Fix typo.
5210
7aa04c8d 52112013-07-23 Tom Tromey <tromey@redhat.com>
5212 Joseph Myers <joseph@codesourcery.com>
5213
5214 * c-parser.c (struct c_generic_association): New.
5215 (c_generic_association_d): New typedef.
5216 (c_parser_generic_selection): New function.
5217 (c_parser_postfix_expression): Handle RID_GENERIC.
5218
76bbe4ca 52192013-07-13 Jason Merrill <jason@redhat.com>
5220
5221 PR c++/57793
5222 * c-decl.c (finish_struct): Check for too-large class.
5223
21ebaa24 52242013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 5225
5226 PR c/57821
5227 * c-typeck.c (set_init_index): When folding, check for index overflow.
5228
936c3081 52292013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5230
5231 * c-parser.c (c_parser_array_notation): Removed rejection of array
5232 notations in an array of function pointers.
5233
50acebe0 52342013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5235
5236 * c-array-notation.c (make_triplet_val_inv): New function.
5237 (create_cmp_incr): Likewise.
5238 (create_array_refs): Likewise.
5239 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5240 Also modularized common parts between functions and called the function.
5241 (build_array_notation_expr): Likewise.
5242 (fix_conditional_array_notations_1): Likewise.
5243 (fix_array_notation_expr): Likewise.
5244 (fix_array_notation_call_expr): Likewise.
5245
01e6cdb4 52462013-06-18 Marek Polacek <polacek@redhat.com>
5247
5248 PR c/57630
5249 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5250
6a3adac6 52512013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5252
5253 * c-array-notation.c (build_array_notation_expr): Reject array notation
5254 mismatch between LHS and RHS even inside a call_expr. Also, removed
5255 a couple while statements that were dead code.
5256
62aab3f3 52572013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5258
5259 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5260 excessive precision expressions in function parameters. Also removed
5261 couple unwanted while statements.
5262
bfc83720 52632013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5264
5265 * c-array-notation.c (expand_array_notation_exprs): Added
5266 ARRAY_NOTATION_REF case.
5267
09970d67 52682013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5269
5270 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5271 function to c-family/array-notation-common.c.
5272 (is_cilkplus_reduce_builtin): Likewise.
5273 (find_rank): Likewise.
5274 (extract_array_notation_exprs): Likewise.
5275 (replace_array_notations): Likewise.
5276 (find_inv_trees): Likewise.
5277 (replace_inv_trees): Likewise.
5278 (contains_array_notation_expr): Likewise.
5279 (find_correct_array_notation_type): Likewise.
5280 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5281 (struct inv_list): Moved this to c-family/array-notation-common.c.
5282 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5283
6e13bc01 52842013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5285
5286 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5287 reduction functions outside the for-loop. Added a check if the fundecl
5288 is non-NULL. Finally, removed an unwanted if-statement, and made the
5289 body unconditional.
5290
cc92dddc 52912013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5292
5293 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5294 condition of the if-statement matches the rank of else-block and then-
5295 block when array notations are used.
5296 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5297 expression after the entire function body is parsed.
5298 (c_parser_expr_no_commas): Delayed creating array notation expressions
5299 to the end of function parsing.
5300 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5301 whole if-statement instead of just the condition.
5302 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5303
eddc63fd 53042013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5305
5306 PR c/57474
5307 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5308 array to NULL_TREE if they are unused. Also added a check for the
5309 field to be NULL before its fields are used in future.
5310
a2115a4a 53112013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5312
5313 PR bootstrap/57450
5314 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5315 (build_array_notation_expr): Likewise.
5316
3c6d4197 53172013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5318
5319 * c-typeck.c (build_array_ref): Added a check to see if array's
5320 index is greater than one. If true, then emit an error.
5321 (build_function_call_vec): Exclude error reporting and checking
5322 for builtin array-notation functions.
5323 (convert_arguments): Likewise.
5324 (c_finish_return): Added a check for array notations as a return
5325 expression. If true, then emit an error.
5326 (c_finish_loop): Added a check for array notations in a loop
5327 condition. If true then emit an error.
5328 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5329 (build_binary_op): Added a check for array notation expr inside
5330 op1 and op0. If present, we call another function to find correct
5331 type.
5332 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5333 * c-parser.c (c_parser_compound_statement): Check if array
5334 notation code is used in tree, if so, then transform them into
5335 appropriate C code.
5336 (c_parser_expr_no_commas): Check if array notation is used in LHS
5337 or RHS, if so, then build array notation expression instead of
5338 regular modify.
5339 (c_parser_postfix_expression_after_primary): Added a check for
5340 colon(s) after square braces, if so then handle it like an array
5341 notation. Also, break up array notations in unary op if found.
5342 (c_parser_direct_declarator_inner): Added a check for array
5343 notation.
5344 (c_parser_compound_statement): Added a check for array notation in
5345 a stmt. If one is present, then expand array notation expr.
5346 (c_parser_if_statement): Likewise.
5347 (c_parser_switch_statement): Added a check for array notations in
5348 a switch statement's condition. If true, then output an error.
5349 (c_parser_while_statement): Similarly, but for a while.
5350 (c_parser_do_statement): Similarly, but for a do-while.
5351 (c_parser_for_statement): Similarly, but for a for-loop.
5352 (c_parser_unary_expression): Check if array notation is used in a
5353 pre-increment or pre-decrement expression. If true, then expand
5354 them.
5355 (c_parser_array_notation): New function.
5356 * c-array-notation.c: New file.
5357 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5358
2c1c8a2c 53592013-05-23 Mike Stump <mikestump@comcast.net>
5360
5361 * c-typeck.c (convert_for_assignment): Handle references to memory
5362 spaces better.
5363
be5f9e46 53642013-05-16 Jason Merrill <jason@redhat.com>
5365
5366 * Make-lang.in (cc1$(exeext)): Use link mutex.
5367
9205a6cc 53682013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5369
5370 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5371 to simply use OPT_Wpointer_arith.
5372 (build_unary_op): Likewise.
5373
0b049e15 53742013-04-03 Jakub Jelinek <jakub@redhat.com>
5375
5376 PR c/19449
5377 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5378 argument. If set, or it temporarily for parsing of the first
5379 argument into force_folding_builtin_constant_p.
5380 (c_parser_postfix_expression): Adjust callers.
5381
8e966116 53822013-03-21 Richard Biener <rguenther@suse.de>
5383
5384 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5385 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5386
b862f263 53872013-02-12 Marek Polacek <polacek@redhat.com>
5388
5389 PR c/44938
5390 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5391 origtypes to NULL.
5392
54550ecb 53932013-01-24 Jakub Jelinek <jakub@redhat.com>
5394
5395 PR c/56078
5396 * c-typeck.c (set_nonincremental_init_from_string): If
5397 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5398 returned false.
5399 (process_init_element): Likewise.
5400
035b65e2 54012012-12-20 Jakub Jelinek <jakub@redhat.com>
5402
5403 PR c++/55619
5404 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5405 argument, don't call default_function_array_conversion
5406 nor c_fully_fold here.
5407 (c_parser_asm_statement): Adjust callers.
5408 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5409 and outputs here, and call default_function_array_conversion
5410 on inputs that don't need to be addressable.
5411
7cbb7f1a 54122012-12-18 Jakub Jelinek <jakub@redhat.com>
5413
5414 PR c/39464
5415 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5416 warning require that both c_common_unsigned_type as well as
5417 c_common_signed_type is the same for both mvl and mvr types.
5418
f1f41a6c 54192012-11-16 Diego Novillo <dnovillo@google.com>
5420
5421 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5422
5423 * c-common.c: Use new vec API in vec.h.
5424 * c-common.h: Likewise.
5425 * c-gimplify.c: Likewise.
5426 * c-pragma.c: Likewise.
5427 * c-pretty-print.c: Likewise.
5428 * c-pretty-print.h: Likewise.
5429 * c-semantics.c: Likewise.
5430 * c-decl.c: Likewise.
5431 * c-parser.c: Likewise.
5432 * c-tree.h: Likewise.
5433 * c-typeck.c: Likewise.
5434
8b447d3f 54352012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5436
5437 PR c++/54930
5438 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5439
08fc5390 54402012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5441
5442 PR c/53066
5443 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5444 shadows a function, unless the variable is a function or a
5445 pointer-to-function.
5446
57f872a2 54472012-10-12 Jakub Jelinek <jakub@redhat.com>
5448
5449 PR c/54381
5450 * c-parser.c (struct c_tree_loc_pair): Removed.
5451 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5452 add location_t * and tree * arguments, fill in array of 3
5453 sizeof_arg trees and corresponding locs.
5454 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5455 c_parser_expr_list callers.
5456 (c_parser_postfix_expression_after_primary): Likewise. Pass
5457 array of 3 sizeof_arg trees and locs (corresponding to first
5458 3 arguments) to sizeof_pointer_memaccess_warning.
5459
d1455aa3 54602012-10-09 Lawrence Crowl <crowl@google.com>
5461
5462 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5463 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5464 hash table.
5465
b0e7825e 54662012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5467
5468 PR c++/54194
5469 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5470 call.
5471
41ed701a 54722012-10-09 Marc Glisse <marc.glisse@inria.fr>
5473
5474 PR c++/54427
5475 * c-typeck.c: Include c-common.h.
5476 (enum stv_conv): Moved to c-common.h.
5477 (scalar_to_vector): Moved to c-common.c.
5478 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5479 * Make-lang.in: c-typeck.c depends on c-common.h.
5480
ef34afc1 54812012-10-04 Arnaud Charlet <charlet@adacore.com>
5482
5483 * c-decl.c (c_write_global_declarations): Fix handling of
5484 -fdump-ada-spec*.
5485
7bd765d4 54862012-09-30 Sharad Singhai <singhai@google.com>
5487
5488 * c-decl.c (c_write_global_declarations): Use a different method
5489 to determine if the dump has ben initialized.
5490
c4b1a13a 54912012-09-14 Joseph Myers <joseph@codesourcery.com>
5492
5493 PR c/54552
5494 * c-typeck.c (c_cast_expr): When casting to a type requiring
5495 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5496 c_fully_fold first.
5497
bb554051 54982012-09-14 Joseph Myers <joseph@codesourcery.com>
5499
5500 PR c/54103
5501 * c-typeck.c (build_unary_op): Pass original argument of
5502 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5503 any C_MAYBE_CONST_EXPR, if it has integer operands.
5504 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5505 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5506 to c_objc_common_truthvalue_conversion, then remove any
5507 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5508 c_objc_common_truthvalue_conversion not
5509 c_common_truthvalue_conversion.
5510 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5511 call note_integer_operands for arguments with integer operands
5512 that are not integer constants.
5513
c708c6ef 55142012-09-13 Jakub Jelinek <jakub@redhat.com>
5515
5516 PR c/54559
5517 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5518 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5519
cce20430 55202012-08-31 Jakub Jelinek <jakub@redhat.com>
5521
5522 PR c/54428
5523 * c-convert.c (convert): Don't call fold_convert_loc if
5524 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5525 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5526 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5527
a90d57ed 55282012-08-24 Jakub Jelinek <jakub@redhat.com>
5529
5530 PR c/54355
5531 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5532 for nested and empty_ok arguments in the call to
5533 c_parser_declaration_or_fndef.
5534
f003f5dc 55352012-08-17 Jakub Jelinek <jakub@redhat.com>
5536
5537 * c-tree.h (c_last_sizeof_arg): Declare.
5538 * c-parser.c (struct c_tree_loc_pair): New type.
5539 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5540 non-NULL.
5541 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5542 (c_parser_postfix_expression_after_primary): Likewise. Call
5543 sizeof_pointer_memaccess_warning if needed.
5544 (sizeof_ptr_memacc_comptypes): New function.
5545 * c-typeck.c (c_last_sizeof_arg): New global variable.
5546 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5547
a5656b73 55482012-07-24 Uros Bizjak <ubizjak@gmail.com>
5549
5550 * c-lang.h (lang_decl): Add variable_size GTY option.
5551
b9ed1410 55522012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5553
5554 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5555 * Make-lang.in: Fix dependencies.
5556
e53d55e7 55572012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5558
5559 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5560 and add language Makefile hooks.
5561 * config-lang.in: New file.
5562 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5563 add the required "normal" config-lang.in rules.
5564 * c-lang.h: Moved from gcc/ to here.
5565 * c-tree.h: Likewise.
5566 * c-objc-common.c: Likewise.
5567 * c-objc-common.h: Likewise.
5568 * c-typeck.c: Likewise.
5569 * c-convert.c: Likewise.
5570 * c-lang.c: Likewise.
5571 * c-aux-info.c: Likewise.
5572 * c-errors.c: Likewise.
5573 * gccspec.c: Likewise.
5574 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5575 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5576\f
8e8f6434 5577Copyright (C) 2012-2018 Free Software Foundation, Inc.
e53d55e7 5578
5579Copying and distribution of this file, with or without modification,
5580are permitted in any medium without royalty provided the copyright
5581notice and this notice are preserved.