]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
PR tree-optimization/71625 - missing strlen optimization on different array
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
72733314
IS
12018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2
3 PR c/19315
4 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
5 objects of unknown size.
6
23aa9f7c
MS
72018-08-13 Martin Sebor <msebor@redhat.com>
8
9 PR tree-optimization/71625
10 * c-parser.c (c_parser_declaration_or_fndef): Call
11 braced_list_to_string.
12
e5e7e50d
BH
132018-08-03 Bogdan Harjoc <harjoc@gmail.com>
14
15 PR c/86690
16 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
17 errors.
18
8a45b051
MS
192018-08-01 Martin Sebor <msebor@redhat.com>
20
21 PR tree-optimization/86650
22 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
23 and TREE_BLOCK (t) from within percent_K_format to this callsite.
24
5922dcb5
JJ
252018-08-01 Jakub Jelinek <jakub@redhat.com>
26
27 PR c/85704
28 * c-typeck.c (init_field_decl_cmp): New function.
29 (output_pending_init_elements): Use it for field comparisons
30 instead of pure bit_position comparisons.
31
9b452033
JJ
322018-07-12 Jakub Jelinek <jakub@redhat.com>
33
34 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
35 type here, instead add "omp declare target implicit" attribute.
36 (finish_decl): Diagnose vars without mappable type here.
37
829c6349
CLT
382018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
39 Thomas Schwinge <thomas@codesourcery.com>
40 Cesar Philippidis <cesar@codesourcery.com>
41
42 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
43 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
44 to their non-present_or_* counterparts. Make 'self' an alias to
45 PRAGMA_OACC_CLAUSE_HOST.
46 (c_parser_oacc_data_clause): Update GOMP mappings for
47 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
48 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
49 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
50 Remove support for present_or_* clauses.
51 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
52 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
53 (OACC_DECLARE_CLAUSE_MASK): Likewise.
54 (OACC_DATA_CLAUSE_MASK): Likewise.
55 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
56 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
57 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
58 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
59 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
60
e197e64e
KV
612018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
62
63 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
64 * gimple-parser.c (c_parser_gimple_statement): Likewise.
65 (c_parser_gimple_unary_expression): Likewise.
66
487f2f61
JJ
672018-06-15 Jakub Jelinek <jakub@redhat.com>
68
69 PR c/86093
70 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
71 before doing POINTER_DIFF_EXPR.
72
e4d44a37
MP
732018-06-07 Marek Polacek <polacek@redhat.com>
74
75 PR c/85318
76 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
77 for loop initial declarations.
78
b67b9225
DP
792018-05-30 David Pagan <dave.pagan@oracle.com>
80
81 PR c/55976
82 * c-decl.c (grokdeclarator): Update check for return type warnings.
83 (start_function): Likewise.
84 (finish_function): Likewise.
85 * c-typeck.c (c_finish_return): Update check for return type warnings.
86 Pass OPT_Wreturn_type to pedwarn when appropriate.
87
c566cc9f
RS
882018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
89
90 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
91 __FMA_EXPR handlng.
92
e4f81565
RS
932018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
94
95 * gimple-parser.c: Include internal-fn.h.
96 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
97 (c_parser_gimple_call_internal): New function.
98 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
99 Fix typos in comment.
100
79e7b1fe
JJ
1012018-05-10 Jakub Jelinek <jakub@redhat.com>
102
103 PR c++/85662
104 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
105 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
106 fold_convert_loc.
107 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
108 fold_offsetof_1, pass argtype as TYPE to it and drop the
109 fold_convert_loc.
110
f7584c81
DP
1112018-05-02 David Pagan <dave.pagan@oracle.com>
112
113 PR c/30552
114 * c-decl.c (old_style_parameter_scope): New function.
115 * c-parser.c (c_parser_postfix_expression): Check for statement
116 expressions in old-style function parameter list declarations.
117 * c-parser.h (old_style_parameter_scope): New extern declaration.
118
b33a0cb3
JJ
1192018-04-25 Jakub Jelinek <jakub@redhat.com>
120
121 PR sanitizer/84307
122 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
123 it is not TREE_STATIC.
124 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
125 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
126 its COMPOUND_LITERAL_EXPR_DECL.
127
c5c5822a
JM
1282018-03-21 Joseph Myers <joseph@codesourcery.com>
129
130 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
131 where all functions return the same _FloatN or _FloatNx type,
132 treat integer types as _Float64 instead of double.
133
aa1c9429
JJ
1342018-03-21 Jakub Jelinek <jakub@redhat.com>
135
136 PR c/84999
137 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
138 building vector comparison, diagnose it and return error_mark_node.
139
9bb45a95
JJ
1402018-03-15 Jakub Jelinek <jakub@redhat.com>
141
142 PR c/84853
143 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
144 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
145 INTEGER_TYPE element type.
146
ada6bad9
DP
1472018-03-13 David Pagan <dave.pagan@oracle.com>
148
149 PR c/46921
150 * c-typeck.c (output_init_element): Ensure field initializer
151 expression is always evaluated if there are side effects.
152
849bbdb9
JJ
1532018-03-06 Jakub Jelinek <jakub@redhat.com>
154
155 PR c/84721
156 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
157 !building_stmt_list_p ().
158
d74641bd
RS
1592018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
160
161 PR c/84305
162 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
163 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
164 and include the BIND_EXPR in the list of things that need to be
165 pre-evaluated.
166
0444aa9c
NS
1672018-02-09 Nathan Sidwell <nathan@acm.org>
168
169 PR c/84293
170 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
171 to strict_aliasing_warning.
172
7c30b12a
PC
1732018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
174
175 * c-typeck.c (really_start_incremental_init, push_init_level,
176 set_nonincremental_init, output_init_element, process_init_element):
177 Use DECL_UNNAMED_BIT_FIELD.
178
2be4dfcb
MP
1792018-01-31 Marek Polacek <polacek@redhat.com>
180
181 PR c/81779
182 * c-parser.c (c_parser_compound_statement_nostart): Call
183 expansion_point_location_if_in_system_header.
184
bb9869d5
DM
1852018-01-17 David Malcolm <dmalcolm@redhat.com>
186
187 PR c++/83814
188 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
189 the C part.
190
b4923738
JJ
1912018-01-13 Jakub Jelinek <jakub@redhat.com>
192
193 PR c/83801
194 * c-tree.h (decl_constant_value_1): Add a bool argument.
195 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
196 returning a CONSTRUCTOR if it is true. Use error_operand_p.
197 (decl_constant_value): Adjust caller.
198 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
199 decl_constant_value_1 as IN_INIT. Otherwise, punt if
200 decl_constant_value returns initializer that has BLKmode or
201 array type.
202 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
203
928686b1
RS
2042018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
205 Alan Hayward <alan.hayward@arm.com>
206 David Sherwood <david.sherwood@arm.com>
207
208 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
209 TYPE_VECTOR_SUBPARTS.
210
85ec4feb
JJ
2112018-01-03 Jakub Jelinek <jakub@redhat.com>
212
213 Update copyright years.
214
913884f7
JJ
2152018-01-01 Jakub Jelinek <jakub@redhat.com>
216
217 PR c/83595
218 * c-parser.c (c_parser_braced_init, c_parser_initelt,
219 c_parser_conditional_expression, c_parser_cast_expression,
220 c_parser_sizeof_expression, c_parser_alignof_expression,
221 c_parser_postfix_expression, c_parser_omp_declare_reduction,
222 c_parser_transaction_expression): Use set_error () method instead
223 of setting value member to error_mark_node.
224
c6cfa2bf
MM
2252017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
226
227 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
228 and _Float<N>X built-in functions.
229
11d29d63
JJ
2302017-12-22 Jakub Jelinek <jakub@redhat.com>
231
14ec014e
JJ
232 PR debug/83550
233 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
234 TYPE_STUB_DECL and call rest_of_type_compilation before processing
235 incomplete vars rather than after it.
236
11d29d63
JJ
237 PR debug/83547
238 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
239 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
240 and consider empty ones if there are no other stmts. For
241 -Wunused-value walk all statements before the one only followed by
242 DEBUG_BEGIN_STMTs.
243
170a8bd6
EB
2442017-12-22 Mike Stump <mikestump@comcast.net>
245 Eric Botcazou <ebotcazou@adacore.com>
246
247 * c-parser.c (c_parser_while_statement): Add unroll parameter and
248 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
249 (c_parser_do_statement): Likewise.
250 (c_parser_for_statement): Likewise.
251 (c_parser_statement_after_labels): Adjust calls to above.
252 (c_parse_pragma_ivdep): New static function.
253 (c_parser_pragma_unroll): Likewise.
254 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
255 <PRAGMA_UNROLL>: New case.
256
01512446
JJ
2572017-12-19 Jakub Jelinek <jakub@redhat.com>
258
259 * c-typeck.c (comptypes_internal, function_types_compatible_p,
260 perform_integral_promotions, digest_init): Replace Yoda conditions
261 with typical order conditions.
262 * c-decl.c (check_bitfield_type_and_width): Likewise.
263
c65e18d3
BE
2642017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
265
266 * c-typeck.c (c_safe_arg_type_equiv_p,
267 c_safe_function_type_cast_p): New function.
268 (build_c_cast): Implement -Wcast-function-type.
269
b7280579
RB
2702017-12-14 Richard Biener <rguenther@suse.de>
271
272 PR c/83415
273 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
274 like REALPART_EXPR for the behavior of whether its operand
275 is an lvalue.
276
49e6a6c0
MP
2772017-12-12 Marek Polacek <polacek@redhat.com>
278
279 PR c/82679
280 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
281
96a95ac1
AO
2822017-12-12 Alexandre Oliva <aoliva@redhat.com>
283
284 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
285 * c-parser.c (add_debug_begin_stmt): New.
286 (c_parser_declaration_or_fndef): Call it.
287 (c_parser_compound_statement_nostart): Likewise.
288 (c_parser_statement_after_labels): Likewise.
289 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
290
4b2b493f
JM
2912017-12-07 Joseph Myers <joseph@codesourcery.com>
292
293 * c-decl.c (build_compound_literal): Add parameter alignas_align
294 and set alignment of decl if nonzero.
295 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
296 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
297 qualifier.
298 (c_parser_struct_declaration): Update syntax comment.
299 (c_parser_type_name): Add alignas_ok argument and pass it to
300 c_parser_declspecs.
301 (c_parser_cast_expression): Pass true to c_parser_type_name and
302 give error if a cast used an _Alignas specifier.
303 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
304 give error if sizeof (type-name) used an _Alignas specifier.
305 (c_parser_alignof_expression): Pass true to c_parser_type_name and
306 give error if _Alignof (type-name) used an _Alignas specifier.
307 (c_parser_postfix_expression_after_paren_type): Check specified
308 alignment for a compound literal and pass it to
309 build_compound_literal.
310 * c-parser.h (c_parser_type_name): Update prototype.
311 * c-tree.h (build_compound_literal): Update prototype.
312
5d9ae53d
MS
3132017-12-07 Martin Sebor <msebor@redhat.com>
314
315 PR c/81544
316 * c-decl.c (c_decl_attributes): Look up existing declaration and
317 pass it to decl_attributes.
318
c79144f8
DM
3192017-12-06 David Malcolm <dmalcolm@redhat.com>
320
321 PR c/83236
322 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
323 reserved for use by the implementation.
324
613bc14f
DM
3252017-12-06 David Malcolm <dmalcolm@redhat.com>
326
327 * c-decl.c: Include "c-family/c-spellcheck.h".
328
05abad4c
ML
3292017-12-05 Martin Liska <mliska@suse.cz>
330 Jakub Jelinek <jakub@redhat.com>
331
332 * c-typeck.c (pointer_diff): Add new argument and instrument
333 pointer subtraction.
334 (build_binary_op): Similar for pointer comparison.
335
cc6534d4
JJ
3362017-12-01 Jakub Jelinek <jakub@redhat.com>
337
65791f42
JJ
338 PR c/79153
339 * c-parser.c: Include tree-iterator.h.
340 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
341 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
342 on it.
343
cc6534d4
JJ
344 PR c/83222
345 * c-tree.h (decl_constant_value_1): Declare.
346 * c-typeck.c (decl_constant_value_1): New function.
347 (decl_constant_value): Use it.
348 * c-fold.c (c_fully_fold_internal): If in_init, use
349 decl_constant_value_1 instead of decl_constant_value.
350
5de73c05
JJ
3512017-11-30 Jakub Jelinek <jakub@redhat.com>
352
353 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
354
058f0b9e
JJ
3552017-11-28 Jakub Jelinek <jakub@redhat.com>
356
357 PR sanitizer/81275
358 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
359 c_switch_covers_all_cases_p returns true.
360
5e9d6aa4
JK
3612017-11-28 Julia Koval <julia.koval@intel.com>
362 Sebastian Peryt <sebastian.peryt@intel.com>
363
364 * Make-lang.in (c/c-array-notation.o): Remove.
365 * c-array-notation.c: Delete.
366 * c-decl.c: Remove cilkplus condition.
367 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
368 c_parser_cilk_verify_simd, c_parser_array_notation,
369 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
370 c_parser_cilk_simd_fn_vector_attrs,
371 c_finish_cilk_simd_fn_tokens): Delete.
372 (c_parser_declaration_or_fndef): Remove cilkplus condition.
373 (c_parser_direct_declarator_inner): Ditto.
374 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
375 (c_parser_attributes, c_parser_compound_statement,
376 c_parser_statement_after_labels, c_parser_if_statement,
377 c_parser_switch_statement, c_parser_while_statement,
378 c_parser_do_statement, c_parser_for_statement,
379 c_parser_unary_expression, c_parser_postfix_expression,
380 c_parser_postfix_expression_after_primary,
381 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
382 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
383 support.
384 * c-typeck.c (build_array_ref, build_function_call_vec,
385 convert_arguments,
386 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
387 c_finish_loop, build_binary_op): Remove cilkplus support.
388
9e851845
JJ
3892017-11-28 Jakub Jelinek <jakub@redhat.com>
390
391 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
392 of build3.
393
8c7dbea9
BK
3942017-11-14 Boris Kolpackov <boris@codesynthesis.com>
395
396 * Make-lang.in (c.install-plugin): Install backend import library.
397
41521dee
JJ
3982017-11-23 Jakub Jelinek <jakub@redhat.com>
399
400 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
401 pragma_stmt context.
402
ac9effed
EB
4032017-11-23 Mike Stump <mikestump@comcast.net>
404 Eric Botcazou <ebotcazou@adacore.com>
405
406 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
407 ANNOTATE_EXPR.
408 (c_parser_do_statement): Likewise.
409 (c_parser_for_statement): Likewise.
410
ce95abc4
DM
4112017-11-22 David Malcolm <dmalcolm@redhat.com>
412
413 PR c++/62170
414 * c-objc-common.c (c_tree_printer): Convert penultimate param from
415 bool to bool *. Within '%T' handling, if showing an "aka", use
416 "quoted" param to add appropriate quoting.
417
974aedcc
MP
4182017-11-22 Marek Polacek <polacek@redhat.com>
419
420 PR c++/60336
421 PR middle-end/67239
422 PR target/68355
423 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
424
d4300cc6
DM
4252017-11-21 David Malcolm <dmalcolm@redhat.com>
426
427 PR c/83056
428 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
429 earlier failed lookups.
430
1af4ebf5
MG
4312017-11-21 Marc Glisse <marc.glisse@inria.fr>
432
433 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
434 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
435
26edace6
DM
4362017-11-20 David Malcolm <dmalcolm@redhat.com>
437
438 PR c/81404
439 * c-decl.c: Include "c-family/known-headers.h".
440 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
441 to known-headers.cc.
442 (class suggest_missing_header): Move to known-header.h.
443 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
444 than get_c_name_hint.
445
b1212255
DM
4462017-11-20 David Malcolm <dmalcolm@redhat.com>
447
448 * c-decl.c (get_c_name_hint): New function.
449 (class suggest_missing_header): New class.
450 (lookup_name_fuzzy): Call get_c_name_hint and use it to
451 suggest missing headers to the user.
452
6c7a259b
DM
4532017-11-20 David Malcolm <dmalcolm@redhat.com>
454
455 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
456 Include "c-family/name-hint.h"
457 (implicit_decl_warning): Convert "hint" from
458 const char * to name_hint. Pass location to
459 lookup_name_fuzzy. Suppress any deferred diagnostic if the
460 warning was not printed.
461 (undeclared_variable): Likewise for "guessed_id".
462 (lookup_name_fuzzy): Convert return type from const char *
463 to name_hint. Add location_t param.
464 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
465 Include "c-family/name-hint.h"
466 (c_parser_declaration_or_fndef): Convert "hint" from
467 const char * to name_hint. Pass location to lookup_name_fuzzy.
468 (c_parser_parameter_declaration): Likewise.
469
f9c59f7e
JJ
4702017-11-19 Jakub Jelinek <jakub@redhat.com>
471
472 PR c/66618
473 PR c/69960
474 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
475 where needed.
476 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
477 handle_omp_array_sections): Likewise.
478 (digest_init): Don't call decl_constant_value_for_optimization.
479 * c-tree.h (decl_constant_value_for_optimization): Removed.
480 * c-fold.c (c_fold_array_ref): New function.
481 (c_fully_fold_internal): Add LVAL argument, propagate it through
482 recursive calls. For VAR_P call decl_constant_value and
483 unshare if not LVAL and either optimizing or IN_INIT. Remove
484 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
485 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
486 (c_fully_fold): Add LVAL argument, pass it through to
487 c_fully_fold_internal.
488 (decl_constant_value_for_optimization): Removed.
489
3ca0dc60
JM
4902017-11-15 Joseph Myers <joseph@codesourcery.com>
491
492 PR c/81156
493 * c-parser.c (check_tgmath_function): New function.
494 (enum tgmath_parm_kind): New enum.
495 (c_parser_postfix_expression): Handle __builtin_tgmath.
496
64a5912c
DM
4972017-10-31 David Malcolm <dmalcolm@redhat.com>
498
499 * c-decl.c (implicit_decl_warning): Update for renaming of
500 pedwarn_at_rich_loc and warning_at_rich_loc.
501 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
502 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
503 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
504 (c_parser_struct_or_union_specifier): Likewise for renaming of
505 pedwarn_at_rich_loc.
506 (c_parser_parameter_declaration): Likewise for renaming of
507 error_at_rich_loc.
508 * c-typeck.c (build_component_ref): Likewise.
509 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
510 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
511 (set_init_label): Likewise for renaming of error_at_rich_loc.
512
c1136864
RB
5132017-10-30 Richard Biener <rguenther@suse.de>
514
515 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
516 stmts.
517
ee5fd23a
MM
5182017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
519
520 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
521 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
522
1a59ccf2
DM
5232017-10-25 David Malcolm <dmalcolm@redhat.com>
524
525 PR c/7356
526 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
527 semicolons.
528
bc1a75dd
JJ
5292017-10-25 Jakub Jelinek <jakub@redhat.com>
530
531 PR libstdc++/81706
532 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
533 newdecl to corresponding __builtin_ if any.
534
ff1ff960
PC
5352017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
536
537 PR c++/82466
538 * c-decl.c (diagnose_mismatched_decls): Use
539 OPT_Wbuiltin_declaration_mismatch.
540
62e1c678
DM
5412017-10-12 David Malcolm <dmalcolm@redhat.com>
542
543 * c-parser.c (c_parser_require): Add "type_is_unique" param and
544 use it to guard calls to maybe_suggest_missing_token_insertion.
545 (c_parser_parms_list_declarator): Override default value of new
546 "type_is_unique" param to c_parser_require.
547 (c_parser_asm_statement): Likewise.
548 * c-parser.h (c_parser_require): Add "type_is_unique" param,
549 defaulting to true.
550
a92f6726
NS
5512017-10-11 Nathan Sidwell <nathan@acm.org>
552
553 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
554
8e6cdc90
RS
5552017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
556
557 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
558 operating on trees as wide_ints.
559 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
560 (c_tree_equal): Likewise.
561
8139a48e
DM
5622017-10-04 David Malcolm <dmalcolm@redhat.com>
563
564 * c-decl.c (push_parm_decl): Store c_parm's location into the
565 PARAM_DECL.
566 (build_c_parm): Add "loc" param and store it within the c_parm.
567 * c-parser.c (struct c_parser): Add "last_token_location" field.
568 (c_parser_consume_token): Store location of the token into the
569 new field.
570 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
571 when handling a FUNCTION_DECL, if it doesn't already have them.
572 (c_parser_parameter_declaration): Generate a location for the
573 parameter, and pass it to the call to build_c_parm.
574 * c-tree.h (struct c_parm): Add field "loc".
575 (build_c_parm): Add location_t param.
576 * c-typeck.c (get_fndecl_argument_location): New function.
577 (inform_for_arg): New function.
578 (convert_for_assignment): Use inform_for_arg when dealing with
579 ic_argpass.
580
2a389958
JJ
5812017-09-29 Jakub Jelinek <jakub@redhat.com>
582
7d386d45
JJ
583 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
584 width is non-NULL.
585 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
586 don't SET_DECL_C_BIT_FIELD here.
587
2a389958
JJ
588 PR c/82340
589 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
590 instead of trying to set just TREE_READONLY manually.
591
ebc6a85e
TV
5922017-09-16 Tom de Vries <tom@codesourcery.com>
593
594 PR c/81875
595 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
596 cond itself.
597
bb75facd
JM
5982017-09-15 Joseph Myers <joseph@codesourcery.com>
599
600 PR c/82071
601 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
602 for C11.
603 (build_conditional_expr): For C11, generate result with excess
604 precision when one argument is an integer and the other is of a
605 type using excess precision.
606
1d933576
BE
6072017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
608
609 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
610
267bbb6f
MP
6112017-09-13 Marek Polacek <polacek@redhat.com>
612
613 PR c/82167
614 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
615 than expr.original_type.
616
6836632e
NS
6172017-09-12 Nathan Sidwell <nathan@acm.org>
618
619 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
620 resort_sorted_fields): Moved from c-family/c-common.c.
621 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
622
e035be33
JM
6232017-09-01 Joseph Myers <joseph@codesourcery.com>
624
625 PR c/82071
626 * c-typeck.c (build_atomic_assign): Handle argument with excess
627 precision. Ensure any EXCESS_PRECISION_EXPR is present in
628 argument passed to build_binary_op and convert_for_assignment but
629 not for call to c_fully_fold.
630 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
631 Ensure build_binary_op is called with argument with original
632 semantic type. Avoid calling c_fully_fold with an
633 EXCESS_PRECISION_EXPR from build_binary_op.
634
d2e05fcb
JJ
6352017-09-01 Jakub Jelinek <jakub@redhat.com>
636
637 PR c/81887
638 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
639
b397965c
RS
6402017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
641 Alan Hayward <alan.hayward@arm.com>
642 David Sherwood <david.sherwood@arm.com>
643
644 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
645 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
646 m1 and m2 to the signed equivalent of a fixed-point
647 SCALAR_TYPE_MODE.
648
14e18d71
DM
6492017-08-24 David Malcolm <dmalcolm@redhat.com>
650
651 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
652 than CAN_HAVE_LOCATION_P when determining whether to use the
653 location_t value within "value".
654
7f204c0f
DM
6552017-08-21 David Malcolm <dmalcolm@redhat.com>
656
657 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
658 rather than peeking the location of the first token.
659 * c-tree.h (c_expr::get_location): New method.
660
2f687306
DM
6612017-08-21 David Malcolm <dmalcolm@redhat.com>
662
663 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
664 to check_function_arguments.
665
3e7b80d7
MP
6662017-08-18 Marek Polacek <polacek@redhat.com>
667
668 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
669 commentary.
670
00aa1fa2
L
6712017-08-18 H.J. Lu <hongjiu.lu@intel.com>
672
673 PR c/53037
674 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
675 (check_bitfield_type_and_width): Don't allow bit-field with
676 warn_if_not_aligned type.
677
da67acb9
MS
6782017-08-14 Martin Sebor <msebor@redhat.com>
679
680 PR c/81117
681 * c-objc-common.c (c_objc_common_init): Handle 'G'.
682
bb85aa74
MP
6832017-08-11 Marek Polacek <polacek@redhat.com>
684
685 PR c/81795
686 * c-decl.c (pushtag): Only print inform if the warning was printed.
687 (grokdeclarator): Likewise.
688
32129a17
DM
6892017-08-10 David Malcolm <dmalcolm@redhat.com>
690
691 * c-parser.c (c_parser_error): Rename to...
692 (c_parser_error_richloc): ...this, making static, and adding
693 "richloc" parameter, passing it to the c_parse_error call,
694 rather than calling c_parser_set_source_position_from_token.
695 (c_parser_error): Reintroduce, reimplementing in terms of the
696 above, converting return type from void to bool.
697 (class token_pair): New class.
698 (struct matching_paren_traits): New struct.
699 (matching_parens): New typedef.
700 (struct matching_brace_traits): New struct.
701 (matching_braces): New typedef.
702 (get_matching_symbol): New function.
703 (c_parser_require): Add param MATCHING_LOCATION, using it to
704 highlight matching "opening" tokens for missing "closing" tokens.
705 (c_parser_skip_until_found): Likewise.
706 (c_parser_static_assert_declaration_no_semi): Convert explicit
707 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
708 class matching_parens, so that the pertinent open parenthesis is
709 highlighted when there are problems locating the close
710 parenthesis.
711 (c_parser_struct_or_union_specifier): Likewise.
712 (c_parser_typeof_specifier): Likewise.
713 (c_parser_alignas_specifier): Likewise.
714 (c_parser_simple_asm_expr): Likewise.
715 (c_parser_braced_init): Likewise, for matching_braces.
716 (c_parser_paren_condition): Likewise, for matching_parens.
717 (c_parser_switch_statement): Likewise.
718 (c_parser_for_statement): Likewise.
719 (c_parser_asm_statement): Likewise.
720 (c_parser_asm_operands): Likewise.
721 (c_parser_cast_expression): Likewise.
722 (c_parser_sizeof_expression): Likewise.
723 (c_parser_alignof_expression): Likewise.
724 (c_parser_generic_selection): Likewise.
725 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
726 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
727 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
728 In case CPP_OPEN_PAREN, pass loc_open_paren to the
729 c_parser_skip_until_found call.
730 (c_parser_objc_class_definition): Use class matching_parens as
731 above.
732 (c_parser_objc_method_decl): Likewise.
733 (c_parser_objc_try_catch_finally_statement): Likewise.
734 (c_parser_objc_synchronized_statement): Likewise.
735 (c_parser_objc_at_property_declaration): Likewise.
736 (c_parser_oacc_wait_list): Likewise.
737 (c_parser_omp_var_list_parens): Likewise.
738 (c_parser_omp_clause_collapse): Likewise.
739 (c_parser_omp_clause_default): Likewise.
740 (c_parser_omp_clause_if): Likewise.
741 (c_parser_omp_clause_num_threads): Likewise.
742 (c_parser_omp_clause_num_tasks): Likewise.
743 (c_parser_omp_clause_grainsize): Likewise.
744 (c_parser_omp_clause_priority): Likewise.
745 (c_parser_omp_clause_hint): Likewise.
746 (c_parser_omp_clause_defaultmap): Likewise.
747 (c_parser_oacc_single_int_clause): Likewise.
748 (c_parser_omp_clause_ordered): Likewise.
749 (c_parser_omp_clause_reduction): Likewise.
750 (c_parser_omp_clause_schedule): Likewise.
751 (c_parser_omp_clause_num_teams): Likewise.
752 (c_parser_omp_clause_thread_limit): Likewise.
753 (c_parser_omp_clause_aligned): Likewise.
754 (c_parser_omp_clause_linear): Likewise.
755 (c_parser_omp_clause_safelen): Likewise.
756 (c_parser_omp_clause_simdlen): Likewise.
757 (c_parser_omp_clause_depend): Likewise.
758 (c_parser_omp_clause_map): Likewise.
759 (c_parser_omp_clause_device): Likewise.
760 (c_parser_omp_clause_dist_schedule): Likewise.
761 (c_parser_omp_clause_proc_bind): Likewise.
762 (c_parser_omp_clause_uniform): Likewise.
763 (c_parser_omp_for_loop): Likewise.
764 (c_parser_cilk_clause_vectorlength): Likewise.
765 (c_parser_cilk_clause_linear): Likewise.
766 (c_parser_transaction_expression): Likewise.
767 * c-parser.h (c_parser_require): Add param matching_location with
768 default UNKNOWN_LOCATION.
769 (c_parser_error): Convert return type from void to bool.
770 (c_parser_skip_until_found): Add param matching_location with
771 default UNKNOWN_LOCATION.
772
30af3a2b
MP
7732017-08-09 Marek Polacek <polacek@redhat.com>
774
775 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
776 * c-tree.h (build_external_ref): Update declaration.
777 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
778 (build_external_ref): Change the type of a parameter to bool.
779 (parser_build_binary_op): Use true/false instead of 1/0.
780 (pointer_diff): Likewise.
781 (build_modify_expr): Likewise.
782 (set_designator): Change the type of a parameter to bool.
783 (set_init_index): Use true/false instead of 1/0.
784 (set_init_label): Likewise.
785 (output_init_element): Change the type of a parameter to bool.
786 (output_pending_init_elements): Use true/false instead of 1/0.
787 (process_init_element): Likewise.
788 (build_binary_op): Change the type of a parameter to bool.
789
296c53ac
MP
7902017-08-09 Marek Polacek <polacek@redhat.com>
791
792 PR c/81233
793 * c-typeck.c (pedwarn_init): Make the function take a variable list.
794 Call emit_diagnostic_valist instead of pedwarn.
795 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
796 Print the relevant types in diagnostics.
797
a32c8316
MP
7982017-08-09 Marek Polacek <polacek@redhat.com>
799
800 PR c/81417
801 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
802 build_conditional_expr.
803 * c-parser.c (c_parser_conditional_expression): Create locations for
804 EXP1 and EXP2 from their source ranges. Pass the locations down to
805 build_conditional_expr.
806 * c-tree.h (build_conditional_expr): Update declaration.
807 * c-typeck.c (build_conditional_expr): Add location_t parameters.
808 For -Wsign-compare, also print the types.
809
314e6352
ML
8102017-08-08 Martin Liska <mliska@suse.cz>
811
812 * c-convert.c: Include header files.
813 * c-typeck.c: Likewise.
814
577eec56
ML
8152017-08-07 Martin Liska <mliska@suse.cz>
816
817 * c-parser.c (c_parser_attributes): Canonicalize name of an
818 attribute.
819
f7b6353a
MP
8202017-08-02 Marek Polacek <polacek@redhat.com>
821
822 PR c/81289
823 * c-parser.c (c_parser_unary_expression): Use set_error.
824
8a6eab34
MP
825 PR c/81448
826 PR c/81306
827 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
828 warnings. Avoid walking MACRO_MAP_LOCATIONS.
829
7fef86d3
JH
8302017-07-31 Jan Hubicka <hubicka@ucw.cz>
831 Martin Liska <mliska@suse.cz>
832
833 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 834 statement.
7fef86d3 835
f34ebeb2
ML
8362017-07-31 Martin Liska <mliska@suse.cz>
837
838 PR sanitize/81530
839 * c-convert.c (convert): Guard condition with flag_sanitize_p
840 also with current_function_decl non-null equality.
841 * c-decl.c (grokdeclarator): Likewise.
842 * c-typeck.c (build_binary_op): Likewise.
843
8595f67b
MP
8442017-07-25 Marek Polacek <polacek@redhat.com>
845
846 * c-decl.c (grokfield): Remove local variable.
847
d49718d6
MP
8482017-07-25 Marek Polacek <polacek@redhat.com>
849
850 PR c/81364
851 * c-parser.c (c_parser_else_body): Don't warn about multistatement
852 macro expansion if the body is in { }.
853 (c_parser_while_statement): Likewise.
854 (c_parser_for_statement): Likewise.
855
ff22eb12
NS
8562017-07-18 Nathan Sidwell <nathan@acm.org>
857
858 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
859
eea77d1f
DM
8602017-07-14 David Malcolm <dmalcolm@redhat.com>
861
862 * c-decl.c (implicitly_declare): When suggesting a missing
863 #include, provide a fix-it hint.
864
b6f43128
DM
8652017-07-06 David Malcolm <dmalcolm@redhat.com>
866
867 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
868 and call that instead.
869 * c-tree.h (selftest::run_c_tests): New decl.
870
3e2becc4
MP
8712017-06-26 Marek Polacek <polacek@redhat.com>
872
873 PR c/80116
874 * c-parser.c (c_parser_if_body): Set the location of the
875 body of the conditional after parsing all the labels. Call
876 warn_for_multistatement_macros.
877 (c_parser_else_body): Likewise.
878 (c_parser_switch_statement): Likewise.
879 (c_parser_while_statement): Likewise.
880 (c_parser_for_statement): Likewise.
881 (c_parser_statement): Add a default argument. Save the location
882 after labels have been parsed.
883 (c_parser_c99_block_statement): Likewise.
884
343ae898
RB
8852017-06-19 Richard Biener <rguenther@suse.de>
886
887 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
888 negated _Literals to parse _Literal (int) -1.
889
45b2222a
ML
8902017-06-13 Martin Liska <mliska@suse.cz>
891
892 PR sanitize/78204
893 * c-convert.c (convert): Use sanitize_flags_p.
894 * c-decl.c (grokdeclarator): Likewise.
895 * c-typeck.c (convert_for_assignment): Likewise.
896 (c_finish_return): Likewise.
897 (build_binary_op): Likewise.
898
8ab7005b
JJ
8992017-06-08 Jakub Jelinek <jakub@redhat.com>
900
901 PR c/81006
902 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
903 to sizetype before size_binop.
904
363dc72c
JJ
9052017-06-07 Jakub Jelinek <jakub@redhat.com>
906
907 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
908 of TDI_generic.
909
dc949728
MP
9102017-06-06 Marek Polacek <polacek@redhat.com>
911
912 PR c/79983
913 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
914 ref.
915 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
916
40ffd95f
BE
9172017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
918
919 * c-parser.c (c_parser_binary_expression): Implement the
920 -Wsizeof_pointer_div warning.
921 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
922 from a parenthesized expression.
923 (c_parser_expr_list): Use c_last_sizeof_loc.
924 * c-tree.h (c_last_sizeof_loc): New external.
925 * c-typeck.c (c_last_sizeof_loc): New variable.
926 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
927
9fc5e7a4
MM
9282017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
929
930 PR testsuite/80580
931 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
932
f012c8ef
DM
9332017-05-30 David Malcolm <dmalcolm@redhat.com>
934
935 * c-objc-common.c (c_tree_printer): Gain bool and const char **
936 parameters.
937
3cd211af
MS
9382017-05-24 Martin Sebor <msebor@redhat.com>
939
940 PR c/80731
941 * c-fold.c (c_fully_fold_internal): Adjust.
942 * c-typeck.c (parser_build_unary_op): Adjust.
943
fd71a9a2
TS
9442017-05-23 Thomas Schwinge <thomas@codesourcery.com>
945
946 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
947 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
948 "VECTOR_LENGTH".
949
92fa0f9e
MP
9502017-05-23 Marek Polacek <polacek@redhat.com>
951
952 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
953 quotes.
954
d11c168a
JJ
9552017-05-22 Jakub Jelinek <jakub@redhat.com>
956
957 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
958 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
959 it returned invariant. Call tree_invariant_p unconditionally
960 afterwards to decide whether to return expr or op0.
961
58aca9d9
NS
9622017-05-22 Nathan Sidwell <nathan@acm.org>
963
964 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
965
7fd549d2
TS
9662017-05-19 Thomas Schwinge <thomas@codesourcery.com>
967
968 * c-parser.c (c_parser_omp_clause_default): Handle
969 "OMP_CLAUSE_DEFAULT_PRESENT".
970
6ecd2339
BE
9712017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
972
973 * config-lang.in (gtfiles): Add c-family/c-format.c.
974
8a57ecff
NS
9752017-05-18 Nathan Sidwell <nathan@acm.org>
976
977 * c-decl.c (pushdecl_top_level): Delete unused function.
978
6574d78e
MP
9792017-05-18 Marek Polacek <polacek@redhat.com>
980
981 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
982 (check_earlier_gotos): Likewise.
983 (define_label): Likewise.
984 (pending_xref_error): Likewise.
985 (smallest_type_quals_location): Likewise.
986 (grokdeclarator): Likewise.
987 (grokparms): Likewise.
988 (identifier_global_value): Likewise.
989 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
990 (find_init_member): Likewise.
991
e3455240
MP
9922017-05-18 Marek Polacek <polacek@redhat.com>
993
994 * c-decl.c (start_decl): Use false/true instead of 0/1.
995 (grokdeclarator): Likewise.
996 (finish_struct): Likewise.
997 (start_function): Change the return type to bool. Use false/true
998 instead of 0/1.
999 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1000 * c-tree.h (start_function): Update.
1001 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1002 (set_designator): Change the return type to bool. Use false/true
1003 instead of 0/1.
1004
3fa8871b
MP
10052017-05-17 Marek Polacek <polacek@redhat.com>
1006
1007 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1008 * c-typeck.c: Likewise.
1009
142473df
MP
10102017-05-17 Marek Polacek <polacek@redhat.com>
1011
1012 PR sanitizer/80659
1013 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1014 DECL_IGNORED_P even for non-static compound literals.
1015
1a817418
ML
10162017-05-17 Martin Liska <mliska@suse.cz>
1017
1018 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1019 use it instead of int type.
1020
b2fa0a8b
MP
10212017-05-17 Marek Polacek <polacek@redhat.com>
1022
1023 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1024 call c_fully_fold.
1025 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1026 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1027 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1028 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1029 save_expr.
1030 (c_parser_conditional_expression): Likewise.
1031 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1032 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1033 (process_init_element): Likewise.
1034 (build_binary_op): Likewise.
1035 (handle_omp_array_sections_1): Likewise.
1036
1e47f02b
TS
10372017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1038
1039 * c-parser.c (c_parser_omp_clause_num_gangs)
1040 (c_parser_omp_clause_num_workers)
1041 (c_parser_omp_clause_vector_length): Merge functions into...
1042 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1043 all users.
1044
c24e924f
NS
10452017-05-11 Nathan Sidwell <nathan@acm.org>
1046
1047 * gimple-parser.c: Don't #include tree-dump.h.
1048
c587104e
MM
10492017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1050
1051 PR testsuite/80580
1052 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1053
67ac9a9d
MM
10542017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1055
1056 PR testsuite/80580
1057 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1058 incorrect __MEM syntax.
1059
ac4eb40f
MM
10602017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1061
1062 PR testsuite/80580
1063 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1064 type of unary '*'.
1065
641da50a
NS
10662017-05-09 Nathan Sidwell <nathan@acm.org>
1067
1068 * c-tree.h (pushdecl): Declare.
1069
56d35585
DM
10702017-05-05 David Malcolm <dmalcolm@redhat.com>
1071
1072 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1073 with diagnostic_report_diagnostic.
1074 * c-errors.c (pedwarn_c99): Likewise.
1075 (pedwarn_c90): Likewise.
1076
815d9cc6
XR
10772017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1078
1079 PR c++/80038
1080 * c-gimplify.c (c_gimplify_expr): Remove calls to
1081 cilk_gimplifY_call_params_in_spawned_fn.
1082
1c4ea66f
DM
10832017-04-25 David Malcolm <dmalcolm@redhat.com>
1084
1085 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1086 hint for removing extra semicolon.
1087
666f7903
JJ
10882017-04-21 Jakub Jelinek <jakub@redhat.com>
1089
1090 PR c/80468
1091 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1092 enabled, set specs->type to integer_type_node.
1093
5764ee3c
JW
10942017-04-03 Jonathan Wakely <jwakely@redhat.com>
1095
1096 * c-array-notation.c: Fix typo in comment.
1097
10fa8dfb
MP
10982017-03-29 Marek Polacek <polacek@redhat.com>
1099
1100 PR c/79730
1101 * c-decl.c (finish_decl): Check VAR_P.
1102
a9e4a1a5
JJ
11032017-03-27 Jakub Jelinek <jakub@redhat.com>
1104
1105 PR middle-end/80162
1106 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1107 * c-typeck.c (c_mark_addressable): Likewise. Look through
1108 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1109 to ARRAY_TYPE.
1110 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1111
ee3ff394
MP
11122017-03-23 Marek Polacek <polacek@redhat.com>
1113
1114 * c-tree.h: Remove a C_RID_YYCODE reference.
1115
4d1b8e70
JJ
11162017-03-21 Jakub Jelinek <jakub@redhat.com>
1117
1118 PR c/80097
1119 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1120 optional COMPOUND_EXPR with ubsan instrumentation.
1121
31dc71a8
MP
11222017-03-17 Marek Polacek <polacek@redhat.com>
1123
1124 * c-parser.c: Add C11 references.
1125
d579c385
MP
11262017-03-15 Marek Polacek <polacek@redhat.com>
1127
1128 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1129
85059a38
MP
11302017-03-11 Marek Polacek <polacek@redhat.com>
1131
1132 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1133
2f6f187a
DM
11342017-03-10 David Malcolm <dmalcolm@redhat.com>
1135
1136 PR translation/79848
1137 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1138 "%qs".
1139 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1140
36618428
MP
11412017-03-09 Marek Polacek <polacek@redhat.com>
1142
1143 PR sanitizer/79757
1144 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1145 parameter declarations with initializers.
1146
01e5af5a
JJ
11472017-03-09 Jakub Jelinek <jakub@redhat.com>
1148
1149 PR c/79969
1150 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1151 TYPE_STUB_DECL.
1152
a71dbc63
JJ
11532017-03-07 Jakub Jelinek <jakub@redhat.com>
1154
1155 PR c/79834
1156 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1157 for "may only be used in compound statements" diagnostics, change it
1158 such that the same translatable string is used for all pragmas. For
1159 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1160 diagnostics.
1161 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1162 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1163 "may only be used in compound statements" diagnostics, such that the
1164 same translatable string is used for all pragmas.
1165
1ff4bae6
MP
11662017-03-04 Marek Polacek <polacek@redhat.com>
1167
1168 PR c/79847
1169 * c-decl.c (implicit_decl_warning): Add missing space.
1170
7f5a7d78
MP
11712017-03-03 Marek Polacek <polacek@redhat.com>
1172
1173 PR c/79758
1174 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1175 current_function_prototype_arg_types is error_mark_node. Fix
1176 formatting. Use TREE_VALUE instead of TREE_TYPE.
1177
883c8f06
JJ
11782017-03-03 Jakub Jelinek <jakub@redhat.com>
1179
79c9b7a8
JJ
1180 PR c/79837
1181 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1182 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1183 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1184 diagnostics.
1185
883c8f06
JJ
1186 PR c/79836
1187 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1188 instead of %<_Generic>.
1189 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1190 (c_parser_omp_target_exit_data): Use %<release%> instead of
1191 %<release>.
1192
324ff1a0
JJ
11932017-02-28 Jakub Jelinek <jakub@redhat.com>
1194
1195 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1196 instead of just cond ? "..." : "...".
1197 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1198 for "enter"/"exit" keyword.
1199 (c_finish_oacc_routine): Don't use %s to supply portions of the
1200 message.
1201
4227c9ad
JJ
12022017-02-24 Jakub Jelinek <jakub@redhat.com>
1203
1204 PR c++/79588
1205 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1206 handle -Wrestrict here.
1207 * c-typeck.c (build_function_call_vec): Adjust
1208 check_function_arguments caller.
1209
5d972e66
RB
12102017-02-23 Richard Biener <rguenther@suse.de>
1211
1212 PR c/79684
1213 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1214 to initialize c_exprs to return.
1215 (c_parser_gimple_binary_expression): Likewise.
1216 (c_parser_gimple_unary_expression): Likewise.
1217 (c_parser_gimple_postfix_expression): Likewise.
1218
61ac5ebe
MP
12192017-02-22 Marek Polacek <polacek@redhat.com>
1220
1221 PR c/79662
1222 * c-typeck.c (convert_arguments): Handle error_mark_node.
1223
41d1b0b1
PK
12242017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1225
1226 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1227 value of c_parser_parse_ssa_name against error_mark_node and emit
1228 error if ssa name is anonymous and written as default definition.
1229
eab1f169
PK
12302017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1231
1232 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1233 FMA_EXPR.
1234
bcac0b4d
JJ
12352017-02-16 Jakub Jelinek <jakub@redhat.com>
1236
1237 PR c++/79512
1238 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1239 ignore #pragma omp target even when not followed by identifier.
1240
1be33173
PK
12412017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1242
1243 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1244 (c_parser_gimple_unary_expression): Likewise.
1245
aa326bfb
JJ
12462017-02-13 Jakub Jelinek <jakub@redhat.com>
1247
1248 * c-parser.c (c_parser_oacc_declare): Add missing space in
1249 diagnostics.
1250
8a398bc5
PK
12512017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1252
1253 PR c/79478
1254 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1255 set_c_expr_source_range when parsing ssa-name.
1256
3dcde5ef
PG
12572017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1258 Richard Biener <rguenther@suse.de>
1259
1260 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1261 building IL when arguments are error_mark_node.
1262 (c_parser_gimple_unary_expression): Likewise.
1263 (c_parser_gimple_if_stmt): Likewise.
1264 (c_parser_gimple_switch_stmt): Likewise.
1265 (c_parser_gimple_return_stmt): Likewise.
1266 (c_parser_parse_ssa_name): When name lookup fails do not build
1267 an SSA name. Use undeclared rather than not declared in error
1268 reporting.
1269
192b048b
MP
12702017-02-09 Marek Polacek <polacek@redhat.com>
1271
1272 PR c/79428
1273 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1274 instead of c_parser_skip_until_found.
1275
56f71478
JJ
12762017-02-09 Jakub Jelinek <jakub@redhat.com>
1277
1278 PR c/79431
1279 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1280 symtab_node::get on automatic variables.
1281
02889d23
CLT
12822016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1283 Chung-Lin Tang <cltang@codesourcery.com>
1284
1285 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1286 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1287 semantic checking.
1288 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1289
7af4b20d
RB
12902017-02-07 Richard Biener <rguenther@suse.de>
1291
1292 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1293 (c_parser_gimple_postfix_expression_after_primary):
1294 Do not use c_build_function_call_vec to avoid folding and promotion.
1295 Simplify.
1296
e5e391d6
MO
12972017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1298
1299 PR lto/79061
1300 * c-decl.c (pop_scope): Pass main_input_filename to
1301 build_translation_unit_decl.
1302
c2e84327
DM
13032017-01-24 David Malcolm <dmalcolm@redhat.com>
1304
1305 * c-parser.c: Include "read-rtl-function.h" and
1306 "run-rtl-passes.h".
1307 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1308 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1309 production. Update for renaming of field "gimple_pass" to
1310 "gimple_or_rtl_pass". If __RTL was seen, call
1311 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1312 to an auto_timevar, to cope with early exit.
1313 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1314 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1315 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1316 Handle RID_RTL.
1317 (c_parser_parse_rtl_body): New function.
1318 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1319 (struct c_declspecs): Rename field "gimple_pass" to
1320 "gimple_or_rtl_pass". Add field "rtl_p".
1321 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1322 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1323 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1324 (c_parser_gimple_or_rtl_pass_list): ...this.
1325
2ebd93e1
MP
13262017-01-20 Marek Polacek <polacek@redhat.com>
1327
1328 PR c/64279
1329 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1330
b1c95bb5
RB
13312017-01-13 Richard Biener <rguenther@suse.de>
1332
1333 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1334 nops.
1335
25329913
RB
13362017-01-13 Richard Biener <rguenther@suse.de>
1337
1338 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1339 _Literal ( type-name ) number.
1340
6bb4ea5c
RB
13412017-01-12 Richard Biener <rguenther@suse.de>
1342
1343 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1344 __MEM.
1345
6b5b4e9c
JJ
13462017-01-11 Jakub Jelinek <jakub@redhat.com>
1347
1348 PR c++/72813
1349 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1350 PCH file.
1351
e3252775
RB
13522017-01-11 Richard Biener <rguenther@suse.de>
1353
1354 PR bootstrap/79052
1355 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1356 returns on parse errors.
1357
a9342885
MP
13582017-01-04 Marek Polacek <polacek@redhat.com>
1359
1360 PR c++/64767
1361 * c-parser.c (c_parser_postfix_expression): Mark zero character
1362 constants by setting original_type in c_expr.
1363 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1364 with a zero character constant.
1365 (char_type_p): New function.
1366
5dd9a9d0
DM
13672017-01-04 David Malcolm <dmalcolm@redhat.com>
1368
1369 * c-parser.c (c_parser_declaration_or_fndef): Create a
1370 rich_location at init_loc and parse it to start_init.
1371 (last_init_list_comma): New global.
1372 (c_parser_braced_init): Update last_init_list_comma when parsing
1373 commas. Pass it to pop_init_level. Pass location of closing
1374 brace to pop_init_level.
1375 (c_parser_postfix_expression_after_paren_type): Create a
1376 rich_location at type_loc and parse it to start_init.
1377 (c_parser_omp_declare_reduction): Likewise for loc.
1378 * c-tree.h (start_init): Add rich_location * param.
1379 (pop_init_level): Add location_t param.
1380 * c-typeck.c (struct initializer_stack): Add field
1381 "missing_brace_richloc".
1382 (start_init): Add richloc param, use it to initialize
1383 the stack node's missing_brace_richloc.
1384 (last_init_list_comma): New decl.
1385 (finish_implicit_inits): Pass last_init_list_comma to
1386 pop_init_level.
1387 (push_init_level): When finding missing open braces, add fix-it
1388 hints to the richloc.
1389 (pop_init_level): Add "insert_before" param and pass it
1390 when calling pop_init_level. Add fixits about missing
1391 close braces to any richloc. Use the richloc for the
1392 -Wmissing-braces warning.
1393 (set_designator): Pass last_init_list_comma to pop_init_level.
1394 (process_init_element): Likewise.
1395
cbe34bb5
JJ
13962017-01-01 Jakub Jelinek <jakub@redhat.com>
1397
1398 Update copyright years.
1399
d17680f3
JJ
14002016-12-21 Jakub Jelinek <jakub@redhat.com>
1401
0dba7960
JJ
1402 PR bootstrap/78817
1403 * c-typeck.c (build_function_call_vec): If check_function_arguments
1404 returns true, set TREE_NO_WARNING on CALL_EXPR.
1405
d17680f3
JJ
1406 PR c/77767
1407 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1408 to *expr instead of overwriting it.
1409
aa90531e
RB
14102016-12-20 Richard Biener <rguenther@suse.de>
1411
1412 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1413 error recovery.
1414 (c_parser_gimple_statement): Only build assigns for non-error
1415 stmts.
1416 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1417
629b3d75
MJ
14182016-12-14 Martin Jambor <mjambor@suse.cz>
1419
1420 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1421 omp-low.h.
1422 (c_finish_oacc_routine): Adjusted call to
1423 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1424 to use their new names.
1425 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1426 use its new name.
1427 (c_parser_oacc_update): Likewise.
1428 (c_parser_omp_simd): Likewise.
1429 (c_parser_omp_target_update): Likewise.
1430 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1431 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1432 name.
1433 (c_finish_omp_cancellation_point): Likewise.
1434 * gimple-parser.c: Do not include omp-low.h
1435
c5af52eb
CP
14362016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1437 James Norris <jnorris@codesourcery.com>
1438
1439 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1440 EXIT_DATA,WAIT} are not used in compound statements.
1441 (c_parser_oacc_enter_exit_data): Update diagnostics.
1442
48330c93
BE
14432016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1444
1445 PR c++/71973
1446 * c-decl.c (diagnose_mismatched_decls): Use
1447 OPT_Wbuiltin_declaration_mismatch here too.
1448
899ca90e 14492016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1450 Alan Hayward <alan.hayward@arm.com>
1451 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1452
1453 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1454 (make_label, finish_struct): Likewise.
1455
1ee62b92 14562016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1457 Richard Biener <rguenther@suse.de>
22b15758 1458
8e745a17
JJ
1459 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1460 * config-lang.in (gtfiles): Add c/c-parser.h.
1461 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1462 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1463 * c-parser.c (enum c_id_kind, struct c_token,
1464 c_parser_next_token_is, c_parser_next_token_is_not,
1465 c_parser_next_token_is_keyword,
1466 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1467 Split out to ...
1468 * c-parser.h: ... new header.
1469 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1470 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1471 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1472 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1473 c_parser_error, c_parser_require, c_parser_skip_until_found,
1474 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1475 c_parser_type_name): Export.
1476 (c_parser_tokens_buf): New function.
1477 (c_parser_error): Likewise.
1478 (c_parser_set_error): Likewise.
1479 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1480 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1481 via c_parser_parse_gimple_body.
8e745a17
JJ
1482 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1483 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1484 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1485 c_parser_error, c_parser_require, c_parser_skip_until_found,
1486 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1487 c_parser_type_name): Declare.
1ee62b92
PG
1488 (struct c_parser): Declare forward.
1489 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1490 (c_parser_error): Likewise.
1491 (c_parser_set_error): Likewise.
1492 * gimple-parser.c: New file.
1493 * gimple-parser.h: Likewise.
1ee62b92 1494
22b15758
UB
14952016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1496
1497 PR c/35503
1498 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1499 warn_for_restrict.
1500
84ff4775
LCW
15012016-09-11 Le-Chun Wu <lcwu@google.com>
1502 Mark Wielaard <mjw@redhat.com>
1503
1504 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1505 to the given -Wshadow= variant.
1506
4d0cdd0c
TP
15072016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1508
1509 * c-typeck.c: Include memmodel.h.
1510
1202f33e
JJ
15112016-10-13 Jakub Jelinek <jakub@redhat.com>
1512
1513 PR target/77957
1514 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1515 instead of lhd_return_null_tree_v.
1516
8a14afd0
BS
15172016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1518
1519 PR c++/69733
1520 * c-decl.c (smallest_type_quals_location): New static function.
1521 (grokdeclarator): Try to find the correct location for an ignored
1522 qualifier.
1523
81fea426
MP
15242016-09-26 Marek Polacek <polacek@redhat.com>
1525
1526 PR c/7652
1527 * c-decl.c (pop_scope): Add gcc_fallthrough.
1528
15292016-09-26 Marek Polacek <polacek@redhat.com>
1530
1531 PR c/7652
1532 * c-parser.c (struct c_token): Add flags field.
1533 (c_lex_one_token): Pass it to c_lex_with_flags.
1534 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1535 into IFN_FALLTHROUGH.
1536 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1537 attribute fallthrough after a case label or default label.
1538 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1539
9a2300e9
MP
15402016-09-24 Marek Polacek <polacek@redhat.com>
1541
1542 PR c/77490
1543 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1544 have boolean value. Warn about ++/-- on booleans.
1545
7de76362
JJ
15462016-09-23 Jakub Jelinek <jakub@redhat.com>
1547
1548 * c-parser.c (incomplete_record_decls): Remove unnecessary
1549 = vNULL initialization of file scope vec.
1550
5b73d2ab
MP
15512016-09-16 Marek Polacek <polacek@redhat.com>
1552
1553 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1554
e51fbec3
MP
15552016-09-14 Marek Polacek <polacek@redhat.com>
1556
1557 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1558 (fix_array_notation_expr): Likewise.
1559 * c-decl.c (finish_decl): Likewise.
1560 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1561 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1562 (function_to_pointer_conversion): Use false instead of 0.
1563 (convert_lvalue_to_rvalue): Likewise.
1564 (parser_build_unary_op): Likewise.
1565 (build_atomic_assign): Likewise.
1566 (build_unary_op): Change nonconvert parameter type to bool, use
1567 true/false instead of 1/0.
1568 (build_binary_op): Use true instead of 1.
1569
254830ba
DM
15702016-09-13 David Malcolm <dmalcolm@redhat.com>
1571
1572 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1573 of add_fixit_insert to add_fixit_insert_before.
1574
4c13ba17
MP
15752016-09-13 Marek Polacek <polacek@redhat.com>
1576
1577 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1578 it.
1579
54dcdb88
BE
15802016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1581
1582 PR c++/77496
1583 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1584 COMPOUND_EXPR to warn_for_omitted_condop.
1585
e5106e27
DM
15862016-09-07 David Malcolm <dmalcolm@redhat.com>
1587
1588 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1589 c_get_substring_location for this new langhook.
1590
9dc5773f
JJ
15912016-09-02 Jakub Jelinek <jakub@redhat.com>
1592
1593 PR c/65467
1594 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1595 flag_openmp.
1596 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1597 instead of mark_exp_read on low_bound/length expression.
1598 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1599 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1600 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1601 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1602 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1603 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1604 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1605 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1606 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1607 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1608 instead of mark_expr_read.
1609 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1610 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1611 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1612 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1613 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1614 array section bases outside of depend clause, for depend clause
1615 use convert_lvalue_to_rvalue on the base.
1616 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1617 linear, aligned, map, to and from clauses.
1618 (c_omp_clause_copy_ctor): New function.
1619
295844f6
MP
16202016-09-01 Marek Polacek <polacek@redhat.com>
1621
1622 PR c/7652
1623 * c-typeck.c (composite_type): Add FALLTHRU comment.
1624
089af25c
DM
16252016-08-31 David Malcolm <dmalcolm@redhat.com>
1626
1627 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1628 to the insertion fixits for "struct", "union", and "enum".
1629
f9087798
DM
16302016-08-30 David Malcolm <dmalcolm@redhat.com>
1631
1632 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1633 rather than add_fixit_misspelled_id.
1634 (undeclared_variable): Likewise.
1635 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1636 now-redundant "here" params from add_fixit_insert method calls.
1637 (c_parser_parameter_declaration): Likewise.
1638 * c-typeck.c (build_component_ref): Remove now-redundant range
1639 param from add_fixit_replace method calls.
1640
ebef225f
MP
16412016-08-25 Marek Polacek <polacek@redhat.com>
1642
1643 * c-typeck.c (parser_build_binary_op): Pass LHS to
1644 warn_logical_not_parentheses.
1645
fe377a48
MP
16462016-08-25 Marek Polacek <polacek@redhat.com>
1647
1648 PR c/77323
1649 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1650 or _FloatN or _FloatNx is not supported.
1651 (finish_declspecs): Set type to integer_type_node when _FloatN or
1652 _FloatNx is not supported.
1653
c65699ef
JM
16542016-08-19 Joseph Myers <joseph@codesourcery.com>
1655
1656 PR c/32187
1657 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1658 (struct c_declspecs): Add field floatn_nx_idx.
1659 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1660 and _FloatNx type specifiers.
1661 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1662 (c_parser_declspecs, c_parser_attribute_any_word)
1663 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1664 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1665 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1666 narrower than double.
1667
2f1364c2
JJ
16682016-08-12 Jakub Jelinek <jakub@redhat.com>
1669 Martin Liska <mliska@suse.cz>
1670
1671 PR c/67410
1672 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1673 % to determine val element to change. Assert that
1674 wchar_bytes * charwidth fits into val array.
1675
191816a3
MP
16762016-08-12 Marek Polacek <polacek@redhat.com>
1677
1678 PR c/7652
1679 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1680 (c_parser_postfix_expression): Likewise.
1681 * c-typeck.c (build_unary_op): Adjust fall through comment.
1682 (c_mark_addressable): Likewise.
1683
b95a64bb
JJ
16842016-08-11 Jakub Jelinek <jakub@redhat.com>
1685
1686 PR c/72816
1687 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1688 array member through typedef, for orig_qual_indirect == 0 clear
1689 orig_qual_type.
1690
895aa8e1
DM
16912016-08-08 David Malcolm <dmalcolm@redhat.com>
1692
1693 PR c/64955
1694 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1695 this up to selftest::run_c_tests.
1696 (selftest::run_c_tests): New function.
1697
0b212d8c
TS
16982016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1699
ae9281fc
TS
1700 * c-parser.c (struct oacc_routine_data): Add error_seen and
1701 fndecl_seen members.
1702 (c_finish_oacc_routine): Use these.
1703 (c_parser_declaration_or_fndef): Adjust.
1704 (c_parser_oacc_routine): Likewise. Support more C language
1705 constructs, and improve diagnostics. Move pragma context
1706 checking...
1707 (c_parser_pragma): ... here.
1708
0b212d8c
TS
1709 * c-parser.c (struct oacc_routine_data): New.
1710 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1711 Simplify code.
1712 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1713 declare target" attribute.
1714
76e2c821
JB
17152016-08-01 Jan Beulich <jbeulich@suse.com>
1716
1717 * c-fold.c (c_fully_fold_internal): Also emit shift count
1718 warnings for vector types.
1719 * c-typeck.c (build_binary_op): Likewise.
1720
f618a472
MP
17212016-07-29 Marek Polacek <polacek@redhat.com>
1722
1723 PR c/71742
1724 * c-decl.c (finish_struct): Rephrase an error message.
1725
efd0786f
MP
1726 PR c/71853
1727 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1728 to error node for invalid code.
1729
e00dceaf
MP
1730 PR c/71573
1731 * c-decl.c (implicitly_declare): Return decl early not only for
1732 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1733
673a107a
JJ
17342016-07-29 Jakub Jelinek <jakub@redhat.com>
1735
1736 PR c/71969
1737 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1738 on GNU extern inline functions.
1739
a5b5c8b6
MP
17402016-07-29 Marek Polacek <polacek@redhat.com>
1741
1742 PR c/71583
1743 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1744 check expr.value.
1745
e3fe09c1
UB
17462016-07-22 Uros Bizjak <ubizjak@gmail.com>
1747
1748 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1749
7c8f7eaa
DM
17502016-07-20 David Malcolm <dmalcolm@redhat.com>
1751
1752 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1753 spellcheck-tree.h
1754 (best_macro_match): Likewise, converting from a typedef to a
1755 subclass.
1756 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1757 (lookup_name_fuzzy): Update for change of best_macro_match to a
1758 subclass with a ctor that calls cpp_forall_identifiers.
1759
de6a69ee
DM
17602016-07-20 David Malcolm <dmalcolm@redhat.com>
1761
1762 * c-decl.c (implicit_decl_warning): Update for conversion of
1763 return type of lookup_name_fuzzy to const char *.
1764 (undeclared_variable): Likewise.
1765 (lookup_name_fuzzy): Convert return type from tree to
1766 const char *.
1767 * c-parser.c (c_parser_declaration_or_fndef): Update for
1768 conversion of return type of lookup_name_fuzzy to const char *.
1769 (c_parser_parameter_declaration): Likewise.
1770
b1c9c068
CP
17712016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1772
1773 * c-parser.c (c_parser_oacc_declare): Don't scan for
1774 GOMP_MAP_POINTER.
1775 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1776 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1777 zero-length subarrays.
1778
ddbbcb19
JJ
17792016-07-15 Jakub Jelinek <jakub@redhat.com>
1780
1781 PR c/71858
1782 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1783 instead of FUZZY_LOOKUP_NAME.
1784 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1785 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1786
dd36b877
JJ
17872016-07-14 Jakub Jelinek <jakub@redhat.com>
1788
1789 PR c/71858
1790 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1791
8c681247
TS
17922016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1793
1794 * c-parser.c (c_parser_generic_selection): Make type of variable
1795 auto_vec.
1796 (c_parser_omp_declare_simd): Likewise.
1797
bf4fa671
TS
17982016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1799
1800 * c-decl.c (struct c_struct_parse_info): Change member types
1801 from vec to auto_vec.
1802 (start_struct): Adjust.
1803 (finish_struct): Likewise.
1804
557e8c49
JJ
18052016-07-02 Jakub Jelinek <jakub@redhat.com>
1806
1807 PR c/71719
1808 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1809
54d19c3b
TS
18102016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1811
1812 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1813 Move pragma context checking into...
1814 (c_parser_omp_cancellation_point): ... here, and improve
1815 diagnostic messages.
1816 * c-typeck.c (c_finish_omp_cancel)
1817 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1818
152ef731
JJ
18192016-06-29 Jakub Jelinek <jakub@redhat.com>
1820
1821 PR c/71685
1822 * c-typeck.c (c_build_qualified_type): Don't clear
1823 C_TYPE_INCOMPLETE_VARS for the main variant.
1824
18252016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1826
1827 PR c/71552
1828 * c-typeck.c (output_init_element): Diagnose incompatible types
1829 before non-constant initializers.
1830
e9ac1f86
JJ
18312016-06-28 Jakub Jelinek <jakub@redhat.com>
1832
1833 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1834
277d7ee0
AK
18352016-06-23 Andi Kleen <ak@linux.intel.com>
1836
1837 * Make-lang.in: Add support for autofdo.
1838
1a4f11c8
DM
18392016-06-22 David Malcolm <dmalcolm@redhat.com>
1840
1841 PR c/70339
1842 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1843 (implicit_decl_warning): When issuing warnings for implicit
1844 declarations, attempt to provide a suggestion via
1845 lookup_name_fuzzy.
1846 (undeclared_variable): Likewise when issuing errors.
1847 (lookup_name_in_scope): Likewise.
1848 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1849 (best_macro_match): New typedef.
1850 (find_closest_macro_cpp_cb): New function.
1851 (lookup_name_fuzzy): New function.
1852 * c-parser.c: Include gcc-rich-location.h.
1853 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1854 (c_keyword_starts_typename): ...this new function.
1855 (c_parser_declaration_or_fndef): When issuing errors about
1856 missing "struct" etc, add a fixit. For other kinds of errors,
1857 attempt to provide a suggestion via lookup_name_fuzzy.
1858 (c_parser_parms_declarator): When looking ahead to detect typos in
1859 type names, also reject CPP_KEYWORD.
1860 (c_parser_parameter_declaration): When issuing errors about
1861 unknown type names, attempt to provide a suggestion via
1862 lookup_name_fuzzy.
1863 * c-tree.h (c_keyword_starts_typename): New prototype.
1864
5a578671
JM
18652016-06-20 Joseph Myers <joseph@codesourcery.com>
1866
1867 PR c/71601
1868 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1869 c_common_type returns error_mark_node.
1870
3f8257db 18712016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1872
1873 PR c/69507
1874 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1875 __alignof__ (expression).
1876
6a3f203c
DM
18772016-06-14 David Malcolm <dmalcolm@redhat.com>
1878
1879 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1880
264757fb
DM
18812016-06-14 David Malcolm <dmalcolm@redhat.com>
1882
1883 * c-typeck.c (build_component_ref): Simplify fixit code by
1884 using gcc_rich_location::add_fixit_misspelled_id.
1885 (set_init_label): Likewise.
1886
f7e4f2e3
DM
18872016-06-13 David Malcolm <dmalcolm@redhat.com>
1888
1889 * c-parser.c (c_parser_initelt): Provide location of name for new
1890 location_t param of set_init_label.
1891 * c-tree.h (set_init_label): Add location_t param.
1892 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1893 param and use it when issuing error messages about unrecognized
1894 field names. Attempt to provide a fixit hint if appropriate,
1895 otherwise update the error message to provide the type name.
1896
4b1ffdb1
TS
18972016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1898
1899 PR c/71381
1900 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1901 Loosen checking.
1902
44a845ca
MS
19032016-06-08 Martin Sebor <msebor@redhat.com>
1904 Jakub Jelinek <jakub@redhat.com>
1905
1906 PR c++/70507
1907 PR c/68120
1908 * c-typeck.c (convert_arguments): Don't promote last argument
1909 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1910
92a5f2ba
MP
19112016-06-08 Marek Polacek <polacek@redhat.com>
1912
1913 PR c/71418
1914 * c-decl.c (grokdeclarator): Check TYPE_P.
1915
08203f73
MP
1916 PR c/71426
1917 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1918 code.
1919
6ffd47b7
DM
19202016-06-07 David Malcolm <dmalcolm@redhat.com>
1921
1922 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1923 and structure element reference, capture the location of the
1924 element name token and pass it to build_component_ref.
1925 (c_parser_postfix_expression_after_primary): Likewise for
1926 structure element dereference.
1927 (c_parser_omp_variable_list): Likewise for
1928 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1929 * c-tree.h (build_component_ref): Add location_t param.
1930 * c-typeck.c (build_component_ref): Add location_t param
1931 COMPONENT_LOC. Use it, if available, when issuing hints about
1932 mispelled member names to provide a fixit replacement hint.
1933
1f40cff3
MP
19342016-06-06 Marek Polacek <polacek@redhat.com>
1935
1936 PR c/71362
1937 * c-parser.c (c_parser_direct_declarator): Set location.
1938
5545a907
MP
19392016-06-06 Marek Polacek <polacek@redhat.com>
1940
1941 * c-typeck.c (comptypes_internal): Handle comparisons of
1942 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1943 TYPE_REF_CAN_ALIAS_ALL.
1944
b605f663
CLT
19452016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1946
1947 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1948 arguments as addressable when async clause exists.
1949
00631022
JJ
19502016-05-30 Jakub Jelinek <jakub@redhat.com>
1951
1952 PR c++/71349
1953 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1954 when combined with target construct.
1955
7211a097
JJ
19562016-05-26 Jakub Jelinek <jakub@redhat.com>
1957
1958 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1959 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1960
95efe6b6
MP
19612016-05-25 Marek Polacek <polacek@redhat.com>
1962
1963 PR c/71265
1964 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1965
a23faf7a
MP
1966 PR c/71266
1967 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1968
e46c7770
CP
19692016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1970
1971 * c-parser.c (c_parser_oacc_declare): Add support for
1972 GOMP_MAP_FIRSTPRIVATE_POINTER.
1973 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1974 argument with enum c_omp_region_type ort.
1975 (handle_omp_array_sections): Likewise. Update call to
1976 handle_omp_array_sections_1.
1977 (c_finish_omp_clauses): Add specific errors and warning messages for
1978 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1979 call to handle_omp_array_sections.
1980
a04e69c0
TS
19812016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1982
1983 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1984
f17a223d
RB
19852016-05-24 Richard Biener <rguenther@suse.de>
1986
1987 PR middle-end/70434
1988 PR c/69504
1989 * c-typeck.c (build_array_ref): Do not complain about indexing
1990 non-lvalue vectors. Adjust for function name change.
1991
79063edd
MS
19922016-05-20 Martin Sebor <msebor@redhat.com>
1993
1994 PR c/71115
1995 * c-typeck.c (error_init): Use
1996 expansion_point_location_if_in_system_header.
1997 (warning_init): Same.
1998
8a40fef3
DM
19992016-05-19 David Malcolm <dmalcolm@redhat.com>
2000
2001 PR c/71171
2002 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2003 in error-handling.
2004 (c_parser_postfix_expression): Likewise.
2005 * c-tree.h (c_expr::set_error): New method.
2006 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2007 that result's range is initialized.
2008
e9892350
JG
20092016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2010
2011 * c-typeck.c (parser_build_unary_op): Fix formatting.
2012
8fad45f5
MW
20132016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2014
2015 * c-decl.c (grokdeclarator): Remove errmsg and use of
2016 targetm.invalid_return_type.
2017 (grokparms): Remove errmsg and use of
2018 targetm.invalid_parameter_type.
2019
aa4b467b
JM
20202016-05-13 Joseph Myers <joseph@codesourcery.com>
2021
2022 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2023 function return type.
2024
4f2e1536
MP
20252016-05-12 Marek Polacek <polacek@redhat.com>
2026
2027 PR c/70756
2028 * c-decl.c (build_compound_literal): Pass LOC down to
2029 c_incomplete_type_error.
2030 * c-tree.h (require_complete_type): Adjust declaration.
2031 (c_incomplete_type_error): Likewise.
2032 * c-typeck.c (require_complete_type): Add location parameter, pass it
2033 down to c_incomplete_type_error.
2034 (c_incomplete_type_error): Add location parameter, pass it down to
2035 error_at.
2036 (build_component_ref): Pass location down to c_incomplete_type_error.
2037 (default_conversion): Pass location down to require_complete_type.
2038 (build_array_ref): Likewise.
2039 (build_function_call_vec): Likewise.
2040 (convert_arguments): Likewise.
2041 (build_unary_op): Likewise.
2042 (build_c_cast): Likewise.
2043 (build_modify_expr): Likewise.
2044 (convert_for_assignment): Likewise.
2045 (c_finish_omp_clauses): Likewise.
2046
d6e83a8d
MM
20472016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2048
2049 PR c/43651
2050 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2051 is enabled.
2052 * c-errors.c (pedwarn_c90): Return true if warned.
2053 * c-tree.h (pedwarn_c90): Change return type to bool.
2054 (enum c_declspec_word): Add new enumerator cdw_atomic.
2055
5c3a10fb
MP
20562016-05-11 Marek Polacek <polacek@redhat.com>
2057
2058 PR c++/71024
2059 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2060 diagnose_mismatched_attributes and call it.
2061
cf68d92c
MP
20622016-05-10 Marek Polacek <polacek@redhat.com>
2063
2064 PR c/70255
2065 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2066 on a declaration following the definition.
2067
351f85c5
JJ
20682016-05-05 Jakub Jelinek <jakub@redhat.com>
2069
2070 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2071 parse it through to c_parser_c99_block_statement.
2072 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2073 caller.
2074
deef7113
MP
20752016-05-04 Marek Polacek <polacek@redhat.com>
2076
2077 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2078 OPT_Wdangling_else.
2079
de55efd5
MP
20802016-05-04 Marek Polacek <polacek@redhat.com>
2081
2082 PR c/48778
2083 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2084 for macro expansions.
2085
79ce98bc
MP
20862016-05-03 Marek Polacek <polacek@redhat.com>
2087
2088 PR c/70859
2089 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2090 check_builtin_function_arguments.
2091
fb2647aa
RB
20922016-05-03 Richard Biener <rguenther@suse.de>
2093
2094 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2095 the checksum from the previous stage.
2096
77886428
CP
20972016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2098
2099 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2100 c_finish_omp_clauses.
2101 (c_parser_omp_all_clauses): Likewise.
2102 (c_parser_oacc_cache): Likewise.
2103 (c_parser_oacc_loop): Likewise.
2104 (omp_split_clauses): Likewise.
2105 (c_parser_omp_declare_target): Likewise.
2106 (c_parser_cilk_all_clauses): Likewise.
2107 (c_parser_cilk_for): Likewise.
2108 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2109 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2110
7176a4a0
MP
21112016-05-02 Marek Polacek <polacek@redhat.com>
2112
2113 PR c/70851
2114 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2115 incomplete type.
2116
e7ff0319
CP
21172016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2118
2119 PR middle-end/70626
2120 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2121 OACC_LOOP_CLAUSE_MASK.
2122 (c_parser_oacc_kernels_parallel): Update call to
2123 c_oacc_split_loop_clauses.
2124
9f405ce1
AM
21252016-04-28 Andrew MacLeod <amacleod@redhat.com>
2126
2127 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2128 argument to build_modify_expr in two cases.
2129
c1e1f433
BS
21302016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2131
2132 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2133 warn_for_memset instead of warning directly here.
2134
2448a956
MP
21352016-04-26 Marek Polacek <polacek@redhat.com>
2136
2137 PR c/67784
2138 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2139 out of ...
2140 (c_parser_for_statement): ... here.
2141 (c_parser_if_statement): Use it.
2142 (c_parser_switch_statement): Use it.
2143 (c_parser_while_statement): Use it.
2144
b02a5e26
MP
2145 PR c/70791
2146 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2147
477d4906
IV
21482016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2149
2150 PR c++/69363
2151 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2152 instead of c_finish_cilk_clauses.
2153 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2154 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2155 floating-point variables in the linear clause for Cilk Plus.
2156
fe37c7af
MM
21572016-04-18 Michael Matz <matz@suse.de>
2158
2159 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2160 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2161
949505a9
MP
21622016-04-15 Marek Polacek <polacek@redhat.com>
2163
2164 PR c/70671
2165 * c-typeck.c (build_unary_op): Pass location down to error and
2166 warning call.
2167
dda1bf61
JJ
21682016-04-15 Jakub Jelinek <jakub@redhat.com>
2169
2170 PR c/70436
2171 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2172 where needed.
2173 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2174 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2175 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2176 Adjust c_parser_pragma callers.
2177 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2178 caller.
2179 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2180 c_parser_statement.
2181 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2182 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2183 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2184 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2185 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2186 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2187 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2188 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2189 down where needed.
2190 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2191 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2192 calls.
2193
99cd9857
MP
21942016-04-13 Marek Polacek <polacek@redhat.com>
2195
2196 PR c/70436
2197 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2198 adjust callers.
2199 (c_parser_statement): Likewise.
2200 (c_parser_c99_block_statement): Likewise.
2201 (c_parser_while_statement): Likewise.
2202 (c_parser_for_statement): Likewise.
2203 (c_parser_if_body): Don't set IF_P here.
2204 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2205 about dangling else here.
2206 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2207 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2208 warn about dangling else here.
2209
f13355da
MP
22102016-04-04 Marek Polacek <polacek@redhat.com>
2211
2212 PR c/70307
2213 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2214
5fde6a45
MP
22152016-03-31 Marek Polacek <polacek@redhat.com>
2216
2217 PR c/70297
2218 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2219
4bbf545b
DM
22202016-03-18 David Malcolm <dmalcolm@redhat.com>
2221
2222 PR c/70281
2223 * c-parser.c (c_parser_postfix_expression): Set the source range
2224 for uses of "__builtin_types_compatible_p".
2225
fcc2b74f
JJ
22262016-03-17 Jakub Jelinek <jakub@redhat.com>
2227
2228 PR c/70280
2229 * c-typeck.c (composite_type): Don't count void_list_node
2230 into len, if the list is terminated by void_list_node, start
2231 with void_list_node instead of NULL for newargs. Stop
2232 at void_list_node.
2233
ab4c578f
MP
22342016-03-16 Marek Polacek <polacek@redhat.com>
2235
2236 PR c/70093
2237 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2238 nested functions returning VM types.
2239
96b3c82d
CP
22402016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2241
2242 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2243 when calling c_finish_omp_clauses.
2244
29b9828f
BS
22452016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2246
2247 PR c/69824
2248 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2249 for later.
2250
7ff6ca38
MP
22512016-03-04 Marek Polacek <polacek@redhat.com>
2252
2253 PR c/69798
2254 * c-parser.c (c_parser_postfix_expression): Call
2255 c_parser_cast_expression rather than c_parser_postfix_expression.
2256
686e2237
JJ
22572016-03-01 Jakub Jelinek <jakub@redhat.com>
2258
2259 PR c/69796
2260 PR c/69974
2261 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2262 of incomplete decls to error_mark_node.
2263
0b05329b
MP
22642016-02-24 Marek Polacek <polacek@redhat.com>
2265
2266 PR c/69819
2267 * c-decl.c (finish_decl): Don't update the copy of the type of a
2268 different decl type.
2269
067fbd8b
JJ
22702016-02-23 Jakub Jelinek <jakub@redhat.com>
2271
2272 PR objc/69844
2273 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2274 in id_kind reclassification.
2275
bf14eba2
JJ
22762016-02-16 Jakub Jelinek <jakub@redhat.com>
2277
2278 PR c/69835
2279 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2280
ba539195
JN
22812016-02-16 James Norris <jnorris@codesourcery.com>
2282
2283 PR c/64748
2284 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2285
16595a1f
BS
22862016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2287
f48dfe98
BS
2288 * c-decl.c (build_null_declspecs): Zero the entire struct.
2289
16595a1f
BS
2290 PR c/69522
2291 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2292 callers changed. If nested_p is true, use it to call
2293 finish_implicit_inits.
2294 * c-tree.h (finish_implicit_inits): Declare.
2295 * c-typeck.c (finish_implicit_inits): New function. Move code
2296 from ...
2297 (push_init_level): ... here.
2298 (set_designator, process_init_element): Call finish_implicit_inits.
2299
66756373
JJ
23002016-02-11 Jakub Jelinek <jakub@redhat.com>
2301
2302 PR c/69768
2303 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2304 arguments for -Waddress warning.
2305
1066e9b5
JJ
23062016-02-04 Jakub Jelinek <jakub@redhat.com>
2307
2308 PR c/69669
2309 * c-decl.c (finish_enum): When honoring mode attribute,
2310 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2311
3a5d2ba4
JJ
23122016-01-29 Jakub Jelinek <jakub@redhat.com>
2313
2314 PR debug/69518
2315 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2316 all type variants, not just TYPE_MAIN_VARIANT.
2317
cbdd8ae0
JJ
23182016-01-27 Jakub Jelinek <jakub@redhat.com>
2319
2320 PR debug/66869
2321 * c-decl.c (c_write_global_declarations_1): Warn with
2322 warn_unused_function if static prototype without definition
2323 is not C_DECL_USED.
2324
fa74a4bc
MP
23252016-01-27 Marek Polacek <polacek@redhat.com>
2326
2327 PR c/68062
2328 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2329 to unsigned, if needed. Add -Wsign-compare warning.
2330
13f92e8d
JJ
23312016-01-26 Jakub Jelinek <jakub@redhat.com>
2332
2333 PR tree-optimization/69483
2334 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2335
cd8e73dc 23362016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2337
2338 PR c/24293
2339 * c-tree.h (incomplete_record_decls): Declare.
2340 * c-parser.c (incomplete_record_decls): Define.
2341 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2342 report error if any decl has zero size.
2343 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2344 or enum type to incomplete_record_decls.
2345
e6d6ec9e
TV
23462016-01-14 Tom de Vries <tom@codesourcery.com>
2347
2348 PR tree-optimization/68773
2349 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2350 set force_output.
2351
00083992
MP
23522016-01-14 Marek Polacek <polacek@redhat.com>
2353
2354 PR c/69262
2355 * c-decl.c (grokdeclarator): Provide more information for invalid
2356 array declarations.
2357
7443cf13
DM
23582016-01-06 David Malcolm <dmalcolm@redhat.com>
2359
2360 * c-parser.c (c_parser_unary_expression): For dereferences, build
2361 a combined location before calling build_indirect_ref, so that
2362 error reports cover the full range, manually updating the c_expr
2363 src_range.
2364
6b131d5b
MP
23652016-01-06 Marek Polacek <polacek@redhat.com>
2366
2367 PR sanitizer/69099
2368 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2369 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2370 NULL.
2371
818ab71a
JJ
23722016-01-04 Jakub Jelinek <jakub@redhat.com>
2373
2374 Update copyright years.
2375
2fe0a208
MP
23762016-01-04 Marek Polacek <polacek@redhat.com>
2377
2378 PR c/68908
2379 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2380 optimization to use __atomic_fetch_* built-in if possible.
2381
c7b48c8a
TS
23822015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2383
2384 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2385 into...
2386 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2387 all users.
2388
fda5652f
MP
23892015-12-22 Marek Polacek <polacek@redhat.com>
2390
2391 PR c/69002
2392 * c-typeck.c (build_component_ref): Warn when acessing elements of
2393 atomic structures or unions.
2394
745e411d
DM
23952015-12-21 David Malcolm <dmalcolm@redhat.com>
2396
2397 * c-typeck.c: Include "gcc-rich-location.h".
2398 (build_binary_op): In the two places that call binary_op_error,
2399 create a gcc_rich_location and populate it with the location of
2400 the binary op and its two operands.
2401
94c40e19
DM
24022015-12-16 David Malcolm <dmalcolm@redhat.com>
2403
2404 * c-parser.c (c_parser_statement_after_labels): When calling
2405 c_finish_return, Use the return expression's location if it has
2406 one, falling back to the location of the first token within it.
2407 * c-typeck.c (c_finish_return): When issuing warnings about
2408 the incorrect presence/absence of a return value, issue a note
2409 showing the declaration of the function.
2410
de67c4c3
DM
24112015-12-16 David Malcolm <dmalcolm@redhat.com>
2412
2413 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2414 to 4.
2415 (c_parser_peek_nth_token): New function.
2416 (c_parser_peek_conflict_marker): New function.
2417 (c_parser_error): Detect conflict markers and report them as such.
2418
a10704e1
DM
24192015-12-16 David Malcolm <dmalcolm@redhat.com>
2420
2421 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2422 to preserve range information for the primary expression
2423 in the call to c_parser_postfix_expression_after_primary.
2424
8062bca6
DM
24252015-12-16 David Malcolm <dmalcolm@redhat.com>
2426
2427 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2428 expression location, falling back on the first token location,
2429 rather than always using the latter.
2430
d06f8b75
MP
24312015-12-16 Marek Polacek <polacek@redhat.com>
2432
2433 PR c/64637
2434 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2435 available.
2436
2994fb91
MP
24372015-12-15 Marek Polacek <polacek@redhat.com>
2438
2439 PR c/68907
2440 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2441 artificial decl.
2442
a1b93f8d
DM
24432015-12-08 David Malcolm <dmalcolm@redhat.com>
2444
2445 * c-parser.c (c_parser_alignof_expression): Capture location of
2446 closing parenthesis (if any), or of end of unary expression, and
2447 use it to build a src_range for the expression.
2448
46c6e1e2
DM
24492015-12-08 David Malcolm <dmalcolm@redhat.com>
2450
2451 PR c/68757
2452 * c-parser.c (c_parser_get_builtin_args): Add
2453 "out_close_paren_loc" param, and write back to it.
2454 (c_parser_postfix_expression): Capture the closing
2455 parenthesis location for RID_CHOOSE_EXPR,
2456 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2457 RID_BUILTIN_SHUFFLE and use it to set the source range
2458 for such expressions; within RID_BUILTIN_COMPLEX set
2459 the underlying location.
2460
66189108
MP
24612015-12-07 Marek Polacek <polacek@redhat.com>
2462
2463 PR c/68668
2464 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2465 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2466
f187980b
EB
24672015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2468
2469 * c-tree.h (c_build_va_arg): Adjust prototype.
2470 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2471 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2472 parameter, adjust throughout and issue an error if EXPR is a component
2473 with reverse storage order.
2474
4250754e
JM
24752015-12-02 Jason Merrill <jason@redhat.com>
2476
2477 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2478 (c_fully_fold_internal, decl_constant_value_for_optimization):
2479 Move from c-common.c.
2480 * c-tree.h: Declare decl_constant_value_for_optimization.
2481 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2482
e9e32ee6
JM
24832015-12-02 Joseph Myers <joseph@codesourcery.com>
2484
2485 PR c/68162
2486 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2487 following link from declarator to next declarator. Track original
2488 qualified type and pass it to c_build_qualified_type.
2489 * c-typeck.c (c_build_qualified_type): Add arguments
2490 orig_qual_type and orig_qual_indirect.
2491
ff7a55bf
TS
24922015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2493
2494 * c-parser.c (c_parser_omp_clause_name)
2495 (c_parser_oacc_all_clauses): Alphabetical sorting.
2496
657e4e47
JJ
24972015-12-02 Jakub Jelinek <jakub@redhat.com>
2498
2499 PR c/68533
2500 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2501 for diagnostics.
2502
37d5ad46
JB
25032015-12-01 Julian Brown <julian@codesourcery.com>
2504 Cesar Philippidis <cesar@codesourcery.com>
2505 James Norris <James_Norris@mentor.com>
2506
2507 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2508 (c_parser_oacc_clause_use_device): New function.
2509 (c_parser_oacc_all_clauses): Add use_device support.
2510 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2511 (c_parser_oacc_host_data): New function.
2512 (c_parser_omp_construct): Add host_data support.
2513 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2514 * c-typeck.c (c_finish_oacc_host_data): New function.
2515 (c_finish_omp_clauses): Add use_device support.
2516
a4850ce9
JH
25172015-11-29 Jan Hubicka <hubicka@ucw.cz>
2518
2519 PR c/67106
2520 * c-decl.c: Set TYPE_PACKED in variants.
2521
b58d3df2
ML
25222015-11-27 Martin Liska <mliska@suse.cz>
2523
2524 PR c++/68312
2525 * c-array-notation.c (fix_builtin_array_notation_fn):
2526 Use release_vec_vec instead of vec::release.
2527 (build_array_notation_expr): Likewise.
2528 (fix_conditional_array_notations_1): Likewise.
2529 (fix_array_notation_expr): Likewise.
2530 (fix_array_notation_call_expr): Likewise.
2531
aec17bfe
JJ
25322015-11-27 Jakub Jelinek <jakub@redhat.com>
2533
2534 PR c/63326
2535 * c-parser.c (c_parser_compound_statement_nostart): If
2536 last_label is true, use pragma_stmt instead of pragma_compound
2537 as second c_parser_pragma argument.
2538 (c_parser_omp_ordered, c_parser_omp_target_update,
2539 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2540 false as second argument to c_parser_skip_to_pragma_eol after
2541 diagnosing standalone directives used in pragma_stmt context.
2542
688c4de0
IV
25432015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2544
2545 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2546 with "if (ENABLE_OFFLOADING)".
2547
cbd03aee
DM
25482015-11-23 David Malcolm <dmalcolm@redhat.com>
2549
2550 PR objc/68438
2551 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2552 for various Objective-C constructs: Class.name syntax,
2553 @selector(), @protocol(), @encode(), and [] message syntax.
2554
a87a86e1
DM
25552015-11-20 David Malcolm <dmalcolm@redhat.com>
2556
2557 PR 62314
2558 * c-typeck.c (should_suggest_deref_p): New function.
2559 (build_component_ref): Special-case POINTER_TYPE when
2560 generating a "not a structure of union" error message, and
2561 suggest a "->" rather than a ".", providing a fix-it hint.
2562
8ece8dfb
DM
25632015-11-19 David Malcolm <dmalcolm@redhat.com>
2564
2565 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2566 candidate into a new function, find_closest_identifier.
2567
433068cc
MP
25682015-11-19 Marek Polacek <polacek@redhat.com>
2569
2570 PR c/68412
2571 * c-typeck.c (parser_build_binary_op): Properly handle
2572 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2573
bef08b71
DM
25742015-11-17 David Malcolm <dmalcolm@redhat.com>
2575
2576 * c-parser.c (set_c_expr_source_range): Bulletproof both
2577 overloaded implementations against NULL expr->value.
2578 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2579 values.
2580 (c_parser_unary_expression): Likewise when handling addresses of
2581 labels.
2582 (c_parser_postfix_expression): Likewise for statement expressions,
2583 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2584 __builtin_va_arg, and for __builtin_offset_of.
2585 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2586 src_range using the range of the braced initializer.
2587 (c_parser_transaction_expression): Set src_range for "ret" to a
2588 sane pair of values.
2589
fff77217
KY
25902015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2591
2592 * c-parser.c (c_finish_omp_declare_simd): Look for
2593 "simd" attribute as well. Update error message.
2594
1d899da2
TS
25952015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2596
2597 * c-parser.c (c_parser_omp_declare_target): Adjust.
2598
e4606348
JJ
25992015-11-14 Jakub Jelinek <jakub@redhat.com>
2600
2601 * c-typeck.c (c_finish_omp_clauses): Don't mark
2602 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2603
3e636daf
MP
26042015-11-14 Marek Polacek <polacek@redhat.com>
2605
2606 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2607 * c-typeck.c: Likewise.
2608
ebedc9a3
DM
26092015-11-13 David Malcolm <dmalcolm@redhat.com>
2610
2611 * c-decl.c (warn_defaults_to): Pass line_table to
2612 rich_location ctor.
2613 * c-errors.c (pedwarn_c99): Likewise.
2614 (pedwarn_c90): Likewise.
2615 * c-parser.c (set_c_expr_source_range): New functions.
2616 (c_token::get_range): New method.
2617 (c_token::get_finish): New method.
2618 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2619 based on the range from the start of the LHS to the end of the
2620 RHS.
2621 (c_parser_conditional_expression): Likewise, based on the range
2622 from the start of the cond.value to the end of exp2.value.
2623 (c_parser_binary_expression): Call set_c_expr_source_range on
2624 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2625 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2626 based on the cast_loc through to the end of the expr.
2627 (c_parser_unary_expression): Likewise, based on the
2628 op_loc through to the end of op.
2629 (c_parser_sizeof_expression) Likewise, based on the start of the
2630 sizeof token through to either the closing paren or the end of
2631 expr.
2632 (c_parser_postfix_expression): Likewise, using the token range,
2633 or from the open paren through to the close paren for
2634 parenthesized expressions.
2635 (c_parser_postfix_expression_after_primary): Likewise, for
2636 various kinds of expression.
2637 * c-tree.h (struct c_expr): Add field "src_range".
2638 (c_expr::get_start): New method.
2639 (c_expr::get_finish): New method.
2640 (set_c_expr_source_range): New decls.
2641 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2642 on ret for prefix unary ops.
2643 (parser_build_binary_op): Likewise, running from the start of
2644 arg1.value through to the end of arg2.value.
2645
ec8b536f
MP
26462015-11-13 Marek Polacek <polacek@redhat.com>
2647
2648 PR c/68320
2649 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2650
277fe616
DM
26512015-11-13 David Malcolm <dmalcolm@redhat.com>
2652
2653 * c-typeck.c: Include spellcheck.h.
2654 (lookup_field_fuzzy_find_candidates): New function.
2655 (lookup_field_fuzzy): New function.
2656 (build_component_ref): If the field was not found, try using
2657 lookup_field_fuzzy and potentially offer a suggestion.
2658
6e232ba4
JN
26592015-11-12 James Norris <jnorris@codesourcery.com>
2660 Joseph Myers <joseph@codesourcery.com>
2661
2662 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2663 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2664 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2665 and PRAGMA_OMP_CLAUSE_LINK.
2666 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2667 and PRAGMA_OACC_CLAUSE_LINK.
2668 (OACC_DECLARE_CLAUSE_MASK): New definition.
2669 (c_parser_oacc_declare): New function.
2670
9be4f715
MP
26712015-11-12 Marek Polacek <polacek@redhat.com>
2672
2673 PR c/67784
2674 * c-parser.c (c_parser_for_statement): Reclassify the token in
2675 a correct scope.
2676
e78bede6
MP
26772015-11-11 Marek Polacek <polacek@redhat.com>
2678
2679 PR c/68107
2680 PR c++/68266
2681 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2682 checking the size of an array.
2683
69f293c9
AM
26842015-11-11 Andrew MacLeod <amacleod@redhat.com>
2685
2686 * c-array-notation.c: Remove unused header files.
2687 * c-aux-info.c: Likewise.
2688 * c-convert.c: Likewise.
2689 * c-decl.c: Likewise.
2690 * c-errors.c: Likewise.
2691 * c-lang.c: Likewise.
2692 * c-objc-common.c: Likewise.
2693 * c-parser.c: Likewise.
2694 * c-typeck.c: Likewise.
2695 * gccspec.c: Likewise.
2696
3a40d81d
NS
26972015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2698 Cesar Philippidis <cesar@codesourcery.com>
2699 James Norris <jnorris@codesourcery.com>
2700 Julian Brown <julian@codesourcery.com>
2701 Nathan Sidwell <nathan@codesourcery.com>
2702
2703 c/
2704 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2705 routine arg.
2706 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2707 (c_parser_pragma): Parse 'acc routine'.
2708 (OACC_ROUTINE_CLAUSE_MARK): Define.
2709 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2710
fc402eec
AA
27112015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2712
2713 PR debug/67192
2714 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2715 location of the backward-goto to the start of the loop body.
2716
f6b0b3db
AA
27172015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2718
2719 PR debug/67192
2720 * c-parser.c (c_parser_while_statement): Finish the loop before
2721 parsing ahead for misleading indentation.
2722 (c_parser_for_statement): Likewise.
2723
ee45a32d
EB
27242015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2725
2726 * c-decl.c (finish_struct): If the structure has reverse storage
2727 order, rewrite the type of array fields with scalar component. Call
2728 maybe_apply_pragma_scalar_storage_order on entry.
2729 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2730 errors on bit-fields and reverse SSO here and not...
2731 (c_mark_addressable): ...here.
2732 (output_init_element): Adjust call to initializer_constant_valid_p.
2733 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2734
8a645150
DM
27352015-11-06 David Malcolm <dmalcolm@redhat.com>
2736
2737 * c-decl.c (warn_defaults_to): Update for change in signature
2738 of diagnostic_set_info.
2739 * c-errors.c (pedwarn_c99): Likewise.
2740 (pedwarn_c90): Likewise.
2741 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2742 for textinfo::set_location.
2743
7a5e4956
CP
27442015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2745 Thomas Schwinge <thomas@codesourcery.com>
2746 James Norris <jnorris@codesourcery.com>
2747
2748 * c-parser.c (c_parser_omp_clause_name): Add support for
2749 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2750 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2751 default(none) in OpenACC.
2752 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2753 arguments.
2754 (c_parser_oacc_clause_tile): New function.
2755 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2756 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2757 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2758 TILE}.
2759 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2760 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2761 FIRSTPRIVATE}.
2762 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2763 (c_parser_oacc_update): Update the error message for missing clauses.
2764 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2765 and OMP_CLAUSE_INDEPENDENT.
2766
bfcfbfa0
MP
27672015-11-05 Marek Polacek <polacek@redhat.com>
2768
2769 PR c/68090
2770 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2771 deal with pre-evaluation on invalid types.
2772
e01d41e5
JJ
27732015-11-05 Jakub Jelinek <jakub@redhat.com>
2774 Ilya Verbin <ilya.verbin@intel.com>
2775
2776 * c-parser.c: Include context.h and gimple-expr.h.
2777 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2778 monotonic together with nonmonotonic.
2779 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2780 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2781 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2782 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2783 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2784 expressions on combined target teams before the target.
2785 (c_parser_omp_declare_target): If decl has "omp declare target" or
2786 "omp declare target link" attribute, and cgraph or varpool node already
2787 exists, then set corresponding flags. Call c_finish_omp_clauses
2788 in the parenthesized extended-list syntax case.
2789 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2790 declare target.
2791 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2792 on OMP_CLAUSE_REDUCTION array sections.
2793 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2794 into the constant offset, or for variable low-bound using
2795 POINTER_PLUS_EXPR. For structure element based array sections use
2796 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2797 (c_finish_omp_clauses): Drop generic_field_head, structure
2798 elements are now always mapped even as array section bases,
2799 diagnose same var in data sharing and mapping clauses. Diagnose if
2800 linear step on declare simd is neither a constant nor a uniform
2801 parameter. Look through POINTER_PLUS_EXPR for array section
2802 reductions. Diagnose the same var or function appearing multiple
2803 times on the same directive. Fix up wording for the to clause if t
2804 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2805 modifier on kinds other than dynamic or guided or nonmonotonic
2806 modifier together with ordered clause.
2807
4bf9e5a8
TS
28082015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2809 Chung-Lin Tang <cltang@codesourcery.com>
2810
2811 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2812
2adfab87
AM
28132015-10-29 Andrew MacLeod <amacleod@redhat.com>
2814
2815 * c-array-notation.c: Reorder #include's and remove duplicates.
2816 * c-aux-info.c: Likewise.
2817 * c-convert.c: Likewise.
2818 * c-decl.c: Likewise.
2819 * c-errors.c: Likewise.
2820 * c-lang.c: Likewise.
2821 * c-objc-common.c: Likewise.
2822 * c-parser.c: Likewise.
2823 * c-typeck.c: Likewise.
2824
e922069e
JW
28252015-10-26 Jim Wilson <jim.wilson@linaro.org>
2826
2827 PR debug/66068
2828 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2829 after calling build_qualified_type.
2830
765dd391
CP
28312015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2832 Thomas Schwinge <thomas@codesourcery.com>
2833 James Norris <jnorris@codesourcery.com>
2834 Joseph Myers <joseph@codesourcery.com>
2835 Julian Brown <julian@codesourcery.com>
2836 Bernd Schmidt <bschmidt@redhat.com>
2837
2838 * c-parser.c (c_parser_oacc_shape_clause): New.
2839 (c_parser_oacc_simple_clause): New.
2840 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2841 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2842
88bae6f4
TS
28432015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2844 James Norris <jnorris@codesourcery.com>
2845 Cesar Philippidis <cesar@codesourcery.com>
2846
2847 PR c/64765
2848 PR c/64880
2849 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2850 parameters, and handle these. Adjust all users.
2851 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2852 into...
2853 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2854 all users.
2855 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2856 declare functions.
2857 (c_finish_omp_construct): Declare function.
2858 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2859 Merge functions into...
2860 (c_finish_omp_construct): ... this new function.
2861
a8fc2579
RB
28622015-10-22 Richard Biener <rguenther@suse.de>
2863
2864 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2865 before folding a MINUS_EXPR.
2866
e9122ef6
MP
28672015-10-21 Marek Polacek <polacek@redhat.com>
2868
2869 PR c/68024
2870 * c-decl.c (start_function): Warn about vararg functions without
2871 a prototype.
2872
9f47c7e5
IE
28732015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2874
2875 * c-typeck.c (build_conditional_expr): Use boolean vector
2876 type for vector comparison.
2877 (build_vec_cmp): New.
2878 (build_binary_op): Use build_vec_cmp for comparison.
2879
fa60eeb9
MP
28802015-10-20 Marek Polacek <polacek@redhat.com>
2881
2882 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2883
2c7020eb
MP
28842015-10-20 Marek Polacek <polacek@redhat.com>
2885
2886 PR c/67964
2887 * c-parser.c (c_parser_attributes): Break out of the loop if the
2888 token after an attribute isn't a comma.
2889
d9a6bd32
JJ
28902015-10-13 Jakub Jelinek <jakub@redhat.com>
2891 Aldy Hernandez <aldyh@redhat.com>
2892
2893 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2894 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2895 (c_parser_omp_variable_list): Handle structure elements for
2896 map, to and from clauses. Handle array sections in reduction
2897 clause. Formatting fixes.
2898 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2899 if clause modifiers.
2900 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2901 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2902 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2903 c_parser_omp_clause_is_device_ptr): New functions.
2904 (c_parser_omp_clause_ordered): Parse optional parameter.
2905 (c_parser_omp_clause_reduction): Handle array reductions.
2906 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2907 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2908 functions.
2909 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2910 (c_parser_omp_clause_depend_sink): New function.
2911 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2912 (c_parser_omp_clause_map): Parse release/delete map kinds and
2913 optional always modifier.
2914 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2915 and c_finish_omp_clauses callers.
2916 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2917 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2918 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2919 (OMP_CRITICAL_CLAUSE_MASK): Define.
2920 (c_parser_omp_critical): Parse critical clauses.
2921 (c_parser_omp_for_loop): Handle doacross loops, adjust
2922 c_finish_omp_for and c_finish_omp_clauses callers.
2923 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2924 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2925 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2926 (c_parser_omp_for): Disallow ordered clause when combined with
2927 distribute. Disallow linear clause when combined with distribute
2928 and not combined with simd.
2929 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2930 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2931 parse clauses and if depend clause is found, don't parse a body.
2932 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2933 Allow target parallel without for after it.
2934 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2935 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2936 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2937 invalid kinds.
2938 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2939 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2940 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2941 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2942 functions.
2943 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2944 defaultmap and is_device_ptr clauses.
2945 (c_parser_omp_target): Parse target parallel and target simd. Set
2946 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2947 and target exit data. Diagnose invalid map kinds.
2948 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2949 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2950 construct.
2951 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2952 &omp_priv.
2953 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2954 (c_parser_omp_taskloop): New function.
2955 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2956 handle PRAGMA_OMP_TASKLOOP.
2957 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2958 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2959 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2960 Add IS_OMP argument, handle structure element bases, diagnose
2961 bitfields, pass IS_OMP recursively, diagnose known zero length
2962 array sections in depend clauses, handle array sections in reduction
2963 clause, diagnose negative length even for pointers.
2964 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2965 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2966 array sections in reduction clause, set
2967 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2968 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2969 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2970 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2971
21ba0cea
MP
29722015-10-06 Marek Polacek <polacek@redhat.com>
2973
2974 * c-parser.c (c_parser_statement_after_labels): Use
2975 protected_set_expr_location.
2976 (c_parser_omp_clause_num_gangs): Likewise.
2977 (c_parser_omp_clause_num_threads): Likewise.
2978 (c_parser_omp_clause_num_workers): Likewise.
2979 (c_parser_omp_clause_vector_length): Likewise.
2980 (c_parser_omp_clause_num_teams): Likewise.
2981 (c_parser_omp_clause_thread_limit): Likewise.
2982 * c-typeck.c (build_c_cast): Likewise.
2983 (c_cast_expr): Likewise.
2984
624d31fe
RS
29852015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2986
2987 * c-typeck.c (c_tree_equal): Use real_equal instead of
2988 REAL_VALUES_EQUAL.
2989
b8fd7909
JM
29902015-10-04 Jason Merrill <jason@redhat.com>
2991
2992 * c-parser.c (c_lex_one_token): Handle @synchronized.
2993 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2994 can change whether the function is transaction_safe.
2995
1c7485af
MP
29962015-10-02 Marek Polacek <polacek@redhat.com>
2997
2998 PR c/67730
2999 * c-typeck.c (convert_for_assignment): Use the expansion point
3000 location throughout.
3001
3e3b8d63
MP
30022015-10-02 Marek Polacek <polacek@redhat.com>
3003
3004 PR c/64249
3005 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3006 and pass it down to c_parser_if_statement.
3007 (c_parser_else_body): Add CHAIN parameter and pass it down to
3008 c_parser_statement_after_labels.
3009 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3010 duplicated if-else-if conditions.
3011
aabef2de
MP
30122015-10-01 Marek Polacek <polacek@redhat.com>
3013
3014 * c-typeck.c (convert_for_assignment): Improve commentary.
3015
de8ddd5f
MP
30162015-09-30 Marek Polacek <polacek@redhat.com>
3017
3018 PR c/67730
3019 * c-typeck.c (c_finish_return): Use the expansion point location for
3020 certain "return with value" warnings.
3021
c4914de6
MLI
30222015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3023
3024 * c-parser.c (pragma_lex): Add loc argument.
3025
0e36f5c7
MP
30262015-09-15 Marek Polacek <polacek@redhat.com>
3027
3028 PR c/67580
3029 * c-decl.c (tag_exists_p): New function.
3030 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3031 struct/union/enum keywords are missing.
3032 * c-tree.h (tag_exists_p): Declare.
3033
2f3bb934
MP
30342015-09-15 Marek Polacek <polacek@redhat.com>
3035
3036 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3037 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3038 Return NULL_TREE instead of 0.
3039 (lookup_name): Return NULL_TREE instead of 0.
3040 (lookup_name_in_scope): Likewise.
3041 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3042 (parser_xref_tag): Use false instead of 0.
3043 (start_struct): Use true instead of 1.
3044 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3045
aa256c4a
MP
30462015-09-14 Marek Polacek <polacek@redhat.com>
3047
3048 * c-typeck.c (set_nonincremental_init_from_string): Use
3049 HOST_WIDE_INT_M1U when shifting a negative value.
3050
dbb68221
MW
30512015-09-09 Mark Wielaard <mjw@redhat.com>
3052
3053 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3054 parm against NULL.
3055
a8a098ac
JJ
30562015-09-10 Jakub Jelinek <jakub@redhat.com>
3057
3058 PR c/67502
3059 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3060 into OMP_FOR_PRE_BODY rather than before the loop.
3061
f4b189d5
JJ
30622015-09-09 Jakub Jelinek <jakub@redhat.com>
3063
0bb99c11
JJ
3064 PR c/67501
3065 * c-parser.c (c_parser_oacc_all_clauses,
3066 c_parser_omp_all_clauses): Remove invalid clause from
3067 list of clauses even if parser->error is set.
3068
fce5e5e3
JJ
3069 PR c/67500
3070 * c-parser.c (c_parser_omp_clause_aligned,
3071 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3072 test for errors.
3073 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3074 error_mark_node.
3075
f4b189d5
JJ
3076 PR c/67495
3077 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3078 instead of c_parser_unary_expression. If the result is !lvalue_p,
3079 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3080
b2aaf235
MP
30812015-09-04 Marek Polacek <polacek@redhat.com>
3082
3083 PR sanitizer/67279
3084 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3085
1807ffc1
MS
30862015-09-03 Martin Sebor <msebor@redhat.com>
3087
3088 PR c/66516
8b652e65
JJ
3089 * c-typeck.c (convert_arguments, parser_build_unary_op,
3090 build_conditional_expr, c_cast_expr, convert_for_assignment,
3091 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3092 reject_gcc_builtin.
3093 (c_decl_implicit): Define.
3094
d04ff417
MP
30952015-09-02 Marek Polacek <polacek@redhat.com>
3096
3097 PR c/67432
3098 * c-parser.c (c_parser_enum_specifier): Give a better error for
3099 an empty enum.
3100
a79683d5
TS
31012015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3102
3103 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3104
191a6b94
MP
31052015-08-12 Marek Polacek <polacek@redhat.com>
3106
3107 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3108 LOC to it.
3109
420a9d9b
MP
31102015-08-03 Marek Polacek <polacek@redhat.com>
3111
3112 PR c/67088
3113 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3114 Use it.
3115 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3116
992118a1
PP
31172015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3118
3119 * c-parser.c (c_parser_if_body): Take token_indent_info
3120 argument. Call warn_for_misleading_indentation even when the
3121 body is a semicolon. Extract token_indent_infos corresponding
3122 to the guard, body and next tokens. Adjust call to
3123 warn_for_misleading_indentation accordingly.
3124 (c_parser_else_body): Likewise.
3125 (c_parser_if_statement): Likewise.
3126 (c_parser_while_statement): Likewise.
3127 (c_parser_for_statement): Likewise.
3128
46308474
LFSM
31292015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3130 Manuel López-Ibáñez <manu@gcc.gnu.org>
3131
3132 * c-decl.c (get_parm_info): Remove static var. Update warning
3133 message.
3134
05b28fd6
MP
31352015-07-27 Marek Polacek <polacek@redhat.com>
3136
3137 PR c++/66555
3138 PR c/54979
3139 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3140
451b5e48
MP
31412015-07-20 Marek Polacek <polacek@redhat.com>
3142
3143 PR c++/55095
3144 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3145 (build_binary_op): Warn about left shift overflows.
3146
1916bcb5
AM
31472015-07-09 Andrew MacLeod <amacleod@redhat.com>
3148
3149 * c-array-notation.c: Adjust includes for flags.h changes.
3150 * c-objc-common.c: Likewise.
3151
c7131fb2
AM
31522015-07-07 Andrew MacLeod <amacleod@redhat.com>
3153
3154 * c-array-notation.c: Adjust includes.
3155 * c-aux-info.c: Likewise.
3156 * c-convert.c: Likewise.
3157 * c-decl.c: Likewise.
3158 * c-errors.c: Likewise.
3159 * c-lang.c: Likewise.
3160 * c-objc-common.c: Likewise.
3161 * c-parser.c: Likewise.
3162 * c-typeck.c: Likewise.
3163
da2e71c9
MLI
31642015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3165
3166 PR fortran/66605
3167 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3168
b155cfd9
MP
31692015-06-29 Marek Polacek <polacek@redhat.com>
3170
3171 PR c/66322
3172 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3173 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3174 about -Wswitch-bool here.
3175 (do_case): Update c_add_case_label call.
3176 (c_finish_case): Update c_do_switch_warnings call.
3177
31521951
MP
31782015-06-27 Marek Polacek <polacek@redhat.com>
3179
3180 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3181
22d03525
MP
31822015-06-26 Marek Polacek <polacek@redhat.com>
3183
3184 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3185 INDIRECT_REF_P.
3186 * c-typeck.c (array_to_pointer_conversion): Likewise.
3187 (build_unary_op): Likewise.
3188 (c_finish_return): Likewise.
3189
f0889939
AM
31902015-06-25 Andrew MacLeod <amacleod@redhat.com>
3191
3192 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3193 * c-parser.c: Likewise.
3194
8d67ee55
RS
31952015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3196
3197 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3198 instead of pointer_hash.
3199 (detect_field_duplicates): Likewise.
3200
0ae9bd27
MP
32012015-06-25 Marek Polacek <polacek@redhat.com>
3202
3203 * c-array-notation.c: Use VAR_P throughout.
3204 * c-decl.c: Likewise.
3205 * c-objc-common.c: Likewise.
3206 * c-parser.c: Likewise.
3207 * c-typeck.c: Likewise.
3208
62f9079a
MP
32092015-06-25 Marek Polacek <polacek@redhat.com>
3210
3211 * c-decl.c: Use is_global_var throughout.
3212 * c-parser.c: Likewise.
3213 * c-typeck.c: Likewise.
3214
abb226c9
AM
32152015-06-17 Andrew MacLeod <amacleod@redhat.com>
3216
3217 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3218 * c-aux-info.c: Likewise.
3219 * c-convert.c: Likewise.
3220 * c-decl.c: Likewise.
3221 * c-errors.c: Likewise.
3222 * c-lang.c: Likewise.
3223 * c-objc-common.c: Likewise.
3224 * c-parser.c: Likewise.
3225 * c-typeck.c: Likewise.
3226
8cbababc
JH
32272015-06-11 Jan Hubicka <hubicka@ucw.cz>
3228
3229 PR middle-end/66325
3230 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3231 variants.
3232
a0349665
PMR
32332015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3234
3235 * c-decl.c (pop_scope): Register the main translation unit
3236 through the new debug hook.
3237
13fdf2e2
AM
32382015-06-08 Andrew MacLeod <amacleod@redhat.com>
3239
3240 * c-array-notation.c : Adjust include files.
3241 * c-aux-info.c : Likewise.
3242 * c-convert.c : Likewise.
3243 * c-decl.c : Likewise.
3244 * c-errors.c : Likewise.
3245 * c-lang.c : Likewise.
3246 * c-lang.h : Likewise.
3247 * c-objc-common.c : Likewise.
3248 * c-parser.c : Likewise.
3249 * c-typeck.c : Likewise.
3250
d7438551
AH
32512015-06-05 Aldy Hernandez <aldyh@redhat.com>
3252
3253 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3254 immediately clobber it.
3255 (c_write_global_declarations_1): Remove call to
3256 check_global_declaration_1.
3257 (c_write_global_declarations_2): Remove.
3258 (c_write_final_cleanups): Rename from c_write_global_declarations.
3259 Remove call to finalize_compilation_unit.
3260 Remove calls to debugging hooks.
3261 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3262 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3263 * c-tree.h: Remove c_write_global_declarations.
3264
ecb9f223
AM
32652015-06-04 Andrew MacLeod <amacleod@redhat.com>
3266
3267 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3268 * c-aux-info.c: Likewise.
3269 * c-convert.c: Likewise.
3270 * c-decl.c: Likewise.
3271 * c-errors.c: Likewise.
3272 * c-lang.c: Likewise.
3273 * c-objc-common.c: Likewise.
3274 * c-parser.c: Likewise.
3275 * c-typeck.c: Likewise.
3276
9482b620
MP
32772015-06-04 Marek Polacek <polacek@redhat.com>
3278
3279 PR c/66341
3280 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3281 it is a lvalue.
3282
bc51ace3
PK
32832015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3284
3285 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3286 Warn for empty struct.
3287 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3288
ea5b45b6
AT
32892015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3290
3291 * c-decl.c (start_function): Call plugin before parsing.
3292 (finish_function): Call plugin after parsing.
3293
c2d47482
PK
32942015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3295
3296 PR c/49551
3297 * c-decl.c (merge_decls): Merge DECL_COMMON.
3298
a95492ab
JW
32992015-05-22 Jim Wilson <jim.wilson@linaro.org>
3300
3301 * Make-lang.in (check_gcc_pallelize): Define.
3302
fd5c817a
MP
33032015-05-22 Marek Polacek <polacek@redhat.com>
3304
3305 PR c/47043
3306 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3307 attributes.
3308
c7b70a3c
MP
33092015-05-21 Marek Polacek <polacek@redhat.com>
3310
3311 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3312 DECL_BUILT_IN.
3313
21b634ae
MP
33142015-05-20 Marek Polacek <polacek@redhat.com>
3315
3316 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3317 * c-typeck.c: Likewise.
3318
296a8c2f
MP
33192015-05-19 Marek Polacek <polacek@redhat.com>
3320
3321 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3322
41b37d5e
JJ
33232015-05-19 Jakub Jelinek <jakub@redhat.com>
3324
3325 PR middle-end/66199
3326 * c-parser.c (c_parser_omp_for_loop): Don't add
3327 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3328 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3329 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3330 constructs.
3331
fab27f52
MM
33322015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3333
3334 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3335 swaps.
fab27f52 3336
40de31cf
MLI
33372015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3338
3339 PR fortran/44054
3340 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3341 accessor function.
3342
3aa3c9fc
MP
33432015-05-14 Marek Polacek <polacek@redhat.com>
3344
3345 PR c/66066
3346 PR c/66127
3347 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3348 rather than with 0.
3349
c3388e62
DM
33502015-05-12 David Malcolm <dmalcolm@redhat.com>
3351
3352 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3353 to add a call to warn_for_misleading_indentation.
3354 (c_parser_else_body): Likewise, adding param "else_loc".
3355 (c_parser_if_statement): Check for misleading indentation.
3356 (c_parser_while_statement): Likewise.
3357 (c_parser_for_statement): Likewise.
3358
755e528f
MP
33592015-05-08 Marek Polacek <polacek@redhat.com>
3360
3361 PR c/64918
3362 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3363 (output_init_element): Likewise.
3364
0173bd2a
MP
33652015-05-07 Marek Polacek <polacek@redhat.com>
3366
3367 PR c/65179
3368 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3369 value.
3370
9babc352
MP
33712015-04-30 Marek Polacek <polacek@redhat.com>
3372
3373 * c-typeck.c (set_init_label): Call error_at instead of error and
3374 pass LOC to it.
3375
ac9f18db
MP
3376 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3377 the type of a decl.
3378
ec3fba51
MP
3379 * c-typeck.c (c_build_va_arg): Clarify the error message.
3380
b811915d
TS
33812015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3382
3383 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3384 OMP_STANDALONE_CLAUSES.
3385
f3075008
MP
33862015-04-28 Marek Polacek <polacek@redhat.com>
3387
3388 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3389
4e81b788
MP
33902015-04-28 Marek Polacek <polacek@redhat.com>
3391
3392 PR c/65901
3393 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3394
6c1db78e
MP
33952015-04-25 Marek Polacek <polacek@redhat.com>
3396
3397 PR c/52085
3398 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3399 attribute.
3400
5c4abbb8
MP
34012015-04-23 Marek Polacek <polacek@redhat.com>
3402
3403 PR c/65345
3404 * c-decl.c (set_labels_context_r): New function.
3405 (store_parm_decls): Call it via walk_tree_without_duplicates.
3406 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3407 instead of create_tmp_var. Build TARGET_EXPR instead of
3408 COMPOUND_EXPR.
3409 (build_atomic_assign): Use create_tmp_var_raw instead of
3410 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3411
06aca1d5
IV
34122015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3413
3414 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3415 (c_parser_omp_target_update): Add missed %> to error_at ().
3416
8fba1830
BRF
34172015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3418
3419 PR target/55143
3420 * c-decl.c (c_default_pointer_mode): Remove definition.
3421 * c-tree.h (c_default_pointer_mode): Remove declaration.
3422
62021f64
TB
34232015-03-27 Tobias Burnus <burnus@net-b.de>
3424
3425 PR c/65586
3426 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3427 error out.
3428 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3429 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3430 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3431
9b65e171
JJ
34322015-03-19 Jakub Jelinek <jakub@redhat.com>
3433
3434 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3435 attribute for DECL_EXTERNAL VAR_DECLs.
3436
17958621
JJ
34372015-03-11 Jakub Jelinek <jakub@redhat.com>
3438
3439 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3440 argument.
3441
7ccb1a11
JJ
34422015-03-10 Jakub Jelinek <jakub@redhat.com>
3443
3444 PR c/65120
3445 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3446 before preparing arguments to warn_logical_not_parentheses.
3447
01177669
JJ
34482015-03-09 Jakub Jelinek <jakub@redhat.com>
3449
3450 PR c/65120
3451 * c-typeck.c (parser_build_binary_op): Don't warn for
3452 !!x == y or !b == y where b is _Bool.
3453
802ac282
MP
34542015-03-09 Marek Polacek <polacek@redhat.com>
3455
3456 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3457 * c-decl.c (grokdeclarator): Likewise.
3458 * c-typeck.c (build_binary_op): Likewise.
3459
e5165b60
MP
34602015-02-27 Marek Polacek <polacek@redhat.com>
3461
3462 PR c/65228
3463 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3464
065d214c
MP
34652015-02-14 Marek Polacek <polacek@redhat.com>
3466
3467 PR c/64768
3468 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3469 declared through a typedef name.
3470
e5d9235b
MP
34712015-02-13 Marek Polacek <polacek@redhat.com>
3472
3473 PR c/65050
3474 * c-decl.c (grokdeclarator): Print also the type when giving
3475 the error message about array's incomplete element type.
3476
fa01ffcc
JJ
34772015-02-11 Jakub Jelinek <jakub@redhat.com>
3478
3479 PR c/64824
3480 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3481 check in the POP macro.
3482
c3e38a03
MP
34832015-02-09 Marek Polacek <polacek@redhat.com>
3484
3485 PR c/64856
3486 * c-typeck.c (process_init_element): Don't always wrap
3487 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3488 initializing a range of elements.
3489
4886ec8e
JJ
34902015-02-04 Jakub Jelinek <jakub@redhat.com>
3491
3492 PR c/64824
3493 PR c/64868
3494 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3495
c3e38a03 34962015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3497
3498 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3499 processing enum declaration.
3500
7b33f0c8
MP
35012015-01-29 Marek Polacek <polacek@redhat.com>
3502
3503 PR c/64709
3504 * c-typeck.c (pop_init_level): If constructor_elements has
3505 exactly one element with integer_zerop value, set constructor_zeroinit
3506 to 1. Remove braces around warning_init call.
3507
dea63e49
JJ
35082015-01-27 Jakub Jelinek <jakub@redhat.com>
3509
3510 PR c/64766
3511 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3512 of FUNCTION_DECLs with error_mark_node.
3513
d38f7dce
JJ
35142015-01-26 Jakub Jelinek <jakub@redhat.com>
3515
3516 PR c/64778
3517 * c-typeck.c (convert_arguments): Return -1 if there are
3518 error_args, even if we've diagnosed too many arguments.
3519
cbf5d0e7
RB
35202015-01-21 Richard Biener <rguenther@suse.de>
3521
3522 PR middle-end/64313
3523 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3524 for builtins the user declared correctly.
3525
41dbbb37
TS
35262015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3527 Bernd Schmidt <bernds@codesourcery.com>
3528 Cesar Philippidis <cesar@codesourcery.com>
3529 James Norris <jnorris@codesourcery.com>
3530 Jakub Jelinek <jakub@redhat.com>
3531 Ilmir Usmanov <i.usmanov@samsung.com>
3532
3533 * c-parser.c: Include "gomp-constants.h".
3534 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3535 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3536 Use OMP_CLAUSE_SET_MAP_KIND.
3537 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3538 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3539 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3540 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3541 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3542 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3543 "copyout", "create", "delete", "deviceptr", "gang", "host",
3544 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3545 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3546 "present_or_create", "pcreate", "seq", "self", "vector",
3547 "vector_length", "wait", "worker".
3548 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3549 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3550 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3551 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3552 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3553 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3554 (c_parser_oacc_data_clause_deviceptr)
3555 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3556 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3557 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3558 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3559 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3560 (c_parser_oacc_parallel, c_parser_oacc_update)
3561 (c_parser_oacc_wait): New functions.
3562 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3563 (c_finish_oacc_data): New prototypes.
3564 * c-typeck.c: Include "gomp-constants.h".
3565 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3566 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3567 OMP_CLAUSE_SET_MAP_KIND.
3568 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3569 (c_finish_oacc_data): New functions.
3570 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3571 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3572 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3573 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3574 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3575 GOMP_MAP_FORCE_DEVICEPTR.
3576
adfac8df
JJ
35772015-01-09 Michael Collison <michael.collison@linaro.org>
3578
3579 * c-array-notation.c: Include hash-set.h, machmode.h,
3580 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3581 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3582 * c-aux-info.c: Ditto.
3583 * c-convert.c: Ditto.
3584 * c-decl.c: Ditto.
3585 * c-errors.c: Ditto.
3586 * c-lang.c: Dittoxs.
3587 * c-objc-common.c: Ditto.
3588 * c-parser.c: Ditto.
3589 * c-typeck.c: Include hash-set.h, machmode.h,
3590 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3591 fold-const.h, wide-int.h, inchash.h, real.h and
3592 fixed-value.h due to flattening of tree.h.
3593
2cc901dc
MP
35942015-01-07 Marek Polacek <polacek@redhat.com>
3595
3596 PR c/64417
3597 * c-typeck.c (process_init_element): Disallow initialization of
3598 a flexible array member with a string constant if the structure
3599 is in an array.
3600
5624e564
JJ
36012015-01-05 Jakub Jelinek <jakub@redhat.com>
3602
e5341100
JJ
3603 PR sanitizer/64344
3604 * c-typeck.c (convert_for_assignment, c_finish_return): For
3605 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3606 types also set in_late_binary_op around convert call.
3607 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3608 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3609 result on expr as last argument to ubsan_instrument_float_cast,
3610 if in_late_binary_op, don't use c_save_expr but save_expr.
3611
5624e564
JJ
3612 Update copyright years.
3613
5bd012f8
MP
36142015-01-05 Marek Polacek <polacek@redhat.com>
3615
3616 PR c/64423
3617 * c-typeck.c (build_array_ref): Pass loc down to
3618 warn_array_subscript_with_type_char.
3619
3f8257db 36202014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3621
3622 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3623 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3624 element type.
8e745a17 3625 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3626 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3627 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3628 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3629 to PEDWARN_FOR_QUALIFIERS.
768952be 3630
8f94a8c4
JJ
36312014-12-17 Jakub Jelinek <jakub@redhat.com>
3632
3633 PR sanitizer/64289
3634 * c-convert.c: Include ubsan.h.
3635 (convert): For real -> integral casts and
3636 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3637 instead instrument the float cast directly.
3638
b731b390
JJ
36392014-11-29 Jakub Jelinek <jakub@redhat.com>
3640
3641 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3642 c_finish_stmt_expr): Remove NULL last argument from
3643 create_tmp_var_raw and create_tmp_var calls.
3644 * c-array-notation.c (fix_builtin_array_notation_fn,
3645 build_array_notation_expr, fix_conditional_array_notations_1,
3646 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3647
541e35a6
MP
36482014-11-28 Marek Polacek <polacek@redhat.com>
3649
3650 PR c/63862
3651 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3652 convert the right operand to integer type.
3653
b286be94
MP
36542014-11-25 Marek Polacek <polacek@redhat.com>
3655
3656 PR c/63877
3657 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3658 for inline functions.
3659
aa7da51a
JJ
36602014-11-21 Jakub Jelinek <jakub@redhat.com>
3661
3662 PR target/63764
3663 * c-typeck.c (build_array_ref): Adjust
3664 convert_vector_to_pointer_for_subscript caller. If it returns true,
3665 call non_lvalue_loc on the result.
3666
d876207f
RB
36672014-11-11 Richard Biener <rguenther@suse.de>
3668
3669 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3670 to true.
3671
e5e44252
AK
36722014-11-10 Andi Kleen <ak@linux.intel.com>
3673
3674 PR c/60804
3675 * c-parser.c (c_parser_statement_after_labels): Call
3676 check_no_cilk.
3677 (c_parser_if_statement): Dito.
3678 (c_parser_switch_statement): Dito.
3679 (c_parser_while_statement): Dito.
3680 (c_parser_do_statement): Dito.
3681 (c_parser_for_statement): Dito.
3682 * c-typeck.c (c_finish_loop): Dito.
3683
13c21655
PC
36842014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3685
3686 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3687 OPT_Wshift_count_overflow in the warnings.
3688
2d51fcef
MP
36892014-10-30 Marek Polacek <polacek@redhat.com>
3690
3691 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3692 print the stripped version as well, if they're not the same.
3693
ef4bddc2
RS
36942014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3695
3696 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3697 machine_mode.
3698
c582198b
AM
36992014-10-28 Andrew MacLeod <amacleod@redhat.com>
3700
3701 * c-decl.c: Adjust include files.
3702 * c-parser.c: Ditto.
3703
ddc8de03
PM
37042014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3705 Tom Tromey <tromey@redhat.com>
3706
3707 * c-tree.h (enum c_oracle_request): New.
3708 (c_binding_oracle_function): New typedef.
3709 (c_binding_oracle, c_pushtag, c_bind): Declare.
3710 * c-decl.c (c_binding_oracle): New global.
3711 (I_SYMBOL_CHECKED): New macro.
3712 (i_symbol_binding): New function.
3713 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3714 (I_TAG_CHECKED): New macro.
3715 (i_tag_binding): New function.
3716 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3717 (I_LABEL_CHECKED): New macro.
3718 (i_label_binding): New function.
3719 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3720 (c_print_identifier): Save and restore c_binding_oracle.
3721 (c_pushtag, c_bind): New functions.
3722
60393bbc
AM
37232014-10-27 Andrew MacLeod <amacleod@redhat.com>
3724
3725 * c-typeck.c: Adjust include files.
3726
d723bb7c
MLI
37272014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3728
3729 PR c++/53061
3730 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3731 initialization here...
3732 (c_initialize_diagnostics): ... but here. Set defaults after
3733 building pretty-printer.
3734
1bc5a451
MP
37352014-10-23 Marek Polacek <polacek@redhat.com>
3736
3737 PR c/63626
3738 * c-decl.c (pop_scope): Don't print warning in external_scope.
3739
4435bb92
MP
37402014-10-19 Marek Polacek <polacek@redhat.com>
3741
3742 PR c/63567
3743 * c-typeck.c (output_init_element): Allow initializing objects with
3744 static storage duration with compound literals even in C99 and add
3745 pedwarn for it.
3746
7278465e
MP
37472014-10-17 Marek Polacek <polacek@redhat.com>
3748
3749 PR c/63567
3750 * c-typeck.c (digest_init): Allow initializing objects with static
3751 storage duration with compound literals even in C99 and add pedwarn
3752 for it.
3753
d9b7be2e
MP
37542014-10-17 Marek Polacek <polacek@redhat.com>
3755
3756 PR c/63543
3757 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3758 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3759 error multiple times. Print the type.
3760
f406ae1f
MP
37612014-10-17 Marek Polacek <polacek@redhat.com>
3762
3763 PR c/63549
3764 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3765 type.
3766
92574c7c
MP
37672014-10-17 Marek Polacek <polacek@redhat.com>
3768
3769 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3770 (start_function): Use OPT_Wimplicit_int instead of 0.
3771 (store_parm_decls_oldstyle): Likewise.
3772
1bc4a978
MT
37732014-10-17 Alan Modra <amodra@gmail.com>
3774
3775 PR middle-end/61848
3776 * c-decl.c (merge_decls): Don't merge section name or tls model
3777 to newdecl symtab node, instead merge to olddecl. Override
3778 existing olddecl section name. Set tls_model for all thread-local
3779 vars, not just OMP thread-private ones. Remove incorrect comment.
3780
83685514
AM
37812014-10-16 Andrew MacLeod <amacleod@redhat.com>
3782
3783 * c-decl.c: Adjust include files.
3784
78a7c317
DD
37852014-10-14 DJ Delorie <dj@redhat.com>
3786
3787 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3788 (c_token_starts_typename): Check all __intN, not just __int128.
3789 (c_token_starts_declspecs): Likewise.
3790 (c_parser_declspecs): Likewise.
3791 (c_parser_attribute_any_word): Likewise.
3792 (c_parser_objc_selector): Likewise.
3793 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3794 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3795 is specified.
3796 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3797 __int128.
3798 (finish_declspecs): Likewise.
3799
74d98c1e
AB
38002014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3801
8e745a17 3802 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3803 the duplicate code.
8e745a17 3804 (c_parser_statement): Call the new function.
74d98c1e 3805
84937de2
MP
38062014-10-09 Marek Polacek <polacek@redhat.com>
3807
3808 PR c/63480
3809 * c-typeck.c (pop_init_level): Don't warn about initializing
3810 with { }.
3811
0382aaa0
MP
38122014-10-07 Marek Polacek <polacek@redhat.com>
3813
3814 PR c/59717
3815 * c-decl.c (header_for_builtin_fn): New function.
3816 (implicitly_declare): Suggest which header to include.
3817
7a0ca710
MP
38182014-10-07 Marek Polacek <polacek@redhat.com>
3819
3820 * c-convert.c (convert): Use error_operand_p.
3821 * c-typeck.c (require_complete_type): Likewise.
3822 (really_atomic_lvalue): Likewise.
3823 (digest_init): Likewise.
3824 (handle_omp_array_sections_1): Likewise.
3825
6bc8a126
MP
38262014-10-03 Marek Polacek <polacek@redhat.com>
3827
3828 PR c/63453
3829 * c-decl.c (pop_scope): Don't warn about "inline function declared
3830 but never defined" for functions marked with gnu_inline attribute.
3831
d90c0a59
JJ
38322014-09-25 Jakub Jelinek <jakub@redhat.com>
3833
3834 PR c++/63249
3835 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3836 on low_bound and length.
3837
083e891e
MP
38382014-09-24 Marek Polacek <polacek@redhat.com>
3839
3840 PR c/61405
3841 PR c/53874
3842 * c-parser.c: Don't define CPP_KEYWORD.
3843 (c_parser_switch_statement): Pass original type to c_finish_case.
3844 * c-tree.h (c_finish_case): Update declaration.
3845 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3846 conditionally to c_do_switch_warnings.
3847
8d95fe25
MP
38482014-09-03 Marek Polacek <polacek@redhat.com>
3849
3850 PR c/62024
3851 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3852 conversions.
3853
9a771876
JJ
38542014-09-02 Jakub Jelinek <jakub@redhat.com>
3855 Balaji V. Iyer <balaji.v.iyer@intel.com>
3856 Igor Zamyatin <igor.zamyatin@intel.com>
3857
3858 * c-parser.c (c_parser_cilk_for): New function.
3859 (c_parser_cilk_grainsize): Likewise.
3860 (c_get_temp_regvar): Likewise.
3861 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3862 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3863 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3864 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3865 case.
3866
b7679d96
CG
38672014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3868
3869 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3870 with using HOST_WIDE_INT without truncation to 'int'
3871
59ea0364
MP
38722014-08-22 Marek Polacek <polacek@redhat.com>
3873
3874 PR c++/62199
3875 * c-typeck.c (parser_build_binary_op): Adjust call to
3876 warn_logical_not_parentheses.
3877
671a475e
IZ
38782014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3879
3880 PR other/62008
3881 * c-parser.c (c_parser_array_notation): Check for correct
3882 type of an array added.
3883
04159acf
MP
38842014-08-19 Marek Polacek <polacek@redhat.com>
3885
3886 PR c++/62153
3887 * c-typeck.c (build_binary_op): If either operand of a comparison
3888 is a boolean expression, call maybe_warn_bool_compare.
3889
c77935ee
PP
38902014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3891
3892 PR c/45584
3893 * c-typeck.c (build_c_cast): Do a conversion even when the
3894 TYPE_MAIN_VARIANTs are the same.
3895
35aff4fb
MP
38962014-08-19 Marek Polacek <polacek@redhat.com>
3897
3898 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3899 pedwarn_c99 instead of pedwarn.
3900 (grokfield): Likewise.
3901 (warn_defaults_to): New function.
3902 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3903 Unconditionally call pedwarn_c99 instead of pedwarn.
3904 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3905 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3906 check flag_isoc11 before.
3907 * c-errors.c (pedwarn_c99): Change the return type to bool.
3908 Handle -Wc99-c11-compat.
3909 * c-parser.c (disable_extension_diagnostics): Handle
3910 warn_c99_c11_compat.
3911 (restore_extension_diagnostics): Likewise.
3912 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3913 instead of pedwarn, don't check flag_isoc11 before.
3914 (c_parser_declspecs): Likewise.
3915 (c_parser_alignas_specifier): Likewise.
3916 (c_parser_alignof_expression): Likewise.
3917 (c_parser_generic_selection): Likewise.
3918 * c-tree.h (pedwarn_c99): Update declaration.
3919 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3920 of pedwarn_c99.
3921
177cce46
MP
39222014-08-19 Marek Polacek <polacek@redhat.com>
3923
3924 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3925 to pedwarn_c90.
3926 * c-errors.c: Include "opts.h".
3927 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3928 * c-parser.c (disable_extension_diagnostics): Handle negative value
3929 of warn_c90_c99_compat, too.
3930 (restore_extension_diagnostics): Likewise.
3931 (c_parser_compound_statement_nostart): Pass
3932 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3933
6dc99c33
MP
39342014-08-12 Marek Polacek <polacek@redhat.com>
3935
3936 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3937 Add pedwarn.
3938 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3939 Likewise.
3940 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3941
3f8257db 39422014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3943
3944 PR c/51849
3945 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3946 Call pedwarn_c90 instead of pedwarn.
3947 (check_bitfield_type_and_width): Likewise.
3948 (declspecs_add_qual): Likewise.
3949 (declspecs_add_type): Likewise.
3950 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3951 Adjust to only call pedwarn_c90.
3952 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3953 pedwarn_c90 instead of pedwarn.
3954 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3955 * c-parser.c (disable_extension_diagnostics): Handle
3956 warn_c90_c99_compat.
3957 (restore_extension_diagnostics): Likewise.
3958 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3959 pedwarn_c90 instead of pedwarn.
3960 (c_parser_initelt): Likewise.
3961 (c_parser_postfix_expression): Likewise.
3962 (c_parser_postfix_expression_after_paren_type): Likewise.
3963 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3964 * c-tree.h: Fix formatting.
3965 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3966 pedwarn_c90 instead of pedwarn.
3967
9f25a338
TS
39682014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3969
3970 * c-typeck.c: Remove include of pointer-set.h.
3971
044331a8
MP
39722014-08-07 Marek Polacek <polacek@redhat.com>
3973
3974 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3975
b787e7a2
TS
39762014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3977
3978 * c-typeck.c: Use hash_map instead of pointer_map.
3979
6e2830c3
TS
39802014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3981
3982 * c-decl.c: Use hash_set instead of pointer_set.
3983
a7ee52fb
IZ
39842014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3985
3986 PR middle-end/61455
3987 * c-array-notation.c (expand_array_notations): Handling
3988 of DECL_EXPR added.
3989
b4dfdc11
MG
39902014-07-31 Marc Glisse <marc.glisse@inria.fr>
3991
3992 PR c++/60517
3993 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3994 a local variable.
3995
976d5a22
TT
39962014-07-30 Tom Tromey <tromey@redhat.com>
3997
3998 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3999 field.
4000 (really_start_incremental_init, push_init_level): Initialize
4001 designator_depth.
4002 (pop_init_level): Set global designator_depth.
4003 (process_init_element): Check for designated_init attribute.
4004
30281de2
MP
40052014-07-20 Marek Polacek <polacek@redhat.com>
4006
4007 PR c/61852
4008 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4009 (implicitly_declare): Pass location to implicit_decl_warning.
4010
b108f48f
JJ
40112014-07-14 Jakub Jelinek <jakub@redhat.com>
4012
4013 PR middle-end/61294
4014 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4015 If non-NULL, call c_parser_check_literal_zero.
4016 (c_parser_check_literal_zero): New function.
4017 (c_parser_postfix_expression_after_primary): Adjust
4018 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4019
773ec47f
MP
40202014-07-06 Marek Polacek <polacek@redhat.com>
4021
4022 PR c/6940
4023 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4024 * c-tree.h (C_ARRAY_PARAMETER): Define.
4025 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4026 function parameter.
4027
22e1cf1c 40282014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4029 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4030
4031 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4032 releasing symbol.
4033
52ec0ea3
MP
40342014-07-01 Marek Polacek <polacek@redhat.com>
4035
4036 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4037 instead of 0 to WARN_FOR_ASSIGNMENT.
4038
d5c3d343
MP
40392014-07-01 Marek Polacek <polacek@redhat.com>
4040
4041 PR c/58286
4042 * c-typeck.c (convert_for_assignment): Pass
4043 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4044
6a7253a4
MP
40452014-06-30 Marek Polacek <polacek@redhat.com>
4046
4047 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4048 has no_sanitize_undefined attribute.
4049
5e88a8f4
IZ
40502014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4051
4052 PR middle-end/57541
4053 * c-array-notation.c (fix_builtin_array_notation_fn):
4054 Check for 0 arguments in builtin call. Check that bultin argument is
4055 correct.
4056 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4057 index.
4058
9698b078
SH
40592014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4060
4061 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4062 qualifiers in __auto_type for atomic types.
4063 (c_parser_typeof_specifier): Discard all type qualifiers in
4064 __typeof__ for atomic types.
4065
6e07c515
MP
40662014-06-25 Marek Polacek <polacek@redhat.com>
4067
4068 PR c/61162
4069 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4070 the return expression to c_finish_return.
4071
da6f124d
JJ
40722014-06-25 Jakub Jelinek <jakub@redhat.com>
4073
4074 * c-typeck.c (c_finish_omp_clauses): Make sure
4075 OMP_CLAUSE_LINEAR_STEP has correct type.
4076
c203e8a7
TS
40772014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4078
4079 * c-decl.c: Adjust.
4080
56ad0e38
JJ
40812014-06-24 Jakub Jelinek <jakub@redhat.com>
4082
4083 * c-parser.c (c_parser_omp_for_loop): For
4084 #pragma omp parallel for simd move lastprivate clause from parallel
4085 to for rather than simd.
4086
47c2554f
MP
40872014-06-23 Marek Polacek <polacek@redhat.com>
4088
4089 * c-typeck.c (parser_build_binary_op): Don't call
4090 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4091
56363ffd
JH
40922014-06-15 Jan Hubicka <hubicka@ucw.cz>
4093
4094 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4095 * c-decl.c (merge_decls): Likewise.
4096
d7ff7ae5
MP
40972014-06-09 Marek Polacek <polacek@redhat.com>
4098
4099 PR c/36446
4100 * c-typeck.c (error_init): Call inform instead of error_at.
4101 (pedwarn_init): Call inform instead of pedwarn.
4102 (warning_init): Call inform instead of warning_at.
4103
24d047a3
JH
41042014-06-07 Jan Hubicka <hubicka@ucw.cz>
4105
4106 * c-decl.c (merge_decls): Use set_decl_section_name.
4107 (duplicate_decls): Remove node if it exists.
4108
9bac5cbb
G
41092014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4110
4111 PR c/53119
4112 * c-typeck.c (push_init_level, process_init_element,
4113 pop_init_level): Correct check for zero initialization, move
4114 missing brace warning to respect zero initialization.
4115
8ffcdea8
MP
41162014-06-05 Marek Polacek <polacek@redhat.com>
4117
4118 PR c/56724
4119 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4120
742938c9
MP
41212014-06-05 Marek Polacek <polacek@redhat.com>
4122
4123 PR c/49706
4124 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4125 on the left hand side operand of a comparison.
4126
6447c55d
MP
41272014-06-05 Marek Polacek <polacek@redhat.com>
4128
4129 PR c/48062
4130 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4131 Print note only if the warning was printed.
4132
9dc7743c
IZ
41332014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4134
4135 PR c/58942
4136 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4137 with a pointer.
4138
fedfecef
MP
41392014-06-03 Marek Polacek <polacek@redhat.com>
4140
4141 PR c/60439
4142 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4143 c_start_case.
4144 * c-tree.h (c_start_case): Update.
4145 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4146 switch condition has boolean value.
4147
9b2b7279
AM
41482014-06-02 Andrew MacLeod <amacleod@redhat.com>
4149
4150 * c-decl.c: Include builtins.h.
4151 * c-parser.c: Likewise.
4152
5c1bc275
MP
41532014-05-27 Marek Polacek <polacek@redhat.com>
4154
4155 PR c/56724
4156 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4157 error and warning calls to error_at and warning_at. Pass location of
4158 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4159 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4160 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4161
97563bc8
IZ
41622014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4163
4164 PR c/61191
4165 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4166 function parameters.
4167
aede2c10
JH
41682014-05-23 Jan Hubicka <hubicka@ucw.cz>
4169
4170 * c-decl.c (merge_decls): Preserve symtab node pointers.
4171 (duplicate_decls): Free new decl.
4172
edbba2ce
TS
41732014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4174
f3316c6d
TS
4175 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4176 initialization.
4177
edbba2ce
TS
4178 * c-parser.c (c_parser_omp_target): Return bool values.
4179
68c81f24
TS
41802014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4181
4182 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4183 num_teams_loc variable to num_thread_limit_loc.
4184
632f2871
RS
41852014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4186
4187 * c-array-notation.c (expand_array_notations): Use void_node
4188 instead of void_zero_node.
4189
766090c2
TS
41902014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4191
4192 * c-decl.c (finish_struct): Adjust.
4193 (finish_enum): Likewise.
4194 (bind): Adjust.
4195 (record_inline_static): Likewise.
4196 (push_scope): Likewise.
4197 (make_label): Likewise.
4198 (lookup_label_for_goto): Likewise.
4199 (finish_struct): Likewise.
4200 (finish_enum): Likewise.
4201 (store_parm_decls): Likewise.
4202 (c_push_function_context): Likewise.
4203 * c-lang.h: Remove usage of variable_size gty attribute.
4204 * c-parser.c (c_parse_init): Adjust.
4205 (c_parse_file): Likewise.
4206
2b107f6b
MP
42072014-05-13 Marek Polacek <polacek@redhat.com>
4208
4209 PR c/61162
4210 * c-typeck.c (convert_for_assignment): Pass location to
4211 WARN_FOR_ASSIGNMENT instead of input_location.
4212
d033409e
MP
42132014-05-10 Marek Polacek <polacek@redhat.com>
4214
4215 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4216 maybe_warn_string_init.
4217 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4218 maybe_warn_string_init.
4219 * c-tree.h (maybe_warn_string_init): Update declaration.
4220 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4221 Call pedwarn_init with loc instead of with input_location.
4222 (digest_init): Pass init_loc to maybe_warn_string_init.
4223 (pop_init_level): Call pedwarn_init with loc instead of with
4224 input_location.
4225 (set_init_index): Likewise.
4226 (process_init_element): Likewise.
4227
ea58ef42
MP
42282014-05-09 Marek Polacek <polacek@redhat.com>
4229
4230 PR c/61096
4231 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4232 (c_parser_initelt): Pass location to set_init_label. Pass array index
4233 location to set_init_index.
4234 * c-tree.h (push_init_level): Update declaration.
4235 (pop_init_level): Likewise.
4236 (set_init_index): Likewise.
4237 (set_init_label): Likewise.
4238 * c-typeck.c (error_init): Add location parameter. Call error_at
4239 instead of error.
4240 (digest_init): Pass init_loc to error_init.
4241 (really_start_incremental_init):
4242 (push_init_level): Add location parameter. Pass loc to pop_init_level
4243 and error_init.
4244 (pop_init_level): Likewise.
4245 (set_designator): Add location parameter. Pass loc to pop_init_level,
4246 push_init_level, and error_init.
4247 (set_init_index): Add location parameter. Pass loc to error_init and
4248 set_designator.
4249 (set_init_label): Likewise.
4250 (output_init_element): Pass loc to error_init.
4251 (process_init_element): Pass loc to error_init, pop_init_level,
4252 pedwarn_init, and push_init_level.
4253
661a0813
MP
42542014-05-09 Marek Polacek <polacek@redhat.com>
4255
4256 PR c/50459
4257 * c-parser.c (c_parser_attributes): Parse the arguments as an
4258 expression-list if the attribute takes identifier.
4259
2793eeab
MP
42602014-05-08 Marek Polacek <polacek@redhat.com>
4261
4262 PR c/61053
4263 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4264 TYPE_ALIGN_UNIT.
4265
f827930a
MP
42662014-05-08 Marek Polacek <polacek@redhat.com>
4267
4268 PR c/61077
4269 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4270 of main.
4271
1d60af08
KZ
42722014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4273 Mike Stump <mikestump@comcast.net>
4274 Richard Sandiford <rdsandiford@googlemail.com>
4275
4276 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4277 (finish_enum): Use wide-int interfaces.
4278 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4279 * c-typeck.c (build_c_cast): Likewise.
4280 (set_nonincremental_init_from_string): Likewise.
4281 (c_tree_equal): Likewise.
4282
a0e24419
MP
42832014-05-02 Marek Polacek <polacek@redhat.com>
4284
4285 PR c/25801
4286 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4287 Return size_one_node when the type is not complete.
4288 (pointer_diff): Remove comment.
4289 (build_unary_op): Improve error messages.
4290
19fc9faa
MP
42912014-05-02 Marek Polacek <polacek@redhat.com>
4292
4293 * c-typeck.c (c_finish_return): Separate warning_at calls.
4294
63bc4e87
MP
42952014-05-02 Marek Polacek <polacek@redhat.com>
4296
4297 * c-tree.h (error_init): Remove declaration.
4298 (pedwarn_init): Likewise.
4299 * c-typeck.c (error_init): Make static and move above.
4300 (pedwarn_init): Likewise.
4301 (warning_init): Move above.
4302 (maybe_warn_string_init): Likewise.
4303
4bd2511b
JL
43042014-05-01 Jeff Law <law@redhat.com>
4305
4306 Revert:
4307
4308 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4309 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4310 avoid goto.
4311
6a358dcb
MP
43122014-05-02 Marek Polacek <polacek@redhat.com>
4313
4314 PR c/60784
4315 * c-typeck.c (push_init_level): Set constructor_designated to
4316 p->designated for structures.
4317
ae5ebda4
MP
43182014-05-01 Marek Polacek <polacek@redhat.com>
4319
4320 PR c/60915
4321 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4322 function-definition has an attribute after the declarator.
4323
96b40f8d
MP
43242014-05-01 Marek Polacek <polacek@redhat.com>
4325
4326 PR c/60257
4327 * c-typeck.c (warning_init): Add location_t parameter. Call
4328 warning_at instead of warning.
4329 (push_init_level): Pass input_location to warning_init.
4330 (add_pending_init): Add location_t parameter. Pass loc to
4331 warning_init.
4332 (set_nonincremental_init): Pass input_location to add_pending_init.
4333 (set_nonincremental_init_from_string): Likewise.
4334 (output_init_element): Pass loc to warning_init and to
4335 add_pending_init.
4336
32e00768
MP
43372014-05-01 Marek Polacek <polacek@redhat.com>
4338
4339 PR c/43395
4340 * c-typeck.c (c_finish_return): Distinguish between label and variable
4341 when warning about returning local address.
4342
c9379ce2
MP
43432014-05-01 Marek Polacek <polacek@redhat.com>
4344
4345 PR c/29467
4346 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4347 in C89 mode.
4348
d00887e8
MP
43492014-05-01 Marek Polacek <polacek@redhat.com>
4350
4351 PR c/43245
4352 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4353 instead of 0 to WARN_FOR_QUALIFIERS.
4354
5436fa2e
MP
43552014-05-01 Marek Polacek <polacek@redhat.com>
4356
4357 PR c/56989
4358 * c-typeck.c (default_conversion): Use better location for
4359 error call.
4360
f8ed5150
MP
43612014-04-30 Marek Polacek <polacek@redhat.com>
4362
4363 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4364 also when SANITIZE_FLOAT_DIVIDE is on.
4365
8337d1db
MP
43662014-04-30 Marek Polacek <polacek@redhat.com>
4367
4368 PR c/60139
4369 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4370 and pedwarn_init. Use loc insted of input_location.
4371
c4bdc42f
MP
43722014-04-30 Marek Polacek <polacek@redhat.com>
4373
4374 PR c/60351
4375 * c-typeck.c (build_binary_op): Use location when warning about
4376 shift count.
4377
45484dcf
MP
43782014-04-25 Marek Polacek <polacek@redhat.com>
4379
4380 PR c/18079
4381 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4382 always_inline/noinline and hot/cold attributes.
4383
34cf811f
MP
43842014-04-25 Marek Polacek <polacek@redhat.com>
4385
4386 PR c/60114
4387 * c-parser.c (c_parser_initelt): Pass input_location to
4388 process_init_element.
4389 (c_parser_initval): Pass loc to process_init_element.
4390 * c-tree.h (process_init_element): Adjust declaration.
4391 * c-typeck.c (push_init_level): Pass input_location to
4392 process_init_element.
4393 (pop_init_level): Likewise.
4394 (set_designator): Likewise.
4395 (output_init_element): Add location_t parameter. Pass loc to
4396 digest_init.
4397 (output_pending_init_elements): Pass input_location to
4398 output_init_element.
4399 (process_init_element): Add location_t parameter. Pass loc to
4400 output_init_element.
4401
42056eac
JJ
44022014-04-24 Jakub Jelinek <jakub@redhat.com>
4403
4404 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4405 atomic-clause, allow comma in between atomic-clause and
4406 seq_cst.
4407
e162a134
JJ
44082014-04-22 Jakub Jelinek <jakub@redhat.com>
4409
4410 PR c/59073
4411 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4412 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4413
2f6babac
IZ
44142014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4415
4416 PR middle-end/60469
4417 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4418 create_tmp_var instead build_decl for creating temps.
4419 (build_array_notation_expr): Likewise.
4420 (fix_conditional_array_notations_1): Likewise.
4421 (fix_array_notation_expr): Likewise.
4422 (fix_array_notation_call_expr): Likewise.
4423
8edbfaa6
JJ
44242014-03-28 Jakub Jelinek <jakub@redhat.com>
4425
4426 PR c++/60689
4427 * c-tree.h (c_build_function_call_vec): New prototype.
4428 * c-typeck.c (build_function_call_vec): Don't call
4429 resolve_overloaded_builtin here.
4430 (c_build_function_call_vec): New wrapper function around
4431 build_function_call_vec. Call resolve_overloaded_builtin here.
4432 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4433 Call c_build_function_call_vec instead of build_function_call_vec.
4434 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4435 * c-decl.c (finish_decl): Likewise.
4436
7485aeea
MLI
44372014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4438
4439 PR c/55383
4440 * c-typeck.c: Use correct format string in cast-qual warning
4441
b17a8b07
TS
44422014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4443
4444 * c-decl.c (c_decl_attributes): Use
4445 lang_hooks.types.omp_mappable_type.
4446 * c-typeck.c (c_finish_omp_clauses): Likewise.
4447
3af9c5e9
MP
44482014-03-06 Marek Polacek <polacek@redhat.com>
4449
4450 PR c/60197
4451 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4452 of checking tree code.
4453
1c9f5f33
PK
44542014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4455
4456 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4457 (c_parser_parameter_declaration): Likewise.
4458
cc28fc7f
MP
44592014-02-19 Marek Polacek <polacek@redhat.com>
4460
4461 PR c/60195
4462 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4463 Call mark_exp_read on exp.value.
4464 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4465 TREE_ADDRESSABLE on old instead of val.
4466 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4467
b581c05c
PK
44682014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4469
4470 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4471 C_EXPR_APPEND by vec_safe_push.
4472 * c-tree.h (C_EXPR_APPEND): Remove.
4473
81e5eca8
MP
44742014-01-31 Marek Polacek <polacek@redhat.com>
4475
4476 PR c/59963
4477 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4478 build_function_call_vec.
4479 (build_function_call): Likewise.
4480 (build_atomic_assign): Likewise.
4481 (build_function_call_vec): Add arg_loc parameter. Use it.
4482 (convert_arguments): Likewise.
4483 (convert_for_assignment): Rename rhs_loc to expr_loc.
4484 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4485 (c_parser_objc_keywordexpr): Likewise.
4486 (c_parser_postfix_expression_after_primary): Call
4487 build_function_call_vec with expr_loc rather than op_loc.
4488 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4489 build_function_call_vec.
4490 (c_parser_expr_list): Add locations parameter. Fill it with locations
4491 of function arguments.
4492 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4493
68fca595
MP
44942014-01-30 Marek Polacek <polacek@redhat.com>
4495
4496 PR c/59940
4497 * c-typeck.c (build_function_call_vec): Use loc parameter.
4498 (convert_arguments): Add location parameter. Use it.
4499 (ep_convert_and_check): Likewise.
4500 (build_atomic_assign): Adjust convert_for_assignment call.
4501 (build_modify_expr): Likewise.
4502 (digest_init): Likewise.
4503 (c_finish_return): Likewise.
4504 (build_conditional_expr): Adjust ep_convert_and_check calls.
4505 (convert_for_assignment): Add rhs_loc parameter. Use it.
4506 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4507 calls.
4508
fa337f3a
RB
45092014-01-30 Richard Biener <rguenther@suse.de>
4510
4511 PR c/59905
4512 * c-typeck.c (build_function_call_vec): Do not replace calls
4513 to a function via an incompatible type with a runtime abort.
4514
b72271b9
BI
45152014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4516
4517 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4518 flag_enable_cilkplus with flag_cilkplus.
4519 (c_parser_direct_declarator_inner): Likewise.
4520 (c_parser_attribute_any_word): Likewise.
4521 (c_parser_attributes): Likewise.
4522 (c_parser_compound_statement): Likewise.
4523 (c_parser_statement_after_labels): Likewise.
4524 (c_parser_if_statement): Likewise.
4525 (c_parser_switch_statement): Likewise.
4526 (c_parser_do_statement): Likewise.
4527 (c_parser_for_statement): Likewise.
4528 (c_parser_unary_expression): Likewise.
4529 (c_parser_postfix_expression): Likewise.
4530 (c_parser_postfix_expression_after_primary): Likewise.
4531 (c_parser_postfix_expression_after_primary): Likewise.
4532 (c_parser_omp_clause_name): Likewise.
4533 (c_finish_omp_declare_simd): Likewise.
4534 (c_parser_cilk_verify_simd): Likewise.
4535 * c-typeck.c (build_array_ref): Likewise.
4536 (build_function_call_vec): Likewise.
4537 (convert_arguments): Likewise.
4538 (build_compound_expr): Likewise.
4539 (c_finish_return): Likewise.
4540 (c_finish_if_stmt): Likewise.
4541 (c_finish_loop): Likewise.
4542 (build_binary_op): Likewise.
4543
393e8e8b
MP
45442014-01-23 Marek Polacek <polacek@redhat.com>
4545
4546 PR c/59846
4547 * c-typeck.c (parser_build_binary_op): Use location instead of
4548 input_location.
4549 (build_binary_op): Pass location to shorten_compare.
4550
f04dda30
MP
45512014-01-23 Marek Polacek <polacek@redhat.com>
4552
4553 PR c/58346
4554 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4555 an empty aggregate.
4556
789eadcd
MP
45572014-01-23 Marek Polacek <polacek@redhat.com>
4558
4559 PR c/59871
4560 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4561 of a comma expression.
4562 (emit_side_effect_warnings): Likewise.
4563
40f14e9f
BI
45642014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4565
4566 PR c/59825
4567 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4568 function to use walk_tree and moved a lot of its functionality to
4569 expand_array_notations.
4570 (expand_array_notations): New function.
4571
74558dd9
BI
45722014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4573
4574 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4575 attribute an attribute without value.
4576
652fea39
JJ
45772014-01-23 Jakub Jelinek <jakub@redhat.com>
4578
4579 PR middle-end/58809
4580 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4581 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4582
f34f1c87
MP
45832014-01-22 Marek Polacek <polacek@redhat.com>
4584
4585 PR c/59891
4586 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4587 of remove_c_maybe_const_expr on op1 and op2.
4588
241f845a
JJ
45892014-01-15 Jakub Jelinek <jakub@redhat.com>
4590
4591 PR c/58943
4592 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4593 effects, preevaluate rhs using SAVE_EXPR first.
4594
9a74f20c
BI
45952014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4596
4597 PR c++/59631
4598 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4599 statements with if-elseif statements.
4600
96066ce1
MP
46012014-01-06 Marek Polacek <polacek@redhat.com>
4602
4603 PR c/57773
4604 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4605 defined bit-field types only in ISO C.
4606
23a5b65a
RS
46072014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4608
4609 Update copyright years
4610
f9030485
RS
46112014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4612
4613 * c-array-notation.c: Use the standard form for the copyright notice.
4614
41958c28
BI
46152013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4616
4617 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4618 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4619 field in parser is not empty. If not-empty, call the function
4620 c_parser_finish_omp_declare_simd.
4621 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4622 between SIMD-enabled functions and #pragma simd. Added new parameter.
4623 (c_parser_cilk_all_clauses): Modified the usage of the function
4624 c_parser_cilk_clause_vectorlength as mentioned above.
4625 (c_parser_cilk_simd_fn_vector_attrs): New function.
4626 (c_finish_cilk_simd_fn_tokens): Likewise.
4627 (is_cilkplus_vector_p): Likewise.
4628 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4629 "nomask," and "mask" strings in clause name.
4630 (c_parser_omp_all_clauses): Added 3 new case statements:
4631 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4632 PRAGMA_CILK_CLAUSE_NOMASK.
4633 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4634 check for vector attribute and if so call the function
4635 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4636 called the function c_finish_cilk_simd_fn_tokens.
4637 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4638 parser field is non-empty. If so, parse them as you would parse
4639 the omp declare simd pragma.
4640 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4641 Added a check when step is a parameter and flag it as error.
4642 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4643 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4644 pragma_omp_clause.
4645
cef0fd0e
TS
46462013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4647
4648 * c-parser.c (c_parser_omp_parallel): Fix description.
4649
12893402
BI
46502013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4651
4652 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4653 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4654 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4655 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4656
296674db
JM
46572013-12-04 Joseph Myers <joseph@codesourcery.com>
4658
4659 PR c/52023
4660 * c-parser.c (c_parser_alignas_specifier): Use
4661 c_sizeof_or_alignof_type instead of c_alignof.
4662 (c_parser_alignof_expression): Likewise, with min_alignof
4663 parameter depending on alignof spelling used.
4664
edd28054
MP
46652013-12-04 Marek Polacek <polacek@redhat.com>
4666
4667 PR c/54113
4668 * c-decl.c (start_function): Don't warn for missing prototype for
4669 inline functions.
4670
da0fc454
MP
46712013-12-03 Marek Polacek <polacek@redhat.com>
4672
4673 PR c/59351
4674 * c-decl.c (build_compound_literal): Allow compound literals with
4675 empty initial value.
4676
4c2ecab0
JM
46772013-12-02 Joseph Myers <joseph@codesourcery.com>
4678
4679 PR c/58235
4680 * c-typeck.c (build_modify_expr): Diagnose assignment to
4681 expression with array type.
4682
340baef7
JM
46832013-11-29 Joseph Myers <joseph@codesourcery.com>
4684
4685 PR c/42262
4686 * c-typeck.c (process_init_element): Do not treat a string as
4687 initializing a whole array when used with a designator for an
4688 individual element.
4689
6763b9f7
JM
46902013-11-29 Joseph Myers <joseph@codesourcery.com>
4691
4692 PR c/57574
4693 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4694 an inline function following a static declaration.
4695
e7bd1de1
JJ
46962013-11-28 Jakub Jelinek <jakub@redhat.com>
4697
4698 PR c/59310
4699 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4700 to p_name before calling c_parser_omp_teams instead of after.
4701 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4702 argument. Remove unused p_name variable.
4703
0136f8f0
AH
47042013-11-27 Aldy Hernandez <aldyh@redhat.com>
4705 Jakub Jelinek <jakub@redhat.com>
4706
4707 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4708 external_scope is NULL.
4709
241b71bb
TV
47102013-11-27 Tom de Vries <tom@codesourcery.com>
4711 Marc Glisse <marc.glisse@inria.fr>
4712
4713 PR c++/59032
4714 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4715
2fb9a547
AM
47162013-11-22 Andrew MacLeod <amacleod@redhat.com>
4717
4718 * c-typeck.c: Add required include files from gimple.h.
4719
8400e75e
DM
47202013-11-22 David Malcolm <dmalcolm@redhat.com>
4721
4722 * c-decl.c (define_label, shadow_tag_warned)
4723 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4724 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4725 (declspecs_add_type): Remove use of in_system_header macro.
4726 * c-parser.c (c_parser_unary_expression): Likewise.
4727 * c-typeck.c (store_init_value, process_init_element)
4728 (c_start_case): Likewise.
4729
4730 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4731 macro.
4732
4733 * c-parser.c (c_parser_set_source_position_from_token): Remove
4734 reference to in_system_header from comment.
4735
386b1f1f
RS
47362013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4737
4738 * c-decl.c (grokdeclarator): Update comment to refer to
4739 tree_to_[su]hwi rather than tree_low_cst.
4740
ae7e9ddd
RS
47412013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4742
4743 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4744 tree_to_uhwi throughout.
4745
9439e9a1
RS
47462013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4747
4748 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4749 throughout.
4750
9541ffee
RS
47512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4752
4753 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4754 throughout.
4755
c02065fc
AH
47562013-11-15 Aldy Hernandez <aldyh@redhat.com>
4757
4758 * c-parser.c (c_parser_cilk_simd): New.
4759 (c_parser_cilk_verify_simd): New.
4760 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4761 (c_parser_omp_for_loop): Add case for NE_EXPR.
4762 Set c_break_label for CILK_SIMD.
4763 (c_parser_cilk_clause_vectorlength): New.
4764 (c_parser_cilk_clause_linear): New.
4765 (c_parser_cilk_clause_name): New.
4766 (c_parser_cilk_all_clauses): New.
4767 * c-typeck.c (build_unary_op): Pass location argument to
4768 readonly_error.
4769 (build_modify_expr): Same.
4770 (build_asm_expr): Same.
4771 (c_finish_bc_stmt): Error on break/continue in loops.
4772
18f429e2
AM
47732013-11-14 Andrew MacLeod <amacleod@redhat.com>
4774
4775 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4776
d8a2d370
DN
47772013-11-14 Diego Novillo <dnovillo@google.com>
4778
4779 * c-decl.c: Include print-tree.h.
4780 Include stor-layout.h.
4781 Include varasm.h.
4782 Include attribs.h.
4783 Include stringpool.h.
4784 * c-lang.c: Include fold-const.h.
4785 * c-parser.c: Include stringpool.h.
4786 Include attribs.h.
4787 Include stor-layout.h.
4788 Include varasm.h.
4789 Include trans-mem.h.
4790 * c-typeck.c: Include stor-layout.h.
4791 Include trans-mem.h.
4792 Include varasm.h.
4793 Include stmt.h.
4794
38b7bc7f
JM
47952013-11-13 Joseph Myers <joseph@codesourcery.com>
4796
4797 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4798 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4799 __auto_type.
4800 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4801 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4802 RID_AUTO_TYPE.
4803 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4804 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4805 (c_parser_declarator, c_parser_direct_declarator_inner)
4806 (c_parser_parameter_declaration, c_parser_type_name): All callers
4807 changed.
4808 (c_parser_declaration_or_fndef): Handle declarations with type
4809 determined from the initializer.
4810
45b0be94
AM
48112013-11-12 Andrew MacLeod <amacleod@redhat.com>
4812
18f429e2 4813 * c-typeck.c: Include gimplify.h.
45b0be94 4814
582d9b50
JM
48152013-11-12 Joseph Myers <joseph@codesourcery.com>
4816
4817 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4818 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4819 comment.
4820 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4821 or _Thread_local as appropriate in diagnostics.
4822 (build_null_declspecs): Initialize ret->thread_gnu_p.
4823 (declspecs_add_scspec): Handle either __thread or _Thread_local
4824 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4825 pedantic. Do not disallow _Thread_local extern and _Thread_local
4826 static.
4827
267bac10
JM
48282013-11-07 Joseph Myers <joseph@codesourcery.com>
4829 Andrew MacLeod <amacleod@redhat.com>
4830
4831 * c-aux-info.c (gen_type): Handle atomic qualifier.
4832 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4833 qualifiers when compating types.
4834 (shadow_tag_warned): Handle atomic_p in declspecs.
4835 (quals_from_declspecs): Likewise.
4836 (start_decl): Use c_type_promotes_to when promoting argument
4837 types.
4838 (grokdeclarator): Handle _Atomic.
4839 (get_parm_info): Diagnose any qualifier on "void" as only
4840 parameter.
4841 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4842 comparing types. Use c_type_promotes_to when promoting argument
4843 types.
4844 (finish_function): Use c_type_promotes_to when promoting argument
4845 types.
4846 (build_null_declspecs): Handle atomic_p in declspecs.
4847 (declspecs_add_qual): Handle RID_ATOMIC.
4848 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4849 (c_token_starts_declspecs): Handle RID_ATOMIC.
4850 (c_parser_declspecs): Handle atomic type specifiers and
4851 qualifiers.
4852 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4853 from types of expressions with atomic type.
4854 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4855 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4856 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4857 (c_parser_statement_after_labels, c_parser_switch_statement)
4858 (c_parser_for_statement, c_parser_expr_no_commas)
4859 (c_parser_conditional_expression, c_parser_binary_expression)
4860 (c_parser_cast_expression, c_parser_unary_expression)
4861 (c_parser_postfix_expression)
4862 (c_parser_postfix_expression_after_primary, c_parser_expression):
4863 Use convert_lvalue_to_rvalue.
4864 (c_parser_expression_conv, c_parser_expr_list): Document
4865 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4866 (c_parser_objc_synchronized_statement): Use
4867 convert_lvalue_to_rvalue.
4868 (c_parser_objc_selector): Handle RID_ATOMIC.
4869 (c_parser_objc_receiver, c_parser_array_notation): Use
4870 convert_lvalue_to_rvalue.
4871 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4872 _Atomic (type-name).
4873 (struct c_declspecs): Add atomic_p field.
4874 (convert_lvalue_to_rvalue): Declare.
4875 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4876 corresponding atomic types.
4877 (qualify_type): Don't add _Atomic qualifiers from second argument.
4878 (comp_target_types): Do not allow _Atomic mismatches.
4879 (type_lists_compatible_p): Do not remove atomic qualifiers when
4880 comparing types.
4881 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4882 (build_atomic_assign): New functions.
4883 (build_unary_op): Use build_atomic_assign for atomic increment and
4884 decrement.
4885 (build_conditional_expr): Do not treat _Atomic void as a qualified
4886 version of void.
4887 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4888 (find_anonymous_field_with_type, convert_to_anonymous_field)
4889 (convert_for_assignment): Do not remove atomic qualifiers when
4890 comparing types.
4891 (digest_init): Do not accept initialization of arrays of atomic
4892 elements by string constants.
4893 (build_asm_expr): Use convert_lvalue_to_rvalue.
4894 (build_binary_op): Do not treat _Atomic void as a qualified
4895 version of void.
4896
0c249d4b
DD
48972013-11-06 DJ Delorie <dj@redhat.com>
4898
4899 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4900 both explicit and builtin, print the location of the explicit one.
4901
6d7f7e0a
TB
49022013-11-05 Tobias Burnus <burnus@net-b.de>
4903
4904 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4905 c_parser_omp_distribute, c_parser_omp_teams,
4906 c_parser_omp_target, c_parser_omp_declare): Handle
4907 -fopenmp-simd.
4908
b906f4ca
MP
49092013-11-03 Marek Polacek <polacek@redhat.com>
4910
4911 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4912
ee1d5a02
JJ
49132013-11-01 Jakub Jelinek <jakub@redhat.com>
4914
4915 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4916 check_dup_generic at the end, unless remove is true.
4917 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4918 remove = true;.
4919 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4920
5a9785fb
JJ
49212013-10-31 Jakub Jelinek <jakub@redhat.com>
4922
4923 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4924 with decl that is not pointer nor array.
4925
939b37da
BI
49262013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4927
4928 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4929 a spawning function is found.
4930 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4931 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4932 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4933 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4934 case.
4935 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4936 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4937 expr.
4938 (c_finish_return): Added a check to reject _Cilk_spawn in return
4939 expression.
4940 (build_cilk_spawn): New function.
4941 (build_cilk_sync): Likewise.
4942 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4943
d4af74d4
TB
49442013-10-27 Tobias Burnus <burnus@net-b.de>
4945
4946 PR other/33426
4947 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4948 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4949 (c_parser_statement_after_labels): Update calls.
4950
d73749df 49512013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4952
4953 PR other/33426
4954 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4955 Handle PRAGMA_IVDEP.
4956 (c_parser_statement_after_labels): Update call.
4957
f28aa681
MP
49582013-10-24 Marek Polacek <polacek@redhat.com>
4959
4960 * c-parser.c (c_parser_struct_declaration): Add a comment.
4961 (c_parser_declarator): Don't allow _Alignas here.
4962
0645c1a2
AM
49632013-10-17 Andrew MacLeod <amacleod@redhat.com>
4964
4965 * c-parser.c: Include omp-low.h.
4966 * c-typeck.c: Likewise.
4967
568a31f2
MP
49682013-10-17 Marek Polacek <polacek@redhat.com>
4969
4970 PR c/58267
4971 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4972 Document syntax of the array-declarator.
4973 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4974 are not permitted.
4975 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4976 (c_parser_struct_declaration): Likewise.
4977 (c_parser_declarator): Likewise.
4978 (c_parser_direct_declarator_inner): Likewise.
4979 (c_parser_parameter_declaration): Likewise.
4980 (c_parser_type_name): Likewise.
4981
acf0174b
JJ
49822013-10-11 Jakub Jelinek <jakub@redhat.com>
4983
4984 * c-lang.h (current_omp_declare_target_attribute): New extern
4985 decl.
4986 * c-parser.c: Include c-lang.h.
4987 (struct c_parser): Change tokens to c_token *.
4988 Add tokens_buf field. Change tokens_avail type to unsigned int.
4989 (c_parser_consume_token): If parser->tokens isn't
4990 &parser->tokens_buf[0], increment parser->tokens.
4991 (c_parser_consume_pragma): Likewise.
4992 (enum pragma_context): Add pragma_struct and pragma_param.
4993 (c_parser_external_declaration): Adjust
4994 c_parser_declaration_or_fndef caller.
4995 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4996 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4997 Adjust recursive call.
4998 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4999 of pragma_external.
5000 (c_parser_parameter_declaration): Use pragma_param instead of
5001 pragma_external.
5002 (c_parser_compound_statement_nostart, c_parser_label,
5003 c_parser_for_statement): Adjust
5004 c_parser_declaration_or_fndef callers.
5005 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5006 it through to c_parser_conditional_expression.
5007 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5008 pass it through to c_parser_binary_expression. Adjust recursive
5009 call.
5010 (c_parser_binary_expression): Remove prec argument, add
5011 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5012 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5013 binop matches it, use build2 instead of parser_build_binary_op.
5014 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5015 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5016 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5017 Handle pragma_struct and pragma_param the same as pragma_external.
5018 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5019 (c_parser_omp_variable_list): Parse array sections for
5020 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5021 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5022 (c_parser_omp_clause_reduction): Handle user defined reductions.
5023 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5024 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5025 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5026 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5027 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5028 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5029 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5030 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5031 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5032 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5033 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5034 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5035 (c_parser_omp_for_loop): Add CODE argument, pass it through
5036 to c_finish_omp_for. Change last argument to cclauses,
5037 and adjust uses to grab parallel clauses from the array of all
5038 the split clauses. Adjust c_parser_binary_expression,
5039 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5040 (omp_split_clauses): New function.
5041 (c_parser_omp_simd): New function.
5042 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5043 Allow the function to be called also when parsing combined constructs,
5044 and call c_parser_omp_simd when parsing for simd.
5045 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5046 #pragma omp section, require exactly one structured-block instead of
5047 sequence of statements.
5048 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5049 Allow the function to be called also when parsing combined constructs.
5050 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5051 Allow the function to be called also when parsing combined
5052 constructs.
5053 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5054 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5055 c_parser_omp_teams, c_parser_omp_target_data,
5056 c_parser_omp_target_update, c_parser_omp_target,
5057 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5058 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5059 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5060 (c_parser_omp_construct): Add p_name and mask vars. Handle
5061 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5062 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5063 and c_parser_omp_sections callers.
5064 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5065 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5066 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5067 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5068 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5069 OMP_CLAUSE_DEPEND.
5070 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5071 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5072 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5073 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5074 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5075 * c-typeck.c: Include tree-inline.h.
5076 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5077 handle_omp_array_sections_1, handle_omp_array_sections,
5078 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5079 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5080 user defined reductions.
5081 (c_tree_equal): New function.
5082 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5083 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5084 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5085 c_check_omp_declare_reduction_r): New prototypes.
5086 * c-decl.c (current_omp_declare_target_attribute): New variable.
5087 (c_decl_attributes): New function.
5088 (start_decl, start_function): Use it instead of decl_attributes.
5089 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5090 c_omp_reduction_decl, c_omp_reduction_lookup,
5091 c_check_omp_declare_reduction_r): New functions.
5092
0a6c2227
TT
50932013-09-25 Tom Tromey <tromey@redhat.com>
5094
5095 * Make-lang.in (c/gccspec.o): Remove.
5096 (CFLAGS-c/gccspec.o): New variable.
5097 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5098 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5099 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5100
f3bc55f0
TT
51012013-09-25 Tom Tromey <tromey@redhat.com>
5102
5103 * Make-lang.in (c/gccspec.o): Don't use subshell.
5104
a24d975c
MP
51052013-09-18 Marek Polacek <polacek@redhat.com>
5106
5107 PR sanitize/58443
5108 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5109 Remove unnecessary check.
5110
ce6923c5
MP
51112013-09-18 Marek Polacek <polacek@redhat.com>
5112
5113 PR sanitizer/58411
5114 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5115 no_sanitize_undefined attribute.
5116
a1e51df9
KT
51172013-09-13 Kai Tietz <ktietz@redhat.com>
5118
5119 PR target/57848
5120 * c-decl.c (c_builtin_function_ext_scope): Remove
5121 wrong assumption that it is never called on prexisting
5122 symbol.
5123
0af94e6f
JR
51242013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5125
5126 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5127
20059c8b
GDR
51282013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5129
5130 * c-objc-common.c (c_tree_printer): Tidy.
5131
de5a5fa1
MP
51322013-08-30 Marek Polacek <polacek@redhat.com>
5133
5134 * c-typeck.c (build_binary_op): Add division by zero and shift
5135 instrumentation.
5136
2531a1d9 51372013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5138 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5139
6e2bcc98 5140 PR c/35649
2531a1d9
JR
5141 * c-typeck.c (c_common_type): Prefer double_type_node over
5142 other REAL_TYPE types with the same precision.
5143 (convert_arguments): Likewise.
5144
025311c4
GDR
51452013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5146
5147 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5148 (c_initialize_diagnostics): Call a destructor for the early printer.
5149
da6ca2b5
GDR
51502013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5151
5152 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5153 printer initialization.
5154
318cda85 51552013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5156
318cda85
BI
5157 PR c/57490
5158 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5159 check for truth values.
5160 (expand_array_notation_exprs): Added truth values case. Removed an
5161 unwanted else. Added for-loop to walk through subtrees in default
5162 case.
5163
b066401f
GDR
51642013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5165
5166 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5167
fb48aadc
JM
51682013-07-23 Joseph Myers <joseph@codesourcery.com>
5169
5170 * c-parser.c (struct c_generic_association): Fix typo.
5171
433cc7b0
TT
51722013-07-23 Tom Tromey <tromey@redhat.com>
5173 Joseph Myers <joseph@codesourcery.com>
5174
5175 * c-parser.c (struct c_generic_association): New.
5176 (c_generic_association_d): New typedef.
5177 (c_parser_generic_selection): New function.
5178 (c_parser_postfix_expression): Handle RID_GENERIC.
5179
26d40c3d
JM
51802013-07-13 Jason Merrill <jason@redhat.com>
5181
5182 PR c++/57793
5183 * c-decl.c (finish_struct): Check for too-large class.
5184
ecdbd01a 51852013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5186
5187 PR c/57821
5188 * c-typeck.c (set_init_index): When folding, check for index overflow.
5189
1141ed3f
BI
51902013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5191
5192 * c-parser.c (c_parser_array_notation): Removed rejection of array
5193 notations in an array of function pointers.
5194
713b46fa
BI
51952013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5196
5197 * c-array-notation.c (make_triplet_val_inv): New function.
5198 (create_cmp_incr): Likewise.
5199 (create_array_refs): Likewise.
5200 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5201 Also modularized common parts between functions and called the function.
5202 (build_array_notation_expr): Likewise.
5203 (fix_conditional_array_notations_1): Likewise.
5204 (fix_array_notation_expr): Likewise.
5205 (fix_array_notation_call_expr): Likewise.
5206
92f20202
MP
52072013-06-18 Marek Polacek <polacek@redhat.com>
5208
5209 PR c/57630
5210 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5211
73a23b06
BI
52122013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5213
5214 * c-array-notation.c (build_array_notation_expr): Reject array notation
5215 mismatch between LHS and RHS even inside a call_expr. Also, removed
5216 a couple while statements that were dead code.
5217
00b8517d
BI
52182013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5219
5220 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5221 excessive precision expressions in function parameters. Also removed
5222 couple unwanted while statements.
5223
1509bdda
BI
52242013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5225
5226 * c-array-notation.c (expand_array_notation_exprs): Added
5227 ARRAY_NOTATION_REF case.
5228
d60f1706
BI
52292013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5230
5231 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5232 function to c-family/array-notation-common.c.
5233 (is_cilkplus_reduce_builtin): Likewise.
5234 (find_rank): Likewise.
5235 (extract_array_notation_exprs): Likewise.
5236 (replace_array_notations): Likewise.
5237 (find_inv_trees): Likewise.
5238 (replace_inv_trees): Likewise.
5239 (contains_array_notation_expr): Likewise.
5240 (find_correct_array_notation_type): Likewise.
5241 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5242 (struct inv_list): Moved this to c-family/array-notation-common.c.
5243 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5244
6d6efbb3
BI
52452013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5246
5247 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5248 reduction functions outside the for-loop. Added a check if the fundecl
5249 is non-NULL. Finally, removed an unwanted if-statement, and made the
5250 body unconditional.
5251
25c22937
BI
52522013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5253
5254 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5255 condition of the if-statement matches the rank of else-block and then-
5256 block when array notations are used.
5257 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5258 expression after the entire function body is parsed.
5259 (c_parser_expr_no_commas): Delayed creating array notation expressions
5260 to the end of function parsing.
5261 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5262 whole if-statement instead of just the condition.
5263 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5264
edd25645
BI
52652013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5266
5267 PR c/57474
5268 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5269 array to NULL_TREE if they are unused. Also added a check for the
5270 field to be NULL before its fields are used in future.
5271
065ce7f1
RO
52722013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5273
5274 PR bootstrap/57450
5275 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5276 (build_array_notation_expr): Likewise.
5277
36536d79
BI
52782013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5279
5280 * c-typeck.c (build_array_ref): Added a check to see if array's
5281 index is greater than one. If true, then emit an error.
5282 (build_function_call_vec): Exclude error reporting and checking
5283 for builtin array-notation functions.
5284 (convert_arguments): Likewise.
5285 (c_finish_return): Added a check for array notations as a return
5286 expression. If true, then emit an error.
5287 (c_finish_loop): Added a check for array notations in a loop
5288 condition. If true then emit an error.
5289 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5290 (build_binary_op): Added a check for array notation expr inside
5291 op1 and op0. If present, we call another function to find correct
5292 type.
5293 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5294 * c-parser.c (c_parser_compound_statement): Check if array
5295 notation code is used in tree, if so, then transform them into
5296 appropriate C code.
5297 (c_parser_expr_no_commas): Check if array notation is used in LHS
5298 or RHS, if so, then build array notation expression instead of
5299 regular modify.
5300 (c_parser_postfix_expression_after_primary): Added a check for
5301 colon(s) after square braces, if so then handle it like an array
5302 notation. Also, break up array notations in unary op if found.
5303 (c_parser_direct_declarator_inner): Added a check for array
5304 notation.
5305 (c_parser_compound_statement): Added a check for array notation in
5306 a stmt. If one is present, then expand array notation expr.
5307 (c_parser_if_statement): Likewise.
5308 (c_parser_switch_statement): Added a check for array notations in
5309 a switch statement's condition. If true, then output an error.
5310 (c_parser_while_statement): Similarly, but for a while.
5311 (c_parser_do_statement): Similarly, but for a do-while.
5312 (c_parser_for_statement): Similarly, but for a for-loop.
5313 (c_parser_unary_expression): Check if array notation is used in a
5314 pre-increment or pre-decrement expression. If true, then expand
5315 them.
5316 (c_parser_array_notation): New function.
5317 * c-array-notation.c: New file.
5318 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5319
cd192ccc
MS
53202013-05-23 Mike Stump <mikestump@comcast.net>
5321
5322 * c-typeck.c (convert_for_assignment): Handle references to memory
5323 spaces better.
5324
427b248d
JM
53252013-05-16 Jason Merrill <jason@redhat.com>
5326
5327 * Make-lang.in (cc1$(exeext)): Use link mutex.
5328
44d90fe1
PC
53292013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5330
5331 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5332 to simply use OPT_Wpointer_arith.
5333 (build_unary_op): Likewise.
5334
4e7d7b3d
JJ
53352013-04-03 Jakub Jelinek <jakub@redhat.com>
5336
5337 PR c/19449
5338 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5339 argument. If set, or it temporarily for parsing of the first
5340 argument into force_folding_builtin_constant_p.
5341 (c_parser_postfix_expression): Adjust callers.
5342
839b422f
RB
53432013-03-21 Richard Biener <rguenther@suse.de>
5344
5345 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5346 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5347
2ee028f1
MP
53482013-02-12 Marek Polacek <polacek@redhat.com>
5349
5350 PR c/44938
5351 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5352 origtypes to NULL.
5353
8824edff
JJ
53542013-01-24 Jakub Jelinek <jakub@redhat.com>
5355
5356 PR c/56078
5357 * c-typeck.c (set_nonincremental_init_from_string): If
5358 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5359 returned false.
5360 (process_init_element): Likewise.
5361
eadd3d0d
JJ
53622012-12-20 Jakub Jelinek <jakub@redhat.com>
5363
5364 PR c++/55619
5365 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5366 argument, don't call default_function_array_conversion
5367 nor c_fully_fold here.
5368 (c_parser_asm_statement): Adjust callers.
5369 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5370 and outputs here, and call default_function_array_conversion
5371 on inputs that don't need to be addressable.
5372
f8a93a2e
JJ
53732012-12-18 Jakub Jelinek <jakub@redhat.com>
5374
5375 PR c/39464
5376 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5377 warning require that both c_common_unsigned_type as well as
5378 c_common_signed_type is the same for both mvl and mvr types.
5379
9771b263
DN
53802012-11-16 Diego Novillo <dnovillo@google.com>
5381
5382 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5383
5384 * c-common.c: Use new vec API in vec.h.
5385 * c-common.h: Likewise.
5386 * c-gimplify.c: Likewise.
5387 * c-pragma.c: Likewise.
5388 * c-pretty-print.c: Likewise.
5389 * c-pretty-print.h: Likewise.
5390 * c-semantics.c: Likewise.
5391 * c-decl.c: Likewise.
5392 * c-parser.c: Likewise.
5393 * c-tree.h: Likewise.
5394 * c-typeck.c: Likewise.
5395
880661a4
JW
53962012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5397
5398 PR c++/54930
5399 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5400
077d1abe
MLI
54012012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5402
5403 PR c/53066
5404 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5405 shadows a function, unless the variable is a function or a
5406 pointer-to-function.
5407
3a785c97
JJ
54082012-10-12 Jakub Jelinek <jakub@redhat.com>
5409
5410 PR c/54381
5411 * c-parser.c (struct c_tree_loc_pair): Removed.
5412 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5413 add location_t * and tree * arguments, fill in array of 3
5414 sizeof_arg trees and corresponding locs.
5415 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5416 c_parser_expr_list callers.
5417 (c_parser_postfix_expression_after_primary): Likewise. Pass
5418 array of 3 sizeof_arg trees and locs (corresponding to first
5419 3 arguments) to sizeof_pointer_memaccess_warning.
5420
703c8606
LC
54212012-10-09 Lawrence Crowl <crowl@google.com>
5422
5423 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5424 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5425 hash table.
5426
5d9de0d0
PC
54272012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5428
5429 PR c++/54194
5430 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5431 call.
5432
a212e43f
MG
54332012-10-09 Marc Glisse <marc.glisse@inria.fr>
5434
5435 PR c++/54427
5436 * c-typeck.c: Include c-common.h.
5437 (enum stv_conv): Moved to c-common.h.
5438 (scalar_to_vector): Moved to c-common.c.
5439 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5440 * Make-lang.in: c-typeck.c depends on c-common.h.
5441
3b78de56
AC
54422012-10-04 Arnaud Charlet <charlet@adacore.com>
5443
5444 * c-decl.c (c_write_global_declarations): Fix handling of
5445 -fdump-ada-spec*.
5446
78c60e3d
SS
54472012-09-30 Sharad Singhai <singhai@google.com>
5448
5449 * c-decl.c (c_write_global_declarations): Use a different method
5450 to determine if the dump has ben initialized.
5451
9f33203d
JM
54522012-09-14 Joseph Myers <joseph@codesourcery.com>
5453
5454 PR c/54552
5455 * c-typeck.c (c_cast_expr): When casting to a type requiring
5456 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5457 c_fully_fold first.
5458
a27d595d
JM
54592012-09-14 Joseph Myers <joseph@codesourcery.com>
5460
5461 PR c/54103
5462 * c-typeck.c (build_unary_op): Pass original argument of
5463 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5464 any C_MAYBE_CONST_EXPR, if it has integer operands.
5465 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5466 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5467 to c_objc_common_truthvalue_conversion, then remove any
5468 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5469 c_objc_common_truthvalue_conversion not
5470 c_common_truthvalue_conversion.
5471 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5472 call note_integer_operands for arguments with integer operands
5473 that are not integer constants.
5474
9feb29df
JJ
54752012-09-13 Jakub Jelinek <jakub@redhat.com>
5476
5477 PR c/54559
5478 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5479 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5480
d409320c
JJ
54812012-08-31 Jakub Jelinek <jakub@redhat.com>
5482
5483 PR c/54428
5484 * c-convert.c (convert): Don't call fold_convert_loc if
5485 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5486 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5487 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5488
6265d07c
JJ
54892012-08-24 Jakub Jelinek <jakub@redhat.com>
5490
5491 PR c/54355
5492 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5493 for nested and empty_ok arguments in the call to
5494 c_parser_declaration_or_fndef.
5495
1a4049e7
JJ
54962012-08-17 Jakub Jelinek <jakub@redhat.com>
5497
5498 * c-tree.h (c_last_sizeof_arg): Declare.
5499 * c-parser.c (struct c_tree_loc_pair): New type.
5500 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5501 non-NULL.
5502 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5503 (c_parser_postfix_expression_after_primary): Likewise. Call
5504 sizeof_pointer_memaccess_warning if needed.
5505 (sizeof_ptr_memacc_comptypes): New function.
5506 * c-typeck.c (c_last_sizeof_arg): New global variable.
5507 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5508
0229aee9
UB
55092012-07-24 Uros Bizjak <ubizjak@gmail.com>
5510
5511 * c-lang.h (lang_decl): Add variable_size GTY option.
5512
7ee2468b
SB
55132012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5514
5515 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5516 * Make-lang.in: Fix dependencies.
5517
d4a10d0a
SB
55182012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5519
5520 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5521 and add language Makefile hooks.
5522 * config-lang.in: New file.
5523 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5524 add the required "normal" config-lang.in rules.
5525 * c-lang.h: Moved from gcc/ to here.
5526 * c-tree.h: Likewise.
5527 * c-objc-common.c: Likewise.
5528 * c-objc-common.h: Likewise.
5529 * c-typeck.c: Likewise.
5530 * c-convert.c: Likewise.
5531 * c-lang.c: Likewise.
5532 * c-aux-info.c: Likewise.
5533 * c-errors.c: Likewise.
5534 * gccspec.c: Likewise.
5535 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5536 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5537\f
85ec4feb 5538Copyright (C) 2012-2018 Free Software Foundation, Inc.
d4a10d0a
SB
5539
5540Copying and distribution of this file, with or without modification,
5541are permitted in any medium without royalty provided the copyright
5542notice and this notice are preserved.