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