]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
c-parser.c (c_parser_omp_requires): Call sorry_at on requires clauses other than...
[gcc.git] / gcc / c / ChangeLog
CommitLineData
3179ebae
JJ
12018-11-09 Jakub Jelinek <jakub@redhat.com>
2
3 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
4 clauses other than atomic_default_mem_order.
5
28567c40
JJ
62018-11-08 Jakub Jelinek <jakub@redhat.com>
7
8 * c-parser.c: Include memmode.h.
9 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
10 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
11 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
12 task_reduction clauses.
13 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
14 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
15 section, or lvalue assignment expression.
16 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
17 (c_parser_omp_clause_lastprivate): Parse optional
18 conditional: modifier.
19 (c_parser_omp_clause_hint): Require constant integer expression rather
20 than just integer expression.
21 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
22 clause.
23 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
24 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
25 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
26 functions.
27 (c_parser_omp_clause_depend): Parse iterator modifier and handle
28 iterators. Parse mutexinoutset and depobj kinds.
29 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
30 callers.
31 (c_parser_omp_all_clauses): Likewise. Handle
32 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
33 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
34 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
35 default memory order from requires directive if any. Adjust
36 c_finish_omp_atomic caller.
37 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
38 (c_parser_omp_flush): Parse flush with memory-order-clause.
39 (c_parser_omp_for_loop): Allow NE_EXPR even in
40 OpenMP loops, adjust c_finish_omp_for caller.
41 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
42 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
43 Allow to be called while parsing combined parallel master.
44 Parse combined master taskloop{, simd}.
45 (c_parser_omp_parallel): Parse combined
46 parallel master{, taskloop{, simd}} constructs.
47 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
48 (OMP_TASKGROUP_CLAUSE_MASK): Define.
49 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
50 (OMP_TASKWAIT_CLAUSE_MASK): Define.
51 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
52 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
53 around teams body. Use SET_EXPR_LOCATION.
54 (c_parser_omp_target_data): Allow target data
55 with only use_device_ptr clauses.
56 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
57 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
58 (c_parser_omp_requires): New function.
59 (c_finish_taskloop_clauses): New function.
60 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
61 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
62 declaration. Disallow in_reduction clause when combined with parallel
63 master.
64 (c_parser_omp_construct): Adjust c_parser_omp_master and
65 c_parser_omp_taskgroup callers.
66 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
67 other than cancel.
68 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
69 like OMP_CLAUSE_REDUCTION.
70 (handle_omp_array_sections): Likewise. Call save_expr on array
71 reductions before calling build_index_type. Handle depend clauses
72 with iterators.
73 (struct c_find_omp_var_s): New type.
74 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
75 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
76 with static, runtime or auto schedule kinds. Call save_expr for whole
77 array reduction sizes. Diagnose reductions with zero sized elements
78 or variable length structures. Diagnose nogroup clause used with
79 reduction clause(s). Handle depend clause with
80 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
81 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
82 some different type for other kinds. Use build_unary_op with
83 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
84 Handle depend clauses with iterators. Remove no longer needed special
85 case that predetermined const qualified vars may be specified in
86 firstprivate clause. Complain if const qualified vars are mentioned
87 in data-sharing clauses other than firstprivate or shared. Use
88 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
89 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
90 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
91 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
92
7e2de6df
DM
932018-10-29 David Malcolm <dmalcolm@redhat.com>
94
95 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
96 logic for change to name_hint::operator bool.
97 (undeclared_variable): Likewise.
98 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
99 (c_parser_parameter_declaration): Likewise.
100
9f936c86
JM
1012018-10-17 Joseph Myers <joseph@codesourcery.com>
102
103 * c-errors.c (pedwarn_c11): New function.
104 * c-parser.c (disable_extension_diagnostics): Save
105 warn_c11_c2x_compat and set it to 0.
106 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
107 (c_parser_static_assert_declaration_no_semi): Handle
108 _Static_assert without string constant.
109 * c-tree.h (pedwarn_c11): New prototype.
110
033eb567
DM
1112018-10-17 David Malcolm <dmalcolm@redhat.com>
112
113 * Make-lang.in (selftest-c): New.
114 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
115 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
116 from gcc/Makefile.in.
117
0edf3afe
RB
1182018-10-02 Richard Biener <rguenther@suse.de>
119
120 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
121
8313a764
JM
1222018-09-26 Joseph Myers <joseph@codesourcery.com>
123
124 PR c/87390
125 * c-typeck.c (build_binary_op): Use excess precision for
126 comparisons of integers and floating-point for C11 and later.
127
ce6f0888
MJ
1282018-09-26 Martin Jambor <mjambor@suse.cz>
129
130 PR c/87347
131 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
132 comment.
133
9c4a4b3c
DM
1342018-09-17 David Malcolm <dmalcolm@redhat.com>
135
136 * c-objc-common.c (range_label_for_type_mismatch::get_text):
137 Update for new param.
138 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
139 Likewise.
140
80c6d1f4
MJ
1412018-09-17 Martin Jambor <mjambor@suse.cz>
142
143 PR c/63886
144 * c-parser.c: (warn_for_abs): New function.
145 (c_parser_postfix_expression_after_primary): Call it.
146
4a426e36
BE
1472018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
148
149 * c-typeck.c (digest_init): Shorten overlength strings.
150
6d900107
BE
1512018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
152
153 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
154
b5764229
BE
1552018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
156
157 * c-decl.c (finish_decl): Call braced_list_to_string here ...
158 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
159
22eea6b2
AM
1602018-08-30 Alexander Monakov <amonakov@ispras.ru>
161
162 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
163 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
164
85204e23
DM
1652018-08-27 David Malcolm <dmalcolm@redhat.com>
166
167 PR 87091
168 * c-decl.c (implicitly_declare): Update call to
169 maybe_add_include_fixit to suggest overriding the location, as it
170 is for a note.
171 * c-objc-common.c (c_tree_printer): Update for conversion of
172 show_caret_p to a tri-state.
173
3d78e008
ML
1742018-08-27 Martin Liska <mliska@suse.cz>
175
176 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
177 fndecl_built_in_p and remove check for FUNCTION_DECL if
178 possible.
3d78e008
ML
179 (diagnose_mismatched_decls): Likewise.
180 (merge_decls): Likewise.
181 (warn_if_shadowing): Likewise.
182 (pushdecl): Likewise.
183 (implicitly_declare): Likewise.
184 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
185 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
186 * c-typeck.c (build_function_call_vec): Likewise.
187 (convert_arguments): Likewise.
188
097f82ec
DM
1892018-08-20 David Malcolm <dmalcolm@redhat.com>
190
191 PR other/84889
192 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
193 (diagnose_mismatched_decls): Likewise, in various places.
194 (warn_if_shadowing): Likewise.
195 (implicit_decl_warning): Likewise.
196 (implicitly_declare): Likewise.
197 (undeclared_variable): Likewise.
198 (declare_label): Likewise.
199 (grokdeclarator): Likewise.
200 (start_function): Likewise.
201 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
202 (c_parser_parameter_declaration): Likewise.
203 (c_parser_binary_expression): Likewise.
204 * c-typeck.c (c_expr_sizeof_expr): Likewise.
205 (parser_build_binary_op): Likewise.
206 (build_unary_op): Likewise.
207 (error_init): Likewise.
208 (pedwarn_init): Likewise.
209 (warning_init): Likewise.
210 (convert_for_assignment): Likewise.
211
96e6ae57
DM
2122018-08-15 David Malcolm <dmalcolm@redhat.com>
213
214 * c-objc-common.c: Include "gcc-rich-location.h".
215 (c_tree_printer): Move implemenation of '%T' to...
216 (print_type): ...this new function.
217 (range_label_for_type_mismatch::get_text): New function.
218 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
219 range for the various ic_argpass cases.
220 (class maybe_range_label_for_tree_type_mismatch): New class.
221 (build_binary_op): Use it when calling binary_op_error.
222
0cd020ae
PK
2232018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
224
225 * c-decl.c (start_decl): Do not warn if variables is named as main
226 and is a local variable.
227
72733314
IS
2282018-08-15 Iain Sandoe <iain@sandoe.co.uk>
229
230 PR c/19315
231 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
232 objects of unknown size.
233
23aa9f7c
MS
2342018-08-13 Martin Sebor <msebor@redhat.com>
235
236 PR tree-optimization/71625
237 * c-parser.c (c_parser_declaration_or_fndef): Call
238 braced_list_to_string.
239
e5e7e50d
BH
2402018-08-03 Bogdan Harjoc <harjoc@gmail.com>
241
242 PR c/86690
243 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
244 errors.
245
8a45b051
MS
2462018-08-01 Martin Sebor <msebor@redhat.com>
247
248 PR tree-optimization/86650
249 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
250 and TREE_BLOCK (t) from within percent_K_format to this callsite.
251
5922dcb5
JJ
2522018-08-01 Jakub Jelinek <jakub@redhat.com>
253
254 PR c/85704
255 * c-typeck.c (init_field_decl_cmp): New function.
256 (output_pending_init_elements): Use it for field comparisons
257 instead of pure bit_position comparisons.
258
9b452033
JJ
2592018-07-12 Jakub Jelinek <jakub@redhat.com>
260
261 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
262 type here, instead add "omp declare target implicit" attribute.
263 (finish_decl): Diagnose vars without mappable type here.
264
829c6349
CLT
2652018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
266 Thomas Schwinge <thomas@codesourcery.com>
267 Cesar Philippidis <cesar@codesourcery.com>
268
269 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
270 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
271 to their non-present_or_* counterparts. Make 'self' an alias to
272 PRAGMA_OACC_CLAUSE_HOST.
273 (c_parser_oacc_data_clause): Update GOMP mappings for
274 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
275 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
276 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
277 Remove support for present_or_* clauses.
278 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
279 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
280 (OACC_DECLARE_CLAUSE_MASK): Likewise.
281 (OACC_DATA_CLAUSE_MASK): Likewise.
282 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
283 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
284 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
285 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
286 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
287
e197e64e
KV
2882018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
289
290 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
291 * gimple-parser.c (c_parser_gimple_statement): Likewise.
292 (c_parser_gimple_unary_expression): Likewise.
293
487f2f61
JJ
2942018-06-15 Jakub Jelinek <jakub@redhat.com>
295
296 PR c/86093
297 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
298 before doing POINTER_DIFF_EXPR.
299
e4d44a37
MP
3002018-06-07 Marek Polacek <polacek@redhat.com>
301
302 PR c/85318
303 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
304 for loop initial declarations.
305
b67b9225
DP
3062018-05-30 David Pagan <dave.pagan@oracle.com>
307
308 PR c/55976
309 * c-decl.c (grokdeclarator): Update check for return type warnings.
310 (start_function): Likewise.
311 (finish_function): Likewise.
312 * c-typeck.c (c_finish_return): Update check for return type warnings.
313 Pass OPT_Wreturn_type to pedwarn when appropriate.
314
c566cc9f
RS
3152018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
316
317 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
318 __FMA_EXPR handlng.
319
e4f81565
RS
3202018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
321
322 * gimple-parser.c: Include internal-fn.h.
323 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
324 (c_parser_gimple_call_internal): New function.
325 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
326 Fix typos in comment.
327
79e7b1fe
JJ
3282018-05-10 Jakub Jelinek <jakub@redhat.com>
329
330 PR c++/85662
331 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
332 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
333 fold_convert_loc.
334 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
335 fold_offsetof_1, pass argtype as TYPE to it and drop the
336 fold_convert_loc.
337
f7584c81
DP
3382018-05-02 David Pagan <dave.pagan@oracle.com>
339
340 PR c/30552
341 * c-decl.c (old_style_parameter_scope): New function.
342 * c-parser.c (c_parser_postfix_expression): Check for statement
343 expressions in old-style function parameter list declarations.
344 * c-parser.h (old_style_parameter_scope): New extern declaration.
345
b33a0cb3
JJ
3462018-04-25 Jakub Jelinek <jakub@redhat.com>
347
348 PR sanitizer/84307
349 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
350 it is not TREE_STATIC.
351 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
352 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
353 its COMPOUND_LITERAL_EXPR_DECL.
354
c5c5822a
JM
3552018-03-21 Joseph Myers <joseph@codesourcery.com>
356
357 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
358 where all functions return the same _FloatN or _FloatNx type,
359 treat integer types as _Float64 instead of double.
360
aa1c9429
JJ
3612018-03-21 Jakub Jelinek <jakub@redhat.com>
362
363 PR c/84999
364 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
365 building vector comparison, diagnose it and return error_mark_node.
366
9bb45a95
JJ
3672018-03-15 Jakub Jelinek <jakub@redhat.com>
368
369 PR c/84853
370 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
371 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
372 INTEGER_TYPE element type.
373
ada6bad9
DP
3742018-03-13 David Pagan <dave.pagan@oracle.com>
375
376 PR c/46921
377 * c-typeck.c (output_init_element): Ensure field initializer
378 expression is always evaluated if there are side effects.
379
849bbdb9
JJ
3802018-03-06 Jakub Jelinek <jakub@redhat.com>
381
382 PR c/84721
383 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
384 !building_stmt_list_p ().
385
d74641bd
RS
3862018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
387
388 PR c/84305
389 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
390 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
391 and include the BIND_EXPR in the list of things that need to be
392 pre-evaluated.
393
0444aa9c
NS
3942018-02-09 Nathan Sidwell <nathan@acm.org>
395
396 PR c/84293
397 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
398 to strict_aliasing_warning.
399
7c30b12a
PC
4002018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
401
402 * c-typeck.c (really_start_incremental_init, push_init_level,
403 set_nonincremental_init, output_init_element, process_init_element):
404 Use DECL_UNNAMED_BIT_FIELD.
405
2be4dfcb
MP
4062018-01-31 Marek Polacek <polacek@redhat.com>
407
408 PR c/81779
409 * c-parser.c (c_parser_compound_statement_nostart): Call
410 expansion_point_location_if_in_system_header.
411
bb9869d5
DM
4122018-01-17 David Malcolm <dmalcolm@redhat.com>
413
414 PR c++/83814
415 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
416 the C part.
417
b4923738
JJ
4182018-01-13 Jakub Jelinek <jakub@redhat.com>
419
420 PR c/83801
421 * c-tree.h (decl_constant_value_1): Add a bool argument.
422 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
423 returning a CONSTRUCTOR if it is true. Use error_operand_p.
424 (decl_constant_value): Adjust caller.
425 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
426 decl_constant_value_1 as IN_INIT. Otherwise, punt if
427 decl_constant_value returns initializer that has BLKmode or
428 array type.
429 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
430
928686b1
RS
4312018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
432 Alan Hayward <alan.hayward@arm.com>
433 David Sherwood <david.sherwood@arm.com>
434
435 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
436 TYPE_VECTOR_SUBPARTS.
437
85ec4feb
JJ
4382018-01-03 Jakub Jelinek <jakub@redhat.com>
439
440 Update copyright years.
441
913884f7
JJ
4422018-01-01 Jakub Jelinek <jakub@redhat.com>
443
444 PR c/83595
445 * c-parser.c (c_parser_braced_init, c_parser_initelt,
446 c_parser_conditional_expression, c_parser_cast_expression,
447 c_parser_sizeof_expression, c_parser_alignof_expression,
448 c_parser_postfix_expression, c_parser_omp_declare_reduction,
449 c_parser_transaction_expression): Use set_error () method instead
450 of setting value member to error_mark_node.
451
c6cfa2bf
MM
4522017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
453
454 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
455 and _Float<N>X built-in functions.
456
11d29d63
JJ
4572017-12-22 Jakub Jelinek <jakub@redhat.com>
458
14ec014e
JJ
459 PR debug/83550
460 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
461 TYPE_STUB_DECL and call rest_of_type_compilation before processing
462 incomplete vars rather than after it.
463
11d29d63
JJ
464 PR debug/83547
465 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
466 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
467 and consider empty ones if there are no other stmts. For
468 -Wunused-value walk all statements before the one only followed by
469 DEBUG_BEGIN_STMTs.
470
170a8bd6 4712017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 472 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
473
474 * c-parser.c (c_parser_while_statement): Add unroll parameter and
475 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
476 (c_parser_do_statement): Likewise.
477 (c_parser_for_statement): Likewise.
478 (c_parser_statement_after_labels): Adjust calls to above.
479 (c_parse_pragma_ivdep): New static function.
480 (c_parser_pragma_unroll): Likewise.
481 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
482 <PRAGMA_UNROLL>: New case.
483
01512446
JJ
4842017-12-19 Jakub Jelinek <jakub@redhat.com>
485
486 * c-typeck.c (comptypes_internal, function_types_compatible_p,
487 perform_integral_promotions, digest_init): Replace Yoda conditions
488 with typical order conditions.
489 * c-decl.c (check_bitfield_type_and_width): Likewise.
490
c65e18d3
BE
4912017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
492
493 * c-typeck.c (c_safe_arg_type_equiv_p,
494 c_safe_function_type_cast_p): New function.
495 (build_c_cast): Implement -Wcast-function-type.
496
b7280579
RB
4972017-12-14 Richard Biener <rguenther@suse.de>
498
499 PR c/83415
500 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
501 like REALPART_EXPR for the behavior of whether its operand
502 is an lvalue.
503
49e6a6c0
MP
5042017-12-12 Marek Polacek <polacek@redhat.com>
505
506 PR c/82679
507 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
508
96a95ac1
AO
5092017-12-12 Alexandre Oliva <aoliva@redhat.com>
510
511 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
512 * c-parser.c (add_debug_begin_stmt): New.
513 (c_parser_declaration_or_fndef): Call it.
514 (c_parser_compound_statement_nostart): Likewise.
515 (c_parser_statement_after_labels): Likewise.
516 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
517
4b2b493f
JM
5182017-12-07 Joseph Myers <joseph@codesourcery.com>
519
520 * c-decl.c (build_compound_literal): Add parameter alignas_align
521 and set alignment of decl if nonzero.
522 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
523 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
524 qualifier.
525 (c_parser_struct_declaration): Update syntax comment.
526 (c_parser_type_name): Add alignas_ok argument and pass it to
527 c_parser_declspecs.
528 (c_parser_cast_expression): Pass true to c_parser_type_name and
529 give error if a cast used an _Alignas specifier.
530 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
531 give error if sizeof (type-name) used an _Alignas specifier.
532 (c_parser_alignof_expression): Pass true to c_parser_type_name and
533 give error if _Alignof (type-name) used an _Alignas specifier.
534 (c_parser_postfix_expression_after_paren_type): Check specified
535 alignment for a compound literal and pass it to
536 build_compound_literal.
537 * c-parser.h (c_parser_type_name): Update prototype.
538 * c-tree.h (build_compound_literal): Update prototype.
539
5d9ae53d
MS
5402017-12-07 Martin Sebor <msebor@redhat.com>
541
542 PR c/81544
543 * c-decl.c (c_decl_attributes): Look up existing declaration and
544 pass it to decl_attributes.
545
c79144f8
DM
5462017-12-06 David Malcolm <dmalcolm@redhat.com>
547
548 PR c/83236
549 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
550 reserved for use by the implementation.
551
613bc14f
DM
5522017-12-06 David Malcolm <dmalcolm@redhat.com>
553
554 * c-decl.c: Include "c-family/c-spellcheck.h".
555
05abad4c
ML
5562017-12-05 Martin Liska <mliska@suse.cz>
557 Jakub Jelinek <jakub@redhat.com>
558
559 * c-typeck.c (pointer_diff): Add new argument and instrument
560 pointer subtraction.
561 (build_binary_op): Similar for pointer comparison.
562
cc6534d4
JJ
5632017-12-01 Jakub Jelinek <jakub@redhat.com>
564
65791f42
JJ
565 PR c/79153
566 * c-parser.c: Include tree-iterator.h.
567 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
568 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
569 on it.
570
cc6534d4
JJ
571 PR c/83222
572 * c-tree.h (decl_constant_value_1): Declare.
573 * c-typeck.c (decl_constant_value_1): New function.
574 (decl_constant_value): Use it.
575 * c-fold.c (c_fully_fold_internal): If in_init, use
576 decl_constant_value_1 instead of decl_constant_value.
577
5de73c05
JJ
5782017-11-30 Jakub Jelinek <jakub@redhat.com>
579
580 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
581
058f0b9e
JJ
5822017-11-28 Jakub Jelinek <jakub@redhat.com>
583
584 PR sanitizer/81275
585 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
586 c_switch_covers_all_cases_p returns true.
587
5e9d6aa4 5882017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 589 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
590
591 * Make-lang.in (c/c-array-notation.o): Remove.
592 * c-array-notation.c: Delete.
593 * c-decl.c: Remove cilkplus condition.
594 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
595 c_parser_cilk_verify_simd, c_parser_array_notation,
596 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
597 c_parser_cilk_simd_fn_vector_attrs,
598 c_finish_cilk_simd_fn_tokens): Delete.
599 (c_parser_declaration_or_fndef): Remove cilkplus condition.
600 (c_parser_direct_declarator_inner): Ditto.
601 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
602 (c_parser_attributes, c_parser_compound_statement,
603 c_parser_statement_after_labels, c_parser_if_statement,
604 c_parser_switch_statement, c_parser_while_statement,
605 c_parser_do_statement, c_parser_for_statement,
606 c_parser_unary_expression, c_parser_postfix_expression,
607 c_parser_postfix_expression_after_primary,
608 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
609 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
610 support.
611 * c-typeck.c (build_array_ref, build_function_call_vec,
612 convert_arguments,
613 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
614 c_finish_loop, build_binary_op): Remove cilkplus support.
615
9e851845
JJ
6162017-11-28 Jakub Jelinek <jakub@redhat.com>
617
618 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
619 of build3.
620
8c7dbea9
BK
6212017-11-14 Boris Kolpackov <boris@codesynthesis.com>
622
623 * Make-lang.in (c.install-plugin): Install backend import library.
624
41521dee
JJ
6252017-11-23 Jakub Jelinek <jakub@redhat.com>
626
627 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
628 pragma_stmt context.
629
ac9effed
EB
6302017-11-23 Mike Stump <mikestump@comcast.net>
631 Eric Botcazou <ebotcazou@adacore.com>
632
633 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
634 ANNOTATE_EXPR.
635 (c_parser_do_statement): Likewise.
636 (c_parser_for_statement): Likewise.
637
ce95abc4
DM
6382017-11-22 David Malcolm <dmalcolm@redhat.com>
639
640 PR c++/62170
641 * c-objc-common.c (c_tree_printer): Convert penultimate param from
642 bool to bool *. Within '%T' handling, if showing an "aka", use
643 "quoted" param to add appropriate quoting.
644
974aedcc
MP
6452017-11-22 Marek Polacek <polacek@redhat.com>
646
647 PR c++/60336
648 PR middle-end/67239
649 PR target/68355
650 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
651
d4300cc6
DM
6522017-11-21 David Malcolm <dmalcolm@redhat.com>
653
654 PR c/83056
655 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
656 earlier failed lookups.
657
1af4ebf5
MG
6582017-11-21 Marc Glisse <marc.glisse@inria.fr>
659
660 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
661 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
662
26edace6
DM
6632017-11-20 David Malcolm <dmalcolm@redhat.com>
664
665 PR c/81404
666 * c-decl.c: Include "c-family/known-headers.h".
667 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
668 to known-headers.cc.
669 (class suggest_missing_header): Move to known-header.h.
670 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
671 than get_c_name_hint.
672
b1212255
DM
6732017-11-20 David Malcolm <dmalcolm@redhat.com>
674
675 * c-decl.c (get_c_name_hint): New function.
676 (class suggest_missing_header): New class.
677 (lookup_name_fuzzy): Call get_c_name_hint and use it to
678 suggest missing headers to the user.
679
6c7a259b
DM
6802017-11-20 David Malcolm <dmalcolm@redhat.com>
681
682 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
683 Include "c-family/name-hint.h"
684 (implicit_decl_warning): Convert "hint" from
685 const char * to name_hint. Pass location to
686 lookup_name_fuzzy. Suppress any deferred diagnostic if the
687 warning was not printed.
688 (undeclared_variable): Likewise for "guessed_id".
689 (lookup_name_fuzzy): Convert return type from const char *
690 to name_hint. Add location_t param.
691 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
692 Include "c-family/name-hint.h"
693 (c_parser_declaration_or_fndef): Convert "hint" from
694 const char * to name_hint. Pass location to lookup_name_fuzzy.
695 (c_parser_parameter_declaration): Likewise.
696
f9c59f7e
JJ
6972017-11-19 Jakub Jelinek <jakub@redhat.com>
698
699 PR c/66618
700 PR c/69960
701 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
702 where needed.
703 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
704 handle_omp_array_sections): Likewise.
705 (digest_init): Don't call decl_constant_value_for_optimization.
706 * c-tree.h (decl_constant_value_for_optimization): Removed.
707 * c-fold.c (c_fold_array_ref): New function.
708 (c_fully_fold_internal): Add LVAL argument, propagate it through
709 recursive calls. For VAR_P call decl_constant_value and
710 unshare if not LVAL and either optimizing or IN_INIT. Remove
711 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
712 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
713 (c_fully_fold): Add LVAL argument, pass it through to
714 c_fully_fold_internal.
715 (decl_constant_value_for_optimization): Removed.
716
3ca0dc60
JM
7172017-11-15 Joseph Myers <joseph@codesourcery.com>
718
719 PR c/81156
720 * c-parser.c (check_tgmath_function): New function.
721 (enum tgmath_parm_kind): New enum.
722 (c_parser_postfix_expression): Handle __builtin_tgmath.
723
64a5912c
DM
7242017-10-31 David Malcolm <dmalcolm@redhat.com>
725
726 * c-decl.c (implicit_decl_warning): Update for renaming of
727 pedwarn_at_rich_loc and warning_at_rich_loc.
728 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
729 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
730 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
731 (c_parser_struct_or_union_specifier): Likewise for renaming of
732 pedwarn_at_rich_loc.
733 (c_parser_parameter_declaration): Likewise for renaming of
734 error_at_rich_loc.
735 * c-typeck.c (build_component_ref): Likewise.
736 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
737 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
738 (set_init_label): Likewise for renaming of error_at_rich_loc.
739
c1136864
RB
7402017-10-30 Richard Biener <rguenther@suse.de>
741
742 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
743 stmts.
744
ee5fd23a
MM
7452017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
746
747 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
748 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
749
1a59ccf2
DM
7502017-10-25 David Malcolm <dmalcolm@redhat.com>
751
752 PR c/7356
753 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
754 semicolons.
755
bc1a75dd
JJ
7562017-10-25 Jakub Jelinek <jakub@redhat.com>
757
758 PR libstdc++/81706
759 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
760 newdecl to corresponding __builtin_ if any.
761
ff1ff960
PC
7622017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
763
764 PR c++/82466
765 * c-decl.c (diagnose_mismatched_decls): Use
766 OPT_Wbuiltin_declaration_mismatch.
767
62e1c678
DM
7682017-10-12 David Malcolm <dmalcolm@redhat.com>
769
770 * c-parser.c (c_parser_require): Add "type_is_unique" param and
771 use it to guard calls to maybe_suggest_missing_token_insertion.
772 (c_parser_parms_list_declarator): Override default value of new
773 "type_is_unique" param to c_parser_require.
774 (c_parser_asm_statement): Likewise.
775 * c-parser.h (c_parser_require): Add "type_is_unique" param,
776 defaulting to true.
777
a92f6726
NS
7782017-10-11 Nathan Sidwell <nathan@acm.org>
779
780 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
781
8e6cdc90
RS
7822017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
783
784 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
785 operating on trees as wide_ints.
786 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
787 (c_tree_equal): Likewise.
788
8139a48e
DM
7892017-10-04 David Malcolm <dmalcolm@redhat.com>
790
791 * c-decl.c (push_parm_decl): Store c_parm's location into the
792 PARAM_DECL.
793 (build_c_parm): Add "loc" param and store it within the c_parm.
794 * c-parser.c (struct c_parser): Add "last_token_location" field.
795 (c_parser_consume_token): Store location of the token into the
796 new field.
797 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
798 when handling a FUNCTION_DECL, if it doesn't already have them.
799 (c_parser_parameter_declaration): Generate a location for the
800 parameter, and pass it to the call to build_c_parm.
801 * c-tree.h (struct c_parm): Add field "loc".
802 (build_c_parm): Add location_t param.
803 * c-typeck.c (get_fndecl_argument_location): New function.
804 (inform_for_arg): New function.
805 (convert_for_assignment): Use inform_for_arg when dealing with
806 ic_argpass.
807
2a389958
JJ
8082017-09-29 Jakub Jelinek <jakub@redhat.com>
809
7d386d45
JJ
810 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
811 width is non-NULL.
812 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
813 don't SET_DECL_C_BIT_FIELD here.
814
2a389958
JJ
815 PR c/82340
816 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
817 instead of trying to set just TREE_READONLY manually.
818
ebc6a85e
TV
8192017-09-16 Tom de Vries <tom@codesourcery.com>
820
821 PR c/81875
822 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
823 cond itself.
824
bb75facd
JM
8252017-09-15 Joseph Myers <joseph@codesourcery.com>
826
827 PR c/82071
828 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
829 for C11.
830 (build_conditional_expr): For C11, generate result with excess
831 precision when one argument is an integer and the other is of a
832 type using excess precision.
833
1d933576
BE
8342017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
835
836 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
837
267bbb6f
MP
8382017-09-13 Marek Polacek <polacek@redhat.com>
839
840 PR c/82167
841 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
842 than expr.original_type.
843
6836632e
NS
8442017-09-12 Nathan Sidwell <nathan@acm.org>
845
846 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
847 resort_sorted_fields): Moved from c-family/c-common.c.
848 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
849
e035be33
JM
8502017-09-01 Joseph Myers <joseph@codesourcery.com>
851
852 PR c/82071
853 * c-typeck.c (build_atomic_assign): Handle argument with excess
854 precision. Ensure any EXCESS_PRECISION_EXPR is present in
855 argument passed to build_binary_op and convert_for_assignment but
856 not for call to c_fully_fold.
857 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
858 Ensure build_binary_op is called with argument with original
859 semantic type. Avoid calling c_fully_fold with an
860 EXCESS_PRECISION_EXPR from build_binary_op.
861
d2e05fcb
JJ
8622017-09-01 Jakub Jelinek <jakub@redhat.com>
863
864 PR c/81887
865 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
866
b397965c
RS
8672017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
868 Alan Hayward <alan.hayward@arm.com>
869 David Sherwood <david.sherwood@arm.com>
870
871 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
872 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
873 m1 and m2 to the signed equivalent of a fixed-point
874 SCALAR_TYPE_MODE.
875
14e18d71
DM
8762017-08-24 David Malcolm <dmalcolm@redhat.com>
877
878 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
879 than CAN_HAVE_LOCATION_P when determining whether to use the
880 location_t value within "value".
881
7f204c0f
DM
8822017-08-21 David Malcolm <dmalcolm@redhat.com>
883
884 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
885 rather than peeking the location of the first token.
886 * c-tree.h (c_expr::get_location): New method.
887
2f687306
DM
8882017-08-21 David Malcolm <dmalcolm@redhat.com>
889
890 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
891 to check_function_arguments.
892
3e7b80d7
MP
8932017-08-18 Marek Polacek <polacek@redhat.com>
894
895 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
896 commentary.
897
00aa1fa2
L
8982017-08-18 H.J. Lu <hongjiu.lu@intel.com>
899
900 PR c/53037
901 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
902 (check_bitfield_type_and_width): Don't allow bit-field with
903 warn_if_not_aligned type.
904
da67acb9
MS
9052017-08-14 Martin Sebor <msebor@redhat.com>
906
907 PR c/81117
908 * c-objc-common.c (c_objc_common_init): Handle 'G'.
909
bb85aa74
MP
9102017-08-11 Marek Polacek <polacek@redhat.com>
911
912 PR c/81795
913 * c-decl.c (pushtag): Only print inform if the warning was printed.
914 (grokdeclarator): Likewise.
915
32129a17
DM
9162017-08-10 David Malcolm <dmalcolm@redhat.com>
917
918 * c-parser.c (c_parser_error): Rename to...
919 (c_parser_error_richloc): ...this, making static, and adding
920 "richloc" parameter, passing it to the c_parse_error call,
921 rather than calling c_parser_set_source_position_from_token.
922 (c_parser_error): Reintroduce, reimplementing in terms of the
923 above, converting return type from void to bool.
924 (class token_pair): New class.
925 (struct matching_paren_traits): New struct.
926 (matching_parens): New typedef.
927 (struct matching_brace_traits): New struct.
928 (matching_braces): New typedef.
929 (get_matching_symbol): New function.
930 (c_parser_require): Add param MATCHING_LOCATION, using it to
931 highlight matching "opening" tokens for missing "closing" tokens.
932 (c_parser_skip_until_found): Likewise.
933 (c_parser_static_assert_declaration_no_semi): Convert explicit
934 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
935 class matching_parens, so that the pertinent open parenthesis is
936 highlighted when there are problems locating the close
937 parenthesis.
938 (c_parser_struct_or_union_specifier): Likewise.
939 (c_parser_typeof_specifier): Likewise.
940 (c_parser_alignas_specifier): Likewise.
941 (c_parser_simple_asm_expr): Likewise.
942 (c_parser_braced_init): Likewise, for matching_braces.
943 (c_parser_paren_condition): Likewise, for matching_parens.
944 (c_parser_switch_statement): Likewise.
945 (c_parser_for_statement): Likewise.
946 (c_parser_asm_statement): Likewise.
947 (c_parser_asm_operands): Likewise.
948 (c_parser_cast_expression): Likewise.
949 (c_parser_sizeof_expression): Likewise.
950 (c_parser_alignof_expression): Likewise.
951 (c_parser_generic_selection): Likewise.
952 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
953 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
954 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
955 In case CPP_OPEN_PAREN, pass loc_open_paren to the
956 c_parser_skip_until_found call.
957 (c_parser_objc_class_definition): Use class matching_parens as
958 above.
959 (c_parser_objc_method_decl): Likewise.
960 (c_parser_objc_try_catch_finally_statement): Likewise.
961 (c_parser_objc_synchronized_statement): Likewise.
962 (c_parser_objc_at_property_declaration): Likewise.
963 (c_parser_oacc_wait_list): Likewise.
964 (c_parser_omp_var_list_parens): Likewise.
965 (c_parser_omp_clause_collapse): Likewise.
966 (c_parser_omp_clause_default): Likewise.
967 (c_parser_omp_clause_if): Likewise.
968 (c_parser_omp_clause_num_threads): Likewise.
969 (c_parser_omp_clause_num_tasks): Likewise.
970 (c_parser_omp_clause_grainsize): Likewise.
971 (c_parser_omp_clause_priority): Likewise.
972 (c_parser_omp_clause_hint): Likewise.
973 (c_parser_omp_clause_defaultmap): Likewise.
974 (c_parser_oacc_single_int_clause): Likewise.
975 (c_parser_omp_clause_ordered): Likewise.
976 (c_parser_omp_clause_reduction): Likewise.
977 (c_parser_omp_clause_schedule): Likewise.
978 (c_parser_omp_clause_num_teams): Likewise.
979 (c_parser_omp_clause_thread_limit): Likewise.
980 (c_parser_omp_clause_aligned): Likewise.
981 (c_parser_omp_clause_linear): Likewise.
982 (c_parser_omp_clause_safelen): Likewise.
983 (c_parser_omp_clause_simdlen): Likewise.
984 (c_parser_omp_clause_depend): Likewise.
985 (c_parser_omp_clause_map): Likewise.
986 (c_parser_omp_clause_device): Likewise.
987 (c_parser_omp_clause_dist_schedule): Likewise.
988 (c_parser_omp_clause_proc_bind): Likewise.
989 (c_parser_omp_clause_uniform): Likewise.
990 (c_parser_omp_for_loop): Likewise.
991 (c_parser_cilk_clause_vectorlength): Likewise.
992 (c_parser_cilk_clause_linear): Likewise.
993 (c_parser_transaction_expression): Likewise.
994 * c-parser.h (c_parser_require): Add param matching_location with
995 default UNKNOWN_LOCATION.
996 (c_parser_error): Convert return type from void to bool.
997 (c_parser_skip_until_found): Add param matching_location with
998 default UNKNOWN_LOCATION.
999
30af3a2b
MP
10002017-08-09 Marek Polacek <polacek@redhat.com>
1001
1002 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1003 * c-tree.h (build_external_ref): Update declaration.
1004 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1005 (build_external_ref): Change the type of a parameter to bool.
1006 (parser_build_binary_op): Use true/false instead of 1/0.
1007 (pointer_diff): Likewise.
1008 (build_modify_expr): Likewise.
1009 (set_designator): Change the type of a parameter to bool.
1010 (set_init_index): Use true/false instead of 1/0.
1011 (set_init_label): Likewise.
1012 (output_init_element): Change the type of a parameter to bool.
1013 (output_pending_init_elements): Use true/false instead of 1/0.
1014 (process_init_element): Likewise.
1015 (build_binary_op): Change the type of a parameter to bool.
1016
296c53ac
MP
10172017-08-09 Marek Polacek <polacek@redhat.com>
1018
1019 PR c/81233
1020 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1021 Call emit_diagnostic_valist instead of pedwarn.
1022 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1023 Print the relevant types in diagnostics.
1024
a32c8316
MP
10252017-08-09 Marek Polacek <polacek@redhat.com>
1026
1027 PR c/81417
1028 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1029 build_conditional_expr.
1030 * c-parser.c (c_parser_conditional_expression): Create locations for
1031 EXP1 and EXP2 from their source ranges. Pass the locations down to
1032 build_conditional_expr.
1033 * c-tree.h (build_conditional_expr): Update declaration.
1034 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1035 For -Wsign-compare, also print the types.
1036
314e6352
ML
10372017-08-08 Martin Liska <mliska@suse.cz>
1038
1039 * c-convert.c: Include header files.
1040 * c-typeck.c: Likewise.
1041
577eec56
ML
10422017-08-07 Martin Liska <mliska@suse.cz>
1043
1044 * c-parser.c (c_parser_attributes): Canonicalize name of an
1045 attribute.
1046
f7b6353a
MP
10472017-08-02 Marek Polacek <polacek@redhat.com>
1048
1049 PR c/81289
1050 * c-parser.c (c_parser_unary_expression): Use set_error.
1051
8a6eab34
MP
1052 PR c/81448
1053 PR c/81306
1054 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1055 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1056
7fef86d3
JH
10572017-07-31 Jan Hubicka <hubicka@ucw.cz>
1058 Martin Liska <mliska@suse.cz>
1059
1060 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1061 statement.
7fef86d3 1062
f34ebeb2
ML
10632017-07-31 Martin Liska <mliska@suse.cz>
1064
1065 PR sanitize/81530
1066 * c-convert.c (convert): Guard condition with flag_sanitize_p
1067 also with current_function_decl non-null equality.
1068 * c-decl.c (grokdeclarator): Likewise.
1069 * c-typeck.c (build_binary_op): Likewise.
1070
8595f67b
MP
10712017-07-25 Marek Polacek <polacek@redhat.com>
1072
1073 * c-decl.c (grokfield): Remove local variable.
1074
d49718d6
MP
10752017-07-25 Marek Polacek <polacek@redhat.com>
1076
1077 PR c/81364
1078 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1079 macro expansion if the body is in { }.
1080 (c_parser_while_statement): Likewise.
1081 (c_parser_for_statement): Likewise.
1082
ff22eb12
NS
10832017-07-18 Nathan Sidwell <nathan@acm.org>
1084
1085 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1086
eea77d1f
DM
10872017-07-14 David Malcolm <dmalcolm@redhat.com>
1088
1089 * c-decl.c (implicitly_declare): When suggesting a missing
1090 #include, provide a fix-it hint.
1091
b6f43128
DM
10922017-07-06 David Malcolm <dmalcolm@redhat.com>
1093
1094 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1095 and call that instead.
1096 * c-tree.h (selftest::run_c_tests): New decl.
1097
3e2becc4
MP
10982017-06-26 Marek Polacek <polacek@redhat.com>
1099
1100 PR c/80116
1101 * c-parser.c (c_parser_if_body): Set the location of the
1102 body of the conditional after parsing all the labels. Call
1103 warn_for_multistatement_macros.
1104 (c_parser_else_body): Likewise.
1105 (c_parser_switch_statement): Likewise.
1106 (c_parser_while_statement): Likewise.
1107 (c_parser_for_statement): Likewise.
1108 (c_parser_statement): Add a default argument. Save the location
1109 after labels have been parsed.
1110 (c_parser_c99_block_statement): Likewise.
1111
343ae898
RB
11122017-06-19 Richard Biener <rguenther@suse.de>
1113
1114 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1115 negated _Literals to parse _Literal (int) -1.
1116
45b2222a
ML
11172017-06-13 Martin Liska <mliska@suse.cz>
1118
1119 PR sanitize/78204
1120 * c-convert.c (convert): Use sanitize_flags_p.
1121 * c-decl.c (grokdeclarator): Likewise.
1122 * c-typeck.c (convert_for_assignment): Likewise.
1123 (c_finish_return): Likewise.
1124 (build_binary_op): Likewise.
1125
8ab7005b
JJ
11262017-06-08 Jakub Jelinek <jakub@redhat.com>
1127
1128 PR c/81006
1129 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1130 to sizetype before size_binop.
1131
363dc72c
JJ
11322017-06-07 Jakub Jelinek <jakub@redhat.com>
1133
1134 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1135 of TDI_generic.
1136
dc949728
MP
11372017-06-06 Marek Polacek <polacek@redhat.com>
1138
1139 PR c/79983
1140 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1141 ref.
1142 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1143
40ffd95f
BE
11442017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1145
1146 * c-parser.c (c_parser_binary_expression): Implement the
1147 -Wsizeof_pointer_div warning.
1148 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1149 from a parenthesized expression.
1150 (c_parser_expr_list): Use c_last_sizeof_loc.
1151 * c-tree.h (c_last_sizeof_loc): New external.
1152 * c-typeck.c (c_last_sizeof_loc): New variable.
1153 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1154
9fc5e7a4
MM
11552017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1156
1157 PR testsuite/80580
1158 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1159
f012c8ef
DM
11602017-05-30 David Malcolm <dmalcolm@redhat.com>
1161
1162 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1163 parameters.
1164
3cd211af
MS
11652017-05-24 Martin Sebor <msebor@redhat.com>
1166
1167 PR c/80731
1168 * c-fold.c (c_fully_fold_internal): Adjust.
1169 * c-typeck.c (parser_build_unary_op): Adjust.
1170
fd71a9a2
TS
11712017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1172
1173 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1174 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1175 "VECTOR_LENGTH".
1176
92fa0f9e
MP
11772017-05-23 Marek Polacek <polacek@redhat.com>
1178
1179 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1180 quotes.
1181
d11c168a
JJ
11822017-05-22 Jakub Jelinek <jakub@redhat.com>
1183
1184 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1185 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1186 it returned invariant. Call tree_invariant_p unconditionally
1187 afterwards to decide whether to return expr or op0.
1188
58aca9d9
NS
11892017-05-22 Nathan Sidwell <nathan@acm.org>
1190
1191 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1192
7fd549d2
TS
11932017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1194
1195 * c-parser.c (c_parser_omp_clause_default): Handle
1196 "OMP_CLAUSE_DEFAULT_PRESENT".
1197
6ecd2339
BE
11982017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1199
1200 * config-lang.in (gtfiles): Add c-family/c-format.c.
1201
8a57ecff
NS
12022017-05-18 Nathan Sidwell <nathan@acm.org>
1203
1204 * c-decl.c (pushdecl_top_level): Delete unused function.
1205
6574d78e
MP
12062017-05-18 Marek Polacek <polacek@redhat.com>
1207
1208 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1209 (check_earlier_gotos): Likewise.
1210 (define_label): Likewise.
1211 (pending_xref_error): Likewise.
1212 (smallest_type_quals_location): Likewise.
1213 (grokdeclarator): Likewise.
1214 (grokparms): Likewise.
1215 (identifier_global_value): Likewise.
1216 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1217 (find_init_member): Likewise.
1218
e3455240
MP
12192017-05-18 Marek Polacek <polacek@redhat.com>
1220
1221 * c-decl.c (start_decl): Use false/true instead of 0/1.
1222 (grokdeclarator): Likewise.
1223 (finish_struct): Likewise.
1224 (start_function): Change the return type to bool. Use false/true
1225 instead of 0/1.
1226 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1227 * c-tree.h (start_function): Update.
1228 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1229 (set_designator): Change the return type to bool. Use false/true
1230 instead of 0/1.
1231
3fa8871b
MP
12322017-05-17 Marek Polacek <polacek@redhat.com>
1233
1234 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1235 * c-typeck.c: Likewise.
1236
142473df
MP
12372017-05-17 Marek Polacek <polacek@redhat.com>
1238
1239 PR sanitizer/80659
1240 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1241 DECL_IGNORED_P even for non-static compound literals.
1242
1a817418
ML
12432017-05-17 Martin Liska <mliska@suse.cz>
1244
1245 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1246 use it instead of int type.
1247
b2fa0a8b
MP
12482017-05-17 Marek Polacek <polacek@redhat.com>
1249
1250 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1251 call c_fully_fold.
1252 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1253 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1254 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1255 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1256 save_expr.
1257 (c_parser_conditional_expression): Likewise.
1258 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1259 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1260 (process_init_element): Likewise.
1261 (build_binary_op): Likewise.
1262 (handle_omp_array_sections_1): Likewise.
1263
1e47f02b
TS
12642017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1265
1266 * c-parser.c (c_parser_omp_clause_num_gangs)
1267 (c_parser_omp_clause_num_workers)
1268 (c_parser_omp_clause_vector_length): Merge functions into...
1269 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1270 all users.
1271
c24e924f
NS
12722017-05-11 Nathan Sidwell <nathan@acm.org>
1273
1274 * gimple-parser.c: Don't #include tree-dump.h.
1275
c587104e
MM
12762017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1277
1278 PR testsuite/80580
1279 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1280
67ac9a9d
MM
12812017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1282
1283 PR testsuite/80580
1284 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1285 incorrect __MEM syntax.
1286
ac4eb40f
MM
12872017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1288
1289 PR testsuite/80580
1290 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1291 type of unary '*'.
1292
641da50a
NS
12932017-05-09 Nathan Sidwell <nathan@acm.org>
1294
1295 * c-tree.h (pushdecl): Declare.
1296
56d35585
DM
12972017-05-05 David Malcolm <dmalcolm@redhat.com>
1298
1299 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1300 with diagnostic_report_diagnostic.
1301 * c-errors.c (pedwarn_c99): Likewise.
1302 (pedwarn_c90): Likewise.
1303
815d9cc6
XR
13042017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1305
92a285c1 1306 PR c++/80038
815d9cc6
XR
1307 * c-gimplify.c (c_gimplify_expr): Remove calls to
1308 cilk_gimplifY_call_params_in_spawned_fn.
1309
1c4ea66f
DM
13102017-04-25 David Malcolm <dmalcolm@redhat.com>
1311
1312 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1313 hint for removing extra semicolon.
1314
666f7903
JJ
13152017-04-21 Jakub Jelinek <jakub@redhat.com>
1316
1317 PR c/80468
1318 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1319 enabled, set specs->type to integer_type_node.
1320
5764ee3c
JW
13212017-04-03 Jonathan Wakely <jwakely@redhat.com>
1322
1323 * c-array-notation.c: Fix typo in comment.
1324
10fa8dfb
MP
13252017-03-29 Marek Polacek <polacek@redhat.com>
1326
1327 PR c/79730
1328 * c-decl.c (finish_decl): Check VAR_P.
1329
a9e4a1a5
JJ
13302017-03-27 Jakub Jelinek <jakub@redhat.com>
1331
1332 PR middle-end/80162
1333 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1334 * c-typeck.c (c_mark_addressable): Likewise. Look through
1335 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1336 to ARRAY_TYPE.
1337 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1338
ee3ff394
MP
13392017-03-23 Marek Polacek <polacek@redhat.com>
1340
1341 * c-tree.h: Remove a C_RID_YYCODE reference.
1342
4d1b8e70
JJ
13432017-03-21 Jakub Jelinek <jakub@redhat.com>
1344
1345 PR c/80097
1346 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1347 optional COMPOUND_EXPR with ubsan instrumentation.
1348
31dc71a8
MP
13492017-03-17 Marek Polacek <polacek@redhat.com>
1350
1351 * c-parser.c: Add C11 references.
1352
d579c385
MP
13532017-03-15 Marek Polacek <polacek@redhat.com>
1354
1355 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1356
85059a38
MP
13572017-03-11 Marek Polacek <polacek@redhat.com>
1358
1359 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1360
2f6f187a
DM
13612017-03-10 David Malcolm <dmalcolm@redhat.com>
1362
1363 PR translation/79848
1364 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1365 "%qs".
1366 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1367
36618428
MP
13682017-03-09 Marek Polacek <polacek@redhat.com>
1369
1370 PR sanitizer/79757
1371 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1372 parameter declarations with initializers.
1373
01e5af5a
JJ
13742017-03-09 Jakub Jelinek <jakub@redhat.com>
1375
1376 PR c/79969
1377 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1378 TYPE_STUB_DECL.
1379
a71dbc63
JJ
13802017-03-07 Jakub Jelinek <jakub@redhat.com>
1381
1382 PR c/79834
1383 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1384 for "may only be used in compound statements" diagnostics, change it
1385 such that the same translatable string is used for all pragmas. For
1386 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1387 diagnostics.
1388 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1389 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1390 "may only be used in compound statements" diagnostics, such that the
1391 same translatable string is used for all pragmas.
1392
1ff4bae6
MP
13932017-03-04 Marek Polacek <polacek@redhat.com>
1394
1395 PR c/79847
1396 * c-decl.c (implicit_decl_warning): Add missing space.
1397
7f5a7d78
MP
13982017-03-03 Marek Polacek <polacek@redhat.com>
1399
1400 PR c/79758
1401 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1402 current_function_prototype_arg_types is error_mark_node. Fix
1403 formatting. Use TREE_VALUE instead of TREE_TYPE.
1404
883c8f06
JJ
14052017-03-03 Jakub Jelinek <jakub@redhat.com>
1406
79c9b7a8
JJ
1407 PR c/79837
1408 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1409 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1410 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1411 diagnostics.
1412
883c8f06
JJ
1413 PR c/79836
1414 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1415 instead of %<_Generic>.
1416 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1417 (c_parser_omp_target_exit_data): Use %<release%> instead of
1418 %<release>.
1419
324ff1a0
JJ
14202017-02-28 Jakub Jelinek <jakub@redhat.com>
1421
1422 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1423 instead of just cond ? "..." : "...".
1424 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1425 for "enter"/"exit" keyword.
1426 (c_finish_oacc_routine): Don't use %s to supply portions of the
1427 message.
1428
4227c9ad
JJ
14292017-02-24 Jakub Jelinek <jakub@redhat.com>
1430
1431 PR c++/79588
1432 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1433 handle -Wrestrict here.
1434 * c-typeck.c (build_function_call_vec): Adjust
1435 check_function_arguments caller.
1436
5d972e66
RB
14372017-02-23 Richard Biener <rguenther@suse.de>
1438
1439 PR c/79684
1440 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1441 to initialize c_exprs to return.
1442 (c_parser_gimple_binary_expression): Likewise.
1443 (c_parser_gimple_unary_expression): Likewise.
1444 (c_parser_gimple_postfix_expression): Likewise.
1445
61ac5ebe
MP
14462017-02-22 Marek Polacek <polacek@redhat.com>
1447
1448 PR c/79662
1449 * c-typeck.c (convert_arguments): Handle error_mark_node.
1450
41d1b0b1
PK
14512017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1452
1453 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1454 value of c_parser_parse_ssa_name against error_mark_node and emit
1455 error if ssa name is anonymous and written as default definition.
1456
eab1f169
PK
14572017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1458
1459 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1460 FMA_EXPR.
1461
bcac0b4d
JJ
14622017-02-16 Jakub Jelinek <jakub@redhat.com>
1463
1464 PR c++/79512
1465 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1466 ignore #pragma omp target even when not followed by identifier.
1467
1be33173
PK
14682017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1469
1470 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1471 (c_parser_gimple_unary_expression): Likewise.
1472
aa326bfb
JJ
14732017-02-13 Jakub Jelinek <jakub@redhat.com>
1474
1475 * c-parser.c (c_parser_oacc_declare): Add missing space in
1476 diagnostics.
1477
8a398bc5
PK
14782017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1479
1480 PR c/79478
1481 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1482 set_c_expr_source_range when parsing ssa-name.
1483
3dcde5ef
PG
14842017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1485 Richard Biener <rguenther@suse.de>
1486
1487 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1488 building IL when arguments are error_mark_node.
1489 (c_parser_gimple_unary_expression): Likewise.
1490 (c_parser_gimple_if_stmt): Likewise.
1491 (c_parser_gimple_switch_stmt): Likewise.
1492 (c_parser_gimple_return_stmt): Likewise.
1493 (c_parser_parse_ssa_name): When name lookup fails do not build
1494 an SSA name. Use undeclared rather than not declared in error
1495 reporting.
1496
192b048b
MP
14972017-02-09 Marek Polacek <polacek@redhat.com>
1498
1499 PR c/79428
1500 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1501 instead of c_parser_skip_until_found.
1502
56f71478
JJ
15032017-02-09 Jakub Jelinek <jakub@redhat.com>
1504
1505 PR c/79431
1506 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1507 symtab_node::get on automatic variables.
1508
02889d23
CLT
15092016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1510 Chung-Lin Tang <cltang@codesourcery.com>
1511
1512 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1513 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1514 semantic checking.
1515 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1516
7af4b20d
RB
15172017-02-07 Richard Biener <rguenther@suse.de>
1518
1519 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1520 (c_parser_gimple_postfix_expression_after_primary):
1521 Do not use c_build_function_call_vec to avoid folding and promotion.
1522 Simplify.
1523
e5e391d6
MO
15242017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1525
1526 PR lto/79061
1527 * c-decl.c (pop_scope): Pass main_input_filename to
1528 build_translation_unit_decl.
1529
c2e84327
DM
15302017-01-24 David Malcolm <dmalcolm@redhat.com>
1531
1532 * c-parser.c: Include "read-rtl-function.h" and
1533 "run-rtl-passes.h".
1534 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1535 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1536 production. Update for renaming of field "gimple_pass" to
1537 "gimple_or_rtl_pass". If __RTL was seen, call
1538 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1539 to an auto_timevar, to cope with early exit.
1540 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1541 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1542 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1543 Handle RID_RTL.
1544 (c_parser_parse_rtl_body): New function.
1545 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1546 (struct c_declspecs): Rename field "gimple_pass" to
1547 "gimple_or_rtl_pass". Add field "rtl_p".
1548 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1549 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1550 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1551 (c_parser_gimple_or_rtl_pass_list): ...this.
1552
2ebd93e1
MP
15532017-01-20 Marek Polacek <polacek@redhat.com>
1554
1555 PR c/64279
1556 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1557
b1c95bb5
RB
15582017-01-13 Richard Biener <rguenther@suse.de>
1559
1560 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1561 nops.
1562
25329913
RB
15632017-01-13 Richard Biener <rguenther@suse.de>
1564
1565 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1566 _Literal ( type-name ) number.
1567
6bb4ea5c
RB
15682017-01-12 Richard Biener <rguenther@suse.de>
1569
1570 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1571 __MEM.
1572
6b5b4e9c
JJ
15732017-01-11 Jakub Jelinek <jakub@redhat.com>
1574
1575 PR c++/72813
1576 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1577 PCH file.
1578
e3252775
RB
15792017-01-11 Richard Biener <rguenther@suse.de>
1580
1581 PR bootstrap/79052
1582 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1583 returns on parse errors.
1584
a9342885
MP
15852017-01-04 Marek Polacek <polacek@redhat.com>
1586
1587 PR c++/64767
1588 * c-parser.c (c_parser_postfix_expression): Mark zero character
1589 constants by setting original_type in c_expr.
1590 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1591 with a zero character constant.
1592 (char_type_p): New function.
1593
5dd9a9d0
DM
15942017-01-04 David Malcolm <dmalcolm@redhat.com>
1595
1596 * c-parser.c (c_parser_declaration_or_fndef): Create a
1597 rich_location at init_loc and parse it to start_init.
1598 (last_init_list_comma): New global.
1599 (c_parser_braced_init): Update last_init_list_comma when parsing
1600 commas. Pass it to pop_init_level. Pass location of closing
1601 brace to pop_init_level.
1602 (c_parser_postfix_expression_after_paren_type): Create a
1603 rich_location at type_loc and parse it to start_init.
1604 (c_parser_omp_declare_reduction): Likewise for loc.
1605 * c-tree.h (start_init): Add rich_location * param.
1606 (pop_init_level): Add location_t param.
1607 * c-typeck.c (struct initializer_stack): Add field
1608 "missing_brace_richloc".
1609 (start_init): Add richloc param, use it to initialize
1610 the stack node's missing_brace_richloc.
1611 (last_init_list_comma): New decl.
1612 (finish_implicit_inits): Pass last_init_list_comma to
1613 pop_init_level.
1614 (push_init_level): When finding missing open braces, add fix-it
1615 hints to the richloc.
1616 (pop_init_level): Add "insert_before" param and pass it
1617 when calling pop_init_level. Add fixits about missing
1618 close braces to any richloc. Use the richloc for the
1619 -Wmissing-braces warning.
1620 (set_designator): Pass last_init_list_comma to pop_init_level.
1621 (process_init_element): Likewise.
1622
cbe34bb5
JJ
16232017-01-01 Jakub Jelinek <jakub@redhat.com>
1624
1625 Update copyright years.
1626
d17680f3
JJ
16272016-12-21 Jakub Jelinek <jakub@redhat.com>
1628
0dba7960
JJ
1629 PR bootstrap/78817
1630 * c-typeck.c (build_function_call_vec): If check_function_arguments
1631 returns true, set TREE_NO_WARNING on CALL_EXPR.
1632
d17680f3
JJ
1633 PR c/77767
1634 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1635 to *expr instead of overwriting it.
1636
aa90531e
RB
16372016-12-20 Richard Biener <rguenther@suse.de>
1638
1639 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1640 error recovery.
1641 (c_parser_gimple_statement): Only build assigns for non-error
1642 stmts.
1643 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1644
629b3d75
MJ
16452016-12-14 Martin Jambor <mjambor@suse.cz>
1646
1647 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1648 omp-low.h.
1649 (c_finish_oacc_routine): Adjusted call to
1650 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1651 to use their new names.
1652 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1653 use its new name.
1654 (c_parser_oacc_update): Likewise.
1655 (c_parser_omp_simd): Likewise.
1656 (c_parser_omp_target_update): Likewise.
1657 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1658 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1659 name.
1660 (c_finish_omp_cancellation_point): Likewise.
1661 * gimple-parser.c: Do not include omp-low.h
1662
c5af52eb
CP
16632016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1664 James Norris <jnorris@codesourcery.com>
1665
1666 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1667 EXIT_DATA,WAIT} are not used in compound statements.
1668 (c_parser_oacc_enter_exit_data): Update diagnostics.
1669
48330c93
BE
16702016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1671
1672 PR c++/71973
1673 * c-decl.c (diagnose_mismatched_decls): Use
1674 OPT_Wbuiltin_declaration_mismatch here too.
1675
899ca90e 16762016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1677 Alan Hayward <alan.hayward@arm.com>
1678 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1679
1680 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1681 (make_label, finish_struct): Likewise.
1682
1ee62b92 16832016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1684 Richard Biener <rguenther@suse.de>
22b15758 1685
8e745a17
JJ
1686 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1687 * config-lang.in (gtfiles): Add c/c-parser.h.
1688 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1689 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1690 * c-parser.c (enum c_id_kind, struct c_token,
1691 c_parser_next_token_is, c_parser_next_token_is_not,
1692 c_parser_next_token_is_keyword,
1693 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1694 Split out to ...
1695 * c-parser.h: ... new header.
1696 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1697 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1698 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1699 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1700 c_parser_error, c_parser_require, c_parser_skip_until_found,
1701 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1702 c_parser_type_name): Export.
1703 (c_parser_tokens_buf): New function.
1704 (c_parser_error): Likewise.
1705 (c_parser_set_error): Likewise.
1706 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1707 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1708 via c_parser_parse_gimple_body.
8e745a17
JJ
1709 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1710 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1711 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1712 c_parser_error, c_parser_require, c_parser_skip_until_found,
1713 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1714 c_parser_type_name): Declare.
1ee62b92
PG
1715 (struct c_parser): Declare forward.
1716 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1717 (c_parser_error): Likewise.
1718 (c_parser_set_error): Likewise.
1719 * gimple-parser.c: New file.
1720 * gimple-parser.h: Likewise.
1ee62b92 1721
22b15758
UB
17222016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1723
1724 PR c/35503
1725 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1726 warn_for_restrict.
1727
84ff4775
LCW
17282016-09-11 Le-Chun Wu <lcwu@google.com>
1729 Mark Wielaard <mjw@redhat.com>
1730
1731 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1732 to the given -Wshadow= variant.
1733
4d0cdd0c
TP
17342016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1735
1736 * c-typeck.c: Include memmodel.h.
1737
1202f33e
JJ
17382016-10-13 Jakub Jelinek <jakub@redhat.com>
1739
1740 PR target/77957
1741 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1742 instead of lhd_return_null_tree_v.
1743
8a14afd0
BS
17442016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1745
1746 PR c++/69733
1747 * c-decl.c (smallest_type_quals_location): New static function.
1748 (grokdeclarator): Try to find the correct location for an ignored
1749 qualifier.
1750
81fea426
MP
17512016-09-26 Marek Polacek <polacek@redhat.com>
1752
1753 PR c/7652
1754 * c-decl.c (pop_scope): Add gcc_fallthrough.
1755
17562016-09-26 Marek Polacek <polacek@redhat.com>
1757
1758 PR c/7652
1759 * c-parser.c (struct c_token): Add flags field.
1760 (c_lex_one_token): Pass it to c_lex_with_flags.
1761 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1762 into IFN_FALLTHROUGH.
1763 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1764 attribute fallthrough after a case label or default label.
1765 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1766
9a2300e9
MP
17672016-09-24 Marek Polacek <polacek@redhat.com>
1768
1769 PR c/77490
1770 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1771 have boolean value. Warn about ++/-- on booleans.
1772
7de76362
JJ
17732016-09-23 Jakub Jelinek <jakub@redhat.com>
1774
1775 * c-parser.c (incomplete_record_decls): Remove unnecessary
1776 = vNULL initialization of file scope vec.
1777
5b73d2ab
MP
17782016-09-16 Marek Polacek <polacek@redhat.com>
1779
1780 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1781
e51fbec3
MP
17822016-09-14 Marek Polacek <polacek@redhat.com>
1783
1784 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1785 (fix_array_notation_expr): Likewise.
1786 * c-decl.c (finish_decl): Likewise.
1787 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1788 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1789 (function_to_pointer_conversion): Use false instead of 0.
1790 (convert_lvalue_to_rvalue): Likewise.
1791 (parser_build_unary_op): Likewise.
1792 (build_atomic_assign): Likewise.
1793 (build_unary_op): Change nonconvert parameter type to bool, use
1794 true/false instead of 1/0.
1795 (build_binary_op): Use true instead of 1.
1796
254830ba
DM
17972016-09-13 David Malcolm <dmalcolm@redhat.com>
1798
1799 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1800 of add_fixit_insert to add_fixit_insert_before.
1801
4c13ba17
MP
18022016-09-13 Marek Polacek <polacek@redhat.com>
1803
1804 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1805 it.
1806
54dcdb88
BE
18072016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1808
1809 PR c++/77496
1810 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1811 COMPOUND_EXPR to warn_for_omitted_condop.
1812
e5106e27
DM
18132016-09-07 David Malcolm <dmalcolm@redhat.com>
1814
1815 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1816 c_get_substring_location for this new langhook.
1817
9dc5773f
JJ
18182016-09-02 Jakub Jelinek <jakub@redhat.com>
1819
1820 PR c/65467
1821 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1822 flag_openmp.
1823 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1824 instead of mark_exp_read on low_bound/length expression.
1825 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1826 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1827 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1828 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1829 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1830 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1831 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1832 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1833 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1834 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1835 instead of mark_expr_read.
1836 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1837 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1838 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1839 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1840 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1841 array section bases outside of depend clause, for depend clause
1842 use convert_lvalue_to_rvalue on the base.
1843 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1844 linear, aligned, map, to and from clauses.
1845 (c_omp_clause_copy_ctor): New function.
1846
295844f6
MP
18472016-09-01 Marek Polacek <polacek@redhat.com>
1848
1849 PR c/7652
1850 * c-typeck.c (composite_type): Add FALLTHRU comment.
1851
089af25c
DM
18522016-08-31 David Malcolm <dmalcolm@redhat.com>
1853
1854 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1855 to the insertion fixits for "struct", "union", and "enum".
1856
f9087798
DM
18572016-08-30 David Malcolm <dmalcolm@redhat.com>
1858
1859 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1860 rather than add_fixit_misspelled_id.
1861 (undeclared_variable): Likewise.
1862 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1863 now-redundant "here" params from add_fixit_insert method calls.
1864 (c_parser_parameter_declaration): Likewise.
1865 * c-typeck.c (build_component_ref): Remove now-redundant range
1866 param from add_fixit_replace method calls.
1867
ebef225f
MP
18682016-08-25 Marek Polacek <polacek@redhat.com>
1869
1870 * c-typeck.c (parser_build_binary_op): Pass LHS to
1871 warn_logical_not_parentheses.
1872
fe377a48
MP
18732016-08-25 Marek Polacek <polacek@redhat.com>
1874
1875 PR c/77323
1876 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1877 or _FloatN or _FloatNx is not supported.
1878 (finish_declspecs): Set type to integer_type_node when _FloatN or
1879 _FloatNx is not supported.
1880
c65699ef
JM
18812016-08-19 Joseph Myers <joseph@codesourcery.com>
1882
1883 PR c/32187
1884 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1885 (struct c_declspecs): Add field floatn_nx_idx.
1886 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1887 and _FloatNx type specifiers.
1888 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1889 (c_parser_declspecs, c_parser_attribute_any_word)
1890 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1891 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1892 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1893 narrower than double.
1894
2f1364c2
JJ
18952016-08-12 Jakub Jelinek <jakub@redhat.com>
1896 Martin Liska <mliska@suse.cz>
1897
1898 PR c/67410
1899 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1900 % to determine val element to change. Assert that
1901 wchar_bytes * charwidth fits into val array.
1902
191816a3
MP
19032016-08-12 Marek Polacek <polacek@redhat.com>
1904
1905 PR c/7652
1906 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1907 (c_parser_postfix_expression): Likewise.
1908 * c-typeck.c (build_unary_op): Adjust fall through comment.
1909 (c_mark_addressable): Likewise.
1910
b95a64bb
JJ
19112016-08-11 Jakub Jelinek <jakub@redhat.com>
1912
1913 PR c/72816
1914 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1915 array member through typedef, for orig_qual_indirect == 0 clear
1916 orig_qual_type.
1917
895aa8e1
DM
19182016-08-08 David Malcolm <dmalcolm@redhat.com>
1919
1920 PR c/64955
1921 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1922 this up to selftest::run_c_tests.
1923 (selftest::run_c_tests): New function.
1924
0b212d8c
TS
19252016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1926
ae9281fc
TS
1927 * c-parser.c (struct oacc_routine_data): Add error_seen and
1928 fndecl_seen members.
1929 (c_finish_oacc_routine): Use these.
1930 (c_parser_declaration_or_fndef): Adjust.
1931 (c_parser_oacc_routine): Likewise. Support more C language
1932 constructs, and improve diagnostics. Move pragma context
1933 checking...
1934 (c_parser_pragma): ... here.
1935
0b212d8c
TS
1936 * c-parser.c (struct oacc_routine_data): New.
1937 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1938 Simplify code.
1939 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1940 declare target" attribute.
1941
76e2c821
JB
19422016-08-01 Jan Beulich <jbeulich@suse.com>
1943
1944 * c-fold.c (c_fully_fold_internal): Also emit shift count
1945 warnings for vector types.
1946 * c-typeck.c (build_binary_op): Likewise.
1947
f618a472
MP
19482016-07-29 Marek Polacek <polacek@redhat.com>
1949
1950 PR c/71742
1951 * c-decl.c (finish_struct): Rephrase an error message.
1952
efd0786f
MP
1953 PR c/71853
1954 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1955 to error node for invalid code.
1956
e00dceaf
MP
1957 PR c/71573
1958 * c-decl.c (implicitly_declare): Return decl early not only for
1959 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1960
673a107a
JJ
19612016-07-29 Jakub Jelinek <jakub@redhat.com>
1962
1963 PR c/71969
1964 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1965 on GNU extern inline functions.
1966
a5b5c8b6
MP
19672016-07-29 Marek Polacek <polacek@redhat.com>
1968
1969 PR c/71583
1970 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1971 check expr.value.
1972
e3fe09c1
UB
19732016-07-22 Uros Bizjak <ubizjak@gmail.com>
1974
1975 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1976
7c8f7eaa
DM
19772016-07-20 David Malcolm <dmalcolm@redhat.com>
1978
1979 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1980 spellcheck-tree.h
1981 (best_macro_match): Likewise, converting from a typedef to a
1982 subclass.
1983 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1984 (lookup_name_fuzzy): Update for change of best_macro_match to a
1985 subclass with a ctor that calls cpp_forall_identifiers.
1986
de6a69ee
DM
19872016-07-20 David Malcolm <dmalcolm@redhat.com>
1988
1989 * c-decl.c (implicit_decl_warning): Update for conversion of
1990 return type of lookup_name_fuzzy to const char *.
1991 (undeclared_variable): Likewise.
1992 (lookup_name_fuzzy): Convert return type from tree to
1993 const char *.
1994 * c-parser.c (c_parser_declaration_or_fndef): Update for
1995 conversion of return type of lookup_name_fuzzy to const char *.
1996 (c_parser_parameter_declaration): Likewise.
1997
b1c9c068
CP
19982016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1999
2000 * c-parser.c (c_parser_oacc_declare): Don't scan for
2001 GOMP_MAP_POINTER.
2002 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2003 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2004 zero-length subarrays.
2005
ddbbcb19
JJ
20062016-07-15 Jakub Jelinek <jakub@redhat.com>
2007
2008 PR c/71858
2009 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2010 instead of FUZZY_LOOKUP_NAME.
2011 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2012 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2013
dd36b877
JJ
20142016-07-14 Jakub Jelinek <jakub@redhat.com>
2015
2016 PR c/71858
2017 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2018
8c681247
TS
20192016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2020
2021 * c-parser.c (c_parser_generic_selection): Make type of variable
2022 auto_vec.
2023 (c_parser_omp_declare_simd): Likewise.
2024
bf4fa671
TS
20252016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2026
2027 * c-decl.c (struct c_struct_parse_info): Change member types
2028 from vec to auto_vec.
2029 (start_struct): Adjust.
2030 (finish_struct): Likewise.
2031
557e8c49
JJ
20322016-07-02 Jakub Jelinek <jakub@redhat.com>
2033
2034 PR c/71719
2035 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2036
54d19c3b
TS
20372016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2038
2039 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2040 Move pragma context checking into...
2041 (c_parser_omp_cancellation_point): ... here, and improve
2042 diagnostic messages.
2043 * c-typeck.c (c_finish_omp_cancel)
2044 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2045
152ef731
JJ
20462016-06-29 Jakub Jelinek <jakub@redhat.com>
2047
2048 PR c/71685
2049 * c-typeck.c (c_build_qualified_type): Don't clear
2050 C_TYPE_INCOMPLETE_VARS for the main variant.
2051
20522016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2053
2054 PR c/71552
2055 * c-typeck.c (output_init_element): Diagnose incompatible types
2056 before non-constant initializers.
2057
e9ac1f86
JJ
20582016-06-28 Jakub Jelinek <jakub@redhat.com>
2059
2060 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2061
277d7ee0
AK
20622016-06-23 Andi Kleen <ak@linux.intel.com>
2063
2064 * Make-lang.in: Add support for autofdo.
2065
1a4f11c8
DM
20662016-06-22 David Malcolm <dmalcolm@redhat.com>
2067
2068 PR c/70339
2069 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2070 (implicit_decl_warning): When issuing warnings for implicit
2071 declarations, attempt to provide a suggestion via
2072 lookup_name_fuzzy.
2073 (undeclared_variable): Likewise when issuing errors.
2074 (lookup_name_in_scope): Likewise.
2075 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2076 (best_macro_match): New typedef.
2077 (find_closest_macro_cpp_cb): New function.
2078 (lookup_name_fuzzy): New function.
2079 * c-parser.c: Include gcc-rich-location.h.
2080 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2081 (c_keyword_starts_typename): ...this new function.
2082 (c_parser_declaration_or_fndef): When issuing errors about
2083 missing "struct" etc, add a fixit. For other kinds of errors,
2084 attempt to provide a suggestion via lookup_name_fuzzy.
2085 (c_parser_parms_declarator): When looking ahead to detect typos in
2086 type names, also reject CPP_KEYWORD.
2087 (c_parser_parameter_declaration): When issuing errors about
2088 unknown type names, attempt to provide a suggestion via
2089 lookup_name_fuzzy.
2090 * c-tree.h (c_keyword_starts_typename): New prototype.
2091
5a578671
JM
20922016-06-20 Joseph Myers <joseph@codesourcery.com>
2093
2094 PR c/71601
2095 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2096 c_common_type returns error_mark_node.
2097
3f8257db 20982016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2099
2100 PR c/69507
2101 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2102 __alignof__ (expression).
2103
6a3f203c
DM
21042016-06-14 David Malcolm <dmalcolm@redhat.com>
2105
2106 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2107
264757fb
DM
21082016-06-14 David Malcolm <dmalcolm@redhat.com>
2109
2110 * c-typeck.c (build_component_ref): Simplify fixit code by
2111 using gcc_rich_location::add_fixit_misspelled_id.
2112 (set_init_label): Likewise.
2113
f7e4f2e3
DM
21142016-06-13 David Malcolm <dmalcolm@redhat.com>
2115
2116 * c-parser.c (c_parser_initelt): Provide location of name for new
2117 location_t param of set_init_label.
2118 * c-tree.h (set_init_label): Add location_t param.
2119 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2120 param and use it when issuing error messages about unrecognized
2121 field names. Attempt to provide a fixit hint if appropriate,
2122 otherwise update the error message to provide the type name.
2123
4b1ffdb1
TS
21242016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2125
2126 PR c/71381
2127 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2128 Loosen checking.
2129
44a845ca
MS
21302016-06-08 Martin Sebor <msebor@redhat.com>
2131 Jakub Jelinek <jakub@redhat.com>
2132
2133 PR c++/70507
2134 PR c/68120
2135 * c-typeck.c (convert_arguments): Don't promote last argument
2136 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2137
92a5f2ba
MP
21382016-06-08 Marek Polacek <polacek@redhat.com>
2139
2140 PR c/71418
2141 * c-decl.c (grokdeclarator): Check TYPE_P.
2142
08203f73
MP
2143 PR c/71426
2144 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2145 code.
2146
6ffd47b7
DM
21472016-06-07 David Malcolm <dmalcolm@redhat.com>
2148
2149 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2150 and structure element reference, capture the location of the
2151 element name token and pass it to build_component_ref.
2152 (c_parser_postfix_expression_after_primary): Likewise for
2153 structure element dereference.
2154 (c_parser_omp_variable_list): Likewise for
2155 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2156 * c-tree.h (build_component_ref): Add location_t param.
2157 * c-typeck.c (build_component_ref): Add location_t param
2158 COMPONENT_LOC. Use it, if available, when issuing hints about
2159 mispelled member names to provide a fixit replacement hint.
2160
1f40cff3
MP
21612016-06-06 Marek Polacek <polacek@redhat.com>
2162
2163 PR c/71362
2164 * c-parser.c (c_parser_direct_declarator): Set location.
2165
5545a907
MP
21662016-06-06 Marek Polacek <polacek@redhat.com>
2167
2168 * c-typeck.c (comptypes_internal): Handle comparisons of
2169 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2170 TYPE_REF_CAN_ALIAS_ALL.
2171
b605f663
CLT
21722016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2173
2174 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2175 arguments as addressable when async clause exists.
2176
00631022
JJ
21772016-05-30 Jakub Jelinek <jakub@redhat.com>
2178
2179 PR c++/71349
2180 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2181 when combined with target construct.
2182
7211a097
JJ
21832016-05-26 Jakub Jelinek <jakub@redhat.com>
2184
2185 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2186 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2187
95efe6b6
MP
21882016-05-25 Marek Polacek <polacek@redhat.com>
2189
2190 PR c/71265
2191 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2192
a23faf7a
MP
2193 PR c/71266
2194 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2195
e46c7770
CP
21962016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2197
2198 * c-parser.c (c_parser_oacc_declare): Add support for
2199 GOMP_MAP_FIRSTPRIVATE_POINTER.
2200 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2201 argument with enum c_omp_region_type ort.
2202 (handle_omp_array_sections): Likewise. Update call to
2203 handle_omp_array_sections_1.
2204 (c_finish_omp_clauses): Add specific errors and warning messages for
2205 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2206 call to handle_omp_array_sections.
2207
a04e69c0
TS
22082016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2209
2210 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2211
f17a223d
RB
22122016-05-24 Richard Biener <rguenther@suse.de>
2213
2214 PR middle-end/70434
2215 PR c/69504
2216 * c-typeck.c (build_array_ref): Do not complain about indexing
2217 non-lvalue vectors. Adjust for function name change.
2218
79063edd
MS
22192016-05-20 Martin Sebor <msebor@redhat.com>
2220
2221 PR c/71115
2222 * c-typeck.c (error_init): Use
2223 expansion_point_location_if_in_system_header.
2224 (warning_init): Same.
2225
8a40fef3
DM
22262016-05-19 David Malcolm <dmalcolm@redhat.com>
2227
2228 PR c/71171
2229 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2230 in error-handling.
2231 (c_parser_postfix_expression): Likewise.
2232 * c-tree.h (c_expr::set_error): New method.
2233 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2234 that result's range is initialized.
2235
e9892350
JG
22362016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2237
2238 * c-typeck.c (parser_build_unary_op): Fix formatting.
2239
8fad45f5
MW
22402016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2241
2242 * c-decl.c (grokdeclarator): Remove errmsg and use of
2243 targetm.invalid_return_type.
2244 (grokparms): Remove errmsg and use of
2245 targetm.invalid_parameter_type.
2246
aa4b467b
JM
22472016-05-13 Joseph Myers <joseph@codesourcery.com>
2248
2249 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2250 function return type.
2251
4f2e1536
MP
22522016-05-12 Marek Polacek <polacek@redhat.com>
2253
2254 PR c/70756
2255 * c-decl.c (build_compound_literal): Pass LOC down to
2256 c_incomplete_type_error.
2257 * c-tree.h (require_complete_type): Adjust declaration.
2258 (c_incomplete_type_error): Likewise.
2259 * c-typeck.c (require_complete_type): Add location parameter, pass it
2260 down to c_incomplete_type_error.
2261 (c_incomplete_type_error): Add location parameter, pass it down to
2262 error_at.
2263 (build_component_ref): Pass location down to c_incomplete_type_error.
2264 (default_conversion): Pass location down to require_complete_type.
2265 (build_array_ref): Likewise.
2266 (build_function_call_vec): Likewise.
2267 (convert_arguments): Likewise.
2268 (build_unary_op): Likewise.
2269 (build_c_cast): Likewise.
2270 (build_modify_expr): Likewise.
2271 (convert_for_assignment): Likewise.
2272 (c_finish_omp_clauses): Likewise.
2273
d6e83a8d
MM
22742016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2275
2276 PR c/43651
2277 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2278 is enabled.
2279 * c-errors.c (pedwarn_c90): Return true if warned.
2280 * c-tree.h (pedwarn_c90): Change return type to bool.
2281 (enum c_declspec_word): Add new enumerator cdw_atomic.
2282
5c3a10fb
MP
22832016-05-11 Marek Polacek <polacek@redhat.com>
2284
2285 PR c++/71024
2286 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2287 diagnose_mismatched_attributes and call it.
2288
cf68d92c
MP
22892016-05-10 Marek Polacek <polacek@redhat.com>
2290
2291 PR c/70255
2292 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2293 on a declaration following the definition.
2294
351f85c5
JJ
22952016-05-05 Jakub Jelinek <jakub@redhat.com>
2296
2297 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2298 parse it through to c_parser_c99_block_statement.
2299 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2300 caller.
2301
deef7113
MP
23022016-05-04 Marek Polacek <polacek@redhat.com>
2303
2304 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2305 OPT_Wdangling_else.
2306
de55efd5
MP
23072016-05-04 Marek Polacek <polacek@redhat.com>
2308
2309 PR c/48778
2310 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2311 for macro expansions.
2312
79ce98bc
MP
23132016-05-03 Marek Polacek <polacek@redhat.com>
2314
2315 PR c/70859
2316 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2317 check_builtin_function_arguments.
2318
fb2647aa
RB
23192016-05-03 Richard Biener <rguenther@suse.de>
2320
2321 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2322 the checksum from the previous stage.
2323
77886428
CP
23242016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2325
2326 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2327 c_finish_omp_clauses.
2328 (c_parser_omp_all_clauses): Likewise.
2329 (c_parser_oacc_cache): Likewise.
2330 (c_parser_oacc_loop): Likewise.
2331 (omp_split_clauses): Likewise.
2332 (c_parser_omp_declare_target): Likewise.
2333 (c_parser_cilk_all_clauses): Likewise.
2334 (c_parser_cilk_for): Likewise.
2335 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2336 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2337
7176a4a0
MP
23382016-05-02 Marek Polacek <polacek@redhat.com>
2339
2340 PR c/70851
2341 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2342 incomplete type.
2343
e7ff0319
CP
23442016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2345
2346 PR middle-end/70626
2347 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2348 OACC_LOOP_CLAUSE_MASK.
2349 (c_parser_oacc_kernels_parallel): Update call to
2350 c_oacc_split_loop_clauses.
2351
9f405ce1
AM
23522016-04-28 Andrew MacLeod <amacleod@redhat.com>
2353
2354 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2355 argument to build_modify_expr in two cases.
2356
c1e1f433
BS
23572016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2358
2359 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2360 warn_for_memset instead of warning directly here.
2361
2448a956
MP
23622016-04-26 Marek Polacek <polacek@redhat.com>
2363
2364 PR c/67784
2365 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2366 out of ...
2367 (c_parser_for_statement): ... here.
2368 (c_parser_if_statement): Use it.
2369 (c_parser_switch_statement): Use it.
2370 (c_parser_while_statement): Use it.
2371
b02a5e26
MP
2372 PR c/70791
2373 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2374
477d4906
IV
23752016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2376
2377 PR c++/69363
2378 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2379 instead of c_finish_cilk_clauses.
2380 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2381 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2382 floating-point variables in the linear clause for Cilk Plus.
2383
fe37c7af
MM
23842016-04-18 Michael Matz <matz@suse.de>
2385
2386 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2387 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2388
949505a9
MP
23892016-04-15 Marek Polacek <polacek@redhat.com>
2390
2391 PR c/70671
2392 * c-typeck.c (build_unary_op): Pass location down to error and
2393 warning call.
2394
dda1bf61
JJ
23952016-04-15 Jakub Jelinek <jakub@redhat.com>
2396
2397 PR c/70436
2398 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2399 where needed.
2400 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2401 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2402 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2403 Adjust c_parser_pragma callers.
2404 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2405 caller.
2406 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2407 c_parser_statement.
2408 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2409 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2410 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2411 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2412 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2413 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2414 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2415 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2416 down where needed.
2417 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2418 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2419 calls.
2420
99cd9857
MP
24212016-04-13 Marek Polacek <polacek@redhat.com>
2422
2423 PR c/70436
2424 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2425 adjust callers.
2426 (c_parser_statement): Likewise.
2427 (c_parser_c99_block_statement): Likewise.
2428 (c_parser_while_statement): Likewise.
2429 (c_parser_for_statement): Likewise.
2430 (c_parser_if_body): Don't set IF_P here.
2431 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2432 about dangling else here.
2433 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2434 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2435 warn about dangling else here.
2436
f13355da
MP
24372016-04-04 Marek Polacek <polacek@redhat.com>
2438
2439 PR c/70307
2440 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2441
5fde6a45
MP
24422016-03-31 Marek Polacek <polacek@redhat.com>
2443
2444 PR c/70297
2445 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2446
4bbf545b
DM
24472016-03-18 David Malcolm <dmalcolm@redhat.com>
2448
2449 PR c/70281
2450 * c-parser.c (c_parser_postfix_expression): Set the source range
2451 for uses of "__builtin_types_compatible_p".
2452
fcc2b74f
JJ
24532016-03-17 Jakub Jelinek <jakub@redhat.com>
2454
2455 PR c/70280
2456 * c-typeck.c (composite_type): Don't count void_list_node
2457 into len, if the list is terminated by void_list_node, start
2458 with void_list_node instead of NULL for newargs. Stop
2459 at void_list_node.
2460
ab4c578f
MP
24612016-03-16 Marek Polacek <polacek@redhat.com>
2462
2463 PR c/70093
2464 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2465 nested functions returning VM types.
2466
96b3c82d
CP
24672016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2468
2469 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2470 when calling c_finish_omp_clauses.
2471
29b9828f
BS
24722016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2473
2474 PR c/69824
2475 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2476 for later.
2477
7ff6ca38
MP
24782016-03-04 Marek Polacek <polacek@redhat.com>
2479
2480 PR c/69798
2481 * c-parser.c (c_parser_postfix_expression): Call
2482 c_parser_cast_expression rather than c_parser_postfix_expression.
2483
686e2237
JJ
24842016-03-01 Jakub Jelinek <jakub@redhat.com>
2485
2486 PR c/69796
2487 PR c/69974
2488 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2489 of incomplete decls to error_mark_node.
2490
0b05329b
MP
24912016-02-24 Marek Polacek <polacek@redhat.com>
2492
2493 PR c/69819
2494 * c-decl.c (finish_decl): Don't update the copy of the type of a
2495 different decl type.
2496
067fbd8b
JJ
24972016-02-23 Jakub Jelinek <jakub@redhat.com>
2498
2499 PR objc/69844
2500 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2501 in id_kind reclassification.
2502
bf14eba2
JJ
25032016-02-16 Jakub Jelinek <jakub@redhat.com>
2504
2505 PR c/69835
2506 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2507
ba539195
JN
25082016-02-16 James Norris <jnorris@codesourcery.com>
2509
2510 PR c/64748
2511 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2512
16595a1f
BS
25132016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2514
f48dfe98
BS
2515 * c-decl.c (build_null_declspecs): Zero the entire struct.
2516
16595a1f
BS
2517 PR c/69522
2518 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2519 callers changed. If nested_p is true, use it to call
2520 finish_implicit_inits.
2521 * c-tree.h (finish_implicit_inits): Declare.
2522 * c-typeck.c (finish_implicit_inits): New function. Move code
2523 from ...
2524 (push_init_level): ... here.
2525 (set_designator, process_init_element): Call finish_implicit_inits.
2526
66756373
JJ
25272016-02-11 Jakub Jelinek <jakub@redhat.com>
2528
2529 PR c/69768
2530 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2531 arguments for -Waddress warning.
2532
1066e9b5
JJ
25332016-02-04 Jakub Jelinek <jakub@redhat.com>
2534
2535 PR c/69669
2536 * c-decl.c (finish_enum): When honoring mode attribute,
2537 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2538
3a5d2ba4
JJ
25392016-01-29 Jakub Jelinek <jakub@redhat.com>
2540
2541 PR debug/69518
2542 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2543 all type variants, not just TYPE_MAIN_VARIANT.
2544
cbdd8ae0
JJ
25452016-01-27 Jakub Jelinek <jakub@redhat.com>
2546
2547 PR debug/66869
2548 * c-decl.c (c_write_global_declarations_1): Warn with
2549 warn_unused_function if static prototype without definition
2550 is not C_DECL_USED.
2551
fa74a4bc
MP
25522016-01-27 Marek Polacek <polacek@redhat.com>
2553
2554 PR c/68062
2555 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2556 to unsigned, if needed. Add -Wsign-compare warning.
2557
13f92e8d
JJ
25582016-01-26 Jakub Jelinek <jakub@redhat.com>
2559
2560 PR tree-optimization/69483
2561 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2562
cd8e73dc 25632016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2564
2565 PR c/24293
2566 * c-tree.h (incomplete_record_decls): Declare.
2567 * c-parser.c (incomplete_record_decls): Define.
2568 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2569 report error if any decl has zero size.
2570 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2571 or enum type to incomplete_record_decls.
2572
e6d6ec9e
TV
25732016-01-14 Tom de Vries <tom@codesourcery.com>
2574
2575 PR tree-optimization/68773
2576 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2577 set force_output.
2578
00083992
MP
25792016-01-14 Marek Polacek <polacek@redhat.com>
2580
2581 PR c/69262
2582 * c-decl.c (grokdeclarator): Provide more information for invalid
2583 array declarations.
2584
7443cf13
DM
25852016-01-06 David Malcolm <dmalcolm@redhat.com>
2586
2587 * c-parser.c (c_parser_unary_expression): For dereferences, build
2588 a combined location before calling build_indirect_ref, so that
2589 error reports cover the full range, manually updating the c_expr
2590 src_range.
2591
6b131d5b
MP
25922016-01-06 Marek Polacek <polacek@redhat.com>
2593
2594 PR sanitizer/69099
2595 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2596 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2597 NULL.
2598
818ab71a
JJ
25992016-01-04 Jakub Jelinek <jakub@redhat.com>
2600
2601 Update copyright years.
2602
2fe0a208
MP
26032016-01-04 Marek Polacek <polacek@redhat.com>
2604
2605 PR c/68908
2606 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2607 optimization to use __atomic_fetch_* built-in if possible.
2608
c7b48c8a
TS
26092015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2610
2611 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2612 into...
2613 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2614 all users.
2615
fda5652f
MP
26162015-12-22 Marek Polacek <polacek@redhat.com>
2617
2618 PR c/69002
2619 * c-typeck.c (build_component_ref): Warn when acessing elements of
2620 atomic structures or unions.
2621
745e411d
DM
26222015-12-21 David Malcolm <dmalcolm@redhat.com>
2623
2624 * c-typeck.c: Include "gcc-rich-location.h".
2625 (build_binary_op): In the two places that call binary_op_error,
2626 create a gcc_rich_location and populate it with the location of
2627 the binary op and its two operands.
2628
94c40e19
DM
26292015-12-16 David Malcolm <dmalcolm@redhat.com>
2630
2631 * c-parser.c (c_parser_statement_after_labels): When calling
2632 c_finish_return, Use the return expression's location if it has
2633 one, falling back to the location of the first token within it.
2634 * c-typeck.c (c_finish_return): When issuing warnings about
2635 the incorrect presence/absence of a return value, issue a note
2636 showing the declaration of the function.
2637
de67c4c3
DM
26382015-12-16 David Malcolm <dmalcolm@redhat.com>
2639
2640 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2641 to 4.
2642 (c_parser_peek_nth_token): New function.
2643 (c_parser_peek_conflict_marker): New function.
2644 (c_parser_error): Detect conflict markers and report them as such.
2645
a10704e1
DM
26462015-12-16 David Malcolm <dmalcolm@redhat.com>
2647
2648 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2649 to preserve range information for the primary expression
2650 in the call to c_parser_postfix_expression_after_primary.
2651
8062bca6
DM
26522015-12-16 David Malcolm <dmalcolm@redhat.com>
2653
2654 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2655 expression location, falling back on the first token location,
2656 rather than always using the latter.
2657
d06f8b75
MP
26582015-12-16 Marek Polacek <polacek@redhat.com>
2659
2660 PR c/64637
2661 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2662 available.
2663
2994fb91
MP
26642015-12-15 Marek Polacek <polacek@redhat.com>
2665
2666 PR c/68907
2667 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2668 artificial decl.
2669
a1b93f8d
DM
26702015-12-08 David Malcolm <dmalcolm@redhat.com>
2671
2672 * c-parser.c (c_parser_alignof_expression): Capture location of
2673 closing parenthesis (if any), or of end of unary expression, and
2674 use it to build a src_range for the expression.
2675
46c6e1e2
DM
26762015-12-08 David Malcolm <dmalcolm@redhat.com>
2677
2678 PR c/68757
2679 * c-parser.c (c_parser_get_builtin_args): Add
2680 "out_close_paren_loc" param, and write back to it.
2681 (c_parser_postfix_expression): Capture the closing
2682 parenthesis location for RID_CHOOSE_EXPR,
2683 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2684 RID_BUILTIN_SHUFFLE and use it to set the source range
2685 for such expressions; within RID_BUILTIN_COMPLEX set
2686 the underlying location.
2687
66189108
MP
26882015-12-07 Marek Polacek <polacek@redhat.com>
2689
2690 PR c/68668
2691 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2692 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2693
f187980b
EB
26942015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2695
2696 * c-tree.h (c_build_va_arg): Adjust prototype.
2697 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2698 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2699 parameter, adjust throughout and issue an error if EXPR is a component
2700 with reverse storage order.
2701
4250754e
JM
27022015-12-02 Jason Merrill <jason@redhat.com>
2703
2704 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2705 (c_fully_fold_internal, decl_constant_value_for_optimization):
2706 Move from c-common.c.
2707 * c-tree.h: Declare decl_constant_value_for_optimization.
2708 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2709
e9e32ee6
JM
27102015-12-02 Joseph Myers <joseph@codesourcery.com>
2711
2712 PR c/68162
2713 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2714 following link from declarator to next declarator. Track original
2715 qualified type and pass it to c_build_qualified_type.
2716 * c-typeck.c (c_build_qualified_type): Add arguments
2717 orig_qual_type and orig_qual_indirect.
2718
ff7a55bf
TS
27192015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2720
2721 * c-parser.c (c_parser_omp_clause_name)
2722 (c_parser_oacc_all_clauses): Alphabetical sorting.
2723
657e4e47
JJ
27242015-12-02 Jakub Jelinek <jakub@redhat.com>
2725
2726 PR c/68533
2727 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2728 for diagnostics.
2729
37d5ad46
JB
27302015-12-01 Julian Brown <julian@codesourcery.com>
2731 Cesar Philippidis <cesar@codesourcery.com>
2732 James Norris <James_Norris@mentor.com>
2733
2734 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2735 (c_parser_oacc_clause_use_device): New function.
2736 (c_parser_oacc_all_clauses): Add use_device support.
2737 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2738 (c_parser_oacc_host_data): New function.
2739 (c_parser_omp_construct): Add host_data support.
2740 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2741 * c-typeck.c (c_finish_oacc_host_data): New function.
2742 (c_finish_omp_clauses): Add use_device support.
2743
a4850ce9
JH
27442015-11-29 Jan Hubicka <hubicka@ucw.cz>
2745
2746 PR c/67106
2747 * c-decl.c: Set TYPE_PACKED in variants.
2748
b58d3df2
ML
27492015-11-27 Martin Liska <mliska@suse.cz>
2750
2751 PR c++/68312
2752 * c-array-notation.c (fix_builtin_array_notation_fn):
2753 Use release_vec_vec instead of vec::release.
2754 (build_array_notation_expr): Likewise.
2755 (fix_conditional_array_notations_1): Likewise.
2756 (fix_array_notation_expr): Likewise.
2757 (fix_array_notation_call_expr): Likewise.
2758
aec17bfe
JJ
27592015-11-27 Jakub Jelinek <jakub@redhat.com>
2760
2761 PR c/63326
2762 * c-parser.c (c_parser_compound_statement_nostart): If
2763 last_label is true, use pragma_stmt instead of pragma_compound
2764 as second c_parser_pragma argument.
2765 (c_parser_omp_ordered, c_parser_omp_target_update,
2766 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2767 false as second argument to c_parser_skip_to_pragma_eol after
2768 diagnosing standalone directives used in pragma_stmt context.
2769
688c4de0
IV
27702015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2771
2772 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2773 with "if (ENABLE_OFFLOADING)".
2774
cbd03aee
DM
27752015-11-23 David Malcolm <dmalcolm@redhat.com>
2776
2777 PR objc/68438
2778 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2779 for various Objective-C constructs: Class.name syntax,
2780 @selector(), @protocol(), @encode(), and [] message syntax.
2781
a87a86e1
DM
27822015-11-20 David Malcolm <dmalcolm@redhat.com>
2783
2784 PR 62314
2785 * c-typeck.c (should_suggest_deref_p): New function.
2786 (build_component_ref): Special-case POINTER_TYPE when
2787 generating a "not a structure of union" error message, and
2788 suggest a "->" rather than a ".", providing a fix-it hint.
2789
8ece8dfb
DM
27902015-11-19 David Malcolm <dmalcolm@redhat.com>
2791
2792 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2793 candidate into a new function, find_closest_identifier.
2794
433068cc
MP
27952015-11-19 Marek Polacek <polacek@redhat.com>
2796
2797 PR c/68412
2798 * c-typeck.c (parser_build_binary_op): Properly handle
2799 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2800
bef08b71
DM
28012015-11-17 David Malcolm <dmalcolm@redhat.com>
2802
2803 * c-parser.c (set_c_expr_source_range): Bulletproof both
2804 overloaded implementations against NULL expr->value.
2805 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2806 values.
2807 (c_parser_unary_expression): Likewise when handling addresses of
2808 labels.
2809 (c_parser_postfix_expression): Likewise for statement expressions,
2810 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2811 __builtin_va_arg, and for __builtin_offset_of.
2812 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2813 src_range using the range of the braced initializer.
2814 (c_parser_transaction_expression): Set src_range for "ret" to a
2815 sane pair of values.
2816
fff77217
KY
28172015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2818
2819 * c-parser.c (c_finish_omp_declare_simd): Look for
2820 "simd" attribute as well. Update error message.
2821
1d899da2
TS
28222015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2823
2824 * c-parser.c (c_parser_omp_declare_target): Adjust.
2825
e4606348
JJ
28262015-11-14 Jakub Jelinek <jakub@redhat.com>
2827
2828 * c-typeck.c (c_finish_omp_clauses): Don't mark
2829 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2830
3e636daf
MP
28312015-11-14 Marek Polacek <polacek@redhat.com>
2832
2833 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2834 * c-typeck.c: Likewise.
2835
ebedc9a3
DM
28362015-11-13 David Malcolm <dmalcolm@redhat.com>
2837
2838 * c-decl.c (warn_defaults_to): Pass line_table to
2839 rich_location ctor.
2840 * c-errors.c (pedwarn_c99): Likewise.
2841 (pedwarn_c90): Likewise.
2842 * c-parser.c (set_c_expr_source_range): New functions.
2843 (c_token::get_range): New method.
2844 (c_token::get_finish): New method.
2845 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2846 based on the range from the start of the LHS to the end of the
2847 RHS.
2848 (c_parser_conditional_expression): Likewise, based on the range
2849 from the start of the cond.value to the end of exp2.value.
2850 (c_parser_binary_expression): Call set_c_expr_source_range on
2851 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2852 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2853 based on the cast_loc through to the end of the expr.
2854 (c_parser_unary_expression): Likewise, based on the
2855 op_loc through to the end of op.
2856 (c_parser_sizeof_expression) Likewise, based on the start of the
2857 sizeof token through to either the closing paren or the end of
2858 expr.
2859 (c_parser_postfix_expression): Likewise, using the token range,
2860 or from the open paren through to the close paren for
2861 parenthesized expressions.
2862 (c_parser_postfix_expression_after_primary): Likewise, for
2863 various kinds of expression.
2864 * c-tree.h (struct c_expr): Add field "src_range".
2865 (c_expr::get_start): New method.
2866 (c_expr::get_finish): New method.
2867 (set_c_expr_source_range): New decls.
2868 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2869 on ret for prefix unary ops.
2870 (parser_build_binary_op): Likewise, running from the start of
2871 arg1.value through to the end of arg2.value.
2872
ec8b536f
MP
28732015-11-13 Marek Polacek <polacek@redhat.com>
2874
2875 PR c/68320
2876 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2877
277fe616
DM
28782015-11-13 David Malcolm <dmalcolm@redhat.com>
2879
2880 * c-typeck.c: Include spellcheck.h.
2881 (lookup_field_fuzzy_find_candidates): New function.
2882 (lookup_field_fuzzy): New function.
2883 (build_component_ref): If the field was not found, try using
2884 lookup_field_fuzzy and potentially offer a suggestion.
2885
6e232ba4
JN
28862015-11-12 James Norris <jnorris@codesourcery.com>
2887 Joseph Myers <joseph@codesourcery.com>
2888
2889 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2890 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2891 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2892 and PRAGMA_OMP_CLAUSE_LINK.
2893 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2894 and PRAGMA_OACC_CLAUSE_LINK.
2895 (OACC_DECLARE_CLAUSE_MASK): New definition.
2896 (c_parser_oacc_declare): New function.
2897
9be4f715
MP
28982015-11-12 Marek Polacek <polacek@redhat.com>
2899
2900 PR c/67784
2901 * c-parser.c (c_parser_for_statement): Reclassify the token in
2902 a correct scope.
2903
e78bede6
MP
29042015-11-11 Marek Polacek <polacek@redhat.com>
2905
2906 PR c/68107
2907 PR c++/68266
2908 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2909 checking the size of an array.
2910
69f293c9
AM
29112015-11-11 Andrew MacLeod <amacleod@redhat.com>
2912
2913 * c-array-notation.c: Remove unused header files.
2914 * c-aux-info.c: Likewise.
2915 * c-convert.c: Likewise.
2916 * c-decl.c: Likewise.
2917 * c-errors.c: Likewise.
2918 * c-lang.c: Likewise.
2919 * c-objc-common.c: Likewise.
2920 * c-parser.c: Likewise.
2921 * c-typeck.c: Likewise.
2922 * gccspec.c: Likewise.
2923
3a40d81d
NS
29242015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2925 Cesar Philippidis <cesar@codesourcery.com>
2926 James Norris <jnorris@codesourcery.com>
2927 Julian Brown <julian@codesourcery.com>
2928 Nathan Sidwell <nathan@codesourcery.com>
2929
2930 c/
2931 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2932 routine arg.
2933 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2934 (c_parser_pragma): Parse 'acc routine'.
2935 (OACC_ROUTINE_CLAUSE_MARK): Define.
2936 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2937
fc402eec
AA
29382015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2939
2940 PR debug/67192
2941 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2942 location of the backward-goto to the start of the loop body.
2943
f6b0b3db
AA
29442015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2945
2946 PR debug/67192
2947 * c-parser.c (c_parser_while_statement): Finish the loop before
2948 parsing ahead for misleading indentation.
2949 (c_parser_for_statement): Likewise.
2950
ee45a32d
EB
29512015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2952
2953 * c-decl.c (finish_struct): If the structure has reverse storage
2954 order, rewrite the type of array fields with scalar component. Call
2955 maybe_apply_pragma_scalar_storage_order on entry.
2956 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2957 errors on bit-fields and reverse SSO here and not...
2958 (c_mark_addressable): ...here.
2959 (output_init_element): Adjust call to initializer_constant_valid_p.
2960 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2961
8a645150
DM
29622015-11-06 David Malcolm <dmalcolm@redhat.com>
2963
2964 * c-decl.c (warn_defaults_to): Update for change in signature
2965 of diagnostic_set_info.
2966 * c-errors.c (pedwarn_c99): Likewise.
2967 (pedwarn_c90): Likewise.
2968 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2969 for textinfo::set_location.
2970
7a5e4956
CP
29712015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2972 Thomas Schwinge <thomas@codesourcery.com>
2973 James Norris <jnorris@codesourcery.com>
2974
2975 * c-parser.c (c_parser_omp_clause_name): Add support for
2976 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2977 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2978 default(none) in OpenACC.
2979 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2980 arguments.
2981 (c_parser_oacc_clause_tile): New function.
2982 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2983 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2984 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2985 TILE}.
2986 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2987 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2988 FIRSTPRIVATE}.
2989 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2990 (c_parser_oacc_update): Update the error message for missing clauses.
2991 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2992 and OMP_CLAUSE_INDEPENDENT.
2993
bfcfbfa0
MP
29942015-11-05 Marek Polacek <polacek@redhat.com>
2995
2996 PR c/68090
2997 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2998 deal with pre-evaluation on invalid types.
2999
e01d41e5
JJ
30002015-11-05 Jakub Jelinek <jakub@redhat.com>
3001 Ilya Verbin <ilya.verbin@intel.com>
3002
3003 * c-parser.c: Include context.h and gimple-expr.h.
3004 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3005 monotonic together with nonmonotonic.
3006 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3007 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3008 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3009 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3010 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3011 expressions on combined target teams before the target.
3012 (c_parser_omp_declare_target): If decl has "omp declare target" or
3013 "omp declare target link" attribute, and cgraph or varpool node already
3014 exists, then set corresponding flags. Call c_finish_omp_clauses
3015 in the parenthesized extended-list syntax case.
3016 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3017 declare target.
3018 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3019 on OMP_CLAUSE_REDUCTION array sections.
3020 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3021 into the constant offset, or for variable low-bound using
3022 POINTER_PLUS_EXPR. For structure element based array sections use
3023 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3024 (c_finish_omp_clauses): Drop generic_field_head, structure
3025 elements are now always mapped even as array section bases,
3026 diagnose same var in data sharing and mapping clauses. Diagnose if
3027 linear step on declare simd is neither a constant nor a uniform
3028 parameter. Look through POINTER_PLUS_EXPR for array section
3029 reductions. Diagnose the same var or function appearing multiple
3030 times on the same directive. Fix up wording for the to clause if t
3031 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3032 modifier on kinds other than dynamic or guided or nonmonotonic
3033 modifier together with ordered clause.
3034
4bf9e5a8
TS
30352015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3036 Chung-Lin Tang <cltang@codesourcery.com>
3037
3038 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3039
2adfab87
AM
30402015-10-29 Andrew MacLeod <amacleod@redhat.com>
3041
3042 * c-array-notation.c: Reorder #include's and remove duplicates.
3043 * c-aux-info.c: Likewise.
3044 * c-convert.c: Likewise.
3045 * c-decl.c: Likewise.
3046 * c-errors.c: Likewise.
3047 * c-lang.c: Likewise.
3048 * c-objc-common.c: Likewise.
3049 * c-parser.c: Likewise.
3050 * c-typeck.c: Likewise.
3051
e922069e
JW
30522015-10-26 Jim Wilson <jim.wilson@linaro.org>
3053
3054 PR debug/66068
3055 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3056 after calling build_qualified_type.
3057
765dd391
CP
30582015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3059 Thomas Schwinge <thomas@codesourcery.com>
3060 James Norris <jnorris@codesourcery.com>
3061 Joseph Myers <joseph@codesourcery.com>
3062 Julian Brown <julian@codesourcery.com>
3063 Bernd Schmidt <bschmidt@redhat.com>
3064
3065 * c-parser.c (c_parser_oacc_shape_clause): New.
3066 (c_parser_oacc_simple_clause): New.
3067 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3068 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3069
88bae6f4
TS
30702015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3071 James Norris <jnorris@codesourcery.com>
3072 Cesar Philippidis <cesar@codesourcery.com>
3073
3074 PR c/64765
3075 PR c/64880
3076 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3077 parameters, and handle these. Adjust all users.
3078 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3079 into...
3080 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3081 all users.
3082 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3083 declare functions.
3084 (c_finish_omp_construct): Declare function.
3085 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3086 Merge functions into...
3087 (c_finish_omp_construct): ... this new function.
3088
a8fc2579
RB
30892015-10-22 Richard Biener <rguenther@suse.de>
3090
3091 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3092 before folding a MINUS_EXPR.
3093
e9122ef6
MP
30942015-10-21 Marek Polacek <polacek@redhat.com>
3095
3096 PR c/68024
3097 * c-decl.c (start_function): Warn about vararg functions without
3098 a prototype.
3099
9f47c7e5
IE
31002015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3101
3102 * c-typeck.c (build_conditional_expr): Use boolean vector
3103 type for vector comparison.
3104 (build_vec_cmp): New.
3105 (build_binary_op): Use build_vec_cmp for comparison.
3106
fa60eeb9
MP
31072015-10-20 Marek Polacek <polacek@redhat.com>
3108
3109 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3110
2c7020eb
MP
31112015-10-20 Marek Polacek <polacek@redhat.com>
3112
3113 PR c/67964
3114 * c-parser.c (c_parser_attributes): Break out of the loop if the
3115 token after an attribute isn't a comma.
3116
d9a6bd32
JJ
31172015-10-13 Jakub Jelinek <jakub@redhat.com>
3118 Aldy Hernandez <aldyh@redhat.com>
3119
3120 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3121 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3122 (c_parser_omp_variable_list): Handle structure elements for
3123 map, to and from clauses. Handle array sections in reduction
3124 clause. Formatting fixes.
3125 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3126 if clause modifiers.
3127 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3128 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3129 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3130 c_parser_omp_clause_is_device_ptr): New functions.
3131 (c_parser_omp_clause_ordered): Parse optional parameter.
3132 (c_parser_omp_clause_reduction): Handle array reductions.
3133 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3134 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3135 functions.
3136 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3137 (c_parser_omp_clause_depend_sink): New function.
3138 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3139 (c_parser_omp_clause_map): Parse release/delete map kinds and
3140 optional always modifier.
3141 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3142 and c_finish_omp_clauses callers.
3143 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3144 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3145 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3146 (OMP_CRITICAL_CLAUSE_MASK): Define.
3147 (c_parser_omp_critical): Parse critical clauses.
3148 (c_parser_omp_for_loop): Handle doacross loops, adjust
3149 c_finish_omp_for and c_finish_omp_clauses callers.
3150 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3151 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3152 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3153 (c_parser_omp_for): Disallow ordered clause when combined with
3154 distribute. Disallow linear clause when combined with distribute
3155 and not combined with simd.
3156 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3157 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3158 parse clauses and if depend clause is found, don't parse a body.
3159 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3160 Allow target parallel without for after it.
3161 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3162 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3163 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3164 invalid kinds.
3165 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3166 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3167 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3168 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3169 functions.
3170 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3171 defaultmap and is_device_ptr clauses.
3172 (c_parser_omp_target): Parse target parallel and target simd. Set
3173 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3174 and target exit data. Diagnose invalid map kinds.
3175 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3176 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3177 construct.
3178 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3179 &omp_priv.
3180 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3181 (c_parser_omp_taskloop): New function.
3182 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3183 handle PRAGMA_OMP_TASKLOOP.
3184 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3185 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3186 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3187 Add IS_OMP argument, handle structure element bases, diagnose
3188 bitfields, pass IS_OMP recursively, diagnose known zero length
3189 array sections in depend clauses, handle array sections in reduction
3190 clause, diagnose negative length even for pointers.
3191 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3192 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3193 array sections in reduction clause, set
3194 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3195 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3196 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3197 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3198
21ba0cea
MP
31992015-10-06 Marek Polacek <polacek@redhat.com>
3200
3201 * c-parser.c (c_parser_statement_after_labels): Use
3202 protected_set_expr_location.
3203 (c_parser_omp_clause_num_gangs): Likewise.
3204 (c_parser_omp_clause_num_threads): Likewise.
3205 (c_parser_omp_clause_num_workers): Likewise.
3206 (c_parser_omp_clause_vector_length): Likewise.
3207 (c_parser_omp_clause_num_teams): Likewise.
3208 (c_parser_omp_clause_thread_limit): Likewise.
3209 * c-typeck.c (build_c_cast): Likewise.
3210 (c_cast_expr): Likewise.
3211
624d31fe
RS
32122015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3213
3214 * c-typeck.c (c_tree_equal): Use real_equal instead of
3215 REAL_VALUES_EQUAL.
3216
b8fd7909
JM
32172015-10-04 Jason Merrill <jason@redhat.com>
3218
3219 * c-parser.c (c_lex_one_token): Handle @synchronized.
3220 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3221 can change whether the function is transaction_safe.
3222
1c7485af
MP
32232015-10-02 Marek Polacek <polacek@redhat.com>
3224
3225 PR c/67730
3226 * c-typeck.c (convert_for_assignment): Use the expansion point
3227 location throughout.
3228
3e3b8d63
MP
32292015-10-02 Marek Polacek <polacek@redhat.com>
3230
3231 PR c/64249
3232 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3233 and pass it down to c_parser_if_statement.
3234 (c_parser_else_body): Add CHAIN parameter and pass it down to
3235 c_parser_statement_after_labels.
3236 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3237 duplicated if-else-if conditions.
3238
aabef2de
MP
32392015-10-01 Marek Polacek <polacek@redhat.com>
3240
3241 * c-typeck.c (convert_for_assignment): Improve commentary.
3242
de8ddd5f
MP
32432015-09-30 Marek Polacek <polacek@redhat.com>
3244
3245 PR c/67730
3246 * c-typeck.c (c_finish_return): Use the expansion point location for
3247 certain "return with value" warnings.
3248
c4914de6
MLI
32492015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3250
3251 * c-parser.c (pragma_lex): Add loc argument.
3252
0e36f5c7
MP
32532015-09-15 Marek Polacek <polacek@redhat.com>
3254
3255 PR c/67580
3256 * c-decl.c (tag_exists_p): New function.
3257 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3258 struct/union/enum keywords are missing.
3259 * c-tree.h (tag_exists_p): Declare.
3260
2f3bb934
MP
32612015-09-15 Marek Polacek <polacek@redhat.com>
3262
3263 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3264 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3265 Return NULL_TREE instead of 0.
3266 (lookup_name): Return NULL_TREE instead of 0.
3267 (lookup_name_in_scope): Likewise.
3268 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3269 (parser_xref_tag): Use false instead of 0.
3270 (start_struct): Use true instead of 1.
3271 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3272
aa256c4a
MP
32732015-09-14 Marek Polacek <polacek@redhat.com>
3274
3275 * c-typeck.c (set_nonincremental_init_from_string): Use
3276 HOST_WIDE_INT_M1U when shifting a negative value.
3277
dbb68221
MW
32782015-09-09 Mark Wielaard <mjw@redhat.com>
3279
3280 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3281 parm against NULL.
3282
a8a098ac
JJ
32832015-09-10 Jakub Jelinek <jakub@redhat.com>
3284
3285 PR c/67502
3286 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3287 into OMP_FOR_PRE_BODY rather than before the loop.
3288
f4b189d5
JJ
32892015-09-09 Jakub Jelinek <jakub@redhat.com>
3290
0bb99c11
JJ
3291 PR c/67501
3292 * c-parser.c (c_parser_oacc_all_clauses,
3293 c_parser_omp_all_clauses): Remove invalid clause from
3294 list of clauses even if parser->error is set.
3295
fce5e5e3
JJ
3296 PR c/67500
3297 * c-parser.c (c_parser_omp_clause_aligned,
3298 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3299 test for errors.
3300 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3301 error_mark_node.
3302
f4b189d5
JJ
3303 PR c/67495
3304 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3305 instead of c_parser_unary_expression. If the result is !lvalue_p,
3306 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3307
b2aaf235
MP
33082015-09-04 Marek Polacek <polacek@redhat.com>
3309
3310 PR sanitizer/67279
3311 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3312
1807ffc1
MS
33132015-09-03 Martin Sebor <msebor@redhat.com>
3314
3315 PR c/66516
8b652e65
JJ
3316 * c-typeck.c (convert_arguments, parser_build_unary_op,
3317 build_conditional_expr, c_cast_expr, convert_for_assignment,
3318 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3319 reject_gcc_builtin.
3320 (c_decl_implicit): Define.
3321
d04ff417
MP
33222015-09-02 Marek Polacek <polacek@redhat.com>
3323
3324 PR c/67432
3325 * c-parser.c (c_parser_enum_specifier): Give a better error for
3326 an empty enum.
3327
a79683d5
TS
33282015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3329
3330 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3331
191a6b94
MP
33322015-08-12 Marek Polacek <polacek@redhat.com>
3333
3334 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3335 LOC to it.
3336
420a9d9b
MP
33372015-08-03 Marek Polacek <polacek@redhat.com>
3338
3339 PR c/67088
3340 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3341 Use it.
3342 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3343
992118a1
PP
33442015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3345
3346 * c-parser.c (c_parser_if_body): Take token_indent_info
3347 argument. Call warn_for_misleading_indentation even when the
3348 body is a semicolon. Extract token_indent_infos corresponding
3349 to the guard, body and next tokens. Adjust call to
3350 warn_for_misleading_indentation accordingly.
3351 (c_parser_else_body): Likewise.
3352 (c_parser_if_statement): Likewise.
3353 (c_parser_while_statement): Likewise.
3354 (c_parser_for_statement): Likewise.
3355
46308474
LFSM
33562015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3357 Manuel López-Ibáñez <manu@gcc.gnu.org>
3358
3359 * c-decl.c (get_parm_info): Remove static var. Update warning
3360 message.
3361
05b28fd6
MP
33622015-07-27 Marek Polacek <polacek@redhat.com>
3363
3364 PR c++/66555
3365 PR c/54979
3366 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3367
451b5e48
MP
33682015-07-20 Marek Polacek <polacek@redhat.com>
3369
3370 PR c++/55095
3371 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3372 (build_binary_op): Warn about left shift overflows.
3373
1916bcb5
AM
33742015-07-09 Andrew MacLeod <amacleod@redhat.com>
3375
3376 * c-array-notation.c: Adjust includes for flags.h changes.
3377 * c-objc-common.c: Likewise.
3378
c7131fb2
AM
33792015-07-07 Andrew MacLeod <amacleod@redhat.com>
3380
3381 * c-array-notation.c: Adjust includes.
3382 * c-aux-info.c: Likewise.
3383 * c-convert.c: Likewise.
3384 * c-decl.c: Likewise.
3385 * c-errors.c: Likewise.
3386 * c-lang.c: Likewise.
3387 * c-objc-common.c: Likewise.
3388 * c-parser.c: Likewise.
3389 * c-typeck.c: Likewise.
3390
da2e71c9
MLI
33912015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3392
3393 PR fortran/66605
3394 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3395
b155cfd9
MP
33962015-06-29 Marek Polacek <polacek@redhat.com>
3397
3398 PR c/66322
3399 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3400 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3401 about -Wswitch-bool here.
3402 (do_case): Update c_add_case_label call.
3403 (c_finish_case): Update c_do_switch_warnings call.
3404
31521951
MP
34052015-06-27 Marek Polacek <polacek@redhat.com>
3406
3407 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3408
22d03525
MP
34092015-06-26 Marek Polacek <polacek@redhat.com>
3410
3411 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3412 INDIRECT_REF_P.
3413 * c-typeck.c (array_to_pointer_conversion): Likewise.
3414 (build_unary_op): Likewise.
3415 (c_finish_return): Likewise.
3416
f0889939
AM
34172015-06-25 Andrew MacLeod <amacleod@redhat.com>
3418
3419 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3420 * c-parser.c: Likewise.
3421
8d67ee55
RS
34222015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3423
3424 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3425 instead of pointer_hash.
3426 (detect_field_duplicates): Likewise.
3427
0ae9bd27
MP
34282015-06-25 Marek Polacek <polacek@redhat.com>
3429
3430 * c-array-notation.c: Use VAR_P throughout.
3431 * c-decl.c: Likewise.
3432 * c-objc-common.c: Likewise.
3433 * c-parser.c: Likewise.
3434 * c-typeck.c: Likewise.
3435
62f9079a
MP
34362015-06-25 Marek Polacek <polacek@redhat.com>
3437
3438 * c-decl.c: Use is_global_var throughout.
3439 * c-parser.c: Likewise.
3440 * c-typeck.c: Likewise.
3441
abb226c9
AM
34422015-06-17 Andrew MacLeod <amacleod@redhat.com>
3443
3444 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3445 * c-aux-info.c: Likewise.
3446 * c-convert.c: Likewise.
3447 * c-decl.c: Likewise.
3448 * c-errors.c: Likewise.
3449 * c-lang.c: Likewise.
3450 * c-objc-common.c: Likewise.
3451 * c-parser.c: Likewise.
3452 * c-typeck.c: Likewise.
3453
8cbababc
JH
34542015-06-11 Jan Hubicka <hubicka@ucw.cz>
3455
3456 PR middle-end/66325
3457 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3458 variants.
3459
a0349665
PMR
34602015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3461
3462 * c-decl.c (pop_scope): Register the main translation unit
3463 through the new debug hook.
3464
13fdf2e2
AM
34652015-06-08 Andrew MacLeod <amacleod@redhat.com>
3466
3467 * c-array-notation.c : Adjust include files.
3468 * c-aux-info.c : Likewise.
3469 * c-convert.c : Likewise.
3470 * c-decl.c : Likewise.
3471 * c-errors.c : Likewise.
3472 * c-lang.c : Likewise.
3473 * c-lang.h : Likewise.
3474 * c-objc-common.c : Likewise.
3475 * c-parser.c : Likewise.
3476 * c-typeck.c : Likewise.
3477
d7438551
AH
34782015-06-05 Aldy Hernandez <aldyh@redhat.com>
3479
3480 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3481 immediately clobber it.
3482 (c_write_global_declarations_1): Remove call to
3483 check_global_declaration_1.
3484 (c_write_global_declarations_2): Remove.
3485 (c_write_final_cleanups): Rename from c_write_global_declarations.
3486 Remove call to finalize_compilation_unit.
3487 Remove calls to debugging hooks.
3488 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3489 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3490 * c-tree.h: Remove c_write_global_declarations.
3491
ecb9f223
AM
34922015-06-04 Andrew MacLeod <amacleod@redhat.com>
3493
3494 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3495 * c-aux-info.c: Likewise.
3496 * c-convert.c: Likewise.
3497 * c-decl.c: Likewise.
3498 * c-errors.c: Likewise.
3499 * c-lang.c: Likewise.
3500 * c-objc-common.c: Likewise.
3501 * c-parser.c: Likewise.
3502 * c-typeck.c: Likewise.
3503
9482b620
MP
35042015-06-04 Marek Polacek <polacek@redhat.com>
3505
3506 PR c/66341
3507 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3508 it is a lvalue.
3509
bc51ace3
PK
35102015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3511
3512 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3513 Warn for empty struct.
3514 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3515
ea5b45b6
AT
35162015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3517
3518 * c-decl.c (start_function): Call plugin before parsing.
3519 (finish_function): Call plugin after parsing.
3520
c2d47482
PK
35212015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3522
3523 PR c/49551
3524 * c-decl.c (merge_decls): Merge DECL_COMMON.
3525
a95492ab
JW
35262015-05-22 Jim Wilson <jim.wilson@linaro.org>
3527
3528 * Make-lang.in (check_gcc_pallelize): Define.
3529
fd5c817a
MP
35302015-05-22 Marek Polacek <polacek@redhat.com>
3531
3532 PR c/47043
3533 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3534 attributes.
3535
c7b70a3c
MP
35362015-05-21 Marek Polacek <polacek@redhat.com>
3537
3538 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3539 DECL_BUILT_IN.
3540
21b634ae
MP
35412015-05-20 Marek Polacek <polacek@redhat.com>
3542
3543 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3544 * c-typeck.c: Likewise.
3545
296a8c2f
MP
35462015-05-19 Marek Polacek <polacek@redhat.com>
3547
3548 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3549
41b37d5e
JJ
35502015-05-19 Jakub Jelinek <jakub@redhat.com>
3551
3552 PR middle-end/66199
3553 * c-parser.c (c_parser_omp_for_loop): Don't add
3554 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3555 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3556 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3557 constructs.
3558
fab27f52
MM
35592015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3560
3561 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3562 swaps.
fab27f52 3563
40de31cf
MLI
35642015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3565
3566 PR fortran/44054
3567 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3568 accessor function.
3569
3aa3c9fc
MP
35702015-05-14 Marek Polacek <polacek@redhat.com>
3571
3572 PR c/66066
3573 PR c/66127
3574 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3575 rather than with 0.
3576
c3388e62
DM
35772015-05-12 David Malcolm <dmalcolm@redhat.com>
3578
3579 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3580 to add a call to warn_for_misleading_indentation.
3581 (c_parser_else_body): Likewise, adding param "else_loc".
3582 (c_parser_if_statement): Check for misleading indentation.
3583 (c_parser_while_statement): Likewise.
3584 (c_parser_for_statement): Likewise.
3585
755e528f
MP
35862015-05-08 Marek Polacek <polacek@redhat.com>
3587
3588 PR c/64918
3589 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3590 (output_init_element): Likewise.
3591
0173bd2a
MP
35922015-05-07 Marek Polacek <polacek@redhat.com>
3593
3594 PR c/65179
3595 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3596 value.
3597
9babc352
MP
35982015-04-30 Marek Polacek <polacek@redhat.com>
3599
3600 * c-typeck.c (set_init_label): Call error_at instead of error and
3601 pass LOC to it.
3602
ac9f18db
MP
3603 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3604 the type of a decl.
3605
ec3fba51
MP
3606 * c-typeck.c (c_build_va_arg): Clarify the error message.
3607
b811915d
TS
36082015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3609
3610 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3611 OMP_STANDALONE_CLAUSES.
3612
f3075008
MP
36132015-04-28 Marek Polacek <polacek@redhat.com>
3614
3615 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3616
4e81b788
MP
36172015-04-28 Marek Polacek <polacek@redhat.com>
3618
3619 PR c/65901
3620 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3621
6c1db78e
MP
36222015-04-25 Marek Polacek <polacek@redhat.com>
3623
3624 PR c/52085
3625 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3626 attribute.
3627
5c4abbb8
MP
36282015-04-23 Marek Polacek <polacek@redhat.com>
3629
3630 PR c/65345
3631 * c-decl.c (set_labels_context_r): New function.
3632 (store_parm_decls): Call it via walk_tree_without_duplicates.
3633 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3634 instead of create_tmp_var. Build TARGET_EXPR instead of
3635 COMPOUND_EXPR.
3636 (build_atomic_assign): Use create_tmp_var_raw instead of
3637 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3638
06aca1d5
IV
36392015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3640
3641 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3642 (c_parser_omp_target_update): Add missed %> to error_at ().
3643
8fba1830
BRF
36442015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3645
3646 PR target/55143
3647 * c-decl.c (c_default_pointer_mode): Remove definition.
3648 * c-tree.h (c_default_pointer_mode): Remove declaration.
3649
62021f64
TB
36502015-03-27 Tobias Burnus <burnus@net-b.de>
3651
3652 PR c/65586
3653 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3654 error out.
3655 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3656 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3657 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3658
9b65e171
JJ
36592015-03-19 Jakub Jelinek <jakub@redhat.com>
3660
3661 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3662 attribute for DECL_EXTERNAL VAR_DECLs.
3663
17958621
JJ
36642015-03-11 Jakub Jelinek <jakub@redhat.com>
3665
3666 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3667 argument.
3668
7ccb1a11
JJ
36692015-03-10 Jakub Jelinek <jakub@redhat.com>
3670
3671 PR c/65120
3672 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3673 before preparing arguments to warn_logical_not_parentheses.
3674
01177669
JJ
36752015-03-09 Jakub Jelinek <jakub@redhat.com>
3676
3677 PR c/65120
3678 * c-typeck.c (parser_build_binary_op): Don't warn for
3679 !!x == y or !b == y where b is _Bool.
3680
802ac282
MP
36812015-03-09 Marek Polacek <polacek@redhat.com>
3682
3683 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3684 * c-decl.c (grokdeclarator): Likewise.
3685 * c-typeck.c (build_binary_op): Likewise.
3686
e5165b60
MP
36872015-02-27 Marek Polacek <polacek@redhat.com>
3688
3689 PR c/65228
3690 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3691
065d214c
MP
36922015-02-14 Marek Polacek <polacek@redhat.com>
3693
3694 PR c/64768
3695 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3696 declared through a typedef name.
3697
e5d9235b
MP
36982015-02-13 Marek Polacek <polacek@redhat.com>
3699
3700 PR c/65050
3701 * c-decl.c (grokdeclarator): Print also the type when giving
3702 the error message about array's incomplete element type.
3703
fa01ffcc
JJ
37042015-02-11 Jakub Jelinek <jakub@redhat.com>
3705
3706 PR c/64824
3707 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3708 check in the POP macro.
3709
c3e38a03
MP
37102015-02-09 Marek Polacek <polacek@redhat.com>
3711
3712 PR c/64856
3713 * c-typeck.c (process_init_element): Don't always wrap
3714 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3715 initializing a range of elements.
3716
4886ec8e
JJ
37172015-02-04 Jakub Jelinek <jakub@redhat.com>
3718
3719 PR c/64824
3720 PR c/64868
3721 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3722
c3e38a03 37232015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3724
3725 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3726 processing enum declaration.
3727
7b33f0c8
MP
37282015-01-29 Marek Polacek <polacek@redhat.com>
3729
3730 PR c/64709
3731 * c-typeck.c (pop_init_level): If constructor_elements has
3732 exactly one element with integer_zerop value, set constructor_zeroinit
3733 to 1. Remove braces around warning_init call.
3734
dea63e49
JJ
37352015-01-27 Jakub Jelinek <jakub@redhat.com>
3736
3737 PR c/64766
3738 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3739 of FUNCTION_DECLs with error_mark_node.
3740
d38f7dce
JJ
37412015-01-26 Jakub Jelinek <jakub@redhat.com>
3742
3743 PR c/64778
3744 * c-typeck.c (convert_arguments): Return -1 if there are
3745 error_args, even if we've diagnosed too many arguments.
3746
cbf5d0e7
RB
37472015-01-21 Richard Biener <rguenther@suse.de>
3748
3749 PR middle-end/64313
3750 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3751 for builtins the user declared correctly.
3752
41dbbb37
TS
37532015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3754 Bernd Schmidt <bernds@codesourcery.com>
3755 Cesar Philippidis <cesar@codesourcery.com>
3756 James Norris <jnorris@codesourcery.com>
3757 Jakub Jelinek <jakub@redhat.com>
3758 Ilmir Usmanov <i.usmanov@samsung.com>
3759
3760 * c-parser.c: Include "gomp-constants.h".
3761 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3762 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3763 Use OMP_CLAUSE_SET_MAP_KIND.
3764 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3765 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3766 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3767 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3768 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3769 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3770 "copyout", "create", "delete", "deviceptr", "gang", "host",
3771 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3772 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3773 "present_or_create", "pcreate", "seq", "self", "vector",
3774 "vector_length", "wait", "worker".
3775 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3776 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3777 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3778 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3779 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3780 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3781 (c_parser_oacc_data_clause_deviceptr)
3782 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3783 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3784 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3785 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3786 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3787 (c_parser_oacc_parallel, c_parser_oacc_update)
3788 (c_parser_oacc_wait): New functions.
3789 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3790 (c_finish_oacc_data): New prototypes.
3791 * c-typeck.c: Include "gomp-constants.h".
3792 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3793 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3794 OMP_CLAUSE_SET_MAP_KIND.
3795 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3796 (c_finish_oacc_data): New functions.
3797 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3798 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3799 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3800 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3801 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3802 GOMP_MAP_FORCE_DEVICEPTR.
3803
adfac8df
JJ
38042015-01-09 Michael Collison <michael.collison@linaro.org>
3805
3806 * c-array-notation.c: Include hash-set.h, machmode.h,
3807 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3808 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3809 * c-aux-info.c: Ditto.
3810 * c-convert.c: Ditto.
3811 * c-decl.c: Ditto.
3812 * c-errors.c: Ditto.
3813 * c-lang.c: Dittoxs.
3814 * c-objc-common.c: Ditto.
3815 * c-parser.c: Ditto.
3816 * c-typeck.c: Include hash-set.h, machmode.h,
3817 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3818 fold-const.h, wide-int.h, inchash.h, real.h and
3819 fixed-value.h due to flattening of tree.h.
3820
2cc901dc
MP
38212015-01-07 Marek Polacek <polacek@redhat.com>
3822
3823 PR c/64417
3824 * c-typeck.c (process_init_element): Disallow initialization of
3825 a flexible array member with a string constant if the structure
3826 is in an array.
3827
5624e564
JJ
38282015-01-05 Jakub Jelinek <jakub@redhat.com>
3829
e5341100
JJ
3830 PR sanitizer/64344
3831 * c-typeck.c (convert_for_assignment, c_finish_return): For
3832 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3833 types also set in_late_binary_op around convert call.
3834 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3835 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3836 result on expr as last argument to ubsan_instrument_float_cast,
3837 if in_late_binary_op, don't use c_save_expr but save_expr.
3838
5624e564
JJ
3839 Update copyright years.
3840
5bd012f8
MP
38412015-01-05 Marek Polacek <polacek@redhat.com>
3842
3843 PR c/64423
3844 * c-typeck.c (build_array_ref): Pass loc down to
3845 warn_array_subscript_with_type_char.
3846
3f8257db 38472014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3848
3849 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3850 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3851 element type.
8e745a17 3852 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3853 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3854 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3855 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3856 to PEDWARN_FOR_QUALIFIERS.
768952be 3857
8f94a8c4
JJ
38582014-12-17 Jakub Jelinek <jakub@redhat.com>
3859
3860 PR sanitizer/64289
3861 * c-convert.c: Include ubsan.h.
3862 (convert): For real -> integral casts and
3863 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3864 instead instrument the float cast directly.
3865
b731b390
JJ
38662014-11-29 Jakub Jelinek <jakub@redhat.com>
3867
3868 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3869 c_finish_stmt_expr): Remove NULL last argument from
3870 create_tmp_var_raw and create_tmp_var calls.
3871 * c-array-notation.c (fix_builtin_array_notation_fn,
3872 build_array_notation_expr, fix_conditional_array_notations_1,
3873 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3874
541e35a6
MP
38752014-11-28 Marek Polacek <polacek@redhat.com>
3876
3877 PR c/63862
3878 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3879 convert the right operand to integer type.
3880
b286be94
MP
38812014-11-25 Marek Polacek <polacek@redhat.com>
3882
3883 PR c/63877
3884 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3885 for inline functions.
3886
aa7da51a
JJ
38872014-11-21 Jakub Jelinek <jakub@redhat.com>
3888
3889 PR target/63764
3890 * c-typeck.c (build_array_ref): Adjust
3891 convert_vector_to_pointer_for_subscript caller. If it returns true,
3892 call non_lvalue_loc on the result.
3893
d876207f
RB
38942014-11-11 Richard Biener <rguenther@suse.de>
3895
3896 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3897 to true.
3898
e5e44252
AK
38992014-11-10 Andi Kleen <ak@linux.intel.com>
3900
3901 PR c/60804
3902 * c-parser.c (c_parser_statement_after_labels): Call
3903 check_no_cilk.
3904 (c_parser_if_statement): Dito.
3905 (c_parser_switch_statement): Dito.
3906 (c_parser_while_statement): Dito.
3907 (c_parser_do_statement): Dito.
3908 (c_parser_for_statement): Dito.
3909 * c-typeck.c (c_finish_loop): Dito.
3910
13c21655
PC
39112014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3912
3913 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3914 OPT_Wshift_count_overflow in the warnings.
3915
2d51fcef
MP
39162014-10-30 Marek Polacek <polacek@redhat.com>
3917
3918 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3919 print the stripped version as well, if they're not the same.
3920
ef4bddc2
RS
39212014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3922
3923 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3924 machine_mode.
3925
c582198b
AM
39262014-10-28 Andrew MacLeod <amacleod@redhat.com>
3927
3928 * c-decl.c: Adjust include files.
3929 * c-parser.c: Ditto.
3930
ddc8de03
PM
39312014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3932 Tom Tromey <tromey@redhat.com>
3933
3934 * c-tree.h (enum c_oracle_request): New.
3935 (c_binding_oracle_function): New typedef.
3936 (c_binding_oracle, c_pushtag, c_bind): Declare.
3937 * c-decl.c (c_binding_oracle): New global.
3938 (I_SYMBOL_CHECKED): New macro.
3939 (i_symbol_binding): New function.
3940 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3941 (I_TAG_CHECKED): New macro.
3942 (i_tag_binding): New function.
3943 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3944 (I_LABEL_CHECKED): New macro.
3945 (i_label_binding): New function.
3946 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3947 (c_print_identifier): Save and restore c_binding_oracle.
3948 (c_pushtag, c_bind): New functions.
3949
60393bbc
AM
39502014-10-27 Andrew MacLeod <amacleod@redhat.com>
3951
3952 * c-typeck.c: Adjust include files.
3953
d723bb7c
MLI
39542014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3955
3956 PR c++/53061
3957 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3958 initialization here...
3959 (c_initialize_diagnostics): ... but here. Set defaults after
3960 building pretty-printer.
3961
1bc5a451
MP
39622014-10-23 Marek Polacek <polacek@redhat.com>
3963
3964 PR c/63626
3965 * c-decl.c (pop_scope): Don't print warning in external_scope.
3966
4435bb92
MP
39672014-10-19 Marek Polacek <polacek@redhat.com>
3968
3969 PR c/63567
3970 * c-typeck.c (output_init_element): Allow initializing objects with
3971 static storage duration with compound literals even in C99 and add
3972 pedwarn for it.
3973
7278465e
MP
39742014-10-17 Marek Polacek <polacek@redhat.com>
3975
3976 PR c/63567
3977 * c-typeck.c (digest_init): Allow initializing objects with static
3978 storage duration with compound literals even in C99 and add pedwarn
3979 for it.
3980
d9b7be2e
MP
39812014-10-17 Marek Polacek <polacek@redhat.com>
3982
3983 PR c/63543
3984 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3985 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3986 error multiple times. Print the type.
3987
f406ae1f
MP
39882014-10-17 Marek Polacek <polacek@redhat.com>
3989
3990 PR c/63549
3991 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3992 type.
3993
92574c7c
MP
39942014-10-17 Marek Polacek <polacek@redhat.com>
3995
3996 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3997 (start_function): Use OPT_Wimplicit_int instead of 0.
3998 (store_parm_decls_oldstyle): Likewise.
3999
1bc4a978
MT
40002014-10-17 Alan Modra <amodra@gmail.com>
4001
4002 PR middle-end/61848
4003 * c-decl.c (merge_decls): Don't merge section name or tls model
4004 to newdecl symtab node, instead merge to olddecl. Override
4005 existing olddecl section name. Set tls_model for all thread-local
4006 vars, not just OMP thread-private ones. Remove incorrect comment.
4007
83685514
AM
40082014-10-16 Andrew MacLeod <amacleod@redhat.com>
4009
4010 * c-decl.c: Adjust include files.
4011
78a7c317
DD
40122014-10-14 DJ Delorie <dj@redhat.com>
4013
4014 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4015 (c_token_starts_typename): Check all __intN, not just __int128.
4016 (c_token_starts_declspecs): Likewise.
4017 (c_parser_declspecs): Likewise.
4018 (c_parser_attribute_any_word): Likewise.
4019 (c_parser_objc_selector): Likewise.
4020 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4021 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4022 is specified.
4023 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4024 __int128.
4025 (finish_declspecs): Likewise.
4026
74d98c1e
AB
40272014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4028
8e745a17 4029 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4030 the duplicate code.
8e745a17 4031 (c_parser_statement): Call the new function.
74d98c1e 4032
84937de2
MP
40332014-10-09 Marek Polacek <polacek@redhat.com>
4034
4035 PR c/63480
4036 * c-typeck.c (pop_init_level): Don't warn about initializing
4037 with { }.
4038
0382aaa0
MP
40392014-10-07 Marek Polacek <polacek@redhat.com>
4040
4041 PR c/59717
4042 * c-decl.c (header_for_builtin_fn): New function.
4043 (implicitly_declare): Suggest which header to include.
4044
7a0ca710
MP
40452014-10-07 Marek Polacek <polacek@redhat.com>
4046
4047 * c-convert.c (convert): Use error_operand_p.
4048 * c-typeck.c (require_complete_type): Likewise.
4049 (really_atomic_lvalue): Likewise.
4050 (digest_init): Likewise.
4051 (handle_omp_array_sections_1): Likewise.
4052
6bc8a126
MP
40532014-10-03 Marek Polacek <polacek@redhat.com>
4054
4055 PR c/63453
4056 * c-decl.c (pop_scope): Don't warn about "inline function declared
4057 but never defined" for functions marked with gnu_inline attribute.
4058
d90c0a59
JJ
40592014-09-25 Jakub Jelinek <jakub@redhat.com>
4060
4061 PR c++/63249
4062 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4063 on low_bound and length.
4064
083e891e
MP
40652014-09-24 Marek Polacek <polacek@redhat.com>
4066
4067 PR c/61405
4068 PR c/53874
4069 * c-parser.c: Don't define CPP_KEYWORD.
4070 (c_parser_switch_statement): Pass original type to c_finish_case.
4071 * c-tree.h (c_finish_case): Update declaration.
4072 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4073 conditionally to c_do_switch_warnings.
4074
8d95fe25
MP
40752014-09-03 Marek Polacek <polacek@redhat.com>
4076
4077 PR c/62024
4078 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4079 conversions.
4080
9a771876
JJ
40812014-09-02 Jakub Jelinek <jakub@redhat.com>
4082 Balaji V. Iyer <balaji.v.iyer@intel.com>
4083 Igor Zamyatin <igor.zamyatin@intel.com>
4084
4085 * c-parser.c (c_parser_cilk_for): New function.
4086 (c_parser_cilk_grainsize): Likewise.
4087 (c_get_temp_regvar): Likewise.
4088 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4089 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4090 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4091 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4092 case.
4093
b7679d96
CG
40942014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4095
4096 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4097 with using HOST_WIDE_INT without truncation to 'int'
4098
59ea0364
MP
40992014-08-22 Marek Polacek <polacek@redhat.com>
4100
4101 PR c++/62199
4102 * c-typeck.c (parser_build_binary_op): Adjust call to
4103 warn_logical_not_parentheses.
4104
671a475e
IZ
41052014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4106
4107 PR other/62008
4108 * c-parser.c (c_parser_array_notation): Check for correct
4109 type of an array added.
4110
04159acf
MP
41112014-08-19 Marek Polacek <polacek@redhat.com>
4112
4113 PR c++/62153
4114 * c-typeck.c (build_binary_op): If either operand of a comparison
4115 is a boolean expression, call maybe_warn_bool_compare.
4116
c77935ee
PP
41172014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4118
4119 PR c/45584
4120 * c-typeck.c (build_c_cast): Do a conversion even when the
4121 TYPE_MAIN_VARIANTs are the same.
4122
35aff4fb
MP
41232014-08-19 Marek Polacek <polacek@redhat.com>
4124
4125 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4126 pedwarn_c99 instead of pedwarn.
4127 (grokfield): Likewise.
4128 (warn_defaults_to): New function.
4129 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4130 Unconditionally call pedwarn_c99 instead of pedwarn.
4131 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4132 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4133 check flag_isoc11 before.
4134 * c-errors.c (pedwarn_c99): Change the return type to bool.
4135 Handle -Wc99-c11-compat.
4136 * c-parser.c (disable_extension_diagnostics): Handle
4137 warn_c99_c11_compat.
4138 (restore_extension_diagnostics): Likewise.
4139 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4140 instead of pedwarn, don't check flag_isoc11 before.
4141 (c_parser_declspecs): Likewise.
4142 (c_parser_alignas_specifier): Likewise.
4143 (c_parser_alignof_expression): Likewise.
4144 (c_parser_generic_selection): Likewise.
4145 * c-tree.h (pedwarn_c99): Update declaration.
4146 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4147 of pedwarn_c99.
4148
177cce46
MP
41492014-08-19 Marek Polacek <polacek@redhat.com>
4150
4151 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4152 to pedwarn_c90.
4153 * c-errors.c: Include "opts.h".
4154 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4155 * c-parser.c (disable_extension_diagnostics): Handle negative value
4156 of warn_c90_c99_compat, too.
4157 (restore_extension_diagnostics): Likewise.
4158 (c_parser_compound_statement_nostart): Pass
4159 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4160
6dc99c33
MP
41612014-08-12 Marek Polacek <polacek@redhat.com>
4162
4163 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4164 Add pedwarn.
4165 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4166 Likewise.
4167 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4168
3f8257db 41692014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4170
4171 PR c/51849
4172 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4173 Call pedwarn_c90 instead of pedwarn.
4174 (check_bitfield_type_and_width): Likewise.
4175 (declspecs_add_qual): Likewise.
4176 (declspecs_add_type): Likewise.
4177 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4178 Adjust to only call pedwarn_c90.
4179 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4180 pedwarn_c90 instead of pedwarn.
4181 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4182 * c-parser.c (disable_extension_diagnostics): Handle
4183 warn_c90_c99_compat.
4184 (restore_extension_diagnostics): Likewise.
4185 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4186 pedwarn_c90 instead of pedwarn.
4187 (c_parser_initelt): Likewise.
4188 (c_parser_postfix_expression): Likewise.
4189 (c_parser_postfix_expression_after_paren_type): Likewise.
4190 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4191 * c-tree.h: Fix formatting.
4192 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4193 pedwarn_c90 instead of pedwarn.
4194
9f25a338
TS
41952014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4196
4197 * c-typeck.c: Remove include of pointer-set.h.
4198
044331a8
MP
41992014-08-07 Marek Polacek <polacek@redhat.com>
4200
4201 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4202
b787e7a2
TS
42032014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4204
4205 * c-typeck.c: Use hash_map instead of pointer_map.
4206
6e2830c3
TS
42072014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4208
4209 * c-decl.c: Use hash_set instead of pointer_set.
4210
a7ee52fb
IZ
42112014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4212
4213 PR middle-end/61455
4214 * c-array-notation.c (expand_array_notations): Handling
4215 of DECL_EXPR added.
4216
b4dfdc11
MG
42172014-07-31 Marc Glisse <marc.glisse@inria.fr>
4218
4219 PR c++/60517
4220 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4221 a local variable.
4222
976d5a22
TT
42232014-07-30 Tom Tromey <tromey@redhat.com>
4224
4225 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4226 field.
4227 (really_start_incremental_init, push_init_level): Initialize
4228 designator_depth.
4229 (pop_init_level): Set global designator_depth.
4230 (process_init_element): Check for designated_init attribute.
4231
30281de2
MP
42322014-07-20 Marek Polacek <polacek@redhat.com>
4233
4234 PR c/61852
4235 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4236 (implicitly_declare): Pass location to implicit_decl_warning.
4237
b108f48f
JJ
42382014-07-14 Jakub Jelinek <jakub@redhat.com>
4239
4240 PR middle-end/61294
4241 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4242 If non-NULL, call c_parser_check_literal_zero.
4243 (c_parser_check_literal_zero): New function.
4244 (c_parser_postfix_expression_after_primary): Adjust
4245 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4246
773ec47f
MP
42472014-07-06 Marek Polacek <polacek@redhat.com>
4248
4249 PR c/6940
4250 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4251 * c-tree.h (C_ARRAY_PARAMETER): Define.
4252 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4253 function parameter.
4254
22e1cf1c 42552014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4256 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4257
4258 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4259 releasing symbol.
4260
52ec0ea3
MP
42612014-07-01 Marek Polacek <polacek@redhat.com>
4262
4263 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4264 instead of 0 to WARN_FOR_ASSIGNMENT.
4265
d5c3d343
MP
42662014-07-01 Marek Polacek <polacek@redhat.com>
4267
4268 PR c/58286
4269 * c-typeck.c (convert_for_assignment): Pass
4270 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4271
6a7253a4
MP
42722014-06-30 Marek Polacek <polacek@redhat.com>
4273
4274 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4275 has no_sanitize_undefined attribute.
4276
5e88a8f4
IZ
42772014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4278
4279 PR middle-end/57541
4280 * c-array-notation.c (fix_builtin_array_notation_fn):
4281 Check for 0 arguments in builtin call. Check that bultin argument is
4282 correct.
4283 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4284 index.
4285
9698b078
SH
42862014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4287
4288 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4289 qualifiers in __auto_type for atomic types.
4290 (c_parser_typeof_specifier): Discard all type qualifiers in
4291 __typeof__ for atomic types.
4292
6e07c515
MP
42932014-06-25 Marek Polacek <polacek@redhat.com>
4294
4295 PR c/61162
4296 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4297 the return expression to c_finish_return.
4298
da6f124d
JJ
42992014-06-25 Jakub Jelinek <jakub@redhat.com>
4300
4301 * c-typeck.c (c_finish_omp_clauses): Make sure
4302 OMP_CLAUSE_LINEAR_STEP has correct type.
4303
c203e8a7
TS
43042014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4305
4306 * c-decl.c: Adjust.
4307
56ad0e38
JJ
43082014-06-24 Jakub Jelinek <jakub@redhat.com>
4309
4310 * c-parser.c (c_parser_omp_for_loop): For
4311 #pragma omp parallel for simd move lastprivate clause from parallel
4312 to for rather than simd.
4313
47c2554f
MP
43142014-06-23 Marek Polacek <polacek@redhat.com>
4315
4316 * c-typeck.c (parser_build_binary_op): Don't call
4317 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4318
56363ffd
JH
43192014-06-15 Jan Hubicka <hubicka@ucw.cz>
4320
4321 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4322 * c-decl.c (merge_decls): Likewise.
4323
d7ff7ae5
MP
43242014-06-09 Marek Polacek <polacek@redhat.com>
4325
4326 PR c/36446
4327 * c-typeck.c (error_init): Call inform instead of error_at.
4328 (pedwarn_init): Call inform instead of pedwarn.
4329 (warning_init): Call inform instead of warning_at.
4330
24d047a3
JH
43312014-06-07 Jan Hubicka <hubicka@ucw.cz>
4332
4333 * c-decl.c (merge_decls): Use set_decl_section_name.
4334 (duplicate_decls): Remove node if it exists.
4335
9bac5cbb
G
43362014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4337
4338 PR c/53119
4339 * c-typeck.c (push_init_level, process_init_element,
4340 pop_init_level): Correct check for zero initialization, move
4341 missing brace warning to respect zero initialization.
4342
8ffcdea8
MP
43432014-06-05 Marek Polacek <polacek@redhat.com>
4344
4345 PR c/56724
4346 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4347
742938c9
MP
43482014-06-05 Marek Polacek <polacek@redhat.com>
4349
4350 PR c/49706
4351 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4352 on the left hand side operand of a comparison.
4353
6447c55d
MP
43542014-06-05 Marek Polacek <polacek@redhat.com>
4355
4356 PR c/48062
4357 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4358 Print note only if the warning was printed.
4359
9dc7743c
IZ
43602014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4361
4362 PR c/58942
4363 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4364 with a pointer.
4365
fedfecef
MP
43662014-06-03 Marek Polacek <polacek@redhat.com>
4367
4368 PR c/60439
4369 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4370 c_start_case.
4371 * c-tree.h (c_start_case): Update.
4372 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4373 switch condition has boolean value.
4374
9b2b7279
AM
43752014-06-02 Andrew MacLeod <amacleod@redhat.com>
4376
4377 * c-decl.c: Include builtins.h.
4378 * c-parser.c: Likewise.
4379
5c1bc275
MP
43802014-05-27 Marek Polacek <polacek@redhat.com>
4381
4382 PR c/56724
4383 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4384 error and warning calls to error_at and warning_at. Pass location of
4385 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4386 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4387 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4388
97563bc8
IZ
43892014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4390
4391 PR c/61191
4392 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4393 function parameters.
4394
aede2c10
JH
43952014-05-23 Jan Hubicka <hubicka@ucw.cz>
4396
4397 * c-decl.c (merge_decls): Preserve symtab node pointers.
4398 (duplicate_decls): Free new decl.
4399
edbba2ce
TS
44002014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4401
f3316c6d
TS
4402 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4403 initialization.
4404
edbba2ce
TS
4405 * c-parser.c (c_parser_omp_target): Return bool values.
4406
68c81f24
TS
44072014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4408
4409 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4410 num_teams_loc variable to num_thread_limit_loc.
4411
632f2871
RS
44122014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4413
4414 * c-array-notation.c (expand_array_notations): Use void_node
4415 instead of void_zero_node.
4416
766090c2
TS
44172014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4418
4419 * c-decl.c (finish_struct): Adjust.
4420 (finish_enum): Likewise.
4421 (bind): Adjust.
4422 (record_inline_static): Likewise.
4423 (push_scope): Likewise.
4424 (make_label): Likewise.
4425 (lookup_label_for_goto): Likewise.
4426 (finish_struct): Likewise.
4427 (finish_enum): Likewise.
4428 (store_parm_decls): Likewise.
4429 (c_push_function_context): Likewise.
4430 * c-lang.h: Remove usage of variable_size gty attribute.
4431 * c-parser.c (c_parse_init): Adjust.
4432 (c_parse_file): Likewise.
4433
2b107f6b
MP
44342014-05-13 Marek Polacek <polacek@redhat.com>
4435
4436 PR c/61162
4437 * c-typeck.c (convert_for_assignment): Pass location to
4438 WARN_FOR_ASSIGNMENT instead of input_location.
4439
d033409e
MP
44402014-05-10 Marek Polacek <polacek@redhat.com>
4441
4442 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4443 maybe_warn_string_init.
4444 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4445 maybe_warn_string_init.
4446 * c-tree.h (maybe_warn_string_init): Update declaration.
4447 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4448 Call pedwarn_init with loc instead of with input_location.
4449 (digest_init): Pass init_loc to maybe_warn_string_init.
4450 (pop_init_level): Call pedwarn_init with loc instead of with
4451 input_location.
4452 (set_init_index): Likewise.
4453 (process_init_element): Likewise.
4454
ea58ef42
MP
44552014-05-09 Marek Polacek <polacek@redhat.com>
4456
4457 PR c/61096
4458 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4459 (c_parser_initelt): Pass location to set_init_label. Pass array index
4460 location to set_init_index.
4461 * c-tree.h (push_init_level): Update declaration.
4462 (pop_init_level): Likewise.
4463 (set_init_index): Likewise.
4464 (set_init_label): Likewise.
4465 * c-typeck.c (error_init): Add location parameter. Call error_at
4466 instead of error.
4467 (digest_init): Pass init_loc to error_init.
4468 (really_start_incremental_init):
4469 (push_init_level): Add location parameter. Pass loc to pop_init_level
4470 and error_init.
4471 (pop_init_level): Likewise.
4472 (set_designator): Add location parameter. Pass loc to pop_init_level,
4473 push_init_level, and error_init.
4474 (set_init_index): Add location parameter. Pass loc to error_init and
4475 set_designator.
4476 (set_init_label): Likewise.
4477 (output_init_element): Pass loc to error_init.
4478 (process_init_element): Pass loc to error_init, pop_init_level,
4479 pedwarn_init, and push_init_level.
4480
661a0813
MP
44812014-05-09 Marek Polacek <polacek@redhat.com>
4482
4483 PR c/50459
4484 * c-parser.c (c_parser_attributes): Parse the arguments as an
4485 expression-list if the attribute takes identifier.
4486
2793eeab
MP
44872014-05-08 Marek Polacek <polacek@redhat.com>
4488
4489 PR c/61053
4490 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4491 TYPE_ALIGN_UNIT.
4492
f827930a
MP
44932014-05-08 Marek Polacek <polacek@redhat.com>
4494
4495 PR c/61077
4496 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4497 of main.
4498
1d60af08
KZ
44992014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4500 Mike Stump <mikestump@comcast.net>
4501 Richard Sandiford <rdsandiford@googlemail.com>
4502
4503 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4504 (finish_enum): Use wide-int interfaces.
4505 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4506 * c-typeck.c (build_c_cast): Likewise.
4507 (set_nonincremental_init_from_string): Likewise.
4508 (c_tree_equal): Likewise.
4509
a0e24419
MP
45102014-05-02 Marek Polacek <polacek@redhat.com>
4511
4512 PR c/25801
4513 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4514 Return size_one_node when the type is not complete.
4515 (pointer_diff): Remove comment.
4516 (build_unary_op): Improve error messages.
4517
19fc9faa
MP
45182014-05-02 Marek Polacek <polacek@redhat.com>
4519
4520 * c-typeck.c (c_finish_return): Separate warning_at calls.
4521
63bc4e87
MP
45222014-05-02 Marek Polacek <polacek@redhat.com>
4523
4524 * c-tree.h (error_init): Remove declaration.
4525 (pedwarn_init): Likewise.
4526 * c-typeck.c (error_init): Make static and move above.
4527 (pedwarn_init): Likewise.
4528 (warning_init): Move above.
4529 (maybe_warn_string_init): Likewise.
4530
4bd2511b
JL
45312014-05-01 Jeff Law <law@redhat.com>
4532
4533 Revert:
4534
4535 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4536 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4537 avoid goto.
4538
6a358dcb
MP
45392014-05-02 Marek Polacek <polacek@redhat.com>
4540
4541 PR c/60784
4542 * c-typeck.c (push_init_level): Set constructor_designated to
4543 p->designated for structures.
4544
ae5ebda4
MP
45452014-05-01 Marek Polacek <polacek@redhat.com>
4546
4547 PR c/60915
4548 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4549 function-definition has an attribute after the declarator.
4550
96b40f8d
MP
45512014-05-01 Marek Polacek <polacek@redhat.com>
4552
4553 PR c/60257
4554 * c-typeck.c (warning_init): Add location_t parameter. Call
4555 warning_at instead of warning.
4556 (push_init_level): Pass input_location to warning_init.
4557 (add_pending_init): Add location_t parameter. Pass loc to
4558 warning_init.
4559 (set_nonincremental_init): Pass input_location to add_pending_init.
4560 (set_nonincremental_init_from_string): Likewise.
4561 (output_init_element): Pass loc to warning_init and to
4562 add_pending_init.
4563
32e00768
MP
45642014-05-01 Marek Polacek <polacek@redhat.com>
4565
4566 PR c/43395
4567 * c-typeck.c (c_finish_return): Distinguish between label and variable
4568 when warning about returning local address.
4569
c9379ce2
MP
45702014-05-01 Marek Polacek <polacek@redhat.com>
4571
4572 PR c/29467
4573 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4574 in C89 mode.
4575
d00887e8
MP
45762014-05-01 Marek Polacek <polacek@redhat.com>
4577
4578 PR c/43245
4579 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4580 instead of 0 to WARN_FOR_QUALIFIERS.
4581
5436fa2e
MP
45822014-05-01 Marek Polacek <polacek@redhat.com>
4583
4584 PR c/56989
4585 * c-typeck.c (default_conversion): Use better location for
4586 error call.
4587
f8ed5150
MP
45882014-04-30 Marek Polacek <polacek@redhat.com>
4589
4590 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4591 also when SANITIZE_FLOAT_DIVIDE is on.
4592
8337d1db
MP
45932014-04-30 Marek Polacek <polacek@redhat.com>
4594
4595 PR c/60139
4596 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4597 and pedwarn_init. Use loc insted of input_location.
4598
c4bdc42f
MP
45992014-04-30 Marek Polacek <polacek@redhat.com>
4600
4601 PR c/60351
4602 * c-typeck.c (build_binary_op): Use location when warning about
4603 shift count.
4604
45484dcf
MP
46052014-04-25 Marek Polacek <polacek@redhat.com>
4606
4607 PR c/18079
4608 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4609 always_inline/noinline and hot/cold attributes.
4610
34cf811f
MP
46112014-04-25 Marek Polacek <polacek@redhat.com>
4612
4613 PR c/60114
4614 * c-parser.c (c_parser_initelt): Pass input_location to
4615 process_init_element.
4616 (c_parser_initval): Pass loc to process_init_element.
4617 * c-tree.h (process_init_element): Adjust declaration.
4618 * c-typeck.c (push_init_level): Pass input_location to
4619 process_init_element.
4620 (pop_init_level): Likewise.
4621 (set_designator): Likewise.
4622 (output_init_element): Add location_t parameter. Pass loc to
4623 digest_init.
4624 (output_pending_init_elements): Pass input_location to
4625 output_init_element.
4626 (process_init_element): Add location_t parameter. Pass loc to
4627 output_init_element.
4628
42056eac
JJ
46292014-04-24 Jakub Jelinek <jakub@redhat.com>
4630
4631 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4632 atomic-clause, allow comma in between atomic-clause and
4633 seq_cst.
4634
e162a134
JJ
46352014-04-22 Jakub Jelinek <jakub@redhat.com>
4636
4637 PR c/59073
4638 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4639 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4640
2f6babac
IZ
46412014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4642
4643 PR middle-end/60469
4644 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4645 create_tmp_var instead build_decl for creating temps.
4646 (build_array_notation_expr): Likewise.
4647 (fix_conditional_array_notations_1): Likewise.
4648 (fix_array_notation_expr): Likewise.
4649 (fix_array_notation_call_expr): Likewise.
4650
8edbfaa6
JJ
46512014-03-28 Jakub Jelinek <jakub@redhat.com>
4652
4653 PR c++/60689
4654 * c-tree.h (c_build_function_call_vec): New prototype.
4655 * c-typeck.c (build_function_call_vec): Don't call
4656 resolve_overloaded_builtin here.
4657 (c_build_function_call_vec): New wrapper function around
4658 build_function_call_vec. Call resolve_overloaded_builtin here.
4659 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4660 Call c_build_function_call_vec instead of build_function_call_vec.
4661 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4662 * c-decl.c (finish_decl): Likewise.
4663
7485aeea
MLI
46642014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4665
4666 PR c/55383
4667 * c-typeck.c: Use correct format string in cast-qual warning
4668
b17a8b07
TS
46692014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4670
4671 * c-decl.c (c_decl_attributes): Use
4672 lang_hooks.types.omp_mappable_type.
4673 * c-typeck.c (c_finish_omp_clauses): Likewise.
4674
3af9c5e9
MP
46752014-03-06 Marek Polacek <polacek@redhat.com>
4676
4677 PR c/60197
4678 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4679 of checking tree code.
4680
1c9f5f33
PK
46812014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4682
4683 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4684 (c_parser_parameter_declaration): Likewise.
4685
cc28fc7f
MP
46862014-02-19 Marek Polacek <polacek@redhat.com>
4687
4688 PR c/60195
4689 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4690 Call mark_exp_read on exp.value.
4691 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4692 TREE_ADDRESSABLE on old instead of val.
4693 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4694
b581c05c
PK
46952014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4696
4697 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4698 C_EXPR_APPEND by vec_safe_push.
4699 * c-tree.h (C_EXPR_APPEND): Remove.
4700
81e5eca8
MP
47012014-01-31 Marek Polacek <polacek@redhat.com>
4702
4703 PR c/59963
4704 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4705 build_function_call_vec.
4706 (build_function_call): Likewise.
4707 (build_atomic_assign): Likewise.
4708 (build_function_call_vec): Add arg_loc parameter. Use it.
4709 (convert_arguments): Likewise.
4710 (convert_for_assignment): Rename rhs_loc to expr_loc.
4711 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4712 (c_parser_objc_keywordexpr): Likewise.
4713 (c_parser_postfix_expression_after_primary): Call
4714 build_function_call_vec with expr_loc rather than op_loc.
4715 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4716 build_function_call_vec.
4717 (c_parser_expr_list): Add locations parameter. Fill it with locations
4718 of function arguments.
4719 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4720
68fca595
MP
47212014-01-30 Marek Polacek <polacek@redhat.com>
4722
4723 PR c/59940
4724 * c-typeck.c (build_function_call_vec): Use loc parameter.
4725 (convert_arguments): Add location parameter. Use it.
4726 (ep_convert_and_check): Likewise.
4727 (build_atomic_assign): Adjust convert_for_assignment call.
4728 (build_modify_expr): Likewise.
4729 (digest_init): Likewise.
4730 (c_finish_return): Likewise.
4731 (build_conditional_expr): Adjust ep_convert_and_check calls.
4732 (convert_for_assignment): Add rhs_loc parameter. Use it.
4733 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4734 calls.
4735
fa337f3a
RB
47362014-01-30 Richard Biener <rguenther@suse.de>
4737
4738 PR c/59905
4739 * c-typeck.c (build_function_call_vec): Do not replace calls
4740 to a function via an incompatible type with a runtime abort.
4741
b72271b9
BI
47422014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4743
4744 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4745 flag_enable_cilkplus with flag_cilkplus.
4746 (c_parser_direct_declarator_inner): Likewise.
4747 (c_parser_attribute_any_word): Likewise.
4748 (c_parser_attributes): Likewise.
4749 (c_parser_compound_statement): Likewise.
4750 (c_parser_statement_after_labels): Likewise.
4751 (c_parser_if_statement): Likewise.
4752 (c_parser_switch_statement): Likewise.
4753 (c_parser_do_statement): Likewise.
4754 (c_parser_for_statement): Likewise.
4755 (c_parser_unary_expression): Likewise.
4756 (c_parser_postfix_expression): Likewise.
4757 (c_parser_postfix_expression_after_primary): Likewise.
4758 (c_parser_postfix_expression_after_primary): Likewise.
4759 (c_parser_omp_clause_name): Likewise.
4760 (c_finish_omp_declare_simd): Likewise.
4761 (c_parser_cilk_verify_simd): Likewise.
4762 * c-typeck.c (build_array_ref): Likewise.
4763 (build_function_call_vec): Likewise.
4764 (convert_arguments): Likewise.
4765 (build_compound_expr): Likewise.
4766 (c_finish_return): Likewise.
4767 (c_finish_if_stmt): Likewise.
4768 (c_finish_loop): Likewise.
4769 (build_binary_op): Likewise.
4770
393e8e8b
MP
47712014-01-23 Marek Polacek <polacek@redhat.com>
4772
4773 PR c/59846
4774 * c-typeck.c (parser_build_binary_op): Use location instead of
4775 input_location.
4776 (build_binary_op): Pass location to shorten_compare.
4777
f04dda30
MP
47782014-01-23 Marek Polacek <polacek@redhat.com>
4779
4780 PR c/58346
4781 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4782 an empty aggregate.
4783
789eadcd
MP
47842014-01-23 Marek Polacek <polacek@redhat.com>
4785
4786 PR c/59871
4787 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4788 of a comma expression.
4789 (emit_side_effect_warnings): Likewise.
4790
40f14e9f
BI
47912014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4792
4793 PR c/59825
4794 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4795 function to use walk_tree and moved a lot of its functionality to
4796 expand_array_notations.
4797 (expand_array_notations): New function.
4798
74558dd9
BI
47992014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4800
4801 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4802 attribute an attribute without value.
4803
652fea39
JJ
48042014-01-23 Jakub Jelinek <jakub@redhat.com>
4805
4806 PR middle-end/58809
4807 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4808 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4809
f34f1c87
MP
48102014-01-22 Marek Polacek <polacek@redhat.com>
4811
4812 PR c/59891
4813 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4814 of remove_c_maybe_const_expr on op1 and op2.
4815
241f845a
JJ
48162014-01-15 Jakub Jelinek <jakub@redhat.com>
4817
4818 PR c/58943
4819 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4820 effects, preevaluate rhs using SAVE_EXPR first.
4821
9a74f20c
BI
48222014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4823
4824 PR c++/59631
4825 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4826 statements with if-elseif statements.
4827
96066ce1
MP
48282014-01-06 Marek Polacek <polacek@redhat.com>
4829
4830 PR c/57773
4831 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4832 defined bit-field types only in ISO C.
4833
23a5b65a
RS
48342014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4835
4836 Update copyright years
4837
f9030485
RS
48382014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4839
4840 * c-array-notation.c: Use the standard form for the copyright notice.
4841
41958c28
BI
48422013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4843
4844 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4845 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4846 field in parser is not empty. If not-empty, call the function
4847 c_parser_finish_omp_declare_simd.
4848 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4849 between SIMD-enabled functions and #pragma simd. Added new parameter.
4850 (c_parser_cilk_all_clauses): Modified the usage of the function
4851 c_parser_cilk_clause_vectorlength as mentioned above.
4852 (c_parser_cilk_simd_fn_vector_attrs): New function.
4853 (c_finish_cilk_simd_fn_tokens): Likewise.
4854 (is_cilkplus_vector_p): Likewise.
4855 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4856 "nomask," and "mask" strings in clause name.
4857 (c_parser_omp_all_clauses): Added 3 new case statements:
4858 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4859 PRAGMA_CILK_CLAUSE_NOMASK.
4860 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4861 check for vector attribute and if so call the function
4862 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4863 called the function c_finish_cilk_simd_fn_tokens.
4864 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4865 parser field is non-empty. If so, parse them as you would parse
4866 the omp declare simd pragma.
4867 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4868 Added a check when step is a parameter and flag it as error.
4869 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4870 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4871 pragma_omp_clause.
4872
cef0fd0e
TS
48732013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4874
4875 * c-parser.c (c_parser_omp_parallel): Fix description.
4876
12893402
BI
48772013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4878
4879 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4880 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4881 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4882 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4883
296674db
JM
48842013-12-04 Joseph Myers <joseph@codesourcery.com>
4885
4886 PR c/52023
4887 * c-parser.c (c_parser_alignas_specifier): Use
4888 c_sizeof_or_alignof_type instead of c_alignof.
4889 (c_parser_alignof_expression): Likewise, with min_alignof
4890 parameter depending on alignof spelling used.
4891
edd28054
MP
48922013-12-04 Marek Polacek <polacek@redhat.com>
4893
4894 PR c/54113
4895 * c-decl.c (start_function): Don't warn for missing prototype for
4896 inline functions.
4897
da0fc454
MP
48982013-12-03 Marek Polacek <polacek@redhat.com>
4899
4900 PR c/59351
4901 * c-decl.c (build_compound_literal): Allow compound literals with
4902 empty initial value.
4903
4c2ecab0
JM
49042013-12-02 Joseph Myers <joseph@codesourcery.com>
4905
4906 PR c/58235
4907 * c-typeck.c (build_modify_expr): Diagnose assignment to
4908 expression with array type.
4909
340baef7
JM
49102013-11-29 Joseph Myers <joseph@codesourcery.com>
4911
4912 PR c/42262
4913 * c-typeck.c (process_init_element): Do not treat a string as
4914 initializing a whole array when used with a designator for an
4915 individual element.
4916
6763b9f7
JM
49172013-11-29 Joseph Myers <joseph@codesourcery.com>
4918
4919 PR c/57574
4920 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4921 an inline function following a static declaration.
4922
e7bd1de1
JJ
49232013-11-28 Jakub Jelinek <jakub@redhat.com>
4924
4925 PR c/59310
4926 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4927 to p_name before calling c_parser_omp_teams instead of after.
4928 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4929 argument. Remove unused p_name variable.
4930
0136f8f0
AH
49312013-11-27 Aldy Hernandez <aldyh@redhat.com>
4932 Jakub Jelinek <jakub@redhat.com>
4933
4934 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4935 external_scope is NULL.
4936
241b71bb
TV
49372013-11-27 Tom de Vries <tom@codesourcery.com>
4938 Marc Glisse <marc.glisse@inria.fr>
4939
4940 PR c++/59032
4941 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4942
2fb9a547
AM
49432013-11-22 Andrew MacLeod <amacleod@redhat.com>
4944
4945 * c-typeck.c: Add required include files from gimple.h.
4946
8400e75e
DM
49472013-11-22 David Malcolm <dmalcolm@redhat.com>
4948
4949 * c-decl.c (define_label, shadow_tag_warned)
4950 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4951 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4952 (declspecs_add_type): Remove use of in_system_header macro.
4953 * c-parser.c (c_parser_unary_expression): Likewise.
4954 * c-typeck.c (store_init_value, process_init_element)
4955 (c_start_case): Likewise.
4956
4957 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4958 macro.
4959
4960 * c-parser.c (c_parser_set_source_position_from_token): Remove
4961 reference to in_system_header from comment.
4962
386b1f1f
RS
49632013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4964
4965 * c-decl.c (grokdeclarator): Update comment to refer to
4966 tree_to_[su]hwi rather than tree_low_cst.
4967
ae7e9ddd
RS
49682013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4969
4970 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4971 tree_to_uhwi throughout.
4972
9439e9a1
RS
49732013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4974
4975 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4976 throughout.
4977
9541ffee
RS
49782013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4979
4980 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4981 throughout.
4982
c02065fc
AH
49832013-11-15 Aldy Hernandez <aldyh@redhat.com>
4984
4985 * c-parser.c (c_parser_cilk_simd): New.
4986 (c_parser_cilk_verify_simd): New.
4987 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4988 (c_parser_omp_for_loop): Add case for NE_EXPR.
4989 Set c_break_label for CILK_SIMD.
4990 (c_parser_cilk_clause_vectorlength): New.
4991 (c_parser_cilk_clause_linear): New.
4992 (c_parser_cilk_clause_name): New.
4993 (c_parser_cilk_all_clauses): New.
4994 * c-typeck.c (build_unary_op): Pass location argument to
4995 readonly_error.
4996 (build_modify_expr): Same.
4997 (build_asm_expr): Same.
4998 (c_finish_bc_stmt): Error on break/continue in loops.
4999
18f429e2
AM
50002013-11-14 Andrew MacLeod <amacleod@redhat.com>
5001
5002 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5003
d8a2d370
DN
50042013-11-14 Diego Novillo <dnovillo@google.com>
5005
5006 * c-decl.c: Include print-tree.h.
5007 Include stor-layout.h.
5008 Include varasm.h.
5009 Include attribs.h.
5010 Include stringpool.h.
5011 * c-lang.c: Include fold-const.h.
5012 * c-parser.c: Include stringpool.h.
5013 Include attribs.h.
5014 Include stor-layout.h.
5015 Include varasm.h.
5016 Include trans-mem.h.
5017 * c-typeck.c: Include stor-layout.h.
5018 Include trans-mem.h.
5019 Include varasm.h.
5020 Include stmt.h.
5021
38b7bc7f
JM
50222013-11-13 Joseph Myers <joseph@codesourcery.com>
5023
5024 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5025 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5026 __auto_type.
5027 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5028 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5029 RID_AUTO_TYPE.
5030 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5031 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5032 (c_parser_declarator, c_parser_direct_declarator_inner)
5033 (c_parser_parameter_declaration, c_parser_type_name): All callers
5034 changed.
5035 (c_parser_declaration_or_fndef): Handle declarations with type
5036 determined from the initializer.
5037
45b0be94
AM
50382013-11-12 Andrew MacLeod <amacleod@redhat.com>
5039
18f429e2 5040 * c-typeck.c: Include gimplify.h.
45b0be94 5041
582d9b50
JM
50422013-11-12 Joseph Myers <joseph@codesourcery.com>
5043
5044 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5045 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5046 comment.
5047 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5048 or _Thread_local as appropriate in diagnostics.
5049 (build_null_declspecs): Initialize ret->thread_gnu_p.
5050 (declspecs_add_scspec): Handle either __thread or _Thread_local
5051 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5052 pedantic. Do not disallow _Thread_local extern and _Thread_local
5053 static.
5054
267bac10
JM
50552013-11-07 Joseph Myers <joseph@codesourcery.com>
5056 Andrew MacLeod <amacleod@redhat.com>
5057
5058 * c-aux-info.c (gen_type): Handle atomic qualifier.
5059 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5060 qualifiers when compating types.
5061 (shadow_tag_warned): Handle atomic_p in declspecs.
5062 (quals_from_declspecs): Likewise.
5063 (start_decl): Use c_type_promotes_to when promoting argument
5064 types.
5065 (grokdeclarator): Handle _Atomic.
5066 (get_parm_info): Diagnose any qualifier on "void" as only
5067 parameter.
5068 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5069 comparing types. Use c_type_promotes_to when promoting argument
5070 types.
5071 (finish_function): Use c_type_promotes_to when promoting argument
5072 types.
5073 (build_null_declspecs): Handle atomic_p in declspecs.
5074 (declspecs_add_qual): Handle RID_ATOMIC.
5075 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5076 (c_token_starts_declspecs): Handle RID_ATOMIC.
5077 (c_parser_declspecs): Handle atomic type specifiers and
5078 qualifiers.
5079 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5080 from types of expressions with atomic type.
5081 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5082 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5083 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5084 (c_parser_statement_after_labels, c_parser_switch_statement)
5085 (c_parser_for_statement, c_parser_expr_no_commas)
5086 (c_parser_conditional_expression, c_parser_binary_expression)
5087 (c_parser_cast_expression, c_parser_unary_expression)
5088 (c_parser_postfix_expression)
5089 (c_parser_postfix_expression_after_primary, c_parser_expression):
5090 Use convert_lvalue_to_rvalue.
5091 (c_parser_expression_conv, c_parser_expr_list): Document
5092 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5093 (c_parser_objc_synchronized_statement): Use
5094 convert_lvalue_to_rvalue.
5095 (c_parser_objc_selector): Handle RID_ATOMIC.
5096 (c_parser_objc_receiver, c_parser_array_notation): Use
5097 convert_lvalue_to_rvalue.
5098 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5099 _Atomic (type-name).
5100 (struct c_declspecs): Add atomic_p field.
5101 (convert_lvalue_to_rvalue): Declare.
5102 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5103 corresponding atomic types.
5104 (qualify_type): Don't add _Atomic qualifiers from second argument.
5105 (comp_target_types): Do not allow _Atomic mismatches.
5106 (type_lists_compatible_p): Do not remove atomic qualifiers when
5107 comparing types.
5108 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5109 (build_atomic_assign): New functions.
5110 (build_unary_op): Use build_atomic_assign for atomic increment and
5111 decrement.
5112 (build_conditional_expr): Do not treat _Atomic void as a qualified
5113 version of void.
5114 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5115 (find_anonymous_field_with_type, convert_to_anonymous_field)
5116 (convert_for_assignment): Do not remove atomic qualifiers when
5117 comparing types.
5118 (digest_init): Do not accept initialization of arrays of atomic
5119 elements by string constants.
5120 (build_asm_expr): Use convert_lvalue_to_rvalue.
5121 (build_binary_op): Do not treat _Atomic void as a qualified
5122 version of void.
5123
0c249d4b
DD
51242013-11-06 DJ Delorie <dj@redhat.com>
5125
5126 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5127 both explicit and builtin, print the location of the explicit one.
5128
6d7f7e0a
TB
51292013-11-05 Tobias Burnus <burnus@net-b.de>
5130
5131 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5132 c_parser_omp_distribute, c_parser_omp_teams,
5133 c_parser_omp_target, c_parser_omp_declare): Handle
5134 -fopenmp-simd.
5135
b906f4ca
MP
51362013-11-03 Marek Polacek <polacek@redhat.com>
5137
5138 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5139
ee1d5a02
JJ
51402013-11-01 Jakub Jelinek <jakub@redhat.com>
5141
5142 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5143 check_dup_generic at the end, unless remove is true.
5144 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5145 remove = true;.
5146 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5147
5a9785fb
JJ
51482013-10-31 Jakub Jelinek <jakub@redhat.com>
5149
5150 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5151 with decl that is not pointer nor array.
5152
939b37da
BI
51532013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5154
5155 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5156 a spawning function is found.
5157 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5158 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5159 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5160 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5161 case.
5162 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5163 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5164 expr.
5165 (c_finish_return): Added a check to reject _Cilk_spawn in return
5166 expression.
5167 (build_cilk_spawn): New function.
5168 (build_cilk_sync): Likewise.
5169 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5170
d4af74d4
TB
51712013-10-27 Tobias Burnus <burnus@net-b.de>
5172
5173 PR other/33426
5174 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5175 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5176 (c_parser_statement_after_labels): Update calls.
5177
d73749df 51782013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5179
5180 PR other/33426
5181 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5182 Handle PRAGMA_IVDEP.
5183 (c_parser_statement_after_labels): Update call.
5184
f28aa681
MP
51852013-10-24 Marek Polacek <polacek@redhat.com>
5186
5187 * c-parser.c (c_parser_struct_declaration): Add a comment.
5188 (c_parser_declarator): Don't allow _Alignas here.
5189
0645c1a2
AM
51902013-10-17 Andrew MacLeod <amacleod@redhat.com>
5191
5192 * c-parser.c: Include omp-low.h.
5193 * c-typeck.c: Likewise.
5194
568a31f2
MP
51952013-10-17 Marek Polacek <polacek@redhat.com>
5196
5197 PR c/58267
5198 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5199 Document syntax of the array-declarator.
5200 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5201 are not permitted.
5202 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5203 (c_parser_struct_declaration): Likewise.
5204 (c_parser_declarator): Likewise.
5205 (c_parser_direct_declarator_inner): Likewise.
5206 (c_parser_parameter_declaration): Likewise.
5207 (c_parser_type_name): Likewise.
5208
acf0174b
JJ
52092013-10-11 Jakub Jelinek <jakub@redhat.com>
5210
5211 * c-lang.h (current_omp_declare_target_attribute): New extern
5212 decl.
5213 * c-parser.c: Include c-lang.h.
5214 (struct c_parser): Change tokens to c_token *.
5215 Add tokens_buf field. Change tokens_avail type to unsigned int.
5216 (c_parser_consume_token): If parser->tokens isn't
5217 &parser->tokens_buf[0], increment parser->tokens.
5218 (c_parser_consume_pragma): Likewise.
5219 (enum pragma_context): Add pragma_struct and pragma_param.
5220 (c_parser_external_declaration): Adjust
5221 c_parser_declaration_or_fndef caller.
5222 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5223 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5224 Adjust recursive call.
5225 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5226 of pragma_external.
5227 (c_parser_parameter_declaration): Use pragma_param instead of
5228 pragma_external.
5229 (c_parser_compound_statement_nostart, c_parser_label,
5230 c_parser_for_statement): Adjust
5231 c_parser_declaration_or_fndef callers.
5232 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5233 it through to c_parser_conditional_expression.
5234 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5235 pass it through to c_parser_binary_expression. Adjust recursive
5236 call.
5237 (c_parser_binary_expression): Remove prec argument, add
5238 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5239 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5240 binop matches it, use build2 instead of parser_build_binary_op.
5241 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5242 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5243 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5244 Handle pragma_struct and pragma_param the same as pragma_external.
5245 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5246 (c_parser_omp_variable_list): Parse array sections for
5247 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5248 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5249 (c_parser_omp_clause_reduction): Handle user defined reductions.
5250 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5251 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5252 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5253 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5254 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5255 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5256 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5257 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5258 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5259 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5260 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5261 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5262 (c_parser_omp_for_loop): Add CODE argument, pass it through
5263 to c_finish_omp_for. Change last argument to cclauses,
5264 and adjust uses to grab parallel clauses from the array of all
5265 the split clauses. Adjust c_parser_binary_expression,
5266 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5267 (omp_split_clauses): New function.
5268 (c_parser_omp_simd): New function.
5269 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5270 Allow the function to be called also when parsing combined constructs,
5271 and call c_parser_omp_simd when parsing for simd.
5272 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5273 #pragma omp section, require exactly one structured-block instead of
5274 sequence of statements.
5275 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5276 Allow the function to be called also when parsing combined constructs.
5277 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5278 Allow the function to be called also when parsing combined
5279 constructs.
5280 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5281 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5282 c_parser_omp_teams, c_parser_omp_target_data,
5283 c_parser_omp_target_update, c_parser_omp_target,
5284 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5285 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5286 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5287 (c_parser_omp_construct): Add p_name and mask vars. Handle
5288 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5289 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5290 and c_parser_omp_sections callers.
5291 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5292 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5293 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5294 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5295 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5296 OMP_CLAUSE_DEPEND.
5297 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5298 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5299 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5300 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5301 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5302 * c-typeck.c: Include tree-inline.h.
5303 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5304 handle_omp_array_sections_1, handle_omp_array_sections,
5305 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5306 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5307 user defined reductions.
5308 (c_tree_equal): New function.
5309 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5310 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5311 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5312 c_check_omp_declare_reduction_r): New prototypes.
5313 * c-decl.c (current_omp_declare_target_attribute): New variable.
5314 (c_decl_attributes): New function.
5315 (start_decl, start_function): Use it instead of decl_attributes.
5316 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5317 c_omp_reduction_decl, c_omp_reduction_lookup,
5318 c_check_omp_declare_reduction_r): New functions.
5319
0a6c2227
TT
53202013-09-25 Tom Tromey <tromey@redhat.com>
5321
5322 * Make-lang.in (c/gccspec.o): Remove.
5323 (CFLAGS-c/gccspec.o): New variable.
5324 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5325 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5326 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5327
f3bc55f0
TT
53282013-09-25 Tom Tromey <tromey@redhat.com>
5329
5330 * Make-lang.in (c/gccspec.o): Don't use subshell.
5331
a24d975c
MP
53322013-09-18 Marek Polacek <polacek@redhat.com>
5333
5334 PR sanitize/58443
5335 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5336 Remove unnecessary check.
5337
ce6923c5
MP
53382013-09-18 Marek Polacek <polacek@redhat.com>
5339
5340 PR sanitizer/58411
5341 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5342 no_sanitize_undefined attribute.
5343
a1e51df9
KT
53442013-09-13 Kai Tietz <ktietz@redhat.com>
5345
5346 PR target/57848
5347 * c-decl.c (c_builtin_function_ext_scope): Remove
5348 wrong assumption that it is never called on prexisting
5349 symbol.
5350
0af94e6f
JR
53512013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5352
5353 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5354
20059c8b
GDR
53552013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5356
5357 * c-objc-common.c (c_tree_printer): Tidy.
5358
de5a5fa1
MP
53592013-08-30 Marek Polacek <polacek@redhat.com>
5360
5361 * c-typeck.c (build_binary_op): Add division by zero and shift
5362 instrumentation.
5363
2531a1d9 53642013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5365 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5366
6e2bcc98 5367 PR c/35649
2531a1d9
JR
5368 * c-typeck.c (c_common_type): Prefer double_type_node over
5369 other REAL_TYPE types with the same precision.
5370 (convert_arguments): Likewise.
5371
025311c4
GDR
53722013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5373
5374 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5375 (c_initialize_diagnostics): Call a destructor for the early printer.
5376
da6ca2b5
GDR
53772013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5378
5379 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5380 printer initialization.
5381
318cda85 53822013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5383
318cda85
BI
5384 PR c/57490
5385 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5386 check for truth values.
5387 (expand_array_notation_exprs): Added truth values case. Removed an
5388 unwanted else. Added for-loop to walk through subtrees in default
5389 case.
5390
b066401f
GDR
53912013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5392
5393 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5394
fb48aadc
JM
53952013-07-23 Joseph Myers <joseph@codesourcery.com>
5396
5397 * c-parser.c (struct c_generic_association): Fix typo.
5398
433cc7b0
TT
53992013-07-23 Tom Tromey <tromey@redhat.com>
5400 Joseph Myers <joseph@codesourcery.com>
5401
5402 * c-parser.c (struct c_generic_association): New.
5403 (c_generic_association_d): New typedef.
5404 (c_parser_generic_selection): New function.
5405 (c_parser_postfix_expression): Handle RID_GENERIC.
5406
26d40c3d
JM
54072013-07-13 Jason Merrill <jason@redhat.com>
5408
5409 PR c++/57793
5410 * c-decl.c (finish_struct): Check for too-large class.
5411
ecdbd01a 54122013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5413
5414 PR c/57821
5415 * c-typeck.c (set_init_index): When folding, check for index overflow.
5416
1141ed3f
BI
54172013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5418
5419 * c-parser.c (c_parser_array_notation): Removed rejection of array
5420 notations in an array of function pointers.
5421
713b46fa
BI
54222013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5423
5424 * c-array-notation.c (make_triplet_val_inv): New function.
5425 (create_cmp_incr): Likewise.
5426 (create_array_refs): Likewise.
5427 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5428 Also modularized common parts between functions and called the function.
5429 (build_array_notation_expr): Likewise.
5430 (fix_conditional_array_notations_1): Likewise.
5431 (fix_array_notation_expr): Likewise.
5432 (fix_array_notation_call_expr): Likewise.
5433
92f20202
MP
54342013-06-18 Marek Polacek <polacek@redhat.com>
5435
5436 PR c/57630
5437 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5438
73a23b06
BI
54392013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5440
5441 * c-array-notation.c (build_array_notation_expr): Reject array notation
5442 mismatch between LHS and RHS even inside a call_expr. Also, removed
5443 a couple while statements that were dead code.
5444
00b8517d
BI
54452013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5446
5447 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5448 excessive precision expressions in function parameters. Also removed
5449 couple unwanted while statements.
5450
1509bdda
BI
54512013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5452
5453 * c-array-notation.c (expand_array_notation_exprs): Added
5454 ARRAY_NOTATION_REF case.
5455
d60f1706
BI
54562013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5457
5458 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5459 function to c-family/array-notation-common.c.
5460 (is_cilkplus_reduce_builtin): Likewise.
5461 (find_rank): Likewise.
5462 (extract_array_notation_exprs): Likewise.
5463 (replace_array_notations): Likewise.
5464 (find_inv_trees): Likewise.
5465 (replace_inv_trees): Likewise.
5466 (contains_array_notation_expr): Likewise.
5467 (find_correct_array_notation_type): Likewise.
5468 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5469 (struct inv_list): Moved this to c-family/array-notation-common.c.
5470 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5471
6d6efbb3
BI
54722013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5473
5474 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5475 reduction functions outside the for-loop. Added a check if the fundecl
5476 is non-NULL. Finally, removed an unwanted if-statement, and made the
5477 body unconditional.
5478
25c22937
BI
54792013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5480
5481 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5482 condition of the if-statement matches the rank of else-block and then-
5483 block when array notations are used.
5484 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5485 expression after the entire function body is parsed.
5486 (c_parser_expr_no_commas): Delayed creating array notation expressions
5487 to the end of function parsing.
5488 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5489 whole if-statement instead of just the condition.
5490 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5491
edd25645
BI
54922013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5493
5494 PR c/57474
5495 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5496 array to NULL_TREE if they are unused. Also added a check for the
5497 field to be NULL before its fields are used in future.
5498
065ce7f1
RO
54992013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5500
5501 PR bootstrap/57450
5502 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5503 (build_array_notation_expr): Likewise.
5504
36536d79
BI
55052013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5506
5507 * c-typeck.c (build_array_ref): Added a check to see if array's
5508 index is greater than one. If true, then emit an error.
5509 (build_function_call_vec): Exclude error reporting and checking
5510 for builtin array-notation functions.
5511 (convert_arguments): Likewise.
5512 (c_finish_return): Added a check for array notations as a return
5513 expression. If true, then emit an error.
5514 (c_finish_loop): Added a check for array notations in a loop
5515 condition. If true then emit an error.
5516 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5517 (build_binary_op): Added a check for array notation expr inside
5518 op1 and op0. If present, we call another function to find correct
5519 type.
5520 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5521 * c-parser.c (c_parser_compound_statement): Check if array
5522 notation code is used in tree, if so, then transform them into
5523 appropriate C code.
5524 (c_parser_expr_no_commas): Check if array notation is used in LHS
5525 or RHS, if so, then build array notation expression instead of
5526 regular modify.
5527 (c_parser_postfix_expression_after_primary): Added a check for
5528 colon(s) after square braces, if so then handle it like an array
5529 notation. Also, break up array notations in unary op if found.
5530 (c_parser_direct_declarator_inner): Added a check for array
5531 notation.
5532 (c_parser_compound_statement): Added a check for array notation in
5533 a stmt. If one is present, then expand array notation expr.
5534 (c_parser_if_statement): Likewise.
5535 (c_parser_switch_statement): Added a check for array notations in
5536 a switch statement's condition. If true, then output an error.
5537 (c_parser_while_statement): Similarly, but for a while.
5538 (c_parser_do_statement): Similarly, but for a do-while.
5539 (c_parser_for_statement): Similarly, but for a for-loop.
5540 (c_parser_unary_expression): Check if array notation is used in a
5541 pre-increment or pre-decrement expression. If true, then expand
5542 them.
5543 (c_parser_array_notation): New function.
5544 * c-array-notation.c: New file.
5545 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5546
cd192ccc
MS
55472013-05-23 Mike Stump <mikestump@comcast.net>
5548
5549 * c-typeck.c (convert_for_assignment): Handle references to memory
5550 spaces better.
5551
427b248d
JM
55522013-05-16 Jason Merrill <jason@redhat.com>
5553
5554 * Make-lang.in (cc1$(exeext)): Use link mutex.
5555
44d90fe1
PC
55562013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5557
5558 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5559 to simply use OPT_Wpointer_arith.
5560 (build_unary_op): Likewise.
5561
4e7d7b3d
JJ
55622013-04-03 Jakub Jelinek <jakub@redhat.com>
5563
5564 PR c/19449
5565 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5566 argument. If set, or it temporarily for parsing of the first
5567 argument into force_folding_builtin_constant_p.
5568 (c_parser_postfix_expression): Adjust callers.
5569
839b422f
RB
55702013-03-21 Richard Biener <rguenther@suse.de>
5571
5572 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5573 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5574
2ee028f1
MP
55752013-02-12 Marek Polacek <polacek@redhat.com>
5576
5577 PR c/44938
5578 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5579 origtypes to NULL.
5580
8824edff
JJ
55812013-01-24 Jakub Jelinek <jakub@redhat.com>
5582
5583 PR c/56078
5584 * c-typeck.c (set_nonincremental_init_from_string): If
5585 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5586 returned false.
5587 (process_init_element): Likewise.
5588
eadd3d0d
JJ
55892012-12-20 Jakub Jelinek <jakub@redhat.com>
5590
5591 PR c++/55619
5592 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5593 argument, don't call default_function_array_conversion
5594 nor c_fully_fold here.
5595 (c_parser_asm_statement): Adjust callers.
5596 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5597 and outputs here, and call default_function_array_conversion
5598 on inputs that don't need to be addressable.
5599
f8a93a2e
JJ
56002012-12-18 Jakub Jelinek <jakub@redhat.com>
5601
5602 PR c/39464
5603 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5604 warning require that both c_common_unsigned_type as well as
5605 c_common_signed_type is the same for both mvl and mvr types.
5606
9771b263
DN
56072012-11-16 Diego Novillo <dnovillo@google.com>
5608
5609 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5610
5611 * c-common.c: Use new vec API in vec.h.
5612 * c-common.h: Likewise.
5613 * c-gimplify.c: Likewise.
5614 * c-pragma.c: Likewise.
5615 * c-pretty-print.c: Likewise.
5616 * c-pretty-print.h: Likewise.
5617 * c-semantics.c: Likewise.
5618 * c-decl.c: Likewise.
5619 * c-parser.c: Likewise.
5620 * c-tree.h: Likewise.
5621 * c-typeck.c: Likewise.
5622
880661a4
JW
56232012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5624
5625 PR c++/54930
5626 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5627
077d1abe
MLI
56282012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5629
5630 PR c/53066
5631 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5632 shadows a function, unless the variable is a function or a
5633 pointer-to-function.
5634
3a785c97
JJ
56352012-10-12 Jakub Jelinek <jakub@redhat.com>
5636
5637 PR c/54381
5638 * c-parser.c (struct c_tree_loc_pair): Removed.
5639 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5640 add location_t * and tree * arguments, fill in array of 3
5641 sizeof_arg trees and corresponding locs.
5642 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5643 c_parser_expr_list callers.
5644 (c_parser_postfix_expression_after_primary): Likewise. Pass
5645 array of 3 sizeof_arg trees and locs (corresponding to first
5646 3 arguments) to sizeof_pointer_memaccess_warning.
5647
703c8606
LC
56482012-10-09 Lawrence Crowl <crowl@google.com>
5649
5650 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5651 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5652 hash table.
5653
5d9de0d0
PC
56542012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5655
5656 PR c++/54194
5657 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5658 call.
5659
a212e43f
MG
56602012-10-09 Marc Glisse <marc.glisse@inria.fr>
5661
5662 PR c++/54427
5663 * c-typeck.c: Include c-common.h.
5664 (enum stv_conv): Moved to c-common.h.
5665 (scalar_to_vector): Moved to c-common.c.
5666 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5667 * Make-lang.in: c-typeck.c depends on c-common.h.
5668
3b78de56
AC
56692012-10-04 Arnaud Charlet <charlet@adacore.com>
5670
5671 * c-decl.c (c_write_global_declarations): Fix handling of
5672 -fdump-ada-spec*.
5673
78c60e3d
SS
56742012-09-30 Sharad Singhai <singhai@google.com>
5675
5676 * c-decl.c (c_write_global_declarations): Use a different method
5677 to determine if the dump has ben initialized.
5678
9f33203d
JM
56792012-09-14 Joseph Myers <joseph@codesourcery.com>
5680
5681 PR c/54552
5682 * c-typeck.c (c_cast_expr): When casting to a type requiring
5683 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5684 c_fully_fold first.
5685
a27d595d
JM
56862012-09-14 Joseph Myers <joseph@codesourcery.com>
5687
5688 PR c/54103
5689 * c-typeck.c (build_unary_op): Pass original argument of
5690 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5691 any C_MAYBE_CONST_EXPR, if it has integer operands.
5692 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5693 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5694 to c_objc_common_truthvalue_conversion, then remove any
5695 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5696 c_objc_common_truthvalue_conversion not
5697 c_common_truthvalue_conversion.
5698 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5699 call note_integer_operands for arguments with integer operands
5700 that are not integer constants.
5701
9feb29df
JJ
57022012-09-13 Jakub Jelinek <jakub@redhat.com>
5703
5704 PR c/54559
5705 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5706 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5707
d409320c
JJ
57082012-08-31 Jakub Jelinek <jakub@redhat.com>
5709
5710 PR c/54428
5711 * c-convert.c (convert): Don't call fold_convert_loc if
5712 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5713 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5714 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5715
6265d07c
JJ
57162012-08-24 Jakub Jelinek <jakub@redhat.com>
5717
5718 PR c/54355
5719 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5720 for nested and empty_ok arguments in the call to
5721 c_parser_declaration_or_fndef.
5722
1a4049e7
JJ
57232012-08-17 Jakub Jelinek <jakub@redhat.com>
5724
5725 * c-tree.h (c_last_sizeof_arg): Declare.
5726 * c-parser.c (struct c_tree_loc_pair): New type.
5727 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5728 non-NULL.
5729 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5730 (c_parser_postfix_expression_after_primary): Likewise. Call
5731 sizeof_pointer_memaccess_warning if needed.
5732 (sizeof_ptr_memacc_comptypes): New function.
5733 * c-typeck.c (c_last_sizeof_arg): New global variable.
5734 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5735
0229aee9
UB
57362012-07-24 Uros Bizjak <ubizjak@gmail.com>
5737
5738 * c-lang.h (lang_decl): Add variable_size GTY option.
5739
7ee2468b
SB
57402012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5741
5742 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5743 * Make-lang.in: Fix dependencies.
5744
d4a10d0a
SB
57452012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5746
5747 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5748 and add language Makefile hooks.
5749 * config-lang.in: New file.
5750 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5751 add the required "normal" config-lang.in rules.
5752 * c-lang.h: Moved from gcc/ to here.
5753 * c-tree.h: Likewise.
5754 * c-objc-common.c: Likewise.
5755 * c-objc-common.h: Likewise.
5756 * c-typeck.c: Likewise.
5757 * c-convert.c: Likewise.
5758 * c-lang.c: Likewise.
5759 * c-aux-info.c: Likewise.
5760 * c-errors.c: Likewise.
5761 * gccspec.c: Likewise.
5762 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5763 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5764\f
85ec4feb 5765Copyright (C) 2012-2018 Free Software Foundation, Inc.
d4a10d0a
SB
5766
5767Copying and distribution of this file, with or without modification,
5768are permitted in any medium without royalty provided the copyright
5769notice and this notice are preserved.
This page took 2.277553 seconds and 5 git commands to generate.