]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
x86: Always update EH return address in word_mode
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
96e6ae57
DM
12018-08-15 David Malcolm <dmalcolm@redhat.com>
2
3 * c-objc-common.c: Include "gcc-rich-location.h".
4 (c_tree_printer): Move implemenation of '%T' to...
5 (print_type): ...this new function.
6 (range_label_for_type_mismatch::get_text): New function.
7 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
8 range for the various ic_argpass cases.
9 (class maybe_range_label_for_tree_type_mismatch): New class.
10 (build_binary_op): Use it when calling binary_op_error.
11
0cd020ae
PK
122018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13
14 * c-decl.c (start_decl): Do not warn if variables is named as main
15 and is a local variable.
16
72733314
IS
172018-08-15 Iain Sandoe <iain@sandoe.co.uk>
18
19 PR c/19315
20 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
21 objects of unknown size.
22
23aa9f7c
MS
232018-08-13 Martin Sebor <msebor@redhat.com>
24
25 PR tree-optimization/71625
26 * c-parser.c (c_parser_declaration_or_fndef): Call
27 braced_list_to_string.
28
e5e7e50d
BH
292018-08-03 Bogdan Harjoc <harjoc@gmail.com>
30
31 PR c/86690
32 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
33 errors.
34
8a45b051
MS
352018-08-01 Martin Sebor <msebor@redhat.com>
36
37 PR tree-optimization/86650
38 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
39 and TREE_BLOCK (t) from within percent_K_format to this callsite.
40
5922dcb5
JJ
412018-08-01 Jakub Jelinek <jakub@redhat.com>
42
43 PR c/85704
44 * c-typeck.c (init_field_decl_cmp): New function.
45 (output_pending_init_elements): Use it for field comparisons
46 instead of pure bit_position comparisons.
47
9b452033
JJ
482018-07-12 Jakub Jelinek <jakub@redhat.com>
49
50 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
51 type here, instead add "omp declare target implicit" attribute.
52 (finish_decl): Diagnose vars without mappable type here.
53
829c6349
CLT
542018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
55 Thomas Schwinge <thomas@codesourcery.com>
56 Cesar Philippidis <cesar@codesourcery.com>
57
58 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
59 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
60 to their non-present_or_* counterparts. Make 'self' an alias to
61 PRAGMA_OACC_CLAUSE_HOST.
62 (c_parser_oacc_data_clause): Update GOMP mappings for
63 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
64 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
65 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
66 Remove support for present_or_* clauses.
67 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
68 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
69 (OACC_DECLARE_CLAUSE_MASK): Likewise.
70 (OACC_DATA_CLAUSE_MASK): Likewise.
71 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
72 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
73 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
74 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
75 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
76
e197e64e
KV
772018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
78
79 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
80 * gimple-parser.c (c_parser_gimple_statement): Likewise.
81 (c_parser_gimple_unary_expression): Likewise.
82
487f2f61
JJ
832018-06-15 Jakub Jelinek <jakub@redhat.com>
84
85 PR c/86093
86 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
87 before doing POINTER_DIFF_EXPR.
88
e4d44a37
MP
892018-06-07 Marek Polacek <polacek@redhat.com>
90
91 PR c/85318
92 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
93 for loop initial declarations.
94
b67b9225
DP
952018-05-30 David Pagan <dave.pagan@oracle.com>
96
97 PR c/55976
98 * c-decl.c (grokdeclarator): Update check for return type warnings.
99 (start_function): Likewise.
100 (finish_function): Likewise.
101 * c-typeck.c (c_finish_return): Update check for return type warnings.
102 Pass OPT_Wreturn_type to pedwarn when appropriate.
103
c566cc9f
RS
1042018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
105
106 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
107 __FMA_EXPR handlng.
108
e4f81565
RS
1092018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
110
111 * gimple-parser.c: Include internal-fn.h.
112 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
113 (c_parser_gimple_call_internal): New function.
114 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
115 Fix typos in comment.
116
79e7b1fe
JJ
1172018-05-10 Jakub Jelinek <jakub@redhat.com>
118
119 PR c++/85662
120 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
121 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
122 fold_convert_loc.
123 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
124 fold_offsetof_1, pass argtype as TYPE to it and drop the
125 fold_convert_loc.
126
f7584c81
DP
1272018-05-02 David Pagan <dave.pagan@oracle.com>
128
129 PR c/30552
130 * c-decl.c (old_style_parameter_scope): New function.
131 * c-parser.c (c_parser_postfix_expression): Check for statement
132 expressions in old-style function parameter list declarations.
133 * c-parser.h (old_style_parameter_scope): New extern declaration.
134
b33a0cb3
JJ
1352018-04-25 Jakub Jelinek <jakub@redhat.com>
136
137 PR sanitizer/84307
138 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
139 it is not TREE_STATIC.
140 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
141 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
142 its COMPOUND_LITERAL_EXPR_DECL.
143
c5c5822a
JM
1442018-03-21 Joseph Myers <joseph@codesourcery.com>
145
146 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
147 where all functions return the same _FloatN or _FloatNx type,
148 treat integer types as _Float64 instead of double.
149
aa1c9429
JJ
1502018-03-21 Jakub Jelinek <jakub@redhat.com>
151
152 PR c/84999
153 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
154 building vector comparison, diagnose it and return error_mark_node.
155
9bb45a95
JJ
1562018-03-15 Jakub Jelinek <jakub@redhat.com>
157
158 PR c/84853
159 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
160 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
161 INTEGER_TYPE element type.
162
ada6bad9
DP
1632018-03-13 David Pagan <dave.pagan@oracle.com>
164
165 PR c/46921
166 * c-typeck.c (output_init_element): Ensure field initializer
167 expression is always evaluated if there are side effects.
168
849bbdb9
JJ
1692018-03-06 Jakub Jelinek <jakub@redhat.com>
170
171 PR c/84721
172 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
173 !building_stmt_list_p ().
174
d74641bd
RS
1752018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
176
177 PR c/84305
178 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
179 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
180 and include the BIND_EXPR in the list of things that need to be
181 pre-evaluated.
182
0444aa9c
NS
1832018-02-09 Nathan Sidwell <nathan@acm.org>
184
185 PR c/84293
186 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
187 to strict_aliasing_warning.
188
7c30b12a
PC
1892018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
190
191 * c-typeck.c (really_start_incremental_init, push_init_level,
192 set_nonincremental_init, output_init_element, process_init_element):
193 Use DECL_UNNAMED_BIT_FIELD.
194
2be4dfcb
MP
1952018-01-31 Marek Polacek <polacek@redhat.com>
196
197 PR c/81779
198 * c-parser.c (c_parser_compound_statement_nostart): Call
199 expansion_point_location_if_in_system_header.
200
bb9869d5
DM
2012018-01-17 David Malcolm <dmalcolm@redhat.com>
202
203 PR c++/83814
204 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
205 the C part.
206
b4923738
JJ
2072018-01-13 Jakub Jelinek <jakub@redhat.com>
208
209 PR c/83801
210 * c-tree.h (decl_constant_value_1): Add a bool argument.
211 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
212 returning a CONSTRUCTOR if it is true. Use error_operand_p.
213 (decl_constant_value): Adjust caller.
214 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
215 decl_constant_value_1 as IN_INIT. Otherwise, punt if
216 decl_constant_value returns initializer that has BLKmode or
217 array type.
218 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
219
928686b1
RS
2202018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
221 Alan Hayward <alan.hayward@arm.com>
222 David Sherwood <david.sherwood@arm.com>
223
224 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
225 TYPE_VECTOR_SUBPARTS.
226
85ec4feb
JJ
2272018-01-03 Jakub Jelinek <jakub@redhat.com>
228
229 Update copyright years.
230
913884f7
JJ
2312018-01-01 Jakub Jelinek <jakub@redhat.com>
232
233 PR c/83595
234 * c-parser.c (c_parser_braced_init, c_parser_initelt,
235 c_parser_conditional_expression, c_parser_cast_expression,
236 c_parser_sizeof_expression, c_parser_alignof_expression,
237 c_parser_postfix_expression, c_parser_omp_declare_reduction,
238 c_parser_transaction_expression): Use set_error () method instead
239 of setting value member to error_mark_node.
240
c6cfa2bf
MM
2412017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
242
243 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
244 and _Float<N>X built-in functions.
245
11d29d63
JJ
2462017-12-22 Jakub Jelinek <jakub@redhat.com>
247
14ec014e
JJ
248 PR debug/83550
249 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
250 TYPE_STUB_DECL and call rest_of_type_compilation before processing
251 incomplete vars rather than after it.
252
11d29d63
JJ
253 PR debug/83547
254 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
255 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
256 and consider empty ones if there are no other stmts. For
257 -Wunused-value walk all statements before the one only followed by
258 DEBUG_BEGIN_STMTs.
259
170a8bd6
EB
2602017-12-22 Mike Stump <mikestump@comcast.net>
261 Eric Botcazou <ebotcazou@adacore.com>
262
263 * c-parser.c (c_parser_while_statement): Add unroll parameter and
264 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
265 (c_parser_do_statement): Likewise.
266 (c_parser_for_statement): Likewise.
267 (c_parser_statement_after_labels): Adjust calls to above.
268 (c_parse_pragma_ivdep): New static function.
269 (c_parser_pragma_unroll): Likewise.
270 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
271 <PRAGMA_UNROLL>: New case.
272
01512446
JJ
2732017-12-19 Jakub Jelinek <jakub@redhat.com>
274
275 * c-typeck.c (comptypes_internal, function_types_compatible_p,
276 perform_integral_promotions, digest_init): Replace Yoda conditions
277 with typical order conditions.
278 * c-decl.c (check_bitfield_type_and_width): Likewise.
279
c65e18d3
BE
2802017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
281
282 * c-typeck.c (c_safe_arg_type_equiv_p,
283 c_safe_function_type_cast_p): New function.
284 (build_c_cast): Implement -Wcast-function-type.
285
b7280579
RB
2862017-12-14 Richard Biener <rguenther@suse.de>
287
288 PR c/83415
289 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
290 like REALPART_EXPR for the behavior of whether its operand
291 is an lvalue.
292
49e6a6c0
MP
2932017-12-12 Marek Polacek <polacek@redhat.com>
294
295 PR c/82679
296 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
297
96a95ac1
AO
2982017-12-12 Alexandre Oliva <aoliva@redhat.com>
299
300 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
301 * c-parser.c (add_debug_begin_stmt): New.
302 (c_parser_declaration_or_fndef): Call it.
303 (c_parser_compound_statement_nostart): Likewise.
304 (c_parser_statement_after_labels): Likewise.
305 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
306
4b2b493f
JM
3072017-12-07 Joseph Myers <joseph@codesourcery.com>
308
309 * c-decl.c (build_compound_literal): Add parameter alignas_align
310 and set alignment of decl if nonzero.
311 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
312 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
313 qualifier.
314 (c_parser_struct_declaration): Update syntax comment.
315 (c_parser_type_name): Add alignas_ok argument and pass it to
316 c_parser_declspecs.
317 (c_parser_cast_expression): Pass true to c_parser_type_name and
318 give error if a cast used an _Alignas specifier.
319 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
320 give error if sizeof (type-name) used an _Alignas specifier.
321 (c_parser_alignof_expression): Pass true to c_parser_type_name and
322 give error if _Alignof (type-name) used an _Alignas specifier.
323 (c_parser_postfix_expression_after_paren_type): Check specified
324 alignment for a compound literal and pass it to
325 build_compound_literal.
326 * c-parser.h (c_parser_type_name): Update prototype.
327 * c-tree.h (build_compound_literal): Update prototype.
328
5d9ae53d
MS
3292017-12-07 Martin Sebor <msebor@redhat.com>
330
331 PR c/81544
332 * c-decl.c (c_decl_attributes): Look up existing declaration and
333 pass it to decl_attributes.
334
c79144f8
DM
3352017-12-06 David Malcolm <dmalcolm@redhat.com>
336
337 PR c/83236
338 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
339 reserved for use by the implementation.
340
613bc14f
DM
3412017-12-06 David Malcolm <dmalcolm@redhat.com>
342
343 * c-decl.c: Include "c-family/c-spellcheck.h".
344
05abad4c
ML
3452017-12-05 Martin Liska <mliska@suse.cz>
346 Jakub Jelinek <jakub@redhat.com>
347
348 * c-typeck.c (pointer_diff): Add new argument and instrument
349 pointer subtraction.
350 (build_binary_op): Similar for pointer comparison.
351
cc6534d4
JJ
3522017-12-01 Jakub Jelinek <jakub@redhat.com>
353
65791f42
JJ
354 PR c/79153
355 * c-parser.c: Include tree-iterator.h.
356 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
357 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
358 on it.
359
cc6534d4
JJ
360 PR c/83222
361 * c-tree.h (decl_constant_value_1): Declare.
362 * c-typeck.c (decl_constant_value_1): New function.
363 (decl_constant_value): Use it.
364 * c-fold.c (c_fully_fold_internal): If in_init, use
365 decl_constant_value_1 instead of decl_constant_value.
366
5de73c05
JJ
3672017-11-30 Jakub Jelinek <jakub@redhat.com>
368
369 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
370
058f0b9e
JJ
3712017-11-28 Jakub Jelinek <jakub@redhat.com>
372
373 PR sanitizer/81275
374 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
375 c_switch_covers_all_cases_p returns true.
376
5e9d6aa4
JK
3772017-11-28 Julia Koval <julia.koval@intel.com>
378 Sebastian Peryt <sebastian.peryt@intel.com>
379
380 * Make-lang.in (c/c-array-notation.o): Remove.
381 * c-array-notation.c: Delete.
382 * c-decl.c: Remove cilkplus condition.
383 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
384 c_parser_cilk_verify_simd, c_parser_array_notation,
385 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
386 c_parser_cilk_simd_fn_vector_attrs,
387 c_finish_cilk_simd_fn_tokens): Delete.
388 (c_parser_declaration_or_fndef): Remove cilkplus condition.
389 (c_parser_direct_declarator_inner): Ditto.
390 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
391 (c_parser_attributes, c_parser_compound_statement,
392 c_parser_statement_after_labels, c_parser_if_statement,
393 c_parser_switch_statement, c_parser_while_statement,
394 c_parser_do_statement, c_parser_for_statement,
395 c_parser_unary_expression, c_parser_postfix_expression,
396 c_parser_postfix_expression_after_primary,
397 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
398 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
399 support.
400 * c-typeck.c (build_array_ref, build_function_call_vec,
401 convert_arguments,
402 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
403 c_finish_loop, build_binary_op): Remove cilkplus support.
404
9e851845
JJ
4052017-11-28 Jakub Jelinek <jakub@redhat.com>
406
407 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
408 of build3.
409
8c7dbea9
BK
4102017-11-14 Boris Kolpackov <boris@codesynthesis.com>
411
412 * Make-lang.in (c.install-plugin): Install backend import library.
413
41521dee
JJ
4142017-11-23 Jakub Jelinek <jakub@redhat.com>
415
416 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
417 pragma_stmt context.
418
ac9effed
EB
4192017-11-23 Mike Stump <mikestump@comcast.net>
420 Eric Botcazou <ebotcazou@adacore.com>
421
422 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
423 ANNOTATE_EXPR.
424 (c_parser_do_statement): Likewise.
425 (c_parser_for_statement): Likewise.
426
ce95abc4
DM
4272017-11-22 David Malcolm <dmalcolm@redhat.com>
428
429 PR c++/62170
430 * c-objc-common.c (c_tree_printer): Convert penultimate param from
431 bool to bool *. Within '%T' handling, if showing an "aka", use
432 "quoted" param to add appropriate quoting.
433
974aedcc
MP
4342017-11-22 Marek Polacek <polacek@redhat.com>
435
436 PR c++/60336
437 PR middle-end/67239
438 PR target/68355
439 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
440
d4300cc6
DM
4412017-11-21 David Malcolm <dmalcolm@redhat.com>
442
443 PR c/83056
444 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
445 earlier failed lookups.
446
1af4ebf5
MG
4472017-11-21 Marc Glisse <marc.glisse@inria.fr>
448
449 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
450 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
451
26edace6
DM
4522017-11-20 David Malcolm <dmalcolm@redhat.com>
453
454 PR c/81404
455 * c-decl.c: Include "c-family/known-headers.h".
456 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
457 to known-headers.cc.
458 (class suggest_missing_header): Move to known-header.h.
459 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
460 than get_c_name_hint.
461
b1212255
DM
4622017-11-20 David Malcolm <dmalcolm@redhat.com>
463
464 * c-decl.c (get_c_name_hint): New function.
465 (class suggest_missing_header): New class.
466 (lookup_name_fuzzy): Call get_c_name_hint and use it to
467 suggest missing headers to the user.
468
6c7a259b
DM
4692017-11-20 David Malcolm <dmalcolm@redhat.com>
470
471 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
472 Include "c-family/name-hint.h"
473 (implicit_decl_warning): Convert "hint" from
474 const char * to name_hint. Pass location to
475 lookup_name_fuzzy. Suppress any deferred diagnostic if the
476 warning was not printed.
477 (undeclared_variable): Likewise for "guessed_id".
478 (lookup_name_fuzzy): Convert return type from const char *
479 to name_hint. Add location_t param.
480 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
481 Include "c-family/name-hint.h"
482 (c_parser_declaration_or_fndef): Convert "hint" from
483 const char * to name_hint. Pass location to lookup_name_fuzzy.
484 (c_parser_parameter_declaration): Likewise.
485
f9c59f7e
JJ
4862017-11-19 Jakub Jelinek <jakub@redhat.com>
487
488 PR c/66618
489 PR c/69960
490 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
491 where needed.
492 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
493 handle_omp_array_sections): Likewise.
494 (digest_init): Don't call decl_constant_value_for_optimization.
495 * c-tree.h (decl_constant_value_for_optimization): Removed.
496 * c-fold.c (c_fold_array_ref): New function.
497 (c_fully_fold_internal): Add LVAL argument, propagate it through
498 recursive calls. For VAR_P call decl_constant_value and
499 unshare if not LVAL and either optimizing or IN_INIT. Remove
500 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
501 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
502 (c_fully_fold): Add LVAL argument, pass it through to
503 c_fully_fold_internal.
504 (decl_constant_value_for_optimization): Removed.
505
3ca0dc60
JM
5062017-11-15 Joseph Myers <joseph@codesourcery.com>
507
508 PR c/81156
509 * c-parser.c (check_tgmath_function): New function.
510 (enum tgmath_parm_kind): New enum.
511 (c_parser_postfix_expression): Handle __builtin_tgmath.
512
64a5912c
DM
5132017-10-31 David Malcolm <dmalcolm@redhat.com>
514
515 * c-decl.c (implicit_decl_warning): Update for renaming of
516 pedwarn_at_rich_loc and warning_at_rich_loc.
517 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
518 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
519 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
520 (c_parser_struct_or_union_specifier): Likewise for renaming of
521 pedwarn_at_rich_loc.
522 (c_parser_parameter_declaration): Likewise for renaming of
523 error_at_rich_loc.
524 * c-typeck.c (build_component_ref): Likewise.
525 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
526 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
527 (set_init_label): Likewise for renaming of error_at_rich_loc.
528
c1136864
RB
5292017-10-30 Richard Biener <rguenther@suse.de>
530
531 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
532 stmts.
533
ee5fd23a
MM
5342017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
535
536 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
537 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
538
1a59ccf2
DM
5392017-10-25 David Malcolm <dmalcolm@redhat.com>
540
541 PR c/7356
542 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
543 semicolons.
544
bc1a75dd
JJ
5452017-10-25 Jakub Jelinek <jakub@redhat.com>
546
547 PR libstdc++/81706
548 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
549 newdecl to corresponding __builtin_ if any.
550
ff1ff960
PC
5512017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
552
553 PR c++/82466
554 * c-decl.c (diagnose_mismatched_decls): Use
555 OPT_Wbuiltin_declaration_mismatch.
556
62e1c678
DM
5572017-10-12 David Malcolm <dmalcolm@redhat.com>
558
559 * c-parser.c (c_parser_require): Add "type_is_unique" param and
560 use it to guard calls to maybe_suggest_missing_token_insertion.
561 (c_parser_parms_list_declarator): Override default value of new
562 "type_is_unique" param to c_parser_require.
563 (c_parser_asm_statement): Likewise.
564 * c-parser.h (c_parser_require): Add "type_is_unique" param,
565 defaulting to true.
566
a92f6726
NS
5672017-10-11 Nathan Sidwell <nathan@acm.org>
568
569 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
570
8e6cdc90
RS
5712017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
572
573 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
574 operating on trees as wide_ints.
575 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
576 (c_tree_equal): Likewise.
577
8139a48e
DM
5782017-10-04 David Malcolm <dmalcolm@redhat.com>
579
580 * c-decl.c (push_parm_decl): Store c_parm's location into the
581 PARAM_DECL.
582 (build_c_parm): Add "loc" param and store it within the c_parm.
583 * c-parser.c (struct c_parser): Add "last_token_location" field.
584 (c_parser_consume_token): Store location of the token into the
585 new field.
586 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
587 when handling a FUNCTION_DECL, if it doesn't already have them.
588 (c_parser_parameter_declaration): Generate a location for the
589 parameter, and pass it to the call to build_c_parm.
590 * c-tree.h (struct c_parm): Add field "loc".
591 (build_c_parm): Add location_t param.
592 * c-typeck.c (get_fndecl_argument_location): New function.
593 (inform_for_arg): New function.
594 (convert_for_assignment): Use inform_for_arg when dealing with
595 ic_argpass.
596
2a389958
JJ
5972017-09-29 Jakub Jelinek <jakub@redhat.com>
598
7d386d45
JJ
599 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
600 width is non-NULL.
601 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
602 don't SET_DECL_C_BIT_FIELD here.
603
2a389958
JJ
604 PR c/82340
605 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
606 instead of trying to set just TREE_READONLY manually.
607
ebc6a85e
TV
6082017-09-16 Tom de Vries <tom@codesourcery.com>
609
610 PR c/81875
611 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
612 cond itself.
613
bb75facd
JM
6142017-09-15 Joseph Myers <joseph@codesourcery.com>
615
616 PR c/82071
617 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
618 for C11.
619 (build_conditional_expr): For C11, generate result with excess
620 precision when one argument is an integer and the other is of a
621 type using excess precision.
622
1d933576
BE
6232017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
624
625 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
626
267bbb6f
MP
6272017-09-13 Marek Polacek <polacek@redhat.com>
628
629 PR c/82167
630 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
631 than expr.original_type.
632
6836632e
NS
6332017-09-12 Nathan Sidwell <nathan@acm.org>
634
635 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
636 resort_sorted_fields): Moved from c-family/c-common.c.
637 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
638
e035be33
JM
6392017-09-01 Joseph Myers <joseph@codesourcery.com>
640
641 PR c/82071
642 * c-typeck.c (build_atomic_assign): Handle argument with excess
643 precision. Ensure any EXCESS_PRECISION_EXPR is present in
644 argument passed to build_binary_op and convert_for_assignment but
645 not for call to c_fully_fold.
646 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
647 Ensure build_binary_op is called with argument with original
648 semantic type. Avoid calling c_fully_fold with an
649 EXCESS_PRECISION_EXPR from build_binary_op.
650
d2e05fcb
JJ
6512017-09-01 Jakub Jelinek <jakub@redhat.com>
652
653 PR c/81887
654 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
655
b397965c
RS
6562017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
657 Alan Hayward <alan.hayward@arm.com>
658 David Sherwood <david.sherwood@arm.com>
659
660 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
661 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
662 m1 and m2 to the signed equivalent of a fixed-point
663 SCALAR_TYPE_MODE.
664
14e18d71
DM
6652017-08-24 David Malcolm <dmalcolm@redhat.com>
666
667 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
668 than CAN_HAVE_LOCATION_P when determining whether to use the
669 location_t value within "value".
670
7f204c0f
DM
6712017-08-21 David Malcolm <dmalcolm@redhat.com>
672
673 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
674 rather than peeking the location of the first token.
675 * c-tree.h (c_expr::get_location): New method.
676
2f687306
DM
6772017-08-21 David Malcolm <dmalcolm@redhat.com>
678
679 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
680 to check_function_arguments.
681
3e7b80d7
MP
6822017-08-18 Marek Polacek <polacek@redhat.com>
683
684 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
685 commentary.
686
00aa1fa2
L
6872017-08-18 H.J. Lu <hongjiu.lu@intel.com>
688
689 PR c/53037
690 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
691 (check_bitfield_type_and_width): Don't allow bit-field with
692 warn_if_not_aligned type.
693
da67acb9
MS
6942017-08-14 Martin Sebor <msebor@redhat.com>
695
696 PR c/81117
697 * c-objc-common.c (c_objc_common_init): Handle 'G'.
698
bb85aa74
MP
6992017-08-11 Marek Polacek <polacek@redhat.com>
700
701 PR c/81795
702 * c-decl.c (pushtag): Only print inform if the warning was printed.
703 (grokdeclarator): Likewise.
704
32129a17
DM
7052017-08-10 David Malcolm <dmalcolm@redhat.com>
706
707 * c-parser.c (c_parser_error): Rename to...
708 (c_parser_error_richloc): ...this, making static, and adding
709 "richloc" parameter, passing it to the c_parse_error call,
710 rather than calling c_parser_set_source_position_from_token.
711 (c_parser_error): Reintroduce, reimplementing in terms of the
712 above, converting return type from void to bool.
713 (class token_pair): New class.
714 (struct matching_paren_traits): New struct.
715 (matching_parens): New typedef.
716 (struct matching_brace_traits): New struct.
717 (matching_braces): New typedef.
718 (get_matching_symbol): New function.
719 (c_parser_require): Add param MATCHING_LOCATION, using it to
720 highlight matching "opening" tokens for missing "closing" tokens.
721 (c_parser_skip_until_found): Likewise.
722 (c_parser_static_assert_declaration_no_semi): Convert explicit
723 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
724 class matching_parens, so that the pertinent open parenthesis is
725 highlighted when there are problems locating the close
726 parenthesis.
727 (c_parser_struct_or_union_specifier): Likewise.
728 (c_parser_typeof_specifier): Likewise.
729 (c_parser_alignas_specifier): Likewise.
730 (c_parser_simple_asm_expr): Likewise.
731 (c_parser_braced_init): Likewise, for matching_braces.
732 (c_parser_paren_condition): Likewise, for matching_parens.
733 (c_parser_switch_statement): Likewise.
734 (c_parser_for_statement): Likewise.
735 (c_parser_asm_statement): Likewise.
736 (c_parser_asm_operands): Likewise.
737 (c_parser_cast_expression): Likewise.
738 (c_parser_sizeof_expression): Likewise.
739 (c_parser_alignof_expression): Likewise.
740 (c_parser_generic_selection): Likewise.
741 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
742 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
743 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
744 In case CPP_OPEN_PAREN, pass loc_open_paren to the
745 c_parser_skip_until_found call.
746 (c_parser_objc_class_definition): Use class matching_parens as
747 above.
748 (c_parser_objc_method_decl): Likewise.
749 (c_parser_objc_try_catch_finally_statement): Likewise.
750 (c_parser_objc_synchronized_statement): Likewise.
751 (c_parser_objc_at_property_declaration): Likewise.
752 (c_parser_oacc_wait_list): Likewise.
753 (c_parser_omp_var_list_parens): Likewise.
754 (c_parser_omp_clause_collapse): Likewise.
755 (c_parser_omp_clause_default): Likewise.
756 (c_parser_omp_clause_if): Likewise.
757 (c_parser_omp_clause_num_threads): Likewise.
758 (c_parser_omp_clause_num_tasks): Likewise.
759 (c_parser_omp_clause_grainsize): Likewise.
760 (c_parser_omp_clause_priority): Likewise.
761 (c_parser_omp_clause_hint): Likewise.
762 (c_parser_omp_clause_defaultmap): Likewise.
763 (c_parser_oacc_single_int_clause): Likewise.
764 (c_parser_omp_clause_ordered): Likewise.
765 (c_parser_omp_clause_reduction): Likewise.
766 (c_parser_omp_clause_schedule): Likewise.
767 (c_parser_omp_clause_num_teams): Likewise.
768 (c_parser_omp_clause_thread_limit): Likewise.
769 (c_parser_omp_clause_aligned): Likewise.
770 (c_parser_omp_clause_linear): Likewise.
771 (c_parser_omp_clause_safelen): Likewise.
772 (c_parser_omp_clause_simdlen): Likewise.
773 (c_parser_omp_clause_depend): Likewise.
774 (c_parser_omp_clause_map): Likewise.
775 (c_parser_omp_clause_device): Likewise.
776 (c_parser_omp_clause_dist_schedule): Likewise.
777 (c_parser_omp_clause_proc_bind): Likewise.
778 (c_parser_omp_clause_uniform): Likewise.
779 (c_parser_omp_for_loop): Likewise.
780 (c_parser_cilk_clause_vectorlength): Likewise.
781 (c_parser_cilk_clause_linear): Likewise.
782 (c_parser_transaction_expression): Likewise.
783 * c-parser.h (c_parser_require): Add param matching_location with
784 default UNKNOWN_LOCATION.
785 (c_parser_error): Convert return type from void to bool.
786 (c_parser_skip_until_found): Add param matching_location with
787 default UNKNOWN_LOCATION.
788
30af3a2b
MP
7892017-08-09 Marek Polacek <polacek@redhat.com>
790
791 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
792 * c-tree.h (build_external_ref): Update declaration.
793 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
794 (build_external_ref): Change the type of a parameter to bool.
795 (parser_build_binary_op): Use true/false instead of 1/0.
796 (pointer_diff): Likewise.
797 (build_modify_expr): Likewise.
798 (set_designator): Change the type of a parameter to bool.
799 (set_init_index): Use true/false instead of 1/0.
800 (set_init_label): Likewise.
801 (output_init_element): Change the type of a parameter to bool.
802 (output_pending_init_elements): Use true/false instead of 1/0.
803 (process_init_element): Likewise.
804 (build_binary_op): Change the type of a parameter to bool.
805
296c53ac
MP
8062017-08-09 Marek Polacek <polacek@redhat.com>
807
808 PR c/81233
809 * c-typeck.c (pedwarn_init): Make the function take a variable list.
810 Call emit_diagnostic_valist instead of pedwarn.
811 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
812 Print the relevant types in diagnostics.
813
a32c8316
MP
8142017-08-09 Marek Polacek <polacek@redhat.com>
815
816 PR c/81417
817 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
818 build_conditional_expr.
819 * c-parser.c (c_parser_conditional_expression): Create locations for
820 EXP1 and EXP2 from their source ranges. Pass the locations down to
821 build_conditional_expr.
822 * c-tree.h (build_conditional_expr): Update declaration.
823 * c-typeck.c (build_conditional_expr): Add location_t parameters.
824 For -Wsign-compare, also print the types.
825
314e6352
ML
8262017-08-08 Martin Liska <mliska@suse.cz>
827
828 * c-convert.c: Include header files.
829 * c-typeck.c: Likewise.
830
577eec56
ML
8312017-08-07 Martin Liska <mliska@suse.cz>
832
833 * c-parser.c (c_parser_attributes): Canonicalize name of an
834 attribute.
835
f7b6353a
MP
8362017-08-02 Marek Polacek <polacek@redhat.com>
837
838 PR c/81289
839 * c-parser.c (c_parser_unary_expression): Use set_error.
840
8a6eab34
MP
841 PR c/81448
842 PR c/81306
843 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
844 warnings. Avoid walking MACRO_MAP_LOCATIONS.
845
7fef86d3
JH
8462017-07-31 Jan Hubicka <hubicka@ucw.cz>
847 Martin Liska <mliska@suse.cz>
848
849 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 850 statement.
7fef86d3 851
f34ebeb2
ML
8522017-07-31 Martin Liska <mliska@suse.cz>
853
854 PR sanitize/81530
855 * c-convert.c (convert): Guard condition with flag_sanitize_p
856 also with current_function_decl non-null equality.
857 * c-decl.c (grokdeclarator): Likewise.
858 * c-typeck.c (build_binary_op): Likewise.
859
8595f67b
MP
8602017-07-25 Marek Polacek <polacek@redhat.com>
861
862 * c-decl.c (grokfield): Remove local variable.
863
d49718d6
MP
8642017-07-25 Marek Polacek <polacek@redhat.com>
865
866 PR c/81364
867 * c-parser.c (c_parser_else_body): Don't warn about multistatement
868 macro expansion if the body is in { }.
869 (c_parser_while_statement): Likewise.
870 (c_parser_for_statement): Likewise.
871
ff22eb12
NS
8722017-07-18 Nathan Sidwell <nathan@acm.org>
873
874 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
875
eea77d1f
DM
8762017-07-14 David Malcolm <dmalcolm@redhat.com>
877
878 * c-decl.c (implicitly_declare): When suggesting a missing
879 #include, provide a fix-it hint.
880
b6f43128
DM
8812017-07-06 David Malcolm <dmalcolm@redhat.com>
882
883 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
884 and call that instead.
885 * c-tree.h (selftest::run_c_tests): New decl.
886
3e2becc4
MP
8872017-06-26 Marek Polacek <polacek@redhat.com>
888
889 PR c/80116
890 * c-parser.c (c_parser_if_body): Set the location of the
891 body of the conditional after parsing all the labels. Call
892 warn_for_multistatement_macros.
893 (c_parser_else_body): Likewise.
894 (c_parser_switch_statement): Likewise.
895 (c_parser_while_statement): Likewise.
896 (c_parser_for_statement): Likewise.
897 (c_parser_statement): Add a default argument. Save the location
898 after labels have been parsed.
899 (c_parser_c99_block_statement): Likewise.
900
343ae898
RB
9012017-06-19 Richard Biener <rguenther@suse.de>
902
903 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
904 negated _Literals to parse _Literal (int) -1.
905
45b2222a
ML
9062017-06-13 Martin Liska <mliska@suse.cz>
907
908 PR sanitize/78204
909 * c-convert.c (convert): Use sanitize_flags_p.
910 * c-decl.c (grokdeclarator): Likewise.
911 * c-typeck.c (convert_for_assignment): Likewise.
912 (c_finish_return): Likewise.
913 (build_binary_op): Likewise.
914
8ab7005b
JJ
9152017-06-08 Jakub Jelinek <jakub@redhat.com>
916
917 PR c/81006
918 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
919 to sizetype before size_binop.
920
363dc72c
JJ
9212017-06-07 Jakub Jelinek <jakub@redhat.com>
922
923 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
924 of TDI_generic.
925
dc949728
MP
9262017-06-06 Marek Polacek <polacek@redhat.com>
927
928 PR c/79983
929 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
930 ref.
931 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
932
40ffd95f
BE
9332017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
934
935 * c-parser.c (c_parser_binary_expression): Implement the
936 -Wsizeof_pointer_div warning.
937 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
938 from a parenthesized expression.
939 (c_parser_expr_list): Use c_last_sizeof_loc.
940 * c-tree.h (c_last_sizeof_loc): New external.
941 * c-typeck.c (c_last_sizeof_loc): New variable.
942 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
943
9fc5e7a4
MM
9442017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
945
946 PR testsuite/80580
947 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
948
f012c8ef
DM
9492017-05-30 David Malcolm <dmalcolm@redhat.com>
950
951 * c-objc-common.c (c_tree_printer): Gain bool and const char **
952 parameters.
953
3cd211af
MS
9542017-05-24 Martin Sebor <msebor@redhat.com>
955
956 PR c/80731
957 * c-fold.c (c_fully_fold_internal): Adjust.
958 * c-typeck.c (parser_build_unary_op): Adjust.
959
fd71a9a2
TS
9602017-05-23 Thomas Schwinge <thomas@codesourcery.com>
961
962 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
963 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
964 "VECTOR_LENGTH".
965
92fa0f9e
MP
9662017-05-23 Marek Polacek <polacek@redhat.com>
967
968 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
969 quotes.
970
d11c168a
JJ
9712017-05-22 Jakub Jelinek <jakub@redhat.com>
972
973 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
974 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
975 it returned invariant. Call tree_invariant_p unconditionally
976 afterwards to decide whether to return expr or op0.
977
58aca9d9
NS
9782017-05-22 Nathan Sidwell <nathan@acm.org>
979
980 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
981
7fd549d2
TS
9822017-05-19 Thomas Schwinge <thomas@codesourcery.com>
983
984 * c-parser.c (c_parser_omp_clause_default): Handle
985 "OMP_CLAUSE_DEFAULT_PRESENT".
986
6ecd2339
BE
9872017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
988
989 * config-lang.in (gtfiles): Add c-family/c-format.c.
990
8a57ecff
NS
9912017-05-18 Nathan Sidwell <nathan@acm.org>
992
993 * c-decl.c (pushdecl_top_level): Delete unused function.
994
6574d78e
MP
9952017-05-18 Marek Polacek <polacek@redhat.com>
996
997 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
998 (check_earlier_gotos): Likewise.
999 (define_label): Likewise.
1000 (pending_xref_error): Likewise.
1001 (smallest_type_quals_location): Likewise.
1002 (grokdeclarator): Likewise.
1003 (grokparms): Likewise.
1004 (identifier_global_value): Likewise.
1005 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1006 (find_init_member): Likewise.
1007
e3455240
MP
10082017-05-18 Marek Polacek <polacek@redhat.com>
1009
1010 * c-decl.c (start_decl): Use false/true instead of 0/1.
1011 (grokdeclarator): Likewise.
1012 (finish_struct): Likewise.
1013 (start_function): Change the return type to bool. Use false/true
1014 instead of 0/1.
1015 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1016 * c-tree.h (start_function): Update.
1017 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1018 (set_designator): Change the return type to bool. Use false/true
1019 instead of 0/1.
1020
3fa8871b
MP
10212017-05-17 Marek Polacek <polacek@redhat.com>
1022
1023 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1024 * c-typeck.c: Likewise.
1025
142473df
MP
10262017-05-17 Marek Polacek <polacek@redhat.com>
1027
1028 PR sanitizer/80659
1029 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1030 DECL_IGNORED_P even for non-static compound literals.
1031
1a817418
ML
10322017-05-17 Martin Liska <mliska@suse.cz>
1033
1034 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1035 use it instead of int type.
1036
b2fa0a8b
MP
10372017-05-17 Marek Polacek <polacek@redhat.com>
1038
1039 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1040 call c_fully_fold.
1041 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1042 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1043 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1044 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1045 save_expr.
1046 (c_parser_conditional_expression): Likewise.
1047 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1048 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1049 (process_init_element): Likewise.
1050 (build_binary_op): Likewise.
1051 (handle_omp_array_sections_1): Likewise.
1052
1e47f02b
TS
10532017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1054
1055 * c-parser.c (c_parser_omp_clause_num_gangs)
1056 (c_parser_omp_clause_num_workers)
1057 (c_parser_omp_clause_vector_length): Merge functions into...
1058 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1059 all users.
1060
c24e924f
NS
10612017-05-11 Nathan Sidwell <nathan@acm.org>
1062
1063 * gimple-parser.c: Don't #include tree-dump.h.
1064
c587104e
MM
10652017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1066
1067 PR testsuite/80580
1068 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1069
67ac9a9d
MM
10702017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1071
1072 PR testsuite/80580
1073 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1074 incorrect __MEM syntax.
1075
ac4eb40f
MM
10762017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1077
1078 PR testsuite/80580
1079 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1080 type of unary '*'.
1081
641da50a
NS
10822017-05-09 Nathan Sidwell <nathan@acm.org>
1083
1084 * c-tree.h (pushdecl): Declare.
1085
56d35585
DM
10862017-05-05 David Malcolm <dmalcolm@redhat.com>
1087
1088 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1089 with diagnostic_report_diagnostic.
1090 * c-errors.c (pedwarn_c99): Likewise.
1091 (pedwarn_c90): Likewise.
1092
815d9cc6
XR
10932017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1094
1095 PR c++/80038
1096 * c-gimplify.c (c_gimplify_expr): Remove calls to
1097 cilk_gimplifY_call_params_in_spawned_fn.
1098
1c4ea66f
DM
10992017-04-25 David Malcolm <dmalcolm@redhat.com>
1100
1101 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1102 hint for removing extra semicolon.
1103
666f7903
JJ
11042017-04-21 Jakub Jelinek <jakub@redhat.com>
1105
1106 PR c/80468
1107 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1108 enabled, set specs->type to integer_type_node.
1109
5764ee3c
JW
11102017-04-03 Jonathan Wakely <jwakely@redhat.com>
1111
1112 * c-array-notation.c: Fix typo in comment.
1113
10fa8dfb
MP
11142017-03-29 Marek Polacek <polacek@redhat.com>
1115
1116 PR c/79730
1117 * c-decl.c (finish_decl): Check VAR_P.
1118
a9e4a1a5
JJ
11192017-03-27 Jakub Jelinek <jakub@redhat.com>
1120
1121 PR middle-end/80162
1122 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1123 * c-typeck.c (c_mark_addressable): Likewise. Look through
1124 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1125 to ARRAY_TYPE.
1126 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1127
ee3ff394
MP
11282017-03-23 Marek Polacek <polacek@redhat.com>
1129
1130 * c-tree.h: Remove a C_RID_YYCODE reference.
1131
4d1b8e70
JJ
11322017-03-21 Jakub Jelinek <jakub@redhat.com>
1133
1134 PR c/80097
1135 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1136 optional COMPOUND_EXPR with ubsan instrumentation.
1137
31dc71a8
MP
11382017-03-17 Marek Polacek <polacek@redhat.com>
1139
1140 * c-parser.c: Add C11 references.
1141
d579c385
MP
11422017-03-15 Marek Polacek <polacek@redhat.com>
1143
1144 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1145
85059a38
MP
11462017-03-11 Marek Polacek <polacek@redhat.com>
1147
1148 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1149
2f6f187a
DM
11502017-03-10 David Malcolm <dmalcolm@redhat.com>
1151
1152 PR translation/79848
1153 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1154 "%qs".
1155 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1156
36618428
MP
11572017-03-09 Marek Polacek <polacek@redhat.com>
1158
1159 PR sanitizer/79757
1160 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1161 parameter declarations with initializers.
1162
01e5af5a
JJ
11632017-03-09 Jakub Jelinek <jakub@redhat.com>
1164
1165 PR c/79969
1166 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1167 TYPE_STUB_DECL.
1168
a71dbc63
JJ
11692017-03-07 Jakub Jelinek <jakub@redhat.com>
1170
1171 PR c/79834
1172 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1173 for "may only be used in compound statements" diagnostics, change it
1174 such that the same translatable string is used for all pragmas. For
1175 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1176 diagnostics.
1177 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1178 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1179 "may only be used in compound statements" diagnostics, such that the
1180 same translatable string is used for all pragmas.
1181
1ff4bae6
MP
11822017-03-04 Marek Polacek <polacek@redhat.com>
1183
1184 PR c/79847
1185 * c-decl.c (implicit_decl_warning): Add missing space.
1186
7f5a7d78
MP
11872017-03-03 Marek Polacek <polacek@redhat.com>
1188
1189 PR c/79758
1190 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1191 current_function_prototype_arg_types is error_mark_node. Fix
1192 formatting. Use TREE_VALUE instead of TREE_TYPE.
1193
883c8f06
JJ
11942017-03-03 Jakub Jelinek <jakub@redhat.com>
1195
79c9b7a8
JJ
1196 PR c/79837
1197 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1198 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1199 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1200 diagnostics.
1201
883c8f06
JJ
1202 PR c/79836
1203 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1204 instead of %<_Generic>.
1205 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1206 (c_parser_omp_target_exit_data): Use %<release%> instead of
1207 %<release>.
1208
324ff1a0
JJ
12092017-02-28 Jakub Jelinek <jakub@redhat.com>
1210
1211 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1212 instead of just cond ? "..." : "...".
1213 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1214 for "enter"/"exit" keyword.
1215 (c_finish_oacc_routine): Don't use %s to supply portions of the
1216 message.
1217
4227c9ad
JJ
12182017-02-24 Jakub Jelinek <jakub@redhat.com>
1219
1220 PR c++/79588
1221 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1222 handle -Wrestrict here.
1223 * c-typeck.c (build_function_call_vec): Adjust
1224 check_function_arguments caller.
1225
5d972e66
RB
12262017-02-23 Richard Biener <rguenther@suse.de>
1227
1228 PR c/79684
1229 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1230 to initialize c_exprs to return.
1231 (c_parser_gimple_binary_expression): Likewise.
1232 (c_parser_gimple_unary_expression): Likewise.
1233 (c_parser_gimple_postfix_expression): Likewise.
1234
61ac5ebe
MP
12352017-02-22 Marek Polacek <polacek@redhat.com>
1236
1237 PR c/79662
1238 * c-typeck.c (convert_arguments): Handle error_mark_node.
1239
41d1b0b1
PK
12402017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1241
1242 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1243 value of c_parser_parse_ssa_name against error_mark_node and emit
1244 error if ssa name is anonymous and written as default definition.
1245
eab1f169
PK
12462017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1247
1248 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1249 FMA_EXPR.
1250
bcac0b4d
JJ
12512017-02-16 Jakub Jelinek <jakub@redhat.com>
1252
1253 PR c++/79512
1254 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1255 ignore #pragma omp target even when not followed by identifier.
1256
1be33173
PK
12572017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1258
1259 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1260 (c_parser_gimple_unary_expression): Likewise.
1261
aa326bfb
JJ
12622017-02-13 Jakub Jelinek <jakub@redhat.com>
1263
1264 * c-parser.c (c_parser_oacc_declare): Add missing space in
1265 diagnostics.
1266
8a398bc5
PK
12672017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1268
1269 PR c/79478
1270 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1271 set_c_expr_source_range when parsing ssa-name.
1272
3dcde5ef
PG
12732017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1274 Richard Biener <rguenther@suse.de>
1275
1276 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1277 building IL when arguments are error_mark_node.
1278 (c_parser_gimple_unary_expression): Likewise.
1279 (c_parser_gimple_if_stmt): Likewise.
1280 (c_parser_gimple_switch_stmt): Likewise.
1281 (c_parser_gimple_return_stmt): Likewise.
1282 (c_parser_parse_ssa_name): When name lookup fails do not build
1283 an SSA name. Use undeclared rather than not declared in error
1284 reporting.
1285
192b048b
MP
12862017-02-09 Marek Polacek <polacek@redhat.com>
1287
1288 PR c/79428
1289 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1290 instead of c_parser_skip_until_found.
1291
56f71478
JJ
12922017-02-09 Jakub Jelinek <jakub@redhat.com>
1293
1294 PR c/79431
1295 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1296 symtab_node::get on automatic variables.
1297
02889d23
CLT
12982016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1299 Chung-Lin Tang <cltang@codesourcery.com>
1300
1301 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1302 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1303 semantic checking.
1304 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1305
7af4b20d
RB
13062017-02-07 Richard Biener <rguenther@suse.de>
1307
1308 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1309 (c_parser_gimple_postfix_expression_after_primary):
1310 Do not use c_build_function_call_vec to avoid folding and promotion.
1311 Simplify.
1312
e5e391d6
MO
13132017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1314
1315 PR lto/79061
1316 * c-decl.c (pop_scope): Pass main_input_filename to
1317 build_translation_unit_decl.
1318
c2e84327
DM
13192017-01-24 David Malcolm <dmalcolm@redhat.com>
1320
1321 * c-parser.c: Include "read-rtl-function.h" and
1322 "run-rtl-passes.h".
1323 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1324 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1325 production. Update for renaming of field "gimple_pass" to
1326 "gimple_or_rtl_pass". If __RTL was seen, call
1327 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1328 to an auto_timevar, to cope with early exit.
1329 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1330 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1331 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1332 Handle RID_RTL.
1333 (c_parser_parse_rtl_body): New function.
1334 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1335 (struct c_declspecs): Rename field "gimple_pass" to
1336 "gimple_or_rtl_pass". Add field "rtl_p".
1337 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1338 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1339 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1340 (c_parser_gimple_or_rtl_pass_list): ...this.
1341
2ebd93e1
MP
13422017-01-20 Marek Polacek <polacek@redhat.com>
1343
1344 PR c/64279
1345 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1346
b1c95bb5
RB
13472017-01-13 Richard Biener <rguenther@suse.de>
1348
1349 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1350 nops.
1351
25329913
RB
13522017-01-13 Richard Biener <rguenther@suse.de>
1353
1354 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1355 _Literal ( type-name ) number.
1356
6bb4ea5c
RB
13572017-01-12 Richard Biener <rguenther@suse.de>
1358
1359 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1360 __MEM.
1361
6b5b4e9c
JJ
13622017-01-11 Jakub Jelinek <jakub@redhat.com>
1363
1364 PR c++/72813
1365 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1366 PCH file.
1367
e3252775
RB
13682017-01-11 Richard Biener <rguenther@suse.de>
1369
1370 PR bootstrap/79052
1371 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1372 returns on parse errors.
1373
a9342885
MP
13742017-01-04 Marek Polacek <polacek@redhat.com>
1375
1376 PR c++/64767
1377 * c-parser.c (c_parser_postfix_expression): Mark zero character
1378 constants by setting original_type in c_expr.
1379 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1380 with a zero character constant.
1381 (char_type_p): New function.
1382
5dd9a9d0
DM
13832017-01-04 David Malcolm <dmalcolm@redhat.com>
1384
1385 * c-parser.c (c_parser_declaration_or_fndef): Create a
1386 rich_location at init_loc and parse it to start_init.
1387 (last_init_list_comma): New global.
1388 (c_parser_braced_init): Update last_init_list_comma when parsing
1389 commas. Pass it to pop_init_level. Pass location of closing
1390 brace to pop_init_level.
1391 (c_parser_postfix_expression_after_paren_type): Create a
1392 rich_location at type_loc and parse it to start_init.
1393 (c_parser_omp_declare_reduction): Likewise for loc.
1394 * c-tree.h (start_init): Add rich_location * param.
1395 (pop_init_level): Add location_t param.
1396 * c-typeck.c (struct initializer_stack): Add field
1397 "missing_brace_richloc".
1398 (start_init): Add richloc param, use it to initialize
1399 the stack node's missing_brace_richloc.
1400 (last_init_list_comma): New decl.
1401 (finish_implicit_inits): Pass last_init_list_comma to
1402 pop_init_level.
1403 (push_init_level): When finding missing open braces, add fix-it
1404 hints to the richloc.
1405 (pop_init_level): Add "insert_before" param and pass it
1406 when calling pop_init_level. Add fixits about missing
1407 close braces to any richloc. Use the richloc for the
1408 -Wmissing-braces warning.
1409 (set_designator): Pass last_init_list_comma to pop_init_level.
1410 (process_init_element): Likewise.
1411
cbe34bb5
JJ
14122017-01-01 Jakub Jelinek <jakub@redhat.com>
1413
1414 Update copyright years.
1415
d17680f3
JJ
14162016-12-21 Jakub Jelinek <jakub@redhat.com>
1417
0dba7960
JJ
1418 PR bootstrap/78817
1419 * c-typeck.c (build_function_call_vec): If check_function_arguments
1420 returns true, set TREE_NO_WARNING on CALL_EXPR.
1421
d17680f3
JJ
1422 PR c/77767
1423 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1424 to *expr instead of overwriting it.
1425
aa90531e
RB
14262016-12-20 Richard Biener <rguenther@suse.de>
1427
1428 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1429 error recovery.
1430 (c_parser_gimple_statement): Only build assigns for non-error
1431 stmts.
1432 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1433
629b3d75
MJ
14342016-12-14 Martin Jambor <mjambor@suse.cz>
1435
1436 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1437 omp-low.h.
1438 (c_finish_oacc_routine): Adjusted call to
1439 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1440 to use their new names.
1441 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1442 use its new name.
1443 (c_parser_oacc_update): Likewise.
1444 (c_parser_omp_simd): Likewise.
1445 (c_parser_omp_target_update): Likewise.
1446 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1447 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1448 name.
1449 (c_finish_omp_cancellation_point): Likewise.
1450 * gimple-parser.c: Do not include omp-low.h
1451
c5af52eb
CP
14522016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1453 James Norris <jnorris@codesourcery.com>
1454
1455 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1456 EXIT_DATA,WAIT} are not used in compound statements.
1457 (c_parser_oacc_enter_exit_data): Update diagnostics.
1458
48330c93
BE
14592016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1460
1461 PR c++/71973
1462 * c-decl.c (diagnose_mismatched_decls): Use
1463 OPT_Wbuiltin_declaration_mismatch here too.
1464
899ca90e 14652016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1466 Alan Hayward <alan.hayward@arm.com>
1467 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1468
1469 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1470 (make_label, finish_struct): Likewise.
1471
1ee62b92 14722016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1473 Richard Biener <rguenther@suse.de>
22b15758 1474
8e745a17
JJ
1475 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1476 * config-lang.in (gtfiles): Add c/c-parser.h.
1477 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1478 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1479 * c-parser.c (enum c_id_kind, struct c_token,
1480 c_parser_next_token_is, c_parser_next_token_is_not,
1481 c_parser_next_token_is_keyword,
1482 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1483 Split out to ...
1484 * c-parser.h: ... new header.
1485 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1486 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1487 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1488 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1489 c_parser_error, c_parser_require, c_parser_skip_until_found,
1490 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1491 c_parser_type_name): Export.
1492 (c_parser_tokens_buf): New function.
1493 (c_parser_error): Likewise.
1494 (c_parser_set_error): Likewise.
1495 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1496 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1497 via c_parser_parse_gimple_body.
8e745a17
JJ
1498 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1499 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1500 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1501 c_parser_error, c_parser_require, c_parser_skip_until_found,
1502 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1503 c_parser_type_name): Declare.
1ee62b92
PG
1504 (struct c_parser): Declare forward.
1505 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1506 (c_parser_error): Likewise.
1507 (c_parser_set_error): Likewise.
1508 * gimple-parser.c: New file.
1509 * gimple-parser.h: Likewise.
1ee62b92 1510
22b15758
UB
15112016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1512
1513 PR c/35503
1514 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1515 warn_for_restrict.
1516
84ff4775
LCW
15172016-09-11 Le-Chun Wu <lcwu@google.com>
1518 Mark Wielaard <mjw@redhat.com>
1519
1520 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1521 to the given -Wshadow= variant.
1522
4d0cdd0c
TP
15232016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1524
1525 * c-typeck.c: Include memmodel.h.
1526
1202f33e
JJ
15272016-10-13 Jakub Jelinek <jakub@redhat.com>
1528
1529 PR target/77957
1530 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1531 instead of lhd_return_null_tree_v.
1532
8a14afd0
BS
15332016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1534
1535 PR c++/69733
1536 * c-decl.c (smallest_type_quals_location): New static function.
1537 (grokdeclarator): Try to find the correct location for an ignored
1538 qualifier.
1539
81fea426
MP
15402016-09-26 Marek Polacek <polacek@redhat.com>
1541
1542 PR c/7652
1543 * c-decl.c (pop_scope): Add gcc_fallthrough.
1544
15452016-09-26 Marek Polacek <polacek@redhat.com>
1546
1547 PR c/7652
1548 * c-parser.c (struct c_token): Add flags field.
1549 (c_lex_one_token): Pass it to c_lex_with_flags.
1550 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1551 into IFN_FALLTHROUGH.
1552 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1553 attribute fallthrough after a case label or default label.
1554 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1555
9a2300e9
MP
15562016-09-24 Marek Polacek <polacek@redhat.com>
1557
1558 PR c/77490
1559 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1560 have boolean value. Warn about ++/-- on booleans.
1561
7de76362
JJ
15622016-09-23 Jakub Jelinek <jakub@redhat.com>
1563
1564 * c-parser.c (incomplete_record_decls): Remove unnecessary
1565 = vNULL initialization of file scope vec.
1566
5b73d2ab
MP
15672016-09-16 Marek Polacek <polacek@redhat.com>
1568
1569 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1570
e51fbec3
MP
15712016-09-14 Marek Polacek <polacek@redhat.com>
1572
1573 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1574 (fix_array_notation_expr): Likewise.
1575 * c-decl.c (finish_decl): Likewise.
1576 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1577 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1578 (function_to_pointer_conversion): Use false instead of 0.
1579 (convert_lvalue_to_rvalue): Likewise.
1580 (parser_build_unary_op): Likewise.
1581 (build_atomic_assign): Likewise.
1582 (build_unary_op): Change nonconvert parameter type to bool, use
1583 true/false instead of 1/0.
1584 (build_binary_op): Use true instead of 1.
1585
254830ba
DM
15862016-09-13 David Malcolm <dmalcolm@redhat.com>
1587
1588 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1589 of add_fixit_insert to add_fixit_insert_before.
1590
4c13ba17
MP
15912016-09-13 Marek Polacek <polacek@redhat.com>
1592
1593 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1594 it.
1595
54dcdb88
BE
15962016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1597
1598 PR c++/77496
1599 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1600 COMPOUND_EXPR to warn_for_omitted_condop.
1601
e5106e27
DM
16022016-09-07 David Malcolm <dmalcolm@redhat.com>
1603
1604 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1605 c_get_substring_location for this new langhook.
1606
9dc5773f
JJ
16072016-09-02 Jakub Jelinek <jakub@redhat.com>
1608
1609 PR c/65467
1610 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1611 flag_openmp.
1612 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1613 instead of mark_exp_read on low_bound/length expression.
1614 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1615 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1616 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1617 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1618 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1619 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1620 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1621 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1622 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1623 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1624 instead of mark_expr_read.
1625 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1626 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1627 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1628 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1629 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1630 array section bases outside of depend clause, for depend clause
1631 use convert_lvalue_to_rvalue on the base.
1632 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1633 linear, aligned, map, to and from clauses.
1634 (c_omp_clause_copy_ctor): New function.
1635
295844f6
MP
16362016-09-01 Marek Polacek <polacek@redhat.com>
1637
1638 PR c/7652
1639 * c-typeck.c (composite_type): Add FALLTHRU comment.
1640
089af25c
DM
16412016-08-31 David Malcolm <dmalcolm@redhat.com>
1642
1643 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1644 to the insertion fixits for "struct", "union", and "enum".
1645
f9087798
DM
16462016-08-30 David Malcolm <dmalcolm@redhat.com>
1647
1648 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1649 rather than add_fixit_misspelled_id.
1650 (undeclared_variable): Likewise.
1651 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1652 now-redundant "here" params from add_fixit_insert method calls.
1653 (c_parser_parameter_declaration): Likewise.
1654 * c-typeck.c (build_component_ref): Remove now-redundant range
1655 param from add_fixit_replace method calls.
1656
ebef225f
MP
16572016-08-25 Marek Polacek <polacek@redhat.com>
1658
1659 * c-typeck.c (parser_build_binary_op): Pass LHS to
1660 warn_logical_not_parentheses.
1661
fe377a48
MP
16622016-08-25 Marek Polacek <polacek@redhat.com>
1663
1664 PR c/77323
1665 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1666 or _FloatN or _FloatNx is not supported.
1667 (finish_declspecs): Set type to integer_type_node when _FloatN or
1668 _FloatNx is not supported.
1669
c65699ef
JM
16702016-08-19 Joseph Myers <joseph@codesourcery.com>
1671
1672 PR c/32187
1673 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1674 (struct c_declspecs): Add field floatn_nx_idx.
1675 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1676 and _FloatNx type specifiers.
1677 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1678 (c_parser_declspecs, c_parser_attribute_any_word)
1679 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1680 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1681 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1682 narrower than double.
1683
2f1364c2
JJ
16842016-08-12 Jakub Jelinek <jakub@redhat.com>
1685 Martin Liska <mliska@suse.cz>
1686
1687 PR c/67410
1688 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1689 % to determine val element to change. Assert that
1690 wchar_bytes * charwidth fits into val array.
1691
191816a3
MP
16922016-08-12 Marek Polacek <polacek@redhat.com>
1693
1694 PR c/7652
1695 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1696 (c_parser_postfix_expression): Likewise.
1697 * c-typeck.c (build_unary_op): Adjust fall through comment.
1698 (c_mark_addressable): Likewise.
1699
b95a64bb
JJ
17002016-08-11 Jakub Jelinek <jakub@redhat.com>
1701
1702 PR c/72816
1703 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1704 array member through typedef, for orig_qual_indirect == 0 clear
1705 orig_qual_type.
1706
895aa8e1
DM
17072016-08-08 David Malcolm <dmalcolm@redhat.com>
1708
1709 PR c/64955
1710 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1711 this up to selftest::run_c_tests.
1712 (selftest::run_c_tests): New function.
1713
0b212d8c
TS
17142016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1715
ae9281fc
TS
1716 * c-parser.c (struct oacc_routine_data): Add error_seen and
1717 fndecl_seen members.
1718 (c_finish_oacc_routine): Use these.
1719 (c_parser_declaration_or_fndef): Adjust.
1720 (c_parser_oacc_routine): Likewise. Support more C language
1721 constructs, and improve diagnostics. Move pragma context
1722 checking...
1723 (c_parser_pragma): ... here.
1724
0b212d8c
TS
1725 * c-parser.c (struct oacc_routine_data): New.
1726 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1727 Simplify code.
1728 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1729 declare target" attribute.
1730
76e2c821
JB
17312016-08-01 Jan Beulich <jbeulich@suse.com>
1732
1733 * c-fold.c (c_fully_fold_internal): Also emit shift count
1734 warnings for vector types.
1735 * c-typeck.c (build_binary_op): Likewise.
1736
f618a472
MP
17372016-07-29 Marek Polacek <polacek@redhat.com>
1738
1739 PR c/71742
1740 * c-decl.c (finish_struct): Rephrase an error message.
1741
efd0786f
MP
1742 PR c/71853
1743 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1744 to error node for invalid code.
1745
e00dceaf
MP
1746 PR c/71573
1747 * c-decl.c (implicitly_declare): Return decl early not only for
1748 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1749
673a107a
JJ
17502016-07-29 Jakub Jelinek <jakub@redhat.com>
1751
1752 PR c/71969
1753 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1754 on GNU extern inline functions.
1755
a5b5c8b6
MP
17562016-07-29 Marek Polacek <polacek@redhat.com>
1757
1758 PR c/71583
1759 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1760 check expr.value.
1761
e3fe09c1
UB
17622016-07-22 Uros Bizjak <ubizjak@gmail.com>
1763
1764 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1765
7c8f7eaa
DM
17662016-07-20 David Malcolm <dmalcolm@redhat.com>
1767
1768 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1769 spellcheck-tree.h
1770 (best_macro_match): Likewise, converting from a typedef to a
1771 subclass.
1772 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1773 (lookup_name_fuzzy): Update for change of best_macro_match to a
1774 subclass with a ctor that calls cpp_forall_identifiers.
1775
de6a69ee
DM
17762016-07-20 David Malcolm <dmalcolm@redhat.com>
1777
1778 * c-decl.c (implicit_decl_warning): Update for conversion of
1779 return type of lookup_name_fuzzy to const char *.
1780 (undeclared_variable): Likewise.
1781 (lookup_name_fuzzy): Convert return type from tree to
1782 const char *.
1783 * c-parser.c (c_parser_declaration_or_fndef): Update for
1784 conversion of return type of lookup_name_fuzzy to const char *.
1785 (c_parser_parameter_declaration): Likewise.
1786
b1c9c068
CP
17872016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1788
1789 * c-parser.c (c_parser_oacc_declare): Don't scan for
1790 GOMP_MAP_POINTER.
1791 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1792 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1793 zero-length subarrays.
1794
ddbbcb19
JJ
17952016-07-15 Jakub Jelinek <jakub@redhat.com>
1796
1797 PR c/71858
1798 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1799 instead of FUZZY_LOOKUP_NAME.
1800 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1801 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1802
dd36b877
JJ
18032016-07-14 Jakub Jelinek <jakub@redhat.com>
1804
1805 PR c/71858
1806 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1807
8c681247
TS
18082016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1809
1810 * c-parser.c (c_parser_generic_selection): Make type of variable
1811 auto_vec.
1812 (c_parser_omp_declare_simd): Likewise.
1813
bf4fa671
TS
18142016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1815
1816 * c-decl.c (struct c_struct_parse_info): Change member types
1817 from vec to auto_vec.
1818 (start_struct): Adjust.
1819 (finish_struct): Likewise.
1820
557e8c49
JJ
18212016-07-02 Jakub Jelinek <jakub@redhat.com>
1822
1823 PR c/71719
1824 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1825
54d19c3b
TS
18262016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1827
1828 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1829 Move pragma context checking into...
1830 (c_parser_omp_cancellation_point): ... here, and improve
1831 diagnostic messages.
1832 * c-typeck.c (c_finish_omp_cancel)
1833 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1834
152ef731
JJ
18352016-06-29 Jakub Jelinek <jakub@redhat.com>
1836
1837 PR c/71685
1838 * c-typeck.c (c_build_qualified_type): Don't clear
1839 C_TYPE_INCOMPLETE_VARS for the main variant.
1840
18412016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1842
1843 PR c/71552
1844 * c-typeck.c (output_init_element): Diagnose incompatible types
1845 before non-constant initializers.
1846
e9ac1f86
JJ
18472016-06-28 Jakub Jelinek <jakub@redhat.com>
1848
1849 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1850
277d7ee0
AK
18512016-06-23 Andi Kleen <ak@linux.intel.com>
1852
1853 * Make-lang.in: Add support for autofdo.
1854
1a4f11c8
DM
18552016-06-22 David Malcolm <dmalcolm@redhat.com>
1856
1857 PR c/70339
1858 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1859 (implicit_decl_warning): When issuing warnings for implicit
1860 declarations, attempt to provide a suggestion via
1861 lookup_name_fuzzy.
1862 (undeclared_variable): Likewise when issuing errors.
1863 (lookup_name_in_scope): Likewise.
1864 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1865 (best_macro_match): New typedef.
1866 (find_closest_macro_cpp_cb): New function.
1867 (lookup_name_fuzzy): New function.
1868 * c-parser.c: Include gcc-rich-location.h.
1869 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1870 (c_keyword_starts_typename): ...this new function.
1871 (c_parser_declaration_or_fndef): When issuing errors about
1872 missing "struct" etc, add a fixit. For other kinds of errors,
1873 attempt to provide a suggestion via lookup_name_fuzzy.
1874 (c_parser_parms_declarator): When looking ahead to detect typos in
1875 type names, also reject CPP_KEYWORD.
1876 (c_parser_parameter_declaration): When issuing errors about
1877 unknown type names, attempt to provide a suggestion via
1878 lookup_name_fuzzy.
1879 * c-tree.h (c_keyword_starts_typename): New prototype.
1880
5a578671
JM
18812016-06-20 Joseph Myers <joseph@codesourcery.com>
1882
1883 PR c/71601
1884 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1885 c_common_type returns error_mark_node.
1886
3f8257db 18872016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1888
1889 PR c/69507
1890 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1891 __alignof__ (expression).
1892
6a3f203c
DM
18932016-06-14 David Malcolm <dmalcolm@redhat.com>
1894
1895 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1896
264757fb
DM
18972016-06-14 David Malcolm <dmalcolm@redhat.com>
1898
1899 * c-typeck.c (build_component_ref): Simplify fixit code by
1900 using gcc_rich_location::add_fixit_misspelled_id.
1901 (set_init_label): Likewise.
1902
f7e4f2e3
DM
19032016-06-13 David Malcolm <dmalcolm@redhat.com>
1904
1905 * c-parser.c (c_parser_initelt): Provide location of name for new
1906 location_t param of set_init_label.
1907 * c-tree.h (set_init_label): Add location_t param.
1908 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1909 param and use it when issuing error messages about unrecognized
1910 field names. Attempt to provide a fixit hint if appropriate,
1911 otherwise update the error message to provide the type name.
1912
4b1ffdb1
TS
19132016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1914
1915 PR c/71381
1916 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1917 Loosen checking.
1918
44a845ca
MS
19192016-06-08 Martin Sebor <msebor@redhat.com>
1920 Jakub Jelinek <jakub@redhat.com>
1921
1922 PR c++/70507
1923 PR c/68120
1924 * c-typeck.c (convert_arguments): Don't promote last argument
1925 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1926
92a5f2ba
MP
19272016-06-08 Marek Polacek <polacek@redhat.com>
1928
1929 PR c/71418
1930 * c-decl.c (grokdeclarator): Check TYPE_P.
1931
08203f73
MP
1932 PR c/71426
1933 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1934 code.
1935
6ffd47b7
DM
19362016-06-07 David Malcolm <dmalcolm@redhat.com>
1937
1938 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1939 and structure element reference, capture the location of the
1940 element name token and pass it to build_component_ref.
1941 (c_parser_postfix_expression_after_primary): Likewise for
1942 structure element dereference.
1943 (c_parser_omp_variable_list): Likewise for
1944 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1945 * c-tree.h (build_component_ref): Add location_t param.
1946 * c-typeck.c (build_component_ref): Add location_t param
1947 COMPONENT_LOC. Use it, if available, when issuing hints about
1948 mispelled member names to provide a fixit replacement hint.
1949
1f40cff3
MP
19502016-06-06 Marek Polacek <polacek@redhat.com>
1951
1952 PR c/71362
1953 * c-parser.c (c_parser_direct_declarator): Set location.
1954
5545a907
MP
19552016-06-06 Marek Polacek <polacek@redhat.com>
1956
1957 * c-typeck.c (comptypes_internal): Handle comparisons of
1958 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1959 TYPE_REF_CAN_ALIAS_ALL.
1960
b605f663
CLT
19612016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1962
1963 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1964 arguments as addressable when async clause exists.
1965
00631022
JJ
19662016-05-30 Jakub Jelinek <jakub@redhat.com>
1967
1968 PR c++/71349
1969 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1970 when combined with target construct.
1971
7211a097
JJ
19722016-05-26 Jakub Jelinek <jakub@redhat.com>
1973
1974 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1975 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1976
95efe6b6
MP
19772016-05-25 Marek Polacek <polacek@redhat.com>
1978
1979 PR c/71265
1980 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1981
a23faf7a
MP
1982 PR c/71266
1983 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1984
e46c7770
CP
19852016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1986
1987 * c-parser.c (c_parser_oacc_declare): Add support for
1988 GOMP_MAP_FIRSTPRIVATE_POINTER.
1989 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1990 argument with enum c_omp_region_type ort.
1991 (handle_omp_array_sections): Likewise. Update call to
1992 handle_omp_array_sections_1.
1993 (c_finish_omp_clauses): Add specific errors and warning messages for
1994 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1995 call to handle_omp_array_sections.
1996
a04e69c0
TS
19972016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1998
1999 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2000
f17a223d
RB
20012016-05-24 Richard Biener <rguenther@suse.de>
2002
2003 PR middle-end/70434
2004 PR c/69504
2005 * c-typeck.c (build_array_ref): Do not complain about indexing
2006 non-lvalue vectors. Adjust for function name change.
2007
79063edd
MS
20082016-05-20 Martin Sebor <msebor@redhat.com>
2009
2010 PR c/71115
2011 * c-typeck.c (error_init): Use
2012 expansion_point_location_if_in_system_header.
2013 (warning_init): Same.
2014
8a40fef3
DM
20152016-05-19 David Malcolm <dmalcolm@redhat.com>
2016
2017 PR c/71171
2018 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2019 in error-handling.
2020 (c_parser_postfix_expression): Likewise.
2021 * c-tree.h (c_expr::set_error): New method.
2022 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2023 that result's range is initialized.
2024
e9892350
JG
20252016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2026
2027 * c-typeck.c (parser_build_unary_op): Fix formatting.
2028
8fad45f5
MW
20292016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2030
2031 * c-decl.c (grokdeclarator): Remove errmsg and use of
2032 targetm.invalid_return_type.
2033 (grokparms): Remove errmsg and use of
2034 targetm.invalid_parameter_type.
2035
aa4b467b
JM
20362016-05-13 Joseph Myers <joseph@codesourcery.com>
2037
2038 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2039 function return type.
2040
4f2e1536
MP
20412016-05-12 Marek Polacek <polacek@redhat.com>
2042
2043 PR c/70756
2044 * c-decl.c (build_compound_literal): Pass LOC down to
2045 c_incomplete_type_error.
2046 * c-tree.h (require_complete_type): Adjust declaration.
2047 (c_incomplete_type_error): Likewise.
2048 * c-typeck.c (require_complete_type): Add location parameter, pass it
2049 down to c_incomplete_type_error.
2050 (c_incomplete_type_error): Add location parameter, pass it down to
2051 error_at.
2052 (build_component_ref): Pass location down to c_incomplete_type_error.
2053 (default_conversion): Pass location down to require_complete_type.
2054 (build_array_ref): Likewise.
2055 (build_function_call_vec): Likewise.
2056 (convert_arguments): Likewise.
2057 (build_unary_op): Likewise.
2058 (build_c_cast): Likewise.
2059 (build_modify_expr): Likewise.
2060 (convert_for_assignment): Likewise.
2061 (c_finish_omp_clauses): Likewise.
2062
d6e83a8d
MM
20632016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2064
2065 PR c/43651
2066 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2067 is enabled.
2068 * c-errors.c (pedwarn_c90): Return true if warned.
2069 * c-tree.h (pedwarn_c90): Change return type to bool.
2070 (enum c_declspec_word): Add new enumerator cdw_atomic.
2071
5c3a10fb
MP
20722016-05-11 Marek Polacek <polacek@redhat.com>
2073
2074 PR c++/71024
2075 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2076 diagnose_mismatched_attributes and call it.
2077
cf68d92c
MP
20782016-05-10 Marek Polacek <polacek@redhat.com>
2079
2080 PR c/70255
2081 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2082 on a declaration following the definition.
2083
351f85c5
JJ
20842016-05-05 Jakub Jelinek <jakub@redhat.com>
2085
2086 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2087 parse it through to c_parser_c99_block_statement.
2088 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2089 caller.
2090
deef7113
MP
20912016-05-04 Marek Polacek <polacek@redhat.com>
2092
2093 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2094 OPT_Wdangling_else.
2095
de55efd5
MP
20962016-05-04 Marek Polacek <polacek@redhat.com>
2097
2098 PR c/48778
2099 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2100 for macro expansions.
2101
79ce98bc
MP
21022016-05-03 Marek Polacek <polacek@redhat.com>
2103
2104 PR c/70859
2105 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2106 check_builtin_function_arguments.
2107
fb2647aa
RB
21082016-05-03 Richard Biener <rguenther@suse.de>
2109
2110 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2111 the checksum from the previous stage.
2112
77886428
CP
21132016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2114
2115 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2116 c_finish_omp_clauses.
2117 (c_parser_omp_all_clauses): Likewise.
2118 (c_parser_oacc_cache): Likewise.
2119 (c_parser_oacc_loop): Likewise.
2120 (omp_split_clauses): Likewise.
2121 (c_parser_omp_declare_target): Likewise.
2122 (c_parser_cilk_all_clauses): Likewise.
2123 (c_parser_cilk_for): Likewise.
2124 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2125 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2126
7176a4a0
MP
21272016-05-02 Marek Polacek <polacek@redhat.com>
2128
2129 PR c/70851
2130 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2131 incomplete type.
2132
e7ff0319
CP
21332016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2134
2135 PR middle-end/70626
2136 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2137 OACC_LOOP_CLAUSE_MASK.
2138 (c_parser_oacc_kernels_parallel): Update call to
2139 c_oacc_split_loop_clauses.
2140
9f405ce1
AM
21412016-04-28 Andrew MacLeod <amacleod@redhat.com>
2142
2143 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2144 argument to build_modify_expr in two cases.
2145
c1e1f433
BS
21462016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2147
2148 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2149 warn_for_memset instead of warning directly here.
2150
2448a956
MP
21512016-04-26 Marek Polacek <polacek@redhat.com>
2152
2153 PR c/67784
2154 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2155 out of ...
2156 (c_parser_for_statement): ... here.
2157 (c_parser_if_statement): Use it.
2158 (c_parser_switch_statement): Use it.
2159 (c_parser_while_statement): Use it.
2160
b02a5e26
MP
2161 PR c/70791
2162 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2163
477d4906
IV
21642016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2165
2166 PR c++/69363
2167 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2168 instead of c_finish_cilk_clauses.
2169 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2170 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2171 floating-point variables in the linear clause for Cilk Plus.
2172
fe37c7af
MM
21732016-04-18 Michael Matz <matz@suse.de>
2174
2175 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2176 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2177
949505a9
MP
21782016-04-15 Marek Polacek <polacek@redhat.com>
2179
2180 PR c/70671
2181 * c-typeck.c (build_unary_op): Pass location down to error and
2182 warning call.
2183
dda1bf61
JJ
21842016-04-15 Jakub Jelinek <jakub@redhat.com>
2185
2186 PR c/70436
2187 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2188 where needed.
2189 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2190 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2191 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2192 Adjust c_parser_pragma callers.
2193 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2194 caller.
2195 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2196 c_parser_statement.
2197 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2198 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2199 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2200 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2201 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2202 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2203 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2204 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2205 down where needed.
2206 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2207 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2208 calls.
2209
99cd9857
MP
22102016-04-13 Marek Polacek <polacek@redhat.com>
2211
2212 PR c/70436
2213 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2214 adjust callers.
2215 (c_parser_statement): Likewise.
2216 (c_parser_c99_block_statement): Likewise.
2217 (c_parser_while_statement): Likewise.
2218 (c_parser_for_statement): Likewise.
2219 (c_parser_if_body): Don't set IF_P here.
2220 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2221 about dangling else here.
2222 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2223 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2224 warn about dangling else here.
2225
f13355da
MP
22262016-04-04 Marek Polacek <polacek@redhat.com>
2227
2228 PR c/70307
2229 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2230
5fde6a45
MP
22312016-03-31 Marek Polacek <polacek@redhat.com>
2232
2233 PR c/70297
2234 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2235
4bbf545b
DM
22362016-03-18 David Malcolm <dmalcolm@redhat.com>
2237
2238 PR c/70281
2239 * c-parser.c (c_parser_postfix_expression): Set the source range
2240 for uses of "__builtin_types_compatible_p".
2241
fcc2b74f
JJ
22422016-03-17 Jakub Jelinek <jakub@redhat.com>
2243
2244 PR c/70280
2245 * c-typeck.c (composite_type): Don't count void_list_node
2246 into len, if the list is terminated by void_list_node, start
2247 with void_list_node instead of NULL for newargs. Stop
2248 at void_list_node.
2249
ab4c578f
MP
22502016-03-16 Marek Polacek <polacek@redhat.com>
2251
2252 PR c/70093
2253 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2254 nested functions returning VM types.
2255
96b3c82d
CP
22562016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2257
2258 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2259 when calling c_finish_omp_clauses.
2260
29b9828f
BS
22612016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2262
2263 PR c/69824
2264 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2265 for later.
2266
7ff6ca38
MP
22672016-03-04 Marek Polacek <polacek@redhat.com>
2268
2269 PR c/69798
2270 * c-parser.c (c_parser_postfix_expression): Call
2271 c_parser_cast_expression rather than c_parser_postfix_expression.
2272
686e2237
JJ
22732016-03-01 Jakub Jelinek <jakub@redhat.com>
2274
2275 PR c/69796
2276 PR c/69974
2277 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2278 of incomplete decls to error_mark_node.
2279
0b05329b
MP
22802016-02-24 Marek Polacek <polacek@redhat.com>
2281
2282 PR c/69819
2283 * c-decl.c (finish_decl): Don't update the copy of the type of a
2284 different decl type.
2285
067fbd8b
JJ
22862016-02-23 Jakub Jelinek <jakub@redhat.com>
2287
2288 PR objc/69844
2289 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2290 in id_kind reclassification.
2291
bf14eba2
JJ
22922016-02-16 Jakub Jelinek <jakub@redhat.com>
2293
2294 PR c/69835
2295 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2296
ba539195
JN
22972016-02-16 James Norris <jnorris@codesourcery.com>
2298
2299 PR c/64748
2300 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2301
16595a1f
BS
23022016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2303
f48dfe98
BS
2304 * c-decl.c (build_null_declspecs): Zero the entire struct.
2305
16595a1f
BS
2306 PR c/69522
2307 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2308 callers changed. If nested_p is true, use it to call
2309 finish_implicit_inits.
2310 * c-tree.h (finish_implicit_inits): Declare.
2311 * c-typeck.c (finish_implicit_inits): New function. Move code
2312 from ...
2313 (push_init_level): ... here.
2314 (set_designator, process_init_element): Call finish_implicit_inits.
2315
66756373
JJ
23162016-02-11 Jakub Jelinek <jakub@redhat.com>
2317
2318 PR c/69768
2319 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2320 arguments for -Waddress warning.
2321
1066e9b5
JJ
23222016-02-04 Jakub Jelinek <jakub@redhat.com>
2323
2324 PR c/69669
2325 * c-decl.c (finish_enum): When honoring mode attribute,
2326 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2327
3a5d2ba4
JJ
23282016-01-29 Jakub Jelinek <jakub@redhat.com>
2329
2330 PR debug/69518
2331 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2332 all type variants, not just TYPE_MAIN_VARIANT.
2333
cbdd8ae0
JJ
23342016-01-27 Jakub Jelinek <jakub@redhat.com>
2335
2336 PR debug/66869
2337 * c-decl.c (c_write_global_declarations_1): Warn with
2338 warn_unused_function if static prototype without definition
2339 is not C_DECL_USED.
2340
fa74a4bc
MP
23412016-01-27 Marek Polacek <polacek@redhat.com>
2342
2343 PR c/68062
2344 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2345 to unsigned, if needed. Add -Wsign-compare warning.
2346
13f92e8d
JJ
23472016-01-26 Jakub Jelinek <jakub@redhat.com>
2348
2349 PR tree-optimization/69483
2350 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2351
cd8e73dc 23522016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2353
2354 PR c/24293
2355 * c-tree.h (incomplete_record_decls): Declare.
2356 * c-parser.c (incomplete_record_decls): Define.
2357 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2358 report error if any decl has zero size.
2359 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2360 or enum type to incomplete_record_decls.
2361
e6d6ec9e
TV
23622016-01-14 Tom de Vries <tom@codesourcery.com>
2363
2364 PR tree-optimization/68773
2365 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2366 set force_output.
2367
00083992
MP
23682016-01-14 Marek Polacek <polacek@redhat.com>
2369
2370 PR c/69262
2371 * c-decl.c (grokdeclarator): Provide more information for invalid
2372 array declarations.
2373
7443cf13
DM
23742016-01-06 David Malcolm <dmalcolm@redhat.com>
2375
2376 * c-parser.c (c_parser_unary_expression): For dereferences, build
2377 a combined location before calling build_indirect_ref, so that
2378 error reports cover the full range, manually updating the c_expr
2379 src_range.
2380
6b131d5b
MP
23812016-01-06 Marek Polacek <polacek@redhat.com>
2382
2383 PR sanitizer/69099
2384 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2385 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2386 NULL.
2387
818ab71a
JJ
23882016-01-04 Jakub Jelinek <jakub@redhat.com>
2389
2390 Update copyright years.
2391
2fe0a208
MP
23922016-01-04 Marek Polacek <polacek@redhat.com>
2393
2394 PR c/68908
2395 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2396 optimization to use __atomic_fetch_* built-in if possible.
2397
c7b48c8a
TS
23982015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2399
2400 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2401 into...
2402 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2403 all users.
2404
fda5652f
MP
24052015-12-22 Marek Polacek <polacek@redhat.com>
2406
2407 PR c/69002
2408 * c-typeck.c (build_component_ref): Warn when acessing elements of
2409 atomic structures or unions.
2410
745e411d
DM
24112015-12-21 David Malcolm <dmalcolm@redhat.com>
2412
2413 * c-typeck.c: Include "gcc-rich-location.h".
2414 (build_binary_op): In the two places that call binary_op_error,
2415 create a gcc_rich_location and populate it with the location of
2416 the binary op and its two operands.
2417
94c40e19
DM
24182015-12-16 David Malcolm <dmalcolm@redhat.com>
2419
2420 * c-parser.c (c_parser_statement_after_labels): When calling
2421 c_finish_return, Use the return expression's location if it has
2422 one, falling back to the location of the first token within it.
2423 * c-typeck.c (c_finish_return): When issuing warnings about
2424 the incorrect presence/absence of a return value, issue a note
2425 showing the declaration of the function.
2426
de67c4c3
DM
24272015-12-16 David Malcolm <dmalcolm@redhat.com>
2428
2429 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2430 to 4.
2431 (c_parser_peek_nth_token): New function.
2432 (c_parser_peek_conflict_marker): New function.
2433 (c_parser_error): Detect conflict markers and report them as such.
2434
a10704e1
DM
24352015-12-16 David Malcolm <dmalcolm@redhat.com>
2436
2437 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2438 to preserve range information for the primary expression
2439 in the call to c_parser_postfix_expression_after_primary.
2440
8062bca6
DM
24412015-12-16 David Malcolm <dmalcolm@redhat.com>
2442
2443 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2444 expression location, falling back on the first token location,
2445 rather than always using the latter.
2446
d06f8b75
MP
24472015-12-16 Marek Polacek <polacek@redhat.com>
2448
2449 PR c/64637
2450 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2451 available.
2452
2994fb91
MP
24532015-12-15 Marek Polacek <polacek@redhat.com>
2454
2455 PR c/68907
2456 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2457 artificial decl.
2458
a1b93f8d
DM
24592015-12-08 David Malcolm <dmalcolm@redhat.com>
2460
2461 * c-parser.c (c_parser_alignof_expression): Capture location of
2462 closing parenthesis (if any), or of end of unary expression, and
2463 use it to build a src_range for the expression.
2464
46c6e1e2
DM
24652015-12-08 David Malcolm <dmalcolm@redhat.com>
2466
2467 PR c/68757
2468 * c-parser.c (c_parser_get_builtin_args): Add
2469 "out_close_paren_loc" param, and write back to it.
2470 (c_parser_postfix_expression): Capture the closing
2471 parenthesis location for RID_CHOOSE_EXPR,
2472 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2473 RID_BUILTIN_SHUFFLE and use it to set the source range
2474 for such expressions; within RID_BUILTIN_COMPLEX set
2475 the underlying location.
2476
66189108
MP
24772015-12-07 Marek Polacek <polacek@redhat.com>
2478
2479 PR c/68668
2480 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2481 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2482
f187980b
EB
24832015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2484
2485 * c-tree.h (c_build_va_arg): Adjust prototype.
2486 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2487 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2488 parameter, adjust throughout and issue an error if EXPR is a component
2489 with reverse storage order.
2490
4250754e
JM
24912015-12-02 Jason Merrill <jason@redhat.com>
2492
2493 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2494 (c_fully_fold_internal, decl_constant_value_for_optimization):
2495 Move from c-common.c.
2496 * c-tree.h: Declare decl_constant_value_for_optimization.
2497 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2498
e9e32ee6
JM
24992015-12-02 Joseph Myers <joseph@codesourcery.com>
2500
2501 PR c/68162
2502 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2503 following link from declarator to next declarator. Track original
2504 qualified type and pass it to c_build_qualified_type.
2505 * c-typeck.c (c_build_qualified_type): Add arguments
2506 orig_qual_type and orig_qual_indirect.
2507
ff7a55bf
TS
25082015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2509
2510 * c-parser.c (c_parser_omp_clause_name)
2511 (c_parser_oacc_all_clauses): Alphabetical sorting.
2512
657e4e47
JJ
25132015-12-02 Jakub Jelinek <jakub@redhat.com>
2514
2515 PR c/68533
2516 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2517 for diagnostics.
2518
37d5ad46
JB
25192015-12-01 Julian Brown <julian@codesourcery.com>
2520 Cesar Philippidis <cesar@codesourcery.com>
2521 James Norris <James_Norris@mentor.com>
2522
2523 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2524 (c_parser_oacc_clause_use_device): New function.
2525 (c_parser_oacc_all_clauses): Add use_device support.
2526 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2527 (c_parser_oacc_host_data): New function.
2528 (c_parser_omp_construct): Add host_data support.
2529 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2530 * c-typeck.c (c_finish_oacc_host_data): New function.
2531 (c_finish_omp_clauses): Add use_device support.
2532
a4850ce9
JH
25332015-11-29 Jan Hubicka <hubicka@ucw.cz>
2534
2535 PR c/67106
2536 * c-decl.c: Set TYPE_PACKED in variants.
2537
b58d3df2
ML
25382015-11-27 Martin Liska <mliska@suse.cz>
2539
2540 PR c++/68312
2541 * c-array-notation.c (fix_builtin_array_notation_fn):
2542 Use release_vec_vec instead of vec::release.
2543 (build_array_notation_expr): Likewise.
2544 (fix_conditional_array_notations_1): Likewise.
2545 (fix_array_notation_expr): Likewise.
2546 (fix_array_notation_call_expr): Likewise.
2547
aec17bfe
JJ
25482015-11-27 Jakub Jelinek <jakub@redhat.com>
2549
2550 PR c/63326
2551 * c-parser.c (c_parser_compound_statement_nostart): If
2552 last_label is true, use pragma_stmt instead of pragma_compound
2553 as second c_parser_pragma argument.
2554 (c_parser_omp_ordered, c_parser_omp_target_update,
2555 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2556 false as second argument to c_parser_skip_to_pragma_eol after
2557 diagnosing standalone directives used in pragma_stmt context.
2558
688c4de0
IV
25592015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2560
2561 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2562 with "if (ENABLE_OFFLOADING)".
2563
cbd03aee
DM
25642015-11-23 David Malcolm <dmalcolm@redhat.com>
2565
2566 PR objc/68438
2567 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2568 for various Objective-C constructs: Class.name syntax,
2569 @selector(), @protocol(), @encode(), and [] message syntax.
2570
a87a86e1
DM
25712015-11-20 David Malcolm <dmalcolm@redhat.com>
2572
2573 PR 62314
2574 * c-typeck.c (should_suggest_deref_p): New function.
2575 (build_component_ref): Special-case POINTER_TYPE when
2576 generating a "not a structure of union" error message, and
2577 suggest a "->" rather than a ".", providing a fix-it hint.
2578
8ece8dfb
DM
25792015-11-19 David Malcolm <dmalcolm@redhat.com>
2580
2581 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2582 candidate into a new function, find_closest_identifier.
2583
433068cc
MP
25842015-11-19 Marek Polacek <polacek@redhat.com>
2585
2586 PR c/68412
2587 * c-typeck.c (parser_build_binary_op): Properly handle
2588 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2589
bef08b71
DM
25902015-11-17 David Malcolm <dmalcolm@redhat.com>
2591
2592 * c-parser.c (set_c_expr_source_range): Bulletproof both
2593 overloaded implementations against NULL expr->value.
2594 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2595 values.
2596 (c_parser_unary_expression): Likewise when handling addresses of
2597 labels.
2598 (c_parser_postfix_expression): Likewise for statement expressions,
2599 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2600 __builtin_va_arg, and for __builtin_offset_of.
2601 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2602 src_range using the range of the braced initializer.
2603 (c_parser_transaction_expression): Set src_range for "ret" to a
2604 sane pair of values.
2605
fff77217
KY
26062015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2607
2608 * c-parser.c (c_finish_omp_declare_simd): Look for
2609 "simd" attribute as well. Update error message.
2610
1d899da2
TS
26112015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2612
2613 * c-parser.c (c_parser_omp_declare_target): Adjust.
2614
e4606348
JJ
26152015-11-14 Jakub Jelinek <jakub@redhat.com>
2616
2617 * c-typeck.c (c_finish_omp_clauses): Don't mark
2618 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2619
3e636daf
MP
26202015-11-14 Marek Polacek <polacek@redhat.com>
2621
2622 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2623 * c-typeck.c: Likewise.
2624
ebedc9a3
DM
26252015-11-13 David Malcolm <dmalcolm@redhat.com>
2626
2627 * c-decl.c (warn_defaults_to): Pass line_table to
2628 rich_location ctor.
2629 * c-errors.c (pedwarn_c99): Likewise.
2630 (pedwarn_c90): Likewise.
2631 * c-parser.c (set_c_expr_source_range): New functions.
2632 (c_token::get_range): New method.
2633 (c_token::get_finish): New method.
2634 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2635 based on the range from the start of the LHS to the end of the
2636 RHS.
2637 (c_parser_conditional_expression): Likewise, based on the range
2638 from the start of the cond.value to the end of exp2.value.
2639 (c_parser_binary_expression): Call set_c_expr_source_range on
2640 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2641 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2642 based on the cast_loc through to the end of the expr.
2643 (c_parser_unary_expression): Likewise, based on the
2644 op_loc through to the end of op.
2645 (c_parser_sizeof_expression) Likewise, based on the start of the
2646 sizeof token through to either the closing paren or the end of
2647 expr.
2648 (c_parser_postfix_expression): Likewise, using the token range,
2649 or from the open paren through to the close paren for
2650 parenthesized expressions.
2651 (c_parser_postfix_expression_after_primary): Likewise, for
2652 various kinds of expression.
2653 * c-tree.h (struct c_expr): Add field "src_range".
2654 (c_expr::get_start): New method.
2655 (c_expr::get_finish): New method.
2656 (set_c_expr_source_range): New decls.
2657 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2658 on ret for prefix unary ops.
2659 (parser_build_binary_op): Likewise, running from the start of
2660 arg1.value through to the end of arg2.value.
2661
ec8b536f
MP
26622015-11-13 Marek Polacek <polacek@redhat.com>
2663
2664 PR c/68320
2665 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2666
277fe616
DM
26672015-11-13 David Malcolm <dmalcolm@redhat.com>
2668
2669 * c-typeck.c: Include spellcheck.h.
2670 (lookup_field_fuzzy_find_candidates): New function.
2671 (lookup_field_fuzzy): New function.
2672 (build_component_ref): If the field was not found, try using
2673 lookup_field_fuzzy and potentially offer a suggestion.
2674
6e232ba4
JN
26752015-11-12 James Norris <jnorris@codesourcery.com>
2676 Joseph Myers <joseph@codesourcery.com>
2677
2678 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2679 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2680 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2681 and PRAGMA_OMP_CLAUSE_LINK.
2682 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2683 and PRAGMA_OACC_CLAUSE_LINK.
2684 (OACC_DECLARE_CLAUSE_MASK): New definition.
2685 (c_parser_oacc_declare): New function.
2686
9be4f715
MP
26872015-11-12 Marek Polacek <polacek@redhat.com>
2688
2689 PR c/67784
2690 * c-parser.c (c_parser_for_statement): Reclassify the token in
2691 a correct scope.
2692
e78bede6
MP
26932015-11-11 Marek Polacek <polacek@redhat.com>
2694
2695 PR c/68107
2696 PR c++/68266
2697 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2698 checking the size of an array.
2699
69f293c9
AM
27002015-11-11 Andrew MacLeod <amacleod@redhat.com>
2701
2702 * c-array-notation.c: Remove unused header files.
2703 * c-aux-info.c: Likewise.
2704 * c-convert.c: Likewise.
2705 * c-decl.c: Likewise.
2706 * c-errors.c: Likewise.
2707 * c-lang.c: Likewise.
2708 * c-objc-common.c: Likewise.
2709 * c-parser.c: Likewise.
2710 * c-typeck.c: Likewise.
2711 * gccspec.c: Likewise.
2712
3a40d81d
NS
27132015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2714 Cesar Philippidis <cesar@codesourcery.com>
2715 James Norris <jnorris@codesourcery.com>
2716 Julian Brown <julian@codesourcery.com>
2717 Nathan Sidwell <nathan@codesourcery.com>
2718
2719 c/
2720 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2721 routine arg.
2722 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2723 (c_parser_pragma): Parse 'acc routine'.
2724 (OACC_ROUTINE_CLAUSE_MARK): Define.
2725 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2726
fc402eec
AA
27272015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2728
2729 PR debug/67192
2730 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2731 location of the backward-goto to the start of the loop body.
2732
f6b0b3db
AA
27332015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2734
2735 PR debug/67192
2736 * c-parser.c (c_parser_while_statement): Finish the loop before
2737 parsing ahead for misleading indentation.
2738 (c_parser_for_statement): Likewise.
2739
ee45a32d
EB
27402015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2741
2742 * c-decl.c (finish_struct): If the structure has reverse storage
2743 order, rewrite the type of array fields with scalar component. Call
2744 maybe_apply_pragma_scalar_storage_order on entry.
2745 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2746 errors on bit-fields and reverse SSO here and not...
2747 (c_mark_addressable): ...here.
2748 (output_init_element): Adjust call to initializer_constant_valid_p.
2749 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2750
8a645150
DM
27512015-11-06 David Malcolm <dmalcolm@redhat.com>
2752
2753 * c-decl.c (warn_defaults_to): Update for change in signature
2754 of diagnostic_set_info.
2755 * c-errors.c (pedwarn_c99): Likewise.
2756 (pedwarn_c90): Likewise.
2757 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2758 for textinfo::set_location.
2759
7a5e4956
CP
27602015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2761 Thomas Schwinge <thomas@codesourcery.com>
2762 James Norris <jnorris@codesourcery.com>
2763
2764 * c-parser.c (c_parser_omp_clause_name): Add support for
2765 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2766 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2767 default(none) in OpenACC.
2768 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2769 arguments.
2770 (c_parser_oacc_clause_tile): New function.
2771 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2772 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2773 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2774 TILE}.
2775 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2776 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2777 FIRSTPRIVATE}.
2778 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2779 (c_parser_oacc_update): Update the error message for missing clauses.
2780 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2781 and OMP_CLAUSE_INDEPENDENT.
2782
bfcfbfa0
MP
27832015-11-05 Marek Polacek <polacek@redhat.com>
2784
2785 PR c/68090
2786 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2787 deal with pre-evaluation on invalid types.
2788
e01d41e5
JJ
27892015-11-05 Jakub Jelinek <jakub@redhat.com>
2790 Ilya Verbin <ilya.verbin@intel.com>
2791
2792 * c-parser.c: Include context.h and gimple-expr.h.
2793 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2794 monotonic together with nonmonotonic.
2795 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2796 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2797 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2798 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2799 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2800 expressions on combined target teams before the target.
2801 (c_parser_omp_declare_target): If decl has "omp declare target" or
2802 "omp declare target link" attribute, and cgraph or varpool node already
2803 exists, then set corresponding flags. Call c_finish_omp_clauses
2804 in the parenthesized extended-list syntax case.
2805 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2806 declare target.
2807 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2808 on OMP_CLAUSE_REDUCTION array sections.
2809 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2810 into the constant offset, or for variable low-bound using
2811 POINTER_PLUS_EXPR. For structure element based array sections use
2812 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2813 (c_finish_omp_clauses): Drop generic_field_head, structure
2814 elements are now always mapped even as array section bases,
2815 diagnose same var in data sharing and mapping clauses. Diagnose if
2816 linear step on declare simd is neither a constant nor a uniform
2817 parameter. Look through POINTER_PLUS_EXPR for array section
2818 reductions. Diagnose the same var or function appearing multiple
2819 times on the same directive. Fix up wording for the to clause if t
2820 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2821 modifier on kinds other than dynamic or guided or nonmonotonic
2822 modifier together with ordered clause.
2823
4bf9e5a8
TS
28242015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2825 Chung-Lin Tang <cltang@codesourcery.com>
2826
2827 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2828
2adfab87
AM
28292015-10-29 Andrew MacLeod <amacleod@redhat.com>
2830
2831 * c-array-notation.c: Reorder #include's and remove duplicates.
2832 * c-aux-info.c: Likewise.
2833 * c-convert.c: Likewise.
2834 * c-decl.c: Likewise.
2835 * c-errors.c: Likewise.
2836 * c-lang.c: Likewise.
2837 * c-objc-common.c: Likewise.
2838 * c-parser.c: Likewise.
2839 * c-typeck.c: Likewise.
2840
e922069e
JW
28412015-10-26 Jim Wilson <jim.wilson@linaro.org>
2842
2843 PR debug/66068
2844 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2845 after calling build_qualified_type.
2846
765dd391
CP
28472015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2848 Thomas Schwinge <thomas@codesourcery.com>
2849 James Norris <jnorris@codesourcery.com>
2850 Joseph Myers <joseph@codesourcery.com>
2851 Julian Brown <julian@codesourcery.com>
2852 Bernd Schmidt <bschmidt@redhat.com>
2853
2854 * c-parser.c (c_parser_oacc_shape_clause): New.
2855 (c_parser_oacc_simple_clause): New.
2856 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2857 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2858
88bae6f4
TS
28592015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2860 James Norris <jnorris@codesourcery.com>
2861 Cesar Philippidis <cesar@codesourcery.com>
2862
2863 PR c/64765
2864 PR c/64880
2865 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2866 parameters, and handle these. Adjust all users.
2867 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2868 into...
2869 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2870 all users.
2871 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2872 declare functions.
2873 (c_finish_omp_construct): Declare function.
2874 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2875 Merge functions into...
2876 (c_finish_omp_construct): ... this new function.
2877
a8fc2579
RB
28782015-10-22 Richard Biener <rguenther@suse.de>
2879
2880 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2881 before folding a MINUS_EXPR.
2882
e9122ef6
MP
28832015-10-21 Marek Polacek <polacek@redhat.com>
2884
2885 PR c/68024
2886 * c-decl.c (start_function): Warn about vararg functions without
2887 a prototype.
2888
9f47c7e5
IE
28892015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2890
2891 * c-typeck.c (build_conditional_expr): Use boolean vector
2892 type for vector comparison.
2893 (build_vec_cmp): New.
2894 (build_binary_op): Use build_vec_cmp for comparison.
2895
fa60eeb9
MP
28962015-10-20 Marek Polacek <polacek@redhat.com>
2897
2898 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2899
2c7020eb
MP
29002015-10-20 Marek Polacek <polacek@redhat.com>
2901
2902 PR c/67964
2903 * c-parser.c (c_parser_attributes): Break out of the loop if the
2904 token after an attribute isn't a comma.
2905
d9a6bd32
JJ
29062015-10-13 Jakub Jelinek <jakub@redhat.com>
2907 Aldy Hernandez <aldyh@redhat.com>
2908
2909 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2910 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2911 (c_parser_omp_variable_list): Handle structure elements for
2912 map, to and from clauses. Handle array sections in reduction
2913 clause. Formatting fixes.
2914 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2915 if clause modifiers.
2916 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2917 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2918 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2919 c_parser_omp_clause_is_device_ptr): New functions.
2920 (c_parser_omp_clause_ordered): Parse optional parameter.
2921 (c_parser_omp_clause_reduction): Handle array reductions.
2922 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2923 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2924 functions.
2925 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2926 (c_parser_omp_clause_depend_sink): New function.
2927 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2928 (c_parser_omp_clause_map): Parse release/delete map kinds and
2929 optional always modifier.
2930 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2931 and c_finish_omp_clauses callers.
2932 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2933 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2934 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2935 (OMP_CRITICAL_CLAUSE_MASK): Define.
2936 (c_parser_omp_critical): Parse critical clauses.
2937 (c_parser_omp_for_loop): Handle doacross loops, adjust
2938 c_finish_omp_for and c_finish_omp_clauses callers.
2939 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2940 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2941 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2942 (c_parser_omp_for): Disallow ordered clause when combined with
2943 distribute. Disallow linear clause when combined with distribute
2944 and not combined with simd.
2945 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2946 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2947 parse clauses and if depend clause is found, don't parse a body.
2948 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2949 Allow target parallel without for after it.
2950 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2951 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2952 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2953 invalid kinds.
2954 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2955 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2956 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2957 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2958 functions.
2959 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2960 defaultmap and is_device_ptr clauses.
2961 (c_parser_omp_target): Parse target parallel and target simd. Set
2962 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2963 and target exit data. Diagnose invalid map kinds.
2964 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2965 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2966 construct.
2967 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2968 &omp_priv.
2969 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2970 (c_parser_omp_taskloop): New function.
2971 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2972 handle PRAGMA_OMP_TASKLOOP.
2973 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2974 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2975 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2976 Add IS_OMP argument, handle structure element bases, diagnose
2977 bitfields, pass IS_OMP recursively, diagnose known zero length
2978 array sections in depend clauses, handle array sections in reduction
2979 clause, diagnose negative length even for pointers.
2980 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2981 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2982 array sections in reduction clause, set
2983 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2984 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2985 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2986 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2987
21ba0cea
MP
29882015-10-06 Marek Polacek <polacek@redhat.com>
2989
2990 * c-parser.c (c_parser_statement_after_labels): Use
2991 protected_set_expr_location.
2992 (c_parser_omp_clause_num_gangs): Likewise.
2993 (c_parser_omp_clause_num_threads): Likewise.
2994 (c_parser_omp_clause_num_workers): Likewise.
2995 (c_parser_omp_clause_vector_length): Likewise.
2996 (c_parser_omp_clause_num_teams): Likewise.
2997 (c_parser_omp_clause_thread_limit): Likewise.
2998 * c-typeck.c (build_c_cast): Likewise.
2999 (c_cast_expr): Likewise.
3000
624d31fe
RS
30012015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3002
3003 * c-typeck.c (c_tree_equal): Use real_equal instead of
3004 REAL_VALUES_EQUAL.
3005
b8fd7909
JM
30062015-10-04 Jason Merrill <jason@redhat.com>
3007
3008 * c-parser.c (c_lex_one_token): Handle @synchronized.
3009 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3010 can change whether the function is transaction_safe.
3011
1c7485af
MP
30122015-10-02 Marek Polacek <polacek@redhat.com>
3013
3014 PR c/67730
3015 * c-typeck.c (convert_for_assignment): Use the expansion point
3016 location throughout.
3017
3e3b8d63
MP
30182015-10-02 Marek Polacek <polacek@redhat.com>
3019
3020 PR c/64249
3021 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3022 and pass it down to c_parser_if_statement.
3023 (c_parser_else_body): Add CHAIN parameter and pass it down to
3024 c_parser_statement_after_labels.
3025 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3026 duplicated if-else-if conditions.
3027
aabef2de
MP
30282015-10-01 Marek Polacek <polacek@redhat.com>
3029
3030 * c-typeck.c (convert_for_assignment): Improve commentary.
3031
de8ddd5f
MP
30322015-09-30 Marek Polacek <polacek@redhat.com>
3033
3034 PR c/67730
3035 * c-typeck.c (c_finish_return): Use the expansion point location for
3036 certain "return with value" warnings.
3037
c4914de6
MLI
30382015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3039
3040 * c-parser.c (pragma_lex): Add loc argument.
3041
0e36f5c7
MP
30422015-09-15 Marek Polacek <polacek@redhat.com>
3043
3044 PR c/67580
3045 * c-decl.c (tag_exists_p): New function.
3046 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3047 struct/union/enum keywords are missing.
3048 * c-tree.h (tag_exists_p): Declare.
3049
2f3bb934
MP
30502015-09-15 Marek Polacek <polacek@redhat.com>
3051
3052 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3053 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3054 Return NULL_TREE instead of 0.
3055 (lookup_name): Return NULL_TREE instead of 0.
3056 (lookup_name_in_scope): Likewise.
3057 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3058 (parser_xref_tag): Use false instead of 0.
3059 (start_struct): Use true instead of 1.
3060 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3061
aa256c4a
MP
30622015-09-14 Marek Polacek <polacek@redhat.com>
3063
3064 * c-typeck.c (set_nonincremental_init_from_string): Use
3065 HOST_WIDE_INT_M1U when shifting a negative value.
3066
dbb68221
MW
30672015-09-09 Mark Wielaard <mjw@redhat.com>
3068
3069 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3070 parm against NULL.
3071
a8a098ac
JJ
30722015-09-10 Jakub Jelinek <jakub@redhat.com>
3073
3074 PR c/67502
3075 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3076 into OMP_FOR_PRE_BODY rather than before the loop.
3077
f4b189d5
JJ
30782015-09-09 Jakub Jelinek <jakub@redhat.com>
3079
0bb99c11
JJ
3080 PR c/67501
3081 * c-parser.c (c_parser_oacc_all_clauses,
3082 c_parser_omp_all_clauses): Remove invalid clause from
3083 list of clauses even if parser->error is set.
3084
fce5e5e3
JJ
3085 PR c/67500
3086 * c-parser.c (c_parser_omp_clause_aligned,
3087 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3088 test for errors.
3089 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3090 error_mark_node.
3091
f4b189d5
JJ
3092 PR c/67495
3093 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3094 instead of c_parser_unary_expression. If the result is !lvalue_p,
3095 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3096
b2aaf235
MP
30972015-09-04 Marek Polacek <polacek@redhat.com>
3098
3099 PR sanitizer/67279
3100 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3101
1807ffc1
MS
31022015-09-03 Martin Sebor <msebor@redhat.com>
3103
3104 PR c/66516
8b652e65
JJ
3105 * c-typeck.c (convert_arguments, parser_build_unary_op,
3106 build_conditional_expr, c_cast_expr, convert_for_assignment,
3107 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3108 reject_gcc_builtin.
3109 (c_decl_implicit): Define.
3110
d04ff417
MP
31112015-09-02 Marek Polacek <polacek@redhat.com>
3112
3113 PR c/67432
3114 * c-parser.c (c_parser_enum_specifier): Give a better error for
3115 an empty enum.
3116
a79683d5
TS
31172015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3118
3119 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3120
191a6b94
MP
31212015-08-12 Marek Polacek <polacek@redhat.com>
3122
3123 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3124 LOC to it.
3125
420a9d9b
MP
31262015-08-03 Marek Polacek <polacek@redhat.com>
3127
3128 PR c/67088
3129 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3130 Use it.
3131 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3132
992118a1
PP
31332015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3134
3135 * c-parser.c (c_parser_if_body): Take token_indent_info
3136 argument. Call warn_for_misleading_indentation even when the
3137 body is a semicolon. Extract token_indent_infos corresponding
3138 to the guard, body and next tokens. Adjust call to
3139 warn_for_misleading_indentation accordingly.
3140 (c_parser_else_body): Likewise.
3141 (c_parser_if_statement): Likewise.
3142 (c_parser_while_statement): Likewise.
3143 (c_parser_for_statement): Likewise.
3144
46308474
LFSM
31452015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3146 Manuel López-Ibáñez <manu@gcc.gnu.org>
3147
3148 * c-decl.c (get_parm_info): Remove static var. Update warning
3149 message.
3150
05b28fd6
MP
31512015-07-27 Marek Polacek <polacek@redhat.com>
3152
3153 PR c++/66555
3154 PR c/54979
3155 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3156
451b5e48
MP
31572015-07-20 Marek Polacek <polacek@redhat.com>
3158
3159 PR c++/55095
3160 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3161 (build_binary_op): Warn about left shift overflows.
3162
1916bcb5
AM
31632015-07-09 Andrew MacLeod <amacleod@redhat.com>
3164
3165 * c-array-notation.c: Adjust includes for flags.h changes.
3166 * c-objc-common.c: Likewise.
3167
c7131fb2
AM
31682015-07-07 Andrew MacLeod <amacleod@redhat.com>
3169
3170 * c-array-notation.c: Adjust includes.
3171 * c-aux-info.c: Likewise.
3172 * c-convert.c: Likewise.
3173 * c-decl.c: Likewise.
3174 * c-errors.c: Likewise.
3175 * c-lang.c: Likewise.
3176 * c-objc-common.c: Likewise.
3177 * c-parser.c: Likewise.
3178 * c-typeck.c: Likewise.
3179
da2e71c9
MLI
31802015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3181
3182 PR fortran/66605
3183 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3184
b155cfd9
MP
31852015-06-29 Marek Polacek <polacek@redhat.com>
3186
3187 PR c/66322
3188 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3189 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3190 about -Wswitch-bool here.
3191 (do_case): Update c_add_case_label call.
3192 (c_finish_case): Update c_do_switch_warnings call.
3193
31521951
MP
31942015-06-27 Marek Polacek <polacek@redhat.com>
3195
3196 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3197
22d03525
MP
31982015-06-26 Marek Polacek <polacek@redhat.com>
3199
3200 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3201 INDIRECT_REF_P.
3202 * c-typeck.c (array_to_pointer_conversion): Likewise.
3203 (build_unary_op): Likewise.
3204 (c_finish_return): Likewise.
3205
f0889939
AM
32062015-06-25 Andrew MacLeod <amacleod@redhat.com>
3207
3208 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3209 * c-parser.c: Likewise.
3210
8d67ee55
RS
32112015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3212
3213 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3214 instead of pointer_hash.
3215 (detect_field_duplicates): Likewise.
3216
0ae9bd27
MP
32172015-06-25 Marek Polacek <polacek@redhat.com>
3218
3219 * c-array-notation.c: Use VAR_P throughout.
3220 * c-decl.c: Likewise.
3221 * c-objc-common.c: Likewise.
3222 * c-parser.c: Likewise.
3223 * c-typeck.c: Likewise.
3224
62f9079a
MP
32252015-06-25 Marek Polacek <polacek@redhat.com>
3226
3227 * c-decl.c: Use is_global_var throughout.
3228 * c-parser.c: Likewise.
3229 * c-typeck.c: Likewise.
3230
abb226c9
AM
32312015-06-17 Andrew MacLeod <amacleod@redhat.com>
3232
3233 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3234 * c-aux-info.c: Likewise.
3235 * c-convert.c: Likewise.
3236 * c-decl.c: Likewise.
3237 * c-errors.c: Likewise.
3238 * c-lang.c: Likewise.
3239 * c-objc-common.c: Likewise.
3240 * c-parser.c: Likewise.
3241 * c-typeck.c: Likewise.
3242
8cbababc
JH
32432015-06-11 Jan Hubicka <hubicka@ucw.cz>
3244
3245 PR middle-end/66325
3246 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3247 variants.
3248
a0349665
PMR
32492015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3250
3251 * c-decl.c (pop_scope): Register the main translation unit
3252 through the new debug hook.
3253
13fdf2e2
AM
32542015-06-08 Andrew MacLeod <amacleod@redhat.com>
3255
3256 * c-array-notation.c : Adjust include files.
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-lang.h : Likewise.
3263 * c-objc-common.c : Likewise.
3264 * c-parser.c : Likewise.
3265 * c-typeck.c : Likewise.
3266
d7438551
AH
32672015-06-05 Aldy Hernandez <aldyh@redhat.com>
3268
3269 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3270 immediately clobber it.
3271 (c_write_global_declarations_1): Remove call to
3272 check_global_declaration_1.
3273 (c_write_global_declarations_2): Remove.
3274 (c_write_final_cleanups): Rename from c_write_global_declarations.
3275 Remove call to finalize_compilation_unit.
3276 Remove calls to debugging hooks.
3277 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3278 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3279 * c-tree.h: Remove c_write_global_declarations.
3280
ecb9f223
AM
32812015-06-04 Andrew MacLeod <amacleod@redhat.com>
3282
3283 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3284 * c-aux-info.c: Likewise.
3285 * c-convert.c: Likewise.
3286 * c-decl.c: Likewise.
3287 * c-errors.c: Likewise.
3288 * c-lang.c: Likewise.
3289 * c-objc-common.c: Likewise.
3290 * c-parser.c: Likewise.
3291 * c-typeck.c: Likewise.
3292
9482b620
MP
32932015-06-04 Marek Polacek <polacek@redhat.com>
3294
3295 PR c/66341
3296 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3297 it is a lvalue.
3298
bc51ace3
PK
32992015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3300
3301 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3302 Warn for empty struct.
3303 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3304
ea5b45b6
AT
33052015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3306
3307 * c-decl.c (start_function): Call plugin before parsing.
3308 (finish_function): Call plugin after parsing.
3309
c2d47482
PK
33102015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3311
3312 PR c/49551
3313 * c-decl.c (merge_decls): Merge DECL_COMMON.
3314
a95492ab
JW
33152015-05-22 Jim Wilson <jim.wilson@linaro.org>
3316
3317 * Make-lang.in (check_gcc_pallelize): Define.
3318
fd5c817a
MP
33192015-05-22 Marek Polacek <polacek@redhat.com>
3320
3321 PR c/47043
3322 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3323 attributes.
3324
c7b70a3c
MP
33252015-05-21 Marek Polacek <polacek@redhat.com>
3326
3327 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3328 DECL_BUILT_IN.
3329
21b634ae
MP
33302015-05-20 Marek Polacek <polacek@redhat.com>
3331
3332 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3333 * c-typeck.c: Likewise.
3334
296a8c2f
MP
33352015-05-19 Marek Polacek <polacek@redhat.com>
3336
3337 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3338
41b37d5e
JJ
33392015-05-19 Jakub Jelinek <jakub@redhat.com>
3340
3341 PR middle-end/66199
3342 * c-parser.c (c_parser_omp_for_loop): Don't add
3343 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3344 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3345 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3346 constructs.
3347
fab27f52
MM
33482015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3349
3350 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3351 swaps.
fab27f52 3352
40de31cf
MLI
33532015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3354
3355 PR fortran/44054
3356 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3357 accessor function.
3358
3aa3c9fc
MP
33592015-05-14 Marek Polacek <polacek@redhat.com>
3360
3361 PR c/66066
3362 PR c/66127
3363 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3364 rather than with 0.
3365
c3388e62
DM
33662015-05-12 David Malcolm <dmalcolm@redhat.com>
3367
3368 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3369 to add a call to warn_for_misleading_indentation.
3370 (c_parser_else_body): Likewise, adding param "else_loc".
3371 (c_parser_if_statement): Check for misleading indentation.
3372 (c_parser_while_statement): Likewise.
3373 (c_parser_for_statement): Likewise.
3374
755e528f
MP
33752015-05-08 Marek Polacek <polacek@redhat.com>
3376
3377 PR c/64918
3378 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3379 (output_init_element): Likewise.
3380
0173bd2a
MP
33812015-05-07 Marek Polacek <polacek@redhat.com>
3382
3383 PR c/65179
3384 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3385 value.
3386
9babc352
MP
33872015-04-30 Marek Polacek <polacek@redhat.com>
3388
3389 * c-typeck.c (set_init_label): Call error_at instead of error and
3390 pass LOC to it.
3391
ac9f18db
MP
3392 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3393 the type of a decl.
3394
ec3fba51
MP
3395 * c-typeck.c (c_build_va_arg): Clarify the error message.
3396
b811915d
TS
33972015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3398
3399 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3400 OMP_STANDALONE_CLAUSES.
3401
f3075008
MP
34022015-04-28 Marek Polacek <polacek@redhat.com>
3403
3404 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3405
4e81b788
MP
34062015-04-28 Marek Polacek <polacek@redhat.com>
3407
3408 PR c/65901
3409 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3410
6c1db78e
MP
34112015-04-25 Marek Polacek <polacek@redhat.com>
3412
3413 PR c/52085
3414 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3415 attribute.
3416
5c4abbb8
MP
34172015-04-23 Marek Polacek <polacek@redhat.com>
3418
3419 PR c/65345
3420 * c-decl.c (set_labels_context_r): New function.
3421 (store_parm_decls): Call it via walk_tree_without_duplicates.
3422 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3423 instead of create_tmp_var. Build TARGET_EXPR instead of
3424 COMPOUND_EXPR.
3425 (build_atomic_assign): Use create_tmp_var_raw instead of
3426 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3427
06aca1d5
IV
34282015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3429
3430 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3431 (c_parser_omp_target_update): Add missed %> to error_at ().
3432
8fba1830
BRF
34332015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3434
3435 PR target/55143
3436 * c-decl.c (c_default_pointer_mode): Remove definition.
3437 * c-tree.h (c_default_pointer_mode): Remove declaration.
3438
62021f64
TB
34392015-03-27 Tobias Burnus <burnus@net-b.de>
3440
3441 PR c/65586
3442 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3443 error out.
3444 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3445 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3446 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3447
9b65e171
JJ
34482015-03-19 Jakub Jelinek <jakub@redhat.com>
3449
3450 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3451 attribute for DECL_EXTERNAL VAR_DECLs.
3452
17958621
JJ
34532015-03-11 Jakub Jelinek <jakub@redhat.com>
3454
3455 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3456 argument.
3457
7ccb1a11
JJ
34582015-03-10 Jakub Jelinek <jakub@redhat.com>
3459
3460 PR c/65120
3461 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3462 before preparing arguments to warn_logical_not_parentheses.
3463
01177669
JJ
34642015-03-09 Jakub Jelinek <jakub@redhat.com>
3465
3466 PR c/65120
3467 * c-typeck.c (parser_build_binary_op): Don't warn for
3468 !!x == y or !b == y where b is _Bool.
3469
802ac282
MP
34702015-03-09 Marek Polacek <polacek@redhat.com>
3471
3472 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3473 * c-decl.c (grokdeclarator): Likewise.
3474 * c-typeck.c (build_binary_op): Likewise.
3475
e5165b60
MP
34762015-02-27 Marek Polacek <polacek@redhat.com>
3477
3478 PR c/65228
3479 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3480
065d214c
MP
34812015-02-14 Marek Polacek <polacek@redhat.com>
3482
3483 PR c/64768
3484 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3485 declared through a typedef name.
3486
e5d9235b
MP
34872015-02-13 Marek Polacek <polacek@redhat.com>
3488
3489 PR c/65050
3490 * c-decl.c (grokdeclarator): Print also the type when giving
3491 the error message about array's incomplete element type.
3492
fa01ffcc
JJ
34932015-02-11 Jakub Jelinek <jakub@redhat.com>
3494
3495 PR c/64824
3496 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3497 check in the POP macro.
3498
c3e38a03
MP
34992015-02-09 Marek Polacek <polacek@redhat.com>
3500
3501 PR c/64856
3502 * c-typeck.c (process_init_element): Don't always wrap
3503 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3504 initializing a range of elements.
3505
4886ec8e
JJ
35062015-02-04 Jakub Jelinek <jakub@redhat.com>
3507
3508 PR c/64824
3509 PR c/64868
3510 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3511
c3e38a03 35122015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3513
3514 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3515 processing enum declaration.
3516
7b33f0c8
MP
35172015-01-29 Marek Polacek <polacek@redhat.com>
3518
3519 PR c/64709
3520 * c-typeck.c (pop_init_level): If constructor_elements has
3521 exactly one element with integer_zerop value, set constructor_zeroinit
3522 to 1. Remove braces around warning_init call.
3523
dea63e49
JJ
35242015-01-27 Jakub Jelinek <jakub@redhat.com>
3525
3526 PR c/64766
3527 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3528 of FUNCTION_DECLs with error_mark_node.
3529
d38f7dce
JJ
35302015-01-26 Jakub Jelinek <jakub@redhat.com>
3531
3532 PR c/64778
3533 * c-typeck.c (convert_arguments): Return -1 if there are
3534 error_args, even if we've diagnosed too many arguments.
3535
cbf5d0e7
RB
35362015-01-21 Richard Biener <rguenther@suse.de>
3537
3538 PR middle-end/64313
3539 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3540 for builtins the user declared correctly.
3541
41dbbb37
TS
35422015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3543 Bernd Schmidt <bernds@codesourcery.com>
3544 Cesar Philippidis <cesar@codesourcery.com>
3545 James Norris <jnorris@codesourcery.com>
3546 Jakub Jelinek <jakub@redhat.com>
3547 Ilmir Usmanov <i.usmanov@samsung.com>
3548
3549 * c-parser.c: Include "gomp-constants.h".
3550 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3551 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3552 Use OMP_CLAUSE_SET_MAP_KIND.
3553 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3554 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3555 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3556 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3557 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3558 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3559 "copyout", "create", "delete", "deviceptr", "gang", "host",
3560 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3561 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3562 "present_or_create", "pcreate", "seq", "self", "vector",
3563 "vector_length", "wait", "worker".
3564 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3565 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3566 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3567 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3568 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3569 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3570 (c_parser_oacc_data_clause_deviceptr)
3571 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3572 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3573 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3574 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3575 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3576 (c_parser_oacc_parallel, c_parser_oacc_update)
3577 (c_parser_oacc_wait): New functions.
3578 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3579 (c_finish_oacc_data): New prototypes.
3580 * c-typeck.c: Include "gomp-constants.h".
3581 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3582 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3583 OMP_CLAUSE_SET_MAP_KIND.
3584 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3585 (c_finish_oacc_data): New functions.
3586 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3587 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3588 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3589 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3590 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3591 GOMP_MAP_FORCE_DEVICEPTR.
3592
adfac8df
JJ
35932015-01-09 Michael Collison <michael.collison@linaro.org>
3594
3595 * c-array-notation.c: Include hash-set.h, machmode.h,
3596 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3597 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3598 * c-aux-info.c: Ditto.
3599 * c-convert.c: Ditto.
3600 * c-decl.c: Ditto.
3601 * c-errors.c: Ditto.
3602 * c-lang.c: Dittoxs.
3603 * c-objc-common.c: Ditto.
3604 * c-parser.c: Ditto.
3605 * c-typeck.c: Include hash-set.h, machmode.h,
3606 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3607 fold-const.h, wide-int.h, inchash.h, real.h and
3608 fixed-value.h due to flattening of tree.h.
3609
2cc901dc
MP
36102015-01-07 Marek Polacek <polacek@redhat.com>
3611
3612 PR c/64417
3613 * c-typeck.c (process_init_element): Disallow initialization of
3614 a flexible array member with a string constant if the structure
3615 is in an array.
3616
5624e564
JJ
36172015-01-05 Jakub Jelinek <jakub@redhat.com>
3618
e5341100
JJ
3619 PR sanitizer/64344
3620 * c-typeck.c (convert_for_assignment, c_finish_return): For
3621 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3622 types also set in_late_binary_op around convert call.
3623 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3624 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3625 result on expr as last argument to ubsan_instrument_float_cast,
3626 if in_late_binary_op, don't use c_save_expr but save_expr.
3627
5624e564
JJ
3628 Update copyright years.
3629
5bd012f8
MP
36302015-01-05 Marek Polacek <polacek@redhat.com>
3631
3632 PR c/64423
3633 * c-typeck.c (build_array_ref): Pass loc down to
3634 warn_array_subscript_with_type_char.
3635
3f8257db 36362014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3637
3638 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3639 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3640 element type.
8e745a17 3641 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3642 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3643 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3644 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3645 to PEDWARN_FOR_QUALIFIERS.
768952be 3646
8f94a8c4
JJ
36472014-12-17 Jakub Jelinek <jakub@redhat.com>
3648
3649 PR sanitizer/64289
3650 * c-convert.c: Include ubsan.h.
3651 (convert): For real -> integral casts and
3652 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3653 instead instrument the float cast directly.
3654
b731b390
JJ
36552014-11-29 Jakub Jelinek <jakub@redhat.com>
3656
3657 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3658 c_finish_stmt_expr): Remove NULL last argument from
3659 create_tmp_var_raw and create_tmp_var calls.
3660 * c-array-notation.c (fix_builtin_array_notation_fn,
3661 build_array_notation_expr, fix_conditional_array_notations_1,
3662 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3663
541e35a6
MP
36642014-11-28 Marek Polacek <polacek@redhat.com>
3665
3666 PR c/63862
3667 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3668 convert the right operand to integer type.
3669
b286be94
MP
36702014-11-25 Marek Polacek <polacek@redhat.com>
3671
3672 PR c/63877
3673 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3674 for inline functions.
3675
aa7da51a
JJ
36762014-11-21 Jakub Jelinek <jakub@redhat.com>
3677
3678 PR target/63764
3679 * c-typeck.c (build_array_ref): Adjust
3680 convert_vector_to_pointer_for_subscript caller. If it returns true,
3681 call non_lvalue_loc on the result.
3682
d876207f
RB
36832014-11-11 Richard Biener <rguenther@suse.de>
3684
3685 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3686 to true.
3687
e5e44252
AK
36882014-11-10 Andi Kleen <ak@linux.intel.com>
3689
3690 PR c/60804
3691 * c-parser.c (c_parser_statement_after_labels): Call
3692 check_no_cilk.
3693 (c_parser_if_statement): Dito.
3694 (c_parser_switch_statement): Dito.
3695 (c_parser_while_statement): Dito.
3696 (c_parser_do_statement): Dito.
3697 (c_parser_for_statement): Dito.
3698 * c-typeck.c (c_finish_loop): Dito.
3699
13c21655
PC
37002014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3701
3702 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3703 OPT_Wshift_count_overflow in the warnings.
3704
2d51fcef
MP
37052014-10-30 Marek Polacek <polacek@redhat.com>
3706
3707 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3708 print the stripped version as well, if they're not the same.
3709
ef4bddc2
RS
37102014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3711
3712 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3713 machine_mode.
3714
c582198b
AM
37152014-10-28 Andrew MacLeod <amacleod@redhat.com>
3716
3717 * c-decl.c: Adjust include files.
3718 * c-parser.c: Ditto.
3719
ddc8de03
PM
37202014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3721 Tom Tromey <tromey@redhat.com>
3722
3723 * c-tree.h (enum c_oracle_request): New.
3724 (c_binding_oracle_function): New typedef.
3725 (c_binding_oracle, c_pushtag, c_bind): Declare.
3726 * c-decl.c (c_binding_oracle): New global.
3727 (I_SYMBOL_CHECKED): New macro.
3728 (i_symbol_binding): New function.
3729 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3730 (I_TAG_CHECKED): New macro.
3731 (i_tag_binding): New function.
3732 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3733 (I_LABEL_CHECKED): New macro.
3734 (i_label_binding): New function.
3735 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3736 (c_print_identifier): Save and restore c_binding_oracle.
3737 (c_pushtag, c_bind): New functions.
3738
60393bbc
AM
37392014-10-27 Andrew MacLeod <amacleod@redhat.com>
3740
3741 * c-typeck.c: Adjust include files.
3742
d723bb7c
MLI
37432014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3744
3745 PR c++/53061
3746 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3747 initialization here...
3748 (c_initialize_diagnostics): ... but here. Set defaults after
3749 building pretty-printer.
3750
1bc5a451
MP
37512014-10-23 Marek Polacek <polacek@redhat.com>
3752
3753 PR c/63626
3754 * c-decl.c (pop_scope): Don't print warning in external_scope.
3755
4435bb92
MP
37562014-10-19 Marek Polacek <polacek@redhat.com>
3757
3758 PR c/63567
3759 * c-typeck.c (output_init_element): Allow initializing objects with
3760 static storage duration with compound literals even in C99 and add
3761 pedwarn for it.
3762
7278465e
MP
37632014-10-17 Marek Polacek <polacek@redhat.com>
3764
3765 PR c/63567
3766 * c-typeck.c (digest_init): Allow initializing objects with static
3767 storage duration with compound literals even in C99 and add pedwarn
3768 for it.
3769
d9b7be2e
MP
37702014-10-17 Marek Polacek <polacek@redhat.com>
3771
3772 PR c/63543
3773 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3774 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3775 error multiple times. Print the type.
3776
f406ae1f
MP
37772014-10-17 Marek Polacek <polacek@redhat.com>
3778
3779 PR c/63549
3780 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3781 type.
3782
92574c7c
MP
37832014-10-17 Marek Polacek <polacek@redhat.com>
3784
3785 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3786 (start_function): Use OPT_Wimplicit_int instead of 0.
3787 (store_parm_decls_oldstyle): Likewise.
3788
1bc4a978
MT
37892014-10-17 Alan Modra <amodra@gmail.com>
3790
3791 PR middle-end/61848
3792 * c-decl.c (merge_decls): Don't merge section name or tls model
3793 to newdecl symtab node, instead merge to olddecl. Override
3794 existing olddecl section name. Set tls_model for all thread-local
3795 vars, not just OMP thread-private ones. Remove incorrect comment.
3796
83685514
AM
37972014-10-16 Andrew MacLeod <amacleod@redhat.com>
3798
3799 * c-decl.c: Adjust include files.
3800
78a7c317
DD
38012014-10-14 DJ Delorie <dj@redhat.com>
3802
3803 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3804 (c_token_starts_typename): Check all __intN, not just __int128.
3805 (c_token_starts_declspecs): Likewise.
3806 (c_parser_declspecs): Likewise.
3807 (c_parser_attribute_any_word): Likewise.
3808 (c_parser_objc_selector): Likewise.
3809 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3810 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3811 is specified.
3812 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3813 __int128.
3814 (finish_declspecs): Likewise.
3815
74d98c1e
AB
38162014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3817
8e745a17 3818 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3819 the duplicate code.
8e745a17 3820 (c_parser_statement): Call the new function.
74d98c1e 3821
84937de2
MP
38222014-10-09 Marek Polacek <polacek@redhat.com>
3823
3824 PR c/63480
3825 * c-typeck.c (pop_init_level): Don't warn about initializing
3826 with { }.
3827
0382aaa0
MP
38282014-10-07 Marek Polacek <polacek@redhat.com>
3829
3830 PR c/59717
3831 * c-decl.c (header_for_builtin_fn): New function.
3832 (implicitly_declare): Suggest which header to include.
3833
7a0ca710
MP
38342014-10-07 Marek Polacek <polacek@redhat.com>
3835
3836 * c-convert.c (convert): Use error_operand_p.
3837 * c-typeck.c (require_complete_type): Likewise.
3838 (really_atomic_lvalue): Likewise.
3839 (digest_init): Likewise.
3840 (handle_omp_array_sections_1): Likewise.
3841
6bc8a126
MP
38422014-10-03 Marek Polacek <polacek@redhat.com>
3843
3844 PR c/63453
3845 * c-decl.c (pop_scope): Don't warn about "inline function declared
3846 but never defined" for functions marked with gnu_inline attribute.
3847
d90c0a59
JJ
38482014-09-25 Jakub Jelinek <jakub@redhat.com>
3849
3850 PR c++/63249
3851 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3852 on low_bound and length.
3853
083e891e
MP
38542014-09-24 Marek Polacek <polacek@redhat.com>
3855
3856 PR c/61405
3857 PR c/53874
3858 * c-parser.c: Don't define CPP_KEYWORD.
3859 (c_parser_switch_statement): Pass original type to c_finish_case.
3860 * c-tree.h (c_finish_case): Update declaration.
3861 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3862 conditionally to c_do_switch_warnings.
3863
8d95fe25
MP
38642014-09-03 Marek Polacek <polacek@redhat.com>
3865
3866 PR c/62024
3867 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3868 conversions.
3869
9a771876
JJ
38702014-09-02 Jakub Jelinek <jakub@redhat.com>
3871 Balaji V. Iyer <balaji.v.iyer@intel.com>
3872 Igor Zamyatin <igor.zamyatin@intel.com>
3873
3874 * c-parser.c (c_parser_cilk_for): New function.
3875 (c_parser_cilk_grainsize): Likewise.
3876 (c_get_temp_regvar): Likewise.
3877 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3878 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3879 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3880 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3881 case.
3882
b7679d96
CG
38832014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3884
3885 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3886 with using HOST_WIDE_INT without truncation to 'int'
3887
59ea0364
MP
38882014-08-22 Marek Polacek <polacek@redhat.com>
3889
3890 PR c++/62199
3891 * c-typeck.c (parser_build_binary_op): Adjust call to
3892 warn_logical_not_parentheses.
3893
671a475e
IZ
38942014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3895
3896 PR other/62008
3897 * c-parser.c (c_parser_array_notation): Check for correct
3898 type of an array added.
3899
04159acf
MP
39002014-08-19 Marek Polacek <polacek@redhat.com>
3901
3902 PR c++/62153
3903 * c-typeck.c (build_binary_op): If either operand of a comparison
3904 is a boolean expression, call maybe_warn_bool_compare.
3905
c77935ee
PP
39062014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3907
3908 PR c/45584
3909 * c-typeck.c (build_c_cast): Do a conversion even when the
3910 TYPE_MAIN_VARIANTs are the same.
3911
35aff4fb
MP
39122014-08-19 Marek Polacek <polacek@redhat.com>
3913
3914 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3915 pedwarn_c99 instead of pedwarn.
3916 (grokfield): Likewise.
3917 (warn_defaults_to): New function.
3918 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3919 Unconditionally call pedwarn_c99 instead of pedwarn.
3920 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3921 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3922 check flag_isoc11 before.
3923 * c-errors.c (pedwarn_c99): Change the return type to bool.
3924 Handle -Wc99-c11-compat.
3925 * c-parser.c (disable_extension_diagnostics): Handle
3926 warn_c99_c11_compat.
3927 (restore_extension_diagnostics): Likewise.
3928 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3929 instead of pedwarn, don't check flag_isoc11 before.
3930 (c_parser_declspecs): Likewise.
3931 (c_parser_alignas_specifier): Likewise.
3932 (c_parser_alignof_expression): Likewise.
3933 (c_parser_generic_selection): Likewise.
3934 * c-tree.h (pedwarn_c99): Update declaration.
3935 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3936 of pedwarn_c99.
3937
177cce46
MP
39382014-08-19 Marek Polacek <polacek@redhat.com>
3939
3940 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3941 to pedwarn_c90.
3942 * c-errors.c: Include "opts.h".
3943 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3944 * c-parser.c (disable_extension_diagnostics): Handle negative value
3945 of warn_c90_c99_compat, too.
3946 (restore_extension_diagnostics): Likewise.
3947 (c_parser_compound_statement_nostart): Pass
3948 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3949
6dc99c33
MP
39502014-08-12 Marek Polacek <polacek@redhat.com>
3951
3952 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3953 Add pedwarn.
3954 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3955 Likewise.
3956 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3957
3f8257db 39582014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3959
3960 PR c/51849
3961 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3962 Call pedwarn_c90 instead of pedwarn.
3963 (check_bitfield_type_and_width): Likewise.
3964 (declspecs_add_qual): Likewise.
3965 (declspecs_add_type): Likewise.
3966 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3967 Adjust to only call pedwarn_c90.
3968 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3969 pedwarn_c90 instead of pedwarn.
3970 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3971 * c-parser.c (disable_extension_diagnostics): Handle
3972 warn_c90_c99_compat.
3973 (restore_extension_diagnostics): Likewise.
3974 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3975 pedwarn_c90 instead of pedwarn.
3976 (c_parser_initelt): Likewise.
3977 (c_parser_postfix_expression): Likewise.
3978 (c_parser_postfix_expression_after_paren_type): Likewise.
3979 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3980 * c-tree.h: Fix formatting.
3981 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3982 pedwarn_c90 instead of pedwarn.
3983
9f25a338
TS
39842014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3985
3986 * c-typeck.c: Remove include of pointer-set.h.
3987
044331a8
MP
39882014-08-07 Marek Polacek <polacek@redhat.com>
3989
3990 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3991
b787e7a2
TS
39922014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3993
3994 * c-typeck.c: Use hash_map instead of pointer_map.
3995
6e2830c3
TS
39962014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3997
3998 * c-decl.c: Use hash_set instead of pointer_set.
3999
a7ee52fb
IZ
40002014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4001
4002 PR middle-end/61455
4003 * c-array-notation.c (expand_array_notations): Handling
4004 of DECL_EXPR added.
4005
b4dfdc11
MG
40062014-07-31 Marc Glisse <marc.glisse@inria.fr>
4007
4008 PR c++/60517
4009 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4010 a local variable.
4011
976d5a22
TT
40122014-07-30 Tom Tromey <tromey@redhat.com>
4013
4014 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4015 field.
4016 (really_start_incremental_init, push_init_level): Initialize
4017 designator_depth.
4018 (pop_init_level): Set global designator_depth.
4019 (process_init_element): Check for designated_init attribute.
4020
30281de2
MP
40212014-07-20 Marek Polacek <polacek@redhat.com>
4022
4023 PR c/61852
4024 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4025 (implicitly_declare): Pass location to implicit_decl_warning.
4026
b108f48f
JJ
40272014-07-14 Jakub Jelinek <jakub@redhat.com>
4028
4029 PR middle-end/61294
4030 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4031 If non-NULL, call c_parser_check_literal_zero.
4032 (c_parser_check_literal_zero): New function.
4033 (c_parser_postfix_expression_after_primary): Adjust
4034 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4035
773ec47f
MP
40362014-07-06 Marek Polacek <polacek@redhat.com>
4037
4038 PR c/6940
4039 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4040 * c-tree.h (C_ARRAY_PARAMETER): Define.
4041 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4042 function parameter.
4043
22e1cf1c 40442014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4045 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4046
4047 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4048 releasing symbol.
4049
52ec0ea3
MP
40502014-07-01 Marek Polacek <polacek@redhat.com>
4051
4052 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4053 instead of 0 to WARN_FOR_ASSIGNMENT.
4054
d5c3d343
MP
40552014-07-01 Marek Polacek <polacek@redhat.com>
4056
4057 PR c/58286
4058 * c-typeck.c (convert_for_assignment): Pass
4059 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4060
6a7253a4
MP
40612014-06-30 Marek Polacek <polacek@redhat.com>
4062
4063 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4064 has no_sanitize_undefined attribute.
4065
5e88a8f4
IZ
40662014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4067
4068 PR middle-end/57541
4069 * c-array-notation.c (fix_builtin_array_notation_fn):
4070 Check for 0 arguments in builtin call. Check that bultin argument is
4071 correct.
4072 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4073 index.
4074
9698b078
SH
40752014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4076
4077 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4078 qualifiers in __auto_type for atomic types.
4079 (c_parser_typeof_specifier): Discard all type qualifiers in
4080 __typeof__ for atomic types.
4081
6e07c515
MP
40822014-06-25 Marek Polacek <polacek@redhat.com>
4083
4084 PR c/61162
4085 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4086 the return expression to c_finish_return.
4087
da6f124d
JJ
40882014-06-25 Jakub Jelinek <jakub@redhat.com>
4089
4090 * c-typeck.c (c_finish_omp_clauses): Make sure
4091 OMP_CLAUSE_LINEAR_STEP has correct type.
4092
c203e8a7
TS
40932014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4094
4095 * c-decl.c: Adjust.
4096
56ad0e38
JJ
40972014-06-24 Jakub Jelinek <jakub@redhat.com>
4098
4099 * c-parser.c (c_parser_omp_for_loop): For
4100 #pragma omp parallel for simd move lastprivate clause from parallel
4101 to for rather than simd.
4102
47c2554f
MP
41032014-06-23 Marek Polacek <polacek@redhat.com>
4104
4105 * c-typeck.c (parser_build_binary_op): Don't call
4106 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4107
56363ffd
JH
41082014-06-15 Jan Hubicka <hubicka@ucw.cz>
4109
4110 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4111 * c-decl.c (merge_decls): Likewise.
4112
d7ff7ae5
MP
41132014-06-09 Marek Polacek <polacek@redhat.com>
4114
4115 PR c/36446
4116 * c-typeck.c (error_init): Call inform instead of error_at.
4117 (pedwarn_init): Call inform instead of pedwarn.
4118 (warning_init): Call inform instead of warning_at.
4119
24d047a3
JH
41202014-06-07 Jan Hubicka <hubicka@ucw.cz>
4121
4122 * c-decl.c (merge_decls): Use set_decl_section_name.
4123 (duplicate_decls): Remove node if it exists.
4124
9bac5cbb
G
41252014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4126
4127 PR c/53119
4128 * c-typeck.c (push_init_level, process_init_element,
4129 pop_init_level): Correct check for zero initialization, move
4130 missing brace warning to respect zero initialization.
4131
8ffcdea8
MP
41322014-06-05 Marek Polacek <polacek@redhat.com>
4133
4134 PR c/56724
4135 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4136
742938c9
MP
41372014-06-05 Marek Polacek <polacek@redhat.com>
4138
4139 PR c/49706
4140 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4141 on the left hand side operand of a comparison.
4142
6447c55d
MP
41432014-06-05 Marek Polacek <polacek@redhat.com>
4144
4145 PR c/48062
4146 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4147 Print note only if the warning was printed.
4148
9dc7743c
IZ
41492014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4150
4151 PR c/58942
4152 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4153 with a pointer.
4154
fedfecef
MP
41552014-06-03 Marek Polacek <polacek@redhat.com>
4156
4157 PR c/60439
4158 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4159 c_start_case.
4160 * c-tree.h (c_start_case): Update.
4161 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4162 switch condition has boolean value.
4163
9b2b7279
AM
41642014-06-02 Andrew MacLeod <amacleod@redhat.com>
4165
4166 * c-decl.c: Include builtins.h.
4167 * c-parser.c: Likewise.
4168
5c1bc275
MP
41692014-05-27 Marek Polacek <polacek@redhat.com>
4170
4171 PR c/56724
4172 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4173 error and warning calls to error_at and warning_at. Pass location of
4174 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4175 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4176 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4177
97563bc8
IZ
41782014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4179
4180 PR c/61191
4181 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4182 function parameters.
4183
aede2c10
JH
41842014-05-23 Jan Hubicka <hubicka@ucw.cz>
4185
4186 * c-decl.c (merge_decls): Preserve symtab node pointers.
4187 (duplicate_decls): Free new decl.
4188
edbba2ce
TS
41892014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4190
f3316c6d
TS
4191 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4192 initialization.
4193
edbba2ce
TS
4194 * c-parser.c (c_parser_omp_target): Return bool values.
4195
68c81f24
TS
41962014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4197
4198 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4199 num_teams_loc variable to num_thread_limit_loc.
4200
632f2871
RS
42012014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4202
4203 * c-array-notation.c (expand_array_notations): Use void_node
4204 instead of void_zero_node.
4205
766090c2
TS
42062014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4207
4208 * c-decl.c (finish_struct): Adjust.
4209 (finish_enum): Likewise.
4210 (bind): Adjust.
4211 (record_inline_static): Likewise.
4212 (push_scope): Likewise.
4213 (make_label): Likewise.
4214 (lookup_label_for_goto): Likewise.
4215 (finish_struct): Likewise.
4216 (finish_enum): Likewise.
4217 (store_parm_decls): Likewise.
4218 (c_push_function_context): Likewise.
4219 * c-lang.h: Remove usage of variable_size gty attribute.
4220 * c-parser.c (c_parse_init): Adjust.
4221 (c_parse_file): Likewise.
4222
2b107f6b
MP
42232014-05-13 Marek Polacek <polacek@redhat.com>
4224
4225 PR c/61162
4226 * c-typeck.c (convert_for_assignment): Pass location to
4227 WARN_FOR_ASSIGNMENT instead of input_location.
4228
d033409e
MP
42292014-05-10 Marek Polacek <polacek@redhat.com>
4230
4231 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4232 maybe_warn_string_init.
4233 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4234 maybe_warn_string_init.
4235 * c-tree.h (maybe_warn_string_init): Update declaration.
4236 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4237 Call pedwarn_init with loc instead of with input_location.
4238 (digest_init): Pass init_loc to maybe_warn_string_init.
4239 (pop_init_level): Call pedwarn_init with loc instead of with
4240 input_location.
4241 (set_init_index): Likewise.
4242 (process_init_element): Likewise.
4243
ea58ef42
MP
42442014-05-09 Marek Polacek <polacek@redhat.com>
4245
4246 PR c/61096
4247 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4248 (c_parser_initelt): Pass location to set_init_label. Pass array index
4249 location to set_init_index.
4250 * c-tree.h (push_init_level): Update declaration.
4251 (pop_init_level): Likewise.
4252 (set_init_index): Likewise.
4253 (set_init_label): Likewise.
4254 * c-typeck.c (error_init): Add location parameter. Call error_at
4255 instead of error.
4256 (digest_init): Pass init_loc to error_init.
4257 (really_start_incremental_init):
4258 (push_init_level): Add location parameter. Pass loc to pop_init_level
4259 and error_init.
4260 (pop_init_level): Likewise.
4261 (set_designator): Add location parameter. Pass loc to pop_init_level,
4262 push_init_level, and error_init.
4263 (set_init_index): Add location parameter. Pass loc to error_init and
4264 set_designator.
4265 (set_init_label): Likewise.
4266 (output_init_element): Pass loc to error_init.
4267 (process_init_element): Pass loc to error_init, pop_init_level,
4268 pedwarn_init, and push_init_level.
4269
661a0813
MP
42702014-05-09 Marek Polacek <polacek@redhat.com>
4271
4272 PR c/50459
4273 * c-parser.c (c_parser_attributes): Parse the arguments as an
4274 expression-list if the attribute takes identifier.
4275
2793eeab
MP
42762014-05-08 Marek Polacek <polacek@redhat.com>
4277
4278 PR c/61053
4279 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4280 TYPE_ALIGN_UNIT.
4281
f827930a
MP
42822014-05-08 Marek Polacek <polacek@redhat.com>
4283
4284 PR c/61077
4285 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4286 of main.
4287
1d60af08
KZ
42882014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4289 Mike Stump <mikestump@comcast.net>
4290 Richard Sandiford <rdsandiford@googlemail.com>
4291
4292 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4293 (finish_enum): Use wide-int interfaces.
4294 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4295 * c-typeck.c (build_c_cast): Likewise.
4296 (set_nonincremental_init_from_string): Likewise.
4297 (c_tree_equal): Likewise.
4298
a0e24419
MP
42992014-05-02 Marek Polacek <polacek@redhat.com>
4300
4301 PR c/25801
4302 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4303 Return size_one_node when the type is not complete.
4304 (pointer_diff): Remove comment.
4305 (build_unary_op): Improve error messages.
4306
19fc9faa
MP
43072014-05-02 Marek Polacek <polacek@redhat.com>
4308
4309 * c-typeck.c (c_finish_return): Separate warning_at calls.
4310
63bc4e87
MP
43112014-05-02 Marek Polacek <polacek@redhat.com>
4312
4313 * c-tree.h (error_init): Remove declaration.
4314 (pedwarn_init): Likewise.
4315 * c-typeck.c (error_init): Make static and move above.
4316 (pedwarn_init): Likewise.
4317 (warning_init): Move above.
4318 (maybe_warn_string_init): Likewise.
4319
4bd2511b
JL
43202014-05-01 Jeff Law <law@redhat.com>
4321
4322 Revert:
4323
4324 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4325 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4326 avoid goto.
4327
6a358dcb
MP
43282014-05-02 Marek Polacek <polacek@redhat.com>
4329
4330 PR c/60784
4331 * c-typeck.c (push_init_level): Set constructor_designated to
4332 p->designated for structures.
4333
ae5ebda4
MP
43342014-05-01 Marek Polacek <polacek@redhat.com>
4335
4336 PR c/60915
4337 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4338 function-definition has an attribute after the declarator.
4339
96b40f8d
MP
43402014-05-01 Marek Polacek <polacek@redhat.com>
4341
4342 PR c/60257
4343 * c-typeck.c (warning_init): Add location_t parameter. Call
4344 warning_at instead of warning.
4345 (push_init_level): Pass input_location to warning_init.
4346 (add_pending_init): Add location_t parameter. Pass loc to
4347 warning_init.
4348 (set_nonincremental_init): Pass input_location to add_pending_init.
4349 (set_nonincremental_init_from_string): Likewise.
4350 (output_init_element): Pass loc to warning_init and to
4351 add_pending_init.
4352
32e00768
MP
43532014-05-01 Marek Polacek <polacek@redhat.com>
4354
4355 PR c/43395
4356 * c-typeck.c (c_finish_return): Distinguish between label and variable
4357 when warning about returning local address.
4358
c9379ce2
MP
43592014-05-01 Marek Polacek <polacek@redhat.com>
4360
4361 PR c/29467
4362 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4363 in C89 mode.
4364
d00887e8
MP
43652014-05-01 Marek Polacek <polacek@redhat.com>
4366
4367 PR c/43245
4368 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4369 instead of 0 to WARN_FOR_QUALIFIERS.
4370
5436fa2e
MP
43712014-05-01 Marek Polacek <polacek@redhat.com>
4372
4373 PR c/56989
4374 * c-typeck.c (default_conversion): Use better location for
4375 error call.
4376
f8ed5150
MP
43772014-04-30 Marek Polacek <polacek@redhat.com>
4378
4379 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4380 also when SANITIZE_FLOAT_DIVIDE is on.
4381
8337d1db
MP
43822014-04-30 Marek Polacek <polacek@redhat.com>
4383
4384 PR c/60139
4385 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4386 and pedwarn_init. Use loc insted of input_location.
4387
c4bdc42f
MP
43882014-04-30 Marek Polacek <polacek@redhat.com>
4389
4390 PR c/60351
4391 * c-typeck.c (build_binary_op): Use location when warning about
4392 shift count.
4393
45484dcf
MP
43942014-04-25 Marek Polacek <polacek@redhat.com>
4395
4396 PR c/18079
4397 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4398 always_inline/noinline and hot/cold attributes.
4399
34cf811f
MP
44002014-04-25 Marek Polacek <polacek@redhat.com>
4401
4402 PR c/60114
4403 * c-parser.c (c_parser_initelt): Pass input_location to
4404 process_init_element.
4405 (c_parser_initval): Pass loc to process_init_element.
4406 * c-tree.h (process_init_element): Adjust declaration.
4407 * c-typeck.c (push_init_level): Pass input_location to
4408 process_init_element.
4409 (pop_init_level): Likewise.
4410 (set_designator): Likewise.
4411 (output_init_element): Add location_t parameter. Pass loc to
4412 digest_init.
4413 (output_pending_init_elements): Pass input_location to
4414 output_init_element.
4415 (process_init_element): Add location_t parameter. Pass loc to
4416 output_init_element.
4417
42056eac
JJ
44182014-04-24 Jakub Jelinek <jakub@redhat.com>
4419
4420 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4421 atomic-clause, allow comma in between atomic-clause and
4422 seq_cst.
4423
e162a134
JJ
44242014-04-22 Jakub Jelinek <jakub@redhat.com>
4425
4426 PR c/59073
4427 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4428 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4429
2f6babac
IZ
44302014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4431
4432 PR middle-end/60469
4433 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4434 create_tmp_var instead build_decl for creating temps.
4435 (build_array_notation_expr): Likewise.
4436 (fix_conditional_array_notations_1): Likewise.
4437 (fix_array_notation_expr): Likewise.
4438 (fix_array_notation_call_expr): Likewise.
4439
8edbfaa6
JJ
44402014-03-28 Jakub Jelinek <jakub@redhat.com>
4441
4442 PR c++/60689
4443 * c-tree.h (c_build_function_call_vec): New prototype.
4444 * c-typeck.c (build_function_call_vec): Don't call
4445 resolve_overloaded_builtin here.
4446 (c_build_function_call_vec): New wrapper function around
4447 build_function_call_vec. Call resolve_overloaded_builtin here.
4448 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4449 Call c_build_function_call_vec instead of build_function_call_vec.
4450 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4451 * c-decl.c (finish_decl): Likewise.
4452
7485aeea
MLI
44532014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4454
4455 PR c/55383
4456 * c-typeck.c: Use correct format string in cast-qual warning
4457
b17a8b07
TS
44582014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4459
4460 * c-decl.c (c_decl_attributes): Use
4461 lang_hooks.types.omp_mappable_type.
4462 * c-typeck.c (c_finish_omp_clauses): Likewise.
4463
3af9c5e9
MP
44642014-03-06 Marek Polacek <polacek@redhat.com>
4465
4466 PR c/60197
4467 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4468 of checking tree code.
4469
1c9f5f33
PK
44702014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4471
4472 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4473 (c_parser_parameter_declaration): Likewise.
4474
cc28fc7f
MP
44752014-02-19 Marek Polacek <polacek@redhat.com>
4476
4477 PR c/60195
4478 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4479 Call mark_exp_read on exp.value.
4480 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4481 TREE_ADDRESSABLE on old instead of val.
4482 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4483
b581c05c
PK
44842014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4485
4486 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4487 C_EXPR_APPEND by vec_safe_push.
4488 * c-tree.h (C_EXPR_APPEND): Remove.
4489
81e5eca8
MP
44902014-01-31 Marek Polacek <polacek@redhat.com>
4491
4492 PR c/59963
4493 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4494 build_function_call_vec.
4495 (build_function_call): Likewise.
4496 (build_atomic_assign): Likewise.
4497 (build_function_call_vec): Add arg_loc parameter. Use it.
4498 (convert_arguments): Likewise.
4499 (convert_for_assignment): Rename rhs_loc to expr_loc.
4500 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4501 (c_parser_objc_keywordexpr): Likewise.
4502 (c_parser_postfix_expression_after_primary): Call
4503 build_function_call_vec with expr_loc rather than op_loc.
4504 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4505 build_function_call_vec.
4506 (c_parser_expr_list): Add locations parameter. Fill it with locations
4507 of function arguments.
4508 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4509
68fca595
MP
45102014-01-30 Marek Polacek <polacek@redhat.com>
4511
4512 PR c/59940
4513 * c-typeck.c (build_function_call_vec): Use loc parameter.
4514 (convert_arguments): Add location parameter. Use it.
4515 (ep_convert_and_check): Likewise.
4516 (build_atomic_assign): Adjust convert_for_assignment call.
4517 (build_modify_expr): Likewise.
4518 (digest_init): Likewise.
4519 (c_finish_return): Likewise.
4520 (build_conditional_expr): Adjust ep_convert_and_check calls.
4521 (convert_for_assignment): Add rhs_loc parameter. Use it.
4522 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4523 calls.
4524
fa337f3a
RB
45252014-01-30 Richard Biener <rguenther@suse.de>
4526
4527 PR c/59905
4528 * c-typeck.c (build_function_call_vec): Do not replace calls
4529 to a function via an incompatible type with a runtime abort.
4530
b72271b9
BI
45312014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4532
4533 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4534 flag_enable_cilkplus with flag_cilkplus.
4535 (c_parser_direct_declarator_inner): Likewise.
4536 (c_parser_attribute_any_word): Likewise.
4537 (c_parser_attributes): Likewise.
4538 (c_parser_compound_statement): Likewise.
4539 (c_parser_statement_after_labels): Likewise.
4540 (c_parser_if_statement): Likewise.
4541 (c_parser_switch_statement): Likewise.
4542 (c_parser_do_statement): Likewise.
4543 (c_parser_for_statement): Likewise.
4544 (c_parser_unary_expression): Likewise.
4545 (c_parser_postfix_expression): Likewise.
4546 (c_parser_postfix_expression_after_primary): Likewise.
4547 (c_parser_postfix_expression_after_primary): Likewise.
4548 (c_parser_omp_clause_name): Likewise.
4549 (c_finish_omp_declare_simd): Likewise.
4550 (c_parser_cilk_verify_simd): Likewise.
4551 * c-typeck.c (build_array_ref): Likewise.
4552 (build_function_call_vec): Likewise.
4553 (convert_arguments): Likewise.
4554 (build_compound_expr): Likewise.
4555 (c_finish_return): Likewise.
4556 (c_finish_if_stmt): Likewise.
4557 (c_finish_loop): Likewise.
4558 (build_binary_op): Likewise.
4559
393e8e8b
MP
45602014-01-23 Marek Polacek <polacek@redhat.com>
4561
4562 PR c/59846
4563 * c-typeck.c (parser_build_binary_op): Use location instead of
4564 input_location.
4565 (build_binary_op): Pass location to shorten_compare.
4566
f04dda30
MP
45672014-01-23 Marek Polacek <polacek@redhat.com>
4568
4569 PR c/58346
4570 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4571 an empty aggregate.
4572
789eadcd
MP
45732014-01-23 Marek Polacek <polacek@redhat.com>
4574
4575 PR c/59871
4576 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4577 of a comma expression.
4578 (emit_side_effect_warnings): Likewise.
4579
40f14e9f
BI
45802014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4581
4582 PR c/59825
4583 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4584 function to use walk_tree and moved a lot of its functionality to
4585 expand_array_notations.
4586 (expand_array_notations): New function.
4587
74558dd9
BI
45882014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4589
4590 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4591 attribute an attribute without value.
4592
652fea39
JJ
45932014-01-23 Jakub Jelinek <jakub@redhat.com>
4594
4595 PR middle-end/58809
4596 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4597 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4598
f34f1c87
MP
45992014-01-22 Marek Polacek <polacek@redhat.com>
4600
4601 PR c/59891
4602 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4603 of remove_c_maybe_const_expr on op1 and op2.
4604
241f845a
JJ
46052014-01-15 Jakub Jelinek <jakub@redhat.com>
4606
4607 PR c/58943
4608 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4609 effects, preevaluate rhs using SAVE_EXPR first.
4610
9a74f20c
BI
46112014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4612
4613 PR c++/59631
4614 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4615 statements with if-elseif statements.
4616
96066ce1
MP
46172014-01-06 Marek Polacek <polacek@redhat.com>
4618
4619 PR c/57773
4620 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4621 defined bit-field types only in ISO C.
4622
23a5b65a
RS
46232014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4624
4625 Update copyright years
4626
f9030485
RS
46272014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4628
4629 * c-array-notation.c: Use the standard form for the copyright notice.
4630
41958c28
BI
46312013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4632
4633 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4634 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4635 field in parser is not empty. If not-empty, call the function
4636 c_parser_finish_omp_declare_simd.
4637 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4638 between SIMD-enabled functions and #pragma simd. Added new parameter.
4639 (c_parser_cilk_all_clauses): Modified the usage of the function
4640 c_parser_cilk_clause_vectorlength as mentioned above.
4641 (c_parser_cilk_simd_fn_vector_attrs): New function.
4642 (c_finish_cilk_simd_fn_tokens): Likewise.
4643 (is_cilkplus_vector_p): Likewise.
4644 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4645 "nomask," and "mask" strings in clause name.
4646 (c_parser_omp_all_clauses): Added 3 new case statements:
4647 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4648 PRAGMA_CILK_CLAUSE_NOMASK.
4649 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4650 check for vector attribute and if so call the function
4651 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4652 called the function c_finish_cilk_simd_fn_tokens.
4653 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4654 parser field is non-empty. If so, parse them as you would parse
4655 the omp declare simd pragma.
4656 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4657 Added a check when step is a parameter and flag it as error.
4658 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4659 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4660 pragma_omp_clause.
4661
cef0fd0e
TS
46622013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4663
4664 * c-parser.c (c_parser_omp_parallel): Fix description.
4665
12893402
BI
46662013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4667
4668 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4669 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4670 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4671 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4672
296674db
JM
46732013-12-04 Joseph Myers <joseph@codesourcery.com>
4674
4675 PR c/52023
4676 * c-parser.c (c_parser_alignas_specifier): Use
4677 c_sizeof_or_alignof_type instead of c_alignof.
4678 (c_parser_alignof_expression): Likewise, with min_alignof
4679 parameter depending on alignof spelling used.
4680
edd28054
MP
46812013-12-04 Marek Polacek <polacek@redhat.com>
4682
4683 PR c/54113
4684 * c-decl.c (start_function): Don't warn for missing prototype for
4685 inline functions.
4686
da0fc454
MP
46872013-12-03 Marek Polacek <polacek@redhat.com>
4688
4689 PR c/59351
4690 * c-decl.c (build_compound_literal): Allow compound literals with
4691 empty initial value.
4692
4c2ecab0
JM
46932013-12-02 Joseph Myers <joseph@codesourcery.com>
4694
4695 PR c/58235
4696 * c-typeck.c (build_modify_expr): Diagnose assignment to
4697 expression with array type.
4698
340baef7
JM
46992013-11-29 Joseph Myers <joseph@codesourcery.com>
4700
4701 PR c/42262
4702 * c-typeck.c (process_init_element): Do not treat a string as
4703 initializing a whole array when used with a designator for an
4704 individual element.
4705
6763b9f7
JM
47062013-11-29 Joseph Myers <joseph@codesourcery.com>
4707
4708 PR c/57574
4709 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4710 an inline function following a static declaration.
4711
e7bd1de1
JJ
47122013-11-28 Jakub Jelinek <jakub@redhat.com>
4713
4714 PR c/59310
4715 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4716 to p_name before calling c_parser_omp_teams instead of after.
4717 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4718 argument. Remove unused p_name variable.
4719
0136f8f0
AH
47202013-11-27 Aldy Hernandez <aldyh@redhat.com>
4721 Jakub Jelinek <jakub@redhat.com>
4722
4723 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4724 external_scope is NULL.
4725
241b71bb
TV
47262013-11-27 Tom de Vries <tom@codesourcery.com>
4727 Marc Glisse <marc.glisse@inria.fr>
4728
4729 PR c++/59032
4730 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4731
2fb9a547
AM
47322013-11-22 Andrew MacLeod <amacleod@redhat.com>
4733
4734 * c-typeck.c: Add required include files from gimple.h.
4735
8400e75e
DM
47362013-11-22 David Malcolm <dmalcolm@redhat.com>
4737
4738 * c-decl.c (define_label, shadow_tag_warned)
4739 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4740 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4741 (declspecs_add_type): Remove use of in_system_header macro.
4742 * c-parser.c (c_parser_unary_expression): Likewise.
4743 * c-typeck.c (store_init_value, process_init_element)
4744 (c_start_case): Likewise.
4745
4746 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4747 macro.
4748
4749 * c-parser.c (c_parser_set_source_position_from_token): Remove
4750 reference to in_system_header from comment.
4751
386b1f1f
RS
47522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4753
4754 * c-decl.c (grokdeclarator): Update comment to refer to
4755 tree_to_[su]hwi rather than tree_low_cst.
4756
ae7e9ddd
RS
47572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4758
4759 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4760 tree_to_uhwi throughout.
4761
9439e9a1
RS
47622013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4763
4764 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4765 throughout.
4766
9541ffee
RS
47672013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4768
4769 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4770 throughout.
4771
c02065fc
AH
47722013-11-15 Aldy Hernandez <aldyh@redhat.com>
4773
4774 * c-parser.c (c_parser_cilk_simd): New.
4775 (c_parser_cilk_verify_simd): New.
4776 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4777 (c_parser_omp_for_loop): Add case for NE_EXPR.
4778 Set c_break_label for CILK_SIMD.
4779 (c_parser_cilk_clause_vectorlength): New.
4780 (c_parser_cilk_clause_linear): New.
4781 (c_parser_cilk_clause_name): New.
4782 (c_parser_cilk_all_clauses): New.
4783 * c-typeck.c (build_unary_op): Pass location argument to
4784 readonly_error.
4785 (build_modify_expr): Same.
4786 (build_asm_expr): Same.
4787 (c_finish_bc_stmt): Error on break/continue in loops.
4788
18f429e2
AM
47892013-11-14 Andrew MacLeod <amacleod@redhat.com>
4790
4791 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4792
d8a2d370
DN
47932013-11-14 Diego Novillo <dnovillo@google.com>
4794
4795 * c-decl.c: Include print-tree.h.
4796 Include stor-layout.h.
4797 Include varasm.h.
4798 Include attribs.h.
4799 Include stringpool.h.
4800 * c-lang.c: Include fold-const.h.
4801 * c-parser.c: Include stringpool.h.
4802 Include attribs.h.
4803 Include stor-layout.h.
4804 Include varasm.h.
4805 Include trans-mem.h.
4806 * c-typeck.c: Include stor-layout.h.
4807 Include trans-mem.h.
4808 Include varasm.h.
4809 Include stmt.h.
4810
38b7bc7f
JM
48112013-11-13 Joseph Myers <joseph@codesourcery.com>
4812
4813 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4814 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4815 __auto_type.
4816 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4817 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4818 RID_AUTO_TYPE.
4819 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4820 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4821 (c_parser_declarator, c_parser_direct_declarator_inner)
4822 (c_parser_parameter_declaration, c_parser_type_name): All callers
4823 changed.
4824 (c_parser_declaration_or_fndef): Handle declarations with type
4825 determined from the initializer.
4826
45b0be94
AM
48272013-11-12 Andrew MacLeod <amacleod@redhat.com>
4828
18f429e2 4829 * c-typeck.c: Include gimplify.h.
45b0be94 4830
582d9b50
JM
48312013-11-12 Joseph Myers <joseph@codesourcery.com>
4832
4833 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4834 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4835 comment.
4836 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4837 or _Thread_local as appropriate in diagnostics.
4838 (build_null_declspecs): Initialize ret->thread_gnu_p.
4839 (declspecs_add_scspec): Handle either __thread or _Thread_local
4840 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4841 pedantic. Do not disallow _Thread_local extern and _Thread_local
4842 static.
4843
267bac10
JM
48442013-11-07 Joseph Myers <joseph@codesourcery.com>
4845 Andrew MacLeod <amacleod@redhat.com>
4846
4847 * c-aux-info.c (gen_type): Handle atomic qualifier.
4848 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4849 qualifiers when compating types.
4850 (shadow_tag_warned): Handle atomic_p in declspecs.
4851 (quals_from_declspecs): Likewise.
4852 (start_decl): Use c_type_promotes_to when promoting argument
4853 types.
4854 (grokdeclarator): Handle _Atomic.
4855 (get_parm_info): Diagnose any qualifier on "void" as only
4856 parameter.
4857 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4858 comparing types. Use c_type_promotes_to when promoting argument
4859 types.
4860 (finish_function): Use c_type_promotes_to when promoting argument
4861 types.
4862 (build_null_declspecs): Handle atomic_p in declspecs.
4863 (declspecs_add_qual): Handle RID_ATOMIC.
4864 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4865 (c_token_starts_declspecs): Handle RID_ATOMIC.
4866 (c_parser_declspecs): Handle atomic type specifiers and
4867 qualifiers.
4868 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4869 from types of expressions with atomic type.
4870 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4871 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4872 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4873 (c_parser_statement_after_labels, c_parser_switch_statement)
4874 (c_parser_for_statement, c_parser_expr_no_commas)
4875 (c_parser_conditional_expression, c_parser_binary_expression)
4876 (c_parser_cast_expression, c_parser_unary_expression)
4877 (c_parser_postfix_expression)
4878 (c_parser_postfix_expression_after_primary, c_parser_expression):
4879 Use convert_lvalue_to_rvalue.
4880 (c_parser_expression_conv, c_parser_expr_list): Document
4881 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4882 (c_parser_objc_synchronized_statement): Use
4883 convert_lvalue_to_rvalue.
4884 (c_parser_objc_selector): Handle RID_ATOMIC.
4885 (c_parser_objc_receiver, c_parser_array_notation): Use
4886 convert_lvalue_to_rvalue.
4887 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4888 _Atomic (type-name).
4889 (struct c_declspecs): Add atomic_p field.
4890 (convert_lvalue_to_rvalue): Declare.
4891 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4892 corresponding atomic types.
4893 (qualify_type): Don't add _Atomic qualifiers from second argument.
4894 (comp_target_types): Do not allow _Atomic mismatches.
4895 (type_lists_compatible_p): Do not remove atomic qualifiers when
4896 comparing types.
4897 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4898 (build_atomic_assign): New functions.
4899 (build_unary_op): Use build_atomic_assign for atomic increment and
4900 decrement.
4901 (build_conditional_expr): Do not treat _Atomic void as a qualified
4902 version of void.
4903 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4904 (find_anonymous_field_with_type, convert_to_anonymous_field)
4905 (convert_for_assignment): Do not remove atomic qualifiers when
4906 comparing types.
4907 (digest_init): Do not accept initialization of arrays of atomic
4908 elements by string constants.
4909 (build_asm_expr): Use convert_lvalue_to_rvalue.
4910 (build_binary_op): Do not treat _Atomic void as a qualified
4911 version of void.
4912
0c249d4b
DD
49132013-11-06 DJ Delorie <dj@redhat.com>
4914
4915 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4916 both explicit and builtin, print the location of the explicit one.
4917
6d7f7e0a
TB
49182013-11-05 Tobias Burnus <burnus@net-b.de>
4919
4920 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4921 c_parser_omp_distribute, c_parser_omp_teams,
4922 c_parser_omp_target, c_parser_omp_declare): Handle
4923 -fopenmp-simd.
4924
b906f4ca
MP
49252013-11-03 Marek Polacek <polacek@redhat.com>
4926
4927 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4928
ee1d5a02
JJ
49292013-11-01 Jakub Jelinek <jakub@redhat.com>
4930
4931 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4932 check_dup_generic at the end, unless remove is true.
4933 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4934 remove = true;.
4935 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4936
5a9785fb
JJ
49372013-10-31 Jakub Jelinek <jakub@redhat.com>
4938
4939 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4940 with decl that is not pointer nor array.
4941
939b37da
BI
49422013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4943
4944 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4945 a spawning function is found.
4946 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4947 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4948 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4949 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4950 case.
4951 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4952 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4953 expr.
4954 (c_finish_return): Added a check to reject _Cilk_spawn in return
4955 expression.
4956 (build_cilk_spawn): New function.
4957 (build_cilk_sync): Likewise.
4958 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4959
d4af74d4
TB
49602013-10-27 Tobias Burnus <burnus@net-b.de>
4961
4962 PR other/33426
4963 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4964 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4965 (c_parser_statement_after_labels): Update calls.
4966
d73749df 49672013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4968
4969 PR other/33426
4970 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4971 Handle PRAGMA_IVDEP.
4972 (c_parser_statement_after_labels): Update call.
4973
f28aa681
MP
49742013-10-24 Marek Polacek <polacek@redhat.com>
4975
4976 * c-parser.c (c_parser_struct_declaration): Add a comment.
4977 (c_parser_declarator): Don't allow _Alignas here.
4978
0645c1a2
AM
49792013-10-17 Andrew MacLeod <amacleod@redhat.com>
4980
4981 * c-parser.c: Include omp-low.h.
4982 * c-typeck.c: Likewise.
4983
568a31f2
MP
49842013-10-17 Marek Polacek <polacek@redhat.com>
4985
4986 PR c/58267
4987 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4988 Document syntax of the array-declarator.
4989 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4990 are not permitted.
4991 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4992 (c_parser_struct_declaration): Likewise.
4993 (c_parser_declarator): Likewise.
4994 (c_parser_direct_declarator_inner): Likewise.
4995 (c_parser_parameter_declaration): Likewise.
4996 (c_parser_type_name): Likewise.
4997
acf0174b
JJ
49982013-10-11 Jakub Jelinek <jakub@redhat.com>
4999
5000 * c-lang.h (current_omp_declare_target_attribute): New extern
5001 decl.
5002 * c-parser.c: Include c-lang.h.
5003 (struct c_parser): Change tokens to c_token *.
5004 Add tokens_buf field. Change tokens_avail type to unsigned int.
5005 (c_parser_consume_token): If parser->tokens isn't
5006 &parser->tokens_buf[0], increment parser->tokens.
5007 (c_parser_consume_pragma): Likewise.
5008 (enum pragma_context): Add pragma_struct and pragma_param.
5009 (c_parser_external_declaration): Adjust
5010 c_parser_declaration_or_fndef caller.
5011 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5012 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5013 Adjust recursive call.
5014 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5015 of pragma_external.
5016 (c_parser_parameter_declaration): Use pragma_param instead of
5017 pragma_external.
5018 (c_parser_compound_statement_nostart, c_parser_label,
5019 c_parser_for_statement): Adjust
5020 c_parser_declaration_or_fndef callers.
5021 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5022 it through to c_parser_conditional_expression.
5023 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5024 pass it through to c_parser_binary_expression. Adjust recursive
5025 call.
5026 (c_parser_binary_expression): Remove prec argument, add
5027 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5028 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5029 binop matches it, use build2 instead of parser_build_binary_op.
5030 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5031 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5032 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5033 Handle pragma_struct and pragma_param the same as pragma_external.
5034 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5035 (c_parser_omp_variable_list): Parse array sections for
5036 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5037 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5038 (c_parser_omp_clause_reduction): Handle user defined reductions.
5039 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5040 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5041 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5042 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5043 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5044 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5045 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5046 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5047 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5048 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5049 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5050 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5051 (c_parser_omp_for_loop): Add CODE argument, pass it through
5052 to c_finish_omp_for. Change last argument to cclauses,
5053 and adjust uses to grab parallel clauses from the array of all
5054 the split clauses. Adjust c_parser_binary_expression,
5055 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5056 (omp_split_clauses): New function.
5057 (c_parser_omp_simd): New function.
5058 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5059 Allow the function to be called also when parsing combined constructs,
5060 and call c_parser_omp_simd when parsing for simd.
5061 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5062 #pragma omp section, require exactly one structured-block instead of
5063 sequence of statements.
5064 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5065 Allow the function to be called also when parsing combined constructs.
5066 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5067 Allow the function to be called also when parsing combined
5068 constructs.
5069 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5070 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5071 c_parser_omp_teams, c_parser_omp_target_data,
5072 c_parser_omp_target_update, c_parser_omp_target,
5073 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5074 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5075 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5076 (c_parser_omp_construct): Add p_name and mask vars. Handle
5077 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5078 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5079 and c_parser_omp_sections callers.
5080 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5081 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5082 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5083 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5084 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5085 OMP_CLAUSE_DEPEND.
5086 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5087 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5088 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5089 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5090 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5091 * c-typeck.c: Include tree-inline.h.
5092 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5093 handle_omp_array_sections_1, handle_omp_array_sections,
5094 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5095 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5096 user defined reductions.
5097 (c_tree_equal): New function.
5098 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5099 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5100 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5101 c_check_omp_declare_reduction_r): New prototypes.
5102 * c-decl.c (current_omp_declare_target_attribute): New variable.
5103 (c_decl_attributes): New function.
5104 (start_decl, start_function): Use it instead of decl_attributes.
5105 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5106 c_omp_reduction_decl, c_omp_reduction_lookup,
5107 c_check_omp_declare_reduction_r): New functions.
5108
0a6c2227
TT
51092013-09-25 Tom Tromey <tromey@redhat.com>
5110
5111 * Make-lang.in (c/gccspec.o): Remove.
5112 (CFLAGS-c/gccspec.o): New variable.
5113 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5114 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5115 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5116
f3bc55f0
TT
51172013-09-25 Tom Tromey <tromey@redhat.com>
5118
5119 * Make-lang.in (c/gccspec.o): Don't use subshell.
5120
a24d975c
MP
51212013-09-18 Marek Polacek <polacek@redhat.com>
5122
5123 PR sanitize/58443
5124 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5125 Remove unnecessary check.
5126
ce6923c5
MP
51272013-09-18 Marek Polacek <polacek@redhat.com>
5128
5129 PR sanitizer/58411
5130 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5131 no_sanitize_undefined attribute.
5132
a1e51df9
KT
51332013-09-13 Kai Tietz <ktietz@redhat.com>
5134
5135 PR target/57848
5136 * c-decl.c (c_builtin_function_ext_scope): Remove
5137 wrong assumption that it is never called on prexisting
5138 symbol.
5139
0af94e6f
JR
51402013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5141
5142 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5143
20059c8b
GDR
51442013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5145
5146 * c-objc-common.c (c_tree_printer): Tidy.
5147
de5a5fa1
MP
51482013-08-30 Marek Polacek <polacek@redhat.com>
5149
5150 * c-typeck.c (build_binary_op): Add division by zero and shift
5151 instrumentation.
5152
2531a1d9 51532013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5154 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5155
6e2bcc98 5156 PR c/35649
2531a1d9
JR
5157 * c-typeck.c (c_common_type): Prefer double_type_node over
5158 other REAL_TYPE types with the same precision.
5159 (convert_arguments): Likewise.
5160
025311c4
GDR
51612013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5162
5163 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5164 (c_initialize_diagnostics): Call a destructor for the early printer.
5165
da6ca2b5
GDR
51662013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5167
5168 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5169 printer initialization.
5170
318cda85 51712013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5172
318cda85
BI
5173 PR c/57490
5174 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5175 check for truth values.
5176 (expand_array_notation_exprs): Added truth values case. Removed an
5177 unwanted else. Added for-loop to walk through subtrees in default
5178 case.
5179
b066401f
GDR
51802013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5181
5182 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5183
fb48aadc
JM
51842013-07-23 Joseph Myers <joseph@codesourcery.com>
5185
5186 * c-parser.c (struct c_generic_association): Fix typo.
5187
433cc7b0
TT
51882013-07-23 Tom Tromey <tromey@redhat.com>
5189 Joseph Myers <joseph@codesourcery.com>
5190
5191 * c-parser.c (struct c_generic_association): New.
5192 (c_generic_association_d): New typedef.
5193 (c_parser_generic_selection): New function.
5194 (c_parser_postfix_expression): Handle RID_GENERIC.
5195
26d40c3d
JM
51962013-07-13 Jason Merrill <jason@redhat.com>
5197
5198 PR c++/57793
5199 * c-decl.c (finish_struct): Check for too-large class.
5200
ecdbd01a 52012013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5202
5203 PR c/57821
5204 * c-typeck.c (set_init_index): When folding, check for index overflow.
5205
1141ed3f
BI
52062013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5207
5208 * c-parser.c (c_parser_array_notation): Removed rejection of array
5209 notations in an array of function pointers.
5210
713b46fa
BI
52112013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5212
5213 * c-array-notation.c (make_triplet_val_inv): New function.
5214 (create_cmp_incr): Likewise.
5215 (create_array_refs): Likewise.
5216 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5217 Also modularized common parts between functions and called the function.
5218 (build_array_notation_expr): Likewise.
5219 (fix_conditional_array_notations_1): Likewise.
5220 (fix_array_notation_expr): Likewise.
5221 (fix_array_notation_call_expr): Likewise.
5222
92f20202
MP
52232013-06-18 Marek Polacek <polacek@redhat.com>
5224
5225 PR c/57630
5226 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5227
73a23b06
BI
52282013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5229
5230 * c-array-notation.c (build_array_notation_expr): Reject array notation
5231 mismatch between LHS and RHS even inside a call_expr. Also, removed
5232 a couple while statements that were dead code.
5233
00b8517d
BI
52342013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5235
5236 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5237 excessive precision expressions in function parameters. Also removed
5238 couple unwanted while statements.
5239
1509bdda
BI
52402013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5241
5242 * c-array-notation.c (expand_array_notation_exprs): Added
5243 ARRAY_NOTATION_REF case.
5244
d60f1706
BI
52452013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5246
5247 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5248 function to c-family/array-notation-common.c.
5249 (is_cilkplus_reduce_builtin): Likewise.
5250 (find_rank): Likewise.
5251 (extract_array_notation_exprs): Likewise.
5252 (replace_array_notations): Likewise.
5253 (find_inv_trees): Likewise.
5254 (replace_inv_trees): Likewise.
5255 (contains_array_notation_expr): Likewise.
5256 (find_correct_array_notation_type): Likewise.
5257 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5258 (struct inv_list): Moved this to c-family/array-notation-common.c.
5259 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5260
6d6efbb3
BI
52612013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5262
5263 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5264 reduction functions outside the for-loop. Added a check if the fundecl
5265 is non-NULL. Finally, removed an unwanted if-statement, and made the
5266 body unconditional.
5267
25c22937
BI
52682013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5269
5270 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5271 condition of the if-statement matches the rank of else-block and then-
5272 block when array notations are used.
5273 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5274 expression after the entire function body is parsed.
5275 (c_parser_expr_no_commas): Delayed creating array notation expressions
5276 to the end of function parsing.
5277 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5278 whole if-statement instead of just the condition.
5279 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5280
edd25645
BI
52812013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5282
5283 PR c/57474
5284 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5285 array to NULL_TREE if they are unused. Also added a check for the
5286 field to be NULL before its fields are used in future.
5287
065ce7f1
RO
52882013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5289
5290 PR bootstrap/57450
5291 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5292 (build_array_notation_expr): Likewise.
5293
36536d79
BI
52942013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5295
5296 * c-typeck.c (build_array_ref): Added a check to see if array's
5297 index is greater than one. If true, then emit an error.
5298 (build_function_call_vec): Exclude error reporting and checking
5299 for builtin array-notation functions.
5300 (convert_arguments): Likewise.
5301 (c_finish_return): Added a check for array notations as a return
5302 expression. If true, then emit an error.
5303 (c_finish_loop): Added a check for array notations in a loop
5304 condition. If true then emit an error.
5305 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5306 (build_binary_op): Added a check for array notation expr inside
5307 op1 and op0. If present, we call another function to find correct
5308 type.
5309 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5310 * c-parser.c (c_parser_compound_statement): Check if array
5311 notation code is used in tree, if so, then transform them into
5312 appropriate C code.
5313 (c_parser_expr_no_commas): Check if array notation is used in LHS
5314 or RHS, if so, then build array notation expression instead of
5315 regular modify.
5316 (c_parser_postfix_expression_after_primary): Added a check for
5317 colon(s) after square braces, if so then handle it like an array
5318 notation. Also, break up array notations in unary op if found.
5319 (c_parser_direct_declarator_inner): Added a check for array
5320 notation.
5321 (c_parser_compound_statement): Added a check for array notation in
5322 a stmt. If one is present, then expand array notation expr.
5323 (c_parser_if_statement): Likewise.
5324 (c_parser_switch_statement): Added a check for array notations in
5325 a switch statement's condition. If true, then output an error.
5326 (c_parser_while_statement): Similarly, but for a while.
5327 (c_parser_do_statement): Similarly, but for a do-while.
5328 (c_parser_for_statement): Similarly, but for a for-loop.
5329 (c_parser_unary_expression): Check if array notation is used in a
5330 pre-increment or pre-decrement expression. If true, then expand
5331 them.
5332 (c_parser_array_notation): New function.
5333 * c-array-notation.c: New file.
5334 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5335
cd192ccc
MS
53362013-05-23 Mike Stump <mikestump@comcast.net>
5337
5338 * c-typeck.c (convert_for_assignment): Handle references to memory
5339 spaces better.
5340
427b248d
JM
53412013-05-16 Jason Merrill <jason@redhat.com>
5342
5343 * Make-lang.in (cc1$(exeext)): Use link mutex.
5344
44d90fe1
PC
53452013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5346
5347 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5348 to simply use OPT_Wpointer_arith.
5349 (build_unary_op): Likewise.
5350
4e7d7b3d
JJ
53512013-04-03 Jakub Jelinek <jakub@redhat.com>
5352
5353 PR c/19449
5354 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5355 argument. If set, or it temporarily for parsing of the first
5356 argument into force_folding_builtin_constant_p.
5357 (c_parser_postfix_expression): Adjust callers.
5358
839b422f
RB
53592013-03-21 Richard Biener <rguenther@suse.de>
5360
5361 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5362 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5363
2ee028f1
MP
53642013-02-12 Marek Polacek <polacek@redhat.com>
5365
5366 PR c/44938
5367 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5368 origtypes to NULL.
5369
8824edff
JJ
53702013-01-24 Jakub Jelinek <jakub@redhat.com>
5371
5372 PR c/56078
5373 * c-typeck.c (set_nonincremental_init_from_string): If
5374 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5375 returned false.
5376 (process_init_element): Likewise.
5377
eadd3d0d
JJ
53782012-12-20 Jakub Jelinek <jakub@redhat.com>
5379
5380 PR c++/55619
5381 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5382 argument, don't call default_function_array_conversion
5383 nor c_fully_fold here.
5384 (c_parser_asm_statement): Adjust callers.
5385 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5386 and outputs here, and call default_function_array_conversion
5387 on inputs that don't need to be addressable.
5388
f8a93a2e
JJ
53892012-12-18 Jakub Jelinek <jakub@redhat.com>
5390
5391 PR c/39464
5392 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5393 warning require that both c_common_unsigned_type as well as
5394 c_common_signed_type is the same for both mvl and mvr types.
5395
9771b263
DN
53962012-11-16 Diego Novillo <dnovillo@google.com>
5397
5398 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5399
5400 * c-common.c: Use new vec API in vec.h.
5401 * c-common.h: Likewise.
5402 * c-gimplify.c: Likewise.
5403 * c-pragma.c: Likewise.
5404 * c-pretty-print.c: Likewise.
5405 * c-pretty-print.h: Likewise.
5406 * c-semantics.c: Likewise.
5407 * c-decl.c: Likewise.
5408 * c-parser.c: Likewise.
5409 * c-tree.h: Likewise.
5410 * c-typeck.c: Likewise.
5411
880661a4
JW
54122012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5413
5414 PR c++/54930
5415 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5416
077d1abe
MLI
54172012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5418
5419 PR c/53066
5420 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5421 shadows a function, unless the variable is a function or a
5422 pointer-to-function.
5423
3a785c97
JJ
54242012-10-12 Jakub Jelinek <jakub@redhat.com>
5425
5426 PR c/54381
5427 * c-parser.c (struct c_tree_loc_pair): Removed.
5428 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5429 add location_t * and tree * arguments, fill in array of 3
5430 sizeof_arg trees and corresponding locs.
5431 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5432 c_parser_expr_list callers.
5433 (c_parser_postfix_expression_after_primary): Likewise. Pass
5434 array of 3 sizeof_arg trees and locs (corresponding to first
5435 3 arguments) to sizeof_pointer_memaccess_warning.
5436
703c8606
LC
54372012-10-09 Lawrence Crowl <crowl@google.com>
5438
5439 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5440 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5441 hash table.
5442
5d9de0d0
PC
54432012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5444
5445 PR c++/54194
5446 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5447 call.
5448
a212e43f
MG
54492012-10-09 Marc Glisse <marc.glisse@inria.fr>
5450
5451 PR c++/54427
5452 * c-typeck.c: Include c-common.h.
5453 (enum stv_conv): Moved to c-common.h.
5454 (scalar_to_vector): Moved to c-common.c.
5455 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5456 * Make-lang.in: c-typeck.c depends on c-common.h.
5457
3b78de56
AC
54582012-10-04 Arnaud Charlet <charlet@adacore.com>
5459
5460 * c-decl.c (c_write_global_declarations): Fix handling of
5461 -fdump-ada-spec*.
5462
78c60e3d
SS
54632012-09-30 Sharad Singhai <singhai@google.com>
5464
5465 * c-decl.c (c_write_global_declarations): Use a different method
5466 to determine if the dump has ben initialized.
5467
9f33203d
JM
54682012-09-14 Joseph Myers <joseph@codesourcery.com>
5469
5470 PR c/54552
5471 * c-typeck.c (c_cast_expr): When casting to a type requiring
5472 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5473 c_fully_fold first.
5474
a27d595d
JM
54752012-09-14 Joseph Myers <joseph@codesourcery.com>
5476
5477 PR c/54103
5478 * c-typeck.c (build_unary_op): Pass original argument of
5479 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5480 any C_MAYBE_CONST_EXPR, if it has integer operands.
5481 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5482 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5483 to c_objc_common_truthvalue_conversion, then remove any
5484 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5485 c_objc_common_truthvalue_conversion not
5486 c_common_truthvalue_conversion.
5487 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5488 call note_integer_operands for arguments with integer operands
5489 that are not integer constants.
5490
9feb29df
JJ
54912012-09-13 Jakub Jelinek <jakub@redhat.com>
5492
5493 PR c/54559
5494 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5495 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5496
d409320c
JJ
54972012-08-31 Jakub Jelinek <jakub@redhat.com>
5498
5499 PR c/54428
5500 * c-convert.c (convert): Don't call fold_convert_loc if
5501 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5502 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5503 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5504
6265d07c
JJ
55052012-08-24 Jakub Jelinek <jakub@redhat.com>
5506
5507 PR c/54355
5508 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5509 for nested and empty_ok arguments in the call to
5510 c_parser_declaration_or_fndef.
5511
1a4049e7
JJ
55122012-08-17 Jakub Jelinek <jakub@redhat.com>
5513
5514 * c-tree.h (c_last_sizeof_arg): Declare.
5515 * c-parser.c (struct c_tree_loc_pair): New type.
5516 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5517 non-NULL.
5518 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5519 (c_parser_postfix_expression_after_primary): Likewise. Call
5520 sizeof_pointer_memaccess_warning if needed.
5521 (sizeof_ptr_memacc_comptypes): New function.
5522 * c-typeck.c (c_last_sizeof_arg): New global variable.
5523 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5524
0229aee9
UB
55252012-07-24 Uros Bizjak <ubizjak@gmail.com>
5526
5527 * c-lang.h (lang_decl): Add variable_size GTY option.
5528
7ee2468b
SB
55292012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5530
5531 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5532 * Make-lang.in: Fix dependencies.
5533
d4a10d0a
SB
55342012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5535
5536 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5537 and add language Makefile hooks.
5538 * config-lang.in: New file.
5539 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5540 add the required "normal" config-lang.in rules.
5541 * c-lang.h: Moved from gcc/ to here.
5542 * c-tree.h: Likewise.
5543 * c-objc-common.c: Likewise.
5544 * c-objc-common.h: Likewise.
5545 * c-typeck.c: Likewise.
5546 * c-convert.c: Likewise.
5547 * c-lang.c: Likewise.
5548 * c-aux-info.c: Likewise.
5549 * c-errors.c: Likewise.
5550 * gccspec.c: Likewise.
5551 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5552 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5553\f
85ec4feb 5554Copyright (C) 2012-2018 Free Software Foundation, Inc.
d4a10d0a
SB
5555
5556Copying and distribution of this file, with or without modification,
5557are permitted in any medium without royalty provided the copyright
5558notice and this notice are preserved.