]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
C++: more location wrapper nodes (PR c++/43064, PR c++/43486)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
6d939173
JJ
12018-12-11 Jakub Jelinek <jakub@redhat.com>
2
3 PR sanitizer/88426
4 * c-convert.c (convert): Call c_fully_fold before calling
5 ubsan_instrument_float_cast.
6
b7055028
SB
72018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
8
9 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
10 setting "quals".
11
5b76e75f
SB
122018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
13
14 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
15 after asm. Pass a flag for it to build_asm_expr.
16 * c-tree.h (build_asm_expr): Update declaration.
17 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
18 set ASM_INLINE_P.
19
30bd42b9
SB
202018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
21
22 PR inline-asm/55681
23 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
24 combination of volatile and goto, in any order, without repetitions.
25
9df6c0e4
JB
262018-12-04 James Norris <jnorris@codesourcery.com>
27 Cesar Philippidis <cesar@codesourcery.com>
28 Julian Brown <julian@codesourcery.com>
29
30 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
31 code.
32
f44697b7
RB
332018-11-30 Richard Biener <rguenther@suse.de>
34
35 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
36 _Literal (type) { ... } as empty aggregate or vector constructor.
37
550dfbdc
MS
382018-11-29 Martin Sebor <msebor@redhat.com>
39
40 PR c/88091
41 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
42 (convert_arguments): Add comments. Pass additional argument to
43 the function above.
44
673670da
MS
452018-11-29 Martin Sebor <msebor@redhat.com>
46
47 PR c/88172
48 PR testsuite/88208
49 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
50
db1d09b0
MS
512018-11-23 Martin Sebor <msebor@redhat.com>
52
53 PR testsuite/88098
54 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
55 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
56
98f08eb8
MS
572018-11-20 Martin Sebor <msebor@redhat.com>
58
59 * c-parser.c (c_parser_has_attribute_expression): New function.
60 (c_parser_attribute): New function.
61 (c_parser_attributes): Move code into c_parser_attribute.
62 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
63
cd5da983
MS
642018-11-15 Martin Sebor <msebor@redhat.com>
65
66 PR c/83656
67 * c-decl.c (header_for_builtin_fn): Declare.
68 (diagnose_mismatched_decls): Diagnose declarations of built-in
69 functions without a prototype.
70 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
71 (convert_argument): Same.
72 (convert_arguments): Factor code out into convert_argument.
73 Detect mismatches between built-in formal arguments in calls
74 to built-in without prototype.
75 (build_conditional_expr): Same.
76 (type_or_builtin_type): New function.
77 (convert_for_assignment): Add argument. Conditionally issue
78 warnings instead of errors for mismatches.
79
620e594b
DM
802018-11-13 David Malcolm <dmalcolm@redhat.com>
81
82 * c-decl.c: Replace "source_location" with "location_t".
83 * c-tree.h: Likewise.
84 * c-typeck.c: Likewise.
85 * gimple-parser.c: Likewise.
86
3179ebae
JJ
872018-11-09 Jakub Jelinek <jakub@redhat.com>
88
81a227c6
JJ
89 * c-parser.c (c_parser_omp_clause_final): Use
90 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
91 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
92 parsing instead of c_parser_paren_condition.
93 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
94 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
95 c_fully_fold instead of c_parser_condition.
96 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
97 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
98 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
99 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
100 c_parser_expr_no_commas instead of c_parser_expression.
101
98c91c56
JJ
102 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
103 reduction clause with inscan modifier.
104
3179ebae
JJ
105 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
106 clauses other than atomic_default_mem_order.
107
28567c40
JJ
1082018-11-08 Jakub Jelinek <jakub@redhat.com>
109
110 * c-parser.c: Include memmode.h.
111 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
112 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
113 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
114 task_reduction clauses.
115 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
116 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
117 section, or lvalue assignment expression.
118 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
119 (c_parser_omp_clause_lastprivate): Parse optional
120 conditional: modifier.
121 (c_parser_omp_clause_hint): Require constant integer expression rather
122 than just integer expression.
123 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
124 clause.
125 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
126 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
127 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
128 functions.
129 (c_parser_omp_clause_depend): Parse iterator modifier and handle
130 iterators. Parse mutexinoutset and depobj kinds.
131 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
132 callers.
133 (c_parser_omp_all_clauses): Likewise. Handle
134 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
135 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
136 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
137 default memory order from requires directive if any. Adjust
138 c_finish_omp_atomic caller.
139 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
140 (c_parser_omp_flush): Parse flush with memory-order-clause.
141 (c_parser_omp_for_loop): Allow NE_EXPR even in
142 OpenMP loops, adjust c_finish_omp_for caller.
143 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
144 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
145 Allow to be called while parsing combined parallel master.
146 Parse combined master taskloop{, simd}.
147 (c_parser_omp_parallel): Parse combined
148 parallel master{, taskloop{, simd}} constructs.
149 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
150 (OMP_TASKGROUP_CLAUSE_MASK): Define.
151 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
152 (OMP_TASKWAIT_CLAUSE_MASK): Define.
153 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
154 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
155 around teams body. Use SET_EXPR_LOCATION.
156 (c_parser_omp_target_data): Allow target data
157 with only use_device_ptr clauses.
158 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
159 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
160 (c_parser_omp_requires): New function.
161 (c_finish_taskloop_clauses): New function.
162 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
163 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
164 declaration. Disallow in_reduction clause when combined with parallel
165 master.
166 (c_parser_omp_construct): Adjust c_parser_omp_master and
167 c_parser_omp_taskgroup callers.
168 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
169 other than cancel.
170 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
171 like OMP_CLAUSE_REDUCTION.
172 (handle_omp_array_sections): Likewise. Call save_expr on array
173 reductions before calling build_index_type. Handle depend clauses
174 with iterators.
175 (struct c_find_omp_var_s): New type.
176 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
177 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
178 with static, runtime or auto schedule kinds. Call save_expr for whole
179 array reduction sizes. Diagnose reductions with zero sized elements
180 or variable length structures. Diagnose nogroup clause used with
181 reduction clause(s). Handle depend clause with
182 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
183 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
184 some different type for other kinds. Use build_unary_op with
185 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
186 Handle depend clauses with iterators. Remove no longer needed special
187 case that predetermined const qualified vars may be specified in
188 firstprivate clause. Complain if const qualified vars are mentioned
189 in data-sharing clauses other than firstprivate or shared. Use
190 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
191 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
192 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
193 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
194
7e2de6df
DM
1952018-10-29 David Malcolm <dmalcolm@redhat.com>
196
197 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
198 logic for change to name_hint::operator bool.
199 (undeclared_variable): Likewise.
200 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
201 (c_parser_parameter_declaration): Likewise.
202
9f936c86
JM
2032018-10-17 Joseph Myers <joseph@codesourcery.com>
204
205 * c-errors.c (pedwarn_c11): New function.
206 * c-parser.c (disable_extension_diagnostics): Save
207 warn_c11_c2x_compat and set it to 0.
208 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
209 (c_parser_static_assert_declaration_no_semi): Handle
210 _Static_assert without string constant.
211 * c-tree.h (pedwarn_c11): New prototype.
212
033eb567
DM
2132018-10-17 David Malcolm <dmalcolm@redhat.com>
214
215 * Make-lang.in (selftest-c): New.
216 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
217 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
218 from gcc/Makefile.in.
219
0edf3afe
RB
2202018-10-02 Richard Biener <rguenther@suse.de>
221
222 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
223
8313a764
JM
2242018-09-26 Joseph Myers <joseph@codesourcery.com>
225
226 PR c/87390
227 * c-typeck.c (build_binary_op): Use excess precision for
228 comparisons of integers and floating-point for C11 and later.
229
ce6f0888
MJ
2302018-09-26 Martin Jambor <mjambor@suse.cz>
231
232 PR c/87347
233 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
234 comment.
235
9c4a4b3c
DM
2362018-09-17 David Malcolm <dmalcolm@redhat.com>
237
238 * c-objc-common.c (range_label_for_type_mismatch::get_text):
239 Update for new param.
240 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
241 Likewise.
242
80c6d1f4
MJ
2432018-09-17 Martin Jambor <mjambor@suse.cz>
244
245 PR c/63886
246 * c-parser.c: (warn_for_abs): New function.
247 (c_parser_postfix_expression_after_primary): Call it.
248
4a426e36
BE
2492018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
250
251 * c-typeck.c (digest_init): Shorten overlength strings.
252
6d900107
BE
2532018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
254
255 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
256
b5764229
BE
2572018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
258
259 * c-decl.c (finish_decl): Call braced_list_to_string here ...
260 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
261
22eea6b2
AM
2622018-08-30 Alexander Monakov <amonakov@ispras.ru>
263
264 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
265 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
266
85204e23
DM
2672018-08-27 David Malcolm <dmalcolm@redhat.com>
268
269 PR 87091
270 * c-decl.c (implicitly_declare): Update call to
271 maybe_add_include_fixit to suggest overriding the location, as it
272 is for a note.
273 * c-objc-common.c (c_tree_printer): Update for conversion of
274 show_caret_p to a tri-state.
275
3d78e008
ML
2762018-08-27 Martin Liska <mliska@suse.cz>
277
278 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
279 fndecl_built_in_p and remove check for FUNCTION_DECL if
280 possible.
3d78e008
ML
281 (diagnose_mismatched_decls): Likewise.
282 (merge_decls): Likewise.
283 (warn_if_shadowing): Likewise.
284 (pushdecl): Likewise.
285 (implicitly_declare): Likewise.
286 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
287 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
288 * c-typeck.c (build_function_call_vec): Likewise.
289 (convert_arguments): Likewise.
290
097f82ec
DM
2912018-08-20 David Malcolm <dmalcolm@redhat.com>
292
293 PR other/84889
294 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
295 (diagnose_mismatched_decls): Likewise, in various places.
296 (warn_if_shadowing): Likewise.
297 (implicit_decl_warning): Likewise.
298 (implicitly_declare): Likewise.
299 (undeclared_variable): Likewise.
300 (declare_label): Likewise.
301 (grokdeclarator): Likewise.
302 (start_function): Likewise.
303 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
304 (c_parser_parameter_declaration): Likewise.
305 (c_parser_binary_expression): Likewise.
306 * c-typeck.c (c_expr_sizeof_expr): Likewise.
307 (parser_build_binary_op): Likewise.
308 (build_unary_op): Likewise.
309 (error_init): Likewise.
310 (pedwarn_init): Likewise.
311 (warning_init): Likewise.
312 (convert_for_assignment): Likewise.
313
96e6ae57
DM
3142018-08-15 David Malcolm <dmalcolm@redhat.com>
315
316 * c-objc-common.c: Include "gcc-rich-location.h".
317 (c_tree_printer): Move implemenation of '%T' to...
318 (print_type): ...this new function.
319 (range_label_for_type_mismatch::get_text): New function.
320 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
321 range for the various ic_argpass cases.
322 (class maybe_range_label_for_tree_type_mismatch): New class.
323 (build_binary_op): Use it when calling binary_op_error.
324
0cd020ae
PK
3252018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
326
327 * c-decl.c (start_decl): Do not warn if variables is named as main
328 and is a local variable.
329
72733314
IS
3302018-08-15 Iain Sandoe <iain@sandoe.co.uk>
331
332 PR c/19315
333 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
334 objects of unknown size.
335
23aa9f7c
MS
3362018-08-13 Martin Sebor <msebor@redhat.com>
337
338 PR tree-optimization/71625
339 * c-parser.c (c_parser_declaration_or_fndef): Call
340 braced_list_to_string.
341
e5e7e50d
BH
3422018-08-03 Bogdan Harjoc <harjoc@gmail.com>
343
344 PR c/86690
345 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
346 errors.
347
8a45b051
MS
3482018-08-01 Martin Sebor <msebor@redhat.com>
349
350 PR tree-optimization/86650
351 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
352 and TREE_BLOCK (t) from within percent_K_format to this callsite.
353
5922dcb5
JJ
3542018-08-01 Jakub Jelinek <jakub@redhat.com>
355
356 PR c/85704
357 * c-typeck.c (init_field_decl_cmp): New function.
358 (output_pending_init_elements): Use it for field comparisons
359 instead of pure bit_position comparisons.
360
9b452033
JJ
3612018-07-12 Jakub Jelinek <jakub@redhat.com>
362
363 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
364 type here, instead add "omp declare target implicit" attribute.
365 (finish_decl): Diagnose vars without mappable type here.
366
829c6349
CLT
3672018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
368 Thomas Schwinge <thomas@codesourcery.com>
369 Cesar Philippidis <cesar@codesourcery.com>
370
371 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
372 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
373 to their non-present_or_* counterparts. Make 'self' an alias to
374 PRAGMA_OACC_CLAUSE_HOST.
375 (c_parser_oacc_data_clause): Update GOMP mappings for
376 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
377 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
378 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
379 Remove support for present_or_* clauses.
380 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
381 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
382 (OACC_DECLARE_CLAUSE_MASK): Likewise.
383 (OACC_DATA_CLAUSE_MASK): Likewise.
384 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
385 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
386 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
387 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
388 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
389
e197e64e
KV
3902018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
391
392 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
393 * gimple-parser.c (c_parser_gimple_statement): Likewise.
394 (c_parser_gimple_unary_expression): Likewise.
395
487f2f61
JJ
3962018-06-15 Jakub Jelinek <jakub@redhat.com>
397
398 PR c/86093
399 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
400 before doing POINTER_DIFF_EXPR.
401
e4d44a37
MP
4022018-06-07 Marek Polacek <polacek@redhat.com>
403
404 PR c/85318
405 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
406 for loop initial declarations.
407
b67b9225
DP
4082018-05-30 David Pagan <dave.pagan@oracle.com>
409
410 PR c/55976
411 * c-decl.c (grokdeclarator): Update check for return type warnings.
412 (start_function): Likewise.
413 (finish_function): Likewise.
414 * c-typeck.c (c_finish_return): Update check for return type warnings.
415 Pass OPT_Wreturn_type to pedwarn when appropriate.
416
c566cc9f
RS
4172018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
418
419 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
420 __FMA_EXPR handlng.
421
e4f81565
RS
4222018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
423
424 * gimple-parser.c: Include internal-fn.h.
425 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
426 (c_parser_gimple_call_internal): New function.
427 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
428 Fix typos in comment.
429
79e7b1fe
JJ
4302018-05-10 Jakub Jelinek <jakub@redhat.com>
431
432 PR c++/85662
433 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
434 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
435 fold_convert_loc.
436 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
437 fold_offsetof_1, pass argtype as TYPE to it and drop the
438 fold_convert_loc.
439
f7584c81
DP
4402018-05-02 David Pagan <dave.pagan@oracle.com>
441
442 PR c/30552
443 * c-decl.c (old_style_parameter_scope): New function.
444 * c-parser.c (c_parser_postfix_expression): Check for statement
445 expressions in old-style function parameter list declarations.
446 * c-parser.h (old_style_parameter_scope): New extern declaration.
447
b33a0cb3
JJ
4482018-04-25 Jakub Jelinek <jakub@redhat.com>
449
450 PR sanitizer/84307
451 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
452 it is not TREE_STATIC.
453 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
454 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
455 its COMPOUND_LITERAL_EXPR_DECL.
456
c5c5822a
JM
4572018-03-21 Joseph Myers <joseph@codesourcery.com>
458
459 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
460 where all functions return the same _FloatN or _FloatNx type,
461 treat integer types as _Float64 instead of double.
462
aa1c9429
JJ
4632018-03-21 Jakub Jelinek <jakub@redhat.com>
464
465 PR c/84999
466 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
467 building vector comparison, diagnose it and return error_mark_node.
468
9bb45a95
JJ
4692018-03-15 Jakub Jelinek <jakub@redhat.com>
470
471 PR c/84853
472 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
473 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
474 INTEGER_TYPE element type.
475
ada6bad9
DP
4762018-03-13 David Pagan <dave.pagan@oracle.com>
477
478 PR c/46921
479 * c-typeck.c (output_init_element): Ensure field initializer
480 expression is always evaluated if there are side effects.
481
849bbdb9
JJ
4822018-03-06 Jakub Jelinek <jakub@redhat.com>
483
484 PR c/84721
485 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
486 !building_stmt_list_p ().
487
d74641bd
RS
4882018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
489
490 PR c/84305
491 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
492 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
493 and include the BIND_EXPR in the list of things that need to be
494 pre-evaluated.
495
0444aa9c
NS
4962018-02-09 Nathan Sidwell <nathan@acm.org>
497
498 PR c/84293
499 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
500 to strict_aliasing_warning.
501
7c30b12a
PC
5022018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
503
504 * c-typeck.c (really_start_incremental_init, push_init_level,
505 set_nonincremental_init, output_init_element, process_init_element):
506 Use DECL_UNNAMED_BIT_FIELD.
507
2be4dfcb
MP
5082018-01-31 Marek Polacek <polacek@redhat.com>
509
510 PR c/81779
511 * c-parser.c (c_parser_compound_statement_nostart): Call
512 expansion_point_location_if_in_system_header.
513
bb9869d5
DM
5142018-01-17 David Malcolm <dmalcolm@redhat.com>
515
516 PR c++/83814
517 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
518 the C part.
519
b4923738
JJ
5202018-01-13 Jakub Jelinek <jakub@redhat.com>
521
522 PR c/83801
523 * c-tree.h (decl_constant_value_1): Add a bool argument.
524 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
525 returning a CONSTRUCTOR if it is true. Use error_operand_p.
526 (decl_constant_value): Adjust caller.
527 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
528 decl_constant_value_1 as IN_INIT. Otherwise, punt if
529 decl_constant_value returns initializer that has BLKmode or
530 array type.
531 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
532
928686b1
RS
5332018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
534 Alan Hayward <alan.hayward@arm.com>
535 David Sherwood <david.sherwood@arm.com>
536
537 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
538 TYPE_VECTOR_SUBPARTS.
539
85ec4feb
JJ
5402018-01-03 Jakub Jelinek <jakub@redhat.com>
541
542 Update copyright years.
543
913884f7
JJ
5442018-01-01 Jakub Jelinek <jakub@redhat.com>
545
546 PR c/83595
547 * c-parser.c (c_parser_braced_init, c_parser_initelt,
548 c_parser_conditional_expression, c_parser_cast_expression,
549 c_parser_sizeof_expression, c_parser_alignof_expression,
550 c_parser_postfix_expression, c_parser_omp_declare_reduction,
551 c_parser_transaction_expression): Use set_error () method instead
552 of setting value member to error_mark_node.
553
c6cfa2bf
MM
5542017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
555
556 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
557 and _Float<N>X built-in functions.
558
11d29d63
JJ
5592017-12-22 Jakub Jelinek <jakub@redhat.com>
560
14ec014e
JJ
561 PR debug/83550
562 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
563 TYPE_STUB_DECL and call rest_of_type_compilation before processing
564 incomplete vars rather than after it.
565
11d29d63
JJ
566 PR debug/83547
567 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
568 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
569 and consider empty ones if there are no other stmts. For
570 -Wunused-value walk all statements before the one only followed by
571 DEBUG_BEGIN_STMTs.
572
170a8bd6 5732017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 574 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
575
576 * c-parser.c (c_parser_while_statement): Add unroll parameter and
577 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
578 (c_parser_do_statement): Likewise.
579 (c_parser_for_statement): Likewise.
580 (c_parser_statement_after_labels): Adjust calls to above.
581 (c_parse_pragma_ivdep): New static function.
582 (c_parser_pragma_unroll): Likewise.
583 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
584 <PRAGMA_UNROLL>: New case.
585
01512446
JJ
5862017-12-19 Jakub Jelinek <jakub@redhat.com>
587
588 * c-typeck.c (comptypes_internal, function_types_compatible_p,
589 perform_integral_promotions, digest_init): Replace Yoda conditions
590 with typical order conditions.
591 * c-decl.c (check_bitfield_type_and_width): Likewise.
592
c65e18d3
BE
5932017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
594
595 * c-typeck.c (c_safe_arg_type_equiv_p,
596 c_safe_function_type_cast_p): New function.
597 (build_c_cast): Implement -Wcast-function-type.
598
b7280579
RB
5992017-12-14 Richard Biener <rguenther@suse.de>
600
601 PR c/83415
602 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
603 like REALPART_EXPR for the behavior of whether its operand
604 is an lvalue.
605
49e6a6c0
MP
6062017-12-12 Marek Polacek <polacek@redhat.com>
607
608 PR c/82679
609 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
610
96a95ac1
AO
6112017-12-12 Alexandre Oliva <aoliva@redhat.com>
612
613 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
614 * c-parser.c (add_debug_begin_stmt): New.
615 (c_parser_declaration_or_fndef): Call it.
616 (c_parser_compound_statement_nostart): Likewise.
617 (c_parser_statement_after_labels): Likewise.
618 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
619
4b2b493f
JM
6202017-12-07 Joseph Myers <joseph@codesourcery.com>
621
622 * c-decl.c (build_compound_literal): Add parameter alignas_align
623 and set alignment of decl if nonzero.
624 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
625 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
626 qualifier.
627 (c_parser_struct_declaration): Update syntax comment.
628 (c_parser_type_name): Add alignas_ok argument and pass it to
629 c_parser_declspecs.
630 (c_parser_cast_expression): Pass true to c_parser_type_name and
631 give error if a cast used an _Alignas specifier.
632 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
633 give error if sizeof (type-name) used an _Alignas specifier.
634 (c_parser_alignof_expression): Pass true to c_parser_type_name and
635 give error if _Alignof (type-name) used an _Alignas specifier.
636 (c_parser_postfix_expression_after_paren_type): Check specified
637 alignment for a compound literal and pass it to
638 build_compound_literal.
639 * c-parser.h (c_parser_type_name): Update prototype.
640 * c-tree.h (build_compound_literal): Update prototype.
641
5d9ae53d
MS
6422017-12-07 Martin Sebor <msebor@redhat.com>
643
644 PR c/81544
645 * c-decl.c (c_decl_attributes): Look up existing declaration and
646 pass it to decl_attributes.
647
c79144f8
DM
6482017-12-06 David Malcolm <dmalcolm@redhat.com>
649
650 PR c/83236
651 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
652 reserved for use by the implementation.
653
613bc14f
DM
6542017-12-06 David Malcolm <dmalcolm@redhat.com>
655
656 * c-decl.c: Include "c-family/c-spellcheck.h".
657
05abad4c
ML
6582017-12-05 Martin Liska <mliska@suse.cz>
659 Jakub Jelinek <jakub@redhat.com>
660
661 * c-typeck.c (pointer_diff): Add new argument and instrument
662 pointer subtraction.
663 (build_binary_op): Similar for pointer comparison.
664
cc6534d4
JJ
6652017-12-01 Jakub Jelinek <jakub@redhat.com>
666
65791f42
JJ
667 PR c/79153
668 * c-parser.c: Include tree-iterator.h.
669 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
670 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
671 on it.
672
cc6534d4
JJ
673 PR c/83222
674 * c-tree.h (decl_constant_value_1): Declare.
675 * c-typeck.c (decl_constant_value_1): New function.
676 (decl_constant_value): Use it.
677 * c-fold.c (c_fully_fold_internal): If in_init, use
678 decl_constant_value_1 instead of decl_constant_value.
679
5de73c05
JJ
6802017-11-30 Jakub Jelinek <jakub@redhat.com>
681
682 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
683
058f0b9e
JJ
6842017-11-28 Jakub Jelinek <jakub@redhat.com>
685
686 PR sanitizer/81275
687 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
688 c_switch_covers_all_cases_p returns true.
689
5e9d6aa4 6902017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 691 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
692
693 * Make-lang.in (c/c-array-notation.o): Remove.
694 * c-array-notation.c: Delete.
695 * c-decl.c: Remove cilkplus condition.
696 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
697 c_parser_cilk_verify_simd, c_parser_array_notation,
698 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
699 c_parser_cilk_simd_fn_vector_attrs,
700 c_finish_cilk_simd_fn_tokens): Delete.
701 (c_parser_declaration_or_fndef): Remove cilkplus condition.
702 (c_parser_direct_declarator_inner): Ditto.
703 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
704 (c_parser_attributes, c_parser_compound_statement,
705 c_parser_statement_after_labels, c_parser_if_statement,
706 c_parser_switch_statement, c_parser_while_statement,
707 c_parser_do_statement, c_parser_for_statement,
708 c_parser_unary_expression, c_parser_postfix_expression,
709 c_parser_postfix_expression_after_primary,
710 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
711 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
712 support.
713 * c-typeck.c (build_array_ref, build_function_call_vec,
714 convert_arguments,
715 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
716 c_finish_loop, build_binary_op): Remove cilkplus support.
717
9e851845
JJ
7182017-11-28 Jakub Jelinek <jakub@redhat.com>
719
720 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
721 of build3.
722
8c7dbea9
BK
7232017-11-14 Boris Kolpackov <boris@codesynthesis.com>
724
725 * Make-lang.in (c.install-plugin): Install backend import library.
726
41521dee
JJ
7272017-11-23 Jakub Jelinek <jakub@redhat.com>
728
729 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
730 pragma_stmt context.
731
ac9effed
EB
7322017-11-23 Mike Stump <mikestump@comcast.net>
733 Eric Botcazou <ebotcazou@adacore.com>
734
735 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
736 ANNOTATE_EXPR.
737 (c_parser_do_statement): Likewise.
738 (c_parser_for_statement): Likewise.
739
ce95abc4
DM
7402017-11-22 David Malcolm <dmalcolm@redhat.com>
741
742 PR c++/62170
743 * c-objc-common.c (c_tree_printer): Convert penultimate param from
744 bool to bool *. Within '%T' handling, if showing an "aka", use
745 "quoted" param to add appropriate quoting.
746
974aedcc
MP
7472017-11-22 Marek Polacek <polacek@redhat.com>
748
749 PR c++/60336
750 PR middle-end/67239
751 PR target/68355
752 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
753
d4300cc6
DM
7542017-11-21 David Malcolm <dmalcolm@redhat.com>
755
756 PR c/83056
757 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
758 earlier failed lookups.
759
1af4ebf5
MG
7602017-11-21 Marc Glisse <marc.glisse@inria.fr>
761
762 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
763 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
764
26edace6
DM
7652017-11-20 David Malcolm <dmalcolm@redhat.com>
766
767 PR c/81404
768 * c-decl.c: Include "c-family/known-headers.h".
769 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
770 to known-headers.cc.
771 (class suggest_missing_header): Move to known-header.h.
772 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
773 than get_c_name_hint.
774
b1212255
DM
7752017-11-20 David Malcolm <dmalcolm@redhat.com>
776
777 * c-decl.c (get_c_name_hint): New function.
778 (class suggest_missing_header): New class.
779 (lookup_name_fuzzy): Call get_c_name_hint and use it to
780 suggest missing headers to the user.
781
6c7a259b
DM
7822017-11-20 David Malcolm <dmalcolm@redhat.com>
783
784 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
785 Include "c-family/name-hint.h"
786 (implicit_decl_warning): Convert "hint" from
787 const char * to name_hint. Pass location to
788 lookup_name_fuzzy. Suppress any deferred diagnostic if the
789 warning was not printed.
790 (undeclared_variable): Likewise for "guessed_id".
791 (lookup_name_fuzzy): Convert return type from const char *
792 to name_hint. Add location_t param.
793 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
794 Include "c-family/name-hint.h"
795 (c_parser_declaration_or_fndef): Convert "hint" from
796 const char * to name_hint. Pass location to lookup_name_fuzzy.
797 (c_parser_parameter_declaration): Likewise.
798
f9c59f7e
JJ
7992017-11-19 Jakub Jelinek <jakub@redhat.com>
800
801 PR c/66618
802 PR c/69960
803 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
804 where needed.
805 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
806 handle_omp_array_sections): Likewise.
807 (digest_init): Don't call decl_constant_value_for_optimization.
808 * c-tree.h (decl_constant_value_for_optimization): Removed.
809 * c-fold.c (c_fold_array_ref): New function.
810 (c_fully_fold_internal): Add LVAL argument, propagate it through
811 recursive calls. For VAR_P call decl_constant_value and
812 unshare if not LVAL and either optimizing or IN_INIT. Remove
813 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
814 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
815 (c_fully_fold): Add LVAL argument, pass it through to
816 c_fully_fold_internal.
817 (decl_constant_value_for_optimization): Removed.
818
3ca0dc60
JM
8192017-11-15 Joseph Myers <joseph@codesourcery.com>
820
821 PR c/81156
822 * c-parser.c (check_tgmath_function): New function.
823 (enum tgmath_parm_kind): New enum.
824 (c_parser_postfix_expression): Handle __builtin_tgmath.
825
64a5912c
DM
8262017-10-31 David Malcolm <dmalcolm@redhat.com>
827
828 * c-decl.c (implicit_decl_warning): Update for renaming of
829 pedwarn_at_rich_loc and warning_at_rich_loc.
830 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
831 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
832 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
833 (c_parser_struct_or_union_specifier): Likewise for renaming of
834 pedwarn_at_rich_loc.
835 (c_parser_parameter_declaration): Likewise for renaming of
836 error_at_rich_loc.
837 * c-typeck.c (build_component_ref): Likewise.
838 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
839 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
840 (set_init_label): Likewise for renaming of error_at_rich_loc.
841
c1136864
RB
8422017-10-30 Richard Biener <rguenther@suse.de>
843
844 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
845 stmts.
846
ee5fd23a
MM
8472017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
848
849 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
850 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
851
1a59ccf2
DM
8522017-10-25 David Malcolm <dmalcolm@redhat.com>
853
854 PR c/7356
855 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
856 semicolons.
857
bc1a75dd
JJ
8582017-10-25 Jakub Jelinek <jakub@redhat.com>
859
860 PR libstdc++/81706
861 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
862 newdecl to corresponding __builtin_ if any.
863
ff1ff960
PC
8642017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
865
866 PR c++/82466
867 * c-decl.c (diagnose_mismatched_decls): Use
868 OPT_Wbuiltin_declaration_mismatch.
869
62e1c678
DM
8702017-10-12 David Malcolm <dmalcolm@redhat.com>
871
872 * c-parser.c (c_parser_require): Add "type_is_unique" param and
873 use it to guard calls to maybe_suggest_missing_token_insertion.
874 (c_parser_parms_list_declarator): Override default value of new
875 "type_is_unique" param to c_parser_require.
876 (c_parser_asm_statement): Likewise.
877 * c-parser.h (c_parser_require): Add "type_is_unique" param,
878 defaulting to true.
879
a92f6726
NS
8802017-10-11 Nathan Sidwell <nathan@acm.org>
881
882 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
883
8e6cdc90
RS
8842017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
885
886 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
887 operating on trees as wide_ints.
888 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
889 (c_tree_equal): Likewise.
890
8139a48e
DM
8912017-10-04 David Malcolm <dmalcolm@redhat.com>
892
893 * c-decl.c (push_parm_decl): Store c_parm's location into the
894 PARAM_DECL.
895 (build_c_parm): Add "loc" param and store it within the c_parm.
896 * c-parser.c (struct c_parser): Add "last_token_location" field.
897 (c_parser_consume_token): Store location of the token into the
898 new field.
899 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
900 when handling a FUNCTION_DECL, if it doesn't already have them.
901 (c_parser_parameter_declaration): Generate a location for the
902 parameter, and pass it to the call to build_c_parm.
903 * c-tree.h (struct c_parm): Add field "loc".
904 (build_c_parm): Add location_t param.
905 * c-typeck.c (get_fndecl_argument_location): New function.
906 (inform_for_arg): New function.
907 (convert_for_assignment): Use inform_for_arg when dealing with
908 ic_argpass.
909
2a389958
JJ
9102017-09-29 Jakub Jelinek <jakub@redhat.com>
911
7d386d45
JJ
912 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
913 width is non-NULL.
914 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
915 don't SET_DECL_C_BIT_FIELD here.
916
2a389958
JJ
917 PR c/82340
918 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
919 instead of trying to set just TREE_READONLY manually.
920
ebc6a85e
TV
9212017-09-16 Tom de Vries <tom@codesourcery.com>
922
923 PR c/81875
924 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
925 cond itself.
926
bb75facd
JM
9272017-09-15 Joseph Myers <joseph@codesourcery.com>
928
929 PR c/82071
930 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
931 for C11.
932 (build_conditional_expr): For C11, generate result with excess
933 precision when one argument is an integer and the other is of a
934 type using excess precision.
935
1d933576
BE
9362017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
937
938 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
939
267bbb6f
MP
9402017-09-13 Marek Polacek <polacek@redhat.com>
941
942 PR c/82167
943 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
944 than expr.original_type.
945
6836632e
NS
9462017-09-12 Nathan Sidwell <nathan@acm.org>
947
948 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
949 resort_sorted_fields): Moved from c-family/c-common.c.
950 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
951
e035be33
JM
9522017-09-01 Joseph Myers <joseph@codesourcery.com>
953
954 PR c/82071
955 * c-typeck.c (build_atomic_assign): Handle argument with excess
956 precision. Ensure any EXCESS_PRECISION_EXPR is present in
957 argument passed to build_binary_op and convert_for_assignment but
958 not for call to c_fully_fold.
959 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
960 Ensure build_binary_op is called with argument with original
961 semantic type. Avoid calling c_fully_fold with an
962 EXCESS_PRECISION_EXPR from build_binary_op.
963
d2e05fcb
JJ
9642017-09-01 Jakub Jelinek <jakub@redhat.com>
965
966 PR c/81887
967 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
968
b397965c
RS
9692017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
970 Alan Hayward <alan.hayward@arm.com>
971 David Sherwood <david.sherwood@arm.com>
972
973 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
974 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
975 m1 and m2 to the signed equivalent of a fixed-point
976 SCALAR_TYPE_MODE.
977
14e18d71
DM
9782017-08-24 David Malcolm <dmalcolm@redhat.com>
979
980 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
981 than CAN_HAVE_LOCATION_P when determining whether to use the
982 location_t value within "value".
983
7f204c0f
DM
9842017-08-21 David Malcolm <dmalcolm@redhat.com>
985
986 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
987 rather than peeking the location of the first token.
988 * c-tree.h (c_expr::get_location): New method.
989
2f687306
DM
9902017-08-21 David Malcolm <dmalcolm@redhat.com>
991
992 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
993 to check_function_arguments.
994
3e7b80d7
MP
9952017-08-18 Marek Polacek <polacek@redhat.com>
996
997 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
998 commentary.
999
00aa1fa2
L
10002017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1001
1002 PR c/53037
1003 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1004 (check_bitfield_type_and_width): Don't allow bit-field with
1005 warn_if_not_aligned type.
1006
da67acb9
MS
10072017-08-14 Martin Sebor <msebor@redhat.com>
1008
1009 PR c/81117
1010 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1011
bb85aa74
MP
10122017-08-11 Marek Polacek <polacek@redhat.com>
1013
1014 PR c/81795
1015 * c-decl.c (pushtag): Only print inform if the warning was printed.
1016 (grokdeclarator): Likewise.
1017
32129a17
DM
10182017-08-10 David Malcolm <dmalcolm@redhat.com>
1019
1020 * c-parser.c (c_parser_error): Rename to...
1021 (c_parser_error_richloc): ...this, making static, and adding
1022 "richloc" parameter, passing it to the c_parse_error call,
1023 rather than calling c_parser_set_source_position_from_token.
1024 (c_parser_error): Reintroduce, reimplementing in terms of the
1025 above, converting return type from void to bool.
1026 (class token_pair): New class.
1027 (struct matching_paren_traits): New struct.
1028 (matching_parens): New typedef.
1029 (struct matching_brace_traits): New struct.
1030 (matching_braces): New typedef.
1031 (get_matching_symbol): New function.
1032 (c_parser_require): Add param MATCHING_LOCATION, using it to
1033 highlight matching "opening" tokens for missing "closing" tokens.
1034 (c_parser_skip_until_found): Likewise.
1035 (c_parser_static_assert_declaration_no_semi): Convert explicit
1036 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1037 class matching_parens, so that the pertinent open parenthesis is
1038 highlighted when there are problems locating the close
1039 parenthesis.
1040 (c_parser_struct_or_union_specifier): Likewise.
1041 (c_parser_typeof_specifier): Likewise.
1042 (c_parser_alignas_specifier): Likewise.
1043 (c_parser_simple_asm_expr): Likewise.
1044 (c_parser_braced_init): Likewise, for matching_braces.
1045 (c_parser_paren_condition): Likewise, for matching_parens.
1046 (c_parser_switch_statement): Likewise.
1047 (c_parser_for_statement): Likewise.
1048 (c_parser_asm_statement): Likewise.
1049 (c_parser_asm_operands): Likewise.
1050 (c_parser_cast_expression): Likewise.
1051 (c_parser_sizeof_expression): Likewise.
1052 (c_parser_alignof_expression): Likewise.
1053 (c_parser_generic_selection): Likewise.
1054 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1055 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1056 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1057 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1058 c_parser_skip_until_found call.
1059 (c_parser_objc_class_definition): Use class matching_parens as
1060 above.
1061 (c_parser_objc_method_decl): Likewise.
1062 (c_parser_objc_try_catch_finally_statement): Likewise.
1063 (c_parser_objc_synchronized_statement): Likewise.
1064 (c_parser_objc_at_property_declaration): Likewise.
1065 (c_parser_oacc_wait_list): Likewise.
1066 (c_parser_omp_var_list_parens): Likewise.
1067 (c_parser_omp_clause_collapse): Likewise.
1068 (c_parser_omp_clause_default): Likewise.
1069 (c_parser_omp_clause_if): Likewise.
1070 (c_parser_omp_clause_num_threads): Likewise.
1071 (c_parser_omp_clause_num_tasks): Likewise.
1072 (c_parser_omp_clause_grainsize): Likewise.
1073 (c_parser_omp_clause_priority): Likewise.
1074 (c_parser_omp_clause_hint): Likewise.
1075 (c_parser_omp_clause_defaultmap): Likewise.
1076 (c_parser_oacc_single_int_clause): Likewise.
1077 (c_parser_omp_clause_ordered): Likewise.
1078 (c_parser_omp_clause_reduction): Likewise.
1079 (c_parser_omp_clause_schedule): Likewise.
1080 (c_parser_omp_clause_num_teams): Likewise.
1081 (c_parser_omp_clause_thread_limit): Likewise.
1082 (c_parser_omp_clause_aligned): Likewise.
1083 (c_parser_omp_clause_linear): Likewise.
1084 (c_parser_omp_clause_safelen): Likewise.
1085 (c_parser_omp_clause_simdlen): Likewise.
1086 (c_parser_omp_clause_depend): Likewise.
1087 (c_parser_omp_clause_map): Likewise.
1088 (c_parser_omp_clause_device): Likewise.
1089 (c_parser_omp_clause_dist_schedule): Likewise.
1090 (c_parser_omp_clause_proc_bind): Likewise.
1091 (c_parser_omp_clause_uniform): Likewise.
1092 (c_parser_omp_for_loop): Likewise.
1093 (c_parser_cilk_clause_vectorlength): Likewise.
1094 (c_parser_cilk_clause_linear): Likewise.
1095 (c_parser_transaction_expression): Likewise.
1096 * c-parser.h (c_parser_require): Add param matching_location with
1097 default UNKNOWN_LOCATION.
1098 (c_parser_error): Convert return type from void to bool.
1099 (c_parser_skip_until_found): Add param matching_location with
1100 default UNKNOWN_LOCATION.
1101
30af3a2b
MP
11022017-08-09 Marek Polacek <polacek@redhat.com>
1103
1104 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1105 * c-tree.h (build_external_ref): Update declaration.
1106 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1107 (build_external_ref): Change the type of a parameter to bool.
1108 (parser_build_binary_op): Use true/false instead of 1/0.
1109 (pointer_diff): Likewise.
1110 (build_modify_expr): Likewise.
1111 (set_designator): Change the type of a parameter to bool.
1112 (set_init_index): Use true/false instead of 1/0.
1113 (set_init_label): Likewise.
1114 (output_init_element): Change the type of a parameter to bool.
1115 (output_pending_init_elements): Use true/false instead of 1/0.
1116 (process_init_element): Likewise.
1117 (build_binary_op): Change the type of a parameter to bool.
1118
296c53ac
MP
11192017-08-09 Marek Polacek <polacek@redhat.com>
1120
1121 PR c/81233
1122 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1123 Call emit_diagnostic_valist instead of pedwarn.
1124 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1125 Print the relevant types in diagnostics.
1126
a32c8316
MP
11272017-08-09 Marek Polacek <polacek@redhat.com>
1128
1129 PR c/81417
1130 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1131 build_conditional_expr.
1132 * c-parser.c (c_parser_conditional_expression): Create locations for
1133 EXP1 and EXP2 from their source ranges. Pass the locations down to
1134 build_conditional_expr.
1135 * c-tree.h (build_conditional_expr): Update declaration.
1136 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1137 For -Wsign-compare, also print the types.
1138
314e6352
ML
11392017-08-08 Martin Liska <mliska@suse.cz>
1140
1141 * c-convert.c: Include header files.
1142 * c-typeck.c: Likewise.
1143
577eec56
ML
11442017-08-07 Martin Liska <mliska@suse.cz>
1145
1146 * c-parser.c (c_parser_attributes): Canonicalize name of an
1147 attribute.
1148
f7b6353a
MP
11492017-08-02 Marek Polacek <polacek@redhat.com>
1150
1151 PR c/81289
1152 * c-parser.c (c_parser_unary_expression): Use set_error.
1153
8a6eab34
MP
1154 PR c/81448
1155 PR c/81306
1156 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1157 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1158
7fef86d3
JH
11592017-07-31 Jan Hubicka <hubicka@ucw.cz>
1160 Martin Liska <mliska@suse.cz>
1161
1162 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1163 statement.
7fef86d3 1164
f34ebeb2
ML
11652017-07-31 Martin Liska <mliska@suse.cz>
1166
1167 PR sanitize/81530
1168 * c-convert.c (convert): Guard condition with flag_sanitize_p
1169 also with current_function_decl non-null equality.
1170 * c-decl.c (grokdeclarator): Likewise.
1171 * c-typeck.c (build_binary_op): Likewise.
1172
8595f67b
MP
11732017-07-25 Marek Polacek <polacek@redhat.com>
1174
1175 * c-decl.c (grokfield): Remove local variable.
1176
d49718d6
MP
11772017-07-25 Marek Polacek <polacek@redhat.com>
1178
1179 PR c/81364
1180 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1181 macro expansion if the body is in { }.
1182 (c_parser_while_statement): Likewise.
1183 (c_parser_for_statement): Likewise.
1184
ff22eb12
NS
11852017-07-18 Nathan Sidwell <nathan@acm.org>
1186
1187 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1188
eea77d1f
DM
11892017-07-14 David Malcolm <dmalcolm@redhat.com>
1190
1191 * c-decl.c (implicitly_declare): When suggesting a missing
1192 #include, provide a fix-it hint.
1193
b6f43128
DM
11942017-07-06 David Malcolm <dmalcolm@redhat.com>
1195
1196 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1197 and call that instead.
1198 * c-tree.h (selftest::run_c_tests): New decl.
1199
3e2becc4
MP
12002017-06-26 Marek Polacek <polacek@redhat.com>
1201
1202 PR c/80116
1203 * c-parser.c (c_parser_if_body): Set the location of the
1204 body of the conditional after parsing all the labels. Call
1205 warn_for_multistatement_macros.
1206 (c_parser_else_body): Likewise.
1207 (c_parser_switch_statement): Likewise.
1208 (c_parser_while_statement): Likewise.
1209 (c_parser_for_statement): Likewise.
1210 (c_parser_statement): Add a default argument. Save the location
1211 after labels have been parsed.
1212 (c_parser_c99_block_statement): Likewise.
1213
343ae898
RB
12142017-06-19 Richard Biener <rguenther@suse.de>
1215
1216 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1217 negated _Literals to parse _Literal (int) -1.
1218
45b2222a
ML
12192017-06-13 Martin Liska <mliska@suse.cz>
1220
1221 PR sanitize/78204
1222 * c-convert.c (convert): Use sanitize_flags_p.
1223 * c-decl.c (grokdeclarator): Likewise.
1224 * c-typeck.c (convert_for_assignment): Likewise.
1225 (c_finish_return): Likewise.
1226 (build_binary_op): Likewise.
1227
8ab7005b
JJ
12282017-06-08 Jakub Jelinek <jakub@redhat.com>
1229
1230 PR c/81006
1231 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1232 to sizetype before size_binop.
1233
363dc72c
JJ
12342017-06-07 Jakub Jelinek <jakub@redhat.com>
1235
1236 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1237 of TDI_generic.
1238
dc949728
MP
12392017-06-06 Marek Polacek <polacek@redhat.com>
1240
1241 PR c/79983
1242 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1243 ref.
1244 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1245
40ffd95f
BE
12462017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1247
1248 * c-parser.c (c_parser_binary_expression): Implement the
1249 -Wsizeof_pointer_div warning.
1250 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1251 from a parenthesized expression.
1252 (c_parser_expr_list): Use c_last_sizeof_loc.
1253 * c-tree.h (c_last_sizeof_loc): New external.
1254 * c-typeck.c (c_last_sizeof_loc): New variable.
1255 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1256
9fc5e7a4
MM
12572017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1258
1259 PR testsuite/80580
1260 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1261
f012c8ef
DM
12622017-05-30 David Malcolm <dmalcolm@redhat.com>
1263
1264 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1265 parameters.
1266
3cd211af
MS
12672017-05-24 Martin Sebor <msebor@redhat.com>
1268
1269 PR c/80731
1270 * c-fold.c (c_fully_fold_internal): Adjust.
1271 * c-typeck.c (parser_build_unary_op): Adjust.
1272
fd71a9a2
TS
12732017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1274
1275 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1276 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1277 "VECTOR_LENGTH".
1278
92fa0f9e
MP
12792017-05-23 Marek Polacek <polacek@redhat.com>
1280
1281 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1282 quotes.
1283
d11c168a
JJ
12842017-05-22 Jakub Jelinek <jakub@redhat.com>
1285
1286 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1287 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1288 it returned invariant. Call tree_invariant_p unconditionally
1289 afterwards to decide whether to return expr or op0.
1290
58aca9d9
NS
12912017-05-22 Nathan Sidwell <nathan@acm.org>
1292
1293 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1294
7fd549d2
TS
12952017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1296
1297 * c-parser.c (c_parser_omp_clause_default): Handle
1298 "OMP_CLAUSE_DEFAULT_PRESENT".
1299
6ecd2339
BE
13002017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1301
1302 * config-lang.in (gtfiles): Add c-family/c-format.c.
1303
8a57ecff
NS
13042017-05-18 Nathan Sidwell <nathan@acm.org>
1305
1306 * c-decl.c (pushdecl_top_level): Delete unused function.
1307
6574d78e
MP
13082017-05-18 Marek Polacek <polacek@redhat.com>
1309
1310 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1311 (check_earlier_gotos): Likewise.
1312 (define_label): Likewise.
1313 (pending_xref_error): Likewise.
1314 (smallest_type_quals_location): Likewise.
1315 (grokdeclarator): Likewise.
1316 (grokparms): Likewise.
1317 (identifier_global_value): Likewise.
1318 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1319 (find_init_member): Likewise.
1320
e3455240
MP
13212017-05-18 Marek Polacek <polacek@redhat.com>
1322
1323 * c-decl.c (start_decl): Use false/true instead of 0/1.
1324 (grokdeclarator): Likewise.
1325 (finish_struct): Likewise.
1326 (start_function): Change the return type to bool. Use false/true
1327 instead of 0/1.
1328 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1329 * c-tree.h (start_function): Update.
1330 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1331 (set_designator): Change the return type to bool. Use false/true
1332 instead of 0/1.
1333
3fa8871b
MP
13342017-05-17 Marek Polacek <polacek@redhat.com>
1335
1336 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1337 * c-typeck.c: Likewise.
1338
142473df
MP
13392017-05-17 Marek Polacek <polacek@redhat.com>
1340
1341 PR sanitizer/80659
1342 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1343 DECL_IGNORED_P even for non-static compound literals.
1344
1a817418
ML
13452017-05-17 Martin Liska <mliska@suse.cz>
1346
1347 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1348 use it instead of int type.
1349
b2fa0a8b
MP
13502017-05-17 Marek Polacek <polacek@redhat.com>
1351
1352 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1353 call c_fully_fold.
1354 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1355 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1356 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1357 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1358 save_expr.
1359 (c_parser_conditional_expression): Likewise.
1360 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1361 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1362 (process_init_element): Likewise.
1363 (build_binary_op): Likewise.
1364 (handle_omp_array_sections_1): Likewise.
1365
1e47f02b
TS
13662017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1367
1368 * c-parser.c (c_parser_omp_clause_num_gangs)
1369 (c_parser_omp_clause_num_workers)
1370 (c_parser_omp_clause_vector_length): Merge functions into...
1371 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1372 all users.
1373
c24e924f
NS
13742017-05-11 Nathan Sidwell <nathan@acm.org>
1375
1376 * gimple-parser.c: Don't #include tree-dump.h.
1377
c587104e
MM
13782017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1379
1380 PR testsuite/80580
1381 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1382
67ac9a9d
MM
13832017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1384
1385 PR testsuite/80580
1386 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1387 incorrect __MEM syntax.
1388
ac4eb40f
MM
13892017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1390
1391 PR testsuite/80580
1392 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1393 type of unary '*'.
1394
641da50a
NS
13952017-05-09 Nathan Sidwell <nathan@acm.org>
1396
1397 * c-tree.h (pushdecl): Declare.
1398
56d35585
DM
13992017-05-05 David Malcolm <dmalcolm@redhat.com>
1400
1401 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1402 with diagnostic_report_diagnostic.
1403 * c-errors.c (pedwarn_c99): Likewise.
1404 (pedwarn_c90): Likewise.
1405
815d9cc6
XR
14062017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1407
92a285c1 1408 PR c++/80038
815d9cc6
XR
1409 * c-gimplify.c (c_gimplify_expr): Remove calls to
1410 cilk_gimplifY_call_params_in_spawned_fn.
1411
1c4ea66f
DM
14122017-04-25 David Malcolm <dmalcolm@redhat.com>
1413
1414 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1415 hint for removing extra semicolon.
1416
666f7903
JJ
14172017-04-21 Jakub Jelinek <jakub@redhat.com>
1418
1419 PR c/80468
1420 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1421 enabled, set specs->type to integer_type_node.
1422
5764ee3c
JW
14232017-04-03 Jonathan Wakely <jwakely@redhat.com>
1424
1425 * c-array-notation.c: Fix typo in comment.
1426
10fa8dfb
MP
14272017-03-29 Marek Polacek <polacek@redhat.com>
1428
1429 PR c/79730
1430 * c-decl.c (finish_decl): Check VAR_P.
1431
a9e4a1a5
JJ
14322017-03-27 Jakub Jelinek <jakub@redhat.com>
1433
1434 PR middle-end/80162
1435 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1436 * c-typeck.c (c_mark_addressable): Likewise. Look through
1437 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1438 to ARRAY_TYPE.
1439 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1440
ee3ff394
MP
14412017-03-23 Marek Polacek <polacek@redhat.com>
1442
1443 * c-tree.h: Remove a C_RID_YYCODE reference.
1444
4d1b8e70
JJ
14452017-03-21 Jakub Jelinek <jakub@redhat.com>
1446
1447 PR c/80097
1448 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1449 optional COMPOUND_EXPR with ubsan instrumentation.
1450
31dc71a8
MP
14512017-03-17 Marek Polacek <polacek@redhat.com>
1452
1453 * c-parser.c: Add C11 references.
1454
d579c385
MP
14552017-03-15 Marek Polacek <polacek@redhat.com>
1456
1457 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1458
85059a38
MP
14592017-03-11 Marek Polacek <polacek@redhat.com>
1460
1461 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1462
2f6f187a
DM
14632017-03-10 David Malcolm <dmalcolm@redhat.com>
1464
1465 PR translation/79848
1466 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1467 "%qs".
1468 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1469
36618428
MP
14702017-03-09 Marek Polacek <polacek@redhat.com>
1471
1472 PR sanitizer/79757
1473 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1474 parameter declarations with initializers.
1475
01e5af5a
JJ
14762017-03-09 Jakub Jelinek <jakub@redhat.com>
1477
1478 PR c/79969
1479 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1480 TYPE_STUB_DECL.
1481
a71dbc63
JJ
14822017-03-07 Jakub Jelinek <jakub@redhat.com>
1483
1484 PR c/79834
1485 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1486 for "may only be used in compound statements" diagnostics, change it
1487 such that the same translatable string is used for all pragmas. For
1488 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1489 diagnostics.
1490 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1491 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1492 "may only be used in compound statements" diagnostics, such that the
1493 same translatable string is used for all pragmas.
1494
1ff4bae6
MP
14952017-03-04 Marek Polacek <polacek@redhat.com>
1496
1497 PR c/79847
1498 * c-decl.c (implicit_decl_warning): Add missing space.
1499
7f5a7d78
MP
15002017-03-03 Marek Polacek <polacek@redhat.com>
1501
1502 PR c/79758
1503 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1504 current_function_prototype_arg_types is error_mark_node. Fix
1505 formatting. Use TREE_VALUE instead of TREE_TYPE.
1506
883c8f06
JJ
15072017-03-03 Jakub Jelinek <jakub@redhat.com>
1508
79c9b7a8
JJ
1509 PR c/79837
1510 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1511 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1512 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1513 diagnostics.
1514
883c8f06
JJ
1515 PR c/79836
1516 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1517 instead of %<_Generic>.
1518 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1519 (c_parser_omp_target_exit_data): Use %<release%> instead of
1520 %<release>.
1521
324ff1a0
JJ
15222017-02-28 Jakub Jelinek <jakub@redhat.com>
1523
1524 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1525 instead of just cond ? "..." : "...".
1526 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1527 for "enter"/"exit" keyword.
1528 (c_finish_oacc_routine): Don't use %s to supply portions of the
1529 message.
1530
4227c9ad
JJ
15312017-02-24 Jakub Jelinek <jakub@redhat.com>
1532
1533 PR c++/79588
1534 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1535 handle -Wrestrict here.
1536 * c-typeck.c (build_function_call_vec): Adjust
1537 check_function_arguments caller.
1538
5d972e66
RB
15392017-02-23 Richard Biener <rguenther@suse.de>
1540
1541 PR c/79684
1542 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1543 to initialize c_exprs to return.
1544 (c_parser_gimple_binary_expression): Likewise.
1545 (c_parser_gimple_unary_expression): Likewise.
1546 (c_parser_gimple_postfix_expression): Likewise.
1547
61ac5ebe
MP
15482017-02-22 Marek Polacek <polacek@redhat.com>
1549
1550 PR c/79662
1551 * c-typeck.c (convert_arguments): Handle error_mark_node.
1552
41d1b0b1
PK
15532017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1554
1555 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1556 value of c_parser_parse_ssa_name against error_mark_node and emit
1557 error if ssa name is anonymous and written as default definition.
1558
eab1f169
PK
15592017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1560
1561 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1562 FMA_EXPR.
1563
bcac0b4d
JJ
15642017-02-16 Jakub Jelinek <jakub@redhat.com>
1565
1566 PR c++/79512
1567 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1568 ignore #pragma omp target even when not followed by identifier.
1569
1be33173
PK
15702017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1571
1572 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1573 (c_parser_gimple_unary_expression): Likewise.
1574
aa326bfb
JJ
15752017-02-13 Jakub Jelinek <jakub@redhat.com>
1576
1577 * c-parser.c (c_parser_oacc_declare): Add missing space in
1578 diagnostics.
1579
8a398bc5
PK
15802017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1581
1582 PR c/79478
1583 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1584 set_c_expr_source_range when parsing ssa-name.
1585
3dcde5ef
PG
15862017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1587 Richard Biener <rguenther@suse.de>
1588
1589 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1590 building IL when arguments are error_mark_node.
1591 (c_parser_gimple_unary_expression): Likewise.
1592 (c_parser_gimple_if_stmt): Likewise.
1593 (c_parser_gimple_switch_stmt): Likewise.
1594 (c_parser_gimple_return_stmt): Likewise.
1595 (c_parser_parse_ssa_name): When name lookup fails do not build
1596 an SSA name. Use undeclared rather than not declared in error
1597 reporting.
1598
192b048b
MP
15992017-02-09 Marek Polacek <polacek@redhat.com>
1600
1601 PR c/79428
1602 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1603 instead of c_parser_skip_until_found.
1604
56f71478
JJ
16052017-02-09 Jakub Jelinek <jakub@redhat.com>
1606
1607 PR c/79431
1608 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1609 symtab_node::get on automatic variables.
1610
02889d23
CLT
16112016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1612 Chung-Lin Tang <cltang@codesourcery.com>
1613
1614 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1615 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1616 semantic checking.
1617 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1618
7af4b20d
RB
16192017-02-07 Richard Biener <rguenther@suse.de>
1620
1621 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1622 (c_parser_gimple_postfix_expression_after_primary):
1623 Do not use c_build_function_call_vec to avoid folding and promotion.
1624 Simplify.
1625
e5e391d6
MO
16262017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1627
1628 PR lto/79061
1629 * c-decl.c (pop_scope): Pass main_input_filename to
1630 build_translation_unit_decl.
1631
c2e84327
DM
16322017-01-24 David Malcolm <dmalcolm@redhat.com>
1633
1634 * c-parser.c: Include "read-rtl-function.h" and
1635 "run-rtl-passes.h".
1636 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1637 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1638 production. Update for renaming of field "gimple_pass" to
1639 "gimple_or_rtl_pass". If __RTL was seen, call
1640 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1641 to an auto_timevar, to cope with early exit.
1642 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1643 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1644 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1645 Handle RID_RTL.
1646 (c_parser_parse_rtl_body): New function.
1647 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1648 (struct c_declspecs): Rename field "gimple_pass" to
1649 "gimple_or_rtl_pass". Add field "rtl_p".
1650 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1651 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1652 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1653 (c_parser_gimple_or_rtl_pass_list): ...this.
1654
2ebd93e1
MP
16552017-01-20 Marek Polacek <polacek@redhat.com>
1656
1657 PR c/64279
1658 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1659
b1c95bb5
RB
16602017-01-13 Richard Biener <rguenther@suse.de>
1661
1662 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1663 nops.
1664
25329913
RB
16652017-01-13 Richard Biener <rguenther@suse.de>
1666
1667 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1668 _Literal ( type-name ) number.
1669
6bb4ea5c
RB
16702017-01-12 Richard Biener <rguenther@suse.de>
1671
1672 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1673 __MEM.
1674
6b5b4e9c
JJ
16752017-01-11 Jakub Jelinek <jakub@redhat.com>
1676
1677 PR c++/72813
1678 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1679 PCH file.
1680
e3252775
RB
16812017-01-11 Richard Biener <rguenther@suse.de>
1682
1683 PR bootstrap/79052
1684 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1685 returns on parse errors.
1686
a9342885
MP
16872017-01-04 Marek Polacek <polacek@redhat.com>
1688
1689 PR c++/64767
1690 * c-parser.c (c_parser_postfix_expression): Mark zero character
1691 constants by setting original_type in c_expr.
1692 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1693 with a zero character constant.
1694 (char_type_p): New function.
1695
5dd9a9d0
DM
16962017-01-04 David Malcolm <dmalcolm@redhat.com>
1697
1698 * c-parser.c (c_parser_declaration_or_fndef): Create a
1699 rich_location at init_loc and parse it to start_init.
1700 (last_init_list_comma): New global.
1701 (c_parser_braced_init): Update last_init_list_comma when parsing
1702 commas. Pass it to pop_init_level. Pass location of closing
1703 brace to pop_init_level.
1704 (c_parser_postfix_expression_after_paren_type): Create a
1705 rich_location at type_loc and parse it to start_init.
1706 (c_parser_omp_declare_reduction): Likewise for loc.
1707 * c-tree.h (start_init): Add rich_location * param.
1708 (pop_init_level): Add location_t param.
1709 * c-typeck.c (struct initializer_stack): Add field
1710 "missing_brace_richloc".
1711 (start_init): Add richloc param, use it to initialize
1712 the stack node's missing_brace_richloc.
1713 (last_init_list_comma): New decl.
1714 (finish_implicit_inits): Pass last_init_list_comma to
1715 pop_init_level.
1716 (push_init_level): When finding missing open braces, add fix-it
1717 hints to the richloc.
1718 (pop_init_level): Add "insert_before" param and pass it
1719 when calling pop_init_level. Add fixits about missing
1720 close braces to any richloc. Use the richloc for the
1721 -Wmissing-braces warning.
1722 (set_designator): Pass last_init_list_comma to pop_init_level.
1723 (process_init_element): Likewise.
1724
cbe34bb5
JJ
17252017-01-01 Jakub Jelinek <jakub@redhat.com>
1726
1727 Update copyright years.
1728
d17680f3
JJ
17292016-12-21 Jakub Jelinek <jakub@redhat.com>
1730
0dba7960
JJ
1731 PR bootstrap/78817
1732 * c-typeck.c (build_function_call_vec): If check_function_arguments
1733 returns true, set TREE_NO_WARNING on CALL_EXPR.
1734
d17680f3
JJ
1735 PR c/77767
1736 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1737 to *expr instead of overwriting it.
1738
aa90531e
RB
17392016-12-20 Richard Biener <rguenther@suse.de>
1740
1741 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1742 error recovery.
1743 (c_parser_gimple_statement): Only build assigns for non-error
1744 stmts.
1745 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1746
629b3d75
MJ
17472016-12-14 Martin Jambor <mjambor@suse.cz>
1748
1749 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1750 omp-low.h.
1751 (c_finish_oacc_routine): Adjusted call to
1752 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1753 to use their new names.
1754 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1755 use its new name.
1756 (c_parser_oacc_update): Likewise.
1757 (c_parser_omp_simd): Likewise.
1758 (c_parser_omp_target_update): Likewise.
1759 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1760 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1761 name.
1762 (c_finish_omp_cancellation_point): Likewise.
1763 * gimple-parser.c: Do not include omp-low.h
1764
c5af52eb
CP
17652016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1766 James Norris <jnorris@codesourcery.com>
1767
1768 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1769 EXIT_DATA,WAIT} are not used in compound statements.
1770 (c_parser_oacc_enter_exit_data): Update diagnostics.
1771
48330c93
BE
17722016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1773
1774 PR c++/71973
1775 * c-decl.c (diagnose_mismatched_decls): Use
1776 OPT_Wbuiltin_declaration_mismatch here too.
1777
899ca90e 17782016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1779 Alan Hayward <alan.hayward@arm.com>
1780 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1781
1782 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1783 (make_label, finish_struct): Likewise.
1784
1ee62b92 17852016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1786 Richard Biener <rguenther@suse.de>
22b15758 1787
8e745a17
JJ
1788 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1789 * config-lang.in (gtfiles): Add c/c-parser.h.
1790 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1791 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1792 * c-parser.c (enum c_id_kind, struct c_token,
1793 c_parser_next_token_is, c_parser_next_token_is_not,
1794 c_parser_next_token_is_keyword,
1795 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1796 Split out to ...
1797 * c-parser.h: ... new header.
1798 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1799 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1800 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1801 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1802 c_parser_error, c_parser_require, c_parser_skip_until_found,
1803 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1804 c_parser_type_name): Export.
1805 (c_parser_tokens_buf): New function.
1806 (c_parser_error): Likewise.
1807 (c_parser_set_error): Likewise.
1808 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1809 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1810 via c_parser_parse_gimple_body.
8e745a17
JJ
1811 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1812 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1813 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1814 c_parser_error, c_parser_require, c_parser_skip_until_found,
1815 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1816 c_parser_type_name): Declare.
1ee62b92
PG
1817 (struct c_parser): Declare forward.
1818 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1819 (c_parser_error): Likewise.
1820 (c_parser_set_error): Likewise.
1821 * gimple-parser.c: New file.
1822 * gimple-parser.h: Likewise.
1ee62b92 1823
22b15758
UB
18242016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1825
1826 PR c/35503
1827 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1828 warn_for_restrict.
1829
84ff4775
LCW
18302016-09-11 Le-Chun Wu <lcwu@google.com>
1831 Mark Wielaard <mjw@redhat.com>
1832
1833 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1834 to the given -Wshadow= variant.
1835
4d0cdd0c
TP
18362016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1837
1838 * c-typeck.c: Include memmodel.h.
1839
1202f33e
JJ
18402016-10-13 Jakub Jelinek <jakub@redhat.com>
1841
1842 PR target/77957
1843 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1844 instead of lhd_return_null_tree_v.
1845
8a14afd0
BS
18462016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1847
1848 PR c++/69733
1849 * c-decl.c (smallest_type_quals_location): New static function.
1850 (grokdeclarator): Try to find the correct location for an ignored
1851 qualifier.
1852
81fea426
MP
18532016-09-26 Marek Polacek <polacek@redhat.com>
1854
1855 PR c/7652
1856 * c-decl.c (pop_scope): Add gcc_fallthrough.
1857
18582016-09-26 Marek Polacek <polacek@redhat.com>
1859
1860 PR c/7652
1861 * c-parser.c (struct c_token): Add flags field.
1862 (c_lex_one_token): Pass it to c_lex_with_flags.
1863 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1864 into IFN_FALLTHROUGH.
1865 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1866 attribute fallthrough after a case label or default label.
1867 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1868
9a2300e9
MP
18692016-09-24 Marek Polacek <polacek@redhat.com>
1870
1871 PR c/77490
1872 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1873 have boolean value. Warn about ++/-- on booleans.
1874
7de76362
JJ
18752016-09-23 Jakub Jelinek <jakub@redhat.com>
1876
1877 * c-parser.c (incomplete_record_decls): Remove unnecessary
1878 = vNULL initialization of file scope vec.
1879
5b73d2ab
MP
18802016-09-16 Marek Polacek <polacek@redhat.com>
1881
1882 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1883
e51fbec3
MP
18842016-09-14 Marek Polacek <polacek@redhat.com>
1885
1886 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1887 (fix_array_notation_expr): Likewise.
1888 * c-decl.c (finish_decl): Likewise.
1889 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1890 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1891 (function_to_pointer_conversion): Use false instead of 0.
1892 (convert_lvalue_to_rvalue): Likewise.
1893 (parser_build_unary_op): Likewise.
1894 (build_atomic_assign): Likewise.
1895 (build_unary_op): Change nonconvert parameter type to bool, use
1896 true/false instead of 1/0.
1897 (build_binary_op): Use true instead of 1.
1898
254830ba
DM
18992016-09-13 David Malcolm <dmalcolm@redhat.com>
1900
1901 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1902 of add_fixit_insert to add_fixit_insert_before.
1903
4c13ba17
MP
19042016-09-13 Marek Polacek <polacek@redhat.com>
1905
1906 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1907 it.
1908
54dcdb88
BE
19092016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1910
1911 PR c++/77496
1912 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1913 COMPOUND_EXPR to warn_for_omitted_condop.
1914
e5106e27
DM
19152016-09-07 David Malcolm <dmalcolm@redhat.com>
1916
1917 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1918 c_get_substring_location for this new langhook.
1919
9dc5773f
JJ
19202016-09-02 Jakub Jelinek <jakub@redhat.com>
1921
1922 PR c/65467
1923 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1924 flag_openmp.
1925 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1926 instead of mark_exp_read on low_bound/length expression.
1927 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1928 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1929 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1930 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1931 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1932 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1933 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1934 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1935 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1936 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1937 instead of mark_expr_read.
1938 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1939 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1940 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1941 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1942 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1943 array section bases outside of depend clause, for depend clause
1944 use convert_lvalue_to_rvalue on the base.
1945 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1946 linear, aligned, map, to and from clauses.
1947 (c_omp_clause_copy_ctor): New function.
1948
295844f6
MP
19492016-09-01 Marek Polacek <polacek@redhat.com>
1950
1951 PR c/7652
1952 * c-typeck.c (composite_type): Add FALLTHRU comment.
1953
089af25c
DM
19542016-08-31 David Malcolm <dmalcolm@redhat.com>
1955
1956 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1957 to the insertion fixits for "struct", "union", and "enum".
1958
f9087798
DM
19592016-08-30 David Malcolm <dmalcolm@redhat.com>
1960
1961 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1962 rather than add_fixit_misspelled_id.
1963 (undeclared_variable): Likewise.
1964 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1965 now-redundant "here" params from add_fixit_insert method calls.
1966 (c_parser_parameter_declaration): Likewise.
1967 * c-typeck.c (build_component_ref): Remove now-redundant range
1968 param from add_fixit_replace method calls.
1969
ebef225f
MP
19702016-08-25 Marek Polacek <polacek@redhat.com>
1971
1972 * c-typeck.c (parser_build_binary_op): Pass LHS to
1973 warn_logical_not_parentheses.
1974
fe377a48
MP
19752016-08-25 Marek Polacek <polacek@redhat.com>
1976
1977 PR c/77323
1978 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1979 or _FloatN or _FloatNx is not supported.
1980 (finish_declspecs): Set type to integer_type_node when _FloatN or
1981 _FloatNx is not supported.
1982
c65699ef
JM
19832016-08-19 Joseph Myers <joseph@codesourcery.com>
1984
1985 PR c/32187
1986 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1987 (struct c_declspecs): Add field floatn_nx_idx.
1988 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1989 and _FloatNx type specifiers.
1990 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1991 (c_parser_declspecs, c_parser_attribute_any_word)
1992 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1993 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1994 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1995 narrower than double.
1996
2f1364c2
JJ
19972016-08-12 Jakub Jelinek <jakub@redhat.com>
1998 Martin Liska <mliska@suse.cz>
1999
2000 PR c/67410
2001 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2002 % to determine val element to change. Assert that
2003 wchar_bytes * charwidth fits into val array.
2004
191816a3
MP
20052016-08-12 Marek Polacek <polacek@redhat.com>
2006
2007 PR c/7652
2008 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2009 (c_parser_postfix_expression): Likewise.
2010 * c-typeck.c (build_unary_op): Adjust fall through comment.
2011 (c_mark_addressable): Likewise.
2012
b95a64bb
JJ
20132016-08-11 Jakub Jelinek <jakub@redhat.com>
2014
2015 PR c/72816
2016 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2017 array member through typedef, for orig_qual_indirect == 0 clear
2018 orig_qual_type.
2019
895aa8e1
DM
20202016-08-08 David Malcolm <dmalcolm@redhat.com>
2021
2022 PR c/64955
2023 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2024 this up to selftest::run_c_tests.
2025 (selftest::run_c_tests): New function.
2026
0b212d8c
TS
20272016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2028
ae9281fc
TS
2029 * c-parser.c (struct oacc_routine_data): Add error_seen and
2030 fndecl_seen members.
2031 (c_finish_oacc_routine): Use these.
2032 (c_parser_declaration_or_fndef): Adjust.
2033 (c_parser_oacc_routine): Likewise. Support more C language
2034 constructs, and improve diagnostics. Move pragma context
2035 checking...
2036 (c_parser_pragma): ... here.
2037
0b212d8c
TS
2038 * c-parser.c (struct oacc_routine_data): New.
2039 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2040 Simplify code.
2041 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2042 declare target" attribute.
2043
76e2c821
JB
20442016-08-01 Jan Beulich <jbeulich@suse.com>
2045
2046 * c-fold.c (c_fully_fold_internal): Also emit shift count
2047 warnings for vector types.
2048 * c-typeck.c (build_binary_op): Likewise.
2049
f618a472
MP
20502016-07-29 Marek Polacek <polacek@redhat.com>
2051
2052 PR c/71742
2053 * c-decl.c (finish_struct): Rephrase an error message.
2054
efd0786f
MP
2055 PR c/71853
2056 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2057 to error node for invalid code.
2058
e00dceaf
MP
2059 PR c/71573
2060 * c-decl.c (implicitly_declare): Return decl early not only for
2061 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2062
673a107a
JJ
20632016-07-29 Jakub Jelinek <jakub@redhat.com>
2064
2065 PR c/71969
2066 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2067 on GNU extern inline functions.
2068
a5b5c8b6
MP
20692016-07-29 Marek Polacek <polacek@redhat.com>
2070
2071 PR c/71583
2072 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2073 check expr.value.
2074
e3fe09c1
UB
20752016-07-22 Uros Bizjak <ubizjak@gmail.com>
2076
2077 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2078
7c8f7eaa
DM
20792016-07-20 David Malcolm <dmalcolm@redhat.com>
2080
2081 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2082 spellcheck-tree.h
2083 (best_macro_match): Likewise, converting from a typedef to a
2084 subclass.
2085 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2086 (lookup_name_fuzzy): Update for change of best_macro_match to a
2087 subclass with a ctor that calls cpp_forall_identifiers.
2088
de6a69ee
DM
20892016-07-20 David Malcolm <dmalcolm@redhat.com>
2090
2091 * c-decl.c (implicit_decl_warning): Update for conversion of
2092 return type of lookup_name_fuzzy to const char *.
2093 (undeclared_variable): Likewise.
2094 (lookup_name_fuzzy): Convert return type from tree to
2095 const char *.
2096 * c-parser.c (c_parser_declaration_or_fndef): Update for
2097 conversion of return type of lookup_name_fuzzy to const char *.
2098 (c_parser_parameter_declaration): Likewise.
2099
b1c9c068
CP
21002016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2101
2102 * c-parser.c (c_parser_oacc_declare): Don't scan for
2103 GOMP_MAP_POINTER.
2104 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2105 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2106 zero-length subarrays.
2107
ddbbcb19
JJ
21082016-07-15 Jakub Jelinek <jakub@redhat.com>
2109
2110 PR c/71858
2111 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2112 instead of FUZZY_LOOKUP_NAME.
2113 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2114 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2115
dd36b877
JJ
21162016-07-14 Jakub Jelinek <jakub@redhat.com>
2117
2118 PR c/71858
2119 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2120
8c681247
TS
21212016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2122
2123 * c-parser.c (c_parser_generic_selection): Make type of variable
2124 auto_vec.
2125 (c_parser_omp_declare_simd): Likewise.
2126
bf4fa671
TS
21272016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2128
2129 * c-decl.c (struct c_struct_parse_info): Change member types
2130 from vec to auto_vec.
2131 (start_struct): Adjust.
2132 (finish_struct): Likewise.
2133
557e8c49
JJ
21342016-07-02 Jakub Jelinek <jakub@redhat.com>
2135
2136 PR c/71719
2137 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2138
54d19c3b
TS
21392016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2140
2141 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2142 Move pragma context checking into...
2143 (c_parser_omp_cancellation_point): ... here, and improve
2144 diagnostic messages.
2145 * c-typeck.c (c_finish_omp_cancel)
2146 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2147
152ef731
JJ
21482016-06-29 Jakub Jelinek <jakub@redhat.com>
2149
2150 PR c/71685
2151 * c-typeck.c (c_build_qualified_type): Don't clear
2152 C_TYPE_INCOMPLETE_VARS for the main variant.
2153
21542016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2155
2156 PR c/71552
2157 * c-typeck.c (output_init_element): Diagnose incompatible types
2158 before non-constant initializers.
2159
e9ac1f86
JJ
21602016-06-28 Jakub Jelinek <jakub@redhat.com>
2161
2162 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2163
277d7ee0
AK
21642016-06-23 Andi Kleen <ak@linux.intel.com>
2165
2166 * Make-lang.in: Add support for autofdo.
2167
1a4f11c8
DM
21682016-06-22 David Malcolm <dmalcolm@redhat.com>
2169
2170 PR c/70339
2171 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2172 (implicit_decl_warning): When issuing warnings for implicit
2173 declarations, attempt to provide a suggestion via
2174 lookup_name_fuzzy.
2175 (undeclared_variable): Likewise when issuing errors.
2176 (lookup_name_in_scope): Likewise.
2177 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2178 (best_macro_match): New typedef.
2179 (find_closest_macro_cpp_cb): New function.
2180 (lookup_name_fuzzy): New function.
2181 * c-parser.c: Include gcc-rich-location.h.
2182 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2183 (c_keyword_starts_typename): ...this new function.
2184 (c_parser_declaration_or_fndef): When issuing errors about
2185 missing "struct" etc, add a fixit. For other kinds of errors,
2186 attempt to provide a suggestion via lookup_name_fuzzy.
2187 (c_parser_parms_declarator): When looking ahead to detect typos in
2188 type names, also reject CPP_KEYWORD.
2189 (c_parser_parameter_declaration): When issuing errors about
2190 unknown type names, attempt to provide a suggestion via
2191 lookup_name_fuzzy.
2192 * c-tree.h (c_keyword_starts_typename): New prototype.
2193
5a578671
JM
21942016-06-20 Joseph Myers <joseph@codesourcery.com>
2195
2196 PR c/71601
2197 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2198 c_common_type returns error_mark_node.
2199
3f8257db 22002016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2201
2202 PR c/69507
2203 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2204 __alignof__ (expression).
2205
6a3f203c
DM
22062016-06-14 David Malcolm <dmalcolm@redhat.com>
2207
2208 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2209
264757fb
DM
22102016-06-14 David Malcolm <dmalcolm@redhat.com>
2211
2212 * c-typeck.c (build_component_ref): Simplify fixit code by
2213 using gcc_rich_location::add_fixit_misspelled_id.
2214 (set_init_label): Likewise.
2215
f7e4f2e3
DM
22162016-06-13 David Malcolm <dmalcolm@redhat.com>
2217
2218 * c-parser.c (c_parser_initelt): Provide location of name for new
2219 location_t param of set_init_label.
2220 * c-tree.h (set_init_label): Add location_t param.
2221 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2222 param and use it when issuing error messages about unrecognized
2223 field names. Attempt to provide a fixit hint if appropriate,
2224 otherwise update the error message to provide the type name.
2225
4b1ffdb1
TS
22262016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2227
2228 PR c/71381
2229 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2230 Loosen checking.
2231
44a845ca
MS
22322016-06-08 Martin Sebor <msebor@redhat.com>
2233 Jakub Jelinek <jakub@redhat.com>
2234
2235 PR c++/70507
2236 PR c/68120
2237 * c-typeck.c (convert_arguments): Don't promote last argument
2238 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2239
92a5f2ba
MP
22402016-06-08 Marek Polacek <polacek@redhat.com>
2241
2242 PR c/71418
2243 * c-decl.c (grokdeclarator): Check TYPE_P.
2244
08203f73
MP
2245 PR c/71426
2246 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2247 code.
2248
6ffd47b7
DM
22492016-06-07 David Malcolm <dmalcolm@redhat.com>
2250
2251 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2252 and structure element reference, capture the location of the
2253 element name token and pass it to build_component_ref.
2254 (c_parser_postfix_expression_after_primary): Likewise for
2255 structure element dereference.
2256 (c_parser_omp_variable_list): Likewise for
2257 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2258 * c-tree.h (build_component_ref): Add location_t param.
2259 * c-typeck.c (build_component_ref): Add location_t param
2260 COMPONENT_LOC. Use it, if available, when issuing hints about
2261 mispelled member names to provide a fixit replacement hint.
2262
1f40cff3
MP
22632016-06-06 Marek Polacek <polacek@redhat.com>
2264
2265 PR c/71362
2266 * c-parser.c (c_parser_direct_declarator): Set location.
2267
5545a907
MP
22682016-06-06 Marek Polacek <polacek@redhat.com>
2269
2270 * c-typeck.c (comptypes_internal): Handle comparisons of
2271 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2272 TYPE_REF_CAN_ALIAS_ALL.
2273
b605f663
CLT
22742016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2275
2276 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2277 arguments as addressable when async clause exists.
2278
00631022
JJ
22792016-05-30 Jakub Jelinek <jakub@redhat.com>
2280
2281 PR c++/71349
2282 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2283 when combined with target construct.
2284
7211a097
JJ
22852016-05-26 Jakub Jelinek <jakub@redhat.com>
2286
2287 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2288 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2289
95efe6b6
MP
22902016-05-25 Marek Polacek <polacek@redhat.com>
2291
2292 PR c/71265
2293 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2294
a23faf7a
MP
2295 PR c/71266
2296 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2297
e46c7770
CP
22982016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2299
2300 * c-parser.c (c_parser_oacc_declare): Add support for
2301 GOMP_MAP_FIRSTPRIVATE_POINTER.
2302 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2303 argument with enum c_omp_region_type ort.
2304 (handle_omp_array_sections): Likewise. Update call to
2305 handle_omp_array_sections_1.
2306 (c_finish_omp_clauses): Add specific errors and warning messages for
2307 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2308 call to handle_omp_array_sections.
2309
a04e69c0
TS
23102016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2311
2312 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2313
f17a223d
RB
23142016-05-24 Richard Biener <rguenther@suse.de>
2315
2316 PR middle-end/70434
2317 PR c/69504
2318 * c-typeck.c (build_array_ref): Do not complain about indexing
2319 non-lvalue vectors. Adjust for function name change.
2320
79063edd
MS
23212016-05-20 Martin Sebor <msebor@redhat.com>
2322
2323 PR c/71115
2324 * c-typeck.c (error_init): Use
2325 expansion_point_location_if_in_system_header.
2326 (warning_init): Same.
2327
8a40fef3
DM
23282016-05-19 David Malcolm <dmalcolm@redhat.com>
2329
2330 PR c/71171
2331 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2332 in error-handling.
2333 (c_parser_postfix_expression): Likewise.
2334 * c-tree.h (c_expr::set_error): New method.
2335 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2336 that result's range is initialized.
2337
e9892350
JG
23382016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2339
2340 * c-typeck.c (parser_build_unary_op): Fix formatting.
2341
8fad45f5
MW
23422016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2343
2344 * c-decl.c (grokdeclarator): Remove errmsg and use of
2345 targetm.invalid_return_type.
2346 (grokparms): Remove errmsg and use of
2347 targetm.invalid_parameter_type.
2348
aa4b467b
JM
23492016-05-13 Joseph Myers <joseph@codesourcery.com>
2350
2351 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2352 function return type.
2353
4f2e1536
MP
23542016-05-12 Marek Polacek <polacek@redhat.com>
2355
2356 PR c/70756
2357 * c-decl.c (build_compound_literal): Pass LOC down to
2358 c_incomplete_type_error.
2359 * c-tree.h (require_complete_type): Adjust declaration.
2360 (c_incomplete_type_error): Likewise.
2361 * c-typeck.c (require_complete_type): Add location parameter, pass it
2362 down to c_incomplete_type_error.
2363 (c_incomplete_type_error): Add location parameter, pass it down to
2364 error_at.
2365 (build_component_ref): Pass location down to c_incomplete_type_error.
2366 (default_conversion): Pass location down to require_complete_type.
2367 (build_array_ref): Likewise.
2368 (build_function_call_vec): Likewise.
2369 (convert_arguments): Likewise.
2370 (build_unary_op): Likewise.
2371 (build_c_cast): Likewise.
2372 (build_modify_expr): Likewise.
2373 (convert_for_assignment): Likewise.
2374 (c_finish_omp_clauses): Likewise.
2375
d6e83a8d
MM
23762016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2377
2378 PR c/43651
2379 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2380 is enabled.
2381 * c-errors.c (pedwarn_c90): Return true if warned.
2382 * c-tree.h (pedwarn_c90): Change return type to bool.
2383 (enum c_declspec_word): Add new enumerator cdw_atomic.
2384
5c3a10fb
MP
23852016-05-11 Marek Polacek <polacek@redhat.com>
2386
2387 PR c++/71024
2388 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2389 diagnose_mismatched_attributes and call it.
2390
cf68d92c
MP
23912016-05-10 Marek Polacek <polacek@redhat.com>
2392
2393 PR c/70255
2394 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2395 on a declaration following the definition.
2396
351f85c5
JJ
23972016-05-05 Jakub Jelinek <jakub@redhat.com>
2398
2399 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2400 parse it through to c_parser_c99_block_statement.
2401 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2402 caller.
2403
deef7113
MP
24042016-05-04 Marek Polacek <polacek@redhat.com>
2405
2406 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2407 OPT_Wdangling_else.
2408
de55efd5
MP
24092016-05-04 Marek Polacek <polacek@redhat.com>
2410
2411 PR c/48778
2412 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2413 for macro expansions.
2414
79ce98bc
MP
24152016-05-03 Marek Polacek <polacek@redhat.com>
2416
2417 PR c/70859
2418 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2419 check_builtin_function_arguments.
2420
fb2647aa
RB
24212016-05-03 Richard Biener <rguenther@suse.de>
2422
2423 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2424 the checksum from the previous stage.
2425
77886428
CP
24262016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2427
2428 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2429 c_finish_omp_clauses.
2430 (c_parser_omp_all_clauses): Likewise.
2431 (c_parser_oacc_cache): Likewise.
2432 (c_parser_oacc_loop): Likewise.
2433 (omp_split_clauses): Likewise.
2434 (c_parser_omp_declare_target): Likewise.
2435 (c_parser_cilk_all_clauses): Likewise.
2436 (c_parser_cilk_for): Likewise.
2437 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2438 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2439
7176a4a0
MP
24402016-05-02 Marek Polacek <polacek@redhat.com>
2441
2442 PR c/70851
2443 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2444 incomplete type.
2445
e7ff0319
CP
24462016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2447
2448 PR middle-end/70626
2449 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2450 OACC_LOOP_CLAUSE_MASK.
2451 (c_parser_oacc_kernels_parallel): Update call to
2452 c_oacc_split_loop_clauses.
2453
9f405ce1
AM
24542016-04-28 Andrew MacLeod <amacleod@redhat.com>
2455
2456 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2457 argument to build_modify_expr in two cases.
2458
c1e1f433
BS
24592016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2460
2461 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2462 warn_for_memset instead of warning directly here.
2463
2448a956
MP
24642016-04-26 Marek Polacek <polacek@redhat.com>
2465
2466 PR c/67784
2467 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2468 out of ...
2469 (c_parser_for_statement): ... here.
2470 (c_parser_if_statement): Use it.
2471 (c_parser_switch_statement): Use it.
2472 (c_parser_while_statement): Use it.
2473
b02a5e26
MP
2474 PR c/70791
2475 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2476
477d4906
IV
24772016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2478
2479 PR c++/69363
2480 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2481 instead of c_finish_cilk_clauses.
2482 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2483 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2484 floating-point variables in the linear clause for Cilk Plus.
2485
fe37c7af
MM
24862016-04-18 Michael Matz <matz@suse.de>
2487
2488 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2489 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2490
949505a9
MP
24912016-04-15 Marek Polacek <polacek@redhat.com>
2492
2493 PR c/70671
2494 * c-typeck.c (build_unary_op): Pass location down to error and
2495 warning call.
2496
dda1bf61
JJ
24972016-04-15 Jakub Jelinek <jakub@redhat.com>
2498
2499 PR c/70436
2500 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2501 where needed.
2502 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2503 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2504 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2505 Adjust c_parser_pragma callers.
2506 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2507 caller.
2508 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2509 c_parser_statement.
2510 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2511 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2512 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2513 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2514 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2515 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2516 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2517 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2518 down where needed.
2519 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2520 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2521 calls.
2522
99cd9857
MP
25232016-04-13 Marek Polacek <polacek@redhat.com>
2524
2525 PR c/70436
2526 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2527 adjust callers.
2528 (c_parser_statement): Likewise.
2529 (c_parser_c99_block_statement): Likewise.
2530 (c_parser_while_statement): Likewise.
2531 (c_parser_for_statement): Likewise.
2532 (c_parser_if_body): Don't set IF_P here.
2533 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2534 about dangling else here.
2535 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2536 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2537 warn about dangling else here.
2538
f13355da
MP
25392016-04-04 Marek Polacek <polacek@redhat.com>
2540
2541 PR c/70307
2542 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2543
5fde6a45
MP
25442016-03-31 Marek Polacek <polacek@redhat.com>
2545
2546 PR c/70297
2547 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2548
4bbf545b
DM
25492016-03-18 David Malcolm <dmalcolm@redhat.com>
2550
2551 PR c/70281
2552 * c-parser.c (c_parser_postfix_expression): Set the source range
2553 for uses of "__builtin_types_compatible_p".
2554
fcc2b74f
JJ
25552016-03-17 Jakub Jelinek <jakub@redhat.com>
2556
2557 PR c/70280
2558 * c-typeck.c (composite_type): Don't count void_list_node
2559 into len, if the list is terminated by void_list_node, start
2560 with void_list_node instead of NULL for newargs. Stop
2561 at void_list_node.
2562
ab4c578f
MP
25632016-03-16 Marek Polacek <polacek@redhat.com>
2564
2565 PR c/70093
2566 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2567 nested functions returning VM types.
2568
96b3c82d
CP
25692016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2570
2571 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2572 when calling c_finish_omp_clauses.
2573
29b9828f
BS
25742016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2575
2576 PR c/69824
2577 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2578 for later.
2579
7ff6ca38
MP
25802016-03-04 Marek Polacek <polacek@redhat.com>
2581
2582 PR c/69798
2583 * c-parser.c (c_parser_postfix_expression): Call
2584 c_parser_cast_expression rather than c_parser_postfix_expression.
2585
686e2237
JJ
25862016-03-01 Jakub Jelinek <jakub@redhat.com>
2587
2588 PR c/69796
2589 PR c/69974
2590 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2591 of incomplete decls to error_mark_node.
2592
0b05329b
MP
25932016-02-24 Marek Polacek <polacek@redhat.com>
2594
2595 PR c/69819
2596 * c-decl.c (finish_decl): Don't update the copy of the type of a
2597 different decl type.
2598
067fbd8b
JJ
25992016-02-23 Jakub Jelinek <jakub@redhat.com>
2600
2601 PR objc/69844
2602 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2603 in id_kind reclassification.
2604
bf14eba2
JJ
26052016-02-16 Jakub Jelinek <jakub@redhat.com>
2606
2607 PR c/69835
2608 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2609
ba539195
JN
26102016-02-16 James Norris <jnorris@codesourcery.com>
2611
2612 PR c/64748
2613 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2614
16595a1f
BS
26152016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2616
f48dfe98
BS
2617 * c-decl.c (build_null_declspecs): Zero the entire struct.
2618
16595a1f
BS
2619 PR c/69522
2620 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2621 callers changed. If nested_p is true, use it to call
2622 finish_implicit_inits.
2623 * c-tree.h (finish_implicit_inits): Declare.
2624 * c-typeck.c (finish_implicit_inits): New function. Move code
2625 from ...
2626 (push_init_level): ... here.
2627 (set_designator, process_init_element): Call finish_implicit_inits.
2628
66756373
JJ
26292016-02-11 Jakub Jelinek <jakub@redhat.com>
2630
2631 PR c/69768
2632 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2633 arguments for -Waddress warning.
2634
1066e9b5
JJ
26352016-02-04 Jakub Jelinek <jakub@redhat.com>
2636
2637 PR c/69669
2638 * c-decl.c (finish_enum): When honoring mode attribute,
2639 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2640
3a5d2ba4
JJ
26412016-01-29 Jakub Jelinek <jakub@redhat.com>
2642
2643 PR debug/69518
2644 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2645 all type variants, not just TYPE_MAIN_VARIANT.
2646
cbdd8ae0
JJ
26472016-01-27 Jakub Jelinek <jakub@redhat.com>
2648
2649 PR debug/66869
2650 * c-decl.c (c_write_global_declarations_1): Warn with
2651 warn_unused_function if static prototype without definition
2652 is not C_DECL_USED.
2653
fa74a4bc
MP
26542016-01-27 Marek Polacek <polacek@redhat.com>
2655
2656 PR c/68062
2657 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2658 to unsigned, if needed. Add -Wsign-compare warning.
2659
13f92e8d
JJ
26602016-01-26 Jakub Jelinek <jakub@redhat.com>
2661
2662 PR tree-optimization/69483
2663 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2664
cd8e73dc 26652016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2666
2667 PR c/24293
2668 * c-tree.h (incomplete_record_decls): Declare.
2669 * c-parser.c (incomplete_record_decls): Define.
2670 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2671 report error if any decl has zero size.
2672 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2673 or enum type to incomplete_record_decls.
2674
e6d6ec9e
TV
26752016-01-14 Tom de Vries <tom@codesourcery.com>
2676
2677 PR tree-optimization/68773
2678 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2679 set force_output.
2680
00083992
MP
26812016-01-14 Marek Polacek <polacek@redhat.com>
2682
2683 PR c/69262
2684 * c-decl.c (grokdeclarator): Provide more information for invalid
2685 array declarations.
2686
7443cf13
DM
26872016-01-06 David Malcolm <dmalcolm@redhat.com>
2688
2689 * c-parser.c (c_parser_unary_expression): For dereferences, build
2690 a combined location before calling build_indirect_ref, so that
2691 error reports cover the full range, manually updating the c_expr
2692 src_range.
2693
6b131d5b
MP
26942016-01-06 Marek Polacek <polacek@redhat.com>
2695
2696 PR sanitizer/69099
2697 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2698 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2699 NULL.
2700
818ab71a
JJ
27012016-01-04 Jakub Jelinek <jakub@redhat.com>
2702
2703 Update copyright years.
2704
2fe0a208
MP
27052016-01-04 Marek Polacek <polacek@redhat.com>
2706
2707 PR c/68908
2708 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2709 optimization to use __atomic_fetch_* built-in if possible.
2710
c7b48c8a
TS
27112015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2712
2713 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2714 into...
2715 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2716 all users.
2717
fda5652f
MP
27182015-12-22 Marek Polacek <polacek@redhat.com>
2719
2720 PR c/69002
2721 * c-typeck.c (build_component_ref): Warn when acessing elements of
2722 atomic structures or unions.
2723
745e411d
DM
27242015-12-21 David Malcolm <dmalcolm@redhat.com>
2725
2726 * c-typeck.c: Include "gcc-rich-location.h".
2727 (build_binary_op): In the two places that call binary_op_error,
2728 create a gcc_rich_location and populate it with the location of
2729 the binary op and its two operands.
2730
94c40e19
DM
27312015-12-16 David Malcolm <dmalcolm@redhat.com>
2732
2733 * c-parser.c (c_parser_statement_after_labels): When calling
2734 c_finish_return, Use the return expression's location if it has
2735 one, falling back to the location of the first token within it.
2736 * c-typeck.c (c_finish_return): When issuing warnings about
2737 the incorrect presence/absence of a return value, issue a note
2738 showing the declaration of the function.
2739
de67c4c3
DM
27402015-12-16 David Malcolm <dmalcolm@redhat.com>
2741
2742 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2743 to 4.
2744 (c_parser_peek_nth_token): New function.
2745 (c_parser_peek_conflict_marker): New function.
2746 (c_parser_error): Detect conflict markers and report them as such.
2747
a10704e1
DM
27482015-12-16 David Malcolm <dmalcolm@redhat.com>
2749
2750 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2751 to preserve range information for the primary expression
2752 in the call to c_parser_postfix_expression_after_primary.
2753
8062bca6
DM
27542015-12-16 David Malcolm <dmalcolm@redhat.com>
2755
2756 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2757 expression location, falling back on the first token location,
2758 rather than always using the latter.
2759
d06f8b75
MP
27602015-12-16 Marek Polacek <polacek@redhat.com>
2761
2762 PR c/64637
2763 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2764 available.
2765
2994fb91
MP
27662015-12-15 Marek Polacek <polacek@redhat.com>
2767
2768 PR c/68907
2769 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2770 artificial decl.
2771
a1b93f8d
DM
27722015-12-08 David Malcolm <dmalcolm@redhat.com>
2773
2774 * c-parser.c (c_parser_alignof_expression): Capture location of
2775 closing parenthesis (if any), or of end of unary expression, and
2776 use it to build a src_range for the expression.
2777
46c6e1e2
DM
27782015-12-08 David Malcolm <dmalcolm@redhat.com>
2779
2780 PR c/68757
2781 * c-parser.c (c_parser_get_builtin_args): Add
2782 "out_close_paren_loc" param, and write back to it.
2783 (c_parser_postfix_expression): Capture the closing
2784 parenthesis location for RID_CHOOSE_EXPR,
2785 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2786 RID_BUILTIN_SHUFFLE and use it to set the source range
2787 for such expressions; within RID_BUILTIN_COMPLEX set
2788 the underlying location.
2789
66189108
MP
27902015-12-07 Marek Polacek <polacek@redhat.com>
2791
2792 PR c/68668
2793 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2794 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2795
f187980b
EB
27962015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2797
2798 * c-tree.h (c_build_va_arg): Adjust prototype.
2799 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2800 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2801 parameter, adjust throughout and issue an error if EXPR is a component
2802 with reverse storage order.
2803
4250754e
JM
28042015-12-02 Jason Merrill <jason@redhat.com>
2805
2806 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2807 (c_fully_fold_internal, decl_constant_value_for_optimization):
2808 Move from c-common.c.
2809 * c-tree.h: Declare decl_constant_value_for_optimization.
2810 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2811
e9e32ee6
JM
28122015-12-02 Joseph Myers <joseph@codesourcery.com>
2813
2814 PR c/68162
2815 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2816 following link from declarator to next declarator. Track original
2817 qualified type and pass it to c_build_qualified_type.
2818 * c-typeck.c (c_build_qualified_type): Add arguments
2819 orig_qual_type and orig_qual_indirect.
2820
ff7a55bf
TS
28212015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2822
2823 * c-parser.c (c_parser_omp_clause_name)
2824 (c_parser_oacc_all_clauses): Alphabetical sorting.
2825
657e4e47
JJ
28262015-12-02 Jakub Jelinek <jakub@redhat.com>
2827
2828 PR c/68533
2829 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2830 for diagnostics.
2831
37d5ad46
JB
28322015-12-01 Julian Brown <julian@codesourcery.com>
2833 Cesar Philippidis <cesar@codesourcery.com>
2834 James Norris <James_Norris@mentor.com>
2835
2836 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2837 (c_parser_oacc_clause_use_device): New function.
2838 (c_parser_oacc_all_clauses): Add use_device support.
2839 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2840 (c_parser_oacc_host_data): New function.
2841 (c_parser_omp_construct): Add host_data support.
2842 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2843 * c-typeck.c (c_finish_oacc_host_data): New function.
2844 (c_finish_omp_clauses): Add use_device support.
2845
a4850ce9
JH
28462015-11-29 Jan Hubicka <hubicka@ucw.cz>
2847
2848 PR c/67106
2849 * c-decl.c: Set TYPE_PACKED in variants.
2850
b58d3df2
ML
28512015-11-27 Martin Liska <mliska@suse.cz>
2852
2853 PR c++/68312
2854 * c-array-notation.c (fix_builtin_array_notation_fn):
2855 Use release_vec_vec instead of vec::release.
2856 (build_array_notation_expr): Likewise.
2857 (fix_conditional_array_notations_1): Likewise.
2858 (fix_array_notation_expr): Likewise.
2859 (fix_array_notation_call_expr): Likewise.
2860
aec17bfe
JJ
28612015-11-27 Jakub Jelinek <jakub@redhat.com>
2862
2863 PR c/63326
2864 * c-parser.c (c_parser_compound_statement_nostart): If
2865 last_label is true, use pragma_stmt instead of pragma_compound
2866 as second c_parser_pragma argument.
2867 (c_parser_omp_ordered, c_parser_omp_target_update,
2868 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2869 false as second argument to c_parser_skip_to_pragma_eol after
2870 diagnosing standalone directives used in pragma_stmt context.
2871
688c4de0
IV
28722015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2873
2874 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2875 with "if (ENABLE_OFFLOADING)".
2876
cbd03aee
DM
28772015-11-23 David Malcolm <dmalcolm@redhat.com>
2878
2879 PR objc/68438
2880 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2881 for various Objective-C constructs: Class.name syntax,
2882 @selector(), @protocol(), @encode(), and [] message syntax.
2883
a87a86e1
DM
28842015-11-20 David Malcolm <dmalcolm@redhat.com>
2885
2886 PR 62314
2887 * c-typeck.c (should_suggest_deref_p): New function.
2888 (build_component_ref): Special-case POINTER_TYPE when
2889 generating a "not a structure of union" error message, and
2890 suggest a "->" rather than a ".", providing a fix-it hint.
2891
8ece8dfb
DM
28922015-11-19 David Malcolm <dmalcolm@redhat.com>
2893
2894 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2895 candidate into a new function, find_closest_identifier.
2896
433068cc
MP
28972015-11-19 Marek Polacek <polacek@redhat.com>
2898
2899 PR c/68412
2900 * c-typeck.c (parser_build_binary_op): Properly handle
2901 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2902
bef08b71
DM
29032015-11-17 David Malcolm <dmalcolm@redhat.com>
2904
2905 * c-parser.c (set_c_expr_source_range): Bulletproof both
2906 overloaded implementations against NULL expr->value.
2907 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2908 values.
2909 (c_parser_unary_expression): Likewise when handling addresses of
2910 labels.
2911 (c_parser_postfix_expression): Likewise for statement expressions,
2912 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2913 __builtin_va_arg, and for __builtin_offset_of.
2914 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2915 src_range using the range of the braced initializer.
2916 (c_parser_transaction_expression): Set src_range for "ret" to a
2917 sane pair of values.
2918
fff77217
KY
29192015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2920
2921 * c-parser.c (c_finish_omp_declare_simd): Look for
2922 "simd" attribute as well. Update error message.
2923
1d899da2
TS
29242015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2925
2926 * c-parser.c (c_parser_omp_declare_target): Adjust.
2927
e4606348
JJ
29282015-11-14 Jakub Jelinek <jakub@redhat.com>
2929
2930 * c-typeck.c (c_finish_omp_clauses): Don't mark
2931 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2932
3e636daf
MP
29332015-11-14 Marek Polacek <polacek@redhat.com>
2934
2935 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2936 * c-typeck.c: Likewise.
2937
ebedc9a3
DM
29382015-11-13 David Malcolm <dmalcolm@redhat.com>
2939
2940 * c-decl.c (warn_defaults_to): Pass line_table to
2941 rich_location ctor.
2942 * c-errors.c (pedwarn_c99): Likewise.
2943 (pedwarn_c90): Likewise.
2944 * c-parser.c (set_c_expr_source_range): New functions.
2945 (c_token::get_range): New method.
2946 (c_token::get_finish): New method.
2947 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2948 based on the range from the start of the LHS to the end of the
2949 RHS.
2950 (c_parser_conditional_expression): Likewise, based on the range
2951 from the start of the cond.value to the end of exp2.value.
2952 (c_parser_binary_expression): Call set_c_expr_source_range on
2953 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2954 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2955 based on the cast_loc through to the end of the expr.
2956 (c_parser_unary_expression): Likewise, based on the
2957 op_loc through to the end of op.
2958 (c_parser_sizeof_expression) Likewise, based on the start of the
2959 sizeof token through to either the closing paren or the end of
2960 expr.
2961 (c_parser_postfix_expression): Likewise, using the token range,
2962 or from the open paren through to the close paren for
2963 parenthesized expressions.
2964 (c_parser_postfix_expression_after_primary): Likewise, for
2965 various kinds of expression.
2966 * c-tree.h (struct c_expr): Add field "src_range".
2967 (c_expr::get_start): New method.
2968 (c_expr::get_finish): New method.
2969 (set_c_expr_source_range): New decls.
2970 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2971 on ret for prefix unary ops.
2972 (parser_build_binary_op): Likewise, running from the start of
2973 arg1.value through to the end of arg2.value.
2974
ec8b536f
MP
29752015-11-13 Marek Polacek <polacek@redhat.com>
2976
2977 PR c/68320
2978 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2979
277fe616
DM
29802015-11-13 David Malcolm <dmalcolm@redhat.com>
2981
2982 * c-typeck.c: Include spellcheck.h.
2983 (lookup_field_fuzzy_find_candidates): New function.
2984 (lookup_field_fuzzy): New function.
2985 (build_component_ref): If the field was not found, try using
2986 lookup_field_fuzzy and potentially offer a suggestion.
2987
6e232ba4
JN
29882015-11-12 James Norris <jnorris@codesourcery.com>
2989 Joseph Myers <joseph@codesourcery.com>
2990
2991 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2992 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2993 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2994 and PRAGMA_OMP_CLAUSE_LINK.
2995 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2996 and PRAGMA_OACC_CLAUSE_LINK.
2997 (OACC_DECLARE_CLAUSE_MASK): New definition.
2998 (c_parser_oacc_declare): New function.
2999
9be4f715
MP
30002015-11-12 Marek Polacek <polacek@redhat.com>
3001
3002 PR c/67784
3003 * c-parser.c (c_parser_for_statement): Reclassify the token in
3004 a correct scope.
3005
e78bede6
MP
30062015-11-11 Marek Polacek <polacek@redhat.com>
3007
3008 PR c/68107
3009 PR c++/68266
3010 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3011 checking the size of an array.
3012
69f293c9
AM
30132015-11-11 Andrew MacLeod <amacleod@redhat.com>
3014
3015 * c-array-notation.c: Remove unused header files.
3016 * c-aux-info.c: Likewise.
3017 * c-convert.c: Likewise.
3018 * c-decl.c: Likewise.
3019 * c-errors.c: Likewise.
3020 * c-lang.c: Likewise.
3021 * c-objc-common.c: Likewise.
3022 * c-parser.c: Likewise.
3023 * c-typeck.c: Likewise.
3024 * gccspec.c: Likewise.
3025
3a40d81d
NS
30262015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3027 Cesar Philippidis <cesar@codesourcery.com>
3028 James Norris <jnorris@codesourcery.com>
3029 Julian Brown <julian@codesourcery.com>
3030 Nathan Sidwell <nathan@codesourcery.com>
3031
3032 c/
3033 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3034 routine arg.
3035 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3036 (c_parser_pragma): Parse 'acc routine'.
3037 (OACC_ROUTINE_CLAUSE_MARK): Define.
3038 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3039
fc402eec
AA
30402015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3041
3042 PR debug/67192
3043 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3044 location of the backward-goto to the start of the loop body.
3045
f6b0b3db
AA
30462015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3047
3048 PR debug/67192
3049 * c-parser.c (c_parser_while_statement): Finish the loop before
3050 parsing ahead for misleading indentation.
3051 (c_parser_for_statement): Likewise.
3052
ee45a32d
EB
30532015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3054
3055 * c-decl.c (finish_struct): If the structure has reverse storage
3056 order, rewrite the type of array fields with scalar component. Call
3057 maybe_apply_pragma_scalar_storage_order on entry.
3058 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3059 errors on bit-fields and reverse SSO here and not...
3060 (c_mark_addressable): ...here.
3061 (output_init_element): Adjust call to initializer_constant_valid_p.
3062 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3063
8a645150
DM
30642015-11-06 David Malcolm <dmalcolm@redhat.com>
3065
3066 * c-decl.c (warn_defaults_to): Update for change in signature
3067 of diagnostic_set_info.
3068 * c-errors.c (pedwarn_c99): Likewise.
3069 (pedwarn_c90): Likewise.
3070 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3071 for textinfo::set_location.
3072
7a5e4956
CP
30732015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3074 Thomas Schwinge <thomas@codesourcery.com>
3075 James Norris <jnorris@codesourcery.com>
3076
3077 * c-parser.c (c_parser_omp_clause_name): Add support for
3078 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3079 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3080 default(none) in OpenACC.
3081 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3082 arguments.
3083 (c_parser_oacc_clause_tile): New function.
3084 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3085 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3086 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3087 TILE}.
3088 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3089 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3090 FIRSTPRIVATE}.
3091 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3092 (c_parser_oacc_update): Update the error message for missing clauses.
3093 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3094 and OMP_CLAUSE_INDEPENDENT.
3095
bfcfbfa0
MP
30962015-11-05 Marek Polacek <polacek@redhat.com>
3097
3098 PR c/68090
3099 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3100 deal with pre-evaluation on invalid types.
3101
e01d41e5
JJ
31022015-11-05 Jakub Jelinek <jakub@redhat.com>
3103 Ilya Verbin <ilya.verbin@intel.com>
3104
3105 * c-parser.c: Include context.h and gimple-expr.h.
3106 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3107 monotonic together with nonmonotonic.
3108 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3109 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3110 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3111 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3112 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3113 expressions on combined target teams before the target.
3114 (c_parser_omp_declare_target): If decl has "omp declare target" or
3115 "omp declare target link" attribute, and cgraph or varpool node already
3116 exists, then set corresponding flags. Call c_finish_omp_clauses
3117 in the parenthesized extended-list syntax case.
3118 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3119 declare target.
3120 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3121 on OMP_CLAUSE_REDUCTION array sections.
3122 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3123 into the constant offset, or for variable low-bound using
3124 POINTER_PLUS_EXPR. For structure element based array sections use
3125 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3126 (c_finish_omp_clauses): Drop generic_field_head, structure
3127 elements are now always mapped even as array section bases,
3128 diagnose same var in data sharing and mapping clauses. Diagnose if
3129 linear step on declare simd is neither a constant nor a uniform
3130 parameter. Look through POINTER_PLUS_EXPR for array section
3131 reductions. Diagnose the same var or function appearing multiple
3132 times on the same directive. Fix up wording for the to clause if t
3133 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3134 modifier on kinds other than dynamic or guided or nonmonotonic
3135 modifier together with ordered clause.
3136
4bf9e5a8
TS
31372015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3138 Chung-Lin Tang <cltang@codesourcery.com>
3139
3140 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3141
2adfab87
AM
31422015-10-29 Andrew MacLeod <amacleod@redhat.com>
3143
3144 * c-array-notation.c: Reorder #include's and remove duplicates.
3145 * c-aux-info.c: Likewise.
3146 * c-convert.c: Likewise.
3147 * c-decl.c: Likewise.
3148 * c-errors.c: Likewise.
3149 * c-lang.c: Likewise.
3150 * c-objc-common.c: Likewise.
3151 * c-parser.c: Likewise.
3152 * c-typeck.c: Likewise.
3153
e922069e
JW
31542015-10-26 Jim Wilson <jim.wilson@linaro.org>
3155
3156 PR debug/66068
3157 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3158 after calling build_qualified_type.
3159
765dd391
CP
31602015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3161 Thomas Schwinge <thomas@codesourcery.com>
3162 James Norris <jnorris@codesourcery.com>
3163 Joseph Myers <joseph@codesourcery.com>
3164 Julian Brown <julian@codesourcery.com>
3165 Bernd Schmidt <bschmidt@redhat.com>
3166
3167 * c-parser.c (c_parser_oacc_shape_clause): New.
3168 (c_parser_oacc_simple_clause): New.
3169 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3170 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3171
88bae6f4
TS
31722015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3173 James Norris <jnorris@codesourcery.com>
3174 Cesar Philippidis <cesar@codesourcery.com>
3175
3176 PR c/64765
3177 PR c/64880
3178 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3179 parameters, and handle these. Adjust all users.
3180 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3181 into...
3182 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3183 all users.
3184 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3185 declare functions.
3186 (c_finish_omp_construct): Declare function.
3187 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3188 Merge functions into...
3189 (c_finish_omp_construct): ... this new function.
3190
a8fc2579
RB
31912015-10-22 Richard Biener <rguenther@suse.de>
3192
3193 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3194 before folding a MINUS_EXPR.
3195
e9122ef6
MP
31962015-10-21 Marek Polacek <polacek@redhat.com>
3197
3198 PR c/68024
3199 * c-decl.c (start_function): Warn about vararg functions without
3200 a prototype.
3201
9f47c7e5
IE
32022015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3203
3204 * c-typeck.c (build_conditional_expr): Use boolean vector
3205 type for vector comparison.
3206 (build_vec_cmp): New.
3207 (build_binary_op): Use build_vec_cmp for comparison.
3208
fa60eeb9
MP
32092015-10-20 Marek Polacek <polacek@redhat.com>
3210
3211 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3212
2c7020eb
MP
32132015-10-20 Marek Polacek <polacek@redhat.com>
3214
3215 PR c/67964
3216 * c-parser.c (c_parser_attributes): Break out of the loop if the
3217 token after an attribute isn't a comma.
3218
d9a6bd32
JJ
32192015-10-13 Jakub Jelinek <jakub@redhat.com>
3220 Aldy Hernandez <aldyh@redhat.com>
3221
3222 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3223 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3224 (c_parser_omp_variable_list): Handle structure elements for
3225 map, to and from clauses. Handle array sections in reduction
3226 clause. Formatting fixes.
3227 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3228 if clause modifiers.
3229 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3230 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3231 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3232 c_parser_omp_clause_is_device_ptr): New functions.
3233 (c_parser_omp_clause_ordered): Parse optional parameter.
3234 (c_parser_omp_clause_reduction): Handle array reductions.
3235 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3236 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3237 functions.
3238 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3239 (c_parser_omp_clause_depend_sink): New function.
3240 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3241 (c_parser_omp_clause_map): Parse release/delete map kinds and
3242 optional always modifier.
3243 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3244 and c_finish_omp_clauses callers.
3245 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3246 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3247 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3248 (OMP_CRITICAL_CLAUSE_MASK): Define.
3249 (c_parser_omp_critical): Parse critical clauses.
3250 (c_parser_omp_for_loop): Handle doacross loops, adjust
3251 c_finish_omp_for and c_finish_omp_clauses callers.
3252 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3253 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3254 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3255 (c_parser_omp_for): Disallow ordered clause when combined with
3256 distribute. Disallow linear clause when combined with distribute
3257 and not combined with simd.
3258 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3259 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3260 parse clauses and if depend clause is found, don't parse a body.
3261 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3262 Allow target parallel without for after it.
3263 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3264 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3265 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3266 invalid kinds.
3267 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3268 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3269 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3270 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3271 functions.
3272 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3273 defaultmap and is_device_ptr clauses.
3274 (c_parser_omp_target): Parse target parallel and target simd. Set
3275 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3276 and target exit data. Diagnose invalid map kinds.
3277 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3278 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3279 construct.
3280 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3281 &omp_priv.
3282 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3283 (c_parser_omp_taskloop): New function.
3284 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3285 handle PRAGMA_OMP_TASKLOOP.
3286 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3287 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3288 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3289 Add IS_OMP argument, handle structure element bases, diagnose
3290 bitfields, pass IS_OMP recursively, diagnose known zero length
3291 array sections in depend clauses, handle array sections in reduction
3292 clause, diagnose negative length even for pointers.
3293 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3294 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3295 array sections in reduction clause, set
3296 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3297 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3298 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3299 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3300
21ba0cea
MP
33012015-10-06 Marek Polacek <polacek@redhat.com>
3302
3303 * c-parser.c (c_parser_statement_after_labels): Use
3304 protected_set_expr_location.
3305 (c_parser_omp_clause_num_gangs): Likewise.
3306 (c_parser_omp_clause_num_threads): Likewise.
3307 (c_parser_omp_clause_num_workers): Likewise.
3308 (c_parser_omp_clause_vector_length): Likewise.
3309 (c_parser_omp_clause_num_teams): Likewise.
3310 (c_parser_omp_clause_thread_limit): Likewise.
3311 * c-typeck.c (build_c_cast): Likewise.
3312 (c_cast_expr): Likewise.
3313
624d31fe
RS
33142015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3315
3316 * c-typeck.c (c_tree_equal): Use real_equal instead of
3317 REAL_VALUES_EQUAL.
3318
b8fd7909
JM
33192015-10-04 Jason Merrill <jason@redhat.com>
3320
3321 * c-parser.c (c_lex_one_token): Handle @synchronized.
3322 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3323 can change whether the function is transaction_safe.
3324
1c7485af
MP
33252015-10-02 Marek Polacek <polacek@redhat.com>
3326
3327 PR c/67730
3328 * c-typeck.c (convert_for_assignment): Use the expansion point
3329 location throughout.
3330
3e3b8d63
MP
33312015-10-02 Marek Polacek <polacek@redhat.com>
3332
3333 PR c/64249
3334 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3335 and pass it down to c_parser_if_statement.
3336 (c_parser_else_body): Add CHAIN parameter and pass it down to
3337 c_parser_statement_after_labels.
3338 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3339 duplicated if-else-if conditions.
3340
aabef2de
MP
33412015-10-01 Marek Polacek <polacek@redhat.com>
3342
3343 * c-typeck.c (convert_for_assignment): Improve commentary.
3344
de8ddd5f
MP
33452015-09-30 Marek Polacek <polacek@redhat.com>
3346
3347 PR c/67730
3348 * c-typeck.c (c_finish_return): Use the expansion point location for
3349 certain "return with value" warnings.
3350
c4914de6
MLI
33512015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3352
3353 * c-parser.c (pragma_lex): Add loc argument.
3354
0e36f5c7
MP
33552015-09-15 Marek Polacek <polacek@redhat.com>
3356
3357 PR c/67580
3358 * c-decl.c (tag_exists_p): New function.
3359 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3360 struct/union/enum keywords are missing.
3361 * c-tree.h (tag_exists_p): Declare.
3362
2f3bb934
MP
33632015-09-15 Marek Polacek <polacek@redhat.com>
3364
3365 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3366 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3367 Return NULL_TREE instead of 0.
3368 (lookup_name): Return NULL_TREE instead of 0.
3369 (lookup_name_in_scope): Likewise.
3370 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3371 (parser_xref_tag): Use false instead of 0.
3372 (start_struct): Use true instead of 1.
3373 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3374
aa256c4a
MP
33752015-09-14 Marek Polacek <polacek@redhat.com>
3376
3377 * c-typeck.c (set_nonincremental_init_from_string): Use
3378 HOST_WIDE_INT_M1U when shifting a negative value.
3379
dbb68221
MW
33802015-09-09 Mark Wielaard <mjw@redhat.com>
3381
3382 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3383 parm against NULL.
3384
a8a098ac
JJ
33852015-09-10 Jakub Jelinek <jakub@redhat.com>
3386
3387 PR c/67502
3388 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3389 into OMP_FOR_PRE_BODY rather than before the loop.
3390
f4b189d5
JJ
33912015-09-09 Jakub Jelinek <jakub@redhat.com>
3392
0bb99c11
JJ
3393 PR c/67501
3394 * c-parser.c (c_parser_oacc_all_clauses,
3395 c_parser_omp_all_clauses): Remove invalid clause from
3396 list of clauses even if parser->error is set.
3397
fce5e5e3
JJ
3398 PR c/67500
3399 * c-parser.c (c_parser_omp_clause_aligned,
3400 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3401 test for errors.
3402 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3403 error_mark_node.
3404
f4b189d5
JJ
3405 PR c/67495
3406 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3407 instead of c_parser_unary_expression. If the result is !lvalue_p,
3408 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3409
b2aaf235
MP
34102015-09-04 Marek Polacek <polacek@redhat.com>
3411
3412 PR sanitizer/67279
3413 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3414
1807ffc1
MS
34152015-09-03 Martin Sebor <msebor@redhat.com>
3416
3417 PR c/66516
8b652e65
JJ
3418 * c-typeck.c (convert_arguments, parser_build_unary_op,
3419 build_conditional_expr, c_cast_expr, convert_for_assignment,
3420 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3421 reject_gcc_builtin.
3422 (c_decl_implicit): Define.
3423
d04ff417
MP
34242015-09-02 Marek Polacek <polacek@redhat.com>
3425
3426 PR c/67432
3427 * c-parser.c (c_parser_enum_specifier): Give a better error for
3428 an empty enum.
3429
a79683d5
TS
34302015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3431
3432 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3433
191a6b94
MP
34342015-08-12 Marek Polacek <polacek@redhat.com>
3435
3436 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3437 LOC to it.
3438
420a9d9b
MP
34392015-08-03 Marek Polacek <polacek@redhat.com>
3440
3441 PR c/67088
3442 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3443 Use it.
3444 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3445
992118a1
PP
34462015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3447
3448 * c-parser.c (c_parser_if_body): Take token_indent_info
3449 argument. Call warn_for_misleading_indentation even when the
3450 body is a semicolon. Extract token_indent_infos corresponding
3451 to the guard, body and next tokens. Adjust call to
3452 warn_for_misleading_indentation accordingly.
3453 (c_parser_else_body): Likewise.
3454 (c_parser_if_statement): Likewise.
3455 (c_parser_while_statement): Likewise.
3456 (c_parser_for_statement): Likewise.
3457
46308474
LFSM
34582015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3459 Manuel López-Ibáñez <manu@gcc.gnu.org>
3460
3461 * c-decl.c (get_parm_info): Remove static var. Update warning
3462 message.
3463
05b28fd6
MP
34642015-07-27 Marek Polacek <polacek@redhat.com>
3465
3466 PR c++/66555
3467 PR c/54979
3468 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3469
451b5e48
MP
34702015-07-20 Marek Polacek <polacek@redhat.com>
3471
3472 PR c++/55095
3473 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3474 (build_binary_op): Warn about left shift overflows.
3475
1916bcb5
AM
34762015-07-09 Andrew MacLeod <amacleod@redhat.com>
3477
3478 * c-array-notation.c: Adjust includes for flags.h changes.
3479 * c-objc-common.c: Likewise.
3480
c7131fb2
AM
34812015-07-07 Andrew MacLeod <amacleod@redhat.com>
3482
3483 * c-array-notation.c: Adjust includes.
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-objc-common.c: Likewise.
3490 * c-parser.c: Likewise.
3491 * c-typeck.c: Likewise.
3492
da2e71c9
MLI
34932015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3494
3495 PR fortran/66605
3496 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3497
b155cfd9
MP
34982015-06-29 Marek Polacek <polacek@redhat.com>
3499
3500 PR c/66322
3501 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3502 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3503 about -Wswitch-bool here.
3504 (do_case): Update c_add_case_label call.
3505 (c_finish_case): Update c_do_switch_warnings call.
3506
31521951
MP
35072015-06-27 Marek Polacek <polacek@redhat.com>
3508
3509 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3510
22d03525
MP
35112015-06-26 Marek Polacek <polacek@redhat.com>
3512
3513 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3514 INDIRECT_REF_P.
3515 * c-typeck.c (array_to_pointer_conversion): Likewise.
3516 (build_unary_op): Likewise.
3517 (c_finish_return): Likewise.
3518
f0889939
AM
35192015-06-25 Andrew MacLeod <amacleod@redhat.com>
3520
3521 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3522 * c-parser.c: Likewise.
3523
8d67ee55
RS
35242015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3525
3526 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3527 instead of pointer_hash.
3528 (detect_field_duplicates): Likewise.
3529
0ae9bd27
MP
35302015-06-25 Marek Polacek <polacek@redhat.com>
3531
3532 * c-array-notation.c: Use VAR_P throughout.
3533 * c-decl.c: Likewise.
3534 * c-objc-common.c: Likewise.
3535 * c-parser.c: Likewise.
3536 * c-typeck.c: Likewise.
3537
62f9079a
MP
35382015-06-25 Marek Polacek <polacek@redhat.com>
3539
3540 * c-decl.c: Use is_global_var throughout.
3541 * c-parser.c: Likewise.
3542 * c-typeck.c: Likewise.
3543
abb226c9
AM
35442015-06-17 Andrew MacLeod <amacleod@redhat.com>
3545
3546 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3547 * c-aux-info.c: Likewise.
3548 * c-convert.c: Likewise.
3549 * c-decl.c: Likewise.
3550 * c-errors.c: Likewise.
3551 * c-lang.c: Likewise.
3552 * c-objc-common.c: Likewise.
3553 * c-parser.c: Likewise.
3554 * c-typeck.c: Likewise.
3555
8cbababc
JH
35562015-06-11 Jan Hubicka <hubicka@ucw.cz>
3557
3558 PR middle-end/66325
3559 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3560 variants.
3561
a0349665
PMR
35622015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3563
3564 * c-decl.c (pop_scope): Register the main translation unit
3565 through the new debug hook.
3566
13fdf2e2
AM
35672015-06-08 Andrew MacLeod <amacleod@redhat.com>
3568
3569 * c-array-notation.c : Adjust include files.
3570 * c-aux-info.c : Likewise.
3571 * c-convert.c : Likewise.
3572 * c-decl.c : Likewise.
3573 * c-errors.c : Likewise.
3574 * c-lang.c : Likewise.
3575 * c-lang.h : Likewise.
3576 * c-objc-common.c : Likewise.
3577 * c-parser.c : Likewise.
3578 * c-typeck.c : Likewise.
3579
d7438551
AH
35802015-06-05 Aldy Hernandez <aldyh@redhat.com>
3581
3582 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3583 immediately clobber it.
3584 (c_write_global_declarations_1): Remove call to
3585 check_global_declaration_1.
3586 (c_write_global_declarations_2): Remove.
3587 (c_write_final_cleanups): Rename from c_write_global_declarations.
3588 Remove call to finalize_compilation_unit.
3589 Remove calls to debugging hooks.
3590 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3591 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3592 * c-tree.h: Remove c_write_global_declarations.
3593
ecb9f223
AM
35942015-06-04 Andrew MacLeod <amacleod@redhat.com>
3595
3596 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3597 * c-aux-info.c: Likewise.
3598 * c-convert.c: Likewise.
3599 * c-decl.c: Likewise.
3600 * c-errors.c: Likewise.
3601 * c-lang.c: Likewise.
3602 * c-objc-common.c: Likewise.
3603 * c-parser.c: Likewise.
3604 * c-typeck.c: Likewise.
3605
9482b620
MP
36062015-06-04 Marek Polacek <polacek@redhat.com>
3607
3608 PR c/66341
3609 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3610 it is a lvalue.
3611
bc51ace3
PK
36122015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3613
3614 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3615 Warn for empty struct.
3616 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3617
ea5b45b6
AT
36182015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3619
3620 * c-decl.c (start_function): Call plugin before parsing.
3621 (finish_function): Call plugin after parsing.
3622
c2d47482
PK
36232015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3624
3625 PR c/49551
3626 * c-decl.c (merge_decls): Merge DECL_COMMON.
3627
a95492ab
JW
36282015-05-22 Jim Wilson <jim.wilson@linaro.org>
3629
3630 * Make-lang.in (check_gcc_pallelize): Define.
3631
fd5c817a
MP
36322015-05-22 Marek Polacek <polacek@redhat.com>
3633
3634 PR c/47043
3635 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3636 attributes.
3637
c7b70a3c
MP
36382015-05-21 Marek Polacek <polacek@redhat.com>
3639
3640 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3641 DECL_BUILT_IN.
3642
21b634ae
MP
36432015-05-20 Marek Polacek <polacek@redhat.com>
3644
3645 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3646 * c-typeck.c: Likewise.
3647
296a8c2f
MP
36482015-05-19 Marek Polacek <polacek@redhat.com>
3649
3650 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3651
41b37d5e
JJ
36522015-05-19 Jakub Jelinek <jakub@redhat.com>
3653
3654 PR middle-end/66199
3655 * c-parser.c (c_parser_omp_for_loop): Don't add
3656 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3657 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3658 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3659 constructs.
3660
fab27f52
MM
36612015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3662
3663 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3664 swaps.
fab27f52 3665
40de31cf
MLI
36662015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3667
3668 PR fortran/44054
3669 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3670 accessor function.
3671
3aa3c9fc
MP
36722015-05-14 Marek Polacek <polacek@redhat.com>
3673
3674 PR c/66066
3675 PR c/66127
3676 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3677 rather than with 0.
3678
c3388e62
DM
36792015-05-12 David Malcolm <dmalcolm@redhat.com>
3680
3681 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3682 to add a call to warn_for_misleading_indentation.
3683 (c_parser_else_body): Likewise, adding param "else_loc".
3684 (c_parser_if_statement): Check for misleading indentation.
3685 (c_parser_while_statement): Likewise.
3686 (c_parser_for_statement): Likewise.
3687
755e528f
MP
36882015-05-08 Marek Polacek <polacek@redhat.com>
3689
3690 PR c/64918
3691 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3692 (output_init_element): Likewise.
3693
0173bd2a
MP
36942015-05-07 Marek Polacek <polacek@redhat.com>
3695
3696 PR c/65179
3697 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3698 value.
3699
9babc352
MP
37002015-04-30 Marek Polacek <polacek@redhat.com>
3701
3702 * c-typeck.c (set_init_label): Call error_at instead of error and
3703 pass LOC to it.
3704
ac9f18db
MP
3705 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3706 the type of a decl.
3707
ec3fba51
MP
3708 * c-typeck.c (c_build_va_arg): Clarify the error message.
3709
b811915d
TS
37102015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3711
3712 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3713 OMP_STANDALONE_CLAUSES.
3714
f3075008
MP
37152015-04-28 Marek Polacek <polacek@redhat.com>
3716
3717 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3718
4e81b788
MP
37192015-04-28 Marek Polacek <polacek@redhat.com>
3720
3721 PR c/65901
3722 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3723
6c1db78e
MP
37242015-04-25 Marek Polacek <polacek@redhat.com>
3725
3726 PR c/52085
3727 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3728 attribute.
3729
5c4abbb8
MP
37302015-04-23 Marek Polacek <polacek@redhat.com>
3731
3732 PR c/65345
3733 * c-decl.c (set_labels_context_r): New function.
3734 (store_parm_decls): Call it via walk_tree_without_duplicates.
3735 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3736 instead of create_tmp_var. Build TARGET_EXPR instead of
3737 COMPOUND_EXPR.
3738 (build_atomic_assign): Use create_tmp_var_raw instead of
3739 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3740
06aca1d5
IV
37412015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3742
3743 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3744 (c_parser_omp_target_update): Add missed %> to error_at ().
3745
8fba1830
BRF
37462015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3747
3748 PR target/55143
3749 * c-decl.c (c_default_pointer_mode): Remove definition.
3750 * c-tree.h (c_default_pointer_mode): Remove declaration.
3751
62021f64
TB
37522015-03-27 Tobias Burnus <burnus@net-b.de>
3753
3754 PR c/65586
3755 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3756 error out.
3757 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3758 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3759 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3760
9b65e171
JJ
37612015-03-19 Jakub Jelinek <jakub@redhat.com>
3762
3763 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3764 attribute for DECL_EXTERNAL VAR_DECLs.
3765
17958621
JJ
37662015-03-11 Jakub Jelinek <jakub@redhat.com>
3767
3768 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3769 argument.
3770
7ccb1a11
JJ
37712015-03-10 Jakub Jelinek <jakub@redhat.com>
3772
3773 PR c/65120
3774 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3775 before preparing arguments to warn_logical_not_parentheses.
3776
01177669
JJ
37772015-03-09 Jakub Jelinek <jakub@redhat.com>
3778
3779 PR c/65120
3780 * c-typeck.c (parser_build_binary_op): Don't warn for
3781 !!x == y or !b == y where b is _Bool.
3782
802ac282
MP
37832015-03-09 Marek Polacek <polacek@redhat.com>
3784
3785 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3786 * c-decl.c (grokdeclarator): Likewise.
3787 * c-typeck.c (build_binary_op): Likewise.
3788
e5165b60
MP
37892015-02-27 Marek Polacek <polacek@redhat.com>
3790
3791 PR c/65228
3792 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3793
065d214c
MP
37942015-02-14 Marek Polacek <polacek@redhat.com>
3795
3796 PR c/64768
3797 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3798 declared through a typedef name.
3799
e5d9235b
MP
38002015-02-13 Marek Polacek <polacek@redhat.com>
3801
3802 PR c/65050
3803 * c-decl.c (grokdeclarator): Print also the type when giving
3804 the error message about array's incomplete element type.
3805
fa01ffcc
JJ
38062015-02-11 Jakub Jelinek <jakub@redhat.com>
3807
3808 PR c/64824
3809 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3810 check in the POP macro.
3811
c3e38a03
MP
38122015-02-09 Marek Polacek <polacek@redhat.com>
3813
3814 PR c/64856
3815 * c-typeck.c (process_init_element): Don't always wrap
3816 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3817 initializing a range of elements.
3818
4886ec8e
JJ
38192015-02-04 Jakub Jelinek <jakub@redhat.com>
3820
3821 PR c/64824
3822 PR c/64868
3823 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3824
c3e38a03 38252015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3826
3827 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3828 processing enum declaration.
3829
7b33f0c8
MP
38302015-01-29 Marek Polacek <polacek@redhat.com>
3831
3832 PR c/64709
3833 * c-typeck.c (pop_init_level): If constructor_elements has
3834 exactly one element with integer_zerop value, set constructor_zeroinit
3835 to 1. Remove braces around warning_init call.
3836
dea63e49
JJ
38372015-01-27 Jakub Jelinek <jakub@redhat.com>
3838
3839 PR c/64766
3840 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3841 of FUNCTION_DECLs with error_mark_node.
3842
d38f7dce
JJ
38432015-01-26 Jakub Jelinek <jakub@redhat.com>
3844
3845 PR c/64778
3846 * c-typeck.c (convert_arguments): Return -1 if there are
3847 error_args, even if we've diagnosed too many arguments.
3848
cbf5d0e7
RB
38492015-01-21 Richard Biener <rguenther@suse.de>
3850
3851 PR middle-end/64313
3852 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3853 for builtins the user declared correctly.
3854
41dbbb37
TS
38552015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3856 Bernd Schmidt <bernds@codesourcery.com>
3857 Cesar Philippidis <cesar@codesourcery.com>
3858 James Norris <jnorris@codesourcery.com>
3859 Jakub Jelinek <jakub@redhat.com>
3860 Ilmir Usmanov <i.usmanov@samsung.com>
3861
3862 * c-parser.c: Include "gomp-constants.h".
3863 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3864 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3865 Use OMP_CLAUSE_SET_MAP_KIND.
3866 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3867 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3868 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3869 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3870 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3871 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3872 "copyout", "create", "delete", "deviceptr", "gang", "host",
3873 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3874 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3875 "present_or_create", "pcreate", "seq", "self", "vector",
3876 "vector_length", "wait", "worker".
3877 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3878 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3879 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3880 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3881 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3882 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3883 (c_parser_oacc_data_clause_deviceptr)
3884 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3885 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3886 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3887 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3888 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3889 (c_parser_oacc_parallel, c_parser_oacc_update)
3890 (c_parser_oacc_wait): New functions.
3891 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3892 (c_finish_oacc_data): New prototypes.
3893 * c-typeck.c: Include "gomp-constants.h".
3894 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3895 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3896 OMP_CLAUSE_SET_MAP_KIND.
3897 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3898 (c_finish_oacc_data): New functions.
3899 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3900 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3901 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3902 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3903 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3904 GOMP_MAP_FORCE_DEVICEPTR.
3905
adfac8df
JJ
39062015-01-09 Michael Collison <michael.collison@linaro.org>
3907
3908 * c-array-notation.c: Include hash-set.h, machmode.h,
3909 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3910 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3911 * c-aux-info.c: Ditto.
3912 * c-convert.c: Ditto.
3913 * c-decl.c: Ditto.
3914 * c-errors.c: Ditto.
3915 * c-lang.c: Dittoxs.
3916 * c-objc-common.c: Ditto.
3917 * c-parser.c: Ditto.
3918 * c-typeck.c: Include hash-set.h, machmode.h,
3919 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3920 fold-const.h, wide-int.h, inchash.h, real.h and
3921 fixed-value.h due to flattening of tree.h.
3922
2cc901dc
MP
39232015-01-07 Marek Polacek <polacek@redhat.com>
3924
3925 PR c/64417
3926 * c-typeck.c (process_init_element): Disallow initialization of
3927 a flexible array member with a string constant if the structure
3928 is in an array.
3929
5624e564
JJ
39302015-01-05 Jakub Jelinek <jakub@redhat.com>
3931
e5341100
JJ
3932 PR sanitizer/64344
3933 * c-typeck.c (convert_for_assignment, c_finish_return): For
3934 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3935 types also set in_late_binary_op around convert call.
3936 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3937 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3938 result on expr as last argument to ubsan_instrument_float_cast,
3939 if in_late_binary_op, don't use c_save_expr but save_expr.
3940
5624e564
JJ
3941 Update copyright years.
3942
5bd012f8
MP
39432015-01-05 Marek Polacek <polacek@redhat.com>
3944
3945 PR c/64423
3946 * c-typeck.c (build_array_ref): Pass loc down to
3947 warn_array_subscript_with_type_char.
3948
3f8257db 39492014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3950
3951 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3952 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3953 element type.
8e745a17 3954 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3955 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3956 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3957 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3958 to PEDWARN_FOR_QUALIFIERS.
768952be 3959
8f94a8c4
JJ
39602014-12-17 Jakub Jelinek <jakub@redhat.com>
3961
3962 PR sanitizer/64289
3963 * c-convert.c: Include ubsan.h.
3964 (convert): For real -> integral casts and
3965 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3966 instead instrument the float cast directly.
3967
b731b390
JJ
39682014-11-29 Jakub Jelinek <jakub@redhat.com>
3969
3970 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3971 c_finish_stmt_expr): Remove NULL last argument from
3972 create_tmp_var_raw and create_tmp_var calls.
3973 * c-array-notation.c (fix_builtin_array_notation_fn,
3974 build_array_notation_expr, fix_conditional_array_notations_1,
3975 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3976
541e35a6
MP
39772014-11-28 Marek Polacek <polacek@redhat.com>
3978
3979 PR c/63862
3980 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3981 convert the right operand to integer type.
3982
b286be94
MP
39832014-11-25 Marek Polacek <polacek@redhat.com>
3984
3985 PR c/63877
3986 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3987 for inline functions.
3988
aa7da51a
JJ
39892014-11-21 Jakub Jelinek <jakub@redhat.com>
3990
3991 PR target/63764
3992 * c-typeck.c (build_array_ref): Adjust
3993 convert_vector_to_pointer_for_subscript caller. If it returns true,
3994 call non_lvalue_loc on the result.
3995
d876207f
RB
39962014-11-11 Richard Biener <rguenther@suse.de>
3997
3998 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3999 to true.
4000
e5e44252
AK
40012014-11-10 Andi Kleen <ak@linux.intel.com>
4002
4003 PR c/60804
4004 * c-parser.c (c_parser_statement_after_labels): Call
4005 check_no_cilk.
4006 (c_parser_if_statement): Dito.
4007 (c_parser_switch_statement): Dito.
4008 (c_parser_while_statement): Dito.
4009 (c_parser_do_statement): Dito.
4010 (c_parser_for_statement): Dito.
4011 * c-typeck.c (c_finish_loop): Dito.
4012
13c21655
PC
40132014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4014
4015 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4016 OPT_Wshift_count_overflow in the warnings.
4017
2d51fcef
MP
40182014-10-30 Marek Polacek <polacek@redhat.com>
4019
4020 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4021 print the stripped version as well, if they're not the same.
4022
ef4bddc2
RS
40232014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4024
4025 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4026 machine_mode.
4027
c582198b
AM
40282014-10-28 Andrew MacLeod <amacleod@redhat.com>
4029
4030 * c-decl.c: Adjust include files.
4031 * c-parser.c: Ditto.
4032
ddc8de03
PM
40332014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4034 Tom Tromey <tromey@redhat.com>
4035
4036 * c-tree.h (enum c_oracle_request): New.
4037 (c_binding_oracle_function): New typedef.
4038 (c_binding_oracle, c_pushtag, c_bind): Declare.
4039 * c-decl.c (c_binding_oracle): New global.
4040 (I_SYMBOL_CHECKED): New macro.
4041 (i_symbol_binding): New function.
4042 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4043 (I_TAG_CHECKED): New macro.
4044 (i_tag_binding): New function.
4045 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4046 (I_LABEL_CHECKED): New macro.
4047 (i_label_binding): New function.
4048 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4049 (c_print_identifier): Save and restore c_binding_oracle.
4050 (c_pushtag, c_bind): New functions.
4051
60393bbc
AM
40522014-10-27 Andrew MacLeod <amacleod@redhat.com>
4053
4054 * c-typeck.c: Adjust include files.
4055
d723bb7c
MLI
40562014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4057
4058 PR c++/53061
4059 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4060 initialization here...
4061 (c_initialize_diagnostics): ... but here. Set defaults after
4062 building pretty-printer.
4063
1bc5a451
MP
40642014-10-23 Marek Polacek <polacek@redhat.com>
4065
4066 PR c/63626
4067 * c-decl.c (pop_scope): Don't print warning in external_scope.
4068
4435bb92
MP
40692014-10-19 Marek Polacek <polacek@redhat.com>
4070
4071 PR c/63567
4072 * c-typeck.c (output_init_element): Allow initializing objects with
4073 static storage duration with compound literals even in C99 and add
4074 pedwarn for it.
4075
7278465e
MP
40762014-10-17 Marek Polacek <polacek@redhat.com>
4077
4078 PR c/63567
4079 * c-typeck.c (digest_init): Allow initializing objects with static
4080 storage duration with compound literals even in C99 and add pedwarn
4081 for it.
4082
d9b7be2e
MP
40832014-10-17 Marek Polacek <polacek@redhat.com>
4084
4085 PR c/63543
4086 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4087 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4088 error multiple times. Print the type.
4089
f406ae1f
MP
40902014-10-17 Marek Polacek <polacek@redhat.com>
4091
4092 PR c/63549
4093 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4094 type.
4095
92574c7c
MP
40962014-10-17 Marek Polacek <polacek@redhat.com>
4097
4098 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4099 (start_function): Use OPT_Wimplicit_int instead of 0.
4100 (store_parm_decls_oldstyle): Likewise.
4101
1bc4a978
MT
41022014-10-17 Alan Modra <amodra@gmail.com>
4103
4104 PR middle-end/61848
4105 * c-decl.c (merge_decls): Don't merge section name or tls model
4106 to newdecl symtab node, instead merge to olddecl. Override
4107 existing olddecl section name. Set tls_model for all thread-local
4108 vars, not just OMP thread-private ones. Remove incorrect comment.
4109
83685514
AM
41102014-10-16 Andrew MacLeod <amacleod@redhat.com>
4111
4112 * c-decl.c: Adjust include files.
4113
78a7c317
DD
41142014-10-14 DJ Delorie <dj@redhat.com>
4115
4116 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4117 (c_token_starts_typename): Check all __intN, not just __int128.
4118 (c_token_starts_declspecs): Likewise.
4119 (c_parser_declspecs): Likewise.
4120 (c_parser_attribute_any_word): Likewise.
4121 (c_parser_objc_selector): Likewise.
4122 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4123 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4124 is specified.
4125 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4126 __int128.
4127 (finish_declspecs): Likewise.
4128
74d98c1e
AB
41292014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4130
8e745a17 4131 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4132 the duplicate code.
8e745a17 4133 (c_parser_statement): Call the new function.
74d98c1e 4134
84937de2
MP
41352014-10-09 Marek Polacek <polacek@redhat.com>
4136
4137 PR c/63480
4138 * c-typeck.c (pop_init_level): Don't warn about initializing
4139 with { }.
4140
0382aaa0
MP
41412014-10-07 Marek Polacek <polacek@redhat.com>
4142
4143 PR c/59717
4144 * c-decl.c (header_for_builtin_fn): New function.
4145 (implicitly_declare): Suggest which header to include.
4146
7a0ca710
MP
41472014-10-07 Marek Polacek <polacek@redhat.com>
4148
4149 * c-convert.c (convert): Use error_operand_p.
4150 * c-typeck.c (require_complete_type): Likewise.
4151 (really_atomic_lvalue): Likewise.
4152 (digest_init): Likewise.
4153 (handle_omp_array_sections_1): Likewise.
4154
6bc8a126
MP
41552014-10-03 Marek Polacek <polacek@redhat.com>
4156
4157 PR c/63453
4158 * c-decl.c (pop_scope): Don't warn about "inline function declared
4159 but never defined" for functions marked with gnu_inline attribute.
4160
d90c0a59
JJ
41612014-09-25 Jakub Jelinek <jakub@redhat.com>
4162
4163 PR c++/63249
4164 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4165 on low_bound and length.
4166
083e891e
MP
41672014-09-24 Marek Polacek <polacek@redhat.com>
4168
4169 PR c/61405
4170 PR c/53874
4171 * c-parser.c: Don't define CPP_KEYWORD.
4172 (c_parser_switch_statement): Pass original type to c_finish_case.
4173 * c-tree.h (c_finish_case): Update declaration.
4174 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4175 conditionally to c_do_switch_warnings.
4176
8d95fe25
MP
41772014-09-03 Marek Polacek <polacek@redhat.com>
4178
4179 PR c/62024
4180 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4181 conversions.
4182
9a771876
JJ
41832014-09-02 Jakub Jelinek <jakub@redhat.com>
4184 Balaji V. Iyer <balaji.v.iyer@intel.com>
4185 Igor Zamyatin <igor.zamyatin@intel.com>
4186
4187 * c-parser.c (c_parser_cilk_for): New function.
4188 (c_parser_cilk_grainsize): Likewise.
4189 (c_get_temp_regvar): Likewise.
4190 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4191 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4192 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4193 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4194 case.
4195
b7679d96
CG
41962014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4197
4198 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4199 with using HOST_WIDE_INT without truncation to 'int'
4200
59ea0364
MP
42012014-08-22 Marek Polacek <polacek@redhat.com>
4202
4203 PR c++/62199
4204 * c-typeck.c (parser_build_binary_op): Adjust call to
4205 warn_logical_not_parentheses.
4206
671a475e
IZ
42072014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4208
4209 PR other/62008
4210 * c-parser.c (c_parser_array_notation): Check for correct
4211 type of an array added.
4212
04159acf
MP
42132014-08-19 Marek Polacek <polacek@redhat.com>
4214
4215 PR c++/62153
4216 * c-typeck.c (build_binary_op): If either operand of a comparison
4217 is a boolean expression, call maybe_warn_bool_compare.
4218
c77935ee
PP
42192014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4220
4221 PR c/45584
4222 * c-typeck.c (build_c_cast): Do a conversion even when the
4223 TYPE_MAIN_VARIANTs are the same.
4224
35aff4fb
MP
42252014-08-19 Marek Polacek <polacek@redhat.com>
4226
4227 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4228 pedwarn_c99 instead of pedwarn.
4229 (grokfield): Likewise.
4230 (warn_defaults_to): New function.
4231 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4232 Unconditionally call pedwarn_c99 instead of pedwarn.
4233 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4234 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4235 check flag_isoc11 before.
4236 * c-errors.c (pedwarn_c99): Change the return type to bool.
4237 Handle -Wc99-c11-compat.
4238 * c-parser.c (disable_extension_diagnostics): Handle
4239 warn_c99_c11_compat.
4240 (restore_extension_diagnostics): Likewise.
4241 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4242 instead of pedwarn, don't check flag_isoc11 before.
4243 (c_parser_declspecs): Likewise.
4244 (c_parser_alignas_specifier): Likewise.
4245 (c_parser_alignof_expression): Likewise.
4246 (c_parser_generic_selection): Likewise.
4247 * c-tree.h (pedwarn_c99): Update declaration.
4248 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4249 of pedwarn_c99.
4250
177cce46
MP
42512014-08-19 Marek Polacek <polacek@redhat.com>
4252
4253 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4254 to pedwarn_c90.
4255 * c-errors.c: Include "opts.h".
4256 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4257 * c-parser.c (disable_extension_diagnostics): Handle negative value
4258 of warn_c90_c99_compat, too.
4259 (restore_extension_diagnostics): Likewise.
4260 (c_parser_compound_statement_nostart): Pass
4261 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4262
6dc99c33
MP
42632014-08-12 Marek Polacek <polacek@redhat.com>
4264
4265 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4266 Add pedwarn.
4267 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4268 Likewise.
4269 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4270
3f8257db 42712014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4272
4273 PR c/51849
4274 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4275 Call pedwarn_c90 instead of pedwarn.
4276 (check_bitfield_type_and_width): Likewise.
4277 (declspecs_add_qual): Likewise.
4278 (declspecs_add_type): Likewise.
4279 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4280 Adjust to only call pedwarn_c90.
4281 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4282 pedwarn_c90 instead of pedwarn.
4283 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4284 * c-parser.c (disable_extension_diagnostics): Handle
4285 warn_c90_c99_compat.
4286 (restore_extension_diagnostics): Likewise.
4287 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4288 pedwarn_c90 instead of pedwarn.
4289 (c_parser_initelt): Likewise.
4290 (c_parser_postfix_expression): Likewise.
4291 (c_parser_postfix_expression_after_paren_type): Likewise.
4292 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4293 * c-tree.h: Fix formatting.
4294 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4295 pedwarn_c90 instead of pedwarn.
4296
9f25a338
TS
42972014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4298
4299 * c-typeck.c: Remove include of pointer-set.h.
4300
044331a8
MP
43012014-08-07 Marek Polacek <polacek@redhat.com>
4302
4303 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4304
b787e7a2
TS
43052014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4306
4307 * c-typeck.c: Use hash_map instead of pointer_map.
4308
6e2830c3
TS
43092014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4310
4311 * c-decl.c: Use hash_set instead of pointer_set.
4312
a7ee52fb
IZ
43132014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4314
4315 PR middle-end/61455
4316 * c-array-notation.c (expand_array_notations): Handling
4317 of DECL_EXPR added.
4318
b4dfdc11
MG
43192014-07-31 Marc Glisse <marc.glisse@inria.fr>
4320
4321 PR c++/60517
4322 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4323 a local variable.
4324
976d5a22
TT
43252014-07-30 Tom Tromey <tromey@redhat.com>
4326
4327 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4328 field.
4329 (really_start_incremental_init, push_init_level): Initialize
4330 designator_depth.
4331 (pop_init_level): Set global designator_depth.
4332 (process_init_element): Check for designated_init attribute.
4333
30281de2
MP
43342014-07-20 Marek Polacek <polacek@redhat.com>
4335
4336 PR c/61852
4337 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4338 (implicitly_declare): Pass location to implicit_decl_warning.
4339
b108f48f
JJ
43402014-07-14 Jakub Jelinek <jakub@redhat.com>
4341
4342 PR middle-end/61294
4343 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4344 If non-NULL, call c_parser_check_literal_zero.
4345 (c_parser_check_literal_zero): New function.
4346 (c_parser_postfix_expression_after_primary): Adjust
4347 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4348
773ec47f
MP
43492014-07-06 Marek Polacek <polacek@redhat.com>
4350
4351 PR c/6940
4352 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4353 * c-tree.h (C_ARRAY_PARAMETER): Define.
4354 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4355 function parameter.
4356
22e1cf1c 43572014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4358 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4359
4360 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4361 releasing symbol.
4362
52ec0ea3
MP
43632014-07-01 Marek Polacek <polacek@redhat.com>
4364
4365 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4366 instead of 0 to WARN_FOR_ASSIGNMENT.
4367
d5c3d343
MP
43682014-07-01 Marek Polacek <polacek@redhat.com>
4369
4370 PR c/58286
4371 * c-typeck.c (convert_for_assignment): Pass
4372 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4373
6a7253a4
MP
43742014-06-30 Marek Polacek <polacek@redhat.com>
4375
4376 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4377 has no_sanitize_undefined attribute.
4378
5e88a8f4
IZ
43792014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4380
4381 PR middle-end/57541
4382 * c-array-notation.c (fix_builtin_array_notation_fn):
4383 Check for 0 arguments in builtin call. Check that bultin argument is
4384 correct.
4385 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4386 index.
4387
9698b078
SH
43882014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4389
4390 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4391 qualifiers in __auto_type for atomic types.
4392 (c_parser_typeof_specifier): Discard all type qualifiers in
4393 __typeof__ for atomic types.
4394
6e07c515
MP
43952014-06-25 Marek Polacek <polacek@redhat.com>
4396
4397 PR c/61162
4398 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4399 the return expression to c_finish_return.
4400
da6f124d
JJ
44012014-06-25 Jakub Jelinek <jakub@redhat.com>
4402
4403 * c-typeck.c (c_finish_omp_clauses): Make sure
4404 OMP_CLAUSE_LINEAR_STEP has correct type.
4405
c203e8a7
TS
44062014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4407
4408 * c-decl.c: Adjust.
4409
56ad0e38
JJ
44102014-06-24 Jakub Jelinek <jakub@redhat.com>
4411
4412 * c-parser.c (c_parser_omp_for_loop): For
4413 #pragma omp parallel for simd move lastprivate clause from parallel
4414 to for rather than simd.
4415
47c2554f
MP
44162014-06-23 Marek Polacek <polacek@redhat.com>
4417
4418 * c-typeck.c (parser_build_binary_op): Don't call
4419 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4420
56363ffd
JH
44212014-06-15 Jan Hubicka <hubicka@ucw.cz>
4422
4423 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4424 * c-decl.c (merge_decls): Likewise.
4425
d7ff7ae5
MP
44262014-06-09 Marek Polacek <polacek@redhat.com>
4427
4428 PR c/36446
4429 * c-typeck.c (error_init): Call inform instead of error_at.
4430 (pedwarn_init): Call inform instead of pedwarn.
4431 (warning_init): Call inform instead of warning_at.
4432
24d047a3
JH
44332014-06-07 Jan Hubicka <hubicka@ucw.cz>
4434
4435 * c-decl.c (merge_decls): Use set_decl_section_name.
4436 (duplicate_decls): Remove node if it exists.
4437
9bac5cbb
G
44382014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4439
4440 PR c/53119
4441 * c-typeck.c (push_init_level, process_init_element,
4442 pop_init_level): Correct check for zero initialization, move
4443 missing brace warning to respect zero initialization.
4444
8ffcdea8
MP
44452014-06-05 Marek Polacek <polacek@redhat.com>
4446
4447 PR c/56724
4448 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4449
742938c9
MP
44502014-06-05 Marek Polacek <polacek@redhat.com>
4451
4452 PR c/49706
4453 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4454 on the left hand side operand of a comparison.
4455
6447c55d
MP
44562014-06-05 Marek Polacek <polacek@redhat.com>
4457
4458 PR c/48062
4459 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4460 Print note only if the warning was printed.
4461
9dc7743c
IZ
44622014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4463
4464 PR c/58942
4465 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4466 with a pointer.
4467
fedfecef
MP
44682014-06-03 Marek Polacek <polacek@redhat.com>
4469
4470 PR c/60439
4471 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4472 c_start_case.
4473 * c-tree.h (c_start_case): Update.
4474 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4475 switch condition has boolean value.
4476
9b2b7279
AM
44772014-06-02 Andrew MacLeod <amacleod@redhat.com>
4478
4479 * c-decl.c: Include builtins.h.
4480 * c-parser.c: Likewise.
4481
5c1bc275
MP
44822014-05-27 Marek Polacek <polacek@redhat.com>
4483
4484 PR c/56724
4485 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4486 error and warning calls to error_at and warning_at. Pass location of
4487 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4488 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4489 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4490
97563bc8
IZ
44912014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4492
4493 PR c/61191
4494 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4495 function parameters.
4496
aede2c10
JH
44972014-05-23 Jan Hubicka <hubicka@ucw.cz>
4498
4499 * c-decl.c (merge_decls): Preserve symtab node pointers.
4500 (duplicate_decls): Free new decl.
4501
edbba2ce
TS
45022014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4503
f3316c6d
TS
4504 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4505 initialization.
4506
edbba2ce
TS
4507 * c-parser.c (c_parser_omp_target): Return bool values.
4508
68c81f24
TS
45092014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4510
4511 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4512 num_teams_loc variable to num_thread_limit_loc.
4513
632f2871
RS
45142014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4515
4516 * c-array-notation.c (expand_array_notations): Use void_node
4517 instead of void_zero_node.
4518
766090c2
TS
45192014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4520
4521 * c-decl.c (finish_struct): Adjust.
4522 (finish_enum): Likewise.
4523 (bind): Adjust.
4524 (record_inline_static): Likewise.
4525 (push_scope): Likewise.
4526 (make_label): Likewise.
4527 (lookup_label_for_goto): Likewise.
4528 (finish_struct): Likewise.
4529 (finish_enum): Likewise.
4530 (store_parm_decls): Likewise.
4531 (c_push_function_context): Likewise.
4532 * c-lang.h: Remove usage of variable_size gty attribute.
4533 * c-parser.c (c_parse_init): Adjust.
4534 (c_parse_file): Likewise.
4535
2b107f6b
MP
45362014-05-13 Marek Polacek <polacek@redhat.com>
4537
4538 PR c/61162
4539 * c-typeck.c (convert_for_assignment): Pass location to
4540 WARN_FOR_ASSIGNMENT instead of input_location.
4541
d033409e
MP
45422014-05-10 Marek Polacek <polacek@redhat.com>
4543
4544 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4545 maybe_warn_string_init.
4546 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4547 maybe_warn_string_init.
4548 * c-tree.h (maybe_warn_string_init): Update declaration.
4549 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4550 Call pedwarn_init with loc instead of with input_location.
4551 (digest_init): Pass init_loc to maybe_warn_string_init.
4552 (pop_init_level): Call pedwarn_init with loc instead of with
4553 input_location.
4554 (set_init_index): Likewise.
4555 (process_init_element): Likewise.
4556
ea58ef42
MP
45572014-05-09 Marek Polacek <polacek@redhat.com>
4558
4559 PR c/61096
4560 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4561 (c_parser_initelt): Pass location to set_init_label. Pass array index
4562 location to set_init_index.
4563 * c-tree.h (push_init_level): Update declaration.
4564 (pop_init_level): Likewise.
4565 (set_init_index): Likewise.
4566 (set_init_label): Likewise.
4567 * c-typeck.c (error_init): Add location parameter. Call error_at
4568 instead of error.
4569 (digest_init): Pass init_loc to error_init.
4570 (really_start_incremental_init):
4571 (push_init_level): Add location parameter. Pass loc to pop_init_level
4572 and error_init.
4573 (pop_init_level): Likewise.
4574 (set_designator): Add location parameter. Pass loc to pop_init_level,
4575 push_init_level, and error_init.
4576 (set_init_index): Add location parameter. Pass loc to error_init and
4577 set_designator.
4578 (set_init_label): Likewise.
4579 (output_init_element): Pass loc to error_init.
4580 (process_init_element): Pass loc to error_init, pop_init_level,
4581 pedwarn_init, and push_init_level.
4582
661a0813
MP
45832014-05-09 Marek Polacek <polacek@redhat.com>
4584
4585 PR c/50459
4586 * c-parser.c (c_parser_attributes): Parse the arguments as an
4587 expression-list if the attribute takes identifier.
4588
2793eeab
MP
45892014-05-08 Marek Polacek <polacek@redhat.com>
4590
4591 PR c/61053
4592 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4593 TYPE_ALIGN_UNIT.
4594
f827930a
MP
45952014-05-08 Marek Polacek <polacek@redhat.com>
4596
4597 PR c/61077
4598 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4599 of main.
4600
1d60af08
KZ
46012014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4602 Mike Stump <mikestump@comcast.net>
4603 Richard Sandiford <rdsandiford@googlemail.com>
4604
4605 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4606 (finish_enum): Use wide-int interfaces.
4607 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4608 * c-typeck.c (build_c_cast): Likewise.
4609 (set_nonincremental_init_from_string): Likewise.
4610 (c_tree_equal): Likewise.
4611
a0e24419
MP
46122014-05-02 Marek Polacek <polacek@redhat.com>
4613
4614 PR c/25801
4615 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4616 Return size_one_node when the type is not complete.
4617 (pointer_diff): Remove comment.
4618 (build_unary_op): Improve error messages.
4619
19fc9faa
MP
46202014-05-02 Marek Polacek <polacek@redhat.com>
4621
4622 * c-typeck.c (c_finish_return): Separate warning_at calls.
4623
63bc4e87
MP
46242014-05-02 Marek Polacek <polacek@redhat.com>
4625
4626 * c-tree.h (error_init): Remove declaration.
4627 (pedwarn_init): Likewise.
4628 * c-typeck.c (error_init): Make static and move above.
4629 (pedwarn_init): Likewise.
4630 (warning_init): Move above.
4631 (maybe_warn_string_init): Likewise.
4632
4bd2511b
JL
46332014-05-01 Jeff Law <law@redhat.com>
4634
4635 Revert:
4636
4637 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4638 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4639 avoid goto.
4640
6a358dcb
MP
46412014-05-02 Marek Polacek <polacek@redhat.com>
4642
4643 PR c/60784
4644 * c-typeck.c (push_init_level): Set constructor_designated to
4645 p->designated for structures.
4646
ae5ebda4
MP
46472014-05-01 Marek Polacek <polacek@redhat.com>
4648
4649 PR c/60915
4650 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4651 function-definition has an attribute after the declarator.
4652
96b40f8d
MP
46532014-05-01 Marek Polacek <polacek@redhat.com>
4654
4655 PR c/60257
4656 * c-typeck.c (warning_init): Add location_t parameter. Call
4657 warning_at instead of warning.
4658 (push_init_level): Pass input_location to warning_init.
4659 (add_pending_init): Add location_t parameter. Pass loc to
4660 warning_init.
4661 (set_nonincremental_init): Pass input_location to add_pending_init.
4662 (set_nonincremental_init_from_string): Likewise.
4663 (output_init_element): Pass loc to warning_init and to
4664 add_pending_init.
4665
32e00768
MP
46662014-05-01 Marek Polacek <polacek@redhat.com>
4667
4668 PR c/43395
4669 * c-typeck.c (c_finish_return): Distinguish between label and variable
4670 when warning about returning local address.
4671
c9379ce2
MP
46722014-05-01 Marek Polacek <polacek@redhat.com>
4673
4674 PR c/29467
4675 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4676 in C89 mode.
4677
d00887e8
MP
46782014-05-01 Marek Polacek <polacek@redhat.com>
4679
4680 PR c/43245
4681 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4682 instead of 0 to WARN_FOR_QUALIFIERS.
4683
5436fa2e
MP
46842014-05-01 Marek Polacek <polacek@redhat.com>
4685
4686 PR c/56989
4687 * c-typeck.c (default_conversion): Use better location for
4688 error call.
4689
f8ed5150
MP
46902014-04-30 Marek Polacek <polacek@redhat.com>
4691
4692 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4693 also when SANITIZE_FLOAT_DIVIDE is on.
4694
8337d1db
MP
46952014-04-30 Marek Polacek <polacek@redhat.com>
4696
4697 PR c/60139
4698 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4699 and pedwarn_init. Use loc insted of input_location.
4700
c4bdc42f
MP
47012014-04-30 Marek Polacek <polacek@redhat.com>
4702
4703 PR c/60351
4704 * c-typeck.c (build_binary_op): Use location when warning about
4705 shift count.
4706
45484dcf
MP
47072014-04-25 Marek Polacek <polacek@redhat.com>
4708
4709 PR c/18079
4710 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4711 always_inline/noinline and hot/cold attributes.
4712
34cf811f
MP
47132014-04-25 Marek Polacek <polacek@redhat.com>
4714
4715 PR c/60114
4716 * c-parser.c (c_parser_initelt): Pass input_location to
4717 process_init_element.
4718 (c_parser_initval): Pass loc to process_init_element.
4719 * c-tree.h (process_init_element): Adjust declaration.
4720 * c-typeck.c (push_init_level): Pass input_location to
4721 process_init_element.
4722 (pop_init_level): Likewise.
4723 (set_designator): Likewise.
4724 (output_init_element): Add location_t parameter. Pass loc to
4725 digest_init.
4726 (output_pending_init_elements): Pass input_location to
4727 output_init_element.
4728 (process_init_element): Add location_t parameter. Pass loc to
4729 output_init_element.
4730
42056eac
JJ
47312014-04-24 Jakub Jelinek <jakub@redhat.com>
4732
4733 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4734 atomic-clause, allow comma in between atomic-clause and
4735 seq_cst.
4736
e162a134
JJ
47372014-04-22 Jakub Jelinek <jakub@redhat.com>
4738
4739 PR c/59073
4740 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4741 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4742
2f6babac
IZ
47432014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4744
4745 PR middle-end/60469
4746 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4747 create_tmp_var instead build_decl for creating temps.
4748 (build_array_notation_expr): Likewise.
4749 (fix_conditional_array_notations_1): Likewise.
4750 (fix_array_notation_expr): Likewise.
4751 (fix_array_notation_call_expr): Likewise.
4752
8edbfaa6
JJ
47532014-03-28 Jakub Jelinek <jakub@redhat.com>
4754
4755 PR c++/60689
4756 * c-tree.h (c_build_function_call_vec): New prototype.
4757 * c-typeck.c (build_function_call_vec): Don't call
4758 resolve_overloaded_builtin here.
4759 (c_build_function_call_vec): New wrapper function around
4760 build_function_call_vec. Call resolve_overloaded_builtin here.
4761 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4762 Call c_build_function_call_vec instead of build_function_call_vec.
4763 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4764 * c-decl.c (finish_decl): Likewise.
4765
7485aeea
MLI
47662014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4767
4768 PR c/55383
4769 * c-typeck.c: Use correct format string in cast-qual warning
4770
b17a8b07
TS
47712014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4772
4773 * c-decl.c (c_decl_attributes): Use
4774 lang_hooks.types.omp_mappable_type.
4775 * c-typeck.c (c_finish_omp_clauses): Likewise.
4776
3af9c5e9
MP
47772014-03-06 Marek Polacek <polacek@redhat.com>
4778
4779 PR c/60197
4780 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4781 of checking tree code.
4782
1c9f5f33
PK
47832014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4784
4785 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4786 (c_parser_parameter_declaration): Likewise.
4787
cc28fc7f
MP
47882014-02-19 Marek Polacek <polacek@redhat.com>
4789
4790 PR c/60195
4791 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4792 Call mark_exp_read on exp.value.
4793 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4794 TREE_ADDRESSABLE on old instead of val.
4795 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4796
b581c05c
PK
47972014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4798
4799 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4800 C_EXPR_APPEND by vec_safe_push.
4801 * c-tree.h (C_EXPR_APPEND): Remove.
4802
81e5eca8
MP
48032014-01-31 Marek Polacek <polacek@redhat.com>
4804
4805 PR c/59963
4806 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4807 build_function_call_vec.
4808 (build_function_call): Likewise.
4809 (build_atomic_assign): Likewise.
4810 (build_function_call_vec): Add arg_loc parameter. Use it.
4811 (convert_arguments): Likewise.
4812 (convert_for_assignment): Rename rhs_loc to expr_loc.
4813 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4814 (c_parser_objc_keywordexpr): Likewise.
4815 (c_parser_postfix_expression_after_primary): Call
4816 build_function_call_vec with expr_loc rather than op_loc.
4817 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4818 build_function_call_vec.
4819 (c_parser_expr_list): Add locations parameter. Fill it with locations
4820 of function arguments.
4821 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4822
68fca595
MP
48232014-01-30 Marek Polacek <polacek@redhat.com>
4824
4825 PR c/59940
4826 * c-typeck.c (build_function_call_vec): Use loc parameter.
4827 (convert_arguments): Add location parameter. Use it.
4828 (ep_convert_and_check): Likewise.
4829 (build_atomic_assign): Adjust convert_for_assignment call.
4830 (build_modify_expr): Likewise.
4831 (digest_init): Likewise.
4832 (c_finish_return): Likewise.
4833 (build_conditional_expr): Adjust ep_convert_and_check calls.
4834 (convert_for_assignment): Add rhs_loc parameter. Use it.
4835 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4836 calls.
4837
fa337f3a
RB
48382014-01-30 Richard Biener <rguenther@suse.de>
4839
4840 PR c/59905
4841 * c-typeck.c (build_function_call_vec): Do not replace calls
4842 to a function via an incompatible type with a runtime abort.
4843
b72271b9
BI
48442014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4845
4846 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4847 flag_enable_cilkplus with flag_cilkplus.
4848 (c_parser_direct_declarator_inner): Likewise.
4849 (c_parser_attribute_any_word): Likewise.
4850 (c_parser_attributes): Likewise.
4851 (c_parser_compound_statement): Likewise.
4852 (c_parser_statement_after_labels): Likewise.
4853 (c_parser_if_statement): Likewise.
4854 (c_parser_switch_statement): Likewise.
4855 (c_parser_do_statement): Likewise.
4856 (c_parser_for_statement): Likewise.
4857 (c_parser_unary_expression): Likewise.
4858 (c_parser_postfix_expression): Likewise.
4859 (c_parser_postfix_expression_after_primary): Likewise.
4860 (c_parser_postfix_expression_after_primary): Likewise.
4861 (c_parser_omp_clause_name): Likewise.
4862 (c_finish_omp_declare_simd): Likewise.
4863 (c_parser_cilk_verify_simd): Likewise.
4864 * c-typeck.c (build_array_ref): Likewise.
4865 (build_function_call_vec): Likewise.
4866 (convert_arguments): Likewise.
4867 (build_compound_expr): Likewise.
4868 (c_finish_return): Likewise.
4869 (c_finish_if_stmt): Likewise.
4870 (c_finish_loop): Likewise.
4871 (build_binary_op): Likewise.
4872
393e8e8b
MP
48732014-01-23 Marek Polacek <polacek@redhat.com>
4874
4875 PR c/59846
4876 * c-typeck.c (parser_build_binary_op): Use location instead of
4877 input_location.
4878 (build_binary_op): Pass location to shorten_compare.
4879
f04dda30
MP
48802014-01-23 Marek Polacek <polacek@redhat.com>
4881
4882 PR c/58346
4883 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4884 an empty aggregate.
4885
789eadcd
MP
48862014-01-23 Marek Polacek <polacek@redhat.com>
4887
4888 PR c/59871
4889 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4890 of a comma expression.
4891 (emit_side_effect_warnings): Likewise.
4892
40f14e9f
BI
48932014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4894
4895 PR c/59825
4896 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4897 function to use walk_tree and moved a lot of its functionality to
4898 expand_array_notations.
4899 (expand_array_notations): New function.
4900
74558dd9
BI
49012014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4902
4903 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4904 attribute an attribute without value.
4905
652fea39
JJ
49062014-01-23 Jakub Jelinek <jakub@redhat.com>
4907
4908 PR middle-end/58809
4909 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4910 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4911
f34f1c87
MP
49122014-01-22 Marek Polacek <polacek@redhat.com>
4913
4914 PR c/59891
4915 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4916 of remove_c_maybe_const_expr on op1 and op2.
4917
241f845a
JJ
49182014-01-15 Jakub Jelinek <jakub@redhat.com>
4919
4920 PR c/58943
4921 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4922 effects, preevaluate rhs using SAVE_EXPR first.
4923
9a74f20c
BI
49242014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4925
4926 PR c++/59631
4927 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4928 statements with if-elseif statements.
4929
96066ce1
MP
49302014-01-06 Marek Polacek <polacek@redhat.com>
4931
4932 PR c/57773
4933 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4934 defined bit-field types only in ISO C.
4935
23a5b65a
RS
49362014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4937
4938 Update copyright years
4939
f9030485
RS
49402014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4941
4942 * c-array-notation.c: Use the standard form for the copyright notice.
4943
41958c28
BI
49442013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4945
4946 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4947 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4948 field in parser is not empty. If not-empty, call the function
4949 c_parser_finish_omp_declare_simd.
4950 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4951 between SIMD-enabled functions and #pragma simd. Added new parameter.
4952 (c_parser_cilk_all_clauses): Modified the usage of the function
4953 c_parser_cilk_clause_vectorlength as mentioned above.
4954 (c_parser_cilk_simd_fn_vector_attrs): New function.
4955 (c_finish_cilk_simd_fn_tokens): Likewise.
4956 (is_cilkplus_vector_p): Likewise.
4957 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4958 "nomask," and "mask" strings in clause name.
4959 (c_parser_omp_all_clauses): Added 3 new case statements:
4960 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4961 PRAGMA_CILK_CLAUSE_NOMASK.
4962 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4963 check for vector attribute and if so call the function
4964 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4965 called the function c_finish_cilk_simd_fn_tokens.
4966 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4967 parser field is non-empty. If so, parse them as you would parse
4968 the omp declare simd pragma.
4969 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4970 Added a check when step is a parameter and flag it as error.
4971 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4972 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4973 pragma_omp_clause.
4974
cef0fd0e
TS
49752013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4976
4977 * c-parser.c (c_parser_omp_parallel): Fix description.
4978
12893402
BI
49792013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4980
4981 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4982 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4983 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4984 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4985
296674db
JM
49862013-12-04 Joseph Myers <joseph@codesourcery.com>
4987
4988 PR c/52023
4989 * c-parser.c (c_parser_alignas_specifier): Use
4990 c_sizeof_or_alignof_type instead of c_alignof.
4991 (c_parser_alignof_expression): Likewise, with min_alignof
4992 parameter depending on alignof spelling used.
4993
edd28054
MP
49942013-12-04 Marek Polacek <polacek@redhat.com>
4995
4996 PR c/54113
4997 * c-decl.c (start_function): Don't warn for missing prototype for
4998 inline functions.
4999
da0fc454
MP
50002013-12-03 Marek Polacek <polacek@redhat.com>
5001
5002 PR c/59351
5003 * c-decl.c (build_compound_literal): Allow compound literals with
5004 empty initial value.
5005
4c2ecab0
JM
50062013-12-02 Joseph Myers <joseph@codesourcery.com>
5007
5008 PR c/58235
5009 * c-typeck.c (build_modify_expr): Diagnose assignment to
5010 expression with array type.
5011
340baef7
JM
50122013-11-29 Joseph Myers <joseph@codesourcery.com>
5013
5014 PR c/42262
5015 * c-typeck.c (process_init_element): Do not treat a string as
5016 initializing a whole array when used with a designator for an
5017 individual element.
5018
6763b9f7
JM
50192013-11-29 Joseph Myers <joseph@codesourcery.com>
5020
5021 PR c/57574
5022 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5023 an inline function following a static declaration.
5024
e7bd1de1
JJ
50252013-11-28 Jakub Jelinek <jakub@redhat.com>
5026
5027 PR c/59310
5028 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5029 to p_name before calling c_parser_omp_teams instead of after.
5030 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5031 argument. Remove unused p_name variable.
5032
0136f8f0
AH
50332013-11-27 Aldy Hernandez <aldyh@redhat.com>
5034 Jakub Jelinek <jakub@redhat.com>
5035
5036 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5037 external_scope is NULL.
5038
241b71bb
TV
50392013-11-27 Tom de Vries <tom@codesourcery.com>
5040 Marc Glisse <marc.glisse@inria.fr>
5041
5042 PR c++/59032
5043 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5044
2fb9a547
AM
50452013-11-22 Andrew MacLeod <amacleod@redhat.com>
5046
5047 * c-typeck.c: Add required include files from gimple.h.
5048
8400e75e
DM
50492013-11-22 David Malcolm <dmalcolm@redhat.com>
5050
5051 * c-decl.c (define_label, shadow_tag_warned)
5052 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5053 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5054 (declspecs_add_type): Remove use of in_system_header macro.
5055 * c-parser.c (c_parser_unary_expression): Likewise.
5056 * c-typeck.c (store_init_value, process_init_element)
5057 (c_start_case): Likewise.
5058
5059 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5060 macro.
5061
5062 * c-parser.c (c_parser_set_source_position_from_token): Remove
5063 reference to in_system_header from comment.
5064
386b1f1f
RS
50652013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5066
5067 * c-decl.c (grokdeclarator): Update comment to refer to
5068 tree_to_[su]hwi rather than tree_low_cst.
5069
ae7e9ddd
RS
50702013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5071
5072 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5073 tree_to_uhwi throughout.
5074
9439e9a1
RS
50752013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5076
5077 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5078 throughout.
5079
9541ffee
RS
50802013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5081
5082 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5083 throughout.
5084
c02065fc
AH
50852013-11-15 Aldy Hernandez <aldyh@redhat.com>
5086
5087 * c-parser.c (c_parser_cilk_simd): New.
5088 (c_parser_cilk_verify_simd): New.
5089 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5090 (c_parser_omp_for_loop): Add case for NE_EXPR.
5091 Set c_break_label for CILK_SIMD.
5092 (c_parser_cilk_clause_vectorlength): New.
5093 (c_parser_cilk_clause_linear): New.
5094 (c_parser_cilk_clause_name): New.
5095 (c_parser_cilk_all_clauses): New.
5096 * c-typeck.c (build_unary_op): Pass location argument to
5097 readonly_error.
5098 (build_modify_expr): Same.
5099 (build_asm_expr): Same.
5100 (c_finish_bc_stmt): Error on break/continue in loops.
5101
18f429e2
AM
51022013-11-14 Andrew MacLeod <amacleod@redhat.com>
5103
5104 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5105
d8a2d370
DN
51062013-11-14 Diego Novillo <dnovillo@google.com>
5107
5108 * c-decl.c: Include print-tree.h.
5109 Include stor-layout.h.
5110 Include varasm.h.
5111 Include attribs.h.
5112 Include stringpool.h.
5113 * c-lang.c: Include fold-const.h.
5114 * c-parser.c: Include stringpool.h.
5115 Include attribs.h.
5116 Include stor-layout.h.
5117 Include varasm.h.
5118 Include trans-mem.h.
5119 * c-typeck.c: Include stor-layout.h.
5120 Include trans-mem.h.
5121 Include varasm.h.
5122 Include stmt.h.
5123
38b7bc7f
JM
51242013-11-13 Joseph Myers <joseph@codesourcery.com>
5125
5126 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5127 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5128 __auto_type.
5129 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5130 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5131 RID_AUTO_TYPE.
5132 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5133 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5134 (c_parser_declarator, c_parser_direct_declarator_inner)
5135 (c_parser_parameter_declaration, c_parser_type_name): All callers
5136 changed.
5137 (c_parser_declaration_or_fndef): Handle declarations with type
5138 determined from the initializer.
5139
45b0be94
AM
51402013-11-12 Andrew MacLeod <amacleod@redhat.com>
5141
18f429e2 5142 * c-typeck.c: Include gimplify.h.
45b0be94 5143
582d9b50
JM
51442013-11-12 Joseph Myers <joseph@codesourcery.com>
5145
5146 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5147 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5148 comment.
5149 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5150 or _Thread_local as appropriate in diagnostics.
5151 (build_null_declspecs): Initialize ret->thread_gnu_p.
5152 (declspecs_add_scspec): Handle either __thread or _Thread_local
5153 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5154 pedantic. Do not disallow _Thread_local extern and _Thread_local
5155 static.
5156
267bac10
JM
51572013-11-07 Joseph Myers <joseph@codesourcery.com>
5158 Andrew MacLeod <amacleod@redhat.com>
5159
5160 * c-aux-info.c (gen_type): Handle atomic qualifier.
5161 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5162 qualifiers when compating types.
5163 (shadow_tag_warned): Handle atomic_p in declspecs.
5164 (quals_from_declspecs): Likewise.
5165 (start_decl): Use c_type_promotes_to when promoting argument
5166 types.
5167 (grokdeclarator): Handle _Atomic.
5168 (get_parm_info): Diagnose any qualifier on "void" as only
5169 parameter.
5170 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5171 comparing types. Use c_type_promotes_to when promoting argument
5172 types.
5173 (finish_function): Use c_type_promotes_to when promoting argument
5174 types.
5175 (build_null_declspecs): Handle atomic_p in declspecs.
5176 (declspecs_add_qual): Handle RID_ATOMIC.
5177 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5178 (c_token_starts_declspecs): Handle RID_ATOMIC.
5179 (c_parser_declspecs): Handle atomic type specifiers and
5180 qualifiers.
5181 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5182 from types of expressions with atomic type.
5183 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5184 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5185 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5186 (c_parser_statement_after_labels, c_parser_switch_statement)
5187 (c_parser_for_statement, c_parser_expr_no_commas)
5188 (c_parser_conditional_expression, c_parser_binary_expression)
5189 (c_parser_cast_expression, c_parser_unary_expression)
5190 (c_parser_postfix_expression)
5191 (c_parser_postfix_expression_after_primary, c_parser_expression):
5192 Use convert_lvalue_to_rvalue.
5193 (c_parser_expression_conv, c_parser_expr_list): Document
5194 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5195 (c_parser_objc_synchronized_statement): Use
5196 convert_lvalue_to_rvalue.
5197 (c_parser_objc_selector): Handle RID_ATOMIC.
5198 (c_parser_objc_receiver, c_parser_array_notation): Use
5199 convert_lvalue_to_rvalue.
5200 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5201 _Atomic (type-name).
5202 (struct c_declspecs): Add atomic_p field.
5203 (convert_lvalue_to_rvalue): Declare.
5204 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5205 corresponding atomic types.
5206 (qualify_type): Don't add _Atomic qualifiers from second argument.
5207 (comp_target_types): Do not allow _Atomic mismatches.
5208 (type_lists_compatible_p): Do not remove atomic qualifiers when
5209 comparing types.
5210 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5211 (build_atomic_assign): New functions.
5212 (build_unary_op): Use build_atomic_assign for atomic increment and
5213 decrement.
5214 (build_conditional_expr): Do not treat _Atomic void as a qualified
5215 version of void.
5216 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5217 (find_anonymous_field_with_type, convert_to_anonymous_field)
5218 (convert_for_assignment): Do not remove atomic qualifiers when
5219 comparing types.
5220 (digest_init): Do not accept initialization of arrays of atomic
5221 elements by string constants.
5222 (build_asm_expr): Use convert_lvalue_to_rvalue.
5223 (build_binary_op): Do not treat _Atomic void as a qualified
5224 version of void.
5225
0c249d4b
DD
52262013-11-06 DJ Delorie <dj@redhat.com>
5227
5228 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5229 both explicit and builtin, print the location of the explicit one.
5230
6d7f7e0a
TB
52312013-11-05 Tobias Burnus <burnus@net-b.de>
5232
5233 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5234 c_parser_omp_distribute, c_parser_omp_teams,
5235 c_parser_omp_target, c_parser_omp_declare): Handle
5236 -fopenmp-simd.
5237
b906f4ca
MP
52382013-11-03 Marek Polacek <polacek@redhat.com>
5239
5240 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5241
ee1d5a02
JJ
52422013-11-01 Jakub Jelinek <jakub@redhat.com>
5243
5244 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5245 check_dup_generic at the end, unless remove is true.
5246 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5247 remove = true;.
5248 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5249
5a9785fb
JJ
52502013-10-31 Jakub Jelinek <jakub@redhat.com>
5251
5252 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5253 with decl that is not pointer nor array.
5254
939b37da
BI
52552013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5256
5257 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5258 a spawning function is found.
5259 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5260 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5261 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5262 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5263 case.
5264 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5265 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5266 expr.
5267 (c_finish_return): Added a check to reject _Cilk_spawn in return
5268 expression.
5269 (build_cilk_spawn): New function.
5270 (build_cilk_sync): Likewise.
5271 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5272
d4af74d4
TB
52732013-10-27 Tobias Burnus <burnus@net-b.de>
5274
5275 PR other/33426
5276 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5277 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5278 (c_parser_statement_after_labels): Update calls.
5279
d73749df 52802013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5281
5282 PR other/33426
5283 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5284 Handle PRAGMA_IVDEP.
5285 (c_parser_statement_after_labels): Update call.
5286
f28aa681
MP
52872013-10-24 Marek Polacek <polacek@redhat.com>
5288
5289 * c-parser.c (c_parser_struct_declaration): Add a comment.
5290 (c_parser_declarator): Don't allow _Alignas here.
5291
0645c1a2
AM
52922013-10-17 Andrew MacLeod <amacleod@redhat.com>
5293
5294 * c-parser.c: Include omp-low.h.
5295 * c-typeck.c: Likewise.
5296
568a31f2
MP
52972013-10-17 Marek Polacek <polacek@redhat.com>
5298
5299 PR c/58267
5300 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5301 Document syntax of the array-declarator.
5302 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5303 are not permitted.
5304 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5305 (c_parser_struct_declaration): Likewise.
5306 (c_parser_declarator): Likewise.
5307 (c_parser_direct_declarator_inner): Likewise.
5308 (c_parser_parameter_declaration): Likewise.
5309 (c_parser_type_name): Likewise.
5310
acf0174b
JJ
53112013-10-11 Jakub Jelinek <jakub@redhat.com>
5312
5313 * c-lang.h (current_omp_declare_target_attribute): New extern
5314 decl.
5315 * c-parser.c: Include c-lang.h.
5316 (struct c_parser): Change tokens to c_token *.
5317 Add tokens_buf field. Change tokens_avail type to unsigned int.
5318 (c_parser_consume_token): If parser->tokens isn't
5319 &parser->tokens_buf[0], increment parser->tokens.
5320 (c_parser_consume_pragma): Likewise.
5321 (enum pragma_context): Add pragma_struct and pragma_param.
5322 (c_parser_external_declaration): Adjust
5323 c_parser_declaration_or_fndef caller.
5324 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5325 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5326 Adjust recursive call.
5327 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5328 of pragma_external.
5329 (c_parser_parameter_declaration): Use pragma_param instead of
5330 pragma_external.
5331 (c_parser_compound_statement_nostart, c_parser_label,
5332 c_parser_for_statement): Adjust
5333 c_parser_declaration_or_fndef callers.
5334 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5335 it through to c_parser_conditional_expression.
5336 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5337 pass it through to c_parser_binary_expression. Adjust recursive
5338 call.
5339 (c_parser_binary_expression): Remove prec argument, add
5340 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5341 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5342 binop matches it, use build2 instead of parser_build_binary_op.
5343 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5344 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5345 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5346 Handle pragma_struct and pragma_param the same as pragma_external.
5347 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5348 (c_parser_omp_variable_list): Parse array sections for
5349 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5350 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5351 (c_parser_omp_clause_reduction): Handle user defined reductions.
5352 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5353 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5354 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5355 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5356 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5357 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5358 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5359 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5360 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5361 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5362 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5363 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5364 (c_parser_omp_for_loop): Add CODE argument, pass it through
5365 to c_finish_omp_for. Change last argument to cclauses,
5366 and adjust uses to grab parallel clauses from the array of all
5367 the split clauses. Adjust c_parser_binary_expression,
5368 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5369 (omp_split_clauses): New function.
5370 (c_parser_omp_simd): New function.
5371 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5372 Allow the function to be called also when parsing combined constructs,
5373 and call c_parser_omp_simd when parsing for simd.
5374 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5375 #pragma omp section, require exactly one structured-block instead of
5376 sequence of statements.
5377 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5378 Allow the function to be called also when parsing combined constructs.
5379 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5380 Allow the function to be called also when parsing combined
5381 constructs.
5382 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5383 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5384 c_parser_omp_teams, c_parser_omp_target_data,
5385 c_parser_omp_target_update, c_parser_omp_target,
5386 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5387 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5388 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5389 (c_parser_omp_construct): Add p_name and mask vars. Handle
5390 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5391 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5392 and c_parser_omp_sections callers.
5393 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5394 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5395 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5396 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5397 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5398 OMP_CLAUSE_DEPEND.
5399 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5400 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5401 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5402 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5403 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5404 * c-typeck.c: Include tree-inline.h.
5405 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5406 handle_omp_array_sections_1, handle_omp_array_sections,
5407 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5408 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5409 user defined reductions.
5410 (c_tree_equal): New function.
5411 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5412 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5413 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5414 c_check_omp_declare_reduction_r): New prototypes.
5415 * c-decl.c (current_omp_declare_target_attribute): New variable.
5416 (c_decl_attributes): New function.
5417 (start_decl, start_function): Use it instead of decl_attributes.
5418 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5419 c_omp_reduction_decl, c_omp_reduction_lookup,
5420 c_check_omp_declare_reduction_r): New functions.
5421
0a6c2227
TT
54222013-09-25 Tom Tromey <tromey@redhat.com>
5423
5424 * Make-lang.in (c/gccspec.o): Remove.
5425 (CFLAGS-c/gccspec.o): New variable.
5426 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5427 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5428 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5429
f3bc55f0
TT
54302013-09-25 Tom Tromey <tromey@redhat.com>
5431
5432 * Make-lang.in (c/gccspec.o): Don't use subshell.
5433
a24d975c
MP
54342013-09-18 Marek Polacek <polacek@redhat.com>
5435
5436 PR sanitize/58443
5437 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5438 Remove unnecessary check.
5439
ce6923c5
MP
54402013-09-18 Marek Polacek <polacek@redhat.com>
5441
5442 PR sanitizer/58411
5443 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5444 no_sanitize_undefined attribute.
5445
a1e51df9
KT
54462013-09-13 Kai Tietz <ktietz@redhat.com>
5447
5448 PR target/57848
5449 * c-decl.c (c_builtin_function_ext_scope): Remove
5450 wrong assumption that it is never called on prexisting
5451 symbol.
5452
0af94e6f
JR
54532013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5454
5455 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5456
20059c8b
GDR
54572013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5458
5459 * c-objc-common.c (c_tree_printer): Tidy.
5460
de5a5fa1
MP
54612013-08-30 Marek Polacek <polacek@redhat.com>
5462
5463 * c-typeck.c (build_binary_op): Add division by zero and shift
5464 instrumentation.
5465
2531a1d9 54662013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5467 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5468
6e2bcc98 5469 PR c/35649
2531a1d9
JR
5470 * c-typeck.c (c_common_type): Prefer double_type_node over
5471 other REAL_TYPE types with the same precision.
5472 (convert_arguments): Likewise.
5473
025311c4
GDR
54742013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5475
5476 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5477 (c_initialize_diagnostics): Call a destructor for the early printer.
5478
da6ca2b5
GDR
54792013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5480
5481 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5482 printer initialization.
5483
318cda85 54842013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5485
318cda85
BI
5486 PR c/57490
5487 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5488 check for truth values.
5489 (expand_array_notation_exprs): Added truth values case. Removed an
5490 unwanted else. Added for-loop to walk through subtrees in default
5491 case.
5492
b066401f
GDR
54932013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5494
5495 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5496
fb48aadc
JM
54972013-07-23 Joseph Myers <joseph@codesourcery.com>
5498
5499 * c-parser.c (struct c_generic_association): Fix typo.
5500
433cc7b0
TT
55012013-07-23 Tom Tromey <tromey@redhat.com>
5502 Joseph Myers <joseph@codesourcery.com>
5503
5504 * c-parser.c (struct c_generic_association): New.
5505 (c_generic_association_d): New typedef.
5506 (c_parser_generic_selection): New function.
5507 (c_parser_postfix_expression): Handle RID_GENERIC.
5508
26d40c3d
JM
55092013-07-13 Jason Merrill <jason@redhat.com>
5510
5511 PR c++/57793
5512 * c-decl.c (finish_struct): Check for too-large class.
5513
ecdbd01a 55142013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5515
5516 PR c/57821
5517 * c-typeck.c (set_init_index): When folding, check for index overflow.
5518
1141ed3f
BI
55192013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5520
5521 * c-parser.c (c_parser_array_notation): Removed rejection of array
5522 notations in an array of function pointers.
5523
713b46fa
BI
55242013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5525
5526 * c-array-notation.c (make_triplet_val_inv): New function.
5527 (create_cmp_incr): Likewise.
5528 (create_array_refs): Likewise.
5529 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5530 Also modularized common parts between functions and called the function.
5531 (build_array_notation_expr): Likewise.
5532 (fix_conditional_array_notations_1): Likewise.
5533 (fix_array_notation_expr): Likewise.
5534 (fix_array_notation_call_expr): Likewise.
5535
92f20202
MP
55362013-06-18 Marek Polacek <polacek@redhat.com>
5537
5538 PR c/57630
5539 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5540
73a23b06
BI
55412013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5542
5543 * c-array-notation.c (build_array_notation_expr): Reject array notation
5544 mismatch between LHS and RHS even inside a call_expr. Also, removed
5545 a couple while statements that were dead code.
5546
00b8517d
BI
55472013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5548
5549 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5550 excessive precision expressions in function parameters. Also removed
5551 couple unwanted while statements.
5552
1509bdda
BI
55532013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5554
5555 * c-array-notation.c (expand_array_notation_exprs): Added
5556 ARRAY_NOTATION_REF case.
5557
d60f1706
BI
55582013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5559
5560 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5561 function to c-family/array-notation-common.c.
5562 (is_cilkplus_reduce_builtin): Likewise.
5563 (find_rank): Likewise.
5564 (extract_array_notation_exprs): Likewise.
5565 (replace_array_notations): Likewise.
5566 (find_inv_trees): Likewise.
5567 (replace_inv_trees): Likewise.
5568 (contains_array_notation_expr): Likewise.
5569 (find_correct_array_notation_type): Likewise.
5570 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5571 (struct inv_list): Moved this to c-family/array-notation-common.c.
5572 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5573
6d6efbb3
BI
55742013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5575
5576 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5577 reduction functions outside the for-loop. Added a check if the fundecl
5578 is non-NULL. Finally, removed an unwanted if-statement, and made the
5579 body unconditional.
5580
25c22937
BI
55812013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5582
5583 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5584 condition of the if-statement matches the rank of else-block and then-
5585 block when array notations are used.
5586 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5587 expression after the entire function body is parsed.
5588 (c_parser_expr_no_commas): Delayed creating array notation expressions
5589 to the end of function parsing.
5590 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5591 whole if-statement instead of just the condition.
5592 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5593
edd25645
BI
55942013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5595
5596 PR c/57474
5597 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5598 array to NULL_TREE if they are unused. Also added a check for the
5599 field to be NULL before its fields are used in future.
5600
065ce7f1
RO
56012013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5602
5603 PR bootstrap/57450
5604 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5605 (build_array_notation_expr): Likewise.
5606
36536d79
BI
56072013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5608
5609 * c-typeck.c (build_array_ref): Added a check to see if array's
5610 index is greater than one. If true, then emit an error.
5611 (build_function_call_vec): Exclude error reporting and checking
5612 for builtin array-notation functions.
5613 (convert_arguments): Likewise.
5614 (c_finish_return): Added a check for array notations as a return
5615 expression. If true, then emit an error.
5616 (c_finish_loop): Added a check for array notations in a loop
5617 condition. If true then emit an error.
5618 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5619 (build_binary_op): Added a check for array notation expr inside
5620 op1 and op0. If present, we call another function to find correct
5621 type.
5622 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5623 * c-parser.c (c_parser_compound_statement): Check if array
5624 notation code is used in tree, if so, then transform them into
5625 appropriate C code.
5626 (c_parser_expr_no_commas): Check if array notation is used in LHS
5627 or RHS, if so, then build array notation expression instead of
5628 regular modify.
5629 (c_parser_postfix_expression_after_primary): Added a check for
5630 colon(s) after square braces, if so then handle it like an array
5631 notation. Also, break up array notations in unary op if found.
5632 (c_parser_direct_declarator_inner): Added a check for array
5633 notation.
5634 (c_parser_compound_statement): Added a check for array notation in
5635 a stmt. If one is present, then expand array notation expr.
5636 (c_parser_if_statement): Likewise.
5637 (c_parser_switch_statement): Added a check for array notations in
5638 a switch statement's condition. If true, then output an error.
5639 (c_parser_while_statement): Similarly, but for a while.
5640 (c_parser_do_statement): Similarly, but for a do-while.
5641 (c_parser_for_statement): Similarly, but for a for-loop.
5642 (c_parser_unary_expression): Check if array notation is used in a
5643 pre-increment or pre-decrement expression. If true, then expand
5644 them.
5645 (c_parser_array_notation): New function.
5646 * c-array-notation.c: New file.
5647 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5648
cd192ccc
MS
56492013-05-23 Mike Stump <mikestump@comcast.net>
5650
5651 * c-typeck.c (convert_for_assignment): Handle references to memory
5652 spaces better.
5653
427b248d
JM
56542013-05-16 Jason Merrill <jason@redhat.com>
5655
5656 * Make-lang.in (cc1$(exeext)): Use link mutex.
5657
44d90fe1
PC
56582013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5659
5660 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5661 to simply use OPT_Wpointer_arith.
5662 (build_unary_op): Likewise.
5663
4e7d7b3d
JJ
56642013-04-03 Jakub Jelinek <jakub@redhat.com>
5665
5666 PR c/19449
5667 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5668 argument. If set, or it temporarily for parsing of the first
5669 argument into force_folding_builtin_constant_p.
5670 (c_parser_postfix_expression): Adjust callers.
5671
839b422f
RB
56722013-03-21 Richard Biener <rguenther@suse.de>
5673
5674 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5675 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5676
2ee028f1
MP
56772013-02-12 Marek Polacek <polacek@redhat.com>
5678
5679 PR c/44938
5680 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5681 origtypes to NULL.
5682
8824edff
JJ
56832013-01-24 Jakub Jelinek <jakub@redhat.com>
5684
5685 PR c/56078
5686 * c-typeck.c (set_nonincremental_init_from_string): If
5687 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5688 returned false.
5689 (process_init_element): Likewise.
5690
eadd3d0d
JJ
56912012-12-20 Jakub Jelinek <jakub@redhat.com>
5692
5693 PR c++/55619
5694 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5695 argument, don't call default_function_array_conversion
5696 nor c_fully_fold here.
5697 (c_parser_asm_statement): Adjust callers.
5698 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5699 and outputs here, and call default_function_array_conversion
5700 on inputs that don't need to be addressable.
5701
f8a93a2e
JJ
57022012-12-18 Jakub Jelinek <jakub@redhat.com>
5703
5704 PR c/39464
5705 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5706 warning require that both c_common_unsigned_type as well as
5707 c_common_signed_type is the same for both mvl and mvr types.
5708
9771b263
DN
57092012-11-16 Diego Novillo <dnovillo@google.com>
5710
5711 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5712
5713 * c-common.c: Use new vec API in vec.h.
5714 * c-common.h: Likewise.
5715 * c-gimplify.c: Likewise.
5716 * c-pragma.c: Likewise.
5717 * c-pretty-print.c: Likewise.
5718 * c-pretty-print.h: Likewise.
5719 * c-semantics.c: Likewise.
5720 * c-decl.c: Likewise.
5721 * c-parser.c: Likewise.
5722 * c-tree.h: Likewise.
5723 * c-typeck.c: Likewise.
5724
880661a4
JW
57252012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5726
5727 PR c++/54930
5728 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5729
077d1abe
MLI
57302012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5731
5732 PR c/53066
5733 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5734 shadows a function, unless the variable is a function or a
5735 pointer-to-function.
5736
3a785c97
JJ
57372012-10-12 Jakub Jelinek <jakub@redhat.com>
5738
5739 PR c/54381
5740 * c-parser.c (struct c_tree_loc_pair): Removed.
5741 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5742 add location_t * and tree * arguments, fill in array of 3
5743 sizeof_arg trees and corresponding locs.
5744 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5745 c_parser_expr_list callers.
5746 (c_parser_postfix_expression_after_primary): Likewise. Pass
5747 array of 3 sizeof_arg trees and locs (corresponding to first
5748 3 arguments) to sizeof_pointer_memaccess_warning.
5749
703c8606
LC
57502012-10-09 Lawrence Crowl <crowl@google.com>
5751
5752 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5753 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5754 hash table.
5755
5d9de0d0
PC
57562012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5757
5758 PR c++/54194
5759 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5760 call.
5761
a212e43f
MG
57622012-10-09 Marc Glisse <marc.glisse@inria.fr>
5763
5764 PR c++/54427
5765 * c-typeck.c: Include c-common.h.
5766 (enum stv_conv): Moved to c-common.h.
5767 (scalar_to_vector): Moved to c-common.c.
5768 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5769 * Make-lang.in: c-typeck.c depends on c-common.h.
5770
3b78de56
AC
57712012-10-04 Arnaud Charlet <charlet@adacore.com>
5772
5773 * c-decl.c (c_write_global_declarations): Fix handling of
5774 -fdump-ada-spec*.
5775
78c60e3d
SS
57762012-09-30 Sharad Singhai <singhai@google.com>
5777
5778 * c-decl.c (c_write_global_declarations): Use a different method
5779 to determine if the dump has ben initialized.
5780
9f33203d
JM
57812012-09-14 Joseph Myers <joseph@codesourcery.com>
5782
5783 PR c/54552
5784 * c-typeck.c (c_cast_expr): When casting to a type requiring
5785 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5786 c_fully_fold first.
5787
a27d595d
JM
57882012-09-14 Joseph Myers <joseph@codesourcery.com>
5789
5790 PR c/54103
5791 * c-typeck.c (build_unary_op): Pass original argument of
5792 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5793 any C_MAYBE_CONST_EXPR, if it has integer operands.
5794 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5795 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5796 to c_objc_common_truthvalue_conversion, then remove any
5797 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5798 c_objc_common_truthvalue_conversion not
5799 c_common_truthvalue_conversion.
5800 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5801 call note_integer_operands for arguments with integer operands
5802 that are not integer constants.
5803
9feb29df
JJ
58042012-09-13 Jakub Jelinek <jakub@redhat.com>
5805
5806 PR c/54559
5807 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5808 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5809
d409320c
JJ
58102012-08-31 Jakub Jelinek <jakub@redhat.com>
5811
5812 PR c/54428
5813 * c-convert.c (convert): Don't call fold_convert_loc if
5814 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5815 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5816 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5817
6265d07c
JJ
58182012-08-24 Jakub Jelinek <jakub@redhat.com>
5819
5820 PR c/54355
5821 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5822 for nested and empty_ok arguments in the call to
5823 c_parser_declaration_or_fndef.
5824
1a4049e7
JJ
58252012-08-17 Jakub Jelinek <jakub@redhat.com>
5826
5827 * c-tree.h (c_last_sizeof_arg): Declare.
5828 * c-parser.c (struct c_tree_loc_pair): New type.
5829 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5830 non-NULL.
5831 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5832 (c_parser_postfix_expression_after_primary): Likewise. Call
5833 sizeof_pointer_memaccess_warning if needed.
5834 (sizeof_ptr_memacc_comptypes): New function.
5835 * c-typeck.c (c_last_sizeof_arg): New global variable.
5836 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5837
0229aee9
UB
58382012-07-24 Uros Bizjak <ubizjak@gmail.com>
5839
5840 * c-lang.h (lang_decl): Add variable_size GTY option.
5841
7ee2468b
SB
58422012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5843
5844 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5845 * Make-lang.in: Fix dependencies.
5846
d4a10d0a
SB
58472012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5848
5849 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5850 and add language Makefile hooks.
5851 * config-lang.in: New file.
5852 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5853 add the required "normal" config-lang.in rules.
5854 * c-lang.h: Moved from gcc/ to here.
5855 * c-tree.h: Likewise.
5856 * c-objc-common.c: Likewise.
5857 * c-objc-common.h: Likewise.
5858 * c-typeck.c: Likewise.
5859 * c-convert.c: Likewise.
5860 * c-lang.c: Likewise.
5861 * c-aux-info.c: Likewise.
5862 * c-errors.c: Likewise.
5863 * gccspec.c: Likewise.
5864 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5865 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5866\f
85ec4feb 5867Copyright (C) 2012-2018 Free Software Foundation, Inc.
d4a10d0a
SB
5868
5869Copying and distribution of this file, with or without modification,
5870are permitted in any medium without royalty provided the copyright
5871notice and this notice are preserved.