]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
PR middle-end/81824 - Warn for missing attributes with function aliases
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
3179ebae
JJ
12018-11-09 Jakub Jelinek <jakub@redhat.com>
2
81a227c6
JJ
3 * c-parser.c (c_parser_omp_clause_final): Use
4 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
5 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
6 parsing instead of c_parser_paren_condition.
7 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
8 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
9 c_fully_fold instead of c_parser_condition.
10 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
11 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
12 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
13 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
14 c_parser_expr_no_commas instead of c_parser_expression.
15
98c91c56
JJ
16 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
17 reduction clause with inscan modifier.
18
3179ebae
JJ
19 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
20 clauses other than atomic_default_mem_order.
21
28567c40
JJ
222018-11-08 Jakub Jelinek <jakub@redhat.com>
23
24 * c-parser.c: Include memmode.h.
25 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
26 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
27 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
28 task_reduction clauses.
29 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
30 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
31 section, or lvalue assignment expression.
32 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
33 (c_parser_omp_clause_lastprivate): Parse optional
34 conditional: modifier.
35 (c_parser_omp_clause_hint): Require constant integer expression rather
36 than just integer expression.
37 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
38 clause.
39 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
40 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
41 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
42 functions.
43 (c_parser_omp_clause_depend): Parse iterator modifier and handle
44 iterators. Parse mutexinoutset and depobj kinds.
45 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
46 callers.
47 (c_parser_omp_all_clauses): Likewise. Handle
48 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
49 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
50 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
51 default memory order from requires directive if any. Adjust
52 c_finish_omp_atomic caller.
53 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
54 (c_parser_omp_flush): Parse flush with memory-order-clause.
55 (c_parser_omp_for_loop): Allow NE_EXPR even in
56 OpenMP loops, adjust c_finish_omp_for caller.
57 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
58 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
59 Allow to be called while parsing combined parallel master.
60 Parse combined master taskloop{, simd}.
61 (c_parser_omp_parallel): Parse combined
62 parallel master{, taskloop{, simd}} constructs.
63 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
64 (OMP_TASKGROUP_CLAUSE_MASK): Define.
65 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
66 (OMP_TASKWAIT_CLAUSE_MASK): Define.
67 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
68 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
69 around teams body. Use SET_EXPR_LOCATION.
70 (c_parser_omp_target_data): Allow target data
71 with only use_device_ptr clauses.
72 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
73 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
74 (c_parser_omp_requires): New function.
75 (c_finish_taskloop_clauses): New function.
76 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
77 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
78 declaration. Disallow in_reduction clause when combined with parallel
79 master.
80 (c_parser_omp_construct): Adjust c_parser_omp_master and
81 c_parser_omp_taskgroup callers.
82 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
83 other than cancel.
84 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
85 like OMP_CLAUSE_REDUCTION.
86 (handle_omp_array_sections): Likewise. Call save_expr on array
87 reductions before calling build_index_type. Handle depend clauses
88 with iterators.
89 (struct c_find_omp_var_s): New type.
90 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
91 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
92 with static, runtime or auto schedule kinds. Call save_expr for whole
93 array reduction sizes. Diagnose reductions with zero sized elements
94 or variable length structures. Diagnose nogroup clause used with
95 reduction clause(s). Handle depend clause with
96 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
97 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
98 some different type for other kinds. Use build_unary_op with
99 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
100 Handle depend clauses with iterators. Remove no longer needed special
101 case that predetermined const qualified vars may be specified in
102 firstprivate clause. Complain if const qualified vars are mentioned
103 in data-sharing clauses other than firstprivate or shared. Use
104 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
105 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
106 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
107 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
108
7e2de6df
DM
1092018-10-29 David Malcolm <dmalcolm@redhat.com>
110
111 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
112 logic for change to name_hint::operator bool.
113 (undeclared_variable): Likewise.
114 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
115 (c_parser_parameter_declaration): Likewise.
116
9f936c86
JM
1172018-10-17 Joseph Myers <joseph@codesourcery.com>
118
119 * c-errors.c (pedwarn_c11): New function.
120 * c-parser.c (disable_extension_diagnostics): Save
121 warn_c11_c2x_compat and set it to 0.
122 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
123 (c_parser_static_assert_declaration_no_semi): Handle
124 _Static_assert without string constant.
125 * c-tree.h (pedwarn_c11): New prototype.
126
033eb567
DM
1272018-10-17 David Malcolm <dmalcolm@redhat.com>
128
129 * Make-lang.in (selftest-c): New.
130 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
131 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
132 from gcc/Makefile.in.
133
0edf3afe
RB
1342018-10-02 Richard Biener <rguenther@suse.de>
135
136 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
137
8313a764
JM
1382018-09-26 Joseph Myers <joseph@codesourcery.com>
139
140 PR c/87390
141 * c-typeck.c (build_binary_op): Use excess precision for
142 comparisons of integers and floating-point for C11 and later.
143
ce6f0888
MJ
1442018-09-26 Martin Jambor <mjambor@suse.cz>
145
146 PR c/87347
147 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
148 comment.
149
9c4a4b3c
DM
1502018-09-17 David Malcolm <dmalcolm@redhat.com>
151
152 * c-objc-common.c (range_label_for_type_mismatch::get_text):
153 Update for new param.
154 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
155 Likewise.
156
80c6d1f4
MJ
1572018-09-17 Martin Jambor <mjambor@suse.cz>
158
159 PR c/63886
160 * c-parser.c: (warn_for_abs): New function.
161 (c_parser_postfix_expression_after_primary): Call it.
162
4a426e36
BE
1632018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
164
165 * c-typeck.c (digest_init): Shorten overlength strings.
166
6d900107
BE
1672018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
168
169 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
170
b5764229
BE
1712018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
172
173 * c-decl.c (finish_decl): Call braced_list_to_string here ...
174 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
175
22eea6b2
AM
1762018-08-30 Alexander Monakov <amonakov@ispras.ru>
177
178 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
179 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
180
85204e23
DM
1812018-08-27 David Malcolm <dmalcolm@redhat.com>
182
183 PR 87091
184 * c-decl.c (implicitly_declare): Update call to
185 maybe_add_include_fixit to suggest overriding the location, as it
186 is for a note.
187 * c-objc-common.c (c_tree_printer): Update for conversion of
188 show_caret_p to a tri-state.
189
3d78e008
ML
1902018-08-27 Martin Liska <mliska@suse.cz>
191
192 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
193 fndecl_built_in_p and remove check for FUNCTION_DECL if
194 possible.
3d78e008
ML
195 (diagnose_mismatched_decls): Likewise.
196 (merge_decls): Likewise.
197 (warn_if_shadowing): Likewise.
198 (pushdecl): Likewise.
199 (implicitly_declare): Likewise.
200 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
201 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
202 * c-typeck.c (build_function_call_vec): Likewise.
203 (convert_arguments): Likewise.
204
097f82ec
DM
2052018-08-20 David Malcolm <dmalcolm@redhat.com>
206
207 PR other/84889
208 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
209 (diagnose_mismatched_decls): Likewise, in various places.
210 (warn_if_shadowing): Likewise.
211 (implicit_decl_warning): Likewise.
212 (implicitly_declare): Likewise.
213 (undeclared_variable): Likewise.
214 (declare_label): Likewise.
215 (grokdeclarator): Likewise.
216 (start_function): Likewise.
217 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
218 (c_parser_parameter_declaration): Likewise.
219 (c_parser_binary_expression): Likewise.
220 * c-typeck.c (c_expr_sizeof_expr): Likewise.
221 (parser_build_binary_op): Likewise.
222 (build_unary_op): Likewise.
223 (error_init): Likewise.
224 (pedwarn_init): Likewise.
225 (warning_init): Likewise.
226 (convert_for_assignment): Likewise.
227
96e6ae57
DM
2282018-08-15 David Malcolm <dmalcolm@redhat.com>
229
230 * c-objc-common.c: Include "gcc-rich-location.h".
231 (c_tree_printer): Move implemenation of '%T' to...
232 (print_type): ...this new function.
233 (range_label_for_type_mismatch::get_text): New function.
234 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
235 range for the various ic_argpass cases.
236 (class maybe_range_label_for_tree_type_mismatch): New class.
237 (build_binary_op): Use it when calling binary_op_error.
238
0cd020ae
PK
2392018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
240
241 * c-decl.c (start_decl): Do not warn if variables is named as main
242 and is a local variable.
243
72733314
IS
2442018-08-15 Iain Sandoe <iain@sandoe.co.uk>
245
246 PR c/19315
247 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
248 objects of unknown size.
249
23aa9f7c
MS
2502018-08-13 Martin Sebor <msebor@redhat.com>
251
252 PR tree-optimization/71625
253 * c-parser.c (c_parser_declaration_or_fndef): Call
254 braced_list_to_string.
255
e5e7e50d
BH
2562018-08-03 Bogdan Harjoc <harjoc@gmail.com>
257
258 PR c/86690
259 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
260 errors.
261
8a45b051
MS
2622018-08-01 Martin Sebor <msebor@redhat.com>
263
264 PR tree-optimization/86650
265 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
266 and TREE_BLOCK (t) from within percent_K_format to this callsite.
267
5922dcb5
JJ
2682018-08-01 Jakub Jelinek <jakub@redhat.com>
269
270 PR c/85704
271 * c-typeck.c (init_field_decl_cmp): New function.
272 (output_pending_init_elements): Use it for field comparisons
273 instead of pure bit_position comparisons.
274
9b452033
JJ
2752018-07-12 Jakub Jelinek <jakub@redhat.com>
276
277 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
278 type here, instead add "omp declare target implicit" attribute.
279 (finish_decl): Diagnose vars without mappable type here.
280
829c6349
CLT
2812018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
282 Thomas Schwinge <thomas@codesourcery.com>
283 Cesar Philippidis <cesar@codesourcery.com>
284
285 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
286 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
287 to their non-present_or_* counterparts. Make 'self' an alias to
288 PRAGMA_OACC_CLAUSE_HOST.
289 (c_parser_oacc_data_clause): Update GOMP mappings for
290 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
291 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
292 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
293 Remove support for present_or_* clauses.
294 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
295 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
296 (OACC_DECLARE_CLAUSE_MASK): Likewise.
297 (OACC_DATA_CLAUSE_MASK): Likewise.
298 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
299 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
300 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
301 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
302 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
303
e197e64e
KV
3042018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
305
306 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
307 * gimple-parser.c (c_parser_gimple_statement): Likewise.
308 (c_parser_gimple_unary_expression): Likewise.
309
487f2f61
JJ
3102018-06-15 Jakub Jelinek <jakub@redhat.com>
311
312 PR c/86093
313 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
314 before doing POINTER_DIFF_EXPR.
315
e4d44a37
MP
3162018-06-07 Marek Polacek <polacek@redhat.com>
317
318 PR c/85318
319 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
320 for loop initial declarations.
321
b67b9225
DP
3222018-05-30 David Pagan <dave.pagan@oracle.com>
323
324 PR c/55976
325 * c-decl.c (grokdeclarator): Update check for return type warnings.
326 (start_function): Likewise.
327 (finish_function): Likewise.
328 * c-typeck.c (c_finish_return): Update check for return type warnings.
329 Pass OPT_Wreturn_type to pedwarn when appropriate.
330
c566cc9f
RS
3312018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
332
333 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
334 __FMA_EXPR handlng.
335
e4f81565
RS
3362018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
337
338 * gimple-parser.c: Include internal-fn.h.
339 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
340 (c_parser_gimple_call_internal): New function.
341 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
342 Fix typos in comment.
343
79e7b1fe
JJ
3442018-05-10 Jakub Jelinek <jakub@redhat.com>
345
346 PR c++/85662
347 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
348 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
349 fold_convert_loc.
350 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
351 fold_offsetof_1, pass argtype as TYPE to it and drop the
352 fold_convert_loc.
353
f7584c81
DP
3542018-05-02 David Pagan <dave.pagan@oracle.com>
355
356 PR c/30552
357 * c-decl.c (old_style_parameter_scope): New function.
358 * c-parser.c (c_parser_postfix_expression): Check for statement
359 expressions in old-style function parameter list declarations.
360 * c-parser.h (old_style_parameter_scope): New extern declaration.
361
b33a0cb3
JJ
3622018-04-25 Jakub Jelinek <jakub@redhat.com>
363
364 PR sanitizer/84307
365 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
366 it is not TREE_STATIC.
367 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
368 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
369 its COMPOUND_LITERAL_EXPR_DECL.
370
c5c5822a
JM
3712018-03-21 Joseph Myers <joseph@codesourcery.com>
372
373 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
374 where all functions return the same _FloatN or _FloatNx type,
375 treat integer types as _Float64 instead of double.
376
aa1c9429
JJ
3772018-03-21 Jakub Jelinek <jakub@redhat.com>
378
379 PR c/84999
380 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
381 building vector comparison, diagnose it and return error_mark_node.
382
9bb45a95
JJ
3832018-03-15 Jakub Jelinek <jakub@redhat.com>
384
385 PR c/84853
386 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
387 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
388 INTEGER_TYPE element type.
389
ada6bad9
DP
3902018-03-13 David Pagan <dave.pagan@oracle.com>
391
392 PR c/46921
393 * c-typeck.c (output_init_element): Ensure field initializer
394 expression is always evaluated if there are side effects.
395
849bbdb9
JJ
3962018-03-06 Jakub Jelinek <jakub@redhat.com>
397
398 PR c/84721
399 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
400 !building_stmt_list_p ().
401
d74641bd
RS
4022018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
403
404 PR c/84305
405 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
406 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
407 and include the BIND_EXPR in the list of things that need to be
408 pre-evaluated.
409
0444aa9c
NS
4102018-02-09 Nathan Sidwell <nathan@acm.org>
411
412 PR c/84293
413 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
414 to strict_aliasing_warning.
415
7c30b12a
PC
4162018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
417
418 * c-typeck.c (really_start_incremental_init, push_init_level,
419 set_nonincremental_init, output_init_element, process_init_element):
420 Use DECL_UNNAMED_BIT_FIELD.
421
2be4dfcb
MP
4222018-01-31 Marek Polacek <polacek@redhat.com>
423
424 PR c/81779
425 * c-parser.c (c_parser_compound_statement_nostart): Call
426 expansion_point_location_if_in_system_header.
427
bb9869d5
DM
4282018-01-17 David Malcolm <dmalcolm@redhat.com>
429
430 PR c++/83814
431 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
432 the C part.
433
b4923738
JJ
4342018-01-13 Jakub Jelinek <jakub@redhat.com>
435
436 PR c/83801
437 * c-tree.h (decl_constant_value_1): Add a bool argument.
438 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
439 returning a CONSTRUCTOR if it is true. Use error_operand_p.
440 (decl_constant_value): Adjust caller.
441 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
442 decl_constant_value_1 as IN_INIT. Otherwise, punt if
443 decl_constant_value returns initializer that has BLKmode or
444 array type.
445 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
446
928686b1
RS
4472018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
448 Alan Hayward <alan.hayward@arm.com>
449 David Sherwood <david.sherwood@arm.com>
450
451 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
452 TYPE_VECTOR_SUBPARTS.
453
85ec4feb
JJ
4542018-01-03 Jakub Jelinek <jakub@redhat.com>
455
456 Update copyright years.
457
913884f7
JJ
4582018-01-01 Jakub Jelinek <jakub@redhat.com>
459
460 PR c/83595
461 * c-parser.c (c_parser_braced_init, c_parser_initelt,
462 c_parser_conditional_expression, c_parser_cast_expression,
463 c_parser_sizeof_expression, c_parser_alignof_expression,
464 c_parser_postfix_expression, c_parser_omp_declare_reduction,
465 c_parser_transaction_expression): Use set_error () method instead
466 of setting value member to error_mark_node.
467
c6cfa2bf
MM
4682017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
469
470 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
471 and _Float<N>X built-in functions.
472
11d29d63
JJ
4732017-12-22 Jakub Jelinek <jakub@redhat.com>
474
14ec014e
JJ
475 PR debug/83550
476 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
477 TYPE_STUB_DECL and call rest_of_type_compilation before processing
478 incomplete vars rather than after it.
479
11d29d63
JJ
480 PR debug/83547
481 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
482 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
483 and consider empty ones if there are no other stmts. For
484 -Wunused-value walk all statements before the one only followed by
485 DEBUG_BEGIN_STMTs.
486
170a8bd6 4872017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 488 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
489
490 * c-parser.c (c_parser_while_statement): Add unroll parameter and
491 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
492 (c_parser_do_statement): Likewise.
493 (c_parser_for_statement): Likewise.
494 (c_parser_statement_after_labels): Adjust calls to above.
495 (c_parse_pragma_ivdep): New static function.
496 (c_parser_pragma_unroll): Likewise.
497 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
498 <PRAGMA_UNROLL>: New case.
499
01512446
JJ
5002017-12-19 Jakub Jelinek <jakub@redhat.com>
501
502 * c-typeck.c (comptypes_internal, function_types_compatible_p,
503 perform_integral_promotions, digest_init): Replace Yoda conditions
504 with typical order conditions.
505 * c-decl.c (check_bitfield_type_and_width): Likewise.
506
c65e18d3
BE
5072017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
508
509 * c-typeck.c (c_safe_arg_type_equiv_p,
510 c_safe_function_type_cast_p): New function.
511 (build_c_cast): Implement -Wcast-function-type.
512
b7280579
RB
5132017-12-14 Richard Biener <rguenther@suse.de>
514
515 PR c/83415
516 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
517 like REALPART_EXPR for the behavior of whether its operand
518 is an lvalue.
519
49e6a6c0
MP
5202017-12-12 Marek Polacek <polacek@redhat.com>
521
522 PR c/82679
523 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
524
96a95ac1
AO
5252017-12-12 Alexandre Oliva <aoliva@redhat.com>
526
527 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
528 * c-parser.c (add_debug_begin_stmt): New.
529 (c_parser_declaration_or_fndef): Call it.
530 (c_parser_compound_statement_nostart): Likewise.
531 (c_parser_statement_after_labels): Likewise.
532 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
533
4b2b493f
JM
5342017-12-07 Joseph Myers <joseph@codesourcery.com>
535
536 * c-decl.c (build_compound_literal): Add parameter alignas_align
537 and set alignment of decl if nonzero.
538 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
539 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
540 qualifier.
541 (c_parser_struct_declaration): Update syntax comment.
542 (c_parser_type_name): Add alignas_ok argument and pass it to
543 c_parser_declspecs.
544 (c_parser_cast_expression): Pass true to c_parser_type_name and
545 give error if a cast used an _Alignas specifier.
546 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
547 give error if sizeof (type-name) used an _Alignas specifier.
548 (c_parser_alignof_expression): Pass true to c_parser_type_name and
549 give error if _Alignof (type-name) used an _Alignas specifier.
550 (c_parser_postfix_expression_after_paren_type): Check specified
551 alignment for a compound literal and pass it to
552 build_compound_literal.
553 * c-parser.h (c_parser_type_name): Update prototype.
554 * c-tree.h (build_compound_literal): Update prototype.
555
5d9ae53d
MS
5562017-12-07 Martin Sebor <msebor@redhat.com>
557
558 PR c/81544
559 * c-decl.c (c_decl_attributes): Look up existing declaration and
560 pass it to decl_attributes.
561
c79144f8
DM
5622017-12-06 David Malcolm <dmalcolm@redhat.com>
563
564 PR c/83236
565 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
566 reserved for use by the implementation.
567
613bc14f
DM
5682017-12-06 David Malcolm <dmalcolm@redhat.com>
569
570 * c-decl.c: Include "c-family/c-spellcheck.h".
571
05abad4c
ML
5722017-12-05 Martin Liska <mliska@suse.cz>
573 Jakub Jelinek <jakub@redhat.com>
574
575 * c-typeck.c (pointer_diff): Add new argument and instrument
576 pointer subtraction.
577 (build_binary_op): Similar for pointer comparison.
578
cc6534d4
JJ
5792017-12-01 Jakub Jelinek <jakub@redhat.com>
580
65791f42
JJ
581 PR c/79153
582 * c-parser.c: Include tree-iterator.h.
583 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
584 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
585 on it.
586
cc6534d4
JJ
587 PR c/83222
588 * c-tree.h (decl_constant_value_1): Declare.
589 * c-typeck.c (decl_constant_value_1): New function.
590 (decl_constant_value): Use it.
591 * c-fold.c (c_fully_fold_internal): If in_init, use
592 decl_constant_value_1 instead of decl_constant_value.
593
5de73c05
JJ
5942017-11-30 Jakub Jelinek <jakub@redhat.com>
595
596 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
597
058f0b9e
JJ
5982017-11-28 Jakub Jelinek <jakub@redhat.com>
599
600 PR sanitizer/81275
601 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
602 c_switch_covers_all_cases_p returns true.
603
5e9d6aa4 6042017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 605 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
606
607 * Make-lang.in (c/c-array-notation.o): Remove.
608 * c-array-notation.c: Delete.
609 * c-decl.c: Remove cilkplus condition.
610 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
611 c_parser_cilk_verify_simd, c_parser_array_notation,
612 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
613 c_parser_cilk_simd_fn_vector_attrs,
614 c_finish_cilk_simd_fn_tokens): Delete.
615 (c_parser_declaration_or_fndef): Remove cilkplus condition.
616 (c_parser_direct_declarator_inner): Ditto.
617 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
618 (c_parser_attributes, c_parser_compound_statement,
619 c_parser_statement_after_labels, c_parser_if_statement,
620 c_parser_switch_statement, c_parser_while_statement,
621 c_parser_do_statement, c_parser_for_statement,
622 c_parser_unary_expression, c_parser_postfix_expression,
623 c_parser_postfix_expression_after_primary,
624 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
625 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
626 support.
627 * c-typeck.c (build_array_ref, build_function_call_vec,
628 convert_arguments,
629 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
630 c_finish_loop, build_binary_op): Remove cilkplus support.
631
9e851845
JJ
6322017-11-28 Jakub Jelinek <jakub@redhat.com>
633
634 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
635 of build3.
636
8c7dbea9
BK
6372017-11-14 Boris Kolpackov <boris@codesynthesis.com>
638
639 * Make-lang.in (c.install-plugin): Install backend import library.
640
41521dee
JJ
6412017-11-23 Jakub Jelinek <jakub@redhat.com>
642
643 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
644 pragma_stmt context.
645
ac9effed
EB
6462017-11-23 Mike Stump <mikestump@comcast.net>
647 Eric Botcazou <ebotcazou@adacore.com>
648
649 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
650 ANNOTATE_EXPR.
651 (c_parser_do_statement): Likewise.
652 (c_parser_for_statement): Likewise.
653
ce95abc4
DM
6542017-11-22 David Malcolm <dmalcolm@redhat.com>
655
656 PR c++/62170
657 * c-objc-common.c (c_tree_printer): Convert penultimate param from
658 bool to bool *. Within '%T' handling, if showing an "aka", use
659 "quoted" param to add appropriate quoting.
660
974aedcc
MP
6612017-11-22 Marek Polacek <polacek@redhat.com>
662
663 PR c++/60336
664 PR middle-end/67239
665 PR target/68355
666 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
667
d4300cc6
DM
6682017-11-21 David Malcolm <dmalcolm@redhat.com>
669
670 PR c/83056
671 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
672 earlier failed lookups.
673
1af4ebf5
MG
6742017-11-21 Marc Glisse <marc.glisse@inria.fr>
675
676 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
677 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
678
26edace6
DM
6792017-11-20 David Malcolm <dmalcolm@redhat.com>
680
681 PR c/81404
682 * c-decl.c: Include "c-family/known-headers.h".
683 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
684 to known-headers.cc.
685 (class suggest_missing_header): Move to known-header.h.
686 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
687 than get_c_name_hint.
688
b1212255
DM
6892017-11-20 David Malcolm <dmalcolm@redhat.com>
690
691 * c-decl.c (get_c_name_hint): New function.
692 (class suggest_missing_header): New class.
693 (lookup_name_fuzzy): Call get_c_name_hint and use it to
694 suggest missing headers to the user.
695
6c7a259b
DM
6962017-11-20 David Malcolm <dmalcolm@redhat.com>
697
698 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
699 Include "c-family/name-hint.h"
700 (implicit_decl_warning): Convert "hint" from
701 const char * to name_hint. Pass location to
702 lookup_name_fuzzy. Suppress any deferred diagnostic if the
703 warning was not printed.
704 (undeclared_variable): Likewise for "guessed_id".
705 (lookup_name_fuzzy): Convert return type from const char *
706 to name_hint. Add location_t param.
707 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
708 Include "c-family/name-hint.h"
709 (c_parser_declaration_or_fndef): Convert "hint" from
710 const char * to name_hint. Pass location to lookup_name_fuzzy.
711 (c_parser_parameter_declaration): Likewise.
712
f9c59f7e
JJ
7132017-11-19 Jakub Jelinek <jakub@redhat.com>
714
715 PR c/66618
716 PR c/69960
717 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
718 where needed.
719 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
720 handle_omp_array_sections): Likewise.
721 (digest_init): Don't call decl_constant_value_for_optimization.
722 * c-tree.h (decl_constant_value_for_optimization): Removed.
723 * c-fold.c (c_fold_array_ref): New function.
724 (c_fully_fold_internal): Add LVAL argument, propagate it through
725 recursive calls. For VAR_P call decl_constant_value and
726 unshare if not LVAL and either optimizing or IN_INIT. Remove
727 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
728 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
729 (c_fully_fold): Add LVAL argument, pass it through to
730 c_fully_fold_internal.
731 (decl_constant_value_for_optimization): Removed.
732
3ca0dc60
JM
7332017-11-15 Joseph Myers <joseph@codesourcery.com>
734
735 PR c/81156
736 * c-parser.c (check_tgmath_function): New function.
737 (enum tgmath_parm_kind): New enum.
738 (c_parser_postfix_expression): Handle __builtin_tgmath.
739
64a5912c
DM
7402017-10-31 David Malcolm <dmalcolm@redhat.com>
741
742 * c-decl.c (implicit_decl_warning): Update for renaming of
743 pedwarn_at_rich_loc and warning_at_rich_loc.
744 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
745 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
746 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
747 (c_parser_struct_or_union_specifier): Likewise for renaming of
748 pedwarn_at_rich_loc.
749 (c_parser_parameter_declaration): Likewise for renaming of
750 error_at_rich_loc.
751 * c-typeck.c (build_component_ref): Likewise.
752 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
753 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
754 (set_init_label): Likewise for renaming of error_at_rich_loc.
755
c1136864
RB
7562017-10-30 Richard Biener <rguenther@suse.de>
757
758 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
759 stmts.
760
ee5fd23a
MM
7612017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
762
763 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
764 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
765
1a59ccf2
DM
7662017-10-25 David Malcolm <dmalcolm@redhat.com>
767
768 PR c/7356
769 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
770 semicolons.
771
bc1a75dd
JJ
7722017-10-25 Jakub Jelinek <jakub@redhat.com>
773
774 PR libstdc++/81706
775 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
776 newdecl to corresponding __builtin_ if any.
777
ff1ff960
PC
7782017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
779
780 PR c++/82466
781 * c-decl.c (diagnose_mismatched_decls): Use
782 OPT_Wbuiltin_declaration_mismatch.
783
62e1c678
DM
7842017-10-12 David Malcolm <dmalcolm@redhat.com>
785
786 * c-parser.c (c_parser_require): Add "type_is_unique" param and
787 use it to guard calls to maybe_suggest_missing_token_insertion.
788 (c_parser_parms_list_declarator): Override default value of new
789 "type_is_unique" param to c_parser_require.
790 (c_parser_asm_statement): Likewise.
791 * c-parser.h (c_parser_require): Add "type_is_unique" param,
792 defaulting to true.
793
a92f6726
NS
7942017-10-11 Nathan Sidwell <nathan@acm.org>
795
796 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
797
8e6cdc90
RS
7982017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
799
800 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
801 operating on trees as wide_ints.
802 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
803 (c_tree_equal): Likewise.
804
8139a48e
DM
8052017-10-04 David Malcolm <dmalcolm@redhat.com>
806
807 * c-decl.c (push_parm_decl): Store c_parm's location into the
808 PARAM_DECL.
809 (build_c_parm): Add "loc" param and store it within the c_parm.
810 * c-parser.c (struct c_parser): Add "last_token_location" field.
811 (c_parser_consume_token): Store location of the token into the
812 new field.
813 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
814 when handling a FUNCTION_DECL, if it doesn't already have them.
815 (c_parser_parameter_declaration): Generate a location for the
816 parameter, and pass it to the call to build_c_parm.
817 * c-tree.h (struct c_parm): Add field "loc".
818 (build_c_parm): Add location_t param.
819 * c-typeck.c (get_fndecl_argument_location): New function.
820 (inform_for_arg): New function.
821 (convert_for_assignment): Use inform_for_arg when dealing with
822 ic_argpass.
823
2a389958
JJ
8242017-09-29 Jakub Jelinek <jakub@redhat.com>
825
7d386d45
JJ
826 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
827 width is non-NULL.
828 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
829 don't SET_DECL_C_BIT_FIELD here.
830
2a389958
JJ
831 PR c/82340
832 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
833 instead of trying to set just TREE_READONLY manually.
834
ebc6a85e
TV
8352017-09-16 Tom de Vries <tom@codesourcery.com>
836
837 PR c/81875
838 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
839 cond itself.
840
bb75facd
JM
8412017-09-15 Joseph Myers <joseph@codesourcery.com>
842
843 PR c/82071
844 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
845 for C11.
846 (build_conditional_expr): For C11, generate result with excess
847 precision when one argument is an integer and the other is of a
848 type using excess precision.
849
1d933576
BE
8502017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
851
852 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
853
267bbb6f
MP
8542017-09-13 Marek Polacek <polacek@redhat.com>
855
856 PR c/82167
857 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
858 than expr.original_type.
859
6836632e
NS
8602017-09-12 Nathan Sidwell <nathan@acm.org>
861
862 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
863 resort_sorted_fields): Moved from c-family/c-common.c.
864 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
865
e035be33
JM
8662017-09-01 Joseph Myers <joseph@codesourcery.com>
867
868 PR c/82071
869 * c-typeck.c (build_atomic_assign): Handle argument with excess
870 precision. Ensure any EXCESS_PRECISION_EXPR is present in
871 argument passed to build_binary_op and convert_for_assignment but
872 not for call to c_fully_fold.
873 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
874 Ensure build_binary_op is called with argument with original
875 semantic type. Avoid calling c_fully_fold with an
876 EXCESS_PRECISION_EXPR from build_binary_op.
877
d2e05fcb
JJ
8782017-09-01 Jakub Jelinek <jakub@redhat.com>
879
880 PR c/81887
881 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
882
b397965c
RS
8832017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
884 Alan Hayward <alan.hayward@arm.com>
885 David Sherwood <david.sherwood@arm.com>
886
887 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
888 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
889 m1 and m2 to the signed equivalent of a fixed-point
890 SCALAR_TYPE_MODE.
891
14e18d71
DM
8922017-08-24 David Malcolm <dmalcolm@redhat.com>
893
894 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
895 than CAN_HAVE_LOCATION_P when determining whether to use the
896 location_t value within "value".
897
7f204c0f
DM
8982017-08-21 David Malcolm <dmalcolm@redhat.com>
899
900 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
901 rather than peeking the location of the first token.
902 * c-tree.h (c_expr::get_location): New method.
903
2f687306
DM
9042017-08-21 David Malcolm <dmalcolm@redhat.com>
905
906 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
907 to check_function_arguments.
908
3e7b80d7
MP
9092017-08-18 Marek Polacek <polacek@redhat.com>
910
911 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
912 commentary.
913
00aa1fa2
L
9142017-08-18 H.J. Lu <hongjiu.lu@intel.com>
915
916 PR c/53037
917 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
918 (check_bitfield_type_and_width): Don't allow bit-field with
919 warn_if_not_aligned type.
920
da67acb9
MS
9212017-08-14 Martin Sebor <msebor@redhat.com>
922
923 PR c/81117
924 * c-objc-common.c (c_objc_common_init): Handle 'G'.
925
bb85aa74
MP
9262017-08-11 Marek Polacek <polacek@redhat.com>
927
928 PR c/81795
929 * c-decl.c (pushtag): Only print inform if the warning was printed.
930 (grokdeclarator): Likewise.
931
32129a17
DM
9322017-08-10 David Malcolm <dmalcolm@redhat.com>
933
934 * c-parser.c (c_parser_error): Rename to...
935 (c_parser_error_richloc): ...this, making static, and adding
936 "richloc" parameter, passing it to the c_parse_error call,
937 rather than calling c_parser_set_source_position_from_token.
938 (c_parser_error): Reintroduce, reimplementing in terms of the
939 above, converting return type from void to bool.
940 (class token_pair): New class.
941 (struct matching_paren_traits): New struct.
942 (matching_parens): New typedef.
943 (struct matching_brace_traits): New struct.
944 (matching_braces): New typedef.
945 (get_matching_symbol): New function.
946 (c_parser_require): Add param MATCHING_LOCATION, using it to
947 highlight matching "opening" tokens for missing "closing" tokens.
948 (c_parser_skip_until_found): Likewise.
949 (c_parser_static_assert_declaration_no_semi): Convert explicit
950 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
951 class matching_parens, so that the pertinent open parenthesis is
952 highlighted when there are problems locating the close
953 parenthesis.
954 (c_parser_struct_or_union_specifier): Likewise.
955 (c_parser_typeof_specifier): Likewise.
956 (c_parser_alignas_specifier): Likewise.
957 (c_parser_simple_asm_expr): Likewise.
958 (c_parser_braced_init): Likewise, for matching_braces.
959 (c_parser_paren_condition): Likewise, for matching_parens.
960 (c_parser_switch_statement): Likewise.
961 (c_parser_for_statement): Likewise.
962 (c_parser_asm_statement): Likewise.
963 (c_parser_asm_operands): Likewise.
964 (c_parser_cast_expression): Likewise.
965 (c_parser_sizeof_expression): Likewise.
966 (c_parser_alignof_expression): Likewise.
967 (c_parser_generic_selection): Likewise.
968 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
969 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
970 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
971 In case CPP_OPEN_PAREN, pass loc_open_paren to the
972 c_parser_skip_until_found call.
973 (c_parser_objc_class_definition): Use class matching_parens as
974 above.
975 (c_parser_objc_method_decl): Likewise.
976 (c_parser_objc_try_catch_finally_statement): Likewise.
977 (c_parser_objc_synchronized_statement): Likewise.
978 (c_parser_objc_at_property_declaration): Likewise.
979 (c_parser_oacc_wait_list): Likewise.
980 (c_parser_omp_var_list_parens): Likewise.
981 (c_parser_omp_clause_collapse): Likewise.
982 (c_parser_omp_clause_default): Likewise.
983 (c_parser_omp_clause_if): Likewise.
984 (c_parser_omp_clause_num_threads): Likewise.
985 (c_parser_omp_clause_num_tasks): Likewise.
986 (c_parser_omp_clause_grainsize): Likewise.
987 (c_parser_omp_clause_priority): Likewise.
988 (c_parser_omp_clause_hint): Likewise.
989 (c_parser_omp_clause_defaultmap): Likewise.
990 (c_parser_oacc_single_int_clause): Likewise.
991 (c_parser_omp_clause_ordered): Likewise.
992 (c_parser_omp_clause_reduction): Likewise.
993 (c_parser_omp_clause_schedule): Likewise.
994 (c_parser_omp_clause_num_teams): Likewise.
995 (c_parser_omp_clause_thread_limit): Likewise.
996 (c_parser_omp_clause_aligned): Likewise.
997 (c_parser_omp_clause_linear): Likewise.
998 (c_parser_omp_clause_safelen): Likewise.
999 (c_parser_omp_clause_simdlen): Likewise.
1000 (c_parser_omp_clause_depend): Likewise.
1001 (c_parser_omp_clause_map): Likewise.
1002 (c_parser_omp_clause_device): Likewise.
1003 (c_parser_omp_clause_dist_schedule): Likewise.
1004 (c_parser_omp_clause_proc_bind): Likewise.
1005 (c_parser_omp_clause_uniform): Likewise.
1006 (c_parser_omp_for_loop): Likewise.
1007 (c_parser_cilk_clause_vectorlength): Likewise.
1008 (c_parser_cilk_clause_linear): Likewise.
1009 (c_parser_transaction_expression): Likewise.
1010 * c-parser.h (c_parser_require): Add param matching_location with
1011 default UNKNOWN_LOCATION.
1012 (c_parser_error): Convert return type from void to bool.
1013 (c_parser_skip_until_found): Add param matching_location with
1014 default UNKNOWN_LOCATION.
1015
30af3a2b
MP
10162017-08-09 Marek Polacek <polacek@redhat.com>
1017
1018 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1019 * c-tree.h (build_external_ref): Update declaration.
1020 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1021 (build_external_ref): Change the type of a parameter to bool.
1022 (parser_build_binary_op): Use true/false instead of 1/0.
1023 (pointer_diff): Likewise.
1024 (build_modify_expr): Likewise.
1025 (set_designator): Change the type of a parameter to bool.
1026 (set_init_index): Use true/false instead of 1/0.
1027 (set_init_label): Likewise.
1028 (output_init_element): Change the type of a parameter to bool.
1029 (output_pending_init_elements): Use true/false instead of 1/0.
1030 (process_init_element): Likewise.
1031 (build_binary_op): Change the type of a parameter to bool.
1032
296c53ac
MP
10332017-08-09 Marek Polacek <polacek@redhat.com>
1034
1035 PR c/81233
1036 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1037 Call emit_diagnostic_valist instead of pedwarn.
1038 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1039 Print the relevant types in diagnostics.
1040
a32c8316
MP
10412017-08-09 Marek Polacek <polacek@redhat.com>
1042
1043 PR c/81417
1044 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1045 build_conditional_expr.
1046 * c-parser.c (c_parser_conditional_expression): Create locations for
1047 EXP1 and EXP2 from their source ranges. Pass the locations down to
1048 build_conditional_expr.
1049 * c-tree.h (build_conditional_expr): Update declaration.
1050 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1051 For -Wsign-compare, also print the types.
1052
314e6352
ML
10532017-08-08 Martin Liska <mliska@suse.cz>
1054
1055 * c-convert.c: Include header files.
1056 * c-typeck.c: Likewise.
1057
577eec56
ML
10582017-08-07 Martin Liska <mliska@suse.cz>
1059
1060 * c-parser.c (c_parser_attributes): Canonicalize name of an
1061 attribute.
1062
f7b6353a
MP
10632017-08-02 Marek Polacek <polacek@redhat.com>
1064
1065 PR c/81289
1066 * c-parser.c (c_parser_unary_expression): Use set_error.
1067
8a6eab34
MP
1068 PR c/81448
1069 PR c/81306
1070 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1071 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1072
7fef86d3
JH
10732017-07-31 Jan Hubicka <hubicka@ucw.cz>
1074 Martin Liska <mliska@suse.cz>
1075
1076 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1077 statement.
7fef86d3 1078
f34ebeb2
ML
10792017-07-31 Martin Liska <mliska@suse.cz>
1080
1081 PR sanitize/81530
1082 * c-convert.c (convert): Guard condition with flag_sanitize_p
1083 also with current_function_decl non-null equality.
1084 * c-decl.c (grokdeclarator): Likewise.
1085 * c-typeck.c (build_binary_op): Likewise.
1086
8595f67b
MP
10872017-07-25 Marek Polacek <polacek@redhat.com>
1088
1089 * c-decl.c (grokfield): Remove local variable.
1090
d49718d6
MP
10912017-07-25 Marek Polacek <polacek@redhat.com>
1092
1093 PR c/81364
1094 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1095 macro expansion if the body is in { }.
1096 (c_parser_while_statement): Likewise.
1097 (c_parser_for_statement): Likewise.
1098
ff22eb12
NS
10992017-07-18 Nathan Sidwell <nathan@acm.org>
1100
1101 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1102
eea77d1f
DM
11032017-07-14 David Malcolm <dmalcolm@redhat.com>
1104
1105 * c-decl.c (implicitly_declare): When suggesting a missing
1106 #include, provide a fix-it hint.
1107
b6f43128
DM
11082017-07-06 David Malcolm <dmalcolm@redhat.com>
1109
1110 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1111 and call that instead.
1112 * c-tree.h (selftest::run_c_tests): New decl.
1113
3e2becc4
MP
11142017-06-26 Marek Polacek <polacek@redhat.com>
1115
1116 PR c/80116
1117 * c-parser.c (c_parser_if_body): Set the location of the
1118 body of the conditional after parsing all the labels. Call
1119 warn_for_multistatement_macros.
1120 (c_parser_else_body): Likewise.
1121 (c_parser_switch_statement): Likewise.
1122 (c_parser_while_statement): Likewise.
1123 (c_parser_for_statement): Likewise.
1124 (c_parser_statement): Add a default argument. Save the location
1125 after labels have been parsed.
1126 (c_parser_c99_block_statement): Likewise.
1127
343ae898
RB
11282017-06-19 Richard Biener <rguenther@suse.de>
1129
1130 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1131 negated _Literals to parse _Literal (int) -1.
1132
45b2222a
ML
11332017-06-13 Martin Liska <mliska@suse.cz>
1134
1135 PR sanitize/78204
1136 * c-convert.c (convert): Use sanitize_flags_p.
1137 * c-decl.c (grokdeclarator): Likewise.
1138 * c-typeck.c (convert_for_assignment): Likewise.
1139 (c_finish_return): Likewise.
1140 (build_binary_op): Likewise.
1141
8ab7005b
JJ
11422017-06-08 Jakub Jelinek <jakub@redhat.com>
1143
1144 PR c/81006
1145 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1146 to sizetype before size_binop.
1147
363dc72c
JJ
11482017-06-07 Jakub Jelinek <jakub@redhat.com>
1149
1150 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1151 of TDI_generic.
1152
dc949728
MP
11532017-06-06 Marek Polacek <polacek@redhat.com>
1154
1155 PR c/79983
1156 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1157 ref.
1158 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1159
40ffd95f
BE
11602017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1161
1162 * c-parser.c (c_parser_binary_expression): Implement the
1163 -Wsizeof_pointer_div warning.
1164 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1165 from a parenthesized expression.
1166 (c_parser_expr_list): Use c_last_sizeof_loc.
1167 * c-tree.h (c_last_sizeof_loc): New external.
1168 * c-typeck.c (c_last_sizeof_loc): New variable.
1169 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1170
9fc5e7a4
MM
11712017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1172
1173 PR testsuite/80580
1174 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1175
f012c8ef
DM
11762017-05-30 David Malcolm <dmalcolm@redhat.com>
1177
1178 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1179 parameters.
1180
3cd211af
MS
11812017-05-24 Martin Sebor <msebor@redhat.com>
1182
1183 PR c/80731
1184 * c-fold.c (c_fully_fold_internal): Adjust.
1185 * c-typeck.c (parser_build_unary_op): Adjust.
1186
fd71a9a2
TS
11872017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1188
1189 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1190 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1191 "VECTOR_LENGTH".
1192
92fa0f9e
MP
11932017-05-23 Marek Polacek <polacek@redhat.com>
1194
1195 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1196 quotes.
1197
d11c168a
JJ
11982017-05-22 Jakub Jelinek <jakub@redhat.com>
1199
1200 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1201 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1202 it returned invariant. Call tree_invariant_p unconditionally
1203 afterwards to decide whether to return expr or op0.
1204
58aca9d9
NS
12052017-05-22 Nathan Sidwell <nathan@acm.org>
1206
1207 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1208
7fd549d2
TS
12092017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1210
1211 * c-parser.c (c_parser_omp_clause_default): Handle
1212 "OMP_CLAUSE_DEFAULT_PRESENT".
1213
6ecd2339
BE
12142017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1215
1216 * config-lang.in (gtfiles): Add c-family/c-format.c.
1217
8a57ecff
NS
12182017-05-18 Nathan Sidwell <nathan@acm.org>
1219
1220 * c-decl.c (pushdecl_top_level): Delete unused function.
1221
6574d78e
MP
12222017-05-18 Marek Polacek <polacek@redhat.com>
1223
1224 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1225 (check_earlier_gotos): Likewise.
1226 (define_label): Likewise.
1227 (pending_xref_error): Likewise.
1228 (smallest_type_quals_location): Likewise.
1229 (grokdeclarator): Likewise.
1230 (grokparms): Likewise.
1231 (identifier_global_value): Likewise.
1232 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1233 (find_init_member): Likewise.
1234
e3455240
MP
12352017-05-18 Marek Polacek <polacek@redhat.com>
1236
1237 * c-decl.c (start_decl): Use false/true instead of 0/1.
1238 (grokdeclarator): Likewise.
1239 (finish_struct): Likewise.
1240 (start_function): Change the return type to bool. Use false/true
1241 instead of 0/1.
1242 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1243 * c-tree.h (start_function): Update.
1244 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1245 (set_designator): Change the return type to bool. Use false/true
1246 instead of 0/1.
1247
3fa8871b
MP
12482017-05-17 Marek Polacek <polacek@redhat.com>
1249
1250 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1251 * c-typeck.c: Likewise.
1252
142473df
MP
12532017-05-17 Marek Polacek <polacek@redhat.com>
1254
1255 PR sanitizer/80659
1256 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1257 DECL_IGNORED_P even for non-static compound literals.
1258
1a817418
ML
12592017-05-17 Martin Liska <mliska@suse.cz>
1260
1261 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1262 use it instead of int type.
1263
b2fa0a8b
MP
12642017-05-17 Marek Polacek <polacek@redhat.com>
1265
1266 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1267 call c_fully_fold.
1268 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1269 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1270 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1271 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1272 save_expr.
1273 (c_parser_conditional_expression): Likewise.
1274 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1275 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1276 (process_init_element): Likewise.
1277 (build_binary_op): Likewise.
1278 (handle_omp_array_sections_1): Likewise.
1279
1e47f02b
TS
12802017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1281
1282 * c-parser.c (c_parser_omp_clause_num_gangs)
1283 (c_parser_omp_clause_num_workers)
1284 (c_parser_omp_clause_vector_length): Merge functions into...
1285 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1286 all users.
1287
c24e924f
NS
12882017-05-11 Nathan Sidwell <nathan@acm.org>
1289
1290 * gimple-parser.c: Don't #include tree-dump.h.
1291
c587104e
MM
12922017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1293
1294 PR testsuite/80580
1295 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1296
67ac9a9d
MM
12972017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1298
1299 PR testsuite/80580
1300 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1301 incorrect __MEM syntax.
1302
ac4eb40f
MM
13032017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1304
1305 PR testsuite/80580
1306 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1307 type of unary '*'.
1308
641da50a
NS
13092017-05-09 Nathan Sidwell <nathan@acm.org>
1310
1311 * c-tree.h (pushdecl): Declare.
1312
56d35585
DM
13132017-05-05 David Malcolm <dmalcolm@redhat.com>
1314
1315 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1316 with diagnostic_report_diagnostic.
1317 * c-errors.c (pedwarn_c99): Likewise.
1318 (pedwarn_c90): Likewise.
1319
815d9cc6
XR
13202017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1321
92a285c1 1322 PR c++/80038
815d9cc6
XR
1323 * c-gimplify.c (c_gimplify_expr): Remove calls to
1324 cilk_gimplifY_call_params_in_spawned_fn.
1325
1c4ea66f
DM
13262017-04-25 David Malcolm <dmalcolm@redhat.com>
1327
1328 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1329 hint for removing extra semicolon.
1330
666f7903
JJ
13312017-04-21 Jakub Jelinek <jakub@redhat.com>
1332
1333 PR c/80468
1334 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1335 enabled, set specs->type to integer_type_node.
1336
5764ee3c
JW
13372017-04-03 Jonathan Wakely <jwakely@redhat.com>
1338
1339 * c-array-notation.c: Fix typo in comment.
1340
10fa8dfb
MP
13412017-03-29 Marek Polacek <polacek@redhat.com>
1342
1343 PR c/79730
1344 * c-decl.c (finish_decl): Check VAR_P.
1345
a9e4a1a5
JJ
13462017-03-27 Jakub Jelinek <jakub@redhat.com>
1347
1348 PR middle-end/80162
1349 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1350 * c-typeck.c (c_mark_addressable): Likewise. Look through
1351 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1352 to ARRAY_TYPE.
1353 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1354
ee3ff394
MP
13552017-03-23 Marek Polacek <polacek@redhat.com>
1356
1357 * c-tree.h: Remove a C_RID_YYCODE reference.
1358
4d1b8e70
JJ
13592017-03-21 Jakub Jelinek <jakub@redhat.com>
1360
1361 PR c/80097
1362 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1363 optional COMPOUND_EXPR with ubsan instrumentation.
1364
31dc71a8
MP
13652017-03-17 Marek Polacek <polacek@redhat.com>
1366
1367 * c-parser.c: Add C11 references.
1368
d579c385
MP
13692017-03-15 Marek Polacek <polacek@redhat.com>
1370
1371 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1372
85059a38
MP
13732017-03-11 Marek Polacek <polacek@redhat.com>
1374
1375 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1376
2f6f187a
DM
13772017-03-10 David Malcolm <dmalcolm@redhat.com>
1378
1379 PR translation/79848
1380 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1381 "%qs".
1382 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1383
36618428
MP
13842017-03-09 Marek Polacek <polacek@redhat.com>
1385
1386 PR sanitizer/79757
1387 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1388 parameter declarations with initializers.
1389
01e5af5a
JJ
13902017-03-09 Jakub Jelinek <jakub@redhat.com>
1391
1392 PR c/79969
1393 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1394 TYPE_STUB_DECL.
1395
a71dbc63
JJ
13962017-03-07 Jakub Jelinek <jakub@redhat.com>
1397
1398 PR c/79834
1399 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1400 for "may only be used in compound statements" diagnostics, change it
1401 such that the same translatable string is used for all pragmas. For
1402 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1403 diagnostics.
1404 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1405 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1406 "may only be used in compound statements" diagnostics, such that the
1407 same translatable string is used for all pragmas.
1408
1ff4bae6
MP
14092017-03-04 Marek Polacek <polacek@redhat.com>
1410
1411 PR c/79847
1412 * c-decl.c (implicit_decl_warning): Add missing space.
1413
7f5a7d78
MP
14142017-03-03 Marek Polacek <polacek@redhat.com>
1415
1416 PR c/79758
1417 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1418 current_function_prototype_arg_types is error_mark_node. Fix
1419 formatting. Use TREE_VALUE instead of TREE_TYPE.
1420
883c8f06
JJ
14212017-03-03 Jakub Jelinek <jakub@redhat.com>
1422
79c9b7a8
JJ
1423 PR c/79837
1424 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1425 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1426 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1427 diagnostics.
1428
883c8f06
JJ
1429 PR c/79836
1430 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1431 instead of %<_Generic>.
1432 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1433 (c_parser_omp_target_exit_data): Use %<release%> instead of
1434 %<release>.
1435
324ff1a0
JJ
14362017-02-28 Jakub Jelinek <jakub@redhat.com>
1437
1438 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1439 instead of just cond ? "..." : "...".
1440 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1441 for "enter"/"exit" keyword.
1442 (c_finish_oacc_routine): Don't use %s to supply portions of the
1443 message.
1444
4227c9ad
JJ
14452017-02-24 Jakub Jelinek <jakub@redhat.com>
1446
1447 PR c++/79588
1448 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1449 handle -Wrestrict here.
1450 * c-typeck.c (build_function_call_vec): Adjust
1451 check_function_arguments caller.
1452
5d972e66
RB
14532017-02-23 Richard Biener <rguenther@suse.de>
1454
1455 PR c/79684
1456 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1457 to initialize c_exprs to return.
1458 (c_parser_gimple_binary_expression): Likewise.
1459 (c_parser_gimple_unary_expression): Likewise.
1460 (c_parser_gimple_postfix_expression): Likewise.
1461
61ac5ebe
MP
14622017-02-22 Marek Polacek <polacek@redhat.com>
1463
1464 PR c/79662
1465 * c-typeck.c (convert_arguments): Handle error_mark_node.
1466
41d1b0b1
PK
14672017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1468
1469 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1470 value of c_parser_parse_ssa_name against error_mark_node and emit
1471 error if ssa name is anonymous and written as default definition.
1472
eab1f169
PK
14732017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1474
1475 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1476 FMA_EXPR.
1477
bcac0b4d
JJ
14782017-02-16 Jakub Jelinek <jakub@redhat.com>
1479
1480 PR c++/79512
1481 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1482 ignore #pragma omp target even when not followed by identifier.
1483
1be33173
PK
14842017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1485
1486 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1487 (c_parser_gimple_unary_expression): Likewise.
1488
aa326bfb
JJ
14892017-02-13 Jakub Jelinek <jakub@redhat.com>
1490
1491 * c-parser.c (c_parser_oacc_declare): Add missing space in
1492 diagnostics.
1493
8a398bc5
PK
14942017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1495
1496 PR c/79478
1497 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1498 set_c_expr_source_range when parsing ssa-name.
1499
3dcde5ef
PG
15002017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1501 Richard Biener <rguenther@suse.de>
1502
1503 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1504 building IL when arguments are error_mark_node.
1505 (c_parser_gimple_unary_expression): Likewise.
1506 (c_parser_gimple_if_stmt): Likewise.
1507 (c_parser_gimple_switch_stmt): Likewise.
1508 (c_parser_gimple_return_stmt): Likewise.
1509 (c_parser_parse_ssa_name): When name lookup fails do not build
1510 an SSA name. Use undeclared rather than not declared in error
1511 reporting.
1512
192b048b
MP
15132017-02-09 Marek Polacek <polacek@redhat.com>
1514
1515 PR c/79428
1516 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1517 instead of c_parser_skip_until_found.
1518
56f71478
JJ
15192017-02-09 Jakub Jelinek <jakub@redhat.com>
1520
1521 PR c/79431
1522 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1523 symtab_node::get on automatic variables.
1524
02889d23
CLT
15252016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1526 Chung-Lin Tang <cltang@codesourcery.com>
1527
1528 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1529 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1530 semantic checking.
1531 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1532
7af4b20d
RB
15332017-02-07 Richard Biener <rguenther@suse.de>
1534
1535 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1536 (c_parser_gimple_postfix_expression_after_primary):
1537 Do not use c_build_function_call_vec to avoid folding and promotion.
1538 Simplify.
1539
e5e391d6
MO
15402017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1541
1542 PR lto/79061
1543 * c-decl.c (pop_scope): Pass main_input_filename to
1544 build_translation_unit_decl.
1545
c2e84327
DM
15462017-01-24 David Malcolm <dmalcolm@redhat.com>
1547
1548 * c-parser.c: Include "read-rtl-function.h" and
1549 "run-rtl-passes.h".
1550 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1551 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1552 production. Update for renaming of field "gimple_pass" to
1553 "gimple_or_rtl_pass". If __RTL was seen, call
1554 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1555 to an auto_timevar, to cope with early exit.
1556 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1557 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1558 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1559 Handle RID_RTL.
1560 (c_parser_parse_rtl_body): New function.
1561 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1562 (struct c_declspecs): Rename field "gimple_pass" to
1563 "gimple_or_rtl_pass". Add field "rtl_p".
1564 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1565 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1566 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1567 (c_parser_gimple_or_rtl_pass_list): ...this.
1568
2ebd93e1
MP
15692017-01-20 Marek Polacek <polacek@redhat.com>
1570
1571 PR c/64279
1572 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1573
b1c95bb5
RB
15742017-01-13 Richard Biener <rguenther@suse.de>
1575
1576 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1577 nops.
1578
25329913
RB
15792017-01-13 Richard Biener <rguenther@suse.de>
1580
1581 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1582 _Literal ( type-name ) number.
1583
6bb4ea5c
RB
15842017-01-12 Richard Biener <rguenther@suse.de>
1585
1586 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1587 __MEM.
1588
6b5b4e9c
JJ
15892017-01-11 Jakub Jelinek <jakub@redhat.com>
1590
1591 PR c++/72813
1592 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1593 PCH file.
1594
e3252775
RB
15952017-01-11 Richard Biener <rguenther@suse.de>
1596
1597 PR bootstrap/79052
1598 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1599 returns on parse errors.
1600
a9342885
MP
16012017-01-04 Marek Polacek <polacek@redhat.com>
1602
1603 PR c++/64767
1604 * c-parser.c (c_parser_postfix_expression): Mark zero character
1605 constants by setting original_type in c_expr.
1606 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1607 with a zero character constant.
1608 (char_type_p): New function.
1609
5dd9a9d0
DM
16102017-01-04 David Malcolm <dmalcolm@redhat.com>
1611
1612 * c-parser.c (c_parser_declaration_or_fndef): Create a
1613 rich_location at init_loc and parse it to start_init.
1614 (last_init_list_comma): New global.
1615 (c_parser_braced_init): Update last_init_list_comma when parsing
1616 commas. Pass it to pop_init_level. Pass location of closing
1617 brace to pop_init_level.
1618 (c_parser_postfix_expression_after_paren_type): Create a
1619 rich_location at type_loc and parse it to start_init.
1620 (c_parser_omp_declare_reduction): Likewise for loc.
1621 * c-tree.h (start_init): Add rich_location * param.
1622 (pop_init_level): Add location_t param.
1623 * c-typeck.c (struct initializer_stack): Add field
1624 "missing_brace_richloc".
1625 (start_init): Add richloc param, use it to initialize
1626 the stack node's missing_brace_richloc.
1627 (last_init_list_comma): New decl.
1628 (finish_implicit_inits): Pass last_init_list_comma to
1629 pop_init_level.
1630 (push_init_level): When finding missing open braces, add fix-it
1631 hints to the richloc.
1632 (pop_init_level): Add "insert_before" param and pass it
1633 when calling pop_init_level. Add fixits about missing
1634 close braces to any richloc. Use the richloc for the
1635 -Wmissing-braces warning.
1636 (set_designator): Pass last_init_list_comma to pop_init_level.
1637 (process_init_element): Likewise.
1638
cbe34bb5
JJ
16392017-01-01 Jakub Jelinek <jakub@redhat.com>
1640
1641 Update copyright years.
1642
d17680f3
JJ
16432016-12-21 Jakub Jelinek <jakub@redhat.com>
1644
0dba7960
JJ
1645 PR bootstrap/78817
1646 * c-typeck.c (build_function_call_vec): If check_function_arguments
1647 returns true, set TREE_NO_WARNING on CALL_EXPR.
1648
d17680f3
JJ
1649 PR c/77767
1650 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1651 to *expr instead of overwriting it.
1652
aa90531e
RB
16532016-12-20 Richard Biener <rguenther@suse.de>
1654
1655 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1656 error recovery.
1657 (c_parser_gimple_statement): Only build assigns for non-error
1658 stmts.
1659 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1660
629b3d75
MJ
16612016-12-14 Martin Jambor <mjambor@suse.cz>
1662
1663 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1664 omp-low.h.
1665 (c_finish_oacc_routine): Adjusted call to
1666 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1667 to use their new names.
1668 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1669 use its new name.
1670 (c_parser_oacc_update): Likewise.
1671 (c_parser_omp_simd): Likewise.
1672 (c_parser_omp_target_update): Likewise.
1673 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1674 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1675 name.
1676 (c_finish_omp_cancellation_point): Likewise.
1677 * gimple-parser.c: Do not include omp-low.h
1678
c5af52eb
CP
16792016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1680 James Norris <jnorris@codesourcery.com>
1681
1682 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1683 EXIT_DATA,WAIT} are not used in compound statements.
1684 (c_parser_oacc_enter_exit_data): Update diagnostics.
1685
48330c93
BE
16862016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1687
1688 PR c++/71973
1689 * c-decl.c (diagnose_mismatched_decls): Use
1690 OPT_Wbuiltin_declaration_mismatch here too.
1691
899ca90e 16922016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1693 Alan Hayward <alan.hayward@arm.com>
1694 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1695
1696 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1697 (make_label, finish_struct): Likewise.
1698
1ee62b92 16992016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1700 Richard Biener <rguenther@suse.de>
22b15758 1701
8e745a17
JJ
1702 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1703 * config-lang.in (gtfiles): Add c/c-parser.h.
1704 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1705 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1706 * c-parser.c (enum c_id_kind, struct c_token,
1707 c_parser_next_token_is, c_parser_next_token_is_not,
1708 c_parser_next_token_is_keyword,
1709 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1710 Split out to ...
1711 * c-parser.h: ... new header.
1712 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1713 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1714 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1715 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1716 c_parser_error, c_parser_require, c_parser_skip_until_found,
1717 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1718 c_parser_type_name): Export.
1719 (c_parser_tokens_buf): New function.
1720 (c_parser_error): Likewise.
1721 (c_parser_set_error): Likewise.
1722 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1723 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1724 via c_parser_parse_gimple_body.
8e745a17
JJ
1725 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1726 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1727 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1728 c_parser_error, c_parser_require, c_parser_skip_until_found,
1729 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1730 c_parser_type_name): Declare.
1ee62b92
PG
1731 (struct c_parser): Declare forward.
1732 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1733 (c_parser_error): Likewise.
1734 (c_parser_set_error): Likewise.
1735 * gimple-parser.c: New file.
1736 * gimple-parser.h: Likewise.
1ee62b92 1737
22b15758
UB
17382016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1739
1740 PR c/35503
1741 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1742 warn_for_restrict.
1743
84ff4775
LCW
17442016-09-11 Le-Chun Wu <lcwu@google.com>
1745 Mark Wielaard <mjw@redhat.com>
1746
1747 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1748 to the given -Wshadow= variant.
1749
4d0cdd0c
TP
17502016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1751
1752 * c-typeck.c: Include memmodel.h.
1753
1202f33e
JJ
17542016-10-13 Jakub Jelinek <jakub@redhat.com>
1755
1756 PR target/77957
1757 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1758 instead of lhd_return_null_tree_v.
1759
8a14afd0
BS
17602016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1761
1762 PR c++/69733
1763 * c-decl.c (smallest_type_quals_location): New static function.
1764 (grokdeclarator): Try to find the correct location for an ignored
1765 qualifier.
1766
81fea426
MP
17672016-09-26 Marek Polacek <polacek@redhat.com>
1768
1769 PR c/7652
1770 * c-decl.c (pop_scope): Add gcc_fallthrough.
1771
17722016-09-26 Marek Polacek <polacek@redhat.com>
1773
1774 PR c/7652
1775 * c-parser.c (struct c_token): Add flags field.
1776 (c_lex_one_token): Pass it to c_lex_with_flags.
1777 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1778 into IFN_FALLTHROUGH.
1779 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1780 attribute fallthrough after a case label or default label.
1781 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1782
9a2300e9
MP
17832016-09-24 Marek Polacek <polacek@redhat.com>
1784
1785 PR c/77490
1786 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1787 have boolean value. Warn about ++/-- on booleans.
1788
7de76362
JJ
17892016-09-23 Jakub Jelinek <jakub@redhat.com>
1790
1791 * c-parser.c (incomplete_record_decls): Remove unnecessary
1792 = vNULL initialization of file scope vec.
1793
5b73d2ab
MP
17942016-09-16 Marek Polacek <polacek@redhat.com>
1795
1796 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1797
e51fbec3
MP
17982016-09-14 Marek Polacek <polacek@redhat.com>
1799
1800 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1801 (fix_array_notation_expr): Likewise.
1802 * c-decl.c (finish_decl): Likewise.
1803 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1804 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1805 (function_to_pointer_conversion): Use false instead of 0.
1806 (convert_lvalue_to_rvalue): Likewise.
1807 (parser_build_unary_op): Likewise.
1808 (build_atomic_assign): Likewise.
1809 (build_unary_op): Change nonconvert parameter type to bool, use
1810 true/false instead of 1/0.
1811 (build_binary_op): Use true instead of 1.
1812
254830ba
DM
18132016-09-13 David Malcolm <dmalcolm@redhat.com>
1814
1815 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1816 of add_fixit_insert to add_fixit_insert_before.
1817
4c13ba17
MP
18182016-09-13 Marek Polacek <polacek@redhat.com>
1819
1820 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1821 it.
1822
54dcdb88
BE
18232016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1824
1825 PR c++/77496
1826 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1827 COMPOUND_EXPR to warn_for_omitted_condop.
1828
e5106e27
DM
18292016-09-07 David Malcolm <dmalcolm@redhat.com>
1830
1831 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1832 c_get_substring_location for this new langhook.
1833
9dc5773f
JJ
18342016-09-02 Jakub Jelinek <jakub@redhat.com>
1835
1836 PR c/65467
1837 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1838 flag_openmp.
1839 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1840 instead of mark_exp_read on low_bound/length expression.
1841 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1842 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1843 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1844 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1845 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1846 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1847 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1848 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1849 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1850 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1851 instead of mark_expr_read.
1852 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1853 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1854 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1855 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1856 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1857 array section bases outside of depend clause, for depend clause
1858 use convert_lvalue_to_rvalue on the base.
1859 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1860 linear, aligned, map, to and from clauses.
1861 (c_omp_clause_copy_ctor): New function.
1862
295844f6
MP
18632016-09-01 Marek Polacek <polacek@redhat.com>
1864
1865 PR c/7652
1866 * c-typeck.c (composite_type): Add FALLTHRU comment.
1867
089af25c
DM
18682016-08-31 David Malcolm <dmalcolm@redhat.com>
1869
1870 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1871 to the insertion fixits for "struct", "union", and "enum".
1872
f9087798
DM
18732016-08-30 David Malcolm <dmalcolm@redhat.com>
1874
1875 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1876 rather than add_fixit_misspelled_id.
1877 (undeclared_variable): Likewise.
1878 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1879 now-redundant "here" params from add_fixit_insert method calls.
1880 (c_parser_parameter_declaration): Likewise.
1881 * c-typeck.c (build_component_ref): Remove now-redundant range
1882 param from add_fixit_replace method calls.
1883
ebef225f
MP
18842016-08-25 Marek Polacek <polacek@redhat.com>
1885
1886 * c-typeck.c (parser_build_binary_op): Pass LHS to
1887 warn_logical_not_parentheses.
1888
fe377a48
MP
18892016-08-25 Marek Polacek <polacek@redhat.com>
1890
1891 PR c/77323
1892 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1893 or _FloatN or _FloatNx is not supported.
1894 (finish_declspecs): Set type to integer_type_node when _FloatN or
1895 _FloatNx is not supported.
1896
c65699ef
JM
18972016-08-19 Joseph Myers <joseph@codesourcery.com>
1898
1899 PR c/32187
1900 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1901 (struct c_declspecs): Add field floatn_nx_idx.
1902 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1903 and _FloatNx type specifiers.
1904 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1905 (c_parser_declspecs, c_parser_attribute_any_word)
1906 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1907 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1908 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1909 narrower than double.
1910
2f1364c2
JJ
19112016-08-12 Jakub Jelinek <jakub@redhat.com>
1912 Martin Liska <mliska@suse.cz>
1913
1914 PR c/67410
1915 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1916 % to determine val element to change. Assert that
1917 wchar_bytes * charwidth fits into val array.
1918
191816a3
MP
19192016-08-12 Marek Polacek <polacek@redhat.com>
1920
1921 PR c/7652
1922 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1923 (c_parser_postfix_expression): Likewise.
1924 * c-typeck.c (build_unary_op): Adjust fall through comment.
1925 (c_mark_addressable): Likewise.
1926
b95a64bb
JJ
19272016-08-11 Jakub Jelinek <jakub@redhat.com>
1928
1929 PR c/72816
1930 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1931 array member through typedef, for orig_qual_indirect == 0 clear
1932 orig_qual_type.
1933
895aa8e1
DM
19342016-08-08 David Malcolm <dmalcolm@redhat.com>
1935
1936 PR c/64955
1937 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1938 this up to selftest::run_c_tests.
1939 (selftest::run_c_tests): New function.
1940
0b212d8c
TS
19412016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1942
ae9281fc
TS
1943 * c-parser.c (struct oacc_routine_data): Add error_seen and
1944 fndecl_seen members.
1945 (c_finish_oacc_routine): Use these.
1946 (c_parser_declaration_or_fndef): Adjust.
1947 (c_parser_oacc_routine): Likewise. Support more C language
1948 constructs, and improve diagnostics. Move pragma context
1949 checking...
1950 (c_parser_pragma): ... here.
1951
0b212d8c
TS
1952 * c-parser.c (struct oacc_routine_data): New.
1953 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1954 Simplify code.
1955 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1956 declare target" attribute.
1957
76e2c821
JB
19582016-08-01 Jan Beulich <jbeulich@suse.com>
1959
1960 * c-fold.c (c_fully_fold_internal): Also emit shift count
1961 warnings for vector types.
1962 * c-typeck.c (build_binary_op): Likewise.
1963
f618a472
MP
19642016-07-29 Marek Polacek <polacek@redhat.com>
1965
1966 PR c/71742
1967 * c-decl.c (finish_struct): Rephrase an error message.
1968
efd0786f
MP
1969 PR c/71853
1970 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1971 to error node for invalid code.
1972
e00dceaf
MP
1973 PR c/71573
1974 * c-decl.c (implicitly_declare): Return decl early not only for
1975 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1976
673a107a
JJ
19772016-07-29 Jakub Jelinek <jakub@redhat.com>
1978
1979 PR c/71969
1980 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1981 on GNU extern inline functions.
1982
a5b5c8b6
MP
19832016-07-29 Marek Polacek <polacek@redhat.com>
1984
1985 PR c/71583
1986 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1987 check expr.value.
1988
e3fe09c1
UB
19892016-07-22 Uros Bizjak <ubizjak@gmail.com>
1990
1991 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1992
7c8f7eaa
DM
19932016-07-20 David Malcolm <dmalcolm@redhat.com>
1994
1995 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1996 spellcheck-tree.h
1997 (best_macro_match): Likewise, converting from a typedef to a
1998 subclass.
1999 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2000 (lookup_name_fuzzy): Update for change of best_macro_match to a
2001 subclass with a ctor that calls cpp_forall_identifiers.
2002
de6a69ee
DM
20032016-07-20 David Malcolm <dmalcolm@redhat.com>
2004
2005 * c-decl.c (implicit_decl_warning): Update for conversion of
2006 return type of lookup_name_fuzzy to const char *.
2007 (undeclared_variable): Likewise.
2008 (lookup_name_fuzzy): Convert return type from tree to
2009 const char *.
2010 * c-parser.c (c_parser_declaration_or_fndef): Update for
2011 conversion of return type of lookup_name_fuzzy to const char *.
2012 (c_parser_parameter_declaration): Likewise.
2013
b1c9c068
CP
20142016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2015
2016 * c-parser.c (c_parser_oacc_declare): Don't scan for
2017 GOMP_MAP_POINTER.
2018 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2019 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2020 zero-length subarrays.
2021
ddbbcb19
JJ
20222016-07-15 Jakub Jelinek <jakub@redhat.com>
2023
2024 PR c/71858
2025 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2026 instead of FUZZY_LOOKUP_NAME.
2027 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2028 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2029
dd36b877
JJ
20302016-07-14 Jakub Jelinek <jakub@redhat.com>
2031
2032 PR c/71858
2033 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2034
8c681247
TS
20352016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2036
2037 * c-parser.c (c_parser_generic_selection): Make type of variable
2038 auto_vec.
2039 (c_parser_omp_declare_simd): Likewise.
2040
bf4fa671
TS
20412016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2042
2043 * c-decl.c (struct c_struct_parse_info): Change member types
2044 from vec to auto_vec.
2045 (start_struct): Adjust.
2046 (finish_struct): Likewise.
2047
557e8c49
JJ
20482016-07-02 Jakub Jelinek <jakub@redhat.com>
2049
2050 PR c/71719
2051 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2052
54d19c3b
TS
20532016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2054
2055 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2056 Move pragma context checking into...
2057 (c_parser_omp_cancellation_point): ... here, and improve
2058 diagnostic messages.
2059 * c-typeck.c (c_finish_omp_cancel)
2060 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2061
152ef731
JJ
20622016-06-29 Jakub Jelinek <jakub@redhat.com>
2063
2064 PR c/71685
2065 * c-typeck.c (c_build_qualified_type): Don't clear
2066 C_TYPE_INCOMPLETE_VARS for the main variant.
2067
20682016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2069
2070 PR c/71552
2071 * c-typeck.c (output_init_element): Diagnose incompatible types
2072 before non-constant initializers.
2073
e9ac1f86
JJ
20742016-06-28 Jakub Jelinek <jakub@redhat.com>
2075
2076 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2077
277d7ee0
AK
20782016-06-23 Andi Kleen <ak@linux.intel.com>
2079
2080 * Make-lang.in: Add support for autofdo.
2081
1a4f11c8
DM
20822016-06-22 David Malcolm <dmalcolm@redhat.com>
2083
2084 PR c/70339
2085 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2086 (implicit_decl_warning): When issuing warnings for implicit
2087 declarations, attempt to provide a suggestion via
2088 lookup_name_fuzzy.
2089 (undeclared_variable): Likewise when issuing errors.
2090 (lookup_name_in_scope): Likewise.
2091 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2092 (best_macro_match): New typedef.
2093 (find_closest_macro_cpp_cb): New function.
2094 (lookup_name_fuzzy): New function.
2095 * c-parser.c: Include gcc-rich-location.h.
2096 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2097 (c_keyword_starts_typename): ...this new function.
2098 (c_parser_declaration_or_fndef): When issuing errors about
2099 missing "struct" etc, add a fixit. For other kinds of errors,
2100 attempt to provide a suggestion via lookup_name_fuzzy.
2101 (c_parser_parms_declarator): When looking ahead to detect typos in
2102 type names, also reject CPP_KEYWORD.
2103 (c_parser_parameter_declaration): When issuing errors about
2104 unknown type names, attempt to provide a suggestion via
2105 lookup_name_fuzzy.
2106 * c-tree.h (c_keyword_starts_typename): New prototype.
2107
5a578671
JM
21082016-06-20 Joseph Myers <joseph@codesourcery.com>
2109
2110 PR c/71601
2111 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2112 c_common_type returns error_mark_node.
2113
3f8257db 21142016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2115
2116 PR c/69507
2117 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2118 __alignof__ (expression).
2119
6a3f203c
DM
21202016-06-14 David Malcolm <dmalcolm@redhat.com>
2121
2122 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2123
264757fb
DM
21242016-06-14 David Malcolm <dmalcolm@redhat.com>
2125
2126 * c-typeck.c (build_component_ref): Simplify fixit code by
2127 using gcc_rich_location::add_fixit_misspelled_id.
2128 (set_init_label): Likewise.
2129
f7e4f2e3
DM
21302016-06-13 David Malcolm <dmalcolm@redhat.com>
2131
2132 * c-parser.c (c_parser_initelt): Provide location of name for new
2133 location_t param of set_init_label.
2134 * c-tree.h (set_init_label): Add location_t param.
2135 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2136 param and use it when issuing error messages about unrecognized
2137 field names. Attempt to provide a fixit hint if appropriate,
2138 otherwise update the error message to provide the type name.
2139
4b1ffdb1
TS
21402016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2141
2142 PR c/71381
2143 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2144 Loosen checking.
2145
44a845ca
MS
21462016-06-08 Martin Sebor <msebor@redhat.com>
2147 Jakub Jelinek <jakub@redhat.com>
2148
2149 PR c++/70507
2150 PR c/68120
2151 * c-typeck.c (convert_arguments): Don't promote last argument
2152 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2153
92a5f2ba
MP
21542016-06-08 Marek Polacek <polacek@redhat.com>
2155
2156 PR c/71418
2157 * c-decl.c (grokdeclarator): Check TYPE_P.
2158
08203f73
MP
2159 PR c/71426
2160 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2161 code.
2162
6ffd47b7
DM
21632016-06-07 David Malcolm <dmalcolm@redhat.com>
2164
2165 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2166 and structure element reference, capture the location of the
2167 element name token and pass it to build_component_ref.
2168 (c_parser_postfix_expression_after_primary): Likewise for
2169 structure element dereference.
2170 (c_parser_omp_variable_list): Likewise for
2171 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2172 * c-tree.h (build_component_ref): Add location_t param.
2173 * c-typeck.c (build_component_ref): Add location_t param
2174 COMPONENT_LOC. Use it, if available, when issuing hints about
2175 mispelled member names to provide a fixit replacement hint.
2176
1f40cff3
MP
21772016-06-06 Marek Polacek <polacek@redhat.com>
2178
2179 PR c/71362
2180 * c-parser.c (c_parser_direct_declarator): Set location.
2181
5545a907
MP
21822016-06-06 Marek Polacek <polacek@redhat.com>
2183
2184 * c-typeck.c (comptypes_internal): Handle comparisons of
2185 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2186 TYPE_REF_CAN_ALIAS_ALL.
2187
b605f663
CLT
21882016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2189
2190 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2191 arguments as addressable when async clause exists.
2192
00631022
JJ
21932016-05-30 Jakub Jelinek <jakub@redhat.com>
2194
2195 PR c++/71349
2196 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2197 when combined with target construct.
2198
7211a097
JJ
21992016-05-26 Jakub Jelinek <jakub@redhat.com>
2200
2201 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2202 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2203
95efe6b6
MP
22042016-05-25 Marek Polacek <polacek@redhat.com>
2205
2206 PR c/71265
2207 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2208
a23faf7a
MP
2209 PR c/71266
2210 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2211
e46c7770
CP
22122016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2213
2214 * c-parser.c (c_parser_oacc_declare): Add support for
2215 GOMP_MAP_FIRSTPRIVATE_POINTER.
2216 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2217 argument with enum c_omp_region_type ort.
2218 (handle_omp_array_sections): Likewise. Update call to
2219 handle_omp_array_sections_1.
2220 (c_finish_omp_clauses): Add specific errors and warning messages for
2221 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2222 call to handle_omp_array_sections.
2223
a04e69c0
TS
22242016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2225
2226 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2227
f17a223d
RB
22282016-05-24 Richard Biener <rguenther@suse.de>
2229
2230 PR middle-end/70434
2231 PR c/69504
2232 * c-typeck.c (build_array_ref): Do not complain about indexing
2233 non-lvalue vectors. Adjust for function name change.
2234
79063edd
MS
22352016-05-20 Martin Sebor <msebor@redhat.com>
2236
2237 PR c/71115
2238 * c-typeck.c (error_init): Use
2239 expansion_point_location_if_in_system_header.
2240 (warning_init): Same.
2241
8a40fef3
DM
22422016-05-19 David Malcolm <dmalcolm@redhat.com>
2243
2244 PR c/71171
2245 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2246 in error-handling.
2247 (c_parser_postfix_expression): Likewise.
2248 * c-tree.h (c_expr::set_error): New method.
2249 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2250 that result's range is initialized.
2251
e9892350
JG
22522016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2253
2254 * c-typeck.c (parser_build_unary_op): Fix formatting.
2255
8fad45f5
MW
22562016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2257
2258 * c-decl.c (grokdeclarator): Remove errmsg and use of
2259 targetm.invalid_return_type.
2260 (grokparms): Remove errmsg and use of
2261 targetm.invalid_parameter_type.
2262
aa4b467b
JM
22632016-05-13 Joseph Myers <joseph@codesourcery.com>
2264
2265 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2266 function return type.
2267
4f2e1536
MP
22682016-05-12 Marek Polacek <polacek@redhat.com>
2269
2270 PR c/70756
2271 * c-decl.c (build_compound_literal): Pass LOC down to
2272 c_incomplete_type_error.
2273 * c-tree.h (require_complete_type): Adjust declaration.
2274 (c_incomplete_type_error): Likewise.
2275 * c-typeck.c (require_complete_type): Add location parameter, pass it
2276 down to c_incomplete_type_error.
2277 (c_incomplete_type_error): Add location parameter, pass it down to
2278 error_at.
2279 (build_component_ref): Pass location down to c_incomplete_type_error.
2280 (default_conversion): Pass location down to require_complete_type.
2281 (build_array_ref): Likewise.
2282 (build_function_call_vec): Likewise.
2283 (convert_arguments): Likewise.
2284 (build_unary_op): Likewise.
2285 (build_c_cast): Likewise.
2286 (build_modify_expr): Likewise.
2287 (convert_for_assignment): Likewise.
2288 (c_finish_omp_clauses): Likewise.
2289
d6e83a8d
MM
22902016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2291
2292 PR c/43651
2293 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2294 is enabled.
2295 * c-errors.c (pedwarn_c90): Return true if warned.
2296 * c-tree.h (pedwarn_c90): Change return type to bool.
2297 (enum c_declspec_word): Add new enumerator cdw_atomic.
2298
5c3a10fb
MP
22992016-05-11 Marek Polacek <polacek@redhat.com>
2300
2301 PR c++/71024
2302 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2303 diagnose_mismatched_attributes and call it.
2304
cf68d92c
MP
23052016-05-10 Marek Polacek <polacek@redhat.com>
2306
2307 PR c/70255
2308 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2309 on a declaration following the definition.
2310
351f85c5
JJ
23112016-05-05 Jakub Jelinek <jakub@redhat.com>
2312
2313 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2314 parse it through to c_parser_c99_block_statement.
2315 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2316 caller.
2317
deef7113
MP
23182016-05-04 Marek Polacek <polacek@redhat.com>
2319
2320 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2321 OPT_Wdangling_else.
2322
de55efd5
MP
23232016-05-04 Marek Polacek <polacek@redhat.com>
2324
2325 PR c/48778
2326 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2327 for macro expansions.
2328
79ce98bc
MP
23292016-05-03 Marek Polacek <polacek@redhat.com>
2330
2331 PR c/70859
2332 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2333 check_builtin_function_arguments.
2334
fb2647aa
RB
23352016-05-03 Richard Biener <rguenther@suse.de>
2336
2337 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2338 the checksum from the previous stage.
2339
77886428
CP
23402016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2341
2342 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2343 c_finish_omp_clauses.
2344 (c_parser_omp_all_clauses): Likewise.
2345 (c_parser_oacc_cache): Likewise.
2346 (c_parser_oacc_loop): Likewise.
2347 (omp_split_clauses): Likewise.
2348 (c_parser_omp_declare_target): Likewise.
2349 (c_parser_cilk_all_clauses): Likewise.
2350 (c_parser_cilk_for): Likewise.
2351 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2352 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2353
7176a4a0
MP
23542016-05-02 Marek Polacek <polacek@redhat.com>
2355
2356 PR c/70851
2357 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2358 incomplete type.
2359
e7ff0319
CP
23602016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2361
2362 PR middle-end/70626
2363 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2364 OACC_LOOP_CLAUSE_MASK.
2365 (c_parser_oacc_kernels_parallel): Update call to
2366 c_oacc_split_loop_clauses.
2367
9f405ce1
AM
23682016-04-28 Andrew MacLeod <amacleod@redhat.com>
2369
2370 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2371 argument to build_modify_expr in two cases.
2372
c1e1f433
BS
23732016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2374
2375 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2376 warn_for_memset instead of warning directly here.
2377
2448a956
MP
23782016-04-26 Marek Polacek <polacek@redhat.com>
2379
2380 PR c/67784
2381 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2382 out of ...
2383 (c_parser_for_statement): ... here.
2384 (c_parser_if_statement): Use it.
2385 (c_parser_switch_statement): Use it.
2386 (c_parser_while_statement): Use it.
2387
b02a5e26
MP
2388 PR c/70791
2389 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2390
477d4906
IV
23912016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2392
2393 PR c++/69363
2394 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2395 instead of c_finish_cilk_clauses.
2396 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2397 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2398 floating-point variables in the linear clause for Cilk Plus.
2399
fe37c7af
MM
24002016-04-18 Michael Matz <matz@suse.de>
2401
2402 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2403 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2404
949505a9
MP
24052016-04-15 Marek Polacek <polacek@redhat.com>
2406
2407 PR c/70671
2408 * c-typeck.c (build_unary_op): Pass location down to error and
2409 warning call.
2410
dda1bf61
JJ
24112016-04-15 Jakub Jelinek <jakub@redhat.com>
2412
2413 PR c/70436
2414 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2415 where needed.
2416 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2417 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2418 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2419 Adjust c_parser_pragma callers.
2420 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2421 caller.
2422 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2423 c_parser_statement.
2424 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2425 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2426 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2427 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2428 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2429 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2430 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2431 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2432 down where needed.
2433 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2434 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2435 calls.
2436
99cd9857
MP
24372016-04-13 Marek Polacek <polacek@redhat.com>
2438
2439 PR c/70436
2440 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2441 adjust callers.
2442 (c_parser_statement): Likewise.
2443 (c_parser_c99_block_statement): Likewise.
2444 (c_parser_while_statement): Likewise.
2445 (c_parser_for_statement): Likewise.
2446 (c_parser_if_body): Don't set IF_P here.
2447 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2448 about dangling else here.
2449 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2450 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2451 warn about dangling else here.
2452
f13355da
MP
24532016-04-04 Marek Polacek <polacek@redhat.com>
2454
2455 PR c/70307
2456 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2457
5fde6a45
MP
24582016-03-31 Marek Polacek <polacek@redhat.com>
2459
2460 PR c/70297
2461 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2462
4bbf545b
DM
24632016-03-18 David Malcolm <dmalcolm@redhat.com>
2464
2465 PR c/70281
2466 * c-parser.c (c_parser_postfix_expression): Set the source range
2467 for uses of "__builtin_types_compatible_p".
2468
fcc2b74f
JJ
24692016-03-17 Jakub Jelinek <jakub@redhat.com>
2470
2471 PR c/70280
2472 * c-typeck.c (composite_type): Don't count void_list_node
2473 into len, if the list is terminated by void_list_node, start
2474 with void_list_node instead of NULL for newargs. Stop
2475 at void_list_node.
2476
ab4c578f
MP
24772016-03-16 Marek Polacek <polacek@redhat.com>
2478
2479 PR c/70093
2480 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2481 nested functions returning VM types.
2482
96b3c82d
CP
24832016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2484
2485 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2486 when calling c_finish_omp_clauses.
2487
29b9828f
BS
24882016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2489
2490 PR c/69824
2491 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2492 for later.
2493
7ff6ca38
MP
24942016-03-04 Marek Polacek <polacek@redhat.com>
2495
2496 PR c/69798
2497 * c-parser.c (c_parser_postfix_expression): Call
2498 c_parser_cast_expression rather than c_parser_postfix_expression.
2499
686e2237
JJ
25002016-03-01 Jakub Jelinek <jakub@redhat.com>
2501
2502 PR c/69796
2503 PR c/69974
2504 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2505 of incomplete decls to error_mark_node.
2506
0b05329b
MP
25072016-02-24 Marek Polacek <polacek@redhat.com>
2508
2509 PR c/69819
2510 * c-decl.c (finish_decl): Don't update the copy of the type of a
2511 different decl type.
2512
067fbd8b
JJ
25132016-02-23 Jakub Jelinek <jakub@redhat.com>
2514
2515 PR objc/69844
2516 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2517 in id_kind reclassification.
2518
bf14eba2
JJ
25192016-02-16 Jakub Jelinek <jakub@redhat.com>
2520
2521 PR c/69835
2522 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2523
ba539195
JN
25242016-02-16 James Norris <jnorris@codesourcery.com>
2525
2526 PR c/64748
2527 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2528
16595a1f
BS
25292016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2530
f48dfe98
BS
2531 * c-decl.c (build_null_declspecs): Zero the entire struct.
2532
16595a1f
BS
2533 PR c/69522
2534 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2535 callers changed. If nested_p is true, use it to call
2536 finish_implicit_inits.
2537 * c-tree.h (finish_implicit_inits): Declare.
2538 * c-typeck.c (finish_implicit_inits): New function. Move code
2539 from ...
2540 (push_init_level): ... here.
2541 (set_designator, process_init_element): Call finish_implicit_inits.
2542
66756373
JJ
25432016-02-11 Jakub Jelinek <jakub@redhat.com>
2544
2545 PR c/69768
2546 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2547 arguments for -Waddress warning.
2548
1066e9b5
JJ
25492016-02-04 Jakub Jelinek <jakub@redhat.com>
2550
2551 PR c/69669
2552 * c-decl.c (finish_enum): When honoring mode attribute,
2553 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2554
3a5d2ba4
JJ
25552016-01-29 Jakub Jelinek <jakub@redhat.com>
2556
2557 PR debug/69518
2558 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2559 all type variants, not just TYPE_MAIN_VARIANT.
2560
cbdd8ae0
JJ
25612016-01-27 Jakub Jelinek <jakub@redhat.com>
2562
2563 PR debug/66869
2564 * c-decl.c (c_write_global_declarations_1): Warn with
2565 warn_unused_function if static prototype without definition
2566 is not C_DECL_USED.
2567
fa74a4bc
MP
25682016-01-27 Marek Polacek <polacek@redhat.com>
2569
2570 PR c/68062
2571 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2572 to unsigned, if needed. Add -Wsign-compare warning.
2573
13f92e8d
JJ
25742016-01-26 Jakub Jelinek <jakub@redhat.com>
2575
2576 PR tree-optimization/69483
2577 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2578
cd8e73dc 25792016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2580
2581 PR c/24293
2582 * c-tree.h (incomplete_record_decls): Declare.
2583 * c-parser.c (incomplete_record_decls): Define.
2584 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2585 report error if any decl has zero size.
2586 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2587 or enum type to incomplete_record_decls.
2588
e6d6ec9e
TV
25892016-01-14 Tom de Vries <tom@codesourcery.com>
2590
2591 PR tree-optimization/68773
2592 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2593 set force_output.
2594
00083992
MP
25952016-01-14 Marek Polacek <polacek@redhat.com>
2596
2597 PR c/69262
2598 * c-decl.c (grokdeclarator): Provide more information for invalid
2599 array declarations.
2600
7443cf13
DM
26012016-01-06 David Malcolm <dmalcolm@redhat.com>
2602
2603 * c-parser.c (c_parser_unary_expression): For dereferences, build
2604 a combined location before calling build_indirect_ref, so that
2605 error reports cover the full range, manually updating the c_expr
2606 src_range.
2607
6b131d5b
MP
26082016-01-06 Marek Polacek <polacek@redhat.com>
2609
2610 PR sanitizer/69099
2611 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2612 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2613 NULL.
2614
818ab71a
JJ
26152016-01-04 Jakub Jelinek <jakub@redhat.com>
2616
2617 Update copyright years.
2618
2fe0a208
MP
26192016-01-04 Marek Polacek <polacek@redhat.com>
2620
2621 PR c/68908
2622 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2623 optimization to use __atomic_fetch_* built-in if possible.
2624
c7b48c8a
TS
26252015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2626
2627 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2628 into...
2629 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2630 all users.
2631
fda5652f
MP
26322015-12-22 Marek Polacek <polacek@redhat.com>
2633
2634 PR c/69002
2635 * c-typeck.c (build_component_ref): Warn when acessing elements of
2636 atomic structures or unions.
2637
745e411d
DM
26382015-12-21 David Malcolm <dmalcolm@redhat.com>
2639
2640 * c-typeck.c: Include "gcc-rich-location.h".
2641 (build_binary_op): In the two places that call binary_op_error,
2642 create a gcc_rich_location and populate it with the location of
2643 the binary op and its two operands.
2644
94c40e19
DM
26452015-12-16 David Malcolm <dmalcolm@redhat.com>
2646
2647 * c-parser.c (c_parser_statement_after_labels): When calling
2648 c_finish_return, Use the return expression's location if it has
2649 one, falling back to the location of the first token within it.
2650 * c-typeck.c (c_finish_return): When issuing warnings about
2651 the incorrect presence/absence of a return value, issue a note
2652 showing the declaration of the function.
2653
de67c4c3
DM
26542015-12-16 David Malcolm <dmalcolm@redhat.com>
2655
2656 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2657 to 4.
2658 (c_parser_peek_nth_token): New function.
2659 (c_parser_peek_conflict_marker): New function.
2660 (c_parser_error): Detect conflict markers and report them as such.
2661
a10704e1
DM
26622015-12-16 David Malcolm <dmalcolm@redhat.com>
2663
2664 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2665 to preserve range information for the primary expression
2666 in the call to c_parser_postfix_expression_after_primary.
2667
8062bca6
DM
26682015-12-16 David Malcolm <dmalcolm@redhat.com>
2669
2670 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2671 expression location, falling back on the first token location,
2672 rather than always using the latter.
2673
d06f8b75
MP
26742015-12-16 Marek Polacek <polacek@redhat.com>
2675
2676 PR c/64637
2677 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2678 available.
2679
2994fb91
MP
26802015-12-15 Marek Polacek <polacek@redhat.com>
2681
2682 PR c/68907
2683 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2684 artificial decl.
2685
a1b93f8d
DM
26862015-12-08 David Malcolm <dmalcolm@redhat.com>
2687
2688 * c-parser.c (c_parser_alignof_expression): Capture location of
2689 closing parenthesis (if any), or of end of unary expression, and
2690 use it to build a src_range for the expression.
2691
46c6e1e2
DM
26922015-12-08 David Malcolm <dmalcolm@redhat.com>
2693
2694 PR c/68757
2695 * c-parser.c (c_parser_get_builtin_args): Add
2696 "out_close_paren_loc" param, and write back to it.
2697 (c_parser_postfix_expression): Capture the closing
2698 parenthesis location for RID_CHOOSE_EXPR,
2699 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2700 RID_BUILTIN_SHUFFLE and use it to set the source range
2701 for such expressions; within RID_BUILTIN_COMPLEX set
2702 the underlying location.
2703
66189108
MP
27042015-12-07 Marek Polacek <polacek@redhat.com>
2705
2706 PR c/68668
2707 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2708 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2709
f187980b
EB
27102015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2711
2712 * c-tree.h (c_build_va_arg): Adjust prototype.
2713 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2714 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2715 parameter, adjust throughout and issue an error if EXPR is a component
2716 with reverse storage order.
2717
4250754e
JM
27182015-12-02 Jason Merrill <jason@redhat.com>
2719
2720 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2721 (c_fully_fold_internal, decl_constant_value_for_optimization):
2722 Move from c-common.c.
2723 * c-tree.h: Declare decl_constant_value_for_optimization.
2724 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2725
e9e32ee6
JM
27262015-12-02 Joseph Myers <joseph@codesourcery.com>
2727
2728 PR c/68162
2729 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2730 following link from declarator to next declarator. Track original
2731 qualified type and pass it to c_build_qualified_type.
2732 * c-typeck.c (c_build_qualified_type): Add arguments
2733 orig_qual_type and orig_qual_indirect.
2734
ff7a55bf
TS
27352015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2736
2737 * c-parser.c (c_parser_omp_clause_name)
2738 (c_parser_oacc_all_clauses): Alphabetical sorting.
2739
657e4e47
JJ
27402015-12-02 Jakub Jelinek <jakub@redhat.com>
2741
2742 PR c/68533
2743 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2744 for diagnostics.
2745
37d5ad46
JB
27462015-12-01 Julian Brown <julian@codesourcery.com>
2747 Cesar Philippidis <cesar@codesourcery.com>
2748 James Norris <James_Norris@mentor.com>
2749
2750 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2751 (c_parser_oacc_clause_use_device): New function.
2752 (c_parser_oacc_all_clauses): Add use_device support.
2753 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2754 (c_parser_oacc_host_data): New function.
2755 (c_parser_omp_construct): Add host_data support.
2756 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2757 * c-typeck.c (c_finish_oacc_host_data): New function.
2758 (c_finish_omp_clauses): Add use_device support.
2759
a4850ce9
JH
27602015-11-29 Jan Hubicka <hubicka@ucw.cz>
2761
2762 PR c/67106
2763 * c-decl.c: Set TYPE_PACKED in variants.
2764
b58d3df2
ML
27652015-11-27 Martin Liska <mliska@suse.cz>
2766
2767 PR c++/68312
2768 * c-array-notation.c (fix_builtin_array_notation_fn):
2769 Use release_vec_vec instead of vec::release.
2770 (build_array_notation_expr): Likewise.
2771 (fix_conditional_array_notations_1): Likewise.
2772 (fix_array_notation_expr): Likewise.
2773 (fix_array_notation_call_expr): Likewise.
2774
aec17bfe
JJ
27752015-11-27 Jakub Jelinek <jakub@redhat.com>
2776
2777 PR c/63326
2778 * c-parser.c (c_parser_compound_statement_nostart): If
2779 last_label is true, use pragma_stmt instead of pragma_compound
2780 as second c_parser_pragma argument.
2781 (c_parser_omp_ordered, c_parser_omp_target_update,
2782 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2783 false as second argument to c_parser_skip_to_pragma_eol after
2784 diagnosing standalone directives used in pragma_stmt context.
2785
688c4de0
IV
27862015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2787
2788 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2789 with "if (ENABLE_OFFLOADING)".
2790
cbd03aee
DM
27912015-11-23 David Malcolm <dmalcolm@redhat.com>
2792
2793 PR objc/68438
2794 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2795 for various Objective-C constructs: Class.name syntax,
2796 @selector(), @protocol(), @encode(), and [] message syntax.
2797
a87a86e1
DM
27982015-11-20 David Malcolm <dmalcolm@redhat.com>
2799
2800 PR 62314
2801 * c-typeck.c (should_suggest_deref_p): New function.
2802 (build_component_ref): Special-case POINTER_TYPE when
2803 generating a "not a structure of union" error message, and
2804 suggest a "->" rather than a ".", providing a fix-it hint.
2805
8ece8dfb
DM
28062015-11-19 David Malcolm <dmalcolm@redhat.com>
2807
2808 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2809 candidate into a new function, find_closest_identifier.
2810
433068cc
MP
28112015-11-19 Marek Polacek <polacek@redhat.com>
2812
2813 PR c/68412
2814 * c-typeck.c (parser_build_binary_op): Properly handle
2815 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2816
bef08b71
DM
28172015-11-17 David Malcolm <dmalcolm@redhat.com>
2818
2819 * c-parser.c (set_c_expr_source_range): Bulletproof both
2820 overloaded implementations against NULL expr->value.
2821 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2822 values.
2823 (c_parser_unary_expression): Likewise when handling addresses of
2824 labels.
2825 (c_parser_postfix_expression): Likewise for statement expressions,
2826 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2827 __builtin_va_arg, and for __builtin_offset_of.
2828 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2829 src_range using the range of the braced initializer.
2830 (c_parser_transaction_expression): Set src_range for "ret" to a
2831 sane pair of values.
2832
fff77217
KY
28332015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2834
2835 * c-parser.c (c_finish_omp_declare_simd): Look for
2836 "simd" attribute as well. Update error message.
2837
1d899da2
TS
28382015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2839
2840 * c-parser.c (c_parser_omp_declare_target): Adjust.
2841
e4606348
JJ
28422015-11-14 Jakub Jelinek <jakub@redhat.com>
2843
2844 * c-typeck.c (c_finish_omp_clauses): Don't mark
2845 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2846
3e636daf
MP
28472015-11-14 Marek Polacek <polacek@redhat.com>
2848
2849 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2850 * c-typeck.c: Likewise.
2851
ebedc9a3
DM
28522015-11-13 David Malcolm <dmalcolm@redhat.com>
2853
2854 * c-decl.c (warn_defaults_to): Pass line_table to
2855 rich_location ctor.
2856 * c-errors.c (pedwarn_c99): Likewise.
2857 (pedwarn_c90): Likewise.
2858 * c-parser.c (set_c_expr_source_range): New functions.
2859 (c_token::get_range): New method.
2860 (c_token::get_finish): New method.
2861 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2862 based on the range from the start of the LHS to the end of the
2863 RHS.
2864 (c_parser_conditional_expression): Likewise, based on the range
2865 from the start of the cond.value to the end of exp2.value.
2866 (c_parser_binary_expression): Call set_c_expr_source_range on
2867 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2868 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2869 based on the cast_loc through to the end of the expr.
2870 (c_parser_unary_expression): Likewise, based on the
2871 op_loc through to the end of op.
2872 (c_parser_sizeof_expression) Likewise, based on the start of the
2873 sizeof token through to either the closing paren or the end of
2874 expr.
2875 (c_parser_postfix_expression): Likewise, using the token range,
2876 or from the open paren through to the close paren for
2877 parenthesized expressions.
2878 (c_parser_postfix_expression_after_primary): Likewise, for
2879 various kinds of expression.
2880 * c-tree.h (struct c_expr): Add field "src_range".
2881 (c_expr::get_start): New method.
2882 (c_expr::get_finish): New method.
2883 (set_c_expr_source_range): New decls.
2884 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2885 on ret for prefix unary ops.
2886 (parser_build_binary_op): Likewise, running from the start of
2887 arg1.value through to the end of arg2.value.
2888
ec8b536f
MP
28892015-11-13 Marek Polacek <polacek@redhat.com>
2890
2891 PR c/68320
2892 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2893
277fe616
DM
28942015-11-13 David Malcolm <dmalcolm@redhat.com>
2895
2896 * c-typeck.c: Include spellcheck.h.
2897 (lookup_field_fuzzy_find_candidates): New function.
2898 (lookup_field_fuzzy): New function.
2899 (build_component_ref): If the field was not found, try using
2900 lookup_field_fuzzy and potentially offer a suggestion.
2901
6e232ba4
JN
29022015-11-12 James Norris <jnorris@codesourcery.com>
2903 Joseph Myers <joseph@codesourcery.com>
2904
2905 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2906 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2907 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2908 and PRAGMA_OMP_CLAUSE_LINK.
2909 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2910 and PRAGMA_OACC_CLAUSE_LINK.
2911 (OACC_DECLARE_CLAUSE_MASK): New definition.
2912 (c_parser_oacc_declare): New function.
2913
9be4f715
MP
29142015-11-12 Marek Polacek <polacek@redhat.com>
2915
2916 PR c/67784
2917 * c-parser.c (c_parser_for_statement): Reclassify the token in
2918 a correct scope.
2919
e78bede6
MP
29202015-11-11 Marek Polacek <polacek@redhat.com>
2921
2922 PR c/68107
2923 PR c++/68266
2924 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2925 checking the size of an array.
2926
69f293c9
AM
29272015-11-11 Andrew MacLeod <amacleod@redhat.com>
2928
2929 * c-array-notation.c: Remove unused header files.
2930 * c-aux-info.c: Likewise.
2931 * c-convert.c: Likewise.
2932 * c-decl.c: Likewise.
2933 * c-errors.c: Likewise.
2934 * c-lang.c: Likewise.
2935 * c-objc-common.c: Likewise.
2936 * c-parser.c: Likewise.
2937 * c-typeck.c: Likewise.
2938 * gccspec.c: Likewise.
2939
3a40d81d
NS
29402015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2941 Cesar Philippidis <cesar@codesourcery.com>
2942 James Norris <jnorris@codesourcery.com>
2943 Julian Brown <julian@codesourcery.com>
2944 Nathan Sidwell <nathan@codesourcery.com>
2945
2946 c/
2947 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2948 routine arg.
2949 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2950 (c_parser_pragma): Parse 'acc routine'.
2951 (OACC_ROUTINE_CLAUSE_MARK): Define.
2952 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2953
fc402eec
AA
29542015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2955
2956 PR debug/67192
2957 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2958 location of the backward-goto to the start of the loop body.
2959
f6b0b3db
AA
29602015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2961
2962 PR debug/67192
2963 * c-parser.c (c_parser_while_statement): Finish the loop before
2964 parsing ahead for misleading indentation.
2965 (c_parser_for_statement): Likewise.
2966
ee45a32d
EB
29672015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2968
2969 * c-decl.c (finish_struct): If the structure has reverse storage
2970 order, rewrite the type of array fields with scalar component. Call
2971 maybe_apply_pragma_scalar_storage_order on entry.
2972 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2973 errors on bit-fields and reverse SSO here and not...
2974 (c_mark_addressable): ...here.
2975 (output_init_element): Adjust call to initializer_constant_valid_p.
2976 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2977
8a645150
DM
29782015-11-06 David Malcolm <dmalcolm@redhat.com>
2979
2980 * c-decl.c (warn_defaults_to): Update for change in signature
2981 of diagnostic_set_info.
2982 * c-errors.c (pedwarn_c99): Likewise.
2983 (pedwarn_c90): Likewise.
2984 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2985 for textinfo::set_location.
2986
7a5e4956
CP
29872015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2988 Thomas Schwinge <thomas@codesourcery.com>
2989 James Norris <jnorris@codesourcery.com>
2990
2991 * c-parser.c (c_parser_omp_clause_name): Add support for
2992 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2993 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2994 default(none) in OpenACC.
2995 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2996 arguments.
2997 (c_parser_oacc_clause_tile): New function.
2998 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2999 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3000 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3001 TILE}.
3002 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3003 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3004 FIRSTPRIVATE}.
3005 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3006 (c_parser_oacc_update): Update the error message for missing clauses.
3007 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3008 and OMP_CLAUSE_INDEPENDENT.
3009
bfcfbfa0
MP
30102015-11-05 Marek Polacek <polacek@redhat.com>
3011
3012 PR c/68090
3013 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3014 deal with pre-evaluation on invalid types.
3015
e01d41e5
JJ
30162015-11-05 Jakub Jelinek <jakub@redhat.com>
3017 Ilya Verbin <ilya.verbin@intel.com>
3018
3019 * c-parser.c: Include context.h and gimple-expr.h.
3020 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3021 monotonic together with nonmonotonic.
3022 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3023 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3024 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3025 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3026 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3027 expressions on combined target teams before the target.
3028 (c_parser_omp_declare_target): If decl has "omp declare target" or
3029 "omp declare target link" attribute, and cgraph or varpool node already
3030 exists, then set corresponding flags. Call c_finish_omp_clauses
3031 in the parenthesized extended-list syntax case.
3032 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3033 declare target.
3034 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3035 on OMP_CLAUSE_REDUCTION array sections.
3036 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3037 into the constant offset, or for variable low-bound using
3038 POINTER_PLUS_EXPR. For structure element based array sections use
3039 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3040 (c_finish_omp_clauses): Drop generic_field_head, structure
3041 elements are now always mapped even as array section bases,
3042 diagnose same var in data sharing and mapping clauses. Diagnose if
3043 linear step on declare simd is neither a constant nor a uniform
3044 parameter. Look through POINTER_PLUS_EXPR for array section
3045 reductions. Diagnose the same var or function appearing multiple
3046 times on the same directive. Fix up wording for the to clause if t
3047 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3048 modifier on kinds other than dynamic or guided or nonmonotonic
3049 modifier together with ordered clause.
3050
4bf9e5a8
TS
30512015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3052 Chung-Lin Tang <cltang@codesourcery.com>
3053
3054 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3055
2adfab87
AM
30562015-10-29 Andrew MacLeod <amacleod@redhat.com>
3057
3058 * c-array-notation.c: Reorder #include's and remove duplicates.
3059 * c-aux-info.c: Likewise.
3060 * c-convert.c: Likewise.
3061 * c-decl.c: Likewise.
3062 * c-errors.c: Likewise.
3063 * c-lang.c: Likewise.
3064 * c-objc-common.c: Likewise.
3065 * c-parser.c: Likewise.
3066 * c-typeck.c: Likewise.
3067
e922069e
JW
30682015-10-26 Jim Wilson <jim.wilson@linaro.org>
3069
3070 PR debug/66068
3071 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3072 after calling build_qualified_type.
3073
765dd391
CP
30742015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3075 Thomas Schwinge <thomas@codesourcery.com>
3076 James Norris <jnorris@codesourcery.com>
3077 Joseph Myers <joseph@codesourcery.com>
3078 Julian Brown <julian@codesourcery.com>
3079 Bernd Schmidt <bschmidt@redhat.com>
3080
3081 * c-parser.c (c_parser_oacc_shape_clause): New.
3082 (c_parser_oacc_simple_clause): New.
3083 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3084 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3085
88bae6f4
TS
30862015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3087 James Norris <jnorris@codesourcery.com>
3088 Cesar Philippidis <cesar@codesourcery.com>
3089
3090 PR c/64765
3091 PR c/64880
3092 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3093 parameters, and handle these. Adjust all users.
3094 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3095 into...
3096 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3097 all users.
3098 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3099 declare functions.
3100 (c_finish_omp_construct): Declare function.
3101 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3102 Merge functions into...
3103 (c_finish_omp_construct): ... this new function.
3104
a8fc2579
RB
31052015-10-22 Richard Biener <rguenther@suse.de>
3106
3107 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3108 before folding a MINUS_EXPR.
3109
e9122ef6
MP
31102015-10-21 Marek Polacek <polacek@redhat.com>
3111
3112 PR c/68024
3113 * c-decl.c (start_function): Warn about vararg functions without
3114 a prototype.
3115
9f47c7e5
IE
31162015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3117
3118 * c-typeck.c (build_conditional_expr): Use boolean vector
3119 type for vector comparison.
3120 (build_vec_cmp): New.
3121 (build_binary_op): Use build_vec_cmp for comparison.
3122
fa60eeb9
MP
31232015-10-20 Marek Polacek <polacek@redhat.com>
3124
3125 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3126
2c7020eb
MP
31272015-10-20 Marek Polacek <polacek@redhat.com>
3128
3129 PR c/67964
3130 * c-parser.c (c_parser_attributes): Break out of the loop if the
3131 token after an attribute isn't a comma.
3132
d9a6bd32
JJ
31332015-10-13 Jakub Jelinek <jakub@redhat.com>
3134 Aldy Hernandez <aldyh@redhat.com>
3135
3136 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3137 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3138 (c_parser_omp_variable_list): Handle structure elements for
3139 map, to and from clauses. Handle array sections in reduction
3140 clause. Formatting fixes.
3141 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3142 if clause modifiers.
3143 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3144 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3145 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3146 c_parser_omp_clause_is_device_ptr): New functions.
3147 (c_parser_omp_clause_ordered): Parse optional parameter.
3148 (c_parser_omp_clause_reduction): Handle array reductions.
3149 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3150 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3151 functions.
3152 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3153 (c_parser_omp_clause_depend_sink): New function.
3154 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3155 (c_parser_omp_clause_map): Parse release/delete map kinds and
3156 optional always modifier.
3157 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3158 and c_finish_omp_clauses callers.
3159 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3160 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3161 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3162 (OMP_CRITICAL_CLAUSE_MASK): Define.
3163 (c_parser_omp_critical): Parse critical clauses.
3164 (c_parser_omp_for_loop): Handle doacross loops, adjust
3165 c_finish_omp_for and c_finish_omp_clauses callers.
3166 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3167 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3168 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3169 (c_parser_omp_for): Disallow ordered clause when combined with
3170 distribute. Disallow linear clause when combined with distribute
3171 and not combined with simd.
3172 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3173 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3174 parse clauses and if depend clause is found, don't parse a body.
3175 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3176 Allow target parallel without for after it.
3177 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3178 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3179 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3180 invalid kinds.
3181 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3182 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3183 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3184 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3185 functions.
3186 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3187 defaultmap and is_device_ptr clauses.
3188 (c_parser_omp_target): Parse target parallel and target simd. Set
3189 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3190 and target exit data. Diagnose invalid map kinds.
3191 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3192 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3193 construct.
3194 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3195 &omp_priv.
3196 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3197 (c_parser_omp_taskloop): New function.
3198 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3199 handle PRAGMA_OMP_TASKLOOP.
3200 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3201 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3202 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3203 Add IS_OMP argument, handle structure element bases, diagnose
3204 bitfields, pass IS_OMP recursively, diagnose known zero length
3205 array sections in depend clauses, handle array sections in reduction
3206 clause, diagnose negative length even for pointers.
3207 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3208 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3209 array sections in reduction clause, set
3210 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3211 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3212 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3213 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3214
21ba0cea
MP
32152015-10-06 Marek Polacek <polacek@redhat.com>
3216
3217 * c-parser.c (c_parser_statement_after_labels): Use
3218 protected_set_expr_location.
3219 (c_parser_omp_clause_num_gangs): Likewise.
3220 (c_parser_omp_clause_num_threads): Likewise.
3221 (c_parser_omp_clause_num_workers): Likewise.
3222 (c_parser_omp_clause_vector_length): Likewise.
3223 (c_parser_omp_clause_num_teams): Likewise.
3224 (c_parser_omp_clause_thread_limit): Likewise.
3225 * c-typeck.c (build_c_cast): Likewise.
3226 (c_cast_expr): Likewise.
3227
624d31fe
RS
32282015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3229
3230 * c-typeck.c (c_tree_equal): Use real_equal instead of
3231 REAL_VALUES_EQUAL.
3232
b8fd7909
JM
32332015-10-04 Jason Merrill <jason@redhat.com>
3234
3235 * c-parser.c (c_lex_one_token): Handle @synchronized.
3236 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3237 can change whether the function is transaction_safe.
3238
1c7485af
MP
32392015-10-02 Marek Polacek <polacek@redhat.com>
3240
3241 PR c/67730
3242 * c-typeck.c (convert_for_assignment): Use the expansion point
3243 location throughout.
3244
3e3b8d63
MP
32452015-10-02 Marek Polacek <polacek@redhat.com>
3246
3247 PR c/64249
3248 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3249 and pass it down to c_parser_if_statement.
3250 (c_parser_else_body): Add CHAIN parameter and pass it down to
3251 c_parser_statement_after_labels.
3252 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3253 duplicated if-else-if conditions.
3254
aabef2de
MP
32552015-10-01 Marek Polacek <polacek@redhat.com>
3256
3257 * c-typeck.c (convert_for_assignment): Improve commentary.
3258
de8ddd5f
MP
32592015-09-30 Marek Polacek <polacek@redhat.com>
3260
3261 PR c/67730
3262 * c-typeck.c (c_finish_return): Use the expansion point location for
3263 certain "return with value" warnings.
3264
c4914de6
MLI
32652015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3266
3267 * c-parser.c (pragma_lex): Add loc argument.
3268
0e36f5c7
MP
32692015-09-15 Marek Polacek <polacek@redhat.com>
3270
3271 PR c/67580
3272 * c-decl.c (tag_exists_p): New function.
3273 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3274 struct/union/enum keywords are missing.
3275 * c-tree.h (tag_exists_p): Declare.
3276
2f3bb934
MP
32772015-09-15 Marek Polacek <polacek@redhat.com>
3278
3279 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3280 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3281 Return NULL_TREE instead of 0.
3282 (lookup_name): Return NULL_TREE instead of 0.
3283 (lookup_name_in_scope): Likewise.
3284 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3285 (parser_xref_tag): Use false instead of 0.
3286 (start_struct): Use true instead of 1.
3287 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3288
aa256c4a
MP
32892015-09-14 Marek Polacek <polacek@redhat.com>
3290
3291 * c-typeck.c (set_nonincremental_init_from_string): Use
3292 HOST_WIDE_INT_M1U when shifting a negative value.
3293
dbb68221
MW
32942015-09-09 Mark Wielaard <mjw@redhat.com>
3295
3296 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3297 parm against NULL.
3298
a8a098ac
JJ
32992015-09-10 Jakub Jelinek <jakub@redhat.com>
3300
3301 PR c/67502
3302 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3303 into OMP_FOR_PRE_BODY rather than before the loop.
3304
f4b189d5
JJ
33052015-09-09 Jakub Jelinek <jakub@redhat.com>
3306
0bb99c11
JJ
3307 PR c/67501
3308 * c-parser.c (c_parser_oacc_all_clauses,
3309 c_parser_omp_all_clauses): Remove invalid clause from
3310 list of clauses even if parser->error is set.
3311
fce5e5e3
JJ
3312 PR c/67500
3313 * c-parser.c (c_parser_omp_clause_aligned,
3314 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3315 test for errors.
3316 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3317 error_mark_node.
3318
f4b189d5
JJ
3319 PR c/67495
3320 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3321 instead of c_parser_unary_expression. If the result is !lvalue_p,
3322 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3323
b2aaf235
MP
33242015-09-04 Marek Polacek <polacek@redhat.com>
3325
3326 PR sanitizer/67279
3327 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3328
1807ffc1
MS
33292015-09-03 Martin Sebor <msebor@redhat.com>
3330
3331 PR c/66516
8b652e65
JJ
3332 * c-typeck.c (convert_arguments, parser_build_unary_op,
3333 build_conditional_expr, c_cast_expr, convert_for_assignment,
3334 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3335 reject_gcc_builtin.
3336 (c_decl_implicit): Define.
3337
d04ff417
MP
33382015-09-02 Marek Polacek <polacek@redhat.com>
3339
3340 PR c/67432
3341 * c-parser.c (c_parser_enum_specifier): Give a better error for
3342 an empty enum.
3343
a79683d5
TS
33442015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3345
3346 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3347
191a6b94
MP
33482015-08-12 Marek Polacek <polacek@redhat.com>
3349
3350 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3351 LOC to it.
3352
420a9d9b
MP
33532015-08-03 Marek Polacek <polacek@redhat.com>
3354
3355 PR c/67088
3356 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3357 Use it.
3358 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3359
992118a1
PP
33602015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3361
3362 * c-parser.c (c_parser_if_body): Take token_indent_info
3363 argument. Call warn_for_misleading_indentation even when the
3364 body is a semicolon. Extract token_indent_infos corresponding
3365 to the guard, body and next tokens. Adjust call to
3366 warn_for_misleading_indentation accordingly.
3367 (c_parser_else_body): Likewise.
3368 (c_parser_if_statement): Likewise.
3369 (c_parser_while_statement): Likewise.
3370 (c_parser_for_statement): Likewise.
3371
46308474
LFSM
33722015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3373 Manuel López-Ibáñez <manu@gcc.gnu.org>
3374
3375 * c-decl.c (get_parm_info): Remove static var. Update warning
3376 message.
3377
05b28fd6
MP
33782015-07-27 Marek Polacek <polacek@redhat.com>
3379
3380 PR c++/66555
3381 PR c/54979
3382 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3383
451b5e48
MP
33842015-07-20 Marek Polacek <polacek@redhat.com>
3385
3386 PR c++/55095
3387 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3388 (build_binary_op): Warn about left shift overflows.
3389
1916bcb5
AM
33902015-07-09 Andrew MacLeod <amacleod@redhat.com>
3391
3392 * c-array-notation.c: Adjust includes for flags.h changes.
3393 * c-objc-common.c: Likewise.
3394
c7131fb2
AM
33952015-07-07 Andrew MacLeod <amacleod@redhat.com>
3396
3397 * c-array-notation.c: Adjust includes.
3398 * c-aux-info.c: Likewise.
3399 * c-convert.c: Likewise.
3400 * c-decl.c: Likewise.
3401 * c-errors.c: Likewise.
3402 * c-lang.c: Likewise.
3403 * c-objc-common.c: Likewise.
3404 * c-parser.c: Likewise.
3405 * c-typeck.c: Likewise.
3406
da2e71c9
MLI
34072015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3408
3409 PR fortran/66605
3410 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3411
b155cfd9
MP
34122015-06-29 Marek Polacek <polacek@redhat.com>
3413
3414 PR c/66322
3415 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3416 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3417 about -Wswitch-bool here.
3418 (do_case): Update c_add_case_label call.
3419 (c_finish_case): Update c_do_switch_warnings call.
3420
31521951
MP
34212015-06-27 Marek Polacek <polacek@redhat.com>
3422
3423 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3424
22d03525
MP
34252015-06-26 Marek Polacek <polacek@redhat.com>
3426
3427 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3428 INDIRECT_REF_P.
3429 * c-typeck.c (array_to_pointer_conversion): Likewise.
3430 (build_unary_op): Likewise.
3431 (c_finish_return): Likewise.
3432
f0889939
AM
34332015-06-25 Andrew MacLeod <amacleod@redhat.com>
3434
3435 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3436 * c-parser.c: Likewise.
3437
8d67ee55
RS
34382015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3439
3440 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3441 instead of pointer_hash.
3442 (detect_field_duplicates): Likewise.
3443
0ae9bd27
MP
34442015-06-25 Marek Polacek <polacek@redhat.com>
3445
3446 * c-array-notation.c: Use VAR_P throughout.
3447 * c-decl.c: Likewise.
3448 * c-objc-common.c: Likewise.
3449 * c-parser.c: Likewise.
3450 * c-typeck.c: Likewise.
3451
62f9079a
MP
34522015-06-25 Marek Polacek <polacek@redhat.com>
3453
3454 * c-decl.c: Use is_global_var throughout.
3455 * c-parser.c: Likewise.
3456 * c-typeck.c: Likewise.
3457
abb226c9
AM
34582015-06-17 Andrew MacLeod <amacleod@redhat.com>
3459
3460 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3461 * c-aux-info.c: Likewise.
3462 * c-convert.c: Likewise.
3463 * c-decl.c: Likewise.
3464 * c-errors.c: Likewise.
3465 * c-lang.c: Likewise.
3466 * c-objc-common.c: Likewise.
3467 * c-parser.c: Likewise.
3468 * c-typeck.c: Likewise.
3469
8cbababc
JH
34702015-06-11 Jan Hubicka <hubicka@ucw.cz>
3471
3472 PR middle-end/66325
3473 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3474 variants.
3475
a0349665
PMR
34762015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3477
3478 * c-decl.c (pop_scope): Register the main translation unit
3479 through the new debug hook.
3480
13fdf2e2
AM
34812015-06-08 Andrew MacLeod <amacleod@redhat.com>
3482
3483 * c-array-notation.c : Adjust include files.
3484 * c-aux-info.c : Likewise.
3485 * c-convert.c : Likewise.
3486 * c-decl.c : Likewise.
3487 * c-errors.c : Likewise.
3488 * c-lang.c : Likewise.
3489 * c-lang.h : Likewise.
3490 * c-objc-common.c : Likewise.
3491 * c-parser.c : Likewise.
3492 * c-typeck.c : Likewise.
3493
d7438551
AH
34942015-06-05 Aldy Hernandez <aldyh@redhat.com>
3495
3496 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3497 immediately clobber it.
3498 (c_write_global_declarations_1): Remove call to
3499 check_global_declaration_1.
3500 (c_write_global_declarations_2): Remove.
3501 (c_write_final_cleanups): Rename from c_write_global_declarations.
3502 Remove call to finalize_compilation_unit.
3503 Remove calls to debugging hooks.
3504 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3505 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3506 * c-tree.h: Remove c_write_global_declarations.
3507
ecb9f223
AM
35082015-06-04 Andrew MacLeod <amacleod@redhat.com>
3509
3510 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3511 * c-aux-info.c: Likewise.
3512 * c-convert.c: Likewise.
3513 * c-decl.c: Likewise.
3514 * c-errors.c: Likewise.
3515 * c-lang.c: Likewise.
3516 * c-objc-common.c: Likewise.
3517 * c-parser.c: Likewise.
3518 * c-typeck.c: Likewise.
3519
9482b620
MP
35202015-06-04 Marek Polacek <polacek@redhat.com>
3521
3522 PR c/66341
3523 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3524 it is a lvalue.
3525
bc51ace3
PK
35262015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3527
3528 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3529 Warn for empty struct.
3530 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3531
ea5b45b6
AT
35322015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3533
3534 * c-decl.c (start_function): Call plugin before parsing.
3535 (finish_function): Call plugin after parsing.
3536
c2d47482
PK
35372015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3538
3539 PR c/49551
3540 * c-decl.c (merge_decls): Merge DECL_COMMON.
3541
a95492ab
JW
35422015-05-22 Jim Wilson <jim.wilson@linaro.org>
3543
3544 * Make-lang.in (check_gcc_pallelize): Define.
3545
fd5c817a
MP
35462015-05-22 Marek Polacek <polacek@redhat.com>
3547
3548 PR c/47043
3549 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3550 attributes.
3551
c7b70a3c
MP
35522015-05-21 Marek Polacek <polacek@redhat.com>
3553
3554 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3555 DECL_BUILT_IN.
3556
21b634ae
MP
35572015-05-20 Marek Polacek <polacek@redhat.com>
3558
3559 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3560 * c-typeck.c: Likewise.
3561
296a8c2f
MP
35622015-05-19 Marek Polacek <polacek@redhat.com>
3563
3564 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3565
41b37d5e
JJ
35662015-05-19 Jakub Jelinek <jakub@redhat.com>
3567
3568 PR middle-end/66199
3569 * c-parser.c (c_parser_omp_for_loop): Don't add
3570 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3571 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3572 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3573 constructs.
3574
fab27f52
MM
35752015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3576
3577 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3578 swaps.
fab27f52 3579
40de31cf
MLI
35802015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3581
3582 PR fortran/44054
3583 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3584 accessor function.
3585
3aa3c9fc
MP
35862015-05-14 Marek Polacek <polacek@redhat.com>
3587
3588 PR c/66066
3589 PR c/66127
3590 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3591 rather than with 0.
3592
c3388e62
DM
35932015-05-12 David Malcolm <dmalcolm@redhat.com>
3594
3595 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3596 to add a call to warn_for_misleading_indentation.
3597 (c_parser_else_body): Likewise, adding param "else_loc".
3598 (c_parser_if_statement): Check for misleading indentation.
3599 (c_parser_while_statement): Likewise.
3600 (c_parser_for_statement): Likewise.
3601
755e528f
MP
36022015-05-08 Marek Polacek <polacek@redhat.com>
3603
3604 PR c/64918
3605 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3606 (output_init_element): Likewise.
3607
0173bd2a
MP
36082015-05-07 Marek Polacek <polacek@redhat.com>
3609
3610 PR c/65179
3611 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3612 value.
3613
9babc352
MP
36142015-04-30 Marek Polacek <polacek@redhat.com>
3615
3616 * c-typeck.c (set_init_label): Call error_at instead of error and
3617 pass LOC to it.
3618
ac9f18db
MP
3619 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3620 the type of a decl.
3621
ec3fba51
MP
3622 * c-typeck.c (c_build_va_arg): Clarify the error message.
3623
b811915d
TS
36242015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3625
3626 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3627 OMP_STANDALONE_CLAUSES.
3628
f3075008
MP
36292015-04-28 Marek Polacek <polacek@redhat.com>
3630
3631 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3632
4e81b788
MP
36332015-04-28 Marek Polacek <polacek@redhat.com>
3634
3635 PR c/65901
3636 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3637
6c1db78e
MP
36382015-04-25 Marek Polacek <polacek@redhat.com>
3639
3640 PR c/52085
3641 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3642 attribute.
3643
5c4abbb8
MP
36442015-04-23 Marek Polacek <polacek@redhat.com>
3645
3646 PR c/65345
3647 * c-decl.c (set_labels_context_r): New function.
3648 (store_parm_decls): Call it via walk_tree_without_duplicates.
3649 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3650 instead of create_tmp_var. Build TARGET_EXPR instead of
3651 COMPOUND_EXPR.
3652 (build_atomic_assign): Use create_tmp_var_raw instead of
3653 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3654
06aca1d5
IV
36552015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3656
3657 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3658 (c_parser_omp_target_update): Add missed %> to error_at ().
3659
8fba1830
BRF
36602015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3661
3662 PR target/55143
3663 * c-decl.c (c_default_pointer_mode): Remove definition.
3664 * c-tree.h (c_default_pointer_mode): Remove declaration.
3665
62021f64
TB
36662015-03-27 Tobias Burnus <burnus@net-b.de>
3667
3668 PR c/65586
3669 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3670 error out.
3671 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3672 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3673 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3674
9b65e171
JJ
36752015-03-19 Jakub Jelinek <jakub@redhat.com>
3676
3677 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3678 attribute for DECL_EXTERNAL VAR_DECLs.
3679
17958621
JJ
36802015-03-11 Jakub Jelinek <jakub@redhat.com>
3681
3682 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3683 argument.
3684
7ccb1a11
JJ
36852015-03-10 Jakub Jelinek <jakub@redhat.com>
3686
3687 PR c/65120
3688 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3689 before preparing arguments to warn_logical_not_parentheses.
3690
01177669
JJ
36912015-03-09 Jakub Jelinek <jakub@redhat.com>
3692
3693 PR c/65120
3694 * c-typeck.c (parser_build_binary_op): Don't warn for
3695 !!x == y or !b == y where b is _Bool.
3696
802ac282
MP
36972015-03-09 Marek Polacek <polacek@redhat.com>
3698
3699 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3700 * c-decl.c (grokdeclarator): Likewise.
3701 * c-typeck.c (build_binary_op): Likewise.
3702
e5165b60
MP
37032015-02-27 Marek Polacek <polacek@redhat.com>
3704
3705 PR c/65228
3706 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3707
065d214c
MP
37082015-02-14 Marek Polacek <polacek@redhat.com>
3709
3710 PR c/64768
3711 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3712 declared through a typedef name.
3713
e5d9235b
MP
37142015-02-13 Marek Polacek <polacek@redhat.com>
3715
3716 PR c/65050
3717 * c-decl.c (grokdeclarator): Print also the type when giving
3718 the error message about array's incomplete element type.
3719
fa01ffcc
JJ
37202015-02-11 Jakub Jelinek <jakub@redhat.com>
3721
3722 PR c/64824
3723 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3724 check in the POP macro.
3725
c3e38a03
MP
37262015-02-09 Marek Polacek <polacek@redhat.com>
3727
3728 PR c/64856
3729 * c-typeck.c (process_init_element): Don't always wrap
3730 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3731 initializing a range of elements.
3732
4886ec8e
JJ
37332015-02-04 Jakub Jelinek <jakub@redhat.com>
3734
3735 PR c/64824
3736 PR c/64868
3737 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3738
c3e38a03 37392015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3740
3741 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3742 processing enum declaration.
3743
7b33f0c8
MP
37442015-01-29 Marek Polacek <polacek@redhat.com>
3745
3746 PR c/64709
3747 * c-typeck.c (pop_init_level): If constructor_elements has
3748 exactly one element with integer_zerop value, set constructor_zeroinit
3749 to 1. Remove braces around warning_init call.
3750
dea63e49
JJ
37512015-01-27 Jakub Jelinek <jakub@redhat.com>
3752
3753 PR c/64766
3754 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3755 of FUNCTION_DECLs with error_mark_node.
3756
d38f7dce
JJ
37572015-01-26 Jakub Jelinek <jakub@redhat.com>
3758
3759 PR c/64778
3760 * c-typeck.c (convert_arguments): Return -1 if there are
3761 error_args, even if we've diagnosed too many arguments.
3762
cbf5d0e7
RB
37632015-01-21 Richard Biener <rguenther@suse.de>
3764
3765 PR middle-end/64313
3766 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3767 for builtins the user declared correctly.
3768
41dbbb37
TS
37692015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3770 Bernd Schmidt <bernds@codesourcery.com>
3771 Cesar Philippidis <cesar@codesourcery.com>
3772 James Norris <jnorris@codesourcery.com>
3773 Jakub Jelinek <jakub@redhat.com>
3774 Ilmir Usmanov <i.usmanov@samsung.com>
3775
3776 * c-parser.c: Include "gomp-constants.h".
3777 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3778 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3779 Use OMP_CLAUSE_SET_MAP_KIND.
3780 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3781 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3782 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3783 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3784 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3785 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3786 "copyout", "create", "delete", "deviceptr", "gang", "host",
3787 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3788 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3789 "present_or_create", "pcreate", "seq", "self", "vector",
3790 "vector_length", "wait", "worker".
3791 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3792 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3793 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3794 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3795 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3796 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3797 (c_parser_oacc_data_clause_deviceptr)
3798 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3799 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3800 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3801 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3802 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3803 (c_parser_oacc_parallel, c_parser_oacc_update)
3804 (c_parser_oacc_wait): New functions.
3805 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3806 (c_finish_oacc_data): New prototypes.
3807 * c-typeck.c: Include "gomp-constants.h".
3808 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3809 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3810 OMP_CLAUSE_SET_MAP_KIND.
3811 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3812 (c_finish_oacc_data): New functions.
3813 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3814 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3815 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3816 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3817 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3818 GOMP_MAP_FORCE_DEVICEPTR.
3819
adfac8df
JJ
38202015-01-09 Michael Collison <michael.collison@linaro.org>
3821
3822 * c-array-notation.c: Include hash-set.h, machmode.h,
3823 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3824 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3825 * c-aux-info.c: Ditto.
3826 * c-convert.c: Ditto.
3827 * c-decl.c: Ditto.
3828 * c-errors.c: Ditto.
3829 * c-lang.c: Dittoxs.
3830 * c-objc-common.c: Ditto.
3831 * c-parser.c: Ditto.
3832 * c-typeck.c: Include hash-set.h, machmode.h,
3833 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3834 fold-const.h, wide-int.h, inchash.h, real.h and
3835 fixed-value.h due to flattening of tree.h.
3836
2cc901dc
MP
38372015-01-07 Marek Polacek <polacek@redhat.com>
3838
3839 PR c/64417
3840 * c-typeck.c (process_init_element): Disallow initialization of
3841 a flexible array member with a string constant if the structure
3842 is in an array.
3843
5624e564
JJ
38442015-01-05 Jakub Jelinek <jakub@redhat.com>
3845
e5341100
JJ
3846 PR sanitizer/64344
3847 * c-typeck.c (convert_for_assignment, c_finish_return): For
3848 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3849 types also set in_late_binary_op around convert call.
3850 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3851 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3852 result on expr as last argument to ubsan_instrument_float_cast,
3853 if in_late_binary_op, don't use c_save_expr but save_expr.
3854
5624e564
JJ
3855 Update copyright years.
3856
5bd012f8
MP
38572015-01-05 Marek Polacek <polacek@redhat.com>
3858
3859 PR c/64423
3860 * c-typeck.c (build_array_ref): Pass loc down to
3861 warn_array_subscript_with_type_char.
3862
3f8257db 38632014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3864
3865 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3866 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3867 element type.
8e745a17 3868 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3869 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3870 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3871 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3872 to PEDWARN_FOR_QUALIFIERS.
768952be 3873
8f94a8c4
JJ
38742014-12-17 Jakub Jelinek <jakub@redhat.com>
3875
3876 PR sanitizer/64289
3877 * c-convert.c: Include ubsan.h.
3878 (convert): For real -> integral casts and
3879 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3880 instead instrument the float cast directly.
3881
b731b390
JJ
38822014-11-29 Jakub Jelinek <jakub@redhat.com>
3883
3884 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3885 c_finish_stmt_expr): Remove NULL last argument from
3886 create_tmp_var_raw and create_tmp_var calls.
3887 * c-array-notation.c (fix_builtin_array_notation_fn,
3888 build_array_notation_expr, fix_conditional_array_notations_1,
3889 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3890
541e35a6
MP
38912014-11-28 Marek Polacek <polacek@redhat.com>
3892
3893 PR c/63862
3894 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3895 convert the right operand to integer type.
3896
b286be94
MP
38972014-11-25 Marek Polacek <polacek@redhat.com>
3898
3899 PR c/63877
3900 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3901 for inline functions.
3902
aa7da51a
JJ
39032014-11-21 Jakub Jelinek <jakub@redhat.com>
3904
3905 PR target/63764
3906 * c-typeck.c (build_array_ref): Adjust
3907 convert_vector_to_pointer_for_subscript caller. If it returns true,
3908 call non_lvalue_loc on the result.
3909
d876207f
RB
39102014-11-11 Richard Biener <rguenther@suse.de>
3911
3912 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3913 to true.
3914
e5e44252
AK
39152014-11-10 Andi Kleen <ak@linux.intel.com>
3916
3917 PR c/60804
3918 * c-parser.c (c_parser_statement_after_labels): Call
3919 check_no_cilk.
3920 (c_parser_if_statement): Dito.
3921 (c_parser_switch_statement): Dito.
3922 (c_parser_while_statement): Dito.
3923 (c_parser_do_statement): Dito.
3924 (c_parser_for_statement): Dito.
3925 * c-typeck.c (c_finish_loop): Dito.
3926
13c21655
PC
39272014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3928
3929 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3930 OPT_Wshift_count_overflow in the warnings.
3931
2d51fcef
MP
39322014-10-30 Marek Polacek <polacek@redhat.com>
3933
3934 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3935 print the stripped version as well, if they're not the same.
3936
ef4bddc2
RS
39372014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3938
3939 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3940 machine_mode.
3941
c582198b
AM
39422014-10-28 Andrew MacLeod <amacleod@redhat.com>
3943
3944 * c-decl.c: Adjust include files.
3945 * c-parser.c: Ditto.
3946
ddc8de03
PM
39472014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3948 Tom Tromey <tromey@redhat.com>
3949
3950 * c-tree.h (enum c_oracle_request): New.
3951 (c_binding_oracle_function): New typedef.
3952 (c_binding_oracle, c_pushtag, c_bind): Declare.
3953 * c-decl.c (c_binding_oracle): New global.
3954 (I_SYMBOL_CHECKED): New macro.
3955 (i_symbol_binding): New function.
3956 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3957 (I_TAG_CHECKED): New macro.
3958 (i_tag_binding): New function.
3959 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3960 (I_LABEL_CHECKED): New macro.
3961 (i_label_binding): New function.
3962 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3963 (c_print_identifier): Save and restore c_binding_oracle.
3964 (c_pushtag, c_bind): New functions.
3965
60393bbc
AM
39662014-10-27 Andrew MacLeod <amacleod@redhat.com>
3967
3968 * c-typeck.c: Adjust include files.
3969
d723bb7c
MLI
39702014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3971
3972 PR c++/53061
3973 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3974 initialization here...
3975 (c_initialize_diagnostics): ... but here. Set defaults after
3976 building pretty-printer.
3977
1bc5a451
MP
39782014-10-23 Marek Polacek <polacek@redhat.com>
3979
3980 PR c/63626
3981 * c-decl.c (pop_scope): Don't print warning in external_scope.
3982
4435bb92
MP
39832014-10-19 Marek Polacek <polacek@redhat.com>
3984
3985 PR c/63567
3986 * c-typeck.c (output_init_element): Allow initializing objects with
3987 static storage duration with compound literals even in C99 and add
3988 pedwarn for it.
3989
7278465e
MP
39902014-10-17 Marek Polacek <polacek@redhat.com>
3991
3992 PR c/63567
3993 * c-typeck.c (digest_init): Allow initializing objects with static
3994 storage duration with compound literals even in C99 and add pedwarn
3995 for it.
3996
d9b7be2e
MP
39972014-10-17 Marek Polacek <polacek@redhat.com>
3998
3999 PR c/63543
4000 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4001 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4002 error multiple times. Print the type.
4003
f406ae1f
MP
40042014-10-17 Marek Polacek <polacek@redhat.com>
4005
4006 PR c/63549
4007 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4008 type.
4009
92574c7c
MP
40102014-10-17 Marek Polacek <polacek@redhat.com>
4011
4012 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4013 (start_function): Use OPT_Wimplicit_int instead of 0.
4014 (store_parm_decls_oldstyle): Likewise.
4015
1bc4a978
MT
40162014-10-17 Alan Modra <amodra@gmail.com>
4017
4018 PR middle-end/61848
4019 * c-decl.c (merge_decls): Don't merge section name or tls model
4020 to newdecl symtab node, instead merge to olddecl. Override
4021 existing olddecl section name. Set tls_model for all thread-local
4022 vars, not just OMP thread-private ones. Remove incorrect comment.
4023
83685514
AM
40242014-10-16 Andrew MacLeod <amacleod@redhat.com>
4025
4026 * c-decl.c: Adjust include files.
4027
78a7c317
DD
40282014-10-14 DJ Delorie <dj@redhat.com>
4029
4030 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4031 (c_token_starts_typename): Check all __intN, not just __int128.
4032 (c_token_starts_declspecs): Likewise.
4033 (c_parser_declspecs): Likewise.
4034 (c_parser_attribute_any_word): Likewise.
4035 (c_parser_objc_selector): Likewise.
4036 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4037 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4038 is specified.
4039 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4040 __int128.
4041 (finish_declspecs): Likewise.
4042
74d98c1e
AB
40432014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4044
8e745a17 4045 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4046 the duplicate code.
8e745a17 4047 (c_parser_statement): Call the new function.
74d98c1e 4048
84937de2
MP
40492014-10-09 Marek Polacek <polacek@redhat.com>
4050
4051 PR c/63480
4052 * c-typeck.c (pop_init_level): Don't warn about initializing
4053 with { }.
4054
0382aaa0
MP
40552014-10-07 Marek Polacek <polacek@redhat.com>
4056
4057 PR c/59717
4058 * c-decl.c (header_for_builtin_fn): New function.
4059 (implicitly_declare): Suggest which header to include.
4060
7a0ca710
MP
40612014-10-07 Marek Polacek <polacek@redhat.com>
4062
4063 * c-convert.c (convert): Use error_operand_p.
4064 * c-typeck.c (require_complete_type): Likewise.
4065 (really_atomic_lvalue): Likewise.
4066 (digest_init): Likewise.
4067 (handle_omp_array_sections_1): Likewise.
4068
6bc8a126
MP
40692014-10-03 Marek Polacek <polacek@redhat.com>
4070
4071 PR c/63453
4072 * c-decl.c (pop_scope): Don't warn about "inline function declared
4073 but never defined" for functions marked with gnu_inline attribute.
4074
d90c0a59
JJ
40752014-09-25 Jakub Jelinek <jakub@redhat.com>
4076
4077 PR c++/63249
4078 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4079 on low_bound and length.
4080
083e891e
MP
40812014-09-24 Marek Polacek <polacek@redhat.com>
4082
4083 PR c/61405
4084 PR c/53874
4085 * c-parser.c: Don't define CPP_KEYWORD.
4086 (c_parser_switch_statement): Pass original type to c_finish_case.
4087 * c-tree.h (c_finish_case): Update declaration.
4088 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4089 conditionally to c_do_switch_warnings.
4090
8d95fe25
MP
40912014-09-03 Marek Polacek <polacek@redhat.com>
4092
4093 PR c/62024
4094 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4095 conversions.
4096
9a771876
JJ
40972014-09-02 Jakub Jelinek <jakub@redhat.com>
4098 Balaji V. Iyer <balaji.v.iyer@intel.com>
4099 Igor Zamyatin <igor.zamyatin@intel.com>
4100
4101 * c-parser.c (c_parser_cilk_for): New function.
4102 (c_parser_cilk_grainsize): Likewise.
4103 (c_get_temp_regvar): Likewise.
4104 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4105 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4106 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4107 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4108 case.
4109
b7679d96
CG
41102014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4111
4112 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4113 with using HOST_WIDE_INT without truncation to 'int'
4114
59ea0364
MP
41152014-08-22 Marek Polacek <polacek@redhat.com>
4116
4117 PR c++/62199
4118 * c-typeck.c (parser_build_binary_op): Adjust call to
4119 warn_logical_not_parentheses.
4120
671a475e
IZ
41212014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4122
4123 PR other/62008
4124 * c-parser.c (c_parser_array_notation): Check for correct
4125 type of an array added.
4126
04159acf
MP
41272014-08-19 Marek Polacek <polacek@redhat.com>
4128
4129 PR c++/62153
4130 * c-typeck.c (build_binary_op): If either operand of a comparison
4131 is a boolean expression, call maybe_warn_bool_compare.
4132
c77935ee
PP
41332014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4134
4135 PR c/45584
4136 * c-typeck.c (build_c_cast): Do a conversion even when the
4137 TYPE_MAIN_VARIANTs are the same.
4138
35aff4fb
MP
41392014-08-19 Marek Polacek <polacek@redhat.com>
4140
4141 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4142 pedwarn_c99 instead of pedwarn.
4143 (grokfield): Likewise.
4144 (warn_defaults_to): New function.
4145 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4146 Unconditionally call pedwarn_c99 instead of pedwarn.
4147 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4148 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4149 check flag_isoc11 before.
4150 * c-errors.c (pedwarn_c99): Change the return type to bool.
4151 Handle -Wc99-c11-compat.
4152 * c-parser.c (disable_extension_diagnostics): Handle
4153 warn_c99_c11_compat.
4154 (restore_extension_diagnostics): Likewise.
4155 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4156 instead of pedwarn, don't check flag_isoc11 before.
4157 (c_parser_declspecs): Likewise.
4158 (c_parser_alignas_specifier): Likewise.
4159 (c_parser_alignof_expression): Likewise.
4160 (c_parser_generic_selection): Likewise.
4161 * c-tree.h (pedwarn_c99): Update declaration.
4162 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4163 of pedwarn_c99.
4164
177cce46
MP
41652014-08-19 Marek Polacek <polacek@redhat.com>
4166
4167 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4168 to pedwarn_c90.
4169 * c-errors.c: Include "opts.h".
4170 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4171 * c-parser.c (disable_extension_diagnostics): Handle negative value
4172 of warn_c90_c99_compat, too.
4173 (restore_extension_diagnostics): Likewise.
4174 (c_parser_compound_statement_nostart): Pass
4175 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4176
6dc99c33
MP
41772014-08-12 Marek Polacek <polacek@redhat.com>
4178
4179 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4180 Add pedwarn.
4181 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4182 Likewise.
4183 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4184
3f8257db 41852014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4186
4187 PR c/51849
4188 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4189 Call pedwarn_c90 instead of pedwarn.
4190 (check_bitfield_type_and_width): Likewise.
4191 (declspecs_add_qual): Likewise.
4192 (declspecs_add_type): Likewise.
4193 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4194 Adjust to only call pedwarn_c90.
4195 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4196 pedwarn_c90 instead of pedwarn.
4197 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4198 * c-parser.c (disable_extension_diagnostics): Handle
4199 warn_c90_c99_compat.
4200 (restore_extension_diagnostics): Likewise.
4201 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4202 pedwarn_c90 instead of pedwarn.
4203 (c_parser_initelt): Likewise.
4204 (c_parser_postfix_expression): Likewise.
4205 (c_parser_postfix_expression_after_paren_type): Likewise.
4206 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4207 * c-tree.h: Fix formatting.
4208 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4209 pedwarn_c90 instead of pedwarn.
4210
9f25a338
TS
42112014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4212
4213 * c-typeck.c: Remove include of pointer-set.h.
4214
044331a8
MP
42152014-08-07 Marek Polacek <polacek@redhat.com>
4216
4217 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4218
b787e7a2
TS
42192014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4220
4221 * c-typeck.c: Use hash_map instead of pointer_map.
4222
6e2830c3
TS
42232014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4224
4225 * c-decl.c: Use hash_set instead of pointer_set.
4226
a7ee52fb
IZ
42272014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4228
4229 PR middle-end/61455
4230 * c-array-notation.c (expand_array_notations): Handling
4231 of DECL_EXPR added.
4232
b4dfdc11
MG
42332014-07-31 Marc Glisse <marc.glisse@inria.fr>
4234
4235 PR c++/60517
4236 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4237 a local variable.
4238
976d5a22
TT
42392014-07-30 Tom Tromey <tromey@redhat.com>
4240
4241 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4242 field.
4243 (really_start_incremental_init, push_init_level): Initialize
4244 designator_depth.
4245 (pop_init_level): Set global designator_depth.
4246 (process_init_element): Check for designated_init attribute.
4247
30281de2
MP
42482014-07-20 Marek Polacek <polacek@redhat.com>
4249
4250 PR c/61852
4251 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4252 (implicitly_declare): Pass location to implicit_decl_warning.
4253
b108f48f
JJ
42542014-07-14 Jakub Jelinek <jakub@redhat.com>
4255
4256 PR middle-end/61294
4257 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4258 If non-NULL, call c_parser_check_literal_zero.
4259 (c_parser_check_literal_zero): New function.
4260 (c_parser_postfix_expression_after_primary): Adjust
4261 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4262
773ec47f
MP
42632014-07-06 Marek Polacek <polacek@redhat.com>
4264
4265 PR c/6940
4266 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4267 * c-tree.h (C_ARRAY_PARAMETER): Define.
4268 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4269 function parameter.
4270
22e1cf1c 42712014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4272 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4273
4274 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4275 releasing symbol.
4276
52ec0ea3
MP
42772014-07-01 Marek Polacek <polacek@redhat.com>
4278
4279 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4280 instead of 0 to WARN_FOR_ASSIGNMENT.
4281
d5c3d343
MP
42822014-07-01 Marek Polacek <polacek@redhat.com>
4283
4284 PR c/58286
4285 * c-typeck.c (convert_for_assignment): Pass
4286 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4287
6a7253a4
MP
42882014-06-30 Marek Polacek <polacek@redhat.com>
4289
4290 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4291 has no_sanitize_undefined attribute.
4292
5e88a8f4
IZ
42932014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4294
4295 PR middle-end/57541
4296 * c-array-notation.c (fix_builtin_array_notation_fn):
4297 Check for 0 arguments in builtin call. Check that bultin argument is
4298 correct.
4299 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4300 index.
4301
9698b078
SH
43022014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4303
4304 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4305 qualifiers in __auto_type for atomic types.
4306 (c_parser_typeof_specifier): Discard all type qualifiers in
4307 __typeof__ for atomic types.
4308
6e07c515
MP
43092014-06-25 Marek Polacek <polacek@redhat.com>
4310
4311 PR c/61162
4312 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4313 the return expression to c_finish_return.
4314
da6f124d
JJ
43152014-06-25 Jakub Jelinek <jakub@redhat.com>
4316
4317 * c-typeck.c (c_finish_omp_clauses): Make sure
4318 OMP_CLAUSE_LINEAR_STEP has correct type.
4319
c203e8a7
TS
43202014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4321
4322 * c-decl.c: Adjust.
4323
56ad0e38
JJ
43242014-06-24 Jakub Jelinek <jakub@redhat.com>
4325
4326 * c-parser.c (c_parser_omp_for_loop): For
4327 #pragma omp parallel for simd move lastprivate clause from parallel
4328 to for rather than simd.
4329
47c2554f
MP
43302014-06-23 Marek Polacek <polacek@redhat.com>
4331
4332 * c-typeck.c (parser_build_binary_op): Don't call
4333 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4334
56363ffd
JH
43352014-06-15 Jan Hubicka <hubicka@ucw.cz>
4336
4337 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4338 * c-decl.c (merge_decls): Likewise.
4339
d7ff7ae5
MP
43402014-06-09 Marek Polacek <polacek@redhat.com>
4341
4342 PR c/36446
4343 * c-typeck.c (error_init): Call inform instead of error_at.
4344 (pedwarn_init): Call inform instead of pedwarn.
4345 (warning_init): Call inform instead of warning_at.
4346
24d047a3
JH
43472014-06-07 Jan Hubicka <hubicka@ucw.cz>
4348
4349 * c-decl.c (merge_decls): Use set_decl_section_name.
4350 (duplicate_decls): Remove node if it exists.
4351
9bac5cbb
G
43522014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4353
4354 PR c/53119
4355 * c-typeck.c (push_init_level, process_init_element,
4356 pop_init_level): Correct check for zero initialization, move
4357 missing brace warning to respect zero initialization.
4358
8ffcdea8
MP
43592014-06-05 Marek Polacek <polacek@redhat.com>
4360
4361 PR c/56724
4362 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4363
742938c9
MP
43642014-06-05 Marek Polacek <polacek@redhat.com>
4365
4366 PR c/49706
4367 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4368 on the left hand side operand of a comparison.
4369
6447c55d
MP
43702014-06-05 Marek Polacek <polacek@redhat.com>
4371
4372 PR c/48062
4373 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4374 Print note only if the warning was printed.
4375
9dc7743c
IZ
43762014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4377
4378 PR c/58942
4379 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4380 with a pointer.
4381
fedfecef
MP
43822014-06-03 Marek Polacek <polacek@redhat.com>
4383
4384 PR c/60439
4385 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4386 c_start_case.
4387 * c-tree.h (c_start_case): Update.
4388 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4389 switch condition has boolean value.
4390
9b2b7279
AM
43912014-06-02 Andrew MacLeod <amacleod@redhat.com>
4392
4393 * c-decl.c: Include builtins.h.
4394 * c-parser.c: Likewise.
4395
5c1bc275
MP
43962014-05-27 Marek Polacek <polacek@redhat.com>
4397
4398 PR c/56724
4399 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4400 error and warning calls to error_at and warning_at. Pass location of
4401 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4402 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4403 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4404
97563bc8
IZ
44052014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4406
4407 PR c/61191
4408 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4409 function parameters.
4410
aede2c10
JH
44112014-05-23 Jan Hubicka <hubicka@ucw.cz>
4412
4413 * c-decl.c (merge_decls): Preserve symtab node pointers.
4414 (duplicate_decls): Free new decl.
4415
edbba2ce
TS
44162014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4417
f3316c6d
TS
4418 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4419 initialization.
4420
edbba2ce
TS
4421 * c-parser.c (c_parser_omp_target): Return bool values.
4422
68c81f24
TS
44232014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4424
4425 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4426 num_teams_loc variable to num_thread_limit_loc.
4427
632f2871
RS
44282014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4429
4430 * c-array-notation.c (expand_array_notations): Use void_node
4431 instead of void_zero_node.
4432
766090c2
TS
44332014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4434
4435 * c-decl.c (finish_struct): Adjust.
4436 (finish_enum): Likewise.
4437 (bind): Adjust.
4438 (record_inline_static): Likewise.
4439 (push_scope): Likewise.
4440 (make_label): Likewise.
4441 (lookup_label_for_goto): Likewise.
4442 (finish_struct): Likewise.
4443 (finish_enum): Likewise.
4444 (store_parm_decls): Likewise.
4445 (c_push_function_context): Likewise.
4446 * c-lang.h: Remove usage of variable_size gty attribute.
4447 * c-parser.c (c_parse_init): Adjust.
4448 (c_parse_file): Likewise.
4449
2b107f6b
MP
44502014-05-13 Marek Polacek <polacek@redhat.com>
4451
4452 PR c/61162
4453 * c-typeck.c (convert_for_assignment): Pass location to
4454 WARN_FOR_ASSIGNMENT instead of input_location.
4455
d033409e
MP
44562014-05-10 Marek Polacek <polacek@redhat.com>
4457
4458 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4459 maybe_warn_string_init.
4460 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4461 maybe_warn_string_init.
4462 * c-tree.h (maybe_warn_string_init): Update declaration.
4463 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4464 Call pedwarn_init with loc instead of with input_location.
4465 (digest_init): Pass init_loc to maybe_warn_string_init.
4466 (pop_init_level): Call pedwarn_init with loc instead of with
4467 input_location.
4468 (set_init_index): Likewise.
4469 (process_init_element): Likewise.
4470
ea58ef42
MP
44712014-05-09 Marek Polacek <polacek@redhat.com>
4472
4473 PR c/61096
4474 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4475 (c_parser_initelt): Pass location to set_init_label. Pass array index
4476 location to set_init_index.
4477 * c-tree.h (push_init_level): Update declaration.
4478 (pop_init_level): Likewise.
4479 (set_init_index): Likewise.
4480 (set_init_label): Likewise.
4481 * c-typeck.c (error_init): Add location parameter. Call error_at
4482 instead of error.
4483 (digest_init): Pass init_loc to error_init.
4484 (really_start_incremental_init):
4485 (push_init_level): Add location parameter. Pass loc to pop_init_level
4486 and error_init.
4487 (pop_init_level): Likewise.
4488 (set_designator): Add location parameter. Pass loc to pop_init_level,
4489 push_init_level, and error_init.
4490 (set_init_index): Add location parameter. Pass loc to error_init and
4491 set_designator.
4492 (set_init_label): Likewise.
4493 (output_init_element): Pass loc to error_init.
4494 (process_init_element): Pass loc to error_init, pop_init_level,
4495 pedwarn_init, and push_init_level.
4496
661a0813
MP
44972014-05-09 Marek Polacek <polacek@redhat.com>
4498
4499 PR c/50459
4500 * c-parser.c (c_parser_attributes): Parse the arguments as an
4501 expression-list if the attribute takes identifier.
4502
2793eeab
MP
45032014-05-08 Marek Polacek <polacek@redhat.com>
4504
4505 PR c/61053
4506 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4507 TYPE_ALIGN_UNIT.
4508
f827930a
MP
45092014-05-08 Marek Polacek <polacek@redhat.com>
4510
4511 PR c/61077
4512 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4513 of main.
4514
1d60af08
KZ
45152014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4516 Mike Stump <mikestump@comcast.net>
4517 Richard Sandiford <rdsandiford@googlemail.com>
4518
4519 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4520 (finish_enum): Use wide-int interfaces.
4521 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4522 * c-typeck.c (build_c_cast): Likewise.
4523 (set_nonincremental_init_from_string): Likewise.
4524 (c_tree_equal): Likewise.
4525
a0e24419
MP
45262014-05-02 Marek Polacek <polacek@redhat.com>
4527
4528 PR c/25801
4529 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4530 Return size_one_node when the type is not complete.
4531 (pointer_diff): Remove comment.
4532 (build_unary_op): Improve error messages.
4533
19fc9faa
MP
45342014-05-02 Marek Polacek <polacek@redhat.com>
4535
4536 * c-typeck.c (c_finish_return): Separate warning_at calls.
4537
63bc4e87
MP
45382014-05-02 Marek Polacek <polacek@redhat.com>
4539
4540 * c-tree.h (error_init): Remove declaration.
4541 (pedwarn_init): Likewise.
4542 * c-typeck.c (error_init): Make static and move above.
4543 (pedwarn_init): Likewise.
4544 (warning_init): Move above.
4545 (maybe_warn_string_init): Likewise.
4546
4bd2511b
JL
45472014-05-01 Jeff Law <law@redhat.com>
4548
4549 Revert:
4550
4551 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4552 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4553 avoid goto.
4554
6a358dcb
MP
45552014-05-02 Marek Polacek <polacek@redhat.com>
4556
4557 PR c/60784
4558 * c-typeck.c (push_init_level): Set constructor_designated to
4559 p->designated for structures.
4560
ae5ebda4
MP
45612014-05-01 Marek Polacek <polacek@redhat.com>
4562
4563 PR c/60915
4564 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4565 function-definition has an attribute after the declarator.
4566
96b40f8d
MP
45672014-05-01 Marek Polacek <polacek@redhat.com>
4568
4569 PR c/60257
4570 * c-typeck.c (warning_init): Add location_t parameter. Call
4571 warning_at instead of warning.
4572 (push_init_level): Pass input_location to warning_init.
4573 (add_pending_init): Add location_t parameter. Pass loc to
4574 warning_init.
4575 (set_nonincremental_init): Pass input_location to add_pending_init.
4576 (set_nonincremental_init_from_string): Likewise.
4577 (output_init_element): Pass loc to warning_init and to
4578 add_pending_init.
4579
32e00768
MP
45802014-05-01 Marek Polacek <polacek@redhat.com>
4581
4582 PR c/43395
4583 * c-typeck.c (c_finish_return): Distinguish between label and variable
4584 when warning about returning local address.
4585
c9379ce2
MP
45862014-05-01 Marek Polacek <polacek@redhat.com>
4587
4588 PR c/29467
4589 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4590 in C89 mode.
4591
d00887e8
MP
45922014-05-01 Marek Polacek <polacek@redhat.com>
4593
4594 PR c/43245
4595 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4596 instead of 0 to WARN_FOR_QUALIFIERS.
4597
5436fa2e
MP
45982014-05-01 Marek Polacek <polacek@redhat.com>
4599
4600 PR c/56989
4601 * c-typeck.c (default_conversion): Use better location for
4602 error call.
4603
f8ed5150
MP
46042014-04-30 Marek Polacek <polacek@redhat.com>
4605
4606 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4607 also when SANITIZE_FLOAT_DIVIDE is on.
4608
8337d1db
MP
46092014-04-30 Marek Polacek <polacek@redhat.com>
4610
4611 PR c/60139
4612 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4613 and pedwarn_init. Use loc insted of input_location.
4614
c4bdc42f
MP
46152014-04-30 Marek Polacek <polacek@redhat.com>
4616
4617 PR c/60351
4618 * c-typeck.c (build_binary_op): Use location when warning about
4619 shift count.
4620
45484dcf
MP
46212014-04-25 Marek Polacek <polacek@redhat.com>
4622
4623 PR c/18079
4624 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4625 always_inline/noinline and hot/cold attributes.
4626
34cf811f
MP
46272014-04-25 Marek Polacek <polacek@redhat.com>
4628
4629 PR c/60114
4630 * c-parser.c (c_parser_initelt): Pass input_location to
4631 process_init_element.
4632 (c_parser_initval): Pass loc to process_init_element.
4633 * c-tree.h (process_init_element): Adjust declaration.
4634 * c-typeck.c (push_init_level): Pass input_location to
4635 process_init_element.
4636 (pop_init_level): Likewise.
4637 (set_designator): Likewise.
4638 (output_init_element): Add location_t parameter. Pass loc to
4639 digest_init.
4640 (output_pending_init_elements): Pass input_location to
4641 output_init_element.
4642 (process_init_element): Add location_t parameter. Pass loc to
4643 output_init_element.
4644
42056eac
JJ
46452014-04-24 Jakub Jelinek <jakub@redhat.com>
4646
4647 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4648 atomic-clause, allow comma in between atomic-clause and
4649 seq_cst.
4650
e162a134
JJ
46512014-04-22 Jakub Jelinek <jakub@redhat.com>
4652
4653 PR c/59073
4654 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4655 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4656
2f6babac
IZ
46572014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4658
4659 PR middle-end/60469
4660 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4661 create_tmp_var instead build_decl for creating temps.
4662 (build_array_notation_expr): Likewise.
4663 (fix_conditional_array_notations_1): Likewise.
4664 (fix_array_notation_expr): Likewise.
4665 (fix_array_notation_call_expr): Likewise.
4666
8edbfaa6
JJ
46672014-03-28 Jakub Jelinek <jakub@redhat.com>
4668
4669 PR c++/60689
4670 * c-tree.h (c_build_function_call_vec): New prototype.
4671 * c-typeck.c (build_function_call_vec): Don't call
4672 resolve_overloaded_builtin here.
4673 (c_build_function_call_vec): New wrapper function around
4674 build_function_call_vec. Call resolve_overloaded_builtin here.
4675 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4676 Call c_build_function_call_vec instead of build_function_call_vec.
4677 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4678 * c-decl.c (finish_decl): Likewise.
4679
7485aeea
MLI
46802014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4681
4682 PR c/55383
4683 * c-typeck.c: Use correct format string in cast-qual warning
4684
b17a8b07
TS
46852014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4686
4687 * c-decl.c (c_decl_attributes): Use
4688 lang_hooks.types.omp_mappable_type.
4689 * c-typeck.c (c_finish_omp_clauses): Likewise.
4690
3af9c5e9
MP
46912014-03-06 Marek Polacek <polacek@redhat.com>
4692
4693 PR c/60197
4694 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4695 of checking tree code.
4696
1c9f5f33
PK
46972014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4698
4699 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4700 (c_parser_parameter_declaration): Likewise.
4701
cc28fc7f
MP
47022014-02-19 Marek Polacek <polacek@redhat.com>
4703
4704 PR c/60195
4705 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4706 Call mark_exp_read on exp.value.
4707 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4708 TREE_ADDRESSABLE on old instead of val.
4709 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4710
b581c05c
PK
47112014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4712
4713 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4714 C_EXPR_APPEND by vec_safe_push.
4715 * c-tree.h (C_EXPR_APPEND): Remove.
4716
81e5eca8
MP
47172014-01-31 Marek Polacek <polacek@redhat.com>
4718
4719 PR c/59963
4720 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4721 build_function_call_vec.
4722 (build_function_call): Likewise.
4723 (build_atomic_assign): Likewise.
4724 (build_function_call_vec): Add arg_loc parameter. Use it.
4725 (convert_arguments): Likewise.
4726 (convert_for_assignment): Rename rhs_loc to expr_loc.
4727 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4728 (c_parser_objc_keywordexpr): Likewise.
4729 (c_parser_postfix_expression_after_primary): Call
4730 build_function_call_vec with expr_loc rather than op_loc.
4731 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4732 build_function_call_vec.
4733 (c_parser_expr_list): Add locations parameter. Fill it with locations
4734 of function arguments.
4735 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4736
68fca595
MP
47372014-01-30 Marek Polacek <polacek@redhat.com>
4738
4739 PR c/59940
4740 * c-typeck.c (build_function_call_vec): Use loc parameter.
4741 (convert_arguments): Add location parameter. Use it.
4742 (ep_convert_and_check): Likewise.
4743 (build_atomic_assign): Adjust convert_for_assignment call.
4744 (build_modify_expr): Likewise.
4745 (digest_init): Likewise.
4746 (c_finish_return): Likewise.
4747 (build_conditional_expr): Adjust ep_convert_and_check calls.
4748 (convert_for_assignment): Add rhs_loc parameter. Use it.
4749 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4750 calls.
4751
fa337f3a
RB
47522014-01-30 Richard Biener <rguenther@suse.de>
4753
4754 PR c/59905
4755 * c-typeck.c (build_function_call_vec): Do not replace calls
4756 to a function via an incompatible type with a runtime abort.
4757
b72271b9
BI
47582014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4759
4760 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4761 flag_enable_cilkplus with flag_cilkplus.
4762 (c_parser_direct_declarator_inner): Likewise.
4763 (c_parser_attribute_any_word): Likewise.
4764 (c_parser_attributes): Likewise.
4765 (c_parser_compound_statement): Likewise.
4766 (c_parser_statement_after_labels): Likewise.
4767 (c_parser_if_statement): Likewise.
4768 (c_parser_switch_statement): Likewise.
4769 (c_parser_do_statement): Likewise.
4770 (c_parser_for_statement): Likewise.
4771 (c_parser_unary_expression): Likewise.
4772 (c_parser_postfix_expression): Likewise.
4773 (c_parser_postfix_expression_after_primary): Likewise.
4774 (c_parser_postfix_expression_after_primary): Likewise.
4775 (c_parser_omp_clause_name): Likewise.
4776 (c_finish_omp_declare_simd): Likewise.
4777 (c_parser_cilk_verify_simd): Likewise.
4778 * c-typeck.c (build_array_ref): Likewise.
4779 (build_function_call_vec): Likewise.
4780 (convert_arguments): Likewise.
4781 (build_compound_expr): Likewise.
4782 (c_finish_return): Likewise.
4783 (c_finish_if_stmt): Likewise.
4784 (c_finish_loop): Likewise.
4785 (build_binary_op): Likewise.
4786
393e8e8b
MP
47872014-01-23 Marek Polacek <polacek@redhat.com>
4788
4789 PR c/59846
4790 * c-typeck.c (parser_build_binary_op): Use location instead of
4791 input_location.
4792 (build_binary_op): Pass location to shorten_compare.
4793
f04dda30
MP
47942014-01-23 Marek Polacek <polacek@redhat.com>
4795
4796 PR c/58346
4797 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4798 an empty aggregate.
4799
789eadcd
MP
48002014-01-23 Marek Polacek <polacek@redhat.com>
4801
4802 PR c/59871
4803 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4804 of a comma expression.
4805 (emit_side_effect_warnings): Likewise.
4806
40f14e9f
BI
48072014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4808
4809 PR c/59825
4810 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4811 function to use walk_tree and moved a lot of its functionality to
4812 expand_array_notations.
4813 (expand_array_notations): New function.
4814
74558dd9
BI
48152014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4816
4817 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4818 attribute an attribute without value.
4819
652fea39
JJ
48202014-01-23 Jakub Jelinek <jakub@redhat.com>
4821
4822 PR middle-end/58809
4823 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4824 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4825
f34f1c87
MP
48262014-01-22 Marek Polacek <polacek@redhat.com>
4827
4828 PR c/59891
4829 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4830 of remove_c_maybe_const_expr on op1 and op2.
4831
241f845a
JJ
48322014-01-15 Jakub Jelinek <jakub@redhat.com>
4833
4834 PR c/58943
4835 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4836 effects, preevaluate rhs using SAVE_EXPR first.
4837
9a74f20c
BI
48382014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4839
4840 PR c++/59631
4841 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4842 statements with if-elseif statements.
4843
96066ce1
MP
48442014-01-06 Marek Polacek <polacek@redhat.com>
4845
4846 PR c/57773
4847 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4848 defined bit-field types only in ISO C.
4849
23a5b65a
RS
48502014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4851
4852 Update copyright years
4853
f9030485
RS
48542014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4855
4856 * c-array-notation.c: Use the standard form for the copyright notice.
4857
41958c28
BI
48582013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4859
4860 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4861 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4862 field in parser is not empty. If not-empty, call the function
4863 c_parser_finish_omp_declare_simd.
4864 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4865 between SIMD-enabled functions and #pragma simd. Added new parameter.
4866 (c_parser_cilk_all_clauses): Modified the usage of the function
4867 c_parser_cilk_clause_vectorlength as mentioned above.
4868 (c_parser_cilk_simd_fn_vector_attrs): New function.
4869 (c_finish_cilk_simd_fn_tokens): Likewise.
4870 (is_cilkplus_vector_p): Likewise.
4871 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4872 "nomask," and "mask" strings in clause name.
4873 (c_parser_omp_all_clauses): Added 3 new case statements:
4874 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4875 PRAGMA_CILK_CLAUSE_NOMASK.
4876 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4877 check for vector attribute and if so call the function
4878 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4879 called the function c_finish_cilk_simd_fn_tokens.
4880 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4881 parser field is non-empty. If so, parse them as you would parse
4882 the omp declare simd pragma.
4883 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4884 Added a check when step is a parameter and flag it as error.
4885 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4886 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4887 pragma_omp_clause.
4888
cef0fd0e
TS
48892013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4890
4891 * c-parser.c (c_parser_omp_parallel): Fix description.
4892
12893402
BI
48932013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4894
4895 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4896 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4897 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4898 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4899
296674db
JM
49002013-12-04 Joseph Myers <joseph@codesourcery.com>
4901
4902 PR c/52023
4903 * c-parser.c (c_parser_alignas_specifier): Use
4904 c_sizeof_or_alignof_type instead of c_alignof.
4905 (c_parser_alignof_expression): Likewise, with min_alignof
4906 parameter depending on alignof spelling used.
4907
edd28054
MP
49082013-12-04 Marek Polacek <polacek@redhat.com>
4909
4910 PR c/54113
4911 * c-decl.c (start_function): Don't warn for missing prototype for
4912 inline functions.
4913
da0fc454
MP
49142013-12-03 Marek Polacek <polacek@redhat.com>
4915
4916 PR c/59351
4917 * c-decl.c (build_compound_literal): Allow compound literals with
4918 empty initial value.
4919
4c2ecab0
JM
49202013-12-02 Joseph Myers <joseph@codesourcery.com>
4921
4922 PR c/58235
4923 * c-typeck.c (build_modify_expr): Diagnose assignment to
4924 expression with array type.
4925
340baef7
JM
49262013-11-29 Joseph Myers <joseph@codesourcery.com>
4927
4928 PR c/42262
4929 * c-typeck.c (process_init_element): Do not treat a string as
4930 initializing a whole array when used with a designator for an
4931 individual element.
4932
6763b9f7
JM
49332013-11-29 Joseph Myers <joseph@codesourcery.com>
4934
4935 PR c/57574
4936 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4937 an inline function following a static declaration.
4938
e7bd1de1
JJ
49392013-11-28 Jakub Jelinek <jakub@redhat.com>
4940
4941 PR c/59310
4942 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4943 to p_name before calling c_parser_omp_teams instead of after.
4944 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4945 argument. Remove unused p_name variable.
4946
0136f8f0
AH
49472013-11-27 Aldy Hernandez <aldyh@redhat.com>
4948 Jakub Jelinek <jakub@redhat.com>
4949
4950 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4951 external_scope is NULL.
4952
241b71bb
TV
49532013-11-27 Tom de Vries <tom@codesourcery.com>
4954 Marc Glisse <marc.glisse@inria.fr>
4955
4956 PR c++/59032
4957 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4958
2fb9a547
AM
49592013-11-22 Andrew MacLeod <amacleod@redhat.com>
4960
4961 * c-typeck.c: Add required include files from gimple.h.
4962
8400e75e
DM
49632013-11-22 David Malcolm <dmalcolm@redhat.com>
4964
4965 * c-decl.c (define_label, shadow_tag_warned)
4966 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4967 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4968 (declspecs_add_type): Remove use of in_system_header macro.
4969 * c-parser.c (c_parser_unary_expression): Likewise.
4970 * c-typeck.c (store_init_value, process_init_element)
4971 (c_start_case): Likewise.
4972
4973 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4974 macro.
4975
4976 * c-parser.c (c_parser_set_source_position_from_token): Remove
4977 reference to in_system_header from comment.
4978
386b1f1f
RS
49792013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4980
4981 * c-decl.c (grokdeclarator): Update comment to refer to
4982 tree_to_[su]hwi rather than tree_low_cst.
4983
ae7e9ddd
RS
49842013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4985
4986 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4987 tree_to_uhwi throughout.
4988
9439e9a1
RS
49892013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4990
4991 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4992 throughout.
4993
9541ffee
RS
49942013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4995
4996 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4997 throughout.
4998
c02065fc
AH
49992013-11-15 Aldy Hernandez <aldyh@redhat.com>
5000
5001 * c-parser.c (c_parser_cilk_simd): New.
5002 (c_parser_cilk_verify_simd): New.
5003 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5004 (c_parser_omp_for_loop): Add case for NE_EXPR.
5005 Set c_break_label for CILK_SIMD.
5006 (c_parser_cilk_clause_vectorlength): New.
5007 (c_parser_cilk_clause_linear): New.
5008 (c_parser_cilk_clause_name): New.
5009 (c_parser_cilk_all_clauses): New.
5010 * c-typeck.c (build_unary_op): Pass location argument to
5011 readonly_error.
5012 (build_modify_expr): Same.
5013 (build_asm_expr): Same.
5014 (c_finish_bc_stmt): Error on break/continue in loops.
5015
18f429e2
AM
50162013-11-14 Andrew MacLeod <amacleod@redhat.com>
5017
5018 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5019
d8a2d370
DN
50202013-11-14 Diego Novillo <dnovillo@google.com>
5021
5022 * c-decl.c: Include print-tree.h.
5023 Include stor-layout.h.
5024 Include varasm.h.
5025 Include attribs.h.
5026 Include stringpool.h.
5027 * c-lang.c: Include fold-const.h.
5028 * c-parser.c: Include stringpool.h.
5029 Include attribs.h.
5030 Include stor-layout.h.
5031 Include varasm.h.
5032 Include trans-mem.h.
5033 * c-typeck.c: Include stor-layout.h.
5034 Include trans-mem.h.
5035 Include varasm.h.
5036 Include stmt.h.
5037
38b7bc7f
JM
50382013-11-13 Joseph Myers <joseph@codesourcery.com>
5039
5040 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5041 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5042 __auto_type.
5043 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5044 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5045 RID_AUTO_TYPE.
5046 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5047 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5048 (c_parser_declarator, c_parser_direct_declarator_inner)
5049 (c_parser_parameter_declaration, c_parser_type_name): All callers
5050 changed.
5051 (c_parser_declaration_or_fndef): Handle declarations with type
5052 determined from the initializer.
5053
45b0be94
AM
50542013-11-12 Andrew MacLeod <amacleod@redhat.com>
5055
18f429e2 5056 * c-typeck.c: Include gimplify.h.
45b0be94 5057
582d9b50
JM
50582013-11-12 Joseph Myers <joseph@codesourcery.com>
5059
5060 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5061 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5062 comment.
5063 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5064 or _Thread_local as appropriate in diagnostics.
5065 (build_null_declspecs): Initialize ret->thread_gnu_p.
5066 (declspecs_add_scspec): Handle either __thread or _Thread_local
5067 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5068 pedantic. Do not disallow _Thread_local extern and _Thread_local
5069 static.
5070
267bac10
JM
50712013-11-07 Joseph Myers <joseph@codesourcery.com>
5072 Andrew MacLeod <amacleod@redhat.com>
5073
5074 * c-aux-info.c (gen_type): Handle atomic qualifier.
5075 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5076 qualifiers when compating types.
5077 (shadow_tag_warned): Handle atomic_p in declspecs.
5078 (quals_from_declspecs): Likewise.
5079 (start_decl): Use c_type_promotes_to when promoting argument
5080 types.
5081 (grokdeclarator): Handle _Atomic.
5082 (get_parm_info): Diagnose any qualifier on "void" as only
5083 parameter.
5084 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5085 comparing types. Use c_type_promotes_to when promoting argument
5086 types.
5087 (finish_function): Use c_type_promotes_to when promoting argument
5088 types.
5089 (build_null_declspecs): Handle atomic_p in declspecs.
5090 (declspecs_add_qual): Handle RID_ATOMIC.
5091 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5092 (c_token_starts_declspecs): Handle RID_ATOMIC.
5093 (c_parser_declspecs): Handle atomic type specifiers and
5094 qualifiers.
5095 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5096 from types of expressions with atomic type.
5097 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5098 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5099 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5100 (c_parser_statement_after_labels, c_parser_switch_statement)
5101 (c_parser_for_statement, c_parser_expr_no_commas)
5102 (c_parser_conditional_expression, c_parser_binary_expression)
5103 (c_parser_cast_expression, c_parser_unary_expression)
5104 (c_parser_postfix_expression)
5105 (c_parser_postfix_expression_after_primary, c_parser_expression):
5106 Use convert_lvalue_to_rvalue.
5107 (c_parser_expression_conv, c_parser_expr_list): Document
5108 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5109 (c_parser_objc_synchronized_statement): Use
5110 convert_lvalue_to_rvalue.
5111 (c_parser_objc_selector): Handle RID_ATOMIC.
5112 (c_parser_objc_receiver, c_parser_array_notation): Use
5113 convert_lvalue_to_rvalue.
5114 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5115 _Atomic (type-name).
5116 (struct c_declspecs): Add atomic_p field.
5117 (convert_lvalue_to_rvalue): Declare.
5118 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5119 corresponding atomic types.
5120 (qualify_type): Don't add _Atomic qualifiers from second argument.
5121 (comp_target_types): Do not allow _Atomic mismatches.
5122 (type_lists_compatible_p): Do not remove atomic qualifiers when
5123 comparing types.
5124 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5125 (build_atomic_assign): New functions.
5126 (build_unary_op): Use build_atomic_assign for atomic increment and
5127 decrement.
5128 (build_conditional_expr): Do not treat _Atomic void as a qualified
5129 version of void.
5130 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5131 (find_anonymous_field_with_type, convert_to_anonymous_field)
5132 (convert_for_assignment): Do not remove atomic qualifiers when
5133 comparing types.
5134 (digest_init): Do not accept initialization of arrays of atomic
5135 elements by string constants.
5136 (build_asm_expr): Use convert_lvalue_to_rvalue.
5137 (build_binary_op): Do not treat _Atomic void as a qualified
5138 version of void.
5139
0c249d4b
DD
51402013-11-06 DJ Delorie <dj@redhat.com>
5141
5142 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5143 both explicit and builtin, print the location of the explicit one.
5144
6d7f7e0a
TB
51452013-11-05 Tobias Burnus <burnus@net-b.de>
5146
5147 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5148 c_parser_omp_distribute, c_parser_omp_teams,
5149 c_parser_omp_target, c_parser_omp_declare): Handle
5150 -fopenmp-simd.
5151
b906f4ca
MP
51522013-11-03 Marek Polacek <polacek@redhat.com>
5153
5154 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5155
ee1d5a02
JJ
51562013-11-01 Jakub Jelinek <jakub@redhat.com>
5157
5158 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5159 check_dup_generic at the end, unless remove is true.
5160 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5161 remove = true;.
5162 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5163
5a9785fb
JJ
51642013-10-31 Jakub Jelinek <jakub@redhat.com>
5165
5166 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5167 with decl that is not pointer nor array.
5168
939b37da
BI
51692013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5170
5171 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5172 a spawning function is found.
5173 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5174 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5175 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5176 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5177 case.
5178 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5179 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5180 expr.
5181 (c_finish_return): Added a check to reject _Cilk_spawn in return
5182 expression.
5183 (build_cilk_spawn): New function.
5184 (build_cilk_sync): Likewise.
5185 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5186
d4af74d4
TB
51872013-10-27 Tobias Burnus <burnus@net-b.de>
5188
5189 PR other/33426
5190 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5191 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5192 (c_parser_statement_after_labels): Update calls.
5193
d73749df 51942013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5195
5196 PR other/33426
5197 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5198 Handle PRAGMA_IVDEP.
5199 (c_parser_statement_after_labels): Update call.
5200
f28aa681
MP
52012013-10-24 Marek Polacek <polacek@redhat.com>
5202
5203 * c-parser.c (c_parser_struct_declaration): Add a comment.
5204 (c_parser_declarator): Don't allow _Alignas here.
5205
0645c1a2
AM
52062013-10-17 Andrew MacLeod <amacleod@redhat.com>
5207
5208 * c-parser.c: Include omp-low.h.
5209 * c-typeck.c: Likewise.
5210
568a31f2
MP
52112013-10-17 Marek Polacek <polacek@redhat.com>
5212
5213 PR c/58267
5214 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5215 Document syntax of the array-declarator.
5216 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5217 are not permitted.
5218 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5219 (c_parser_struct_declaration): Likewise.
5220 (c_parser_declarator): Likewise.
5221 (c_parser_direct_declarator_inner): Likewise.
5222 (c_parser_parameter_declaration): Likewise.
5223 (c_parser_type_name): Likewise.
5224
acf0174b
JJ
52252013-10-11 Jakub Jelinek <jakub@redhat.com>
5226
5227 * c-lang.h (current_omp_declare_target_attribute): New extern
5228 decl.
5229 * c-parser.c: Include c-lang.h.
5230 (struct c_parser): Change tokens to c_token *.
5231 Add tokens_buf field. Change tokens_avail type to unsigned int.
5232 (c_parser_consume_token): If parser->tokens isn't
5233 &parser->tokens_buf[0], increment parser->tokens.
5234 (c_parser_consume_pragma): Likewise.
5235 (enum pragma_context): Add pragma_struct and pragma_param.
5236 (c_parser_external_declaration): Adjust
5237 c_parser_declaration_or_fndef caller.
5238 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5239 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5240 Adjust recursive call.
5241 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5242 of pragma_external.
5243 (c_parser_parameter_declaration): Use pragma_param instead of
5244 pragma_external.
5245 (c_parser_compound_statement_nostart, c_parser_label,
5246 c_parser_for_statement): Adjust
5247 c_parser_declaration_or_fndef callers.
5248 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5249 it through to c_parser_conditional_expression.
5250 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5251 pass it through to c_parser_binary_expression. Adjust recursive
5252 call.
5253 (c_parser_binary_expression): Remove prec argument, add
5254 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5255 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5256 binop matches it, use build2 instead of parser_build_binary_op.
5257 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5258 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5259 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5260 Handle pragma_struct and pragma_param the same as pragma_external.
5261 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5262 (c_parser_omp_variable_list): Parse array sections for
5263 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5264 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5265 (c_parser_omp_clause_reduction): Handle user defined reductions.
5266 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5267 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5268 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5269 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5270 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5271 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5272 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5273 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5274 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5275 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5276 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5277 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5278 (c_parser_omp_for_loop): Add CODE argument, pass it through
5279 to c_finish_omp_for. Change last argument to cclauses,
5280 and adjust uses to grab parallel clauses from the array of all
5281 the split clauses. Adjust c_parser_binary_expression,
5282 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5283 (omp_split_clauses): New function.
5284 (c_parser_omp_simd): New function.
5285 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5286 Allow the function to be called also when parsing combined constructs,
5287 and call c_parser_omp_simd when parsing for simd.
5288 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5289 #pragma omp section, require exactly one structured-block instead of
5290 sequence of statements.
5291 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5292 Allow the function to be called also when parsing combined constructs.
5293 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5294 Allow the function to be called also when parsing combined
5295 constructs.
5296 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5297 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5298 c_parser_omp_teams, c_parser_omp_target_data,
5299 c_parser_omp_target_update, c_parser_omp_target,
5300 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5301 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5302 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5303 (c_parser_omp_construct): Add p_name and mask vars. Handle
5304 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5305 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5306 and c_parser_omp_sections callers.
5307 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5308 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5309 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5310 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5311 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5312 OMP_CLAUSE_DEPEND.
5313 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5314 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5315 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5316 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5317 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5318 * c-typeck.c: Include tree-inline.h.
5319 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5320 handle_omp_array_sections_1, handle_omp_array_sections,
5321 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5322 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5323 user defined reductions.
5324 (c_tree_equal): New function.
5325 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5326 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5327 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5328 c_check_omp_declare_reduction_r): New prototypes.
5329 * c-decl.c (current_omp_declare_target_attribute): New variable.
5330 (c_decl_attributes): New function.
5331 (start_decl, start_function): Use it instead of decl_attributes.
5332 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5333 c_omp_reduction_decl, c_omp_reduction_lookup,
5334 c_check_omp_declare_reduction_r): New functions.
5335
0a6c2227
TT
53362013-09-25 Tom Tromey <tromey@redhat.com>
5337
5338 * Make-lang.in (c/gccspec.o): Remove.
5339 (CFLAGS-c/gccspec.o): New variable.
5340 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5341 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5342 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5343
f3bc55f0
TT
53442013-09-25 Tom Tromey <tromey@redhat.com>
5345
5346 * Make-lang.in (c/gccspec.o): Don't use subshell.
5347
a24d975c
MP
53482013-09-18 Marek Polacek <polacek@redhat.com>
5349
5350 PR sanitize/58443
5351 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5352 Remove unnecessary check.
5353
ce6923c5
MP
53542013-09-18 Marek Polacek <polacek@redhat.com>
5355
5356 PR sanitizer/58411
5357 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5358 no_sanitize_undefined attribute.
5359
a1e51df9
KT
53602013-09-13 Kai Tietz <ktietz@redhat.com>
5361
5362 PR target/57848
5363 * c-decl.c (c_builtin_function_ext_scope): Remove
5364 wrong assumption that it is never called on prexisting
5365 symbol.
5366
0af94e6f
JR
53672013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5368
5369 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5370
20059c8b
GDR
53712013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5372
5373 * c-objc-common.c (c_tree_printer): Tidy.
5374
de5a5fa1
MP
53752013-08-30 Marek Polacek <polacek@redhat.com>
5376
5377 * c-typeck.c (build_binary_op): Add division by zero and shift
5378 instrumentation.
5379
2531a1d9 53802013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5381 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5382
6e2bcc98 5383 PR c/35649
2531a1d9
JR
5384 * c-typeck.c (c_common_type): Prefer double_type_node over
5385 other REAL_TYPE types with the same precision.
5386 (convert_arguments): Likewise.
5387
025311c4
GDR
53882013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5389
5390 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5391 (c_initialize_diagnostics): Call a destructor for the early printer.
5392
da6ca2b5
GDR
53932013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5394
5395 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5396 printer initialization.
5397
318cda85 53982013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5399
318cda85
BI
5400 PR c/57490
5401 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5402 check for truth values.
5403 (expand_array_notation_exprs): Added truth values case. Removed an
5404 unwanted else. Added for-loop to walk through subtrees in default
5405 case.
5406
b066401f
GDR
54072013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5408
5409 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5410
fb48aadc
JM
54112013-07-23 Joseph Myers <joseph@codesourcery.com>
5412
5413 * c-parser.c (struct c_generic_association): Fix typo.
5414
433cc7b0
TT
54152013-07-23 Tom Tromey <tromey@redhat.com>
5416 Joseph Myers <joseph@codesourcery.com>
5417
5418 * c-parser.c (struct c_generic_association): New.
5419 (c_generic_association_d): New typedef.
5420 (c_parser_generic_selection): New function.
5421 (c_parser_postfix_expression): Handle RID_GENERIC.
5422
26d40c3d
JM
54232013-07-13 Jason Merrill <jason@redhat.com>
5424
5425 PR c++/57793
5426 * c-decl.c (finish_struct): Check for too-large class.
5427
ecdbd01a 54282013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5429
5430 PR c/57821
5431 * c-typeck.c (set_init_index): When folding, check for index overflow.
5432
1141ed3f
BI
54332013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5434
5435 * c-parser.c (c_parser_array_notation): Removed rejection of array
5436 notations in an array of function pointers.
5437
713b46fa
BI
54382013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5439
5440 * c-array-notation.c (make_triplet_val_inv): New function.
5441 (create_cmp_incr): Likewise.
5442 (create_array_refs): Likewise.
5443 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5444 Also modularized common parts between functions and called the function.
5445 (build_array_notation_expr): Likewise.
5446 (fix_conditional_array_notations_1): Likewise.
5447 (fix_array_notation_expr): Likewise.
5448 (fix_array_notation_call_expr): Likewise.
5449
92f20202
MP
54502013-06-18 Marek Polacek <polacek@redhat.com>
5451
5452 PR c/57630
5453 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5454
73a23b06
BI
54552013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5456
5457 * c-array-notation.c (build_array_notation_expr): Reject array notation
5458 mismatch between LHS and RHS even inside a call_expr. Also, removed
5459 a couple while statements that were dead code.
5460
00b8517d
BI
54612013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5462
5463 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5464 excessive precision expressions in function parameters. Also removed
5465 couple unwanted while statements.
5466
1509bdda
BI
54672013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5468
5469 * c-array-notation.c (expand_array_notation_exprs): Added
5470 ARRAY_NOTATION_REF case.
5471
d60f1706
BI
54722013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5473
5474 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5475 function to c-family/array-notation-common.c.
5476 (is_cilkplus_reduce_builtin): Likewise.
5477 (find_rank): Likewise.
5478 (extract_array_notation_exprs): Likewise.
5479 (replace_array_notations): Likewise.
5480 (find_inv_trees): Likewise.
5481 (replace_inv_trees): Likewise.
5482 (contains_array_notation_expr): Likewise.
5483 (find_correct_array_notation_type): Likewise.
5484 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5485 (struct inv_list): Moved this to c-family/array-notation-common.c.
5486 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5487
6d6efbb3
BI
54882013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5489
5490 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5491 reduction functions outside the for-loop. Added a check if the fundecl
5492 is non-NULL. Finally, removed an unwanted if-statement, and made the
5493 body unconditional.
5494
25c22937
BI
54952013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5496
5497 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5498 condition of the if-statement matches the rank of else-block and then-
5499 block when array notations are used.
5500 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5501 expression after the entire function body is parsed.
5502 (c_parser_expr_no_commas): Delayed creating array notation expressions
5503 to the end of function parsing.
5504 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5505 whole if-statement instead of just the condition.
5506 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5507
edd25645
BI
55082013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5509
5510 PR c/57474
5511 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5512 array to NULL_TREE if they are unused. Also added a check for the
5513 field to be NULL before its fields are used in future.
5514
065ce7f1
RO
55152013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5516
5517 PR bootstrap/57450
5518 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5519 (build_array_notation_expr): Likewise.
5520
36536d79
BI
55212013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5522
5523 * c-typeck.c (build_array_ref): Added a check to see if array's
5524 index is greater than one. If true, then emit an error.
5525 (build_function_call_vec): Exclude error reporting and checking
5526 for builtin array-notation functions.
5527 (convert_arguments): Likewise.
5528 (c_finish_return): Added a check for array notations as a return
5529 expression. If true, then emit an error.
5530 (c_finish_loop): Added a check for array notations in a loop
5531 condition. If true then emit an error.
5532 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5533 (build_binary_op): Added a check for array notation expr inside
5534 op1 and op0. If present, we call another function to find correct
5535 type.
5536 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5537 * c-parser.c (c_parser_compound_statement): Check if array
5538 notation code is used in tree, if so, then transform them into
5539 appropriate C code.
5540 (c_parser_expr_no_commas): Check if array notation is used in LHS
5541 or RHS, if so, then build array notation expression instead of
5542 regular modify.
5543 (c_parser_postfix_expression_after_primary): Added a check for
5544 colon(s) after square braces, if so then handle it like an array
5545 notation. Also, break up array notations in unary op if found.
5546 (c_parser_direct_declarator_inner): Added a check for array
5547 notation.
5548 (c_parser_compound_statement): Added a check for array notation in
5549 a stmt. If one is present, then expand array notation expr.
5550 (c_parser_if_statement): Likewise.
5551 (c_parser_switch_statement): Added a check for array notations in
5552 a switch statement's condition. If true, then output an error.
5553 (c_parser_while_statement): Similarly, but for a while.
5554 (c_parser_do_statement): Similarly, but for a do-while.
5555 (c_parser_for_statement): Similarly, but for a for-loop.
5556 (c_parser_unary_expression): Check if array notation is used in a
5557 pre-increment or pre-decrement expression. If true, then expand
5558 them.
5559 (c_parser_array_notation): New function.
5560 * c-array-notation.c: New file.
5561 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5562
cd192ccc
MS
55632013-05-23 Mike Stump <mikestump@comcast.net>
5564
5565 * c-typeck.c (convert_for_assignment): Handle references to memory
5566 spaces better.
5567
427b248d
JM
55682013-05-16 Jason Merrill <jason@redhat.com>
5569
5570 * Make-lang.in (cc1$(exeext)): Use link mutex.
5571
44d90fe1
PC
55722013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5573
5574 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5575 to simply use OPT_Wpointer_arith.
5576 (build_unary_op): Likewise.
5577
4e7d7b3d
JJ
55782013-04-03 Jakub Jelinek <jakub@redhat.com>
5579
5580 PR c/19449
5581 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5582 argument. If set, or it temporarily for parsing of the first
5583 argument into force_folding_builtin_constant_p.
5584 (c_parser_postfix_expression): Adjust callers.
5585
839b422f
RB
55862013-03-21 Richard Biener <rguenther@suse.de>
5587
5588 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5589 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5590
2ee028f1
MP
55912013-02-12 Marek Polacek <polacek@redhat.com>
5592
5593 PR c/44938
5594 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5595 origtypes to NULL.
5596
8824edff
JJ
55972013-01-24 Jakub Jelinek <jakub@redhat.com>
5598
5599 PR c/56078
5600 * c-typeck.c (set_nonincremental_init_from_string): If
5601 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5602 returned false.
5603 (process_init_element): Likewise.
5604
eadd3d0d
JJ
56052012-12-20 Jakub Jelinek <jakub@redhat.com>
5606
5607 PR c++/55619
5608 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5609 argument, don't call default_function_array_conversion
5610 nor c_fully_fold here.
5611 (c_parser_asm_statement): Adjust callers.
5612 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5613 and outputs here, and call default_function_array_conversion
5614 on inputs that don't need to be addressable.
5615
f8a93a2e
JJ
56162012-12-18 Jakub Jelinek <jakub@redhat.com>
5617
5618 PR c/39464
5619 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5620 warning require that both c_common_unsigned_type as well as
5621 c_common_signed_type is the same for both mvl and mvr types.
5622
9771b263
DN
56232012-11-16 Diego Novillo <dnovillo@google.com>
5624
5625 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5626
5627 * c-common.c: Use new vec API in vec.h.
5628 * c-common.h: Likewise.
5629 * c-gimplify.c: Likewise.
5630 * c-pragma.c: Likewise.
5631 * c-pretty-print.c: Likewise.
5632 * c-pretty-print.h: Likewise.
5633 * c-semantics.c: Likewise.
5634 * c-decl.c: Likewise.
5635 * c-parser.c: Likewise.
5636 * c-tree.h: Likewise.
5637 * c-typeck.c: Likewise.
5638
880661a4
JW
56392012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5640
5641 PR c++/54930
5642 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5643
077d1abe
MLI
56442012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5645
5646 PR c/53066
5647 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5648 shadows a function, unless the variable is a function or a
5649 pointer-to-function.
5650
3a785c97
JJ
56512012-10-12 Jakub Jelinek <jakub@redhat.com>
5652
5653 PR c/54381
5654 * c-parser.c (struct c_tree_loc_pair): Removed.
5655 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5656 add location_t * and tree * arguments, fill in array of 3
5657 sizeof_arg trees and corresponding locs.
5658 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5659 c_parser_expr_list callers.
5660 (c_parser_postfix_expression_after_primary): Likewise. Pass
5661 array of 3 sizeof_arg trees and locs (corresponding to first
5662 3 arguments) to sizeof_pointer_memaccess_warning.
5663
703c8606
LC
56642012-10-09 Lawrence Crowl <crowl@google.com>
5665
5666 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5667 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5668 hash table.
5669
5d9de0d0
PC
56702012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5671
5672 PR c++/54194
5673 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5674 call.
5675
a212e43f
MG
56762012-10-09 Marc Glisse <marc.glisse@inria.fr>
5677
5678 PR c++/54427
5679 * c-typeck.c: Include c-common.h.
5680 (enum stv_conv): Moved to c-common.h.
5681 (scalar_to_vector): Moved to c-common.c.
5682 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5683 * Make-lang.in: c-typeck.c depends on c-common.h.
5684
3b78de56
AC
56852012-10-04 Arnaud Charlet <charlet@adacore.com>
5686
5687 * c-decl.c (c_write_global_declarations): Fix handling of
5688 -fdump-ada-spec*.
5689
78c60e3d
SS
56902012-09-30 Sharad Singhai <singhai@google.com>
5691
5692 * c-decl.c (c_write_global_declarations): Use a different method
5693 to determine if the dump has ben initialized.
5694
9f33203d
JM
56952012-09-14 Joseph Myers <joseph@codesourcery.com>
5696
5697 PR c/54552
5698 * c-typeck.c (c_cast_expr): When casting to a type requiring
5699 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5700 c_fully_fold first.
5701
a27d595d
JM
57022012-09-14 Joseph Myers <joseph@codesourcery.com>
5703
5704 PR c/54103
5705 * c-typeck.c (build_unary_op): Pass original argument of
5706 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5707 any C_MAYBE_CONST_EXPR, if it has integer operands.
5708 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5709 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5710 to c_objc_common_truthvalue_conversion, then remove any
5711 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5712 c_objc_common_truthvalue_conversion not
5713 c_common_truthvalue_conversion.
5714 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5715 call note_integer_operands for arguments with integer operands
5716 that are not integer constants.
5717
9feb29df
JJ
57182012-09-13 Jakub Jelinek <jakub@redhat.com>
5719
5720 PR c/54559
5721 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5722 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5723
d409320c
JJ
57242012-08-31 Jakub Jelinek <jakub@redhat.com>
5725
5726 PR c/54428
5727 * c-convert.c (convert): Don't call fold_convert_loc if
5728 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5729 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5730 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5731
6265d07c
JJ
57322012-08-24 Jakub Jelinek <jakub@redhat.com>
5733
5734 PR c/54355
5735 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5736 for nested and empty_ok arguments in the call to
5737 c_parser_declaration_or_fndef.
5738
1a4049e7
JJ
57392012-08-17 Jakub Jelinek <jakub@redhat.com>
5740
5741 * c-tree.h (c_last_sizeof_arg): Declare.
5742 * c-parser.c (struct c_tree_loc_pair): New type.
5743 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5744 non-NULL.
5745 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5746 (c_parser_postfix_expression_after_primary): Likewise. Call
5747 sizeof_pointer_memaccess_warning if needed.
5748 (sizeof_ptr_memacc_comptypes): New function.
5749 * c-typeck.c (c_last_sizeof_arg): New global variable.
5750 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5751
0229aee9
UB
57522012-07-24 Uros Bizjak <ubizjak@gmail.com>
5753
5754 * c-lang.h (lang_decl): Add variable_size GTY option.
5755
7ee2468b
SB
57562012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5757
5758 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5759 * Make-lang.in: Fix dependencies.
5760
d4a10d0a
SB
57612012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5762
5763 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5764 and add language Makefile hooks.
5765 * config-lang.in: New file.
5766 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5767 add the required "normal" config-lang.in rules.
5768 * c-lang.h: Moved from gcc/ to here.
5769 * c-tree.h: Likewise.
5770 * c-objc-common.c: Likewise.
5771 * c-objc-common.h: Likewise.
5772 * c-typeck.c: Likewise.
5773 * c-convert.c: Likewise.
5774 * c-lang.c: Likewise.
5775 * c-aux-info.c: Likewise.
5776 * c-errors.c: Likewise.
5777 * gccspec.c: Likewise.
5778 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5779 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5780\f
85ec4feb 5781Copyright (C) 2012-2018 Free Software Foundation, Inc.
d4a10d0a
SB
5782
5783Copying and distribution of this file, with or without modification,
5784are permitted in any medium without royalty provided the copyright
5785notice and this notice are preserved.