]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR rtl-optimization/83608 (ICE in convert_move, at expr.c:229 in GIMPLE store...
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
c6cfa2bf
MM
12017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2
3 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
4 and _Float<N>X built-in functions.
5
11d29d63
JJ
62017-12-22 Jakub Jelinek <jakub@redhat.com>
7
14ec014e
JJ
8 PR debug/83550
9 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
10 TYPE_STUB_DECL and call rest_of_type_compilation before processing
11 incomplete vars rather than after it.
12
11d29d63
JJ
13 PR debug/83547
14 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
15 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
16 and consider empty ones if there are no other stmts. For
17 -Wunused-value walk all statements before the one only followed by
18 DEBUG_BEGIN_STMTs.
19
170a8bd6
EB
202017-12-22 Mike Stump <mikestump@comcast.net>
21 Eric Botcazou <ebotcazou@adacore.com>
22
23 * c-parser.c (c_parser_while_statement): Add unroll parameter and
24 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
25 (c_parser_do_statement): Likewise.
26 (c_parser_for_statement): Likewise.
27 (c_parser_statement_after_labels): Adjust calls to above.
28 (c_parse_pragma_ivdep): New static function.
29 (c_parser_pragma_unroll): Likewise.
30 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
31 <PRAGMA_UNROLL>: New case.
32
01512446
JJ
332017-12-19 Jakub Jelinek <jakub@redhat.com>
34
35 * c-typeck.c (comptypes_internal, function_types_compatible_p,
36 perform_integral_promotions, digest_init): Replace Yoda conditions
37 with typical order conditions.
38 * c-decl.c (check_bitfield_type_and_width): Likewise.
39
c65e18d3
BE
402017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
41
42 * c-typeck.c (c_safe_arg_type_equiv_p,
43 c_safe_function_type_cast_p): New function.
44 (build_c_cast): Implement -Wcast-function-type.
45
b7280579
RB
462017-12-14 Richard Biener <rguenther@suse.de>
47
48 PR c/83415
49 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
50 like REALPART_EXPR for the behavior of whether its operand
51 is an lvalue.
52
49e6a6c0
MP
532017-12-12 Marek Polacek <polacek@redhat.com>
54
55 PR c/82679
56 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
57
96a95ac1
AO
582017-12-12 Alexandre Oliva <aoliva@redhat.com>
59
60 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
61 * c-parser.c (add_debug_begin_stmt): New.
62 (c_parser_declaration_or_fndef): Call it.
63 (c_parser_compound_statement_nostart): Likewise.
64 (c_parser_statement_after_labels): Likewise.
65 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
66
4b2b493f
JM
672017-12-07 Joseph Myers <joseph@codesourcery.com>
68
69 * c-decl.c (build_compound_literal): Add parameter alignas_align
70 and set alignment of decl if nonzero.
71 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
72 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
73 qualifier.
74 (c_parser_struct_declaration): Update syntax comment.
75 (c_parser_type_name): Add alignas_ok argument and pass it to
76 c_parser_declspecs.
77 (c_parser_cast_expression): Pass true to c_parser_type_name and
78 give error if a cast used an _Alignas specifier.
79 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
80 give error if sizeof (type-name) used an _Alignas specifier.
81 (c_parser_alignof_expression): Pass true to c_parser_type_name and
82 give error if _Alignof (type-name) used an _Alignas specifier.
83 (c_parser_postfix_expression_after_paren_type): Check specified
84 alignment for a compound literal and pass it to
85 build_compound_literal.
86 * c-parser.h (c_parser_type_name): Update prototype.
87 * c-tree.h (build_compound_literal): Update prototype.
88
5d9ae53d
MS
892017-12-07 Martin Sebor <msebor@redhat.com>
90
91 PR c/81544
92 * c-decl.c (c_decl_attributes): Look up existing declaration and
93 pass it to decl_attributes.
94
c79144f8
DM
952017-12-06 David Malcolm <dmalcolm@redhat.com>
96
97 PR c/83236
98 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
99 reserved for use by the implementation.
100
613bc14f
DM
1012017-12-06 David Malcolm <dmalcolm@redhat.com>
102
103 * c-decl.c: Include "c-family/c-spellcheck.h".
104
05abad4c
ML
1052017-12-05 Martin Liska <mliska@suse.cz>
106 Jakub Jelinek <jakub@redhat.com>
107
108 * c-typeck.c (pointer_diff): Add new argument and instrument
109 pointer subtraction.
110 (build_binary_op): Similar for pointer comparison.
111
cc6534d4
JJ
1122017-12-01 Jakub Jelinek <jakub@redhat.com>
113
65791f42
JJ
114 PR c/79153
115 * c-parser.c: Include tree-iterator.h.
116 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
117 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
118 on it.
119
cc6534d4
JJ
120 PR c/83222
121 * c-tree.h (decl_constant_value_1): Declare.
122 * c-typeck.c (decl_constant_value_1): New function.
123 (decl_constant_value): Use it.
124 * c-fold.c (c_fully_fold_internal): If in_init, use
125 decl_constant_value_1 instead of decl_constant_value.
126
5de73c05
JJ
1272017-11-30 Jakub Jelinek <jakub@redhat.com>
128
129 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
130
058f0b9e
JJ
1312017-11-28 Jakub Jelinek <jakub@redhat.com>
132
133 PR sanitizer/81275
134 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
135 c_switch_covers_all_cases_p returns true.
136
5e9d6aa4
JK
1372017-11-28 Julia Koval <julia.koval@intel.com>
138 Sebastian Peryt <sebastian.peryt@intel.com>
139
140 * Make-lang.in (c/c-array-notation.o): Remove.
141 * c-array-notation.c: Delete.
142 * c-decl.c: Remove cilkplus condition.
143 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
144 c_parser_cilk_verify_simd, c_parser_array_notation,
145 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
146 c_parser_cilk_simd_fn_vector_attrs,
147 c_finish_cilk_simd_fn_tokens): Delete.
148 (c_parser_declaration_or_fndef): Remove cilkplus condition.
149 (c_parser_direct_declarator_inner): Ditto.
150 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
151 (c_parser_attributes, c_parser_compound_statement,
152 c_parser_statement_after_labels, c_parser_if_statement,
153 c_parser_switch_statement, c_parser_while_statement,
154 c_parser_do_statement, c_parser_for_statement,
155 c_parser_unary_expression, c_parser_postfix_expression,
156 c_parser_postfix_expression_after_primary,
157 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
158 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
159 support.
160 * c-typeck.c (build_array_ref, build_function_call_vec,
161 convert_arguments,
162 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
163 c_finish_loop, build_binary_op): Remove cilkplus support.
164
9e851845
JJ
1652017-11-28 Jakub Jelinek <jakub@redhat.com>
166
167 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
168 of build3.
169
8c7dbea9
BK
1702017-11-14 Boris Kolpackov <boris@codesynthesis.com>
171
172 * Make-lang.in (c.install-plugin): Install backend import library.
173
41521dee
JJ
1742017-11-23 Jakub Jelinek <jakub@redhat.com>
175
176 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
177 pragma_stmt context.
178
ac9effed
EB
1792017-11-23 Mike Stump <mikestump@comcast.net>
180 Eric Botcazou <ebotcazou@adacore.com>
181
182 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
183 ANNOTATE_EXPR.
184 (c_parser_do_statement): Likewise.
185 (c_parser_for_statement): Likewise.
186
ce95abc4
DM
1872017-11-22 David Malcolm <dmalcolm@redhat.com>
188
189 PR c++/62170
190 * c-objc-common.c (c_tree_printer): Convert penultimate param from
191 bool to bool *. Within '%T' handling, if showing an "aka", use
192 "quoted" param to add appropriate quoting.
193
974aedcc
MP
1942017-11-22 Marek Polacek <polacek@redhat.com>
195
196 PR c++/60336
197 PR middle-end/67239
198 PR target/68355
199 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
200
d4300cc6
DM
2012017-11-21 David Malcolm <dmalcolm@redhat.com>
202
203 PR c/83056
204 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
205 earlier failed lookups.
206
1af4ebf5
MG
2072017-11-21 Marc Glisse <marc.glisse@inria.fr>
208
209 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
210 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
211
26edace6
DM
2122017-11-20 David Malcolm <dmalcolm@redhat.com>
213
214 PR c/81404
215 * c-decl.c: Include "c-family/known-headers.h".
216 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
217 to known-headers.cc.
218 (class suggest_missing_header): Move to known-header.h.
219 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
220 than get_c_name_hint.
221
b1212255
DM
2222017-11-20 David Malcolm <dmalcolm@redhat.com>
223
224 * c-decl.c (get_c_name_hint): New function.
225 (class suggest_missing_header): New class.
226 (lookup_name_fuzzy): Call get_c_name_hint and use it to
227 suggest missing headers to the user.
228
6c7a259b
DM
2292017-11-20 David Malcolm <dmalcolm@redhat.com>
230
231 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
232 Include "c-family/name-hint.h"
233 (implicit_decl_warning): Convert "hint" from
234 const char * to name_hint. Pass location to
235 lookup_name_fuzzy. Suppress any deferred diagnostic if the
236 warning was not printed.
237 (undeclared_variable): Likewise for "guessed_id".
238 (lookup_name_fuzzy): Convert return type from const char *
239 to name_hint. Add location_t param.
240 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
241 Include "c-family/name-hint.h"
242 (c_parser_declaration_or_fndef): Convert "hint" from
243 const char * to name_hint. Pass location to lookup_name_fuzzy.
244 (c_parser_parameter_declaration): Likewise.
245
f9c59f7e
JJ
2462017-11-19 Jakub Jelinek <jakub@redhat.com>
247
248 PR c/66618
249 PR c/69960
250 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
251 where needed.
252 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
253 handle_omp_array_sections): Likewise.
254 (digest_init): Don't call decl_constant_value_for_optimization.
255 * c-tree.h (decl_constant_value_for_optimization): Removed.
256 * c-fold.c (c_fold_array_ref): New function.
257 (c_fully_fold_internal): Add LVAL argument, propagate it through
258 recursive calls. For VAR_P call decl_constant_value and
259 unshare if not LVAL and either optimizing or IN_INIT. Remove
260 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
261 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
262 (c_fully_fold): Add LVAL argument, pass it through to
263 c_fully_fold_internal.
264 (decl_constant_value_for_optimization): Removed.
265
3ca0dc60
JM
2662017-11-15 Joseph Myers <joseph@codesourcery.com>
267
268 PR c/81156
269 * c-parser.c (check_tgmath_function): New function.
270 (enum tgmath_parm_kind): New enum.
271 (c_parser_postfix_expression): Handle __builtin_tgmath.
272
64a5912c
DM
2732017-10-31 David Malcolm <dmalcolm@redhat.com>
274
275 * c-decl.c (implicit_decl_warning): Update for renaming of
276 pedwarn_at_rich_loc and warning_at_rich_loc.
277 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
278 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
279 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
280 (c_parser_struct_or_union_specifier): Likewise for renaming of
281 pedwarn_at_rich_loc.
282 (c_parser_parameter_declaration): Likewise for renaming of
283 error_at_rich_loc.
284 * c-typeck.c (build_component_ref): Likewise.
285 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
286 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
287 (set_init_label): Likewise for renaming of error_at_rich_loc.
288
c1136864
RB
2892017-10-30 Richard Biener <rguenther@suse.de>
290
291 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
292 stmts.
293
ee5fd23a
MM
2942017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
295
296 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
297 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
298
1a59ccf2
DM
2992017-10-25 David Malcolm <dmalcolm@redhat.com>
300
301 PR c/7356
302 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
303 semicolons.
304
bc1a75dd
JJ
3052017-10-25 Jakub Jelinek <jakub@redhat.com>
306
307 PR libstdc++/81706
308 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
309 newdecl to corresponding __builtin_ if any.
310
ff1ff960
PC
3112017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
312
313 PR c++/82466
314 * c-decl.c (diagnose_mismatched_decls): Use
315 OPT_Wbuiltin_declaration_mismatch.
316
62e1c678
DM
3172017-10-12 David Malcolm <dmalcolm@redhat.com>
318
319 * c-parser.c (c_parser_require): Add "type_is_unique" param and
320 use it to guard calls to maybe_suggest_missing_token_insertion.
321 (c_parser_parms_list_declarator): Override default value of new
322 "type_is_unique" param to c_parser_require.
323 (c_parser_asm_statement): Likewise.
324 * c-parser.h (c_parser_require): Add "type_is_unique" param,
325 defaulting to true.
326
a92f6726
NS
3272017-10-11 Nathan Sidwell <nathan@acm.org>
328
329 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
330
8e6cdc90
RS
3312017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
332
333 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
334 operating on trees as wide_ints.
335 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
336 (c_tree_equal): Likewise.
337
8139a48e
DM
3382017-10-04 David Malcolm <dmalcolm@redhat.com>
339
340 * c-decl.c (push_parm_decl): Store c_parm's location into the
341 PARAM_DECL.
342 (build_c_parm): Add "loc" param and store it within the c_parm.
343 * c-parser.c (struct c_parser): Add "last_token_location" field.
344 (c_parser_consume_token): Store location of the token into the
345 new field.
346 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
347 when handling a FUNCTION_DECL, if it doesn't already have them.
348 (c_parser_parameter_declaration): Generate a location for the
349 parameter, and pass it to the call to build_c_parm.
350 * c-tree.h (struct c_parm): Add field "loc".
351 (build_c_parm): Add location_t param.
352 * c-typeck.c (get_fndecl_argument_location): New function.
353 (inform_for_arg): New function.
354 (convert_for_assignment): Use inform_for_arg when dealing with
355 ic_argpass.
356
2a389958
JJ
3572017-09-29 Jakub Jelinek <jakub@redhat.com>
358
7d386d45
JJ
359 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
360 width is non-NULL.
361 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
362 don't SET_DECL_C_BIT_FIELD here.
363
2a389958
JJ
364 PR c/82340
365 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
366 instead of trying to set just TREE_READONLY manually.
367
ebc6a85e
TV
3682017-09-16 Tom de Vries <tom@codesourcery.com>
369
370 PR c/81875
371 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
372 cond itself.
373
bb75facd
JM
3742017-09-15 Joseph Myers <joseph@codesourcery.com>
375
376 PR c/82071
377 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
378 for C11.
379 (build_conditional_expr): For C11, generate result with excess
380 precision when one argument is an integer and the other is of a
381 type using excess precision.
382
1d933576
BE
3832017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
384
385 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
386
267bbb6f
MP
3872017-09-13 Marek Polacek <polacek@redhat.com>
388
389 PR c/82167
390 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
391 than expr.original_type.
392
6836632e
NS
3932017-09-12 Nathan Sidwell <nathan@acm.org>
394
395 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
396 resort_sorted_fields): Moved from c-family/c-common.c.
397 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
398
e035be33
JM
3992017-09-01 Joseph Myers <joseph@codesourcery.com>
400
401 PR c/82071
402 * c-typeck.c (build_atomic_assign): Handle argument with excess
403 precision. Ensure any EXCESS_PRECISION_EXPR is present in
404 argument passed to build_binary_op and convert_for_assignment but
405 not for call to c_fully_fold.
406 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
407 Ensure build_binary_op is called with argument with original
408 semantic type. Avoid calling c_fully_fold with an
409 EXCESS_PRECISION_EXPR from build_binary_op.
410
d2e05fcb
JJ
4112017-09-01 Jakub Jelinek <jakub@redhat.com>
412
413 PR c/81887
414 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
415
b397965c
RS
4162017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
417 Alan Hayward <alan.hayward@arm.com>
418 David Sherwood <david.sherwood@arm.com>
419
420 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
421 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
422 m1 and m2 to the signed equivalent of a fixed-point
423 SCALAR_TYPE_MODE.
424
14e18d71
DM
4252017-08-24 David Malcolm <dmalcolm@redhat.com>
426
427 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
428 than CAN_HAVE_LOCATION_P when determining whether to use the
429 location_t value within "value".
430
7f204c0f
DM
4312017-08-21 David Malcolm <dmalcolm@redhat.com>
432
433 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
434 rather than peeking the location of the first token.
435 * c-tree.h (c_expr::get_location): New method.
436
2f687306
DM
4372017-08-21 David Malcolm <dmalcolm@redhat.com>
438
439 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
440 to check_function_arguments.
441
3e7b80d7
MP
4422017-08-18 Marek Polacek <polacek@redhat.com>
443
444 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
445 commentary.
446
00aa1fa2
L
4472017-08-18 H.J. Lu <hongjiu.lu@intel.com>
448
449 PR c/53037
450 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
451 (check_bitfield_type_and_width): Don't allow bit-field with
452 warn_if_not_aligned type.
453
da67acb9
MS
4542017-08-14 Martin Sebor <msebor@redhat.com>
455
456 PR c/81117
457 * c-objc-common.c (c_objc_common_init): Handle 'G'.
458
bb85aa74
MP
4592017-08-11 Marek Polacek <polacek@redhat.com>
460
461 PR c/81795
462 * c-decl.c (pushtag): Only print inform if the warning was printed.
463 (grokdeclarator): Likewise.
464
32129a17
DM
4652017-08-10 David Malcolm <dmalcolm@redhat.com>
466
467 * c-parser.c (c_parser_error): Rename to...
468 (c_parser_error_richloc): ...this, making static, and adding
469 "richloc" parameter, passing it to the c_parse_error call,
470 rather than calling c_parser_set_source_position_from_token.
471 (c_parser_error): Reintroduce, reimplementing in terms of the
472 above, converting return type from void to bool.
473 (class token_pair): New class.
474 (struct matching_paren_traits): New struct.
475 (matching_parens): New typedef.
476 (struct matching_brace_traits): New struct.
477 (matching_braces): New typedef.
478 (get_matching_symbol): New function.
479 (c_parser_require): Add param MATCHING_LOCATION, using it to
480 highlight matching "opening" tokens for missing "closing" tokens.
481 (c_parser_skip_until_found): Likewise.
482 (c_parser_static_assert_declaration_no_semi): Convert explicit
483 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
484 class matching_parens, so that the pertinent open parenthesis is
485 highlighted when there are problems locating the close
486 parenthesis.
487 (c_parser_struct_or_union_specifier): Likewise.
488 (c_parser_typeof_specifier): Likewise.
489 (c_parser_alignas_specifier): Likewise.
490 (c_parser_simple_asm_expr): Likewise.
491 (c_parser_braced_init): Likewise, for matching_braces.
492 (c_parser_paren_condition): Likewise, for matching_parens.
493 (c_parser_switch_statement): Likewise.
494 (c_parser_for_statement): Likewise.
495 (c_parser_asm_statement): Likewise.
496 (c_parser_asm_operands): Likewise.
497 (c_parser_cast_expression): Likewise.
498 (c_parser_sizeof_expression): Likewise.
499 (c_parser_alignof_expression): Likewise.
500 (c_parser_generic_selection): Likewise.
501 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
502 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
503 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
504 In case CPP_OPEN_PAREN, pass loc_open_paren to the
505 c_parser_skip_until_found call.
506 (c_parser_objc_class_definition): Use class matching_parens as
507 above.
508 (c_parser_objc_method_decl): Likewise.
509 (c_parser_objc_try_catch_finally_statement): Likewise.
510 (c_parser_objc_synchronized_statement): Likewise.
511 (c_parser_objc_at_property_declaration): Likewise.
512 (c_parser_oacc_wait_list): Likewise.
513 (c_parser_omp_var_list_parens): Likewise.
514 (c_parser_omp_clause_collapse): Likewise.
515 (c_parser_omp_clause_default): Likewise.
516 (c_parser_omp_clause_if): Likewise.
517 (c_parser_omp_clause_num_threads): Likewise.
518 (c_parser_omp_clause_num_tasks): Likewise.
519 (c_parser_omp_clause_grainsize): Likewise.
520 (c_parser_omp_clause_priority): Likewise.
521 (c_parser_omp_clause_hint): Likewise.
522 (c_parser_omp_clause_defaultmap): Likewise.
523 (c_parser_oacc_single_int_clause): Likewise.
524 (c_parser_omp_clause_ordered): Likewise.
525 (c_parser_omp_clause_reduction): Likewise.
526 (c_parser_omp_clause_schedule): Likewise.
527 (c_parser_omp_clause_num_teams): Likewise.
528 (c_parser_omp_clause_thread_limit): Likewise.
529 (c_parser_omp_clause_aligned): Likewise.
530 (c_parser_omp_clause_linear): Likewise.
531 (c_parser_omp_clause_safelen): Likewise.
532 (c_parser_omp_clause_simdlen): Likewise.
533 (c_parser_omp_clause_depend): Likewise.
534 (c_parser_omp_clause_map): Likewise.
535 (c_parser_omp_clause_device): Likewise.
536 (c_parser_omp_clause_dist_schedule): Likewise.
537 (c_parser_omp_clause_proc_bind): Likewise.
538 (c_parser_omp_clause_uniform): Likewise.
539 (c_parser_omp_for_loop): Likewise.
540 (c_parser_cilk_clause_vectorlength): Likewise.
541 (c_parser_cilk_clause_linear): Likewise.
542 (c_parser_transaction_expression): Likewise.
543 * c-parser.h (c_parser_require): Add param matching_location with
544 default UNKNOWN_LOCATION.
545 (c_parser_error): Convert return type from void to bool.
546 (c_parser_skip_until_found): Add param matching_location with
547 default UNKNOWN_LOCATION.
548
30af3a2b
MP
5492017-08-09 Marek Polacek <polacek@redhat.com>
550
551 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
552 * c-tree.h (build_external_ref): Update declaration.
553 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
554 (build_external_ref): Change the type of a parameter to bool.
555 (parser_build_binary_op): Use true/false instead of 1/0.
556 (pointer_diff): Likewise.
557 (build_modify_expr): Likewise.
558 (set_designator): Change the type of a parameter to bool.
559 (set_init_index): Use true/false instead of 1/0.
560 (set_init_label): Likewise.
561 (output_init_element): Change the type of a parameter to bool.
562 (output_pending_init_elements): Use true/false instead of 1/0.
563 (process_init_element): Likewise.
564 (build_binary_op): Change the type of a parameter to bool.
565
296c53ac
MP
5662017-08-09 Marek Polacek <polacek@redhat.com>
567
568 PR c/81233
569 * c-typeck.c (pedwarn_init): Make the function take a variable list.
570 Call emit_diagnostic_valist instead of pedwarn.
571 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
572 Print the relevant types in diagnostics.
573
a32c8316
MP
5742017-08-09 Marek Polacek <polacek@redhat.com>
575
576 PR c/81417
577 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
578 build_conditional_expr.
579 * c-parser.c (c_parser_conditional_expression): Create locations for
580 EXP1 and EXP2 from their source ranges. Pass the locations down to
581 build_conditional_expr.
582 * c-tree.h (build_conditional_expr): Update declaration.
583 * c-typeck.c (build_conditional_expr): Add location_t parameters.
584 For -Wsign-compare, also print the types.
585
314e6352
ML
5862017-08-08 Martin Liska <mliska@suse.cz>
587
588 * c-convert.c: Include header files.
589 * c-typeck.c: Likewise.
590
577eec56
ML
5912017-08-07 Martin Liska <mliska@suse.cz>
592
593 * c-parser.c (c_parser_attributes): Canonicalize name of an
594 attribute.
595
f7b6353a
MP
5962017-08-02 Marek Polacek <polacek@redhat.com>
597
598 PR c/81289
599 * c-parser.c (c_parser_unary_expression): Use set_error.
600
8a6eab34
MP
601 PR c/81448
602 PR c/81306
603 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
604 warnings. Avoid walking MACRO_MAP_LOCATIONS.
605
7fef86d3
JH
6062017-07-31 Jan Hubicka <hubicka@ucw.cz>
607 Martin Liska <mliska@suse.cz>
608
609 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 610 statement.
7fef86d3 611
f34ebeb2
ML
6122017-07-31 Martin Liska <mliska@suse.cz>
613
614 PR sanitize/81530
615 * c-convert.c (convert): Guard condition with flag_sanitize_p
616 also with current_function_decl non-null equality.
617 * c-decl.c (grokdeclarator): Likewise.
618 * c-typeck.c (build_binary_op): Likewise.
619
8595f67b
MP
6202017-07-25 Marek Polacek <polacek@redhat.com>
621
622 * c-decl.c (grokfield): Remove local variable.
623
d49718d6
MP
6242017-07-25 Marek Polacek <polacek@redhat.com>
625
626 PR c/81364
627 * c-parser.c (c_parser_else_body): Don't warn about multistatement
628 macro expansion if the body is in { }.
629 (c_parser_while_statement): Likewise.
630 (c_parser_for_statement): Likewise.
631
ff22eb12
NS
6322017-07-18 Nathan Sidwell <nathan@acm.org>
633
634 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
635
eea77d1f
DM
6362017-07-14 David Malcolm <dmalcolm@redhat.com>
637
638 * c-decl.c (implicitly_declare): When suggesting a missing
639 #include, provide a fix-it hint.
640
b6f43128
DM
6412017-07-06 David Malcolm <dmalcolm@redhat.com>
642
643 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
644 and call that instead.
645 * c-tree.h (selftest::run_c_tests): New decl.
646
3e2becc4
MP
6472017-06-26 Marek Polacek <polacek@redhat.com>
648
649 PR c/80116
650 * c-parser.c (c_parser_if_body): Set the location of the
651 body of the conditional after parsing all the labels. Call
652 warn_for_multistatement_macros.
653 (c_parser_else_body): Likewise.
654 (c_parser_switch_statement): Likewise.
655 (c_parser_while_statement): Likewise.
656 (c_parser_for_statement): Likewise.
657 (c_parser_statement): Add a default argument. Save the location
658 after labels have been parsed.
659 (c_parser_c99_block_statement): Likewise.
660
343ae898
RB
6612017-06-19 Richard Biener <rguenther@suse.de>
662
663 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
664 negated _Literals to parse _Literal (int) -1.
665
45b2222a
ML
6662017-06-13 Martin Liska <mliska@suse.cz>
667
668 PR sanitize/78204
669 * c-convert.c (convert): Use sanitize_flags_p.
670 * c-decl.c (grokdeclarator): Likewise.
671 * c-typeck.c (convert_for_assignment): Likewise.
672 (c_finish_return): Likewise.
673 (build_binary_op): Likewise.
674
8ab7005b
JJ
6752017-06-08 Jakub Jelinek <jakub@redhat.com>
676
677 PR c/81006
678 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
679 to sizetype before size_binop.
680
363dc72c
JJ
6812017-06-07 Jakub Jelinek <jakub@redhat.com>
682
683 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
684 of TDI_generic.
685
dc949728
MP
6862017-06-06 Marek Polacek <polacek@redhat.com>
687
688 PR c/79983
689 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
690 ref.
691 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
692
40ffd95f
BE
6932017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
694
695 * c-parser.c (c_parser_binary_expression): Implement the
696 -Wsizeof_pointer_div warning.
697 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
698 from a parenthesized expression.
699 (c_parser_expr_list): Use c_last_sizeof_loc.
700 * c-tree.h (c_last_sizeof_loc): New external.
701 * c-typeck.c (c_last_sizeof_loc): New variable.
702 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
703
9fc5e7a4
MM
7042017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
705
706 PR testsuite/80580
707 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
708
f012c8ef
DM
7092017-05-30 David Malcolm <dmalcolm@redhat.com>
710
711 * c-objc-common.c (c_tree_printer): Gain bool and const char **
712 parameters.
713
3cd211af
MS
7142017-05-24 Martin Sebor <msebor@redhat.com>
715
716 PR c/80731
717 * c-fold.c (c_fully_fold_internal): Adjust.
718 * c-typeck.c (parser_build_unary_op): Adjust.
719
fd71a9a2
TS
7202017-05-23 Thomas Schwinge <thomas@codesourcery.com>
721
722 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
723 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
724 "VECTOR_LENGTH".
725
92fa0f9e
MP
7262017-05-23 Marek Polacek <polacek@redhat.com>
727
728 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
729 quotes.
730
d11c168a
JJ
7312017-05-22 Jakub Jelinek <jakub@redhat.com>
732
733 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
734 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
735 it returned invariant. Call tree_invariant_p unconditionally
736 afterwards to decide whether to return expr or op0.
737
58aca9d9
NS
7382017-05-22 Nathan Sidwell <nathan@acm.org>
739
740 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
741
7fd549d2
TS
7422017-05-19 Thomas Schwinge <thomas@codesourcery.com>
743
744 * c-parser.c (c_parser_omp_clause_default): Handle
745 "OMP_CLAUSE_DEFAULT_PRESENT".
746
6ecd2339
BE
7472017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
748
749 * config-lang.in (gtfiles): Add c-family/c-format.c.
750
8a57ecff
NS
7512017-05-18 Nathan Sidwell <nathan@acm.org>
752
753 * c-decl.c (pushdecl_top_level): Delete unused function.
754
6574d78e
MP
7552017-05-18 Marek Polacek <polacek@redhat.com>
756
757 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
758 (check_earlier_gotos): Likewise.
759 (define_label): Likewise.
760 (pending_xref_error): Likewise.
761 (smallest_type_quals_location): Likewise.
762 (grokdeclarator): Likewise.
763 (grokparms): Likewise.
764 (identifier_global_value): Likewise.
765 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
766 (find_init_member): Likewise.
767
e3455240
MP
7682017-05-18 Marek Polacek <polacek@redhat.com>
769
770 * c-decl.c (start_decl): Use false/true instead of 0/1.
771 (grokdeclarator): Likewise.
772 (finish_struct): Likewise.
773 (start_function): Change the return type to bool. Use false/true
774 instead of 0/1.
775 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
776 * c-tree.h (start_function): Update.
777 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
778 (set_designator): Change the return type to bool. Use false/true
779 instead of 0/1.
780
3fa8871b
MP
7812017-05-17 Marek Polacek <polacek@redhat.com>
782
783 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
784 * c-typeck.c: Likewise.
785
142473df
MP
7862017-05-17 Marek Polacek <polacek@redhat.com>
787
788 PR sanitizer/80659
789 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
790 DECL_IGNORED_P even for non-static compound literals.
791
1a817418
ML
7922017-05-17 Martin Liska <mliska@suse.cz>
793
794 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
795 use it instead of int type.
796
b2fa0a8b
MP
7972017-05-17 Marek Polacek <polacek@redhat.com>
798
799 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
800 call c_fully_fold.
801 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
802 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
803 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
804 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
805 save_expr.
806 (c_parser_conditional_expression): Likewise.
807 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
808 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
809 (process_init_element): Likewise.
810 (build_binary_op): Likewise.
811 (handle_omp_array_sections_1): Likewise.
812
1e47f02b
TS
8132017-05-12 Thomas Schwinge <thomas@codesourcery.com>
814
815 * c-parser.c (c_parser_omp_clause_num_gangs)
816 (c_parser_omp_clause_num_workers)
817 (c_parser_omp_clause_vector_length): Merge functions into...
818 (c_parser_oacc_single_int_clause): ... this new function. Adjust
819 all users.
820
c24e924f
NS
8212017-05-11 Nathan Sidwell <nathan@acm.org>
822
823 * gimple-parser.c: Don't #include tree-dump.h.
824
c587104e
MM
8252017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
826
827 PR testsuite/80580
828 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
829
67ac9a9d
MM
8302017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
831
832 PR testsuite/80580
833 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
834 incorrect __MEM syntax.
835
ac4eb40f
MM
8362017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
837
838 PR testsuite/80580
839 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
840 type of unary '*'.
841
641da50a
NS
8422017-05-09 Nathan Sidwell <nathan@acm.org>
843
844 * c-tree.h (pushdecl): Declare.
845
56d35585
DM
8462017-05-05 David Malcolm <dmalcolm@redhat.com>
847
848 * c-decl.c (warn_defaults_to): Replace report_diagnostic
849 with diagnostic_report_diagnostic.
850 * c-errors.c (pedwarn_c99): Likewise.
851 (pedwarn_c90): Likewise.
852
815d9cc6
XR
8532017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
854
855 PR c++/80038
856 * c-gimplify.c (c_gimplify_expr): Remove calls to
857 cilk_gimplifY_call_params_in_spawned_fn.
858
1c4ea66f
DM
8592017-04-25 David Malcolm <dmalcolm@redhat.com>
860
861 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
862 hint for removing extra semicolon.
863
666f7903
JJ
8642017-04-21 Jakub Jelinek <jakub@redhat.com>
865
866 PR c/80468
867 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
868 enabled, set specs->type to integer_type_node.
869
5764ee3c
JW
8702017-04-03 Jonathan Wakely <jwakely@redhat.com>
871
872 * c-array-notation.c: Fix typo in comment.
873
10fa8dfb
MP
8742017-03-29 Marek Polacek <polacek@redhat.com>
875
876 PR c/79730
877 * c-decl.c (finish_decl): Check VAR_P.
878
a9e4a1a5
JJ
8792017-03-27 Jakub Jelinek <jakub@redhat.com>
880
881 PR middle-end/80162
882 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
883 * c-typeck.c (c_mark_addressable): Likewise. Look through
884 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
885 to ARRAY_TYPE.
886 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
887
ee3ff394
MP
8882017-03-23 Marek Polacek <polacek@redhat.com>
889
890 * c-tree.h: Remove a C_RID_YYCODE reference.
891
4d1b8e70
JJ
8922017-03-21 Jakub Jelinek <jakub@redhat.com>
893
894 PR c/80097
895 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
896 optional COMPOUND_EXPR with ubsan instrumentation.
897
31dc71a8
MP
8982017-03-17 Marek Polacek <polacek@redhat.com>
899
900 * c-parser.c: Add C11 references.
901
d579c385
MP
9022017-03-15 Marek Polacek <polacek@redhat.com>
903
904 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
905
85059a38
MP
9062017-03-11 Marek Polacek <polacek@redhat.com>
907
908 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
909
2f6f187a
DM
9102017-03-10 David Malcolm <dmalcolm@redhat.com>
911
912 PR translation/79848
913 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
914 "%qs".
915 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
916
36618428
MP
9172017-03-09 Marek Polacek <polacek@redhat.com>
918
919 PR sanitizer/79757
920 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
921 parameter declarations with initializers.
922
01e5af5a
JJ
9232017-03-09 Jakub Jelinek <jakub@redhat.com>
924
925 PR c/79969
926 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
927 TYPE_STUB_DECL.
928
a71dbc63
JJ
9292017-03-07 Jakub Jelinek <jakub@redhat.com>
930
931 PR c/79834
932 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
933 for "may only be used in compound statements" diagnostics, change it
934 such that the same translatable string is used for all pragmas. For
935 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
936 diagnostics.
937 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
938 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
939 "may only be used in compound statements" diagnostics, such that the
940 same translatable string is used for all pragmas.
941
1ff4bae6
MP
9422017-03-04 Marek Polacek <polacek@redhat.com>
943
944 PR c/79847
945 * c-decl.c (implicit_decl_warning): Add missing space.
946
7f5a7d78
MP
9472017-03-03 Marek Polacek <polacek@redhat.com>
948
949 PR c/79758
950 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
951 current_function_prototype_arg_types is error_mark_node. Fix
952 formatting. Use TREE_VALUE instead of TREE_TYPE.
953
883c8f06
JJ
9542017-03-03 Jakub Jelinek <jakub@redhat.com>
955
79c9b7a8
JJ
956 PR c/79837
957 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
958 %<min%> or %<max%> in the diagnostics, instead mention identifier.
959 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
960 diagnostics.
961
883c8f06
JJ
962 PR c/79836
963 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
964 instead of %<_Generic>.
965 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
966 (c_parser_omp_target_exit_data): Use %<release%> instead of
967 %<release>.
968
324ff1a0
JJ
9692017-02-28 Jakub Jelinek <jakub@redhat.com>
970
971 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
972 instead of just cond ? "..." : "...".
973 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
974 for "enter"/"exit" keyword.
975 (c_finish_oacc_routine): Don't use %s to supply portions of the
976 message.
977
4227c9ad
JJ
9782017-02-24 Jakub Jelinek <jakub@redhat.com>
979
980 PR c++/79588
981 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
982 handle -Wrestrict here.
983 * c-typeck.c (build_function_call_vec): Adjust
984 check_function_arguments caller.
985
5d972e66
RB
9862017-02-23 Richard Biener <rguenther@suse.de>
987
988 PR c/79684
989 * gimple-parser.c (c_parser_gimple_statement): Use set_error
990 to initialize c_exprs to return.
991 (c_parser_gimple_binary_expression): Likewise.
992 (c_parser_gimple_unary_expression): Likewise.
993 (c_parser_gimple_postfix_expression): Likewise.
994
61ac5ebe
MP
9952017-02-22 Marek Polacek <polacek@redhat.com>
996
997 PR c/79662
998 * c-typeck.c (convert_arguments): Handle error_mark_node.
999
41d1b0b1
PK
10002017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1001
1002 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1003 value of c_parser_parse_ssa_name against error_mark_node and emit
1004 error if ssa name is anonymous and written as default definition.
1005
eab1f169
PK
10062017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1007
1008 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1009 FMA_EXPR.
1010
bcac0b4d
JJ
10112017-02-16 Jakub Jelinek <jakub@redhat.com>
1012
1013 PR c++/79512
1014 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1015 ignore #pragma omp target even when not followed by identifier.
1016
1be33173
PK
10172017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1018
1019 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1020 (c_parser_gimple_unary_expression): Likewise.
1021
aa326bfb
JJ
10222017-02-13 Jakub Jelinek <jakub@redhat.com>
1023
1024 * c-parser.c (c_parser_oacc_declare): Add missing space in
1025 diagnostics.
1026
8a398bc5
PK
10272017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1028
1029 PR c/79478
1030 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1031 set_c_expr_source_range when parsing ssa-name.
1032
3dcde5ef
PG
10332017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1034 Richard Biener <rguenther@suse.de>
1035
1036 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1037 building IL when arguments are error_mark_node.
1038 (c_parser_gimple_unary_expression): Likewise.
1039 (c_parser_gimple_if_stmt): Likewise.
1040 (c_parser_gimple_switch_stmt): Likewise.
1041 (c_parser_gimple_return_stmt): Likewise.
1042 (c_parser_parse_ssa_name): When name lookup fails do not build
1043 an SSA name. Use undeclared rather than not declared in error
1044 reporting.
1045
192b048b
MP
10462017-02-09 Marek Polacek <polacek@redhat.com>
1047
1048 PR c/79428
1049 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1050 instead of c_parser_skip_until_found.
1051
56f71478
JJ
10522017-02-09 Jakub Jelinek <jakub@redhat.com>
1053
1054 PR c/79431
1055 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1056 symtab_node::get on automatic variables.
1057
02889d23
CLT
10582016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1059 Chung-Lin Tang <cltang@codesourcery.com>
1060
1061 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1062 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1063 semantic checking.
1064 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1065
7af4b20d
RB
10662017-02-07 Richard Biener <rguenther@suse.de>
1067
1068 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1069 (c_parser_gimple_postfix_expression_after_primary):
1070 Do not use c_build_function_call_vec to avoid folding and promotion.
1071 Simplify.
1072
e5e391d6
MO
10732017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1074
1075 PR lto/79061
1076 * c-decl.c (pop_scope): Pass main_input_filename to
1077 build_translation_unit_decl.
1078
c2e84327
DM
10792017-01-24 David Malcolm <dmalcolm@redhat.com>
1080
1081 * c-parser.c: Include "read-rtl-function.h" and
1082 "run-rtl-passes.h".
1083 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1084 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1085 production. Update for renaming of field "gimple_pass" to
1086 "gimple_or_rtl_pass". If __RTL was seen, call
1087 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1088 to an auto_timevar, to cope with early exit.
1089 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1090 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1091 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1092 Handle RID_RTL.
1093 (c_parser_parse_rtl_body): New function.
1094 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1095 (struct c_declspecs): Rename field "gimple_pass" to
1096 "gimple_or_rtl_pass". Add field "rtl_p".
1097 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1098 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1099 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1100 (c_parser_gimple_or_rtl_pass_list): ...this.
1101
2ebd93e1
MP
11022017-01-20 Marek Polacek <polacek@redhat.com>
1103
1104 PR c/64279
1105 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1106
b1c95bb5
RB
11072017-01-13 Richard Biener <rguenther@suse.de>
1108
1109 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1110 nops.
1111
25329913
RB
11122017-01-13 Richard Biener <rguenther@suse.de>
1113
1114 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1115 _Literal ( type-name ) number.
1116
6bb4ea5c
RB
11172017-01-12 Richard Biener <rguenther@suse.de>
1118
1119 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1120 __MEM.
1121
6b5b4e9c
JJ
11222017-01-11 Jakub Jelinek <jakub@redhat.com>
1123
1124 PR c++/72813
1125 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1126 PCH file.
1127
e3252775
RB
11282017-01-11 Richard Biener <rguenther@suse.de>
1129
1130 PR bootstrap/79052
1131 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1132 returns on parse errors.
1133
a9342885
MP
11342017-01-04 Marek Polacek <polacek@redhat.com>
1135
1136 PR c++/64767
1137 * c-parser.c (c_parser_postfix_expression): Mark zero character
1138 constants by setting original_type in c_expr.
1139 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1140 with a zero character constant.
1141 (char_type_p): New function.
1142
5dd9a9d0
DM
11432017-01-04 David Malcolm <dmalcolm@redhat.com>
1144
1145 * c-parser.c (c_parser_declaration_or_fndef): Create a
1146 rich_location at init_loc and parse it to start_init.
1147 (last_init_list_comma): New global.
1148 (c_parser_braced_init): Update last_init_list_comma when parsing
1149 commas. Pass it to pop_init_level. Pass location of closing
1150 brace to pop_init_level.
1151 (c_parser_postfix_expression_after_paren_type): Create a
1152 rich_location at type_loc and parse it to start_init.
1153 (c_parser_omp_declare_reduction): Likewise for loc.
1154 * c-tree.h (start_init): Add rich_location * param.
1155 (pop_init_level): Add location_t param.
1156 * c-typeck.c (struct initializer_stack): Add field
1157 "missing_brace_richloc".
1158 (start_init): Add richloc param, use it to initialize
1159 the stack node's missing_brace_richloc.
1160 (last_init_list_comma): New decl.
1161 (finish_implicit_inits): Pass last_init_list_comma to
1162 pop_init_level.
1163 (push_init_level): When finding missing open braces, add fix-it
1164 hints to the richloc.
1165 (pop_init_level): Add "insert_before" param and pass it
1166 when calling pop_init_level. Add fixits about missing
1167 close braces to any richloc. Use the richloc for the
1168 -Wmissing-braces warning.
1169 (set_designator): Pass last_init_list_comma to pop_init_level.
1170 (process_init_element): Likewise.
1171
cbe34bb5
JJ
11722017-01-01 Jakub Jelinek <jakub@redhat.com>
1173
1174 Update copyright years.
1175
d17680f3
JJ
11762016-12-21 Jakub Jelinek <jakub@redhat.com>
1177
0dba7960
JJ
1178 PR bootstrap/78817
1179 * c-typeck.c (build_function_call_vec): If check_function_arguments
1180 returns true, set TREE_NO_WARNING on CALL_EXPR.
1181
d17680f3
JJ
1182 PR c/77767
1183 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1184 to *expr instead of overwriting it.
1185
aa90531e
RB
11862016-12-20 Richard Biener <rguenther@suse.de>
1187
1188 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1189 error recovery.
1190 (c_parser_gimple_statement): Only build assigns for non-error
1191 stmts.
1192 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1193
629b3d75
MJ
11942016-12-14 Martin Jambor <mjambor@suse.cz>
1195
1196 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1197 omp-low.h.
1198 (c_finish_oacc_routine): Adjusted call to
1199 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1200 to use their new names.
1201 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1202 use its new name.
1203 (c_parser_oacc_update): Likewise.
1204 (c_parser_omp_simd): Likewise.
1205 (c_parser_omp_target_update): Likewise.
1206 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1207 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1208 name.
1209 (c_finish_omp_cancellation_point): Likewise.
1210 * gimple-parser.c: Do not include omp-low.h
1211
c5af52eb
CP
12122016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1213 James Norris <jnorris@codesourcery.com>
1214
1215 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1216 EXIT_DATA,WAIT} are not used in compound statements.
1217 (c_parser_oacc_enter_exit_data): Update diagnostics.
1218
48330c93
BE
12192016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1220
1221 PR c++/71973
1222 * c-decl.c (diagnose_mismatched_decls): Use
1223 OPT_Wbuiltin_declaration_mismatch here too.
1224
899ca90e 12252016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1226 Alan Hayward <alan.hayward@arm.com>
1227 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1228
1229 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1230 (make_label, finish_struct): Likewise.
1231
1ee62b92 12322016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1233 Richard Biener <rguenther@suse.de>
22b15758 1234
8e745a17
JJ
1235 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1236 * config-lang.in (gtfiles): Add c/c-parser.h.
1237 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1238 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1239 * c-parser.c (enum c_id_kind, struct c_token,
1240 c_parser_next_token_is, c_parser_next_token_is_not,
1241 c_parser_next_token_is_keyword,
1242 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1243 Split out to ...
1244 * c-parser.h: ... new header.
1245 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1246 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1247 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1248 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1249 c_parser_error, c_parser_require, c_parser_skip_until_found,
1250 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1251 c_parser_type_name): Export.
1252 (c_parser_tokens_buf): New function.
1253 (c_parser_error): Likewise.
1254 (c_parser_set_error): Likewise.
1255 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1256 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1257 via c_parser_parse_gimple_body.
8e745a17
JJ
1258 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1259 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1260 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1261 c_parser_error, c_parser_require, c_parser_skip_until_found,
1262 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1263 c_parser_type_name): Declare.
1ee62b92
PG
1264 (struct c_parser): Declare forward.
1265 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1266 (c_parser_error): Likewise.
1267 (c_parser_set_error): Likewise.
1268 * gimple-parser.c: New file.
1269 * gimple-parser.h: Likewise.
1ee62b92 1270
22b15758
UB
12712016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1272
1273 PR c/35503
1274 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1275 warn_for_restrict.
1276
84ff4775
LCW
12772016-09-11 Le-Chun Wu <lcwu@google.com>
1278 Mark Wielaard <mjw@redhat.com>
1279
1280 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1281 to the given -Wshadow= variant.
1282
4d0cdd0c
TP
12832016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1284
1285 * c-typeck.c: Include memmodel.h.
1286
1202f33e
JJ
12872016-10-13 Jakub Jelinek <jakub@redhat.com>
1288
1289 PR target/77957
1290 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1291 instead of lhd_return_null_tree_v.
1292
8a14afd0
BS
12932016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1294
1295 PR c++/69733
1296 * c-decl.c (smallest_type_quals_location): New static function.
1297 (grokdeclarator): Try to find the correct location for an ignored
1298 qualifier.
1299
81fea426
MP
13002016-09-26 Marek Polacek <polacek@redhat.com>
1301
1302 PR c/7652
1303 * c-decl.c (pop_scope): Add gcc_fallthrough.
1304
13052016-09-26 Marek Polacek <polacek@redhat.com>
1306
1307 PR c/7652
1308 * c-parser.c (struct c_token): Add flags field.
1309 (c_lex_one_token): Pass it to c_lex_with_flags.
1310 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1311 into IFN_FALLTHROUGH.
1312 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1313 attribute fallthrough after a case label or default label.
1314 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1315
9a2300e9
MP
13162016-09-24 Marek Polacek <polacek@redhat.com>
1317
1318 PR c/77490
1319 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1320 have boolean value. Warn about ++/-- on booleans.
1321
7de76362
JJ
13222016-09-23 Jakub Jelinek <jakub@redhat.com>
1323
1324 * c-parser.c (incomplete_record_decls): Remove unnecessary
1325 = vNULL initialization of file scope vec.
1326
5b73d2ab
MP
13272016-09-16 Marek Polacek <polacek@redhat.com>
1328
1329 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1330
e51fbec3
MP
13312016-09-14 Marek Polacek <polacek@redhat.com>
1332
1333 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1334 (fix_array_notation_expr): Likewise.
1335 * c-decl.c (finish_decl): Likewise.
1336 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1337 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1338 (function_to_pointer_conversion): Use false instead of 0.
1339 (convert_lvalue_to_rvalue): Likewise.
1340 (parser_build_unary_op): Likewise.
1341 (build_atomic_assign): Likewise.
1342 (build_unary_op): Change nonconvert parameter type to bool, use
1343 true/false instead of 1/0.
1344 (build_binary_op): Use true instead of 1.
1345
254830ba
DM
13462016-09-13 David Malcolm <dmalcolm@redhat.com>
1347
1348 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1349 of add_fixit_insert to add_fixit_insert_before.
1350
4c13ba17
MP
13512016-09-13 Marek Polacek <polacek@redhat.com>
1352
1353 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1354 it.
1355
54dcdb88
BE
13562016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1357
1358 PR c++/77496
1359 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1360 COMPOUND_EXPR to warn_for_omitted_condop.
1361
e5106e27
DM
13622016-09-07 David Malcolm <dmalcolm@redhat.com>
1363
1364 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1365 c_get_substring_location for this new langhook.
1366
9dc5773f
JJ
13672016-09-02 Jakub Jelinek <jakub@redhat.com>
1368
1369 PR c/65467
1370 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1371 flag_openmp.
1372 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1373 instead of mark_exp_read on low_bound/length expression.
1374 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1375 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1376 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1377 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1378 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1379 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1380 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1381 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1382 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1383 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1384 instead of mark_expr_read.
1385 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1386 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1387 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1388 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1389 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1390 array section bases outside of depend clause, for depend clause
1391 use convert_lvalue_to_rvalue on the base.
1392 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1393 linear, aligned, map, to and from clauses.
1394 (c_omp_clause_copy_ctor): New function.
1395
295844f6
MP
13962016-09-01 Marek Polacek <polacek@redhat.com>
1397
1398 PR c/7652
1399 * c-typeck.c (composite_type): Add FALLTHRU comment.
1400
089af25c
DM
14012016-08-31 David Malcolm <dmalcolm@redhat.com>
1402
1403 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1404 to the insertion fixits for "struct", "union", and "enum".
1405
f9087798
DM
14062016-08-30 David Malcolm <dmalcolm@redhat.com>
1407
1408 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1409 rather than add_fixit_misspelled_id.
1410 (undeclared_variable): Likewise.
1411 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1412 now-redundant "here" params from add_fixit_insert method calls.
1413 (c_parser_parameter_declaration): Likewise.
1414 * c-typeck.c (build_component_ref): Remove now-redundant range
1415 param from add_fixit_replace method calls.
1416
ebef225f
MP
14172016-08-25 Marek Polacek <polacek@redhat.com>
1418
1419 * c-typeck.c (parser_build_binary_op): Pass LHS to
1420 warn_logical_not_parentheses.
1421
fe377a48
MP
14222016-08-25 Marek Polacek <polacek@redhat.com>
1423
1424 PR c/77323
1425 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1426 or _FloatN or _FloatNx is not supported.
1427 (finish_declspecs): Set type to integer_type_node when _FloatN or
1428 _FloatNx is not supported.
1429
c65699ef
JM
14302016-08-19 Joseph Myers <joseph@codesourcery.com>
1431
1432 PR c/32187
1433 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1434 (struct c_declspecs): Add field floatn_nx_idx.
1435 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1436 and _FloatNx type specifiers.
1437 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1438 (c_parser_declspecs, c_parser_attribute_any_word)
1439 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1440 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1441 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1442 narrower than double.
1443
2f1364c2
JJ
14442016-08-12 Jakub Jelinek <jakub@redhat.com>
1445 Martin Liska <mliska@suse.cz>
1446
1447 PR c/67410
1448 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1449 % to determine val element to change. Assert that
1450 wchar_bytes * charwidth fits into val array.
1451
191816a3
MP
14522016-08-12 Marek Polacek <polacek@redhat.com>
1453
1454 PR c/7652
1455 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1456 (c_parser_postfix_expression): Likewise.
1457 * c-typeck.c (build_unary_op): Adjust fall through comment.
1458 (c_mark_addressable): Likewise.
1459
b95a64bb
JJ
14602016-08-11 Jakub Jelinek <jakub@redhat.com>
1461
1462 PR c/72816
1463 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1464 array member through typedef, for orig_qual_indirect == 0 clear
1465 orig_qual_type.
1466
895aa8e1
DM
14672016-08-08 David Malcolm <dmalcolm@redhat.com>
1468
1469 PR c/64955
1470 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1471 this up to selftest::run_c_tests.
1472 (selftest::run_c_tests): New function.
1473
0b212d8c
TS
14742016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1475
ae9281fc
TS
1476 * c-parser.c (struct oacc_routine_data): Add error_seen and
1477 fndecl_seen members.
1478 (c_finish_oacc_routine): Use these.
1479 (c_parser_declaration_or_fndef): Adjust.
1480 (c_parser_oacc_routine): Likewise. Support more C language
1481 constructs, and improve diagnostics. Move pragma context
1482 checking...
1483 (c_parser_pragma): ... here.
1484
0b212d8c
TS
1485 * c-parser.c (struct oacc_routine_data): New.
1486 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1487 Simplify code.
1488 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1489 declare target" attribute.
1490
76e2c821
JB
14912016-08-01 Jan Beulich <jbeulich@suse.com>
1492
1493 * c-fold.c (c_fully_fold_internal): Also emit shift count
1494 warnings for vector types.
1495 * c-typeck.c (build_binary_op): Likewise.
1496
f618a472
MP
14972016-07-29 Marek Polacek <polacek@redhat.com>
1498
1499 PR c/71742
1500 * c-decl.c (finish_struct): Rephrase an error message.
1501
efd0786f
MP
1502 PR c/71853
1503 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1504 to error node for invalid code.
1505
e00dceaf
MP
1506 PR c/71573
1507 * c-decl.c (implicitly_declare): Return decl early not only for
1508 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1509
673a107a
JJ
15102016-07-29 Jakub Jelinek <jakub@redhat.com>
1511
1512 PR c/71969
1513 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1514 on GNU extern inline functions.
1515
a5b5c8b6
MP
15162016-07-29 Marek Polacek <polacek@redhat.com>
1517
1518 PR c/71583
1519 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1520 check expr.value.
1521
e3fe09c1
UB
15222016-07-22 Uros Bizjak <ubizjak@gmail.com>
1523
1524 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1525
7c8f7eaa
DM
15262016-07-20 David Malcolm <dmalcolm@redhat.com>
1527
1528 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1529 spellcheck-tree.h
1530 (best_macro_match): Likewise, converting from a typedef to a
1531 subclass.
1532 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1533 (lookup_name_fuzzy): Update for change of best_macro_match to a
1534 subclass with a ctor that calls cpp_forall_identifiers.
1535
de6a69ee
DM
15362016-07-20 David Malcolm <dmalcolm@redhat.com>
1537
1538 * c-decl.c (implicit_decl_warning): Update for conversion of
1539 return type of lookup_name_fuzzy to const char *.
1540 (undeclared_variable): Likewise.
1541 (lookup_name_fuzzy): Convert return type from tree to
1542 const char *.
1543 * c-parser.c (c_parser_declaration_or_fndef): Update for
1544 conversion of return type of lookup_name_fuzzy to const char *.
1545 (c_parser_parameter_declaration): Likewise.
1546
b1c9c068
CP
15472016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1548
1549 * c-parser.c (c_parser_oacc_declare): Don't scan for
1550 GOMP_MAP_POINTER.
1551 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1552 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1553 zero-length subarrays.
1554
ddbbcb19
JJ
15552016-07-15 Jakub Jelinek <jakub@redhat.com>
1556
1557 PR c/71858
1558 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1559 instead of FUZZY_LOOKUP_NAME.
1560 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1561 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1562
dd36b877
JJ
15632016-07-14 Jakub Jelinek <jakub@redhat.com>
1564
1565 PR c/71858
1566 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1567
8c681247
TS
15682016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1569
1570 * c-parser.c (c_parser_generic_selection): Make type of variable
1571 auto_vec.
1572 (c_parser_omp_declare_simd): Likewise.
1573
bf4fa671
TS
15742016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1575
1576 * c-decl.c (struct c_struct_parse_info): Change member types
1577 from vec to auto_vec.
1578 (start_struct): Adjust.
1579 (finish_struct): Likewise.
1580
557e8c49
JJ
15812016-07-02 Jakub Jelinek <jakub@redhat.com>
1582
1583 PR c/71719
1584 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1585
54d19c3b
TS
15862016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1587
1588 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1589 Move pragma context checking into...
1590 (c_parser_omp_cancellation_point): ... here, and improve
1591 diagnostic messages.
1592 * c-typeck.c (c_finish_omp_cancel)
1593 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1594
152ef731
JJ
15952016-06-29 Jakub Jelinek <jakub@redhat.com>
1596
1597 PR c/71685
1598 * c-typeck.c (c_build_qualified_type): Don't clear
1599 C_TYPE_INCOMPLETE_VARS for the main variant.
1600
16012016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1602
1603 PR c/71552
1604 * c-typeck.c (output_init_element): Diagnose incompatible types
1605 before non-constant initializers.
1606
e9ac1f86
JJ
16072016-06-28 Jakub Jelinek <jakub@redhat.com>
1608
1609 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1610
277d7ee0
AK
16112016-06-23 Andi Kleen <ak@linux.intel.com>
1612
1613 * Make-lang.in: Add support for autofdo.
1614
1a4f11c8
DM
16152016-06-22 David Malcolm <dmalcolm@redhat.com>
1616
1617 PR c/70339
1618 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1619 (implicit_decl_warning): When issuing warnings for implicit
1620 declarations, attempt to provide a suggestion via
1621 lookup_name_fuzzy.
1622 (undeclared_variable): Likewise when issuing errors.
1623 (lookup_name_in_scope): Likewise.
1624 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1625 (best_macro_match): New typedef.
1626 (find_closest_macro_cpp_cb): New function.
1627 (lookup_name_fuzzy): New function.
1628 * c-parser.c: Include gcc-rich-location.h.
1629 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1630 (c_keyword_starts_typename): ...this new function.
1631 (c_parser_declaration_or_fndef): When issuing errors about
1632 missing "struct" etc, add a fixit. For other kinds of errors,
1633 attempt to provide a suggestion via lookup_name_fuzzy.
1634 (c_parser_parms_declarator): When looking ahead to detect typos in
1635 type names, also reject CPP_KEYWORD.
1636 (c_parser_parameter_declaration): When issuing errors about
1637 unknown type names, attempt to provide a suggestion via
1638 lookup_name_fuzzy.
1639 * c-tree.h (c_keyword_starts_typename): New prototype.
1640
5a578671
JM
16412016-06-20 Joseph Myers <joseph@codesourcery.com>
1642
1643 PR c/71601
1644 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1645 c_common_type returns error_mark_node.
1646
3f8257db 16472016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1648
1649 PR c/69507
1650 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1651 __alignof__ (expression).
1652
6a3f203c
DM
16532016-06-14 David Malcolm <dmalcolm@redhat.com>
1654
1655 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1656
264757fb
DM
16572016-06-14 David Malcolm <dmalcolm@redhat.com>
1658
1659 * c-typeck.c (build_component_ref): Simplify fixit code by
1660 using gcc_rich_location::add_fixit_misspelled_id.
1661 (set_init_label): Likewise.
1662
f7e4f2e3
DM
16632016-06-13 David Malcolm <dmalcolm@redhat.com>
1664
1665 * c-parser.c (c_parser_initelt): Provide location of name for new
1666 location_t param of set_init_label.
1667 * c-tree.h (set_init_label): Add location_t param.
1668 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1669 param and use it when issuing error messages about unrecognized
1670 field names. Attempt to provide a fixit hint if appropriate,
1671 otherwise update the error message to provide the type name.
1672
4b1ffdb1
TS
16732016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1674
1675 PR c/71381
1676 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1677 Loosen checking.
1678
44a845ca
MS
16792016-06-08 Martin Sebor <msebor@redhat.com>
1680 Jakub Jelinek <jakub@redhat.com>
1681
1682 PR c++/70507
1683 PR c/68120
1684 * c-typeck.c (convert_arguments): Don't promote last argument
1685 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1686
92a5f2ba
MP
16872016-06-08 Marek Polacek <polacek@redhat.com>
1688
1689 PR c/71418
1690 * c-decl.c (grokdeclarator): Check TYPE_P.
1691
08203f73
MP
1692 PR c/71426
1693 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1694 code.
1695
6ffd47b7
DM
16962016-06-07 David Malcolm <dmalcolm@redhat.com>
1697
1698 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1699 and structure element reference, capture the location of the
1700 element name token and pass it to build_component_ref.
1701 (c_parser_postfix_expression_after_primary): Likewise for
1702 structure element dereference.
1703 (c_parser_omp_variable_list): Likewise for
1704 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1705 * c-tree.h (build_component_ref): Add location_t param.
1706 * c-typeck.c (build_component_ref): Add location_t param
1707 COMPONENT_LOC. Use it, if available, when issuing hints about
1708 mispelled member names to provide a fixit replacement hint.
1709
1f40cff3
MP
17102016-06-06 Marek Polacek <polacek@redhat.com>
1711
1712 PR c/71362
1713 * c-parser.c (c_parser_direct_declarator): Set location.
1714
5545a907
MP
17152016-06-06 Marek Polacek <polacek@redhat.com>
1716
1717 * c-typeck.c (comptypes_internal): Handle comparisons of
1718 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1719 TYPE_REF_CAN_ALIAS_ALL.
1720
b605f663
CLT
17212016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1722
1723 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1724 arguments as addressable when async clause exists.
1725
00631022
JJ
17262016-05-30 Jakub Jelinek <jakub@redhat.com>
1727
1728 PR c++/71349
1729 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1730 when combined with target construct.
1731
7211a097
JJ
17322016-05-26 Jakub Jelinek <jakub@redhat.com>
1733
1734 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1735 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1736
95efe6b6
MP
17372016-05-25 Marek Polacek <polacek@redhat.com>
1738
1739 PR c/71265
1740 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1741
a23faf7a
MP
1742 PR c/71266
1743 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1744
e46c7770
CP
17452016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1746
1747 * c-parser.c (c_parser_oacc_declare): Add support for
1748 GOMP_MAP_FIRSTPRIVATE_POINTER.
1749 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1750 argument with enum c_omp_region_type ort.
1751 (handle_omp_array_sections): Likewise. Update call to
1752 handle_omp_array_sections_1.
1753 (c_finish_omp_clauses): Add specific errors and warning messages for
1754 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1755 call to handle_omp_array_sections.
1756
a04e69c0
TS
17572016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1758
1759 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1760
f17a223d
RB
17612016-05-24 Richard Biener <rguenther@suse.de>
1762
1763 PR middle-end/70434
1764 PR c/69504
1765 * c-typeck.c (build_array_ref): Do not complain about indexing
1766 non-lvalue vectors. Adjust for function name change.
1767
79063edd
MS
17682016-05-20 Martin Sebor <msebor@redhat.com>
1769
1770 PR c/71115
1771 * c-typeck.c (error_init): Use
1772 expansion_point_location_if_in_system_header.
1773 (warning_init): Same.
1774
8a40fef3
DM
17752016-05-19 David Malcolm <dmalcolm@redhat.com>
1776
1777 PR c/71171
1778 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1779 in error-handling.
1780 (c_parser_postfix_expression): Likewise.
1781 * c-tree.h (c_expr::set_error): New method.
1782 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1783 that result's range is initialized.
1784
e9892350
JG
17852016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1786
1787 * c-typeck.c (parser_build_unary_op): Fix formatting.
1788
8fad45f5
MW
17892016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1790
1791 * c-decl.c (grokdeclarator): Remove errmsg and use of
1792 targetm.invalid_return_type.
1793 (grokparms): Remove errmsg and use of
1794 targetm.invalid_parameter_type.
1795
aa4b467b
JM
17962016-05-13 Joseph Myers <joseph@codesourcery.com>
1797
1798 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1799 function return type.
1800
4f2e1536
MP
18012016-05-12 Marek Polacek <polacek@redhat.com>
1802
1803 PR c/70756
1804 * c-decl.c (build_compound_literal): Pass LOC down to
1805 c_incomplete_type_error.
1806 * c-tree.h (require_complete_type): Adjust declaration.
1807 (c_incomplete_type_error): Likewise.
1808 * c-typeck.c (require_complete_type): Add location parameter, pass it
1809 down to c_incomplete_type_error.
1810 (c_incomplete_type_error): Add location parameter, pass it down to
1811 error_at.
1812 (build_component_ref): Pass location down to c_incomplete_type_error.
1813 (default_conversion): Pass location down to require_complete_type.
1814 (build_array_ref): Likewise.
1815 (build_function_call_vec): Likewise.
1816 (convert_arguments): Likewise.
1817 (build_unary_op): Likewise.
1818 (build_c_cast): Likewise.
1819 (build_modify_expr): Likewise.
1820 (convert_for_assignment): Likewise.
1821 (c_finish_omp_clauses): Likewise.
1822
d6e83a8d
MM
18232016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1824
1825 PR c/43651
1826 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1827 is enabled.
1828 * c-errors.c (pedwarn_c90): Return true if warned.
1829 * c-tree.h (pedwarn_c90): Change return type to bool.
1830 (enum c_declspec_word): Add new enumerator cdw_atomic.
1831
5c3a10fb
MP
18322016-05-11 Marek Polacek <polacek@redhat.com>
1833
1834 PR c++/71024
1835 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1836 diagnose_mismatched_attributes and call it.
1837
cf68d92c
MP
18382016-05-10 Marek Polacek <polacek@redhat.com>
1839
1840 PR c/70255
1841 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1842 on a declaration following the definition.
1843
351f85c5
JJ
18442016-05-05 Jakub Jelinek <jakub@redhat.com>
1845
1846 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1847 parse it through to c_parser_c99_block_statement.
1848 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1849 caller.
1850
deef7113
MP
18512016-05-04 Marek Polacek <polacek@redhat.com>
1852
1853 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1854 OPT_Wdangling_else.
1855
de55efd5
MP
18562016-05-04 Marek Polacek <polacek@redhat.com>
1857
1858 PR c/48778
1859 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1860 for macro expansions.
1861
79ce98bc
MP
18622016-05-03 Marek Polacek <polacek@redhat.com>
1863
1864 PR c/70859
1865 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1866 check_builtin_function_arguments.
1867
fb2647aa
RB
18682016-05-03 Richard Biener <rguenther@suse.de>
1869
1870 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1871 the checksum from the previous stage.
1872
77886428
CP
18732016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1874
1875 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1876 c_finish_omp_clauses.
1877 (c_parser_omp_all_clauses): Likewise.
1878 (c_parser_oacc_cache): Likewise.
1879 (c_parser_oacc_loop): Likewise.
1880 (omp_split_clauses): Likewise.
1881 (c_parser_omp_declare_target): Likewise.
1882 (c_parser_cilk_all_clauses): Likewise.
1883 (c_parser_cilk_for): Likewise.
1884 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1885 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1886
7176a4a0
MP
18872016-05-02 Marek Polacek <polacek@redhat.com>
1888
1889 PR c/70851
1890 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1891 incomplete type.
1892
e7ff0319
CP
18932016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1894
1895 PR middle-end/70626
1896 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1897 OACC_LOOP_CLAUSE_MASK.
1898 (c_parser_oacc_kernels_parallel): Update call to
1899 c_oacc_split_loop_clauses.
1900
9f405ce1
AM
19012016-04-28 Andrew MacLeod <amacleod@redhat.com>
1902
1903 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1904 argument to build_modify_expr in two cases.
1905
c1e1f433
BS
19062016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1907
1908 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1909 warn_for_memset instead of warning directly here.
1910
2448a956
MP
19112016-04-26 Marek Polacek <polacek@redhat.com>
1912
1913 PR c/67784
1914 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1915 out of ...
1916 (c_parser_for_statement): ... here.
1917 (c_parser_if_statement): Use it.
1918 (c_parser_switch_statement): Use it.
1919 (c_parser_while_statement): Use it.
1920
b02a5e26
MP
1921 PR c/70791
1922 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1923
477d4906
IV
19242016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1925
1926 PR c++/69363
1927 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1928 instead of c_finish_cilk_clauses.
1929 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1930 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1931 floating-point variables in the linear clause for Cilk Plus.
1932
fe37c7af
MM
19332016-04-18 Michael Matz <matz@suse.de>
1934
1935 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1936 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1937
949505a9
MP
19382016-04-15 Marek Polacek <polacek@redhat.com>
1939
1940 PR c/70671
1941 * c-typeck.c (build_unary_op): Pass location down to error and
1942 warning call.
1943
dda1bf61
JJ
19442016-04-15 Jakub Jelinek <jakub@redhat.com>
1945
1946 PR c/70436
1947 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1948 where needed.
1949 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1950 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1951 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1952 Adjust c_parser_pragma callers.
1953 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1954 caller.
1955 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1956 c_parser_statement.
1957 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1958 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1959 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1960 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1961 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1962 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1963 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1964 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1965 down where needed.
1966 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1967 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1968 calls.
1969
99cd9857
MP
19702016-04-13 Marek Polacek <polacek@redhat.com>
1971
1972 PR c/70436
1973 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1974 adjust callers.
1975 (c_parser_statement): Likewise.
1976 (c_parser_c99_block_statement): Likewise.
1977 (c_parser_while_statement): Likewise.
1978 (c_parser_for_statement): Likewise.
1979 (c_parser_if_body): Don't set IF_P here.
1980 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1981 about dangling else here.
1982 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1983 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1984 warn about dangling else here.
1985
f13355da
MP
19862016-04-04 Marek Polacek <polacek@redhat.com>
1987
1988 PR c/70307
1989 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1990
5fde6a45
MP
19912016-03-31 Marek Polacek <polacek@redhat.com>
1992
1993 PR c/70297
1994 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1995
4bbf545b
DM
19962016-03-18 David Malcolm <dmalcolm@redhat.com>
1997
1998 PR c/70281
1999 * c-parser.c (c_parser_postfix_expression): Set the source range
2000 for uses of "__builtin_types_compatible_p".
2001
fcc2b74f
JJ
20022016-03-17 Jakub Jelinek <jakub@redhat.com>
2003
2004 PR c/70280
2005 * c-typeck.c (composite_type): Don't count void_list_node
2006 into len, if the list is terminated by void_list_node, start
2007 with void_list_node instead of NULL for newargs. Stop
2008 at void_list_node.
2009
ab4c578f
MP
20102016-03-16 Marek Polacek <polacek@redhat.com>
2011
2012 PR c/70093
2013 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2014 nested functions returning VM types.
2015
96b3c82d
CP
20162016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2017
2018 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2019 when calling c_finish_omp_clauses.
2020
29b9828f
BS
20212016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2022
2023 PR c/69824
2024 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2025 for later.
2026
7ff6ca38
MP
20272016-03-04 Marek Polacek <polacek@redhat.com>
2028
2029 PR c/69798
2030 * c-parser.c (c_parser_postfix_expression): Call
2031 c_parser_cast_expression rather than c_parser_postfix_expression.
2032
686e2237
JJ
20332016-03-01 Jakub Jelinek <jakub@redhat.com>
2034
2035 PR c/69796
2036 PR c/69974
2037 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2038 of incomplete decls to error_mark_node.
2039
0b05329b
MP
20402016-02-24 Marek Polacek <polacek@redhat.com>
2041
2042 PR c/69819
2043 * c-decl.c (finish_decl): Don't update the copy of the type of a
2044 different decl type.
2045
067fbd8b
JJ
20462016-02-23 Jakub Jelinek <jakub@redhat.com>
2047
2048 PR objc/69844
2049 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2050 in id_kind reclassification.
2051
bf14eba2
JJ
20522016-02-16 Jakub Jelinek <jakub@redhat.com>
2053
2054 PR c/69835
2055 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2056
ba539195
JN
20572016-02-16 James Norris <jnorris@codesourcery.com>
2058
2059 PR c/64748
2060 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2061
16595a1f
BS
20622016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2063
f48dfe98
BS
2064 * c-decl.c (build_null_declspecs): Zero the entire struct.
2065
16595a1f
BS
2066 PR c/69522
2067 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2068 callers changed. If nested_p is true, use it to call
2069 finish_implicit_inits.
2070 * c-tree.h (finish_implicit_inits): Declare.
2071 * c-typeck.c (finish_implicit_inits): New function. Move code
2072 from ...
2073 (push_init_level): ... here.
2074 (set_designator, process_init_element): Call finish_implicit_inits.
2075
66756373
JJ
20762016-02-11 Jakub Jelinek <jakub@redhat.com>
2077
2078 PR c/69768
2079 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2080 arguments for -Waddress warning.
2081
1066e9b5
JJ
20822016-02-04 Jakub Jelinek <jakub@redhat.com>
2083
2084 PR c/69669
2085 * c-decl.c (finish_enum): When honoring mode attribute,
2086 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2087
3a5d2ba4
JJ
20882016-01-29 Jakub Jelinek <jakub@redhat.com>
2089
2090 PR debug/69518
2091 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2092 all type variants, not just TYPE_MAIN_VARIANT.
2093
cbdd8ae0
JJ
20942016-01-27 Jakub Jelinek <jakub@redhat.com>
2095
2096 PR debug/66869
2097 * c-decl.c (c_write_global_declarations_1): Warn with
2098 warn_unused_function if static prototype without definition
2099 is not C_DECL_USED.
2100
fa74a4bc
MP
21012016-01-27 Marek Polacek <polacek@redhat.com>
2102
2103 PR c/68062
2104 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2105 to unsigned, if needed. Add -Wsign-compare warning.
2106
13f92e8d
JJ
21072016-01-26 Jakub Jelinek <jakub@redhat.com>
2108
2109 PR tree-optimization/69483
2110 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2111
cd8e73dc 21122016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2113
2114 PR c/24293
2115 * c-tree.h (incomplete_record_decls): Declare.
2116 * c-parser.c (incomplete_record_decls): Define.
2117 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2118 report error if any decl has zero size.
2119 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2120 or enum type to incomplete_record_decls.
2121
e6d6ec9e
TV
21222016-01-14 Tom de Vries <tom@codesourcery.com>
2123
2124 PR tree-optimization/68773
2125 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2126 set force_output.
2127
00083992
MP
21282016-01-14 Marek Polacek <polacek@redhat.com>
2129
2130 PR c/69262
2131 * c-decl.c (grokdeclarator): Provide more information for invalid
2132 array declarations.
2133
7443cf13
DM
21342016-01-06 David Malcolm <dmalcolm@redhat.com>
2135
2136 * c-parser.c (c_parser_unary_expression): For dereferences, build
2137 a combined location before calling build_indirect_ref, so that
2138 error reports cover the full range, manually updating the c_expr
2139 src_range.
2140
6b131d5b
MP
21412016-01-06 Marek Polacek <polacek@redhat.com>
2142
2143 PR sanitizer/69099
2144 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2145 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2146 NULL.
2147
818ab71a
JJ
21482016-01-04 Jakub Jelinek <jakub@redhat.com>
2149
2150 Update copyright years.
2151
2fe0a208
MP
21522016-01-04 Marek Polacek <polacek@redhat.com>
2153
2154 PR c/68908
2155 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2156 optimization to use __atomic_fetch_* built-in if possible.
2157
c7b48c8a
TS
21582015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2159
2160 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2161 into...
2162 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2163 all users.
2164
fda5652f
MP
21652015-12-22 Marek Polacek <polacek@redhat.com>
2166
2167 PR c/69002
2168 * c-typeck.c (build_component_ref): Warn when acessing elements of
2169 atomic structures or unions.
2170
745e411d
DM
21712015-12-21 David Malcolm <dmalcolm@redhat.com>
2172
2173 * c-typeck.c: Include "gcc-rich-location.h".
2174 (build_binary_op): In the two places that call binary_op_error,
2175 create a gcc_rich_location and populate it with the location of
2176 the binary op and its two operands.
2177
94c40e19
DM
21782015-12-16 David Malcolm <dmalcolm@redhat.com>
2179
2180 * c-parser.c (c_parser_statement_after_labels): When calling
2181 c_finish_return, Use the return expression's location if it has
2182 one, falling back to the location of the first token within it.
2183 * c-typeck.c (c_finish_return): When issuing warnings about
2184 the incorrect presence/absence of a return value, issue a note
2185 showing the declaration of the function.
2186
de67c4c3
DM
21872015-12-16 David Malcolm <dmalcolm@redhat.com>
2188
2189 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2190 to 4.
2191 (c_parser_peek_nth_token): New function.
2192 (c_parser_peek_conflict_marker): New function.
2193 (c_parser_error): Detect conflict markers and report them as such.
2194
a10704e1
DM
21952015-12-16 David Malcolm <dmalcolm@redhat.com>
2196
2197 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2198 to preserve range information for the primary expression
2199 in the call to c_parser_postfix_expression_after_primary.
2200
8062bca6
DM
22012015-12-16 David Malcolm <dmalcolm@redhat.com>
2202
2203 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2204 expression location, falling back on the first token location,
2205 rather than always using the latter.
2206
d06f8b75
MP
22072015-12-16 Marek Polacek <polacek@redhat.com>
2208
2209 PR c/64637
2210 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2211 available.
2212
2994fb91
MP
22132015-12-15 Marek Polacek <polacek@redhat.com>
2214
2215 PR c/68907
2216 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2217 artificial decl.
2218
a1b93f8d
DM
22192015-12-08 David Malcolm <dmalcolm@redhat.com>
2220
2221 * c-parser.c (c_parser_alignof_expression): Capture location of
2222 closing parenthesis (if any), or of end of unary expression, and
2223 use it to build a src_range for the expression.
2224
46c6e1e2
DM
22252015-12-08 David Malcolm <dmalcolm@redhat.com>
2226
2227 PR c/68757
2228 * c-parser.c (c_parser_get_builtin_args): Add
2229 "out_close_paren_loc" param, and write back to it.
2230 (c_parser_postfix_expression): Capture the closing
2231 parenthesis location for RID_CHOOSE_EXPR,
2232 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2233 RID_BUILTIN_SHUFFLE and use it to set the source range
2234 for such expressions; within RID_BUILTIN_COMPLEX set
2235 the underlying location.
2236
66189108
MP
22372015-12-07 Marek Polacek <polacek@redhat.com>
2238
2239 PR c/68668
2240 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2241 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2242
f187980b
EB
22432015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2244
2245 * c-tree.h (c_build_va_arg): Adjust prototype.
2246 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2247 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2248 parameter, adjust throughout and issue an error if EXPR is a component
2249 with reverse storage order.
2250
4250754e
JM
22512015-12-02 Jason Merrill <jason@redhat.com>
2252
2253 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2254 (c_fully_fold_internal, decl_constant_value_for_optimization):
2255 Move from c-common.c.
2256 * c-tree.h: Declare decl_constant_value_for_optimization.
2257 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2258
e9e32ee6
JM
22592015-12-02 Joseph Myers <joseph@codesourcery.com>
2260
2261 PR c/68162
2262 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2263 following link from declarator to next declarator. Track original
2264 qualified type and pass it to c_build_qualified_type.
2265 * c-typeck.c (c_build_qualified_type): Add arguments
2266 orig_qual_type and orig_qual_indirect.
2267
ff7a55bf
TS
22682015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2269
2270 * c-parser.c (c_parser_omp_clause_name)
2271 (c_parser_oacc_all_clauses): Alphabetical sorting.
2272
657e4e47
JJ
22732015-12-02 Jakub Jelinek <jakub@redhat.com>
2274
2275 PR c/68533
2276 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2277 for diagnostics.
2278
37d5ad46
JB
22792015-12-01 Julian Brown <julian@codesourcery.com>
2280 Cesar Philippidis <cesar@codesourcery.com>
2281 James Norris <James_Norris@mentor.com>
2282
2283 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2284 (c_parser_oacc_clause_use_device): New function.
2285 (c_parser_oacc_all_clauses): Add use_device support.
2286 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2287 (c_parser_oacc_host_data): New function.
2288 (c_parser_omp_construct): Add host_data support.
2289 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2290 * c-typeck.c (c_finish_oacc_host_data): New function.
2291 (c_finish_omp_clauses): Add use_device support.
2292
a4850ce9
JH
22932015-11-29 Jan Hubicka <hubicka@ucw.cz>
2294
2295 PR c/67106
2296 * c-decl.c: Set TYPE_PACKED in variants.
2297
b58d3df2
ML
22982015-11-27 Martin Liska <mliska@suse.cz>
2299
2300 PR c++/68312
2301 * c-array-notation.c (fix_builtin_array_notation_fn):
2302 Use release_vec_vec instead of vec::release.
2303 (build_array_notation_expr): Likewise.
2304 (fix_conditional_array_notations_1): Likewise.
2305 (fix_array_notation_expr): Likewise.
2306 (fix_array_notation_call_expr): Likewise.
2307
aec17bfe
JJ
23082015-11-27 Jakub Jelinek <jakub@redhat.com>
2309
2310 PR c/63326
2311 * c-parser.c (c_parser_compound_statement_nostart): If
2312 last_label is true, use pragma_stmt instead of pragma_compound
2313 as second c_parser_pragma argument.
2314 (c_parser_omp_ordered, c_parser_omp_target_update,
2315 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2316 false as second argument to c_parser_skip_to_pragma_eol after
2317 diagnosing standalone directives used in pragma_stmt context.
2318
688c4de0
IV
23192015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2320
2321 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2322 with "if (ENABLE_OFFLOADING)".
2323
cbd03aee
DM
23242015-11-23 David Malcolm <dmalcolm@redhat.com>
2325
2326 PR objc/68438
2327 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2328 for various Objective-C constructs: Class.name syntax,
2329 @selector(), @protocol(), @encode(), and [] message syntax.
2330
a87a86e1
DM
23312015-11-20 David Malcolm <dmalcolm@redhat.com>
2332
2333 PR 62314
2334 * c-typeck.c (should_suggest_deref_p): New function.
2335 (build_component_ref): Special-case POINTER_TYPE when
2336 generating a "not a structure of union" error message, and
2337 suggest a "->" rather than a ".", providing a fix-it hint.
2338
8ece8dfb
DM
23392015-11-19 David Malcolm <dmalcolm@redhat.com>
2340
2341 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2342 candidate into a new function, find_closest_identifier.
2343
433068cc
MP
23442015-11-19 Marek Polacek <polacek@redhat.com>
2345
2346 PR c/68412
2347 * c-typeck.c (parser_build_binary_op): Properly handle
2348 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2349
bef08b71
DM
23502015-11-17 David Malcolm <dmalcolm@redhat.com>
2351
2352 * c-parser.c (set_c_expr_source_range): Bulletproof both
2353 overloaded implementations against NULL expr->value.
2354 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2355 values.
2356 (c_parser_unary_expression): Likewise when handling addresses of
2357 labels.
2358 (c_parser_postfix_expression): Likewise for statement expressions,
2359 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2360 __builtin_va_arg, and for __builtin_offset_of.
2361 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2362 src_range using the range of the braced initializer.
2363 (c_parser_transaction_expression): Set src_range for "ret" to a
2364 sane pair of values.
2365
fff77217
KY
23662015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2367
2368 * c-parser.c (c_finish_omp_declare_simd): Look for
2369 "simd" attribute as well. Update error message.
2370
1d899da2
TS
23712015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2372
2373 * c-parser.c (c_parser_omp_declare_target): Adjust.
2374
e4606348
JJ
23752015-11-14 Jakub Jelinek <jakub@redhat.com>
2376
2377 * c-typeck.c (c_finish_omp_clauses): Don't mark
2378 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2379
3e636daf
MP
23802015-11-14 Marek Polacek <polacek@redhat.com>
2381
2382 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2383 * c-typeck.c: Likewise.
2384
ebedc9a3
DM
23852015-11-13 David Malcolm <dmalcolm@redhat.com>
2386
2387 * c-decl.c (warn_defaults_to): Pass line_table to
2388 rich_location ctor.
2389 * c-errors.c (pedwarn_c99): Likewise.
2390 (pedwarn_c90): Likewise.
2391 * c-parser.c (set_c_expr_source_range): New functions.
2392 (c_token::get_range): New method.
2393 (c_token::get_finish): New method.
2394 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2395 based on the range from the start of the LHS to the end of the
2396 RHS.
2397 (c_parser_conditional_expression): Likewise, based on the range
2398 from the start of the cond.value to the end of exp2.value.
2399 (c_parser_binary_expression): Call set_c_expr_source_range on
2400 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2401 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2402 based on the cast_loc through to the end of the expr.
2403 (c_parser_unary_expression): Likewise, based on the
2404 op_loc through to the end of op.
2405 (c_parser_sizeof_expression) Likewise, based on the start of the
2406 sizeof token through to either the closing paren or the end of
2407 expr.
2408 (c_parser_postfix_expression): Likewise, using the token range,
2409 or from the open paren through to the close paren for
2410 parenthesized expressions.
2411 (c_parser_postfix_expression_after_primary): Likewise, for
2412 various kinds of expression.
2413 * c-tree.h (struct c_expr): Add field "src_range".
2414 (c_expr::get_start): New method.
2415 (c_expr::get_finish): New method.
2416 (set_c_expr_source_range): New decls.
2417 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2418 on ret for prefix unary ops.
2419 (parser_build_binary_op): Likewise, running from the start of
2420 arg1.value through to the end of arg2.value.
2421
ec8b536f
MP
24222015-11-13 Marek Polacek <polacek@redhat.com>
2423
2424 PR c/68320
2425 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2426
277fe616
DM
24272015-11-13 David Malcolm <dmalcolm@redhat.com>
2428
2429 * c-typeck.c: Include spellcheck.h.
2430 (lookup_field_fuzzy_find_candidates): New function.
2431 (lookup_field_fuzzy): New function.
2432 (build_component_ref): If the field was not found, try using
2433 lookup_field_fuzzy and potentially offer a suggestion.
2434
6e232ba4
JN
24352015-11-12 James Norris <jnorris@codesourcery.com>
2436 Joseph Myers <joseph@codesourcery.com>
2437
2438 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2439 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2440 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2441 and PRAGMA_OMP_CLAUSE_LINK.
2442 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2443 and PRAGMA_OACC_CLAUSE_LINK.
2444 (OACC_DECLARE_CLAUSE_MASK): New definition.
2445 (c_parser_oacc_declare): New function.
2446
9be4f715
MP
24472015-11-12 Marek Polacek <polacek@redhat.com>
2448
2449 PR c/67784
2450 * c-parser.c (c_parser_for_statement): Reclassify the token in
2451 a correct scope.
2452
e78bede6
MP
24532015-11-11 Marek Polacek <polacek@redhat.com>
2454
2455 PR c/68107
2456 PR c++/68266
2457 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2458 checking the size of an array.
2459
69f293c9
AM
24602015-11-11 Andrew MacLeod <amacleod@redhat.com>
2461
2462 * c-array-notation.c: Remove unused header files.
2463 * c-aux-info.c: Likewise.
2464 * c-convert.c: Likewise.
2465 * c-decl.c: Likewise.
2466 * c-errors.c: Likewise.
2467 * c-lang.c: Likewise.
2468 * c-objc-common.c: Likewise.
2469 * c-parser.c: Likewise.
2470 * c-typeck.c: Likewise.
2471 * gccspec.c: Likewise.
2472
3a40d81d
NS
24732015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2474 Cesar Philippidis <cesar@codesourcery.com>
2475 James Norris <jnorris@codesourcery.com>
2476 Julian Brown <julian@codesourcery.com>
2477 Nathan Sidwell <nathan@codesourcery.com>
2478
2479 c/
2480 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2481 routine arg.
2482 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2483 (c_parser_pragma): Parse 'acc routine'.
2484 (OACC_ROUTINE_CLAUSE_MARK): Define.
2485 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2486
fc402eec
AA
24872015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2488
2489 PR debug/67192
2490 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2491 location of the backward-goto to the start of the loop body.
2492
f6b0b3db
AA
24932015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2494
2495 PR debug/67192
2496 * c-parser.c (c_parser_while_statement): Finish the loop before
2497 parsing ahead for misleading indentation.
2498 (c_parser_for_statement): Likewise.
2499
ee45a32d
EB
25002015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2501
2502 * c-decl.c (finish_struct): If the structure has reverse storage
2503 order, rewrite the type of array fields with scalar component. Call
2504 maybe_apply_pragma_scalar_storage_order on entry.
2505 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2506 errors on bit-fields and reverse SSO here and not...
2507 (c_mark_addressable): ...here.
2508 (output_init_element): Adjust call to initializer_constant_valid_p.
2509 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2510
8a645150
DM
25112015-11-06 David Malcolm <dmalcolm@redhat.com>
2512
2513 * c-decl.c (warn_defaults_to): Update for change in signature
2514 of diagnostic_set_info.
2515 * c-errors.c (pedwarn_c99): Likewise.
2516 (pedwarn_c90): Likewise.
2517 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2518 for textinfo::set_location.
2519
7a5e4956
CP
25202015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2521 Thomas Schwinge <thomas@codesourcery.com>
2522 James Norris <jnorris@codesourcery.com>
2523
2524 * c-parser.c (c_parser_omp_clause_name): Add support for
2525 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2526 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2527 default(none) in OpenACC.
2528 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2529 arguments.
2530 (c_parser_oacc_clause_tile): New function.
2531 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2532 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2533 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2534 TILE}.
2535 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2536 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2537 FIRSTPRIVATE}.
2538 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2539 (c_parser_oacc_update): Update the error message for missing clauses.
2540 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2541 and OMP_CLAUSE_INDEPENDENT.
2542
bfcfbfa0
MP
25432015-11-05 Marek Polacek <polacek@redhat.com>
2544
2545 PR c/68090
2546 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2547 deal with pre-evaluation on invalid types.
2548
e01d41e5
JJ
25492015-11-05 Jakub Jelinek <jakub@redhat.com>
2550 Ilya Verbin <ilya.verbin@intel.com>
2551
2552 * c-parser.c: Include context.h and gimple-expr.h.
2553 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2554 monotonic together with nonmonotonic.
2555 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2556 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2557 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2558 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2559 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2560 expressions on combined target teams before the target.
2561 (c_parser_omp_declare_target): If decl has "omp declare target" or
2562 "omp declare target link" attribute, and cgraph or varpool node already
2563 exists, then set corresponding flags. Call c_finish_omp_clauses
2564 in the parenthesized extended-list syntax case.
2565 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2566 declare target.
2567 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2568 on OMP_CLAUSE_REDUCTION array sections.
2569 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2570 into the constant offset, or for variable low-bound using
2571 POINTER_PLUS_EXPR. For structure element based array sections use
2572 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2573 (c_finish_omp_clauses): Drop generic_field_head, structure
2574 elements are now always mapped even as array section bases,
2575 diagnose same var in data sharing and mapping clauses. Diagnose if
2576 linear step on declare simd is neither a constant nor a uniform
2577 parameter. Look through POINTER_PLUS_EXPR for array section
2578 reductions. Diagnose the same var or function appearing multiple
2579 times on the same directive. Fix up wording for the to clause if t
2580 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2581 modifier on kinds other than dynamic or guided or nonmonotonic
2582 modifier together with ordered clause.
2583
4bf9e5a8
TS
25842015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2585 Chung-Lin Tang <cltang@codesourcery.com>
2586
2587 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2588
2adfab87
AM
25892015-10-29 Andrew MacLeod <amacleod@redhat.com>
2590
2591 * c-array-notation.c: Reorder #include's and remove duplicates.
2592 * c-aux-info.c: Likewise.
2593 * c-convert.c: Likewise.
2594 * c-decl.c: Likewise.
2595 * c-errors.c: Likewise.
2596 * c-lang.c: Likewise.
2597 * c-objc-common.c: Likewise.
2598 * c-parser.c: Likewise.
2599 * c-typeck.c: Likewise.
2600
e922069e
JW
26012015-10-26 Jim Wilson <jim.wilson@linaro.org>
2602
2603 PR debug/66068
2604 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2605 after calling build_qualified_type.
2606
765dd391
CP
26072015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2608 Thomas Schwinge <thomas@codesourcery.com>
2609 James Norris <jnorris@codesourcery.com>
2610 Joseph Myers <joseph@codesourcery.com>
2611 Julian Brown <julian@codesourcery.com>
2612 Bernd Schmidt <bschmidt@redhat.com>
2613
2614 * c-parser.c (c_parser_oacc_shape_clause): New.
2615 (c_parser_oacc_simple_clause): New.
2616 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2617 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2618
88bae6f4
TS
26192015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2620 James Norris <jnorris@codesourcery.com>
2621 Cesar Philippidis <cesar@codesourcery.com>
2622
2623 PR c/64765
2624 PR c/64880
2625 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2626 parameters, and handle these. Adjust all users.
2627 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2628 into...
2629 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2630 all users.
2631 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2632 declare functions.
2633 (c_finish_omp_construct): Declare function.
2634 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2635 Merge functions into...
2636 (c_finish_omp_construct): ... this new function.
2637
a8fc2579
RB
26382015-10-22 Richard Biener <rguenther@suse.de>
2639
2640 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2641 before folding a MINUS_EXPR.
2642
e9122ef6
MP
26432015-10-21 Marek Polacek <polacek@redhat.com>
2644
2645 PR c/68024
2646 * c-decl.c (start_function): Warn about vararg functions without
2647 a prototype.
2648
9f47c7e5
IE
26492015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2650
2651 * c-typeck.c (build_conditional_expr): Use boolean vector
2652 type for vector comparison.
2653 (build_vec_cmp): New.
2654 (build_binary_op): Use build_vec_cmp for comparison.
2655
fa60eeb9
MP
26562015-10-20 Marek Polacek <polacek@redhat.com>
2657
2658 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2659
2c7020eb
MP
26602015-10-20 Marek Polacek <polacek@redhat.com>
2661
2662 PR c/67964
2663 * c-parser.c (c_parser_attributes): Break out of the loop if the
2664 token after an attribute isn't a comma.
2665
d9a6bd32
JJ
26662015-10-13 Jakub Jelinek <jakub@redhat.com>
2667 Aldy Hernandez <aldyh@redhat.com>
2668
2669 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2670 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2671 (c_parser_omp_variable_list): Handle structure elements for
2672 map, to and from clauses. Handle array sections in reduction
2673 clause. Formatting fixes.
2674 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2675 if clause modifiers.
2676 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2677 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2678 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2679 c_parser_omp_clause_is_device_ptr): New functions.
2680 (c_parser_omp_clause_ordered): Parse optional parameter.
2681 (c_parser_omp_clause_reduction): Handle array reductions.
2682 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2683 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2684 functions.
2685 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2686 (c_parser_omp_clause_depend_sink): New function.
2687 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2688 (c_parser_omp_clause_map): Parse release/delete map kinds and
2689 optional always modifier.
2690 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2691 and c_finish_omp_clauses callers.
2692 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2693 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2694 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2695 (OMP_CRITICAL_CLAUSE_MASK): Define.
2696 (c_parser_omp_critical): Parse critical clauses.
2697 (c_parser_omp_for_loop): Handle doacross loops, adjust
2698 c_finish_omp_for and c_finish_omp_clauses callers.
2699 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2700 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2701 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2702 (c_parser_omp_for): Disallow ordered clause when combined with
2703 distribute. Disallow linear clause when combined with distribute
2704 and not combined with simd.
2705 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2706 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2707 parse clauses and if depend clause is found, don't parse a body.
2708 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2709 Allow target parallel without for after it.
2710 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2711 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2712 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2713 invalid kinds.
2714 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2715 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2716 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2717 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2718 functions.
2719 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2720 defaultmap and is_device_ptr clauses.
2721 (c_parser_omp_target): Parse target parallel and target simd. Set
2722 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2723 and target exit data. Diagnose invalid map kinds.
2724 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2725 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2726 construct.
2727 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2728 &omp_priv.
2729 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2730 (c_parser_omp_taskloop): New function.
2731 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2732 handle PRAGMA_OMP_TASKLOOP.
2733 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2734 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2735 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2736 Add IS_OMP argument, handle structure element bases, diagnose
2737 bitfields, pass IS_OMP recursively, diagnose known zero length
2738 array sections in depend clauses, handle array sections in reduction
2739 clause, diagnose negative length even for pointers.
2740 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2741 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2742 array sections in reduction clause, set
2743 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2744 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2745 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2746 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2747
21ba0cea
MP
27482015-10-06 Marek Polacek <polacek@redhat.com>
2749
2750 * c-parser.c (c_parser_statement_after_labels): Use
2751 protected_set_expr_location.
2752 (c_parser_omp_clause_num_gangs): Likewise.
2753 (c_parser_omp_clause_num_threads): Likewise.
2754 (c_parser_omp_clause_num_workers): Likewise.
2755 (c_parser_omp_clause_vector_length): Likewise.
2756 (c_parser_omp_clause_num_teams): Likewise.
2757 (c_parser_omp_clause_thread_limit): Likewise.
2758 * c-typeck.c (build_c_cast): Likewise.
2759 (c_cast_expr): Likewise.
2760
624d31fe
RS
27612015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2762
2763 * c-typeck.c (c_tree_equal): Use real_equal instead of
2764 REAL_VALUES_EQUAL.
2765
b8fd7909
JM
27662015-10-04 Jason Merrill <jason@redhat.com>
2767
2768 * c-parser.c (c_lex_one_token): Handle @synchronized.
2769 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2770 can change whether the function is transaction_safe.
2771
1c7485af
MP
27722015-10-02 Marek Polacek <polacek@redhat.com>
2773
2774 PR c/67730
2775 * c-typeck.c (convert_for_assignment): Use the expansion point
2776 location throughout.
2777
3e3b8d63
MP
27782015-10-02 Marek Polacek <polacek@redhat.com>
2779
2780 PR c/64249
2781 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2782 and pass it down to c_parser_if_statement.
2783 (c_parser_else_body): Add CHAIN parameter and pass it down to
2784 c_parser_statement_after_labels.
2785 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2786 duplicated if-else-if conditions.
2787
aabef2de
MP
27882015-10-01 Marek Polacek <polacek@redhat.com>
2789
2790 * c-typeck.c (convert_for_assignment): Improve commentary.
2791
de8ddd5f
MP
27922015-09-30 Marek Polacek <polacek@redhat.com>
2793
2794 PR c/67730
2795 * c-typeck.c (c_finish_return): Use the expansion point location for
2796 certain "return with value" warnings.
2797
c4914de6
MLI
27982015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2799
2800 * c-parser.c (pragma_lex): Add loc argument.
2801
0e36f5c7
MP
28022015-09-15 Marek Polacek <polacek@redhat.com>
2803
2804 PR c/67580
2805 * c-decl.c (tag_exists_p): New function.
2806 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2807 struct/union/enum keywords are missing.
2808 * c-tree.h (tag_exists_p): Declare.
2809
2f3bb934
MP
28102015-09-15 Marek Polacek <polacek@redhat.com>
2811
2812 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2813 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2814 Return NULL_TREE instead of 0.
2815 (lookup_name): Return NULL_TREE instead of 0.
2816 (lookup_name_in_scope): Likewise.
2817 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2818 (parser_xref_tag): Use false instead of 0.
2819 (start_struct): Use true instead of 1.
2820 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2821
aa256c4a
MP
28222015-09-14 Marek Polacek <polacek@redhat.com>
2823
2824 * c-typeck.c (set_nonincremental_init_from_string): Use
2825 HOST_WIDE_INT_M1U when shifting a negative value.
2826
dbb68221
MW
28272015-09-09 Mark Wielaard <mjw@redhat.com>
2828
2829 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2830 parm against NULL.
2831
a8a098ac
JJ
28322015-09-10 Jakub Jelinek <jakub@redhat.com>
2833
2834 PR c/67502
2835 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2836 into OMP_FOR_PRE_BODY rather than before the loop.
2837
f4b189d5
JJ
28382015-09-09 Jakub Jelinek <jakub@redhat.com>
2839
0bb99c11
JJ
2840 PR c/67501
2841 * c-parser.c (c_parser_oacc_all_clauses,
2842 c_parser_omp_all_clauses): Remove invalid clause from
2843 list of clauses even if parser->error is set.
2844
fce5e5e3
JJ
2845 PR c/67500
2846 * c-parser.c (c_parser_omp_clause_aligned,
2847 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2848 test for errors.
2849 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2850 error_mark_node.
2851
f4b189d5
JJ
2852 PR c/67495
2853 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2854 instead of c_parser_unary_expression. If the result is !lvalue_p,
2855 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2856
b2aaf235
MP
28572015-09-04 Marek Polacek <polacek@redhat.com>
2858
2859 PR sanitizer/67279
2860 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2861
1807ffc1
MS
28622015-09-03 Martin Sebor <msebor@redhat.com>
2863
2864 PR c/66516
8b652e65
JJ
2865 * c-typeck.c (convert_arguments, parser_build_unary_op,
2866 build_conditional_expr, c_cast_expr, convert_for_assignment,
2867 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2868 reject_gcc_builtin.
2869 (c_decl_implicit): Define.
2870
d04ff417
MP
28712015-09-02 Marek Polacek <polacek@redhat.com>
2872
2873 PR c/67432
2874 * c-parser.c (c_parser_enum_specifier): Give a better error for
2875 an empty enum.
2876
a79683d5
TS
28772015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2878
2879 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2880
191a6b94
MP
28812015-08-12 Marek Polacek <polacek@redhat.com>
2882
2883 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2884 LOC to it.
2885
420a9d9b
MP
28862015-08-03 Marek Polacek <polacek@redhat.com>
2887
2888 PR c/67088
2889 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2890 Use it.
2891 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2892
992118a1
PP
28932015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2894
2895 * c-parser.c (c_parser_if_body): Take token_indent_info
2896 argument. Call warn_for_misleading_indentation even when the
2897 body is a semicolon. Extract token_indent_infos corresponding
2898 to the guard, body and next tokens. Adjust call to
2899 warn_for_misleading_indentation accordingly.
2900 (c_parser_else_body): Likewise.
2901 (c_parser_if_statement): Likewise.
2902 (c_parser_while_statement): Likewise.
2903 (c_parser_for_statement): Likewise.
2904
46308474
LFSM
29052015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2906 Manuel López-Ibáñez <manu@gcc.gnu.org>
2907
2908 * c-decl.c (get_parm_info): Remove static var. Update warning
2909 message.
2910
05b28fd6
MP
29112015-07-27 Marek Polacek <polacek@redhat.com>
2912
2913 PR c++/66555
2914 PR c/54979
2915 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2916
451b5e48
MP
29172015-07-20 Marek Polacek <polacek@redhat.com>
2918
2919 PR c++/55095
2920 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2921 (build_binary_op): Warn about left shift overflows.
2922
1916bcb5
AM
29232015-07-09 Andrew MacLeod <amacleod@redhat.com>
2924
2925 * c-array-notation.c: Adjust includes for flags.h changes.
2926 * c-objc-common.c: Likewise.
2927
c7131fb2
AM
29282015-07-07 Andrew MacLeod <amacleod@redhat.com>
2929
2930 * c-array-notation.c: Adjust includes.
2931 * c-aux-info.c: Likewise.
2932 * c-convert.c: Likewise.
2933 * c-decl.c: Likewise.
2934 * c-errors.c: Likewise.
2935 * c-lang.c: Likewise.
2936 * c-objc-common.c: Likewise.
2937 * c-parser.c: Likewise.
2938 * c-typeck.c: Likewise.
2939
da2e71c9
MLI
29402015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2941
2942 PR fortran/66605
2943 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2944
b155cfd9
MP
29452015-06-29 Marek Polacek <polacek@redhat.com>
2946
2947 PR c/66322
2948 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2949 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2950 about -Wswitch-bool here.
2951 (do_case): Update c_add_case_label call.
2952 (c_finish_case): Update c_do_switch_warnings call.
2953
31521951
MP
29542015-06-27 Marek Polacek <polacek@redhat.com>
2955
2956 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2957
22d03525
MP
29582015-06-26 Marek Polacek <polacek@redhat.com>
2959
2960 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2961 INDIRECT_REF_P.
2962 * c-typeck.c (array_to_pointer_conversion): Likewise.
2963 (build_unary_op): Likewise.
2964 (c_finish_return): Likewise.
2965
f0889939
AM
29662015-06-25 Andrew MacLeod <amacleod@redhat.com>
2967
2968 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2969 * c-parser.c: Likewise.
2970
8d67ee55
RS
29712015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2972
2973 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2974 instead of pointer_hash.
2975 (detect_field_duplicates): Likewise.
2976
0ae9bd27
MP
29772015-06-25 Marek Polacek <polacek@redhat.com>
2978
2979 * c-array-notation.c: Use VAR_P throughout.
2980 * c-decl.c: Likewise.
2981 * c-objc-common.c: Likewise.
2982 * c-parser.c: Likewise.
2983 * c-typeck.c: Likewise.
2984
62f9079a
MP
29852015-06-25 Marek Polacek <polacek@redhat.com>
2986
2987 * c-decl.c: Use is_global_var throughout.
2988 * c-parser.c: Likewise.
2989 * c-typeck.c: Likewise.
2990
abb226c9
AM
29912015-06-17 Andrew MacLeod <amacleod@redhat.com>
2992
2993 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2994 * c-aux-info.c: Likewise.
2995 * c-convert.c: Likewise.
2996 * c-decl.c: Likewise.
2997 * c-errors.c: Likewise.
2998 * c-lang.c: Likewise.
2999 * c-objc-common.c: Likewise.
3000 * c-parser.c: Likewise.
3001 * c-typeck.c: Likewise.
3002
8cbababc
JH
30032015-06-11 Jan Hubicka <hubicka@ucw.cz>
3004
3005 PR middle-end/66325
3006 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3007 variants.
3008
a0349665
PMR
30092015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3010
3011 * c-decl.c (pop_scope): Register the main translation unit
3012 through the new debug hook.
3013
13fdf2e2
AM
30142015-06-08 Andrew MacLeod <amacleod@redhat.com>
3015
3016 * c-array-notation.c : Adjust include files.
3017 * c-aux-info.c : Likewise.
3018 * c-convert.c : Likewise.
3019 * c-decl.c : Likewise.
3020 * c-errors.c : Likewise.
3021 * c-lang.c : Likewise.
3022 * c-lang.h : Likewise.
3023 * c-objc-common.c : Likewise.
3024 * c-parser.c : Likewise.
3025 * c-typeck.c : Likewise.
3026
d7438551
AH
30272015-06-05 Aldy Hernandez <aldyh@redhat.com>
3028
3029 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3030 immediately clobber it.
3031 (c_write_global_declarations_1): Remove call to
3032 check_global_declaration_1.
3033 (c_write_global_declarations_2): Remove.
3034 (c_write_final_cleanups): Rename from c_write_global_declarations.
3035 Remove call to finalize_compilation_unit.
3036 Remove calls to debugging hooks.
3037 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3038 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3039 * c-tree.h: Remove c_write_global_declarations.
3040
ecb9f223
AM
30412015-06-04 Andrew MacLeod <amacleod@redhat.com>
3042
3043 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3044 * c-aux-info.c: Likewise.
3045 * c-convert.c: Likewise.
3046 * c-decl.c: Likewise.
3047 * c-errors.c: Likewise.
3048 * c-lang.c: Likewise.
3049 * c-objc-common.c: Likewise.
3050 * c-parser.c: Likewise.
3051 * c-typeck.c: Likewise.
3052
9482b620
MP
30532015-06-04 Marek Polacek <polacek@redhat.com>
3054
3055 PR c/66341
3056 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3057 it is a lvalue.
3058
bc51ace3
PK
30592015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3060
3061 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3062 Warn for empty struct.
3063 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3064
ea5b45b6
AT
30652015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3066
3067 * c-decl.c (start_function): Call plugin before parsing.
3068 (finish_function): Call plugin after parsing.
3069
c2d47482
PK
30702015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3071
3072 PR c/49551
3073 * c-decl.c (merge_decls): Merge DECL_COMMON.
3074
a95492ab
JW
30752015-05-22 Jim Wilson <jim.wilson@linaro.org>
3076
3077 * Make-lang.in (check_gcc_pallelize): Define.
3078
fd5c817a
MP
30792015-05-22 Marek Polacek <polacek@redhat.com>
3080
3081 PR c/47043
3082 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3083 attributes.
3084
c7b70a3c
MP
30852015-05-21 Marek Polacek <polacek@redhat.com>
3086
3087 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3088 DECL_BUILT_IN.
3089
21b634ae
MP
30902015-05-20 Marek Polacek <polacek@redhat.com>
3091
3092 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3093 * c-typeck.c: Likewise.
3094
296a8c2f
MP
30952015-05-19 Marek Polacek <polacek@redhat.com>
3096
3097 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3098
41b37d5e
JJ
30992015-05-19 Jakub Jelinek <jakub@redhat.com>
3100
3101 PR middle-end/66199
3102 * c-parser.c (c_parser_omp_for_loop): Don't add
3103 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3104 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3105 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3106 constructs.
3107
fab27f52
MM
31082015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3109
3110 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3111 swaps.
fab27f52 3112
40de31cf
MLI
31132015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3114
3115 PR fortran/44054
3116 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3117 accessor function.
3118
3aa3c9fc
MP
31192015-05-14 Marek Polacek <polacek@redhat.com>
3120
3121 PR c/66066
3122 PR c/66127
3123 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3124 rather than with 0.
3125
c3388e62
DM
31262015-05-12 David Malcolm <dmalcolm@redhat.com>
3127
3128 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3129 to add a call to warn_for_misleading_indentation.
3130 (c_parser_else_body): Likewise, adding param "else_loc".
3131 (c_parser_if_statement): Check for misleading indentation.
3132 (c_parser_while_statement): Likewise.
3133 (c_parser_for_statement): Likewise.
3134
755e528f
MP
31352015-05-08 Marek Polacek <polacek@redhat.com>
3136
3137 PR c/64918
3138 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3139 (output_init_element): Likewise.
3140
0173bd2a
MP
31412015-05-07 Marek Polacek <polacek@redhat.com>
3142
3143 PR c/65179
3144 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3145 value.
3146
9babc352
MP
31472015-04-30 Marek Polacek <polacek@redhat.com>
3148
3149 * c-typeck.c (set_init_label): Call error_at instead of error and
3150 pass LOC to it.
3151
ac9f18db
MP
3152 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3153 the type of a decl.
3154
ec3fba51
MP
3155 * c-typeck.c (c_build_va_arg): Clarify the error message.
3156
b811915d
TS
31572015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3158
3159 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3160 OMP_STANDALONE_CLAUSES.
3161
f3075008
MP
31622015-04-28 Marek Polacek <polacek@redhat.com>
3163
3164 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3165
4e81b788
MP
31662015-04-28 Marek Polacek <polacek@redhat.com>
3167
3168 PR c/65901
3169 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3170
6c1db78e
MP
31712015-04-25 Marek Polacek <polacek@redhat.com>
3172
3173 PR c/52085
3174 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3175 attribute.
3176
5c4abbb8
MP
31772015-04-23 Marek Polacek <polacek@redhat.com>
3178
3179 PR c/65345
3180 * c-decl.c (set_labels_context_r): New function.
3181 (store_parm_decls): Call it via walk_tree_without_duplicates.
3182 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3183 instead of create_tmp_var. Build TARGET_EXPR instead of
3184 COMPOUND_EXPR.
3185 (build_atomic_assign): Use create_tmp_var_raw instead of
3186 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3187
06aca1d5
IV
31882015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3189
3190 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3191 (c_parser_omp_target_update): Add missed %> to error_at ().
3192
8fba1830
BRF
31932015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3194
3195 PR target/55143
3196 * c-decl.c (c_default_pointer_mode): Remove definition.
3197 * c-tree.h (c_default_pointer_mode): Remove declaration.
3198
62021f64
TB
31992015-03-27 Tobias Burnus <burnus@net-b.de>
3200
3201 PR c/65586
3202 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3203 error out.
3204 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3205 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3206 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3207
9b65e171
JJ
32082015-03-19 Jakub Jelinek <jakub@redhat.com>
3209
3210 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3211 attribute for DECL_EXTERNAL VAR_DECLs.
3212
17958621
JJ
32132015-03-11 Jakub Jelinek <jakub@redhat.com>
3214
3215 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3216 argument.
3217
7ccb1a11
JJ
32182015-03-10 Jakub Jelinek <jakub@redhat.com>
3219
3220 PR c/65120
3221 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3222 before preparing arguments to warn_logical_not_parentheses.
3223
01177669
JJ
32242015-03-09 Jakub Jelinek <jakub@redhat.com>
3225
3226 PR c/65120
3227 * c-typeck.c (parser_build_binary_op): Don't warn for
3228 !!x == y or !b == y where b is _Bool.
3229
802ac282
MP
32302015-03-09 Marek Polacek <polacek@redhat.com>
3231
3232 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3233 * c-decl.c (grokdeclarator): Likewise.
3234 * c-typeck.c (build_binary_op): Likewise.
3235
e5165b60
MP
32362015-02-27 Marek Polacek <polacek@redhat.com>
3237
3238 PR c/65228
3239 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3240
065d214c
MP
32412015-02-14 Marek Polacek <polacek@redhat.com>
3242
3243 PR c/64768
3244 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3245 declared through a typedef name.
3246
e5d9235b
MP
32472015-02-13 Marek Polacek <polacek@redhat.com>
3248
3249 PR c/65050
3250 * c-decl.c (grokdeclarator): Print also the type when giving
3251 the error message about array's incomplete element type.
3252
fa01ffcc
JJ
32532015-02-11 Jakub Jelinek <jakub@redhat.com>
3254
3255 PR c/64824
3256 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3257 check in the POP macro.
3258
c3e38a03
MP
32592015-02-09 Marek Polacek <polacek@redhat.com>
3260
3261 PR c/64856
3262 * c-typeck.c (process_init_element): Don't always wrap
3263 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3264 initializing a range of elements.
3265
4886ec8e
JJ
32662015-02-04 Jakub Jelinek <jakub@redhat.com>
3267
3268 PR c/64824
3269 PR c/64868
3270 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3271
c3e38a03 32722015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3273
3274 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3275 processing enum declaration.
3276
7b33f0c8
MP
32772015-01-29 Marek Polacek <polacek@redhat.com>
3278
3279 PR c/64709
3280 * c-typeck.c (pop_init_level): If constructor_elements has
3281 exactly one element with integer_zerop value, set constructor_zeroinit
3282 to 1. Remove braces around warning_init call.
3283
dea63e49
JJ
32842015-01-27 Jakub Jelinek <jakub@redhat.com>
3285
3286 PR c/64766
3287 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3288 of FUNCTION_DECLs with error_mark_node.
3289
d38f7dce
JJ
32902015-01-26 Jakub Jelinek <jakub@redhat.com>
3291
3292 PR c/64778
3293 * c-typeck.c (convert_arguments): Return -1 if there are
3294 error_args, even if we've diagnosed too many arguments.
3295
cbf5d0e7
RB
32962015-01-21 Richard Biener <rguenther@suse.de>
3297
3298 PR middle-end/64313
3299 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3300 for builtins the user declared correctly.
3301
41dbbb37
TS
33022015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3303 Bernd Schmidt <bernds@codesourcery.com>
3304 Cesar Philippidis <cesar@codesourcery.com>
3305 James Norris <jnorris@codesourcery.com>
3306 Jakub Jelinek <jakub@redhat.com>
3307 Ilmir Usmanov <i.usmanov@samsung.com>
3308
3309 * c-parser.c: Include "gomp-constants.h".
3310 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3311 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3312 Use OMP_CLAUSE_SET_MAP_KIND.
3313 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3314 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3315 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3316 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3317 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3318 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3319 "copyout", "create", "delete", "deviceptr", "gang", "host",
3320 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3321 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3322 "present_or_create", "pcreate", "seq", "self", "vector",
3323 "vector_length", "wait", "worker".
3324 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3325 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3326 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3327 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3328 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3329 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3330 (c_parser_oacc_data_clause_deviceptr)
3331 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3332 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3333 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3334 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3335 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3336 (c_parser_oacc_parallel, c_parser_oacc_update)
3337 (c_parser_oacc_wait): New functions.
3338 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3339 (c_finish_oacc_data): New prototypes.
3340 * c-typeck.c: Include "gomp-constants.h".
3341 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3342 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3343 OMP_CLAUSE_SET_MAP_KIND.
3344 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3345 (c_finish_oacc_data): New functions.
3346 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3347 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3348 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3349 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3350 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3351 GOMP_MAP_FORCE_DEVICEPTR.
3352
adfac8df
JJ
33532015-01-09 Michael Collison <michael.collison@linaro.org>
3354
3355 * c-array-notation.c: Include hash-set.h, machmode.h,
3356 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3357 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3358 * c-aux-info.c: Ditto.
3359 * c-convert.c: Ditto.
3360 * c-decl.c: Ditto.
3361 * c-errors.c: Ditto.
3362 * c-lang.c: Dittoxs.
3363 * c-objc-common.c: Ditto.
3364 * c-parser.c: Ditto.
3365 * c-typeck.c: Include hash-set.h, machmode.h,
3366 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3367 fold-const.h, wide-int.h, inchash.h, real.h and
3368 fixed-value.h due to flattening of tree.h.
3369
2cc901dc
MP
33702015-01-07 Marek Polacek <polacek@redhat.com>
3371
3372 PR c/64417
3373 * c-typeck.c (process_init_element): Disallow initialization of
3374 a flexible array member with a string constant if the structure
3375 is in an array.
3376
5624e564
JJ
33772015-01-05 Jakub Jelinek <jakub@redhat.com>
3378
e5341100
JJ
3379 PR sanitizer/64344
3380 * c-typeck.c (convert_for_assignment, c_finish_return): For
3381 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3382 types also set in_late_binary_op around convert call.
3383 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3384 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3385 result on expr as last argument to ubsan_instrument_float_cast,
3386 if in_late_binary_op, don't use c_save_expr but save_expr.
3387
5624e564
JJ
3388 Update copyright years.
3389
5bd012f8
MP
33902015-01-05 Marek Polacek <polacek@redhat.com>
3391
3392 PR c/64423
3393 * c-typeck.c (build_array_ref): Pass loc down to
3394 warn_array_subscript_with_type_char.
3395
3f8257db 33962014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3397
3398 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3399 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3400 element type.
8e745a17 3401 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3402 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3403 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3404 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3405 to PEDWARN_FOR_QUALIFIERS.
768952be 3406
8f94a8c4
JJ
34072014-12-17 Jakub Jelinek <jakub@redhat.com>
3408
3409 PR sanitizer/64289
3410 * c-convert.c: Include ubsan.h.
3411 (convert): For real -> integral casts and
3412 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3413 instead instrument the float cast directly.
3414
b731b390
JJ
34152014-11-29 Jakub Jelinek <jakub@redhat.com>
3416
3417 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3418 c_finish_stmt_expr): Remove NULL last argument from
3419 create_tmp_var_raw and create_tmp_var calls.
3420 * c-array-notation.c (fix_builtin_array_notation_fn,
3421 build_array_notation_expr, fix_conditional_array_notations_1,
3422 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3423
541e35a6
MP
34242014-11-28 Marek Polacek <polacek@redhat.com>
3425
3426 PR c/63862
3427 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3428 convert the right operand to integer type.
3429
b286be94
MP
34302014-11-25 Marek Polacek <polacek@redhat.com>
3431
3432 PR c/63877
3433 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3434 for inline functions.
3435
aa7da51a
JJ
34362014-11-21 Jakub Jelinek <jakub@redhat.com>
3437
3438 PR target/63764
3439 * c-typeck.c (build_array_ref): Adjust
3440 convert_vector_to_pointer_for_subscript caller. If it returns true,
3441 call non_lvalue_loc on the result.
3442
d876207f
RB
34432014-11-11 Richard Biener <rguenther@suse.de>
3444
3445 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3446 to true.
3447
e5e44252
AK
34482014-11-10 Andi Kleen <ak@linux.intel.com>
3449
3450 PR c/60804
3451 * c-parser.c (c_parser_statement_after_labels): Call
3452 check_no_cilk.
3453 (c_parser_if_statement): Dito.
3454 (c_parser_switch_statement): Dito.
3455 (c_parser_while_statement): Dito.
3456 (c_parser_do_statement): Dito.
3457 (c_parser_for_statement): Dito.
3458 * c-typeck.c (c_finish_loop): Dito.
3459
13c21655
PC
34602014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3461
3462 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3463 OPT_Wshift_count_overflow in the warnings.
3464
2d51fcef
MP
34652014-10-30 Marek Polacek <polacek@redhat.com>
3466
3467 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3468 print the stripped version as well, if they're not the same.
3469
ef4bddc2
RS
34702014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3471
3472 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3473 machine_mode.
3474
c582198b
AM
34752014-10-28 Andrew MacLeod <amacleod@redhat.com>
3476
3477 * c-decl.c: Adjust include files.
3478 * c-parser.c: Ditto.
3479
ddc8de03
PM
34802014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3481 Tom Tromey <tromey@redhat.com>
3482
3483 * c-tree.h (enum c_oracle_request): New.
3484 (c_binding_oracle_function): New typedef.
3485 (c_binding_oracle, c_pushtag, c_bind): Declare.
3486 * c-decl.c (c_binding_oracle): New global.
3487 (I_SYMBOL_CHECKED): New macro.
3488 (i_symbol_binding): New function.
3489 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3490 (I_TAG_CHECKED): New macro.
3491 (i_tag_binding): New function.
3492 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3493 (I_LABEL_CHECKED): New macro.
3494 (i_label_binding): New function.
3495 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3496 (c_print_identifier): Save and restore c_binding_oracle.
3497 (c_pushtag, c_bind): New functions.
3498
60393bbc
AM
34992014-10-27 Andrew MacLeod <amacleod@redhat.com>
3500
3501 * c-typeck.c: Adjust include files.
3502
d723bb7c
MLI
35032014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3504
3505 PR c++/53061
3506 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3507 initialization here...
3508 (c_initialize_diagnostics): ... but here. Set defaults after
3509 building pretty-printer.
3510
1bc5a451
MP
35112014-10-23 Marek Polacek <polacek@redhat.com>
3512
3513 PR c/63626
3514 * c-decl.c (pop_scope): Don't print warning in external_scope.
3515
4435bb92
MP
35162014-10-19 Marek Polacek <polacek@redhat.com>
3517
3518 PR c/63567
3519 * c-typeck.c (output_init_element): Allow initializing objects with
3520 static storage duration with compound literals even in C99 and add
3521 pedwarn for it.
3522
7278465e
MP
35232014-10-17 Marek Polacek <polacek@redhat.com>
3524
3525 PR c/63567
3526 * c-typeck.c (digest_init): Allow initializing objects with static
3527 storage duration with compound literals even in C99 and add pedwarn
3528 for it.
3529
d9b7be2e
MP
35302014-10-17 Marek Polacek <polacek@redhat.com>
3531
3532 PR c/63543
3533 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3534 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3535 error multiple times. Print the type.
3536
f406ae1f
MP
35372014-10-17 Marek Polacek <polacek@redhat.com>
3538
3539 PR c/63549
3540 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3541 type.
3542
92574c7c
MP
35432014-10-17 Marek Polacek <polacek@redhat.com>
3544
3545 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3546 (start_function): Use OPT_Wimplicit_int instead of 0.
3547 (store_parm_decls_oldstyle): Likewise.
3548
1bc4a978
MT
35492014-10-17 Alan Modra <amodra@gmail.com>
3550
3551 PR middle-end/61848
3552 * c-decl.c (merge_decls): Don't merge section name or tls model
3553 to newdecl symtab node, instead merge to olddecl. Override
3554 existing olddecl section name. Set tls_model for all thread-local
3555 vars, not just OMP thread-private ones. Remove incorrect comment.
3556
83685514
AM
35572014-10-16 Andrew MacLeod <amacleod@redhat.com>
3558
3559 * c-decl.c: Adjust include files.
3560
78a7c317
DD
35612014-10-14 DJ Delorie <dj@redhat.com>
3562
3563 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3564 (c_token_starts_typename): Check all __intN, not just __int128.
3565 (c_token_starts_declspecs): Likewise.
3566 (c_parser_declspecs): Likewise.
3567 (c_parser_attribute_any_word): Likewise.
3568 (c_parser_objc_selector): Likewise.
3569 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3570 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3571 is specified.
3572 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3573 __int128.
3574 (finish_declspecs): Likewise.
3575
74d98c1e
AB
35762014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3577
8e745a17 3578 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3579 the duplicate code.
8e745a17 3580 (c_parser_statement): Call the new function.
74d98c1e 3581
84937de2
MP
35822014-10-09 Marek Polacek <polacek@redhat.com>
3583
3584 PR c/63480
3585 * c-typeck.c (pop_init_level): Don't warn about initializing
3586 with { }.
3587
0382aaa0
MP
35882014-10-07 Marek Polacek <polacek@redhat.com>
3589
3590 PR c/59717
3591 * c-decl.c (header_for_builtin_fn): New function.
3592 (implicitly_declare): Suggest which header to include.
3593
7a0ca710
MP
35942014-10-07 Marek Polacek <polacek@redhat.com>
3595
3596 * c-convert.c (convert): Use error_operand_p.
3597 * c-typeck.c (require_complete_type): Likewise.
3598 (really_atomic_lvalue): Likewise.
3599 (digest_init): Likewise.
3600 (handle_omp_array_sections_1): Likewise.
3601
6bc8a126
MP
36022014-10-03 Marek Polacek <polacek@redhat.com>
3603
3604 PR c/63453
3605 * c-decl.c (pop_scope): Don't warn about "inline function declared
3606 but never defined" for functions marked with gnu_inline attribute.
3607
d90c0a59
JJ
36082014-09-25 Jakub Jelinek <jakub@redhat.com>
3609
3610 PR c++/63249
3611 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3612 on low_bound and length.
3613
083e891e
MP
36142014-09-24 Marek Polacek <polacek@redhat.com>
3615
3616 PR c/61405
3617 PR c/53874
3618 * c-parser.c: Don't define CPP_KEYWORD.
3619 (c_parser_switch_statement): Pass original type to c_finish_case.
3620 * c-tree.h (c_finish_case): Update declaration.
3621 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3622 conditionally to c_do_switch_warnings.
3623
8d95fe25
MP
36242014-09-03 Marek Polacek <polacek@redhat.com>
3625
3626 PR c/62024
3627 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3628 conversions.
3629
9a771876
JJ
36302014-09-02 Jakub Jelinek <jakub@redhat.com>
3631 Balaji V. Iyer <balaji.v.iyer@intel.com>
3632 Igor Zamyatin <igor.zamyatin@intel.com>
3633
3634 * c-parser.c (c_parser_cilk_for): New function.
3635 (c_parser_cilk_grainsize): Likewise.
3636 (c_get_temp_regvar): Likewise.
3637 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3638 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3639 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3640 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3641 case.
3642
b7679d96
CG
36432014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3644
3645 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3646 with using HOST_WIDE_INT without truncation to 'int'
3647
59ea0364
MP
36482014-08-22 Marek Polacek <polacek@redhat.com>
3649
3650 PR c++/62199
3651 * c-typeck.c (parser_build_binary_op): Adjust call to
3652 warn_logical_not_parentheses.
3653
671a475e
IZ
36542014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3655
3656 PR other/62008
3657 * c-parser.c (c_parser_array_notation): Check for correct
3658 type of an array added.
3659
04159acf
MP
36602014-08-19 Marek Polacek <polacek@redhat.com>
3661
3662 PR c++/62153
3663 * c-typeck.c (build_binary_op): If either operand of a comparison
3664 is a boolean expression, call maybe_warn_bool_compare.
3665
c77935ee
PP
36662014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3667
3668 PR c/45584
3669 * c-typeck.c (build_c_cast): Do a conversion even when the
3670 TYPE_MAIN_VARIANTs are the same.
3671
35aff4fb
MP
36722014-08-19 Marek Polacek <polacek@redhat.com>
3673
3674 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3675 pedwarn_c99 instead of pedwarn.
3676 (grokfield): Likewise.
3677 (warn_defaults_to): New function.
3678 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3679 Unconditionally call pedwarn_c99 instead of pedwarn.
3680 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3681 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3682 check flag_isoc11 before.
3683 * c-errors.c (pedwarn_c99): Change the return type to bool.
3684 Handle -Wc99-c11-compat.
3685 * c-parser.c (disable_extension_diagnostics): Handle
3686 warn_c99_c11_compat.
3687 (restore_extension_diagnostics): Likewise.
3688 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3689 instead of pedwarn, don't check flag_isoc11 before.
3690 (c_parser_declspecs): Likewise.
3691 (c_parser_alignas_specifier): Likewise.
3692 (c_parser_alignof_expression): Likewise.
3693 (c_parser_generic_selection): Likewise.
3694 * c-tree.h (pedwarn_c99): Update declaration.
3695 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3696 of pedwarn_c99.
3697
177cce46
MP
36982014-08-19 Marek Polacek <polacek@redhat.com>
3699
3700 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3701 to pedwarn_c90.
3702 * c-errors.c: Include "opts.h".
3703 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3704 * c-parser.c (disable_extension_diagnostics): Handle negative value
3705 of warn_c90_c99_compat, too.
3706 (restore_extension_diagnostics): Likewise.
3707 (c_parser_compound_statement_nostart): Pass
3708 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3709
6dc99c33
MP
37102014-08-12 Marek Polacek <polacek@redhat.com>
3711
3712 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3713 Add pedwarn.
3714 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3715 Likewise.
3716 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3717
3f8257db 37182014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3719
3720 PR c/51849
3721 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3722 Call pedwarn_c90 instead of pedwarn.
3723 (check_bitfield_type_and_width): Likewise.
3724 (declspecs_add_qual): Likewise.
3725 (declspecs_add_type): Likewise.
3726 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3727 Adjust to only call pedwarn_c90.
3728 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3729 pedwarn_c90 instead of pedwarn.
3730 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3731 * c-parser.c (disable_extension_diagnostics): Handle
3732 warn_c90_c99_compat.
3733 (restore_extension_diagnostics): Likewise.
3734 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3735 pedwarn_c90 instead of pedwarn.
3736 (c_parser_initelt): Likewise.
3737 (c_parser_postfix_expression): Likewise.
3738 (c_parser_postfix_expression_after_paren_type): Likewise.
3739 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3740 * c-tree.h: Fix formatting.
3741 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3742 pedwarn_c90 instead of pedwarn.
3743
9f25a338
TS
37442014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3745
3746 * c-typeck.c: Remove include of pointer-set.h.
3747
044331a8
MP
37482014-08-07 Marek Polacek <polacek@redhat.com>
3749
3750 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3751
b787e7a2
TS
37522014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3753
3754 * c-typeck.c: Use hash_map instead of pointer_map.
3755
6e2830c3
TS
37562014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3757
3758 * c-decl.c: Use hash_set instead of pointer_set.
3759
a7ee52fb
IZ
37602014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3761
3762 PR middle-end/61455
3763 * c-array-notation.c (expand_array_notations): Handling
3764 of DECL_EXPR added.
3765
b4dfdc11
MG
37662014-07-31 Marc Glisse <marc.glisse@inria.fr>
3767
3768 PR c++/60517
3769 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3770 a local variable.
3771
976d5a22
TT
37722014-07-30 Tom Tromey <tromey@redhat.com>
3773
3774 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3775 field.
3776 (really_start_incremental_init, push_init_level): Initialize
3777 designator_depth.
3778 (pop_init_level): Set global designator_depth.
3779 (process_init_element): Check for designated_init attribute.
3780
30281de2
MP
37812014-07-20 Marek Polacek <polacek@redhat.com>
3782
3783 PR c/61852
3784 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3785 (implicitly_declare): Pass location to implicit_decl_warning.
3786
b108f48f
JJ
37872014-07-14 Jakub Jelinek <jakub@redhat.com>
3788
3789 PR middle-end/61294
3790 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3791 If non-NULL, call c_parser_check_literal_zero.
3792 (c_parser_check_literal_zero): New function.
3793 (c_parser_postfix_expression_after_primary): Adjust
3794 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3795
773ec47f
MP
37962014-07-06 Marek Polacek <polacek@redhat.com>
3797
3798 PR c/6940
3799 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3800 * c-tree.h (C_ARRAY_PARAMETER): Define.
3801 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3802 function parameter.
3803
22e1cf1c 38042014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3805 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3806
3807 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3808 releasing symbol.
3809
52ec0ea3
MP
38102014-07-01 Marek Polacek <polacek@redhat.com>
3811
3812 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3813 instead of 0 to WARN_FOR_ASSIGNMENT.
3814
d5c3d343
MP
38152014-07-01 Marek Polacek <polacek@redhat.com>
3816
3817 PR c/58286
3818 * c-typeck.c (convert_for_assignment): Pass
3819 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3820
6a7253a4
MP
38212014-06-30 Marek Polacek <polacek@redhat.com>
3822
3823 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3824 has no_sanitize_undefined attribute.
3825
5e88a8f4
IZ
38262014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3827
3828 PR middle-end/57541
3829 * c-array-notation.c (fix_builtin_array_notation_fn):
3830 Check for 0 arguments in builtin call. Check that bultin argument is
3831 correct.
3832 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3833 index.
3834
9698b078
SH
38352014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3836
3837 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3838 qualifiers in __auto_type for atomic types.
3839 (c_parser_typeof_specifier): Discard all type qualifiers in
3840 __typeof__ for atomic types.
3841
6e07c515
MP
38422014-06-25 Marek Polacek <polacek@redhat.com>
3843
3844 PR c/61162
3845 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3846 the return expression to c_finish_return.
3847
da6f124d
JJ
38482014-06-25 Jakub Jelinek <jakub@redhat.com>
3849
3850 * c-typeck.c (c_finish_omp_clauses): Make sure
3851 OMP_CLAUSE_LINEAR_STEP has correct type.
3852
c203e8a7
TS
38532014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3854
3855 * c-decl.c: Adjust.
3856
56ad0e38
JJ
38572014-06-24 Jakub Jelinek <jakub@redhat.com>
3858
3859 * c-parser.c (c_parser_omp_for_loop): For
3860 #pragma omp parallel for simd move lastprivate clause from parallel
3861 to for rather than simd.
3862
47c2554f
MP
38632014-06-23 Marek Polacek <polacek@redhat.com>
3864
3865 * c-typeck.c (parser_build_binary_op): Don't call
3866 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3867
56363ffd
JH
38682014-06-15 Jan Hubicka <hubicka@ucw.cz>
3869
3870 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3871 * c-decl.c (merge_decls): Likewise.
3872
d7ff7ae5
MP
38732014-06-09 Marek Polacek <polacek@redhat.com>
3874
3875 PR c/36446
3876 * c-typeck.c (error_init): Call inform instead of error_at.
3877 (pedwarn_init): Call inform instead of pedwarn.
3878 (warning_init): Call inform instead of warning_at.
3879
24d047a3
JH
38802014-06-07 Jan Hubicka <hubicka@ucw.cz>
3881
3882 * c-decl.c (merge_decls): Use set_decl_section_name.
3883 (duplicate_decls): Remove node if it exists.
3884
9bac5cbb
G
38852014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3886
3887 PR c/53119
3888 * c-typeck.c (push_init_level, process_init_element,
3889 pop_init_level): Correct check for zero initialization, move
3890 missing brace warning to respect zero initialization.
3891
8ffcdea8
MP
38922014-06-05 Marek Polacek <polacek@redhat.com>
3893
3894 PR c/56724
3895 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3896
742938c9
MP
38972014-06-05 Marek Polacek <polacek@redhat.com>
3898
3899 PR c/49706
3900 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3901 on the left hand side operand of a comparison.
3902
6447c55d
MP
39032014-06-05 Marek Polacek <polacek@redhat.com>
3904
3905 PR c/48062
3906 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3907 Print note only if the warning was printed.
3908
9dc7743c
IZ
39092014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3910
3911 PR c/58942
3912 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3913 with a pointer.
3914
fedfecef
MP
39152014-06-03 Marek Polacek <polacek@redhat.com>
3916
3917 PR c/60439
3918 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3919 c_start_case.
3920 * c-tree.h (c_start_case): Update.
3921 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3922 switch condition has boolean value.
3923
9b2b7279
AM
39242014-06-02 Andrew MacLeod <amacleod@redhat.com>
3925
3926 * c-decl.c: Include builtins.h.
3927 * c-parser.c: Likewise.
3928
5c1bc275
MP
39292014-05-27 Marek Polacek <polacek@redhat.com>
3930
3931 PR c/56724
3932 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3933 error and warning calls to error_at and warning_at. Pass location of
3934 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3935 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3936 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3937
97563bc8
IZ
39382014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3939
3940 PR c/61191
3941 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3942 function parameters.
3943
aede2c10
JH
39442014-05-23 Jan Hubicka <hubicka@ucw.cz>
3945
3946 * c-decl.c (merge_decls): Preserve symtab node pointers.
3947 (duplicate_decls): Free new decl.
3948
edbba2ce
TS
39492014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3950
f3316c6d
TS
3951 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3952 initialization.
3953
edbba2ce
TS
3954 * c-parser.c (c_parser_omp_target): Return bool values.
3955
68c81f24
TS
39562014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3957
3958 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3959 num_teams_loc variable to num_thread_limit_loc.
3960
632f2871
RS
39612014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3962
3963 * c-array-notation.c (expand_array_notations): Use void_node
3964 instead of void_zero_node.
3965
766090c2
TS
39662014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3967
3968 * c-decl.c (finish_struct): Adjust.
3969 (finish_enum): Likewise.
3970 (bind): Adjust.
3971 (record_inline_static): Likewise.
3972 (push_scope): Likewise.
3973 (make_label): Likewise.
3974 (lookup_label_for_goto): Likewise.
3975 (finish_struct): Likewise.
3976 (finish_enum): Likewise.
3977 (store_parm_decls): Likewise.
3978 (c_push_function_context): Likewise.
3979 * c-lang.h: Remove usage of variable_size gty attribute.
3980 * c-parser.c (c_parse_init): Adjust.
3981 (c_parse_file): Likewise.
3982
2b107f6b
MP
39832014-05-13 Marek Polacek <polacek@redhat.com>
3984
3985 PR c/61162
3986 * c-typeck.c (convert_for_assignment): Pass location to
3987 WARN_FOR_ASSIGNMENT instead of input_location.
3988
d033409e
MP
39892014-05-10 Marek Polacek <polacek@redhat.com>
3990
3991 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3992 maybe_warn_string_init.
3993 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3994 maybe_warn_string_init.
3995 * c-tree.h (maybe_warn_string_init): Update declaration.
3996 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3997 Call pedwarn_init with loc instead of with input_location.
3998 (digest_init): Pass init_loc to maybe_warn_string_init.
3999 (pop_init_level): Call pedwarn_init with loc instead of with
4000 input_location.
4001 (set_init_index): Likewise.
4002 (process_init_element): Likewise.
4003
ea58ef42
MP
40042014-05-09 Marek Polacek <polacek@redhat.com>
4005
4006 PR c/61096
4007 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4008 (c_parser_initelt): Pass location to set_init_label. Pass array index
4009 location to set_init_index.
4010 * c-tree.h (push_init_level): Update declaration.
4011 (pop_init_level): Likewise.
4012 (set_init_index): Likewise.
4013 (set_init_label): Likewise.
4014 * c-typeck.c (error_init): Add location parameter. Call error_at
4015 instead of error.
4016 (digest_init): Pass init_loc to error_init.
4017 (really_start_incremental_init):
4018 (push_init_level): Add location parameter. Pass loc to pop_init_level
4019 and error_init.
4020 (pop_init_level): Likewise.
4021 (set_designator): Add location parameter. Pass loc to pop_init_level,
4022 push_init_level, and error_init.
4023 (set_init_index): Add location parameter. Pass loc to error_init and
4024 set_designator.
4025 (set_init_label): Likewise.
4026 (output_init_element): Pass loc to error_init.
4027 (process_init_element): Pass loc to error_init, pop_init_level,
4028 pedwarn_init, and push_init_level.
4029
661a0813
MP
40302014-05-09 Marek Polacek <polacek@redhat.com>
4031
4032 PR c/50459
4033 * c-parser.c (c_parser_attributes): Parse the arguments as an
4034 expression-list if the attribute takes identifier.
4035
2793eeab
MP
40362014-05-08 Marek Polacek <polacek@redhat.com>
4037
4038 PR c/61053
4039 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4040 TYPE_ALIGN_UNIT.
4041
f827930a
MP
40422014-05-08 Marek Polacek <polacek@redhat.com>
4043
4044 PR c/61077
4045 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4046 of main.
4047
1d60af08
KZ
40482014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4049 Mike Stump <mikestump@comcast.net>
4050 Richard Sandiford <rdsandiford@googlemail.com>
4051
4052 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4053 (finish_enum): Use wide-int interfaces.
4054 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4055 * c-typeck.c (build_c_cast): Likewise.
4056 (set_nonincremental_init_from_string): Likewise.
4057 (c_tree_equal): Likewise.
4058
a0e24419
MP
40592014-05-02 Marek Polacek <polacek@redhat.com>
4060
4061 PR c/25801
4062 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4063 Return size_one_node when the type is not complete.
4064 (pointer_diff): Remove comment.
4065 (build_unary_op): Improve error messages.
4066
19fc9faa
MP
40672014-05-02 Marek Polacek <polacek@redhat.com>
4068
4069 * c-typeck.c (c_finish_return): Separate warning_at calls.
4070
63bc4e87
MP
40712014-05-02 Marek Polacek <polacek@redhat.com>
4072
4073 * c-tree.h (error_init): Remove declaration.
4074 (pedwarn_init): Likewise.
4075 * c-typeck.c (error_init): Make static and move above.
4076 (pedwarn_init): Likewise.
4077 (warning_init): Move above.
4078 (maybe_warn_string_init): Likewise.
4079
4bd2511b
JL
40802014-05-01 Jeff Law <law@redhat.com>
4081
4082 Revert:
4083
4084 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4085 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4086 avoid goto.
4087
6a358dcb
MP
40882014-05-02 Marek Polacek <polacek@redhat.com>
4089
4090 PR c/60784
4091 * c-typeck.c (push_init_level): Set constructor_designated to
4092 p->designated for structures.
4093
ae5ebda4
MP
40942014-05-01 Marek Polacek <polacek@redhat.com>
4095
4096 PR c/60915
4097 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4098 function-definition has an attribute after the declarator.
4099
96b40f8d
MP
41002014-05-01 Marek Polacek <polacek@redhat.com>
4101
4102 PR c/60257
4103 * c-typeck.c (warning_init): Add location_t parameter. Call
4104 warning_at instead of warning.
4105 (push_init_level): Pass input_location to warning_init.
4106 (add_pending_init): Add location_t parameter. Pass loc to
4107 warning_init.
4108 (set_nonincremental_init): Pass input_location to add_pending_init.
4109 (set_nonincremental_init_from_string): Likewise.
4110 (output_init_element): Pass loc to warning_init and to
4111 add_pending_init.
4112
32e00768
MP
41132014-05-01 Marek Polacek <polacek@redhat.com>
4114
4115 PR c/43395
4116 * c-typeck.c (c_finish_return): Distinguish between label and variable
4117 when warning about returning local address.
4118
c9379ce2
MP
41192014-05-01 Marek Polacek <polacek@redhat.com>
4120
4121 PR c/29467
4122 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4123 in C89 mode.
4124
d00887e8
MP
41252014-05-01 Marek Polacek <polacek@redhat.com>
4126
4127 PR c/43245
4128 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4129 instead of 0 to WARN_FOR_QUALIFIERS.
4130
5436fa2e
MP
41312014-05-01 Marek Polacek <polacek@redhat.com>
4132
4133 PR c/56989
4134 * c-typeck.c (default_conversion): Use better location for
4135 error call.
4136
f8ed5150
MP
41372014-04-30 Marek Polacek <polacek@redhat.com>
4138
4139 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4140 also when SANITIZE_FLOAT_DIVIDE is on.
4141
8337d1db
MP
41422014-04-30 Marek Polacek <polacek@redhat.com>
4143
4144 PR c/60139
4145 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4146 and pedwarn_init. Use loc insted of input_location.
4147
c4bdc42f
MP
41482014-04-30 Marek Polacek <polacek@redhat.com>
4149
4150 PR c/60351
4151 * c-typeck.c (build_binary_op): Use location when warning about
4152 shift count.
4153
45484dcf
MP
41542014-04-25 Marek Polacek <polacek@redhat.com>
4155
4156 PR c/18079
4157 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4158 always_inline/noinline and hot/cold attributes.
4159
34cf811f
MP
41602014-04-25 Marek Polacek <polacek@redhat.com>
4161
4162 PR c/60114
4163 * c-parser.c (c_parser_initelt): Pass input_location to
4164 process_init_element.
4165 (c_parser_initval): Pass loc to process_init_element.
4166 * c-tree.h (process_init_element): Adjust declaration.
4167 * c-typeck.c (push_init_level): Pass input_location to
4168 process_init_element.
4169 (pop_init_level): Likewise.
4170 (set_designator): Likewise.
4171 (output_init_element): Add location_t parameter. Pass loc to
4172 digest_init.
4173 (output_pending_init_elements): Pass input_location to
4174 output_init_element.
4175 (process_init_element): Add location_t parameter. Pass loc to
4176 output_init_element.
4177
42056eac
JJ
41782014-04-24 Jakub Jelinek <jakub@redhat.com>
4179
4180 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4181 atomic-clause, allow comma in between atomic-clause and
4182 seq_cst.
4183
e162a134
JJ
41842014-04-22 Jakub Jelinek <jakub@redhat.com>
4185
4186 PR c/59073
4187 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4188 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4189
2f6babac
IZ
41902014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4191
4192 PR middle-end/60469
4193 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4194 create_tmp_var instead build_decl for creating temps.
4195 (build_array_notation_expr): Likewise.
4196 (fix_conditional_array_notations_1): Likewise.
4197 (fix_array_notation_expr): Likewise.
4198 (fix_array_notation_call_expr): Likewise.
4199
8edbfaa6
JJ
42002014-03-28 Jakub Jelinek <jakub@redhat.com>
4201
4202 PR c++/60689
4203 * c-tree.h (c_build_function_call_vec): New prototype.
4204 * c-typeck.c (build_function_call_vec): Don't call
4205 resolve_overloaded_builtin here.
4206 (c_build_function_call_vec): New wrapper function around
4207 build_function_call_vec. Call resolve_overloaded_builtin here.
4208 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4209 Call c_build_function_call_vec instead of build_function_call_vec.
4210 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4211 * c-decl.c (finish_decl): Likewise.
4212
7485aeea
MLI
42132014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4214
4215 PR c/55383
4216 * c-typeck.c: Use correct format string in cast-qual warning
4217
b17a8b07
TS
42182014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4219
4220 * c-decl.c (c_decl_attributes): Use
4221 lang_hooks.types.omp_mappable_type.
4222 * c-typeck.c (c_finish_omp_clauses): Likewise.
4223
3af9c5e9
MP
42242014-03-06 Marek Polacek <polacek@redhat.com>
4225
4226 PR c/60197
4227 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4228 of checking tree code.
4229
1c9f5f33
PK
42302014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4231
4232 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4233 (c_parser_parameter_declaration): Likewise.
4234
cc28fc7f
MP
42352014-02-19 Marek Polacek <polacek@redhat.com>
4236
4237 PR c/60195
4238 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4239 Call mark_exp_read on exp.value.
4240 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4241 TREE_ADDRESSABLE on old instead of val.
4242 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4243
b581c05c
PK
42442014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4245
4246 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4247 C_EXPR_APPEND by vec_safe_push.
4248 * c-tree.h (C_EXPR_APPEND): Remove.
4249
81e5eca8
MP
42502014-01-31 Marek Polacek <polacek@redhat.com>
4251
4252 PR c/59963
4253 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4254 build_function_call_vec.
4255 (build_function_call): Likewise.
4256 (build_atomic_assign): Likewise.
4257 (build_function_call_vec): Add arg_loc parameter. Use it.
4258 (convert_arguments): Likewise.
4259 (convert_for_assignment): Rename rhs_loc to expr_loc.
4260 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4261 (c_parser_objc_keywordexpr): Likewise.
4262 (c_parser_postfix_expression_after_primary): Call
4263 build_function_call_vec with expr_loc rather than op_loc.
4264 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4265 build_function_call_vec.
4266 (c_parser_expr_list): Add locations parameter. Fill it with locations
4267 of function arguments.
4268 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4269
68fca595
MP
42702014-01-30 Marek Polacek <polacek@redhat.com>
4271
4272 PR c/59940
4273 * c-typeck.c (build_function_call_vec): Use loc parameter.
4274 (convert_arguments): Add location parameter. Use it.
4275 (ep_convert_and_check): Likewise.
4276 (build_atomic_assign): Adjust convert_for_assignment call.
4277 (build_modify_expr): Likewise.
4278 (digest_init): Likewise.
4279 (c_finish_return): Likewise.
4280 (build_conditional_expr): Adjust ep_convert_and_check calls.
4281 (convert_for_assignment): Add rhs_loc parameter. Use it.
4282 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4283 calls.
4284
fa337f3a
RB
42852014-01-30 Richard Biener <rguenther@suse.de>
4286
4287 PR c/59905
4288 * c-typeck.c (build_function_call_vec): Do not replace calls
4289 to a function via an incompatible type with a runtime abort.
4290
b72271b9
BI
42912014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4292
4293 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4294 flag_enable_cilkplus with flag_cilkplus.
4295 (c_parser_direct_declarator_inner): Likewise.
4296 (c_parser_attribute_any_word): Likewise.
4297 (c_parser_attributes): Likewise.
4298 (c_parser_compound_statement): Likewise.
4299 (c_parser_statement_after_labels): Likewise.
4300 (c_parser_if_statement): Likewise.
4301 (c_parser_switch_statement): Likewise.
4302 (c_parser_do_statement): Likewise.
4303 (c_parser_for_statement): Likewise.
4304 (c_parser_unary_expression): Likewise.
4305 (c_parser_postfix_expression): Likewise.
4306 (c_parser_postfix_expression_after_primary): Likewise.
4307 (c_parser_postfix_expression_after_primary): Likewise.
4308 (c_parser_omp_clause_name): Likewise.
4309 (c_finish_omp_declare_simd): Likewise.
4310 (c_parser_cilk_verify_simd): Likewise.
4311 * c-typeck.c (build_array_ref): Likewise.
4312 (build_function_call_vec): Likewise.
4313 (convert_arguments): Likewise.
4314 (build_compound_expr): Likewise.
4315 (c_finish_return): Likewise.
4316 (c_finish_if_stmt): Likewise.
4317 (c_finish_loop): Likewise.
4318 (build_binary_op): Likewise.
4319
393e8e8b
MP
43202014-01-23 Marek Polacek <polacek@redhat.com>
4321
4322 PR c/59846
4323 * c-typeck.c (parser_build_binary_op): Use location instead of
4324 input_location.
4325 (build_binary_op): Pass location to shorten_compare.
4326
f04dda30
MP
43272014-01-23 Marek Polacek <polacek@redhat.com>
4328
4329 PR c/58346
4330 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4331 an empty aggregate.
4332
789eadcd
MP
43332014-01-23 Marek Polacek <polacek@redhat.com>
4334
4335 PR c/59871
4336 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4337 of a comma expression.
4338 (emit_side_effect_warnings): Likewise.
4339
40f14e9f
BI
43402014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4341
4342 PR c/59825
4343 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4344 function to use walk_tree and moved a lot of its functionality to
4345 expand_array_notations.
4346 (expand_array_notations): New function.
4347
74558dd9
BI
43482014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4349
4350 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4351 attribute an attribute without value.
4352
652fea39
JJ
43532014-01-23 Jakub Jelinek <jakub@redhat.com>
4354
4355 PR middle-end/58809
4356 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4357 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4358
f34f1c87
MP
43592014-01-22 Marek Polacek <polacek@redhat.com>
4360
4361 PR c/59891
4362 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4363 of remove_c_maybe_const_expr on op1 and op2.
4364
241f845a
JJ
43652014-01-15 Jakub Jelinek <jakub@redhat.com>
4366
4367 PR c/58943
4368 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4369 effects, preevaluate rhs using SAVE_EXPR first.
4370
9a74f20c
BI
43712014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4372
4373 PR c++/59631
4374 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4375 statements with if-elseif statements.
4376
96066ce1
MP
43772014-01-06 Marek Polacek <polacek@redhat.com>
4378
4379 PR c/57773
4380 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4381 defined bit-field types only in ISO C.
4382
23a5b65a
RS
43832014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4384
4385 Update copyright years
4386
f9030485
RS
43872014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4388
4389 * c-array-notation.c: Use the standard form for the copyright notice.
4390
41958c28
BI
43912013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4392
4393 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4394 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4395 field in parser is not empty. If not-empty, call the function
4396 c_parser_finish_omp_declare_simd.
4397 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4398 between SIMD-enabled functions and #pragma simd. Added new parameter.
4399 (c_parser_cilk_all_clauses): Modified the usage of the function
4400 c_parser_cilk_clause_vectorlength as mentioned above.
4401 (c_parser_cilk_simd_fn_vector_attrs): New function.
4402 (c_finish_cilk_simd_fn_tokens): Likewise.
4403 (is_cilkplus_vector_p): Likewise.
4404 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4405 "nomask," and "mask" strings in clause name.
4406 (c_parser_omp_all_clauses): Added 3 new case statements:
4407 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4408 PRAGMA_CILK_CLAUSE_NOMASK.
4409 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4410 check for vector attribute and if so call the function
4411 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4412 called the function c_finish_cilk_simd_fn_tokens.
4413 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4414 parser field is non-empty. If so, parse them as you would parse
4415 the omp declare simd pragma.
4416 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4417 Added a check when step is a parameter and flag it as error.
4418 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4419 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4420 pragma_omp_clause.
4421
cef0fd0e
TS
44222013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4423
4424 * c-parser.c (c_parser_omp_parallel): Fix description.
4425
12893402
BI
44262013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4427
4428 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4429 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4430 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4431 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4432
296674db
JM
44332013-12-04 Joseph Myers <joseph@codesourcery.com>
4434
4435 PR c/52023
4436 * c-parser.c (c_parser_alignas_specifier): Use
4437 c_sizeof_or_alignof_type instead of c_alignof.
4438 (c_parser_alignof_expression): Likewise, with min_alignof
4439 parameter depending on alignof spelling used.
4440
edd28054
MP
44412013-12-04 Marek Polacek <polacek@redhat.com>
4442
4443 PR c/54113
4444 * c-decl.c (start_function): Don't warn for missing prototype for
4445 inline functions.
4446
da0fc454
MP
44472013-12-03 Marek Polacek <polacek@redhat.com>
4448
4449 PR c/59351
4450 * c-decl.c (build_compound_literal): Allow compound literals with
4451 empty initial value.
4452
4c2ecab0
JM
44532013-12-02 Joseph Myers <joseph@codesourcery.com>
4454
4455 PR c/58235
4456 * c-typeck.c (build_modify_expr): Diagnose assignment to
4457 expression with array type.
4458
340baef7
JM
44592013-11-29 Joseph Myers <joseph@codesourcery.com>
4460
4461 PR c/42262
4462 * c-typeck.c (process_init_element): Do not treat a string as
4463 initializing a whole array when used with a designator for an
4464 individual element.
4465
6763b9f7
JM
44662013-11-29 Joseph Myers <joseph@codesourcery.com>
4467
4468 PR c/57574
4469 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4470 an inline function following a static declaration.
4471
e7bd1de1
JJ
44722013-11-28 Jakub Jelinek <jakub@redhat.com>
4473
4474 PR c/59310
4475 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4476 to p_name before calling c_parser_omp_teams instead of after.
4477 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4478 argument. Remove unused p_name variable.
4479
0136f8f0
AH
44802013-11-27 Aldy Hernandez <aldyh@redhat.com>
4481 Jakub Jelinek <jakub@redhat.com>
4482
4483 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4484 external_scope is NULL.
4485
241b71bb
TV
44862013-11-27 Tom de Vries <tom@codesourcery.com>
4487 Marc Glisse <marc.glisse@inria.fr>
4488
4489 PR c++/59032
4490 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4491
2fb9a547
AM
44922013-11-22 Andrew MacLeod <amacleod@redhat.com>
4493
4494 * c-typeck.c: Add required include files from gimple.h.
4495
8400e75e
DM
44962013-11-22 David Malcolm <dmalcolm@redhat.com>
4497
4498 * c-decl.c (define_label, shadow_tag_warned)
4499 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4500 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4501 (declspecs_add_type): Remove use of in_system_header macro.
4502 * c-parser.c (c_parser_unary_expression): Likewise.
4503 * c-typeck.c (store_init_value, process_init_element)
4504 (c_start_case): Likewise.
4505
4506 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4507 macro.
4508
4509 * c-parser.c (c_parser_set_source_position_from_token): Remove
4510 reference to in_system_header from comment.
4511
386b1f1f
RS
45122013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4513
4514 * c-decl.c (grokdeclarator): Update comment to refer to
4515 tree_to_[su]hwi rather than tree_low_cst.
4516
ae7e9ddd
RS
45172013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4518
4519 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4520 tree_to_uhwi throughout.
4521
9439e9a1
RS
45222013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4523
4524 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4525 throughout.
4526
9541ffee
RS
45272013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4528
4529 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4530 throughout.
4531
c02065fc
AH
45322013-11-15 Aldy Hernandez <aldyh@redhat.com>
4533
4534 * c-parser.c (c_parser_cilk_simd): New.
4535 (c_parser_cilk_verify_simd): New.
4536 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4537 (c_parser_omp_for_loop): Add case for NE_EXPR.
4538 Set c_break_label for CILK_SIMD.
4539 (c_parser_cilk_clause_vectorlength): New.
4540 (c_parser_cilk_clause_linear): New.
4541 (c_parser_cilk_clause_name): New.
4542 (c_parser_cilk_all_clauses): New.
4543 * c-typeck.c (build_unary_op): Pass location argument to
4544 readonly_error.
4545 (build_modify_expr): Same.
4546 (build_asm_expr): Same.
4547 (c_finish_bc_stmt): Error on break/continue in loops.
4548
18f429e2
AM
45492013-11-14 Andrew MacLeod <amacleod@redhat.com>
4550
4551 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4552
d8a2d370
DN
45532013-11-14 Diego Novillo <dnovillo@google.com>
4554
4555 * c-decl.c: Include print-tree.h.
4556 Include stor-layout.h.
4557 Include varasm.h.
4558 Include attribs.h.
4559 Include stringpool.h.
4560 * c-lang.c: Include fold-const.h.
4561 * c-parser.c: Include stringpool.h.
4562 Include attribs.h.
4563 Include stor-layout.h.
4564 Include varasm.h.
4565 Include trans-mem.h.
4566 * c-typeck.c: Include stor-layout.h.
4567 Include trans-mem.h.
4568 Include varasm.h.
4569 Include stmt.h.
4570
38b7bc7f
JM
45712013-11-13 Joseph Myers <joseph@codesourcery.com>
4572
4573 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4574 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4575 __auto_type.
4576 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4577 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4578 RID_AUTO_TYPE.
4579 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4580 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4581 (c_parser_declarator, c_parser_direct_declarator_inner)
4582 (c_parser_parameter_declaration, c_parser_type_name): All callers
4583 changed.
4584 (c_parser_declaration_or_fndef): Handle declarations with type
4585 determined from the initializer.
4586
45b0be94
AM
45872013-11-12 Andrew MacLeod <amacleod@redhat.com>
4588
18f429e2 4589 * c-typeck.c: Include gimplify.h.
45b0be94 4590
582d9b50
JM
45912013-11-12 Joseph Myers <joseph@codesourcery.com>
4592
4593 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4594 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4595 comment.
4596 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4597 or _Thread_local as appropriate in diagnostics.
4598 (build_null_declspecs): Initialize ret->thread_gnu_p.
4599 (declspecs_add_scspec): Handle either __thread or _Thread_local
4600 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4601 pedantic. Do not disallow _Thread_local extern and _Thread_local
4602 static.
4603
267bac10
JM
46042013-11-07 Joseph Myers <joseph@codesourcery.com>
4605 Andrew MacLeod <amacleod@redhat.com>
4606
4607 * c-aux-info.c (gen_type): Handle atomic qualifier.
4608 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4609 qualifiers when compating types.
4610 (shadow_tag_warned): Handle atomic_p in declspecs.
4611 (quals_from_declspecs): Likewise.
4612 (start_decl): Use c_type_promotes_to when promoting argument
4613 types.
4614 (grokdeclarator): Handle _Atomic.
4615 (get_parm_info): Diagnose any qualifier on "void" as only
4616 parameter.
4617 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4618 comparing types. Use c_type_promotes_to when promoting argument
4619 types.
4620 (finish_function): Use c_type_promotes_to when promoting argument
4621 types.
4622 (build_null_declspecs): Handle atomic_p in declspecs.
4623 (declspecs_add_qual): Handle RID_ATOMIC.
4624 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4625 (c_token_starts_declspecs): Handle RID_ATOMIC.
4626 (c_parser_declspecs): Handle atomic type specifiers and
4627 qualifiers.
4628 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4629 from types of expressions with atomic type.
4630 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4631 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4632 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4633 (c_parser_statement_after_labels, c_parser_switch_statement)
4634 (c_parser_for_statement, c_parser_expr_no_commas)
4635 (c_parser_conditional_expression, c_parser_binary_expression)
4636 (c_parser_cast_expression, c_parser_unary_expression)
4637 (c_parser_postfix_expression)
4638 (c_parser_postfix_expression_after_primary, c_parser_expression):
4639 Use convert_lvalue_to_rvalue.
4640 (c_parser_expression_conv, c_parser_expr_list): Document
4641 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4642 (c_parser_objc_synchronized_statement): Use
4643 convert_lvalue_to_rvalue.
4644 (c_parser_objc_selector): Handle RID_ATOMIC.
4645 (c_parser_objc_receiver, c_parser_array_notation): Use
4646 convert_lvalue_to_rvalue.
4647 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4648 _Atomic (type-name).
4649 (struct c_declspecs): Add atomic_p field.
4650 (convert_lvalue_to_rvalue): Declare.
4651 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4652 corresponding atomic types.
4653 (qualify_type): Don't add _Atomic qualifiers from second argument.
4654 (comp_target_types): Do not allow _Atomic mismatches.
4655 (type_lists_compatible_p): Do not remove atomic qualifiers when
4656 comparing types.
4657 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4658 (build_atomic_assign): New functions.
4659 (build_unary_op): Use build_atomic_assign for atomic increment and
4660 decrement.
4661 (build_conditional_expr): Do not treat _Atomic void as a qualified
4662 version of void.
4663 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4664 (find_anonymous_field_with_type, convert_to_anonymous_field)
4665 (convert_for_assignment): Do not remove atomic qualifiers when
4666 comparing types.
4667 (digest_init): Do not accept initialization of arrays of atomic
4668 elements by string constants.
4669 (build_asm_expr): Use convert_lvalue_to_rvalue.
4670 (build_binary_op): Do not treat _Atomic void as a qualified
4671 version of void.
4672
0c249d4b
DD
46732013-11-06 DJ Delorie <dj@redhat.com>
4674
4675 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4676 both explicit and builtin, print the location of the explicit one.
4677
6d7f7e0a
TB
46782013-11-05 Tobias Burnus <burnus@net-b.de>
4679
4680 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4681 c_parser_omp_distribute, c_parser_omp_teams,
4682 c_parser_omp_target, c_parser_omp_declare): Handle
4683 -fopenmp-simd.
4684
b906f4ca
MP
46852013-11-03 Marek Polacek <polacek@redhat.com>
4686
4687 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4688
ee1d5a02
JJ
46892013-11-01 Jakub Jelinek <jakub@redhat.com>
4690
4691 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4692 check_dup_generic at the end, unless remove is true.
4693 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4694 remove = true;.
4695 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4696
5a9785fb
JJ
46972013-10-31 Jakub Jelinek <jakub@redhat.com>
4698
4699 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4700 with decl that is not pointer nor array.
4701
939b37da
BI
47022013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4703
4704 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4705 a spawning function is found.
4706 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4707 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4708 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4709 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4710 case.
4711 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4712 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4713 expr.
4714 (c_finish_return): Added a check to reject _Cilk_spawn in return
4715 expression.
4716 (build_cilk_spawn): New function.
4717 (build_cilk_sync): Likewise.
4718 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4719
d4af74d4
TB
47202013-10-27 Tobias Burnus <burnus@net-b.de>
4721
4722 PR other/33426
4723 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4724 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4725 (c_parser_statement_after_labels): Update calls.
4726
d73749df 47272013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4728
4729 PR other/33426
4730 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4731 Handle PRAGMA_IVDEP.
4732 (c_parser_statement_after_labels): Update call.
4733
f28aa681
MP
47342013-10-24 Marek Polacek <polacek@redhat.com>
4735
4736 * c-parser.c (c_parser_struct_declaration): Add a comment.
4737 (c_parser_declarator): Don't allow _Alignas here.
4738
0645c1a2
AM
47392013-10-17 Andrew MacLeod <amacleod@redhat.com>
4740
4741 * c-parser.c: Include omp-low.h.
4742 * c-typeck.c: Likewise.
4743
568a31f2
MP
47442013-10-17 Marek Polacek <polacek@redhat.com>
4745
4746 PR c/58267
4747 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4748 Document syntax of the array-declarator.
4749 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4750 are not permitted.
4751 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4752 (c_parser_struct_declaration): Likewise.
4753 (c_parser_declarator): Likewise.
4754 (c_parser_direct_declarator_inner): Likewise.
4755 (c_parser_parameter_declaration): Likewise.
4756 (c_parser_type_name): Likewise.
4757
acf0174b
JJ
47582013-10-11 Jakub Jelinek <jakub@redhat.com>
4759
4760 * c-lang.h (current_omp_declare_target_attribute): New extern
4761 decl.
4762 * c-parser.c: Include c-lang.h.
4763 (struct c_parser): Change tokens to c_token *.
4764 Add tokens_buf field. Change tokens_avail type to unsigned int.
4765 (c_parser_consume_token): If parser->tokens isn't
4766 &parser->tokens_buf[0], increment parser->tokens.
4767 (c_parser_consume_pragma): Likewise.
4768 (enum pragma_context): Add pragma_struct and pragma_param.
4769 (c_parser_external_declaration): Adjust
4770 c_parser_declaration_or_fndef caller.
4771 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4772 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4773 Adjust recursive call.
4774 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4775 of pragma_external.
4776 (c_parser_parameter_declaration): Use pragma_param instead of
4777 pragma_external.
4778 (c_parser_compound_statement_nostart, c_parser_label,
4779 c_parser_for_statement): Adjust
4780 c_parser_declaration_or_fndef callers.
4781 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4782 it through to c_parser_conditional_expression.
4783 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4784 pass it through to c_parser_binary_expression. Adjust recursive
4785 call.
4786 (c_parser_binary_expression): Remove prec argument, add
4787 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4788 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4789 binop matches it, use build2 instead of parser_build_binary_op.
4790 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4791 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4792 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4793 Handle pragma_struct and pragma_param the same as pragma_external.
4794 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4795 (c_parser_omp_variable_list): Parse array sections for
4796 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4797 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4798 (c_parser_omp_clause_reduction): Handle user defined reductions.
4799 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4800 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4801 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4802 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4803 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4804 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4805 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4806 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4807 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4808 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4809 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4810 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4811 (c_parser_omp_for_loop): Add CODE argument, pass it through
4812 to c_finish_omp_for. Change last argument to cclauses,
4813 and adjust uses to grab parallel clauses from the array of all
4814 the split clauses. Adjust c_parser_binary_expression,
4815 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4816 (omp_split_clauses): New function.
4817 (c_parser_omp_simd): New function.
4818 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4819 Allow the function to be called also when parsing combined constructs,
4820 and call c_parser_omp_simd when parsing for simd.
4821 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4822 #pragma omp section, require exactly one structured-block instead of
4823 sequence of statements.
4824 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4825 Allow the function to be called also when parsing combined constructs.
4826 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4827 Allow the function to be called also when parsing combined
4828 constructs.
4829 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4830 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4831 c_parser_omp_teams, c_parser_omp_target_data,
4832 c_parser_omp_target_update, c_parser_omp_target,
4833 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4834 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4835 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4836 (c_parser_omp_construct): Add p_name and mask vars. Handle
4837 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4838 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4839 and c_parser_omp_sections callers.
4840 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4841 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4842 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4843 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4844 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4845 OMP_CLAUSE_DEPEND.
4846 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4847 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4848 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4849 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4850 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4851 * c-typeck.c: Include tree-inline.h.
4852 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4853 handle_omp_array_sections_1, handle_omp_array_sections,
4854 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4855 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4856 user defined reductions.
4857 (c_tree_equal): New function.
4858 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4859 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4860 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4861 c_check_omp_declare_reduction_r): New prototypes.
4862 * c-decl.c (current_omp_declare_target_attribute): New variable.
4863 (c_decl_attributes): New function.
4864 (start_decl, start_function): Use it instead of decl_attributes.
4865 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4866 c_omp_reduction_decl, c_omp_reduction_lookup,
4867 c_check_omp_declare_reduction_r): New functions.
4868
0a6c2227
TT
48692013-09-25 Tom Tromey <tromey@redhat.com>
4870
4871 * Make-lang.in (c/gccspec.o): Remove.
4872 (CFLAGS-c/gccspec.o): New variable.
4873 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4874 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4875 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4876
f3bc55f0
TT
48772013-09-25 Tom Tromey <tromey@redhat.com>
4878
4879 * Make-lang.in (c/gccspec.o): Don't use subshell.
4880
a24d975c
MP
48812013-09-18 Marek Polacek <polacek@redhat.com>
4882
4883 PR sanitize/58443
4884 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4885 Remove unnecessary check.
4886
ce6923c5
MP
48872013-09-18 Marek Polacek <polacek@redhat.com>
4888
4889 PR sanitizer/58411
4890 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4891 no_sanitize_undefined attribute.
4892
a1e51df9
KT
48932013-09-13 Kai Tietz <ktietz@redhat.com>
4894
4895 PR target/57848
4896 * c-decl.c (c_builtin_function_ext_scope): Remove
4897 wrong assumption that it is never called on prexisting
4898 symbol.
4899
0af94e6f
JR
49002013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4901
4902 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4903
20059c8b
GDR
49042013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4905
4906 * c-objc-common.c (c_tree_printer): Tidy.
4907
de5a5fa1
MP
49082013-08-30 Marek Polacek <polacek@redhat.com>
4909
4910 * c-typeck.c (build_binary_op): Add division by zero and shift
4911 instrumentation.
4912
2531a1d9 49132013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4914 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4915
6e2bcc98 4916 PR c/35649
2531a1d9
JR
4917 * c-typeck.c (c_common_type): Prefer double_type_node over
4918 other REAL_TYPE types with the same precision.
4919 (convert_arguments): Likewise.
4920
025311c4
GDR
49212013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4922
4923 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4924 (c_initialize_diagnostics): Call a destructor for the early printer.
4925
da6ca2b5
GDR
49262013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4927
4928 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4929 printer initialization.
4930
318cda85 49312013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4932
318cda85
BI
4933 PR c/57490
4934 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4935 check for truth values.
4936 (expand_array_notation_exprs): Added truth values case. Removed an
4937 unwanted else. Added for-loop to walk through subtrees in default
4938 case.
4939
b066401f
GDR
49402013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4941
4942 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4943
fb48aadc
JM
49442013-07-23 Joseph Myers <joseph@codesourcery.com>
4945
4946 * c-parser.c (struct c_generic_association): Fix typo.
4947
433cc7b0
TT
49482013-07-23 Tom Tromey <tromey@redhat.com>
4949 Joseph Myers <joseph@codesourcery.com>
4950
4951 * c-parser.c (struct c_generic_association): New.
4952 (c_generic_association_d): New typedef.
4953 (c_parser_generic_selection): New function.
4954 (c_parser_postfix_expression): Handle RID_GENERIC.
4955
26d40c3d
JM
49562013-07-13 Jason Merrill <jason@redhat.com>
4957
4958 PR c++/57793
4959 * c-decl.c (finish_struct): Check for too-large class.
4960
ecdbd01a 49612013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4962
4963 PR c/57821
4964 * c-typeck.c (set_init_index): When folding, check for index overflow.
4965
1141ed3f
BI
49662013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4967
4968 * c-parser.c (c_parser_array_notation): Removed rejection of array
4969 notations in an array of function pointers.
4970
713b46fa
BI
49712013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4972
4973 * c-array-notation.c (make_triplet_val_inv): New function.
4974 (create_cmp_incr): Likewise.
4975 (create_array_refs): Likewise.
4976 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4977 Also modularized common parts between functions and called the function.
4978 (build_array_notation_expr): Likewise.
4979 (fix_conditional_array_notations_1): Likewise.
4980 (fix_array_notation_expr): Likewise.
4981 (fix_array_notation_call_expr): Likewise.
4982
92f20202
MP
49832013-06-18 Marek Polacek <polacek@redhat.com>
4984
4985 PR c/57630
4986 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4987
73a23b06
BI
49882013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4989
4990 * c-array-notation.c (build_array_notation_expr): Reject array notation
4991 mismatch between LHS and RHS even inside a call_expr. Also, removed
4992 a couple while statements that were dead code.
4993
00b8517d
BI
49942013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4995
4996 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4997 excessive precision expressions in function parameters. Also removed
4998 couple unwanted while statements.
4999
1509bdda
BI
50002013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5001
5002 * c-array-notation.c (expand_array_notation_exprs): Added
5003 ARRAY_NOTATION_REF case.
5004
d60f1706
BI
50052013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5006
5007 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5008 function to c-family/array-notation-common.c.
5009 (is_cilkplus_reduce_builtin): Likewise.
5010 (find_rank): Likewise.
5011 (extract_array_notation_exprs): Likewise.
5012 (replace_array_notations): Likewise.
5013 (find_inv_trees): Likewise.
5014 (replace_inv_trees): Likewise.
5015 (contains_array_notation_expr): Likewise.
5016 (find_correct_array_notation_type): Likewise.
5017 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5018 (struct inv_list): Moved this to c-family/array-notation-common.c.
5019 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5020
6d6efbb3
BI
50212013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5022
5023 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5024 reduction functions outside the for-loop. Added a check if the fundecl
5025 is non-NULL. Finally, removed an unwanted if-statement, and made the
5026 body unconditional.
5027
25c22937
BI
50282013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5029
5030 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5031 condition of the if-statement matches the rank of else-block and then-
5032 block when array notations are used.
5033 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5034 expression after the entire function body is parsed.
5035 (c_parser_expr_no_commas): Delayed creating array notation expressions
5036 to the end of function parsing.
5037 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5038 whole if-statement instead of just the condition.
5039 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5040
edd25645
BI
50412013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5042
5043 PR c/57474
5044 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5045 array to NULL_TREE if they are unused. Also added a check for the
5046 field to be NULL before its fields are used in future.
5047
065ce7f1
RO
50482013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5049
5050 PR bootstrap/57450
5051 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5052 (build_array_notation_expr): Likewise.
5053
36536d79
BI
50542013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5055
5056 * c-typeck.c (build_array_ref): Added a check to see if array's
5057 index is greater than one. If true, then emit an error.
5058 (build_function_call_vec): Exclude error reporting and checking
5059 for builtin array-notation functions.
5060 (convert_arguments): Likewise.
5061 (c_finish_return): Added a check for array notations as a return
5062 expression. If true, then emit an error.
5063 (c_finish_loop): Added a check for array notations in a loop
5064 condition. If true then emit an error.
5065 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5066 (build_binary_op): Added a check for array notation expr inside
5067 op1 and op0. If present, we call another function to find correct
5068 type.
5069 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5070 * c-parser.c (c_parser_compound_statement): Check if array
5071 notation code is used in tree, if so, then transform them into
5072 appropriate C code.
5073 (c_parser_expr_no_commas): Check if array notation is used in LHS
5074 or RHS, if so, then build array notation expression instead of
5075 regular modify.
5076 (c_parser_postfix_expression_after_primary): Added a check for
5077 colon(s) after square braces, if so then handle it like an array
5078 notation. Also, break up array notations in unary op if found.
5079 (c_parser_direct_declarator_inner): Added a check for array
5080 notation.
5081 (c_parser_compound_statement): Added a check for array notation in
5082 a stmt. If one is present, then expand array notation expr.
5083 (c_parser_if_statement): Likewise.
5084 (c_parser_switch_statement): Added a check for array notations in
5085 a switch statement's condition. If true, then output an error.
5086 (c_parser_while_statement): Similarly, but for a while.
5087 (c_parser_do_statement): Similarly, but for a do-while.
5088 (c_parser_for_statement): Similarly, but for a for-loop.
5089 (c_parser_unary_expression): Check if array notation is used in a
5090 pre-increment or pre-decrement expression. If true, then expand
5091 them.
5092 (c_parser_array_notation): New function.
5093 * c-array-notation.c: New file.
5094 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5095
cd192ccc
MS
50962013-05-23 Mike Stump <mikestump@comcast.net>
5097
5098 * c-typeck.c (convert_for_assignment): Handle references to memory
5099 spaces better.
5100
427b248d
JM
51012013-05-16 Jason Merrill <jason@redhat.com>
5102
5103 * Make-lang.in (cc1$(exeext)): Use link mutex.
5104
44d90fe1
PC
51052013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5106
5107 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5108 to simply use OPT_Wpointer_arith.
5109 (build_unary_op): Likewise.
5110
4e7d7b3d
JJ
51112013-04-03 Jakub Jelinek <jakub@redhat.com>
5112
5113 PR c/19449
5114 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5115 argument. If set, or it temporarily for parsing of the first
5116 argument into force_folding_builtin_constant_p.
5117 (c_parser_postfix_expression): Adjust callers.
5118
839b422f
RB
51192013-03-21 Richard Biener <rguenther@suse.de>
5120
5121 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5122 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5123
2ee028f1
MP
51242013-02-12 Marek Polacek <polacek@redhat.com>
5125
5126 PR c/44938
5127 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5128 origtypes to NULL.
5129
8824edff
JJ
51302013-01-24 Jakub Jelinek <jakub@redhat.com>
5131
5132 PR c/56078
5133 * c-typeck.c (set_nonincremental_init_from_string): If
5134 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5135 returned false.
5136 (process_init_element): Likewise.
5137
eadd3d0d
JJ
51382012-12-20 Jakub Jelinek <jakub@redhat.com>
5139
5140 PR c++/55619
5141 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5142 argument, don't call default_function_array_conversion
5143 nor c_fully_fold here.
5144 (c_parser_asm_statement): Adjust callers.
5145 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5146 and outputs here, and call default_function_array_conversion
5147 on inputs that don't need to be addressable.
5148
f8a93a2e
JJ
51492012-12-18 Jakub Jelinek <jakub@redhat.com>
5150
5151 PR c/39464
5152 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5153 warning require that both c_common_unsigned_type as well as
5154 c_common_signed_type is the same for both mvl and mvr types.
5155
9771b263
DN
51562012-11-16 Diego Novillo <dnovillo@google.com>
5157
5158 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5159
5160 * c-common.c: Use new vec API in vec.h.
5161 * c-common.h: Likewise.
5162 * c-gimplify.c: Likewise.
5163 * c-pragma.c: Likewise.
5164 * c-pretty-print.c: Likewise.
5165 * c-pretty-print.h: Likewise.
5166 * c-semantics.c: Likewise.
5167 * c-decl.c: Likewise.
5168 * c-parser.c: Likewise.
5169 * c-tree.h: Likewise.
5170 * c-typeck.c: Likewise.
5171
880661a4
JW
51722012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5173
5174 PR c++/54930
5175 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5176
077d1abe
MLI
51772012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5178
5179 PR c/53066
5180 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5181 shadows a function, unless the variable is a function or a
5182 pointer-to-function.
5183
3a785c97
JJ
51842012-10-12 Jakub Jelinek <jakub@redhat.com>
5185
5186 PR c/54381
5187 * c-parser.c (struct c_tree_loc_pair): Removed.
5188 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5189 add location_t * and tree * arguments, fill in array of 3
5190 sizeof_arg trees and corresponding locs.
5191 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5192 c_parser_expr_list callers.
5193 (c_parser_postfix_expression_after_primary): Likewise. Pass
5194 array of 3 sizeof_arg trees and locs (corresponding to first
5195 3 arguments) to sizeof_pointer_memaccess_warning.
5196
703c8606
LC
51972012-10-09 Lawrence Crowl <crowl@google.com>
5198
5199 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5200 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5201 hash table.
5202
5d9de0d0
PC
52032012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5204
5205 PR c++/54194
5206 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5207 call.
5208
a212e43f
MG
52092012-10-09 Marc Glisse <marc.glisse@inria.fr>
5210
5211 PR c++/54427
5212 * c-typeck.c: Include c-common.h.
5213 (enum stv_conv): Moved to c-common.h.
5214 (scalar_to_vector): Moved to c-common.c.
5215 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5216 * Make-lang.in: c-typeck.c depends on c-common.h.
5217
3b78de56
AC
52182012-10-04 Arnaud Charlet <charlet@adacore.com>
5219
5220 * c-decl.c (c_write_global_declarations): Fix handling of
5221 -fdump-ada-spec*.
5222
78c60e3d
SS
52232012-09-30 Sharad Singhai <singhai@google.com>
5224
5225 * c-decl.c (c_write_global_declarations): Use a different method
5226 to determine if the dump has ben initialized.
5227
9f33203d
JM
52282012-09-14 Joseph Myers <joseph@codesourcery.com>
5229
5230 PR c/54552
5231 * c-typeck.c (c_cast_expr): When casting to a type requiring
5232 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5233 c_fully_fold first.
5234
a27d595d
JM
52352012-09-14 Joseph Myers <joseph@codesourcery.com>
5236
5237 PR c/54103
5238 * c-typeck.c (build_unary_op): Pass original argument of
5239 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5240 any C_MAYBE_CONST_EXPR, if it has integer operands.
5241 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5242 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5243 to c_objc_common_truthvalue_conversion, then remove any
5244 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5245 c_objc_common_truthvalue_conversion not
5246 c_common_truthvalue_conversion.
5247 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5248 call note_integer_operands for arguments with integer operands
5249 that are not integer constants.
5250
9feb29df
JJ
52512012-09-13 Jakub Jelinek <jakub@redhat.com>
5252
5253 PR c/54559
5254 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5255 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5256
d409320c
JJ
52572012-08-31 Jakub Jelinek <jakub@redhat.com>
5258
5259 PR c/54428
5260 * c-convert.c (convert): Don't call fold_convert_loc if
5261 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5262 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5263 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5264
6265d07c
JJ
52652012-08-24 Jakub Jelinek <jakub@redhat.com>
5266
5267 PR c/54355
5268 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5269 for nested and empty_ok arguments in the call to
5270 c_parser_declaration_or_fndef.
5271
1a4049e7
JJ
52722012-08-17 Jakub Jelinek <jakub@redhat.com>
5273
5274 * c-tree.h (c_last_sizeof_arg): Declare.
5275 * c-parser.c (struct c_tree_loc_pair): New type.
5276 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5277 non-NULL.
5278 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5279 (c_parser_postfix_expression_after_primary): Likewise. Call
5280 sizeof_pointer_memaccess_warning if needed.
5281 (sizeof_ptr_memacc_comptypes): New function.
5282 * c-typeck.c (c_last_sizeof_arg): New global variable.
5283 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5284
0229aee9
UB
52852012-07-24 Uros Bizjak <ubizjak@gmail.com>
5286
5287 * c-lang.h (lang_decl): Add variable_size GTY option.
5288
7ee2468b
SB
52892012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5290
5291 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5292 * Make-lang.in: Fix dependencies.
5293
d4a10d0a
SB
52942012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5295
5296 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5297 and add language Makefile hooks.
5298 * config-lang.in: New file.
5299 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5300 add the required "normal" config-lang.in rules.
5301 * c-lang.h: Moved from gcc/ to here.
5302 * c-tree.h: Likewise.
5303 * c-objc-common.c: Likewise.
5304 * c-objc-common.h: Likewise.
5305 * c-typeck.c: Likewise.
5306 * c-convert.c: Likewise.
5307 * c-lang.c: Likewise.
5308 * c-aux-info.c: Likewise.
5309 * c-errors.c: Likewise.
5310 * gccspec.c: Likewise.
5311 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5312 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5313\f
cbe34bb5 5314Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
5315
5316Copying and distribution of this file, with or without modification,
5317are permitted in any medium without royalty provided the copyright
5318notice and this notice are preserved.