]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR target/84743 (default widths for parallel reassociation now hurt rather than...
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
849bbdb9
JJ
12018-03-06 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/84721
4 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
5 !building_stmt_list_p ().
6
d74641bd
RS
72018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
8
9 PR c/84305
10 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
11 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
12 and include the BIND_EXPR in the list of things that need to be
13 pre-evaluated.
14
0444aa9c
NS
152018-02-09 Nathan Sidwell <nathan@acm.org>
16
17 PR c/84293
18 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
19 to strict_aliasing_warning.
20
7c30b12a
PC
212018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
22
23 * c-typeck.c (really_start_incremental_init, push_init_level,
24 set_nonincremental_init, output_init_element, process_init_element):
25 Use DECL_UNNAMED_BIT_FIELD.
26
2be4dfcb
MP
272018-01-31 Marek Polacek <polacek@redhat.com>
28
29 PR c/81779
30 * c-parser.c (c_parser_compound_statement_nostart): Call
31 expansion_point_location_if_in_system_header.
32
bb9869d5
DM
332018-01-17 David Malcolm <dmalcolm@redhat.com>
34
35 PR c++/83814
36 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
37 the C part.
38
b4923738
JJ
392018-01-13 Jakub Jelinek <jakub@redhat.com>
40
41 PR c/83801
42 * c-tree.h (decl_constant_value_1): Add a bool argument.
43 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
44 returning a CONSTRUCTOR if it is true. Use error_operand_p.
45 (decl_constant_value): Adjust caller.
46 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
47 decl_constant_value_1 as IN_INIT. Otherwise, punt if
48 decl_constant_value returns initializer that has BLKmode or
49 array type.
50 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
51
928686b1
RS
522018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
53 Alan Hayward <alan.hayward@arm.com>
54 David Sherwood <david.sherwood@arm.com>
55
56 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
57 TYPE_VECTOR_SUBPARTS.
58
85ec4feb
JJ
592018-01-03 Jakub Jelinek <jakub@redhat.com>
60
61 Update copyright years.
62
913884f7
JJ
632018-01-01 Jakub Jelinek <jakub@redhat.com>
64
65 PR c/83595
66 * c-parser.c (c_parser_braced_init, c_parser_initelt,
67 c_parser_conditional_expression, c_parser_cast_expression,
68 c_parser_sizeof_expression, c_parser_alignof_expression,
69 c_parser_postfix_expression, c_parser_omp_declare_reduction,
70 c_parser_transaction_expression): Use set_error () method instead
71 of setting value member to error_mark_node.
72
c6cfa2bf
MM
732017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
74
75 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
76 and _Float<N>X built-in functions.
77
11d29d63
JJ
782017-12-22 Jakub Jelinek <jakub@redhat.com>
79
14ec014e
JJ
80 PR debug/83550
81 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
82 TYPE_STUB_DECL and call rest_of_type_compilation before processing
83 incomplete vars rather than after it.
84
11d29d63
JJ
85 PR debug/83547
86 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
87 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
88 and consider empty ones if there are no other stmts. For
89 -Wunused-value walk all statements before the one only followed by
90 DEBUG_BEGIN_STMTs.
91
170a8bd6
EB
922017-12-22 Mike Stump <mikestump@comcast.net>
93 Eric Botcazou <ebotcazou@adacore.com>
94
95 * c-parser.c (c_parser_while_statement): Add unroll parameter and
96 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
97 (c_parser_do_statement): Likewise.
98 (c_parser_for_statement): Likewise.
99 (c_parser_statement_after_labels): Adjust calls to above.
100 (c_parse_pragma_ivdep): New static function.
101 (c_parser_pragma_unroll): Likewise.
102 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
103 <PRAGMA_UNROLL>: New case.
104
01512446
JJ
1052017-12-19 Jakub Jelinek <jakub@redhat.com>
106
107 * c-typeck.c (comptypes_internal, function_types_compatible_p,
108 perform_integral_promotions, digest_init): Replace Yoda conditions
109 with typical order conditions.
110 * c-decl.c (check_bitfield_type_and_width): Likewise.
111
c65e18d3
BE
1122017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
113
114 * c-typeck.c (c_safe_arg_type_equiv_p,
115 c_safe_function_type_cast_p): New function.
116 (build_c_cast): Implement -Wcast-function-type.
117
b7280579
RB
1182017-12-14 Richard Biener <rguenther@suse.de>
119
120 PR c/83415
121 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
122 like REALPART_EXPR for the behavior of whether its operand
123 is an lvalue.
124
49e6a6c0
MP
1252017-12-12 Marek Polacek <polacek@redhat.com>
126
127 PR c/82679
128 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
129
96a95ac1
AO
1302017-12-12 Alexandre Oliva <aoliva@redhat.com>
131
132 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
133 * c-parser.c (add_debug_begin_stmt): New.
134 (c_parser_declaration_or_fndef): Call it.
135 (c_parser_compound_statement_nostart): Likewise.
136 (c_parser_statement_after_labels): Likewise.
137 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
138
4b2b493f
JM
1392017-12-07 Joseph Myers <joseph@codesourcery.com>
140
141 * c-decl.c (build_compound_literal): Add parameter alignas_align
142 and set alignment of decl if nonzero.
143 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
144 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
145 qualifier.
146 (c_parser_struct_declaration): Update syntax comment.
147 (c_parser_type_name): Add alignas_ok argument and pass it to
148 c_parser_declspecs.
149 (c_parser_cast_expression): Pass true to c_parser_type_name and
150 give error if a cast used an _Alignas specifier.
151 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
152 give error if sizeof (type-name) used an _Alignas specifier.
153 (c_parser_alignof_expression): Pass true to c_parser_type_name and
154 give error if _Alignof (type-name) used an _Alignas specifier.
155 (c_parser_postfix_expression_after_paren_type): Check specified
156 alignment for a compound literal and pass it to
157 build_compound_literal.
158 * c-parser.h (c_parser_type_name): Update prototype.
159 * c-tree.h (build_compound_literal): Update prototype.
160
5d9ae53d
MS
1612017-12-07 Martin Sebor <msebor@redhat.com>
162
163 PR c/81544
164 * c-decl.c (c_decl_attributes): Look up existing declaration and
165 pass it to decl_attributes.
166
c79144f8
DM
1672017-12-06 David Malcolm <dmalcolm@redhat.com>
168
169 PR c/83236
170 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
171 reserved for use by the implementation.
172
613bc14f
DM
1732017-12-06 David Malcolm <dmalcolm@redhat.com>
174
175 * c-decl.c: Include "c-family/c-spellcheck.h".
176
05abad4c
ML
1772017-12-05 Martin Liska <mliska@suse.cz>
178 Jakub Jelinek <jakub@redhat.com>
179
180 * c-typeck.c (pointer_diff): Add new argument and instrument
181 pointer subtraction.
182 (build_binary_op): Similar for pointer comparison.
183
cc6534d4
JJ
1842017-12-01 Jakub Jelinek <jakub@redhat.com>
185
65791f42
JJ
186 PR c/79153
187 * c-parser.c: Include tree-iterator.h.
188 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
189 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
190 on it.
191
cc6534d4
JJ
192 PR c/83222
193 * c-tree.h (decl_constant_value_1): Declare.
194 * c-typeck.c (decl_constant_value_1): New function.
195 (decl_constant_value): Use it.
196 * c-fold.c (c_fully_fold_internal): If in_init, use
197 decl_constant_value_1 instead of decl_constant_value.
198
5de73c05
JJ
1992017-11-30 Jakub Jelinek <jakub@redhat.com>
200
201 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
202
058f0b9e
JJ
2032017-11-28 Jakub Jelinek <jakub@redhat.com>
204
205 PR sanitizer/81275
206 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
207 c_switch_covers_all_cases_p returns true.
208
5e9d6aa4
JK
2092017-11-28 Julia Koval <julia.koval@intel.com>
210 Sebastian Peryt <sebastian.peryt@intel.com>
211
212 * Make-lang.in (c/c-array-notation.o): Remove.
213 * c-array-notation.c: Delete.
214 * c-decl.c: Remove cilkplus condition.
215 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
216 c_parser_cilk_verify_simd, c_parser_array_notation,
217 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
218 c_parser_cilk_simd_fn_vector_attrs,
219 c_finish_cilk_simd_fn_tokens): Delete.
220 (c_parser_declaration_or_fndef): Remove cilkplus condition.
221 (c_parser_direct_declarator_inner): Ditto.
222 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
223 (c_parser_attributes, c_parser_compound_statement,
224 c_parser_statement_after_labels, c_parser_if_statement,
225 c_parser_switch_statement, c_parser_while_statement,
226 c_parser_do_statement, c_parser_for_statement,
227 c_parser_unary_expression, c_parser_postfix_expression,
228 c_parser_postfix_expression_after_primary,
229 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
230 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
231 support.
232 * c-typeck.c (build_array_ref, build_function_call_vec,
233 convert_arguments,
234 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
235 c_finish_loop, build_binary_op): Remove cilkplus support.
236
9e851845
JJ
2372017-11-28 Jakub Jelinek <jakub@redhat.com>
238
239 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
240 of build3.
241
8c7dbea9
BK
2422017-11-14 Boris Kolpackov <boris@codesynthesis.com>
243
244 * Make-lang.in (c.install-plugin): Install backend import library.
245
41521dee
JJ
2462017-11-23 Jakub Jelinek <jakub@redhat.com>
247
248 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
249 pragma_stmt context.
250
ac9effed
EB
2512017-11-23 Mike Stump <mikestump@comcast.net>
252 Eric Botcazou <ebotcazou@adacore.com>
253
254 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
255 ANNOTATE_EXPR.
256 (c_parser_do_statement): Likewise.
257 (c_parser_for_statement): Likewise.
258
ce95abc4
DM
2592017-11-22 David Malcolm <dmalcolm@redhat.com>
260
261 PR c++/62170
262 * c-objc-common.c (c_tree_printer): Convert penultimate param from
263 bool to bool *. Within '%T' handling, if showing an "aka", use
264 "quoted" param to add appropriate quoting.
265
974aedcc
MP
2662017-11-22 Marek Polacek <polacek@redhat.com>
267
268 PR c++/60336
269 PR middle-end/67239
270 PR target/68355
271 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
272
d4300cc6
DM
2732017-11-21 David Malcolm <dmalcolm@redhat.com>
274
275 PR c/83056
276 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
277 earlier failed lookups.
278
1af4ebf5
MG
2792017-11-21 Marc Glisse <marc.glisse@inria.fr>
280
281 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
282 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
283
26edace6
DM
2842017-11-20 David Malcolm <dmalcolm@redhat.com>
285
286 PR c/81404
287 * c-decl.c: Include "c-family/known-headers.h".
288 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
289 to known-headers.cc.
290 (class suggest_missing_header): Move to known-header.h.
291 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
292 than get_c_name_hint.
293
b1212255
DM
2942017-11-20 David Malcolm <dmalcolm@redhat.com>
295
296 * c-decl.c (get_c_name_hint): New function.
297 (class suggest_missing_header): New class.
298 (lookup_name_fuzzy): Call get_c_name_hint and use it to
299 suggest missing headers to the user.
300
6c7a259b
DM
3012017-11-20 David Malcolm <dmalcolm@redhat.com>
302
303 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
304 Include "c-family/name-hint.h"
305 (implicit_decl_warning): Convert "hint" from
306 const char * to name_hint. Pass location to
307 lookup_name_fuzzy. Suppress any deferred diagnostic if the
308 warning was not printed.
309 (undeclared_variable): Likewise for "guessed_id".
310 (lookup_name_fuzzy): Convert return type from const char *
311 to name_hint. Add location_t param.
312 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
313 Include "c-family/name-hint.h"
314 (c_parser_declaration_or_fndef): Convert "hint" from
315 const char * to name_hint. Pass location to lookup_name_fuzzy.
316 (c_parser_parameter_declaration): Likewise.
317
f9c59f7e
JJ
3182017-11-19 Jakub Jelinek <jakub@redhat.com>
319
320 PR c/66618
321 PR c/69960
322 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
323 where needed.
324 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
325 handle_omp_array_sections): Likewise.
326 (digest_init): Don't call decl_constant_value_for_optimization.
327 * c-tree.h (decl_constant_value_for_optimization): Removed.
328 * c-fold.c (c_fold_array_ref): New function.
329 (c_fully_fold_internal): Add LVAL argument, propagate it through
330 recursive calls. For VAR_P call decl_constant_value and
331 unshare if not LVAL and either optimizing or IN_INIT. Remove
332 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
333 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
334 (c_fully_fold): Add LVAL argument, pass it through to
335 c_fully_fold_internal.
336 (decl_constant_value_for_optimization): Removed.
337
3ca0dc60
JM
3382017-11-15 Joseph Myers <joseph@codesourcery.com>
339
340 PR c/81156
341 * c-parser.c (check_tgmath_function): New function.
342 (enum tgmath_parm_kind): New enum.
343 (c_parser_postfix_expression): Handle __builtin_tgmath.
344
64a5912c
DM
3452017-10-31 David Malcolm <dmalcolm@redhat.com>
346
347 * c-decl.c (implicit_decl_warning): Update for renaming of
348 pedwarn_at_rich_loc and warning_at_rich_loc.
349 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
350 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
351 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
352 (c_parser_struct_or_union_specifier): Likewise for renaming of
353 pedwarn_at_rich_loc.
354 (c_parser_parameter_declaration): Likewise for renaming of
355 error_at_rich_loc.
356 * c-typeck.c (build_component_ref): Likewise.
357 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
358 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
359 (set_init_label): Likewise for renaming of error_at_rich_loc.
360
c1136864
RB
3612017-10-30 Richard Biener <rguenther@suse.de>
362
363 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
364 stmts.
365
ee5fd23a
MM
3662017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
367
368 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
369 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
370
1a59ccf2
DM
3712017-10-25 David Malcolm <dmalcolm@redhat.com>
372
373 PR c/7356
374 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
375 semicolons.
376
bc1a75dd
JJ
3772017-10-25 Jakub Jelinek <jakub@redhat.com>
378
379 PR libstdc++/81706
380 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
381 newdecl to corresponding __builtin_ if any.
382
ff1ff960
PC
3832017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
384
385 PR c++/82466
386 * c-decl.c (diagnose_mismatched_decls): Use
387 OPT_Wbuiltin_declaration_mismatch.
388
62e1c678
DM
3892017-10-12 David Malcolm <dmalcolm@redhat.com>
390
391 * c-parser.c (c_parser_require): Add "type_is_unique" param and
392 use it to guard calls to maybe_suggest_missing_token_insertion.
393 (c_parser_parms_list_declarator): Override default value of new
394 "type_is_unique" param to c_parser_require.
395 (c_parser_asm_statement): Likewise.
396 * c-parser.h (c_parser_require): Add "type_is_unique" param,
397 defaulting to true.
398
a92f6726
NS
3992017-10-11 Nathan Sidwell <nathan@acm.org>
400
401 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
402
8e6cdc90
RS
4032017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
404
405 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
406 operating on trees as wide_ints.
407 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
408 (c_tree_equal): Likewise.
409
8139a48e
DM
4102017-10-04 David Malcolm <dmalcolm@redhat.com>
411
412 * c-decl.c (push_parm_decl): Store c_parm's location into the
413 PARAM_DECL.
414 (build_c_parm): Add "loc" param and store it within the c_parm.
415 * c-parser.c (struct c_parser): Add "last_token_location" field.
416 (c_parser_consume_token): Store location of the token into the
417 new field.
418 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
419 when handling a FUNCTION_DECL, if it doesn't already have them.
420 (c_parser_parameter_declaration): Generate a location for the
421 parameter, and pass it to the call to build_c_parm.
422 * c-tree.h (struct c_parm): Add field "loc".
423 (build_c_parm): Add location_t param.
424 * c-typeck.c (get_fndecl_argument_location): New function.
425 (inform_for_arg): New function.
426 (convert_for_assignment): Use inform_for_arg when dealing with
427 ic_argpass.
428
2a389958
JJ
4292017-09-29 Jakub Jelinek <jakub@redhat.com>
430
7d386d45
JJ
431 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
432 width is non-NULL.
433 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
434 don't SET_DECL_C_BIT_FIELD here.
435
2a389958
JJ
436 PR c/82340
437 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
438 instead of trying to set just TREE_READONLY manually.
439
ebc6a85e
TV
4402017-09-16 Tom de Vries <tom@codesourcery.com>
441
442 PR c/81875
443 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
444 cond itself.
445
bb75facd
JM
4462017-09-15 Joseph Myers <joseph@codesourcery.com>
447
448 PR c/82071
449 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
450 for C11.
451 (build_conditional_expr): For C11, generate result with excess
452 precision when one argument is an integer and the other is of a
453 type using excess precision.
454
1d933576
BE
4552017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
456
457 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
458
267bbb6f
MP
4592017-09-13 Marek Polacek <polacek@redhat.com>
460
461 PR c/82167
462 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
463 than expr.original_type.
464
6836632e
NS
4652017-09-12 Nathan Sidwell <nathan@acm.org>
466
467 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
468 resort_sorted_fields): Moved from c-family/c-common.c.
469 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
470
e035be33
JM
4712017-09-01 Joseph Myers <joseph@codesourcery.com>
472
473 PR c/82071
474 * c-typeck.c (build_atomic_assign): Handle argument with excess
475 precision. Ensure any EXCESS_PRECISION_EXPR is present in
476 argument passed to build_binary_op and convert_for_assignment but
477 not for call to c_fully_fold.
478 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
479 Ensure build_binary_op is called with argument with original
480 semantic type. Avoid calling c_fully_fold with an
481 EXCESS_PRECISION_EXPR from build_binary_op.
482
d2e05fcb
JJ
4832017-09-01 Jakub Jelinek <jakub@redhat.com>
484
485 PR c/81887
486 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
487
b397965c
RS
4882017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
489 Alan Hayward <alan.hayward@arm.com>
490 David Sherwood <david.sherwood@arm.com>
491
492 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
493 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
494 m1 and m2 to the signed equivalent of a fixed-point
495 SCALAR_TYPE_MODE.
496
14e18d71
DM
4972017-08-24 David Malcolm <dmalcolm@redhat.com>
498
499 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
500 than CAN_HAVE_LOCATION_P when determining whether to use the
501 location_t value within "value".
502
7f204c0f
DM
5032017-08-21 David Malcolm <dmalcolm@redhat.com>
504
505 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
506 rather than peeking the location of the first token.
507 * c-tree.h (c_expr::get_location): New method.
508
2f687306
DM
5092017-08-21 David Malcolm <dmalcolm@redhat.com>
510
511 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
512 to check_function_arguments.
513
3e7b80d7
MP
5142017-08-18 Marek Polacek <polacek@redhat.com>
515
516 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
517 commentary.
518
00aa1fa2
L
5192017-08-18 H.J. Lu <hongjiu.lu@intel.com>
520
521 PR c/53037
522 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
523 (check_bitfield_type_and_width): Don't allow bit-field with
524 warn_if_not_aligned type.
525
da67acb9
MS
5262017-08-14 Martin Sebor <msebor@redhat.com>
527
528 PR c/81117
529 * c-objc-common.c (c_objc_common_init): Handle 'G'.
530
bb85aa74
MP
5312017-08-11 Marek Polacek <polacek@redhat.com>
532
533 PR c/81795
534 * c-decl.c (pushtag): Only print inform if the warning was printed.
535 (grokdeclarator): Likewise.
536
32129a17
DM
5372017-08-10 David Malcolm <dmalcolm@redhat.com>
538
539 * c-parser.c (c_parser_error): Rename to...
540 (c_parser_error_richloc): ...this, making static, and adding
541 "richloc" parameter, passing it to the c_parse_error call,
542 rather than calling c_parser_set_source_position_from_token.
543 (c_parser_error): Reintroduce, reimplementing in terms of the
544 above, converting return type from void to bool.
545 (class token_pair): New class.
546 (struct matching_paren_traits): New struct.
547 (matching_parens): New typedef.
548 (struct matching_brace_traits): New struct.
549 (matching_braces): New typedef.
550 (get_matching_symbol): New function.
551 (c_parser_require): Add param MATCHING_LOCATION, using it to
552 highlight matching "opening" tokens for missing "closing" tokens.
553 (c_parser_skip_until_found): Likewise.
554 (c_parser_static_assert_declaration_no_semi): Convert explicit
555 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
556 class matching_parens, so that the pertinent open parenthesis is
557 highlighted when there are problems locating the close
558 parenthesis.
559 (c_parser_struct_or_union_specifier): Likewise.
560 (c_parser_typeof_specifier): Likewise.
561 (c_parser_alignas_specifier): Likewise.
562 (c_parser_simple_asm_expr): Likewise.
563 (c_parser_braced_init): Likewise, for matching_braces.
564 (c_parser_paren_condition): Likewise, for matching_parens.
565 (c_parser_switch_statement): Likewise.
566 (c_parser_for_statement): Likewise.
567 (c_parser_asm_statement): Likewise.
568 (c_parser_asm_operands): Likewise.
569 (c_parser_cast_expression): Likewise.
570 (c_parser_sizeof_expression): Likewise.
571 (c_parser_alignof_expression): Likewise.
572 (c_parser_generic_selection): Likewise.
573 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
574 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
575 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
576 In case CPP_OPEN_PAREN, pass loc_open_paren to the
577 c_parser_skip_until_found call.
578 (c_parser_objc_class_definition): Use class matching_parens as
579 above.
580 (c_parser_objc_method_decl): Likewise.
581 (c_parser_objc_try_catch_finally_statement): Likewise.
582 (c_parser_objc_synchronized_statement): Likewise.
583 (c_parser_objc_at_property_declaration): Likewise.
584 (c_parser_oacc_wait_list): Likewise.
585 (c_parser_omp_var_list_parens): Likewise.
586 (c_parser_omp_clause_collapse): Likewise.
587 (c_parser_omp_clause_default): Likewise.
588 (c_parser_omp_clause_if): Likewise.
589 (c_parser_omp_clause_num_threads): Likewise.
590 (c_parser_omp_clause_num_tasks): Likewise.
591 (c_parser_omp_clause_grainsize): Likewise.
592 (c_parser_omp_clause_priority): Likewise.
593 (c_parser_omp_clause_hint): Likewise.
594 (c_parser_omp_clause_defaultmap): Likewise.
595 (c_parser_oacc_single_int_clause): Likewise.
596 (c_parser_omp_clause_ordered): Likewise.
597 (c_parser_omp_clause_reduction): Likewise.
598 (c_parser_omp_clause_schedule): Likewise.
599 (c_parser_omp_clause_num_teams): Likewise.
600 (c_parser_omp_clause_thread_limit): Likewise.
601 (c_parser_omp_clause_aligned): Likewise.
602 (c_parser_omp_clause_linear): Likewise.
603 (c_parser_omp_clause_safelen): Likewise.
604 (c_parser_omp_clause_simdlen): Likewise.
605 (c_parser_omp_clause_depend): Likewise.
606 (c_parser_omp_clause_map): Likewise.
607 (c_parser_omp_clause_device): Likewise.
608 (c_parser_omp_clause_dist_schedule): Likewise.
609 (c_parser_omp_clause_proc_bind): Likewise.
610 (c_parser_omp_clause_uniform): Likewise.
611 (c_parser_omp_for_loop): Likewise.
612 (c_parser_cilk_clause_vectorlength): Likewise.
613 (c_parser_cilk_clause_linear): Likewise.
614 (c_parser_transaction_expression): Likewise.
615 * c-parser.h (c_parser_require): Add param matching_location with
616 default UNKNOWN_LOCATION.
617 (c_parser_error): Convert return type from void to bool.
618 (c_parser_skip_until_found): Add param matching_location with
619 default UNKNOWN_LOCATION.
620
30af3a2b
MP
6212017-08-09 Marek Polacek <polacek@redhat.com>
622
623 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
624 * c-tree.h (build_external_ref): Update declaration.
625 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
626 (build_external_ref): Change the type of a parameter to bool.
627 (parser_build_binary_op): Use true/false instead of 1/0.
628 (pointer_diff): Likewise.
629 (build_modify_expr): Likewise.
630 (set_designator): Change the type of a parameter to bool.
631 (set_init_index): Use true/false instead of 1/0.
632 (set_init_label): Likewise.
633 (output_init_element): Change the type of a parameter to bool.
634 (output_pending_init_elements): Use true/false instead of 1/0.
635 (process_init_element): Likewise.
636 (build_binary_op): Change the type of a parameter to bool.
637
296c53ac
MP
6382017-08-09 Marek Polacek <polacek@redhat.com>
639
640 PR c/81233
641 * c-typeck.c (pedwarn_init): Make the function take a variable list.
642 Call emit_diagnostic_valist instead of pedwarn.
643 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
644 Print the relevant types in diagnostics.
645
a32c8316
MP
6462017-08-09 Marek Polacek <polacek@redhat.com>
647
648 PR c/81417
649 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
650 build_conditional_expr.
651 * c-parser.c (c_parser_conditional_expression): Create locations for
652 EXP1 and EXP2 from their source ranges. Pass the locations down to
653 build_conditional_expr.
654 * c-tree.h (build_conditional_expr): Update declaration.
655 * c-typeck.c (build_conditional_expr): Add location_t parameters.
656 For -Wsign-compare, also print the types.
657
314e6352
ML
6582017-08-08 Martin Liska <mliska@suse.cz>
659
660 * c-convert.c: Include header files.
661 * c-typeck.c: Likewise.
662
577eec56
ML
6632017-08-07 Martin Liska <mliska@suse.cz>
664
665 * c-parser.c (c_parser_attributes): Canonicalize name of an
666 attribute.
667
f7b6353a
MP
6682017-08-02 Marek Polacek <polacek@redhat.com>
669
670 PR c/81289
671 * c-parser.c (c_parser_unary_expression): Use set_error.
672
8a6eab34
MP
673 PR c/81448
674 PR c/81306
675 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
676 warnings. Avoid walking MACRO_MAP_LOCATIONS.
677
7fef86d3
JH
6782017-07-31 Jan Hubicka <hubicka@ucw.cz>
679 Martin Liska <mliska@suse.cz>
680
681 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 682 statement.
7fef86d3 683
f34ebeb2
ML
6842017-07-31 Martin Liska <mliska@suse.cz>
685
686 PR sanitize/81530
687 * c-convert.c (convert): Guard condition with flag_sanitize_p
688 also with current_function_decl non-null equality.
689 * c-decl.c (grokdeclarator): Likewise.
690 * c-typeck.c (build_binary_op): Likewise.
691
8595f67b
MP
6922017-07-25 Marek Polacek <polacek@redhat.com>
693
694 * c-decl.c (grokfield): Remove local variable.
695
d49718d6
MP
6962017-07-25 Marek Polacek <polacek@redhat.com>
697
698 PR c/81364
699 * c-parser.c (c_parser_else_body): Don't warn about multistatement
700 macro expansion if the body is in { }.
701 (c_parser_while_statement): Likewise.
702 (c_parser_for_statement): Likewise.
703
ff22eb12
NS
7042017-07-18 Nathan Sidwell <nathan@acm.org>
705
706 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
707
eea77d1f
DM
7082017-07-14 David Malcolm <dmalcolm@redhat.com>
709
710 * c-decl.c (implicitly_declare): When suggesting a missing
711 #include, provide a fix-it hint.
712
b6f43128
DM
7132017-07-06 David Malcolm <dmalcolm@redhat.com>
714
715 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
716 and call that instead.
717 * c-tree.h (selftest::run_c_tests): New decl.
718
3e2becc4
MP
7192017-06-26 Marek Polacek <polacek@redhat.com>
720
721 PR c/80116
722 * c-parser.c (c_parser_if_body): Set the location of the
723 body of the conditional after parsing all the labels. Call
724 warn_for_multistatement_macros.
725 (c_parser_else_body): Likewise.
726 (c_parser_switch_statement): Likewise.
727 (c_parser_while_statement): Likewise.
728 (c_parser_for_statement): Likewise.
729 (c_parser_statement): Add a default argument. Save the location
730 after labels have been parsed.
731 (c_parser_c99_block_statement): Likewise.
732
343ae898
RB
7332017-06-19 Richard Biener <rguenther@suse.de>
734
735 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
736 negated _Literals to parse _Literal (int) -1.
737
45b2222a
ML
7382017-06-13 Martin Liska <mliska@suse.cz>
739
740 PR sanitize/78204
741 * c-convert.c (convert): Use sanitize_flags_p.
742 * c-decl.c (grokdeclarator): Likewise.
743 * c-typeck.c (convert_for_assignment): Likewise.
744 (c_finish_return): Likewise.
745 (build_binary_op): Likewise.
746
8ab7005b
JJ
7472017-06-08 Jakub Jelinek <jakub@redhat.com>
748
749 PR c/81006
750 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
751 to sizetype before size_binop.
752
363dc72c
JJ
7532017-06-07 Jakub Jelinek <jakub@redhat.com>
754
755 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
756 of TDI_generic.
757
dc949728
MP
7582017-06-06 Marek Polacek <polacek@redhat.com>
759
760 PR c/79983
761 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
762 ref.
763 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
764
40ffd95f
BE
7652017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
766
767 * c-parser.c (c_parser_binary_expression): Implement the
768 -Wsizeof_pointer_div warning.
769 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
770 from a parenthesized expression.
771 (c_parser_expr_list): Use c_last_sizeof_loc.
772 * c-tree.h (c_last_sizeof_loc): New external.
773 * c-typeck.c (c_last_sizeof_loc): New variable.
774 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
775
9fc5e7a4
MM
7762017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
777
778 PR testsuite/80580
779 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
780
f012c8ef
DM
7812017-05-30 David Malcolm <dmalcolm@redhat.com>
782
783 * c-objc-common.c (c_tree_printer): Gain bool and const char **
784 parameters.
785
3cd211af
MS
7862017-05-24 Martin Sebor <msebor@redhat.com>
787
788 PR c/80731
789 * c-fold.c (c_fully_fold_internal): Adjust.
790 * c-typeck.c (parser_build_unary_op): Adjust.
791
fd71a9a2
TS
7922017-05-23 Thomas Schwinge <thomas@codesourcery.com>
793
794 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
795 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
796 "VECTOR_LENGTH".
797
92fa0f9e
MP
7982017-05-23 Marek Polacek <polacek@redhat.com>
799
800 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
801 quotes.
802
d11c168a
JJ
8032017-05-22 Jakub Jelinek <jakub@redhat.com>
804
805 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
806 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
807 it returned invariant. Call tree_invariant_p unconditionally
808 afterwards to decide whether to return expr or op0.
809
58aca9d9
NS
8102017-05-22 Nathan Sidwell <nathan@acm.org>
811
812 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
813
7fd549d2
TS
8142017-05-19 Thomas Schwinge <thomas@codesourcery.com>
815
816 * c-parser.c (c_parser_omp_clause_default): Handle
817 "OMP_CLAUSE_DEFAULT_PRESENT".
818
6ecd2339
BE
8192017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
820
821 * config-lang.in (gtfiles): Add c-family/c-format.c.
822
8a57ecff
NS
8232017-05-18 Nathan Sidwell <nathan@acm.org>
824
825 * c-decl.c (pushdecl_top_level): Delete unused function.
826
6574d78e
MP
8272017-05-18 Marek Polacek <polacek@redhat.com>
828
829 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
830 (check_earlier_gotos): Likewise.
831 (define_label): Likewise.
832 (pending_xref_error): Likewise.
833 (smallest_type_quals_location): Likewise.
834 (grokdeclarator): Likewise.
835 (grokparms): Likewise.
836 (identifier_global_value): Likewise.
837 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
838 (find_init_member): Likewise.
839
e3455240
MP
8402017-05-18 Marek Polacek <polacek@redhat.com>
841
842 * c-decl.c (start_decl): Use false/true instead of 0/1.
843 (grokdeclarator): Likewise.
844 (finish_struct): Likewise.
845 (start_function): Change the return type to bool. Use false/true
846 instead of 0/1.
847 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
848 * c-tree.h (start_function): Update.
849 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
850 (set_designator): Change the return type to bool. Use false/true
851 instead of 0/1.
852
3fa8871b
MP
8532017-05-17 Marek Polacek <polacek@redhat.com>
854
855 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
856 * c-typeck.c: Likewise.
857
142473df
MP
8582017-05-17 Marek Polacek <polacek@redhat.com>
859
860 PR sanitizer/80659
861 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
862 DECL_IGNORED_P even for non-static compound literals.
863
1a817418
ML
8642017-05-17 Martin Liska <mliska@suse.cz>
865
866 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
867 use it instead of int type.
868
b2fa0a8b
MP
8692017-05-17 Marek Polacek <polacek@redhat.com>
870
871 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
872 call c_fully_fold.
873 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
874 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
875 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
876 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
877 save_expr.
878 (c_parser_conditional_expression): Likewise.
879 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
880 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
881 (process_init_element): Likewise.
882 (build_binary_op): Likewise.
883 (handle_omp_array_sections_1): Likewise.
884
1e47f02b
TS
8852017-05-12 Thomas Schwinge <thomas@codesourcery.com>
886
887 * c-parser.c (c_parser_omp_clause_num_gangs)
888 (c_parser_omp_clause_num_workers)
889 (c_parser_omp_clause_vector_length): Merge functions into...
890 (c_parser_oacc_single_int_clause): ... this new function. Adjust
891 all users.
892
c24e924f
NS
8932017-05-11 Nathan Sidwell <nathan@acm.org>
894
895 * gimple-parser.c: Don't #include tree-dump.h.
896
c587104e
MM
8972017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
898
899 PR testsuite/80580
900 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
901
67ac9a9d
MM
9022017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
903
904 PR testsuite/80580
905 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
906 incorrect __MEM syntax.
907
ac4eb40f
MM
9082017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
909
910 PR testsuite/80580
911 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
912 type of unary '*'.
913
641da50a
NS
9142017-05-09 Nathan Sidwell <nathan@acm.org>
915
916 * c-tree.h (pushdecl): Declare.
917
56d35585
DM
9182017-05-05 David Malcolm <dmalcolm@redhat.com>
919
920 * c-decl.c (warn_defaults_to): Replace report_diagnostic
921 with diagnostic_report_diagnostic.
922 * c-errors.c (pedwarn_c99): Likewise.
923 (pedwarn_c90): Likewise.
924
815d9cc6
XR
9252017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
926
927 PR c++/80038
928 * c-gimplify.c (c_gimplify_expr): Remove calls to
929 cilk_gimplifY_call_params_in_spawned_fn.
930
1c4ea66f
DM
9312017-04-25 David Malcolm <dmalcolm@redhat.com>
932
933 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
934 hint for removing extra semicolon.
935
666f7903
JJ
9362017-04-21 Jakub Jelinek <jakub@redhat.com>
937
938 PR c/80468
939 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
940 enabled, set specs->type to integer_type_node.
941
5764ee3c
JW
9422017-04-03 Jonathan Wakely <jwakely@redhat.com>
943
944 * c-array-notation.c: Fix typo in comment.
945
10fa8dfb
MP
9462017-03-29 Marek Polacek <polacek@redhat.com>
947
948 PR c/79730
949 * c-decl.c (finish_decl): Check VAR_P.
950
a9e4a1a5
JJ
9512017-03-27 Jakub Jelinek <jakub@redhat.com>
952
953 PR middle-end/80162
954 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
955 * c-typeck.c (c_mark_addressable): Likewise. Look through
956 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
957 to ARRAY_TYPE.
958 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
959
ee3ff394
MP
9602017-03-23 Marek Polacek <polacek@redhat.com>
961
962 * c-tree.h: Remove a C_RID_YYCODE reference.
963
4d1b8e70
JJ
9642017-03-21 Jakub Jelinek <jakub@redhat.com>
965
966 PR c/80097
967 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
968 optional COMPOUND_EXPR with ubsan instrumentation.
969
31dc71a8
MP
9702017-03-17 Marek Polacek <polacek@redhat.com>
971
972 * c-parser.c: Add C11 references.
973
d579c385
MP
9742017-03-15 Marek Polacek <polacek@redhat.com>
975
976 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
977
85059a38
MP
9782017-03-11 Marek Polacek <polacek@redhat.com>
979
980 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
981
2f6f187a
DM
9822017-03-10 David Malcolm <dmalcolm@redhat.com>
983
984 PR translation/79848
985 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
986 "%qs".
987 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
988
36618428
MP
9892017-03-09 Marek Polacek <polacek@redhat.com>
990
991 PR sanitizer/79757
992 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
993 parameter declarations with initializers.
994
01e5af5a
JJ
9952017-03-09 Jakub Jelinek <jakub@redhat.com>
996
997 PR c/79969
998 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
999 TYPE_STUB_DECL.
1000
a71dbc63
JJ
10012017-03-07 Jakub Jelinek <jakub@redhat.com>
1002
1003 PR c/79834
1004 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1005 for "may only be used in compound statements" diagnostics, change it
1006 such that the same translatable string is used for all pragmas. For
1007 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1008 diagnostics.
1009 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1010 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1011 "may only be used in compound statements" diagnostics, such that the
1012 same translatable string is used for all pragmas.
1013
1ff4bae6
MP
10142017-03-04 Marek Polacek <polacek@redhat.com>
1015
1016 PR c/79847
1017 * c-decl.c (implicit_decl_warning): Add missing space.
1018
7f5a7d78
MP
10192017-03-03 Marek Polacek <polacek@redhat.com>
1020
1021 PR c/79758
1022 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1023 current_function_prototype_arg_types is error_mark_node. Fix
1024 formatting. Use TREE_VALUE instead of TREE_TYPE.
1025
883c8f06
JJ
10262017-03-03 Jakub Jelinek <jakub@redhat.com>
1027
79c9b7a8
JJ
1028 PR c/79837
1029 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1030 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1031 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1032 diagnostics.
1033
883c8f06
JJ
1034 PR c/79836
1035 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1036 instead of %<_Generic>.
1037 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1038 (c_parser_omp_target_exit_data): Use %<release%> instead of
1039 %<release>.
1040
324ff1a0
JJ
10412017-02-28 Jakub Jelinek <jakub@redhat.com>
1042
1043 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1044 instead of just cond ? "..." : "...".
1045 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1046 for "enter"/"exit" keyword.
1047 (c_finish_oacc_routine): Don't use %s to supply portions of the
1048 message.
1049
4227c9ad
JJ
10502017-02-24 Jakub Jelinek <jakub@redhat.com>
1051
1052 PR c++/79588
1053 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1054 handle -Wrestrict here.
1055 * c-typeck.c (build_function_call_vec): Adjust
1056 check_function_arguments caller.
1057
5d972e66
RB
10582017-02-23 Richard Biener <rguenther@suse.de>
1059
1060 PR c/79684
1061 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1062 to initialize c_exprs to return.
1063 (c_parser_gimple_binary_expression): Likewise.
1064 (c_parser_gimple_unary_expression): Likewise.
1065 (c_parser_gimple_postfix_expression): Likewise.
1066
61ac5ebe
MP
10672017-02-22 Marek Polacek <polacek@redhat.com>
1068
1069 PR c/79662
1070 * c-typeck.c (convert_arguments): Handle error_mark_node.
1071
41d1b0b1
PK
10722017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1073
1074 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1075 value of c_parser_parse_ssa_name against error_mark_node and emit
1076 error if ssa name is anonymous and written as default definition.
1077
eab1f169
PK
10782017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1079
1080 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1081 FMA_EXPR.
1082
bcac0b4d
JJ
10832017-02-16 Jakub Jelinek <jakub@redhat.com>
1084
1085 PR c++/79512
1086 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1087 ignore #pragma omp target even when not followed by identifier.
1088
1be33173
PK
10892017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1090
1091 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1092 (c_parser_gimple_unary_expression): Likewise.
1093
aa326bfb
JJ
10942017-02-13 Jakub Jelinek <jakub@redhat.com>
1095
1096 * c-parser.c (c_parser_oacc_declare): Add missing space in
1097 diagnostics.
1098
8a398bc5
PK
10992017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1100
1101 PR c/79478
1102 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1103 set_c_expr_source_range when parsing ssa-name.
1104
3dcde5ef
PG
11052017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1106 Richard Biener <rguenther@suse.de>
1107
1108 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1109 building IL when arguments are error_mark_node.
1110 (c_parser_gimple_unary_expression): Likewise.
1111 (c_parser_gimple_if_stmt): Likewise.
1112 (c_parser_gimple_switch_stmt): Likewise.
1113 (c_parser_gimple_return_stmt): Likewise.
1114 (c_parser_parse_ssa_name): When name lookup fails do not build
1115 an SSA name. Use undeclared rather than not declared in error
1116 reporting.
1117
192b048b
MP
11182017-02-09 Marek Polacek <polacek@redhat.com>
1119
1120 PR c/79428
1121 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1122 instead of c_parser_skip_until_found.
1123
56f71478
JJ
11242017-02-09 Jakub Jelinek <jakub@redhat.com>
1125
1126 PR c/79431
1127 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1128 symtab_node::get on automatic variables.
1129
02889d23
CLT
11302016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1131 Chung-Lin Tang <cltang@codesourcery.com>
1132
1133 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1134 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1135 semantic checking.
1136 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1137
7af4b20d
RB
11382017-02-07 Richard Biener <rguenther@suse.de>
1139
1140 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1141 (c_parser_gimple_postfix_expression_after_primary):
1142 Do not use c_build_function_call_vec to avoid folding and promotion.
1143 Simplify.
1144
e5e391d6
MO
11452017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1146
1147 PR lto/79061
1148 * c-decl.c (pop_scope): Pass main_input_filename to
1149 build_translation_unit_decl.
1150
c2e84327
DM
11512017-01-24 David Malcolm <dmalcolm@redhat.com>
1152
1153 * c-parser.c: Include "read-rtl-function.h" and
1154 "run-rtl-passes.h".
1155 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1156 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1157 production. Update for renaming of field "gimple_pass" to
1158 "gimple_or_rtl_pass". If __RTL was seen, call
1159 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1160 to an auto_timevar, to cope with early exit.
1161 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1162 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1163 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1164 Handle RID_RTL.
1165 (c_parser_parse_rtl_body): New function.
1166 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1167 (struct c_declspecs): Rename field "gimple_pass" to
1168 "gimple_or_rtl_pass". Add field "rtl_p".
1169 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1170 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1171 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1172 (c_parser_gimple_or_rtl_pass_list): ...this.
1173
2ebd93e1
MP
11742017-01-20 Marek Polacek <polacek@redhat.com>
1175
1176 PR c/64279
1177 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1178
b1c95bb5
RB
11792017-01-13 Richard Biener <rguenther@suse.de>
1180
1181 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1182 nops.
1183
25329913
RB
11842017-01-13 Richard Biener <rguenther@suse.de>
1185
1186 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1187 _Literal ( type-name ) number.
1188
6bb4ea5c
RB
11892017-01-12 Richard Biener <rguenther@suse.de>
1190
1191 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1192 __MEM.
1193
6b5b4e9c
JJ
11942017-01-11 Jakub Jelinek <jakub@redhat.com>
1195
1196 PR c++/72813
1197 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1198 PCH file.
1199
e3252775
RB
12002017-01-11 Richard Biener <rguenther@suse.de>
1201
1202 PR bootstrap/79052
1203 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1204 returns on parse errors.
1205
a9342885
MP
12062017-01-04 Marek Polacek <polacek@redhat.com>
1207
1208 PR c++/64767
1209 * c-parser.c (c_parser_postfix_expression): Mark zero character
1210 constants by setting original_type in c_expr.
1211 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1212 with a zero character constant.
1213 (char_type_p): New function.
1214
5dd9a9d0
DM
12152017-01-04 David Malcolm <dmalcolm@redhat.com>
1216
1217 * c-parser.c (c_parser_declaration_or_fndef): Create a
1218 rich_location at init_loc and parse it to start_init.
1219 (last_init_list_comma): New global.
1220 (c_parser_braced_init): Update last_init_list_comma when parsing
1221 commas. Pass it to pop_init_level. Pass location of closing
1222 brace to pop_init_level.
1223 (c_parser_postfix_expression_after_paren_type): Create a
1224 rich_location at type_loc and parse it to start_init.
1225 (c_parser_omp_declare_reduction): Likewise for loc.
1226 * c-tree.h (start_init): Add rich_location * param.
1227 (pop_init_level): Add location_t param.
1228 * c-typeck.c (struct initializer_stack): Add field
1229 "missing_brace_richloc".
1230 (start_init): Add richloc param, use it to initialize
1231 the stack node's missing_brace_richloc.
1232 (last_init_list_comma): New decl.
1233 (finish_implicit_inits): Pass last_init_list_comma to
1234 pop_init_level.
1235 (push_init_level): When finding missing open braces, add fix-it
1236 hints to the richloc.
1237 (pop_init_level): Add "insert_before" param and pass it
1238 when calling pop_init_level. Add fixits about missing
1239 close braces to any richloc. Use the richloc for the
1240 -Wmissing-braces warning.
1241 (set_designator): Pass last_init_list_comma to pop_init_level.
1242 (process_init_element): Likewise.
1243
cbe34bb5
JJ
12442017-01-01 Jakub Jelinek <jakub@redhat.com>
1245
1246 Update copyright years.
1247
d17680f3
JJ
12482016-12-21 Jakub Jelinek <jakub@redhat.com>
1249
0dba7960
JJ
1250 PR bootstrap/78817
1251 * c-typeck.c (build_function_call_vec): If check_function_arguments
1252 returns true, set TREE_NO_WARNING on CALL_EXPR.
1253
d17680f3
JJ
1254 PR c/77767
1255 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1256 to *expr instead of overwriting it.
1257
aa90531e
RB
12582016-12-20 Richard Biener <rguenther@suse.de>
1259
1260 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1261 error recovery.
1262 (c_parser_gimple_statement): Only build assigns for non-error
1263 stmts.
1264 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1265
629b3d75
MJ
12662016-12-14 Martin Jambor <mjambor@suse.cz>
1267
1268 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1269 omp-low.h.
1270 (c_finish_oacc_routine): Adjusted call to
1271 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1272 to use their new names.
1273 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1274 use its new name.
1275 (c_parser_oacc_update): Likewise.
1276 (c_parser_omp_simd): Likewise.
1277 (c_parser_omp_target_update): Likewise.
1278 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1279 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1280 name.
1281 (c_finish_omp_cancellation_point): Likewise.
1282 * gimple-parser.c: Do not include omp-low.h
1283
c5af52eb
CP
12842016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1285 James Norris <jnorris@codesourcery.com>
1286
1287 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1288 EXIT_DATA,WAIT} are not used in compound statements.
1289 (c_parser_oacc_enter_exit_data): Update diagnostics.
1290
48330c93
BE
12912016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1292
1293 PR c++/71973
1294 * c-decl.c (diagnose_mismatched_decls): Use
1295 OPT_Wbuiltin_declaration_mismatch here too.
1296
899ca90e 12972016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1298 Alan Hayward <alan.hayward@arm.com>
1299 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1300
1301 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1302 (make_label, finish_struct): Likewise.
1303
1ee62b92 13042016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1305 Richard Biener <rguenther@suse.de>
22b15758 1306
8e745a17
JJ
1307 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1308 * config-lang.in (gtfiles): Add c/c-parser.h.
1309 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1310 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1311 * c-parser.c (enum c_id_kind, struct c_token,
1312 c_parser_next_token_is, c_parser_next_token_is_not,
1313 c_parser_next_token_is_keyword,
1314 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1315 Split out to ...
1316 * c-parser.h: ... new header.
1317 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1318 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1319 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1320 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1321 c_parser_error, c_parser_require, c_parser_skip_until_found,
1322 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1323 c_parser_type_name): Export.
1324 (c_parser_tokens_buf): New function.
1325 (c_parser_error): Likewise.
1326 (c_parser_set_error): Likewise.
1327 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1328 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1329 via c_parser_parse_gimple_body.
8e745a17
JJ
1330 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1331 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1332 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1333 c_parser_error, c_parser_require, c_parser_skip_until_found,
1334 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1335 c_parser_type_name): Declare.
1ee62b92
PG
1336 (struct c_parser): Declare forward.
1337 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1338 (c_parser_error): Likewise.
1339 (c_parser_set_error): Likewise.
1340 * gimple-parser.c: New file.
1341 * gimple-parser.h: Likewise.
1ee62b92 1342
22b15758
UB
13432016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1344
1345 PR c/35503
1346 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1347 warn_for_restrict.
1348
84ff4775
LCW
13492016-09-11 Le-Chun Wu <lcwu@google.com>
1350 Mark Wielaard <mjw@redhat.com>
1351
1352 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1353 to the given -Wshadow= variant.
1354
4d0cdd0c
TP
13552016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1356
1357 * c-typeck.c: Include memmodel.h.
1358
1202f33e
JJ
13592016-10-13 Jakub Jelinek <jakub@redhat.com>
1360
1361 PR target/77957
1362 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1363 instead of lhd_return_null_tree_v.
1364
8a14afd0
BS
13652016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1366
1367 PR c++/69733
1368 * c-decl.c (smallest_type_quals_location): New static function.
1369 (grokdeclarator): Try to find the correct location for an ignored
1370 qualifier.
1371
81fea426
MP
13722016-09-26 Marek Polacek <polacek@redhat.com>
1373
1374 PR c/7652
1375 * c-decl.c (pop_scope): Add gcc_fallthrough.
1376
13772016-09-26 Marek Polacek <polacek@redhat.com>
1378
1379 PR c/7652
1380 * c-parser.c (struct c_token): Add flags field.
1381 (c_lex_one_token): Pass it to c_lex_with_flags.
1382 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1383 into IFN_FALLTHROUGH.
1384 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1385 attribute fallthrough after a case label or default label.
1386 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1387
9a2300e9
MP
13882016-09-24 Marek Polacek <polacek@redhat.com>
1389
1390 PR c/77490
1391 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1392 have boolean value. Warn about ++/-- on booleans.
1393
7de76362
JJ
13942016-09-23 Jakub Jelinek <jakub@redhat.com>
1395
1396 * c-parser.c (incomplete_record_decls): Remove unnecessary
1397 = vNULL initialization of file scope vec.
1398
5b73d2ab
MP
13992016-09-16 Marek Polacek <polacek@redhat.com>
1400
1401 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1402
e51fbec3
MP
14032016-09-14 Marek Polacek <polacek@redhat.com>
1404
1405 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1406 (fix_array_notation_expr): Likewise.
1407 * c-decl.c (finish_decl): Likewise.
1408 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1409 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1410 (function_to_pointer_conversion): Use false instead of 0.
1411 (convert_lvalue_to_rvalue): Likewise.
1412 (parser_build_unary_op): Likewise.
1413 (build_atomic_assign): Likewise.
1414 (build_unary_op): Change nonconvert parameter type to bool, use
1415 true/false instead of 1/0.
1416 (build_binary_op): Use true instead of 1.
1417
254830ba
DM
14182016-09-13 David Malcolm <dmalcolm@redhat.com>
1419
1420 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1421 of add_fixit_insert to add_fixit_insert_before.
1422
4c13ba17
MP
14232016-09-13 Marek Polacek <polacek@redhat.com>
1424
1425 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1426 it.
1427
54dcdb88
BE
14282016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1429
1430 PR c++/77496
1431 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1432 COMPOUND_EXPR to warn_for_omitted_condop.
1433
e5106e27
DM
14342016-09-07 David Malcolm <dmalcolm@redhat.com>
1435
1436 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1437 c_get_substring_location for this new langhook.
1438
9dc5773f
JJ
14392016-09-02 Jakub Jelinek <jakub@redhat.com>
1440
1441 PR c/65467
1442 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1443 flag_openmp.
1444 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1445 instead of mark_exp_read on low_bound/length expression.
1446 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1447 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1448 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1449 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1450 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1451 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1452 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1453 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1454 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1455 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1456 instead of mark_expr_read.
1457 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1458 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1459 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1460 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1461 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1462 array section bases outside of depend clause, for depend clause
1463 use convert_lvalue_to_rvalue on the base.
1464 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1465 linear, aligned, map, to and from clauses.
1466 (c_omp_clause_copy_ctor): New function.
1467
295844f6
MP
14682016-09-01 Marek Polacek <polacek@redhat.com>
1469
1470 PR c/7652
1471 * c-typeck.c (composite_type): Add FALLTHRU comment.
1472
089af25c
DM
14732016-08-31 David Malcolm <dmalcolm@redhat.com>
1474
1475 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1476 to the insertion fixits for "struct", "union", and "enum".
1477
f9087798
DM
14782016-08-30 David Malcolm <dmalcolm@redhat.com>
1479
1480 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1481 rather than add_fixit_misspelled_id.
1482 (undeclared_variable): Likewise.
1483 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1484 now-redundant "here" params from add_fixit_insert method calls.
1485 (c_parser_parameter_declaration): Likewise.
1486 * c-typeck.c (build_component_ref): Remove now-redundant range
1487 param from add_fixit_replace method calls.
1488
ebef225f
MP
14892016-08-25 Marek Polacek <polacek@redhat.com>
1490
1491 * c-typeck.c (parser_build_binary_op): Pass LHS to
1492 warn_logical_not_parentheses.
1493
fe377a48
MP
14942016-08-25 Marek Polacek <polacek@redhat.com>
1495
1496 PR c/77323
1497 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1498 or _FloatN or _FloatNx is not supported.
1499 (finish_declspecs): Set type to integer_type_node when _FloatN or
1500 _FloatNx is not supported.
1501
c65699ef
JM
15022016-08-19 Joseph Myers <joseph@codesourcery.com>
1503
1504 PR c/32187
1505 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1506 (struct c_declspecs): Add field floatn_nx_idx.
1507 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1508 and _FloatNx type specifiers.
1509 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1510 (c_parser_declspecs, c_parser_attribute_any_word)
1511 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1512 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1513 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1514 narrower than double.
1515
2f1364c2
JJ
15162016-08-12 Jakub Jelinek <jakub@redhat.com>
1517 Martin Liska <mliska@suse.cz>
1518
1519 PR c/67410
1520 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1521 % to determine val element to change. Assert that
1522 wchar_bytes * charwidth fits into val array.
1523
191816a3
MP
15242016-08-12 Marek Polacek <polacek@redhat.com>
1525
1526 PR c/7652
1527 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1528 (c_parser_postfix_expression): Likewise.
1529 * c-typeck.c (build_unary_op): Adjust fall through comment.
1530 (c_mark_addressable): Likewise.
1531
b95a64bb
JJ
15322016-08-11 Jakub Jelinek <jakub@redhat.com>
1533
1534 PR c/72816
1535 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1536 array member through typedef, for orig_qual_indirect == 0 clear
1537 orig_qual_type.
1538
895aa8e1
DM
15392016-08-08 David Malcolm <dmalcolm@redhat.com>
1540
1541 PR c/64955
1542 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1543 this up to selftest::run_c_tests.
1544 (selftest::run_c_tests): New function.
1545
0b212d8c
TS
15462016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1547
ae9281fc
TS
1548 * c-parser.c (struct oacc_routine_data): Add error_seen and
1549 fndecl_seen members.
1550 (c_finish_oacc_routine): Use these.
1551 (c_parser_declaration_or_fndef): Adjust.
1552 (c_parser_oacc_routine): Likewise. Support more C language
1553 constructs, and improve diagnostics. Move pragma context
1554 checking...
1555 (c_parser_pragma): ... here.
1556
0b212d8c
TS
1557 * c-parser.c (struct oacc_routine_data): New.
1558 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1559 Simplify code.
1560 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1561 declare target" attribute.
1562
76e2c821
JB
15632016-08-01 Jan Beulich <jbeulich@suse.com>
1564
1565 * c-fold.c (c_fully_fold_internal): Also emit shift count
1566 warnings for vector types.
1567 * c-typeck.c (build_binary_op): Likewise.
1568
f618a472
MP
15692016-07-29 Marek Polacek <polacek@redhat.com>
1570
1571 PR c/71742
1572 * c-decl.c (finish_struct): Rephrase an error message.
1573
efd0786f
MP
1574 PR c/71853
1575 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1576 to error node for invalid code.
1577
e00dceaf
MP
1578 PR c/71573
1579 * c-decl.c (implicitly_declare): Return decl early not only for
1580 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1581
673a107a
JJ
15822016-07-29 Jakub Jelinek <jakub@redhat.com>
1583
1584 PR c/71969
1585 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1586 on GNU extern inline functions.
1587
a5b5c8b6
MP
15882016-07-29 Marek Polacek <polacek@redhat.com>
1589
1590 PR c/71583
1591 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1592 check expr.value.
1593
e3fe09c1
UB
15942016-07-22 Uros Bizjak <ubizjak@gmail.com>
1595
1596 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1597
7c8f7eaa
DM
15982016-07-20 David Malcolm <dmalcolm@redhat.com>
1599
1600 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1601 spellcheck-tree.h
1602 (best_macro_match): Likewise, converting from a typedef to a
1603 subclass.
1604 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1605 (lookup_name_fuzzy): Update for change of best_macro_match to a
1606 subclass with a ctor that calls cpp_forall_identifiers.
1607
de6a69ee
DM
16082016-07-20 David Malcolm <dmalcolm@redhat.com>
1609
1610 * c-decl.c (implicit_decl_warning): Update for conversion of
1611 return type of lookup_name_fuzzy to const char *.
1612 (undeclared_variable): Likewise.
1613 (lookup_name_fuzzy): Convert return type from tree to
1614 const char *.
1615 * c-parser.c (c_parser_declaration_or_fndef): Update for
1616 conversion of return type of lookup_name_fuzzy to const char *.
1617 (c_parser_parameter_declaration): Likewise.
1618
b1c9c068
CP
16192016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1620
1621 * c-parser.c (c_parser_oacc_declare): Don't scan for
1622 GOMP_MAP_POINTER.
1623 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1624 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1625 zero-length subarrays.
1626
ddbbcb19
JJ
16272016-07-15 Jakub Jelinek <jakub@redhat.com>
1628
1629 PR c/71858
1630 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1631 instead of FUZZY_LOOKUP_NAME.
1632 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1633 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1634
dd36b877
JJ
16352016-07-14 Jakub Jelinek <jakub@redhat.com>
1636
1637 PR c/71858
1638 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1639
8c681247
TS
16402016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1641
1642 * c-parser.c (c_parser_generic_selection): Make type of variable
1643 auto_vec.
1644 (c_parser_omp_declare_simd): Likewise.
1645
bf4fa671
TS
16462016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1647
1648 * c-decl.c (struct c_struct_parse_info): Change member types
1649 from vec to auto_vec.
1650 (start_struct): Adjust.
1651 (finish_struct): Likewise.
1652
557e8c49
JJ
16532016-07-02 Jakub Jelinek <jakub@redhat.com>
1654
1655 PR c/71719
1656 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1657
54d19c3b
TS
16582016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1659
1660 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1661 Move pragma context checking into...
1662 (c_parser_omp_cancellation_point): ... here, and improve
1663 diagnostic messages.
1664 * c-typeck.c (c_finish_omp_cancel)
1665 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1666
152ef731
JJ
16672016-06-29 Jakub Jelinek <jakub@redhat.com>
1668
1669 PR c/71685
1670 * c-typeck.c (c_build_qualified_type): Don't clear
1671 C_TYPE_INCOMPLETE_VARS for the main variant.
1672
16732016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1674
1675 PR c/71552
1676 * c-typeck.c (output_init_element): Diagnose incompatible types
1677 before non-constant initializers.
1678
e9ac1f86
JJ
16792016-06-28 Jakub Jelinek <jakub@redhat.com>
1680
1681 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1682
277d7ee0
AK
16832016-06-23 Andi Kleen <ak@linux.intel.com>
1684
1685 * Make-lang.in: Add support for autofdo.
1686
1a4f11c8
DM
16872016-06-22 David Malcolm <dmalcolm@redhat.com>
1688
1689 PR c/70339
1690 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1691 (implicit_decl_warning): When issuing warnings for implicit
1692 declarations, attempt to provide a suggestion via
1693 lookup_name_fuzzy.
1694 (undeclared_variable): Likewise when issuing errors.
1695 (lookup_name_in_scope): Likewise.
1696 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1697 (best_macro_match): New typedef.
1698 (find_closest_macro_cpp_cb): New function.
1699 (lookup_name_fuzzy): New function.
1700 * c-parser.c: Include gcc-rich-location.h.
1701 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1702 (c_keyword_starts_typename): ...this new function.
1703 (c_parser_declaration_or_fndef): When issuing errors about
1704 missing "struct" etc, add a fixit. For other kinds of errors,
1705 attempt to provide a suggestion via lookup_name_fuzzy.
1706 (c_parser_parms_declarator): When looking ahead to detect typos in
1707 type names, also reject CPP_KEYWORD.
1708 (c_parser_parameter_declaration): When issuing errors about
1709 unknown type names, attempt to provide a suggestion via
1710 lookup_name_fuzzy.
1711 * c-tree.h (c_keyword_starts_typename): New prototype.
1712
5a578671
JM
17132016-06-20 Joseph Myers <joseph@codesourcery.com>
1714
1715 PR c/71601
1716 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1717 c_common_type returns error_mark_node.
1718
3f8257db 17192016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1720
1721 PR c/69507
1722 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1723 __alignof__ (expression).
1724
6a3f203c
DM
17252016-06-14 David Malcolm <dmalcolm@redhat.com>
1726
1727 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1728
264757fb
DM
17292016-06-14 David Malcolm <dmalcolm@redhat.com>
1730
1731 * c-typeck.c (build_component_ref): Simplify fixit code by
1732 using gcc_rich_location::add_fixit_misspelled_id.
1733 (set_init_label): Likewise.
1734
f7e4f2e3
DM
17352016-06-13 David Malcolm <dmalcolm@redhat.com>
1736
1737 * c-parser.c (c_parser_initelt): Provide location of name for new
1738 location_t param of set_init_label.
1739 * c-tree.h (set_init_label): Add location_t param.
1740 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1741 param and use it when issuing error messages about unrecognized
1742 field names. Attempt to provide a fixit hint if appropriate,
1743 otherwise update the error message to provide the type name.
1744
4b1ffdb1
TS
17452016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1746
1747 PR c/71381
1748 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1749 Loosen checking.
1750
44a845ca
MS
17512016-06-08 Martin Sebor <msebor@redhat.com>
1752 Jakub Jelinek <jakub@redhat.com>
1753
1754 PR c++/70507
1755 PR c/68120
1756 * c-typeck.c (convert_arguments): Don't promote last argument
1757 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1758
92a5f2ba
MP
17592016-06-08 Marek Polacek <polacek@redhat.com>
1760
1761 PR c/71418
1762 * c-decl.c (grokdeclarator): Check TYPE_P.
1763
08203f73
MP
1764 PR c/71426
1765 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1766 code.
1767
6ffd47b7
DM
17682016-06-07 David Malcolm <dmalcolm@redhat.com>
1769
1770 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1771 and structure element reference, capture the location of the
1772 element name token and pass it to build_component_ref.
1773 (c_parser_postfix_expression_after_primary): Likewise for
1774 structure element dereference.
1775 (c_parser_omp_variable_list): Likewise for
1776 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1777 * c-tree.h (build_component_ref): Add location_t param.
1778 * c-typeck.c (build_component_ref): Add location_t param
1779 COMPONENT_LOC. Use it, if available, when issuing hints about
1780 mispelled member names to provide a fixit replacement hint.
1781
1f40cff3
MP
17822016-06-06 Marek Polacek <polacek@redhat.com>
1783
1784 PR c/71362
1785 * c-parser.c (c_parser_direct_declarator): Set location.
1786
5545a907
MP
17872016-06-06 Marek Polacek <polacek@redhat.com>
1788
1789 * c-typeck.c (comptypes_internal): Handle comparisons of
1790 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1791 TYPE_REF_CAN_ALIAS_ALL.
1792
b605f663
CLT
17932016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1794
1795 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1796 arguments as addressable when async clause exists.
1797
00631022
JJ
17982016-05-30 Jakub Jelinek <jakub@redhat.com>
1799
1800 PR c++/71349
1801 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1802 when combined with target construct.
1803
7211a097
JJ
18042016-05-26 Jakub Jelinek <jakub@redhat.com>
1805
1806 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1807 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1808
95efe6b6
MP
18092016-05-25 Marek Polacek <polacek@redhat.com>
1810
1811 PR c/71265
1812 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1813
a23faf7a
MP
1814 PR c/71266
1815 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1816
e46c7770
CP
18172016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1818
1819 * c-parser.c (c_parser_oacc_declare): Add support for
1820 GOMP_MAP_FIRSTPRIVATE_POINTER.
1821 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1822 argument with enum c_omp_region_type ort.
1823 (handle_omp_array_sections): Likewise. Update call to
1824 handle_omp_array_sections_1.
1825 (c_finish_omp_clauses): Add specific errors and warning messages for
1826 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1827 call to handle_omp_array_sections.
1828
a04e69c0
TS
18292016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1830
1831 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1832
f17a223d
RB
18332016-05-24 Richard Biener <rguenther@suse.de>
1834
1835 PR middle-end/70434
1836 PR c/69504
1837 * c-typeck.c (build_array_ref): Do not complain about indexing
1838 non-lvalue vectors. Adjust for function name change.
1839
79063edd
MS
18402016-05-20 Martin Sebor <msebor@redhat.com>
1841
1842 PR c/71115
1843 * c-typeck.c (error_init): Use
1844 expansion_point_location_if_in_system_header.
1845 (warning_init): Same.
1846
8a40fef3
DM
18472016-05-19 David Malcolm <dmalcolm@redhat.com>
1848
1849 PR c/71171
1850 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1851 in error-handling.
1852 (c_parser_postfix_expression): Likewise.
1853 * c-tree.h (c_expr::set_error): New method.
1854 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1855 that result's range is initialized.
1856
e9892350
JG
18572016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1858
1859 * c-typeck.c (parser_build_unary_op): Fix formatting.
1860
8fad45f5
MW
18612016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1862
1863 * c-decl.c (grokdeclarator): Remove errmsg and use of
1864 targetm.invalid_return_type.
1865 (grokparms): Remove errmsg and use of
1866 targetm.invalid_parameter_type.
1867
aa4b467b
JM
18682016-05-13 Joseph Myers <joseph@codesourcery.com>
1869
1870 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1871 function return type.
1872
4f2e1536
MP
18732016-05-12 Marek Polacek <polacek@redhat.com>
1874
1875 PR c/70756
1876 * c-decl.c (build_compound_literal): Pass LOC down to
1877 c_incomplete_type_error.
1878 * c-tree.h (require_complete_type): Adjust declaration.
1879 (c_incomplete_type_error): Likewise.
1880 * c-typeck.c (require_complete_type): Add location parameter, pass it
1881 down to c_incomplete_type_error.
1882 (c_incomplete_type_error): Add location parameter, pass it down to
1883 error_at.
1884 (build_component_ref): Pass location down to c_incomplete_type_error.
1885 (default_conversion): Pass location down to require_complete_type.
1886 (build_array_ref): Likewise.
1887 (build_function_call_vec): Likewise.
1888 (convert_arguments): Likewise.
1889 (build_unary_op): Likewise.
1890 (build_c_cast): Likewise.
1891 (build_modify_expr): Likewise.
1892 (convert_for_assignment): Likewise.
1893 (c_finish_omp_clauses): Likewise.
1894
d6e83a8d
MM
18952016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1896
1897 PR c/43651
1898 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1899 is enabled.
1900 * c-errors.c (pedwarn_c90): Return true if warned.
1901 * c-tree.h (pedwarn_c90): Change return type to bool.
1902 (enum c_declspec_word): Add new enumerator cdw_atomic.
1903
5c3a10fb
MP
19042016-05-11 Marek Polacek <polacek@redhat.com>
1905
1906 PR c++/71024
1907 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1908 diagnose_mismatched_attributes and call it.
1909
cf68d92c
MP
19102016-05-10 Marek Polacek <polacek@redhat.com>
1911
1912 PR c/70255
1913 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1914 on a declaration following the definition.
1915
351f85c5
JJ
19162016-05-05 Jakub Jelinek <jakub@redhat.com>
1917
1918 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1919 parse it through to c_parser_c99_block_statement.
1920 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1921 caller.
1922
deef7113
MP
19232016-05-04 Marek Polacek <polacek@redhat.com>
1924
1925 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1926 OPT_Wdangling_else.
1927
de55efd5
MP
19282016-05-04 Marek Polacek <polacek@redhat.com>
1929
1930 PR c/48778
1931 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1932 for macro expansions.
1933
79ce98bc
MP
19342016-05-03 Marek Polacek <polacek@redhat.com>
1935
1936 PR c/70859
1937 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1938 check_builtin_function_arguments.
1939
fb2647aa
RB
19402016-05-03 Richard Biener <rguenther@suse.de>
1941
1942 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1943 the checksum from the previous stage.
1944
77886428
CP
19452016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1946
1947 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1948 c_finish_omp_clauses.
1949 (c_parser_omp_all_clauses): Likewise.
1950 (c_parser_oacc_cache): Likewise.
1951 (c_parser_oacc_loop): Likewise.
1952 (omp_split_clauses): Likewise.
1953 (c_parser_omp_declare_target): Likewise.
1954 (c_parser_cilk_all_clauses): Likewise.
1955 (c_parser_cilk_for): Likewise.
1956 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1957 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1958
7176a4a0
MP
19592016-05-02 Marek Polacek <polacek@redhat.com>
1960
1961 PR c/70851
1962 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1963 incomplete type.
1964
e7ff0319
CP
19652016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1966
1967 PR middle-end/70626
1968 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1969 OACC_LOOP_CLAUSE_MASK.
1970 (c_parser_oacc_kernels_parallel): Update call to
1971 c_oacc_split_loop_clauses.
1972
9f405ce1
AM
19732016-04-28 Andrew MacLeod <amacleod@redhat.com>
1974
1975 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1976 argument to build_modify_expr in two cases.
1977
c1e1f433
BS
19782016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1979
1980 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1981 warn_for_memset instead of warning directly here.
1982
2448a956
MP
19832016-04-26 Marek Polacek <polacek@redhat.com>
1984
1985 PR c/67784
1986 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1987 out of ...
1988 (c_parser_for_statement): ... here.
1989 (c_parser_if_statement): Use it.
1990 (c_parser_switch_statement): Use it.
1991 (c_parser_while_statement): Use it.
1992
b02a5e26
MP
1993 PR c/70791
1994 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1995
477d4906
IV
19962016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1997
1998 PR c++/69363
1999 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2000 instead of c_finish_cilk_clauses.
2001 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2002 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2003 floating-point variables in the linear clause for Cilk Plus.
2004
fe37c7af
MM
20052016-04-18 Michael Matz <matz@suse.de>
2006
2007 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2008 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2009
949505a9
MP
20102016-04-15 Marek Polacek <polacek@redhat.com>
2011
2012 PR c/70671
2013 * c-typeck.c (build_unary_op): Pass location down to error and
2014 warning call.
2015
dda1bf61
JJ
20162016-04-15 Jakub Jelinek <jakub@redhat.com>
2017
2018 PR c/70436
2019 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2020 where needed.
2021 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2022 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2023 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2024 Adjust c_parser_pragma callers.
2025 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2026 caller.
2027 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2028 c_parser_statement.
2029 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2030 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2031 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2032 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2033 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2034 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2035 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2036 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2037 down where needed.
2038 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2039 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2040 calls.
2041
99cd9857
MP
20422016-04-13 Marek Polacek <polacek@redhat.com>
2043
2044 PR c/70436
2045 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2046 adjust callers.
2047 (c_parser_statement): Likewise.
2048 (c_parser_c99_block_statement): Likewise.
2049 (c_parser_while_statement): Likewise.
2050 (c_parser_for_statement): Likewise.
2051 (c_parser_if_body): Don't set IF_P here.
2052 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2053 about dangling else here.
2054 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2055 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2056 warn about dangling else here.
2057
f13355da
MP
20582016-04-04 Marek Polacek <polacek@redhat.com>
2059
2060 PR c/70307
2061 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2062
5fde6a45
MP
20632016-03-31 Marek Polacek <polacek@redhat.com>
2064
2065 PR c/70297
2066 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2067
4bbf545b
DM
20682016-03-18 David Malcolm <dmalcolm@redhat.com>
2069
2070 PR c/70281
2071 * c-parser.c (c_parser_postfix_expression): Set the source range
2072 for uses of "__builtin_types_compatible_p".
2073
fcc2b74f
JJ
20742016-03-17 Jakub Jelinek <jakub@redhat.com>
2075
2076 PR c/70280
2077 * c-typeck.c (composite_type): Don't count void_list_node
2078 into len, if the list is terminated by void_list_node, start
2079 with void_list_node instead of NULL for newargs. Stop
2080 at void_list_node.
2081
ab4c578f
MP
20822016-03-16 Marek Polacek <polacek@redhat.com>
2083
2084 PR c/70093
2085 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2086 nested functions returning VM types.
2087
96b3c82d
CP
20882016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2089
2090 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2091 when calling c_finish_omp_clauses.
2092
29b9828f
BS
20932016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2094
2095 PR c/69824
2096 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2097 for later.
2098
7ff6ca38
MP
20992016-03-04 Marek Polacek <polacek@redhat.com>
2100
2101 PR c/69798
2102 * c-parser.c (c_parser_postfix_expression): Call
2103 c_parser_cast_expression rather than c_parser_postfix_expression.
2104
686e2237
JJ
21052016-03-01 Jakub Jelinek <jakub@redhat.com>
2106
2107 PR c/69796
2108 PR c/69974
2109 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2110 of incomplete decls to error_mark_node.
2111
0b05329b
MP
21122016-02-24 Marek Polacek <polacek@redhat.com>
2113
2114 PR c/69819
2115 * c-decl.c (finish_decl): Don't update the copy of the type of a
2116 different decl type.
2117
067fbd8b
JJ
21182016-02-23 Jakub Jelinek <jakub@redhat.com>
2119
2120 PR objc/69844
2121 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2122 in id_kind reclassification.
2123
bf14eba2
JJ
21242016-02-16 Jakub Jelinek <jakub@redhat.com>
2125
2126 PR c/69835
2127 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2128
ba539195
JN
21292016-02-16 James Norris <jnorris@codesourcery.com>
2130
2131 PR c/64748
2132 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2133
16595a1f
BS
21342016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2135
f48dfe98
BS
2136 * c-decl.c (build_null_declspecs): Zero the entire struct.
2137
16595a1f
BS
2138 PR c/69522
2139 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2140 callers changed. If nested_p is true, use it to call
2141 finish_implicit_inits.
2142 * c-tree.h (finish_implicit_inits): Declare.
2143 * c-typeck.c (finish_implicit_inits): New function. Move code
2144 from ...
2145 (push_init_level): ... here.
2146 (set_designator, process_init_element): Call finish_implicit_inits.
2147
66756373
JJ
21482016-02-11 Jakub Jelinek <jakub@redhat.com>
2149
2150 PR c/69768
2151 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2152 arguments for -Waddress warning.
2153
1066e9b5
JJ
21542016-02-04 Jakub Jelinek <jakub@redhat.com>
2155
2156 PR c/69669
2157 * c-decl.c (finish_enum): When honoring mode attribute,
2158 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2159
3a5d2ba4
JJ
21602016-01-29 Jakub Jelinek <jakub@redhat.com>
2161
2162 PR debug/69518
2163 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2164 all type variants, not just TYPE_MAIN_VARIANT.
2165
cbdd8ae0
JJ
21662016-01-27 Jakub Jelinek <jakub@redhat.com>
2167
2168 PR debug/66869
2169 * c-decl.c (c_write_global_declarations_1): Warn with
2170 warn_unused_function if static prototype without definition
2171 is not C_DECL_USED.
2172
fa74a4bc
MP
21732016-01-27 Marek Polacek <polacek@redhat.com>
2174
2175 PR c/68062
2176 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2177 to unsigned, if needed. Add -Wsign-compare warning.
2178
13f92e8d
JJ
21792016-01-26 Jakub Jelinek <jakub@redhat.com>
2180
2181 PR tree-optimization/69483
2182 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2183
cd8e73dc 21842016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2185
2186 PR c/24293
2187 * c-tree.h (incomplete_record_decls): Declare.
2188 * c-parser.c (incomplete_record_decls): Define.
2189 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2190 report error if any decl has zero size.
2191 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2192 or enum type to incomplete_record_decls.
2193
e6d6ec9e
TV
21942016-01-14 Tom de Vries <tom@codesourcery.com>
2195
2196 PR tree-optimization/68773
2197 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2198 set force_output.
2199
00083992
MP
22002016-01-14 Marek Polacek <polacek@redhat.com>
2201
2202 PR c/69262
2203 * c-decl.c (grokdeclarator): Provide more information for invalid
2204 array declarations.
2205
7443cf13
DM
22062016-01-06 David Malcolm <dmalcolm@redhat.com>
2207
2208 * c-parser.c (c_parser_unary_expression): For dereferences, build
2209 a combined location before calling build_indirect_ref, so that
2210 error reports cover the full range, manually updating the c_expr
2211 src_range.
2212
6b131d5b
MP
22132016-01-06 Marek Polacek <polacek@redhat.com>
2214
2215 PR sanitizer/69099
2216 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2217 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2218 NULL.
2219
818ab71a
JJ
22202016-01-04 Jakub Jelinek <jakub@redhat.com>
2221
2222 Update copyright years.
2223
2fe0a208
MP
22242016-01-04 Marek Polacek <polacek@redhat.com>
2225
2226 PR c/68908
2227 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2228 optimization to use __atomic_fetch_* built-in if possible.
2229
c7b48c8a
TS
22302015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2231
2232 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2233 into...
2234 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2235 all users.
2236
fda5652f
MP
22372015-12-22 Marek Polacek <polacek@redhat.com>
2238
2239 PR c/69002
2240 * c-typeck.c (build_component_ref): Warn when acessing elements of
2241 atomic structures or unions.
2242
745e411d
DM
22432015-12-21 David Malcolm <dmalcolm@redhat.com>
2244
2245 * c-typeck.c: Include "gcc-rich-location.h".
2246 (build_binary_op): In the two places that call binary_op_error,
2247 create a gcc_rich_location and populate it with the location of
2248 the binary op and its two operands.
2249
94c40e19
DM
22502015-12-16 David Malcolm <dmalcolm@redhat.com>
2251
2252 * c-parser.c (c_parser_statement_after_labels): When calling
2253 c_finish_return, Use the return expression's location if it has
2254 one, falling back to the location of the first token within it.
2255 * c-typeck.c (c_finish_return): When issuing warnings about
2256 the incorrect presence/absence of a return value, issue a note
2257 showing the declaration of the function.
2258
de67c4c3
DM
22592015-12-16 David Malcolm <dmalcolm@redhat.com>
2260
2261 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2262 to 4.
2263 (c_parser_peek_nth_token): New function.
2264 (c_parser_peek_conflict_marker): New function.
2265 (c_parser_error): Detect conflict markers and report them as such.
2266
a10704e1
DM
22672015-12-16 David Malcolm <dmalcolm@redhat.com>
2268
2269 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2270 to preserve range information for the primary expression
2271 in the call to c_parser_postfix_expression_after_primary.
2272
8062bca6
DM
22732015-12-16 David Malcolm <dmalcolm@redhat.com>
2274
2275 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2276 expression location, falling back on the first token location,
2277 rather than always using the latter.
2278
d06f8b75
MP
22792015-12-16 Marek Polacek <polacek@redhat.com>
2280
2281 PR c/64637
2282 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2283 available.
2284
2994fb91
MP
22852015-12-15 Marek Polacek <polacek@redhat.com>
2286
2287 PR c/68907
2288 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2289 artificial decl.
2290
a1b93f8d
DM
22912015-12-08 David Malcolm <dmalcolm@redhat.com>
2292
2293 * c-parser.c (c_parser_alignof_expression): Capture location of
2294 closing parenthesis (if any), or of end of unary expression, and
2295 use it to build a src_range for the expression.
2296
46c6e1e2
DM
22972015-12-08 David Malcolm <dmalcolm@redhat.com>
2298
2299 PR c/68757
2300 * c-parser.c (c_parser_get_builtin_args): Add
2301 "out_close_paren_loc" param, and write back to it.
2302 (c_parser_postfix_expression): Capture the closing
2303 parenthesis location for RID_CHOOSE_EXPR,
2304 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2305 RID_BUILTIN_SHUFFLE and use it to set the source range
2306 for such expressions; within RID_BUILTIN_COMPLEX set
2307 the underlying location.
2308
66189108
MP
23092015-12-07 Marek Polacek <polacek@redhat.com>
2310
2311 PR c/68668
2312 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2313 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2314
f187980b
EB
23152015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2316
2317 * c-tree.h (c_build_va_arg): Adjust prototype.
2318 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2319 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2320 parameter, adjust throughout and issue an error if EXPR is a component
2321 with reverse storage order.
2322
4250754e
JM
23232015-12-02 Jason Merrill <jason@redhat.com>
2324
2325 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2326 (c_fully_fold_internal, decl_constant_value_for_optimization):
2327 Move from c-common.c.
2328 * c-tree.h: Declare decl_constant_value_for_optimization.
2329 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2330
e9e32ee6
JM
23312015-12-02 Joseph Myers <joseph@codesourcery.com>
2332
2333 PR c/68162
2334 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2335 following link from declarator to next declarator. Track original
2336 qualified type and pass it to c_build_qualified_type.
2337 * c-typeck.c (c_build_qualified_type): Add arguments
2338 orig_qual_type and orig_qual_indirect.
2339
ff7a55bf
TS
23402015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2341
2342 * c-parser.c (c_parser_omp_clause_name)
2343 (c_parser_oacc_all_clauses): Alphabetical sorting.
2344
657e4e47
JJ
23452015-12-02 Jakub Jelinek <jakub@redhat.com>
2346
2347 PR c/68533
2348 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2349 for diagnostics.
2350
37d5ad46
JB
23512015-12-01 Julian Brown <julian@codesourcery.com>
2352 Cesar Philippidis <cesar@codesourcery.com>
2353 James Norris <James_Norris@mentor.com>
2354
2355 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2356 (c_parser_oacc_clause_use_device): New function.
2357 (c_parser_oacc_all_clauses): Add use_device support.
2358 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2359 (c_parser_oacc_host_data): New function.
2360 (c_parser_omp_construct): Add host_data support.
2361 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2362 * c-typeck.c (c_finish_oacc_host_data): New function.
2363 (c_finish_omp_clauses): Add use_device support.
2364
a4850ce9
JH
23652015-11-29 Jan Hubicka <hubicka@ucw.cz>
2366
2367 PR c/67106
2368 * c-decl.c: Set TYPE_PACKED in variants.
2369
b58d3df2
ML
23702015-11-27 Martin Liska <mliska@suse.cz>
2371
2372 PR c++/68312
2373 * c-array-notation.c (fix_builtin_array_notation_fn):
2374 Use release_vec_vec instead of vec::release.
2375 (build_array_notation_expr): Likewise.
2376 (fix_conditional_array_notations_1): Likewise.
2377 (fix_array_notation_expr): Likewise.
2378 (fix_array_notation_call_expr): Likewise.
2379
aec17bfe
JJ
23802015-11-27 Jakub Jelinek <jakub@redhat.com>
2381
2382 PR c/63326
2383 * c-parser.c (c_parser_compound_statement_nostart): If
2384 last_label is true, use pragma_stmt instead of pragma_compound
2385 as second c_parser_pragma argument.
2386 (c_parser_omp_ordered, c_parser_omp_target_update,
2387 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2388 false as second argument to c_parser_skip_to_pragma_eol after
2389 diagnosing standalone directives used in pragma_stmt context.
2390
688c4de0
IV
23912015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2392
2393 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2394 with "if (ENABLE_OFFLOADING)".
2395
cbd03aee
DM
23962015-11-23 David Malcolm <dmalcolm@redhat.com>
2397
2398 PR objc/68438
2399 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2400 for various Objective-C constructs: Class.name syntax,
2401 @selector(), @protocol(), @encode(), and [] message syntax.
2402
a87a86e1
DM
24032015-11-20 David Malcolm <dmalcolm@redhat.com>
2404
2405 PR 62314
2406 * c-typeck.c (should_suggest_deref_p): New function.
2407 (build_component_ref): Special-case POINTER_TYPE when
2408 generating a "not a structure of union" error message, and
2409 suggest a "->" rather than a ".", providing a fix-it hint.
2410
8ece8dfb
DM
24112015-11-19 David Malcolm <dmalcolm@redhat.com>
2412
2413 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2414 candidate into a new function, find_closest_identifier.
2415
433068cc
MP
24162015-11-19 Marek Polacek <polacek@redhat.com>
2417
2418 PR c/68412
2419 * c-typeck.c (parser_build_binary_op): Properly handle
2420 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2421
bef08b71
DM
24222015-11-17 David Malcolm <dmalcolm@redhat.com>
2423
2424 * c-parser.c (set_c_expr_source_range): Bulletproof both
2425 overloaded implementations against NULL expr->value.
2426 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2427 values.
2428 (c_parser_unary_expression): Likewise when handling addresses of
2429 labels.
2430 (c_parser_postfix_expression): Likewise for statement expressions,
2431 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2432 __builtin_va_arg, and for __builtin_offset_of.
2433 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2434 src_range using the range of the braced initializer.
2435 (c_parser_transaction_expression): Set src_range for "ret" to a
2436 sane pair of values.
2437
fff77217
KY
24382015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2439
2440 * c-parser.c (c_finish_omp_declare_simd): Look for
2441 "simd" attribute as well. Update error message.
2442
1d899da2
TS
24432015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2444
2445 * c-parser.c (c_parser_omp_declare_target): Adjust.
2446
e4606348
JJ
24472015-11-14 Jakub Jelinek <jakub@redhat.com>
2448
2449 * c-typeck.c (c_finish_omp_clauses): Don't mark
2450 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2451
3e636daf
MP
24522015-11-14 Marek Polacek <polacek@redhat.com>
2453
2454 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2455 * c-typeck.c: Likewise.
2456
ebedc9a3
DM
24572015-11-13 David Malcolm <dmalcolm@redhat.com>
2458
2459 * c-decl.c (warn_defaults_to): Pass line_table to
2460 rich_location ctor.
2461 * c-errors.c (pedwarn_c99): Likewise.
2462 (pedwarn_c90): Likewise.
2463 * c-parser.c (set_c_expr_source_range): New functions.
2464 (c_token::get_range): New method.
2465 (c_token::get_finish): New method.
2466 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2467 based on the range from the start of the LHS to the end of the
2468 RHS.
2469 (c_parser_conditional_expression): Likewise, based on the range
2470 from the start of the cond.value to the end of exp2.value.
2471 (c_parser_binary_expression): Call set_c_expr_source_range on
2472 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2473 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2474 based on the cast_loc through to the end of the expr.
2475 (c_parser_unary_expression): Likewise, based on the
2476 op_loc through to the end of op.
2477 (c_parser_sizeof_expression) Likewise, based on the start of the
2478 sizeof token through to either the closing paren or the end of
2479 expr.
2480 (c_parser_postfix_expression): Likewise, using the token range,
2481 or from the open paren through to the close paren for
2482 parenthesized expressions.
2483 (c_parser_postfix_expression_after_primary): Likewise, for
2484 various kinds of expression.
2485 * c-tree.h (struct c_expr): Add field "src_range".
2486 (c_expr::get_start): New method.
2487 (c_expr::get_finish): New method.
2488 (set_c_expr_source_range): New decls.
2489 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2490 on ret for prefix unary ops.
2491 (parser_build_binary_op): Likewise, running from the start of
2492 arg1.value through to the end of arg2.value.
2493
ec8b536f
MP
24942015-11-13 Marek Polacek <polacek@redhat.com>
2495
2496 PR c/68320
2497 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2498
277fe616
DM
24992015-11-13 David Malcolm <dmalcolm@redhat.com>
2500
2501 * c-typeck.c: Include spellcheck.h.
2502 (lookup_field_fuzzy_find_candidates): New function.
2503 (lookup_field_fuzzy): New function.
2504 (build_component_ref): If the field was not found, try using
2505 lookup_field_fuzzy and potentially offer a suggestion.
2506
6e232ba4
JN
25072015-11-12 James Norris <jnorris@codesourcery.com>
2508 Joseph Myers <joseph@codesourcery.com>
2509
2510 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2511 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2512 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2513 and PRAGMA_OMP_CLAUSE_LINK.
2514 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2515 and PRAGMA_OACC_CLAUSE_LINK.
2516 (OACC_DECLARE_CLAUSE_MASK): New definition.
2517 (c_parser_oacc_declare): New function.
2518
9be4f715
MP
25192015-11-12 Marek Polacek <polacek@redhat.com>
2520
2521 PR c/67784
2522 * c-parser.c (c_parser_for_statement): Reclassify the token in
2523 a correct scope.
2524
e78bede6
MP
25252015-11-11 Marek Polacek <polacek@redhat.com>
2526
2527 PR c/68107
2528 PR c++/68266
2529 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2530 checking the size of an array.
2531
69f293c9
AM
25322015-11-11 Andrew MacLeod <amacleod@redhat.com>
2533
2534 * c-array-notation.c: Remove unused header files.
2535 * c-aux-info.c: Likewise.
2536 * c-convert.c: Likewise.
2537 * c-decl.c: Likewise.
2538 * c-errors.c: Likewise.
2539 * c-lang.c: Likewise.
2540 * c-objc-common.c: Likewise.
2541 * c-parser.c: Likewise.
2542 * c-typeck.c: Likewise.
2543 * gccspec.c: Likewise.
2544
3a40d81d
NS
25452015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2546 Cesar Philippidis <cesar@codesourcery.com>
2547 James Norris <jnorris@codesourcery.com>
2548 Julian Brown <julian@codesourcery.com>
2549 Nathan Sidwell <nathan@codesourcery.com>
2550
2551 c/
2552 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2553 routine arg.
2554 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2555 (c_parser_pragma): Parse 'acc routine'.
2556 (OACC_ROUTINE_CLAUSE_MARK): Define.
2557 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2558
fc402eec
AA
25592015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2560
2561 PR debug/67192
2562 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2563 location of the backward-goto to the start of the loop body.
2564
f6b0b3db
AA
25652015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2566
2567 PR debug/67192
2568 * c-parser.c (c_parser_while_statement): Finish the loop before
2569 parsing ahead for misleading indentation.
2570 (c_parser_for_statement): Likewise.
2571
ee45a32d
EB
25722015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2573
2574 * c-decl.c (finish_struct): If the structure has reverse storage
2575 order, rewrite the type of array fields with scalar component. Call
2576 maybe_apply_pragma_scalar_storage_order on entry.
2577 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2578 errors on bit-fields and reverse SSO here and not...
2579 (c_mark_addressable): ...here.
2580 (output_init_element): Adjust call to initializer_constant_valid_p.
2581 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2582
8a645150
DM
25832015-11-06 David Malcolm <dmalcolm@redhat.com>
2584
2585 * c-decl.c (warn_defaults_to): Update for change in signature
2586 of diagnostic_set_info.
2587 * c-errors.c (pedwarn_c99): Likewise.
2588 (pedwarn_c90): Likewise.
2589 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2590 for textinfo::set_location.
2591
7a5e4956
CP
25922015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2593 Thomas Schwinge <thomas@codesourcery.com>
2594 James Norris <jnorris@codesourcery.com>
2595
2596 * c-parser.c (c_parser_omp_clause_name): Add support for
2597 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2598 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2599 default(none) in OpenACC.
2600 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2601 arguments.
2602 (c_parser_oacc_clause_tile): New function.
2603 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2604 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2605 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2606 TILE}.
2607 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2608 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2609 FIRSTPRIVATE}.
2610 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2611 (c_parser_oacc_update): Update the error message for missing clauses.
2612 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2613 and OMP_CLAUSE_INDEPENDENT.
2614
bfcfbfa0
MP
26152015-11-05 Marek Polacek <polacek@redhat.com>
2616
2617 PR c/68090
2618 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2619 deal with pre-evaluation on invalid types.
2620
e01d41e5
JJ
26212015-11-05 Jakub Jelinek <jakub@redhat.com>
2622 Ilya Verbin <ilya.verbin@intel.com>
2623
2624 * c-parser.c: Include context.h and gimple-expr.h.
2625 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2626 monotonic together with nonmonotonic.
2627 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2628 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2629 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2630 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2631 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2632 expressions on combined target teams before the target.
2633 (c_parser_omp_declare_target): If decl has "omp declare target" or
2634 "omp declare target link" attribute, and cgraph or varpool node already
2635 exists, then set corresponding flags. Call c_finish_omp_clauses
2636 in the parenthesized extended-list syntax case.
2637 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2638 declare target.
2639 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2640 on OMP_CLAUSE_REDUCTION array sections.
2641 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2642 into the constant offset, or for variable low-bound using
2643 POINTER_PLUS_EXPR. For structure element based array sections use
2644 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2645 (c_finish_omp_clauses): Drop generic_field_head, structure
2646 elements are now always mapped even as array section bases,
2647 diagnose same var in data sharing and mapping clauses. Diagnose if
2648 linear step on declare simd is neither a constant nor a uniform
2649 parameter. Look through POINTER_PLUS_EXPR for array section
2650 reductions. Diagnose the same var or function appearing multiple
2651 times on the same directive. Fix up wording for the to clause if t
2652 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2653 modifier on kinds other than dynamic or guided or nonmonotonic
2654 modifier together with ordered clause.
2655
4bf9e5a8
TS
26562015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2657 Chung-Lin Tang <cltang@codesourcery.com>
2658
2659 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2660
2adfab87
AM
26612015-10-29 Andrew MacLeod <amacleod@redhat.com>
2662
2663 * c-array-notation.c: Reorder #include's and remove duplicates.
2664 * c-aux-info.c: Likewise.
2665 * c-convert.c: Likewise.
2666 * c-decl.c: Likewise.
2667 * c-errors.c: Likewise.
2668 * c-lang.c: Likewise.
2669 * c-objc-common.c: Likewise.
2670 * c-parser.c: Likewise.
2671 * c-typeck.c: Likewise.
2672
e922069e
JW
26732015-10-26 Jim Wilson <jim.wilson@linaro.org>
2674
2675 PR debug/66068
2676 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2677 after calling build_qualified_type.
2678
765dd391
CP
26792015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2680 Thomas Schwinge <thomas@codesourcery.com>
2681 James Norris <jnorris@codesourcery.com>
2682 Joseph Myers <joseph@codesourcery.com>
2683 Julian Brown <julian@codesourcery.com>
2684 Bernd Schmidt <bschmidt@redhat.com>
2685
2686 * c-parser.c (c_parser_oacc_shape_clause): New.
2687 (c_parser_oacc_simple_clause): New.
2688 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2689 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2690
88bae6f4
TS
26912015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2692 James Norris <jnorris@codesourcery.com>
2693 Cesar Philippidis <cesar@codesourcery.com>
2694
2695 PR c/64765
2696 PR c/64880
2697 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2698 parameters, and handle these. Adjust all users.
2699 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2700 into...
2701 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2702 all users.
2703 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2704 declare functions.
2705 (c_finish_omp_construct): Declare function.
2706 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2707 Merge functions into...
2708 (c_finish_omp_construct): ... this new function.
2709
a8fc2579
RB
27102015-10-22 Richard Biener <rguenther@suse.de>
2711
2712 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2713 before folding a MINUS_EXPR.
2714
e9122ef6
MP
27152015-10-21 Marek Polacek <polacek@redhat.com>
2716
2717 PR c/68024
2718 * c-decl.c (start_function): Warn about vararg functions without
2719 a prototype.
2720
9f47c7e5
IE
27212015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2722
2723 * c-typeck.c (build_conditional_expr): Use boolean vector
2724 type for vector comparison.
2725 (build_vec_cmp): New.
2726 (build_binary_op): Use build_vec_cmp for comparison.
2727
fa60eeb9
MP
27282015-10-20 Marek Polacek <polacek@redhat.com>
2729
2730 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2731
2c7020eb
MP
27322015-10-20 Marek Polacek <polacek@redhat.com>
2733
2734 PR c/67964
2735 * c-parser.c (c_parser_attributes): Break out of the loop if the
2736 token after an attribute isn't a comma.
2737
d9a6bd32
JJ
27382015-10-13 Jakub Jelinek <jakub@redhat.com>
2739 Aldy Hernandez <aldyh@redhat.com>
2740
2741 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2742 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2743 (c_parser_omp_variable_list): Handle structure elements for
2744 map, to and from clauses. Handle array sections in reduction
2745 clause. Formatting fixes.
2746 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2747 if clause modifiers.
2748 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2749 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2750 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2751 c_parser_omp_clause_is_device_ptr): New functions.
2752 (c_parser_omp_clause_ordered): Parse optional parameter.
2753 (c_parser_omp_clause_reduction): Handle array reductions.
2754 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2755 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2756 functions.
2757 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2758 (c_parser_omp_clause_depend_sink): New function.
2759 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2760 (c_parser_omp_clause_map): Parse release/delete map kinds and
2761 optional always modifier.
2762 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2763 and c_finish_omp_clauses callers.
2764 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2765 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2766 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2767 (OMP_CRITICAL_CLAUSE_MASK): Define.
2768 (c_parser_omp_critical): Parse critical clauses.
2769 (c_parser_omp_for_loop): Handle doacross loops, adjust
2770 c_finish_omp_for and c_finish_omp_clauses callers.
2771 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2772 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2773 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2774 (c_parser_omp_for): Disallow ordered clause when combined with
2775 distribute. Disallow linear clause when combined with distribute
2776 and not combined with simd.
2777 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2778 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2779 parse clauses and if depend clause is found, don't parse a body.
2780 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2781 Allow target parallel without for after it.
2782 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2783 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2784 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2785 invalid kinds.
2786 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2787 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2788 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2789 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2790 functions.
2791 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2792 defaultmap and is_device_ptr clauses.
2793 (c_parser_omp_target): Parse target parallel and target simd. Set
2794 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2795 and target exit data. Diagnose invalid map kinds.
2796 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2797 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2798 construct.
2799 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2800 &omp_priv.
2801 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2802 (c_parser_omp_taskloop): New function.
2803 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2804 handle PRAGMA_OMP_TASKLOOP.
2805 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2806 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2807 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2808 Add IS_OMP argument, handle structure element bases, diagnose
2809 bitfields, pass IS_OMP recursively, diagnose known zero length
2810 array sections in depend clauses, handle array sections in reduction
2811 clause, diagnose negative length even for pointers.
2812 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2813 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2814 array sections in reduction clause, set
2815 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2816 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2817 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2818 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2819
21ba0cea
MP
28202015-10-06 Marek Polacek <polacek@redhat.com>
2821
2822 * c-parser.c (c_parser_statement_after_labels): Use
2823 protected_set_expr_location.
2824 (c_parser_omp_clause_num_gangs): Likewise.
2825 (c_parser_omp_clause_num_threads): Likewise.
2826 (c_parser_omp_clause_num_workers): Likewise.
2827 (c_parser_omp_clause_vector_length): Likewise.
2828 (c_parser_omp_clause_num_teams): Likewise.
2829 (c_parser_omp_clause_thread_limit): Likewise.
2830 * c-typeck.c (build_c_cast): Likewise.
2831 (c_cast_expr): Likewise.
2832
624d31fe
RS
28332015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2834
2835 * c-typeck.c (c_tree_equal): Use real_equal instead of
2836 REAL_VALUES_EQUAL.
2837
b8fd7909
JM
28382015-10-04 Jason Merrill <jason@redhat.com>
2839
2840 * c-parser.c (c_lex_one_token): Handle @synchronized.
2841 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2842 can change whether the function is transaction_safe.
2843
1c7485af
MP
28442015-10-02 Marek Polacek <polacek@redhat.com>
2845
2846 PR c/67730
2847 * c-typeck.c (convert_for_assignment): Use the expansion point
2848 location throughout.
2849
3e3b8d63
MP
28502015-10-02 Marek Polacek <polacek@redhat.com>
2851
2852 PR c/64249
2853 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2854 and pass it down to c_parser_if_statement.
2855 (c_parser_else_body): Add CHAIN parameter and pass it down to
2856 c_parser_statement_after_labels.
2857 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2858 duplicated if-else-if conditions.
2859
aabef2de
MP
28602015-10-01 Marek Polacek <polacek@redhat.com>
2861
2862 * c-typeck.c (convert_for_assignment): Improve commentary.
2863
de8ddd5f
MP
28642015-09-30 Marek Polacek <polacek@redhat.com>
2865
2866 PR c/67730
2867 * c-typeck.c (c_finish_return): Use the expansion point location for
2868 certain "return with value" warnings.
2869
c4914de6
MLI
28702015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2871
2872 * c-parser.c (pragma_lex): Add loc argument.
2873
0e36f5c7
MP
28742015-09-15 Marek Polacek <polacek@redhat.com>
2875
2876 PR c/67580
2877 * c-decl.c (tag_exists_p): New function.
2878 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2879 struct/union/enum keywords are missing.
2880 * c-tree.h (tag_exists_p): Declare.
2881
2f3bb934
MP
28822015-09-15 Marek Polacek <polacek@redhat.com>
2883
2884 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2885 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2886 Return NULL_TREE instead of 0.
2887 (lookup_name): Return NULL_TREE instead of 0.
2888 (lookup_name_in_scope): Likewise.
2889 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2890 (parser_xref_tag): Use false instead of 0.
2891 (start_struct): Use true instead of 1.
2892 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2893
aa256c4a
MP
28942015-09-14 Marek Polacek <polacek@redhat.com>
2895
2896 * c-typeck.c (set_nonincremental_init_from_string): Use
2897 HOST_WIDE_INT_M1U when shifting a negative value.
2898
dbb68221
MW
28992015-09-09 Mark Wielaard <mjw@redhat.com>
2900
2901 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2902 parm against NULL.
2903
a8a098ac
JJ
29042015-09-10 Jakub Jelinek <jakub@redhat.com>
2905
2906 PR c/67502
2907 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2908 into OMP_FOR_PRE_BODY rather than before the loop.
2909
f4b189d5
JJ
29102015-09-09 Jakub Jelinek <jakub@redhat.com>
2911
0bb99c11
JJ
2912 PR c/67501
2913 * c-parser.c (c_parser_oacc_all_clauses,
2914 c_parser_omp_all_clauses): Remove invalid clause from
2915 list of clauses even if parser->error is set.
2916
fce5e5e3
JJ
2917 PR c/67500
2918 * c-parser.c (c_parser_omp_clause_aligned,
2919 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2920 test for errors.
2921 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2922 error_mark_node.
2923
f4b189d5
JJ
2924 PR c/67495
2925 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2926 instead of c_parser_unary_expression. If the result is !lvalue_p,
2927 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2928
b2aaf235
MP
29292015-09-04 Marek Polacek <polacek@redhat.com>
2930
2931 PR sanitizer/67279
2932 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2933
1807ffc1
MS
29342015-09-03 Martin Sebor <msebor@redhat.com>
2935
2936 PR c/66516
8b652e65
JJ
2937 * c-typeck.c (convert_arguments, parser_build_unary_op,
2938 build_conditional_expr, c_cast_expr, convert_for_assignment,
2939 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2940 reject_gcc_builtin.
2941 (c_decl_implicit): Define.
2942
d04ff417
MP
29432015-09-02 Marek Polacek <polacek@redhat.com>
2944
2945 PR c/67432
2946 * c-parser.c (c_parser_enum_specifier): Give a better error for
2947 an empty enum.
2948
a79683d5
TS
29492015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2950
2951 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2952
191a6b94
MP
29532015-08-12 Marek Polacek <polacek@redhat.com>
2954
2955 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2956 LOC to it.
2957
420a9d9b
MP
29582015-08-03 Marek Polacek <polacek@redhat.com>
2959
2960 PR c/67088
2961 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2962 Use it.
2963 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2964
992118a1
PP
29652015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2966
2967 * c-parser.c (c_parser_if_body): Take token_indent_info
2968 argument. Call warn_for_misleading_indentation even when the
2969 body is a semicolon. Extract token_indent_infos corresponding
2970 to the guard, body and next tokens. Adjust call to
2971 warn_for_misleading_indentation accordingly.
2972 (c_parser_else_body): Likewise.
2973 (c_parser_if_statement): Likewise.
2974 (c_parser_while_statement): Likewise.
2975 (c_parser_for_statement): Likewise.
2976
46308474
LFSM
29772015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2978 Manuel López-Ibáñez <manu@gcc.gnu.org>
2979
2980 * c-decl.c (get_parm_info): Remove static var. Update warning
2981 message.
2982
05b28fd6
MP
29832015-07-27 Marek Polacek <polacek@redhat.com>
2984
2985 PR c++/66555
2986 PR c/54979
2987 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2988
451b5e48
MP
29892015-07-20 Marek Polacek <polacek@redhat.com>
2990
2991 PR c++/55095
2992 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2993 (build_binary_op): Warn about left shift overflows.
2994
1916bcb5
AM
29952015-07-09 Andrew MacLeod <amacleod@redhat.com>
2996
2997 * c-array-notation.c: Adjust includes for flags.h changes.
2998 * c-objc-common.c: Likewise.
2999
c7131fb2
AM
30002015-07-07 Andrew MacLeod <amacleod@redhat.com>
3001
3002 * c-array-notation.c: Adjust includes.
3003 * c-aux-info.c: Likewise.
3004 * c-convert.c: Likewise.
3005 * c-decl.c: Likewise.
3006 * c-errors.c: Likewise.
3007 * c-lang.c: Likewise.
3008 * c-objc-common.c: Likewise.
3009 * c-parser.c: Likewise.
3010 * c-typeck.c: Likewise.
3011
da2e71c9
MLI
30122015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3013
3014 PR fortran/66605
3015 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3016
b155cfd9
MP
30172015-06-29 Marek Polacek <polacek@redhat.com>
3018
3019 PR c/66322
3020 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3021 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3022 about -Wswitch-bool here.
3023 (do_case): Update c_add_case_label call.
3024 (c_finish_case): Update c_do_switch_warnings call.
3025
31521951
MP
30262015-06-27 Marek Polacek <polacek@redhat.com>
3027
3028 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3029
22d03525
MP
30302015-06-26 Marek Polacek <polacek@redhat.com>
3031
3032 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3033 INDIRECT_REF_P.
3034 * c-typeck.c (array_to_pointer_conversion): Likewise.
3035 (build_unary_op): Likewise.
3036 (c_finish_return): Likewise.
3037
f0889939
AM
30382015-06-25 Andrew MacLeod <amacleod@redhat.com>
3039
3040 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3041 * c-parser.c: Likewise.
3042
8d67ee55
RS
30432015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3044
3045 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3046 instead of pointer_hash.
3047 (detect_field_duplicates): Likewise.
3048
0ae9bd27
MP
30492015-06-25 Marek Polacek <polacek@redhat.com>
3050
3051 * c-array-notation.c: Use VAR_P throughout.
3052 * c-decl.c: Likewise.
3053 * c-objc-common.c: Likewise.
3054 * c-parser.c: Likewise.
3055 * c-typeck.c: Likewise.
3056
62f9079a
MP
30572015-06-25 Marek Polacek <polacek@redhat.com>
3058
3059 * c-decl.c: Use is_global_var throughout.
3060 * c-parser.c: Likewise.
3061 * c-typeck.c: Likewise.
3062
abb226c9
AM
30632015-06-17 Andrew MacLeod <amacleod@redhat.com>
3064
3065 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3066 * c-aux-info.c: Likewise.
3067 * c-convert.c: Likewise.
3068 * c-decl.c: Likewise.
3069 * c-errors.c: Likewise.
3070 * c-lang.c: Likewise.
3071 * c-objc-common.c: Likewise.
3072 * c-parser.c: Likewise.
3073 * c-typeck.c: Likewise.
3074
8cbababc
JH
30752015-06-11 Jan Hubicka <hubicka@ucw.cz>
3076
3077 PR middle-end/66325
3078 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3079 variants.
3080
a0349665
PMR
30812015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3082
3083 * c-decl.c (pop_scope): Register the main translation unit
3084 through the new debug hook.
3085
13fdf2e2
AM
30862015-06-08 Andrew MacLeod <amacleod@redhat.com>
3087
3088 * c-array-notation.c : Adjust include files.
3089 * c-aux-info.c : Likewise.
3090 * c-convert.c : Likewise.
3091 * c-decl.c : Likewise.
3092 * c-errors.c : Likewise.
3093 * c-lang.c : Likewise.
3094 * c-lang.h : Likewise.
3095 * c-objc-common.c : Likewise.
3096 * c-parser.c : Likewise.
3097 * c-typeck.c : Likewise.
3098
d7438551
AH
30992015-06-05 Aldy Hernandez <aldyh@redhat.com>
3100
3101 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3102 immediately clobber it.
3103 (c_write_global_declarations_1): Remove call to
3104 check_global_declaration_1.
3105 (c_write_global_declarations_2): Remove.
3106 (c_write_final_cleanups): Rename from c_write_global_declarations.
3107 Remove call to finalize_compilation_unit.
3108 Remove calls to debugging hooks.
3109 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3110 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3111 * c-tree.h: Remove c_write_global_declarations.
3112
ecb9f223
AM
31132015-06-04 Andrew MacLeod <amacleod@redhat.com>
3114
3115 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3116 * c-aux-info.c: Likewise.
3117 * c-convert.c: Likewise.
3118 * c-decl.c: Likewise.
3119 * c-errors.c: Likewise.
3120 * c-lang.c: Likewise.
3121 * c-objc-common.c: Likewise.
3122 * c-parser.c: Likewise.
3123 * c-typeck.c: Likewise.
3124
9482b620
MP
31252015-06-04 Marek Polacek <polacek@redhat.com>
3126
3127 PR c/66341
3128 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3129 it is a lvalue.
3130
bc51ace3
PK
31312015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3132
3133 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3134 Warn for empty struct.
3135 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3136
ea5b45b6
AT
31372015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3138
3139 * c-decl.c (start_function): Call plugin before parsing.
3140 (finish_function): Call plugin after parsing.
3141
c2d47482
PK
31422015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3143
3144 PR c/49551
3145 * c-decl.c (merge_decls): Merge DECL_COMMON.
3146
a95492ab
JW
31472015-05-22 Jim Wilson <jim.wilson@linaro.org>
3148
3149 * Make-lang.in (check_gcc_pallelize): Define.
3150
fd5c817a
MP
31512015-05-22 Marek Polacek <polacek@redhat.com>
3152
3153 PR c/47043
3154 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3155 attributes.
3156
c7b70a3c
MP
31572015-05-21 Marek Polacek <polacek@redhat.com>
3158
3159 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3160 DECL_BUILT_IN.
3161
21b634ae
MP
31622015-05-20 Marek Polacek <polacek@redhat.com>
3163
3164 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3165 * c-typeck.c: Likewise.
3166
296a8c2f
MP
31672015-05-19 Marek Polacek <polacek@redhat.com>
3168
3169 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3170
41b37d5e
JJ
31712015-05-19 Jakub Jelinek <jakub@redhat.com>
3172
3173 PR middle-end/66199
3174 * c-parser.c (c_parser_omp_for_loop): Don't add
3175 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3176 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3177 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3178 constructs.
3179
fab27f52
MM
31802015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3181
3182 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3183 swaps.
fab27f52 3184
40de31cf
MLI
31852015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3186
3187 PR fortran/44054
3188 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3189 accessor function.
3190
3aa3c9fc
MP
31912015-05-14 Marek Polacek <polacek@redhat.com>
3192
3193 PR c/66066
3194 PR c/66127
3195 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3196 rather than with 0.
3197
c3388e62
DM
31982015-05-12 David Malcolm <dmalcolm@redhat.com>
3199
3200 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3201 to add a call to warn_for_misleading_indentation.
3202 (c_parser_else_body): Likewise, adding param "else_loc".
3203 (c_parser_if_statement): Check for misleading indentation.
3204 (c_parser_while_statement): Likewise.
3205 (c_parser_for_statement): Likewise.
3206
755e528f
MP
32072015-05-08 Marek Polacek <polacek@redhat.com>
3208
3209 PR c/64918
3210 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3211 (output_init_element): Likewise.
3212
0173bd2a
MP
32132015-05-07 Marek Polacek <polacek@redhat.com>
3214
3215 PR c/65179
3216 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3217 value.
3218
9babc352
MP
32192015-04-30 Marek Polacek <polacek@redhat.com>
3220
3221 * c-typeck.c (set_init_label): Call error_at instead of error and
3222 pass LOC to it.
3223
ac9f18db
MP
3224 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3225 the type of a decl.
3226
ec3fba51
MP
3227 * c-typeck.c (c_build_va_arg): Clarify the error message.
3228
b811915d
TS
32292015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3230
3231 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3232 OMP_STANDALONE_CLAUSES.
3233
f3075008
MP
32342015-04-28 Marek Polacek <polacek@redhat.com>
3235
3236 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3237
4e81b788
MP
32382015-04-28 Marek Polacek <polacek@redhat.com>
3239
3240 PR c/65901
3241 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3242
6c1db78e
MP
32432015-04-25 Marek Polacek <polacek@redhat.com>
3244
3245 PR c/52085
3246 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3247 attribute.
3248
5c4abbb8
MP
32492015-04-23 Marek Polacek <polacek@redhat.com>
3250
3251 PR c/65345
3252 * c-decl.c (set_labels_context_r): New function.
3253 (store_parm_decls): Call it via walk_tree_without_duplicates.
3254 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3255 instead of create_tmp_var. Build TARGET_EXPR instead of
3256 COMPOUND_EXPR.
3257 (build_atomic_assign): Use create_tmp_var_raw instead of
3258 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3259
06aca1d5
IV
32602015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3261
3262 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3263 (c_parser_omp_target_update): Add missed %> to error_at ().
3264
8fba1830
BRF
32652015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3266
3267 PR target/55143
3268 * c-decl.c (c_default_pointer_mode): Remove definition.
3269 * c-tree.h (c_default_pointer_mode): Remove declaration.
3270
62021f64
TB
32712015-03-27 Tobias Burnus <burnus@net-b.de>
3272
3273 PR c/65586
3274 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3275 error out.
3276 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3277 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3278 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3279
9b65e171
JJ
32802015-03-19 Jakub Jelinek <jakub@redhat.com>
3281
3282 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3283 attribute for DECL_EXTERNAL VAR_DECLs.
3284
17958621
JJ
32852015-03-11 Jakub Jelinek <jakub@redhat.com>
3286
3287 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3288 argument.
3289
7ccb1a11
JJ
32902015-03-10 Jakub Jelinek <jakub@redhat.com>
3291
3292 PR c/65120
3293 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3294 before preparing arguments to warn_logical_not_parentheses.
3295
01177669
JJ
32962015-03-09 Jakub Jelinek <jakub@redhat.com>
3297
3298 PR c/65120
3299 * c-typeck.c (parser_build_binary_op): Don't warn for
3300 !!x == y or !b == y where b is _Bool.
3301
802ac282
MP
33022015-03-09 Marek Polacek <polacek@redhat.com>
3303
3304 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3305 * c-decl.c (grokdeclarator): Likewise.
3306 * c-typeck.c (build_binary_op): Likewise.
3307
e5165b60
MP
33082015-02-27 Marek Polacek <polacek@redhat.com>
3309
3310 PR c/65228
3311 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3312
065d214c
MP
33132015-02-14 Marek Polacek <polacek@redhat.com>
3314
3315 PR c/64768
3316 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3317 declared through a typedef name.
3318
e5d9235b
MP
33192015-02-13 Marek Polacek <polacek@redhat.com>
3320
3321 PR c/65050
3322 * c-decl.c (grokdeclarator): Print also the type when giving
3323 the error message about array's incomplete element type.
3324
fa01ffcc
JJ
33252015-02-11 Jakub Jelinek <jakub@redhat.com>
3326
3327 PR c/64824
3328 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3329 check in the POP macro.
3330
c3e38a03
MP
33312015-02-09 Marek Polacek <polacek@redhat.com>
3332
3333 PR c/64856
3334 * c-typeck.c (process_init_element): Don't always wrap
3335 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3336 initializing a range of elements.
3337
4886ec8e
JJ
33382015-02-04 Jakub Jelinek <jakub@redhat.com>
3339
3340 PR c/64824
3341 PR c/64868
3342 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3343
c3e38a03 33442015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3345
3346 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3347 processing enum declaration.
3348
7b33f0c8
MP
33492015-01-29 Marek Polacek <polacek@redhat.com>
3350
3351 PR c/64709
3352 * c-typeck.c (pop_init_level): If constructor_elements has
3353 exactly one element with integer_zerop value, set constructor_zeroinit
3354 to 1. Remove braces around warning_init call.
3355
dea63e49
JJ
33562015-01-27 Jakub Jelinek <jakub@redhat.com>
3357
3358 PR c/64766
3359 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3360 of FUNCTION_DECLs with error_mark_node.
3361
d38f7dce
JJ
33622015-01-26 Jakub Jelinek <jakub@redhat.com>
3363
3364 PR c/64778
3365 * c-typeck.c (convert_arguments): Return -1 if there are
3366 error_args, even if we've diagnosed too many arguments.
3367
cbf5d0e7
RB
33682015-01-21 Richard Biener <rguenther@suse.de>
3369
3370 PR middle-end/64313
3371 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3372 for builtins the user declared correctly.
3373
41dbbb37
TS
33742015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3375 Bernd Schmidt <bernds@codesourcery.com>
3376 Cesar Philippidis <cesar@codesourcery.com>
3377 James Norris <jnorris@codesourcery.com>
3378 Jakub Jelinek <jakub@redhat.com>
3379 Ilmir Usmanov <i.usmanov@samsung.com>
3380
3381 * c-parser.c: Include "gomp-constants.h".
3382 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3383 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3384 Use OMP_CLAUSE_SET_MAP_KIND.
3385 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3386 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3387 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3388 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3389 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3390 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3391 "copyout", "create", "delete", "deviceptr", "gang", "host",
3392 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3393 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3394 "present_or_create", "pcreate", "seq", "self", "vector",
3395 "vector_length", "wait", "worker".
3396 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3397 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3398 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3399 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3400 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3401 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3402 (c_parser_oacc_data_clause_deviceptr)
3403 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3404 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3405 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3406 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3407 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3408 (c_parser_oacc_parallel, c_parser_oacc_update)
3409 (c_parser_oacc_wait): New functions.
3410 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3411 (c_finish_oacc_data): New prototypes.
3412 * c-typeck.c: Include "gomp-constants.h".
3413 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3414 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3415 OMP_CLAUSE_SET_MAP_KIND.
3416 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3417 (c_finish_oacc_data): New functions.
3418 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3419 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3420 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3421 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3422 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3423 GOMP_MAP_FORCE_DEVICEPTR.
3424
adfac8df
JJ
34252015-01-09 Michael Collison <michael.collison@linaro.org>
3426
3427 * c-array-notation.c: Include hash-set.h, machmode.h,
3428 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3429 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3430 * c-aux-info.c: Ditto.
3431 * c-convert.c: Ditto.
3432 * c-decl.c: Ditto.
3433 * c-errors.c: Ditto.
3434 * c-lang.c: Dittoxs.
3435 * c-objc-common.c: Ditto.
3436 * c-parser.c: Ditto.
3437 * c-typeck.c: Include hash-set.h, machmode.h,
3438 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3439 fold-const.h, wide-int.h, inchash.h, real.h and
3440 fixed-value.h due to flattening of tree.h.
3441
2cc901dc
MP
34422015-01-07 Marek Polacek <polacek@redhat.com>
3443
3444 PR c/64417
3445 * c-typeck.c (process_init_element): Disallow initialization of
3446 a flexible array member with a string constant if the structure
3447 is in an array.
3448
5624e564
JJ
34492015-01-05 Jakub Jelinek <jakub@redhat.com>
3450
e5341100
JJ
3451 PR sanitizer/64344
3452 * c-typeck.c (convert_for_assignment, c_finish_return): For
3453 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3454 types also set in_late_binary_op around convert call.
3455 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3456 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3457 result on expr as last argument to ubsan_instrument_float_cast,
3458 if in_late_binary_op, don't use c_save_expr but save_expr.
3459
5624e564
JJ
3460 Update copyright years.
3461
5bd012f8
MP
34622015-01-05 Marek Polacek <polacek@redhat.com>
3463
3464 PR c/64423
3465 * c-typeck.c (build_array_ref): Pass loc down to
3466 warn_array_subscript_with_type_char.
3467
3f8257db 34682014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3469
3470 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3471 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3472 element type.
8e745a17 3473 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3474 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3475 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3476 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3477 to PEDWARN_FOR_QUALIFIERS.
768952be 3478
8f94a8c4
JJ
34792014-12-17 Jakub Jelinek <jakub@redhat.com>
3480
3481 PR sanitizer/64289
3482 * c-convert.c: Include ubsan.h.
3483 (convert): For real -> integral casts and
3484 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3485 instead instrument the float cast directly.
3486
b731b390
JJ
34872014-11-29 Jakub Jelinek <jakub@redhat.com>
3488
3489 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3490 c_finish_stmt_expr): Remove NULL last argument from
3491 create_tmp_var_raw and create_tmp_var calls.
3492 * c-array-notation.c (fix_builtin_array_notation_fn,
3493 build_array_notation_expr, fix_conditional_array_notations_1,
3494 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3495
541e35a6
MP
34962014-11-28 Marek Polacek <polacek@redhat.com>
3497
3498 PR c/63862
3499 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3500 convert the right operand to integer type.
3501
b286be94
MP
35022014-11-25 Marek Polacek <polacek@redhat.com>
3503
3504 PR c/63877
3505 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3506 for inline functions.
3507
aa7da51a
JJ
35082014-11-21 Jakub Jelinek <jakub@redhat.com>
3509
3510 PR target/63764
3511 * c-typeck.c (build_array_ref): Adjust
3512 convert_vector_to_pointer_for_subscript caller. If it returns true,
3513 call non_lvalue_loc on the result.
3514
d876207f
RB
35152014-11-11 Richard Biener <rguenther@suse.de>
3516
3517 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3518 to true.
3519
e5e44252
AK
35202014-11-10 Andi Kleen <ak@linux.intel.com>
3521
3522 PR c/60804
3523 * c-parser.c (c_parser_statement_after_labels): Call
3524 check_no_cilk.
3525 (c_parser_if_statement): Dito.
3526 (c_parser_switch_statement): Dito.
3527 (c_parser_while_statement): Dito.
3528 (c_parser_do_statement): Dito.
3529 (c_parser_for_statement): Dito.
3530 * c-typeck.c (c_finish_loop): Dito.
3531
13c21655
PC
35322014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3533
3534 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3535 OPT_Wshift_count_overflow in the warnings.
3536
2d51fcef
MP
35372014-10-30 Marek Polacek <polacek@redhat.com>
3538
3539 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3540 print the stripped version as well, if they're not the same.
3541
ef4bddc2
RS
35422014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3543
3544 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3545 machine_mode.
3546
c582198b
AM
35472014-10-28 Andrew MacLeod <amacleod@redhat.com>
3548
3549 * c-decl.c: Adjust include files.
3550 * c-parser.c: Ditto.
3551
ddc8de03
PM
35522014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3553 Tom Tromey <tromey@redhat.com>
3554
3555 * c-tree.h (enum c_oracle_request): New.
3556 (c_binding_oracle_function): New typedef.
3557 (c_binding_oracle, c_pushtag, c_bind): Declare.
3558 * c-decl.c (c_binding_oracle): New global.
3559 (I_SYMBOL_CHECKED): New macro.
3560 (i_symbol_binding): New function.
3561 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3562 (I_TAG_CHECKED): New macro.
3563 (i_tag_binding): New function.
3564 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3565 (I_LABEL_CHECKED): New macro.
3566 (i_label_binding): New function.
3567 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3568 (c_print_identifier): Save and restore c_binding_oracle.
3569 (c_pushtag, c_bind): New functions.
3570
60393bbc
AM
35712014-10-27 Andrew MacLeod <amacleod@redhat.com>
3572
3573 * c-typeck.c: Adjust include files.
3574
d723bb7c
MLI
35752014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3576
3577 PR c++/53061
3578 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3579 initialization here...
3580 (c_initialize_diagnostics): ... but here. Set defaults after
3581 building pretty-printer.
3582
1bc5a451
MP
35832014-10-23 Marek Polacek <polacek@redhat.com>
3584
3585 PR c/63626
3586 * c-decl.c (pop_scope): Don't print warning in external_scope.
3587
4435bb92
MP
35882014-10-19 Marek Polacek <polacek@redhat.com>
3589
3590 PR c/63567
3591 * c-typeck.c (output_init_element): Allow initializing objects with
3592 static storage duration with compound literals even in C99 and add
3593 pedwarn for it.
3594
7278465e
MP
35952014-10-17 Marek Polacek <polacek@redhat.com>
3596
3597 PR c/63567
3598 * c-typeck.c (digest_init): Allow initializing objects with static
3599 storage duration with compound literals even in C99 and add pedwarn
3600 for it.
3601
d9b7be2e
MP
36022014-10-17 Marek Polacek <polacek@redhat.com>
3603
3604 PR c/63543
3605 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3606 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3607 error multiple times. Print the type.
3608
f406ae1f
MP
36092014-10-17 Marek Polacek <polacek@redhat.com>
3610
3611 PR c/63549
3612 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3613 type.
3614
92574c7c
MP
36152014-10-17 Marek Polacek <polacek@redhat.com>
3616
3617 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3618 (start_function): Use OPT_Wimplicit_int instead of 0.
3619 (store_parm_decls_oldstyle): Likewise.
3620
1bc4a978
MT
36212014-10-17 Alan Modra <amodra@gmail.com>
3622
3623 PR middle-end/61848
3624 * c-decl.c (merge_decls): Don't merge section name or tls model
3625 to newdecl symtab node, instead merge to olddecl. Override
3626 existing olddecl section name. Set tls_model for all thread-local
3627 vars, not just OMP thread-private ones. Remove incorrect comment.
3628
83685514
AM
36292014-10-16 Andrew MacLeod <amacleod@redhat.com>
3630
3631 * c-decl.c: Adjust include files.
3632
78a7c317
DD
36332014-10-14 DJ Delorie <dj@redhat.com>
3634
3635 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3636 (c_token_starts_typename): Check all __intN, not just __int128.
3637 (c_token_starts_declspecs): Likewise.
3638 (c_parser_declspecs): Likewise.
3639 (c_parser_attribute_any_word): Likewise.
3640 (c_parser_objc_selector): Likewise.
3641 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3642 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3643 is specified.
3644 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3645 __int128.
3646 (finish_declspecs): Likewise.
3647
74d98c1e
AB
36482014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3649
8e745a17 3650 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3651 the duplicate code.
8e745a17 3652 (c_parser_statement): Call the new function.
74d98c1e 3653
84937de2
MP
36542014-10-09 Marek Polacek <polacek@redhat.com>
3655
3656 PR c/63480
3657 * c-typeck.c (pop_init_level): Don't warn about initializing
3658 with { }.
3659
0382aaa0
MP
36602014-10-07 Marek Polacek <polacek@redhat.com>
3661
3662 PR c/59717
3663 * c-decl.c (header_for_builtin_fn): New function.
3664 (implicitly_declare): Suggest which header to include.
3665
7a0ca710
MP
36662014-10-07 Marek Polacek <polacek@redhat.com>
3667
3668 * c-convert.c (convert): Use error_operand_p.
3669 * c-typeck.c (require_complete_type): Likewise.
3670 (really_atomic_lvalue): Likewise.
3671 (digest_init): Likewise.
3672 (handle_omp_array_sections_1): Likewise.
3673
6bc8a126
MP
36742014-10-03 Marek Polacek <polacek@redhat.com>
3675
3676 PR c/63453
3677 * c-decl.c (pop_scope): Don't warn about "inline function declared
3678 but never defined" for functions marked with gnu_inline attribute.
3679
d90c0a59
JJ
36802014-09-25 Jakub Jelinek <jakub@redhat.com>
3681
3682 PR c++/63249
3683 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3684 on low_bound and length.
3685
083e891e
MP
36862014-09-24 Marek Polacek <polacek@redhat.com>
3687
3688 PR c/61405
3689 PR c/53874
3690 * c-parser.c: Don't define CPP_KEYWORD.
3691 (c_parser_switch_statement): Pass original type to c_finish_case.
3692 * c-tree.h (c_finish_case): Update declaration.
3693 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3694 conditionally to c_do_switch_warnings.
3695
8d95fe25
MP
36962014-09-03 Marek Polacek <polacek@redhat.com>
3697
3698 PR c/62024
3699 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3700 conversions.
3701
9a771876
JJ
37022014-09-02 Jakub Jelinek <jakub@redhat.com>
3703 Balaji V. Iyer <balaji.v.iyer@intel.com>
3704 Igor Zamyatin <igor.zamyatin@intel.com>
3705
3706 * c-parser.c (c_parser_cilk_for): New function.
3707 (c_parser_cilk_grainsize): Likewise.
3708 (c_get_temp_regvar): Likewise.
3709 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3710 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3711 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3712 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3713 case.
3714
b7679d96
CG
37152014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3716
3717 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3718 with using HOST_WIDE_INT without truncation to 'int'
3719
59ea0364
MP
37202014-08-22 Marek Polacek <polacek@redhat.com>
3721
3722 PR c++/62199
3723 * c-typeck.c (parser_build_binary_op): Adjust call to
3724 warn_logical_not_parentheses.
3725
671a475e
IZ
37262014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3727
3728 PR other/62008
3729 * c-parser.c (c_parser_array_notation): Check for correct
3730 type of an array added.
3731
04159acf
MP
37322014-08-19 Marek Polacek <polacek@redhat.com>
3733
3734 PR c++/62153
3735 * c-typeck.c (build_binary_op): If either operand of a comparison
3736 is a boolean expression, call maybe_warn_bool_compare.
3737
c77935ee
PP
37382014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3739
3740 PR c/45584
3741 * c-typeck.c (build_c_cast): Do a conversion even when the
3742 TYPE_MAIN_VARIANTs are the same.
3743
35aff4fb
MP
37442014-08-19 Marek Polacek <polacek@redhat.com>
3745
3746 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3747 pedwarn_c99 instead of pedwarn.
3748 (grokfield): Likewise.
3749 (warn_defaults_to): New function.
3750 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3751 Unconditionally call pedwarn_c99 instead of pedwarn.
3752 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3753 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3754 check flag_isoc11 before.
3755 * c-errors.c (pedwarn_c99): Change the return type to bool.
3756 Handle -Wc99-c11-compat.
3757 * c-parser.c (disable_extension_diagnostics): Handle
3758 warn_c99_c11_compat.
3759 (restore_extension_diagnostics): Likewise.
3760 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3761 instead of pedwarn, don't check flag_isoc11 before.
3762 (c_parser_declspecs): Likewise.
3763 (c_parser_alignas_specifier): Likewise.
3764 (c_parser_alignof_expression): Likewise.
3765 (c_parser_generic_selection): Likewise.
3766 * c-tree.h (pedwarn_c99): Update declaration.
3767 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3768 of pedwarn_c99.
3769
177cce46
MP
37702014-08-19 Marek Polacek <polacek@redhat.com>
3771
3772 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3773 to pedwarn_c90.
3774 * c-errors.c: Include "opts.h".
3775 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3776 * c-parser.c (disable_extension_diagnostics): Handle negative value
3777 of warn_c90_c99_compat, too.
3778 (restore_extension_diagnostics): Likewise.
3779 (c_parser_compound_statement_nostart): Pass
3780 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3781
6dc99c33
MP
37822014-08-12 Marek Polacek <polacek@redhat.com>
3783
3784 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3785 Add pedwarn.
3786 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3787 Likewise.
3788 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3789
3f8257db 37902014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3791
3792 PR c/51849
3793 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3794 Call pedwarn_c90 instead of pedwarn.
3795 (check_bitfield_type_and_width): Likewise.
3796 (declspecs_add_qual): Likewise.
3797 (declspecs_add_type): Likewise.
3798 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3799 Adjust to only call pedwarn_c90.
3800 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3801 pedwarn_c90 instead of pedwarn.
3802 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3803 * c-parser.c (disable_extension_diagnostics): Handle
3804 warn_c90_c99_compat.
3805 (restore_extension_diagnostics): Likewise.
3806 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3807 pedwarn_c90 instead of pedwarn.
3808 (c_parser_initelt): Likewise.
3809 (c_parser_postfix_expression): Likewise.
3810 (c_parser_postfix_expression_after_paren_type): Likewise.
3811 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3812 * c-tree.h: Fix formatting.
3813 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3814 pedwarn_c90 instead of pedwarn.
3815
9f25a338
TS
38162014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3817
3818 * c-typeck.c: Remove include of pointer-set.h.
3819
044331a8
MP
38202014-08-07 Marek Polacek <polacek@redhat.com>
3821
3822 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3823
b787e7a2
TS
38242014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3825
3826 * c-typeck.c: Use hash_map instead of pointer_map.
3827
6e2830c3
TS
38282014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3829
3830 * c-decl.c: Use hash_set instead of pointer_set.
3831
a7ee52fb
IZ
38322014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3833
3834 PR middle-end/61455
3835 * c-array-notation.c (expand_array_notations): Handling
3836 of DECL_EXPR added.
3837
b4dfdc11
MG
38382014-07-31 Marc Glisse <marc.glisse@inria.fr>
3839
3840 PR c++/60517
3841 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3842 a local variable.
3843
976d5a22
TT
38442014-07-30 Tom Tromey <tromey@redhat.com>
3845
3846 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3847 field.
3848 (really_start_incremental_init, push_init_level): Initialize
3849 designator_depth.
3850 (pop_init_level): Set global designator_depth.
3851 (process_init_element): Check for designated_init attribute.
3852
30281de2
MP
38532014-07-20 Marek Polacek <polacek@redhat.com>
3854
3855 PR c/61852
3856 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3857 (implicitly_declare): Pass location to implicit_decl_warning.
3858
b108f48f
JJ
38592014-07-14 Jakub Jelinek <jakub@redhat.com>
3860
3861 PR middle-end/61294
3862 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3863 If non-NULL, call c_parser_check_literal_zero.
3864 (c_parser_check_literal_zero): New function.
3865 (c_parser_postfix_expression_after_primary): Adjust
3866 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3867
773ec47f
MP
38682014-07-06 Marek Polacek <polacek@redhat.com>
3869
3870 PR c/6940
3871 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3872 * c-tree.h (C_ARRAY_PARAMETER): Define.
3873 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3874 function parameter.
3875
22e1cf1c 38762014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3877 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3878
3879 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3880 releasing symbol.
3881
52ec0ea3
MP
38822014-07-01 Marek Polacek <polacek@redhat.com>
3883
3884 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3885 instead of 0 to WARN_FOR_ASSIGNMENT.
3886
d5c3d343
MP
38872014-07-01 Marek Polacek <polacek@redhat.com>
3888
3889 PR c/58286
3890 * c-typeck.c (convert_for_assignment): Pass
3891 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3892
6a7253a4
MP
38932014-06-30 Marek Polacek <polacek@redhat.com>
3894
3895 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3896 has no_sanitize_undefined attribute.
3897
5e88a8f4
IZ
38982014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3899
3900 PR middle-end/57541
3901 * c-array-notation.c (fix_builtin_array_notation_fn):
3902 Check for 0 arguments in builtin call. Check that bultin argument is
3903 correct.
3904 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3905 index.
3906
9698b078
SH
39072014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3908
3909 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3910 qualifiers in __auto_type for atomic types.
3911 (c_parser_typeof_specifier): Discard all type qualifiers in
3912 __typeof__ for atomic types.
3913
6e07c515
MP
39142014-06-25 Marek Polacek <polacek@redhat.com>
3915
3916 PR c/61162
3917 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3918 the return expression to c_finish_return.
3919
da6f124d
JJ
39202014-06-25 Jakub Jelinek <jakub@redhat.com>
3921
3922 * c-typeck.c (c_finish_omp_clauses): Make sure
3923 OMP_CLAUSE_LINEAR_STEP has correct type.
3924
c203e8a7
TS
39252014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3926
3927 * c-decl.c: Adjust.
3928
56ad0e38
JJ
39292014-06-24 Jakub Jelinek <jakub@redhat.com>
3930
3931 * c-parser.c (c_parser_omp_for_loop): For
3932 #pragma omp parallel for simd move lastprivate clause from parallel
3933 to for rather than simd.
3934
47c2554f
MP
39352014-06-23 Marek Polacek <polacek@redhat.com>
3936
3937 * c-typeck.c (parser_build_binary_op): Don't call
3938 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3939
56363ffd
JH
39402014-06-15 Jan Hubicka <hubicka@ucw.cz>
3941
3942 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3943 * c-decl.c (merge_decls): Likewise.
3944
d7ff7ae5
MP
39452014-06-09 Marek Polacek <polacek@redhat.com>
3946
3947 PR c/36446
3948 * c-typeck.c (error_init): Call inform instead of error_at.
3949 (pedwarn_init): Call inform instead of pedwarn.
3950 (warning_init): Call inform instead of warning_at.
3951
24d047a3
JH
39522014-06-07 Jan Hubicka <hubicka@ucw.cz>
3953
3954 * c-decl.c (merge_decls): Use set_decl_section_name.
3955 (duplicate_decls): Remove node if it exists.
3956
9bac5cbb
G
39572014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3958
3959 PR c/53119
3960 * c-typeck.c (push_init_level, process_init_element,
3961 pop_init_level): Correct check for zero initialization, move
3962 missing brace warning to respect zero initialization.
3963
8ffcdea8
MP
39642014-06-05 Marek Polacek <polacek@redhat.com>
3965
3966 PR c/56724
3967 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3968
742938c9
MP
39692014-06-05 Marek Polacek <polacek@redhat.com>
3970
3971 PR c/49706
3972 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3973 on the left hand side operand of a comparison.
3974
6447c55d
MP
39752014-06-05 Marek Polacek <polacek@redhat.com>
3976
3977 PR c/48062
3978 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3979 Print note only if the warning was printed.
3980
9dc7743c
IZ
39812014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3982
3983 PR c/58942
3984 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3985 with a pointer.
3986
fedfecef
MP
39872014-06-03 Marek Polacek <polacek@redhat.com>
3988
3989 PR c/60439
3990 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3991 c_start_case.
3992 * c-tree.h (c_start_case): Update.
3993 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3994 switch condition has boolean value.
3995
9b2b7279
AM
39962014-06-02 Andrew MacLeod <amacleod@redhat.com>
3997
3998 * c-decl.c: Include builtins.h.
3999 * c-parser.c: Likewise.
4000
5c1bc275
MP
40012014-05-27 Marek Polacek <polacek@redhat.com>
4002
4003 PR c/56724
4004 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4005 error and warning calls to error_at and warning_at. Pass location of
4006 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4007 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4008 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4009
97563bc8
IZ
40102014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4011
4012 PR c/61191
4013 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4014 function parameters.
4015
aede2c10
JH
40162014-05-23 Jan Hubicka <hubicka@ucw.cz>
4017
4018 * c-decl.c (merge_decls): Preserve symtab node pointers.
4019 (duplicate_decls): Free new decl.
4020
edbba2ce
TS
40212014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4022
f3316c6d
TS
4023 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4024 initialization.
4025
edbba2ce
TS
4026 * c-parser.c (c_parser_omp_target): Return bool values.
4027
68c81f24
TS
40282014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4029
4030 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4031 num_teams_loc variable to num_thread_limit_loc.
4032
632f2871
RS
40332014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4034
4035 * c-array-notation.c (expand_array_notations): Use void_node
4036 instead of void_zero_node.
4037
766090c2
TS
40382014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4039
4040 * c-decl.c (finish_struct): Adjust.
4041 (finish_enum): Likewise.
4042 (bind): Adjust.
4043 (record_inline_static): Likewise.
4044 (push_scope): Likewise.
4045 (make_label): Likewise.
4046 (lookup_label_for_goto): Likewise.
4047 (finish_struct): Likewise.
4048 (finish_enum): Likewise.
4049 (store_parm_decls): Likewise.
4050 (c_push_function_context): Likewise.
4051 * c-lang.h: Remove usage of variable_size gty attribute.
4052 * c-parser.c (c_parse_init): Adjust.
4053 (c_parse_file): Likewise.
4054
2b107f6b
MP
40552014-05-13 Marek Polacek <polacek@redhat.com>
4056
4057 PR c/61162
4058 * c-typeck.c (convert_for_assignment): Pass location to
4059 WARN_FOR_ASSIGNMENT instead of input_location.
4060
d033409e
MP
40612014-05-10 Marek Polacek <polacek@redhat.com>
4062
4063 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4064 maybe_warn_string_init.
4065 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4066 maybe_warn_string_init.
4067 * c-tree.h (maybe_warn_string_init): Update declaration.
4068 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4069 Call pedwarn_init with loc instead of with input_location.
4070 (digest_init): Pass init_loc to maybe_warn_string_init.
4071 (pop_init_level): Call pedwarn_init with loc instead of with
4072 input_location.
4073 (set_init_index): Likewise.
4074 (process_init_element): Likewise.
4075
ea58ef42
MP
40762014-05-09 Marek Polacek <polacek@redhat.com>
4077
4078 PR c/61096
4079 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4080 (c_parser_initelt): Pass location to set_init_label. Pass array index
4081 location to set_init_index.
4082 * c-tree.h (push_init_level): Update declaration.
4083 (pop_init_level): Likewise.
4084 (set_init_index): Likewise.
4085 (set_init_label): Likewise.
4086 * c-typeck.c (error_init): Add location parameter. Call error_at
4087 instead of error.
4088 (digest_init): Pass init_loc to error_init.
4089 (really_start_incremental_init):
4090 (push_init_level): Add location parameter. Pass loc to pop_init_level
4091 and error_init.
4092 (pop_init_level): Likewise.
4093 (set_designator): Add location parameter. Pass loc to pop_init_level,
4094 push_init_level, and error_init.
4095 (set_init_index): Add location parameter. Pass loc to error_init and
4096 set_designator.
4097 (set_init_label): Likewise.
4098 (output_init_element): Pass loc to error_init.
4099 (process_init_element): Pass loc to error_init, pop_init_level,
4100 pedwarn_init, and push_init_level.
4101
661a0813
MP
41022014-05-09 Marek Polacek <polacek@redhat.com>
4103
4104 PR c/50459
4105 * c-parser.c (c_parser_attributes): Parse the arguments as an
4106 expression-list if the attribute takes identifier.
4107
2793eeab
MP
41082014-05-08 Marek Polacek <polacek@redhat.com>
4109
4110 PR c/61053
4111 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4112 TYPE_ALIGN_UNIT.
4113
f827930a
MP
41142014-05-08 Marek Polacek <polacek@redhat.com>
4115
4116 PR c/61077
4117 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4118 of main.
4119
1d60af08
KZ
41202014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4121 Mike Stump <mikestump@comcast.net>
4122 Richard Sandiford <rdsandiford@googlemail.com>
4123
4124 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4125 (finish_enum): Use wide-int interfaces.
4126 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4127 * c-typeck.c (build_c_cast): Likewise.
4128 (set_nonincremental_init_from_string): Likewise.
4129 (c_tree_equal): Likewise.
4130
a0e24419
MP
41312014-05-02 Marek Polacek <polacek@redhat.com>
4132
4133 PR c/25801
4134 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4135 Return size_one_node when the type is not complete.
4136 (pointer_diff): Remove comment.
4137 (build_unary_op): Improve error messages.
4138
19fc9faa
MP
41392014-05-02 Marek Polacek <polacek@redhat.com>
4140
4141 * c-typeck.c (c_finish_return): Separate warning_at calls.
4142
63bc4e87
MP
41432014-05-02 Marek Polacek <polacek@redhat.com>
4144
4145 * c-tree.h (error_init): Remove declaration.
4146 (pedwarn_init): Likewise.
4147 * c-typeck.c (error_init): Make static and move above.
4148 (pedwarn_init): Likewise.
4149 (warning_init): Move above.
4150 (maybe_warn_string_init): Likewise.
4151
4bd2511b
JL
41522014-05-01 Jeff Law <law@redhat.com>
4153
4154 Revert:
4155
4156 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4157 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4158 avoid goto.
4159
6a358dcb
MP
41602014-05-02 Marek Polacek <polacek@redhat.com>
4161
4162 PR c/60784
4163 * c-typeck.c (push_init_level): Set constructor_designated to
4164 p->designated for structures.
4165
ae5ebda4
MP
41662014-05-01 Marek Polacek <polacek@redhat.com>
4167
4168 PR c/60915
4169 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4170 function-definition has an attribute after the declarator.
4171
96b40f8d
MP
41722014-05-01 Marek Polacek <polacek@redhat.com>
4173
4174 PR c/60257
4175 * c-typeck.c (warning_init): Add location_t parameter. Call
4176 warning_at instead of warning.
4177 (push_init_level): Pass input_location to warning_init.
4178 (add_pending_init): Add location_t parameter. Pass loc to
4179 warning_init.
4180 (set_nonincremental_init): Pass input_location to add_pending_init.
4181 (set_nonincremental_init_from_string): Likewise.
4182 (output_init_element): Pass loc to warning_init and to
4183 add_pending_init.
4184
32e00768
MP
41852014-05-01 Marek Polacek <polacek@redhat.com>
4186
4187 PR c/43395
4188 * c-typeck.c (c_finish_return): Distinguish between label and variable
4189 when warning about returning local address.
4190
c9379ce2
MP
41912014-05-01 Marek Polacek <polacek@redhat.com>
4192
4193 PR c/29467
4194 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4195 in C89 mode.
4196
d00887e8
MP
41972014-05-01 Marek Polacek <polacek@redhat.com>
4198
4199 PR c/43245
4200 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4201 instead of 0 to WARN_FOR_QUALIFIERS.
4202
5436fa2e
MP
42032014-05-01 Marek Polacek <polacek@redhat.com>
4204
4205 PR c/56989
4206 * c-typeck.c (default_conversion): Use better location for
4207 error call.
4208
f8ed5150
MP
42092014-04-30 Marek Polacek <polacek@redhat.com>
4210
4211 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4212 also when SANITIZE_FLOAT_DIVIDE is on.
4213
8337d1db
MP
42142014-04-30 Marek Polacek <polacek@redhat.com>
4215
4216 PR c/60139
4217 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4218 and pedwarn_init. Use loc insted of input_location.
4219
c4bdc42f
MP
42202014-04-30 Marek Polacek <polacek@redhat.com>
4221
4222 PR c/60351
4223 * c-typeck.c (build_binary_op): Use location when warning about
4224 shift count.
4225
45484dcf
MP
42262014-04-25 Marek Polacek <polacek@redhat.com>
4227
4228 PR c/18079
4229 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4230 always_inline/noinline and hot/cold attributes.
4231
34cf811f
MP
42322014-04-25 Marek Polacek <polacek@redhat.com>
4233
4234 PR c/60114
4235 * c-parser.c (c_parser_initelt): Pass input_location to
4236 process_init_element.
4237 (c_parser_initval): Pass loc to process_init_element.
4238 * c-tree.h (process_init_element): Adjust declaration.
4239 * c-typeck.c (push_init_level): Pass input_location to
4240 process_init_element.
4241 (pop_init_level): Likewise.
4242 (set_designator): Likewise.
4243 (output_init_element): Add location_t parameter. Pass loc to
4244 digest_init.
4245 (output_pending_init_elements): Pass input_location to
4246 output_init_element.
4247 (process_init_element): Add location_t parameter. Pass loc to
4248 output_init_element.
4249
42056eac
JJ
42502014-04-24 Jakub Jelinek <jakub@redhat.com>
4251
4252 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4253 atomic-clause, allow comma in between atomic-clause and
4254 seq_cst.
4255
e162a134
JJ
42562014-04-22 Jakub Jelinek <jakub@redhat.com>
4257
4258 PR c/59073
4259 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4260 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4261
2f6babac
IZ
42622014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4263
4264 PR middle-end/60469
4265 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4266 create_tmp_var instead build_decl for creating temps.
4267 (build_array_notation_expr): Likewise.
4268 (fix_conditional_array_notations_1): Likewise.
4269 (fix_array_notation_expr): Likewise.
4270 (fix_array_notation_call_expr): Likewise.
4271
8edbfaa6
JJ
42722014-03-28 Jakub Jelinek <jakub@redhat.com>
4273
4274 PR c++/60689
4275 * c-tree.h (c_build_function_call_vec): New prototype.
4276 * c-typeck.c (build_function_call_vec): Don't call
4277 resolve_overloaded_builtin here.
4278 (c_build_function_call_vec): New wrapper function around
4279 build_function_call_vec. Call resolve_overloaded_builtin here.
4280 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4281 Call c_build_function_call_vec instead of build_function_call_vec.
4282 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4283 * c-decl.c (finish_decl): Likewise.
4284
7485aeea
MLI
42852014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4286
4287 PR c/55383
4288 * c-typeck.c: Use correct format string in cast-qual warning
4289
b17a8b07
TS
42902014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4291
4292 * c-decl.c (c_decl_attributes): Use
4293 lang_hooks.types.omp_mappable_type.
4294 * c-typeck.c (c_finish_omp_clauses): Likewise.
4295
3af9c5e9
MP
42962014-03-06 Marek Polacek <polacek@redhat.com>
4297
4298 PR c/60197
4299 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4300 of checking tree code.
4301
1c9f5f33
PK
43022014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4303
4304 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4305 (c_parser_parameter_declaration): Likewise.
4306
cc28fc7f
MP
43072014-02-19 Marek Polacek <polacek@redhat.com>
4308
4309 PR c/60195
4310 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4311 Call mark_exp_read on exp.value.
4312 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4313 TREE_ADDRESSABLE on old instead of val.
4314 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4315
b581c05c
PK
43162014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4317
4318 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4319 C_EXPR_APPEND by vec_safe_push.
4320 * c-tree.h (C_EXPR_APPEND): Remove.
4321
81e5eca8
MP
43222014-01-31 Marek Polacek <polacek@redhat.com>
4323
4324 PR c/59963
4325 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4326 build_function_call_vec.
4327 (build_function_call): Likewise.
4328 (build_atomic_assign): Likewise.
4329 (build_function_call_vec): Add arg_loc parameter. Use it.
4330 (convert_arguments): Likewise.
4331 (convert_for_assignment): Rename rhs_loc to expr_loc.
4332 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4333 (c_parser_objc_keywordexpr): Likewise.
4334 (c_parser_postfix_expression_after_primary): Call
4335 build_function_call_vec with expr_loc rather than op_loc.
4336 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4337 build_function_call_vec.
4338 (c_parser_expr_list): Add locations parameter. Fill it with locations
4339 of function arguments.
4340 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4341
68fca595
MP
43422014-01-30 Marek Polacek <polacek@redhat.com>
4343
4344 PR c/59940
4345 * c-typeck.c (build_function_call_vec): Use loc parameter.
4346 (convert_arguments): Add location parameter. Use it.
4347 (ep_convert_and_check): Likewise.
4348 (build_atomic_assign): Adjust convert_for_assignment call.
4349 (build_modify_expr): Likewise.
4350 (digest_init): Likewise.
4351 (c_finish_return): Likewise.
4352 (build_conditional_expr): Adjust ep_convert_and_check calls.
4353 (convert_for_assignment): Add rhs_loc parameter. Use it.
4354 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4355 calls.
4356
fa337f3a
RB
43572014-01-30 Richard Biener <rguenther@suse.de>
4358
4359 PR c/59905
4360 * c-typeck.c (build_function_call_vec): Do not replace calls
4361 to a function via an incompatible type with a runtime abort.
4362
b72271b9
BI
43632014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4364
4365 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4366 flag_enable_cilkplus with flag_cilkplus.
4367 (c_parser_direct_declarator_inner): Likewise.
4368 (c_parser_attribute_any_word): Likewise.
4369 (c_parser_attributes): Likewise.
4370 (c_parser_compound_statement): Likewise.
4371 (c_parser_statement_after_labels): Likewise.
4372 (c_parser_if_statement): Likewise.
4373 (c_parser_switch_statement): Likewise.
4374 (c_parser_do_statement): Likewise.
4375 (c_parser_for_statement): Likewise.
4376 (c_parser_unary_expression): Likewise.
4377 (c_parser_postfix_expression): Likewise.
4378 (c_parser_postfix_expression_after_primary): Likewise.
4379 (c_parser_postfix_expression_after_primary): Likewise.
4380 (c_parser_omp_clause_name): Likewise.
4381 (c_finish_omp_declare_simd): Likewise.
4382 (c_parser_cilk_verify_simd): Likewise.
4383 * c-typeck.c (build_array_ref): Likewise.
4384 (build_function_call_vec): Likewise.
4385 (convert_arguments): Likewise.
4386 (build_compound_expr): Likewise.
4387 (c_finish_return): Likewise.
4388 (c_finish_if_stmt): Likewise.
4389 (c_finish_loop): Likewise.
4390 (build_binary_op): Likewise.
4391
393e8e8b
MP
43922014-01-23 Marek Polacek <polacek@redhat.com>
4393
4394 PR c/59846
4395 * c-typeck.c (parser_build_binary_op): Use location instead of
4396 input_location.
4397 (build_binary_op): Pass location to shorten_compare.
4398
f04dda30
MP
43992014-01-23 Marek Polacek <polacek@redhat.com>
4400
4401 PR c/58346
4402 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4403 an empty aggregate.
4404
789eadcd
MP
44052014-01-23 Marek Polacek <polacek@redhat.com>
4406
4407 PR c/59871
4408 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4409 of a comma expression.
4410 (emit_side_effect_warnings): Likewise.
4411
40f14e9f
BI
44122014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4413
4414 PR c/59825
4415 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4416 function to use walk_tree and moved a lot of its functionality to
4417 expand_array_notations.
4418 (expand_array_notations): New function.
4419
74558dd9
BI
44202014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4421
4422 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4423 attribute an attribute without value.
4424
652fea39
JJ
44252014-01-23 Jakub Jelinek <jakub@redhat.com>
4426
4427 PR middle-end/58809
4428 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4429 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4430
f34f1c87
MP
44312014-01-22 Marek Polacek <polacek@redhat.com>
4432
4433 PR c/59891
4434 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4435 of remove_c_maybe_const_expr on op1 and op2.
4436
241f845a
JJ
44372014-01-15 Jakub Jelinek <jakub@redhat.com>
4438
4439 PR c/58943
4440 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4441 effects, preevaluate rhs using SAVE_EXPR first.
4442
9a74f20c
BI
44432014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4444
4445 PR c++/59631
4446 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4447 statements with if-elseif statements.
4448
96066ce1
MP
44492014-01-06 Marek Polacek <polacek@redhat.com>
4450
4451 PR c/57773
4452 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4453 defined bit-field types only in ISO C.
4454
23a5b65a
RS
44552014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4456
4457 Update copyright years
4458
f9030485
RS
44592014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4460
4461 * c-array-notation.c: Use the standard form for the copyright notice.
4462
41958c28
BI
44632013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4464
4465 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4466 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4467 field in parser is not empty. If not-empty, call the function
4468 c_parser_finish_omp_declare_simd.
4469 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4470 between SIMD-enabled functions and #pragma simd. Added new parameter.
4471 (c_parser_cilk_all_clauses): Modified the usage of the function
4472 c_parser_cilk_clause_vectorlength as mentioned above.
4473 (c_parser_cilk_simd_fn_vector_attrs): New function.
4474 (c_finish_cilk_simd_fn_tokens): Likewise.
4475 (is_cilkplus_vector_p): Likewise.
4476 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4477 "nomask," and "mask" strings in clause name.
4478 (c_parser_omp_all_clauses): Added 3 new case statements:
4479 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4480 PRAGMA_CILK_CLAUSE_NOMASK.
4481 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4482 check for vector attribute and if so call the function
4483 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4484 called the function c_finish_cilk_simd_fn_tokens.
4485 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4486 parser field is non-empty. If so, parse them as you would parse
4487 the omp declare simd pragma.
4488 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4489 Added a check when step is a parameter and flag it as error.
4490 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4491 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4492 pragma_omp_clause.
4493
cef0fd0e
TS
44942013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4495
4496 * c-parser.c (c_parser_omp_parallel): Fix description.
4497
12893402
BI
44982013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4499
4500 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4501 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4502 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4503 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4504
296674db
JM
45052013-12-04 Joseph Myers <joseph@codesourcery.com>
4506
4507 PR c/52023
4508 * c-parser.c (c_parser_alignas_specifier): Use
4509 c_sizeof_or_alignof_type instead of c_alignof.
4510 (c_parser_alignof_expression): Likewise, with min_alignof
4511 parameter depending on alignof spelling used.
4512
edd28054
MP
45132013-12-04 Marek Polacek <polacek@redhat.com>
4514
4515 PR c/54113
4516 * c-decl.c (start_function): Don't warn for missing prototype for
4517 inline functions.
4518
da0fc454
MP
45192013-12-03 Marek Polacek <polacek@redhat.com>
4520
4521 PR c/59351
4522 * c-decl.c (build_compound_literal): Allow compound literals with
4523 empty initial value.
4524
4c2ecab0
JM
45252013-12-02 Joseph Myers <joseph@codesourcery.com>
4526
4527 PR c/58235
4528 * c-typeck.c (build_modify_expr): Diagnose assignment to
4529 expression with array type.
4530
340baef7
JM
45312013-11-29 Joseph Myers <joseph@codesourcery.com>
4532
4533 PR c/42262
4534 * c-typeck.c (process_init_element): Do not treat a string as
4535 initializing a whole array when used with a designator for an
4536 individual element.
4537
6763b9f7
JM
45382013-11-29 Joseph Myers <joseph@codesourcery.com>
4539
4540 PR c/57574
4541 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4542 an inline function following a static declaration.
4543
e7bd1de1
JJ
45442013-11-28 Jakub Jelinek <jakub@redhat.com>
4545
4546 PR c/59310
4547 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4548 to p_name before calling c_parser_omp_teams instead of after.
4549 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4550 argument. Remove unused p_name variable.
4551
0136f8f0
AH
45522013-11-27 Aldy Hernandez <aldyh@redhat.com>
4553 Jakub Jelinek <jakub@redhat.com>
4554
4555 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4556 external_scope is NULL.
4557
241b71bb
TV
45582013-11-27 Tom de Vries <tom@codesourcery.com>
4559 Marc Glisse <marc.glisse@inria.fr>
4560
4561 PR c++/59032
4562 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4563
2fb9a547
AM
45642013-11-22 Andrew MacLeod <amacleod@redhat.com>
4565
4566 * c-typeck.c: Add required include files from gimple.h.
4567
8400e75e
DM
45682013-11-22 David Malcolm <dmalcolm@redhat.com>
4569
4570 * c-decl.c (define_label, shadow_tag_warned)
4571 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4572 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4573 (declspecs_add_type): Remove use of in_system_header macro.
4574 * c-parser.c (c_parser_unary_expression): Likewise.
4575 * c-typeck.c (store_init_value, process_init_element)
4576 (c_start_case): Likewise.
4577
4578 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4579 macro.
4580
4581 * c-parser.c (c_parser_set_source_position_from_token): Remove
4582 reference to in_system_header from comment.
4583
386b1f1f
RS
45842013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4585
4586 * c-decl.c (grokdeclarator): Update comment to refer to
4587 tree_to_[su]hwi rather than tree_low_cst.
4588
ae7e9ddd
RS
45892013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4590
4591 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4592 tree_to_uhwi throughout.
4593
9439e9a1
RS
45942013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4595
4596 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4597 throughout.
4598
9541ffee
RS
45992013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4600
4601 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4602 throughout.
4603
c02065fc
AH
46042013-11-15 Aldy Hernandez <aldyh@redhat.com>
4605
4606 * c-parser.c (c_parser_cilk_simd): New.
4607 (c_parser_cilk_verify_simd): New.
4608 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4609 (c_parser_omp_for_loop): Add case for NE_EXPR.
4610 Set c_break_label for CILK_SIMD.
4611 (c_parser_cilk_clause_vectorlength): New.
4612 (c_parser_cilk_clause_linear): New.
4613 (c_parser_cilk_clause_name): New.
4614 (c_parser_cilk_all_clauses): New.
4615 * c-typeck.c (build_unary_op): Pass location argument to
4616 readonly_error.
4617 (build_modify_expr): Same.
4618 (build_asm_expr): Same.
4619 (c_finish_bc_stmt): Error on break/continue in loops.
4620
18f429e2
AM
46212013-11-14 Andrew MacLeod <amacleod@redhat.com>
4622
4623 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4624
d8a2d370
DN
46252013-11-14 Diego Novillo <dnovillo@google.com>
4626
4627 * c-decl.c: Include print-tree.h.
4628 Include stor-layout.h.
4629 Include varasm.h.
4630 Include attribs.h.
4631 Include stringpool.h.
4632 * c-lang.c: Include fold-const.h.
4633 * c-parser.c: Include stringpool.h.
4634 Include attribs.h.
4635 Include stor-layout.h.
4636 Include varasm.h.
4637 Include trans-mem.h.
4638 * c-typeck.c: Include stor-layout.h.
4639 Include trans-mem.h.
4640 Include varasm.h.
4641 Include stmt.h.
4642
38b7bc7f
JM
46432013-11-13 Joseph Myers <joseph@codesourcery.com>
4644
4645 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4646 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4647 __auto_type.
4648 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4649 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4650 RID_AUTO_TYPE.
4651 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4652 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4653 (c_parser_declarator, c_parser_direct_declarator_inner)
4654 (c_parser_parameter_declaration, c_parser_type_name): All callers
4655 changed.
4656 (c_parser_declaration_or_fndef): Handle declarations with type
4657 determined from the initializer.
4658
45b0be94
AM
46592013-11-12 Andrew MacLeod <amacleod@redhat.com>
4660
18f429e2 4661 * c-typeck.c: Include gimplify.h.
45b0be94 4662
582d9b50
JM
46632013-11-12 Joseph Myers <joseph@codesourcery.com>
4664
4665 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4666 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4667 comment.
4668 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4669 or _Thread_local as appropriate in diagnostics.
4670 (build_null_declspecs): Initialize ret->thread_gnu_p.
4671 (declspecs_add_scspec): Handle either __thread or _Thread_local
4672 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4673 pedantic. Do not disallow _Thread_local extern and _Thread_local
4674 static.
4675
267bac10
JM
46762013-11-07 Joseph Myers <joseph@codesourcery.com>
4677 Andrew MacLeod <amacleod@redhat.com>
4678
4679 * c-aux-info.c (gen_type): Handle atomic qualifier.
4680 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4681 qualifiers when compating types.
4682 (shadow_tag_warned): Handle atomic_p in declspecs.
4683 (quals_from_declspecs): Likewise.
4684 (start_decl): Use c_type_promotes_to when promoting argument
4685 types.
4686 (grokdeclarator): Handle _Atomic.
4687 (get_parm_info): Diagnose any qualifier on "void" as only
4688 parameter.
4689 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4690 comparing types. Use c_type_promotes_to when promoting argument
4691 types.
4692 (finish_function): Use c_type_promotes_to when promoting argument
4693 types.
4694 (build_null_declspecs): Handle atomic_p in declspecs.
4695 (declspecs_add_qual): Handle RID_ATOMIC.
4696 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4697 (c_token_starts_declspecs): Handle RID_ATOMIC.
4698 (c_parser_declspecs): Handle atomic type specifiers and
4699 qualifiers.
4700 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4701 from types of expressions with atomic type.
4702 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4703 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4704 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4705 (c_parser_statement_after_labels, c_parser_switch_statement)
4706 (c_parser_for_statement, c_parser_expr_no_commas)
4707 (c_parser_conditional_expression, c_parser_binary_expression)
4708 (c_parser_cast_expression, c_parser_unary_expression)
4709 (c_parser_postfix_expression)
4710 (c_parser_postfix_expression_after_primary, c_parser_expression):
4711 Use convert_lvalue_to_rvalue.
4712 (c_parser_expression_conv, c_parser_expr_list): Document
4713 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4714 (c_parser_objc_synchronized_statement): Use
4715 convert_lvalue_to_rvalue.
4716 (c_parser_objc_selector): Handle RID_ATOMIC.
4717 (c_parser_objc_receiver, c_parser_array_notation): Use
4718 convert_lvalue_to_rvalue.
4719 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4720 _Atomic (type-name).
4721 (struct c_declspecs): Add atomic_p field.
4722 (convert_lvalue_to_rvalue): Declare.
4723 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4724 corresponding atomic types.
4725 (qualify_type): Don't add _Atomic qualifiers from second argument.
4726 (comp_target_types): Do not allow _Atomic mismatches.
4727 (type_lists_compatible_p): Do not remove atomic qualifiers when
4728 comparing types.
4729 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4730 (build_atomic_assign): New functions.
4731 (build_unary_op): Use build_atomic_assign for atomic increment and
4732 decrement.
4733 (build_conditional_expr): Do not treat _Atomic void as a qualified
4734 version of void.
4735 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4736 (find_anonymous_field_with_type, convert_to_anonymous_field)
4737 (convert_for_assignment): Do not remove atomic qualifiers when
4738 comparing types.
4739 (digest_init): Do not accept initialization of arrays of atomic
4740 elements by string constants.
4741 (build_asm_expr): Use convert_lvalue_to_rvalue.
4742 (build_binary_op): Do not treat _Atomic void as a qualified
4743 version of void.
4744
0c249d4b
DD
47452013-11-06 DJ Delorie <dj@redhat.com>
4746
4747 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4748 both explicit and builtin, print the location of the explicit one.
4749
6d7f7e0a
TB
47502013-11-05 Tobias Burnus <burnus@net-b.de>
4751
4752 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4753 c_parser_omp_distribute, c_parser_omp_teams,
4754 c_parser_omp_target, c_parser_omp_declare): Handle
4755 -fopenmp-simd.
4756
b906f4ca
MP
47572013-11-03 Marek Polacek <polacek@redhat.com>
4758
4759 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4760
ee1d5a02
JJ
47612013-11-01 Jakub Jelinek <jakub@redhat.com>
4762
4763 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4764 check_dup_generic at the end, unless remove is true.
4765 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4766 remove = true;.
4767 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4768
5a9785fb
JJ
47692013-10-31 Jakub Jelinek <jakub@redhat.com>
4770
4771 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4772 with decl that is not pointer nor array.
4773
939b37da
BI
47742013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4775
4776 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4777 a spawning function is found.
4778 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4779 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4780 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4781 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4782 case.
4783 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4784 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4785 expr.
4786 (c_finish_return): Added a check to reject _Cilk_spawn in return
4787 expression.
4788 (build_cilk_spawn): New function.
4789 (build_cilk_sync): Likewise.
4790 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4791
d4af74d4
TB
47922013-10-27 Tobias Burnus <burnus@net-b.de>
4793
4794 PR other/33426
4795 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4796 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4797 (c_parser_statement_after_labels): Update calls.
4798
d73749df 47992013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4800
4801 PR other/33426
4802 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4803 Handle PRAGMA_IVDEP.
4804 (c_parser_statement_after_labels): Update call.
4805
f28aa681
MP
48062013-10-24 Marek Polacek <polacek@redhat.com>
4807
4808 * c-parser.c (c_parser_struct_declaration): Add a comment.
4809 (c_parser_declarator): Don't allow _Alignas here.
4810
0645c1a2
AM
48112013-10-17 Andrew MacLeod <amacleod@redhat.com>
4812
4813 * c-parser.c: Include omp-low.h.
4814 * c-typeck.c: Likewise.
4815
568a31f2
MP
48162013-10-17 Marek Polacek <polacek@redhat.com>
4817
4818 PR c/58267
4819 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4820 Document syntax of the array-declarator.
4821 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4822 are not permitted.
4823 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4824 (c_parser_struct_declaration): Likewise.
4825 (c_parser_declarator): Likewise.
4826 (c_parser_direct_declarator_inner): Likewise.
4827 (c_parser_parameter_declaration): Likewise.
4828 (c_parser_type_name): Likewise.
4829
acf0174b
JJ
48302013-10-11 Jakub Jelinek <jakub@redhat.com>
4831
4832 * c-lang.h (current_omp_declare_target_attribute): New extern
4833 decl.
4834 * c-parser.c: Include c-lang.h.
4835 (struct c_parser): Change tokens to c_token *.
4836 Add tokens_buf field. Change tokens_avail type to unsigned int.
4837 (c_parser_consume_token): If parser->tokens isn't
4838 &parser->tokens_buf[0], increment parser->tokens.
4839 (c_parser_consume_pragma): Likewise.
4840 (enum pragma_context): Add pragma_struct and pragma_param.
4841 (c_parser_external_declaration): Adjust
4842 c_parser_declaration_or_fndef caller.
4843 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4844 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4845 Adjust recursive call.
4846 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4847 of pragma_external.
4848 (c_parser_parameter_declaration): Use pragma_param instead of
4849 pragma_external.
4850 (c_parser_compound_statement_nostart, c_parser_label,
4851 c_parser_for_statement): Adjust
4852 c_parser_declaration_or_fndef callers.
4853 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4854 it through to c_parser_conditional_expression.
4855 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4856 pass it through to c_parser_binary_expression. Adjust recursive
4857 call.
4858 (c_parser_binary_expression): Remove prec argument, add
4859 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4860 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4861 binop matches it, use build2 instead of parser_build_binary_op.
4862 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4863 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4864 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4865 Handle pragma_struct and pragma_param the same as pragma_external.
4866 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4867 (c_parser_omp_variable_list): Parse array sections for
4868 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4869 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4870 (c_parser_omp_clause_reduction): Handle user defined reductions.
4871 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4872 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4873 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4874 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4875 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4876 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4877 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4878 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4879 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4880 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4881 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4882 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4883 (c_parser_omp_for_loop): Add CODE argument, pass it through
4884 to c_finish_omp_for. Change last argument to cclauses,
4885 and adjust uses to grab parallel clauses from the array of all
4886 the split clauses. Adjust c_parser_binary_expression,
4887 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4888 (omp_split_clauses): New function.
4889 (c_parser_omp_simd): New function.
4890 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4891 Allow the function to be called also when parsing combined constructs,
4892 and call c_parser_omp_simd when parsing for simd.
4893 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4894 #pragma omp section, require exactly one structured-block instead of
4895 sequence of statements.
4896 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4897 Allow the function to be called also when parsing combined constructs.
4898 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4899 Allow the function to be called also when parsing combined
4900 constructs.
4901 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4902 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4903 c_parser_omp_teams, c_parser_omp_target_data,
4904 c_parser_omp_target_update, c_parser_omp_target,
4905 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4906 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4907 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4908 (c_parser_omp_construct): Add p_name and mask vars. Handle
4909 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4910 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4911 and c_parser_omp_sections callers.
4912 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4913 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4914 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4915 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4916 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4917 OMP_CLAUSE_DEPEND.
4918 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4919 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4920 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4921 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4922 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4923 * c-typeck.c: Include tree-inline.h.
4924 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4925 handle_omp_array_sections_1, handle_omp_array_sections,
4926 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4927 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4928 user defined reductions.
4929 (c_tree_equal): New function.
4930 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4931 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4932 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4933 c_check_omp_declare_reduction_r): New prototypes.
4934 * c-decl.c (current_omp_declare_target_attribute): New variable.
4935 (c_decl_attributes): New function.
4936 (start_decl, start_function): Use it instead of decl_attributes.
4937 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4938 c_omp_reduction_decl, c_omp_reduction_lookup,
4939 c_check_omp_declare_reduction_r): New functions.
4940
0a6c2227
TT
49412013-09-25 Tom Tromey <tromey@redhat.com>
4942
4943 * Make-lang.in (c/gccspec.o): Remove.
4944 (CFLAGS-c/gccspec.o): New variable.
4945 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4946 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4947 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4948
f3bc55f0
TT
49492013-09-25 Tom Tromey <tromey@redhat.com>
4950
4951 * Make-lang.in (c/gccspec.o): Don't use subshell.
4952
a24d975c
MP
49532013-09-18 Marek Polacek <polacek@redhat.com>
4954
4955 PR sanitize/58443
4956 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4957 Remove unnecessary check.
4958
ce6923c5
MP
49592013-09-18 Marek Polacek <polacek@redhat.com>
4960
4961 PR sanitizer/58411
4962 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4963 no_sanitize_undefined attribute.
4964
a1e51df9
KT
49652013-09-13 Kai Tietz <ktietz@redhat.com>
4966
4967 PR target/57848
4968 * c-decl.c (c_builtin_function_ext_scope): Remove
4969 wrong assumption that it is never called on prexisting
4970 symbol.
4971
0af94e6f
JR
49722013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4973
4974 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4975
20059c8b
GDR
49762013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4977
4978 * c-objc-common.c (c_tree_printer): Tidy.
4979
de5a5fa1
MP
49802013-08-30 Marek Polacek <polacek@redhat.com>
4981
4982 * c-typeck.c (build_binary_op): Add division by zero and shift
4983 instrumentation.
4984
2531a1d9 49852013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4986 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4987
6e2bcc98 4988 PR c/35649
2531a1d9
JR
4989 * c-typeck.c (c_common_type): Prefer double_type_node over
4990 other REAL_TYPE types with the same precision.
4991 (convert_arguments): Likewise.
4992
025311c4
GDR
49932013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4994
4995 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4996 (c_initialize_diagnostics): Call a destructor for the early printer.
4997
da6ca2b5
GDR
49982013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4999
5000 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5001 printer initialization.
5002
318cda85 50032013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5004
318cda85
BI
5005 PR c/57490
5006 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5007 check for truth values.
5008 (expand_array_notation_exprs): Added truth values case. Removed an
5009 unwanted else. Added for-loop to walk through subtrees in default
5010 case.
5011
b066401f
GDR
50122013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5013
5014 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5015
fb48aadc
JM
50162013-07-23 Joseph Myers <joseph@codesourcery.com>
5017
5018 * c-parser.c (struct c_generic_association): Fix typo.
5019
433cc7b0
TT
50202013-07-23 Tom Tromey <tromey@redhat.com>
5021 Joseph Myers <joseph@codesourcery.com>
5022
5023 * c-parser.c (struct c_generic_association): New.
5024 (c_generic_association_d): New typedef.
5025 (c_parser_generic_selection): New function.
5026 (c_parser_postfix_expression): Handle RID_GENERIC.
5027
26d40c3d
JM
50282013-07-13 Jason Merrill <jason@redhat.com>
5029
5030 PR c++/57793
5031 * c-decl.c (finish_struct): Check for too-large class.
5032
ecdbd01a 50332013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5034
5035 PR c/57821
5036 * c-typeck.c (set_init_index): When folding, check for index overflow.
5037
1141ed3f
BI
50382013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5039
5040 * c-parser.c (c_parser_array_notation): Removed rejection of array
5041 notations in an array of function pointers.
5042
713b46fa
BI
50432013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5044
5045 * c-array-notation.c (make_triplet_val_inv): New function.
5046 (create_cmp_incr): Likewise.
5047 (create_array_refs): Likewise.
5048 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5049 Also modularized common parts between functions and called the function.
5050 (build_array_notation_expr): Likewise.
5051 (fix_conditional_array_notations_1): Likewise.
5052 (fix_array_notation_expr): Likewise.
5053 (fix_array_notation_call_expr): Likewise.
5054
92f20202
MP
50552013-06-18 Marek Polacek <polacek@redhat.com>
5056
5057 PR c/57630
5058 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5059
73a23b06
BI
50602013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5061
5062 * c-array-notation.c (build_array_notation_expr): Reject array notation
5063 mismatch between LHS and RHS even inside a call_expr. Also, removed
5064 a couple while statements that were dead code.
5065
00b8517d
BI
50662013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5067
5068 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5069 excessive precision expressions in function parameters. Also removed
5070 couple unwanted while statements.
5071
1509bdda
BI
50722013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5073
5074 * c-array-notation.c (expand_array_notation_exprs): Added
5075 ARRAY_NOTATION_REF case.
5076
d60f1706
BI
50772013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5078
5079 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5080 function to c-family/array-notation-common.c.
5081 (is_cilkplus_reduce_builtin): Likewise.
5082 (find_rank): Likewise.
5083 (extract_array_notation_exprs): Likewise.
5084 (replace_array_notations): Likewise.
5085 (find_inv_trees): Likewise.
5086 (replace_inv_trees): Likewise.
5087 (contains_array_notation_expr): Likewise.
5088 (find_correct_array_notation_type): Likewise.
5089 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5090 (struct inv_list): Moved this to c-family/array-notation-common.c.
5091 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5092
6d6efbb3
BI
50932013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5094
5095 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5096 reduction functions outside the for-loop. Added a check if the fundecl
5097 is non-NULL. Finally, removed an unwanted if-statement, and made the
5098 body unconditional.
5099
25c22937
BI
51002013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5101
5102 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5103 condition of the if-statement matches the rank of else-block and then-
5104 block when array notations are used.
5105 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5106 expression after the entire function body is parsed.
5107 (c_parser_expr_no_commas): Delayed creating array notation expressions
5108 to the end of function parsing.
5109 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5110 whole if-statement instead of just the condition.
5111 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5112
edd25645
BI
51132013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5114
5115 PR c/57474
5116 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5117 array to NULL_TREE if they are unused. Also added a check for the
5118 field to be NULL before its fields are used in future.
5119
065ce7f1
RO
51202013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5121
5122 PR bootstrap/57450
5123 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5124 (build_array_notation_expr): Likewise.
5125
36536d79
BI
51262013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5127
5128 * c-typeck.c (build_array_ref): Added a check to see if array's
5129 index is greater than one. If true, then emit an error.
5130 (build_function_call_vec): Exclude error reporting and checking
5131 for builtin array-notation functions.
5132 (convert_arguments): Likewise.
5133 (c_finish_return): Added a check for array notations as a return
5134 expression. If true, then emit an error.
5135 (c_finish_loop): Added a check for array notations in a loop
5136 condition. If true then emit an error.
5137 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5138 (build_binary_op): Added a check for array notation expr inside
5139 op1 and op0. If present, we call another function to find correct
5140 type.
5141 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5142 * c-parser.c (c_parser_compound_statement): Check if array
5143 notation code is used in tree, if so, then transform them into
5144 appropriate C code.
5145 (c_parser_expr_no_commas): Check if array notation is used in LHS
5146 or RHS, if so, then build array notation expression instead of
5147 regular modify.
5148 (c_parser_postfix_expression_after_primary): Added a check for
5149 colon(s) after square braces, if so then handle it like an array
5150 notation. Also, break up array notations in unary op if found.
5151 (c_parser_direct_declarator_inner): Added a check for array
5152 notation.
5153 (c_parser_compound_statement): Added a check for array notation in
5154 a stmt. If one is present, then expand array notation expr.
5155 (c_parser_if_statement): Likewise.
5156 (c_parser_switch_statement): Added a check for array notations in
5157 a switch statement's condition. If true, then output an error.
5158 (c_parser_while_statement): Similarly, but for a while.
5159 (c_parser_do_statement): Similarly, but for a do-while.
5160 (c_parser_for_statement): Similarly, but for a for-loop.
5161 (c_parser_unary_expression): Check if array notation is used in a
5162 pre-increment or pre-decrement expression. If true, then expand
5163 them.
5164 (c_parser_array_notation): New function.
5165 * c-array-notation.c: New file.
5166 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5167
cd192ccc
MS
51682013-05-23 Mike Stump <mikestump@comcast.net>
5169
5170 * c-typeck.c (convert_for_assignment): Handle references to memory
5171 spaces better.
5172
427b248d
JM
51732013-05-16 Jason Merrill <jason@redhat.com>
5174
5175 * Make-lang.in (cc1$(exeext)): Use link mutex.
5176
44d90fe1
PC
51772013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5178
5179 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5180 to simply use OPT_Wpointer_arith.
5181 (build_unary_op): Likewise.
5182
4e7d7b3d
JJ
51832013-04-03 Jakub Jelinek <jakub@redhat.com>
5184
5185 PR c/19449
5186 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5187 argument. If set, or it temporarily for parsing of the first
5188 argument into force_folding_builtin_constant_p.
5189 (c_parser_postfix_expression): Adjust callers.
5190
839b422f
RB
51912013-03-21 Richard Biener <rguenther@suse.de>
5192
5193 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5194 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5195
2ee028f1
MP
51962013-02-12 Marek Polacek <polacek@redhat.com>
5197
5198 PR c/44938
5199 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5200 origtypes to NULL.
5201
8824edff
JJ
52022013-01-24 Jakub Jelinek <jakub@redhat.com>
5203
5204 PR c/56078
5205 * c-typeck.c (set_nonincremental_init_from_string): If
5206 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5207 returned false.
5208 (process_init_element): Likewise.
5209
eadd3d0d
JJ
52102012-12-20 Jakub Jelinek <jakub@redhat.com>
5211
5212 PR c++/55619
5213 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5214 argument, don't call default_function_array_conversion
5215 nor c_fully_fold here.
5216 (c_parser_asm_statement): Adjust callers.
5217 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5218 and outputs here, and call default_function_array_conversion
5219 on inputs that don't need to be addressable.
5220
f8a93a2e
JJ
52212012-12-18 Jakub Jelinek <jakub@redhat.com>
5222
5223 PR c/39464
5224 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5225 warning require that both c_common_unsigned_type as well as
5226 c_common_signed_type is the same for both mvl and mvr types.
5227
9771b263
DN
52282012-11-16 Diego Novillo <dnovillo@google.com>
5229
5230 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5231
5232 * c-common.c: Use new vec API in vec.h.
5233 * c-common.h: Likewise.
5234 * c-gimplify.c: Likewise.
5235 * c-pragma.c: Likewise.
5236 * c-pretty-print.c: Likewise.
5237 * c-pretty-print.h: Likewise.
5238 * c-semantics.c: Likewise.
5239 * c-decl.c: Likewise.
5240 * c-parser.c: Likewise.
5241 * c-tree.h: Likewise.
5242 * c-typeck.c: Likewise.
5243
880661a4
JW
52442012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5245
5246 PR c++/54930
5247 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5248
077d1abe
MLI
52492012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5250
5251 PR c/53066
5252 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5253 shadows a function, unless the variable is a function or a
5254 pointer-to-function.
5255
3a785c97
JJ
52562012-10-12 Jakub Jelinek <jakub@redhat.com>
5257
5258 PR c/54381
5259 * c-parser.c (struct c_tree_loc_pair): Removed.
5260 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5261 add location_t * and tree * arguments, fill in array of 3
5262 sizeof_arg trees and corresponding locs.
5263 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5264 c_parser_expr_list callers.
5265 (c_parser_postfix_expression_after_primary): Likewise. Pass
5266 array of 3 sizeof_arg trees and locs (corresponding to first
5267 3 arguments) to sizeof_pointer_memaccess_warning.
5268
703c8606
LC
52692012-10-09 Lawrence Crowl <crowl@google.com>
5270
5271 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5272 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5273 hash table.
5274
5d9de0d0
PC
52752012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5276
5277 PR c++/54194
5278 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5279 call.
5280
a212e43f
MG
52812012-10-09 Marc Glisse <marc.glisse@inria.fr>
5282
5283 PR c++/54427
5284 * c-typeck.c: Include c-common.h.
5285 (enum stv_conv): Moved to c-common.h.
5286 (scalar_to_vector): Moved to c-common.c.
5287 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5288 * Make-lang.in: c-typeck.c depends on c-common.h.
5289
3b78de56
AC
52902012-10-04 Arnaud Charlet <charlet@adacore.com>
5291
5292 * c-decl.c (c_write_global_declarations): Fix handling of
5293 -fdump-ada-spec*.
5294
78c60e3d
SS
52952012-09-30 Sharad Singhai <singhai@google.com>
5296
5297 * c-decl.c (c_write_global_declarations): Use a different method
5298 to determine if the dump has ben initialized.
5299
9f33203d
JM
53002012-09-14 Joseph Myers <joseph@codesourcery.com>
5301
5302 PR c/54552
5303 * c-typeck.c (c_cast_expr): When casting to a type requiring
5304 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5305 c_fully_fold first.
5306
a27d595d
JM
53072012-09-14 Joseph Myers <joseph@codesourcery.com>
5308
5309 PR c/54103
5310 * c-typeck.c (build_unary_op): Pass original argument of
5311 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5312 any C_MAYBE_CONST_EXPR, if it has integer operands.
5313 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5314 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5315 to c_objc_common_truthvalue_conversion, then remove any
5316 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5317 c_objc_common_truthvalue_conversion not
5318 c_common_truthvalue_conversion.
5319 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5320 call note_integer_operands for arguments with integer operands
5321 that are not integer constants.
5322
9feb29df
JJ
53232012-09-13 Jakub Jelinek <jakub@redhat.com>
5324
5325 PR c/54559
5326 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5327 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5328
d409320c
JJ
53292012-08-31 Jakub Jelinek <jakub@redhat.com>
5330
5331 PR c/54428
5332 * c-convert.c (convert): Don't call fold_convert_loc if
5333 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5334 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5335 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5336
6265d07c
JJ
53372012-08-24 Jakub Jelinek <jakub@redhat.com>
5338
5339 PR c/54355
5340 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5341 for nested and empty_ok arguments in the call to
5342 c_parser_declaration_or_fndef.
5343
1a4049e7
JJ
53442012-08-17 Jakub Jelinek <jakub@redhat.com>
5345
5346 * c-tree.h (c_last_sizeof_arg): Declare.
5347 * c-parser.c (struct c_tree_loc_pair): New type.
5348 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5349 non-NULL.
5350 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5351 (c_parser_postfix_expression_after_primary): Likewise. Call
5352 sizeof_pointer_memaccess_warning if needed.
5353 (sizeof_ptr_memacc_comptypes): New function.
5354 * c-typeck.c (c_last_sizeof_arg): New global variable.
5355 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5356
0229aee9
UB
53572012-07-24 Uros Bizjak <ubizjak@gmail.com>
5358
5359 * c-lang.h (lang_decl): Add variable_size GTY option.
5360
7ee2468b
SB
53612012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5362
5363 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5364 * Make-lang.in: Fix dependencies.
5365
d4a10d0a
SB
53662012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5367
5368 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5369 and add language Makefile hooks.
5370 * config-lang.in: New file.
5371 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5372 add the required "normal" config-lang.in rules.
5373 * c-lang.h: Moved from gcc/ to here.
5374 * c-tree.h: Likewise.
5375 * c-objc-common.c: Likewise.
5376 * c-objc-common.h: Likewise.
5377 * c-typeck.c: Likewise.
5378 * c-convert.c: Likewise.
5379 * c-lang.c: Likewise.
5380 * c-aux-info.c: Likewise.
5381 * c-errors.c: Likewise.
5382 * gccspec.c: Likewise.
5383 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5384 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5385\f
85ec4feb 5386Copyright (C) 2012-2018 Free Software Foundation, Inc.
d4a10d0a
SB
5387
5388Copying and distribution of this file, with or without modification,
5389are permitted in any medium without royalty provided the copyright
5390notice and this notice are preserved.