]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR ada/85007 (-b flag to gnatlink not recognized)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
c5c5822a
JM
12018-03-21 Joseph Myers <joseph@codesourcery.com>
2
3 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
4 where all functions return the same _FloatN or _FloatNx type,
5 treat integer types as _Float64 instead of double.
6
aa1c9429
JJ
72018-03-21 Jakub Jelinek <jakub@redhat.com>
8
9 PR c/84999
10 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
11 building vector comparison, diagnose it and return error_mark_node.
12
9bb45a95
JJ
132018-03-15 Jakub Jelinek <jakub@redhat.com>
14
15 PR c/84853
16 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
17 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
18 INTEGER_TYPE element type.
19
ada6bad9
DP
202018-03-13 David Pagan <dave.pagan@oracle.com>
21
22 PR c/46921
23 * c-typeck.c (output_init_element): Ensure field initializer
24 expression is always evaluated if there are side effects.
25
849bbdb9
JJ
262018-03-06 Jakub Jelinek <jakub@redhat.com>
27
28 PR c/84721
29 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
30 !building_stmt_list_p ().
31
d74641bd
RS
322018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
33
34 PR c/84305
35 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
36 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
37 and include the BIND_EXPR in the list of things that need to be
38 pre-evaluated.
39
0444aa9c
NS
402018-02-09 Nathan Sidwell <nathan@acm.org>
41
42 PR c/84293
43 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
44 to strict_aliasing_warning.
45
7c30b12a
PC
462018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
47
48 * c-typeck.c (really_start_incremental_init, push_init_level,
49 set_nonincremental_init, output_init_element, process_init_element):
50 Use DECL_UNNAMED_BIT_FIELD.
51
2be4dfcb
MP
522018-01-31 Marek Polacek <polacek@redhat.com>
53
54 PR c/81779
55 * c-parser.c (c_parser_compound_statement_nostart): Call
56 expansion_point_location_if_in_system_header.
57
bb9869d5
DM
582018-01-17 David Malcolm <dmalcolm@redhat.com>
59
60 PR c++/83814
61 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
62 the C part.
63
b4923738
JJ
642018-01-13 Jakub Jelinek <jakub@redhat.com>
65
66 PR c/83801
67 * c-tree.h (decl_constant_value_1): Add a bool argument.
68 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
69 returning a CONSTRUCTOR if it is true. Use error_operand_p.
70 (decl_constant_value): Adjust caller.
71 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
72 decl_constant_value_1 as IN_INIT. Otherwise, punt if
73 decl_constant_value returns initializer that has BLKmode or
74 array type.
75 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
76
928686b1
RS
772018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
78 Alan Hayward <alan.hayward@arm.com>
79 David Sherwood <david.sherwood@arm.com>
80
81 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
82 TYPE_VECTOR_SUBPARTS.
83
85ec4feb
JJ
842018-01-03 Jakub Jelinek <jakub@redhat.com>
85
86 Update copyright years.
87
913884f7
JJ
882018-01-01 Jakub Jelinek <jakub@redhat.com>
89
90 PR c/83595
91 * c-parser.c (c_parser_braced_init, c_parser_initelt,
92 c_parser_conditional_expression, c_parser_cast_expression,
93 c_parser_sizeof_expression, c_parser_alignof_expression,
94 c_parser_postfix_expression, c_parser_omp_declare_reduction,
95 c_parser_transaction_expression): Use set_error () method instead
96 of setting value member to error_mark_node.
97
c6cfa2bf
MM
982017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
99
100 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
101 and _Float<N>X built-in functions.
102
11d29d63
JJ
1032017-12-22 Jakub Jelinek <jakub@redhat.com>
104
14ec014e
JJ
105 PR debug/83550
106 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
107 TYPE_STUB_DECL and call rest_of_type_compilation before processing
108 incomplete vars rather than after it.
109
11d29d63
JJ
110 PR debug/83547
111 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
112 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
113 and consider empty ones if there are no other stmts. For
114 -Wunused-value walk all statements before the one only followed by
115 DEBUG_BEGIN_STMTs.
116
170a8bd6
EB
1172017-12-22 Mike Stump <mikestump@comcast.net>
118 Eric Botcazou <ebotcazou@adacore.com>
119
120 * c-parser.c (c_parser_while_statement): Add unroll parameter and
121 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
122 (c_parser_do_statement): Likewise.
123 (c_parser_for_statement): Likewise.
124 (c_parser_statement_after_labels): Adjust calls to above.
125 (c_parse_pragma_ivdep): New static function.
126 (c_parser_pragma_unroll): Likewise.
127 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
128 <PRAGMA_UNROLL>: New case.
129
01512446
JJ
1302017-12-19 Jakub Jelinek <jakub@redhat.com>
131
132 * c-typeck.c (comptypes_internal, function_types_compatible_p,
133 perform_integral_promotions, digest_init): Replace Yoda conditions
134 with typical order conditions.
135 * c-decl.c (check_bitfield_type_and_width): Likewise.
136
c65e18d3
BE
1372017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
138
139 * c-typeck.c (c_safe_arg_type_equiv_p,
140 c_safe_function_type_cast_p): New function.
141 (build_c_cast): Implement -Wcast-function-type.
142
b7280579
RB
1432017-12-14 Richard Biener <rguenther@suse.de>
144
145 PR c/83415
146 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
147 like REALPART_EXPR for the behavior of whether its operand
148 is an lvalue.
149
49e6a6c0
MP
1502017-12-12 Marek Polacek <polacek@redhat.com>
151
152 PR c/82679
153 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
154
96a95ac1
AO
1552017-12-12 Alexandre Oliva <aoliva@redhat.com>
156
157 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
158 * c-parser.c (add_debug_begin_stmt): New.
159 (c_parser_declaration_or_fndef): Call it.
160 (c_parser_compound_statement_nostart): Likewise.
161 (c_parser_statement_after_labels): Likewise.
162 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
163
4b2b493f
JM
1642017-12-07 Joseph Myers <joseph@codesourcery.com>
165
166 * c-decl.c (build_compound_literal): Add parameter alignas_align
167 and set alignment of decl if nonzero.
168 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
169 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
170 qualifier.
171 (c_parser_struct_declaration): Update syntax comment.
172 (c_parser_type_name): Add alignas_ok argument and pass it to
173 c_parser_declspecs.
174 (c_parser_cast_expression): Pass true to c_parser_type_name and
175 give error if a cast used an _Alignas specifier.
176 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
177 give error if sizeof (type-name) used an _Alignas specifier.
178 (c_parser_alignof_expression): Pass true to c_parser_type_name and
179 give error if _Alignof (type-name) used an _Alignas specifier.
180 (c_parser_postfix_expression_after_paren_type): Check specified
181 alignment for a compound literal and pass it to
182 build_compound_literal.
183 * c-parser.h (c_parser_type_name): Update prototype.
184 * c-tree.h (build_compound_literal): Update prototype.
185
5d9ae53d
MS
1862017-12-07 Martin Sebor <msebor@redhat.com>
187
188 PR c/81544
189 * c-decl.c (c_decl_attributes): Look up existing declaration and
190 pass it to decl_attributes.
191
c79144f8
DM
1922017-12-06 David Malcolm <dmalcolm@redhat.com>
193
194 PR c/83236
195 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
196 reserved for use by the implementation.
197
613bc14f
DM
1982017-12-06 David Malcolm <dmalcolm@redhat.com>
199
200 * c-decl.c: Include "c-family/c-spellcheck.h".
201
05abad4c
ML
2022017-12-05 Martin Liska <mliska@suse.cz>
203 Jakub Jelinek <jakub@redhat.com>
204
205 * c-typeck.c (pointer_diff): Add new argument and instrument
206 pointer subtraction.
207 (build_binary_op): Similar for pointer comparison.
208
cc6534d4
JJ
2092017-12-01 Jakub Jelinek <jakub@redhat.com>
210
65791f42
JJ
211 PR c/79153
212 * c-parser.c: Include tree-iterator.h.
213 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
214 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
215 on it.
216
cc6534d4
JJ
217 PR c/83222
218 * c-tree.h (decl_constant_value_1): Declare.
219 * c-typeck.c (decl_constant_value_1): New function.
220 (decl_constant_value): Use it.
221 * c-fold.c (c_fully_fold_internal): If in_init, use
222 decl_constant_value_1 instead of decl_constant_value.
223
5de73c05
JJ
2242017-11-30 Jakub Jelinek <jakub@redhat.com>
225
226 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
227
058f0b9e
JJ
2282017-11-28 Jakub Jelinek <jakub@redhat.com>
229
230 PR sanitizer/81275
231 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
232 c_switch_covers_all_cases_p returns true.
233
5e9d6aa4
JK
2342017-11-28 Julia Koval <julia.koval@intel.com>
235 Sebastian Peryt <sebastian.peryt@intel.com>
236
237 * Make-lang.in (c/c-array-notation.o): Remove.
238 * c-array-notation.c: Delete.
239 * c-decl.c: Remove cilkplus condition.
240 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
241 c_parser_cilk_verify_simd, c_parser_array_notation,
242 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
243 c_parser_cilk_simd_fn_vector_attrs,
244 c_finish_cilk_simd_fn_tokens): Delete.
245 (c_parser_declaration_or_fndef): Remove cilkplus condition.
246 (c_parser_direct_declarator_inner): Ditto.
247 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
248 (c_parser_attributes, c_parser_compound_statement,
249 c_parser_statement_after_labels, c_parser_if_statement,
250 c_parser_switch_statement, c_parser_while_statement,
251 c_parser_do_statement, c_parser_for_statement,
252 c_parser_unary_expression, c_parser_postfix_expression,
253 c_parser_postfix_expression_after_primary,
254 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
255 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
256 support.
257 * c-typeck.c (build_array_ref, build_function_call_vec,
258 convert_arguments,
259 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
260 c_finish_loop, build_binary_op): Remove cilkplus support.
261
9e851845
JJ
2622017-11-28 Jakub Jelinek <jakub@redhat.com>
263
264 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
265 of build3.
266
8c7dbea9
BK
2672017-11-14 Boris Kolpackov <boris@codesynthesis.com>
268
269 * Make-lang.in (c.install-plugin): Install backend import library.
270
41521dee
JJ
2712017-11-23 Jakub Jelinek <jakub@redhat.com>
272
273 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
274 pragma_stmt context.
275
ac9effed
EB
2762017-11-23 Mike Stump <mikestump@comcast.net>
277 Eric Botcazou <ebotcazou@adacore.com>
278
279 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
280 ANNOTATE_EXPR.
281 (c_parser_do_statement): Likewise.
282 (c_parser_for_statement): Likewise.
283
ce95abc4
DM
2842017-11-22 David Malcolm <dmalcolm@redhat.com>
285
286 PR c++/62170
287 * c-objc-common.c (c_tree_printer): Convert penultimate param from
288 bool to bool *. Within '%T' handling, if showing an "aka", use
289 "quoted" param to add appropriate quoting.
290
974aedcc
MP
2912017-11-22 Marek Polacek <polacek@redhat.com>
292
293 PR c++/60336
294 PR middle-end/67239
295 PR target/68355
296 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
297
d4300cc6
DM
2982017-11-21 David Malcolm <dmalcolm@redhat.com>
299
300 PR c/83056
301 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
302 earlier failed lookups.
303
1af4ebf5
MG
3042017-11-21 Marc Glisse <marc.glisse@inria.fr>
305
306 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
307 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
308
26edace6
DM
3092017-11-20 David Malcolm <dmalcolm@redhat.com>
310
311 PR c/81404
312 * c-decl.c: Include "c-family/known-headers.h".
313 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
314 to known-headers.cc.
315 (class suggest_missing_header): Move to known-header.h.
316 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
317 than get_c_name_hint.
318
b1212255
DM
3192017-11-20 David Malcolm <dmalcolm@redhat.com>
320
321 * c-decl.c (get_c_name_hint): New function.
322 (class suggest_missing_header): New class.
323 (lookup_name_fuzzy): Call get_c_name_hint and use it to
324 suggest missing headers to the user.
325
6c7a259b
DM
3262017-11-20 David Malcolm <dmalcolm@redhat.com>
327
328 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
329 Include "c-family/name-hint.h"
330 (implicit_decl_warning): Convert "hint" from
331 const char * to name_hint. Pass location to
332 lookup_name_fuzzy. Suppress any deferred diagnostic if the
333 warning was not printed.
334 (undeclared_variable): Likewise for "guessed_id".
335 (lookup_name_fuzzy): Convert return type from const char *
336 to name_hint. Add location_t param.
337 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
338 Include "c-family/name-hint.h"
339 (c_parser_declaration_or_fndef): Convert "hint" from
340 const char * to name_hint. Pass location to lookup_name_fuzzy.
341 (c_parser_parameter_declaration): Likewise.
342
f9c59f7e
JJ
3432017-11-19 Jakub Jelinek <jakub@redhat.com>
344
345 PR c/66618
346 PR c/69960
347 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
348 where needed.
349 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
350 handle_omp_array_sections): Likewise.
351 (digest_init): Don't call decl_constant_value_for_optimization.
352 * c-tree.h (decl_constant_value_for_optimization): Removed.
353 * c-fold.c (c_fold_array_ref): New function.
354 (c_fully_fold_internal): Add LVAL argument, propagate it through
355 recursive calls. For VAR_P call decl_constant_value and
356 unshare if not LVAL and either optimizing or IN_INIT. Remove
357 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
358 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
359 (c_fully_fold): Add LVAL argument, pass it through to
360 c_fully_fold_internal.
361 (decl_constant_value_for_optimization): Removed.
362
3ca0dc60
JM
3632017-11-15 Joseph Myers <joseph@codesourcery.com>
364
365 PR c/81156
366 * c-parser.c (check_tgmath_function): New function.
367 (enum tgmath_parm_kind): New enum.
368 (c_parser_postfix_expression): Handle __builtin_tgmath.
369
64a5912c
DM
3702017-10-31 David Malcolm <dmalcolm@redhat.com>
371
372 * c-decl.c (implicit_decl_warning): Update for renaming of
373 pedwarn_at_rich_loc and warning_at_rich_loc.
374 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
375 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
376 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
377 (c_parser_struct_or_union_specifier): Likewise for renaming of
378 pedwarn_at_rich_loc.
379 (c_parser_parameter_declaration): Likewise for renaming of
380 error_at_rich_loc.
381 * c-typeck.c (build_component_ref): Likewise.
382 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
383 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
384 (set_init_label): Likewise for renaming of error_at_rich_loc.
385
c1136864
RB
3862017-10-30 Richard Biener <rguenther@suse.de>
387
388 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
389 stmts.
390
ee5fd23a
MM
3912017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
392
393 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
394 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
395
1a59ccf2
DM
3962017-10-25 David Malcolm <dmalcolm@redhat.com>
397
398 PR c/7356
399 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
400 semicolons.
401
bc1a75dd
JJ
4022017-10-25 Jakub Jelinek <jakub@redhat.com>
403
404 PR libstdc++/81706
405 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
406 newdecl to corresponding __builtin_ if any.
407
ff1ff960
PC
4082017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
409
410 PR c++/82466
411 * c-decl.c (diagnose_mismatched_decls): Use
412 OPT_Wbuiltin_declaration_mismatch.
413
62e1c678
DM
4142017-10-12 David Malcolm <dmalcolm@redhat.com>
415
416 * c-parser.c (c_parser_require): Add "type_is_unique" param and
417 use it to guard calls to maybe_suggest_missing_token_insertion.
418 (c_parser_parms_list_declarator): Override default value of new
419 "type_is_unique" param to c_parser_require.
420 (c_parser_asm_statement): Likewise.
421 * c-parser.h (c_parser_require): Add "type_is_unique" param,
422 defaulting to true.
423
a92f6726
NS
4242017-10-11 Nathan Sidwell <nathan@acm.org>
425
426 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
427
8e6cdc90
RS
4282017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
429
430 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
431 operating on trees as wide_ints.
432 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
433 (c_tree_equal): Likewise.
434
8139a48e
DM
4352017-10-04 David Malcolm <dmalcolm@redhat.com>
436
437 * c-decl.c (push_parm_decl): Store c_parm's location into the
438 PARAM_DECL.
439 (build_c_parm): Add "loc" param and store it within the c_parm.
440 * c-parser.c (struct c_parser): Add "last_token_location" field.
441 (c_parser_consume_token): Store location of the token into the
442 new field.
443 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
444 when handling a FUNCTION_DECL, if it doesn't already have them.
445 (c_parser_parameter_declaration): Generate a location for the
446 parameter, and pass it to the call to build_c_parm.
447 * c-tree.h (struct c_parm): Add field "loc".
448 (build_c_parm): Add location_t param.
449 * c-typeck.c (get_fndecl_argument_location): New function.
450 (inform_for_arg): New function.
451 (convert_for_assignment): Use inform_for_arg when dealing with
452 ic_argpass.
453
2a389958
JJ
4542017-09-29 Jakub Jelinek <jakub@redhat.com>
455
7d386d45
JJ
456 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
457 width is non-NULL.
458 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
459 don't SET_DECL_C_BIT_FIELD here.
460
2a389958
JJ
461 PR c/82340
462 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
463 instead of trying to set just TREE_READONLY manually.
464
ebc6a85e
TV
4652017-09-16 Tom de Vries <tom@codesourcery.com>
466
467 PR c/81875
468 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
469 cond itself.
470
bb75facd
JM
4712017-09-15 Joseph Myers <joseph@codesourcery.com>
472
473 PR c/82071
474 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
475 for C11.
476 (build_conditional_expr): For C11, generate result with excess
477 precision when one argument is an integer and the other is of a
478 type using excess precision.
479
1d933576
BE
4802017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
481
482 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
483
267bbb6f
MP
4842017-09-13 Marek Polacek <polacek@redhat.com>
485
486 PR c/82167
487 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
488 than expr.original_type.
489
6836632e
NS
4902017-09-12 Nathan Sidwell <nathan@acm.org>
491
492 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
493 resort_sorted_fields): Moved from c-family/c-common.c.
494 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
495
e035be33
JM
4962017-09-01 Joseph Myers <joseph@codesourcery.com>
497
498 PR c/82071
499 * c-typeck.c (build_atomic_assign): Handle argument with excess
500 precision. Ensure any EXCESS_PRECISION_EXPR is present in
501 argument passed to build_binary_op and convert_for_assignment but
502 not for call to c_fully_fold.
503 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
504 Ensure build_binary_op is called with argument with original
505 semantic type. Avoid calling c_fully_fold with an
506 EXCESS_PRECISION_EXPR from build_binary_op.
507
d2e05fcb
JJ
5082017-09-01 Jakub Jelinek <jakub@redhat.com>
509
510 PR c/81887
511 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
512
b397965c
RS
5132017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
514 Alan Hayward <alan.hayward@arm.com>
515 David Sherwood <david.sherwood@arm.com>
516
517 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
518 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
519 m1 and m2 to the signed equivalent of a fixed-point
520 SCALAR_TYPE_MODE.
521
14e18d71
DM
5222017-08-24 David Malcolm <dmalcolm@redhat.com>
523
524 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
525 than CAN_HAVE_LOCATION_P when determining whether to use the
526 location_t value within "value".
527
7f204c0f
DM
5282017-08-21 David Malcolm <dmalcolm@redhat.com>
529
530 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
531 rather than peeking the location of the first token.
532 * c-tree.h (c_expr::get_location): New method.
533
2f687306
DM
5342017-08-21 David Malcolm <dmalcolm@redhat.com>
535
536 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
537 to check_function_arguments.
538
3e7b80d7
MP
5392017-08-18 Marek Polacek <polacek@redhat.com>
540
541 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
542 commentary.
543
00aa1fa2
L
5442017-08-18 H.J. Lu <hongjiu.lu@intel.com>
545
546 PR c/53037
547 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
548 (check_bitfield_type_and_width): Don't allow bit-field with
549 warn_if_not_aligned type.
550
da67acb9
MS
5512017-08-14 Martin Sebor <msebor@redhat.com>
552
553 PR c/81117
554 * c-objc-common.c (c_objc_common_init): Handle 'G'.
555
bb85aa74
MP
5562017-08-11 Marek Polacek <polacek@redhat.com>
557
558 PR c/81795
559 * c-decl.c (pushtag): Only print inform if the warning was printed.
560 (grokdeclarator): Likewise.
561
32129a17
DM
5622017-08-10 David Malcolm <dmalcolm@redhat.com>
563
564 * c-parser.c (c_parser_error): Rename to...
565 (c_parser_error_richloc): ...this, making static, and adding
566 "richloc" parameter, passing it to the c_parse_error call,
567 rather than calling c_parser_set_source_position_from_token.
568 (c_parser_error): Reintroduce, reimplementing in terms of the
569 above, converting return type from void to bool.
570 (class token_pair): New class.
571 (struct matching_paren_traits): New struct.
572 (matching_parens): New typedef.
573 (struct matching_brace_traits): New struct.
574 (matching_braces): New typedef.
575 (get_matching_symbol): New function.
576 (c_parser_require): Add param MATCHING_LOCATION, using it to
577 highlight matching "opening" tokens for missing "closing" tokens.
578 (c_parser_skip_until_found): Likewise.
579 (c_parser_static_assert_declaration_no_semi): Convert explicit
580 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
581 class matching_parens, so that the pertinent open parenthesis is
582 highlighted when there are problems locating the close
583 parenthesis.
584 (c_parser_struct_or_union_specifier): Likewise.
585 (c_parser_typeof_specifier): Likewise.
586 (c_parser_alignas_specifier): Likewise.
587 (c_parser_simple_asm_expr): Likewise.
588 (c_parser_braced_init): Likewise, for matching_braces.
589 (c_parser_paren_condition): Likewise, for matching_parens.
590 (c_parser_switch_statement): Likewise.
591 (c_parser_for_statement): Likewise.
592 (c_parser_asm_statement): Likewise.
593 (c_parser_asm_operands): Likewise.
594 (c_parser_cast_expression): Likewise.
595 (c_parser_sizeof_expression): Likewise.
596 (c_parser_alignof_expression): Likewise.
597 (c_parser_generic_selection): Likewise.
598 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
599 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
600 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
601 In case CPP_OPEN_PAREN, pass loc_open_paren to the
602 c_parser_skip_until_found call.
603 (c_parser_objc_class_definition): Use class matching_parens as
604 above.
605 (c_parser_objc_method_decl): Likewise.
606 (c_parser_objc_try_catch_finally_statement): Likewise.
607 (c_parser_objc_synchronized_statement): Likewise.
608 (c_parser_objc_at_property_declaration): Likewise.
609 (c_parser_oacc_wait_list): Likewise.
610 (c_parser_omp_var_list_parens): Likewise.
611 (c_parser_omp_clause_collapse): Likewise.
612 (c_parser_omp_clause_default): Likewise.
613 (c_parser_omp_clause_if): Likewise.
614 (c_parser_omp_clause_num_threads): Likewise.
615 (c_parser_omp_clause_num_tasks): Likewise.
616 (c_parser_omp_clause_grainsize): Likewise.
617 (c_parser_omp_clause_priority): Likewise.
618 (c_parser_omp_clause_hint): Likewise.
619 (c_parser_omp_clause_defaultmap): Likewise.
620 (c_parser_oacc_single_int_clause): Likewise.
621 (c_parser_omp_clause_ordered): Likewise.
622 (c_parser_omp_clause_reduction): Likewise.
623 (c_parser_omp_clause_schedule): Likewise.
624 (c_parser_omp_clause_num_teams): Likewise.
625 (c_parser_omp_clause_thread_limit): Likewise.
626 (c_parser_omp_clause_aligned): Likewise.
627 (c_parser_omp_clause_linear): Likewise.
628 (c_parser_omp_clause_safelen): Likewise.
629 (c_parser_omp_clause_simdlen): Likewise.
630 (c_parser_omp_clause_depend): Likewise.
631 (c_parser_omp_clause_map): Likewise.
632 (c_parser_omp_clause_device): Likewise.
633 (c_parser_omp_clause_dist_schedule): Likewise.
634 (c_parser_omp_clause_proc_bind): Likewise.
635 (c_parser_omp_clause_uniform): Likewise.
636 (c_parser_omp_for_loop): Likewise.
637 (c_parser_cilk_clause_vectorlength): Likewise.
638 (c_parser_cilk_clause_linear): Likewise.
639 (c_parser_transaction_expression): Likewise.
640 * c-parser.h (c_parser_require): Add param matching_location with
641 default UNKNOWN_LOCATION.
642 (c_parser_error): Convert return type from void to bool.
643 (c_parser_skip_until_found): Add param matching_location with
644 default UNKNOWN_LOCATION.
645
30af3a2b
MP
6462017-08-09 Marek Polacek <polacek@redhat.com>
647
648 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
649 * c-tree.h (build_external_ref): Update declaration.
650 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
651 (build_external_ref): Change the type of a parameter to bool.
652 (parser_build_binary_op): Use true/false instead of 1/0.
653 (pointer_diff): Likewise.
654 (build_modify_expr): Likewise.
655 (set_designator): Change the type of a parameter to bool.
656 (set_init_index): Use true/false instead of 1/0.
657 (set_init_label): Likewise.
658 (output_init_element): Change the type of a parameter to bool.
659 (output_pending_init_elements): Use true/false instead of 1/0.
660 (process_init_element): Likewise.
661 (build_binary_op): Change the type of a parameter to bool.
662
296c53ac
MP
6632017-08-09 Marek Polacek <polacek@redhat.com>
664
665 PR c/81233
666 * c-typeck.c (pedwarn_init): Make the function take a variable list.
667 Call emit_diagnostic_valist instead of pedwarn.
668 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
669 Print the relevant types in diagnostics.
670
a32c8316
MP
6712017-08-09 Marek Polacek <polacek@redhat.com>
672
673 PR c/81417
674 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
675 build_conditional_expr.
676 * c-parser.c (c_parser_conditional_expression): Create locations for
677 EXP1 and EXP2 from their source ranges. Pass the locations down to
678 build_conditional_expr.
679 * c-tree.h (build_conditional_expr): Update declaration.
680 * c-typeck.c (build_conditional_expr): Add location_t parameters.
681 For -Wsign-compare, also print the types.
682
314e6352
ML
6832017-08-08 Martin Liska <mliska@suse.cz>
684
685 * c-convert.c: Include header files.
686 * c-typeck.c: Likewise.
687
577eec56
ML
6882017-08-07 Martin Liska <mliska@suse.cz>
689
690 * c-parser.c (c_parser_attributes): Canonicalize name of an
691 attribute.
692
f7b6353a
MP
6932017-08-02 Marek Polacek <polacek@redhat.com>
694
695 PR c/81289
696 * c-parser.c (c_parser_unary_expression): Use set_error.
697
8a6eab34
MP
698 PR c/81448
699 PR c/81306
700 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
701 warnings. Avoid walking MACRO_MAP_LOCATIONS.
702
7fef86d3
JH
7032017-07-31 Jan Hubicka <hubicka@ucw.cz>
704 Martin Liska <mliska@suse.cz>
705
706 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 707 statement.
7fef86d3 708
f34ebeb2
ML
7092017-07-31 Martin Liska <mliska@suse.cz>
710
711 PR sanitize/81530
712 * c-convert.c (convert): Guard condition with flag_sanitize_p
713 also with current_function_decl non-null equality.
714 * c-decl.c (grokdeclarator): Likewise.
715 * c-typeck.c (build_binary_op): Likewise.
716
8595f67b
MP
7172017-07-25 Marek Polacek <polacek@redhat.com>
718
719 * c-decl.c (grokfield): Remove local variable.
720
d49718d6
MP
7212017-07-25 Marek Polacek <polacek@redhat.com>
722
723 PR c/81364
724 * c-parser.c (c_parser_else_body): Don't warn about multistatement
725 macro expansion if the body is in { }.
726 (c_parser_while_statement): Likewise.
727 (c_parser_for_statement): Likewise.
728
ff22eb12
NS
7292017-07-18 Nathan Sidwell <nathan@acm.org>
730
731 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
732
eea77d1f
DM
7332017-07-14 David Malcolm <dmalcolm@redhat.com>
734
735 * c-decl.c (implicitly_declare): When suggesting a missing
736 #include, provide a fix-it hint.
737
b6f43128
DM
7382017-07-06 David Malcolm <dmalcolm@redhat.com>
739
740 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
741 and call that instead.
742 * c-tree.h (selftest::run_c_tests): New decl.
743
3e2becc4
MP
7442017-06-26 Marek Polacek <polacek@redhat.com>
745
746 PR c/80116
747 * c-parser.c (c_parser_if_body): Set the location of the
748 body of the conditional after parsing all the labels. Call
749 warn_for_multistatement_macros.
750 (c_parser_else_body): Likewise.
751 (c_parser_switch_statement): Likewise.
752 (c_parser_while_statement): Likewise.
753 (c_parser_for_statement): Likewise.
754 (c_parser_statement): Add a default argument. Save the location
755 after labels have been parsed.
756 (c_parser_c99_block_statement): Likewise.
757
343ae898
RB
7582017-06-19 Richard Biener <rguenther@suse.de>
759
760 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
761 negated _Literals to parse _Literal (int) -1.
762
45b2222a
ML
7632017-06-13 Martin Liska <mliska@suse.cz>
764
765 PR sanitize/78204
766 * c-convert.c (convert): Use sanitize_flags_p.
767 * c-decl.c (grokdeclarator): Likewise.
768 * c-typeck.c (convert_for_assignment): Likewise.
769 (c_finish_return): Likewise.
770 (build_binary_op): Likewise.
771
8ab7005b
JJ
7722017-06-08 Jakub Jelinek <jakub@redhat.com>
773
774 PR c/81006
775 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
776 to sizetype before size_binop.
777
363dc72c
JJ
7782017-06-07 Jakub Jelinek <jakub@redhat.com>
779
780 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
781 of TDI_generic.
782
dc949728
MP
7832017-06-06 Marek Polacek <polacek@redhat.com>
784
785 PR c/79983
786 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
787 ref.
788 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
789
40ffd95f
BE
7902017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
791
792 * c-parser.c (c_parser_binary_expression): Implement the
793 -Wsizeof_pointer_div warning.
794 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
795 from a parenthesized expression.
796 (c_parser_expr_list): Use c_last_sizeof_loc.
797 * c-tree.h (c_last_sizeof_loc): New external.
798 * c-typeck.c (c_last_sizeof_loc): New variable.
799 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
800
9fc5e7a4
MM
8012017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
802
803 PR testsuite/80580
804 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
805
f012c8ef
DM
8062017-05-30 David Malcolm <dmalcolm@redhat.com>
807
808 * c-objc-common.c (c_tree_printer): Gain bool and const char **
809 parameters.
810
3cd211af
MS
8112017-05-24 Martin Sebor <msebor@redhat.com>
812
813 PR c/80731
814 * c-fold.c (c_fully_fold_internal): Adjust.
815 * c-typeck.c (parser_build_unary_op): Adjust.
816
fd71a9a2
TS
8172017-05-23 Thomas Schwinge <thomas@codesourcery.com>
818
819 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
820 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
821 "VECTOR_LENGTH".
822
92fa0f9e
MP
8232017-05-23 Marek Polacek <polacek@redhat.com>
824
825 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
826 quotes.
827
d11c168a
JJ
8282017-05-22 Jakub Jelinek <jakub@redhat.com>
829
830 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
831 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
832 it returned invariant. Call tree_invariant_p unconditionally
833 afterwards to decide whether to return expr or op0.
834
58aca9d9
NS
8352017-05-22 Nathan Sidwell <nathan@acm.org>
836
837 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
838
7fd549d2
TS
8392017-05-19 Thomas Schwinge <thomas@codesourcery.com>
840
841 * c-parser.c (c_parser_omp_clause_default): Handle
842 "OMP_CLAUSE_DEFAULT_PRESENT".
843
6ecd2339
BE
8442017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
845
846 * config-lang.in (gtfiles): Add c-family/c-format.c.
847
8a57ecff
NS
8482017-05-18 Nathan Sidwell <nathan@acm.org>
849
850 * c-decl.c (pushdecl_top_level): Delete unused function.
851
6574d78e
MP
8522017-05-18 Marek Polacek <polacek@redhat.com>
853
854 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
855 (check_earlier_gotos): Likewise.
856 (define_label): Likewise.
857 (pending_xref_error): Likewise.
858 (smallest_type_quals_location): Likewise.
859 (grokdeclarator): Likewise.
860 (grokparms): Likewise.
861 (identifier_global_value): Likewise.
862 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
863 (find_init_member): Likewise.
864
e3455240
MP
8652017-05-18 Marek Polacek <polacek@redhat.com>
866
867 * c-decl.c (start_decl): Use false/true instead of 0/1.
868 (grokdeclarator): Likewise.
869 (finish_struct): Likewise.
870 (start_function): Change the return type to bool. Use false/true
871 instead of 0/1.
872 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
873 * c-tree.h (start_function): Update.
874 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
875 (set_designator): Change the return type to bool. Use false/true
876 instead of 0/1.
877
3fa8871b
MP
8782017-05-17 Marek Polacek <polacek@redhat.com>
879
880 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
881 * c-typeck.c: Likewise.
882
142473df
MP
8832017-05-17 Marek Polacek <polacek@redhat.com>
884
885 PR sanitizer/80659
886 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
887 DECL_IGNORED_P even for non-static compound literals.
888
1a817418
ML
8892017-05-17 Martin Liska <mliska@suse.cz>
890
891 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
892 use it instead of int type.
893
b2fa0a8b
MP
8942017-05-17 Marek Polacek <polacek@redhat.com>
895
896 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
897 call c_fully_fold.
898 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
899 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
900 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
901 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
902 save_expr.
903 (c_parser_conditional_expression): Likewise.
904 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
905 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
906 (process_init_element): Likewise.
907 (build_binary_op): Likewise.
908 (handle_omp_array_sections_1): Likewise.
909
1e47f02b
TS
9102017-05-12 Thomas Schwinge <thomas@codesourcery.com>
911
912 * c-parser.c (c_parser_omp_clause_num_gangs)
913 (c_parser_omp_clause_num_workers)
914 (c_parser_omp_clause_vector_length): Merge functions into...
915 (c_parser_oacc_single_int_clause): ... this new function. Adjust
916 all users.
917
c24e924f
NS
9182017-05-11 Nathan Sidwell <nathan@acm.org>
919
920 * gimple-parser.c: Don't #include tree-dump.h.
921
c587104e
MM
9222017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
923
924 PR testsuite/80580
925 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
926
67ac9a9d
MM
9272017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
928
929 PR testsuite/80580
930 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
931 incorrect __MEM syntax.
932
ac4eb40f
MM
9332017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
934
935 PR testsuite/80580
936 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
937 type of unary '*'.
938
641da50a
NS
9392017-05-09 Nathan Sidwell <nathan@acm.org>
940
941 * c-tree.h (pushdecl): Declare.
942
56d35585
DM
9432017-05-05 David Malcolm <dmalcolm@redhat.com>
944
945 * c-decl.c (warn_defaults_to): Replace report_diagnostic
946 with diagnostic_report_diagnostic.
947 * c-errors.c (pedwarn_c99): Likewise.
948 (pedwarn_c90): Likewise.
949
815d9cc6
XR
9502017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
951
952 PR c++/80038
953 * c-gimplify.c (c_gimplify_expr): Remove calls to
954 cilk_gimplifY_call_params_in_spawned_fn.
955
1c4ea66f
DM
9562017-04-25 David Malcolm <dmalcolm@redhat.com>
957
958 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
959 hint for removing extra semicolon.
960
666f7903
JJ
9612017-04-21 Jakub Jelinek <jakub@redhat.com>
962
963 PR c/80468
964 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
965 enabled, set specs->type to integer_type_node.
966
5764ee3c
JW
9672017-04-03 Jonathan Wakely <jwakely@redhat.com>
968
969 * c-array-notation.c: Fix typo in comment.
970
10fa8dfb
MP
9712017-03-29 Marek Polacek <polacek@redhat.com>
972
973 PR c/79730
974 * c-decl.c (finish_decl): Check VAR_P.
975
a9e4a1a5
JJ
9762017-03-27 Jakub Jelinek <jakub@redhat.com>
977
978 PR middle-end/80162
979 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
980 * c-typeck.c (c_mark_addressable): Likewise. Look through
981 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
982 to ARRAY_TYPE.
983 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
984
ee3ff394
MP
9852017-03-23 Marek Polacek <polacek@redhat.com>
986
987 * c-tree.h: Remove a C_RID_YYCODE reference.
988
4d1b8e70
JJ
9892017-03-21 Jakub Jelinek <jakub@redhat.com>
990
991 PR c/80097
992 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
993 optional COMPOUND_EXPR with ubsan instrumentation.
994
31dc71a8
MP
9952017-03-17 Marek Polacek <polacek@redhat.com>
996
997 * c-parser.c: Add C11 references.
998
d579c385
MP
9992017-03-15 Marek Polacek <polacek@redhat.com>
1000
1001 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1002
85059a38
MP
10032017-03-11 Marek Polacek <polacek@redhat.com>
1004
1005 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1006
2f6f187a
DM
10072017-03-10 David Malcolm <dmalcolm@redhat.com>
1008
1009 PR translation/79848
1010 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1011 "%qs".
1012 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1013
36618428
MP
10142017-03-09 Marek Polacek <polacek@redhat.com>
1015
1016 PR sanitizer/79757
1017 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1018 parameter declarations with initializers.
1019
01e5af5a
JJ
10202017-03-09 Jakub Jelinek <jakub@redhat.com>
1021
1022 PR c/79969
1023 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1024 TYPE_STUB_DECL.
1025
a71dbc63
JJ
10262017-03-07 Jakub Jelinek <jakub@redhat.com>
1027
1028 PR c/79834
1029 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1030 for "may only be used in compound statements" diagnostics, change it
1031 such that the same translatable string is used for all pragmas. For
1032 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1033 diagnostics.
1034 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1035 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1036 "may only be used in compound statements" diagnostics, such that the
1037 same translatable string is used for all pragmas.
1038
1ff4bae6
MP
10392017-03-04 Marek Polacek <polacek@redhat.com>
1040
1041 PR c/79847
1042 * c-decl.c (implicit_decl_warning): Add missing space.
1043
7f5a7d78
MP
10442017-03-03 Marek Polacek <polacek@redhat.com>
1045
1046 PR c/79758
1047 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1048 current_function_prototype_arg_types is error_mark_node. Fix
1049 formatting. Use TREE_VALUE instead of TREE_TYPE.
1050
883c8f06
JJ
10512017-03-03 Jakub Jelinek <jakub@redhat.com>
1052
79c9b7a8
JJ
1053 PR c/79837
1054 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1055 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1056 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1057 diagnostics.
1058
883c8f06
JJ
1059 PR c/79836
1060 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1061 instead of %<_Generic>.
1062 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1063 (c_parser_omp_target_exit_data): Use %<release%> instead of
1064 %<release>.
1065
324ff1a0
JJ
10662017-02-28 Jakub Jelinek <jakub@redhat.com>
1067
1068 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1069 instead of just cond ? "..." : "...".
1070 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1071 for "enter"/"exit" keyword.
1072 (c_finish_oacc_routine): Don't use %s to supply portions of the
1073 message.
1074
4227c9ad
JJ
10752017-02-24 Jakub Jelinek <jakub@redhat.com>
1076
1077 PR c++/79588
1078 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1079 handle -Wrestrict here.
1080 * c-typeck.c (build_function_call_vec): Adjust
1081 check_function_arguments caller.
1082
5d972e66
RB
10832017-02-23 Richard Biener <rguenther@suse.de>
1084
1085 PR c/79684
1086 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1087 to initialize c_exprs to return.
1088 (c_parser_gimple_binary_expression): Likewise.
1089 (c_parser_gimple_unary_expression): Likewise.
1090 (c_parser_gimple_postfix_expression): Likewise.
1091
61ac5ebe
MP
10922017-02-22 Marek Polacek <polacek@redhat.com>
1093
1094 PR c/79662
1095 * c-typeck.c (convert_arguments): Handle error_mark_node.
1096
41d1b0b1
PK
10972017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1098
1099 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1100 value of c_parser_parse_ssa_name against error_mark_node and emit
1101 error if ssa name is anonymous and written as default definition.
1102
eab1f169
PK
11032017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1104
1105 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1106 FMA_EXPR.
1107
bcac0b4d
JJ
11082017-02-16 Jakub Jelinek <jakub@redhat.com>
1109
1110 PR c++/79512
1111 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1112 ignore #pragma omp target even when not followed by identifier.
1113
1be33173
PK
11142017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1115
1116 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1117 (c_parser_gimple_unary_expression): Likewise.
1118
aa326bfb
JJ
11192017-02-13 Jakub Jelinek <jakub@redhat.com>
1120
1121 * c-parser.c (c_parser_oacc_declare): Add missing space in
1122 diagnostics.
1123
8a398bc5
PK
11242017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1125
1126 PR c/79478
1127 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1128 set_c_expr_source_range when parsing ssa-name.
1129
3dcde5ef
PG
11302017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1131 Richard Biener <rguenther@suse.de>
1132
1133 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1134 building IL when arguments are error_mark_node.
1135 (c_parser_gimple_unary_expression): Likewise.
1136 (c_parser_gimple_if_stmt): Likewise.
1137 (c_parser_gimple_switch_stmt): Likewise.
1138 (c_parser_gimple_return_stmt): Likewise.
1139 (c_parser_parse_ssa_name): When name lookup fails do not build
1140 an SSA name. Use undeclared rather than not declared in error
1141 reporting.
1142
192b048b
MP
11432017-02-09 Marek Polacek <polacek@redhat.com>
1144
1145 PR c/79428
1146 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1147 instead of c_parser_skip_until_found.
1148
56f71478
JJ
11492017-02-09 Jakub Jelinek <jakub@redhat.com>
1150
1151 PR c/79431
1152 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1153 symtab_node::get on automatic variables.
1154
02889d23
CLT
11552016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1156 Chung-Lin Tang <cltang@codesourcery.com>
1157
1158 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1159 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1160 semantic checking.
1161 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1162
7af4b20d
RB
11632017-02-07 Richard Biener <rguenther@suse.de>
1164
1165 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1166 (c_parser_gimple_postfix_expression_after_primary):
1167 Do not use c_build_function_call_vec to avoid folding and promotion.
1168 Simplify.
1169
e5e391d6
MO
11702017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1171
1172 PR lto/79061
1173 * c-decl.c (pop_scope): Pass main_input_filename to
1174 build_translation_unit_decl.
1175
c2e84327
DM
11762017-01-24 David Malcolm <dmalcolm@redhat.com>
1177
1178 * c-parser.c: Include "read-rtl-function.h" and
1179 "run-rtl-passes.h".
1180 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1181 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1182 production. Update for renaming of field "gimple_pass" to
1183 "gimple_or_rtl_pass". If __RTL was seen, call
1184 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1185 to an auto_timevar, to cope with early exit.
1186 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1187 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1188 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1189 Handle RID_RTL.
1190 (c_parser_parse_rtl_body): New function.
1191 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1192 (struct c_declspecs): Rename field "gimple_pass" to
1193 "gimple_or_rtl_pass". Add field "rtl_p".
1194 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1195 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1196 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1197 (c_parser_gimple_or_rtl_pass_list): ...this.
1198
2ebd93e1
MP
11992017-01-20 Marek Polacek <polacek@redhat.com>
1200
1201 PR c/64279
1202 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1203
b1c95bb5
RB
12042017-01-13 Richard Biener <rguenther@suse.de>
1205
1206 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1207 nops.
1208
25329913
RB
12092017-01-13 Richard Biener <rguenther@suse.de>
1210
1211 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1212 _Literal ( type-name ) number.
1213
6bb4ea5c
RB
12142017-01-12 Richard Biener <rguenther@suse.de>
1215
1216 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1217 __MEM.
1218
6b5b4e9c
JJ
12192017-01-11 Jakub Jelinek <jakub@redhat.com>
1220
1221 PR c++/72813
1222 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1223 PCH file.
1224
e3252775
RB
12252017-01-11 Richard Biener <rguenther@suse.de>
1226
1227 PR bootstrap/79052
1228 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1229 returns on parse errors.
1230
a9342885
MP
12312017-01-04 Marek Polacek <polacek@redhat.com>
1232
1233 PR c++/64767
1234 * c-parser.c (c_parser_postfix_expression): Mark zero character
1235 constants by setting original_type in c_expr.
1236 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1237 with a zero character constant.
1238 (char_type_p): New function.
1239
5dd9a9d0
DM
12402017-01-04 David Malcolm <dmalcolm@redhat.com>
1241
1242 * c-parser.c (c_parser_declaration_or_fndef): Create a
1243 rich_location at init_loc and parse it to start_init.
1244 (last_init_list_comma): New global.
1245 (c_parser_braced_init): Update last_init_list_comma when parsing
1246 commas. Pass it to pop_init_level. Pass location of closing
1247 brace to pop_init_level.
1248 (c_parser_postfix_expression_after_paren_type): Create a
1249 rich_location at type_loc and parse it to start_init.
1250 (c_parser_omp_declare_reduction): Likewise for loc.
1251 * c-tree.h (start_init): Add rich_location * param.
1252 (pop_init_level): Add location_t param.
1253 * c-typeck.c (struct initializer_stack): Add field
1254 "missing_brace_richloc".
1255 (start_init): Add richloc param, use it to initialize
1256 the stack node's missing_brace_richloc.
1257 (last_init_list_comma): New decl.
1258 (finish_implicit_inits): Pass last_init_list_comma to
1259 pop_init_level.
1260 (push_init_level): When finding missing open braces, add fix-it
1261 hints to the richloc.
1262 (pop_init_level): Add "insert_before" param and pass it
1263 when calling pop_init_level. Add fixits about missing
1264 close braces to any richloc. Use the richloc for the
1265 -Wmissing-braces warning.
1266 (set_designator): Pass last_init_list_comma to pop_init_level.
1267 (process_init_element): Likewise.
1268
cbe34bb5
JJ
12692017-01-01 Jakub Jelinek <jakub@redhat.com>
1270
1271 Update copyright years.
1272
d17680f3
JJ
12732016-12-21 Jakub Jelinek <jakub@redhat.com>
1274
0dba7960
JJ
1275 PR bootstrap/78817
1276 * c-typeck.c (build_function_call_vec): If check_function_arguments
1277 returns true, set TREE_NO_WARNING on CALL_EXPR.
1278
d17680f3
JJ
1279 PR c/77767
1280 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1281 to *expr instead of overwriting it.
1282
aa90531e
RB
12832016-12-20 Richard Biener <rguenther@suse.de>
1284
1285 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1286 error recovery.
1287 (c_parser_gimple_statement): Only build assigns for non-error
1288 stmts.
1289 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1290
629b3d75
MJ
12912016-12-14 Martin Jambor <mjambor@suse.cz>
1292
1293 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1294 omp-low.h.
1295 (c_finish_oacc_routine): Adjusted call to
1296 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1297 to use their new names.
1298 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1299 use its new name.
1300 (c_parser_oacc_update): Likewise.
1301 (c_parser_omp_simd): Likewise.
1302 (c_parser_omp_target_update): Likewise.
1303 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1304 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1305 name.
1306 (c_finish_omp_cancellation_point): Likewise.
1307 * gimple-parser.c: Do not include omp-low.h
1308
c5af52eb
CP
13092016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1310 James Norris <jnorris@codesourcery.com>
1311
1312 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1313 EXIT_DATA,WAIT} are not used in compound statements.
1314 (c_parser_oacc_enter_exit_data): Update diagnostics.
1315
48330c93
BE
13162016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1317
1318 PR c++/71973
1319 * c-decl.c (diagnose_mismatched_decls): Use
1320 OPT_Wbuiltin_declaration_mismatch here too.
1321
899ca90e 13222016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1323 Alan Hayward <alan.hayward@arm.com>
1324 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1325
1326 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1327 (make_label, finish_struct): Likewise.
1328
1ee62b92 13292016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1330 Richard Biener <rguenther@suse.de>
22b15758 1331
8e745a17
JJ
1332 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1333 * config-lang.in (gtfiles): Add c/c-parser.h.
1334 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1335 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1336 * c-parser.c (enum c_id_kind, struct c_token,
1337 c_parser_next_token_is, c_parser_next_token_is_not,
1338 c_parser_next_token_is_keyword,
1339 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1340 Split out to ...
1341 * c-parser.h: ... new header.
1342 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1343 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1344 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1345 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1346 c_parser_error, c_parser_require, c_parser_skip_until_found,
1347 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1348 c_parser_type_name): Export.
1349 (c_parser_tokens_buf): New function.
1350 (c_parser_error): Likewise.
1351 (c_parser_set_error): Likewise.
1352 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1353 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1354 via c_parser_parse_gimple_body.
8e745a17
JJ
1355 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1356 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1357 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1358 c_parser_error, c_parser_require, c_parser_skip_until_found,
1359 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1360 c_parser_type_name): Declare.
1ee62b92
PG
1361 (struct c_parser): Declare forward.
1362 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1363 (c_parser_error): Likewise.
1364 (c_parser_set_error): Likewise.
1365 * gimple-parser.c: New file.
1366 * gimple-parser.h: Likewise.
1ee62b92 1367
22b15758
UB
13682016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1369
1370 PR c/35503
1371 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1372 warn_for_restrict.
1373
84ff4775
LCW
13742016-09-11 Le-Chun Wu <lcwu@google.com>
1375 Mark Wielaard <mjw@redhat.com>
1376
1377 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1378 to the given -Wshadow= variant.
1379
4d0cdd0c
TP
13802016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1381
1382 * c-typeck.c: Include memmodel.h.
1383
1202f33e
JJ
13842016-10-13 Jakub Jelinek <jakub@redhat.com>
1385
1386 PR target/77957
1387 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1388 instead of lhd_return_null_tree_v.
1389
8a14afd0
BS
13902016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1391
1392 PR c++/69733
1393 * c-decl.c (smallest_type_quals_location): New static function.
1394 (grokdeclarator): Try to find the correct location for an ignored
1395 qualifier.
1396
81fea426
MP
13972016-09-26 Marek Polacek <polacek@redhat.com>
1398
1399 PR c/7652
1400 * c-decl.c (pop_scope): Add gcc_fallthrough.
1401
14022016-09-26 Marek Polacek <polacek@redhat.com>
1403
1404 PR c/7652
1405 * c-parser.c (struct c_token): Add flags field.
1406 (c_lex_one_token): Pass it to c_lex_with_flags.
1407 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1408 into IFN_FALLTHROUGH.
1409 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1410 attribute fallthrough after a case label or default label.
1411 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1412
9a2300e9
MP
14132016-09-24 Marek Polacek <polacek@redhat.com>
1414
1415 PR c/77490
1416 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1417 have boolean value. Warn about ++/-- on booleans.
1418
7de76362
JJ
14192016-09-23 Jakub Jelinek <jakub@redhat.com>
1420
1421 * c-parser.c (incomplete_record_decls): Remove unnecessary
1422 = vNULL initialization of file scope vec.
1423
5b73d2ab
MP
14242016-09-16 Marek Polacek <polacek@redhat.com>
1425
1426 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1427
e51fbec3
MP
14282016-09-14 Marek Polacek <polacek@redhat.com>
1429
1430 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1431 (fix_array_notation_expr): Likewise.
1432 * c-decl.c (finish_decl): Likewise.
1433 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1434 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1435 (function_to_pointer_conversion): Use false instead of 0.
1436 (convert_lvalue_to_rvalue): Likewise.
1437 (parser_build_unary_op): Likewise.
1438 (build_atomic_assign): Likewise.
1439 (build_unary_op): Change nonconvert parameter type to bool, use
1440 true/false instead of 1/0.
1441 (build_binary_op): Use true instead of 1.
1442
254830ba
DM
14432016-09-13 David Malcolm <dmalcolm@redhat.com>
1444
1445 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1446 of add_fixit_insert to add_fixit_insert_before.
1447
4c13ba17
MP
14482016-09-13 Marek Polacek <polacek@redhat.com>
1449
1450 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1451 it.
1452
54dcdb88
BE
14532016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1454
1455 PR c++/77496
1456 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1457 COMPOUND_EXPR to warn_for_omitted_condop.
1458
e5106e27
DM
14592016-09-07 David Malcolm <dmalcolm@redhat.com>
1460
1461 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1462 c_get_substring_location for this new langhook.
1463
9dc5773f
JJ
14642016-09-02 Jakub Jelinek <jakub@redhat.com>
1465
1466 PR c/65467
1467 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1468 flag_openmp.
1469 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1470 instead of mark_exp_read on low_bound/length expression.
1471 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1472 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1473 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1474 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1475 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1476 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1477 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1478 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1479 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1480 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1481 instead of mark_expr_read.
1482 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1483 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1484 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1485 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1486 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1487 array section bases outside of depend clause, for depend clause
1488 use convert_lvalue_to_rvalue on the base.
1489 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1490 linear, aligned, map, to and from clauses.
1491 (c_omp_clause_copy_ctor): New function.
1492
295844f6
MP
14932016-09-01 Marek Polacek <polacek@redhat.com>
1494
1495 PR c/7652
1496 * c-typeck.c (composite_type): Add FALLTHRU comment.
1497
089af25c
DM
14982016-08-31 David Malcolm <dmalcolm@redhat.com>
1499
1500 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1501 to the insertion fixits for "struct", "union", and "enum".
1502
f9087798
DM
15032016-08-30 David Malcolm <dmalcolm@redhat.com>
1504
1505 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1506 rather than add_fixit_misspelled_id.
1507 (undeclared_variable): Likewise.
1508 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1509 now-redundant "here" params from add_fixit_insert method calls.
1510 (c_parser_parameter_declaration): Likewise.
1511 * c-typeck.c (build_component_ref): Remove now-redundant range
1512 param from add_fixit_replace method calls.
1513
ebef225f
MP
15142016-08-25 Marek Polacek <polacek@redhat.com>
1515
1516 * c-typeck.c (parser_build_binary_op): Pass LHS to
1517 warn_logical_not_parentheses.
1518
fe377a48
MP
15192016-08-25 Marek Polacek <polacek@redhat.com>
1520
1521 PR c/77323
1522 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1523 or _FloatN or _FloatNx is not supported.
1524 (finish_declspecs): Set type to integer_type_node when _FloatN or
1525 _FloatNx is not supported.
1526
c65699ef
JM
15272016-08-19 Joseph Myers <joseph@codesourcery.com>
1528
1529 PR c/32187
1530 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1531 (struct c_declspecs): Add field floatn_nx_idx.
1532 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1533 and _FloatNx type specifiers.
1534 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1535 (c_parser_declspecs, c_parser_attribute_any_word)
1536 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1537 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1538 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1539 narrower than double.
1540
2f1364c2
JJ
15412016-08-12 Jakub Jelinek <jakub@redhat.com>
1542 Martin Liska <mliska@suse.cz>
1543
1544 PR c/67410
1545 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1546 % to determine val element to change. Assert that
1547 wchar_bytes * charwidth fits into val array.
1548
191816a3
MP
15492016-08-12 Marek Polacek <polacek@redhat.com>
1550
1551 PR c/7652
1552 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1553 (c_parser_postfix_expression): Likewise.
1554 * c-typeck.c (build_unary_op): Adjust fall through comment.
1555 (c_mark_addressable): Likewise.
1556
b95a64bb
JJ
15572016-08-11 Jakub Jelinek <jakub@redhat.com>
1558
1559 PR c/72816
1560 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1561 array member through typedef, for orig_qual_indirect == 0 clear
1562 orig_qual_type.
1563
895aa8e1
DM
15642016-08-08 David Malcolm <dmalcolm@redhat.com>
1565
1566 PR c/64955
1567 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1568 this up to selftest::run_c_tests.
1569 (selftest::run_c_tests): New function.
1570
0b212d8c
TS
15712016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1572
ae9281fc
TS
1573 * c-parser.c (struct oacc_routine_data): Add error_seen and
1574 fndecl_seen members.
1575 (c_finish_oacc_routine): Use these.
1576 (c_parser_declaration_or_fndef): Adjust.
1577 (c_parser_oacc_routine): Likewise. Support more C language
1578 constructs, and improve diagnostics. Move pragma context
1579 checking...
1580 (c_parser_pragma): ... here.
1581
0b212d8c
TS
1582 * c-parser.c (struct oacc_routine_data): New.
1583 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1584 Simplify code.
1585 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1586 declare target" attribute.
1587
76e2c821
JB
15882016-08-01 Jan Beulich <jbeulich@suse.com>
1589
1590 * c-fold.c (c_fully_fold_internal): Also emit shift count
1591 warnings for vector types.
1592 * c-typeck.c (build_binary_op): Likewise.
1593
f618a472
MP
15942016-07-29 Marek Polacek <polacek@redhat.com>
1595
1596 PR c/71742
1597 * c-decl.c (finish_struct): Rephrase an error message.
1598
efd0786f
MP
1599 PR c/71853
1600 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1601 to error node for invalid code.
1602
e00dceaf
MP
1603 PR c/71573
1604 * c-decl.c (implicitly_declare): Return decl early not only for
1605 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1606
673a107a
JJ
16072016-07-29 Jakub Jelinek <jakub@redhat.com>
1608
1609 PR c/71969
1610 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1611 on GNU extern inline functions.
1612
a5b5c8b6
MP
16132016-07-29 Marek Polacek <polacek@redhat.com>
1614
1615 PR c/71583
1616 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1617 check expr.value.
1618
e3fe09c1
UB
16192016-07-22 Uros Bizjak <ubizjak@gmail.com>
1620
1621 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1622
7c8f7eaa
DM
16232016-07-20 David Malcolm <dmalcolm@redhat.com>
1624
1625 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1626 spellcheck-tree.h
1627 (best_macro_match): Likewise, converting from a typedef to a
1628 subclass.
1629 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1630 (lookup_name_fuzzy): Update for change of best_macro_match to a
1631 subclass with a ctor that calls cpp_forall_identifiers.
1632
de6a69ee
DM
16332016-07-20 David Malcolm <dmalcolm@redhat.com>
1634
1635 * c-decl.c (implicit_decl_warning): Update for conversion of
1636 return type of lookup_name_fuzzy to const char *.
1637 (undeclared_variable): Likewise.
1638 (lookup_name_fuzzy): Convert return type from tree to
1639 const char *.
1640 * c-parser.c (c_parser_declaration_or_fndef): Update for
1641 conversion of return type of lookup_name_fuzzy to const char *.
1642 (c_parser_parameter_declaration): Likewise.
1643
b1c9c068
CP
16442016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1645
1646 * c-parser.c (c_parser_oacc_declare): Don't scan for
1647 GOMP_MAP_POINTER.
1648 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1649 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1650 zero-length subarrays.
1651
ddbbcb19
JJ
16522016-07-15 Jakub Jelinek <jakub@redhat.com>
1653
1654 PR c/71858
1655 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1656 instead of FUZZY_LOOKUP_NAME.
1657 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1658 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1659
dd36b877
JJ
16602016-07-14 Jakub Jelinek <jakub@redhat.com>
1661
1662 PR c/71858
1663 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1664
8c681247
TS
16652016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1666
1667 * c-parser.c (c_parser_generic_selection): Make type of variable
1668 auto_vec.
1669 (c_parser_omp_declare_simd): Likewise.
1670
bf4fa671
TS
16712016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1672
1673 * c-decl.c (struct c_struct_parse_info): Change member types
1674 from vec to auto_vec.
1675 (start_struct): Adjust.
1676 (finish_struct): Likewise.
1677
557e8c49
JJ
16782016-07-02 Jakub Jelinek <jakub@redhat.com>
1679
1680 PR c/71719
1681 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1682
54d19c3b
TS
16832016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1684
1685 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1686 Move pragma context checking into...
1687 (c_parser_omp_cancellation_point): ... here, and improve
1688 diagnostic messages.
1689 * c-typeck.c (c_finish_omp_cancel)
1690 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1691
152ef731
JJ
16922016-06-29 Jakub Jelinek <jakub@redhat.com>
1693
1694 PR c/71685
1695 * c-typeck.c (c_build_qualified_type): Don't clear
1696 C_TYPE_INCOMPLETE_VARS for the main variant.
1697
16982016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1699
1700 PR c/71552
1701 * c-typeck.c (output_init_element): Diagnose incompatible types
1702 before non-constant initializers.
1703
e9ac1f86
JJ
17042016-06-28 Jakub Jelinek <jakub@redhat.com>
1705
1706 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1707
277d7ee0
AK
17082016-06-23 Andi Kleen <ak@linux.intel.com>
1709
1710 * Make-lang.in: Add support for autofdo.
1711
1a4f11c8
DM
17122016-06-22 David Malcolm <dmalcolm@redhat.com>
1713
1714 PR c/70339
1715 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1716 (implicit_decl_warning): When issuing warnings for implicit
1717 declarations, attempt to provide a suggestion via
1718 lookup_name_fuzzy.
1719 (undeclared_variable): Likewise when issuing errors.
1720 (lookup_name_in_scope): Likewise.
1721 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1722 (best_macro_match): New typedef.
1723 (find_closest_macro_cpp_cb): New function.
1724 (lookup_name_fuzzy): New function.
1725 * c-parser.c: Include gcc-rich-location.h.
1726 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1727 (c_keyword_starts_typename): ...this new function.
1728 (c_parser_declaration_or_fndef): When issuing errors about
1729 missing "struct" etc, add a fixit. For other kinds of errors,
1730 attempt to provide a suggestion via lookup_name_fuzzy.
1731 (c_parser_parms_declarator): When looking ahead to detect typos in
1732 type names, also reject CPP_KEYWORD.
1733 (c_parser_parameter_declaration): When issuing errors about
1734 unknown type names, attempt to provide a suggestion via
1735 lookup_name_fuzzy.
1736 * c-tree.h (c_keyword_starts_typename): New prototype.
1737
5a578671
JM
17382016-06-20 Joseph Myers <joseph@codesourcery.com>
1739
1740 PR c/71601
1741 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1742 c_common_type returns error_mark_node.
1743
3f8257db 17442016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1745
1746 PR c/69507
1747 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1748 __alignof__ (expression).
1749
6a3f203c
DM
17502016-06-14 David Malcolm <dmalcolm@redhat.com>
1751
1752 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1753
264757fb
DM
17542016-06-14 David Malcolm <dmalcolm@redhat.com>
1755
1756 * c-typeck.c (build_component_ref): Simplify fixit code by
1757 using gcc_rich_location::add_fixit_misspelled_id.
1758 (set_init_label): Likewise.
1759
f7e4f2e3
DM
17602016-06-13 David Malcolm <dmalcolm@redhat.com>
1761
1762 * c-parser.c (c_parser_initelt): Provide location of name for new
1763 location_t param of set_init_label.
1764 * c-tree.h (set_init_label): Add location_t param.
1765 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1766 param and use it when issuing error messages about unrecognized
1767 field names. Attempt to provide a fixit hint if appropriate,
1768 otherwise update the error message to provide the type name.
1769
4b1ffdb1
TS
17702016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1771
1772 PR c/71381
1773 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1774 Loosen checking.
1775
44a845ca
MS
17762016-06-08 Martin Sebor <msebor@redhat.com>
1777 Jakub Jelinek <jakub@redhat.com>
1778
1779 PR c++/70507
1780 PR c/68120
1781 * c-typeck.c (convert_arguments): Don't promote last argument
1782 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1783
92a5f2ba
MP
17842016-06-08 Marek Polacek <polacek@redhat.com>
1785
1786 PR c/71418
1787 * c-decl.c (grokdeclarator): Check TYPE_P.
1788
08203f73
MP
1789 PR c/71426
1790 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1791 code.
1792
6ffd47b7
DM
17932016-06-07 David Malcolm <dmalcolm@redhat.com>
1794
1795 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1796 and structure element reference, capture the location of the
1797 element name token and pass it to build_component_ref.
1798 (c_parser_postfix_expression_after_primary): Likewise for
1799 structure element dereference.
1800 (c_parser_omp_variable_list): Likewise for
1801 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1802 * c-tree.h (build_component_ref): Add location_t param.
1803 * c-typeck.c (build_component_ref): Add location_t param
1804 COMPONENT_LOC. Use it, if available, when issuing hints about
1805 mispelled member names to provide a fixit replacement hint.
1806
1f40cff3
MP
18072016-06-06 Marek Polacek <polacek@redhat.com>
1808
1809 PR c/71362
1810 * c-parser.c (c_parser_direct_declarator): Set location.
1811
5545a907
MP
18122016-06-06 Marek Polacek <polacek@redhat.com>
1813
1814 * c-typeck.c (comptypes_internal): Handle comparisons of
1815 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1816 TYPE_REF_CAN_ALIAS_ALL.
1817
b605f663
CLT
18182016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1819
1820 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1821 arguments as addressable when async clause exists.
1822
00631022
JJ
18232016-05-30 Jakub Jelinek <jakub@redhat.com>
1824
1825 PR c++/71349
1826 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1827 when combined with target construct.
1828
7211a097
JJ
18292016-05-26 Jakub Jelinek <jakub@redhat.com>
1830
1831 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1832 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1833
95efe6b6
MP
18342016-05-25 Marek Polacek <polacek@redhat.com>
1835
1836 PR c/71265
1837 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1838
a23faf7a
MP
1839 PR c/71266
1840 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1841
e46c7770
CP
18422016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1843
1844 * c-parser.c (c_parser_oacc_declare): Add support for
1845 GOMP_MAP_FIRSTPRIVATE_POINTER.
1846 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1847 argument with enum c_omp_region_type ort.
1848 (handle_omp_array_sections): Likewise. Update call to
1849 handle_omp_array_sections_1.
1850 (c_finish_omp_clauses): Add specific errors and warning messages for
1851 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1852 call to handle_omp_array_sections.
1853
a04e69c0
TS
18542016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1855
1856 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1857
f17a223d
RB
18582016-05-24 Richard Biener <rguenther@suse.de>
1859
1860 PR middle-end/70434
1861 PR c/69504
1862 * c-typeck.c (build_array_ref): Do not complain about indexing
1863 non-lvalue vectors. Adjust for function name change.
1864
79063edd
MS
18652016-05-20 Martin Sebor <msebor@redhat.com>
1866
1867 PR c/71115
1868 * c-typeck.c (error_init): Use
1869 expansion_point_location_if_in_system_header.
1870 (warning_init): Same.
1871
8a40fef3
DM
18722016-05-19 David Malcolm <dmalcolm@redhat.com>
1873
1874 PR c/71171
1875 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1876 in error-handling.
1877 (c_parser_postfix_expression): Likewise.
1878 * c-tree.h (c_expr::set_error): New method.
1879 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1880 that result's range is initialized.
1881
e9892350
JG
18822016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1883
1884 * c-typeck.c (parser_build_unary_op): Fix formatting.
1885
8fad45f5
MW
18862016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1887
1888 * c-decl.c (grokdeclarator): Remove errmsg and use of
1889 targetm.invalid_return_type.
1890 (grokparms): Remove errmsg and use of
1891 targetm.invalid_parameter_type.
1892
aa4b467b
JM
18932016-05-13 Joseph Myers <joseph@codesourcery.com>
1894
1895 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1896 function return type.
1897
4f2e1536
MP
18982016-05-12 Marek Polacek <polacek@redhat.com>
1899
1900 PR c/70756
1901 * c-decl.c (build_compound_literal): Pass LOC down to
1902 c_incomplete_type_error.
1903 * c-tree.h (require_complete_type): Adjust declaration.
1904 (c_incomplete_type_error): Likewise.
1905 * c-typeck.c (require_complete_type): Add location parameter, pass it
1906 down to c_incomplete_type_error.
1907 (c_incomplete_type_error): Add location parameter, pass it down to
1908 error_at.
1909 (build_component_ref): Pass location down to c_incomplete_type_error.
1910 (default_conversion): Pass location down to require_complete_type.
1911 (build_array_ref): Likewise.
1912 (build_function_call_vec): Likewise.
1913 (convert_arguments): Likewise.
1914 (build_unary_op): Likewise.
1915 (build_c_cast): Likewise.
1916 (build_modify_expr): Likewise.
1917 (convert_for_assignment): Likewise.
1918 (c_finish_omp_clauses): Likewise.
1919
d6e83a8d
MM
19202016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1921
1922 PR c/43651
1923 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1924 is enabled.
1925 * c-errors.c (pedwarn_c90): Return true if warned.
1926 * c-tree.h (pedwarn_c90): Change return type to bool.
1927 (enum c_declspec_word): Add new enumerator cdw_atomic.
1928
5c3a10fb
MP
19292016-05-11 Marek Polacek <polacek@redhat.com>
1930
1931 PR c++/71024
1932 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1933 diagnose_mismatched_attributes and call it.
1934
cf68d92c
MP
19352016-05-10 Marek Polacek <polacek@redhat.com>
1936
1937 PR c/70255
1938 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1939 on a declaration following the definition.
1940
351f85c5
JJ
19412016-05-05 Jakub Jelinek <jakub@redhat.com>
1942
1943 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1944 parse it through to c_parser_c99_block_statement.
1945 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1946 caller.
1947
deef7113
MP
19482016-05-04 Marek Polacek <polacek@redhat.com>
1949
1950 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1951 OPT_Wdangling_else.
1952
de55efd5
MP
19532016-05-04 Marek Polacek <polacek@redhat.com>
1954
1955 PR c/48778
1956 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1957 for macro expansions.
1958
79ce98bc
MP
19592016-05-03 Marek Polacek <polacek@redhat.com>
1960
1961 PR c/70859
1962 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1963 check_builtin_function_arguments.
1964
fb2647aa
RB
19652016-05-03 Richard Biener <rguenther@suse.de>
1966
1967 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1968 the checksum from the previous stage.
1969
77886428
CP
19702016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1971
1972 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1973 c_finish_omp_clauses.
1974 (c_parser_omp_all_clauses): Likewise.
1975 (c_parser_oacc_cache): Likewise.
1976 (c_parser_oacc_loop): Likewise.
1977 (omp_split_clauses): Likewise.
1978 (c_parser_omp_declare_target): Likewise.
1979 (c_parser_cilk_all_clauses): Likewise.
1980 (c_parser_cilk_for): Likewise.
1981 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1982 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1983
7176a4a0
MP
19842016-05-02 Marek Polacek <polacek@redhat.com>
1985
1986 PR c/70851
1987 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1988 incomplete type.
1989
e7ff0319
CP
19902016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1991
1992 PR middle-end/70626
1993 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1994 OACC_LOOP_CLAUSE_MASK.
1995 (c_parser_oacc_kernels_parallel): Update call to
1996 c_oacc_split_loop_clauses.
1997
9f405ce1
AM
19982016-04-28 Andrew MacLeod <amacleod@redhat.com>
1999
2000 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2001 argument to build_modify_expr in two cases.
2002
c1e1f433
BS
20032016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2004
2005 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2006 warn_for_memset instead of warning directly here.
2007
2448a956
MP
20082016-04-26 Marek Polacek <polacek@redhat.com>
2009
2010 PR c/67784
2011 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2012 out of ...
2013 (c_parser_for_statement): ... here.
2014 (c_parser_if_statement): Use it.
2015 (c_parser_switch_statement): Use it.
2016 (c_parser_while_statement): Use it.
2017
b02a5e26
MP
2018 PR c/70791
2019 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2020
477d4906
IV
20212016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2022
2023 PR c++/69363
2024 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2025 instead of c_finish_cilk_clauses.
2026 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2027 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2028 floating-point variables in the linear clause for Cilk Plus.
2029
fe37c7af
MM
20302016-04-18 Michael Matz <matz@suse.de>
2031
2032 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2033 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2034
949505a9
MP
20352016-04-15 Marek Polacek <polacek@redhat.com>
2036
2037 PR c/70671
2038 * c-typeck.c (build_unary_op): Pass location down to error and
2039 warning call.
2040
dda1bf61
JJ
20412016-04-15 Jakub Jelinek <jakub@redhat.com>
2042
2043 PR c/70436
2044 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2045 where needed.
2046 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2047 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2048 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2049 Adjust c_parser_pragma callers.
2050 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2051 caller.
2052 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2053 c_parser_statement.
2054 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2055 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2056 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2057 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2058 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2059 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2060 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2061 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2062 down where needed.
2063 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2064 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2065 calls.
2066
99cd9857
MP
20672016-04-13 Marek Polacek <polacek@redhat.com>
2068
2069 PR c/70436
2070 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2071 adjust callers.
2072 (c_parser_statement): Likewise.
2073 (c_parser_c99_block_statement): Likewise.
2074 (c_parser_while_statement): Likewise.
2075 (c_parser_for_statement): Likewise.
2076 (c_parser_if_body): Don't set IF_P here.
2077 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2078 about dangling else here.
2079 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2080 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2081 warn about dangling else here.
2082
f13355da
MP
20832016-04-04 Marek Polacek <polacek@redhat.com>
2084
2085 PR c/70307
2086 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2087
5fde6a45
MP
20882016-03-31 Marek Polacek <polacek@redhat.com>
2089
2090 PR c/70297
2091 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2092
4bbf545b
DM
20932016-03-18 David Malcolm <dmalcolm@redhat.com>
2094
2095 PR c/70281
2096 * c-parser.c (c_parser_postfix_expression): Set the source range
2097 for uses of "__builtin_types_compatible_p".
2098
fcc2b74f
JJ
20992016-03-17 Jakub Jelinek <jakub@redhat.com>
2100
2101 PR c/70280
2102 * c-typeck.c (composite_type): Don't count void_list_node
2103 into len, if the list is terminated by void_list_node, start
2104 with void_list_node instead of NULL for newargs. Stop
2105 at void_list_node.
2106
ab4c578f
MP
21072016-03-16 Marek Polacek <polacek@redhat.com>
2108
2109 PR c/70093
2110 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2111 nested functions returning VM types.
2112
96b3c82d
CP
21132016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2114
2115 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2116 when calling c_finish_omp_clauses.
2117
29b9828f
BS
21182016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2119
2120 PR c/69824
2121 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2122 for later.
2123
7ff6ca38
MP
21242016-03-04 Marek Polacek <polacek@redhat.com>
2125
2126 PR c/69798
2127 * c-parser.c (c_parser_postfix_expression): Call
2128 c_parser_cast_expression rather than c_parser_postfix_expression.
2129
686e2237
JJ
21302016-03-01 Jakub Jelinek <jakub@redhat.com>
2131
2132 PR c/69796
2133 PR c/69974
2134 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2135 of incomplete decls to error_mark_node.
2136
0b05329b
MP
21372016-02-24 Marek Polacek <polacek@redhat.com>
2138
2139 PR c/69819
2140 * c-decl.c (finish_decl): Don't update the copy of the type of a
2141 different decl type.
2142
067fbd8b
JJ
21432016-02-23 Jakub Jelinek <jakub@redhat.com>
2144
2145 PR objc/69844
2146 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2147 in id_kind reclassification.
2148
bf14eba2
JJ
21492016-02-16 Jakub Jelinek <jakub@redhat.com>
2150
2151 PR c/69835
2152 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2153
ba539195
JN
21542016-02-16 James Norris <jnorris@codesourcery.com>
2155
2156 PR c/64748
2157 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2158
16595a1f
BS
21592016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2160
f48dfe98
BS
2161 * c-decl.c (build_null_declspecs): Zero the entire struct.
2162
16595a1f
BS
2163 PR c/69522
2164 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2165 callers changed. If nested_p is true, use it to call
2166 finish_implicit_inits.
2167 * c-tree.h (finish_implicit_inits): Declare.
2168 * c-typeck.c (finish_implicit_inits): New function. Move code
2169 from ...
2170 (push_init_level): ... here.
2171 (set_designator, process_init_element): Call finish_implicit_inits.
2172
66756373
JJ
21732016-02-11 Jakub Jelinek <jakub@redhat.com>
2174
2175 PR c/69768
2176 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2177 arguments for -Waddress warning.
2178
1066e9b5
JJ
21792016-02-04 Jakub Jelinek <jakub@redhat.com>
2180
2181 PR c/69669
2182 * c-decl.c (finish_enum): When honoring mode attribute,
2183 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2184
3a5d2ba4
JJ
21852016-01-29 Jakub Jelinek <jakub@redhat.com>
2186
2187 PR debug/69518
2188 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2189 all type variants, not just TYPE_MAIN_VARIANT.
2190
cbdd8ae0
JJ
21912016-01-27 Jakub Jelinek <jakub@redhat.com>
2192
2193 PR debug/66869
2194 * c-decl.c (c_write_global_declarations_1): Warn with
2195 warn_unused_function if static prototype without definition
2196 is not C_DECL_USED.
2197
fa74a4bc
MP
21982016-01-27 Marek Polacek <polacek@redhat.com>
2199
2200 PR c/68062
2201 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2202 to unsigned, if needed. Add -Wsign-compare warning.
2203
13f92e8d
JJ
22042016-01-26 Jakub Jelinek <jakub@redhat.com>
2205
2206 PR tree-optimization/69483
2207 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2208
cd8e73dc 22092016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2210
2211 PR c/24293
2212 * c-tree.h (incomplete_record_decls): Declare.
2213 * c-parser.c (incomplete_record_decls): Define.
2214 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2215 report error if any decl has zero size.
2216 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2217 or enum type to incomplete_record_decls.
2218
e6d6ec9e
TV
22192016-01-14 Tom de Vries <tom@codesourcery.com>
2220
2221 PR tree-optimization/68773
2222 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2223 set force_output.
2224
00083992
MP
22252016-01-14 Marek Polacek <polacek@redhat.com>
2226
2227 PR c/69262
2228 * c-decl.c (grokdeclarator): Provide more information for invalid
2229 array declarations.
2230
7443cf13
DM
22312016-01-06 David Malcolm <dmalcolm@redhat.com>
2232
2233 * c-parser.c (c_parser_unary_expression): For dereferences, build
2234 a combined location before calling build_indirect_ref, so that
2235 error reports cover the full range, manually updating the c_expr
2236 src_range.
2237
6b131d5b
MP
22382016-01-06 Marek Polacek <polacek@redhat.com>
2239
2240 PR sanitizer/69099
2241 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2242 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2243 NULL.
2244
818ab71a
JJ
22452016-01-04 Jakub Jelinek <jakub@redhat.com>
2246
2247 Update copyright years.
2248
2fe0a208
MP
22492016-01-04 Marek Polacek <polacek@redhat.com>
2250
2251 PR c/68908
2252 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2253 optimization to use __atomic_fetch_* built-in if possible.
2254
c7b48c8a
TS
22552015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2256
2257 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2258 into...
2259 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2260 all users.
2261
fda5652f
MP
22622015-12-22 Marek Polacek <polacek@redhat.com>
2263
2264 PR c/69002
2265 * c-typeck.c (build_component_ref): Warn when acessing elements of
2266 atomic structures or unions.
2267
745e411d
DM
22682015-12-21 David Malcolm <dmalcolm@redhat.com>
2269
2270 * c-typeck.c: Include "gcc-rich-location.h".
2271 (build_binary_op): In the two places that call binary_op_error,
2272 create a gcc_rich_location and populate it with the location of
2273 the binary op and its two operands.
2274
94c40e19
DM
22752015-12-16 David Malcolm <dmalcolm@redhat.com>
2276
2277 * c-parser.c (c_parser_statement_after_labels): When calling
2278 c_finish_return, Use the return expression's location if it has
2279 one, falling back to the location of the first token within it.
2280 * c-typeck.c (c_finish_return): When issuing warnings about
2281 the incorrect presence/absence of a return value, issue a note
2282 showing the declaration of the function.
2283
de67c4c3
DM
22842015-12-16 David Malcolm <dmalcolm@redhat.com>
2285
2286 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2287 to 4.
2288 (c_parser_peek_nth_token): New function.
2289 (c_parser_peek_conflict_marker): New function.
2290 (c_parser_error): Detect conflict markers and report them as such.
2291
a10704e1
DM
22922015-12-16 David Malcolm <dmalcolm@redhat.com>
2293
2294 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2295 to preserve range information for the primary expression
2296 in the call to c_parser_postfix_expression_after_primary.
2297
8062bca6
DM
22982015-12-16 David Malcolm <dmalcolm@redhat.com>
2299
2300 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2301 expression location, falling back on the first token location,
2302 rather than always using the latter.
2303
d06f8b75
MP
23042015-12-16 Marek Polacek <polacek@redhat.com>
2305
2306 PR c/64637
2307 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2308 available.
2309
2994fb91
MP
23102015-12-15 Marek Polacek <polacek@redhat.com>
2311
2312 PR c/68907
2313 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2314 artificial decl.
2315
a1b93f8d
DM
23162015-12-08 David Malcolm <dmalcolm@redhat.com>
2317
2318 * c-parser.c (c_parser_alignof_expression): Capture location of
2319 closing parenthesis (if any), or of end of unary expression, and
2320 use it to build a src_range for the expression.
2321
46c6e1e2
DM
23222015-12-08 David Malcolm <dmalcolm@redhat.com>
2323
2324 PR c/68757
2325 * c-parser.c (c_parser_get_builtin_args): Add
2326 "out_close_paren_loc" param, and write back to it.
2327 (c_parser_postfix_expression): Capture the closing
2328 parenthesis location for RID_CHOOSE_EXPR,
2329 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2330 RID_BUILTIN_SHUFFLE and use it to set the source range
2331 for such expressions; within RID_BUILTIN_COMPLEX set
2332 the underlying location.
2333
66189108
MP
23342015-12-07 Marek Polacek <polacek@redhat.com>
2335
2336 PR c/68668
2337 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2338 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2339
f187980b
EB
23402015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2341
2342 * c-tree.h (c_build_va_arg): Adjust prototype.
2343 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2344 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2345 parameter, adjust throughout and issue an error if EXPR is a component
2346 with reverse storage order.
2347
4250754e
JM
23482015-12-02 Jason Merrill <jason@redhat.com>
2349
2350 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2351 (c_fully_fold_internal, decl_constant_value_for_optimization):
2352 Move from c-common.c.
2353 * c-tree.h: Declare decl_constant_value_for_optimization.
2354 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2355
e9e32ee6
JM
23562015-12-02 Joseph Myers <joseph@codesourcery.com>
2357
2358 PR c/68162
2359 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2360 following link from declarator to next declarator. Track original
2361 qualified type and pass it to c_build_qualified_type.
2362 * c-typeck.c (c_build_qualified_type): Add arguments
2363 orig_qual_type and orig_qual_indirect.
2364
ff7a55bf
TS
23652015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2366
2367 * c-parser.c (c_parser_omp_clause_name)
2368 (c_parser_oacc_all_clauses): Alphabetical sorting.
2369
657e4e47
JJ
23702015-12-02 Jakub Jelinek <jakub@redhat.com>
2371
2372 PR c/68533
2373 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2374 for diagnostics.
2375
37d5ad46
JB
23762015-12-01 Julian Brown <julian@codesourcery.com>
2377 Cesar Philippidis <cesar@codesourcery.com>
2378 James Norris <James_Norris@mentor.com>
2379
2380 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2381 (c_parser_oacc_clause_use_device): New function.
2382 (c_parser_oacc_all_clauses): Add use_device support.
2383 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2384 (c_parser_oacc_host_data): New function.
2385 (c_parser_omp_construct): Add host_data support.
2386 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2387 * c-typeck.c (c_finish_oacc_host_data): New function.
2388 (c_finish_omp_clauses): Add use_device support.
2389
a4850ce9
JH
23902015-11-29 Jan Hubicka <hubicka@ucw.cz>
2391
2392 PR c/67106
2393 * c-decl.c: Set TYPE_PACKED in variants.
2394
b58d3df2
ML
23952015-11-27 Martin Liska <mliska@suse.cz>
2396
2397 PR c++/68312
2398 * c-array-notation.c (fix_builtin_array_notation_fn):
2399 Use release_vec_vec instead of vec::release.
2400 (build_array_notation_expr): Likewise.
2401 (fix_conditional_array_notations_1): Likewise.
2402 (fix_array_notation_expr): Likewise.
2403 (fix_array_notation_call_expr): Likewise.
2404
aec17bfe
JJ
24052015-11-27 Jakub Jelinek <jakub@redhat.com>
2406
2407 PR c/63326
2408 * c-parser.c (c_parser_compound_statement_nostart): If
2409 last_label is true, use pragma_stmt instead of pragma_compound
2410 as second c_parser_pragma argument.
2411 (c_parser_omp_ordered, c_parser_omp_target_update,
2412 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2413 false as second argument to c_parser_skip_to_pragma_eol after
2414 diagnosing standalone directives used in pragma_stmt context.
2415
688c4de0
IV
24162015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2417
2418 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2419 with "if (ENABLE_OFFLOADING)".
2420
cbd03aee
DM
24212015-11-23 David Malcolm <dmalcolm@redhat.com>
2422
2423 PR objc/68438
2424 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2425 for various Objective-C constructs: Class.name syntax,
2426 @selector(), @protocol(), @encode(), and [] message syntax.
2427
a87a86e1
DM
24282015-11-20 David Malcolm <dmalcolm@redhat.com>
2429
2430 PR 62314
2431 * c-typeck.c (should_suggest_deref_p): New function.
2432 (build_component_ref): Special-case POINTER_TYPE when
2433 generating a "not a structure of union" error message, and
2434 suggest a "->" rather than a ".", providing a fix-it hint.
2435
8ece8dfb
DM
24362015-11-19 David Malcolm <dmalcolm@redhat.com>
2437
2438 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2439 candidate into a new function, find_closest_identifier.
2440
433068cc
MP
24412015-11-19 Marek Polacek <polacek@redhat.com>
2442
2443 PR c/68412
2444 * c-typeck.c (parser_build_binary_op): Properly handle
2445 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2446
bef08b71
DM
24472015-11-17 David Malcolm <dmalcolm@redhat.com>
2448
2449 * c-parser.c (set_c_expr_source_range): Bulletproof both
2450 overloaded implementations against NULL expr->value.
2451 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2452 values.
2453 (c_parser_unary_expression): Likewise when handling addresses of
2454 labels.
2455 (c_parser_postfix_expression): Likewise for statement expressions,
2456 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2457 __builtin_va_arg, and for __builtin_offset_of.
2458 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2459 src_range using the range of the braced initializer.
2460 (c_parser_transaction_expression): Set src_range for "ret" to a
2461 sane pair of values.
2462
fff77217
KY
24632015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2464
2465 * c-parser.c (c_finish_omp_declare_simd): Look for
2466 "simd" attribute as well. Update error message.
2467
1d899da2
TS
24682015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2469
2470 * c-parser.c (c_parser_omp_declare_target): Adjust.
2471
e4606348
JJ
24722015-11-14 Jakub Jelinek <jakub@redhat.com>
2473
2474 * c-typeck.c (c_finish_omp_clauses): Don't mark
2475 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2476
3e636daf
MP
24772015-11-14 Marek Polacek <polacek@redhat.com>
2478
2479 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2480 * c-typeck.c: Likewise.
2481
ebedc9a3
DM
24822015-11-13 David Malcolm <dmalcolm@redhat.com>
2483
2484 * c-decl.c (warn_defaults_to): Pass line_table to
2485 rich_location ctor.
2486 * c-errors.c (pedwarn_c99): Likewise.
2487 (pedwarn_c90): Likewise.
2488 * c-parser.c (set_c_expr_source_range): New functions.
2489 (c_token::get_range): New method.
2490 (c_token::get_finish): New method.
2491 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2492 based on the range from the start of the LHS to the end of the
2493 RHS.
2494 (c_parser_conditional_expression): Likewise, based on the range
2495 from the start of the cond.value to the end of exp2.value.
2496 (c_parser_binary_expression): Call set_c_expr_source_range on
2497 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2498 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2499 based on the cast_loc through to the end of the expr.
2500 (c_parser_unary_expression): Likewise, based on the
2501 op_loc through to the end of op.
2502 (c_parser_sizeof_expression) Likewise, based on the start of the
2503 sizeof token through to either the closing paren or the end of
2504 expr.
2505 (c_parser_postfix_expression): Likewise, using the token range,
2506 or from the open paren through to the close paren for
2507 parenthesized expressions.
2508 (c_parser_postfix_expression_after_primary): Likewise, for
2509 various kinds of expression.
2510 * c-tree.h (struct c_expr): Add field "src_range".
2511 (c_expr::get_start): New method.
2512 (c_expr::get_finish): New method.
2513 (set_c_expr_source_range): New decls.
2514 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2515 on ret for prefix unary ops.
2516 (parser_build_binary_op): Likewise, running from the start of
2517 arg1.value through to the end of arg2.value.
2518
ec8b536f
MP
25192015-11-13 Marek Polacek <polacek@redhat.com>
2520
2521 PR c/68320
2522 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2523
277fe616
DM
25242015-11-13 David Malcolm <dmalcolm@redhat.com>
2525
2526 * c-typeck.c: Include spellcheck.h.
2527 (lookup_field_fuzzy_find_candidates): New function.
2528 (lookup_field_fuzzy): New function.
2529 (build_component_ref): If the field was not found, try using
2530 lookup_field_fuzzy and potentially offer a suggestion.
2531
6e232ba4
JN
25322015-11-12 James Norris <jnorris@codesourcery.com>
2533 Joseph Myers <joseph@codesourcery.com>
2534
2535 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2536 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2537 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2538 and PRAGMA_OMP_CLAUSE_LINK.
2539 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2540 and PRAGMA_OACC_CLAUSE_LINK.
2541 (OACC_DECLARE_CLAUSE_MASK): New definition.
2542 (c_parser_oacc_declare): New function.
2543
9be4f715
MP
25442015-11-12 Marek Polacek <polacek@redhat.com>
2545
2546 PR c/67784
2547 * c-parser.c (c_parser_for_statement): Reclassify the token in
2548 a correct scope.
2549
e78bede6
MP
25502015-11-11 Marek Polacek <polacek@redhat.com>
2551
2552 PR c/68107
2553 PR c++/68266
2554 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2555 checking the size of an array.
2556
69f293c9
AM
25572015-11-11 Andrew MacLeod <amacleod@redhat.com>
2558
2559 * c-array-notation.c: Remove unused header files.
2560 * c-aux-info.c: Likewise.
2561 * c-convert.c: Likewise.
2562 * c-decl.c: Likewise.
2563 * c-errors.c: Likewise.
2564 * c-lang.c: Likewise.
2565 * c-objc-common.c: Likewise.
2566 * c-parser.c: Likewise.
2567 * c-typeck.c: Likewise.
2568 * gccspec.c: Likewise.
2569
3a40d81d
NS
25702015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2571 Cesar Philippidis <cesar@codesourcery.com>
2572 James Norris <jnorris@codesourcery.com>
2573 Julian Brown <julian@codesourcery.com>
2574 Nathan Sidwell <nathan@codesourcery.com>
2575
2576 c/
2577 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2578 routine arg.
2579 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2580 (c_parser_pragma): Parse 'acc routine'.
2581 (OACC_ROUTINE_CLAUSE_MARK): Define.
2582 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2583
fc402eec
AA
25842015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2585
2586 PR debug/67192
2587 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2588 location of the backward-goto to the start of the loop body.
2589
f6b0b3db
AA
25902015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2591
2592 PR debug/67192
2593 * c-parser.c (c_parser_while_statement): Finish the loop before
2594 parsing ahead for misleading indentation.
2595 (c_parser_for_statement): Likewise.
2596
ee45a32d
EB
25972015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2598
2599 * c-decl.c (finish_struct): If the structure has reverse storage
2600 order, rewrite the type of array fields with scalar component. Call
2601 maybe_apply_pragma_scalar_storage_order on entry.
2602 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2603 errors on bit-fields and reverse SSO here and not...
2604 (c_mark_addressable): ...here.
2605 (output_init_element): Adjust call to initializer_constant_valid_p.
2606 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2607
8a645150
DM
26082015-11-06 David Malcolm <dmalcolm@redhat.com>
2609
2610 * c-decl.c (warn_defaults_to): Update for change in signature
2611 of diagnostic_set_info.
2612 * c-errors.c (pedwarn_c99): Likewise.
2613 (pedwarn_c90): Likewise.
2614 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2615 for textinfo::set_location.
2616
7a5e4956
CP
26172015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2618 Thomas Schwinge <thomas@codesourcery.com>
2619 James Norris <jnorris@codesourcery.com>
2620
2621 * c-parser.c (c_parser_omp_clause_name): Add support for
2622 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2623 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2624 default(none) in OpenACC.
2625 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2626 arguments.
2627 (c_parser_oacc_clause_tile): New function.
2628 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2629 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2630 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2631 TILE}.
2632 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2633 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2634 FIRSTPRIVATE}.
2635 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2636 (c_parser_oacc_update): Update the error message for missing clauses.
2637 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2638 and OMP_CLAUSE_INDEPENDENT.
2639
bfcfbfa0
MP
26402015-11-05 Marek Polacek <polacek@redhat.com>
2641
2642 PR c/68090
2643 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2644 deal with pre-evaluation on invalid types.
2645
e01d41e5
JJ
26462015-11-05 Jakub Jelinek <jakub@redhat.com>
2647 Ilya Verbin <ilya.verbin@intel.com>
2648
2649 * c-parser.c: Include context.h and gimple-expr.h.
2650 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2651 monotonic together with nonmonotonic.
2652 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2653 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2654 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2655 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2656 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2657 expressions on combined target teams before the target.
2658 (c_parser_omp_declare_target): If decl has "omp declare target" or
2659 "omp declare target link" attribute, and cgraph or varpool node already
2660 exists, then set corresponding flags. Call c_finish_omp_clauses
2661 in the parenthesized extended-list syntax case.
2662 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2663 declare target.
2664 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2665 on OMP_CLAUSE_REDUCTION array sections.
2666 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2667 into the constant offset, or for variable low-bound using
2668 POINTER_PLUS_EXPR. For structure element based array sections use
2669 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2670 (c_finish_omp_clauses): Drop generic_field_head, structure
2671 elements are now always mapped even as array section bases,
2672 diagnose same var in data sharing and mapping clauses. Diagnose if
2673 linear step on declare simd is neither a constant nor a uniform
2674 parameter. Look through POINTER_PLUS_EXPR for array section
2675 reductions. Diagnose the same var or function appearing multiple
2676 times on the same directive. Fix up wording for the to clause if t
2677 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2678 modifier on kinds other than dynamic or guided or nonmonotonic
2679 modifier together with ordered clause.
2680
4bf9e5a8
TS
26812015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2682 Chung-Lin Tang <cltang@codesourcery.com>
2683
2684 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2685
2adfab87
AM
26862015-10-29 Andrew MacLeod <amacleod@redhat.com>
2687
2688 * c-array-notation.c: Reorder #include's and remove duplicates.
2689 * c-aux-info.c: Likewise.
2690 * c-convert.c: Likewise.
2691 * c-decl.c: Likewise.
2692 * c-errors.c: Likewise.
2693 * c-lang.c: Likewise.
2694 * c-objc-common.c: Likewise.
2695 * c-parser.c: Likewise.
2696 * c-typeck.c: Likewise.
2697
e922069e
JW
26982015-10-26 Jim Wilson <jim.wilson@linaro.org>
2699
2700 PR debug/66068
2701 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2702 after calling build_qualified_type.
2703
765dd391
CP
27042015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2705 Thomas Schwinge <thomas@codesourcery.com>
2706 James Norris <jnorris@codesourcery.com>
2707 Joseph Myers <joseph@codesourcery.com>
2708 Julian Brown <julian@codesourcery.com>
2709 Bernd Schmidt <bschmidt@redhat.com>
2710
2711 * c-parser.c (c_parser_oacc_shape_clause): New.
2712 (c_parser_oacc_simple_clause): New.
2713 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2714 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2715
88bae6f4
TS
27162015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2717 James Norris <jnorris@codesourcery.com>
2718 Cesar Philippidis <cesar@codesourcery.com>
2719
2720 PR c/64765
2721 PR c/64880
2722 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2723 parameters, and handle these. Adjust all users.
2724 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2725 into...
2726 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2727 all users.
2728 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2729 declare functions.
2730 (c_finish_omp_construct): Declare function.
2731 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2732 Merge functions into...
2733 (c_finish_omp_construct): ... this new function.
2734
a8fc2579
RB
27352015-10-22 Richard Biener <rguenther@suse.de>
2736
2737 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2738 before folding a MINUS_EXPR.
2739
e9122ef6
MP
27402015-10-21 Marek Polacek <polacek@redhat.com>
2741
2742 PR c/68024
2743 * c-decl.c (start_function): Warn about vararg functions without
2744 a prototype.
2745
9f47c7e5
IE
27462015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2747
2748 * c-typeck.c (build_conditional_expr): Use boolean vector
2749 type for vector comparison.
2750 (build_vec_cmp): New.
2751 (build_binary_op): Use build_vec_cmp for comparison.
2752
fa60eeb9
MP
27532015-10-20 Marek Polacek <polacek@redhat.com>
2754
2755 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2756
2c7020eb
MP
27572015-10-20 Marek Polacek <polacek@redhat.com>
2758
2759 PR c/67964
2760 * c-parser.c (c_parser_attributes): Break out of the loop if the
2761 token after an attribute isn't a comma.
2762
d9a6bd32
JJ
27632015-10-13 Jakub Jelinek <jakub@redhat.com>
2764 Aldy Hernandez <aldyh@redhat.com>
2765
2766 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2767 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2768 (c_parser_omp_variable_list): Handle structure elements for
2769 map, to and from clauses. Handle array sections in reduction
2770 clause. Formatting fixes.
2771 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2772 if clause modifiers.
2773 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2774 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2775 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2776 c_parser_omp_clause_is_device_ptr): New functions.
2777 (c_parser_omp_clause_ordered): Parse optional parameter.
2778 (c_parser_omp_clause_reduction): Handle array reductions.
2779 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2780 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2781 functions.
2782 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2783 (c_parser_omp_clause_depend_sink): New function.
2784 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2785 (c_parser_omp_clause_map): Parse release/delete map kinds and
2786 optional always modifier.
2787 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2788 and c_finish_omp_clauses callers.
2789 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2790 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2791 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2792 (OMP_CRITICAL_CLAUSE_MASK): Define.
2793 (c_parser_omp_critical): Parse critical clauses.
2794 (c_parser_omp_for_loop): Handle doacross loops, adjust
2795 c_finish_omp_for and c_finish_omp_clauses callers.
2796 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2797 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2798 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2799 (c_parser_omp_for): Disallow ordered clause when combined with
2800 distribute. Disallow linear clause when combined with distribute
2801 and not combined with simd.
2802 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2803 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2804 parse clauses and if depend clause is found, don't parse a body.
2805 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2806 Allow target parallel without for after it.
2807 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2808 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2809 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2810 invalid kinds.
2811 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2812 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2813 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2814 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2815 functions.
2816 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2817 defaultmap and is_device_ptr clauses.
2818 (c_parser_omp_target): Parse target parallel and target simd. Set
2819 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2820 and target exit data. Diagnose invalid map kinds.
2821 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2822 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2823 construct.
2824 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2825 &omp_priv.
2826 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2827 (c_parser_omp_taskloop): New function.
2828 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2829 handle PRAGMA_OMP_TASKLOOP.
2830 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2831 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2832 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2833 Add IS_OMP argument, handle structure element bases, diagnose
2834 bitfields, pass IS_OMP recursively, diagnose known zero length
2835 array sections in depend clauses, handle array sections in reduction
2836 clause, diagnose negative length even for pointers.
2837 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2838 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2839 array sections in reduction clause, set
2840 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2841 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2842 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2843 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2844
21ba0cea
MP
28452015-10-06 Marek Polacek <polacek@redhat.com>
2846
2847 * c-parser.c (c_parser_statement_after_labels): Use
2848 protected_set_expr_location.
2849 (c_parser_omp_clause_num_gangs): Likewise.
2850 (c_parser_omp_clause_num_threads): Likewise.
2851 (c_parser_omp_clause_num_workers): Likewise.
2852 (c_parser_omp_clause_vector_length): Likewise.
2853 (c_parser_omp_clause_num_teams): Likewise.
2854 (c_parser_omp_clause_thread_limit): Likewise.
2855 * c-typeck.c (build_c_cast): Likewise.
2856 (c_cast_expr): Likewise.
2857
624d31fe
RS
28582015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2859
2860 * c-typeck.c (c_tree_equal): Use real_equal instead of
2861 REAL_VALUES_EQUAL.
2862
b8fd7909
JM
28632015-10-04 Jason Merrill <jason@redhat.com>
2864
2865 * c-parser.c (c_lex_one_token): Handle @synchronized.
2866 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2867 can change whether the function is transaction_safe.
2868
1c7485af
MP
28692015-10-02 Marek Polacek <polacek@redhat.com>
2870
2871 PR c/67730
2872 * c-typeck.c (convert_for_assignment): Use the expansion point
2873 location throughout.
2874
3e3b8d63
MP
28752015-10-02 Marek Polacek <polacek@redhat.com>
2876
2877 PR c/64249
2878 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2879 and pass it down to c_parser_if_statement.
2880 (c_parser_else_body): Add CHAIN parameter and pass it down to
2881 c_parser_statement_after_labels.
2882 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2883 duplicated if-else-if conditions.
2884
aabef2de
MP
28852015-10-01 Marek Polacek <polacek@redhat.com>
2886
2887 * c-typeck.c (convert_for_assignment): Improve commentary.
2888
de8ddd5f
MP
28892015-09-30 Marek Polacek <polacek@redhat.com>
2890
2891 PR c/67730
2892 * c-typeck.c (c_finish_return): Use the expansion point location for
2893 certain "return with value" warnings.
2894
c4914de6
MLI
28952015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2896
2897 * c-parser.c (pragma_lex): Add loc argument.
2898
0e36f5c7
MP
28992015-09-15 Marek Polacek <polacek@redhat.com>
2900
2901 PR c/67580
2902 * c-decl.c (tag_exists_p): New function.
2903 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2904 struct/union/enum keywords are missing.
2905 * c-tree.h (tag_exists_p): Declare.
2906
2f3bb934
MP
29072015-09-15 Marek Polacek <polacek@redhat.com>
2908
2909 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2910 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2911 Return NULL_TREE instead of 0.
2912 (lookup_name): Return NULL_TREE instead of 0.
2913 (lookup_name_in_scope): Likewise.
2914 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2915 (parser_xref_tag): Use false instead of 0.
2916 (start_struct): Use true instead of 1.
2917 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2918
aa256c4a
MP
29192015-09-14 Marek Polacek <polacek@redhat.com>
2920
2921 * c-typeck.c (set_nonincremental_init_from_string): Use
2922 HOST_WIDE_INT_M1U when shifting a negative value.
2923
dbb68221
MW
29242015-09-09 Mark Wielaard <mjw@redhat.com>
2925
2926 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2927 parm against NULL.
2928
a8a098ac
JJ
29292015-09-10 Jakub Jelinek <jakub@redhat.com>
2930
2931 PR c/67502
2932 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2933 into OMP_FOR_PRE_BODY rather than before the loop.
2934
f4b189d5
JJ
29352015-09-09 Jakub Jelinek <jakub@redhat.com>
2936
0bb99c11
JJ
2937 PR c/67501
2938 * c-parser.c (c_parser_oacc_all_clauses,
2939 c_parser_omp_all_clauses): Remove invalid clause from
2940 list of clauses even if parser->error is set.
2941
fce5e5e3
JJ
2942 PR c/67500
2943 * c-parser.c (c_parser_omp_clause_aligned,
2944 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2945 test for errors.
2946 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2947 error_mark_node.
2948
f4b189d5
JJ
2949 PR c/67495
2950 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2951 instead of c_parser_unary_expression. If the result is !lvalue_p,
2952 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2953
b2aaf235
MP
29542015-09-04 Marek Polacek <polacek@redhat.com>
2955
2956 PR sanitizer/67279
2957 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2958
1807ffc1
MS
29592015-09-03 Martin Sebor <msebor@redhat.com>
2960
2961 PR c/66516
8b652e65
JJ
2962 * c-typeck.c (convert_arguments, parser_build_unary_op,
2963 build_conditional_expr, c_cast_expr, convert_for_assignment,
2964 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2965 reject_gcc_builtin.
2966 (c_decl_implicit): Define.
2967
d04ff417
MP
29682015-09-02 Marek Polacek <polacek@redhat.com>
2969
2970 PR c/67432
2971 * c-parser.c (c_parser_enum_specifier): Give a better error for
2972 an empty enum.
2973
a79683d5
TS
29742015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2975
2976 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2977
191a6b94
MP
29782015-08-12 Marek Polacek <polacek@redhat.com>
2979
2980 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2981 LOC to it.
2982
420a9d9b
MP
29832015-08-03 Marek Polacek <polacek@redhat.com>
2984
2985 PR c/67088
2986 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2987 Use it.
2988 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2989
992118a1
PP
29902015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2991
2992 * c-parser.c (c_parser_if_body): Take token_indent_info
2993 argument. Call warn_for_misleading_indentation even when the
2994 body is a semicolon. Extract token_indent_infos corresponding
2995 to the guard, body and next tokens. Adjust call to
2996 warn_for_misleading_indentation accordingly.
2997 (c_parser_else_body): Likewise.
2998 (c_parser_if_statement): Likewise.
2999 (c_parser_while_statement): Likewise.
3000 (c_parser_for_statement): Likewise.
3001
46308474
LFSM
30022015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3003 Manuel López-Ibáñez <manu@gcc.gnu.org>
3004
3005 * c-decl.c (get_parm_info): Remove static var. Update warning
3006 message.
3007
05b28fd6
MP
30082015-07-27 Marek Polacek <polacek@redhat.com>
3009
3010 PR c++/66555
3011 PR c/54979
3012 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3013
451b5e48
MP
30142015-07-20 Marek Polacek <polacek@redhat.com>
3015
3016 PR c++/55095
3017 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3018 (build_binary_op): Warn about left shift overflows.
3019
1916bcb5
AM
30202015-07-09 Andrew MacLeod <amacleod@redhat.com>
3021
3022 * c-array-notation.c: Adjust includes for flags.h changes.
3023 * c-objc-common.c: Likewise.
3024
c7131fb2
AM
30252015-07-07 Andrew MacLeod <amacleod@redhat.com>
3026
3027 * c-array-notation.c: Adjust includes.
3028 * c-aux-info.c: Likewise.
3029 * c-convert.c: Likewise.
3030 * c-decl.c: Likewise.
3031 * c-errors.c: Likewise.
3032 * c-lang.c: Likewise.
3033 * c-objc-common.c: Likewise.
3034 * c-parser.c: Likewise.
3035 * c-typeck.c: Likewise.
3036
da2e71c9
MLI
30372015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3038
3039 PR fortran/66605
3040 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3041
b155cfd9
MP
30422015-06-29 Marek Polacek <polacek@redhat.com>
3043
3044 PR c/66322
3045 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3046 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3047 about -Wswitch-bool here.
3048 (do_case): Update c_add_case_label call.
3049 (c_finish_case): Update c_do_switch_warnings call.
3050
31521951
MP
30512015-06-27 Marek Polacek <polacek@redhat.com>
3052
3053 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3054
22d03525
MP
30552015-06-26 Marek Polacek <polacek@redhat.com>
3056
3057 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3058 INDIRECT_REF_P.
3059 * c-typeck.c (array_to_pointer_conversion): Likewise.
3060 (build_unary_op): Likewise.
3061 (c_finish_return): Likewise.
3062
f0889939
AM
30632015-06-25 Andrew MacLeod <amacleod@redhat.com>
3064
3065 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3066 * c-parser.c: Likewise.
3067
8d67ee55
RS
30682015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3069
3070 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3071 instead of pointer_hash.
3072 (detect_field_duplicates): Likewise.
3073
0ae9bd27
MP
30742015-06-25 Marek Polacek <polacek@redhat.com>
3075
3076 * c-array-notation.c: Use VAR_P throughout.
3077 * c-decl.c: Likewise.
3078 * c-objc-common.c: Likewise.
3079 * c-parser.c: Likewise.
3080 * c-typeck.c: Likewise.
3081
62f9079a
MP
30822015-06-25 Marek Polacek <polacek@redhat.com>
3083
3084 * c-decl.c: Use is_global_var throughout.
3085 * c-parser.c: Likewise.
3086 * c-typeck.c: Likewise.
3087
abb226c9
AM
30882015-06-17 Andrew MacLeod <amacleod@redhat.com>
3089
3090 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3091 * c-aux-info.c: Likewise.
3092 * c-convert.c: Likewise.
3093 * c-decl.c: Likewise.
3094 * c-errors.c: Likewise.
3095 * c-lang.c: Likewise.
3096 * c-objc-common.c: Likewise.
3097 * c-parser.c: Likewise.
3098 * c-typeck.c: Likewise.
3099
8cbababc
JH
31002015-06-11 Jan Hubicka <hubicka@ucw.cz>
3101
3102 PR middle-end/66325
3103 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3104 variants.
3105
a0349665
PMR
31062015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3107
3108 * c-decl.c (pop_scope): Register the main translation unit
3109 through the new debug hook.
3110
13fdf2e2
AM
31112015-06-08 Andrew MacLeod <amacleod@redhat.com>
3112
3113 * c-array-notation.c : Adjust include files.
3114 * c-aux-info.c : Likewise.
3115 * c-convert.c : Likewise.
3116 * c-decl.c : Likewise.
3117 * c-errors.c : Likewise.
3118 * c-lang.c : Likewise.
3119 * c-lang.h : Likewise.
3120 * c-objc-common.c : Likewise.
3121 * c-parser.c : Likewise.
3122 * c-typeck.c : Likewise.
3123
d7438551
AH
31242015-06-05 Aldy Hernandez <aldyh@redhat.com>
3125
3126 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3127 immediately clobber it.
3128 (c_write_global_declarations_1): Remove call to
3129 check_global_declaration_1.
3130 (c_write_global_declarations_2): Remove.
3131 (c_write_final_cleanups): Rename from c_write_global_declarations.
3132 Remove call to finalize_compilation_unit.
3133 Remove calls to debugging hooks.
3134 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3135 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3136 * c-tree.h: Remove c_write_global_declarations.
3137
ecb9f223
AM
31382015-06-04 Andrew MacLeod <amacleod@redhat.com>
3139
3140 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3141 * c-aux-info.c: Likewise.
3142 * c-convert.c: Likewise.
3143 * c-decl.c: Likewise.
3144 * c-errors.c: Likewise.
3145 * c-lang.c: Likewise.
3146 * c-objc-common.c: Likewise.
3147 * c-parser.c: Likewise.
3148 * c-typeck.c: Likewise.
3149
9482b620
MP
31502015-06-04 Marek Polacek <polacek@redhat.com>
3151
3152 PR c/66341
3153 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3154 it is a lvalue.
3155
bc51ace3
PK
31562015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3157
3158 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3159 Warn for empty struct.
3160 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3161
ea5b45b6
AT
31622015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3163
3164 * c-decl.c (start_function): Call plugin before parsing.
3165 (finish_function): Call plugin after parsing.
3166
c2d47482
PK
31672015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3168
3169 PR c/49551
3170 * c-decl.c (merge_decls): Merge DECL_COMMON.
3171
a95492ab
JW
31722015-05-22 Jim Wilson <jim.wilson@linaro.org>
3173
3174 * Make-lang.in (check_gcc_pallelize): Define.
3175
fd5c817a
MP
31762015-05-22 Marek Polacek <polacek@redhat.com>
3177
3178 PR c/47043
3179 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3180 attributes.
3181
c7b70a3c
MP
31822015-05-21 Marek Polacek <polacek@redhat.com>
3183
3184 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3185 DECL_BUILT_IN.
3186
21b634ae
MP
31872015-05-20 Marek Polacek <polacek@redhat.com>
3188
3189 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3190 * c-typeck.c: Likewise.
3191
296a8c2f
MP
31922015-05-19 Marek Polacek <polacek@redhat.com>
3193
3194 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3195
41b37d5e
JJ
31962015-05-19 Jakub Jelinek <jakub@redhat.com>
3197
3198 PR middle-end/66199
3199 * c-parser.c (c_parser_omp_for_loop): Don't add
3200 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3201 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3202 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3203 constructs.
3204
fab27f52
MM
32052015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3206
3207 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3208 swaps.
fab27f52 3209
40de31cf
MLI
32102015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3211
3212 PR fortran/44054
3213 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3214 accessor function.
3215
3aa3c9fc
MP
32162015-05-14 Marek Polacek <polacek@redhat.com>
3217
3218 PR c/66066
3219 PR c/66127
3220 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3221 rather than with 0.
3222
c3388e62
DM
32232015-05-12 David Malcolm <dmalcolm@redhat.com>
3224
3225 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3226 to add a call to warn_for_misleading_indentation.
3227 (c_parser_else_body): Likewise, adding param "else_loc".
3228 (c_parser_if_statement): Check for misleading indentation.
3229 (c_parser_while_statement): Likewise.
3230 (c_parser_for_statement): Likewise.
3231
755e528f
MP
32322015-05-08 Marek Polacek <polacek@redhat.com>
3233
3234 PR c/64918
3235 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3236 (output_init_element): Likewise.
3237
0173bd2a
MP
32382015-05-07 Marek Polacek <polacek@redhat.com>
3239
3240 PR c/65179
3241 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3242 value.
3243
9babc352
MP
32442015-04-30 Marek Polacek <polacek@redhat.com>
3245
3246 * c-typeck.c (set_init_label): Call error_at instead of error and
3247 pass LOC to it.
3248
ac9f18db
MP
3249 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3250 the type of a decl.
3251
ec3fba51
MP
3252 * c-typeck.c (c_build_va_arg): Clarify the error message.
3253
b811915d
TS
32542015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3255
3256 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3257 OMP_STANDALONE_CLAUSES.
3258
f3075008
MP
32592015-04-28 Marek Polacek <polacek@redhat.com>
3260
3261 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3262
4e81b788
MP
32632015-04-28 Marek Polacek <polacek@redhat.com>
3264
3265 PR c/65901
3266 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3267
6c1db78e
MP
32682015-04-25 Marek Polacek <polacek@redhat.com>
3269
3270 PR c/52085
3271 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3272 attribute.
3273
5c4abbb8
MP
32742015-04-23 Marek Polacek <polacek@redhat.com>
3275
3276 PR c/65345
3277 * c-decl.c (set_labels_context_r): New function.
3278 (store_parm_decls): Call it via walk_tree_without_duplicates.
3279 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3280 instead of create_tmp_var. Build TARGET_EXPR instead of
3281 COMPOUND_EXPR.
3282 (build_atomic_assign): Use create_tmp_var_raw instead of
3283 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3284
06aca1d5
IV
32852015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3286
3287 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3288 (c_parser_omp_target_update): Add missed %> to error_at ().
3289
8fba1830
BRF
32902015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3291
3292 PR target/55143
3293 * c-decl.c (c_default_pointer_mode): Remove definition.
3294 * c-tree.h (c_default_pointer_mode): Remove declaration.
3295
62021f64
TB
32962015-03-27 Tobias Burnus <burnus@net-b.de>
3297
3298 PR c/65586
3299 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3300 error out.
3301 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3302 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3303 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3304
9b65e171
JJ
33052015-03-19 Jakub Jelinek <jakub@redhat.com>
3306
3307 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3308 attribute for DECL_EXTERNAL VAR_DECLs.
3309
17958621
JJ
33102015-03-11 Jakub Jelinek <jakub@redhat.com>
3311
3312 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3313 argument.
3314
7ccb1a11
JJ
33152015-03-10 Jakub Jelinek <jakub@redhat.com>
3316
3317 PR c/65120
3318 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3319 before preparing arguments to warn_logical_not_parentheses.
3320
01177669
JJ
33212015-03-09 Jakub Jelinek <jakub@redhat.com>
3322
3323 PR c/65120
3324 * c-typeck.c (parser_build_binary_op): Don't warn for
3325 !!x == y or !b == y where b is _Bool.
3326
802ac282
MP
33272015-03-09 Marek Polacek <polacek@redhat.com>
3328
3329 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3330 * c-decl.c (grokdeclarator): Likewise.
3331 * c-typeck.c (build_binary_op): Likewise.
3332
e5165b60
MP
33332015-02-27 Marek Polacek <polacek@redhat.com>
3334
3335 PR c/65228
3336 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3337
065d214c
MP
33382015-02-14 Marek Polacek <polacek@redhat.com>
3339
3340 PR c/64768
3341 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3342 declared through a typedef name.
3343
e5d9235b
MP
33442015-02-13 Marek Polacek <polacek@redhat.com>
3345
3346 PR c/65050
3347 * c-decl.c (grokdeclarator): Print also the type when giving
3348 the error message about array's incomplete element type.
3349
fa01ffcc
JJ
33502015-02-11 Jakub Jelinek <jakub@redhat.com>
3351
3352 PR c/64824
3353 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3354 check in the POP macro.
3355
c3e38a03
MP
33562015-02-09 Marek Polacek <polacek@redhat.com>
3357
3358 PR c/64856
3359 * c-typeck.c (process_init_element): Don't always wrap
3360 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3361 initializing a range of elements.
3362
4886ec8e
JJ
33632015-02-04 Jakub Jelinek <jakub@redhat.com>
3364
3365 PR c/64824
3366 PR c/64868
3367 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3368
c3e38a03 33692015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3370
3371 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3372 processing enum declaration.
3373
7b33f0c8
MP
33742015-01-29 Marek Polacek <polacek@redhat.com>
3375
3376 PR c/64709
3377 * c-typeck.c (pop_init_level): If constructor_elements has
3378 exactly one element with integer_zerop value, set constructor_zeroinit
3379 to 1. Remove braces around warning_init call.
3380
dea63e49
JJ
33812015-01-27 Jakub Jelinek <jakub@redhat.com>
3382
3383 PR c/64766
3384 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3385 of FUNCTION_DECLs with error_mark_node.
3386
d38f7dce
JJ
33872015-01-26 Jakub Jelinek <jakub@redhat.com>
3388
3389 PR c/64778
3390 * c-typeck.c (convert_arguments): Return -1 if there are
3391 error_args, even if we've diagnosed too many arguments.
3392
cbf5d0e7
RB
33932015-01-21 Richard Biener <rguenther@suse.de>
3394
3395 PR middle-end/64313
3396 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3397 for builtins the user declared correctly.
3398
41dbbb37
TS
33992015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3400 Bernd Schmidt <bernds@codesourcery.com>
3401 Cesar Philippidis <cesar@codesourcery.com>
3402 James Norris <jnorris@codesourcery.com>
3403 Jakub Jelinek <jakub@redhat.com>
3404 Ilmir Usmanov <i.usmanov@samsung.com>
3405
3406 * c-parser.c: Include "gomp-constants.h".
3407 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3408 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3409 Use OMP_CLAUSE_SET_MAP_KIND.
3410 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3411 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3412 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3413 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3414 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3415 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3416 "copyout", "create", "delete", "deviceptr", "gang", "host",
3417 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3418 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3419 "present_or_create", "pcreate", "seq", "self", "vector",
3420 "vector_length", "wait", "worker".
3421 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3422 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3423 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3424 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3425 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3426 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3427 (c_parser_oacc_data_clause_deviceptr)
3428 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3429 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3430 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3431 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3432 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3433 (c_parser_oacc_parallel, c_parser_oacc_update)
3434 (c_parser_oacc_wait): New functions.
3435 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3436 (c_finish_oacc_data): New prototypes.
3437 * c-typeck.c: Include "gomp-constants.h".
3438 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3439 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3440 OMP_CLAUSE_SET_MAP_KIND.
3441 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3442 (c_finish_oacc_data): New functions.
3443 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3444 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3445 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3446 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3447 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3448 GOMP_MAP_FORCE_DEVICEPTR.
3449
adfac8df
JJ
34502015-01-09 Michael Collison <michael.collison@linaro.org>
3451
3452 * c-array-notation.c: Include hash-set.h, machmode.h,
3453 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3454 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3455 * c-aux-info.c: Ditto.
3456 * c-convert.c: Ditto.
3457 * c-decl.c: Ditto.
3458 * c-errors.c: Ditto.
3459 * c-lang.c: Dittoxs.
3460 * c-objc-common.c: Ditto.
3461 * c-parser.c: Ditto.
3462 * c-typeck.c: Include hash-set.h, machmode.h,
3463 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3464 fold-const.h, wide-int.h, inchash.h, real.h and
3465 fixed-value.h due to flattening of tree.h.
3466
2cc901dc
MP
34672015-01-07 Marek Polacek <polacek@redhat.com>
3468
3469 PR c/64417
3470 * c-typeck.c (process_init_element): Disallow initialization of
3471 a flexible array member with a string constant if the structure
3472 is in an array.
3473
5624e564
JJ
34742015-01-05 Jakub Jelinek <jakub@redhat.com>
3475
e5341100
JJ
3476 PR sanitizer/64344
3477 * c-typeck.c (convert_for_assignment, c_finish_return): For
3478 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3479 types also set in_late_binary_op around convert call.
3480 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3481 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3482 result on expr as last argument to ubsan_instrument_float_cast,
3483 if in_late_binary_op, don't use c_save_expr but save_expr.
3484
5624e564
JJ
3485 Update copyright years.
3486
5bd012f8
MP
34872015-01-05 Marek Polacek <polacek@redhat.com>
3488
3489 PR c/64423
3490 * c-typeck.c (build_array_ref): Pass loc down to
3491 warn_array_subscript_with_type_char.
3492
3f8257db 34932014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3494
3495 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3496 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3497 element type.
8e745a17 3498 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3499 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3500 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3501 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3502 to PEDWARN_FOR_QUALIFIERS.
768952be 3503
8f94a8c4
JJ
35042014-12-17 Jakub Jelinek <jakub@redhat.com>
3505
3506 PR sanitizer/64289
3507 * c-convert.c: Include ubsan.h.
3508 (convert): For real -> integral casts and
3509 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3510 instead instrument the float cast directly.
3511
b731b390
JJ
35122014-11-29 Jakub Jelinek <jakub@redhat.com>
3513
3514 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3515 c_finish_stmt_expr): Remove NULL last argument from
3516 create_tmp_var_raw and create_tmp_var calls.
3517 * c-array-notation.c (fix_builtin_array_notation_fn,
3518 build_array_notation_expr, fix_conditional_array_notations_1,
3519 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3520
541e35a6
MP
35212014-11-28 Marek Polacek <polacek@redhat.com>
3522
3523 PR c/63862
3524 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3525 convert the right operand to integer type.
3526
b286be94
MP
35272014-11-25 Marek Polacek <polacek@redhat.com>
3528
3529 PR c/63877
3530 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3531 for inline functions.
3532
aa7da51a
JJ
35332014-11-21 Jakub Jelinek <jakub@redhat.com>
3534
3535 PR target/63764
3536 * c-typeck.c (build_array_ref): Adjust
3537 convert_vector_to_pointer_for_subscript caller. If it returns true,
3538 call non_lvalue_loc on the result.
3539
d876207f
RB
35402014-11-11 Richard Biener <rguenther@suse.de>
3541
3542 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3543 to true.
3544
e5e44252
AK
35452014-11-10 Andi Kleen <ak@linux.intel.com>
3546
3547 PR c/60804
3548 * c-parser.c (c_parser_statement_after_labels): Call
3549 check_no_cilk.
3550 (c_parser_if_statement): Dito.
3551 (c_parser_switch_statement): Dito.
3552 (c_parser_while_statement): Dito.
3553 (c_parser_do_statement): Dito.
3554 (c_parser_for_statement): Dito.
3555 * c-typeck.c (c_finish_loop): Dito.
3556
13c21655
PC
35572014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3558
3559 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3560 OPT_Wshift_count_overflow in the warnings.
3561
2d51fcef
MP
35622014-10-30 Marek Polacek <polacek@redhat.com>
3563
3564 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3565 print the stripped version as well, if they're not the same.
3566
ef4bddc2
RS
35672014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3568
3569 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3570 machine_mode.
3571
c582198b
AM
35722014-10-28 Andrew MacLeod <amacleod@redhat.com>
3573
3574 * c-decl.c: Adjust include files.
3575 * c-parser.c: Ditto.
3576
ddc8de03
PM
35772014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3578 Tom Tromey <tromey@redhat.com>
3579
3580 * c-tree.h (enum c_oracle_request): New.
3581 (c_binding_oracle_function): New typedef.
3582 (c_binding_oracle, c_pushtag, c_bind): Declare.
3583 * c-decl.c (c_binding_oracle): New global.
3584 (I_SYMBOL_CHECKED): New macro.
3585 (i_symbol_binding): New function.
3586 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3587 (I_TAG_CHECKED): New macro.
3588 (i_tag_binding): New function.
3589 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3590 (I_LABEL_CHECKED): New macro.
3591 (i_label_binding): New function.
3592 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3593 (c_print_identifier): Save and restore c_binding_oracle.
3594 (c_pushtag, c_bind): New functions.
3595
60393bbc
AM
35962014-10-27 Andrew MacLeod <amacleod@redhat.com>
3597
3598 * c-typeck.c: Adjust include files.
3599
d723bb7c
MLI
36002014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3601
3602 PR c++/53061
3603 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3604 initialization here...
3605 (c_initialize_diagnostics): ... but here. Set defaults after
3606 building pretty-printer.
3607
1bc5a451
MP
36082014-10-23 Marek Polacek <polacek@redhat.com>
3609
3610 PR c/63626
3611 * c-decl.c (pop_scope): Don't print warning in external_scope.
3612
4435bb92
MP
36132014-10-19 Marek Polacek <polacek@redhat.com>
3614
3615 PR c/63567
3616 * c-typeck.c (output_init_element): Allow initializing objects with
3617 static storage duration with compound literals even in C99 and add
3618 pedwarn for it.
3619
7278465e
MP
36202014-10-17 Marek Polacek <polacek@redhat.com>
3621
3622 PR c/63567
3623 * c-typeck.c (digest_init): Allow initializing objects with static
3624 storage duration with compound literals even in C99 and add pedwarn
3625 for it.
3626
d9b7be2e
MP
36272014-10-17 Marek Polacek <polacek@redhat.com>
3628
3629 PR c/63543
3630 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3631 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3632 error multiple times. Print the type.
3633
f406ae1f
MP
36342014-10-17 Marek Polacek <polacek@redhat.com>
3635
3636 PR c/63549
3637 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3638 type.
3639
92574c7c
MP
36402014-10-17 Marek Polacek <polacek@redhat.com>
3641
3642 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3643 (start_function): Use OPT_Wimplicit_int instead of 0.
3644 (store_parm_decls_oldstyle): Likewise.
3645
1bc4a978
MT
36462014-10-17 Alan Modra <amodra@gmail.com>
3647
3648 PR middle-end/61848
3649 * c-decl.c (merge_decls): Don't merge section name or tls model
3650 to newdecl symtab node, instead merge to olddecl. Override
3651 existing olddecl section name. Set tls_model for all thread-local
3652 vars, not just OMP thread-private ones. Remove incorrect comment.
3653
83685514
AM
36542014-10-16 Andrew MacLeod <amacleod@redhat.com>
3655
3656 * c-decl.c: Adjust include files.
3657
78a7c317
DD
36582014-10-14 DJ Delorie <dj@redhat.com>
3659
3660 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3661 (c_token_starts_typename): Check all __intN, not just __int128.
3662 (c_token_starts_declspecs): Likewise.
3663 (c_parser_declspecs): Likewise.
3664 (c_parser_attribute_any_word): Likewise.
3665 (c_parser_objc_selector): Likewise.
3666 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3667 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3668 is specified.
3669 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3670 __int128.
3671 (finish_declspecs): Likewise.
3672
74d98c1e
AB
36732014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3674
8e745a17 3675 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3676 the duplicate code.
8e745a17 3677 (c_parser_statement): Call the new function.
74d98c1e 3678
84937de2
MP
36792014-10-09 Marek Polacek <polacek@redhat.com>
3680
3681 PR c/63480
3682 * c-typeck.c (pop_init_level): Don't warn about initializing
3683 with { }.
3684
0382aaa0
MP
36852014-10-07 Marek Polacek <polacek@redhat.com>
3686
3687 PR c/59717
3688 * c-decl.c (header_for_builtin_fn): New function.
3689 (implicitly_declare): Suggest which header to include.
3690
7a0ca710
MP
36912014-10-07 Marek Polacek <polacek@redhat.com>
3692
3693 * c-convert.c (convert): Use error_operand_p.
3694 * c-typeck.c (require_complete_type): Likewise.
3695 (really_atomic_lvalue): Likewise.
3696 (digest_init): Likewise.
3697 (handle_omp_array_sections_1): Likewise.
3698
6bc8a126
MP
36992014-10-03 Marek Polacek <polacek@redhat.com>
3700
3701 PR c/63453
3702 * c-decl.c (pop_scope): Don't warn about "inline function declared
3703 but never defined" for functions marked with gnu_inline attribute.
3704
d90c0a59
JJ
37052014-09-25 Jakub Jelinek <jakub@redhat.com>
3706
3707 PR c++/63249
3708 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3709 on low_bound and length.
3710
083e891e
MP
37112014-09-24 Marek Polacek <polacek@redhat.com>
3712
3713 PR c/61405
3714 PR c/53874
3715 * c-parser.c: Don't define CPP_KEYWORD.
3716 (c_parser_switch_statement): Pass original type to c_finish_case.
3717 * c-tree.h (c_finish_case): Update declaration.
3718 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3719 conditionally to c_do_switch_warnings.
3720
8d95fe25
MP
37212014-09-03 Marek Polacek <polacek@redhat.com>
3722
3723 PR c/62024
3724 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3725 conversions.
3726
9a771876
JJ
37272014-09-02 Jakub Jelinek <jakub@redhat.com>
3728 Balaji V. Iyer <balaji.v.iyer@intel.com>
3729 Igor Zamyatin <igor.zamyatin@intel.com>
3730
3731 * c-parser.c (c_parser_cilk_for): New function.
3732 (c_parser_cilk_grainsize): Likewise.
3733 (c_get_temp_regvar): Likewise.
3734 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3735 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3736 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3737 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3738 case.
3739
b7679d96
CG
37402014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3741
3742 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3743 with using HOST_WIDE_INT without truncation to 'int'
3744
59ea0364
MP
37452014-08-22 Marek Polacek <polacek@redhat.com>
3746
3747 PR c++/62199
3748 * c-typeck.c (parser_build_binary_op): Adjust call to
3749 warn_logical_not_parentheses.
3750
671a475e
IZ
37512014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3752
3753 PR other/62008
3754 * c-parser.c (c_parser_array_notation): Check for correct
3755 type of an array added.
3756
04159acf
MP
37572014-08-19 Marek Polacek <polacek@redhat.com>
3758
3759 PR c++/62153
3760 * c-typeck.c (build_binary_op): If either operand of a comparison
3761 is a boolean expression, call maybe_warn_bool_compare.
3762
c77935ee
PP
37632014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3764
3765 PR c/45584
3766 * c-typeck.c (build_c_cast): Do a conversion even when the
3767 TYPE_MAIN_VARIANTs are the same.
3768
35aff4fb
MP
37692014-08-19 Marek Polacek <polacek@redhat.com>
3770
3771 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3772 pedwarn_c99 instead of pedwarn.
3773 (grokfield): Likewise.
3774 (warn_defaults_to): New function.
3775 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3776 Unconditionally call pedwarn_c99 instead of pedwarn.
3777 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3778 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3779 check flag_isoc11 before.
3780 * c-errors.c (pedwarn_c99): Change the return type to bool.
3781 Handle -Wc99-c11-compat.
3782 * c-parser.c (disable_extension_diagnostics): Handle
3783 warn_c99_c11_compat.
3784 (restore_extension_diagnostics): Likewise.
3785 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3786 instead of pedwarn, don't check flag_isoc11 before.
3787 (c_parser_declspecs): Likewise.
3788 (c_parser_alignas_specifier): Likewise.
3789 (c_parser_alignof_expression): Likewise.
3790 (c_parser_generic_selection): Likewise.
3791 * c-tree.h (pedwarn_c99): Update declaration.
3792 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3793 of pedwarn_c99.
3794
177cce46
MP
37952014-08-19 Marek Polacek <polacek@redhat.com>
3796
3797 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3798 to pedwarn_c90.
3799 * c-errors.c: Include "opts.h".
3800 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3801 * c-parser.c (disable_extension_diagnostics): Handle negative value
3802 of warn_c90_c99_compat, too.
3803 (restore_extension_diagnostics): Likewise.
3804 (c_parser_compound_statement_nostart): Pass
3805 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3806
6dc99c33
MP
38072014-08-12 Marek Polacek <polacek@redhat.com>
3808
3809 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3810 Add pedwarn.
3811 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3812 Likewise.
3813 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3814
3f8257db 38152014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3816
3817 PR c/51849
3818 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3819 Call pedwarn_c90 instead of pedwarn.
3820 (check_bitfield_type_and_width): Likewise.
3821 (declspecs_add_qual): Likewise.
3822 (declspecs_add_type): Likewise.
3823 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3824 Adjust to only call pedwarn_c90.
3825 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3826 pedwarn_c90 instead of pedwarn.
3827 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3828 * c-parser.c (disable_extension_diagnostics): Handle
3829 warn_c90_c99_compat.
3830 (restore_extension_diagnostics): Likewise.
3831 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3832 pedwarn_c90 instead of pedwarn.
3833 (c_parser_initelt): Likewise.
3834 (c_parser_postfix_expression): Likewise.
3835 (c_parser_postfix_expression_after_paren_type): Likewise.
3836 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3837 * c-tree.h: Fix formatting.
3838 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3839 pedwarn_c90 instead of pedwarn.
3840
9f25a338
TS
38412014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3842
3843 * c-typeck.c: Remove include of pointer-set.h.
3844
044331a8
MP
38452014-08-07 Marek Polacek <polacek@redhat.com>
3846
3847 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3848
b787e7a2
TS
38492014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3850
3851 * c-typeck.c: Use hash_map instead of pointer_map.
3852
6e2830c3
TS
38532014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3854
3855 * c-decl.c: Use hash_set instead of pointer_set.
3856
a7ee52fb
IZ
38572014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3858
3859 PR middle-end/61455
3860 * c-array-notation.c (expand_array_notations): Handling
3861 of DECL_EXPR added.
3862
b4dfdc11
MG
38632014-07-31 Marc Glisse <marc.glisse@inria.fr>
3864
3865 PR c++/60517
3866 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3867 a local variable.
3868
976d5a22
TT
38692014-07-30 Tom Tromey <tromey@redhat.com>
3870
3871 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3872 field.
3873 (really_start_incremental_init, push_init_level): Initialize
3874 designator_depth.
3875 (pop_init_level): Set global designator_depth.
3876 (process_init_element): Check for designated_init attribute.
3877
30281de2
MP
38782014-07-20 Marek Polacek <polacek@redhat.com>
3879
3880 PR c/61852
3881 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3882 (implicitly_declare): Pass location to implicit_decl_warning.
3883
b108f48f
JJ
38842014-07-14 Jakub Jelinek <jakub@redhat.com>
3885
3886 PR middle-end/61294
3887 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3888 If non-NULL, call c_parser_check_literal_zero.
3889 (c_parser_check_literal_zero): New function.
3890 (c_parser_postfix_expression_after_primary): Adjust
3891 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3892
773ec47f
MP
38932014-07-06 Marek Polacek <polacek@redhat.com>
3894
3895 PR c/6940
3896 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3897 * c-tree.h (C_ARRAY_PARAMETER): Define.
3898 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3899 function parameter.
3900
22e1cf1c 39012014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3902 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3903
3904 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3905 releasing symbol.
3906
52ec0ea3
MP
39072014-07-01 Marek Polacek <polacek@redhat.com>
3908
3909 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3910 instead of 0 to WARN_FOR_ASSIGNMENT.
3911
d5c3d343
MP
39122014-07-01 Marek Polacek <polacek@redhat.com>
3913
3914 PR c/58286
3915 * c-typeck.c (convert_for_assignment): Pass
3916 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3917
6a7253a4
MP
39182014-06-30 Marek Polacek <polacek@redhat.com>
3919
3920 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3921 has no_sanitize_undefined attribute.
3922
5e88a8f4
IZ
39232014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3924
3925 PR middle-end/57541
3926 * c-array-notation.c (fix_builtin_array_notation_fn):
3927 Check for 0 arguments in builtin call. Check that bultin argument is
3928 correct.
3929 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3930 index.
3931
9698b078
SH
39322014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3933
3934 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3935 qualifiers in __auto_type for atomic types.
3936 (c_parser_typeof_specifier): Discard all type qualifiers in
3937 __typeof__ for atomic types.
3938
6e07c515
MP
39392014-06-25 Marek Polacek <polacek@redhat.com>
3940
3941 PR c/61162
3942 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3943 the return expression to c_finish_return.
3944
da6f124d
JJ
39452014-06-25 Jakub Jelinek <jakub@redhat.com>
3946
3947 * c-typeck.c (c_finish_omp_clauses): Make sure
3948 OMP_CLAUSE_LINEAR_STEP has correct type.
3949
c203e8a7
TS
39502014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3951
3952 * c-decl.c: Adjust.
3953
56ad0e38
JJ
39542014-06-24 Jakub Jelinek <jakub@redhat.com>
3955
3956 * c-parser.c (c_parser_omp_for_loop): For
3957 #pragma omp parallel for simd move lastprivate clause from parallel
3958 to for rather than simd.
3959
47c2554f
MP
39602014-06-23 Marek Polacek <polacek@redhat.com>
3961
3962 * c-typeck.c (parser_build_binary_op): Don't call
3963 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3964
56363ffd
JH
39652014-06-15 Jan Hubicka <hubicka@ucw.cz>
3966
3967 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3968 * c-decl.c (merge_decls): Likewise.
3969
d7ff7ae5
MP
39702014-06-09 Marek Polacek <polacek@redhat.com>
3971
3972 PR c/36446
3973 * c-typeck.c (error_init): Call inform instead of error_at.
3974 (pedwarn_init): Call inform instead of pedwarn.
3975 (warning_init): Call inform instead of warning_at.
3976
24d047a3
JH
39772014-06-07 Jan Hubicka <hubicka@ucw.cz>
3978
3979 * c-decl.c (merge_decls): Use set_decl_section_name.
3980 (duplicate_decls): Remove node if it exists.
3981
9bac5cbb
G
39822014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3983
3984 PR c/53119
3985 * c-typeck.c (push_init_level, process_init_element,
3986 pop_init_level): Correct check for zero initialization, move
3987 missing brace warning to respect zero initialization.
3988
8ffcdea8
MP
39892014-06-05 Marek Polacek <polacek@redhat.com>
3990
3991 PR c/56724
3992 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3993
742938c9
MP
39942014-06-05 Marek Polacek <polacek@redhat.com>
3995
3996 PR c/49706
3997 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3998 on the left hand side operand of a comparison.
3999
6447c55d
MP
40002014-06-05 Marek Polacek <polacek@redhat.com>
4001
4002 PR c/48062
4003 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4004 Print note only if the warning was printed.
4005
9dc7743c
IZ
40062014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4007
4008 PR c/58942
4009 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4010 with a pointer.
4011
fedfecef
MP
40122014-06-03 Marek Polacek <polacek@redhat.com>
4013
4014 PR c/60439
4015 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4016 c_start_case.
4017 * c-tree.h (c_start_case): Update.
4018 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4019 switch condition has boolean value.
4020
9b2b7279
AM
40212014-06-02 Andrew MacLeod <amacleod@redhat.com>
4022
4023 * c-decl.c: Include builtins.h.
4024 * c-parser.c: Likewise.
4025
5c1bc275
MP
40262014-05-27 Marek Polacek <polacek@redhat.com>
4027
4028 PR c/56724
4029 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4030 error and warning calls to error_at and warning_at. Pass location of
4031 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4032 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4033 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4034
97563bc8
IZ
40352014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4036
4037 PR c/61191
4038 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4039 function parameters.
4040
aede2c10
JH
40412014-05-23 Jan Hubicka <hubicka@ucw.cz>
4042
4043 * c-decl.c (merge_decls): Preserve symtab node pointers.
4044 (duplicate_decls): Free new decl.
4045
edbba2ce
TS
40462014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4047
f3316c6d
TS
4048 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4049 initialization.
4050
edbba2ce
TS
4051 * c-parser.c (c_parser_omp_target): Return bool values.
4052
68c81f24
TS
40532014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4054
4055 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4056 num_teams_loc variable to num_thread_limit_loc.
4057
632f2871
RS
40582014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4059
4060 * c-array-notation.c (expand_array_notations): Use void_node
4061 instead of void_zero_node.
4062
766090c2
TS
40632014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4064
4065 * c-decl.c (finish_struct): Adjust.
4066 (finish_enum): Likewise.
4067 (bind): Adjust.
4068 (record_inline_static): Likewise.
4069 (push_scope): Likewise.
4070 (make_label): Likewise.
4071 (lookup_label_for_goto): Likewise.
4072 (finish_struct): Likewise.
4073 (finish_enum): Likewise.
4074 (store_parm_decls): Likewise.
4075 (c_push_function_context): Likewise.
4076 * c-lang.h: Remove usage of variable_size gty attribute.
4077 * c-parser.c (c_parse_init): Adjust.
4078 (c_parse_file): Likewise.
4079
2b107f6b
MP
40802014-05-13 Marek Polacek <polacek@redhat.com>
4081
4082 PR c/61162
4083 * c-typeck.c (convert_for_assignment): Pass location to
4084 WARN_FOR_ASSIGNMENT instead of input_location.
4085
d033409e
MP
40862014-05-10 Marek Polacek <polacek@redhat.com>
4087
4088 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4089 maybe_warn_string_init.
4090 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4091 maybe_warn_string_init.
4092 * c-tree.h (maybe_warn_string_init): Update declaration.
4093 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4094 Call pedwarn_init with loc instead of with input_location.
4095 (digest_init): Pass init_loc to maybe_warn_string_init.
4096 (pop_init_level): Call pedwarn_init with loc instead of with
4097 input_location.
4098 (set_init_index): Likewise.
4099 (process_init_element): Likewise.
4100
ea58ef42
MP
41012014-05-09 Marek Polacek <polacek@redhat.com>
4102
4103 PR c/61096
4104 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4105 (c_parser_initelt): Pass location to set_init_label. Pass array index
4106 location to set_init_index.
4107 * c-tree.h (push_init_level): Update declaration.
4108 (pop_init_level): Likewise.
4109 (set_init_index): Likewise.
4110 (set_init_label): Likewise.
4111 * c-typeck.c (error_init): Add location parameter. Call error_at
4112 instead of error.
4113 (digest_init): Pass init_loc to error_init.
4114 (really_start_incremental_init):
4115 (push_init_level): Add location parameter. Pass loc to pop_init_level
4116 and error_init.
4117 (pop_init_level): Likewise.
4118 (set_designator): Add location parameter. Pass loc to pop_init_level,
4119 push_init_level, and error_init.
4120 (set_init_index): Add location parameter. Pass loc to error_init and
4121 set_designator.
4122 (set_init_label): Likewise.
4123 (output_init_element): Pass loc to error_init.
4124 (process_init_element): Pass loc to error_init, pop_init_level,
4125 pedwarn_init, and push_init_level.
4126
661a0813
MP
41272014-05-09 Marek Polacek <polacek@redhat.com>
4128
4129 PR c/50459
4130 * c-parser.c (c_parser_attributes): Parse the arguments as an
4131 expression-list if the attribute takes identifier.
4132
2793eeab
MP
41332014-05-08 Marek Polacek <polacek@redhat.com>
4134
4135 PR c/61053
4136 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4137 TYPE_ALIGN_UNIT.
4138
f827930a
MP
41392014-05-08 Marek Polacek <polacek@redhat.com>
4140
4141 PR c/61077
4142 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4143 of main.
4144
1d60af08
KZ
41452014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4146 Mike Stump <mikestump@comcast.net>
4147 Richard Sandiford <rdsandiford@googlemail.com>
4148
4149 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4150 (finish_enum): Use wide-int interfaces.
4151 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4152 * c-typeck.c (build_c_cast): Likewise.
4153 (set_nonincremental_init_from_string): Likewise.
4154 (c_tree_equal): Likewise.
4155
a0e24419
MP
41562014-05-02 Marek Polacek <polacek@redhat.com>
4157
4158 PR c/25801
4159 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4160 Return size_one_node when the type is not complete.
4161 (pointer_diff): Remove comment.
4162 (build_unary_op): Improve error messages.
4163
19fc9faa
MP
41642014-05-02 Marek Polacek <polacek@redhat.com>
4165
4166 * c-typeck.c (c_finish_return): Separate warning_at calls.
4167
63bc4e87
MP
41682014-05-02 Marek Polacek <polacek@redhat.com>
4169
4170 * c-tree.h (error_init): Remove declaration.
4171 (pedwarn_init): Likewise.
4172 * c-typeck.c (error_init): Make static and move above.
4173 (pedwarn_init): Likewise.
4174 (warning_init): Move above.
4175 (maybe_warn_string_init): Likewise.
4176
4bd2511b
JL
41772014-05-01 Jeff Law <law@redhat.com>
4178
4179 Revert:
4180
4181 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4182 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4183 avoid goto.
4184
6a358dcb
MP
41852014-05-02 Marek Polacek <polacek@redhat.com>
4186
4187 PR c/60784
4188 * c-typeck.c (push_init_level): Set constructor_designated to
4189 p->designated for structures.
4190
ae5ebda4
MP
41912014-05-01 Marek Polacek <polacek@redhat.com>
4192
4193 PR c/60915
4194 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4195 function-definition has an attribute after the declarator.
4196
96b40f8d
MP
41972014-05-01 Marek Polacek <polacek@redhat.com>
4198
4199 PR c/60257
4200 * c-typeck.c (warning_init): Add location_t parameter. Call
4201 warning_at instead of warning.
4202 (push_init_level): Pass input_location to warning_init.
4203 (add_pending_init): Add location_t parameter. Pass loc to
4204 warning_init.
4205 (set_nonincremental_init): Pass input_location to add_pending_init.
4206 (set_nonincremental_init_from_string): Likewise.
4207 (output_init_element): Pass loc to warning_init and to
4208 add_pending_init.
4209
32e00768
MP
42102014-05-01 Marek Polacek <polacek@redhat.com>
4211
4212 PR c/43395
4213 * c-typeck.c (c_finish_return): Distinguish between label and variable
4214 when warning about returning local address.
4215
c9379ce2
MP
42162014-05-01 Marek Polacek <polacek@redhat.com>
4217
4218 PR c/29467
4219 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4220 in C89 mode.
4221
d00887e8
MP
42222014-05-01 Marek Polacek <polacek@redhat.com>
4223
4224 PR c/43245
4225 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4226 instead of 0 to WARN_FOR_QUALIFIERS.
4227
5436fa2e
MP
42282014-05-01 Marek Polacek <polacek@redhat.com>
4229
4230 PR c/56989
4231 * c-typeck.c (default_conversion): Use better location for
4232 error call.
4233
f8ed5150
MP
42342014-04-30 Marek Polacek <polacek@redhat.com>
4235
4236 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4237 also when SANITIZE_FLOAT_DIVIDE is on.
4238
8337d1db
MP
42392014-04-30 Marek Polacek <polacek@redhat.com>
4240
4241 PR c/60139
4242 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4243 and pedwarn_init. Use loc insted of input_location.
4244
c4bdc42f
MP
42452014-04-30 Marek Polacek <polacek@redhat.com>
4246
4247 PR c/60351
4248 * c-typeck.c (build_binary_op): Use location when warning about
4249 shift count.
4250
45484dcf
MP
42512014-04-25 Marek Polacek <polacek@redhat.com>
4252
4253 PR c/18079
4254 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4255 always_inline/noinline and hot/cold attributes.
4256
34cf811f
MP
42572014-04-25 Marek Polacek <polacek@redhat.com>
4258
4259 PR c/60114
4260 * c-parser.c (c_parser_initelt): Pass input_location to
4261 process_init_element.
4262 (c_parser_initval): Pass loc to process_init_element.
4263 * c-tree.h (process_init_element): Adjust declaration.
4264 * c-typeck.c (push_init_level): Pass input_location to
4265 process_init_element.
4266 (pop_init_level): Likewise.
4267 (set_designator): Likewise.
4268 (output_init_element): Add location_t parameter. Pass loc to
4269 digest_init.
4270 (output_pending_init_elements): Pass input_location to
4271 output_init_element.
4272 (process_init_element): Add location_t parameter. Pass loc to
4273 output_init_element.
4274
42056eac
JJ
42752014-04-24 Jakub Jelinek <jakub@redhat.com>
4276
4277 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4278 atomic-clause, allow comma in between atomic-clause and
4279 seq_cst.
4280
e162a134
JJ
42812014-04-22 Jakub Jelinek <jakub@redhat.com>
4282
4283 PR c/59073
4284 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4285 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4286
2f6babac
IZ
42872014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4288
4289 PR middle-end/60469
4290 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4291 create_tmp_var instead build_decl for creating temps.
4292 (build_array_notation_expr): Likewise.
4293 (fix_conditional_array_notations_1): Likewise.
4294 (fix_array_notation_expr): Likewise.
4295 (fix_array_notation_call_expr): Likewise.
4296
8edbfaa6
JJ
42972014-03-28 Jakub Jelinek <jakub@redhat.com>
4298
4299 PR c++/60689
4300 * c-tree.h (c_build_function_call_vec): New prototype.
4301 * c-typeck.c (build_function_call_vec): Don't call
4302 resolve_overloaded_builtin here.
4303 (c_build_function_call_vec): New wrapper function around
4304 build_function_call_vec. Call resolve_overloaded_builtin here.
4305 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4306 Call c_build_function_call_vec instead of build_function_call_vec.
4307 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4308 * c-decl.c (finish_decl): Likewise.
4309
7485aeea
MLI
43102014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4311
4312 PR c/55383
4313 * c-typeck.c: Use correct format string in cast-qual warning
4314
b17a8b07
TS
43152014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4316
4317 * c-decl.c (c_decl_attributes): Use
4318 lang_hooks.types.omp_mappable_type.
4319 * c-typeck.c (c_finish_omp_clauses): Likewise.
4320
3af9c5e9
MP
43212014-03-06 Marek Polacek <polacek@redhat.com>
4322
4323 PR c/60197
4324 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4325 of checking tree code.
4326
1c9f5f33
PK
43272014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4328
4329 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4330 (c_parser_parameter_declaration): Likewise.
4331
cc28fc7f
MP
43322014-02-19 Marek Polacek <polacek@redhat.com>
4333
4334 PR c/60195
4335 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4336 Call mark_exp_read on exp.value.
4337 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4338 TREE_ADDRESSABLE on old instead of val.
4339 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4340
b581c05c
PK
43412014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4342
4343 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4344 C_EXPR_APPEND by vec_safe_push.
4345 * c-tree.h (C_EXPR_APPEND): Remove.
4346
81e5eca8
MP
43472014-01-31 Marek Polacek <polacek@redhat.com>
4348
4349 PR c/59963
4350 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4351 build_function_call_vec.
4352 (build_function_call): Likewise.
4353 (build_atomic_assign): Likewise.
4354 (build_function_call_vec): Add arg_loc parameter. Use it.
4355 (convert_arguments): Likewise.
4356 (convert_for_assignment): Rename rhs_loc to expr_loc.
4357 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4358 (c_parser_objc_keywordexpr): Likewise.
4359 (c_parser_postfix_expression_after_primary): Call
4360 build_function_call_vec with expr_loc rather than op_loc.
4361 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4362 build_function_call_vec.
4363 (c_parser_expr_list): Add locations parameter. Fill it with locations
4364 of function arguments.
4365 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4366
68fca595
MP
43672014-01-30 Marek Polacek <polacek@redhat.com>
4368
4369 PR c/59940
4370 * c-typeck.c (build_function_call_vec): Use loc parameter.
4371 (convert_arguments): Add location parameter. Use it.
4372 (ep_convert_and_check): Likewise.
4373 (build_atomic_assign): Adjust convert_for_assignment call.
4374 (build_modify_expr): Likewise.
4375 (digest_init): Likewise.
4376 (c_finish_return): Likewise.
4377 (build_conditional_expr): Adjust ep_convert_and_check calls.
4378 (convert_for_assignment): Add rhs_loc parameter. Use it.
4379 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4380 calls.
4381
fa337f3a
RB
43822014-01-30 Richard Biener <rguenther@suse.de>
4383
4384 PR c/59905
4385 * c-typeck.c (build_function_call_vec): Do not replace calls
4386 to a function via an incompatible type with a runtime abort.
4387
b72271b9
BI
43882014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4389
4390 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4391 flag_enable_cilkplus with flag_cilkplus.
4392 (c_parser_direct_declarator_inner): Likewise.
4393 (c_parser_attribute_any_word): Likewise.
4394 (c_parser_attributes): Likewise.
4395 (c_parser_compound_statement): Likewise.
4396 (c_parser_statement_after_labels): Likewise.
4397 (c_parser_if_statement): Likewise.
4398 (c_parser_switch_statement): Likewise.
4399 (c_parser_do_statement): Likewise.
4400 (c_parser_for_statement): Likewise.
4401 (c_parser_unary_expression): Likewise.
4402 (c_parser_postfix_expression): Likewise.
4403 (c_parser_postfix_expression_after_primary): Likewise.
4404 (c_parser_postfix_expression_after_primary): Likewise.
4405 (c_parser_omp_clause_name): Likewise.
4406 (c_finish_omp_declare_simd): Likewise.
4407 (c_parser_cilk_verify_simd): Likewise.
4408 * c-typeck.c (build_array_ref): Likewise.
4409 (build_function_call_vec): Likewise.
4410 (convert_arguments): Likewise.
4411 (build_compound_expr): Likewise.
4412 (c_finish_return): Likewise.
4413 (c_finish_if_stmt): Likewise.
4414 (c_finish_loop): Likewise.
4415 (build_binary_op): Likewise.
4416
393e8e8b
MP
44172014-01-23 Marek Polacek <polacek@redhat.com>
4418
4419 PR c/59846
4420 * c-typeck.c (parser_build_binary_op): Use location instead of
4421 input_location.
4422 (build_binary_op): Pass location to shorten_compare.
4423
f04dda30
MP
44242014-01-23 Marek Polacek <polacek@redhat.com>
4425
4426 PR c/58346
4427 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4428 an empty aggregate.
4429
789eadcd
MP
44302014-01-23 Marek Polacek <polacek@redhat.com>
4431
4432 PR c/59871
4433 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4434 of a comma expression.
4435 (emit_side_effect_warnings): Likewise.
4436
40f14e9f
BI
44372014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4438
4439 PR c/59825
4440 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4441 function to use walk_tree and moved a lot of its functionality to
4442 expand_array_notations.
4443 (expand_array_notations): New function.
4444
74558dd9
BI
44452014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4446
4447 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4448 attribute an attribute without value.
4449
652fea39
JJ
44502014-01-23 Jakub Jelinek <jakub@redhat.com>
4451
4452 PR middle-end/58809
4453 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4454 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4455
f34f1c87
MP
44562014-01-22 Marek Polacek <polacek@redhat.com>
4457
4458 PR c/59891
4459 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4460 of remove_c_maybe_const_expr on op1 and op2.
4461
241f845a
JJ
44622014-01-15 Jakub Jelinek <jakub@redhat.com>
4463
4464 PR c/58943
4465 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4466 effects, preevaluate rhs using SAVE_EXPR first.
4467
9a74f20c
BI
44682014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4469
4470 PR c++/59631
4471 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4472 statements with if-elseif statements.
4473
96066ce1
MP
44742014-01-06 Marek Polacek <polacek@redhat.com>
4475
4476 PR c/57773
4477 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4478 defined bit-field types only in ISO C.
4479
23a5b65a
RS
44802014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4481
4482 Update copyright years
4483
f9030485
RS
44842014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4485
4486 * c-array-notation.c: Use the standard form for the copyright notice.
4487
41958c28
BI
44882013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4489
4490 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4491 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4492 field in parser is not empty. If not-empty, call the function
4493 c_parser_finish_omp_declare_simd.
4494 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4495 between SIMD-enabled functions and #pragma simd. Added new parameter.
4496 (c_parser_cilk_all_clauses): Modified the usage of the function
4497 c_parser_cilk_clause_vectorlength as mentioned above.
4498 (c_parser_cilk_simd_fn_vector_attrs): New function.
4499 (c_finish_cilk_simd_fn_tokens): Likewise.
4500 (is_cilkplus_vector_p): Likewise.
4501 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4502 "nomask," and "mask" strings in clause name.
4503 (c_parser_omp_all_clauses): Added 3 new case statements:
4504 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4505 PRAGMA_CILK_CLAUSE_NOMASK.
4506 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4507 check for vector attribute and if so call the function
4508 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4509 called the function c_finish_cilk_simd_fn_tokens.
4510 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4511 parser field is non-empty. If so, parse them as you would parse
4512 the omp declare simd pragma.
4513 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4514 Added a check when step is a parameter and flag it as error.
4515 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4516 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4517 pragma_omp_clause.
4518
cef0fd0e
TS
45192013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4520
4521 * c-parser.c (c_parser_omp_parallel): Fix description.
4522
12893402
BI
45232013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4524
4525 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4526 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4527 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4528 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4529
296674db
JM
45302013-12-04 Joseph Myers <joseph@codesourcery.com>
4531
4532 PR c/52023
4533 * c-parser.c (c_parser_alignas_specifier): Use
4534 c_sizeof_or_alignof_type instead of c_alignof.
4535 (c_parser_alignof_expression): Likewise, with min_alignof
4536 parameter depending on alignof spelling used.
4537
edd28054
MP
45382013-12-04 Marek Polacek <polacek@redhat.com>
4539
4540 PR c/54113
4541 * c-decl.c (start_function): Don't warn for missing prototype for
4542 inline functions.
4543
da0fc454
MP
45442013-12-03 Marek Polacek <polacek@redhat.com>
4545
4546 PR c/59351
4547 * c-decl.c (build_compound_literal): Allow compound literals with
4548 empty initial value.
4549
4c2ecab0
JM
45502013-12-02 Joseph Myers <joseph@codesourcery.com>
4551
4552 PR c/58235
4553 * c-typeck.c (build_modify_expr): Diagnose assignment to
4554 expression with array type.
4555
340baef7
JM
45562013-11-29 Joseph Myers <joseph@codesourcery.com>
4557
4558 PR c/42262
4559 * c-typeck.c (process_init_element): Do not treat a string as
4560 initializing a whole array when used with a designator for an
4561 individual element.
4562
6763b9f7
JM
45632013-11-29 Joseph Myers <joseph@codesourcery.com>
4564
4565 PR c/57574
4566 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4567 an inline function following a static declaration.
4568
e7bd1de1
JJ
45692013-11-28 Jakub Jelinek <jakub@redhat.com>
4570
4571 PR c/59310
4572 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4573 to p_name before calling c_parser_omp_teams instead of after.
4574 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4575 argument. Remove unused p_name variable.
4576
0136f8f0
AH
45772013-11-27 Aldy Hernandez <aldyh@redhat.com>
4578 Jakub Jelinek <jakub@redhat.com>
4579
4580 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4581 external_scope is NULL.
4582
241b71bb
TV
45832013-11-27 Tom de Vries <tom@codesourcery.com>
4584 Marc Glisse <marc.glisse@inria.fr>
4585
4586 PR c++/59032
4587 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4588
2fb9a547
AM
45892013-11-22 Andrew MacLeod <amacleod@redhat.com>
4590
4591 * c-typeck.c: Add required include files from gimple.h.
4592
8400e75e
DM
45932013-11-22 David Malcolm <dmalcolm@redhat.com>
4594
4595 * c-decl.c (define_label, shadow_tag_warned)
4596 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4597 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4598 (declspecs_add_type): Remove use of in_system_header macro.
4599 * c-parser.c (c_parser_unary_expression): Likewise.
4600 * c-typeck.c (store_init_value, process_init_element)
4601 (c_start_case): Likewise.
4602
4603 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4604 macro.
4605
4606 * c-parser.c (c_parser_set_source_position_from_token): Remove
4607 reference to in_system_header from comment.
4608
386b1f1f
RS
46092013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4610
4611 * c-decl.c (grokdeclarator): Update comment to refer to
4612 tree_to_[su]hwi rather than tree_low_cst.
4613
ae7e9ddd
RS
46142013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4615
4616 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4617 tree_to_uhwi throughout.
4618
9439e9a1
RS
46192013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4620
4621 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4622 throughout.
4623
9541ffee
RS
46242013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4625
4626 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4627 throughout.
4628
c02065fc
AH
46292013-11-15 Aldy Hernandez <aldyh@redhat.com>
4630
4631 * c-parser.c (c_parser_cilk_simd): New.
4632 (c_parser_cilk_verify_simd): New.
4633 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4634 (c_parser_omp_for_loop): Add case for NE_EXPR.
4635 Set c_break_label for CILK_SIMD.
4636 (c_parser_cilk_clause_vectorlength): New.
4637 (c_parser_cilk_clause_linear): New.
4638 (c_parser_cilk_clause_name): New.
4639 (c_parser_cilk_all_clauses): New.
4640 * c-typeck.c (build_unary_op): Pass location argument to
4641 readonly_error.
4642 (build_modify_expr): Same.
4643 (build_asm_expr): Same.
4644 (c_finish_bc_stmt): Error on break/continue in loops.
4645
18f429e2
AM
46462013-11-14 Andrew MacLeod <amacleod@redhat.com>
4647
4648 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4649
d8a2d370
DN
46502013-11-14 Diego Novillo <dnovillo@google.com>
4651
4652 * c-decl.c: Include print-tree.h.
4653 Include stor-layout.h.
4654 Include varasm.h.
4655 Include attribs.h.
4656 Include stringpool.h.
4657 * c-lang.c: Include fold-const.h.
4658 * c-parser.c: Include stringpool.h.
4659 Include attribs.h.
4660 Include stor-layout.h.
4661 Include varasm.h.
4662 Include trans-mem.h.
4663 * c-typeck.c: Include stor-layout.h.
4664 Include trans-mem.h.
4665 Include varasm.h.
4666 Include stmt.h.
4667
38b7bc7f
JM
46682013-11-13 Joseph Myers <joseph@codesourcery.com>
4669
4670 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4671 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4672 __auto_type.
4673 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4674 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4675 RID_AUTO_TYPE.
4676 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4677 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4678 (c_parser_declarator, c_parser_direct_declarator_inner)
4679 (c_parser_parameter_declaration, c_parser_type_name): All callers
4680 changed.
4681 (c_parser_declaration_or_fndef): Handle declarations with type
4682 determined from the initializer.
4683
45b0be94
AM
46842013-11-12 Andrew MacLeod <amacleod@redhat.com>
4685
18f429e2 4686 * c-typeck.c: Include gimplify.h.
45b0be94 4687
582d9b50
JM
46882013-11-12 Joseph Myers <joseph@codesourcery.com>
4689
4690 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4691 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4692 comment.
4693 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4694 or _Thread_local as appropriate in diagnostics.
4695 (build_null_declspecs): Initialize ret->thread_gnu_p.
4696 (declspecs_add_scspec): Handle either __thread or _Thread_local
4697 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4698 pedantic. Do not disallow _Thread_local extern and _Thread_local
4699 static.
4700
267bac10
JM
47012013-11-07 Joseph Myers <joseph@codesourcery.com>
4702 Andrew MacLeod <amacleod@redhat.com>
4703
4704 * c-aux-info.c (gen_type): Handle atomic qualifier.
4705 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4706 qualifiers when compating types.
4707 (shadow_tag_warned): Handle atomic_p in declspecs.
4708 (quals_from_declspecs): Likewise.
4709 (start_decl): Use c_type_promotes_to when promoting argument
4710 types.
4711 (grokdeclarator): Handle _Atomic.
4712 (get_parm_info): Diagnose any qualifier on "void" as only
4713 parameter.
4714 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4715 comparing types. Use c_type_promotes_to when promoting argument
4716 types.
4717 (finish_function): Use c_type_promotes_to when promoting argument
4718 types.
4719 (build_null_declspecs): Handle atomic_p in declspecs.
4720 (declspecs_add_qual): Handle RID_ATOMIC.
4721 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4722 (c_token_starts_declspecs): Handle RID_ATOMIC.
4723 (c_parser_declspecs): Handle atomic type specifiers and
4724 qualifiers.
4725 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4726 from types of expressions with atomic type.
4727 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4728 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4729 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4730 (c_parser_statement_after_labels, c_parser_switch_statement)
4731 (c_parser_for_statement, c_parser_expr_no_commas)
4732 (c_parser_conditional_expression, c_parser_binary_expression)
4733 (c_parser_cast_expression, c_parser_unary_expression)
4734 (c_parser_postfix_expression)
4735 (c_parser_postfix_expression_after_primary, c_parser_expression):
4736 Use convert_lvalue_to_rvalue.
4737 (c_parser_expression_conv, c_parser_expr_list): Document
4738 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4739 (c_parser_objc_synchronized_statement): Use
4740 convert_lvalue_to_rvalue.
4741 (c_parser_objc_selector): Handle RID_ATOMIC.
4742 (c_parser_objc_receiver, c_parser_array_notation): Use
4743 convert_lvalue_to_rvalue.
4744 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4745 _Atomic (type-name).
4746 (struct c_declspecs): Add atomic_p field.
4747 (convert_lvalue_to_rvalue): Declare.
4748 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4749 corresponding atomic types.
4750 (qualify_type): Don't add _Atomic qualifiers from second argument.
4751 (comp_target_types): Do not allow _Atomic mismatches.
4752 (type_lists_compatible_p): Do not remove atomic qualifiers when
4753 comparing types.
4754 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4755 (build_atomic_assign): New functions.
4756 (build_unary_op): Use build_atomic_assign for atomic increment and
4757 decrement.
4758 (build_conditional_expr): Do not treat _Atomic void as a qualified
4759 version of void.
4760 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4761 (find_anonymous_field_with_type, convert_to_anonymous_field)
4762 (convert_for_assignment): Do not remove atomic qualifiers when
4763 comparing types.
4764 (digest_init): Do not accept initialization of arrays of atomic
4765 elements by string constants.
4766 (build_asm_expr): Use convert_lvalue_to_rvalue.
4767 (build_binary_op): Do not treat _Atomic void as a qualified
4768 version of void.
4769
0c249d4b
DD
47702013-11-06 DJ Delorie <dj@redhat.com>
4771
4772 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4773 both explicit and builtin, print the location of the explicit one.
4774
6d7f7e0a
TB
47752013-11-05 Tobias Burnus <burnus@net-b.de>
4776
4777 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4778 c_parser_omp_distribute, c_parser_omp_teams,
4779 c_parser_omp_target, c_parser_omp_declare): Handle
4780 -fopenmp-simd.
4781
b906f4ca
MP
47822013-11-03 Marek Polacek <polacek@redhat.com>
4783
4784 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4785
ee1d5a02
JJ
47862013-11-01 Jakub Jelinek <jakub@redhat.com>
4787
4788 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4789 check_dup_generic at the end, unless remove is true.
4790 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4791 remove = true;.
4792 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4793
5a9785fb
JJ
47942013-10-31 Jakub Jelinek <jakub@redhat.com>
4795
4796 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4797 with decl that is not pointer nor array.
4798
939b37da
BI
47992013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4800
4801 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4802 a spawning function is found.
4803 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4804 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4805 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4806 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4807 case.
4808 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4809 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4810 expr.
4811 (c_finish_return): Added a check to reject _Cilk_spawn in return
4812 expression.
4813 (build_cilk_spawn): New function.
4814 (build_cilk_sync): Likewise.
4815 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4816
d4af74d4
TB
48172013-10-27 Tobias Burnus <burnus@net-b.de>
4818
4819 PR other/33426
4820 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4821 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4822 (c_parser_statement_after_labels): Update calls.
4823
d73749df 48242013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4825
4826 PR other/33426
4827 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4828 Handle PRAGMA_IVDEP.
4829 (c_parser_statement_after_labels): Update call.
4830
f28aa681
MP
48312013-10-24 Marek Polacek <polacek@redhat.com>
4832
4833 * c-parser.c (c_parser_struct_declaration): Add a comment.
4834 (c_parser_declarator): Don't allow _Alignas here.
4835
0645c1a2
AM
48362013-10-17 Andrew MacLeod <amacleod@redhat.com>
4837
4838 * c-parser.c: Include omp-low.h.
4839 * c-typeck.c: Likewise.
4840
568a31f2
MP
48412013-10-17 Marek Polacek <polacek@redhat.com>
4842
4843 PR c/58267
4844 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4845 Document syntax of the array-declarator.
4846 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4847 are not permitted.
4848 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4849 (c_parser_struct_declaration): Likewise.
4850 (c_parser_declarator): Likewise.
4851 (c_parser_direct_declarator_inner): Likewise.
4852 (c_parser_parameter_declaration): Likewise.
4853 (c_parser_type_name): Likewise.
4854
acf0174b
JJ
48552013-10-11 Jakub Jelinek <jakub@redhat.com>
4856
4857 * c-lang.h (current_omp_declare_target_attribute): New extern
4858 decl.
4859 * c-parser.c: Include c-lang.h.
4860 (struct c_parser): Change tokens to c_token *.
4861 Add tokens_buf field. Change tokens_avail type to unsigned int.
4862 (c_parser_consume_token): If parser->tokens isn't
4863 &parser->tokens_buf[0], increment parser->tokens.
4864 (c_parser_consume_pragma): Likewise.
4865 (enum pragma_context): Add pragma_struct and pragma_param.
4866 (c_parser_external_declaration): Adjust
4867 c_parser_declaration_or_fndef caller.
4868 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4869 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4870 Adjust recursive call.
4871 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4872 of pragma_external.
4873 (c_parser_parameter_declaration): Use pragma_param instead of
4874 pragma_external.
4875 (c_parser_compound_statement_nostart, c_parser_label,
4876 c_parser_for_statement): Adjust
4877 c_parser_declaration_or_fndef callers.
4878 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4879 it through to c_parser_conditional_expression.
4880 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4881 pass it through to c_parser_binary_expression. Adjust recursive
4882 call.
4883 (c_parser_binary_expression): Remove prec argument, add
4884 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4885 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4886 binop matches it, use build2 instead of parser_build_binary_op.
4887 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4888 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4889 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4890 Handle pragma_struct and pragma_param the same as pragma_external.
4891 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4892 (c_parser_omp_variable_list): Parse array sections for
4893 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4894 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4895 (c_parser_omp_clause_reduction): Handle user defined reductions.
4896 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4897 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4898 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4899 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4900 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4901 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4902 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4903 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4904 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4905 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4906 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4907 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4908 (c_parser_omp_for_loop): Add CODE argument, pass it through
4909 to c_finish_omp_for. Change last argument to cclauses,
4910 and adjust uses to grab parallel clauses from the array of all
4911 the split clauses. Adjust c_parser_binary_expression,
4912 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4913 (omp_split_clauses): New function.
4914 (c_parser_omp_simd): New function.
4915 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4916 Allow the function to be called also when parsing combined constructs,
4917 and call c_parser_omp_simd when parsing for simd.
4918 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4919 #pragma omp section, require exactly one structured-block instead of
4920 sequence of statements.
4921 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4922 Allow the function to be called also when parsing combined constructs.
4923 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4924 Allow the function to be called also when parsing combined
4925 constructs.
4926 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4927 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4928 c_parser_omp_teams, c_parser_omp_target_data,
4929 c_parser_omp_target_update, c_parser_omp_target,
4930 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4931 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4932 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4933 (c_parser_omp_construct): Add p_name and mask vars. Handle
4934 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4935 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4936 and c_parser_omp_sections callers.
4937 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4938 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4939 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4940 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4941 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4942 OMP_CLAUSE_DEPEND.
4943 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4944 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4945 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4946 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4947 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4948 * c-typeck.c: Include tree-inline.h.
4949 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4950 handle_omp_array_sections_1, handle_omp_array_sections,
4951 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4952 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4953 user defined reductions.
4954 (c_tree_equal): New function.
4955 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4956 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4957 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4958 c_check_omp_declare_reduction_r): New prototypes.
4959 * c-decl.c (current_omp_declare_target_attribute): New variable.
4960 (c_decl_attributes): New function.
4961 (start_decl, start_function): Use it instead of decl_attributes.
4962 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4963 c_omp_reduction_decl, c_omp_reduction_lookup,
4964 c_check_omp_declare_reduction_r): New functions.
4965
0a6c2227
TT
49662013-09-25 Tom Tromey <tromey@redhat.com>
4967
4968 * Make-lang.in (c/gccspec.o): Remove.
4969 (CFLAGS-c/gccspec.o): New variable.
4970 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4971 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4972 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4973
f3bc55f0
TT
49742013-09-25 Tom Tromey <tromey@redhat.com>
4975
4976 * Make-lang.in (c/gccspec.o): Don't use subshell.
4977
a24d975c
MP
49782013-09-18 Marek Polacek <polacek@redhat.com>
4979
4980 PR sanitize/58443
4981 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4982 Remove unnecessary check.
4983
ce6923c5
MP
49842013-09-18 Marek Polacek <polacek@redhat.com>
4985
4986 PR sanitizer/58411
4987 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4988 no_sanitize_undefined attribute.
4989
a1e51df9
KT
49902013-09-13 Kai Tietz <ktietz@redhat.com>
4991
4992 PR target/57848
4993 * c-decl.c (c_builtin_function_ext_scope): Remove
4994 wrong assumption that it is never called on prexisting
4995 symbol.
4996
0af94e6f
JR
49972013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4998
4999 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5000
20059c8b
GDR
50012013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5002
5003 * c-objc-common.c (c_tree_printer): Tidy.
5004
de5a5fa1
MP
50052013-08-30 Marek Polacek <polacek@redhat.com>
5006
5007 * c-typeck.c (build_binary_op): Add division by zero and shift
5008 instrumentation.
5009
2531a1d9 50102013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5011 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5012
6e2bcc98 5013 PR c/35649
2531a1d9
JR
5014 * c-typeck.c (c_common_type): Prefer double_type_node over
5015 other REAL_TYPE types with the same precision.
5016 (convert_arguments): Likewise.
5017
025311c4
GDR
50182013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5019
5020 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5021 (c_initialize_diagnostics): Call a destructor for the early printer.
5022
da6ca2b5
GDR
50232013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5024
5025 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5026 printer initialization.
5027
318cda85 50282013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5029
318cda85
BI
5030 PR c/57490
5031 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5032 check for truth values.
5033 (expand_array_notation_exprs): Added truth values case. Removed an
5034 unwanted else. Added for-loop to walk through subtrees in default
5035 case.
5036
b066401f
GDR
50372013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5038
5039 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5040
fb48aadc
JM
50412013-07-23 Joseph Myers <joseph@codesourcery.com>
5042
5043 * c-parser.c (struct c_generic_association): Fix typo.
5044
433cc7b0
TT
50452013-07-23 Tom Tromey <tromey@redhat.com>
5046 Joseph Myers <joseph@codesourcery.com>
5047
5048 * c-parser.c (struct c_generic_association): New.
5049 (c_generic_association_d): New typedef.
5050 (c_parser_generic_selection): New function.
5051 (c_parser_postfix_expression): Handle RID_GENERIC.
5052
26d40c3d
JM
50532013-07-13 Jason Merrill <jason@redhat.com>
5054
5055 PR c++/57793
5056 * c-decl.c (finish_struct): Check for too-large class.
5057
ecdbd01a 50582013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5059
5060 PR c/57821
5061 * c-typeck.c (set_init_index): When folding, check for index overflow.
5062
1141ed3f
BI
50632013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5064
5065 * c-parser.c (c_parser_array_notation): Removed rejection of array
5066 notations in an array of function pointers.
5067
713b46fa
BI
50682013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5069
5070 * c-array-notation.c (make_triplet_val_inv): New function.
5071 (create_cmp_incr): Likewise.
5072 (create_array_refs): Likewise.
5073 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5074 Also modularized common parts between functions and called the function.
5075 (build_array_notation_expr): Likewise.
5076 (fix_conditional_array_notations_1): Likewise.
5077 (fix_array_notation_expr): Likewise.
5078 (fix_array_notation_call_expr): Likewise.
5079
92f20202
MP
50802013-06-18 Marek Polacek <polacek@redhat.com>
5081
5082 PR c/57630
5083 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5084
73a23b06
BI
50852013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5086
5087 * c-array-notation.c (build_array_notation_expr): Reject array notation
5088 mismatch between LHS and RHS even inside a call_expr. Also, removed
5089 a couple while statements that were dead code.
5090
00b8517d
BI
50912013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5092
5093 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5094 excessive precision expressions in function parameters. Also removed
5095 couple unwanted while statements.
5096
1509bdda
BI
50972013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5098
5099 * c-array-notation.c (expand_array_notation_exprs): Added
5100 ARRAY_NOTATION_REF case.
5101
d60f1706
BI
51022013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5103
5104 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5105 function to c-family/array-notation-common.c.
5106 (is_cilkplus_reduce_builtin): Likewise.
5107 (find_rank): Likewise.
5108 (extract_array_notation_exprs): Likewise.
5109 (replace_array_notations): Likewise.
5110 (find_inv_trees): Likewise.
5111 (replace_inv_trees): Likewise.
5112 (contains_array_notation_expr): Likewise.
5113 (find_correct_array_notation_type): Likewise.
5114 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5115 (struct inv_list): Moved this to c-family/array-notation-common.c.
5116 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5117
6d6efbb3
BI
51182013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5119
5120 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5121 reduction functions outside the for-loop. Added a check if the fundecl
5122 is non-NULL. Finally, removed an unwanted if-statement, and made the
5123 body unconditional.
5124
25c22937
BI
51252013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5126
5127 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5128 condition of the if-statement matches the rank of else-block and then-
5129 block when array notations are used.
5130 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5131 expression after the entire function body is parsed.
5132 (c_parser_expr_no_commas): Delayed creating array notation expressions
5133 to the end of function parsing.
5134 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5135 whole if-statement instead of just the condition.
5136 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5137
edd25645
BI
51382013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5139
5140 PR c/57474
5141 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5142 array to NULL_TREE if they are unused. Also added a check for the
5143 field to be NULL before its fields are used in future.
5144
065ce7f1
RO
51452013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5146
5147 PR bootstrap/57450
5148 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5149 (build_array_notation_expr): Likewise.
5150
36536d79
BI
51512013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5152
5153 * c-typeck.c (build_array_ref): Added a check to see if array's
5154 index is greater than one. If true, then emit an error.
5155 (build_function_call_vec): Exclude error reporting and checking
5156 for builtin array-notation functions.
5157 (convert_arguments): Likewise.
5158 (c_finish_return): Added a check for array notations as a return
5159 expression. If true, then emit an error.
5160 (c_finish_loop): Added a check for array notations in a loop
5161 condition. If true then emit an error.
5162 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5163 (build_binary_op): Added a check for array notation expr inside
5164 op1 and op0. If present, we call another function to find correct
5165 type.
5166 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5167 * c-parser.c (c_parser_compound_statement): Check if array
5168 notation code is used in tree, if so, then transform them into
5169 appropriate C code.
5170 (c_parser_expr_no_commas): Check if array notation is used in LHS
5171 or RHS, if so, then build array notation expression instead of
5172 regular modify.
5173 (c_parser_postfix_expression_after_primary): Added a check for
5174 colon(s) after square braces, if so then handle it like an array
5175 notation. Also, break up array notations in unary op if found.
5176 (c_parser_direct_declarator_inner): Added a check for array
5177 notation.
5178 (c_parser_compound_statement): Added a check for array notation in
5179 a stmt. If one is present, then expand array notation expr.
5180 (c_parser_if_statement): Likewise.
5181 (c_parser_switch_statement): Added a check for array notations in
5182 a switch statement's condition. If true, then output an error.
5183 (c_parser_while_statement): Similarly, but for a while.
5184 (c_parser_do_statement): Similarly, but for a do-while.
5185 (c_parser_for_statement): Similarly, but for a for-loop.
5186 (c_parser_unary_expression): Check if array notation is used in a
5187 pre-increment or pre-decrement expression. If true, then expand
5188 them.
5189 (c_parser_array_notation): New function.
5190 * c-array-notation.c: New file.
5191 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5192
cd192ccc
MS
51932013-05-23 Mike Stump <mikestump@comcast.net>
5194
5195 * c-typeck.c (convert_for_assignment): Handle references to memory
5196 spaces better.
5197
427b248d
JM
51982013-05-16 Jason Merrill <jason@redhat.com>
5199
5200 * Make-lang.in (cc1$(exeext)): Use link mutex.
5201
44d90fe1
PC
52022013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5203
5204 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5205 to simply use OPT_Wpointer_arith.
5206 (build_unary_op): Likewise.
5207
4e7d7b3d
JJ
52082013-04-03 Jakub Jelinek <jakub@redhat.com>
5209
5210 PR c/19449
5211 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5212 argument. If set, or it temporarily for parsing of the first
5213 argument into force_folding_builtin_constant_p.
5214 (c_parser_postfix_expression): Adjust callers.
5215
839b422f
RB
52162013-03-21 Richard Biener <rguenther@suse.de>
5217
5218 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5219 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5220
2ee028f1
MP
52212013-02-12 Marek Polacek <polacek@redhat.com>
5222
5223 PR c/44938
5224 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5225 origtypes to NULL.
5226
8824edff
JJ
52272013-01-24 Jakub Jelinek <jakub@redhat.com>
5228
5229 PR c/56078
5230 * c-typeck.c (set_nonincremental_init_from_string): If
5231 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5232 returned false.
5233 (process_init_element): Likewise.
5234
eadd3d0d
JJ
52352012-12-20 Jakub Jelinek <jakub@redhat.com>
5236
5237 PR c++/55619
5238 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5239 argument, don't call default_function_array_conversion
5240 nor c_fully_fold here.
5241 (c_parser_asm_statement): Adjust callers.
5242 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5243 and outputs here, and call default_function_array_conversion
5244 on inputs that don't need to be addressable.
5245
f8a93a2e
JJ
52462012-12-18 Jakub Jelinek <jakub@redhat.com>
5247
5248 PR c/39464
5249 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5250 warning require that both c_common_unsigned_type as well as
5251 c_common_signed_type is the same for both mvl and mvr types.
5252
9771b263
DN
52532012-11-16 Diego Novillo <dnovillo@google.com>
5254
5255 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5256
5257 * c-common.c: Use new vec API in vec.h.
5258 * c-common.h: Likewise.
5259 * c-gimplify.c: Likewise.
5260 * c-pragma.c: Likewise.
5261 * c-pretty-print.c: Likewise.
5262 * c-pretty-print.h: Likewise.
5263 * c-semantics.c: Likewise.
5264 * c-decl.c: Likewise.
5265 * c-parser.c: Likewise.
5266 * c-tree.h: Likewise.
5267 * c-typeck.c: Likewise.
5268
880661a4
JW
52692012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5270
5271 PR c++/54930
5272 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5273
077d1abe
MLI
52742012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5275
5276 PR c/53066
5277 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5278 shadows a function, unless the variable is a function or a
5279 pointer-to-function.
5280
3a785c97
JJ
52812012-10-12 Jakub Jelinek <jakub@redhat.com>
5282
5283 PR c/54381
5284 * c-parser.c (struct c_tree_loc_pair): Removed.
5285 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5286 add location_t * and tree * arguments, fill in array of 3
5287 sizeof_arg trees and corresponding locs.
5288 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5289 c_parser_expr_list callers.
5290 (c_parser_postfix_expression_after_primary): Likewise. Pass
5291 array of 3 sizeof_arg trees and locs (corresponding to first
5292 3 arguments) to sizeof_pointer_memaccess_warning.
5293
703c8606
LC
52942012-10-09 Lawrence Crowl <crowl@google.com>
5295
5296 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5297 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5298 hash table.
5299
5d9de0d0
PC
53002012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5301
5302 PR c++/54194
5303 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5304 call.
5305
a212e43f
MG
53062012-10-09 Marc Glisse <marc.glisse@inria.fr>
5307
5308 PR c++/54427
5309 * c-typeck.c: Include c-common.h.
5310 (enum stv_conv): Moved to c-common.h.
5311 (scalar_to_vector): Moved to c-common.c.
5312 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5313 * Make-lang.in: c-typeck.c depends on c-common.h.
5314
3b78de56
AC
53152012-10-04 Arnaud Charlet <charlet@adacore.com>
5316
5317 * c-decl.c (c_write_global_declarations): Fix handling of
5318 -fdump-ada-spec*.
5319
78c60e3d
SS
53202012-09-30 Sharad Singhai <singhai@google.com>
5321
5322 * c-decl.c (c_write_global_declarations): Use a different method
5323 to determine if the dump has ben initialized.
5324
9f33203d
JM
53252012-09-14 Joseph Myers <joseph@codesourcery.com>
5326
5327 PR c/54552
5328 * c-typeck.c (c_cast_expr): When casting to a type requiring
5329 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5330 c_fully_fold first.
5331
a27d595d
JM
53322012-09-14 Joseph Myers <joseph@codesourcery.com>
5333
5334 PR c/54103
5335 * c-typeck.c (build_unary_op): Pass original argument of
5336 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5337 any C_MAYBE_CONST_EXPR, if it has integer operands.
5338 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5339 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5340 to c_objc_common_truthvalue_conversion, then remove any
5341 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5342 c_objc_common_truthvalue_conversion not
5343 c_common_truthvalue_conversion.
5344 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5345 call note_integer_operands for arguments with integer operands
5346 that are not integer constants.
5347
9feb29df
JJ
53482012-09-13 Jakub Jelinek <jakub@redhat.com>
5349
5350 PR c/54559
5351 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5352 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5353
d409320c
JJ
53542012-08-31 Jakub Jelinek <jakub@redhat.com>
5355
5356 PR c/54428
5357 * c-convert.c (convert): Don't call fold_convert_loc if
5358 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5359 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5360 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5361
6265d07c
JJ
53622012-08-24 Jakub Jelinek <jakub@redhat.com>
5363
5364 PR c/54355
5365 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5366 for nested and empty_ok arguments in the call to
5367 c_parser_declaration_or_fndef.
5368
1a4049e7
JJ
53692012-08-17 Jakub Jelinek <jakub@redhat.com>
5370
5371 * c-tree.h (c_last_sizeof_arg): Declare.
5372 * c-parser.c (struct c_tree_loc_pair): New type.
5373 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5374 non-NULL.
5375 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5376 (c_parser_postfix_expression_after_primary): Likewise. Call
5377 sizeof_pointer_memaccess_warning if needed.
5378 (sizeof_ptr_memacc_comptypes): New function.
5379 * c-typeck.c (c_last_sizeof_arg): New global variable.
5380 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5381
0229aee9
UB
53822012-07-24 Uros Bizjak <ubizjak@gmail.com>
5383
5384 * c-lang.h (lang_decl): Add variable_size GTY option.
5385
7ee2468b
SB
53862012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5387
5388 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5389 * Make-lang.in: Fix dependencies.
5390
d4a10d0a
SB
53912012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5392
5393 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5394 and add language Makefile hooks.
5395 * config-lang.in: New file.
5396 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5397 add the required "normal" config-lang.in rules.
5398 * c-lang.h: Moved from gcc/ to here.
5399 * c-tree.h: Likewise.
5400 * c-objc-common.c: Likewise.
5401 * c-objc-common.h: Likewise.
5402 * c-typeck.c: Likewise.
5403 * c-convert.c: Likewise.
5404 * c-lang.c: Likewise.
5405 * c-aux-info.c: Likewise.
5406 * c-errors.c: Likewise.
5407 * gccspec.c: Likewise.
5408 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5409 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5410\f
85ec4feb 5411Copyright (C) 2012-2018 Free Software Foundation, Inc.
d4a10d0a
SB
5412
5413Copying and distribution of this file, with or without modification,
5414are permitted in any medium without royalty provided the copyright
5415notice and this notice are preserved.