]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
Less verbose fix-it hints for missing header files (PR 87091)
[gcc.git] / gcc / c / ChangeLog
CommitLineData
85204e23
DM
12018-08-27 David Malcolm <dmalcolm@redhat.com>
2
3 PR 87091
4 * c-decl.c (implicitly_declare): Update call to
5 maybe_add_include_fixit to suggest overriding the location, as it
6 is for a note.
7 * c-objc-common.c (c_tree_printer): Update for conversion of
8 show_caret_p to a tri-state.
9
3d78e008
ML
102018-08-27 Martin Liska <mliska@suse.cz>
11
12 * c-decl.c (locate_old_decl): Use new function
13 fndecl_built_in_p and remove check for FUNCTION_DECL if
14 possible.
15 (diagnose_mismatched_decls): Likewise.
16 (merge_decls): Likewise.
17 (warn_if_shadowing): Likewise.
18 (pushdecl): Likewise.
19 (implicitly_declare): Likewise.
20 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
21 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
22 * c-typeck.c (build_function_call_vec): Likewise.
23 (convert_arguments): Likewise.
24
097f82ec
DM
252018-08-20 David Malcolm <dmalcolm@redhat.com>
26
27 PR other/84889
28 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
29 (diagnose_mismatched_decls): Likewise, in various places.
30 (warn_if_shadowing): Likewise.
31 (implicit_decl_warning): Likewise.
32 (implicitly_declare): Likewise.
33 (undeclared_variable): Likewise.
34 (declare_label): Likewise.
35 (grokdeclarator): Likewise.
36 (start_function): Likewise.
37 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
38 (c_parser_parameter_declaration): Likewise.
39 (c_parser_binary_expression): Likewise.
40 * c-typeck.c (c_expr_sizeof_expr): Likewise.
41 (parser_build_binary_op): Likewise.
42 (build_unary_op): Likewise.
43 (error_init): Likewise.
44 (pedwarn_init): Likewise.
45 (warning_init): Likewise.
46 (convert_for_assignment): Likewise.
47
96e6ae57
DM
482018-08-15 David Malcolm <dmalcolm@redhat.com>
49
50 * c-objc-common.c: Include "gcc-rich-location.h".
51 (c_tree_printer): Move implemenation of '%T' to...
52 (print_type): ...this new function.
53 (range_label_for_type_mismatch::get_text): New function.
54 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
55 range for the various ic_argpass cases.
56 (class maybe_range_label_for_tree_type_mismatch): New class.
57 (build_binary_op): Use it when calling binary_op_error.
58
0cd020ae
PK
592018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
60
61 * c-decl.c (start_decl): Do not warn if variables is named as main
62 and is a local variable.
63
72733314
IS
642018-08-15 Iain Sandoe <iain@sandoe.co.uk>
65
66 PR c/19315
67 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
68 objects of unknown size.
69
23aa9f7c
MS
702018-08-13 Martin Sebor <msebor@redhat.com>
71
72 PR tree-optimization/71625
73 * c-parser.c (c_parser_declaration_or_fndef): Call
74 braced_list_to_string.
75
e5e7e50d
BH
762018-08-03 Bogdan Harjoc <harjoc@gmail.com>
77
78 PR c/86690
79 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
80 errors.
81
8a45b051
MS
822018-08-01 Martin Sebor <msebor@redhat.com>
83
84 PR tree-optimization/86650
85 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
86 and TREE_BLOCK (t) from within percent_K_format to this callsite.
87
5922dcb5
JJ
882018-08-01 Jakub Jelinek <jakub@redhat.com>
89
90 PR c/85704
91 * c-typeck.c (init_field_decl_cmp): New function.
92 (output_pending_init_elements): Use it for field comparisons
93 instead of pure bit_position comparisons.
94
9b452033
JJ
952018-07-12 Jakub Jelinek <jakub@redhat.com>
96
97 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
98 type here, instead add "omp declare target implicit" attribute.
99 (finish_decl): Diagnose vars without mappable type here.
100
829c6349
CLT
1012018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
102 Thomas Schwinge <thomas@codesourcery.com>
103 Cesar Philippidis <cesar@codesourcery.com>
104
105 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
106 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
107 to their non-present_or_* counterparts. Make 'self' an alias to
108 PRAGMA_OACC_CLAUSE_HOST.
109 (c_parser_oacc_data_clause): Update GOMP mappings for
110 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
111 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
112 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
113 Remove support for present_or_* clauses.
114 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
115 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
116 (OACC_DECLARE_CLAUSE_MASK): Likewise.
117 (OACC_DATA_CLAUSE_MASK): Likewise.
118 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
119 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
120 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
121 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
122 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
123
e197e64e
KV
1242018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
125
126 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
127 * gimple-parser.c (c_parser_gimple_statement): Likewise.
128 (c_parser_gimple_unary_expression): Likewise.
129
487f2f61
JJ
1302018-06-15 Jakub Jelinek <jakub@redhat.com>
131
132 PR c/86093
133 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
134 before doing POINTER_DIFF_EXPR.
135
e4d44a37
MP
1362018-06-07 Marek Polacek <polacek@redhat.com>
137
138 PR c/85318
139 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
140 for loop initial declarations.
141
b67b9225
DP
1422018-05-30 David Pagan <dave.pagan@oracle.com>
143
144 PR c/55976
145 * c-decl.c (grokdeclarator): Update check for return type warnings.
146 (start_function): Likewise.
147 (finish_function): Likewise.
148 * c-typeck.c (c_finish_return): Update check for return type warnings.
149 Pass OPT_Wreturn_type to pedwarn when appropriate.
150
c566cc9f
RS
1512018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
152
153 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
154 __FMA_EXPR handlng.
155
e4f81565
RS
1562018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
157
158 * gimple-parser.c: Include internal-fn.h.
159 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
160 (c_parser_gimple_call_internal): New function.
161 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
162 Fix typos in comment.
163
79e7b1fe
JJ
1642018-05-10 Jakub Jelinek <jakub@redhat.com>
165
166 PR c++/85662
167 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
168 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
169 fold_convert_loc.
170 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
171 fold_offsetof_1, pass argtype as TYPE to it and drop the
172 fold_convert_loc.
173
f7584c81
DP
1742018-05-02 David Pagan <dave.pagan@oracle.com>
175
176 PR c/30552
177 * c-decl.c (old_style_parameter_scope): New function.
178 * c-parser.c (c_parser_postfix_expression): Check for statement
179 expressions in old-style function parameter list declarations.
180 * c-parser.h (old_style_parameter_scope): New extern declaration.
181
b33a0cb3
JJ
1822018-04-25 Jakub Jelinek <jakub@redhat.com>
183
184 PR sanitizer/84307
185 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
186 it is not TREE_STATIC.
187 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
188 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
189 its COMPOUND_LITERAL_EXPR_DECL.
190
c5c5822a
JM
1912018-03-21 Joseph Myers <joseph@codesourcery.com>
192
193 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
194 where all functions return the same _FloatN or _FloatNx type,
195 treat integer types as _Float64 instead of double.
196
aa1c9429
JJ
1972018-03-21 Jakub Jelinek <jakub@redhat.com>
198
199 PR c/84999
200 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
201 building vector comparison, diagnose it and return error_mark_node.
202
9bb45a95
JJ
2032018-03-15 Jakub Jelinek <jakub@redhat.com>
204
205 PR c/84853
206 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
207 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
208 INTEGER_TYPE element type.
209
ada6bad9
DP
2102018-03-13 David Pagan <dave.pagan@oracle.com>
211
212 PR c/46921
213 * c-typeck.c (output_init_element): Ensure field initializer
214 expression is always evaluated if there are side effects.
215
849bbdb9
JJ
2162018-03-06 Jakub Jelinek <jakub@redhat.com>
217
218 PR c/84721
219 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
220 !building_stmt_list_p ().
221
d74641bd
RS
2222018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
223
224 PR c/84305
225 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
226 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
227 and include the BIND_EXPR in the list of things that need to be
228 pre-evaluated.
229
0444aa9c
NS
2302018-02-09 Nathan Sidwell <nathan@acm.org>
231
232 PR c/84293
233 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
234 to strict_aliasing_warning.
235
7c30b12a
PC
2362018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
237
238 * c-typeck.c (really_start_incremental_init, push_init_level,
239 set_nonincremental_init, output_init_element, process_init_element):
240 Use DECL_UNNAMED_BIT_FIELD.
241
2be4dfcb
MP
2422018-01-31 Marek Polacek <polacek@redhat.com>
243
244 PR c/81779
245 * c-parser.c (c_parser_compound_statement_nostart): Call
246 expansion_point_location_if_in_system_header.
247
bb9869d5
DM
2482018-01-17 David Malcolm <dmalcolm@redhat.com>
249
250 PR c++/83814
251 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
252 the C part.
253
b4923738
JJ
2542018-01-13 Jakub Jelinek <jakub@redhat.com>
255
256 PR c/83801
257 * c-tree.h (decl_constant_value_1): Add a bool argument.
258 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
259 returning a CONSTRUCTOR if it is true. Use error_operand_p.
260 (decl_constant_value): Adjust caller.
261 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
262 decl_constant_value_1 as IN_INIT. Otherwise, punt if
263 decl_constant_value returns initializer that has BLKmode or
264 array type.
265 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
266
928686b1
RS
2672018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
268 Alan Hayward <alan.hayward@arm.com>
269 David Sherwood <david.sherwood@arm.com>
270
271 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
272 TYPE_VECTOR_SUBPARTS.
273
85ec4feb
JJ
2742018-01-03 Jakub Jelinek <jakub@redhat.com>
275
276 Update copyright years.
277
913884f7
JJ
2782018-01-01 Jakub Jelinek <jakub@redhat.com>
279
280 PR c/83595
281 * c-parser.c (c_parser_braced_init, c_parser_initelt,
282 c_parser_conditional_expression, c_parser_cast_expression,
283 c_parser_sizeof_expression, c_parser_alignof_expression,
284 c_parser_postfix_expression, c_parser_omp_declare_reduction,
285 c_parser_transaction_expression): Use set_error () method instead
286 of setting value member to error_mark_node.
287
c6cfa2bf
MM
2882017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
289
290 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
291 and _Float<N>X built-in functions.
292
11d29d63
JJ
2932017-12-22 Jakub Jelinek <jakub@redhat.com>
294
14ec014e
JJ
295 PR debug/83550
296 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
297 TYPE_STUB_DECL and call rest_of_type_compilation before processing
298 incomplete vars rather than after it.
299
11d29d63
JJ
300 PR debug/83547
301 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
302 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
303 and consider empty ones if there are no other stmts. For
304 -Wunused-value walk all statements before the one only followed by
305 DEBUG_BEGIN_STMTs.
306
170a8bd6
EB
3072017-12-22 Mike Stump <mikestump@comcast.net>
308 Eric Botcazou <ebotcazou@adacore.com>
309
310 * c-parser.c (c_parser_while_statement): Add unroll parameter and
311 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
312 (c_parser_do_statement): Likewise.
313 (c_parser_for_statement): Likewise.
314 (c_parser_statement_after_labels): Adjust calls to above.
315 (c_parse_pragma_ivdep): New static function.
316 (c_parser_pragma_unroll): Likewise.
317 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
318 <PRAGMA_UNROLL>: New case.
319
01512446
JJ
3202017-12-19 Jakub Jelinek <jakub@redhat.com>
321
322 * c-typeck.c (comptypes_internal, function_types_compatible_p,
323 perform_integral_promotions, digest_init): Replace Yoda conditions
324 with typical order conditions.
325 * c-decl.c (check_bitfield_type_and_width): Likewise.
326
c65e18d3
BE
3272017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
328
329 * c-typeck.c (c_safe_arg_type_equiv_p,
330 c_safe_function_type_cast_p): New function.
331 (build_c_cast): Implement -Wcast-function-type.
332
b7280579
RB
3332017-12-14 Richard Biener <rguenther@suse.de>
334
335 PR c/83415
336 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
337 like REALPART_EXPR for the behavior of whether its operand
338 is an lvalue.
339
49e6a6c0
MP
3402017-12-12 Marek Polacek <polacek@redhat.com>
341
342 PR c/82679
343 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
344
96a95ac1
AO
3452017-12-12 Alexandre Oliva <aoliva@redhat.com>
346
347 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
348 * c-parser.c (add_debug_begin_stmt): New.
349 (c_parser_declaration_or_fndef): Call it.
350 (c_parser_compound_statement_nostart): Likewise.
351 (c_parser_statement_after_labels): Likewise.
352 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
353
4b2b493f
JM
3542017-12-07 Joseph Myers <joseph@codesourcery.com>
355
356 * c-decl.c (build_compound_literal): Add parameter alignas_align
357 and set alignment of decl if nonzero.
358 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
359 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
360 qualifier.
361 (c_parser_struct_declaration): Update syntax comment.
362 (c_parser_type_name): Add alignas_ok argument and pass it to
363 c_parser_declspecs.
364 (c_parser_cast_expression): Pass true to c_parser_type_name and
365 give error if a cast used an _Alignas specifier.
366 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
367 give error if sizeof (type-name) used an _Alignas specifier.
368 (c_parser_alignof_expression): Pass true to c_parser_type_name and
369 give error if _Alignof (type-name) used an _Alignas specifier.
370 (c_parser_postfix_expression_after_paren_type): Check specified
371 alignment for a compound literal and pass it to
372 build_compound_literal.
373 * c-parser.h (c_parser_type_name): Update prototype.
374 * c-tree.h (build_compound_literal): Update prototype.
375
5d9ae53d
MS
3762017-12-07 Martin Sebor <msebor@redhat.com>
377
378 PR c/81544
379 * c-decl.c (c_decl_attributes): Look up existing declaration and
380 pass it to decl_attributes.
381
c79144f8
DM
3822017-12-06 David Malcolm <dmalcolm@redhat.com>
383
384 PR c/83236
385 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
386 reserved for use by the implementation.
387
613bc14f
DM
3882017-12-06 David Malcolm <dmalcolm@redhat.com>
389
390 * c-decl.c: Include "c-family/c-spellcheck.h".
391
05abad4c
ML
3922017-12-05 Martin Liska <mliska@suse.cz>
393 Jakub Jelinek <jakub@redhat.com>
394
395 * c-typeck.c (pointer_diff): Add new argument and instrument
396 pointer subtraction.
397 (build_binary_op): Similar for pointer comparison.
398
cc6534d4
JJ
3992017-12-01 Jakub Jelinek <jakub@redhat.com>
400
65791f42
JJ
401 PR c/79153
402 * c-parser.c: Include tree-iterator.h.
403 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
404 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
405 on it.
406
cc6534d4
JJ
407 PR c/83222
408 * c-tree.h (decl_constant_value_1): Declare.
409 * c-typeck.c (decl_constant_value_1): New function.
410 (decl_constant_value): Use it.
411 * c-fold.c (c_fully_fold_internal): If in_init, use
412 decl_constant_value_1 instead of decl_constant_value.
413
5de73c05
JJ
4142017-11-30 Jakub Jelinek <jakub@redhat.com>
415
416 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
417
058f0b9e
JJ
4182017-11-28 Jakub Jelinek <jakub@redhat.com>
419
420 PR sanitizer/81275
421 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
422 c_switch_covers_all_cases_p returns true.
423
5e9d6aa4
JK
4242017-11-28 Julia Koval <julia.koval@intel.com>
425 Sebastian Peryt <sebastian.peryt@intel.com>
426
427 * Make-lang.in (c/c-array-notation.o): Remove.
428 * c-array-notation.c: Delete.
429 * c-decl.c: Remove cilkplus condition.
430 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
431 c_parser_cilk_verify_simd, c_parser_array_notation,
432 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
433 c_parser_cilk_simd_fn_vector_attrs,
434 c_finish_cilk_simd_fn_tokens): Delete.
435 (c_parser_declaration_or_fndef): Remove cilkplus condition.
436 (c_parser_direct_declarator_inner): Ditto.
437 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
438 (c_parser_attributes, c_parser_compound_statement,
439 c_parser_statement_after_labels, c_parser_if_statement,
440 c_parser_switch_statement, c_parser_while_statement,
441 c_parser_do_statement, c_parser_for_statement,
442 c_parser_unary_expression, c_parser_postfix_expression,
443 c_parser_postfix_expression_after_primary,
444 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
445 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
446 support.
447 * c-typeck.c (build_array_ref, build_function_call_vec,
448 convert_arguments,
449 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
450 c_finish_loop, build_binary_op): Remove cilkplus support.
451
9e851845
JJ
4522017-11-28 Jakub Jelinek <jakub@redhat.com>
453
454 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
455 of build3.
456
8c7dbea9
BK
4572017-11-14 Boris Kolpackov <boris@codesynthesis.com>
458
459 * Make-lang.in (c.install-plugin): Install backend import library.
460
41521dee
JJ
4612017-11-23 Jakub Jelinek <jakub@redhat.com>
462
463 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
464 pragma_stmt context.
465
ac9effed
EB
4662017-11-23 Mike Stump <mikestump@comcast.net>
467 Eric Botcazou <ebotcazou@adacore.com>
468
469 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
470 ANNOTATE_EXPR.
471 (c_parser_do_statement): Likewise.
472 (c_parser_for_statement): Likewise.
473
ce95abc4
DM
4742017-11-22 David Malcolm <dmalcolm@redhat.com>
475
476 PR c++/62170
477 * c-objc-common.c (c_tree_printer): Convert penultimate param from
478 bool to bool *. Within '%T' handling, if showing an "aka", use
479 "quoted" param to add appropriate quoting.
480
974aedcc
MP
4812017-11-22 Marek Polacek <polacek@redhat.com>
482
483 PR c++/60336
484 PR middle-end/67239
485 PR target/68355
486 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
487
d4300cc6
DM
4882017-11-21 David Malcolm <dmalcolm@redhat.com>
489
490 PR c/83056
491 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
492 earlier failed lookups.
493
1af4ebf5
MG
4942017-11-21 Marc Glisse <marc.glisse@inria.fr>
495
496 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
497 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
498
26edace6
DM
4992017-11-20 David Malcolm <dmalcolm@redhat.com>
500
501 PR c/81404
502 * c-decl.c: Include "c-family/known-headers.h".
503 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
504 to known-headers.cc.
505 (class suggest_missing_header): Move to known-header.h.
506 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
507 than get_c_name_hint.
508
b1212255
DM
5092017-11-20 David Malcolm <dmalcolm@redhat.com>
510
511 * c-decl.c (get_c_name_hint): New function.
512 (class suggest_missing_header): New class.
513 (lookup_name_fuzzy): Call get_c_name_hint and use it to
514 suggest missing headers to the user.
515
6c7a259b
DM
5162017-11-20 David Malcolm <dmalcolm@redhat.com>
517
518 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
519 Include "c-family/name-hint.h"
520 (implicit_decl_warning): Convert "hint" from
521 const char * to name_hint. Pass location to
522 lookup_name_fuzzy. Suppress any deferred diagnostic if the
523 warning was not printed.
524 (undeclared_variable): Likewise for "guessed_id".
525 (lookup_name_fuzzy): Convert return type from const char *
526 to name_hint. Add location_t param.
527 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
528 Include "c-family/name-hint.h"
529 (c_parser_declaration_or_fndef): Convert "hint" from
530 const char * to name_hint. Pass location to lookup_name_fuzzy.
531 (c_parser_parameter_declaration): Likewise.
532
f9c59f7e
JJ
5332017-11-19 Jakub Jelinek <jakub@redhat.com>
534
535 PR c/66618
536 PR c/69960
537 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
538 where needed.
539 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
540 handle_omp_array_sections): Likewise.
541 (digest_init): Don't call decl_constant_value_for_optimization.
542 * c-tree.h (decl_constant_value_for_optimization): Removed.
543 * c-fold.c (c_fold_array_ref): New function.
544 (c_fully_fold_internal): Add LVAL argument, propagate it through
545 recursive calls. For VAR_P call decl_constant_value and
546 unshare if not LVAL and either optimizing or IN_INIT. Remove
547 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
548 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
549 (c_fully_fold): Add LVAL argument, pass it through to
550 c_fully_fold_internal.
551 (decl_constant_value_for_optimization): Removed.
552
3ca0dc60
JM
5532017-11-15 Joseph Myers <joseph@codesourcery.com>
554
555 PR c/81156
556 * c-parser.c (check_tgmath_function): New function.
557 (enum tgmath_parm_kind): New enum.
558 (c_parser_postfix_expression): Handle __builtin_tgmath.
559
64a5912c
DM
5602017-10-31 David Malcolm <dmalcolm@redhat.com>
561
562 * c-decl.c (implicit_decl_warning): Update for renaming of
563 pedwarn_at_rich_loc and warning_at_rich_loc.
564 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
565 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
566 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
567 (c_parser_struct_or_union_specifier): Likewise for renaming of
568 pedwarn_at_rich_loc.
569 (c_parser_parameter_declaration): Likewise for renaming of
570 error_at_rich_loc.
571 * c-typeck.c (build_component_ref): Likewise.
572 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
573 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
574 (set_init_label): Likewise for renaming of error_at_rich_loc.
575
c1136864
RB
5762017-10-30 Richard Biener <rguenther@suse.de>
577
578 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
579 stmts.
580
ee5fd23a
MM
5812017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
582
583 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
584 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
585
1a59ccf2
DM
5862017-10-25 David Malcolm <dmalcolm@redhat.com>
587
588 PR c/7356
589 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
590 semicolons.
591
bc1a75dd
JJ
5922017-10-25 Jakub Jelinek <jakub@redhat.com>
593
594 PR libstdc++/81706
595 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
596 newdecl to corresponding __builtin_ if any.
597
ff1ff960
PC
5982017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
599
600 PR c++/82466
601 * c-decl.c (diagnose_mismatched_decls): Use
602 OPT_Wbuiltin_declaration_mismatch.
603
62e1c678
DM
6042017-10-12 David Malcolm <dmalcolm@redhat.com>
605
606 * c-parser.c (c_parser_require): Add "type_is_unique" param and
607 use it to guard calls to maybe_suggest_missing_token_insertion.
608 (c_parser_parms_list_declarator): Override default value of new
609 "type_is_unique" param to c_parser_require.
610 (c_parser_asm_statement): Likewise.
611 * c-parser.h (c_parser_require): Add "type_is_unique" param,
612 defaulting to true.
613
a92f6726
NS
6142017-10-11 Nathan Sidwell <nathan@acm.org>
615
616 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
617
8e6cdc90
RS
6182017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
619
620 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
621 operating on trees as wide_ints.
622 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
623 (c_tree_equal): Likewise.
624
8139a48e
DM
6252017-10-04 David Malcolm <dmalcolm@redhat.com>
626
627 * c-decl.c (push_parm_decl): Store c_parm's location into the
628 PARAM_DECL.
629 (build_c_parm): Add "loc" param and store it within the c_parm.
630 * c-parser.c (struct c_parser): Add "last_token_location" field.
631 (c_parser_consume_token): Store location of the token into the
632 new field.
633 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
634 when handling a FUNCTION_DECL, if it doesn't already have them.
635 (c_parser_parameter_declaration): Generate a location for the
636 parameter, and pass it to the call to build_c_parm.
637 * c-tree.h (struct c_parm): Add field "loc".
638 (build_c_parm): Add location_t param.
639 * c-typeck.c (get_fndecl_argument_location): New function.
640 (inform_for_arg): New function.
641 (convert_for_assignment): Use inform_for_arg when dealing with
642 ic_argpass.
643
2a389958
JJ
6442017-09-29 Jakub Jelinek <jakub@redhat.com>
645
7d386d45
JJ
646 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
647 width is non-NULL.
648 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
649 don't SET_DECL_C_BIT_FIELD here.
650
2a389958
JJ
651 PR c/82340
652 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
653 instead of trying to set just TREE_READONLY manually.
654
ebc6a85e
TV
6552017-09-16 Tom de Vries <tom@codesourcery.com>
656
657 PR c/81875
658 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
659 cond itself.
660
bb75facd
JM
6612017-09-15 Joseph Myers <joseph@codesourcery.com>
662
663 PR c/82071
664 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
665 for C11.
666 (build_conditional_expr): For C11, generate result with excess
667 precision when one argument is an integer and the other is of a
668 type using excess precision.
669
1d933576
BE
6702017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
671
672 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
673
267bbb6f
MP
6742017-09-13 Marek Polacek <polacek@redhat.com>
675
676 PR c/82167
677 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
678 than expr.original_type.
679
6836632e
NS
6802017-09-12 Nathan Sidwell <nathan@acm.org>
681
682 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
683 resort_sorted_fields): Moved from c-family/c-common.c.
684 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
685
e035be33
JM
6862017-09-01 Joseph Myers <joseph@codesourcery.com>
687
688 PR c/82071
689 * c-typeck.c (build_atomic_assign): Handle argument with excess
690 precision. Ensure any EXCESS_PRECISION_EXPR is present in
691 argument passed to build_binary_op and convert_for_assignment but
692 not for call to c_fully_fold.
693 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
694 Ensure build_binary_op is called with argument with original
695 semantic type. Avoid calling c_fully_fold with an
696 EXCESS_PRECISION_EXPR from build_binary_op.
697
d2e05fcb
JJ
6982017-09-01 Jakub Jelinek <jakub@redhat.com>
699
700 PR c/81887
701 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
702
b397965c
RS
7032017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
704 Alan Hayward <alan.hayward@arm.com>
705 David Sherwood <david.sherwood@arm.com>
706
707 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
708 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
709 m1 and m2 to the signed equivalent of a fixed-point
710 SCALAR_TYPE_MODE.
711
14e18d71
DM
7122017-08-24 David Malcolm <dmalcolm@redhat.com>
713
714 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
715 than CAN_HAVE_LOCATION_P when determining whether to use the
716 location_t value within "value".
717
7f204c0f
DM
7182017-08-21 David Malcolm <dmalcolm@redhat.com>
719
720 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
721 rather than peeking the location of the first token.
722 * c-tree.h (c_expr::get_location): New method.
723
2f687306
DM
7242017-08-21 David Malcolm <dmalcolm@redhat.com>
725
726 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
727 to check_function_arguments.
728
3e7b80d7
MP
7292017-08-18 Marek Polacek <polacek@redhat.com>
730
731 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
732 commentary.
733
00aa1fa2
L
7342017-08-18 H.J. Lu <hongjiu.lu@intel.com>
735
736 PR c/53037
737 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
738 (check_bitfield_type_and_width): Don't allow bit-field with
739 warn_if_not_aligned type.
740
da67acb9
MS
7412017-08-14 Martin Sebor <msebor@redhat.com>
742
743 PR c/81117
744 * c-objc-common.c (c_objc_common_init): Handle 'G'.
745
bb85aa74
MP
7462017-08-11 Marek Polacek <polacek@redhat.com>
747
748 PR c/81795
749 * c-decl.c (pushtag): Only print inform if the warning was printed.
750 (grokdeclarator): Likewise.
751
32129a17
DM
7522017-08-10 David Malcolm <dmalcolm@redhat.com>
753
754 * c-parser.c (c_parser_error): Rename to...
755 (c_parser_error_richloc): ...this, making static, and adding
756 "richloc" parameter, passing it to the c_parse_error call,
757 rather than calling c_parser_set_source_position_from_token.
758 (c_parser_error): Reintroduce, reimplementing in terms of the
759 above, converting return type from void to bool.
760 (class token_pair): New class.
761 (struct matching_paren_traits): New struct.
762 (matching_parens): New typedef.
763 (struct matching_brace_traits): New struct.
764 (matching_braces): New typedef.
765 (get_matching_symbol): New function.
766 (c_parser_require): Add param MATCHING_LOCATION, using it to
767 highlight matching "opening" tokens for missing "closing" tokens.
768 (c_parser_skip_until_found): Likewise.
769 (c_parser_static_assert_declaration_no_semi): Convert explicit
770 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
771 class matching_parens, so that the pertinent open parenthesis is
772 highlighted when there are problems locating the close
773 parenthesis.
774 (c_parser_struct_or_union_specifier): Likewise.
775 (c_parser_typeof_specifier): Likewise.
776 (c_parser_alignas_specifier): Likewise.
777 (c_parser_simple_asm_expr): Likewise.
778 (c_parser_braced_init): Likewise, for matching_braces.
779 (c_parser_paren_condition): Likewise, for matching_parens.
780 (c_parser_switch_statement): Likewise.
781 (c_parser_for_statement): Likewise.
782 (c_parser_asm_statement): Likewise.
783 (c_parser_asm_operands): Likewise.
784 (c_parser_cast_expression): Likewise.
785 (c_parser_sizeof_expression): Likewise.
786 (c_parser_alignof_expression): Likewise.
787 (c_parser_generic_selection): Likewise.
788 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
789 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
790 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
791 In case CPP_OPEN_PAREN, pass loc_open_paren to the
792 c_parser_skip_until_found call.
793 (c_parser_objc_class_definition): Use class matching_parens as
794 above.
795 (c_parser_objc_method_decl): Likewise.
796 (c_parser_objc_try_catch_finally_statement): Likewise.
797 (c_parser_objc_synchronized_statement): Likewise.
798 (c_parser_objc_at_property_declaration): Likewise.
799 (c_parser_oacc_wait_list): Likewise.
800 (c_parser_omp_var_list_parens): Likewise.
801 (c_parser_omp_clause_collapse): Likewise.
802 (c_parser_omp_clause_default): Likewise.
803 (c_parser_omp_clause_if): Likewise.
804 (c_parser_omp_clause_num_threads): Likewise.
805 (c_parser_omp_clause_num_tasks): Likewise.
806 (c_parser_omp_clause_grainsize): Likewise.
807 (c_parser_omp_clause_priority): Likewise.
808 (c_parser_omp_clause_hint): Likewise.
809 (c_parser_omp_clause_defaultmap): Likewise.
810 (c_parser_oacc_single_int_clause): Likewise.
811 (c_parser_omp_clause_ordered): Likewise.
812 (c_parser_omp_clause_reduction): Likewise.
813 (c_parser_omp_clause_schedule): Likewise.
814 (c_parser_omp_clause_num_teams): Likewise.
815 (c_parser_omp_clause_thread_limit): Likewise.
816 (c_parser_omp_clause_aligned): Likewise.
817 (c_parser_omp_clause_linear): Likewise.
818 (c_parser_omp_clause_safelen): Likewise.
819 (c_parser_omp_clause_simdlen): Likewise.
820 (c_parser_omp_clause_depend): Likewise.
821 (c_parser_omp_clause_map): Likewise.
822 (c_parser_omp_clause_device): Likewise.
823 (c_parser_omp_clause_dist_schedule): Likewise.
824 (c_parser_omp_clause_proc_bind): Likewise.
825 (c_parser_omp_clause_uniform): Likewise.
826 (c_parser_omp_for_loop): Likewise.
827 (c_parser_cilk_clause_vectorlength): Likewise.
828 (c_parser_cilk_clause_linear): Likewise.
829 (c_parser_transaction_expression): Likewise.
830 * c-parser.h (c_parser_require): Add param matching_location with
831 default UNKNOWN_LOCATION.
832 (c_parser_error): Convert return type from void to bool.
833 (c_parser_skip_until_found): Add param matching_location with
834 default UNKNOWN_LOCATION.
835
30af3a2b
MP
8362017-08-09 Marek Polacek <polacek@redhat.com>
837
838 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
839 * c-tree.h (build_external_ref): Update declaration.
840 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
841 (build_external_ref): Change the type of a parameter to bool.
842 (parser_build_binary_op): Use true/false instead of 1/0.
843 (pointer_diff): Likewise.
844 (build_modify_expr): Likewise.
845 (set_designator): Change the type of a parameter to bool.
846 (set_init_index): Use true/false instead of 1/0.
847 (set_init_label): Likewise.
848 (output_init_element): Change the type of a parameter to bool.
849 (output_pending_init_elements): Use true/false instead of 1/0.
850 (process_init_element): Likewise.
851 (build_binary_op): Change the type of a parameter to bool.
852
296c53ac
MP
8532017-08-09 Marek Polacek <polacek@redhat.com>
854
855 PR c/81233
856 * c-typeck.c (pedwarn_init): Make the function take a variable list.
857 Call emit_diagnostic_valist instead of pedwarn.
858 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
859 Print the relevant types in diagnostics.
860
a32c8316
MP
8612017-08-09 Marek Polacek <polacek@redhat.com>
862
863 PR c/81417
864 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
865 build_conditional_expr.
866 * c-parser.c (c_parser_conditional_expression): Create locations for
867 EXP1 and EXP2 from their source ranges. Pass the locations down to
868 build_conditional_expr.
869 * c-tree.h (build_conditional_expr): Update declaration.
870 * c-typeck.c (build_conditional_expr): Add location_t parameters.
871 For -Wsign-compare, also print the types.
872
314e6352
ML
8732017-08-08 Martin Liska <mliska@suse.cz>
874
875 * c-convert.c: Include header files.
876 * c-typeck.c: Likewise.
877
577eec56
ML
8782017-08-07 Martin Liska <mliska@suse.cz>
879
880 * c-parser.c (c_parser_attributes): Canonicalize name of an
881 attribute.
882
f7b6353a
MP
8832017-08-02 Marek Polacek <polacek@redhat.com>
884
885 PR c/81289
886 * c-parser.c (c_parser_unary_expression): Use set_error.
887
8a6eab34
MP
888 PR c/81448
889 PR c/81306
890 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
891 warnings. Avoid walking MACRO_MAP_LOCATIONS.
892
7fef86d3
JH
8932017-07-31 Jan Hubicka <hubicka@ucw.cz>
894 Martin Liska <mliska@suse.cz>
895
896 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 897 statement.
7fef86d3 898
f34ebeb2
ML
8992017-07-31 Martin Liska <mliska@suse.cz>
900
901 PR sanitize/81530
902 * c-convert.c (convert): Guard condition with flag_sanitize_p
903 also with current_function_decl non-null equality.
904 * c-decl.c (grokdeclarator): Likewise.
905 * c-typeck.c (build_binary_op): Likewise.
906
8595f67b
MP
9072017-07-25 Marek Polacek <polacek@redhat.com>
908
909 * c-decl.c (grokfield): Remove local variable.
910
d49718d6
MP
9112017-07-25 Marek Polacek <polacek@redhat.com>
912
913 PR c/81364
914 * c-parser.c (c_parser_else_body): Don't warn about multistatement
915 macro expansion if the body is in { }.
916 (c_parser_while_statement): Likewise.
917 (c_parser_for_statement): Likewise.
918
ff22eb12
NS
9192017-07-18 Nathan Sidwell <nathan@acm.org>
920
921 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
922
eea77d1f
DM
9232017-07-14 David Malcolm <dmalcolm@redhat.com>
924
925 * c-decl.c (implicitly_declare): When suggesting a missing
926 #include, provide a fix-it hint.
927
b6f43128
DM
9282017-07-06 David Malcolm <dmalcolm@redhat.com>
929
930 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
931 and call that instead.
932 * c-tree.h (selftest::run_c_tests): New decl.
933
3e2becc4
MP
9342017-06-26 Marek Polacek <polacek@redhat.com>
935
936 PR c/80116
937 * c-parser.c (c_parser_if_body): Set the location of the
938 body of the conditional after parsing all the labels. Call
939 warn_for_multistatement_macros.
940 (c_parser_else_body): Likewise.
941 (c_parser_switch_statement): Likewise.
942 (c_parser_while_statement): Likewise.
943 (c_parser_for_statement): Likewise.
944 (c_parser_statement): Add a default argument. Save the location
945 after labels have been parsed.
946 (c_parser_c99_block_statement): Likewise.
947
343ae898
RB
9482017-06-19 Richard Biener <rguenther@suse.de>
949
950 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
951 negated _Literals to parse _Literal (int) -1.
952
45b2222a
ML
9532017-06-13 Martin Liska <mliska@suse.cz>
954
955 PR sanitize/78204
956 * c-convert.c (convert): Use sanitize_flags_p.
957 * c-decl.c (grokdeclarator): Likewise.
958 * c-typeck.c (convert_for_assignment): Likewise.
959 (c_finish_return): Likewise.
960 (build_binary_op): Likewise.
961
8ab7005b
JJ
9622017-06-08 Jakub Jelinek <jakub@redhat.com>
963
964 PR c/81006
965 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
966 to sizetype before size_binop.
967
363dc72c
JJ
9682017-06-07 Jakub Jelinek <jakub@redhat.com>
969
970 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
971 of TDI_generic.
972
dc949728
MP
9732017-06-06 Marek Polacek <polacek@redhat.com>
974
975 PR c/79983
976 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
977 ref.
978 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
979
40ffd95f
BE
9802017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
981
982 * c-parser.c (c_parser_binary_expression): Implement the
983 -Wsizeof_pointer_div warning.
984 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
985 from a parenthesized expression.
986 (c_parser_expr_list): Use c_last_sizeof_loc.
987 * c-tree.h (c_last_sizeof_loc): New external.
988 * c-typeck.c (c_last_sizeof_loc): New variable.
989 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
990
9fc5e7a4
MM
9912017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
992
993 PR testsuite/80580
994 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
995
f012c8ef
DM
9962017-05-30 David Malcolm <dmalcolm@redhat.com>
997
998 * c-objc-common.c (c_tree_printer): Gain bool and const char **
999 parameters.
1000
3cd211af
MS
10012017-05-24 Martin Sebor <msebor@redhat.com>
1002
1003 PR c/80731
1004 * c-fold.c (c_fully_fold_internal): Adjust.
1005 * c-typeck.c (parser_build_unary_op): Adjust.
1006
fd71a9a2
TS
10072017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1008
1009 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1010 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1011 "VECTOR_LENGTH".
1012
92fa0f9e
MP
10132017-05-23 Marek Polacek <polacek@redhat.com>
1014
1015 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1016 quotes.
1017
d11c168a
JJ
10182017-05-22 Jakub Jelinek <jakub@redhat.com>
1019
1020 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1021 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1022 it returned invariant. Call tree_invariant_p unconditionally
1023 afterwards to decide whether to return expr or op0.
1024
58aca9d9
NS
10252017-05-22 Nathan Sidwell <nathan@acm.org>
1026
1027 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1028
7fd549d2
TS
10292017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1030
1031 * c-parser.c (c_parser_omp_clause_default): Handle
1032 "OMP_CLAUSE_DEFAULT_PRESENT".
1033
6ecd2339
BE
10342017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1035
1036 * config-lang.in (gtfiles): Add c-family/c-format.c.
1037
8a57ecff
NS
10382017-05-18 Nathan Sidwell <nathan@acm.org>
1039
1040 * c-decl.c (pushdecl_top_level): Delete unused function.
1041
6574d78e
MP
10422017-05-18 Marek Polacek <polacek@redhat.com>
1043
1044 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1045 (check_earlier_gotos): Likewise.
1046 (define_label): Likewise.
1047 (pending_xref_error): Likewise.
1048 (smallest_type_quals_location): Likewise.
1049 (grokdeclarator): Likewise.
1050 (grokparms): Likewise.
1051 (identifier_global_value): Likewise.
1052 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1053 (find_init_member): Likewise.
1054
e3455240
MP
10552017-05-18 Marek Polacek <polacek@redhat.com>
1056
1057 * c-decl.c (start_decl): Use false/true instead of 0/1.
1058 (grokdeclarator): Likewise.
1059 (finish_struct): Likewise.
1060 (start_function): Change the return type to bool. Use false/true
1061 instead of 0/1.
1062 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1063 * c-tree.h (start_function): Update.
1064 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1065 (set_designator): Change the return type to bool. Use false/true
1066 instead of 0/1.
1067
3fa8871b
MP
10682017-05-17 Marek Polacek <polacek@redhat.com>
1069
1070 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1071 * c-typeck.c: Likewise.
1072
142473df
MP
10732017-05-17 Marek Polacek <polacek@redhat.com>
1074
1075 PR sanitizer/80659
1076 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1077 DECL_IGNORED_P even for non-static compound literals.
1078
1a817418
ML
10792017-05-17 Martin Liska <mliska@suse.cz>
1080
1081 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1082 use it instead of int type.
1083
b2fa0a8b
MP
10842017-05-17 Marek Polacek <polacek@redhat.com>
1085
1086 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1087 call c_fully_fold.
1088 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1089 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1090 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1091 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1092 save_expr.
1093 (c_parser_conditional_expression): Likewise.
1094 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1095 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1096 (process_init_element): Likewise.
1097 (build_binary_op): Likewise.
1098 (handle_omp_array_sections_1): Likewise.
1099
1e47f02b
TS
11002017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1101
1102 * c-parser.c (c_parser_omp_clause_num_gangs)
1103 (c_parser_omp_clause_num_workers)
1104 (c_parser_omp_clause_vector_length): Merge functions into...
1105 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1106 all users.
1107
c24e924f
NS
11082017-05-11 Nathan Sidwell <nathan@acm.org>
1109
1110 * gimple-parser.c: Don't #include tree-dump.h.
1111
c587104e
MM
11122017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1113
1114 PR testsuite/80580
1115 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1116
67ac9a9d
MM
11172017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1118
1119 PR testsuite/80580
1120 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1121 incorrect __MEM syntax.
1122
ac4eb40f
MM
11232017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1124
1125 PR testsuite/80580
1126 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1127 type of unary '*'.
1128
641da50a
NS
11292017-05-09 Nathan Sidwell <nathan@acm.org>
1130
1131 * c-tree.h (pushdecl): Declare.
1132
56d35585
DM
11332017-05-05 David Malcolm <dmalcolm@redhat.com>
1134
1135 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1136 with diagnostic_report_diagnostic.
1137 * c-errors.c (pedwarn_c99): Likewise.
1138 (pedwarn_c90): Likewise.
1139
815d9cc6
XR
11402017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1141
1142 PR c++/80038
1143 * c-gimplify.c (c_gimplify_expr): Remove calls to
1144 cilk_gimplifY_call_params_in_spawned_fn.
1145
1c4ea66f
DM
11462017-04-25 David Malcolm <dmalcolm@redhat.com>
1147
1148 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1149 hint for removing extra semicolon.
1150
666f7903
JJ
11512017-04-21 Jakub Jelinek <jakub@redhat.com>
1152
1153 PR c/80468
1154 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1155 enabled, set specs->type to integer_type_node.
1156
5764ee3c
JW
11572017-04-03 Jonathan Wakely <jwakely@redhat.com>
1158
1159 * c-array-notation.c: Fix typo in comment.
1160
10fa8dfb
MP
11612017-03-29 Marek Polacek <polacek@redhat.com>
1162
1163 PR c/79730
1164 * c-decl.c (finish_decl): Check VAR_P.
1165
a9e4a1a5
JJ
11662017-03-27 Jakub Jelinek <jakub@redhat.com>
1167
1168 PR middle-end/80162
1169 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1170 * c-typeck.c (c_mark_addressable): Likewise. Look through
1171 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1172 to ARRAY_TYPE.
1173 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1174
ee3ff394
MP
11752017-03-23 Marek Polacek <polacek@redhat.com>
1176
1177 * c-tree.h: Remove a C_RID_YYCODE reference.
1178
4d1b8e70
JJ
11792017-03-21 Jakub Jelinek <jakub@redhat.com>
1180
1181 PR c/80097
1182 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1183 optional COMPOUND_EXPR with ubsan instrumentation.
1184
31dc71a8
MP
11852017-03-17 Marek Polacek <polacek@redhat.com>
1186
1187 * c-parser.c: Add C11 references.
1188
d579c385
MP
11892017-03-15 Marek Polacek <polacek@redhat.com>
1190
1191 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1192
85059a38
MP
11932017-03-11 Marek Polacek <polacek@redhat.com>
1194
1195 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1196
2f6f187a
DM
11972017-03-10 David Malcolm <dmalcolm@redhat.com>
1198
1199 PR translation/79848
1200 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1201 "%qs".
1202 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1203
36618428
MP
12042017-03-09 Marek Polacek <polacek@redhat.com>
1205
1206 PR sanitizer/79757
1207 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1208 parameter declarations with initializers.
1209
01e5af5a
JJ
12102017-03-09 Jakub Jelinek <jakub@redhat.com>
1211
1212 PR c/79969
1213 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1214 TYPE_STUB_DECL.
1215
a71dbc63
JJ
12162017-03-07 Jakub Jelinek <jakub@redhat.com>
1217
1218 PR c/79834
1219 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1220 for "may only be used in compound statements" diagnostics, change it
1221 such that the same translatable string is used for all pragmas. For
1222 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1223 diagnostics.
1224 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1225 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1226 "may only be used in compound statements" diagnostics, such that the
1227 same translatable string is used for all pragmas.
1228
1ff4bae6
MP
12292017-03-04 Marek Polacek <polacek@redhat.com>
1230
1231 PR c/79847
1232 * c-decl.c (implicit_decl_warning): Add missing space.
1233
7f5a7d78
MP
12342017-03-03 Marek Polacek <polacek@redhat.com>
1235
1236 PR c/79758
1237 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1238 current_function_prototype_arg_types is error_mark_node. Fix
1239 formatting. Use TREE_VALUE instead of TREE_TYPE.
1240
883c8f06
JJ
12412017-03-03 Jakub Jelinek <jakub@redhat.com>
1242
79c9b7a8
JJ
1243 PR c/79837
1244 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1245 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1246 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1247 diagnostics.
1248
883c8f06
JJ
1249 PR c/79836
1250 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1251 instead of %<_Generic>.
1252 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1253 (c_parser_omp_target_exit_data): Use %<release%> instead of
1254 %<release>.
1255
324ff1a0
JJ
12562017-02-28 Jakub Jelinek <jakub@redhat.com>
1257
1258 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1259 instead of just cond ? "..." : "...".
1260 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1261 for "enter"/"exit" keyword.
1262 (c_finish_oacc_routine): Don't use %s to supply portions of the
1263 message.
1264
4227c9ad
JJ
12652017-02-24 Jakub Jelinek <jakub@redhat.com>
1266
1267 PR c++/79588
1268 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1269 handle -Wrestrict here.
1270 * c-typeck.c (build_function_call_vec): Adjust
1271 check_function_arguments caller.
1272
5d972e66
RB
12732017-02-23 Richard Biener <rguenther@suse.de>
1274
1275 PR c/79684
1276 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1277 to initialize c_exprs to return.
1278 (c_parser_gimple_binary_expression): Likewise.
1279 (c_parser_gimple_unary_expression): Likewise.
1280 (c_parser_gimple_postfix_expression): Likewise.
1281
61ac5ebe
MP
12822017-02-22 Marek Polacek <polacek@redhat.com>
1283
1284 PR c/79662
1285 * c-typeck.c (convert_arguments): Handle error_mark_node.
1286
41d1b0b1
PK
12872017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1288
1289 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1290 value of c_parser_parse_ssa_name against error_mark_node and emit
1291 error if ssa name is anonymous and written as default definition.
1292
eab1f169
PK
12932017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1294
1295 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1296 FMA_EXPR.
1297
bcac0b4d
JJ
12982017-02-16 Jakub Jelinek <jakub@redhat.com>
1299
1300 PR c++/79512
1301 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1302 ignore #pragma omp target even when not followed by identifier.
1303
1be33173
PK
13042017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1305
1306 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1307 (c_parser_gimple_unary_expression): Likewise.
1308
aa326bfb
JJ
13092017-02-13 Jakub Jelinek <jakub@redhat.com>
1310
1311 * c-parser.c (c_parser_oacc_declare): Add missing space in
1312 diagnostics.
1313
8a398bc5
PK
13142017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1315
1316 PR c/79478
1317 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1318 set_c_expr_source_range when parsing ssa-name.
1319
3dcde5ef
PG
13202017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1321 Richard Biener <rguenther@suse.de>
1322
1323 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1324 building IL when arguments are error_mark_node.
1325 (c_parser_gimple_unary_expression): Likewise.
1326 (c_parser_gimple_if_stmt): Likewise.
1327 (c_parser_gimple_switch_stmt): Likewise.
1328 (c_parser_gimple_return_stmt): Likewise.
1329 (c_parser_parse_ssa_name): When name lookup fails do not build
1330 an SSA name. Use undeclared rather than not declared in error
1331 reporting.
1332
192b048b
MP
13332017-02-09 Marek Polacek <polacek@redhat.com>
1334
1335 PR c/79428
1336 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1337 instead of c_parser_skip_until_found.
1338
56f71478
JJ
13392017-02-09 Jakub Jelinek <jakub@redhat.com>
1340
1341 PR c/79431
1342 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1343 symtab_node::get on automatic variables.
1344
02889d23
CLT
13452016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1346 Chung-Lin Tang <cltang@codesourcery.com>
1347
1348 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1349 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1350 semantic checking.
1351 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1352
7af4b20d
RB
13532017-02-07 Richard Biener <rguenther@suse.de>
1354
1355 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1356 (c_parser_gimple_postfix_expression_after_primary):
1357 Do not use c_build_function_call_vec to avoid folding and promotion.
1358 Simplify.
1359
e5e391d6
MO
13602017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1361
1362 PR lto/79061
1363 * c-decl.c (pop_scope): Pass main_input_filename to
1364 build_translation_unit_decl.
1365
c2e84327
DM
13662017-01-24 David Malcolm <dmalcolm@redhat.com>
1367
1368 * c-parser.c: Include "read-rtl-function.h" and
1369 "run-rtl-passes.h".
1370 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1371 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1372 production. Update for renaming of field "gimple_pass" to
1373 "gimple_or_rtl_pass". If __RTL was seen, call
1374 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1375 to an auto_timevar, to cope with early exit.
1376 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1377 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1378 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1379 Handle RID_RTL.
1380 (c_parser_parse_rtl_body): New function.
1381 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1382 (struct c_declspecs): Rename field "gimple_pass" to
1383 "gimple_or_rtl_pass". Add field "rtl_p".
1384 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1385 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1386 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1387 (c_parser_gimple_or_rtl_pass_list): ...this.
1388
2ebd93e1
MP
13892017-01-20 Marek Polacek <polacek@redhat.com>
1390
1391 PR c/64279
1392 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1393
b1c95bb5
RB
13942017-01-13 Richard Biener <rguenther@suse.de>
1395
1396 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1397 nops.
1398
25329913
RB
13992017-01-13 Richard Biener <rguenther@suse.de>
1400
1401 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1402 _Literal ( type-name ) number.
1403
6bb4ea5c
RB
14042017-01-12 Richard Biener <rguenther@suse.de>
1405
1406 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1407 __MEM.
1408
6b5b4e9c
JJ
14092017-01-11 Jakub Jelinek <jakub@redhat.com>
1410
1411 PR c++/72813
1412 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1413 PCH file.
1414
e3252775
RB
14152017-01-11 Richard Biener <rguenther@suse.de>
1416
1417 PR bootstrap/79052
1418 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1419 returns on parse errors.
1420
a9342885
MP
14212017-01-04 Marek Polacek <polacek@redhat.com>
1422
1423 PR c++/64767
1424 * c-parser.c (c_parser_postfix_expression): Mark zero character
1425 constants by setting original_type in c_expr.
1426 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1427 with a zero character constant.
1428 (char_type_p): New function.
1429
5dd9a9d0
DM
14302017-01-04 David Malcolm <dmalcolm@redhat.com>
1431
1432 * c-parser.c (c_parser_declaration_or_fndef): Create a
1433 rich_location at init_loc and parse it to start_init.
1434 (last_init_list_comma): New global.
1435 (c_parser_braced_init): Update last_init_list_comma when parsing
1436 commas. Pass it to pop_init_level. Pass location of closing
1437 brace to pop_init_level.
1438 (c_parser_postfix_expression_after_paren_type): Create a
1439 rich_location at type_loc and parse it to start_init.
1440 (c_parser_omp_declare_reduction): Likewise for loc.
1441 * c-tree.h (start_init): Add rich_location * param.
1442 (pop_init_level): Add location_t param.
1443 * c-typeck.c (struct initializer_stack): Add field
1444 "missing_brace_richloc".
1445 (start_init): Add richloc param, use it to initialize
1446 the stack node's missing_brace_richloc.
1447 (last_init_list_comma): New decl.
1448 (finish_implicit_inits): Pass last_init_list_comma to
1449 pop_init_level.
1450 (push_init_level): When finding missing open braces, add fix-it
1451 hints to the richloc.
1452 (pop_init_level): Add "insert_before" param and pass it
1453 when calling pop_init_level. Add fixits about missing
1454 close braces to any richloc. Use the richloc for the
1455 -Wmissing-braces warning.
1456 (set_designator): Pass last_init_list_comma to pop_init_level.
1457 (process_init_element): Likewise.
1458
cbe34bb5
JJ
14592017-01-01 Jakub Jelinek <jakub@redhat.com>
1460
1461 Update copyright years.
1462
d17680f3
JJ
14632016-12-21 Jakub Jelinek <jakub@redhat.com>
1464
0dba7960
JJ
1465 PR bootstrap/78817
1466 * c-typeck.c (build_function_call_vec): If check_function_arguments
1467 returns true, set TREE_NO_WARNING on CALL_EXPR.
1468
d17680f3
JJ
1469 PR c/77767
1470 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1471 to *expr instead of overwriting it.
1472
aa90531e
RB
14732016-12-20 Richard Biener <rguenther@suse.de>
1474
1475 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1476 error recovery.
1477 (c_parser_gimple_statement): Only build assigns for non-error
1478 stmts.
1479 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1480
629b3d75
MJ
14812016-12-14 Martin Jambor <mjambor@suse.cz>
1482
1483 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1484 omp-low.h.
1485 (c_finish_oacc_routine): Adjusted call to
1486 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1487 to use their new names.
1488 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1489 use its new name.
1490 (c_parser_oacc_update): Likewise.
1491 (c_parser_omp_simd): Likewise.
1492 (c_parser_omp_target_update): Likewise.
1493 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1494 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1495 name.
1496 (c_finish_omp_cancellation_point): Likewise.
1497 * gimple-parser.c: Do not include omp-low.h
1498
c5af52eb
CP
14992016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1500 James Norris <jnorris@codesourcery.com>
1501
1502 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1503 EXIT_DATA,WAIT} are not used in compound statements.
1504 (c_parser_oacc_enter_exit_data): Update diagnostics.
1505
48330c93
BE
15062016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1507
1508 PR c++/71973
1509 * c-decl.c (diagnose_mismatched_decls): Use
1510 OPT_Wbuiltin_declaration_mismatch here too.
1511
899ca90e 15122016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1513 Alan Hayward <alan.hayward@arm.com>
1514 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1515
1516 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1517 (make_label, finish_struct): Likewise.
1518
1ee62b92 15192016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1520 Richard Biener <rguenther@suse.de>
22b15758 1521
8e745a17
JJ
1522 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1523 * config-lang.in (gtfiles): Add c/c-parser.h.
1524 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1525 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1526 * c-parser.c (enum c_id_kind, struct c_token,
1527 c_parser_next_token_is, c_parser_next_token_is_not,
1528 c_parser_next_token_is_keyword,
1529 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1530 Split out to ...
1531 * c-parser.h: ... new header.
1532 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1533 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1534 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1535 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1536 c_parser_error, c_parser_require, c_parser_skip_until_found,
1537 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1538 c_parser_type_name): Export.
1539 (c_parser_tokens_buf): New function.
1540 (c_parser_error): Likewise.
1541 (c_parser_set_error): Likewise.
1542 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1543 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1544 via c_parser_parse_gimple_body.
8e745a17
JJ
1545 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1546 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1547 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1548 c_parser_error, c_parser_require, c_parser_skip_until_found,
1549 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1550 c_parser_type_name): Declare.
1ee62b92
PG
1551 (struct c_parser): Declare forward.
1552 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1553 (c_parser_error): Likewise.
1554 (c_parser_set_error): Likewise.
1555 * gimple-parser.c: New file.
1556 * gimple-parser.h: Likewise.
1ee62b92 1557
22b15758
UB
15582016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1559
1560 PR c/35503
1561 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1562 warn_for_restrict.
1563
84ff4775
LCW
15642016-09-11 Le-Chun Wu <lcwu@google.com>
1565 Mark Wielaard <mjw@redhat.com>
1566
1567 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1568 to the given -Wshadow= variant.
1569
4d0cdd0c
TP
15702016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1571
1572 * c-typeck.c: Include memmodel.h.
1573
1202f33e
JJ
15742016-10-13 Jakub Jelinek <jakub@redhat.com>
1575
1576 PR target/77957
1577 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1578 instead of lhd_return_null_tree_v.
1579
8a14afd0
BS
15802016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1581
1582 PR c++/69733
1583 * c-decl.c (smallest_type_quals_location): New static function.
1584 (grokdeclarator): Try to find the correct location for an ignored
1585 qualifier.
1586
81fea426
MP
15872016-09-26 Marek Polacek <polacek@redhat.com>
1588
1589 PR c/7652
1590 * c-decl.c (pop_scope): Add gcc_fallthrough.
1591
15922016-09-26 Marek Polacek <polacek@redhat.com>
1593
1594 PR c/7652
1595 * c-parser.c (struct c_token): Add flags field.
1596 (c_lex_one_token): Pass it to c_lex_with_flags.
1597 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1598 into IFN_FALLTHROUGH.
1599 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1600 attribute fallthrough after a case label or default label.
1601 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1602
9a2300e9
MP
16032016-09-24 Marek Polacek <polacek@redhat.com>
1604
1605 PR c/77490
1606 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1607 have boolean value. Warn about ++/-- on booleans.
1608
7de76362
JJ
16092016-09-23 Jakub Jelinek <jakub@redhat.com>
1610
1611 * c-parser.c (incomplete_record_decls): Remove unnecessary
1612 = vNULL initialization of file scope vec.
1613
5b73d2ab
MP
16142016-09-16 Marek Polacek <polacek@redhat.com>
1615
1616 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1617
e51fbec3
MP
16182016-09-14 Marek Polacek <polacek@redhat.com>
1619
1620 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1621 (fix_array_notation_expr): Likewise.
1622 * c-decl.c (finish_decl): Likewise.
1623 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1624 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1625 (function_to_pointer_conversion): Use false instead of 0.
1626 (convert_lvalue_to_rvalue): Likewise.
1627 (parser_build_unary_op): Likewise.
1628 (build_atomic_assign): Likewise.
1629 (build_unary_op): Change nonconvert parameter type to bool, use
1630 true/false instead of 1/0.
1631 (build_binary_op): Use true instead of 1.
1632
254830ba
DM
16332016-09-13 David Malcolm <dmalcolm@redhat.com>
1634
1635 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1636 of add_fixit_insert to add_fixit_insert_before.
1637
4c13ba17
MP
16382016-09-13 Marek Polacek <polacek@redhat.com>
1639
1640 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1641 it.
1642
54dcdb88
BE
16432016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1644
1645 PR c++/77496
1646 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1647 COMPOUND_EXPR to warn_for_omitted_condop.
1648
e5106e27
DM
16492016-09-07 David Malcolm <dmalcolm@redhat.com>
1650
1651 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1652 c_get_substring_location for this new langhook.
1653
9dc5773f
JJ
16542016-09-02 Jakub Jelinek <jakub@redhat.com>
1655
1656 PR c/65467
1657 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1658 flag_openmp.
1659 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1660 instead of mark_exp_read on low_bound/length expression.
1661 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1662 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1663 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1664 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1665 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1666 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1667 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1668 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1669 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1670 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1671 instead of mark_expr_read.
1672 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1673 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1674 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1675 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1676 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1677 array section bases outside of depend clause, for depend clause
1678 use convert_lvalue_to_rvalue on the base.
1679 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1680 linear, aligned, map, to and from clauses.
1681 (c_omp_clause_copy_ctor): New function.
1682
295844f6
MP
16832016-09-01 Marek Polacek <polacek@redhat.com>
1684
1685 PR c/7652
1686 * c-typeck.c (composite_type): Add FALLTHRU comment.
1687
089af25c
DM
16882016-08-31 David Malcolm <dmalcolm@redhat.com>
1689
1690 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1691 to the insertion fixits for "struct", "union", and "enum".
1692
f9087798
DM
16932016-08-30 David Malcolm <dmalcolm@redhat.com>
1694
1695 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1696 rather than add_fixit_misspelled_id.
1697 (undeclared_variable): Likewise.
1698 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1699 now-redundant "here" params from add_fixit_insert method calls.
1700 (c_parser_parameter_declaration): Likewise.
1701 * c-typeck.c (build_component_ref): Remove now-redundant range
1702 param from add_fixit_replace method calls.
1703
ebef225f
MP
17042016-08-25 Marek Polacek <polacek@redhat.com>
1705
1706 * c-typeck.c (parser_build_binary_op): Pass LHS to
1707 warn_logical_not_parentheses.
1708
fe377a48
MP
17092016-08-25 Marek Polacek <polacek@redhat.com>
1710
1711 PR c/77323
1712 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1713 or _FloatN or _FloatNx is not supported.
1714 (finish_declspecs): Set type to integer_type_node when _FloatN or
1715 _FloatNx is not supported.
1716
c65699ef
JM
17172016-08-19 Joseph Myers <joseph@codesourcery.com>
1718
1719 PR c/32187
1720 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1721 (struct c_declspecs): Add field floatn_nx_idx.
1722 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1723 and _FloatNx type specifiers.
1724 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1725 (c_parser_declspecs, c_parser_attribute_any_word)
1726 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1727 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1728 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1729 narrower than double.
1730
2f1364c2
JJ
17312016-08-12 Jakub Jelinek <jakub@redhat.com>
1732 Martin Liska <mliska@suse.cz>
1733
1734 PR c/67410
1735 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1736 % to determine val element to change. Assert that
1737 wchar_bytes * charwidth fits into val array.
1738
191816a3
MP
17392016-08-12 Marek Polacek <polacek@redhat.com>
1740
1741 PR c/7652
1742 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1743 (c_parser_postfix_expression): Likewise.
1744 * c-typeck.c (build_unary_op): Adjust fall through comment.
1745 (c_mark_addressable): Likewise.
1746
b95a64bb
JJ
17472016-08-11 Jakub Jelinek <jakub@redhat.com>
1748
1749 PR c/72816
1750 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1751 array member through typedef, for orig_qual_indirect == 0 clear
1752 orig_qual_type.
1753
895aa8e1
DM
17542016-08-08 David Malcolm <dmalcolm@redhat.com>
1755
1756 PR c/64955
1757 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1758 this up to selftest::run_c_tests.
1759 (selftest::run_c_tests): New function.
1760
0b212d8c
TS
17612016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1762
ae9281fc
TS
1763 * c-parser.c (struct oacc_routine_data): Add error_seen and
1764 fndecl_seen members.
1765 (c_finish_oacc_routine): Use these.
1766 (c_parser_declaration_or_fndef): Adjust.
1767 (c_parser_oacc_routine): Likewise. Support more C language
1768 constructs, and improve diagnostics. Move pragma context
1769 checking...
1770 (c_parser_pragma): ... here.
1771
0b212d8c
TS
1772 * c-parser.c (struct oacc_routine_data): New.
1773 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1774 Simplify code.
1775 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1776 declare target" attribute.
1777
76e2c821
JB
17782016-08-01 Jan Beulich <jbeulich@suse.com>
1779
1780 * c-fold.c (c_fully_fold_internal): Also emit shift count
1781 warnings for vector types.
1782 * c-typeck.c (build_binary_op): Likewise.
1783
f618a472
MP
17842016-07-29 Marek Polacek <polacek@redhat.com>
1785
1786 PR c/71742
1787 * c-decl.c (finish_struct): Rephrase an error message.
1788
efd0786f
MP
1789 PR c/71853
1790 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1791 to error node for invalid code.
1792
e00dceaf
MP
1793 PR c/71573
1794 * c-decl.c (implicitly_declare): Return decl early not only for
1795 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1796
673a107a
JJ
17972016-07-29 Jakub Jelinek <jakub@redhat.com>
1798
1799 PR c/71969
1800 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1801 on GNU extern inline functions.
1802
a5b5c8b6
MP
18032016-07-29 Marek Polacek <polacek@redhat.com>
1804
1805 PR c/71583
1806 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1807 check expr.value.
1808
e3fe09c1
UB
18092016-07-22 Uros Bizjak <ubizjak@gmail.com>
1810
1811 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1812
7c8f7eaa
DM
18132016-07-20 David Malcolm <dmalcolm@redhat.com>
1814
1815 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1816 spellcheck-tree.h
1817 (best_macro_match): Likewise, converting from a typedef to a
1818 subclass.
1819 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1820 (lookup_name_fuzzy): Update for change of best_macro_match to a
1821 subclass with a ctor that calls cpp_forall_identifiers.
1822
de6a69ee
DM
18232016-07-20 David Malcolm <dmalcolm@redhat.com>
1824
1825 * c-decl.c (implicit_decl_warning): Update for conversion of
1826 return type of lookup_name_fuzzy to const char *.
1827 (undeclared_variable): Likewise.
1828 (lookup_name_fuzzy): Convert return type from tree to
1829 const char *.
1830 * c-parser.c (c_parser_declaration_or_fndef): Update for
1831 conversion of return type of lookup_name_fuzzy to const char *.
1832 (c_parser_parameter_declaration): Likewise.
1833
b1c9c068
CP
18342016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1835
1836 * c-parser.c (c_parser_oacc_declare): Don't scan for
1837 GOMP_MAP_POINTER.
1838 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1839 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1840 zero-length subarrays.
1841
ddbbcb19
JJ
18422016-07-15 Jakub Jelinek <jakub@redhat.com>
1843
1844 PR c/71858
1845 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1846 instead of FUZZY_LOOKUP_NAME.
1847 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1848 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1849
dd36b877
JJ
18502016-07-14 Jakub Jelinek <jakub@redhat.com>
1851
1852 PR c/71858
1853 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1854
8c681247
TS
18552016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1856
1857 * c-parser.c (c_parser_generic_selection): Make type of variable
1858 auto_vec.
1859 (c_parser_omp_declare_simd): Likewise.
1860
bf4fa671
TS
18612016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1862
1863 * c-decl.c (struct c_struct_parse_info): Change member types
1864 from vec to auto_vec.
1865 (start_struct): Adjust.
1866 (finish_struct): Likewise.
1867
557e8c49
JJ
18682016-07-02 Jakub Jelinek <jakub@redhat.com>
1869
1870 PR c/71719
1871 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1872
54d19c3b
TS
18732016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1874
1875 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1876 Move pragma context checking into...
1877 (c_parser_omp_cancellation_point): ... here, and improve
1878 diagnostic messages.
1879 * c-typeck.c (c_finish_omp_cancel)
1880 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1881
152ef731
JJ
18822016-06-29 Jakub Jelinek <jakub@redhat.com>
1883
1884 PR c/71685
1885 * c-typeck.c (c_build_qualified_type): Don't clear
1886 C_TYPE_INCOMPLETE_VARS for the main variant.
1887
18882016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1889
1890 PR c/71552
1891 * c-typeck.c (output_init_element): Diagnose incompatible types
1892 before non-constant initializers.
1893
e9ac1f86
JJ
18942016-06-28 Jakub Jelinek <jakub@redhat.com>
1895
1896 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1897
277d7ee0
AK
18982016-06-23 Andi Kleen <ak@linux.intel.com>
1899
1900 * Make-lang.in: Add support for autofdo.
1901
1a4f11c8
DM
19022016-06-22 David Malcolm <dmalcolm@redhat.com>
1903
1904 PR c/70339
1905 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1906 (implicit_decl_warning): When issuing warnings for implicit
1907 declarations, attempt to provide a suggestion via
1908 lookup_name_fuzzy.
1909 (undeclared_variable): Likewise when issuing errors.
1910 (lookup_name_in_scope): Likewise.
1911 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1912 (best_macro_match): New typedef.
1913 (find_closest_macro_cpp_cb): New function.
1914 (lookup_name_fuzzy): New function.
1915 * c-parser.c: Include gcc-rich-location.h.
1916 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1917 (c_keyword_starts_typename): ...this new function.
1918 (c_parser_declaration_or_fndef): When issuing errors about
1919 missing "struct" etc, add a fixit. For other kinds of errors,
1920 attempt to provide a suggestion via lookup_name_fuzzy.
1921 (c_parser_parms_declarator): When looking ahead to detect typos in
1922 type names, also reject CPP_KEYWORD.
1923 (c_parser_parameter_declaration): When issuing errors about
1924 unknown type names, attempt to provide a suggestion via
1925 lookup_name_fuzzy.
1926 * c-tree.h (c_keyword_starts_typename): New prototype.
1927
5a578671
JM
19282016-06-20 Joseph Myers <joseph@codesourcery.com>
1929
1930 PR c/71601
1931 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1932 c_common_type returns error_mark_node.
1933
3f8257db 19342016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1935
1936 PR c/69507
1937 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1938 __alignof__ (expression).
1939
6a3f203c
DM
19402016-06-14 David Malcolm <dmalcolm@redhat.com>
1941
1942 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1943
264757fb
DM
19442016-06-14 David Malcolm <dmalcolm@redhat.com>
1945
1946 * c-typeck.c (build_component_ref): Simplify fixit code by
1947 using gcc_rich_location::add_fixit_misspelled_id.
1948 (set_init_label): Likewise.
1949
f7e4f2e3
DM
19502016-06-13 David Malcolm <dmalcolm@redhat.com>
1951
1952 * c-parser.c (c_parser_initelt): Provide location of name for new
1953 location_t param of set_init_label.
1954 * c-tree.h (set_init_label): Add location_t param.
1955 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1956 param and use it when issuing error messages about unrecognized
1957 field names. Attempt to provide a fixit hint if appropriate,
1958 otherwise update the error message to provide the type name.
1959
4b1ffdb1
TS
19602016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1961
1962 PR c/71381
1963 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1964 Loosen checking.
1965
44a845ca
MS
19662016-06-08 Martin Sebor <msebor@redhat.com>
1967 Jakub Jelinek <jakub@redhat.com>
1968
1969 PR c++/70507
1970 PR c/68120
1971 * c-typeck.c (convert_arguments): Don't promote last argument
1972 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1973
92a5f2ba
MP
19742016-06-08 Marek Polacek <polacek@redhat.com>
1975
1976 PR c/71418
1977 * c-decl.c (grokdeclarator): Check TYPE_P.
1978
08203f73
MP
1979 PR c/71426
1980 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1981 code.
1982
6ffd47b7
DM
19832016-06-07 David Malcolm <dmalcolm@redhat.com>
1984
1985 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1986 and structure element reference, capture the location of the
1987 element name token and pass it to build_component_ref.
1988 (c_parser_postfix_expression_after_primary): Likewise for
1989 structure element dereference.
1990 (c_parser_omp_variable_list): Likewise for
1991 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1992 * c-tree.h (build_component_ref): Add location_t param.
1993 * c-typeck.c (build_component_ref): Add location_t param
1994 COMPONENT_LOC. Use it, if available, when issuing hints about
1995 mispelled member names to provide a fixit replacement hint.
1996
1f40cff3
MP
19972016-06-06 Marek Polacek <polacek@redhat.com>
1998
1999 PR c/71362
2000 * c-parser.c (c_parser_direct_declarator): Set location.
2001
5545a907
MP
20022016-06-06 Marek Polacek <polacek@redhat.com>
2003
2004 * c-typeck.c (comptypes_internal): Handle comparisons of
2005 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2006 TYPE_REF_CAN_ALIAS_ALL.
2007
b605f663
CLT
20082016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2009
2010 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2011 arguments as addressable when async clause exists.
2012
00631022
JJ
20132016-05-30 Jakub Jelinek <jakub@redhat.com>
2014
2015 PR c++/71349
2016 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2017 when combined with target construct.
2018
7211a097
JJ
20192016-05-26 Jakub Jelinek <jakub@redhat.com>
2020
2021 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2022 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2023
95efe6b6
MP
20242016-05-25 Marek Polacek <polacek@redhat.com>
2025
2026 PR c/71265
2027 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2028
a23faf7a
MP
2029 PR c/71266
2030 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2031
e46c7770
CP
20322016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2033
2034 * c-parser.c (c_parser_oacc_declare): Add support for
2035 GOMP_MAP_FIRSTPRIVATE_POINTER.
2036 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2037 argument with enum c_omp_region_type ort.
2038 (handle_omp_array_sections): Likewise. Update call to
2039 handle_omp_array_sections_1.
2040 (c_finish_omp_clauses): Add specific errors and warning messages for
2041 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2042 call to handle_omp_array_sections.
2043
a04e69c0
TS
20442016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2045
2046 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2047
f17a223d
RB
20482016-05-24 Richard Biener <rguenther@suse.de>
2049
2050 PR middle-end/70434
2051 PR c/69504
2052 * c-typeck.c (build_array_ref): Do not complain about indexing
2053 non-lvalue vectors. Adjust for function name change.
2054
79063edd
MS
20552016-05-20 Martin Sebor <msebor@redhat.com>
2056
2057 PR c/71115
2058 * c-typeck.c (error_init): Use
2059 expansion_point_location_if_in_system_header.
2060 (warning_init): Same.
2061
8a40fef3
DM
20622016-05-19 David Malcolm <dmalcolm@redhat.com>
2063
2064 PR c/71171
2065 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2066 in error-handling.
2067 (c_parser_postfix_expression): Likewise.
2068 * c-tree.h (c_expr::set_error): New method.
2069 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2070 that result's range is initialized.
2071
e9892350
JG
20722016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2073
2074 * c-typeck.c (parser_build_unary_op): Fix formatting.
2075
8fad45f5
MW
20762016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2077
2078 * c-decl.c (grokdeclarator): Remove errmsg and use of
2079 targetm.invalid_return_type.
2080 (grokparms): Remove errmsg and use of
2081 targetm.invalid_parameter_type.
2082
aa4b467b
JM
20832016-05-13 Joseph Myers <joseph@codesourcery.com>
2084
2085 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2086 function return type.
2087
4f2e1536
MP
20882016-05-12 Marek Polacek <polacek@redhat.com>
2089
2090 PR c/70756
2091 * c-decl.c (build_compound_literal): Pass LOC down to
2092 c_incomplete_type_error.
2093 * c-tree.h (require_complete_type): Adjust declaration.
2094 (c_incomplete_type_error): Likewise.
2095 * c-typeck.c (require_complete_type): Add location parameter, pass it
2096 down to c_incomplete_type_error.
2097 (c_incomplete_type_error): Add location parameter, pass it down to
2098 error_at.
2099 (build_component_ref): Pass location down to c_incomplete_type_error.
2100 (default_conversion): Pass location down to require_complete_type.
2101 (build_array_ref): Likewise.
2102 (build_function_call_vec): Likewise.
2103 (convert_arguments): Likewise.
2104 (build_unary_op): Likewise.
2105 (build_c_cast): Likewise.
2106 (build_modify_expr): Likewise.
2107 (convert_for_assignment): Likewise.
2108 (c_finish_omp_clauses): Likewise.
2109
d6e83a8d
MM
21102016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2111
2112 PR c/43651
2113 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2114 is enabled.
2115 * c-errors.c (pedwarn_c90): Return true if warned.
2116 * c-tree.h (pedwarn_c90): Change return type to bool.
2117 (enum c_declspec_word): Add new enumerator cdw_atomic.
2118
5c3a10fb
MP
21192016-05-11 Marek Polacek <polacek@redhat.com>
2120
2121 PR c++/71024
2122 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2123 diagnose_mismatched_attributes and call it.
2124
cf68d92c
MP
21252016-05-10 Marek Polacek <polacek@redhat.com>
2126
2127 PR c/70255
2128 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2129 on a declaration following the definition.
2130
351f85c5
JJ
21312016-05-05 Jakub Jelinek <jakub@redhat.com>
2132
2133 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2134 parse it through to c_parser_c99_block_statement.
2135 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2136 caller.
2137
deef7113
MP
21382016-05-04 Marek Polacek <polacek@redhat.com>
2139
2140 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2141 OPT_Wdangling_else.
2142
de55efd5
MP
21432016-05-04 Marek Polacek <polacek@redhat.com>
2144
2145 PR c/48778
2146 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2147 for macro expansions.
2148
79ce98bc
MP
21492016-05-03 Marek Polacek <polacek@redhat.com>
2150
2151 PR c/70859
2152 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2153 check_builtin_function_arguments.
2154
fb2647aa
RB
21552016-05-03 Richard Biener <rguenther@suse.de>
2156
2157 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2158 the checksum from the previous stage.
2159
77886428
CP
21602016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2161
2162 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2163 c_finish_omp_clauses.
2164 (c_parser_omp_all_clauses): Likewise.
2165 (c_parser_oacc_cache): Likewise.
2166 (c_parser_oacc_loop): Likewise.
2167 (omp_split_clauses): Likewise.
2168 (c_parser_omp_declare_target): Likewise.
2169 (c_parser_cilk_all_clauses): Likewise.
2170 (c_parser_cilk_for): Likewise.
2171 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2172 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2173
7176a4a0
MP
21742016-05-02 Marek Polacek <polacek@redhat.com>
2175
2176 PR c/70851
2177 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2178 incomplete type.
2179
e7ff0319
CP
21802016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2181
2182 PR middle-end/70626
2183 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2184 OACC_LOOP_CLAUSE_MASK.
2185 (c_parser_oacc_kernels_parallel): Update call to
2186 c_oacc_split_loop_clauses.
2187
9f405ce1
AM
21882016-04-28 Andrew MacLeod <amacleod@redhat.com>
2189
2190 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2191 argument to build_modify_expr in two cases.
2192
c1e1f433
BS
21932016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2194
2195 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2196 warn_for_memset instead of warning directly here.
2197
2448a956
MP
21982016-04-26 Marek Polacek <polacek@redhat.com>
2199
2200 PR c/67784
2201 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2202 out of ...
2203 (c_parser_for_statement): ... here.
2204 (c_parser_if_statement): Use it.
2205 (c_parser_switch_statement): Use it.
2206 (c_parser_while_statement): Use it.
2207
b02a5e26
MP
2208 PR c/70791
2209 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2210
477d4906
IV
22112016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2212
2213 PR c++/69363
2214 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2215 instead of c_finish_cilk_clauses.
2216 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2217 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2218 floating-point variables in the linear clause for Cilk Plus.
2219
fe37c7af
MM
22202016-04-18 Michael Matz <matz@suse.de>
2221
2222 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2223 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2224
949505a9
MP
22252016-04-15 Marek Polacek <polacek@redhat.com>
2226
2227 PR c/70671
2228 * c-typeck.c (build_unary_op): Pass location down to error and
2229 warning call.
2230
dda1bf61
JJ
22312016-04-15 Jakub Jelinek <jakub@redhat.com>
2232
2233 PR c/70436
2234 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2235 where needed.
2236 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2237 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2238 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2239 Adjust c_parser_pragma callers.
2240 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2241 caller.
2242 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2243 c_parser_statement.
2244 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2245 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2246 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2247 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2248 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2249 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2250 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2251 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2252 down where needed.
2253 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2254 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2255 calls.
2256
99cd9857
MP
22572016-04-13 Marek Polacek <polacek@redhat.com>
2258
2259 PR c/70436
2260 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2261 adjust callers.
2262 (c_parser_statement): Likewise.
2263 (c_parser_c99_block_statement): Likewise.
2264 (c_parser_while_statement): Likewise.
2265 (c_parser_for_statement): Likewise.
2266 (c_parser_if_body): Don't set IF_P here.
2267 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2268 about dangling else here.
2269 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2270 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2271 warn about dangling else here.
2272
f13355da
MP
22732016-04-04 Marek Polacek <polacek@redhat.com>
2274
2275 PR c/70307
2276 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2277
5fde6a45
MP
22782016-03-31 Marek Polacek <polacek@redhat.com>
2279
2280 PR c/70297
2281 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2282
4bbf545b
DM
22832016-03-18 David Malcolm <dmalcolm@redhat.com>
2284
2285 PR c/70281
2286 * c-parser.c (c_parser_postfix_expression): Set the source range
2287 for uses of "__builtin_types_compatible_p".
2288
fcc2b74f
JJ
22892016-03-17 Jakub Jelinek <jakub@redhat.com>
2290
2291 PR c/70280
2292 * c-typeck.c (composite_type): Don't count void_list_node
2293 into len, if the list is terminated by void_list_node, start
2294 with void_list_node instead of NULL for newargs. Stop
2295 at void_list_node.
2296
ab4c578f
MP
22972016-03-16 Marek Polacek <polacek@redhat.com>
2298
2299 PR c/70093
2300 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2301 nested functions returning VM types.
2302
96b3c82d
CP
23032016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2304
2305 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2306 when calling c_finish_omp_clauses.
2307
29b9828f
BS
23082016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2309
2310 PR c/69824
2311 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2312 for later.
2313
7ff6ca38
MP
23142016-03-04 Marek Polacek <polacek@redhat.com>
2315
2316 PR c/69798
2317 * c-parser.c (c_parser_postfix_expression): Call
2318 c_parser_cast_expression rather than c_parser_postfix_expression.
2319
686e2237
JJ
23202016-03-01 Jakub Jelinek <jakub@redhat.com>
2321
2322 PR c/69796
2323 PR c/69974
2324 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2325 of incomplete decls to error_mark_node.
2326
0b05329b
MP
23272016-02-24 Marek Polacek <polacek@redhat.com>
2328
2329 PR c/69819
2330 * c-decl.c (finish_decl): Don't update the copy of the type of a
2331 different decl type.
2332
067fbd8b
JJ
23332016-02-23 Jakub Jelinek <jakub@redhat.com>
2334
2335 PR objc/69844
2336 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2337 in id_kind reclassification.
2338
bf14eba2
JJ
23392016-02-16 Jakub Jelinek <jakub@redhat.com>
2340
2341 PR c/69835
2342 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2343
ba539195
JN
23442016-02-16 James Norris <jnorris@codesourcery.com>
2345
2346 PR c/64748
2347 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2348
16595a1f
BS
23492016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2350
f48dfe98
BS
2351 * c-decl.c (build_null_declspecs): Zero the entire struct.
2352
16595a1f
BS
2353 PR c/69522
2354 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2355 callers changed. If nested_p is true, use it to call
2356 finish_implicit_inits.
2357 * c-tree.h (finish_implicit_inits): Declare.
2358 * c-typeck.c (finish_implicit_inits): New function. Move code
2359 from ...
2360 (push_init_level): ... here.
2361 (set_designator, process_init_element): Call finish_implicit_inits.
2362
66756373
JJ
23632016-02-11 Jakub Jelinek <jakub@redhat.com>
2364
2365 PR c/69768
2366 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2367 arguments for -Waddress warning.
2368
1066e9b5
JJ
23692016-02-04 Jakub Jelinek <jakub@redhat.com>
2370
2371 PR c/69669
2372 * c-decl.c (finish_enum): When honoring mode attribute,
2373 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2374
3a5d2ba4
JJ
23752016-01-29 Jakub Jelinek <jakub@redhat.com>
2376
2377 PR debug/69518
2378 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2379 all type variants, not just TYPE_MAIN_VARIANT.
2380
cbdd8ae0
JJ
23812016-01-27 Jakub Jelinek <jakub@redhat.com>
2382
2383 PR debug/66869
2384 * c-decl.c (c_write_global_declarations_1): Warn with
2385 warn_unused_function if static prototype without definition
2386 is not C_DECL_USED.
2387
fa74a4bc
MP
23882016-01-27 Marek Polacek <polacek@redhat.com>
2389
2390 PR c/68062
2391 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2392 to unsigned, if needed. Add -Wsign-compare warning.
2393
13f92e8d
JJ
23942016-01-26 Jakub Jelinek <jakub@redhat.com>
2395
2396 PR tree-optimization/69483
2397 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2398
cd8e73dc 23992016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2400
2401 PR c/24293
2402 * c-tree.h (incomplete_record_decls): Declare.
2403 * c-parser.c (incomplete_record_decls): Define.
2404 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2405 report error if any decl has zero size.
2406 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2407 or enum type to incomplete_record_decls.
2408
e6d6ec9e
TV
24092016-01-14 Tom de Vries <tom@codesourcery.com>
2410
2411 PR tree-optimization/68773
2412 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2413 set force_output.
2414
00083992
MP
24152016-01-14 Marek Polacek <polacek@redhat.com>
2416
2417 PR c/69262
2418 * c-decl.c (grokdeclarator): Provide more information for invalid
2419 array declarations.
2420
7443cf13
DM
24212016-01-06 David Malcolm <dmalcolm@redhat.com>
2422
2423 * c-parser.c (c_parser_unary_expression): For dereferences, build
2424 a combined location before calling build_indirect_ref, so that
2425 error reports cover the full range, manually updating the c_expr
2426 src_range.
2427
6b131d5b
MP
24282016-01-06 Marek Polacek <polacek@redhat.com>
2429
2430 PR sanitizer/69099
2431 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2432 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2433 NULL.
2434
818ab71a
JJ
24352016-01-04 Jakub Jelinek <jakub@redhat.com>
2436
2437 Update copyright years.
2438
2fe0a208
MP
24392016-01-04 Marek Polacek <polacek@redhat.com>
2440
2441 PR c/68908
2442 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2443 optimization to use __atomic_fetch_* built-in if possible.
2444
c7b48c8a
TS
24452015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2446
2447 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2448 into...
2449 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2450 all users.
2451
fda5652f
MP
24522015-12-22 Marek Polacek <polacek@redhat.com>
2453
2454 PR c/69002
2455 * c-typeck.c (build_component_ref): Warn when acessing elements of
2456 atomic structures or unions.
2457
745e411d
DM
24582015-12-21 David Malcolm <dmalcolm@redhat.com>
2459
2460 * c-typeck.c: Include "gcc-rich-location.h".
2461 (build_binary_op): In the two places that call binary_op_error,
2462 create a gcc_rich_location and populate it with the location of
2463 the binary op and its two operands.
2464
94c40e19
DM
24652015-12-16 David Malcolm <dmalcolm@redhat.com>
2466
2467 * c-parser.c (c_parser_statement_after_labels): When calling
2468 c_finish_return, Use the return expression's location if it has
2469 one, falling back to the location of the first token within it.
2470 * c-typeck.c (c_finish_return): When issuing warnings about
2471 the incorrect presence/absence of a return value, issue a note
2472 showing the declaration of the function.
2473
de67c4c3
DM
24742015-12-16 David Malcolm <dmalcolm@redhat.com>
2475
2476 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2477 to 4.
2478 (c_parser_peek_nth_token): New function.
2479 (c_parser_peek_conflict_marker): New function.
2480 (c_parser_error): Detect conflict markers and report them as such.
2481
a10704e1
DM
24822015-12-16 David Malcolm <dmalcolm@redhat.com>
2483
2484 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2485 to preserve range information for the primary expression
2486 in the call to c_parser_postfix_expression_after_primary.
2487
8062bca6
DM
24882015-12-16 David Malcolm <dmalcolm@redhat.com>
2489
2490 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2491 expression location, falling back on the first token location,
2492 rather than always using the latter.
2493
d06f8b75
MP
24942015-12-16 Marek Polacek <polacek@redhat.com>
2495
2496 PR c/64637
2497 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2498 available.
2499
2994fb91
MP
25002015-12-15 Marek Polacek <polacek@redhat.com>
2501
2502 PR c/68907
2503 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2504 artificial decl.
2505
a1b93f8d
DM
25062015-12-08 David Malcolm <dmalcolm@redhat.com>
2507
2508 * c-parser.c (c_parser_alignof_expression): Capture location of
2509 closing parenthesis (if any), or of end of unary expression, and
2510 use it to build a src_range for the expression.
2511
46c6e1e2
DM
25122015-12-08 David Malcolm <dmalcolm@redhat.com>
2513
2514 PR c/68757
2515 * c-parser.c (c_parser_get_builtin_args): Add
2516 "out_close_paren_loc" param, and write back to it.
2517 (c_parser_postfix_expression): Capture the closing
2518 parenthesis location for RID_CHOOSE_EXPR,
2519 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2520 RID_BUILTIN_SHUFFLE and use it to set the source range
2521 for such expressions; within RID_BUILTIN_COMPLEX set
2522 the underlying location.
2523
66189108
MP
25242015-12-07 Marek Polacek <polacek@redhat.com>
2525
2526 PR c/68668
2527 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2528 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2529
f187980b
EB
25302015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2531
2532 * c-tree.h (c_build_va_arg): Adjust prototype.
2533 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2534 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2535 parameter, adjust throughout and issue an error if EXPR is a component
2536 with reverse storage order.
2537
4250754e
JM
25382015-12-02 Jason Merrill <jason@redhat.com>
2539
2540 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2541 (c_fully_fold_internal, decl_constant_value_for_optimization):
2542 Move from c-common.c.
2543 * c-tree.h: Declare decl_constant_value_for_optimization.
2544 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2545
e9e32ee6
JM
25462015-12-02 Joseph Myers <joseph@codesourcery.com>
2547
2548 PR c/68162
2549 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2550 following link from declarator to next declarator. Track original
2551 qualified type and pass it to c_build_qualified_type.
2552 * c-typeck.c (c_build_qualified_type): Add arguments
2553 orig_qual_type and orig_qual_indirect.
2554
ff7a55bf
TS
25552015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2556
2557 * c-parser.c (c_parser_omp_clause_name)
2558 (c_parser_oacc_all_clauses): Alphabetical sorting.
2559
657e4e47
JJ
25602015-12-02 Jakub Jelinek <jakub@redhat.com>
2561
2562 PR c/68533
2563 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2564 for diagnostics.
2565
37d5ad46
JB
25662015-12-01 Julian Brown <julian@codesourcery.com>
2567 Cesar Philippidis <cesar@codesourcery.com>
2568 James Norris <James_Norris@mentor.com>
2569
2570 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2571 (c_parser_oacc_clause_use_device): New function.
2572 (c_parser_oacc_all_clauses): Add use_device support.
2573 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2574 (c_parser_oacc_host_data): New function.
2575 (c_parser_omp_construct): Add host_data support.
2576 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2577 * c-typeck.c (c_finish_oacc_host_data): New function.
2578 (c_finish_omp_clauses): Add use_device support.
2579
a4850ce9
JH
25802015-11-29 Jan Hubicka <hubicka@ucw.cz>
2581
2582 PR c/67106
2583 * c-decl.c: Set TYPE_PACKED in variants.
2584
b58d3df2
ML
25852015-11-27 Martin Liska <mliska@suse.cz>
2586
2587 PR c++/68312
2588 * c-array-notation.c (fix_builtin_array_notation_fn):
2589 Use release_vec_vec instead of vec::release.
2590 (build_array_notation_expr): Likewise.
2591 (fix_conditional_array_notations_1): Likewise.
2592 (fix_array_notation_expr): Likewise.
2593 (fix_array_notation_call_expr): Likewise.
2594
aec17bfe
JJ
25952015-11-27 Jakub Jelinek <jakub@redhat.com>
2596
2597 PR c/63326
2598 * c-parser.c (c_parser_compound_statement_nostart): If
2599 last_label is true, use pragma_stmt instead of pragma_compound
2600 as second c_parser_pragma argument.
2601 (c_parser_omp_ordered, c_parser_omp_target_update,
2602 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2603 false as second argument to c_parser_skip_to_pragma_eol after
2604 diagnosing standalone directives used in pragma_stmt context.
2605
688c4de0
IV
26062015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2607
2608 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2609 with "if (ENABLE_OFFLOADING)".
2610
cbd03aee
DM
26112015-11-23 David Malcolm <dmalcolm@redhat.com>
2612
2613 PR objc/68438
2614 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2615 for various Objective-C constructs: Class.name syntax,
2616 @selector(), @protocol(), @encode(), and [] message syntax.
2617
a87a86e1
DM
26182015-11-20 David Malcolm <dmalcolm@redhat.com>
2619
2620 PR 62314
2621 * c-typeck.c (should_suggest_deref_p): New function.
2622 (build_component_ref): Special-case POINTER_TYPE when
2623 generating a "not a structure of union" error message, and
2624 suggest a "->" rather than a ".", providing a fix-it hint.
2625
8ece8dfb
DM
26262015-11-19 David Malcolm <dmalcolm@redhat.com>
2627
2628 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2629 candidate into a new function, find_closest_identifier.
2630
433068cc
MP
26312015-11-19 Marek Polacek <polacek@redhat.com>
2632
2633 PR c/68412
2634 * c-typeck.c (parser_build_binary_op): Properly handle
2635 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2636
bef08b71
DM
26372015-11-17 David Malcolm <dmalcolm@redhat.com>
2638
2639 * c-parser.c (set_c_expr_source_range): Bulletproof both
2640 overloaded implementations against NULL expr->value.
2641 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2642 values.
2643 (c_parser_unary_expression): Likewise when handling addresses of
2644 labels.
2645 (c_parser_postfix_expression): Likewise for statement expressions,
2646 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2647 __builtin_va_arg, and for __builtin_offset_of.
2648 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2649 src_range using the range of the braced initializer.
2650 (c_parser_transaction_expression): Set src_range for "ret" to a
2651 sane pair of values.
2652
fff77217
KY
26532015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2654
2655 * c-parser.c (c_finish_omp_declare_simd): Look for
2656 "simd" attribute as well. Update error message.
2657
1d899da2
TS
26582015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2659
2660 * c-parser.c (c_parser_omp_declare_target): Adjust.
2661
e4606348
JJ
26622015-11-14 Jakub Jelinek <jakub@redhat.com>
2663
2664 * c-typeck.c (c_finish_omp_clauses): Don't mark
2665 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2666
3e636daf
MP
26672015-11-14 Marek Polacek <polacek@redhat.com>
2668
2669 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2670 * c-typeck.c: Likewise.
2671
ebedc9a3
DM
26722015-11-13 David Malcolm <dmalcolm@redhat.com>
2673
2674 * c-decl.c (warn_defaults_to): Pass line_table to
2675 rich_location ctor.
2676 * c-errors.c (pedwarn_c99): Likewise.
2677 (pedwarn_c90): Likewise.
2678 * c-parser.c (set_c_expr_source_range): New functions.
2679 (c_token::get_range): New method.
2680 (c_token::get_finish): New method.
2681 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2682 based on the range from the start of the LHS to the end of the
2683 RHS.
2684 (c_parser_conditional_expression): Likewise, based on the range
2685 from the start of the cond.value to the end of exp2.value.
2686 (c_parser_binary_expression): Call set_c_expr_source_range on
2687 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2688 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2689 based on the cast_loc through to the end of the expr.
2690 (c_parser_unary_expression): Likewise, based on the
2691 op_loc through to the end of op.
2692 (c_parser_sizeof_expression) Likewise, based on the start of the
2693 sizeof token through to either the closing paren or the end of
2694 expr.
2695 (c_parser_postfix_expression): Likewise, using the token range,
2696 or from the open paren through to the close paren for
2697 parenthesized expressions.
2698 (c_parser_postfix_expression_after_primary): Likewise, for
2699 various kinds of expression.
2700 * c-tree.h (struct c_expr): Add field "src_range".
2701 (c_expr::get_start): New method.
2702 (c_expr::get_finish): New method.
2703 (set_c_expr_source_range): New decls.
2704 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2705 on ret for prefix unary ops.
2706 (parser_build_binary_op): Likewise, running from the start of
2707 arg1.value through to the end of arg2.value.
2708
ec8b536f
MP
27092015-11-13 Marek Polacek <polacek@redhat.com>
2710
2711 PR c/68320
2712 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2713
277fe616
DM
27142015-11-13 David Malcolm <dmalcolm@redhat.com>
2715
2716 * c-typeck.c: Include spellcheck.h.
2717 (lookup_field_fuzzy_find_candidates): New function.
2718 (lookup_field_fuzzy): New function.
2719 (build_component_ref): If the field was not found, try using
2720 lookup_field_fuzzy and potentially offer a suggestion.
2721
6e232ba4
JN
27222015-11-12 James Norris <jnorris@codesourcery.com>
2723 Joseph Myers <joseph@codesourcery.com>
2724
2725 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2726 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2727 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2728 and PRAGMA_OMP_CLAUSE_LINK.
2729 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2730 and PRAGMA_OACC_CLAUSE_LINK.
2731 (OACC_DECLARE_CLAUSE_MASK): New definition.
2732 (c_parser_oacc_declare): New function.
2733
9be4f715
MP
27342015-11-12 Marek Polacek <polacek@redhat.com>
2735
2736 PR c/67784
2737 * c-parser.c (c_parser_for_statement): Reclassify the token in
2738 a correct scope.
2739
e78bede6
MP
27402015-11-11 Marek Polacek <polacek@redhat.com>
2741
2742 PR c/68107
2743 PR c++/68266
2744 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2745 checking the size of an array.
2746
69f293c9
AM
27472015-11-11 Andrew MacLeod <amacleod@redhat.com>
2748
2749 * c-array-notation.c: Remove unused header files.
2750 * c-aux-info.c: Likewise.
2751 * c-convert.c: Likewise.
2752 * c-decl.c: Likewise.
2753 * c-errors.c: Likewise.
2754 * c-lang.c: Likewise.
2755 * c-objc-common.c: Likewise.
2756 * c-parser.c: Likewise.
2757 * c-typeck.c: Likewise.
2758 * gccspec.c: Likewise.
2759
3a40d81d
NS
27602015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2761 Cesar Philippidis <cesar@codesourcery.com>
2762 James Norris <jnorris@codesourcery.com>
2763 Julian Brown <julian@codesourcery.com>
2764 Nathan Sidwell <nathan@codesourcery.com>
2765
2766 c/
2767 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2768 routine arg.
2769 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2770 (c_parser_pragma): Parse 'acc routine'.
2771 (OACC_ROUTINE_CLAUSE_MARK): Define.
2772 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2773
fc402eec
AA
27742015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2775
2776 PR debug/67192
2777 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2778 location of the backward-goto to the start of the loop body.
2779
f6b0b3db
AA
27802015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2781
2782 PR debug/67192
2783 * c-parser.c (c_parser_while_statement): Finish the loop before
2784 parsing ahead for misleading indentation.
2785 (c_parser_for_statement): Likewise.
2786
ee45a32d
EB
27872015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2788
2789 * c-decl.c (finish_struct): If the structure has reverse storage
2790 order, rewrite the type of array fields with scalar component. Call
2791 maybe_apply_pragma_scalar_storage_order on entry.
2792 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2793 errors on bit-fields and reverse SSO here and not...
2794 (c_mark_addressable): ...here.
2795 (output_init_element): Adjust call to initializer_constant_valid_p.
2796 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2797
8a645150
DM
27982015-11-06 David Malcolm <dmalcolm@redhat.com>
2799
2800 * c-decl.c (warn_defaults_to): Update for change in signature
2801 of diagnostic_set_info.
2802 * c-errors.c (pedwarn_c99): Likewise.
2803 (pedwarn_c90): Likewise.
2804 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2805 for textinfo::set_location.
2806
7a5e4956
CP
28072015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2808 Thomas Schwinge <thomas@codesourcery.com>
2809 James Norris <jnorris@codesourcery.com>
2810
2811 * c-parser.c (c_parser_omp_clause_name): Add support for
2812 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2813 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2814 default(none) in OpenACC.
2815 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2816 arguments.
2817 (c_parser_oacc_clause_tile): New function.
2818 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2819 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2820 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2821 TILE}.
2822 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2823 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2824 FIRSTPRIVATE}.
2825 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2826 (c_parser_oacc_update): Update the error message for missing clauses.
2827 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2828 and OMP_CLAUSE_INDEPENDENT.
2829
bfcfbfa0
MP
28302015-11-05 Marek Polacek <polacek@redhat.com>
2831
2832 PR c/68090
2833 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2834 deal with pre-evaluation on invalid types.
2835
e01d41e5
JJ
28362015-11-05 Jakub Jelinek <jakub@redhat.com>
2837 Ilya Verbin <ilya.verbin@intel.com>
2838
2839 * c-parser.c: Include context.h and gimple-expr.h.
2840 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2841 monotonic together with nonmonotonic.
2842 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2843 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2844 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2845 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2846 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2847 expressions on combined target teams before the target.
2848 (c_parser_omp_declare_target): If decl has "omp declare target" or
2849 "omp declare target link" attribute, and cgraph or varpool node already
2850 exists, then set corresponding flags. Call c_finish_omp_clauses
2851 in the parenthesized extended-list syntax case.
2852 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2853 declare target.
2854 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2855 on OMP_CLAUSE_REDUCTION array sections.
2856 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2857 into the constant offset, or for variable low-bound using
2858 POINTER_PLUS_EXPR. For structure element based array sections use
2859 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2860 (c_finish_omp_clauses): Drop generic_field_head, structure
2861 elements are now always mapped even as array section bases,
2862 diagnose same var in data sharing and mapping clauses. Diagnose if
2863 linear step on declare simd is neither a constant nor a uniform
2864 parameter. Look through POINTER_PLUS_EXPR for array section
2865 reductions. Diagnose the same var or function appearing multiple
2866 times on the same directive. Fix up wording for the to clause if t
2867 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2868 modifier on kinds other than dynamic or guided or nonmonotonic
2869 modifier together with ordered clause.
2870
4bf9e5a8
TS
28712015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2872 Chung-Lin Tang <cltang@codesourcery.com>
2873
2874 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2875
2adfab87
AM
28762015-10-29 Andrew MacLeod <amacleod@redhat.com>
2877
2878 * c-array-notation.c: Reorder #include's and remove duplicates.
2879 * c-aux-info.c: Likewise.
2880 * c-convert.c: Likewise.
2881 * c-decl.c: Likewise.
2882 * c-errors.c: Likewise.
2883 * c-lang.c: Likewise.
2884 * c-objc-common.c: Likewise.
2885 * c-parser.c: Likewise.
2886 * c-typeck.c: Likewise.
2887
e922069e
JW
28882015-10-26 Jim Wilson <jim.wilson@linaro.org>
2889
2890 PR debug/66068
2891 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2892 after calling build_qualified_type.
2893
765dd391
CP
28942015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2895 Thomas Schwinge <thomas@codesourcery.com>
2896 James Norris <jnorris@codesourcery.com>
2897 Joseph Myers <joseph@codesourcery.com>
2898 Julian Brown <julian@codesourcery.com>
2899 Bernd Schmidt <bschmidt@redhat.com>
2900
2901 * c-parser.c (c_parser_oacc_shape_clause): New.
2902 (c_parser_oacc_simple_clause): New.
2903 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2904 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2905
88bae6f4
TS
29062015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2907 James Norris <jnorris@codesourcery.com>
2908 Cesar Philippidis <cesar@codesourcery.com>
2909
2910 PR c/64765
2911 PR c/64880
2912 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2913 parameters, and handle these. Adjust all users.
2914 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2915 into...
2916 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2917 all users.
2918 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2919 declare functions.
2920 (c_finish_omp_construct): Declare function.
2921 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2922 Merge functions into...
2923 (c_finish_omp_construct): ... this new function.
2924
a8fc2579
RB
29252015-10-22 Richard Biener <rguenther@suse.de>
2926
2927 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2928 before folding a MINUS_EXPR.
2929
e9122ef6
MP
29302015-10-21 Marek Polacek <polacek@redhat.com>
2931
2932 PR c/68024
2933 * c-decl.c (start_function): Warn about vararg functions without
2934 a prototype.
2935
9f47c7e5
IE
29362015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2937
2938 * c-typeck.c (build_conditional_expr): Use boolean vector
2939 type for vector comparison.
2940 (build_vec_cmp): New.
2941 (build_binary_op): Use build_vec_cmp for comparison.
2942
fa60eeb9
MP
29432015-10-20 Marek Polacek <polacek@redhat.com>
2944
2945 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2946
2c7020eb
MP
29472015-10-20 Marek Polacek <polacek@redhat.com>
2948
2949 PR c/67964
2950 * c-parser.c (c_parser_attributes): Break out of the loop if the
2951 token after an attribute isn't a comma.
2952
d9a6bd32
JJ
29532015-10-13 Jakub Jelinek <jakub@redhat.com>
2954 Aldy Hernandez <aldyh@redhat.com>
2955
2956 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2957 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2958 (c_parser_omp_variable_list): Handle structure elements for
2959 map, to and from clauses. Handle array sections in reduction
2960 clause. Formatting fixes.
2961 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2962 if clause modifiers.
2963 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2964 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2965 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2966 c_parser_omp_clause_is_device_ptr): New functions.
2967 (c_parser_omp_clause_ordered): Parse optional parameter.
2968 (c_parser_omp_clause_reduction): Handle array reductions.
2969 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2970 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2971 functions.
2972 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2973 (c_parser_omp_clause_depend_sink): New function.
2974 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2975 (c_parser_omp_clause_map): Parse release/delete map kinds and
2976 optional always modifier.
2977 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2978 and c_finish_omp_clauses callers.
2979 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2980 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2981 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2982 (OMP_CRITICAL_CLAUSE_MASK): Define.
2983 (c_parser_omp_critical): Parse critical clauses.
2984 (c_parser_omp_for_loop): Handle doacross loops, adjust
2985 c_finish_omp_for and c_finish_omp_clauses callers.
2986 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2987 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2988 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2989 (c_parser_omp_for): Disallow ordered clause when combined with
2990 distribute. Disallow linear clause when combined with distribute
2991 and not combined with simd.
2992 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2993 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2994 parse clauses and if depend clause is found, don't parse a body.
2995 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2996 Allow target parallel without for after it.
2997 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2998 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2999 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3000 invalid kinds.
3001 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3002 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3003 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3004 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3005 functions.
3006 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3007 defaultmap and is_device_ptr clauses.
3008 (c_parser_omp_target): Parse target parallel and target simd. Set
3009 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3010 and target exit data. Diagnose invalid map kinds.
3011 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3012 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3013 construct.
3014 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3015 &omp_priv.
3016 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3017 (c_parser_omp_taskloop): New function.
3018 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3019 handle PRAGMA_OMP_TASKLOOP.
3020 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3021 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3022 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3023 Add IS_OMP argument, handle structure element bases, diagnose
3024 bitfields, pass IS_OMP recursively, diagnose known zero length
3025 array sections in depend clauses, handle array sections in reduction
3026 clause, diagnose negative length even for pointers.
3027 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3028 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3029 array sections in reduction clause, set
3030 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3031 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3032 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3033 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3034
21ba0cea
MP
30352015-10-06 Marek Polacek <polacek@redhat.com>
3036
3037 * c-parser.c (c_parser_statement_after_labels): Use
3038 protected_set_expr_location.
3039 (c_parser_omp_clause_num_gangs): Likewise.
3040 (c_parser_omp_clause_num_threads): Likewise.
3041 (c_parser_omp_clause_num_workers): Likewise.
3042 (c_parser_omp_clause_vector_length): Likewise.
3043 (c_parser_omp_clause_num_teams): Likewise.
3044 (c_parser_omp_clause_thread_limit): Likewise.
3045 * c-typeck.c (build_c_cast): Likewise.
3046 (c_cast_expr): Likewise.
3047
624d31fe
RS
30482015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3049
3050 * c-typeck.c (c_tree_equal): Use real_equal instead of
3051 REAL_VALUES_EQUAL.
3052
b8fd7909
JM
30532015-10-04 Jason Merrill <jason@redhat.com>
3054
3055 * c-parser.c (c_lex_one_token): Handle @synchronized.
3056 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3057 can change whether the function is transaction_safe.
3058
1c7485af
MP
30592015-10-02 Marek Polacek <polacek@redhat.com>
3060
3061 PR c/67730
3062 * c-typeck.c (convert_for_assignment): Use the expansion point
3063 location throughout.
3064
3e3b8d63
MP
30652015-10-02 Marek Polacek <polacek@redhat.com>
3066
3067 PR c/64249
3068 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3069 and pass it down to c_parser_if_statement.
3070 (c_parser_else_body): Add CHAIN parameter and pass it down to
3071 c_parser_statement_after_labels.
3072 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3073 duplicated if-else-if conditions.
3074
aabef2de
MP
30752015-10-01 Marek Polacek <polacek@redhat.com>
3076
3077 * c-typeck.c (convert_for_assignment): Improve commentary.
3078
de8ddd5f
MP
30792015-09-30 Marek Polacek <polacek@redhat.com>
3080
3081 PR c/67730
3082 * c-typeck.c (c_finish_return): Use the expansion point location for
3083 certain "return with value" warnings.
3084
c4914de6
MLI
30852015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3086
3087 * c-parser.c (pragma_lex): Add loc argument.
3088
0e36f5c7
MP
30892015-09-15 Marek Polacek <polacek@redhat.com>
3090
3091 PR c/67580
3092 * c-decl.c (tag_exists_p): New function.
3093 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3094 struct/union/enum keywords are missing.
3095 * c-tree.h (tag_exists_p): Declare.
3096
2f3bb934
MP
30972015-09-15 Marek Polacek <polacek@redhat.com>
3098
3099 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3100 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3101 Return NULL_TREE instead of 0.
3102 (lookup_name): Return NULL_TREE instead of 0.
3103 (lookup_name_in_scope): Likewise.
3104 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3105 (parser_xref_tag): Use false instead of 0.
3106 (start_struct): Use true instead of 1.
3107 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3108
aa256c4a
MP
31092015-09-14 Marek Polacek <polacek@redhat.com>
3110
3111 * c-typeck.c (set_nonincremental_init_from_string): Use
3112 HOST_WIDE_INT_M1U when shifting a negative value.
3113
dbb68221
MW
31142015-09-09 Mark Wielaard <mjw@redhat.com>
3115
3116 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3117 parm against NULL.
3118
a8a098ac
JJ
31192015-09-10 Jakub Jelinek <jakub@redhat.com>
3120
3121 PR c/67502
3122 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3123 into OMP_FOR_PRE_BODY rather than before the loop.
3124
f4b189d5
JJ
31252015-09-09 Jakub Jelinek <jakub@redhat.com>
3126
0bb99c11
JJ
3127 PR c/67501
3128 * c-parser.c (c_parser_oacc_all_clauses,
3129 c_parser_omp_all_clauses): Remove invalid clause from
3130 list of clauses even if parser->error is set.
3131
fce5e5e3
JJ
3132 PR c/67500
3133 * c-parser.c (c_parser_omp_clause_aligned,
3134 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3135 test for errors.
3136 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3137 error_mark_node.
3138
f4b189d5
JJ
3139 PR c/67495
3140 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3141 instead of c_parser_unary_expression. If the result is !lvalue_p,
3142 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3143
b2aaf235
MP
31442015-09-04 Marek Polacek <polacek@redhat.com>
3145
3146 PR sanitizer/67279
3147 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3148
1807ffc1
MS
31492015-09-03 Martin Sebor <msebor@redhat.com>
3150
3151 PR c/66516
8b652e65
JJ
3152 * c-typeck.c (convert_arguments, parser_build_unary_op,
3153 build_conditional_expr, c_cast_expr, convert_for_assignment,
3154 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3155 reject_gcc_builtin.
3156 (c_decl_implicit): Define.
3157
d04ff417
MP
31582015-09-02 Marek Polacek <polacek@redhat.com>
3159
3160 PR c/67432
3161 * c-parser.c (c_parser_enum_specifier): Give a better error for
3162 an empty enum.
3163
a79683d5
TS
31642015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3165
3166 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3167
191a6b94
MP
31682015-08-12 Marek Polacek <polacek@redhat.com>
3169
3170 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3171 LOC to it.
3172
420a9d9b
MP
31732015-08-03 Marek Polacek <polacek@redhat.com>
3174
3175 PR c/67088
3176 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3177 Use it.
3178 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3179
992118a1
PP
31802015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3181
3182 * c-parser.c (c_parser_if_body): Take token_indent_info
3183 argument. Call warn_for_misleading_indentation even when the
3184 body is a semicolon. Extract token_indent_infos corresponding
3185 to the guard, body and next tokens. Adjust call to
3186 warn_for_misleading_indentation accordingly.
3187 (c_parser_else_body): Likewise.
3188 (c_parser_if_statement): Likewise.
3189 (c_parser_while_statement): Likewise.
3190 (c_parser_for_statement): Likewise.
3191
46308474
LFSM
31922015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3193 Manuel López-Ibáñez <manu@gcc.gnu.org>
3194
3195 * c-decl.c (get_parm_info): Remove static var. Update warning
3196 message.
3197
05b28fd6
MP
31982015-07-27 Marek Polacek <polacek@redhat.com>
3199
3200 PR c++/66555
3201 PR c/54979
3202 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3203
451b5e48
MP
32042015-07-20 Marek Polacek <polacek@redhat.com>
3205
3206 PR c++/55095
3207 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3208 (build_binary_op): Warn about left shift overflows.
3209
1916bcb5
AM
32102015-07-09 Andrew MacLeod <amacleod@redhat.com>
3211
3212 * c-array-notation.c: Adjust includes for flags.h changes.
3213 * c-objc-common.c: Likewise.
3214
c7131fb2
AM
32152015-07-07 Andrew MacLeod <amacleod@redhat.com>
3216
3217 * c-array-notation.c: Adjust includes.
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
da2e71c9
MLI
32272015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3228
3229 PR fortran/66605
3230 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3231
b155cfd9
MP
32322015-06-29 Marek Polacek <polacek@redhat.com>
3233
3234 PR c/66322
3235 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3236 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3237 about -Wswitch-bool here.
3238 (do_case): Update c_add_case_label call.
3239 (c_finish_case): Update c_do_switch_warnings call.
3240
31521951
MP
32412015-06-27 Marek Polacek <polacek@redhat.com>
3242
3243 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3244
22d03525
MP
32452015-06-26 Marek Polacek <polacek@redhat.com>
3246
3247 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3248 INDIRECT_REF_P.
3249 * c-typeck.c (array_to_pointer_conversion): Likewise.
3250 (build_unary_op): Likewise.
3251 (c_finish_return): Likewise.
3252
f0889939
AM
32532015-06-25 Andrew MacLeod <amacleod@redhat.com>
3254
3255 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3256 * c-parser.c: Likewise.
3257
8d67ee55
RS
32582015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3259
3260 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3261 instead of pointer_hash.
3262 (detect_field_duplicates): Likewise.
3263
0ae9bd27
MP
32642015-06-25 Marek Polacek <polacek@redhat.com>
3265
3266 * c-array-notation.c: Use VAR_P throughout.
3267 * c-decl.c: Likewise.
3268 * c-objc-common.c: Likewise.
3269 * c-parser.c: Likewise.
3270 * c-typeck.c: Likewise.
3271
62f9079a
MP
32722015-06-25 Marek Polacek <polacek@redhat.com>
3273
3274 * c-decl.c: Use is_global_var throughout.
3275 * c-parser.c: Likewise.
3276 * c-typeck.c: Likewise.
3277
abb226c9
AM
32782015-06-17 Andrew MacLeod <amacleod@redhat.com>
3279
3280 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3281 * c-aux-info.c: Likewise.
3282 * c-convert.c: Likewise.
3283 * c-decl.c: Likewise.
3284 * c-errors.c: Likewise.
3285 * c-lang.c: Likewise.
3286 * c-objc-common.c: Likewise.
3287 * c-parser.c: Likewise.
3288 * c-typeck.c: Likewise.
3289
8cbababc
JH
32902015-06-11 Jan Hubicka <hubicka@ucw.cz>
3291
3292 PR middle-end/66325
3293 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3294 variants.
3295
a0349665
PMR
32962015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3297
3298 * c-decl.c (pop_scope): Register the main translation unit
3299 through the new debug hook.
3300
13fdf2e2
AM
33012015-06-08 Andrew MacLeod <amacleod@redhat.com>
3302
3303 * c-array-notation.c : Adjust include files.
3304 * c-aux-info.c : Likewise.
3305 * c-convert.c : Likewise.
3306 * c-decl.c : Likewise.
3307 * c-errors.c : Likewise.
3308 * c-lang.c : Likewise.
3309 * c-lang.h : Likewise.
3310 * c-objc-common.c : Likewise.
3311 * c-parser.c : Likewise.
3312 * c-typeck.c : Likewise.
3313
d7438551
AH
33142015-06-05 Aldy Hernandez <aldyh@redhat.com>
3315
3316 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3317 immediately clobber it.
3318 (c_write_global_declarations_1): Remove call to
3319 check_global_declaration_1.
3320 (c_write_global_declarations_2): Remove.
3321 (c_write_final_cleanups): Rename from c_write_global_declarations.
3322 Remove call to finalize_compilation_unit.
3323 Remove calls to debugging hooks.
3324 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3325 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3326 * c-tree.h: Remove c_write_global_declarations.
3327
ecb9f223
AM
33282015-06-04 Andrew MacLeod <amacleod@redhat.com>
3329
3330 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3331 * c-aux-info.c: Likewise.
3332 * c-convert.c: Likewise.
3333 * c-decl.c: Likewise.
3334 * c-errors.c: Likewise.
3335 * c-lang.c: Likewise.
3336 * c-objc-common.c: Likewise.
3337 * c-parser.c: Likewise.
3338 * c-typeck.c: Likewise.
3339
9482b620
MP
33402015-06-04 Marek Polacek <polacek@redhat.com>
3341
3342 PR c/66341
3343 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3344 it is a lvalue.
3345
bc51ace3
PK
33462015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3347
3348 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3349 Warn for empty struct.
3350 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3351
ea5b45b6
AT
33522015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3353
3354 * c-decl.c (start_function): Call plugin before parsing.
3355 (finish_function): Call plugin after parsing.
3356
c2d47482
PK
33572015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3358
3359 PR c/49551
3360 * c-decl.c (merge_decls): Merge DECL_COMMON.
3361
a95492ab
JW
33622015-05-22 Jim Wilson <jim.wilson@linaro.org>
3363
3364 * Make-lang.in (check_gcc_pallelize): Define.
3365
fd5c817a
MP
33662015-05-22 Marek Polacek <polacek@redhat.com>
3367
3368 PR c/47043
3369 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3370 attributes.
3371
c7b70a3c
MP
33722015-05-21 Marek Polacek <polacek@redhat.com>
3373
3374 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3375 DECL_BUILT_IN.
3376
21b634ae
MP
33772015-05-20 Marek Polacek <polacek@redhat.com>
3378
3379 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3380 * c-typeck.c: Likewise.
3381
296a8c2f
MP
33822015-05-19 Marek Polacek <polacek@redhat.com>
3383
3384 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3385
41b37d5e
JJ
33862015-05-19 Jakub Jelinek <jakub@redhat.com>
3387
3388 PR middle-end/66199
3389 * c-parser.c (c_parser_omp_for_loop): Don't add
3390 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3391 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3392 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3393 constructs.
3394
fab27f52
MM
33952015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3396
3397 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3398 swaps.
fab27f52 3399
40de31cf
MLI
34002015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3401
3402 PR fortran/44054
3403 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3404 accessor function.
3405
3aa3c9fc
MP
34062015-05-14 Marek Polacek <polacek@redhat.com>
3407
3408 PR c/66066
3409 PR c/66127
3410 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3411 rather than with 0.
3412
c3388e62
DM
34132015-05-12 David Malcolm <dmalcolm@redhat.com>
3414
3415 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3416 to add a call to warn_for_misleading_indentation.
3417 (c_parser_else_body): Likewise, adding param "else_loc".
3418 (c_parser_if_statement): Check for misleading indentation.
3419 (c_parser_while_statement): Likewise.
3420 (c_parser_for_statement): Likewise.
3421
755e528f
MP
34222015-05-08 Marek Polacek <polacek@redhat.com>
3423
3424 PR c/64918
3425 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3426 (output_init_element): Likewise.
3427
0173bd2a
MP
34282015-05-07 Marek Polacek <polacek@redhat.com>
3429
3430 PR c/65179
3431 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3432 value.
3433
9babc352
MP
34342015-04-30 Marek Polacek <polacek@redhat.com>
3435
3436 * c-typeck.c (set_init_label): Call error_at instead of error and
3437 pass LOC to it.
3438
ac9f18db
MP
3439 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3440 the type of a decl.
3441
ec3fba51
MP
3442 * c-typeck.c (c_build_va_arg): Clarify the error message.
3443
b811915d
TS
34442015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3445
3446 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3447 OMP_STANDALONE_CLAUSES.
3448
f3075008
MP
34492015-04-28 Marek Polacek <polacek@redhat.com>
3450
3451 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3452
4e81b788
MP
34532015-04-28 Marek Polacek <polacek@redhat.com>
3454
3455 PR c/65901
3456 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3457
6c1db78e
MP
34582015-04-25 Marek Polacek <polacek@redhat.com>
3459
3460 PR c/52085
3461 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3462 attribute.
3463
5c4abbb8
MP
34642015-04-23 Marek Polacek <polacek@redhat.com>
3465
3466 PR c/65345
3467 * c-decl.c (set_labels_context_r): New function.
3468 (store_parm_decls): Call it via walk_tree_without_duplicates.
3469 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3470 instead of create_tmp_var. Build TARGET_EXPR instead of
3471 COMPOUND_EXPR.
3472 (build_atomic_assign): Use create_tmp_var_raw instead of
3473 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3474
06aca1d5
IV
34752015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3476
3477 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3478 (c_parser_omp_target_update): Add missed %> to error_at ().
3479
8fba1830
BRF
34802015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3481
3482 PR target/55143
3483 * c-decl.c (c_default_pointer_mode): Remove definition.
3484 * c-tree.h (c_default_pointer_mode): Remove declaration.
3485
62021f64
TB
34862015-03-27 Tobias Burnus <burnus@net-b.de>
3487
3488 PR c/65586
3489 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3490 error out.
3491 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3492 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3493 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3494
9b65e171
JJ
34952015-03-19 Jakub Jelinek <jakub@redhat.com>
3496
3497 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3498 attribute for DECL_EXTERNAL VAR_DECLs.
3499
17958621
JJ
35002015-03-11 Jakub Jelinek <jakub@redhat.com>
3501
3502 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3503 argument.
3504
7ccb1a11
JJ
35052015-03-10 Jakub Jelinek <jakub@redhat.com>
3506
3507 PR c/65120
3508 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3509 before preparing arguments to warn_logical_not_parentheses.
3510
01177669
JJ
35112015-03-09 Jakub Jelinek <jakub@redhat.com>
3512
3513 PR c/65120
3514 * c-typeck.c (parser_build_binary_op): Don't warn for
3515 !!x == y or !b == y where b is _Bool.
3516
802ac282
MP
35172015-03-09 Marek Polacek <polacek@redhat.com>
3518
3519 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3520 * c-decl.c (grokdeclarator): Likewise.
3521 * c-typeck.c (build_binary_op): Likewise.
3522
e5165b60
MP
35232015-02-27 Marek Polacek <polacek@redhat.com>
3524
3525 PR c/65228
3526 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3527
065d214c
MP
35282015-02-14 Marek Polacek <polacek@redhat.com>
3529
3530 PR c/64768
3531 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3532 declared through a typedef name.
3533
e5d9235b
MP
35342015-02-13 Marek Polacek <polacek@redhat.com>
3535
3536 PR c/65050
3537 * c-decl.c (grokdeclarator): Print also the type when giving
3538 the error message about array's incomplete element type.
3539
fa01ffcc
JJ
35402015-02-11 Jakub Jelinek <jakub@redhat.com>
3541
3542 PR c/64824
3543 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3544 check in the POP macro.
3545
c3e38a03
MP
35462015-02-09 Marek Polacek <polacek@redhat.com>
3547
3548 PR c/64856
3549 * c-typeck.c (process_init_element): Don't always wrap
3550 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3551 initializing a range of elements.
3552
4886ec8e
JJ
35532015-02-04 Jakub Jelinek <jakub@redhat.com>
3554
3555 PR c/64824
3556 PR c/64868
3557 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3558
c3e38a03 35592015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3560
3561 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3562 processing enum declaration.
3563
7b33f0c8
MP
35642015-01-29 Marek Polacek <polacek@redhat.com>
3565
3566 PR c/64709
3567 * c-typeck.c (pop_init_level): If constructor_elements has
3568 exactly one element with integer_zerop value, set constructor_zeroinit
3569 to 1. Remove braces around warning_init call.
3570
dea63e49
JJ
35712015-01-27 Jakub Jelinek <jakub@redhat.com>
3572
3573 PR c/64766
3574 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3575 of FUNCTION_DECLs with error_mark_node.
3576
d38f7dce
JJ
35772015-01-26 Jakub Jelinek <jakub@redhat.com>
3578
3579 PR c/64778
3580 * c-typeck.c (convert_arguments): Return -1 if there are
3581 error_args, even if we've diagnosed too many arguments.
3582
cbf5d0e7
RB
35832015-01-21 Richard Biener <rguenther@suse.de>
3584
3585 PR middle-end/64313
3586 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3587 for builtins the user declared correctly.
3588
41dbbb37
TS
35892015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3590 Bernd Schmidt <bernds@codesourcery.com>
3591 Cesar Philippidis <cesar@codesourcery.com>
3592 James Norris <jnorris@codesourcery.com>
3593 Jakub Jelinek <jakub@redhat.com>
3594 Ilmir Usmanov <i.usmanov@samsung.com>
3595
3596 * c-parser.c: Include "gomp-constants.h".
3597 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3598 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3599 Use OMP_CLAUSE_SET_MAP_KIND.
3600 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3601 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3602 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3603 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3604 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3605 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3606 "copyout", "create", "delete", "deviceptr", "gang", "host",
3607 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3608 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3609 "present_or_create", "pcreate", "seq", "self", "vector",
3610 "vector_length", "wait", "worker".
3611 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3612 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3613 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3614 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3615 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3616 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3617 (c_parser_oacc_data_clause_deviceptr)
3618 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3619 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3620 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3621 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3622 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3623 (c_parser_oacc_parallel, c_parser_oacc_update)
3624 (c_parser_oacc_wait): New functions.
3625 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3626 (c_finish_oacc_data): New prototypes.
3627 * c-typeck.c: Include "gomp-constants.h".
3628 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3629 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3630 OMP_CLAUSE_SET_MAP_KIND.
3631 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3632 (c_finish_oacc_data): New functions.
3633 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3634 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3635 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3636 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3637 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3638 GOMP_MAP_FORCE_DEVICEPTR.
3639
adfac8df
JJ
36402015-01-09 Michael Collison <michael.collison@linaro.org>
3641
3642 * c-array-notation.c: Include hash-set.h, machmode.h,
3643 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3644 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3645 * c-aux-info.c: Ditto.
3646 * c-convert.c: Ditto.
3647 * c-decl.c: Ditto.
3648 * c-errors.c: Ditto.
3649 * c-lang.c: Dittoxs.
3650 * c-objc-common.c: Ditto.
3651 * c-parser.c: Ditto.
3652 * c-typeck.c: Include hash-set.h, machmode.h,
3653 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3654 fold-const.h, wide-int.h, inchash.h, real.h and
3655 fixed-value.h due to flattening of tree.h.
3656
2cc901dc
MP
36572015-01-07 Marek Polacek <polacek@redhat.com>
3658
3659 PR c/64417
3660 * c-typeck.c (process_init_element): Disallow initialization of
3661 a flexible array member with a string constant if the structure
3662 is in an array.
3663
5624e564
JJ
36642015-01-05 Jakub Jelinek <jakub@redhat.com>
3665
e5341100
JJ
3666 PR sanitizer/64344
3667 * c-typeck.c (convert_for_assignment, c_finish_return): For
3668 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3669 types also set in_late_binary_op around convert call.
3670 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3671 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3672 result on expr as last argument to ubsan_instrument_float_cast,
3673 if in_late_binary_op, don't use c_save_expr but save_expr.
3674
5624e564
JJ
3675 Update copyright years.
3676
5bd012f8
MP
36772015-01-05 Marek Polacek <polacek@redhat.com>
3678
3679 PR c/64423
3680 * c-typeck.c (build_array_ref): Pass loc down to
3681 warn_array_subscript_with_type_char.
3682
3f8257db 36832014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3684
3685 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3686 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3687 element type.
8e745a17 3688 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3689 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3690 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3691 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3692 to PEDWARN_FOR_QUALIFIERS.
768952be 3693
8f94a8c4
JJ
36942014-12-17 Jakub Jelinek <jakub@redhat.com>
3695
3696 PR sanitizer/64289
3697 * c-convert.c: Include ubsan.h.
3698 (convert): For real -> integral casts and
3699 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3700 instead instrument the float cast directly.
3701
b731b390
JJ
37022014-11-29 Jakub Jelinek <jakub@redhat.com>
3703
3704 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3705 c_finish_stmt_expr): Remove NULL last argument from
3706 create_tmp_var_raw and create_tmp_var calls.
3707 * c-array-notation.c (fix_builtin_array_notation_fn,
3708 build_array_notation_expr, fix_conditional_array_notations_1,
3709 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3710
541e35a6
MP
37112014-11-28 Marek Polacek <polacek@redhat.com>
3712
3713 PR c/63862
3714 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3715 convert the right operand to integer type.
3716
b286be94
MP
37172014-11-25 Marek Polacek <polacek@redhat.com>
3718
3719 PR c/63877
3720 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3721 for inline functions.
3722
aa7da51a
JJ
37232014-11-21 Jakub Jelinek <jakub@redhat.com>
3724
3725 PR target/63764
3726 * c-typeck.c (build_array_ref): Adjust
3727 convert_vector_to_pointer_for_subscript caller. If it returns true,
3728 call non_lvalue_loc on the result.
3729
d876207f
RB
37302014-11-11 Richard Biener <rguenther@suse.de>
3731
3732 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3733 to true.
3734
e5e44252
AK
37352014-11-10 Andi Kleen <ak@linux.intel.com>
3736
3737 PR c/60804
3738 * c-parser.c (c_parser_statement_after_labels): Call
3739 check_no_cilk.
3740 (c_parser_if_statement): Dito.
3741 (c_parser_switch_statement): Dito.
3742 (c_parser_while_statement): Dito.
3743 (c_parser_do_statement): Dito.
3744 (c_parser_for_statement): Dito.
3745 * c-typeck.c (c_finish_loop): Dito.
3746
13c21655
PC
37472014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3748
3749 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3750 OPT_Wshift_count_overflow in the warnings.
3751
2d51fcef
MP
37522014-10-30 Marek Polacek <polacek@redhat.com>
3753
3754 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3755 print the stripped version as well, if they're not the same.
3756
ef4bddc2
RS
37572014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3758
3759 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3760 machine_mode.
3761
c582198b
AM
37622014-10-28 Andrew MacLeod <amacleod@redhat.com>
3763
3764 * c-decl.c: Adjust include files.
3765 * c-parser.c: Ditto.
3766
ddc8de03
PM
37672014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3768 Tom Tromey <tromey@redhat.com>
3769
3770 * c-tree.h (enum c_oracle_request): New.
3771 (c_binding_oracle_function): New typedef.
3772 (c_binding_oracle, c_pushtag, c_bind): Declare.
3773 * c-decl.c (c_binding_oracle): New global.
3774 (I_SYMBOL_CHECKED): New macro.
3775 (i_symbol_binding): New function.
3776 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3777 (I_TAG_CHECKED): New macro.
3778 (i_tag_binding): New function.
3779 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3780 (I_LABEL_CHECKED): New macro.
3781 (i_label_binding): New function.
3782 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3783 (c_print_identifier): Save and restore c_binding_oracle.
3784 (c_pushtag, c_bind): New functions.
3785
60393bbc
AM
37862014-10-27 Andrew MacLeod <amacleod@redhat.com>
3787
3788 * c-typeck.c: Adjust include files.
3789
d723bb7c
MLI
37902014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3791
3792 PR c++/53061
3793 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3794 initialization here...
3795 (c_initialize_diagnostics): ... but here. Set defaults after
3796 building pretty-printer.
3797
1bc5a451
MP
37982014-10-23 Marek Polacek <polacek@redhat.com>
3799
3800 PR c/63626
3801 * c-decl.c (pop_scope): Don't print warning in external_scope.
3802
4435bb92
MP
38032014-10-19 Marek Polacek <polacek@redhat.com>
3804
3805 PR c/63567
3806 * c-typeck.c (output_init_element): Allow initializing objects with
3807 static storage duration with compound literals even in C99 and add
3808 pedwarn for it.
3809
7278465e
MP
38102014-10-17 Marek Polacek <polacek@redhat.com>
3811
3812 PR c/63567
3813 * c-typeck.c (digest_init): Allow initializing objects with static
3814 storage duration with compound literals even in C99 and add pedwarn
3815 for it.
3816
d9b7be2e
MP
38172014-10-17 Marek Polacek <polacek@redhat.com>
3818
3819 PR c/63543
3820 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3821 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3822 error multiple times. Print the type.
3823
f406ae1f
MP
38242014-10-17 Marek Polacek <polacek@redhat.com>
3825
3826 PR c/63549
3827 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3828 type.
3829
92574c7c
MP
38302014-10-17 Marek Polacek <polacek@redhat.com>
3831
3832 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3833 (start_function): Use OPT_Wimplicit_int instead of 0.
3834 (store_parm_decls_oldstyle): Likewise.
3835
1bc4a978
MT
38362014-10-17 Alan Modra <amodra@gmail.com>
3837
3838 PR middle-end/61848
3839 * c-decl.c (merge_decls): Don't merge section name or tls model
3840 to newdecl symtab node, instead merge to olddecl. Override
3841 existing olddecl section name. Set tls_model for all thread-local
3842 vars, not just OMP thread-private ones. Remove incorrect comment.
3843
83685514
AM
38442014-10-16 Andrew MacLeod <amacleod@redhat.com>
3845
3846 * c-decl.c: Adjust include files.
3847
78a7c317
DD
38482014-10-14 DJ Delorie <dj@redhat.com>
3849
3850 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3851 (c_token_starts_typename): Check all __intN, not just __int128.
3852 (c_token_starts_declspecs): Likewise.
3853 (c_parser_declspecs): Likewise.
3854 (c_parser_attribute_any_word): Likewise.
3855 (c_parser_objc_selector): Likewise.
3856 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3857 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3858 is specified.
3859 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3860 __int128.
3861 (finish_declspecs): Likewise.
3862
74d98c1e
AB
38632014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3864
8e745a17 3865 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3866 the duplicate code.
8e745a17 3867 (c_parser_statement): Call the new function.
74d98c1e 3868
84937de2
MP
38692014-10-09 Marek Polacek <polacek@redhat.com>
3870
3871 PR c/63480
3872 * c-typeck.c (pop_init_level): Don't warn about initializing
3873 with { }.
3874
0382aaa0
MP
38752014-10-07 Marek Polacek <polacek@redhat.com>
3876
3877 PR c/59717
3878 * c-decl.c (header_for_builtin_fn): New function.
3879 (implicitly_declare): Suggest which header to include.
3880
7a0ca710
MP
38812014-10-07 Marek Polacek <polacek@redhat.com>
3882
3883 * c-convert.c (convert): Use error_operand_p.
3884 * c-typeck.c (require_complete_type): Likewise.
3885 (really_atomic_lvalue): Likewise.
3886 (digest_init): Likewise.
3887 (handle_omp_array_sections_1): Likewise.
3888
6bc8a126
MP
38892014-10-03 Marek Polacek <polacek@redhat.com>
3890
3891 PR c/63453
3892 * c-decl.c (pop_scope): Don't warn about "inline function declared
3893 but never defined" for functions marked with gnu_inline attribute.
3894
d90c0a59
JJ
38952014-09-25 Jakub Jelinek <jakub@redhat.com>
3896
3897 PR c++/63249
3898 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3899 on low_bound and length.
3900
083e891e
MP
39012014-09-24 Marek Polacek <polacek@redhat.com>
3902
3903 PR c/61405
3904 PR c/53874
3905 * c-parser.c: Don't define CPP_KEYWORD.
3906 (c_parser_switch_statement): Pass original type to c_finish_case.
3907 * c-tree.h (c_finish_case): Update declaration.
3908 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3909 conditionally to c_do_switch_warnings.
3910
8d95fe25
MP
39112014-09-03 Marek Polacek <polacek@redhat.com>
3912
3913 PR c/62024
3914 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3915 conversions.
3916
9a771876
JJ
39172014-09-02 Jakub Jelinek <jakub@redhat.com>
3918 Balaji V. Iyer <balaji.v.iyer@intel.com>
3919 Igor Zamyatin <igor.zamyatin@intel.com>
3920
3921 * c-parser.c (c_parser_cilk_for): New function.
3922 (c_parser_cilk_grainsize): Likewise.
3923 (c_get_temp_regvar): Likewise.
3924 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3925 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3926 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3927 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3928 case.
3929
b7679d96
CG
39302014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3931
3932 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3933 with using HOST_WIDE_INT without truncation to 'int'
3934
59ea0364
MP
39352014-08-22 Marek Polacek <polacek@redhat.com>
3936
3937 PR c++/62199
3938 * c-typeck.c (parser_build_binary_op): Adjust call to
3939 warn_logical_not_parentheses.
3940
671a475e
IZ
39412014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3942
3943 PR other/62008
3944 * c-parser.c (c_parser_array_notation): Check for correct
3945 type of an array added.
3946
04159acf
MP
39472014-08-19 Marek Polacek <polacek@redhat.com>
3948
3949 PR c++/62153
3950 * c-typeck.c (build_binary_op): If either operand of a comparison
3951 is a boolean expression, call maybe_warn_bool_compare.
3952
c77935ee
PP
39532014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3954
3955 PR c/45584
3956 * c-typeck.c (build_c_cast): Do a conversion even when the
3957 TYPE_MAIN_VARIANTs are the same.
3958
35aff4fb
MP
39592014-08-19 Marek Polacek <polacek@redhat.com>
3960
3961 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3962 pedwarn_c99 instead of pedwarn.
3963 (grokfield): Likewise.
3964 (warn_defaults_to): New function.
3965 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3966 Unconditionally call pedwarn_c99 instead of pedwarn.
3967 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3968 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3969 check flag_isoc11 before.
3970 * c-errors.c (pedwarn_c99): Change the return type to bool.
3971 Handle -Wc99-c11-compat.
3972 * c-parser.c (disable_extension_diagnostics): Handle
3973 warn_c99_c11_compat.
3974 (restore_extension_diagnostics): Likewise.
3975 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3976 instead of pedwarn, don't check flag_isoc11 before.
3977 (c_parser_declspecs): Likewise.
3978 (c_parser_alignas_specifier): Likewise.
3979 (c_parser_alignof_expression): Likewise.
3980 (c_parser_generic_selection): Likewise.
3981 * c-tree.h (pedwarn_c99): Update declaration.
3982 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3983 of pedwarn_c99.
3984
177cce46
MP
39852014-08-19 Marek Polacek <polacek@redhat.com>
3986
3987 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3988 to pedwarn_c90.
3989 * c-errors.c: Include "opts.h".
3990 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3991 * c-parser.c (disable_extension_diagnostics): Handle negative value
3992 of warn_c90_c99_compat, too.
3993 (restore_extension_diagnostics): Likewise.
3994 (c_parser_compound_statement_nostart): Pass
3995 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3996
6dc99c33
MP
39972014-08-12 Marek Polacek <polacek@redhat.com>
3998
3999 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4000 Add pedwarn.
4001 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4002 Likewise.
4003 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4004
3f8257db 40052014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4006
4007 PR c/51849
4008 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4009 Call pedwarn_c90 instead of pedwarn.
4010 (check_bitfield_type_and_width): Likewise.
4011 (declspecs_add_qual): Likewise.
4012 (declspecs_add_type): Likewise.
4013 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4014 Adjust to only call pedwarn_c90.
4015 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4016 pedwarn_c90 instead of pedwarn.
4017 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4018 * c-parser.c (disable_extension_diagnostics): Handle
4019 warn_c90_c99_compat.
4020 (restore_extension_diagnostics): Likewise.
4021 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4022 pedwarn_c90 instead of pedwarn.
4023 (c_parser_initelt): Likewise.
4024 (c_parser_postfix_expression): Likewise.
4025 (c_parser_postfix_expression_after_paren_type): Likewise.
4026 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4027 * c-tree.h: Fix formatting.
4028 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4029 pedwarn_c90 instead of pedwarn.
4030
9f25a338
TS
40312014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4032
4033 * c-typeck.c: Remove include of pointer-set.h.
4034
044331a8
MP
40352014-08-07 Marek Polacek <polacek@redhat.com>
4036
4037 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4038
b787e7a2
TS
40392014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4040
4041 * c-typeck.c: Use hash_map instead of pointer_map.
4042
6e2830c3
TS
40432014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4044
4045 * c-decl.c: Use hash_set instead of pointer_set.
4046
a7ee52fb
IZ
40472014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4048
4049 PR middle-end/61455
4050 * c-array-notation.c (expand_array_notations): Handling
4051 of DECL_EXPR added.
4052
b4dfdc11
MG
40532014-07-31 Marc Glisse <marc.glisse@inria.fr>
4054
4055 PR c++/60517
4056 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4057 a local variable.
4058
976d5a22
TT
40592014-07-30 Tom Tromey <tromey@redhat.com>
4060
4061 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4062 field.
4063 (really_start_incremental_init, push_init_level): Initialize
4064 designator_depth.
4065 (pop_init_level): Set global designator_depth.
4066 (process_init_element): Check for designated_init attribute.
4067
30281de2
MP
40682014-07-20 Marek Polacek <polacek@redhat.com>
4069
4070 PR c/61852
4071 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4072 (implicitly_declare): Pass location to implicit_decl_warning.
4073
b108f48f
JJ
40742014-07-14 Jakub Jelinek <jakub@redhat.com>
4075
4076 PR middle-end/61294
4077 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4078 If non-NULL, call c_parser_check_literal_zero.
4079 (c_parser_check_literal_zero): New function.
4080 (c_parser_postfix_expression_after_primary): Adjust
4081 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4082
773ec47f
MP
40832014-07-06 Marek Polacek <polacek@redhat.com>
4084
4085 PR c/6940
4086 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4087 * c-tree.h (C_ARRAY_PARAMETER): Define.
4088 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4089 function parameter.
4090
22e1cf1c 40912014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4092 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4093
4094 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4095 releasing symbol.
4096
52ec0ea3
MP
40972014-07-01 Marek Polacek <polacek@redhat.com>
4098
4099 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4100 instead of 0 to WARN_FOR_ASSIGNMENT.
4101
d5c3d343
MP
41022014-07-01 Marek Polacek <polacek@redhat.com>
4103
4104 PR c/58286
4105 * c-typeck.c (convert_for_assignment): Pass
4106 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4107
6a7253a4
MP
41082014-06-30 Marek Polacek <polacek@redhat.com>
4109
4110 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4111 has no_sanitize_undefined attribute.
4112
5e88a8f4
IZ
41132014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4114
4115 PR middle-end/57541
4116 * c-array-notation.c (fix_builtin_array_notation_fn):
4117 Check for 0 arguments in builtin call. Check that bultin argument is
4118 correct.
4119 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4120 index.
4121
9698b078
SH
41222014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4123
4124 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4125 qualifiers in __auto_type for atomic types.
4126 (c_parser_typeof_specifier): Discard all type qualifiers in
4127 __typeof__ for atomic types.
4128
6e07c515
MP
41292014-06-25 Marek Polacek <polacek@redhat.com>
4130
4131 PR c/61162
4132 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4133 the return expression to c_finish_return.
4134
da6f124d
JJ
41352014-06-25 Jakub Jelinek <jakub@redhat.com>
4136
4137 * c-typeck.c (c_finish_omp_clauses): Make sure
4138 OMP_CLAUSE_LINEAR_STEP has correct type.
4139
c203e8a7
TS
41402014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4141
4142 * c-decl.c: Adjust.
4143
56ad0e38
JJ
41442014-06-24 Jakub Jelinek <jakub@redhat.com>
4145
4146 * c-parser.c (c_parser_omp_for_loop): For
4147 #pragma omp parallel for simd move lastprivate clause from parallel
4148 to for rather than simd.
4149
47c2554f
MP
41502014-06-23 Marek Polacek <polacek@redhat.com>
4151
4152 * c-typeck.c (parser_build_binary_op): Don't call
4153 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4154
56363ffd
JH
41552014-06-15 Jan Hubicka <hubicka@ucw.cz>
4156
4157 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4158 * c-decl.c (merge_decls): Likewise.
4159
d7ff7ae5
MP
41602014-06-09 Marek Polacek <polacek@redhat.com>
4161
4162 PR c/36446
4163 * c-typeck.c (error_init): Call inform instead of error_at.
4164 (pedwarn_init): Call inform instead of pedwarn.
4165 (warning_init): Call inform instead of warning_at.
4166
24d047a3
JH
41672014-06-07 Jan Hubicka <hubicka@ucw.cz>
4168
4169 * c-decl.c (merge_decls): Use set_decl_section_name.
4170 (duplicate_decls): Remove node if it exists.
4171
9bac5cbb
G
41722014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4173
4174 PR c/53119
4175 * c-typeck.c (push_init_level, process_init_element,
4176 pop_init_level): Correct check for zero initialization, move
4177 missing brace warning to respect zero initialization.
4178
8ffcdea8
MP
41792014-06-05 Marek Polacek <polacek@redhat.com>
4180
4181 PR c/56724
4182 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4183
742938c9
MP
41842014-06-05 Marek Polacek <polacek@redhat.com>
4185
4186 PR c/49706
4187 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4188 on the left hand side operand of a comparison.
4189
6447c55d
MP
41902014-06-05 Marek Polacek <polacek@redhat.com>
4191
4192 PR c/48062
4193 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4194 Print note only if the warning was printed.
4195
9dc7743c
IZ
41962014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4197
4198 PR c/58942
4199 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4200 with a pointer.
4201
fedfecef
MP
42022014-06-03 Marek Polacek <polacek@redhat.com>
4203
4204 PR c/60439
4205 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4206 c_start_case.
4207 * c-tree.h (c_start_case): Update.
4208 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4209 switch condition has boolean value.
4210
9b2b7279
AM
42112014-06-02 Andrew MacLeod <amacleod@redhat.com>
4212
4213 * c-decl.c: Include builtins.h.
4214 * c-parser.c: Likewise.
4215
5c1bc275
MP
42162014-05-27 Marek Polacek <polacek@redhat.com>
4217
4218 PR c/56724
4219 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4220 error and warning calls to error_at and warning_at. Pass location of
4221 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4222 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4223 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4224
97563bc8
IZ
42252014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4226
4227 PR c/61191
4228 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4229 function parameters.
4230
aede2c10
JH
42312014-05-23 Jan Hubicka <hubicka@ucw.cz>
4232
4233 * c-decl.c (merge_decls): Preserve symtab node pointers.
4234 (duplicate_decls): Free new decl.
4235
edbba2ce
TS
42362014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4237
f3316c6d
TS
4238 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4239 initialization.
4240
edbba2ce
TS
4241 * c-parser.c (c_parser_omp_target): Return bool values.
4242
68c81f24
TS
42432014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4244
4245 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4246 num_teams_loc variable to num_thread_limit_loc.
4247
632f2871
RS
42482014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4249
4250 * c-array-notation.c (expand_array_notations): Use void_node
4251 instead of void_zero_node.
4252
766090c2
TS
42532014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4254
4255 * c-decl.c (finish_struct): Adjust.
4256 (finish_enum): Likewise.
4257 (bind): Adjust.
4258 (record_inline_static): Likewise.
4259 (push_scope): Likewise.
4260 (make_label): Likewise.
4261 (lookup_label_for_goto): Likewise.
4262 (finish_struct): Likewise.
4263 (finish_enum): Likewise.
4264 (store_parm_decls): Likewise.
4265 (c_push_function_context): Likewise.
4266 * c-lang.h: Remove usage of variable_size gty attribute.
4267 * c-parser.c (c_parse_init): Adjust.
4268 (c_parse_file): Likewise.
4269
2b107f6b
MP
42702014-05-13 Marek Polacek <polacek@redhat.com>
4271
4272 PR c/61162
4273 * c-typeck.c (convert_for_assignment): Pass location to
4274 WARN_FOR_ASSIGNMENT instead of input_location.
4275
d033409e
MP
42762014-05-10 Marek Polacek <polacek@redhat.com>
4277
4278 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4279 maybe_warn_string_init.
4280 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4281 maybe_warn_string_init.
4282 * c-tree.h (maybe_warn_string_init): Update declaration.
4283 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4284 Call pedwarn_init with loc instead of with input_location.
4285 (digest_init): Pass init_loc to maybe_warn_string_init.
4286 (pop_init_level): Call pedwarn_init with loc instead of with
4287 input_location.
4288 (set_init_index): Likewise.
4289 (process_init_element): Likewise.
4290
ea58ef42
MP
42912014-05-09 Marek Polacek <polacek@redhat.com>
4292
4293 PR c/61096
4294 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4295 (c_parser_initelt): Pass location to set_init_label. Pass array index
4296 location to set_init_index.
4297 * c-tree.h (push_init_level): Update declaration.
4298 (pop_init_level): Likewise.
4299 (set_init_index): Likewise.
4300 (set_init_label): Likewise.
4301 * c-typeck.c (error_init): Add location parameter. Call error_at
4302 instead of error.
4303 (digest_init): Pass init_loc to error_init.
4304 (really_start_incremental_init):
4305 (push_init_level): Add location parameter. Pass loc to pop_init_level
4306 and error_init.
4307 (pop_init_level): Likewise.
4308 (set_designator): Add location parameter. Pass loc to pop_init_level,
4309 push_init_level, and error_init.
4310 (set_init_index): Add location parameter. Pass loc to error_init and
4311 set_designator.
4312 (set_init_label): Likewise.
4313 (output_init_element): Pass loc to error_init.
4314 (process_init_element): Pass loc to error_init, pop_init_level,
4315 pedwarn_init, and push_init_level.
4316
661a0813
MP
43172014-05-09 Marek Polacek <polacek@redhat.com>
4318
4319 PR c/50459
4320 * c-parser.c (c_parser_attributes): Parse the arguments as an
4321 expression-list if the attribute takes identifier.
4322
2793eeab
MP
43232014-05-08 Marek Polacek <polacek@redhat.com>
4324
4325 PR c/61053
4326 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4327 TYPE_ALIGN_UNIT.
4328
f827930a
MP
43292014-05-08 Marek Polacek <polacek@redhat.com>
4330
4331 PR c/61077
4332 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4333 of main.
4334
1d60af08
KZ
43352014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4336 Mike Stump <mikestump@comcast.net>
4337 Richard Sandiford <rdsandiford@googlemail.com>
4338
4339 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4340 (finish_enum): Use wide-int interfaces.
4341 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4342 * c-typeck.c (build_c_cast): Likewise.
4343 (set_nonincremental_init_from_string): Likewise.
4344 (c_tree_equal): Likewise.
4345
a0e24419
MP
43462014-05-02 Marek Polacek <polacek@redhat.com>
4347
4348 PR c/25801
4349 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4350 Return size_one_node when the type is not complete.
4351 (pointer_diff): Remove comment.
4352 (build_unary_op): Improve error messages.
4353
19fc9faa
MP
43542014-05-02 Marek Polacek <polacek@redhat.com>
4355
4356 * c-typeck.c (c_finish_return): Separate warning_at calls.
4357
63bc4e87
MP
43582014-05-02 Marek Polacek <polacek@redhat.com>
4359
4360 * c-tree.h (error_init): Remove declaration.
4361 (pedwarn_init): Likewise.
4362 * c-typeck.c (error_init): Make static and move above.
4363 (pedwarn_init): Likewise.
4364 (warning_init): Move above.
4365 (maybe_warn_string_init): Likewise.
4366
4bd2511b
JL
43672014-05-01 Jeff Law <law@redhat.com>
4368
4369 Revert:
4370
4371 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4372 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4373 avoid goto.
4374
6a358dcb
MP
43752014-05-02 Marek Polacek <polacek@redhat.com>
4376
4377 PR c/60784
4378 * c-typeck.c (push_init_level): Set constructor_designated to
4379 p->designated for structures.
4380
ae5ebda4
MP
43812014-05-01 Marek Polacek <polacek@redhat.com>
4382
4383 PR c/60915
4384 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4385 function-definition has an attribute after the declarator.
4386
96b40f8d
MP
43872014-05-01 Marek Polacek <polacek@redhat.com>
4388
4389 PR c/60257
4390 * c-typeck.c (warning_init): Add location_t parameter. Call
4391 warning_at instead of warning.
4392 (push_init_level): Pass input_location to warning_init.
4393 (add_pending_init): Add location_t parameter. Pass loc to
4394 warning_init.
4395 (set_nonincremental_init): Pass input_location to add_pending_init.
4396 (set_nonincremental_init_from_string): Likewise.
4397 (output_init_element): Pass loc to warning_init and to
4398 add_pending_init.
4399
32e00768
MP
44002014-05-01 Marek Polacek <polacek@redhat.com>
4401
4402 PR c/43395
4403 * c-typeck.c (c_finish_return): Distinguish between label and variable
4404 when warning about returning local address.
4405
c9379ce2
MP
44062014-05-01 Marek Polacek <polacek@redhat.com>
4407
4408 PR c/29467
4409 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4410 in C89 mode.
4411
d00887e8
MP
44122014-05-01 Marek Polacek <polacek@redhat.com>
4413
4414 PR c/43245
4415 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4416 instead of 0 to WARN_FOR_QUALIFIERS.
4417
5436fa2e
MP
44182014-05-01 Marek Polacek <polacek@redhat.com>
4419
4420 PR c/56989
4421 * c-typeck.c (default_conversion): Use better location for
4422 error call.
4423
f8ed5150
MP
44242014-04-30 Marek Polacek <polacek@redhat.com>
4425
4426 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4427 also when SANITIZE_FLOAT_DIVIDE is on.
4428
8337d1db
MP
44292014-04-30 Marek Polacek <polacek@redhat.com>
4430
4431 PR c/60139
4432 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4433 and pedwarn_init. Use loc insted of input_location.
4434
c4bdc42f
MP
44352014-04-30 Marek Polacek <polacek@redhat.com>
4436
4437 PR c/60351
4438 * c-typeck.c (build_binary_op): Use location when warning about
4439 shift count.
4440
45484dcf
MP
44412014-04-25 Marek Polacek <polacek@redhat.com>
4442
4443 PR c/18079
4444 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4445 always_inline/noinline and hot/cold attributes.
4446
34cf811f
MP
44472014-04-25 Marek Polacek <polacek@redhat.com>
4448
4449 PR c/60114
4450 * c-parser.c (c_parser_initelt): Pass input_location to
4451 process_init_element.
4452 (c_parser_initval): Pass loc to process_init_element.
4453 * c-tree.h (process_init_element): Adjust declaration.
4454 * c-typeck.c (push_init_level): Pass input_location to
4455 process_init_element.
4456 (pop_init_level): Likewise.
4457 (set_designator): Likewise.
4458 (output_init_element): Add location_t parameter. Pass loc to
4459 digest_init.
4460 (output_pending_init_elements): Pass input_location to
4461 output_init_element.
4462 (process_init_element): Add location_t parameter. Pass loc to
4463 output_init_element.
4464
42056eac
JJ
44652014-04-24 Jakub Jelinek <jakub@redhat.com>
4466
4467 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4468 atomic-clause, allow comma in between atomic-clause and
4469 seq_cst.
4470
e162a134
JJ
44712014-04-22 Jakub Jelinek <jakub@redhat.com>
4472
4473 PR c/59073
4474 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4475 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4476
2f6babac
IZ
44772014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4478
4479 PR middle-end/60469
4480 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4481 create_tmp_var instead build_decl for creating temps.
4482 (build_array_notation_expr): Likewise.
4483 (fix_conditional_array_notations_1): Likewise.
4484 (fix_array_notation_expr): Likewise.
4485 (fix_array_notation_call_expr): Likewise.
4486
8edbfaa6
JJ
44872014-03-28 Jakub Jelinek <jakub@redhat.com>
4488
4489 PR c++/60689
4490 * c-tree.h (c_build_function_call_vec): New prototype.
4491 * c-typeck.c (build_function_call_vec): Don't call
4492 resolve_overloaded_builtin here.
4493 (c_build_function_call_vec): New wrapper function around
4494 build_function_call_vec. Call resolve_overloaded_builtin here.
4495 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4496 Call c_build_function_call_vec instead of build_function_call_vec.
4497 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4498 * c-decl.c (finish_decl): Likewise.
4499
7485aeea
MLI
45002014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4501
4502 PR c/55383
4503 * c-typeck.c: Use correct format string in cast-qual warning
4504
b17a8b07
TS
45052014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4506
4507 * c-decl.c (c_decl_attributes): Use
4508 lang_hooks.types.omp_mappable_type.
4509 * c-typeck.c (c_finish_omp_clauses): Likewise.
4510
3af9c5e9
MP
45112014-03-06 Marek Polacek <polacek@redhat.com>
4512
4513 PR c/60197
4514 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4515 of checking tree code.
4516
1c9f5f33
PK
45172014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4518
4519 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4520 (c_parser_parameter_declaration): Likewise.
4521
cc28fc7f
MP
45222014-02-19 Marek Polacek <polacek@redhat.com>
4523
4524 PR c/60195
4525 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4526 Call mark_exp_read on exp.value.
4527 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4528 TREE_ADDRESSABLE on old instead of val.
4529 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4530
b581c05c
PK
45312014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4532
4533 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4534 C_EXPR_APPEND by vec_safe_push.
4535 * c-tree.h (C_EXPR_APPEND): Remove.
4536
81e5eca8
MP
45372014-01-31 Marek Polacek <polacek@redhat.com>
4538
4539 PR c/59963
4540 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4541 build_function_call_vec.
4542 (build_function_call): Likewise.
4543 (build_atomic_assign): Likewise.
4544 (build_function_call_vec): Add arg_loc parameter. Use it.
4545 (convert_arguments): Likewise.
4546 (convert_for_assignment): Rename rhs_loc to expr_loc.
4547 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4548 (c_parser_objc_keywordexpr): Likewise.
4549 (c_parser_postfix_expression_after_primary): Call
4550 build_function_call_vec with expr_loc rather than op_loc.
4551 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4552 build_function_call_vec.
4553 (c_parser_expr_list): Add locations parameter. Fill it with locations
4554 of function arguments.
4555 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4556
68fca595
MP
45572014-01-30 Marek Polacek <polacek@redhat.com>
4558
4559 PR c/59940
4560 * c-typeck.c (build_function_call_vec): Use loc parameter.
4561 (convert_arguments): Add location parameter. Use it.
4562 (ep_convert_and_check): Likewise.
4563 (build_atomic_assign): Adjust convert_for_assignment call.
4564 (build_modify_expr): Likewise.
4565 (digest_init): Likewise.
4566 (c_finish_return): Likewise.
4567 (build_conditional_expr): Adjust ep_convert_and_check calls.
4568 (convert_for_assignment): Add rhs_loc parameter. Use it.
4569 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4570 calls.
4571
fa337f3a
RB
45722014-01-30 Richard Biener <rguenther@suse.de>
4573
4574 PR c/59905
4575 * c-typeck.c (build_function_call_vec): Do not replace calls
4576 to a function via an incompatible type with a runtime abort.
4577
b72271b9
BI
45782014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4579
4580 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4581 flag_enable_cilkplus with flag_cilkplus.
4582 (c_parser_direct_declarator_inner): Likewise.
4583 (c_parser_attribute_any_word): Likewise.
4584 (c_parser_attributes): Likewise.
4585 (c_parser_compound_statement): Likewise.
4586 (c_parser_statement_after_labels): Likewise.
4587 (c_parser_if_statement): Likewise.
4588 (c_parser_switch_statement): Likewise.
4589 (c_parser_do_statement): Likewise.
4590 (c_parser_for_statement): Likewise.
4591 (c_parser_unary_expression): Likewise.
4592 (c_parser_postfix_expression): Likewise.
4593 (c_parser_postfix_expression_after_primary): Likewise.
4594 (c_parser_postfix_expression_after_primary): Likewise.
4595 (c_parser_omp_clause_name): Likewise.
4596 (c_finish_omp_declare_simd): Likewise.
4597 (c_parser_cilk_verify_simd): Likewise.
4598 * c-typeck.c (build_array_ref): Likewise.
4599 (build_function_call_vec): Likewise.
4600 (convert_arguments): Likewise.
4601 (build_compound_expr): Likewise.
4602 (c_finish_return): Likewise.
4603 (c_finish_if_stmt): Likewise.
4604 (c_finish_loop): Likewise.
4605 (build_binary_op): Likewise.
4606
393e8e8b
MP
46072014-01-23 Marek Polacek <polacek@redhat.com>
4608
4609 PR c/59846
4610 * c-typeck.c (parser_build_binary_op): Use location instead of
4611 input_location.
4612 (build_binary_op): Pass location to shorten_compare.
4613
f04dda30
MP
46142014-01-23 Marek Polacek <polacek@redhat.com>
4615
4616 PR c/58346
4617 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4618 an empty aggregate.
4619
789eadcd
MP
46202014-01-23 Marek Polacek <polacek@redhat.com>
4621
4622 PR c/59871
4623 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4624 of a comma expression.
4625 (emit_side_effect_warnings): Likewise.
4626
40f14e9f
BI
46272014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4628
4629 PR c/59825
4630 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4631 function to use walk_tree and moved a lot of its functionality to
4632 expand_array_notations.
4633 (expand_array_notations): New function.
4634
74558dd9
BI
46352014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4636
4637 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4638 attribute an attribute without value.
4639
652fea39
JJ
46402014-01-23 Jakub Jelinek <jakub@redhat.com>
4641
4642 PR middle-end/58809
4643 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4644 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4645
f34f1c87
MP
46462014-01-22 Marek Polacek <polacek@redhat.com>
4647
4648 PR c/59891
4649 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4650 of remove_c_maybe_const_expr on op1 and op2.
4651
241f845a
JJ
46522014-01-15 Jakub Jelinek <jakub@redhat.com>
4653
4654 PR c/58943
4655 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4656 effects, preevaluate rhs using SAVE_EXPR first.
4657
9a74f20c
BI
46582014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4659
4660 PR c++/59631
4661 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4662 statements with if-elseif statements.
4663
96066ce1
MP
46642014-01-06 Marek Polacek <polacek@redhat.com>
4665
4666 PR c/57773
4667 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4668 defined bit-field types only in ISO C.
4669
23a5b65a
RS
46702014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4671
4672 Update copyright years
4673
f9030485
RS
46742014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4675
4676 * c-array-notation.c: Use the standard form for the copyright notice.
4677
41958c28
BI
46782013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4679
4680 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4681 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4682 field in parser is not empty. If not-empty, call the function
4683 c_parser_finish_omp_declare_simd.
4684 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4685 between SIMD-enabled functions and #pragma simd. Added new parameter.
4686 (c_parser_cilk_all_clauses): Modified the usage of the function
4687 c_parser_cilk_clause_vectorlength as mentioned above.
4688 (c_parser_cilk_simd_fn_vector_attrs): New function.
4689 (c_finish_cilk_simd_fn_tokens): Likewise.
4690 (is_cilkplus_vector_p): Likewise.
4691 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4692 "nomask," and "mask" strings in clause name.
4693 (c_parser_omp_all_clauses): Added 3 new case statements:
4694 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4695 PRAGMA_CILK_CLAUSE_NOMASK.
4696 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4697 check for vector attribute and if so call the function
4698 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4699 called the function c_finish_cilk_simd_fn_tokens.
4700 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4701 parser field is non-empty. If so, parse them as you would parse
4702 the omp declare simd pragma.
4703 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4704 Added a check when step is a parameter and flag it as error.
4705 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4706 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4707 pragma_omp_clause.
4708
cef0fd0e
TS
47092013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4710
4711 * c-parser.c (c_parser_omp_parallel): Fix description.
4712
12893402
BI
47132013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4714
4715 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4716 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4717 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4718 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4719
296674db
JM
47202013-12-04 Joseph Myers <joseph@codesourcery.com>
4721
4722 PR c/52023
4723 * c-parser.c (c_parser_alignas_specifier): Use
4724 c_sizeof_or_alignof_type instead of c_alignof.
4725 (c_parser_alignof_expression): Likewise, with min_alignof
4726 parameter depending on alignof spelling used.
4727
edd28054
MP
47282013-12-04 Marek Polacek <polacek@redhat.com>
4729
4730 PR c/54113
4731 * c-decl.c (start_function): Don't warn for missing prototype for
4732 inline functions.
4733
da0fc454
MP
47342013-12-03 Marek Polacek <polacek@redhat.com>
4735
4736 PR c/59351
4737 * c-decl.c (build_compound_literal): Allow compound literals with
4738 empty initial value.
4739
4c2ecab0
JM
47402013-12-02 Joseph Myers <joseph@codesourcery.com>
4741
4742 PR c/58235
4743 * c-typeck.c (build_modify_expr): Diagnose assignment to
4744 expression with array type.
4745
340baef7
JM
47462013-11-29 Joseph Myers <joseph@codesourcery.com>
4747
4748 PR c/42262
4749 * c-typeck.c (process_init_element): Do not treat a string as
4750 initializing a whole array when used with a designator for an
4751 individual element.
4752
6763b9f7
JM
47532013-11-29 Joseph Myers <joseph@codesourcery.com>
4754
4755 PR c/57574
4756 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4757 an inline function following a static declaration.
4758
e7bd1de1
JJ
47592013-11-28 Jakub Jelinek <jakub@redhat.com>
4760
4761 PR c/59310
4762 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4763 to p_name before calling c_parser_omp_teams instead of after.
4764 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4765 argument. Remove unused p_name variable.
4766
0136f8f0
AH
47672013-11-27 Aldy Hernandez <aldyh@redhat.com>
4768 Jakub Jelinek <jakub@redhat.com>
4769
4770 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4771 external_scope is NULL.
4772
241b71bb
TV
47732013-11-27 Tom de Vries <tom@codesourcery.com>
4774 Marc Glisse <marc.glisse@inria.fr>
4775
4776 PR c++/59032
4777 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4778
2fb9a547
AM
47792013-11-22 Andrew MacLeod <amacleod@redhat.com>
4780
4781 * c-typeck.c: Add required include files from gimple.h.
4782
8400e75e
DM
47832013-11-22 David Malcolm <dmalcolm@redhat.com>
4784
4785 * c-decl.c (define_label, shadow_tag_warned)
4786 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4787 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4788 (declspecs_add_type): Remove use of in_system_header macro.
4789 * c-parser.c (c_parser_unary_expression): Likewise.
4790 * c-typeck.c (store_init_value, process_init_element)
4791 (c_start_case): Likewise.
4792
4793 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4794 macro.
4795
4796 * c-parser.c (c_parser_set_source_position_from_token): Remove
4797 reference to in_system_header from comment.
4798
386b1f1f
RS
47992013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4800
4801 * c-decl.c (grokdeclarator): Update comment to refer to
4802 tree_to_[su]hwi rather than tree_low_cst.
4803
ae7e9ddd
RS
48042013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4805
4806 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4807 tree_to_uhwi throughout.
4808
9439e9a1
RS
48092013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4810
4811 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4812 throughout.
4813
9541ffee
RS
48142013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4815
4816 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4817 throughout.
4818
c02065fc
AH
48192013-11-15 Aldy Hernandez <aldyh@redhat.com>
4820
4821 * c-parser.c (c_parser_cilk_simd): New.
4822 (c_parser_cilk_verify_simd): New.
4823 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4824 (c_parser_omp_for_loop): Add case for NE_EXPR.
4825 Set c_break_label for CILK_SIMD.
4826 (c_parser_cilk_clause_vectorlength): New.
4827 (c_parser_cilk_clause_linear): New.
4828 (c_parser_cilk_clause_name): New.
4829 (c_parser_cilk_all_clauses): New.
4830 * c-typeck.c (build_unary_op): Pass location argument to
4831 readonly_error.
4832 (build_modify_expr): Same.
4833 (build_asm_expr): Same.
4834 (c_finish_bc_stmt): Error on break/continue in loops.
4835
18f429e2
AM
48362013-11-14 Andrew MacLeod <amacleod@redhat.com>
4837
4838 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4839
d8a2d370
DN
48402013-11-14 Diego Novillo <dnovillo@google.com>
4841
4842 * c-decl.c: Include print-tree.h.
4843 Include stor-layout.h.
4844 Include varasm.h.
4845 Include attribs.h.
4846 Include stringpool.h.
4847 * c-lang.c: Include fold-const.h.
4848 * c-parser.c: Include stringpool.h.
4849 Include attribs.h.
4850 Include stor-layout.h.
4851 Include varasm.h.
4852 Include trans-mem.h.
4853 * c-typeck.c: Include stor-layout.h.
4854 Include trans-mem.h.
4855 Include varasm.h.
4856 Include stmt.h.
4857
38b7bc7f
JM
48582013-11-13 Joseph Myers <joseph@codesourcery.com>
4859
4860 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4861 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4862 __auto_type.
4863 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4864 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4865 RID_AUTO_TYPE.
4866 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4867 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4868 (c_parser_declarator, c_parser_direct_declarator_inner)
4869 (c_parser_parameter_declaration, c_parser_type_name): All callers
4870 changed.
4871 (c_parser_declaration_or_fndef): Handle declarations with type
4872 determined from the initializer.
4873
45b0be94
AM
48742013-11-12 Andrew MacLeod <amacleod@redhat.com>
4875
18f429e2 4876 * c-typeck.c: Include gimplify.h.
45b0be94 4877
582d9b50
JM
48782013-11-12 Joseph Myers <joseph@codesourcery.com>
4879
4880 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4881 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4882 comment.
4883 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4884 or _Thread_local as appropriate in diagnostics.
4885 (build_null_declspecs): Initialize ret->thread_gnu_p.
4886 (declspecs_add_scspec): Handle either __thread or _Thread_local
4887 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4888 pedantic. Do not disallow _Thread_local extern and _Thread_local
4889 static.
4890
267bac10
JM
48912013-11-07 Joseph Myers <joseph@codesourcery.com>
4892 Andrew MacLeod <amacleod@redhat.com>
4893
4894 * c-aux-info.c (gen_type): Handle atomic qualifier.
4895 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4896 qualifiers when compating types.
4897 (shadow_tag_warned): Handle atomic_p in declspecs.
4898 (quals_from_declspecs): Likewise.
4899 (start_decl): Use c_type_promotes_to when promoting argument
4900 types.
4901 (grokdeclarator): Handle _Atomic.
4902 (get_parm_info): Diagnose any qualifier on "void" as only
4903 parameter.
4904 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4905 comparing types. Use c_type_promotes_to when promoting argument
4906 types.
4907 (finish_function): Use c_type_promotes_to when promoting argument
4908 types.
4909 (build_null_declspecs): Handle atomic_p in declspecs.
4910 (declspecs_add_qual): Handle RID_ATOMIC.
4911 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4912 (c_token_starts_declspecs): Handle RID_ATOMIC.
4913 (c_parser_declspecs): Handle atomic type specifiers and
4914 qualifiers.
4915 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4916 from types of expressions with atomic type.
4917 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4918 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4919 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4920 (c_parser_statement_after_labels, c_parser_switch_statement)
4921 (c_parser_for_statement, c_parser_expr_no_commas)
4922 (c_parser_conditional_expression, c_parser_binary_expression)
4923 (c_parser_cast_expression, c_parser_unary_expression)
4924 (c_parser_postfix_expression)
4925 (c_parser_postfix_expression_after_primary, c_parser_expression):
4926 Use convert_lvalue_to_rvalue.
4927 (c_parser_expression_conv, c_parser_expr_list): Document
4928 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4929 (c_parser_objc_synchronized_statement): Use
4930 convert_lvalue_to_rvalue.
4931 (c_parser_objc_selector): Handle RID_ATOMIC.
4932 (c_parser_objc_receiver, c_parser_array_notation): Use
4933 convert_lvalue_to_rvalue.
4934 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4935 _Atomic (type-name).
4936 (struct c_declspecs): Add atomic_p field.
4937 (convert_lvalue_to_rvalue): Declare.
4938 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4939 corresponding atomic types.
4940 (qualify_type): Don't add _Atomic qualifiers from second argument.
4941 (comp_target_types): Do not allow _Atomic mismatches.
4942 (type_lists_compatible_p): Do not remove atomic qualifiers when
4943 comparing types.
4944 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4945 (build_atomic_assign): New functions.
4946 (build_unary_op): Use build_atomic_assign for atomic increment and
4947 decrement.
4948 (build_conditional_expr): Do not treat _Atomic void as a qualified
4949 version of void.
4950 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4951 (find_anonymous_field_with_type, convert_to_anonymous_field)
4952 (convert_for_assignment): Do not remove atomic qualifiers when
4953 comparing types.
4954 (digest_init): Do not accept initialization of arrays of atomic
4955 elements by string constants.
4956 (build_asm_expr): Use convert_lvalue_to_rvalue.
4957 (build_binary_op): Do not treat _Atomic void as a qualified
4958 version of void.
4959
0c249d4b
DD
49602013-11-06 DJ Delorie <dj@redhat.com>
4961
4962 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4963 both explicit and builtin, print the location of the explicit one.
4964
6d7f7e0a
TB
49652013-11-05 Tobias Burnus <burnus@net-b.de>
4966
4967 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4968 c_parser_omp_distribute, c_parser_omp_teams,
4969 c_parser_omp_target, c_parser_omp_declare): Handle
4970 -fopenmp-simd.
4971
b906f4ca
MP
49722013-11-03 Marek Polacek <polacek@redhat.com>
4973
4974 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4975
ee1d5a02
JJ
49762013-11-01 Jakub Jelinek <jakub@redhat.com>
4977
4978 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4979 check_dup_generic at the end, unless remove is true.
4980 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4981 remove = true;.
4982 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4983
5a9785fb
JJ
49842013-10-31 Jakub Jelinek <jakub@redhat.com>
4985
4986 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4987 with decl that is not pointer nor array.
4988
939b37da
BI
49892013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4990
4991 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4992 a spawning function is found.
4993 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4994 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4995 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4996 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4997 case.
4998 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4999 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5000 expr.
5001 (c_finish_return): Added a check to reject _Cilk_spawn in return
5002 expression.
5003 (build_cilk_spawn): New function.
5004 (build_cilk_sync): Likewise.
5005 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5006
d4af74d4
TB
50072013-10-27 Tobias Burnus <burnus@net-b.de>
5008
5009 PR other/33426
5010 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5011 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5012 (c_parser_statement_after_labels): Update calls.
5013
d73749df 50142013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5015
5016 PR other/33426
5017 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5018 Handle PRAGMA_IVDEP.
5019 (c_parser_statement_after_labels): Update call.
5020
f28aa681
MP
50212013-10-24 Marek Polacek <polacek@redhat.com>
5022
5023 * c-parser.c (c_parser_struct_declaration): Add a comment.
5024 (c_parser_declarator): Don't allow _Alignas here.
5025
0645c1a2
AM
50262013-10-17 Andrew MacLeod <amacleod@redhat.com>
5027
5028 * c-parser.c: Include omp-low.h.
5029 * c-typeck.c: Likewise.
5030
568a31f2
MP
50312013-10-17 Marek Polacek <polacek@redhat.com>
5032
5033 PR c/58267
5034 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5035 Document syntax of the array-declarator.
5036 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5037 are not permitted.
5038 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5039 (c_parser_struct_declaration): Likewise.
5040 (c_parser_declarator): Likewise.
5041 (c_parser_direct_declarator_inner): Likewise.
5042 (c_parser_parameter_declaration): Likewise.
5043 (c_parser_type_name): Likewise.
5044
acf0174b
JJ
50452013-10-11 Jakub Jelinek <jakub@redhat.com>
5046
5047 * c-lang.h (current_omp_declare_target_attribute): New extern
5048 decl.
5049 * c-parser.c: Include c-lang.h.
5050 (struct c_parser): Change tokens to c_token *.
5051 Add tokens_buf field. Change tokens_avail type to unsigned int.
5052 (c_parser_consume_token): If parser->tokens isn't
5053 &parser->tokens_buf[0], increment parser->tokens.
5054 (c_parser_consume_pragma): Likewise.
5055 (enum pragma_context): Add pragma_struct and pragma_param.
5056 (c_parser_external_declaration): Adjust
5057 c_parser_declaration_or_fndef caller.
5058 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5059 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5060 Adjust recursive call.
5061 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5062 of pragma_external.
5063 (c_parser_parameter_declaration): Use pragma_param instead of
5064 pragma_external.
5065 (c_parser_compound_statement_nostart, c_parser_label,
5066 c_parser_for_statement): Adjust
5067 c_parser_declaration_or_fndef callers.
5068 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5069 it through to c_parser_conditional_expression.
5070 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5071 pass it through to c_parser_binary_expression. Adjust recursive
5072 call.
5073 (c_parser_binary_expression): Remove prec argument, add
5074 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5075 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5076 binop matches it, use build2 instead of parser_build_binary_op.
5077 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5078 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5079 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5080 Handle pragma_struct and pragma_param the same as pragma_external.
5081 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5082 (c_parser_omp_variable_list): Parse array sections for
5083 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5084 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5085 (c_parser_omp_clause_reduction): Handle user defined reductions.
5086 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5087 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5088 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5089 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5090 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5091 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5092 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5093 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5094 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5095 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5096 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5097 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5098 (c_parser_omp_for_loop): Add CODE argument, pass it through
5099 to c_finish_omp_for. Change last argument to cclauses,
5100 and adjust uses to grab parallel clauses from the array of all
5101 the split clauses. Adjust c_parser_binary_expression,
5102 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5103 (omp_split_clauses): New function.
5104 (c_parser_omp_simd): New function.
5105 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5106 Allow the function to be called also when parsing combined constructs,
5107 and call c_parser_omp_simd when parsing for simd.
5108 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5109 #pragma omp section, require exactly one structured-block instead of
5110 sequence of statements.
5111 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5112 Allow the function to be called also when parsing combined constructs.
5113 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5114 Allow the function to be called also when parsing combined
5115 constructs.
5116 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5117 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5118 c_parser_omp_teams, c_parser_omp_target_data,
5119 c_parser_omp_target_update, c_parser_omp_target,
5120 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5121 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5122 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5123 (c_parser_omp_construct): Add p_name and mask vars. Handle
5124 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5125 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5126 and c_parser_omp_sections callers.
5127 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5128 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5129 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5130 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5131 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5132 OMP_CLAUSE_DEPEND.
5133 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5134 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5135 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5136 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5137 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5138 * c-typeck.c: Include tree-inline.h.
5139 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5140 handle_omp_array_sections_1, handle_omp_array_sections,
5141 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5142 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5143 user defined reductions.
5144 (c_tree_equal): New function.
5145 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5146 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5147 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5148 c_check_omp_declare_reduction_r): New prototypes.
5149 * c-decl.c (current_omp_declare_target_attribute): New variable.
5150 (c_decl_attributes): New function.
5151 (start_decl, start_function): Use it instead of decl_attributes.
5152 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5153 c_omp_reduction_decl, c_omp_reduction_lookup,
5154 c_check_omp_declare_reduction_r): New functions.
5155
0a6c2227
TT
51562013-09-25 Tom Tromey <tromey@redhat.com>
5157
5158 * Make-lang.in (c/gccspec.o): Remove.
5159 (CFLAGS-c/gccspec.o): New variable.
5160 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5161 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5162 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5163
f3bc55f0
TT
51642013-09-25 Tom Tromey <tromey@redhat.com>
5165
5166 * Make-lang.in (c/gccspec.o): Don't use subshell.
5167
a24d975c
MP
51682013-09-18 Marek Polacek <polacek@redhat.com>
5169
5170 PR sanitize/58443
5171 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5172 Remove unnecessary check.
5173
ce6923c5
MP
51742013-09-18 Marek Polacek <polacek@redhat.com>
5175
5176 PR sanitizer/58411
5177 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5178 no_sanitize_undefined attribute.
5179
a1e51df9
KT
51802013-09-13 Kai Tietz <ktietz@redhat.com>
5181
5182 PR target/57848
5183 * c-decl.c (c_builtin_function_ext_scope): Remove
5184 wrong assumption that it is never called on prexisting
5185 symbol.
5186
0af94e6f
JR
51872013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5188
5189 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5190
20059c8b
GDR
51912013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5192
5193 * c-objc-common.c (c_tree_printer): Tidy.
5194
de5a5fa1
MP
51952013-08-30 Marek Polacek <polacek@redhat.com>
5196
5197 * c-typeck.c (build_binary_op): Add division by zero and shift
5198 instrumentation.
5199
2531a1d9 52002013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5201 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5202
6e2bcc98 5203 PR c/35649
2531a1d9
JR
5204 * c-typeck.c (c_common_type): Prefer double_type_node over
5205 other REAL_TYPE types with the same precision.
5206 (convert_arguments): Likewise.
5207
025311c4
GDR
52082013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5209
5210 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5211 (c_initialize_diagnostics): Call a destructor for the early printer.
5212
da6ca2b5
GDR
52132013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5214
5215 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5216 printer initialization.
5217
318cda85 52182013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5219
318cda85
BI
5220 PR c/57490
5221 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5222 check for truth values.
5223 (expand_array_notation_exprs): Added truth values case. Removed an
5224 unwanted else. Added for-loop to walk through subtrees in default
5225 case.
5226
b066401f
GDR
52272013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5228
5229 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5230
fb48aadc
JM
52312013-07-23 Joseph Myers <joseph@codesourcery.com>
5232
5233 * c-parser.c (struct c_generic_association): Fix typo.
5234
433cc7b0
TT
52352013-07-23 Tom Tromey <tromey@redhat.com>
5236 Joseph Myers <joseph@codesourcery.com>
5237
5238 * c-parser.c (struct c_generic_association): New.
5239 (c_generic_association_d): New typedef.
5240 (c_parser_generic_selection): New function.
5241 (c_parser_postfix_expression): Handle RID_GENERIC.
5242
26d40c3d
JM
52432013-07-13 Jason Merrill <jason@redhat.com>
5244
5245 PR c++/57793
5246 * c-decl.c (finish_struct): Check for too-large class.
5247
ecdbd01a 52482013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5249
5250 PR c/57821
5251 * c-typeck.c (set_init_index): When folding, check for index overflow.
5252
1141ed3f
BI
52532013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5254
5255 * c-parser.c (c_parser_array_notation): Removed rejection of array
5256 notations in an array of function pointers.
5257
713b46fa
BI
52582013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5259
5260 * c-array-notation.c (make_triplet_val_inv): New function.
5261 (create_cmp_incr): Likewise.
5262 (create_array_refs): Likewise.
5263 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5264 Also modularized common parts between functions and called the function.
5265 (build_array_notation_expr): Likewise.
5266 (fix_conditional_array_notations_1): Likewise.
5267 (fix_array_notation_expr): Likewise.
5268 (fix_array_notation_call_expr): Likewise.
5269
92f20202
MP
52702013-06-18 Marek Polacek <polacek@redhat.com>
5271
5272 PR c/57630
5273 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5274
73a23b06
BI
52752013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5276
5277 * c-array-notation.c (build_array_notation_expr): Reject array notation
5278 mismatch between LHS and RHS even inside a call_expr. Also, removed
5279 a couple while statements that were dead code.
5280
00b8517d
BI
52812013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5282
5283 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5284 excessive precision expressions in function parameters. Also removed
5285 couple unwanted while statements.
5286
1509bdda
BI
52872013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5288
5289 * c-array-notation.c (expand_array_notation_exprs): Added
5290 ARRAY_NOTATION_REF case.
5291
d60f1706
BI
52922013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5293
5294 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5295 function to c-family/array-notation-common.c.
5296 (is_cilkplus_reduce_builtin): Likewise.
5297 (find_rank): Likewise.
5298 (extract_array_notation_exprs): Likewise.
5299 (replace_array_notations): Likewise.
5300 (find_inv_trees): Likewise.
5301 (replace_inv_trees): Likewise.
5302 (contains_array_notation_expr): Likewise.
5303 (find_correct_array_notation_type): Likewise.
5304 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5305 (struct inv_list): Moved this to c-family/array-notation-common.c.
5306 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5307
6d6efbb3
BI
53082013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5309
5310 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5311 reduction functions outside the for-loop. Added a check if the fundecl
5312 is non-NULL. Finally, removed an unwanted if-statement, and made the
5313 body unconditional.
5314
25c22937
BI
53152013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5316
5317 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5318 condition of the if-statement matches the rank of else-block and then-
5319 block when array notations are used.
5320 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5321 expression after the entire function body is parsed.
5322 (c_parser_expr_no_commas): Delayed creating array notation expressions
5323 to the end of function parsing.
5324 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5325 whole if-statement instead of just the condition.
5326 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5327
edd25645
BI
53282013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5329
5330 PR c/57474
5331 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5332 array to NULL_TREE if they are unused. Also added a check for the
5333 field to be NULL before its fields are used in future.
5334
065ce7f1
RO
53352013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5336
5337 PR bootstrap/57450
5338 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5339 (build_array_notation_expr): Likewise.
5340
36536d79
BI
53412013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5342
5343 * c-typeck.c (build_array_ref): Added a check to see if array's
5344 index is greater than one. If true, then emit an error.
5345 (build_function_call_vec): Exclude error reporting and checking
5346 for builtin array-notation functions.
5347 (convert_arguments): Likewise.
5348 (c_finish_return): Added a check for array notations as a return
5349 expression. If true, then emit an error.
5350 (c_finish_loop): Added a check for array notations in a loop
5351 condition. If true then emit an error.
5352 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5353 (build_binary_op): Added a check for array notation expr inside
5354 op1 and op0. If present, we call another function to find correct
5355 type.
5356 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5357 * c-parser.c (c_parser_compound_statement): Check if array
5358 notation code is used in tree, if so, then transform them into
5359 appropriate C code.
5360 (c_parser_expr_no_commas): Check if array notation is used in LHS
5361 or RHS, if so, then build array notation expression instead of
5362 regular modify.
5363 (c_parser_postfix_expression_after_primary): Added a check for
5364 colon(s) after square braces, if so then handle it like an array
5365 notation. Also, break up array notations in unary op if found.
5366 (c_parser_direct_declarator_inner): Added a check for array
5367 notation.
5368 (c_parser_compound_statement): Added a check for array notation in
5369 a stmt. If one is present, then expand array notation expr.
5370 (c_parser_if_statement): Likewise.
5371 (c_parser_switch_statement): Added a check for array notations in
5372 a switch statement's condition. If true, then output an error.
5373 (c_parser_while_statement): Similarly, but for a while.
5374 (c_parser_do_statement): Similarly, but for a do-while.
5375 (c_parser_for_statement): Similarly, but for a for-loop.
5376 (c_parser_unary_expression): Check if array notation is used in a
5377 pre-increment or pre-decrement expression. If true, then expand
5378 them.
5379 (c_parser_array_notation): New function.
5380 * c-array-notation.c: New file.
5381 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5382
cd192ccc
MS
53832013-05-23 Mike Stump <mikestump@comcast.net>
5384
5385 * c-typeck.c (convert_for_assignment): Handle references to memory
5386 spaces better.
5387
427b248d
JM
53882013-05-16 Jason Merrill <jason@redhat.com>
5389
5390 * Make-lang.in (cc1$(exeext)): Use link mutex.
5391
44d90fe1
PC
53922013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5393
5394 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5395 to simply use OPT_Wpointer_arith.
5396 (build_unary_op): Likewise.
5397
4e7d7b3d
JJ
53982013-04-03 Jakub Jelinek <jakub@redhat.com>
5399
5400 PR c/19449
5401 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5402 argument. If set, or it temporarily for parsing of the first
5403 argument into force_folding_builtin_constant_p.
5404 (c_parser_postfix_expression): Adjust callers.
5405
839b422f
RB
54062013-03-21 Richard Biener <rguenther@suse.de>
5407
5408 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5409 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5410
2ee028f1
MP
54112013-02-12 Marek Polacek <polacek@redhat.com>
5412
5413 PR c/44938
5414 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5415 origtypes to NULL.
5416
8824edff
JJ
54172013-01-24 Jakub Jelinek <jakub@redhat.com>
5418
5419 PR c/56078
5420 * c-typeck.c (set_nonincremental_init_from_string): If
5421 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5422 returned false.
5423 (process_init_element): Likewise.
5424
eadd3d0d
JJ
54252012-12-20 Jakub Jelinek <jakub@redhat.com>
5426
5427 PR c++/55619
5428 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5429 argument, don't call default_function_array_conversion
5430 nor c_fully_fold here.
5431 (c_parser_asm_statement): Adjust callers.
5432 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5433 and outputs here, and call default_function_array_conversion
5434 on inputs that don't need to be addressable.
5435
f8a93a2e
JJ
54362012-12-18 Jakub Jelinek <jakub@redhat.com>
5437
5438 PR c/39464
5439 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5440 warning require that both c_common_unsigned_type as well as
5441 c_common_signed_type is the same for both mvl and mvr types.
5442
9771b263
DN
54432012-11-16 Diego Novillo <dnovillo@google.com>
5444
5445 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5446
5447 * c-common.c: Use new vec API in vec.h.
5448 * c-common.h: Likewise.
5449 * c-gimplify.c: Likewise.
5450 * c-pragma.c: Likewise.
5451 * c-pretty-print.c: Likewise.
5452 * c-pretty-print.h: Likewise.
5453 * c-semantics.c: Likewise.
5454 * c-decl.c: Likewise.
5455 * c-parser.c: Likewise.
5456 * c-tree.h: Likewise.
5457 * c-typeck.c: Likewise.
5458
880661a4
JW
54592012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5460
5461 PR c++/54930
5462 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5463
077d1abe
MLI
54642012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5465
5466 PR c/53066
5467 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5468 shadows a function, unless the variable is a function or a
5469 pointer-to-function.
5470
3a785c97
JJ
54712012-10-12 Jakub Jelinek <jakub@redhat.com>
5472
5473 PR c/54381
5474 * c-parser.c (struct c_tree_loc_pair): Removed.
5475 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5476 add location_t * and tree * arguments, fill in array of 3
5477 sizeof_arg trees and corresponding locs.
5478 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5479 c_parser_expr_list callers.
5480 (c_parser_postfix_expression_after_primary): Likewise. Pass
5481 array of 3 sizeof_arg trees and locs (corresponding to first
5482 3 arguments) to sizeof_pointer_memaccess_warning.
5483
703c8606
LC
54842012-10-09 Lawrence Crowl <crowl@google.com>
5485
5486 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5487 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5488 hash table.
5489
5d9de0d0
PC
54902012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5491
5492 PR c++/54194
5493 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5494 call.
5495
a212e43f
MG
54962012-10-09 Marc Glisse <marc.glisse@inria.fr>
5497
5498 PR c++/54427
5499 * c-typeck.c: Include c-common.h.
5500 (enum stv_conv): Moved to c-common.h.
5501 (scalar_to_vector): Moved to c-common.c.
5502 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5503 * Make-lang.in: c-typeck.c depends on c-common.h.
5504
3b78de56
AC
55052012-10-04 Arnaud Charlet <charlet@adacore.com>
5506
5507 * c-decl.c (c_write_global_declarations): Fix handling of
5508 -fdump-ada-spec*.
5509
78c60e3d
SS
55102012-09-30 Sharad Singhai <singhai@google.com>
5511
5512 * c-decl.c (c_write_global_declarations): Use a different method
5513 to determine if the dump has ben initialized.
5514
9f33203d
JM
55152012-09-14 Joseph Myers <joseph@codesourcery.com>
5516
5517 PR c/54552
5518 * c-typeck.c (c_cast_expr): When casting to a type requiring
5519 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5520 c_fully_fold first.
5521
a27d595d
JM
55222012-09-14 Joseph Myers <joseph@codesourcery.com>
5523
5524 PR c/54103
5525 * c-typeck.c (build_unary_op): Pass original argument of
5526 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5527 any C_MAYBE_CONST_EXPR, if it has integer operands.
5528 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5529 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5530 to c_objc_common_truthvalue_conversion, then remove any
5531 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5532 c_objc_common_truthvalue_conversion not
5533 c_common_truthvalue_conversion.
5534 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5535 call note_integer_operands for arguments with integer operands
5536 that are not integer constants.
5537
9feb29df
JJ
55382012-09-13 Jakub Jelinek <jakub@redhat.com>
5539
5540 PR c/54559
5541 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5542 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5543
d409320c
JJ
55442012-08-31 Jakub Jelinek <jakub@redhat.com>
5545
5546 PR c/54428
5547 * c-convert.c (convert): Don't call fold_convert_loc if
5548 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5549 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5550 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5551
6265d07c
JJ
55522012-08-24 Jakub Jelinek <jakub@redhat.com>
5553
5554 PR c/54355
5555 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5556 for nested and empty_ok arguments in the call to
5557 c_parser_declaration_or_fndef.
5558
1a4049e7
JJ
55592012-08-17 Jakub Jelinek <jakub@redhat.com>
5560
5561 * c-tree.h (c_last_sizeof_arg): Declare.
5562 * c-parser.c (struct c_tree_loc_pair): New type.
5563 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5564 non-NULL.
5565 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5566 (c_parser_postfix_expression_after_primary): Likewise. Call
5567 sizeof_pointer_memaccess_warning if needed.
5568 (sizeof_ptr_memacc_comptypes): New function.
5569 * c-typeck.c (c_last_sizeof_arg): New global variable.
5570 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5571
0229aee9
UB
55722012-07-24 Uros Bizjak <ubizjak@gmail.com>
5573
5574 * c-lang.h (lang_decl): Add variable_size GTY option.
5575
7ee2468b
SB
55762012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5577
5578 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5579 * Make-lang.in: Fix dependencies.
5580
d4a10d0a
SB
55812012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5582
5583 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5584 and add language Makefile hooks.
5585 * config-lang.in: New file.
5586 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5587 add the required "normal" config-lang.in rules.
5588 * c-lang.h: Moved from gcc/ to here.
5589 * c-tree.h: Likewise.
5590 * c-objc-common.c: Likewise.
5591 * c-objc-common.h: Likewise.
5592 * c-typeck.c: Likewise.
5593 * c-convert.c: Likewise.
5594 * c-lang.c: Likewise.
5595 * c-aux-info.c: Likewise.
5596 * c-errors.c: Likewise.
5597 * gccspec.c: Likewise.
5598 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5599 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5600\f
85ec4feb 5601Copyright (C) 2012-2018 Free Software Foundation, Inc.
d4a10d0a
SB
5602
5603Copying and distribution of this file, with or without modification,
5604are permitted in any medium without royalty provided the copyright
5605notice and this notice are preserved.
This page took 2.149307 seconds and 5 git commands to generate.