]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
ieee_arithmetic.F90: Re-organize file to eliminate #ifdef ...
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
1edf8866
SB
12018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2
3 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
4 a more specific error message (instead of just falling through).
5
db4fd626
SB
62018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
7
8 * c-parser.c (c_parser_asm_statement): Keep track of the location each
9 asm qualifier is first seen; use that to give nicer "duplicate asm
10 qualifier" messages. Delete 'quals" variable, instead pass the
11 "is_volatile_ flag to build_asm_stmt directly.
12 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
13 * c-typeck.c (build_asm_stmt): Ditto; adjust.
14
9c9cfcbb
SB
152018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
16
17 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
18 "done" boolean variable.
19
a14feb3c
DM
202018-12-19 David Malcolm <dmalcolm@redhat.com>
21
22 PR c++/87504
23 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
24 Move from here to gcc-rich-location.h and gcc-rich-location.c.
25 (build_binary_op): Use struct op_location_t and
26 class binary_op_rich_location.
27
6d939173
JJ
282018-12-11 Jakub Jelinek <jakub@redhat.com>
29
30 PR sanitizer/88426
31 * c-convert.c (convert): Call c_fully_fold before calling
32 ubsan_instrument_float_cast.
33
b7055028
SB
342018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
35
36 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
37 setting "quals".
38
5b76e75f
SB
392018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
40
41 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
42 after asm. Pass a flag for it to build_asm_expr.
43 * c-tree.h (build_asm_expr): Update declaration.
44 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
45 set ASM_INLINE_P.
46
30bd42b9
SB
472018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
48
49 PR inline-asm/55681
50 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
51 combination of volatile and goto, in any order, without repetitions.
52
9df6c0e4
JB
532018-12-04 James Norris <jnorris@codesourcery.com>
54 Cesar Philippidis <cesar@codesourcery.com>
55 Julian Brown <julian@codesourcery.com>
56
57 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
58 code.
59
f44697b7
RB
602018-11-30 Richard Biener <rguenther@suse.de>
61
62 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
63 _Literal (type) { ... } as empty aggregate or vector constructor.
64
550dfbdc
MS
652018-11-29 Martin Sebor <msebor@redhat.com>
66
67 PR c/88091
68 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
69 (convert_arguments): Add comments. Pass additional argument to
70 the function above.
71
673670da
MS
722018-11-29 Martin Sebor <msebor@redhat.com>
73
74 PR c/88172
75 PR testsuite/88208
76 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
77
db1d09b0
MS
782018-11-23 Martin Sebor <msebor@redhat.com>
79
80 PR testsuite/88098
81 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
82 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
83
98f08eb8
MS
842018-11-20 Martin Sebor <msebor@redhat.com>
85
86 * c-parser.c (c_parser_has_attribute_expression): New function.
87 (c_parser_attribute): New function.
88 (c_parser_attributes): Move code into c_parser_attribute.
89 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
90
cd5da983
MS
912018-11-15 Martin Sebor <msebor@redhat.com>
92
93 PR c/83656
94 * c-decl.c (header_for_builtin_fn): Declare.
95 (diagnose_mismatched_decls): Diagnose declarations of built-in
96 functions without a prototype.
97 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
98 (convert_argument): Same.
99 (convert_arguments): Factor code out into convert_argument.
100 Detect mismatches between built-in formal arguments in calls
101 to built-in without prototype.
102 (build_conditional_expr): Same.
103 (type_or_builtin_type): New function.
104 (convert_for_assignment): Add argument. Conditionally issue
105 warnings instead of errors for mismatches.
106
620e594b
DM
1072018-11-13 David Malcolm <dmalcolm@redhat.com>
108
109 * c-decl.c: Replace "source_location" with "location_t".
110 * c-tree.h: Likewise.
111 * c-typeck.c: Likewise.
112 * gimple-parser.c: Likewise.
113
3179ebae
JJ
1142018-11-09 Jakub Jelinek <jakub@redhat.com>
115
81a227c6
JJ
116 * c-parser.c (c_parser_omp_clause_final): Use
117 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
118 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
119 parsing instead of c_parser_paren_condition.
120 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
121 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
122 c_fully_fold instead of c_parser_condition.
123 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
124 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
125 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
126 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
127 c_parser_expr_no_commas instead of c_parser_expression.
128
98c91c56
JJ
129 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
130 reduction clause with inscan modifier.
131
3179ebae
JJ
132 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
133 clauses other than atomic_default_mem_order.
134
28567c40
JJ
1352018-11-08 Jakub Jelinek <jakub@redhat.com>
136
137 * c-parser.c: Include memmode.h.
138 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
139 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
140 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
141 task_reduction clauses.
142 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
143 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
144 section, or lvalue assignment expression.
145 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
146 (c_parser_omp_clause_lastprivate): Parse optional
147 conditional: modifier.
148 (c_parser_omp_clause_hint): Require constant integer expression rather
149 than just integer expression.
150 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
151 clause.
152 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
153 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
154 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
155 functions.
156 (c_parser_omp_clause_depend): Parse iterator modifier and handle
157 iterators. Parse mutexinoutset and depobj kinds.
158 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
159 callers.
160 (c_parser_omp_all_clauses): Likewise. Handle
161 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
162 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
163 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
164 default memory order from requires directive if any. Adjust
165 c_finish_omp_atomic caller.
166 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
167 (c_parser_omp_flush): Parse flush with memory-order-clause.
168 (c_parser_omp_for_loop): Allow NE_EXPR even in
169 OpenMP loops, adjust c_finish_omp_for caller.
170 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
171 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
172 Allow to be called while parsing combined parallel master.
173 Parse combined master taskloop{, simd}.
174 (c_parser_omp_parallel): Parse combined
175 parallel master{, taskloop{, simd}} constructs.
176 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
177 (OMP_TASKGROUP_CLAUSE_MASK): Define.
178 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
179 (OMP_TASKWAIT_CLAUSE_MASK): Define.
180 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
181 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
182 around teams body. Use SET_EXPR_LOCATION.
183 (c_parser_omp_target_data): Allow target data
184 with only use_device_ptr clauses.
185 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
186 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
187 (c_parser_omp_requires): New function.
188 (c_finish_taskloop_clauses): New function.
189 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
190 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
191 declaration. Disallow in_reduction clause when combined with parallel
192 master.
193 (c_parser_omp_construct): Adjust c_parser_omp_master and
194 c_parser_omp_taskgroup callers.
195 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
196 other than cancel.
197 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
198 like OMP_CLAUSE_REDUCTION.
199 (handle_omp_array_sections): Likewise. Call save_expr on array
200 reductions before calling build_index_type. Handle depend clauses
201 with iterators.
202 (struct c_find_omp_var_s): New type.
203 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
204 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
205 with static, runtime or auto schedule kinds. Call save_expr for whole
206 array reduction sizes. Diagnose reductions with zero sized elements
207 or variable length structures. Diagnose nogroup clause used with
208 reduction clause(s). Handle depend clause with
209 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
210 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
211 some different type for other kinds. Use build_unary_op with
212 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
213 Handle depend clauses with iterators. Remove no longer needed special
214 case that predetermined const qualified vars may be specified in
215 firstprivate clause. Complain if const qualified vars are mentioned
216 in data-sharing clauses other than firstprivate or shared. Use
217 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
218 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
219 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
220 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
221
7e2de6df
DM
2222018-10-29 David Malcolm <dmalcolm@redhat.com>
223
224 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
225 logic for change to name_hint::operator bool.
226 (undeclared_variable): Likewise.
227 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
228 (c_parser_parameter_declaration): Likewise.
229
9f936c86
JM
2302018-10-17 Joseph Myers <joseph@codesourcery.com>
231
232 * c-errors.c (pedwarn_c11): New function.
233 * c-parser.c (disable_extension_diagnostics): Save
234 warn_c11_c2x_compat and set it to 0.
235 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
236 (c_parser_static_assert_declaration_no_semi): Handle
237 _Static_assert without string constant.
238 * c-tree.h (pedwarn_c11): New prototype.
239
033eb567
DM
2402018-10-17 David Malcolm <dmalcolm@redhat.com>
241
242 * Make-lang.in (selftest-c): New.
243 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
244 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
245 from gcc/Makefile.in.
246
0edf3afe
RB
2472018-10-02 Richard Biener <rguenther@suse.de>
248
249 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
250
8313a764
JM
2512018-09-26 Joseph Myers <joseph@codesourcery.com>
252
253 PR c/87390
254 * c-typeck.c (build_binary_op): Use excess precision for
255 comparisons of integers and floating-point for C11 and later.
256
ce6f0888
MJ
2572018-09-26 Martin Jambor <mjambor@suse.cz>
258
259 PR c/87347
260 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
261 comment.
262
9c4a4b3c
DM
2632018-09-17 David Malcolm <dmalcolm@redhat.com>
264
265 * c-objc-common.c (range_label_for_type_mismatch::get_text):
266 Update for new param.
267 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
268 Likewise.
269
80c6d1f4
MJ
2702018-09-17 Martin Jambor <mjambor@suse.cz>
271
272 PR c/63886
273 * c-parser.c: (warn_for_abs): New function.
274 (c_parser_postfix_expression_after_primary): Call it.
275
4a426e36
BE
2762018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
277
278 * c-typeck.c (digest_init): Shorten overlength strings.
279
6d900107
BE
2802018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
281
282 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
283
b5764229
BE
2842018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
285
286 * c-decl.c (finish_decl): Call braced_list_to_string here ...
287 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
288
22eea6b2
AM
2892018-08-30 Alexander Monakov <amonakov@ispras.ru>
290
291 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
292 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
293
85204e23
DM
2942018-08-27 David Malcolm <dmalcolm@redhat.com>
295
296 PR 87091
297 * c-decl.c (implicitly_declare): Update call to
298 maybe_add_include_fixit to suggest overriding the location, as it
299 is for a note.
300 * c-objc-common.c (c_tree_printer): Update for conversion of
301 show_caret_p to a tri-state.
302
3d78e008
ML
3032018-08-27 Martin Liska <mliska@suse.cz>
304
305 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
306 fndecl_built_in_p and remove check for FUNCTION_DECL if
307 possible.
3d78e008
ML
308 (diagnose_mismatched_decls): Likewise.
309 (merge_decls): Likewise.
310 (warn_if_shadowing): Likewise.
311 (pushdecl): Likewise.
312 (implicitly_declare): Likewise.
313 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
314 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
315 * c-typeck.c (build_function_call_vec): Likewise.
316 (convert_arguments): Likewise.
317
097f82ec
DM
3182018-08-20 David Malcolm <dmalcolm@redhat.com>
319
320 PR other/84889
321 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
322 (diagnose_mismatched_decls): Likewise, in various places.
323 (warn_if_shadowing): Likewise.
324 (implicit_decl_warning): Likewise.
325 (implicitly_declare): Likewise.
326 (undeclared_variable): Likewise.
327 (declare_label): Likewise.
328 (grokdeclarator): Likewise.
329 (start_function): Likewise.
330 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
331 (c_parser_parameter_declaration): Likewise.
332 (c_parser_binary_expression): Likewise.
333 * c-typeck.c (c_expr_sizeof_expr): Likewise.
334 (parser_build_binary_op): Likewise.
335 (build_unary_op): Likewise.
336 (error_init): Likewise.
337 (pedwarn_init): Likewise.
338 (warning_init): Likewise.
339 (convert_for_assignment): Likewise.
340
96e6ae57
DM
3412018-08-15 David Malcolm <dmalcolm@redhat.com>
342
343 * c-objc-common.c: Include "gcc-rich-location.h".
344 (c_tree_printer): Move implemenation of '%T' to...
345 (print_type): ...this new function.
346 (range_label_for_type_mismatch::get_text): New function.
347 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
348 range for the various ic_argpass cases.
349 (class maybe_range_label_for_tree_type_mismatch): New class.
350 (build_binary_op): Use it when calling binary_op_error.
351
0cd020ae
PK
3522018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
353
354 * c-decl.c (start_decl): Do not warn if variables is named as main
355 and is a local variable.
356
72733314
IS
3572018-08-15 Iain Sandoe <iain@sandoe.co.uk>
358
359 PR c/19315
360 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
361 objects of unknown size.
362
23aa9f7c
MS
3632018-08-13 Martin Sebor <msebor@redhat.com>
364
365 PR tree-optimization/71625
366 * c-parser.c (c_parser_declaration_or_fndef): Call
367 braced_list_to_string.
368
e5e7e50d
BH
3692018-08-03 Bogdan Harjoc <harjoc@gmail.com>
370
371 PR c/86690
372 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
373 errors.
374
8a45b051
MS
3752018-08-01 Martin Sebor <msebor@redhat.com>
376
377 PR tree-optimization/86650
378 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
379 and TREE_BLOCK (t) from within percent_K_format to this callsite.
380
5922dcb5
JJ
3812018-08-01 Jakub Jelinek <jakub@redhat.com>
382
383 PR c/85704
384 * c-typeck.c (init_field_decl_cmp): New function.
385 (output_pending_init_elements): Use it for field comparisons
386 instead of pure bit_position comparisons.
387
9b452033
JJ
3882018-07-12 Jakub Jelinek <jakub@redhat.com>
389
390 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
391 type here, instead add "omp declare target implicit" attribute.
392 (finish_decl): Diagnose vars without mappable type here.
393
829c6349
CLT
3942018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
395 Thomas Schwinge <thomas@codesourcery.com>
396 Cesar Philippidis <cesar@codesourcery.com>
397
398 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
399 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
400 to their non-present_or_* counterparts. Make 'self' an alias to
401 PRAGMA_OACC_CLAUSE_HOST.
402 (c_parser_oacc_data_clause): Update GOMP mappings for
403 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
404 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
405 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
406 Remove support for present_or_* clauses.
407 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
408 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
409 (OACC_DECLARE_CLAUSE_MASK): Likewise.
410 (OACC_DATA_CLAUSE_MASK): Likewise.
411 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
412 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
413 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
414 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
415 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
416
e197e64e
KV
4172018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
418
419 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
420 * gimple-parser.c (c_parser_gimple_statement): Likewise.
421 (c_parser_gimple_unary_expression): Likewise.
422
487f2f61
JJ
4232018-06-15 Jakub Jelinek <jakub@redhat.com>
424
425 PR c/86093
426 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
427 before doing POINTER_DIFF_EXPR.
428
e4d44a37
MP
4292018-06-07 Marek Polacek <polacek@redhat.com>
430
431 PR c/85318
432 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
433 for loop initial declarations.
434
b67b9225
DP
4352018-05-30 David Pagan <dave.pagan@oracle.com>
436
437 PR c/55976
438 * c-decl.c (grokdeclarator): Update check for return type warnings.
439 (start_function): Likewise.
440 (finish_function): Likewise.
441 * c-typeck.c (c_finish_return): Update check for return type warnings.
442 Pass OPT_Wreturn_type to pedwarn when appropriate.
443
c566cc9f
RS
4442018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
445
446 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
447 __FMA_EXPR handlng.
448
e4f81565
RS
4492018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
450
451 * gimple-parser.c: Include internal-fn.h.
452 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
453 (c_parser_gimple_call_internal): New function.
454 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
455 Fix typos in comment.
456
79e7b1fe
JJ
4572018-05-10 Jakub Jelinek <jakub@redhat.com>
458
459 PR c++/85662
460 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
461 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
462 fold_convert_loc.
463 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
464 fold_offsetof_1, pass argtype as TYPE to it and drop the
465 fold_convert_loc.
466
f7584c81
DP
4672018-05-02 David Pagan <dave.pagan@oracle.com>
468
469 PR c/30552
470 * c-decl.c (old_style_parameter_scope): New function.
471 * c-parser.c (c_parser_postfix_expression): Check for statement
472 expressions in old-style function parameter list declarations.
473 * c-parser.h (old_style_parameter_scope): New extern declaration.
474
b33a0cb3
JJ
4752018-04-25 Jakub Jelinek <jakub@redhat.com>
476
477 PR sanitizer/84307
478 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
479 it is not TREE_STATIC.
480 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
481 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
482 its COMPOUND_LITERAL_EXPR_DECL.
483
c5c5822a
JM
4842018-03-21 Joseph Myers <joseph@codesourcery.com>
485
486 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
487 where all functions return the same _FloatN or _FloatNx type,
488 treat integer types as _Float64 instead of double.
489
aa1c9429
JJ
4902018-03-21 Jakub Jelinek <jakub@redhat.com>
491
492 PR c/84999
493 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
494 building vector comparison, diagnose it and return error_mark_node.
495
9bb45a95
JJ
4962018-03-15 Jakub Jelinek <jakub@redhat.com>
497
498 PR c/84853
499 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
500 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
501 INTEGER_TYPE element type.
502
ada6bad9
DP
5032018-03-13 David Pagan <dave.pagan@oracle.com>
504
505 PR c/46921
506 * c-typeck.c (output_init_element): Ensure field initializer
507 expression is always evaluated if there are side effects.
508
849bbdb9
JJ
5092018-03-06 Jakub Jelinek <jakub@redhat.com>
510
511 PR c/84721
512 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
513 !building_stmt_list_p ().
514
d74641bd
RS
5152018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
516
517 PR c/84305
518 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
519 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
520 and include the BIND_EXPR in the list of things that need to be
521 pre-evaluated.
522
0444aa9c
NS
5232018-02-09 Nathan Sidwell <nathan@acm.org>
524
525 PR c/84293
526 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
527 to strict_aliasing_warning.
528
7c30b12a
PC
5292018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
530
531 * c-typeck.c (really_start_incremental_init, push_init_level,
532 set_nonincremental_init, output_init_element, process_init_element):
533 Use DECL_UNNAMED_BIT_FIELD.
534
2be4dfcb
MP
5352018-01-31 Marek Polacek <polacek@redhat.com>
536
537 PR c/81779
538 * c-parser.c (c_parser_compound_statement_nostart): Call
539 expansion_point_location_if_in_system_header.
540
bb9869d5
DM
5412018-01-17 David Malcolm <dmalcolm@redhat.com>
542
543 PR c++/83814
544 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
545 the C part.
546
b4923738
JJ
5472018-01-13 Jakub Jelinek <jakub@redhat.com>
548
549 PR c/83801
550 * c-tree.h (decl_constant_value_1): Add a bool argument.
551 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
552 returning a CONSTRUCTOR if it is true. Use error_operand_p.
553 (decl_constant_value): Adjust caller.
554 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
555 decl_constant_value_1 as IN_INIT. Otherwise, punt if
556 decl_constant_value returns initializer that has BLKmode or
557 array type.
558 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
559
928686b1
RS
5602018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
561 Alan Hayward <alan.hayward@arm.com>
562 David Sherwood <david.sherwood@arm.com>
563
564 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
565 TYPE_VECTOR_SUBPARTS.
566
85ec4feb
JJ
5672018-01-03 Jakub Jelinek <jakub@redhat.com>
568
569 Update copyright years.
570
913884f7
JJ
5712018-01-01 Jakub Jelinek <jakub@redhat.com>
572
573 PR c/83595
574 * c-parser.c (c_parser_braced_init, c_parser_initelt,
575 c_parser_conditional_expression, c_parser_cast_expression,
576 c_parser_sizeof_expression, c_parser_alignof_expression,
577 c_parser_postfix_expression, c_parser_omp_declare_reduction,
578 c_parser_transaction_expression): Use set_error () method instead
579 of setting value member to error_mark_node.
580
c6cfa2bf
MM
5812017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
582
583 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
584 and _Float<N>X built-in functions.
585
11d29d63
JJ
5862017-12-22 Jakub Jelinek <jakub@redhat.com>
587
14ec014e
JJ
588 PR debug/83550
589 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
590 TYPE_STUB_DECL and call rest_of_type_compilation before processing
591 incomplete vars rather than after it.
592
11d29d63
JJ
593 PR debug/83547
594 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
595 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
596 and consider empty ones if there are no other stmts. For
597 -Wunused-value walk all statements before the one only followed by
598 DEBUG_BEGIN_STMTs.
599
170a8bd6 6002017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 601 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
602
603 * c-parser.c (c_parser_while_statement): Add unroll parameter and
604 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
605 (c_parser_do_statement): Likewise.
606 (c_parser_for_statement): Likewise.
607 (c_parser_statement_after_labels): Adjust calls to above.
608 (c_parse_pragma_ivdep): New static function.
609 (c_parser_pragma_unroll): Likewise.
610 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
611 <PRAGMA_UNROLL>: New case.
612
01512446
JJ
6132017-12-19 Jakub Jelinek <jakub@redhat.com>
614
615 * c-typeck.c (comptypes_internal, function_types_compatible_p,
616 perform_integral_promotions, digest_init): Replace Yoda conditions
617 with typical order conditions.
618 * c-decl.c (check_bitfield_type_and_width): Likewise.
619
c65e18d3
BE
6202017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
621
622 * c-typeck.c (c_safe_arg_type_equiv_p,
623 c_safe_function_type_cast_p): New function.
624 (build_c_cast): Implement -Wcast-function-type.
625
b7280579
RB
6262017-12-14 Richard Biener <rguenther@suse.de>
627
628 PR c/83415
629 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
630 like REALPART_EXPR for the behavior of whether its operand
631 is an lvalue.
632
49e6a6c0
MP
6332017-12-12 Marek Polacek <polacek@redhat.com>
634
635 PR c/82679
636 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
637
96a95ac1
AO
6382017-12-12 Alexandre Oliva <aoliva@redhat.com>
639
640 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
641 * c-parser.c (add_debug_begin_stmt): New.
642 (c_parser_declaration_or_fndef): Call it.
643 (c_parser_compound_statement_nostart): Likewise.
644 (c_parser_statement_after_labels): Likewise.
645 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
646
4b2b493f
JM
6472017-12-07 Joseph Myers <joseph@codesourcery.com>
648
649 * c-decl.c (build_compound_literal): Add parameter alignas_align
650 and set alignment of decl if nonzero.
651 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
652 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
653 qualifier.
654 (c_parser_struct_declaration): Update syntax comment.
655 (c_parser_type_name): Add alignas_ok argument and pass it to
656 c_parser_declspecs.
657 (c_parser_cast_expression): Pass true to c_parser_type_name and
658 give error if a cast used an _Alignas specifier.
659 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
660 give error if sizeof (type-name) used an _Alignas specifier.
661 (c_parser_alignof_expression): Pass true to c_parser_type_name and
662 give error if _Alignof (type-name) used an _Alignas specifier.
663 (c_parser_postfix_expression_after_paren_type): Check specified
664 alignment for a compound literal and pass it to
665 build_compound_literal.
666 * c-parser.h (c_parser_type_name): Update prototype.
667 * c-tree.h (build_compound_literal): Update prototype.
668
5d9ae53d
MS
6692017-12-07 Martin Sebor <msebor@redhat.com>
670
671 PR c/81544
672 * c-decl.c (c_decl_attributes): Look up existing declaration and
673 pass it to decl_attributes.
674
c79144f8
DM
6752017-12-06 David Malcolm <dmalcolm@redhat.com>
676
677 PR c/83236
678 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
679 reserved for use by the implementation.
680
613bc14f
DM
6812017-12-06 David Malcolm <dmalcolm@redhat.com>
682
683 * c-decl.c: Include "c-family/c-spellcheck.h".
684
05abad4c
ML
6852017-12-05 Martin Liska <mliska@suse.cz>
686 Jakub Jelinek <jakub@redhat.com>
687
688 * c-typeck.c (pointer_diff): Add new argument and instrument
689 pointer subtraction.
690 (build_binary_op): Similar for pointer comparison.
691
cc6534d4
JJ
6922017-12-01 Jakub Jelinek <jakub@redhat.com>
693
65791f42
JJ
694 PR c/79153
695 * c-parser.c: Include tree-iterator.h.
696 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
697 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
698 on it.
699
cc6534d4
JJ
700 PR c/83222
701 * c-tree.h (decl_constant_value_1): Declare.
702 * c-typeck.c (decl_constant_value_1): New function.
703 (decl_constant_value): Use it.
704 * c-fold.c (c_fully_fold_internal): If in_init, use
705 decl_constant_value_1 instead of decl_constant_value.
706
5de73c05
JJ
7072017-11-30 Jakub Jelinek <jakub@redhat.com>
708
709 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
710
058f0b9e
JJ
7112017-11-28 Jakub Jelinek <jakub@redhat.com>
712
713 PR sanitizer/81275
714 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
715 c_switch_covers_all_cases_p returns true.
716
5e9d6aa4 7172017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 718 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
719
720 * Make-lang.in (c/c-array-notation.o): Remove.
721 * c-array-notation.c: Delete.
722 * c-decl.c: Remove cilkplus condition.
723 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
724 c_parser_cilk_verify_simd, c_parser_array_notation,
725 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
726 c_parser_cilk_simd_fn_vector_attrs,
727 c_finish_cilk_simd_fn_tokens): Delete.
728 (c_parser_declaration_or_fndef): Remove cilkplus condition.
729 (c_parser_direct_declarator_inner): Ditto.
730 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
731 (c_parser_attributes, c_parser_compound_statement,
732 c_parser_statement_after_labels, c_parser_if_statement,
733 c_parser_switch_statement, c_parser_while_statement,
734 c_parser_do_statement, c_parser_for_statement,
735 c_parser_unary_expression, c_parser_postfix_expression,
736 c_parser_postfix_expression_after_primary,
737 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
738 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
739 support.
740 * c-typeck.c (build_array_ref, build_function_call_vec,
741 convert_arguments,
742 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
743 c_finish_loop, build_binary_op): Remove cilkplus support.
744
9e851845
JJ
7452017-11-28 Jakub Jelinek <jakub@redhat.com>
746
747 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
748 of build3.
749
8c7dbea9
BK
7502017-11-14 Boris Kolpackov <boris@codesynthesis.com>
751
752 * Make-lang.in (c.install-plugin): Install backend import library.
753
41521dee
JJ
7542017-11-23 Jakub Jelinek <jakub@redhat.com>
755
756 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
757 pragma_stmt context.
758
ac9effed
EB
7592017-11-23 Mike Stump <mikestump@comcast.net>
760 Eric Botcazou <ebotcazou@adacore.com>
761
762 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
763 ANNOTATE_EXPR.
764 (c_parser_do_statement): Likewise.
765 (c_parser_for_statement): Likewise.
766
ce95abc4
DM
7672017-11-22 David Malcolm <dmalcolm@redhat.com>
768
769 PR c++/62170
770 * c-objc-common.c (c_tree_printer): Convert penultimate param from
771 bool to bool *. Within '%T' handling, if showing an "aka", use
772 "quoted" param to add appropriate quoting.
773
974aedcc
MP
7742017-11-22 Marek Polacek <polacek@redhat.com>
775
776 PR c++/60336
777 PR middle-end/67239
778 PR target/68355
779 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
780
d4300cc6
DM
7812017-11-21 David Malcolm <dmalcolm@redhat.com>
782
783 PR c/83056
784 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
785 earlier failed lookups.
786
1af4ebf5
MG
7872017-11-21 Marc Glisse <marc.glisse@inria.fr>
788
789 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
790 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
791
26edace6
DM
7922017-11-20 David Malcolm <dmalcolm@redhat.com>
793
794 PR c/81404
795 * c-decl.c: Include "c-family/known-headers.h".
796 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
797 to known-headers.cc.
798 (class suggest_missing_header): Move to known-header.h.
799 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
800 than get_c_name_hint.
801
b1212255
DM
8022017-11-20 David Malcolm <dmalcolm@redhat.com>
803
804 * c-decl.c (get_c_name_hint): New function.
805 (class suggest_missing_header): New class.
806 (lookup_name_fuzzy): Call get_c_name_hint and use it to
807 suggest missing headers to the user.
808
6c7a259b
DM
8092017-11-20 David Malcolm <dmalcolm@redhat.com>
810
811 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
812 Include "c-family/name-hint.h"
813 (implicit_decl_warning): Convert "hint" from
814 const char * to name_hint. Pass location to
815 lookup_name_fuzzy. Suppress any deferred diagnostic if the
816 warning was not printed.
817 (undeclared_variable): Likewise for "guessed_id".
818 (lookup_name_fuzzy): Convert return type from const char *
819 to name_hint. Add location_t param.
820 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
821 Include "c-family/name-hint.h"
822 (c_parser_declaration_or_fndef): Convert "hint" from
823 const char * to name_hint. Pass location to lookup_name_fuzzy.
824 (c_parser_parameter_declaration): Likewise.
825
f9c59f7e
JJ
8262017-11-19 Jakub Jelinek <jakub@redhat.com>
827
828 PR c/66618
829 PR c/69960
830 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
831 where needed.
832 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
833 handle_omp_array_sections): Likewise.
834 (digest_init): Don't call decl_constant_value_for_optimization.
835 * c-tree.h (decl_constant_value_for_optimization): Removed.
836 * c-fold.c (c_fold_array_ref): New function.
837 (c_fully_fold_internal): Add LVAL argument, propagate it through
838 recursive calls. For VAR_P call decl_constant_value and
839 unshare if not LVAL and either optimizing or IN_INIT. Remove
840 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
841 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
842 (c_fully_fold): Add LVAL argument, pass it through to
843 c_fully_fold_internal.
844 (decl_constant_value_for_optimization): Removed.
845
3ca0dc60
JM
8462017-11-15 Joseph Myers <joseph@codesourcery.com>
847
848 PR c/81156
849 * c-parser.c (check_tgmath_function): New function.
850 (enum tgmath_parm_kind): New enum.
851 (c_parser_postfix_expression): Handle __builtin_tgmath.
852
64a5912c
DM
8532017-10-31 David Malcolm <dmalcolm@redhat.com>
854
855 * c-decl.c (implicit_decl_warning): Update for renaming of
856 pedwarn_at_rich_loc and warning_at_rich_loc.
857 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
858 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
859 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
860 (c_parser_struct_or_union_specifier): Likewise for renaming of
861 pedwarn_at_rich_loc.
862 (c_parser_parameter_declaration): Likewise for renaming of
863 error_at_rich_loc.
864 * c-typeck.c (build_component_ref): Likewise.
865 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
866 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
867 (set_init_label): Likewise for renaming of error_at_rich_loc.
868
c1136864
RB
8692017-10-30 Richard Biener <rguenther@suse.de>
870
871 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
872 stmts.
873
ee5fd23a
MM
8742017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
875
876 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
877 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
878
1a59ccf2
DM
8792017-10-25 David Malcolm <dmalcolm@redhat.com>
880
881 PR c/7356
882 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
883 semicolons.
884
bc1a75dd
JJ
8852017-10-25 Jakub Jelinek <jakub@redhat.com>
886
887 PR libstdc++/81706
888 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
889 newdecl to corresponding __builtin_ if any.
890
ff1ff960
PC
8912017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
892
893 PR c++/82466
894 * c-decl.c (diagnose_mismatched_decls): Use
895 OPT_Wbuiltin_declaration_mismatch.
896
62e1c678
DM
8972017-10-12 David Malcolm <dmalcolm@redhat.com>
898
899 * c-parser.c (c_parser_require): Add "type_is_unique" param and
900 use it to guard calls to maybe_suggest_missing_token_insertion.
901 (c_parser_parms_list_declarator): Override default value of new
902 "type_is_unique" param to c_parser_require.
903 (c_parser_asm_statement): Likewise.
904 * c-parser.h (c_parser_require): Add "type_is_unique" param,
905 defaulting to true.
906
a92f6726
NS
9072017-10-11 Nathan Sidwell <nathan@acm.org>
908
909 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
910
8e6cdc90
RS
9112017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
912
913 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
914 operating on trees as wide_ints.
915 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
916 (c_tree_equal): Likewise.
917
8139a48e
DM
9182017-10-04 David Malcolm <dmalcolm@redhat.com>
919
920 * c-decl.c (push_parm_decl): Store c_parm's location into the
921 PARAM_DECL.
922 (build_c_parm): Add "loc" param and store it within the c_parm.
923 * c-parser.c (struct c_parser): Add "last_token_location" field.
924 (c_parser_consume_token): Store location of the token into the
925 new field.
926 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
927 when handling a FUNCTION_DECL, if it doesn't already have them.
928 (c_parser_parameter_declaration): Generate a location for the
929 parameter, and pass it to the call to build_c_parm.
930 * c-tree.h (struct c_parm): Add field "loc".
931 (build_c_parm): Add location_t param.
932 * c-typeck.c (get_fndecl_argument_location): New function.
933 (inform_for_arg): New function.
934 (convert_for_assignment): Use inform_for_arg when dealing with
935 ic_argpass.
936
2a389958
JJ
9372017-09-29 Jakub Jelinek <jakub@redhat.com>
938
7d386d45
JJ
939 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
940 width is non-NULL.
941 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
942 don't SET_DECL_C_BIT_FIELD here.
943
2a389958
JJ
944 PR c/82340
945 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
946 instead of trying to set just TREE_READONLY manually.
947
ebc6a85e
TV
9482017-09-16 Tom de Vries <tom@codesourcery.com>
949
950 PR c/81875
951 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
952 cond itself.
953
bb75facd
JM
9542017-09-15 Joseph Myers <joseph@codesourcery.com>
955
956 PR c/82071
957 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
958 for C11.
959 (build_conditional_expr): For C11, generate result with excess
960 precision when one argument is an integer and the other is of a
961 type using excess precision.
962
1d933576
BE
9632017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
964
965 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
966
267bbb6f
MP
9672017-09-13 Marek Polacek <polacek@redhat.com>
968
969 PR c/82167
970 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
971 than expr.original_type.
972
6836632e
NS
9732017-09-12 Nathan Sidwell <nathan@acm.org>
974
975 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
976 resort_sorted_fields): Moved from c-family/c-common.c.
977 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
978
e035be33
JM
9792017-09-01 Joseph Myers <joseph@codesourcery.com>
980
981 PR c/82071
982 * c-typeck.c (build_atomic_assign): Handle argument with excess
983 precision. Ensure any EXCESS_PRECISION_EXPR is present in
984 argument passed to build_binary_op and convert_for_assignment but
985 not for call to c_fully_fold.
986 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
987 Ensure build_binary_op is called with argument with original
988 semantic type. Avoid calling c_fully_fold with an
989 EXCESS_PRECISION_EXPR from build_binary_op.
990
d2e05fcb
JJ
9912017-09-01 Jakub Jelinek <jakub@redhat.com>
992
993 PR c/81887
994 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
995
b397965c
RS
9962017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
997 Alan Hayward <alan.hayward@arm.com>
998 David Sherwood <david.sherwood@arm.com>
999
1000 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1001 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1002 m1 and m2 to the signed equivalent of a fixed-point
1003 SCALAR_TYPE_MODE.
1004
14e18d71
DM
10052017-08-24 David Malcolm <dmalcolm@redhat.com>
1006
1007 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1008 than CAN_HAVE_LOCATION_P when determining whether to use the
1009 location_t value within "value".
1010
7f204c0f
DM
10112017-08-21 David Malcolm <dmalcolm@redhat.com>
1012
1013 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1014 rather than peeking the location of the first token.
1015 * c-tree.h (c_expr::get_location): New method.
1016
2f687306
DM
10172017-08-21 David Malcolm <dmalcolm@redhat.com>
1018
1019 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1020 to check_function_arguments.
1021
3e7b80d7
MP
10222017-08-18 Marek Polacek <polacek@redhat.com>
1023
1024 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1025 commentary.
1026
00aa1fa2
L
10272017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1028
1029 PR c/53037
1030 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1031 (check_bitfield_type_and_width): Don't allow bit-field with
1032 warn_if_not_aligned type.
1033
da67acb9
MS
10342017-08-14 Martin Sebor <msebor@redhat.com>
1035
1036 PR c/81117
1037 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1038
bb85aa74
MP
10392017-08-11 Marek Polacek <polacek@redhat.com>
1040
1041 PR c/81795
1042 * c-decl.c (pushtag): Only print inform if the warning was printed.
1043 (grokdeclarator): Likewise.
1044
32129a17
DM
10452017-08-10 David Malcolm <dmalcolm@redhat.com>
1046
1047 * c-parser.c (c_parser_error): Rename to...
1048 (c_parser_error_richloc): ...this, making static, and adding
1049 "richloc" parameter, passing it to the c_parse_error call,
1050 rather than calling c_parser_set_source_position_from_token.
1051 (c_parser_error): Reintroduce, reimplementing in terms of the
1052 above, converting return type from void to bool.
1053 (class token_pair): New class.
1054 (struct matching_paren_traits): New struct.
1055 (matching_parens): New typedef.
1056 (struct matching_brace_traits): New struct.
1057 (matching_braces): New typedef.
1058 (get_matching_symbol): New function.
1059 (c_parser_require): Add param MATCHING_LOCATION, using it to
1060 highlight matching "opening" tokens for missing "closing" tokens.
1061 (c_parser_skip_until_found): Likewise.
1062 (c_parser_static_assert_declaration_no_semi): Convert explicit
1063 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1064 class matching_parens, so that the pertinent open parenthesis is
1065 highlighted when there are problems locating the close
1066 parenthesis.
1067 (c_parser_struct_or_union_specifier): Likewise.
1068 (c_parser_typeof_specifier): Likewise.
1069 (c_parser_alignas_specifier): Likewise.
1070 (c_parser_simple_asm_expr): Likewise.
1071 (c_parser_braced_init): Likewise, for matching_braces.
1072 (c_parser_paren_condition): Likewise, for matching_parens.
1073 (c_parser_switch_statement): Likewise.
1074 (c_parser_for_statement): Likewise.
1075 (c_parser_asm_statement): Likewise.
1076 (c_parser_asm_operands): Likewise.
1077 (c_parser_cast_expression): Likewise.
1078 (c_parser_sizeof_expression): Likewise.
1079 (c_parser_alignof_expression): Likewise.
1080 (c_parser_generic_selection): Likewise.
1081 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1082 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1083 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1084 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1085 c_parser_skip_until_found call.
1086 (c_parser_objc_class_definition): Use class matching_parens as
1087 above.
1088 (c_parser_objc_method_decl): Likewise.
1089 (c_parser_objc_try_catch_finally_statement): Likewise.
1090 (c_parser_objc_synchronized_statement): Likewise.
1091 (c_parser_objc_at_property_declaration): Likewise.
1092 (c_parser_oacc_wait_list): Likewise.
1093 (c_parser_omp_var_list_parens): Likewise.
1094 (c_parser_omp_clause_collapse): Likewise.
1095 (c_parser_omp_clause_default): Likewise.
1096 (c_parser_omp_clause_if): Likewise.
1097 (c_parser_omp_clause_num_threads): Likewise.
1098 (c_parser_omp_clause_num_tasks): Likewise.
1099 (c_parser_omp_clause_grainsize): Likewise.
1100 (c_parser_omp_clause_priority): Likewise.
1101 (c_parser_omp_clause_hint): Likewise.
1102 (c_parser_omp_clause_defaultmap): Likewise.
1103 (c_parser_oacc_single_int_clause): Likewise.
1104 (c_parser_omp_clause_ordered): Likewise.
1105 (c_parser_omp_clause_reduction): Likewise.
1106 (c_parser_omp_clause_schedule): Likewise.
1107 (c_parser_omp_clause_num_teams): Likewise.
1108 (c_parser_omp_clause_thread_limit): Likewise.
1109 (c_parser_omp_clause_aligned): Likewise.
1110 (c_parser_omp_clause_linear): Likewise.
1111 (c_parser_omp_clause_safelen): Likewise.
1112 (c_parser_omp_clause_simdlen): Likewise.
1113 (c_parser_omp_clause_depend): Likewise.
1114 (c_parser_omp_clause_map): Likewise.
1115 (c_parser_omp_clause_device): Likewise.
1116 (c_parser_omp_clause_dist_schedule): Likewise.
1117 (c_parser_omp_clause_proc_bind): Likewise.
1118 (c_parser_omp_clause_uniform): Likewise.
1119 (c_parser_omp_for_loop): Likewise.
1120 (c_parser_cilk_clause_vectorlength): Likewise.
1121 (c_parser_cilk_clause_linear): Likewise.
1122 (c_parser_transaction_expression): Likewise.
1123 * c-parser.h (c_parser_require): Add param matching_location with
1124 default UNKNOWN_LOCATION.
1125 (c_parser_error): Convert return type from void to bool.
1126 (c_parser_skip_until_found): Add param matching_location with
1127 default UNKNOWN_LOCATION.
1128
30af3a2b
MP
11292017-08-09 Marek Polacek <polacek@redhat.com>
1130
1131 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1132 * c-tree.h (build_external_ref): Update declaration.
1133 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1134 (build_external_ref): Change the type of a parameter to bool.
1135 (parser_build_binary_op): Use true/false instead of 1/0.
1136 (pointer_diff): Likewise.
1137 (build_modify_expr): Likewise.
1138 (set_designator): Change the type of a parameter to bool.
1139 (set_init_index): Use true/false instead of 1/0.
1140 (set_init_label): Likewise.
1141 (output_init_element): Change the type of a parameter to bool.
1142 (output_pending_init_elements): Use true/false instead of 1/0.
1143 (process_init_element): Likewise.
1144 (build_binary_op): Change the type of a parameter to bool.
1145
296c53ac
MP
11462017-08-09 Marek Polacek <polacek@redhat.com>
1147
1148 PR c/81233
1149 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1150 Call emit_diagnostic_valist instead of pedwarn.
1151 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1152 Print the relevant types in diagnostics.
1153
a32c8316
MP
11542017-08-09 Marek Polacek <polacek@redhat.com>
1155
1156 PR c/81417
1157 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1158 build_conditional_expr.
1159 * c-parser.c (c_parser_conditional_expression): Create locations for
1160 EXP1 and EXP2 from their source ranges. Pass the locations down to
1161 build_conditional_expr.
1162 * c-tree.h (build_conditional_expr): Update declaration.
1163 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1164 For -Wsign-compare, also print the types.
1165
314e6352
ML
11662017-08-08 Martin Liska <mliska@suse.cz>
1167
1168 * c-convert.c: Include header files.
1169 * c-typeck.c: Likewise.
1170
577eec56
ML
11712017-08-07 Martin Liska <mliska@suse.cz>
1172
1173 * c-parser.c (c_parser_attributes): Canonicalize name of an
1174 attribute.
1175
f7b6353a
MP
11762017-08-02 Marek Polacek <polacek@redhat.com>
1177
1178 PR c/81289
1179 * c-parser.c (c_parser_unary_expression): Use set_error.
1180
8a6eab34
MP
1181 PR c/81448
1182 PR c/81306
1183 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1184 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1185
7fef86d3
JH
11862017-07-31 Jan Hubicka <hubicka@ucw.cz>
1187 Martin Liska <mliska@suse.cz>
1188
1189 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1190 statement.
7fef86d3 1191
f34ebeb2
ML
11922017-07-31 Martin Liska <mliska@suse.cz>
1193
1194 PR sanitize/81530
1195 * c-convert.c (convert): Guard condition with flag_sanitize_p
1196 also with current_function_decl non-null equality.
1197 * c-decl.c (grokdeclarator): Likewise.
1198 * c-typeck.c (build_binary_op): Likewise.
1199
8595f67b
MP
12002017-07-25 Marek Polacek <polacek@redhat.com>
1201
1202 * c-decl.c (grokfield): Remove local variable.
1203
d49718d6
MP
12042017-07-25 Marek Polacek <polacek@redhat.com>
1205
1206 PR c/81364
1207 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1208 macro expansion if the body is in { }.
1209 (c_parser_while_statement): Likewise.
1210 (c_parser_for_statement): Likewise.
1211
ff22eb12
NS
12122017-07-18 Nathan Sidwell <nathan@acm.org>
1213
1214 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1215
eea77d1f
DM
12162017-07-14 David Malcolm <dmalcolm@redhat.com>
1217
1218 * c-decl.c (implicitly_declare): When suggesting a missing
1219 #include, provide a fix-it hint.
1220
b6f43128
DM
12212017-07-06 David Malcolm <dmalcolm@redhat.com>
1222
1223 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1224 and call that instead.
1225 * c-tree.h (selftest::run_c_tests): New decl.
1226
3e2becc4
MP
12272017-06-26 Marek Polacek <polacek@redhat.com>
1228
1229 PR c/80116
1230 * c-parser.c (c_parser_if_body): Set the location of the
1231 body of the conditional after parsing all the labels. Call
1232 warn_for_multistatement_macros.
1233 (c_parser_else_body): Likewise.
1234 (c_parser_switch_statement): Likewise.
1235 (c_parser_while_statement): Likewise.
1236 (c_parser_for_statement): Likewise.
1237 (c_parser_statement): Add a default argument. Save the location
1238 after labels have been parsed.
1239 (c_parser_c99_block_statement): Likewise.
1240
343ae898
RB
12412017-06-19 Richard Biener <rguenther@suse.de>
1242
1243 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1244 negated _Literals to parse _Literal (int) -1.
1245
45b2222a
ML
12462017-06-13 Martin Liska <mliska@suse.cz>
1247
1248 PR sanitize/78204
1249 * c-convert.c (convert): Use sanitize_flags_p.
1250 * c-decl.c (grokdeclarator): Likewise.
1251 * c-typeck.c (convert_for_assignment): Likewise.
1252 (c_finish_return): Likewise.
1253 (build_binary_op): Likewise.
1254
8ab7005b
JJ
12552017-06-08 Jakub Jelinek <jakub@redhat.com>
1256
1257 PR c/81006
1258 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1259 to sizetype before size_binop.
1260
363dc72c
JJ
12612017-06-07 Jakub Jelinek <jakub@redhat.com>
1262
1263 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1264 of TDI_generic.
1265
dc949728
MP
12662017-06-06 Marek Polacek <polacek@redhat.com>
1267
1268 PR c/79983
1269 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1270 ref.
1271 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1272
40ffd95f
BE
12732017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1274
1275 * c-parser.c (c_parser_binary_expression): Implement the
1276 -Wsizeof_pointer_div warning.
1277 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1278 from a parenthesized expression.
1279 (c_parser_expr_list): Use c_last_sizeof_loc.
1280 * c-tree.h (c_last_sizeof_loc): New external.
1281 * c-typeck.c (c_last_sizeof_loc): New variable.
1282 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1283
9fc5e7a4
MM
12842017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1285
1286 PR testsuite/80580
1287 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1288
f012c8ef
DM
12892017-05-30 David Malcolm <dmalcolm@redhat.com>
1290
1291 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1292 parameters.
1293
3cd211af
MS
12942017-05-24 Martin Sebor <msebor@redhat.com>
1295
1296 PR c/80731
1297 * c-fold.c (c_fully_fold_internal): Adjust.
1298 * c-typeck.c (parser_build_unary_op): Adjust.
1299
fd71a9a2
TS
13002017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1301
1302 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1303 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1304 "VECTOR_LENGTH".
1305
92fa0f9e
MP
13062017-05-23 Marek Polacek <polacek@redhat.com>
1307
1308 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1309 quotes.
1310
d11c168a
JJ
13112017-05-22 Jakub Jelinek <jakub@redhat.com>
1312
1313 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1314 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1315 it returned invariant. Call tree_invariant_p unconditionally
1316 afterwards to decide whether to return expr or op0.
1317
58aca9d9
NS
13182017-05-22 Nathan Sidwell <nathan@acm.org>
1319
1320 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1321
7fd549d2
TS
13222017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1323
1324 * c-parser.c (c_parser_omp_clause_default): Handle
1325 "OMP_CLAUSE_DEFAULT_PRESENT".
1326
6ecd2339
BE
13272017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1328
1329 * config-lang.in (gtfiles): Add c-family/c-format.c.
1330
8a57ecff
NS
13312017-05-18 Nathan Sidwell <nathan@acm.org>
1332
1333 * c-decl.c (pushdecl_top_level): Delete unused function.
1334
6574d78e
MP
13352017-05-18 Marek Polacek <polacek@redhat.com>
1336
1337 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1338 (check_earlier_gotos): Likewise.
1339 (define_label): Likewise.
1340 (pending_xref_error): Likewise.
1341 (smallest_type_quals_location): Likewise.
1342 (grokdeclarator): Likewise.
1343 (grokparms): Likewise.
1344 (identifier_global_value): Likewise.
1345 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1346 (find_init_member): Likewise.
1347
e3455240
MP
13482017-05-18 Marek Polacek <polacek@redhat.com>
1349
1350 * c-decl.c (start_decl): Use false/true instead of 0/1.
1351 (grokdeclarator): Likewise.
1352 (finish_struct): Likewise.
1353 (start_function): Change the return type to bool. Use false/true
1354 instead of 0/1.
1355 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1356 * c-tree.h (start_function): Update.
1357 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1358 (set_designator): Change the return type to bool. Use false/true
1359 instead of 0/1.
1360
3fa8871b
MP
13612017-05-17 Marek Polacek <polacek@redhat.com>
1362
1363 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1364 * c-typeck.c: Likewise.
1365
142473df
MP
13662017-05-17 Marek Polacek <polacek@redhat.com>
1367
1368 PR sanitizer/80659
1369 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1370 DECL_IGNORED_P even for non-static compound literals.
1371
1a817418
ML
13722017-05-17 Martin Liska <mliska@suse.cz>
1373
1374 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1375 use it instead of int type.
1376
b2fa0a8b
MP
13772017-05-17 Marek Polacek <polacek@redhat.com>
1378
1379 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1380 call c_fully_fold.
1381 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1382 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1383 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1384 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1385 save_expr.
1386 (c_parser_conditional_expression): Likewise.
1387 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1388 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1389 (process_init_element): Likewise.
1390 (build_binary_op): Likewise.
1391 (handle_omp_array_sections_1): Likewise.
1392
1e47f02b
TS
13932017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1394
1395 * c-parser.c (c_parser_omp_clause_num_gangs)
1396 (c_parser_omp_clause_num_workers)
1397 (c_parser_omp_clause_vector_length): Merge functions into...
1398 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1399 all users.
1400
c24e924f
NS
14012017-05-11 Nathan Sidwell <nathan@acm.org>
1402
1403 * gimple-parser.c: Don't #include tree-dump.h.
1404
c587104e
MM
14052017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1406
1407 PR testsuite/80580
1408 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1409
67ac9a9d
MM
14102017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1411
1412 PR testsuite/80580
1413 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1414 incorrect __MEM syntax.
1415
ac4eb40f
MM
14162017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1417
1418 PR testsuite/80580
1419 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1420 type of unary '*'.
1421
641da50a
NS
14222017-05-09 Nathan Sidwell <nathan@acm.org>
1423
1424 * c-tree.h (pushdecl): Declare.
1425
56d35585
DM
14262017-05-05 David Malcolm <dmalcolm@redhat.com>
1427
1428 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1429 with diagnostic_report_diagnostic.
1430 * c-errors.c (pedwarn_c99): Likewise.
1431 (pedwarn_c90): Likewise.
1432
815d9cc6
XR
14332017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1434
92a285c1 1435 PR c++/80038
815d9cc6
XR
1436 * c-gimplify.c (c_gimplify_expr): Remove calls to
1437 cilk_gimplifY_call_params_in_spawned_fn.
1438
1c4ea66f
DM
14392017-04-25 David Malcolm <dmalcolm@redhat.com>
1440
1441 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1442 hint for removing extra semicolon.
1443
666f7903
JJ
14442017-04-21 Jakub Jelinek <jakub@redhat.com>
1445
1446 PR c/80468
1447 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1448 enabled, set specs->type to integer_type_node.
1449
5764ee3c
JW
14502017-04-03 Jonathan Wakely <jwakely@redhat.com>
1451
1452 * c-array-notation.c: Fix typo in comment.
1453
10fa8dfb
MP
14542017-03-29 Marek Polacek <polacek@redhat.com>
1455
1456 PR c/79730
1457 * c-decl.c (finish_decl): Check VAR_P.
1458
a9e4a1a5
JJ
14592017-03-27 Jakub Jelinek <jakub@redhat.com>
1460
1461 PR middle-end/80162
1462 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1463 * c-typeck.c (c_mark_addressable): Likewise. Look through
1464 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1465 to ARRAY_TYPE.
1466 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1467
ee3ff394
MP
14682017-03-23 Marek Polacek <polacek@redhat.com>
1469
1470 * c-tree.h: Remove a C_RID_YYCODE reference.
1471
4d1b8e70
JJ
14722017-03-21 Jakub Jelinek <jakub@redhat.com>
1473
1474 PR c/80097
1475 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1476 optional COMPOUND_EXPR with ubsan instrumentation.
1477
31dc71a8
MP
14782017-03-17 Marek Polacek <polacek@redhat.com>
1479
1480 * c-parser.c: Add C11 references.
1481
d579c385
MP
14822017-03-15 Marek Polacek <polacek@redhat.com>
1483
1484 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1485
85059a38
MP
14862017-03-11 Marek Polacek <polacek@redhat.com>
1487
1488 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1489
2f6f187a
DM
14902017-03-10 David Malcolm <dmalcolm@redhat.com>
1491
1492 PR translation/79848
1493 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1494 "%qs".
1495 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1496
36618428
MP
14972017-03-09 Marek Polacek <polacek@redhat.com>
1498
1499 PR sanitizer/79757
1500 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1501 parameter declarations with initializers.
1502
01e5af5a
JJ
15032017-03-09 Jakub Jelinek <jakub@redhat.com>
1504
1505 PR c/79969
1506 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1507 TYPE_STUB_DECL.
1508
a71dbc63
JJ
15092017-03-07 Jakub Jelinek <jakub@redhat.com>
1510
1511 PR c/79834
1512 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1513 for "may only be used in compound statements" diagnostics, change it
1514 such that the same translatable string is used for all pragmas. For
1515 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1516 diagnostics.
1517 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1518 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1519 "may only be used in compound statements" diagnostics, such that the
1520 same translatable string is used for all pragmas.
1521
1ff4bae6
MP
15222017-03-04 Marek Polacek <polacek@redhat.com>
1523
1524 PR c/79847
1525 * c-decl.c (implicit_decl_warning): Add missing space.
1526
7f5a7d78
MP
15272017-03-03 Marek Polacek <polacek@redhat.com>
1528
1529 PR c/79758
1530 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1531 current_function_prototype_arg_types is error_mark_node. Fix
1532 formatting. Use TREE_VALUE instead of TREE_TYPE.
1533
883c8f06
JJ
15342017-03-03 Jakub Jelinek <jakub@redhat.com>
1535
79c9b7a8
JJ
1536 PR c/79837
1537 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1538 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1539 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1540 diagnostics.
1541
883c8f06
JJ
1542 PR c/79836
1543 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1544 instead of %<_Generic>.
1545 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1546 (c_parser_omp_target_exit_data): Use %<release%> instead of
1547 %<release>.
1548
324ff1a0
JJ
15492017-02-28 Jakub Jelinek <jakub@redhat.com>
1550
1551 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1552 instead of just cond ? "..." : "...".
1553 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1554 for "enter"/"exit" keyword.
1555 (c_finish_oacc_routine): Don't use %s to supply portions of the
1556 message.
1557
4227c9ad
JJ
15582017-02-24 Jakub Jelinek <jakub@redhat.com>
1559
1560 PR c++/79588
1561 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1562 handle -Wrestrict here.
1563 * c-typeck.c (build_function_call_vec): Adjust
1564 check_function_arguments caller.
1565
5d972e66
RB
15662017-02-23 Richard Biener <rguenther@suse.de>
1567
1568 PR c/79684
1569 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1570 to initialize c_exprs to return.
1571 (c_parser_gimple_binary_expression): Likewise.
1572 (c_parser_gimple_unary_expression): Likewise.
1573 (c_parser_gimple_postfix_expression): Likewise.
1574
61ac5ebe
MP
15752017-02-22 Marek Polacek <polacek@redhat.com>
1576
1577 PR c/79662
1578 * c-typeck.c (convert_arguments): Handle error_mark_node.
1579
41d1b0b1
PK
15802017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1581
1582 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1583 value of c_parser_parse_ssa_name against error_mark_node and emit
1584 error if ssa name is anonymous and written as default definition.
1585
eab1f169
PK
15862017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1587
1588 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1589 FMA_EXPR.
1590
bcac0b4d
JJ
15912017-02-16 Jakub Jelinek <jakub@redhat.com>
1592
1593 PR c++/79512
1594 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1595 ignore #pragma omp target even when not followed by identifier.
1596
1be33173
PK
15972017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1598
1599 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1600 (c_parser_gimple_unary_expression): Likewise.
1601
aa326bfb
JJ
16022017-02-13 Jakub Jelinek <jakub@redhat.com>
1603
1604 * c-parser.c (c_parser_oacc_declare): Add missing space in
1605 diagnostics.
1606
8a398bc5
PK
16072017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1608
1609 PR c/79478
1610 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1611 set_c_expr_source_range when parsing ssa-name.
1612
3dcde5ef
PG
16132017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1614 Richard Biener <rguenther@suse.de>
1615
1616 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1617 building IL when arguments are error_mark_node.
1618 (c_parser_gimple_unary_expression): Likewise.
1619 (c_parser_gimple_if_stmt): Likewise.
1620 (c_parser_gimple_switch_stmt): Likewise.
1621 (c_parser_gimple_return_stmt): Likewise.
1622 (c_parser_parse_ssa_name): When name lookup fails do not build
1623 an SSA name. Use undeclared rather than not declared in error
1624 reporting.
1625
192b048b
MP
16262017-02-09 Marek Polacek <polacek@redhat.com>
1627
1628 PR c/79428
1629 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1630 instead of c_parser_skip_until_found.
1631
56f71478
JJ
16322017-02-09 Jakub Jelinek <jakub@redhat.com>
1633
1634 PR c/79431
1635 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1636 symtab_node::get on automatic variables.
1637
02889d23
CLT
16382016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1639 Chung-Lin Tang <cltang@codesourcery.com>
1640
1641 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1642 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1643 semantic checking.
1644 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1645
7af4b20d
RB
16462017-02-07 Richard Biener <rguenther@suse.de>
1647
1648 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1649 (c_parser_gimple_postfix_expression_after_primary):
1650 Do not use c_build_function_call_vec to avoid folding and promotion.
1651 Simplify.
1652
e5e391d6
MO
16532017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1654
1655 PR lto/79061
1656 * c-decl.c (pop_scope): Pass main_input_filename to
1657 build_translation_unit_decl.
1658
c2e84327
DM
16592017-01-24 David Malcolm <dmalcolm@redhat.com>
1660
1661 * c-parser.c: Include "read-rtl-function.h" and
1662 "run-rtl-passes.h".
1663 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1664 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1665 production. Update for renaming of field "gimple_pass" to
1666 "gimple_or_rtl_pass". If __RTL was seen, call
1667 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1668 to an auto_timevar, to cope with early exit.
1669 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1670 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1671 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1672 Handle RID_RTL.
1673 (c_parser_parse_rtl_body): New function.
1674 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1675 (struct c_declspecs): Rename field "gimple_pass" to
1676 "gimple_or_rtl_pass". Add field "rtl_p".
1677 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1678 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1679 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1680 (c_parser_gimple_or_rtl_pass_list): ...this.
1681
2ebd93e1
MP
16822017-01-20 Marek Polacek <polacek@redhat.com>
1683
1684 PR c/64279
1685 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1686
b1c95bb5
RB
16872017-01-13 Richard Biener <rguenther@suse.de>
1688
1689 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1690 nops.
1691
25329913
RB
16922017-01-13 Richard Biener <rguenther@suse.de>
1693
1694 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1695 _Literal ( type-name ) number.
1696
6bb4ea5c
RB
16972017-01-12 Richard Biener <rguenther@suse.de>
1698
1699 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1700 __MEM.
1701
6b5b4e9c
JJ
17022017-01-11 Jakub Jelinek <jakub@redhat.com>
1703
1704 PR c++/72813
1705 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1706 PCH file.
1707
e3252775
RB
17082017-01-11 Richard Biener <rguenther@suse.de>
1709
1710 PR bootstrap/79052
1711 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1712 returns on parse errors.
1713
a9342885
MP
17142017-01-04 Marek Polacek <polacek@redhat.com>
1715
1716 PR c++/64767
1717 * c-parser.c (c_parser_postfix_expression): Mark zero character
1718 constants by setting original_type in c_expr.
1719 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1720 with a zero character constant.
1721 (char_type_p): New function.
1722
5dd9a9d0
DM
17232017-01-04 David Malcolm <dmalcolm@redhat.com>
1724
1725 * c-parser.c (c_parser_declaration_or_fndef): Create a
1726 rich_location at init_loc and parse it to start_init.
1727 (last_init_list_comma): New global.
1728 (c_parser_braced_init): Update last_init_list_comma when parsing
1729 commas. Pass it to pop_init_level. Pass location of closing
1730 brace to pop_init_level.
1731 (c_parser_postfix_expression_after_paren_type): Create a
1732 rich_location at type_loc and parse it to start_init.
1733 (c_parser_omp_declare_reduction): Likewise for loc.
1734 * c-tree.h (start_init): Add rich_location * param.
1735 (pop_init_level): Add location_t param.
1736 * c-typeck.c (struct initializer_stack): Add field
1737 "missing_brace_richloc".
1738 (start_init): Add richloc param, use it to initialize
1739 the stack node's missing_brace_richloc.
1740 (last_init_list_comma): New decl.
1741 (finish_implicit_inits): Pass last_init_list_comma to
1742 pop_init_level.
1743 (push_init_level): When finding missing open braces, add fix-it
1744 hints to the richloc.
1745 (pop_init_level): Add "insert_before" param and pass it
1746 when calling pop_init_level. Add fixits about missing
1747 close braces to any richloc. Use the richloc for the
1748 -Wmissing-braces warning.
1749 (set_designator): Pass last_init_list_comma to pop_init_level.
1750 (process_init_element): Likewise.
1751
cbe34bb5
JJ
17522017-01-01 Jakub Jelinek <jakub@redhat.com>
1753
1754 Update copyright years.
1755
d17680f3
JJ
17562016-12-21 Jakub Jelinek <jakub@redhat.com>
1757
0dba7960
JJ
1758 PR bootstrap/78817
1759 * c-typeck.c (build_function_call_vec): If check_function_arguments
1760 returns true, set TREE_NO_WARNING on CALL_EXPR.
1761
d17680f3
JJ
1762 PR c/77767
1763 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1764 to *expr instead of overwriting it.
1765
aa90531e
RB
17662016-12-20 Richard Biener <rguenther@suse.de>
1767
1768 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1769 error recovery.
1770 (c_parser_gimple_statement): Only build assigns for non-error
1771 stmts.
1772 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1773
629b3d75
MJ
17742016-12-14 Martin Jambor <mjambor@suse.cz>
1775
1776 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1777 omp-low.h.
1778 (c_finish_oacc_routine): Adjusted call to
1779 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1780 to use their new names.
1781 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1782 use its new name.
1783 (c_parser_oacc_update): Likewise.
1784 (c_parser_omp_simd): Likewise.
1785 (c_parser_omp_target_update): Likewise.
1786 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1787 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1788 name.
1789 (c_finish_omp_cancellation_point): Likewise.
1790 * gimple-parser.c: Do not include omp-low.h
1791
c5af52eb
CP
17922016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1793 James Norris <jnorris@codesourcery.com>
1794
1795 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1796 EXIT_DATA,WAIT} are not used in compound statements.
1797 (c_parser_oacc_enter_exit_data): Update diagnostics.
1798
48330c93
BE
17992016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1800
1801 PR c++/71973
1802 * c-decl.c (diagnose_mismatched_decls): Use
1803 OPT_Wbuiltin_declaration_mismatch here too.
1804
899ca90e 18052016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1806 Alan Hayward <alan.hayward@arm.com>
1807 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1808
1809 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1810 (make_label, finish_struct): Likewise.
1811
1ee62b92 18122016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1813 Richard Biener <rguenther@suse.de>
22b15758 1814
8e745a17
JJ
1815 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1816 * config-lang.in (gtfiles): Add c/c-parser.h.
1817 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1818 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1819 * c-parser.c (enum c_id_kind, struct c_token,
1820 c_parser_next_token_is, c_parser_next_token_is_not,
1821 c_parser_next_token_is_keyword,
1822 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1823 Split out to ...
1824 * c-parser.h: ... new header.
1825 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1826 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1827 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1828 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1829 c_parser_error, c_parser_require, c_parser_skip_until_found,
1830 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1831 c_parser_type_name): Export.
1832 (c_parser_tokens_buf): New function.
1833 (c_parser_error): Likewise.
1834 (c_parser_set_error): Likewise.
1835 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1836 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1837 via c_parser_parse_gimple_body.
8e745a17
JJ
1838 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1839 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1840 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1841 c_parser_error, c_parser_require, c_parser_skip_until_found,
1842 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1843 c_parser_type_name): Declare.
1ee62b92
PG
1844 (struct c_parser): Declare forward.
1845 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1846 (c_parser_error): Likewise.
1847 (c_parser_set_error): Likewise.
1848 * gimple-parser.c: New file.
1849 * gimple-parser.h: Likewise.
1ee62b92 1850
22b15758
UB
18512016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1852
1853 PR c/35503
1854 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1855 warn_for_restrict.
1856
84ff4775
LCW
18572016-09-11 Le-Chun Wu <lcwu@google.com>
1858 Mark Wielaard <mjw@redhat.com>
1859
1860 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1861 to the given -Wshadow= variant.
1862
4d0cdd0c
TP
18632016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1864
1865 * c-typeck.c: Include memmodel.h.
1866
1202f33e
JJ
18672016-10-13 Jakub Jelinek <jakub@redhat.com>
1868
1869 PR target/77957
1870 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1871 instead of lhd_return_null_tree_v.
1872
8a14afd0
BS
18732016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1874
1875 PR c++/69733
1876 * c-decl.c (smallest_type_quals_location): New static function.
1877 (grokdeclarator): Try to find the correct location for an ignored
1878 qualifier.
1879
81fea426
MP
18802016-09-26 Marek Polacek <polacek@redhat.com>
1881
1882 PR c/7652
1883 * c-decl.c (pop_scope): Add gcc_fallthrough.
1884
18852016-09-26 Marek Polacek <polacek@redhat.com>
1886
1887 PR c/7652
1888 * c-parser.c (struct c_token): Add flags field.
1889 (c_lex_one_token): Pass it to c_lex_with_flags.
1890 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1891 into IFN_FALLTHROUGH.
1892 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1893 attribute fallthrough after a case label or default label.
1894 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1895
9a2300e9
MP
18962016-09-24 Marek Polacek <polacek@redhat.com>
1897
1898 PR c/77490
1899 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1900 have boolean value. Warn about ++/-- on booleans.
1901
7de76362
JJ
19022016-09-23 Jakub Jelinek <jakub@redhat.com>
1903
1904 * c-parser.c (incomplete_record_decls): Remove unnecessary
1905 = vNULL initialization of file scope vec.
1906
5b73d2ab
MP
19072016-09-16 Marek Polacek <polacek@redhat.com>
1908
1909 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1910
e51fbec3
MP
19112016-09-14 Marek Polacek <polacek@redhat.com>
1912
1913 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1914 (fix_array_notation_expr): Likewise.
1915 * c-decl.c (finish_decl): Likewise.
1916 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1917 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1918 (function_to_pointer_conversion): Use false instead of 0.
1919 (convert_lvalue_to_rvalue): Likewise.
1920 (parser_build_unary_op): Likewise.
1921 (build_atomic_assign): Likewise.
1922 (build_unary_op): Change nonconvert parameter type to bool, use
1923 true/false instead of 1/0.
1924 (build_binary_op): Use true instead of 1.
1925
254830ba
DM
19262016-09-13 David Malcolm <dmalcolm@redhat.com>
1927
1928 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1929 of add_fixit_insert to add_fixit_insert_before.
1930
4c13ba17
MP
19312016-09-13 Marek Polacek <polacek@redhat.com>
1932
1933 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1934 it.
1935
54dcdb88
BE
19362016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1937
1938 PR c++/77496
1939 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1940 COMPOUND_EXPR to warn_for_omitted_condop.
1941
e5106e27
DM
19422016-09-07 David Malcolm <dmalcolm@redhat.com>
1943
1944 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1945 c_get_substring_location for this new langhook.
1946
9dc5773f
JJ
19472016-09-02 Jakub Jelinek <jakub@redhat.com>
1948
1949 PR c/65467
1950 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1951 flag_openmp.
1952 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1953 instead of mark_exp_read on low_bound/length expression.
1954 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1955 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1956 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1957 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1958 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1959 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1960 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1961 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1962 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1963 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1964 instead of mark_expr_read.
1965 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1966 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1967 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1968 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1969 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1970 array section bases outside of depend clause, for depend clause
1971 use convert_lvalue_to_rvalue on the base.
1972 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1973 linear, aligned, map, to and from clauses.
1974 (c_omp_clause_copy_ctor): New function.
1975
295844f6
MP
19762016-09-01 Marek Polacek <polacek@redhat.com>
1977
1978 PR c/7652
1979 * c-typeck.c (composite_type): Add FALLTHRU comment.
1980
089af25c
DM
19812016-08-31 David Malcolm <dmalcolm@redhat.com>
1982
1983 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1984 to the insertion fixits for "struct", "union", and "enum".
1985
f9087798
DM
19862016-08-30 David Malcolm <dmalcolm@redhat.com>
1987
1988 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1989 rather than add_fixit_misspelled_id.
1990 (undeclared_variable): Likewise.
1991 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1992 now-redundant "here" params from add_fixit_insert method calls.
1993 (c_parser_parameter_declaration): Likewise.
1994 * c-typeck.c (build_component_ref): Remove now-redundant range
1995 param from add_fixit_replace method calls.
1996
ebef225f
MP
19972016-08-25 Marek Polacek <polacek@redhat.com>
1998
1999 * c-typeck.c (parser_build_binary_op): Pass LHS to
2000 warn_logical_not_parentheses.
2001
fe377a48
MP
20022016-08-25 Marek Polacek <polacek@redhat.com>
2003
2004 PR c/77323
2005 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2006 or _FloatN or _FloatNx is not supported.
2007 (finish_declspecs): Set type to integer_type_node when _FloatN or
2008 _FloatNx is not supported.
2009
c65699ef
JM
20102016-08-19 Joseph Myers <joseph@codesourcery.com>
2011
2012 PR c/32187
2013 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2014 (struct c_declspecs): Add field floatn_nx_idx.
2015 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2016 and _FloatNx type specifiers.
2017 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2018 (c_parser_declspecs, c_parser_attribute_any_word)
2019 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2020 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2021 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2022 narrower than double.
2023
2f1364c2
JJ
20242016-08-12 Jakub Jelinek <jakub@redhat.com>
2025 Martin Liska <mliska@suse.cz>
2026
2027 PR c/67410
2028 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2029 % to determine val element to change. Assert that
2030 wchar_bytes * charwidth fits into val array.
2031
191816a3
MP
20322016-08-12 Marek Polacek <polacek@redhat.com>
2033
2034 PR c/7652
2035 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2036 (c_parser_postfix_expression): Likewise.
2037 * c-typeck.c (build_unary_op): Adjust fall through comment.
2038 (c_mark_addressable): Likewise.
2039
b95a64bb
JJ
20402016-08-11 Jakub Jelinek <jakub@redhat.com>
2041
2042 PR c/72816
2043 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2044 array member through typedef, for orig_qual_indirect == 0 clear
2045 orig_qual_type.
2046
895aa8e1
DM
20472016-08-08 David Malcolm <dmalcolm@redhat.com>
2048
2049 PR c/64955
2050 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2051 this up to selftest::run_c_tests.
2052 (selftest::run_c_tests): New function.
2053
0b212d8c
TS
20542016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2055
ae9281fc
TS
2056 * c-parser.c (struct oacc_routine_data): Add error_seen and
2057 fndecl_seen members.
2058 (c_finish_oacc_routine): Use these.
2059 (c_parser_declaration_or_fndef): Adjust.
2060 (c_parser_oacc_routine): Likewise. Support more C language
2061 constructs, and improve diagnostics. Move pragma context
2062 checking...
2063 (c_parser_pragma): ... here.
2064
0b212d8c
TS
2065 * c-parser.c (struct oacc_routine_data): New.
2066 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2067 Simplify code.
2068 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2069 declare target" attribute.
2070
76e2c821
JB
20712016-08-01 Jan Beulich <jbeulich@suse.com>
2072
2073 * c-fold.c (c_fully_fold_internal): Also emit shift count
2074 warnings for vector types.
2075 * c-typeck.c (build_binary_op): Likewise.
2076
f618a472
MP
20772016-07-29 Marek Polacek <polacek@redhat.com>
2078
2079 PR c/71742
2080 * c-decl.c (finish_struct): Rephrase an error message.
2081
efd0786f
MP
2082 PR c/71853
2083 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2084 to error node for invalid code.
2085
e00dceaf
MP
2086 PR c/71573
2087 * c-decl.c (implicitly_declare): Return decl early not only for
2088 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2089
673a107a
JJ
20902016-07-29 Jakub Jelinek <jakub@redhat.com>
2091
2092 PR c/71969
2093 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2094 on GNU extern inline functions.
2095
a5b5c8b6
MP
20962016-07-29 Marek Polacek <polacek@redhat.com>
2097
2098 PR c/71583
2099 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2100 check expr.value.
2101
e3fe09c1
UB
21022016-07-22 Uros Bizjak <ubizjak@gmail.com>
2103
2104 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2105
7c8f7eaa
DM
21062016-07-20 David Malcolm <dmalcolm@redhat.com>
2107
2108 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2109 spellcheck-tree.h
2110 (best_macro_match): Likewise, converting from a typedef to a
2111 subclass.
2112 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2113 (lookup_name_fuzzy): Update for change of best_macro_match to a
2114 subclass with a ctor that calls cpp_forall_identifiers.
2115
de6a69ee
DM
21162016-07-20 David Malcolm <dmalcolm@redhat.com>
2117
2118 * c-decl.c (implicit_decl_warning): Update for conversion of
2119 return type of lookup_name_fuzzy to const char *.
2120 (undeclared_variable): Likewise.
2121 (lookup_name_fuzzy): Convert return type from tree to
2122 const char *.
2123 * c-parser.c (c_parser_declaration_or_fndef): Update for
2124 conversion of return type of lookup_name_fuzzy to const char *.
2125 (c_parser_parameter_declaration): Likewise.
2126
b1c9c068
CP
21272016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2128
2129 * c-parser.c (c_parser_oacc_declare): Don't scan for
2130 GOMP_MAP_POINTER.
2131 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2132 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2133 zero-length subarrays.
2134
ddbbcb19
JJ
21352016-07-15 Jakub Jelinek <jakub@redhat.com>
2136
2137 PR c/71858
2138 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2139 instead of FUZZY_LOOKUP_NAME.
2140 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2141 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2142
dd36b877
JJ
21432016-07-14 Jakub Jelinek <jakub@redhat.com>
2144
2145 PR c/71858
2146 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2147
8c681247
TS
21482016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2149
2150 * c-parser.c (c_parser_generic_selection): Make type of variable
2151 auto_vec.
2152 (c_parser_omp_declare_simd): Likewise.
2153
bf4fa671
TS
21542016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2155
2156 * c-decl.c (struct c_struct_parse_info): Change member types
2157 from vec to auto_vec.
2158 (start_struct): Adjust.
2159 (finish_struct): Likewise.
2160
557e8c49
JJ
21612016-07-02 Jakub Jelinek <jakub@redhat.com>
2162
2163 PR c/71719
2164 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2165
54d19c3b
TS
21662016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2167
2168 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2169 Move pragma context checking into...
2170 (c_parser_omp_cancellation_point): ... here, and improve
2171 diagnostic messages.
2172 * c-typeck.c (c_finish_omp_cancel)
2173 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2174
152ef731
JJ
21752016-06-29 Jakub Jelinek <jakub@redhat.com>
2176
2177 PR c/71685
2178 * c-typeck.c (c_build_qualified_type): Don't clear
2179 C_TYPE_INCOMPLETE_VARS for the main variant.
2180
21812016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2182
2183 PR c/71552
2184 * c-typeck.c (output_init_element): Diagnose incompatible types
2185 before non-constant initializers.
2186
e9ac1f86
JJ
21872016-06-28 Jakub Jelinek <jakub@redhat.com>
2188
2189 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2190
277d7ee0
AK
21912016-06-23 Andi Kleen <ak@linux.intel.com>
2192
2193 * Make-lang.in: Add support for autofdo.
2194
1a4f11c8
DM
21952016-06-22 David Malcolm <dmalcolm@redhat.com>
2196
2197 PR c/70339
2198 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2199 (implicit_decl_warning): When issuing warnings for implicit
2200 declarations, attempt to provide a suggestion via
2201 lookup_name_fuzzy.
2202 (undeclared_variable): Likewise when issuing errors.
2203 (lookup_name_in_scope): Likewise.
2204 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2205 (best_macro_match): New typedef.
2206 (find_closest_macro_cpp_cb): New function.
2207 (lookup_name_fuzzy): New function.
2208 * c-parser.c: Include gcc-rich-location.h.
2209 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2210 (c_keyword_starts_typename): ...this new function.
2211 (c_parser_declaration_or_fndef): When issuing errors about
2212 missing "struct" etc, add a fixit. For other kinds of errors,
2213 attempt to provide a suggestion via lookup_name_fuzzy.
2214 (c_parser_parms_declarator): When looking ahead to detect typos in
2215 type names, also reject CPP_KEYWORD.
2216 (c_parser_parameter_declaration): When issuing errors about
2217 unknown type names, attempt to provide a suggestion via
2218 lookup_name_fuzzy.
2219 * c-tree.h (c_keyword_starts_typename): New prototype.
2220
5a578671
JM
22212016-06-20 Joseph Myers <joseph@codesourcery.com>
2222
2223 PR c/71601
2224 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2225 c_common_type returns error_mark_node.
2226
3f8257db 22272016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2228
2229 PR c/69507
2230 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2231 __alignof__ (expression).
2232
6a3f203c
DM
22332016-06-14 David Malcolm <dmalcolm@redhat.com>
2234
2235 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2236
264757fb
DM
22372016-06-14 David Malcolm <dmalcolm@redhat.com>
2238
2239 * c-typeck.c (build_component_ref): Simplify fixit code by
2240 using gcc_rich_location::add_fixit_misspelled_id.
2241 (set_init_label): Likewise.
2242
f7e4f2e3
DM
22432016-06-13 David Malcolm <dmalcolm@redhat.com>
2244
2245 * c-parser.c (c_parser_initelt): Provide location of name for new
2246 location_t param of set_init_label.
2247 * c-tree.h (set_init_label): Add location_t param.
2248 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2249 param and use it when issuing error messages about unrecognized
2250 field names. Attempt to provide a fixit hint if appropriate,
2251 otherwise update the error message to provide the type name.
2252
4b1ffdb1
TS
22532016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2254
2255 PR c/71381
2256 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2257 Loosen checking.
2258
44a845ca
MS
22592016-06-08 Martin Sebor <msebor@redhat.com>
2260 Jakub Jelinek <jakub@redhat.com>
2261
2262 PR c++/70507
2263 PR c/68120
2264 * c-typeck.c (convert_arguments): Don't promote last argument
2265 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2266
92a5f2ba
MP
22672016-06-08 Marek Polacek <polacek@redhat.com>
2268
2269 PR c/71418
2270 * c-decl.c (grokdeclarator): Check TYPE_P.
2271
08203f73
MP
2272 PR c/71426
2273 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2274 code.
2275
6ffd47b7
DM
22762016-06-07 David Malcolm <dmalcolm@redhat.com>
2277
2278 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2279 and structure element reference, capture the location of the
2280 element name token and pass it to build_component_ref.
2281 (c_parser_postfix_expression_after_primary): Likewise for
2282 structure element dereference.
2283 (c_parser_omp_variable_list): Likewise for
2284 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2285 * c-tree.h (build_component_ref): Add location_t param.
2286 * c-typeck.c (build_component_ref): Add location_t param
2287 COMPONENT_LOC. Use it, if available, when issuing hints about
2288 mispelled member names to provide a fixit replacement hint.
2289
1f40cff3
MP
22902016-06-06 Marek Polacek <polacek@redhat.com>
2291
2292 PR c/71362
2293 * c-parser.c (c_parser_direct_declarator): Set location.
2294
5545a907
MP
22952016-06-06 Marek Polacek <polacek@redhat.com>
2296
2297 * c-typeck.c (comptypes_internal): Handle comparisons of
2298 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2299 TYPE_REF_CAN_ALIAS_ALL.
2300
b605f663
CLT
23012016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2302
2303 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2304 arguments as addressable when async clause exists.
2305
00631022
JJ
23062016-05-30 Jakub Jelinek <jakub@redhat.com>
2307
2308 PR c++/71349
2309 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2310 when combined with target construct.
2311
7211a097
JJ
23122016-05-26 Jakub Jelinek <jakub@redhat.com>
2313
2314 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2315 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2316
95efe6b6
MP
23172016-05-25 Marek Polacek <polacek@redhat.com>
2318
2319 PR c/71265
2320 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2321
a23faf7a
MP
2322 PR c/71266
2323 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2324
e46c7770
CP
23252016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2326
2327 * c-parser.c (c_parser_oacc_declare): Add support for
2328 GOMP_MAP_FIRSTPRIVATE_POINTER.
2329 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2330 argument with enum c_omp_region_type ort.
2331 (handle_omp_array_sections): Likewise. Update call to
2332 handle_omp_array_sections_1.
2333 (c_finish_omp_clauses): Add specific errors and warning messages for
2334 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2335 call to handle_omp_array_sections.
2336
a04e69c0
TS
23372016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2338
2339 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2340
f17a223d
RB
23412016-05-24 Richard Biener <rguenther@suse.de>
2342
2343 PR middle-end/70434
2344 PR c/69504
2345 * c-typeck.c (build_array_ref): Do not complain about indexing
2346 non-lvalue vectors. Adjust for function name change.
2347
79063edd
MS
23482016-05-20 Martin Sebor <msebor@redhat.com>
2349
2350 PR c/71115
2351 * c-typeck.c (error_init): Use
2352 expansion_point_location_if_in_system_header.
2353 (warning_init): Same.
2354
8a40fef3
DM
23552016-05-19 David Malcolm <dmalcolm@redhat.com>
2356
2357 PR c/71171
2358 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2359 in error-handling.
2360 (c_parser_postfix_expression): Likewise.
2361 * c-tree.h (c_expr::set_error): New method.
2362 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2363 that result's range is initialized.
2364
e9892350
JG
23652016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2366
2367 * c-typeck.c (parser_build_unary_op): Fix formatting.
2368
8fad45f5
MW
23692016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2370
2371 * c-decl.c (grokdeclarator): Remove errmsg and use of
2372 targetm.invalid_return_type.
2373 (grokparms): Remove errmsg and use of
2374 targetm.invalid_parameter_type.
2375
aa4b467b
JM
23762016-05-13 Joseph Myers <joseph@codesourcery.com>
2377
2378 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2379 function return type.
2380
4f2e1536
MP
23812016-05-12 Marek Polacek <polacek@redhat.com>
2382
2383 PR c/70756
2384 * c-decl.c (build_compound_literal): Pass LOC down to
2385 c_incomplete_type_error.
2386 * c-tree.h (require_complete_type): Adjust declaration.
2387 (c_incomplete_type_error): Likewise.
2388 * c-typeck.c (require_complete_type): Add location parameter, pass it
2389 down to c_incomplete_type_error.
2390 (c_incomplete_type_error): Add location parameter, pass it down to
2391 error_at.
2392 (build_component_ref): Pass location down to c_incomplete_type_error.
2393 (default_conversion): Pass location down to require_complete_type.
2394 (build_array_ref): Likewise.
2395 (build_function_call_vec): Likewise.
2396 (convert_arguments): Likewise.
2397 (build_unary_op): Likewise.
2398 (build_c_cast): Likewise.
2399 (build_modify_expr): Likewise.
2400 (convert_for_assignment): Likewise.
2401 (c_finish_omp_clauses): Likewise.
2402
d6e83a8d
MM
24032016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2404
2405 PR c/43651
2406 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2407 is enabled.
2408 * c-errors.c (pedwarn_c90): Return true if warned.
2409 * c-tree.h (pedwarn_c90): Change return type to bool.
2410 (enum c_declspec_word): Add new enumerator cdw_atomic.
2411
5c3a10fb
MP
24122016-05-11 Marek Polacek <polacek@redhat.com>
2413
2414 PR c++/71024
2415 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2416 diagnose_mismatched_attributes and call it.
2417
cf68d92c
MP
24182016-05-10 Marek Polacek <polacek@redhat.com>
2419
2420 PR c/70255
2421 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2422 on a declaration following the definition.
2423
351f85c5
JJ
24242016-05-05 Jakub Jelinek <jakub@redhat.com>
2425
2426 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2427 parse it through to c_parser_c99_block_statement.
2428 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2429 caller.
2430
deef7113
MP
24312016-05-04 Marek Polacek <polacek@redhat.com>
2432
2433 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2434 OPT_Wdangling_else.
2435
de55efd5
MP
24362016-05-04 Marek Polacek <polacek@redhat.com>
2437
2438 PR c/48778
2439 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2440 for macro expansions.
2441
79ce98bc
MP
24422016-05-03 Marek Polacek <polacek@redhat.com>
2443
2444 PR c/70859
2445 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2446 check_builtin_function_arguments.
2447
fb2647aa
RB
24482016-05-03 Richard Biener <rguenther@suse.de>
2449
2450 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2451 the checksum from the previous stage.
2452
77886428
CP
24532016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2454
2455 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2456 c_finish_omp_clauses.
2457 (c_parser_omp_all_clauses): Likewise.
2458 (c_parser_oacc_cache): Likewise.
2459 (c_parser_oacc_loop): Likewise.
2460 (omp_split_clauses): Likewise.
2461 (c_parser_omp_declare_target): Likewise.
2462 (c_parser_cilk_all_clauses): Likewise.
2463 (c_parser_cilk_for): Likewise.
2464 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2465 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2466
7176a4a0
MP
24672016-05-02 Marek Polacek <polacek@redhat.com>
2468
2469 PR c/70851
2470 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2471 incomplete type.
2472
e7ff0319
CP
24732016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2474
2475 PR middle-end/70626
2476 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2477 OACC_LOOP_CLAUSE_MASK.
2478 (c_parser_oacc_kernels_parallel): Update call to
2479 c_oacc_split_loop_clauses.
2480
9f405ce1
AM
24812016-04-28 Andrew MacLeod <amacleod@redhat.com>
2482
2483 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2484 argument to build_modify_expr in two cases.
2485
c1e1f433
BS
24862016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2487
2488 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2489 warn_for_memset instead of warning directly here.
2490
2448a956
MP
24912016-04-26 Marek Polacek <polacek@redhat.com>
2492
2493 PR c/67784
2494 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2495 out of ...
2496 (c_parser_for_statement): ... here.
2497 (c_parser_if_statement): Use it.
2498 (c_parser_switch_statement): Use it.
2499 (c_parser_while_statement): Use it.
2500
b02a5e26
MP
2501 PR c/70791
2502 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2503
477d4906
IV
25042016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2505
2506 PR c++/69363
2507 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2508 instead of c_finish_cilk_clauses.
2509 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2510 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2511 floating-point variables in the linear clause for Cilk Plus.
2512
fe37c7af
MM
25132016-04-18 Michael Matz <matz@suse.de>
2514
2515 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2516 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2517
949505a9
MP
25182016-04-15 Marek Polacek <polacek@redhat.com>
2519
2520 PR c/70671
2521 * c-typeck.c (build_unary_op): Pass location down to error and
2522 warning call.
2523
dda1bf61
JJ
25242016-04-15 Jakub Jelinek <jakub@redhat.com>
2525
2526 PR c/70436
2527 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2528 where needed.
2529 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2530 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2531 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2532 Adjust c_parser_pragma callers.
2533 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2534 caller.
2535 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2536 c_parser_statement.
2537 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2538 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2539 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2540 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2541 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2542 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2543 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2544 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2545 down where needed.
2546 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2547 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2548 calls.
2549
99cd9857
MP
25502016-04-13 Marek Polacek <polacek@redhat.com>
2551
2552 PR c/70436
2553 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2554 adjust callers.
2555 (c_parser_statement): Likewise.
2556 (c_parser_c99_block_statement): Likewise.
2557 (c_parser_while_statement): Likewise.
2558 (c_parser_for_statement): Likewise.
2559 (c_parser_if_body): Don't set IF_P here.
2560 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2561 about dangling else here.
2562 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2563 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2564 warn about dangling else here.
2565
f13355da
MP
25662016-04-04 Marek Polacek <polacek@redhat.com>
2567
2568 PR c/70307
2569 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2570
5fde6a45
MP
25712016-03-31 Marek Polacek <polacek@redhat.com>
2572
2573 PR c/70297
2574 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2575
4bbf545b
DM
25762016-03-18 David Malcolm <dmalcolm@redhat.com>
2577
2578 PR c/70281
2579 * c-parser.c (c_parser_postfix_expression): Set the source range
2580 for uses of "__builtin_types_compatible_p".
2581
fcc2b74f
JJ
25822016-03-17 Jakub Jelinek <jakub@redhat.com>
2583
2584 PR c/70280
2585 * c-typeck.c (composite_type): Don't count void_list_node
2586 into len, if the list is terminated by void_list_node, start
2587 with void_list_node instead of NULL for newargs. Stop
2588 at void_list_node.
2589
ab4c578f
MP
25902016-03-16 Marek Polacek <polacek@redhat.com>
2591
2592 PR c/70093
2593 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2594 nested functions returning VM types.
2595
96b3c82d
CP
25962016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2597
2598 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2599 when calling c_finish_omp_clauses.
2600
29b9828f
BS
26012016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2602
2603 PR c/69824
2604 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2605 for later.
2606
7ff6ca38
MP
26072016-03-04 Marek Polacek <polacek@redhat.com>
2608
2609 PR c/69798
2610 * c-parser.c (c_parser_postfix_expression): Call
2611 c_parser_cast_expression rather than c_parser_postfix_expression.
2612
686e2237
JJ
26132016-03-01 Jakub Jelinek <jakub@redhat.com>
2614
2615 PR c/69796
2616 PR c/69974
2617 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2618 of incomplete decls to error_mark_node.
2619
0b05329b
MP
26202016-02-24 Marek Polacek <polacek@redhat.com>
2621
2622 PR c/69819
2623 * c-decl.c (finish_decl): Don't update the copy of the type of a
2624 different decl type.
2625
067fbd8b
JJ
26262016-02-23 Jakub Jelinek <jakub@redhat.com>
2627
2628 PR objc/69844
2629 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2630 in id_kind reclassification.
2631
bf14eba2
JJ
26322016-02-16 Jakub Jelinek <jakub@redhat.com>
2633
2634 PR c/69835
2635 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2636
ba539195
JN
26372016-02-16 James Norris <jnorris@codesourcery.com>
2638
2639 PR c/64748
2640 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2641
16595a1f
BS
26422016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2643
f48dfe98
BS
2644 * c-decl.c (build_null_declspecs): Zero the entire struct.
2645
16595a1f
BS
2646 PR c/69522
2647 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2648 callers changed. If nested_p is true, use it to call
2649 finish_implicit_inits.
2650 * c-tree.h (finish_implicit_inits): Declare.
2651 * c-typeck.c (finish_implicit_inits): New function. Move code
2652 from ...
2653 (push_init_level): ... here.
2654 (set_designator, process_init_element): Call finish_implicit_inits.
2655
66756373
JJ
26562016-02-11 Jakub Jelinek <jakub@redhat.com>
2657
2658 PR c/69768
2659 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2660 arguments for -Waddress warning.
2661
1066e9b5
JJ
26622016-02-04 Jakub Jelinek <jakub@redhat.com>
2663
2664 PR c/69669
2665 * c-decl.c (finish_enum): When honoring mode attribute,
2666 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2667
3a5d2ba4
JJ
26682016-01-29 Jakub Jelinek <jakub@redhat.com>
2669
2670 PR debug/69518
2671 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2672 all type variants, not just TYPE_MAIN_VARIANT.
2673
cbdd8ae0
JJ
26742016-01-27 Jakub Jelinek <jakub@redhat.com>
2675
2676 PR debug/66869
2677 * c-decl.c (c_write_global_declarations_1): Warn with
2678 warn_unused_function if static prototype without definition
2679 is not C_DECL_USED.
2680
fa74a4bc
MP
26812016-01-27 Marek Polacek <polacek@redhat.com>
2682
2683 PR c/68062
2684 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2685 to unsigned, if needed. Add -Wsign-compare warning.
2686
13f92e8d
JJ
26872016-01-26 Jakub Jelinek <jakub@redhat.com>
2688
2689 PR tree-optimization/69483
2690 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2691
cd8e73dc 26922016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2693
2694 PR c/24293
2695 * c-tree.h (incomplete_record_decls): Declare.
2696 * c-parser.c (incomplete_record_decls): Define.
2697 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2698 report error if any decl has zero size.
2699 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2700 or enum type to incomplete_record_decls.
2701
e6d6ec9e
TV
27022016-01-14 Tom de Vries <tom@codesourcery.com>
2703
2704 PR tree-optimization/68773
2705 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2706 set force_output.
2707
00083992
MP
27082016-01-14 Marek Polacek <polacek@redhat.com>
2709
2710 PR c/69262
2711 * c-decl.c (grokdeclarator): Provide more information for invalid
2712 array declarations.
2713
7443cf13
DM
27142016-01-06 David Malcolm <dmalcolm@redhat.com>
2715
2716 * c-parser.c (c_parser_unary_expression): For dereferences, build
2717 a combined location before calling build_indirect_ref, so that
2718 error reports cover the full range, manually updating the c_expr
2719 src_range.
2720
6b131d5b
MP
27212016-01-06 Marek Polacek <polacek@redhat.com>
2722
2723 PR sanitizer/69099
2724 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2725 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2726 NULL.
2727
818ab71a
JJ
27282016-01-04 Jakub Jelinek <jakub@redhat.com>
2729
2730 Update copyright years.
2731
2fe0a208
MP
27322016-01-04 Marek Polacek <polacek@redhat.com>
2733
2734 PR c/68908
2735 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2736 optimization to use __atomic_fetch_* built-in if possible.
2737
c7b48c8a
TS
27382015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2739
2740 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2741 into...
2742 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2743 all users.
2744
fda5652f
MP
27452015-12-22 Marek Polacek <polacek@redhat.com>
2746
2747 PR c/69002
2748 * c-typeck.c (build_component_ref): Warn when acessing elements of
2749 atomic structures or unions.
2750
745e411d
DM
27512015-12-21 David Malcolm <dmalcolm@redhat.com>
2752
2753 * c-typeck.c: Include "gcc-rich-location.h".
2754 (build_binary_op): In the two places that call binary_op_error,
2755 create a gcc_rich_location and populate it with the location of
2756 the binary op and its two operands.
2757
94c40e19
DM
27582015-12-16 David Malcolm <dmalcolm@redhat.com>
2759
2760 * c-parser.c (c_parser_statement_after_labels): When calling
2761 c_finish_return, Use the return expression's location if it has
2762 one, falling back to the location of the first token within it.
2763 * c-typeck.c (c_finish_return): When issuing warnings about
2764 the incorrect presence/absence of a return value, issue a note
2765 showing the declaration of the function.
2766
de67c4c3
DM
27672015-12-16 David Malcolm <dmalcolm@redhat.com>
2768
2769 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2770 to 4.
2771 (c_parser_peek_nth_token): New function.
2772 (c_parser_peek_conflict_marker): New function.
2773 (c_parser_error): Detect conflict markers and report them as such.
2774
a10704e1
DM
27752015-12-16 David Malcolm <dmalcolm@redhat.com>
2776
2777 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2778 to preserve range information for the primary expression
2779 in the call to c_parser_postfix_expression_after_primary.
2780
8062bca6
DM
27812015-12-16 David Malcolm <dmalcolm@redhat.com>
2782
2783 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2784 expression location, falling back on the first token location,
2785 rather than always using the latter.
2786
d06f8b75
MP
27872015-12-16 Marek Polacek <polacek@redhat.com>
2788
2789 PR c/64637
2790 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2791 available.
2792
2994fb91
MP
27932015-12-15 Marek Polacek <polacek@redhat.com>
2794
2795 PR c/68907
2796 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2797 artificial decl.
2798
a1b93f8d
DM
27992015-12-08 David Malcolm <dmalcolm@redhat.com>
2800
2801 * c-parser.c (c_parser_alignof_expression): Capture location of
2802 closing parenthesis (if any), or of end of unary expression, and
2803 use it to build a src_range for the expression.
2804
46c6e1e2
DM
28052015-12-08 David Malcolm <dmalcolm@redhat.com>
2806
2807 PR c/68757
2808 * c-parser.c (c_parser_get_builtin_args): Add
2809 "out_close_paren_loc" param, and write back to it.
2810 (c_parser_postfix_expression): Capture the closing
2811 parenthesis location for RID_CHOOSE_EXPR,
2812 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2813 RID_BUILTIN_SHUFFLE and use it to set the source range
2814 for such expressions; within RID_BUILTIN_COMPLEX set
2815 the underlying location.
2816
66189108
MP
28172015-12-07 Marek Polacek <polacek@redhat.com>
2818
2819 PR c/68668
2820 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2821 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2822
f187980b
EB
28232015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2824
2825 * c-tree.h (c_build_va_arg): Adjust prototype.
2826 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2827 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2828 parameter, adjust throughout and issue an error if EXPR is a component
2829 with reverse storage order.
2830
4250754e
JM
28312015-12-02 Jason Merrill <jason@redhat.com>
2832
2833 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2834 (c_fully_fold_internal, decl_constant_value_for_optimization):
2835 Move from c-common.c.
2836 * c-tree.h: Declare decl_constant_value_for_optimization.
2837 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2838
e9e32ee6
JM
28392015-12-02 Joseph Myers <joseph@codesourcery.com>
2840
2841 PR c/68162
2842 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2843 following link from declarator to next declarator. Track original
2844 qualified type and pass it to c_build_qualified_type.
2845 * c-typeck.c (c_build_qualified_type): Add arguments
2846 orig_qual_type and orig_qual_indirect.
2847
ff7a55bf
TS
28482015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2849
2850 * c-parser.c (c_parser_omp_clause_name)
2851 (c_parser_oacc_all_clauses): Alphabetical sorting.
2852
657e4e47
JJ
28532015-12-02 Jakub Jelinek <jakub@redhat.com>
2854
2855 PR c/68533
2856 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2857 for diagnostics.
2858
37d5ad46
JB
28592015-12-01 Julian Brown <julian@codesourcery.com>
2860 Cesar Philippidis <cesar@codesourcery.com>
2861 James Norris <James_Norris@mentor.com>
2862
2863 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2864 (c_parser_oacc_clause_use_device): New function.
2865 (c_parser_oacc_all_clauses): Add use_device support.
2866 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2867 (c_parser_oacc_host_data): New function.
2868 (c_parser_omp_construct): Add host_data support.
2869 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2870 * c-typeck.c (c_finish_oacc_host_data): New function.
2871 (c_finish_omp_clauses): Add use_device support.
2872
a4850ce9
JH
28732015-11-29 Jan Hubicka <hubicka@ucw.cz>
2874
2875 PR c/67106
2876 * c-decl.c: Set TYPE_PACKED in variants.
2877
b58d3df2
ML
28782015-11-27 Martin Liska <mliska@suse.cz>
2879
2880 PR c++/68312
2881 * c-array-notation.c (fix_builtin_array_notation_fn):
2882 Use release_vec_vec instead of vec::release.
2883 (build_array_notation_expr): Likewise.
2884 (fix_conditional_array_notations_1): Likewise.
2885 (fix_array_notation_expr): Likewise.
2886 (fix_array_notation_call_expr): Likewise.
2887
aec17bfe
JJ
28882015-11-27 Jakub Jelinek <jakub@redhat.com>
2889
2890 PR c/63326
2891 * c-parser.c (c_parser_compound_statement_nostart): If
2892 last_label is true, use pragma_stmt instead of pragma_compound
2893 as second c_parser_pragma argument.
2894 (c_parser_omp_ordered, c_parser_omp_target_update,
2895 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2896 false as second argument to c_parser_skip_to_pragma_eol after
2897 diagnosing standalone directives used in pragma_stmt context.
2898
688c4de0
IV
28992015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2900
2901 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2902 with "if (ENABLE_OFFLOADING)".
2903
cbd03aee
DM
29042015-11-23 David Malcolm <dmalcolm@redhat.com>
2905
2906 PR objc/68438
2907 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2908 for various Objective-C constructs: Class.name syntax,
2909 @selector(), @protocol(), @encode(), and [] message syntax.
2910
a87a86e1
DM
29112015-11-20 David Malcolm <dmalcolm@redhat.com>
2912
2913 PR 62314
2914 * c-typeck.c (should_suggest_deref_p): New function.
2915 (build_component_ref): Special-case POINTER_TYPE when
2916 generating a "not a structure of union" error message, and
2917 suggest a "->" rather than a ".", providing a fix-it hint.
2918
8ece8dfb
DM
29192015-11-19 David Malcolm <dmalcolm@redhat.com>
2920
2921 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2922 candidate into a new function, find_closest_identifier.
2923
433068cc
MP
29242015-11-19 Marek Polacek <polacek@redhat.com>
2925
2926 PR c/68412
2927 * c-typeck.c (parser_build_binary_op): Properly handle
2928 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2929
bef08b71
DM
29302015-11-17 David Malcolm <dmalcolm@redhat.com>
2931
2932 * c-parser.c (set_c_expr_source_range): Bulletproof both
2933 overloaded implementations against NULL expr->value.
2934 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2935 values.
2936 (c_parser_unary_expression): Likewise when handling addresses of
2937 labels.
2938 (c_parser_postfix_expression): Likewise for statement expressions,
2939 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2940 __builtin_va_arg, and for __builtin_offset_of.
2941 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2942 src_range using the range of the braced initializer.
2943 (c_parser_transaction_expression): Set src_range for "ret" to a
2944 sane pair of values.
2945
fff77217
KY
29462015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2947
2948 * c-parser.c (c_finish_omp_declare_simd): Look for
2949 "simd" attribute as well. Update error message.
2950
1d899da2
TS
29512015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2952
2953 * c-parser.c (c_parser_omp_declare_target): Adjust.
2954
e4606348
JJ
29552015-11-14 Jakub Jelinek <jakub@redhat.com>
2956
2957 * c-typeck.c (c_finish_omp_clauses): Don't mark
2958 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2959
3e636daf
MP
29602015-11-14 Marek Polacek <polacek@redhat.com>
2961
2962 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2963 * c-typeck.c: Likewise.
2964
ebedc9a3
DM
29652015-11-13 David Malcolm <dmalcolm@redhat.com>
2966
2967 * c-decl.c (warn_defaults_to): Pass line_table to
2968 rich_location ctor.
2969 * c-errors.c (pedwarn_c99): Likewise.
2970 (pedwarn_c90): Likewise.
2971 * c-parser.c (set_c_expr_source_range): New functions.
2972 (c_token::get_range): New method.
2973 (c_token::get_finish): New method.
2974 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2975 based on the range from the start of the LHS to the end of the
2976 RHS.
2977 (c_parser_conditional_expression): Likewise, based on the range
2978 from the start of the cond.value to the end of exp2.value.
2979 (c_parser_binary_expression): Call set_c_expr_source_range on
2980 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2981 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2982 based on the cast_loc through to the end of the expr.
2983 (c_parser_unary_expression): Likewise, based on the
2984 op_loc through to the end of op.
2985 (c_parser_sizeof_expression) Likewise, based on the start of the
2986 sizeof token through to either the closing paren or the end of
2987 expr.
2988 (c_parser_postfix_expression): Likewise, using the token range,
2989 or from the open paren through to the close paren for
2990 parenthesized expressions.
2991 (c_parser_postfix_expression_after_primary): Likewise, for
2992 various kinds of expression.
2993 * c-tree.h (struct c_expr): Add field "src_range".
2994 (c_expr::get_start): New method.
2995 (c_expr::get_finish): New method.
2996 (set_c_expr_source_range): New decls.
2997 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2998 on ret for prefix unary ops.
2999 (parser_build_binary_op): Likewise, running from the start of
3000 arg1.value through to the end of arg2.value.
3001
ec8b536f
MP
30022015-11-13 Marek Polacek <polacek@redhat.com>
3003
3004 PR c/68320
3005 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3006
277fe616
DM
30072015-11-13 David Malcolm <dmalcolm@redhat.com>
3008
3009 * c-typeck.c: Include spellcheck.h.
3010 (lookup_field_fuzzy_find_candidates): New function.
3011 (lookup_field_fuzzy): New function.
3012 (build_component_ref): If the field was not found, try using
3013 lookup_field_fuzzy and potentially offer a suggestion.
3014
6e232ba4
JN
30152015-11-12 James Norris <jnorris@codesourcery.com>
3016 Joseph Myers <joseph@codesourcery.com>
3017
3018 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3019 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3020 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3021 and PRAGMA_OMP_CLAUSE_LINK.
3022 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3023 and PRAGMA_OACC_CLAUSE_LINK.
3024 (OACC_DECLARE_CLAUSE_MASK): New definition.
3025 (c_parser_oacc_declare): New function.
3026
9be4f715
MP
30272015-11-12 Marek Polacek <polacek@redhat.com>
3028
3029 PR c/67784
3030 * c-parser.c (c_parser_for_statement): Reclassify the token in
3031 a correct scope.
3032
e78bede6
MP
30332015-11-11 Marek Polacek <polacek@redhat.com>
3034
3035 PR c/68107
3036 PR c++/68266
3037 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3038 checking the size of an array.
3039
69f293c9
AM
30402015-11-11 Andrew MacLeod <amacleod@redhat.com>
3041
3042 * c-array-notation.c: Remove unused header files.
3043 * c-aux-info.c: Likewise.
3044 * c-convert.c: Likewise.
3045 * c-decl.c: Likewise.
3046 * c-errors.c: Likewise.
3047 * c-lang.c: Likewise.
3048 * c-objc-common.c: Likewise.
3049 * c-parser.c: Likewise.
3050 * c-typeck.c: Likewise.
3051 * gccspec.c: Likewise.
3052
3a40d81d
NS
30532015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3054 Cesar Philippidis <cesar@codesourcery.com>
3055 James Norris <jnorris@codesourcery.com>
3056 Julian Brown <julian@codesourcery.com>
3057 Nathan Sidwell <nathan@codesourcery.com>
3058
3059 c/
3060 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3061 routine arg.
3062 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3063 (c_parser_pragma): Parse 'acc routine'.
3064 (OACC_ROUTINE_CLAUSE_MARK): Define.
3065 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3066
fc402eec
AA
30672015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3068
3069 PR debug/67192
3070 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3071 location of the backward-goto to the start of the loop body.
3072
f6b0b3db
AA
30732015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3074
3075 PR debug/67192
3076 * c-parser.c (c_parser_while_statement): Finish the loop before
3077 parsing ahead for misleading indentation.
3078 (c_parser_for_statement): Likewise.
3079
ee45a32d
EB
30802015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3081
3082 * c-decl.c (finish_struct): If the structure has reverse storage
3083 order, rewrite the type of array fields with scalar component. Call
3084 maybe_apply_pragma_scalar_storage_order on entry.
3085 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3086 errors on bit-fields and reverse SSO here and not...
3087 (c_mark_addressable): ...here.
3088 (output_init_element): Adjust call to initializer_constant_valid_p.
3089 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3090
8a645150
DM
30912015-11-06 David Malcolm <dmalcolm@redhat.com>
3092
3093 * c-decl.c (warn_defaults_to): Update for change in signature
3094 of diagnostic_set_info.
3095 * c-errors.c (pedwarn_c99): Likewise.
3096 (pedwarn_c90): Likewise.
3097 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3098 for textinfo::set_location.
3099
7a5e4956
CP
31002015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3101 Thomas Schwinge <thomas@codesourcery.com>
3102 James Norris <jnorris@codesourcery.com>
3103
3104 * c-parser.c (c_parser_omp_clause_name): Add support for
3105 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3106 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3107 default(none) in OpenACC.
3108 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3109 arguments.
3110 (c_parser_oacc_clause_tile): New function.
3111 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3112 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3113 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3114 TILE}.
3115 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3116 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3117 FIRSTPRIVATE}.
3118 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3119 (c_parser_oacc_update): Update the error message for missing clauses.
3120 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3121 and OMP_CLAUSE_INDEPENDENT.
3122
bfcfbfa0
MP
31232015-11-05 Marek Polacek <polacek@redhat.com>
3124
3125 PR c/68090
3126 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3127 deal with pre-evaluation on invalid types.
3128
e01d41e5
JJ
31292015-11-05 Jakub Jelinek <jakub@redhat.com>
3130 Ilya Verbin <ilya.verbin@intel.com>
3131
3132 * c-parser.c: Include context.h and gimple-expr.h.
3133 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3134 monotonic together with nonmonotonic.
3135 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3136 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3137 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3138 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3139 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3140 expressions on combined target teams before the target.
3141 (c_parser_omp_declare_target): If decl has "omp declare target" or
3142 "omp declare target link" attribute, and cgraph or varpool node already
3143 exists, then set corresponding flags. Call c_finish_omp_clauses
3144 in the parenthesized extended-list syntax case.
3145 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3146 declare target.
3147 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3148 on OMP_CLAUSE_REDUCTION array sections.
3149 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3150 into the constant offset, or for variable low-bound using
3151 POINTER_PLUS_EXPR. For structure element based array sections use
3152 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3153 (c_finish_omp_clauses): Drop generic_field_head, structure
3154 elements are now always mapped even as array section bases,
3155 diagnose same var in data sharing and mapping clauses. Diagnose if
3156 linear step on declare simd is neither a constant nor a uniform
3157 parameter. Look through POINTER_PLUS_EXPR for array section
3158 reductions. Diagnose the same var or function appearing multiple
3159 times on the same directive. Fix up wording for the to clause if t
3160 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3161 modifier on kinds other than dynamic or guided or nonmonotonic
3162 modifier together with ordered clause.
3163
4bf9e5a8
TS
31642015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3165 Chung-Lin Tang <cltang@codesourcery.com>
3166
3167 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3168
2adfab87
AM
31692015-10-29 Andrew MacLeod <amacleod@redhat.com>
3170
3171 * c-array-notation.c: Reorder #include's and remove duplicates.
3172 * c-aux-info.c: Likewise.
3173 * c-convert.c: Likewise.
3174 * c-decl.c: Likewise.
3175 * c-errors.c: Likewise.
3176 * c-lang.c: Likewise.
3177 * c-objc-common.c: Likewise.
3178 * c-parser.c: Likewise.
3179 * c-typeck.c: Likewise.
3180
e922069e
JW
31812015-10-26 Jim Wilson <jim.wilson@linaro.org>
3182
3183 PR debug/66068
3184 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3185 after calling build_qualified_type.
3186
765dd391
CP
31872015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3188 Thomas Schwinge <thomas@codesourcery.com>
3189 James Norris <jnorris@codesourcery.com>
3190 Joseph Myers <joseph@codesourcery.com>
3191 Julian Brown <julian@codesourcery.com>
3192 Bernd Schmidt <bschmidt@redhat.com>
3193
3194 * c-parser.c (c_parser_oacc_shape_clause): New.
3195 (c_parser_oacc_simple_clause): New.
3196 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3197 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3198
88bae6f4
TS
31992015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3200 James Norris <jnorris@codesourcery.com>
3201 Cesar Philippidis <cesar@codesourcery.com>
3202
3203 PR c/64765
3204 PR c/64880
3205 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3206 parameters, and handle these. Adjust all users.
3207 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3208 into...
3209 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3210 all users.
3211 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3212 declare functions.
3213 (c_finish_omp_construct): Declare function.
3214 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3215 Merge functions into...
3216 (c_finish_omp_construct): ... this new function.
3217
a8fc2579
RB
32182015-10-22 Richard Biener <rguenther@suse.de>
3219
3220 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3221 before folding a MINUS_EXPR.
3222
e9122ef6
MP
32232015-10-21 Marek Polacek <polacek@redhat.com>
3224
3225 PR c/68024
3226 * c-decl.c (start_function): Warn about vararg functions without
3227 a prototype.
3228
9f47c7e5
IE
32292015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3230
3231 * c-typeck.c (build_conditional_expr): Use boolean vector
3232 type for vector comparison.
3233 (build_vec_cmp): New.
3234 (build_binary_op): Use build_vec_cmp for comparison.
3235
fa60eeb9
MP
32362015-10-20 Marek Polacek <polacek@redhat.com>
3237
3238 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3239
2c7020eb
MP
32402015-10-20 Marek Polacek <polacek@redhat.com>
3241
3242 PR c/67964
3243 * c-parser.c (c_parser_attributes): Break out of the loop if the
3244 token after an attribute isn't a comma.
3245
d9a6bd32
JJ
32462015-10-13 Jakub Jelinek <jakub@redhat.com>
3247 Aldy Hernandez <aldyh@redhat.com>
3248
3249 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3250 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3251 (c_parser_omp_variable_list): Handle structure elements for
3252 map, to and from clauses. Handle array sections in reduction
3253 clause. Formatting fixes.
3254 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3255 if clause modifiers.
3256 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3257 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3258 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3259 c_parser_omp_clause_is_device_ptr): New functions.
3260 (c_parser_omp_clause_ordered): Parse optional parameter.
3261 (c_parser_omp_clause_reduction): Handle array reductions.
3262 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3263 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3264 functions.
3265 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3266 (c_parser_omp_clause_depend_sink): New function.
3267 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3268 (c_parser_omp_clause_map): Parse release/delete map kinds and
3269 optional always modifier.
3270 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3271 and c_finish_omp_clauses callers.
3272 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3273 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3274 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3275 (OMP_CRITICAL_CLAUSE_MASK): Define.
3276 (c_parser_omp_critical): Parse critical clauses.
3277 (c_parser_omp_for_loop): Handle doacross loops, adjust
3278 c_finish_omp_for and c_finish_omp_clauses callers.
3279 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3280 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3281 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3282 (c_parser_omp_for): Disallow ordered clause when combined with
3283 distribute. Disallow linear clause when combined with distribute
3284 and not combined with simd.
3285 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3286 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3287 parse clauses and if depend clause is found, don't parse a body.
3288 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3289 Allow target parallel without for after it.
3290 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3291 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3292 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3293 invalid kinds.
3294 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3295 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3296 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3297 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3298 functions.
3299 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3300 defaultmap and is_device_ptr clauses.
3301 (c_parser_omp_target): Parse target parallel and target simd. Set
3302 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3303 and target exit data. Diagnose invalid map kinds.
3304 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3305 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3306 construct.
3307 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3308 &omp_priv.
3309 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3310 (c_parser_omp_taskloop): New function.
3311 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3312 handle PRAGMA_OMP_TASKLOOP.
3313 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3314 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3315 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3316 Add IS_OMP argument, handle structure element bases, diagnose
3317 bitfields, pass IS_OMP recursively, diagnose known zero length
3318 array sections in depend clauses, handle array sections in reduction
3319 clause, diagnose negative length even for pointers.
3320 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3321 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3322 array sections in reduction clause, set
3323 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3324 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3325 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3326 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3327
21ba0cea
MP
33282015-10-06 Marek Polacek <polacek@redhat.com>
3329
3330 * c-parser.c (c_parser_statement_after_labels): Use
3331 protected_set_expr_location.
3332 (c_parser_omp_clause_num_gangs): Likewise.
3333 (c_parser_omp_clause_num_threads): Likewise.
3334 (c_parser_omp_clause_num_workers): Likewise.
3335 (c_parser_omp_clause_vector_length): Likewise.
3336 (c_parser_omp_clause_num_teams): Likewise.
3337 (c_parser_omp_clause_thread_limit): Likewise.
3338 * c-typeck.c (build_c_cast): Likewise.
3339 (c_cast_expr): Likewise.
3340
624d31fe
RS
33412015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3342
3343 * c-typeck.c (c_tree_equal): Use real_equal instead of
3344 REAL_VALUES_EQUAL.
3345
b8fd7909
JM
33462015-10-04 Jason Merrill <jason@redhat.com>
3347
3348 * c-parser.c (c_lex_one_token): Handle @synchronized.
3349 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3350 can change whether the function is transaction_safe.
3351
1c7485af
MP
33522015-10-02 Marek Polacek <polacek@redhat.com>
3353
3354 PR c/67730
3355 * c-typeck.c (convert_for_assignment): Use the expansion point
3356 location throughout.
3357
3e3b8d63
MP
33582015-10-02 Marek Polacek <polacek@redhat.com>
3359
3360 PR c/64249
3361 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3362 and pass it down to c_parser_if_statement.
3363 (c_parser_else_body): Add CHAIN parameter and pass it down to
3364 c_parser_statement_after_labels.
3365 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3366 duplicated if-else-if conditions.
3367
aabef2de
MP
33682015-10-01 Marek Polacek <polacek@redhat.com>
3369
3370 * c-typeck.c (convert_for_assignment): Improve commentary.
3371
de8ddd5f
MP
33722015-09-30 Marek Polacek <polacek@redhat.com>
3373
3374 PR c/67730
3375 * c-typeck.c (c_finish_return): Use the expansion point location for
3376 certain "return with value" warnings.
3377
c4914de6
MLI
33782015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3379
3380 * c-parser.c (pragma_lex): Add loc argument.
3381
0e36f5c7
MP
33822015-09-15 Marek Polacek <polacek@redhat.com>
3383
3384 PR c/67580
3385 * c-decl.c (tag_exists_p): New function.
3386 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3387 struct/union/enum keywords are missing.
3388 * c-tree.h (tag_exists_p): Declare.
3389
2f3bb934
MP
33902015-09-15 Marek Polacek <polacek@redhat.com>
3391
3392 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3393 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3394 Return NULL_TREE instead of 0.
3395 (lookup_name): Return NULL_TREE instead of 0.
3396 (lookup_name_in_scope): Likewise.
3397 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3398 (parser_xref_tag): Use false instead of 0.
3399 (start_struct): Use true instead of 1.
3400 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3401
aa256c4a
MP
34022015-09-14 Marek Polacek <polacek@redhat.com>
3403
3404 * c-typeck.c (set_nonincremental_init_from_string): Use
3405 HOST_WIDE_INT_M1U when shifting a negative value.
3406
dbb68221
MW
34072015-09-09 Mark Wielaard <mjw@redhat.com>
3408
3409 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3410 parm against NULL.
3411
a8a098ac
JJ
34122015-09-10 Jakub Jelinek <jakub@redhat.com>
3413
3414 PR c/67502
3415 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3416 into OMP_FOR_PRE_BODY rather than before the loop.
3417
f4b189d5
JJ
34182015-09-09 Jakub Jelinek <jakub@redhat.com>
3419
0bb99c11
JJ
3420 PR c/67501
3421 * c-parser.c (c_parser_oacc_all_clauses,
3422 c_parser_omp_all_clauses): Remove invalid clause from
3423 list of clauses even if parser->error is set.
3424
fce5e5e3
JJ
3425 PR c/67500
3426 * c-parser.c (c_parser_omp_clause_aligned,
3427 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3428 test for errors.
3429 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3430 error_mark_node.
3431
f4b189d5
JJ
3432 PR c/67495
3433 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3434 instead of c_parser_unary_expression. If the result is !lvalue_p,
3435 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3436
b2aaf235
MP
34372015-09-04 Marek Polacek <polacek@redhat.com>
3438
3439 PR sanitizer/67279
3440 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3441
1807ffc1
MS
34422015-09-03 Martin Sebor <msebor@redhat.com>
3443
3444 PR c/66516
8b652e65
JJ
3445 * c-typeck.c (convert_arguments, parser_build_unary_op,
3446 build_conditional_expr, c_cast_expr, convert_for_assignment,
3447 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3448 reject_gcc_builtin.
3449 (c_decl_implicit): Define.
3450
d04ff417
MP
34512015-09-02 Marek Polacek <polacek@redhat.com>
3452
3453 PR c/67432
3454 * c-parser.c (c_parser_enum_specifier): Give a better error for
3455 an empty enum.
3456
a79683d5
TS
34572015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3458
3459 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3460
191a6b94
MP
34612015-08-12 Marek Polacek <polacek@redhat.com>
3462
3463 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3464 LOC to it.
3465
420a9d9b
MP
34662015-08-03 Marek Polacek <polacek@redhat.com>
3467
3468 PR c/67088
3469 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3470 Use it.
3471 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3472
992118a1
PP
34732015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3474
3475 * c-parser.c (c_parser_if_body): Take token_indent_info
3476 argument. Call warn_for_misleading_indentation even when the
3477 body is a semicolon. Extract token_indent_infos corresponding
3478 to the guard, body and next tokens. Adjust call to
3479 warn_for_misleading_indentation accordingly.
3480 (c_parser_else_body): Likewise.
3481 (c_parser_if_statement): Likewise.
3482 (c_parser_while_statement): Likewise.
3483 (c_parser_for_statement): Likewise.
3484
46308474
LFSM
34852015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3486 Manuel López-Ibáñez <manu@gcc.gnu.org>
3487
3488 * c-decl.c (get_parm_info): Remove static var. Update warning
3489 message.
3490
05b28fd6
MP
34912015-07-27 Marek Polacek <polacek@redhat.com>
3492
3493 PR c++/66555
3494 PR c/54979
3495 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3496
451b5e48
MP
34972015-07-20 Marek Polacek <polacek@redhat.com>
3498
3499 PR c++/55095
3500 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3501 (build_binary_op): Warn about left shift overflows.
3502
1916bcb5
AM
35032015-07-09 Andrew MacLeod <amacleod@redhat.com>
3504
3505 * c-array-notation.c: Adjust includes for flags.h changes.
3506 * c-objc-common.c: Likewise.
3507
c7131fb2
AM
35082015-07-07 Andrew MacLeod <amacleod@redhat.com>
3509
3510 * c-array-notation.c: Adjust includes.
3511 * c-aux-info.c: Likewise.
3512 * c-convert.c: Likewise.
3513 * c-decl.c: Likewise.
3514 * c-errors.c: Likewise.
3515 * c-lang.c: Likewise.
3516 * c-objc-common.c: Likewise.
3517 * c-parser.c: Likewise.
3518 * c-typeck.c: Likewise.
3519
da2e71c9
MLI
35202015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3521
3522 PR fortran/66605
3523 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3524
b155cfd9
MP
35252015-06-29 Marek Polacek <polacek@redhat.com>
3526
3527 PR c/66322
3528 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3529 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3530 about -Wswitch-bool here.
3531 (do_case): Update c_add_case_label call.
3532 (c_finish_case): Update c_do_switch_warnings call.
3533
31521951
MP
35342015-06-27 Marek Polacek <polacek@redhat.com>
3535
3536 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3537
22d03525
MP
35382015-06-26 Marek Polacek <polacek@redhat.com>
3539
3540 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3541 INDIRECT_REF_P.
3542 * c-typeck.c (array_to_pointer_conversion): Likewise.
3543 (build_unary_op): Likewise.
3544 (c_finish_return): Likewise.
3545
f0889939
AM
35462015-06-25 Andrew MacLeod <amacleod@redhat.com>
3547
3548 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3549 * c-parser.c: Likewise.
3550
8d67ee55
RS
35512015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3552
3553 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3554 instead of pointer_hash.
3555 (detect_field_duplicates): Likewise.
3556
0ae9bd27
MP
35572015-06-25 Marek Polacek <polacek@redhat.com>
3558
3559 * c-array-notation.c: Use VAR_P throughout.
3560 * c-decl.c: Likewise.
3561 * c-objc-common.c: Likewise.
3562 * c-parser.c: Likewise.
3563 * c-typeck.c: Likewise.
3564
62f9079a
MP
35652015-06-25 Marek Polacek <polacek@redhat.com>
3566
3567 * c-decl.c: Use is_global_var throughout.
3568 * c-parser.c: Likewise.
3569 * c-typeck.c: Likewise.
3570
abb226c9
AM
35712015-06-17 Andrew MacLeod <amacleod@redhat.com>
3572
3573 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3574 * c-aux-info.c: Likewise.
3575 * c-convert.c: Likewise.
3576 * c-decl.c: Likewise.
3577 * c-errors.c: Likewise.
3578 * c-lang.c: Likewise.
3579 * c-objc-common.c: Likewise.
3580 * c-parser.c: Likewise.
3581 * c-typeck.c: Likewise.
3582
8cbababc
JH
35832015-06-11 Jan Hubicka <hubicka@ucw.cz>
3584
3585 PR middle-end/66325
3586 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3587 variants.
3588
a0349665
PMR
35892015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3590
3591 * c-decl.c (pop_scope): Register the main translation unit
3592 through the new debug hook.
3593
13fdf2e2
AM
35942015-06-08 Andrew MacLeod <amacleod@redhat.com>
3595
3596 * c-array-notation.c : Adjust include files.
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-lang.h : Likewise.
3603 * c-objc-common.c : Likewise.
3604 * c-parser.c : Likewise.
3605 * c-typeck.c : Likewise.
3606
d7438551
AH
36072015-06-05 Aldy Hernandez <aldyh@redhat.com>
3608
3609 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3610 immediately clobber it.
3611 (c_write_global_declarations_1): Remove call to
3612 check_global_declaration_1.
3613 (c_write_global_declarations_2): Remove.
3614 (c_write_final_cleanups): Rename from c_write_global_declarations.
3615 Remove call to finalize_compilation_unit.
3616 Remove calls to debugging hooks.
3617 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3618 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3619 * c-tree.h: Remove c_write_global_declarations.
3620
ecb9f223
AM
36212015-06-04 Andrew MacLeod <amacleod@redhat.com>
3622
3623 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3624 * c-aux-info.c: Likewise.
3625 * c-convert.c: Likewise.
3626 * c-decl.c: Likewise.
3627 * c-errors.c: Likewise.
3628 * c-lang.c: Likewise.
3629 * c-objc-common.c: Likewise.
3630 * c-parser.c: Likewise.
3631 * c-typeck.c: Likewise.
3632
9482b620
MP
36332015-06-04 Marek Polacek <polacek@redhat.com>
3634
3635 PR c/66341
3636 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3637 it is a lvalue.
3638
bc51ace3
PK
36392015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3640
3641 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3642 Warn for empty struct.
3643 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3644
ea5b45b6
AT
36452015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3646
3647 * c-decl.c (start_function): Call plugin before parsing.
3648 (finish_function): Call plugin after parsing.
3649
c2d47482
PK
36502015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3651
3652 PR c/49551
3653 * c-decl.c (merge_decls): Merge DECL_COMMON.
3654
a95492ab
JW
36552015-05-22 Jim Wilson <jim.wilson@linaro.org>
3656
3657 * Make-lang.in (check_gcc_pallelize): Define.
3658
fd5c817a
MP
36592015-05-22 Marek Polacek <polacek@redhat.com>
3660
3661 PR c/47043
3662 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3663 attributes.
3664
c7b70a3c
MP
36652015-05-21 Marek Polacek <polacek@redhat.com>
3666
3667 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3668 DECL_BUILT_IN.
3669
21b634ae
MP
36702015-05-20 Marek Polacek <polacek@redhat.com>
3671
3672 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3673 * c-typeck.c: Likewise.
3674
296a8c2f
MP
36752015-05-19 Marek Polacek <polacek@redhat.com>
3676
3677 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3678
41b37d5e
JJ
36792015-05-19 Jakub Jelinek <jakub@redhat.com>
3680
3681 PR middle-end/66199
3682 * c-parser.c (c_parser_omp_for_loop): Don't add
3683 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3684 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3685 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3686 constructs.
3687
fab27f52
MM
36882015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3689
3690 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3691 swaps.
fab27f52 3692
40de31cf
MLI
36932015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3694
3695 PR fortran/44054
3696 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3697 accessor function.
3698
3aa3c9fc
MP
36992015-05-14 Marek Polacek <polacek@redhat.com>
3700
3701 PR c/66066
3702 PR c/66127
3703 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3704 rather than with 0.
3705
c3388e62
DM
37062015-05-12 David Malcolm <dmalcolm@redhat.com>
3707
3708 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3709 to add a call to warn_for_misleading_indentation.
3710 (c_parser_else_body): Likewise, adding param "else_loc".
3711 (c_parser_if_statement): Check for misleading indentation.
3712 (c_parser_while_statement): Likewise.
3713 (c_parser_for_statement): Likewise.
3714
755e528f
MP
37152015-05-08 Marek Polacek <polacek@redhat.com>
3716
3717 PR c/64918
3718 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3719 (output_init_element): Likewise.
3720
0173bd2a
MP
37212015-05-07 Marek Polacek <polacek@redhat.com>
3722
3723 PR c/65179
3724 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3725 value.
3726
9babc352
MP
37272015-04-30 Marek Polacek <polacek@redhat.com>
3728
3729 * c-typeck.c (set_init_label): Call error_at instead of error and
3730 pass LOC to it.
3731
ac9f18db
MP
3732 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3733 the type of a decl.
3734
ec3fba51
MP
3735 * c-typeck.c (c_build_va_arg): Clarify the error message.
3736
b811915d
TS
37372015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3738
3739 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3740 OMP_STANDALONE_CLAUSES.
3741
f3075008
MP
37422015-04-28 Marek Polacek <polacek@redhat.com>
3743
3744 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3745
4e81b788
MP
37462015-04-28 Marek Polacek <polacek@redhat.com>
3747
3748 PR c/65901
3749 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3750
6c1db78e
MP
37512015-04-25 Marek Polacek <polacek@redhat.com>
3752
3753 PR c/52085
3754 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3755 attribute.
3756
5c4abbb8
MP
37572015-04-23 Marek Polacek <polacek@redhat.com>
3758
3759 PR c/65345
3760 * c-decl.c (set_labels_context_r): New function.
3761 (store_parm_decls): Call it via walk_tree_without_duplicates.
3762 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3763 instead of create_tmp_var. Build TARGET_EXPR instead of
3764 COMPOUND_EXPR.
3765 (build_atomic_assign): Use create_tmp_var_raw instead of
3766 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3767
06aca1d5
IV
37682015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3769
3770 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3771 (c_parser_omp_target_update): Add missed %> to error_at ().
3772
8fba1830
BRF
37732015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3774
3775 PR target/55143
3776 * c-decl.c (c_default_pointer_mode): Remove definition.
3777 * c-tree.h (c_default_pointer_mode): Remove declaration.
3778
62021f64
TB
37792015-03-27 Tobias Burnus <burnus@net-b.de>
3780
3781 PR c/65586
3782 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3783 error out.
3784 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3785 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3786 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3787
9b65e171
JJ
37882015-03-19 Jakub Jelinek <jakub@redhat.com>
3789
3790 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3791 attribute for DECL_EXTERNAL VAR_DECLs.
3792
17958621
JJ
37932015-03-11 Jakub Jelinek <jakub@redhat.com>
3794
3795 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3796 argument.
3797
7ccb1a11
JJ
37982015-03-10 Jakub Jelinek <jakub@redhat.com>
3799
3800 PR c/65120
3801 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3802 before preparing arguments to warn_logical_not_parentheses.
3803
01177669
JJ
38042015-03-09 Jakub Jelinek <jakub@redhat.com>
3805
3806 PR c/65120
3807 * c-typeck.c (parser_build_binary_op): Don't warn for
3808 !!x == y or !b == y where b is _Bool.
3809
802ac282
MP
38102015-03-09 Marek Polacek <polacek@redhat.com>
3811
3812 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3813 * c-decl.c (grokdeclarator): Likewise.
3814 * c-typeck.c (build_binary_op): Likewise.
3815
e5165b60
MP
38162015-02-27 Marek Polacek <polacek@redhat.com>
3817
3818 PR c/65228
3819 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3820
065d214c
MP
38212015-02-14 Marek Polacek <polacek@redhat.com>
3822
3823 PR c/64768
3824 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3825 declared through a typedef name.
3826
e5d9235b
MP
38272015-02-13 Marek Polacek <polacek@redhat.com>
3828
3829 PR c/65050
3830 * c-decl.c (grokdeclarator): Print also the type when giving
3831 the error message about array's incomplete element type.
3832
fa01ffcc
JJ
38332015-02-11 Jakub Jelinek <jakub@redhat.com>
3834
3835 PR c/64824
3836 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3837 check in the POP macro.
3838
c3e38a03
MP
38392015-02-09 Marek Polacek <polacek@redhat.com>
3840
3841 PR c/64856
3842 * c-typeck.c (process_init_element): Don't always wrap
3843 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3844 initializing a range of elements.
3845
4886ec8e
JJ
38462015-02-04 Jakub Jelinek <jakub@redhat.com>
3847
3848 PR c/64824
3849 PR c/64868
3850 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3851
c3e38a03 38522015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3853
3854 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3855 processing enum declaration.
3856
7b33f0c8
MP
38572015-01-29 Marek Polacek <polacek@redhat.com>
3858
3859 PR c/64709
3860 * c-typeck.c (pop_init_level): If constructor_elements has
3861 exactly one element with integer_zerop value, set constructor_zeroinit
3862 to 1. Remove braces around warning_init call.
3863
dea63e49
JJ
38642015-01-27 Jakub Jelinek <jakub@redhat.com>
3865
3866 PR c/64766
3867 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3868 of FUNCTION_DECLs with error_mark_node.
3869
d38f7dce
JJ
38702015-01-26 Jakub Jelinek <jakub@redhat.com>
3871
3872 PR c/64778
3873 * c-typeck.c (convert_arguments): Return -1 if there are
3874 error_args, even if we've diagnosed too many arguments.
3875
cbf5d0e7
RB
38762015-01-21 Richard Biener <rguenther@suse.de>
3877
3878 PR middle-end/64313
3879 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3880 for builtins the user declared correctly.
3881
41dbbb37
TS
38822015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3883 Bernd Schmidt <bernds@codesourcery.com>
3884 Cesar Philippidis <cesar@codesourcery.com>
3885 James Norris <jnorris@codesourcery.com>
3886 Jakub Jelinek <jakub@redhat.com>
3887 Ilmir Usmanov <i.usmanov@samsung.com>
3888
3889 * c-parser.c: Include "gomp-constants.h".
3890 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3891 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3892 Use OMP_CLAUSE_SET_MAP_KIND.
3893 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3894 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3895 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3896 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3897 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3898 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3899 "copyout", "create", "delete", "deviceptr", "gang", "host",
3900 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3901 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3902 "present_or_create", "pcreate", "seq", "self", "vector",
3903 "vector_length", "wait", "worker".
3904 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3905 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3906 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3907 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3908 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3909 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3910 (c_parser_oacc_data_clause_deviceptr)
3911 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3912 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3913 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3914 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3915 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3916 (c_parser_oacc_parallel, c_parser_oacc_update)
3917 (c_parser_oacc_wait): New functions.
3918 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3919 (c_finish_oacc_data): New prototypes.
3920 * c-typeck.c: Include "gomp-constants.h".
3921 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3922 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3923 OMP_CLAUSE_SET_MAP_KIND.
3924 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3925 (c_finish_oacc_data): New functions.
3926 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3927 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3928 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3929 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3930 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3931 GOMP_MAP_FORCE_DEVICEPTR.
3932
adfac8df
JJ
39332015-01-09 Michael Collison <michael.collison@linaro.org>
3934
3935 * c-array-notation.c: Include hash-set.h, machmode.h,
3936 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3937 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3938 * c-aux-info.c: Ditto.
3939 * c-convert.c: Ditto.
3940 * c-decl.c: Ditto.
3941 * c-errors.c: Ditto.
3942 * c-lang.c: Dittoxs.
3943 * c-objc-common.c: Ditto.
3944 * c-parser.c: Ditto.
3945 * c-typeck.c: Include hash-set.h, machmode.h,
3946 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3947 fold-const.h, wide-int.h, inchash.h, real.h and
3948 fixed-value.h due to flattening of tree.h.
3949
2cc901dc
MP
39502015-01-07 Marek Polacek <polacek@redhat.com>
3951
3952 PR c/64417
3953 * c-typeck.c (process_init_element): Disallow initialization of
3954 a flexible array member with a string constant if the structure
3955 is in an array.
3956
5624e564
JJ
39572015-01-05 Jakub Jelinek <jakub@redhat.com>
3958
e5341100
JJ
3959 PR sanitizer/64344
3960 * c-typeck.c (convert_for_assignment, c_finish_return): For
3961 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3962 types also set in_late_binary_op around convert call.
3963 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3964 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3965 result on expr as last argument to ubsan_instrument_float_cast,
3966 if in_late_binary_op, don't use c_save_expr but save_expr.
3967
5624e564
JJ
3968 Update copyright years.
3969
5bd012f8
MP
39702015-01-05 Marek Polacek <polacek@redhat.com>
3971
3972 PR c/64423
3973 * c-typeck.c (build_array_ref): Pass loc down to
3974 warn_array_subscript_with_type_char.
3975
3f8257db 39762014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3977
3978 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3979 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3980 element type.
8e745a17 3981 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3982 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3983 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3984 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3985 to PEDWARN_FOR_QUALIFIERS.
768952be 3986
8f94a8c4
JJ
39872014-12-17 Jakub Jelinek <jakub@redhat.com>
3988
3989 PR sanitizer/64289
3990 * c-convert.c: Include ubsan.h.
3991 (convert): For real -> integral casts and
3992 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3993 instead instrument the float cast directly.
3994
b731b390
JJ
39952014-11-29 Jakub Jelinek <jakub@redhat.com>
3996
3997 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3998 c_finish_stmt_expr): Remove NULL last argument from
3999 create_tmp_var_raw and create_tmp_var calls.
4000 * c-array-notation.c (fix_builtin_array_notation_fn,
4001 build_array_notation_expr, fix_conditional_array_notations_1,
4002 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4003
541e35a6
MP
40042014-11-28 Marek Polacek <polacek@redhat.com>
4005
4006 PR c/63862
4007 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4008 convert the right operand to integer type.
4009
b286be94
MP
40102014-11-25 Marek Polacek <polacek@redhat.com>
4011
4012 PR c/63877
4013 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4014 for inline functions.
4015
aa7da51a
JJ
40162014-11-21 Jakub Jelinek <jakub@redhat.com>
4017
4018 PR target/63764
4019 * c-typeck.c (build_array_ref): Adjust
4020 convert_vector_to_pointer_for_subscript caller. If it returns true,
4021 call non_lvalue_loc on the result.
4022
d876207f
RB
40232014-11-11 Richard Biener <rguenther@suse.de>
4024
4025 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4026 to true.
4027
e5e44252
AK
40282014-11-10 Andi Kleen <ak@linux.intel.com>
4029
4030 PR c/60804
4031 * c-parser.c (c_parser_statement_after_labels): Call
4032 check_no_cilk.
4033 (c_parser_if_statement): Dito.
4034 (c_parser_switch_statement): Dito.
4035 (c_parser_while_statement): Dito.
4036 (c_parser_do_statement): Dito.
4037 (c_parser_for_statement): Dito.
4038 * c-typeck.c (c_finish_loop): Dito.
4039
13c21655
PC
40402014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4041
4042 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4043 OPT_Wshift_count_overflow in the warnings.
4044
2d51fcef
MP
40452014-10-30 Marek Polacek <polacek@redhat.com>
4046
4047 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4048 print the stripped version as well, if they're not the same.
4049
ef4bddc2
RS
40502014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4051
4052 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4053 machine_mode.
4054
c582198b
AM
40552014-10-28 Andrew MacLeod <amacleod@redhat.com>
4056
4057 * c-decl.c: Adjust include files.
4058 * c-parser.c: Ditto.
4059
ddc8de03
PM
40602014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4061 Tom Tromey <tromey@redhat.com>
4062
4063 * c-tree.h (enum c_oracle_request): New.
4064 (c_binding_oracle_function): New typedef.
4065 (c_binding_oracle, c_pushtag, c_bind): Declare.
4066 * c-decl.c (c_binding_oracle): New global.
4067 (I_SYMBOL_CHECKED): New macro.
4068 (i_symbol_binding): New function.
4069 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4070 (I_TAG_CHECKED): New macro.
4071 (i_tag_binding): New function.
4072 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4073 (I_LABEL_CHECKED): New macro.
4074 (i_label_binding): New function.
4075 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4076 (c_print_identifier): Save and restore c_binding_oracle.
4077 (c_pushtag, c_bind): New functions.
4078
60393bbc
AM
40792014-10-27 Andrew MacLeod <amacleod@redhat.com>
4080
4081 * c-typeck.c: Adjust include files.
4082
d723bb7c
MLI
40832014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4084
4085 PR c++/53061
4086 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4087 initialization here...
4088 (c_initialize_diagnostics): ... but here. Set defaults after
4089 building pretty-printer.
4090
1bc5a451
MP
40912014-10-23 Marek Polacek <polacek@redhat.com>
4092
4093 PR c/63626
4094 * c-decl.c (pop_scope): Don't print warning in external_scope.
4095
4435bb92
MP
40962014-10-19 Marek Polacek <polacek@redhat.com>
4097
4098 PR c/63567
4099 * c-typeck.c (output_init_element): Allow initializing objects with
4100 static storage duration with compound literals even in C99 and add
4101 pedwarn for it.
4102
7278465e
MP
41032014-10-17 Marek Polacek <polacek@redhat.com>
4104
4105 PR c/63567
4106 * c-typeck.c (digest_init): Allow initializing objects with static
4107 storage duration with compound literals even in C99 and add pedwarn
4108 for it.
4109
d9b7be2e
MP
41102014-10-17 Marek Polacek <polacek@redhat.com>
4111
4112 PR c/63543
4113 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4114 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4115 error multiple times. Print the type.
4116
f406ae1f
MP
41172014-10-17 Marek Polacek <polacek@redhat.com>
4118
4119 PR c/63549
4120 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4121 type.
4122
92574c7c
MP
41232014-10-17 Marek Polacek <polacek@redhat.com>
4124
4125 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4126 (start_function): Use OPT_Wimplicit_int instead of 0.
4127 (store_parm_decls_oldstyle): Likewise.
4128
1bc4a978
MT
41292014-10-17 Alan Modra <amodra@gmail.com>
4130
4131 PR middle-end/61848
4132 * c-decl.c (merge_decls): Don't merge section name or tls model
4133 to newdecl symtab node, instead merge to olddecl. Override
4134 existing olddecl section name. Set tls_model for all thread-local
4135 vars, not just OMP thread-private ones. Remove incorrect comment.
4136
83685514
AM
41372014-10-16 Andrew MacLeod <amacleod@redhat.com>
4138
4139 * c-decl.c: Adjust include files.
4140
78a7c317
DD
41412014-10-14 DJ Delorie <dj@redhat.com>
4142
4143 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4144 (c_token_starts_typename): Check all __intN, not just __int128.
4145 (c_token_starts_declspecs): Likewise.
4146 (c_parser_declspecs): Likewise.
4147 (c_parser_attribute_any_word): Likewise.
4148 (c_parser_objc_selector): Likewise.
4149 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4150 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4151 is specified.
4152 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4153 __int128.
4154 (finish_declspecs): Likewise.
4155
74d98c1e
AB
41562014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4157
8e745a17 4158 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4159 the duplicate code.
8e745a17 4160 (c_parser_statement): Call the new function.
74d98c1e 4161
84937de2
MP
41622014-10-09 Marek Polacek <polacek@redhat.com>
4163
4164 PR c/63480
4165 * c-typeck.c (pop_init_level): Don't warn about initializing
4166 with { }.
4167
0382aaa0
MP
41682014-10-07 Marek Polacek <polacek@redhat.com>
4169
4170 PR c/59717
4171 * c-decl.c (header_for_builtin_fn): New function.
4172 (implicitly_declare): Suggest which header to include.
4173
7a0ca710
MP
41742014-10-07 Marek Polacek <polacek@redhat.com>
4175
4176 * c-convert.c (convert): Use error_operand_p.
4177 * c-typeck.c (require_complete_type): Likewise.
4178 (really_atomic_lvalue): Likewise.
4179 (digest_init): Likewise.
4180 (handle_omp_array_sections_1): Likewise.
4181
6bc8a126
MP
41822014-10-03 Marek Polacek <polacek@redhat.com>
4183
4184 PR c/63453
4185 * c-decl.c (pop_scope): Don't warn about "inline function declared
4186 but never defined" for functions marked with gnu_inline attribute.
4187
d90c0a59
JJ
41882014-09-25 Jakub Jelinek <jakub@redhat.com>
4189
4190 PR c++/63249
4191 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4192 on low_bound and length.
4193
083e891e
MP
41942014-09-24 Marek Polacek <polacek@redhat.com>
4195
4196 PR c/61405
4197 PR c/53874
4198 * c-parser.c: Don't define CPP_KEYWORD.
4199 (c_parser_switch_statement): Pass original type to c_finish_case.
4200 * c-tree.h (c_finish_case): Update declaration.
4201 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4202 conditionally to c_do_switch_warnings.
4203
8d95fe25
MP
42042014-09-03 Marek Polacek <polacek@redhat.com>
4205
4206 PR c/62024
4207 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4208 conversions.
4209
9a771876
JJ
42102014-09-02 Jakub Jelinek <jakub@redhat.com>
4211 Balaji V. Iyer <balaji.v.iyer@intel.com>
4212 Igor Zamyatin <igor.zamyatin@intel.com>
4213
4214 * c-parser.c (c_parser_cilk_for): New function.
4215 (c_parser_cilk_grainsize): Likewise.
4216 (c_get_temp_regvar): Likewise.
4217 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4218 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4219 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4220 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4221 case.
4222
b7679d96
CG
42232014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4224
4225 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4226 with using HOST_WIDE_INT without truncation to 'int'
4227
59ea0364
MP
42282014-08-22 Marek Polacek <polacek@redhat.com>
4229
4230 PR c++/62199
4231 * c-typeck.c (parser_build_binary_op): Adjust call to
4232 warn_logical_not_parentheses.
4233
671a475e
IZ
42342014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4235
4236 PR other/62008
4237 * c-parser.c (c_parser_array_notation): Check for correct
4238 type of an array added.
4239
04159acf
MP
42402014-08-19 Marek Polacek <polacek@redhat.com>
4241
4242 PR c++/62153
4243 * c-typeck.c (build_binary_op): If either operand of a comparison
4244 is a boolean expression, call maybe_warn_bool_compare.
4245
c77935ee
PP
42462014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4247
4248 PR c/45584
4249 * c-typeck.c (build_c_cast): Do a conversion even when the
4250 TYPE_MAIN_VARIANTs are the same.
4251
35aff4fb
MP
42522014-08-19 Marek Polacek <polacek@redhat.com>
4253
4254 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4255 pedwarn_c99 instead of pedwarn.
4256 (grokfield): Likewise.
4257 (warn_defaults_to): New function.
4258 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4259 Unconditionally call pedwarn_c99 instead of pedwarn.
4260 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4261 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4262 check flag_isoc11 before.
4263 * c-errors.c (pedwarn_c99): Change the return type to bool.
4264 Handle -Wc99-c11-compat.
4265 * c-parser.c (disable_extension_diagnostics): Handle
4266 warn_c99_c11_compat.
4267 (restore_extension_diagnostics): Likewise.
4268 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4269 instead of pedwarn, don't check flag_isoc11 before.
4270 (c_parser_declspecs): Likewise.
4271 (c_parser_alignas_specifier): Likewise.
4272 (c_parser_alignof_expression): Likewise.
4273 (c_parser_generic_selection): Likewise.
4274 * c-tree.h (pedwarn_c99): Update declaration.
4275 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4276 of pedwarn_c99.
4277
177cce46
MP
42782014-08-19 Marek Polacek <polacek@redhat.com>
4279
4280 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4281 to pedwarn_c90.
4282 * c-errors.c: Include "opts.h".
4283 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4284 * c-parser.c (disable_extension_diagnostics): Handle negative value
4285 of warn_c90_c99_compat, too.
4286 (restore_extension_diagnostics): Likewise.
4287 (c_parser_compound_statement_nostart): Pass
4288 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4289
6dc99c33
MP
42902014-08-12 Marek Polacek <polacek@redhat.com>
4291
4292 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4293 Add pedwarn.
4294 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4295 Likewise.
4296 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4297
3f8257db 42982014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4299
4300 PR c/51849
4301 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4302 Call pedwarn_c90 instead of pedwarn.
4303 (check_bitfield_type_and_width): Likewise.
4304 (declspecs_add_qual): Likewise.
4305 (declspecs_add_type): Likewise.
4306 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4307 Adjust to only call pedwarn_c90.
4308 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4309 pedwarn_c90 instead of pedwarn.
4310 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4311 * c-parser.c (disable_extension_diagnostics): Handle
4312 warn_c90_c99_compat.
4313 (restore_extension_diagnostics): Likewise.
4314 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4315 pedwarn_c90 instead of pedwarn.
4316 (c_parser_initelt): Likewise.
4317 (c_parser_postfix_expression): Likewise.
4318 (c_parser_postfix_expression_after_paren_type): Likewise.
4319 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4320 * c-tree.h: Fix formatting.
4321 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4322 pedwarn_c90 instead of pedwarn.
4323
9f25a338
TS
43242014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4325
4326 * c-typeck.c: Remove include of pointer-set.h.
4327
044331a8
MP
43282014-08-07 Marek Polacek <polacek@redhat.com>
4329
4330 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4331
b787e7a2
TS
43322014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4333
4334 * c-typeck.c: Use hash_map instead of pointer_map.
4335
6e2830c3
TS
43362014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4337
4338 * c-decl.c: Use hash_set instead of pointer_set.
4339
a7ee52fb
IZ
43402014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4341
4342 PR middle-end/61455
4343 * c-array-notation.c (expand_array_notations): Handling
4344 of DECL_EXPR added.
4345
b4dfdc11
MG
43462014-07-31 Marc Glisse <marc.glisse@inria.fr>
4347
4348 PR c++/60517
4349 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4350 a local variable.
4351
976d5a22
TT
43522014-07-30 Tom Tromey <tromey@redhat.com>
4353
4354 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4355 field.
4356 (really_start_incremental_init, push_init_level): Initialize
4357 designator_depth.
4358 (pop_init_level): Set global designator_depth.
4359 (process_init_element): Check for designated_init attribute.
4360
30281de2
MP
43612014-07-20 Marek Polacek <polacek@redhat.com>
4362
4363 PR c/61852
4364 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4365 (implicitly_declare): Pass location to implicit_decl_warning.
4366
b108f48f
JJ
43672014-07-14 Jakub Jelinek <jakub@redhat.com>
4368
4369 PR middle-end/61294
4370 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4371 If non-NULL, call c_parser_check_literal_zero.
4372 (c_parser_check_literal_zero): New function.
4373 (c_parser_postfix_expression_after_primary): Adjust
4374 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4375
773ec47f
MP
43762014-07-06 Marek Polacek <polacek@redhat.com>
4377
4378 PR c/6940
4379 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4380 * c-tree.h (C_ARRAY_PARAMETER): Define.
4381 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4382 function parameter.
4383
22e1cf1c 43842014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4385 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4386
4387 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4388 releasing symbol.
4389
52ec0ea3
MP
43902014-07-01 Marek Polacek <polacek@redhat.com>
4391
4392 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4393 instead of 0 to WARN_FOR_ASSIGNMENT.
4394
d5c3d343
MP
43952014-07-01 Marek Polacek <polacek@redhat.com>
4396
4397 PR c/58286
4398 * c-typeck.c (convert_for_assignment): Pass
4399 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4400
6a7253a4
MP
44012014-06-30 Marek Polacek <polacek@redhat.com>
4402
4403 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4404 has no_sanitize_undefined attribute.
4405
5e88a8f4
IZ
44062014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4407
4408 PR middle-end/57541
4409 * c-array-notation.c (fix_builtin_array_notation_fn):
4410 Check for 0 arguments in builtin call. Check that bultin argument is
4411 correct.
4412 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4413 index.
4414
9698b078
SH
44152014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4416
4417 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4418 qualifiers in __auto_type for atomic types.
4419 (c_parser_typeof_specifier): Discard all type qualifiers in
4420 __typeof__ for atomic types.
4421
6e07c515
MP
44222014-06-25 Marek Polacek <polacek@redhat.com>
4423
4424 PR c/61162
4425 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4426 the return expression to c_finish_return.
4427
da6f124d
JJ
44282014-06-25 Jakub Jelinek <jakub@redhat.com>
4429
4430 * c-typeck.c (c_finish_omp_clauses): Make sure
4431 OMP_CLAUSE_LINEAR_STEP has correct type.
4432
c203e8a7
TS
44332014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4434
4435 * c-decl.c: Adjust.
4436
56ad0e38
JJ
44372014-06-24 Jakub Jelinek <jakub@redhat.com>
4438
4439 * c-parser.c (c_parser_omp_for_loop): For
4440 #pragma omp parallel for simd move lastprivate clause from parallel
4441 to for rather than simd.
4442
47c2554f
MP
44432014-06-23 Marek Polacek <polacek@redhat.com>
4444
4445 * c-typeck.c (parser_build_binary_op): Don't call
4446 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4447
56363ffd
JH
44482014-06-15 Jan Hubicka <hubicka@ucw.cz>
4449
4450 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4451 * c-decl.c (merge_decls): Likewise.
4452
d7ff7ae5
MP
44532014-06-09 Marek Polacek <polacek@redhat.com>
4454
4455 PR c/36446
4456 * c-typeck.c (error_init): Call inform instead of error_at.
4457 (pedwarn_init): Call inform instead of pedwarn.
4458 (warning_init): Call inform instead of warning_at.
4459
24d047a3
JH
44602014-06-07 Jan Hubicka <hubicka@ucw.cz>
4461
4462 * c-decl.c (merge_decls): Use set_decl_section_name.
4463 (duplicate_decls): Remove node if it exists.
4464
9bac5cbb
G
44652014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4466
4467 PR c/53119
4468 * c-typeck.c (push_init_level, process_init_element,
4469 pop_init_level): Correct check for zero initialization, move
4470 missing brace warning to respect zero initialization.
4471
8ffcdea8
MP
44722014-06-05 Marek Polacek <polacek@redhat.com>
4473
4474 PR c/56724
4475 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4476
742938c9
MP
44772014-06-05 Marek Polacek <polacek@redhat.com>
4478
4479 PR c/49706
4480 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4481 on the left hand side operand of a comparison.
4482
6447c55d
MP
44832014-06-05 Marek Polacek <polacek@redhat.com>
4484
4485 PR c/48062
4486 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4487 Print note only if the warning was printed.
4488
9dc7743c
IZ
44892014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4490
4491 PR c/58942
4492 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4493 with a pointer.
4494
fedfecef
MP
44952014-06-03 Marek Polacek <polacek@redhat.com>
4496
4497 PR c/60439
4498 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4499 c_start_case.
4500 * c-tree.h (c_start_case): Update.
4501 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4502 switch condition has boolean value.
4503
9b2b7279
AM
45042014-06-02 Andrew MacLeod <amacleod@redhat.com>
4505
4506 * c-decl.c: Include builtins.h.
4507 * c-parser.c: Likewise.
4508
5c1bc275
MP
45092014-05-27 Marek Polacek <polacek@redhat.com>
4510
4511 PR c/56724
4512 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4513 error and warning calls to error_at and warning_at. Pass location of
4514 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4515 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4516 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4517
97563bc8
IZ
45182014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4519
4520 PR c/61191
4521 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4522 function parameters.
4523
aede2c10
JH
45242014-05-23 Jan Hubicka <hubicka@ucw.cz>
4525
4526 * c-decl.c (merge_decls): Preserve symtab node pointers.
4527 (duplicate_decls): Free new decl.
4528
edbba2ce
TS
45292014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4530
f3316c6d
TS
4531 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4532 initialization.
4533
edbba2ce
TS
4534 * c-parser.c (c_parser_omp_target): Return bool values.
4535
68c81f24
TS
45362014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4537
4538 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4539 num_teams_loc variable to num_thread_limit_loc.
4540
632f2871
RS
45412014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4542
4543 * c-array-notation.c (expand_array_notations): Use void_node
4544 instead of void_zero_node.
4545
766090c2
TS
45462014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4547
4548 * c-decl.c (finish_struct): Adjust.
4549 (finish_enum): Likewise.
4550 (bind): Adjust.
4551 (record_inline_static): Likewise.
4552 (push_scope): Likewise.
4553 (make_label): Likewise.
4554 (lookup_label_for_goto): Likewise.
4555 (finish_struct): Likewise.
4556 (finish_enum): Likewise.
4557 (store_parm_decls): Likewise.
4558 (c_push_function_context): Likewise.
4559 * c-lang.h: Remove usage of variable_size gty attribute.
4560 * c-parser.c (c_parse_init): Adjust.
4561 (c_parse_file): Likewise.
4562
2b107f6b
MP
45632014-05-13 Marek Polacek <polacek@redhat.com>
4564
4565 PR c/61162
4566 * c-typeck.c (convert_for_assignment): Pass location to
4567 WARN_FOR_ASSIGNMENT instead of input_location.
4568
d033409e
MP
45692014-05-10 Marek Polacek <polacek@redhat.com>
4570
4571 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4572 maybe_warn_string_init.
4573 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4574 maybe_warn_string_init.
4575 * c-tree.h (maybe_warn_string_init): Update declaration.
4576 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4577 Call pedwarn_init with loc instead of with input_location.
4578 (digest_init): Pass init_loc to maybe_warn_string_init.
4579 (pop_init_level): Call pedwarn_init with loc instead of with
4580 input_location.
4581 (set_init_index): Likewise.
4582 (process_init_element): Likewise.
4583
ea58ef42
MP
45842014-05-09 Marek Polacek <polacek@redhat.com>
4585
4586 PR c/61096
4587 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4588 (c_parser_initelt): Pass location to set_init_label. Pass array index
4589 location to set_init_index.
4590 * c-tree.h (push_init_level): Update declaration.
4591 (pop_init_level): Likewise.
4592 (set_init_index): Likewise.
4593 (set_init_label): Likewise.
4594 * c-typeck.c (error_init): Add location parameter. Call error_at
4595 instead of error.
4596 (digest_init): Pass init_loc to error_init.
4597 (really_start_incremental_init):
4598 (push_init_level): Add location parameter. Pass loc to pop_init_level
4599 and error_init.
4600 (pop_init_level): Likewise.
4601 (set_designator): Add location parameter. Pass loc to pop_init_level,
4602 push_init_level, and error_init.
4603 (set_init_index): Add location parameter. Pass loc to error_init and
4604 set_designator.
4605 (set_init_label): Likewise.
4606 (output_init_element): Pass loc to error_init.
4607 (process_init_element): Pass loc to error_init, pop_init_level,
4608 pedwarn_init, and push_init_level.
4609
661a0813
MP
46102014-05-09 Marek Polacek <polacek@redhat.com>
4611
4612 PR c/50459
4613 * c-parser.c (c_parser_attributes): Parse the arguments as an
4614 expression-list if the attribute takes identifier.
4615
2793eeab
MP
46162014-05-08 Marek Polacek <polacek@redhat.com>
4617
4618 PR c/61053
4619 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4620 TYPE_ALIGN_UNIT.
4621
f827930a
MP
46222014-05-08 Marek Polacek <polacek@redhat.com>
4623
4624 PR c/61077
4625 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4626 of main.
4627
1d60af08
KZ
46282014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4629 Mike Stump <mikestump@comcast.net>
4630 Richard Sandiford <rdsandiford@googlemail.com>
4631
4632 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4633 (finish_enum): Use wide-int interfaces.
4634 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4635 * c-typeck.c (build_c_cast): Likewise.
4636 (set_nonincremental_init_from_string): Likewise.
4637 (c_tree_equal): Likewise.
4638
a0e24419
MP
46392014-05-02 Marek Polacek <polacek@redhat.com>
4640
4641 PR c/25801
4642 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4643 Return size_one_node when the type is not complete.
4644 (pointer_diff): Remove comment.
4645 (build_unary_op): Improve error messages.
4646
19fc9faa
MP
46472014-05-02 Marek Polacek <polacek@redhat.com>
4648
4649 * c-typeck.c (c_finish_return): Separate warning_at calls.
4650
63bc4e87
MP
46512014-05-02 Marek Polacek <polacek@redhat.com>
4652
4653 * c-tree.h (error_init): Remove declaration.
4654 (pedwarn_init): Likewise.
4655 * c-typeck.c (error_init): Make static and move above.
4656 (pedwarn_init): Likewise.
4657 (warning_init): Move above.
4658 (maybe_warn_string_init): Likewise.
4659
4bd2511b
JL
46602014-05-01 Jeff Law <law@redhat.com>
4661
4662 Revert:
4663
4664 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4665 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4666 avoid goto.
4667
6a358dcb
MP
46682014-05-02 Marek Polacek <polacek@redhat.com>
4669
4670 PR c/60784
4671 * c-typeck.c (push_init_level): Set constructor_designated to
4672 p->designated for structures.
4673
ae5ebda4
MP
46742014-05-01 Marek Polacek <polacek@redhat.com>
4675
4676 PR c/60915
4677 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4678 function-definition has an attribute after the declarator.
4679
96b40f8d
MP
46802014-05-01 Marek Polacek <polacek@redhat.com>
4681
4682 PR c/60257
4683 * c-typeck.c (warning_init): Add location_t parameter. Call
4684 warning_at instead of warning.
4685 (push_init_level): Pass input_location to warning_init.
4686 (add_pending_init): Add location_t parameter. Pass loc to
4687 warning_init.
4688 (set_nonincremental_init): Pass input_location to add_pending_init.
4689 (set_nonincremental_init_from_string): Likewise.
4690 (output_init_element): Pass loc to warning_init and to
4691 add_pending_init.
4692
32e00768
MP
46932014-05-01 Marek Polacek <polacek@redhat.com>
4694
4695 PR c/43395
4696 * c-typeck.c (c_finish_return): Distinguish between label and variable
4697 when warning about returning local address.
4698
c9379ce2
MP
46992014-05-01 Marek Polacek <polacek@redhat.com>
4700
4701 PR c/29467
4702 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4703 in C89 mode.
4704
d00887e8
MP
47052014-05-01 Marek Polacek <polacek@redhat.com>
4706
4707 PR c/43245
4708 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4709 instead of 0 to WARN_FOR_QUALIFIERS.
4710
5436fa2e
MP
47112014-05-01 Marek Polacek <polacek@redhat.com>
4712
4713 PR c/56989
4714 * c-typeck.c (default_conversion): Use better location for
4715 error call.
4716
f8ed5150
MP
47172014-04-30 Marek Polacek <polacek@redhat.com>
4718
4719 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4720 also when SANITIZE_FLOAT_DIVIDE is on.
4721
8337d1db
MP
47222014-04-30 Marek Polacek <polacek@redhat.com>
4723
4724 PR c/60139
4725 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4726 and pedwarn_init. Use loc insted of input_location.
4727
c4bdc42f
MP
47282014-04-30 Marek Polacek <polacek@redhat.com>
4729
4730 PR c/60351
4731 * c-typeck.c (build_binary_op): Use location when warning about
4732 shift count.
4733
45484dcf
MP
47342014-04-25 Marek Polacek <polacek@redhat.com>
4735
4736 PR c/18079
4737 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4738 always_inline/noinline and hot/cold attributes.
4739
34cf811f
MP
47402014-04-25 Marek Polacek <polacek@redhat.com>
4741
4742 PR c/60114
4743 * c-parser.c (c_parser_initelt): Pass input_location to
4744 process_init_element.
4745 (c_parser_initval): Pass loc to process_init_element.
4746 * c-tree.h (process_init_element): Adjust declaration.
4747 * c-typeck.c (push_init_level): Pass input_location to
4748 process_init_element.
4749 (pop_init_level): Likewise.
4750 (set_designator): Likewise.
4751 (output_init_element): Add location_t parameter. Pass loc to
4752 digest_init.
4753 (output_pending_init_elements): Pass input_location to
4754 output_init_element.
4755 (process_init_element): Add location_t parameter. Pass loc to
4756 output_init_element.
4757
42056eac
JJ
47582014-04-24 Jakub Jelinek <jakub@redhat.com>
4759
4760 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4761 atomic-clause, allow comma in between atomic-clause and
4762 seq_cst.
4763
e162a134
JJ
47642014-04-22 Jakub Jelinek <jakub@redhat.com>
4765
4766 PR c/59073
4767 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4768 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4769
2f6babac
IZ
47702014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4771
4772 PR middle-end/60469
4773 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4774 create_tmp_var instead build_decl for creating temps.
4775 (build_array_notation_expr): Likewise.
4776 (fix_conditional_array_notations_1): Likewise.
4777 (fix_array_notation_expr): Likewise.
4778 (fix_array_notation_call_expr): Likewise.
4779
8edbfaa6
JJ
47802014-03-28 Jakub Jelinek <jakub@redhat.com>
4781
4782 PR c++/60689
4783 * c-tree.h (c_build_function_call_vec): New prototype.
4784 * c-typeck.c (build_function_call_vec): Don't call
4785 resolve_overloaded_builtin here.
4786 (c_build_function_call_vec): New wrapper function around
4787 build_function_call_vec. Call resolve_overloaded_builtin here.
4788 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4789 Call c_build_function_call_vec instead of build_function_call_vec.
4790 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4791 * c-decl.c (finish_decl): Likewise.
4792
7485aeea
MLI
47932014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4794
4795 PR c/55383
4796 * c-typeck.c: Use correct format string in cast-qual warning
4797
b17a8b07
TS
47982014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4799
4800 * c-decl.c (c_decl_attributes): Use
4801 lang_hooks.types.omp_mappable_type.
4802 * c-typeck.c (c_finish_omp_clauses): Likewise.
4803
3af9c5e9
MP
48042014-03-06 Marek Polacek <polacek@redhat.com>
4805
4806 PR c/60197
4807 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4808 of checking tree code.
4809
1c9f5f33
PK
48102014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4811
4812 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4813 (c_parser_parameter_declaration): Likewise.
4814
cc28fc7f
MP
48152014-02-19 Marek Polacek <polacek@redhat.com>
4816
4817 PR c/60195
4818 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4819 Call mark_exp_read on exp.value.
4820 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4821 TREE_ADDRESSABLE on old instead of val.
4822 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4823
b581c05c
PK
48242014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4825
4826 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4827 C_EXPR_APPEND by vec_safe_push.
4828 * c-tree.h (C_EXPR_APPEND): Remove.
4829
81e5eca8
MP
48302014-01-31 Marek Polacek <polacek@redhat.com>
4831
4832 PR c/59963
4833 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4834 build_function_call_vec.
4835 (build_function_call): Likewise.
4836 (build_atomic_assign): Likewise.
4837 (build_function_call_vec): Add arg_loc parameter. Use it.
4838 (convert_arguments): Likewise.
4839 (convert_for_assignment): Rename rhs_loc to expr_loc.
4840 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4841 (c_parser_objc_keywordexpr): Likewise.
4842 (c_parser_postfix_expression_after_primary): Call
4843 build_function_call_vec with expr_loc rather than op_loc.
4844 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4845 build_function_call_vec.
4846 (c_parser_expr_list): Add locations parameter. Fill it with locations
4847 of function arguments.
4848 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4849
68fca595
MP
48502014-01-30 Marek Polacek <polacek@redhat.com>
4851
4852 PR c/59940
4853 * c-typeck.c (build_function_call_vec): Use loc parameter.
4854 (convert_arguments): Add location parameter. Use it.
4855 (ep_convert_and_check): Likewise.
4856 (build_atomic_assign): Adjust convert_for_assignment call.
4857 (build_modify_expr): Likewise.
4858 (digest_init): Likewise.
4859 (c_finish_return): Likewise.
4860 (build_conditional_expr): Adjust ep_convert_and_check calls.
4861 (convert_for_assignment): Add rhs_loc parameter. Use it.
4862 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4863 calls.
4864
fa337f3a
RB
48652014-01-30 Richard Biener <rguenther@suse.de>
4866
4867 PR c/59905
4868 * c-typeck.c (build_function_call_vec): Do not replace calls
4869 to a function via an incompatible type with a runtime abort.
4870
b72271b9
BI
48712014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4872
4873 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4874 flag_enable_cilkplus with flag_cilkplus.
4875 (c_parser_direct_declarator_inner): Likewise.
4876 (c_parser_attribute_any_word): Likewise.
4877 (c_parser_attributes): Likewise.
4878 (c_parser_compound_statement): Likewise.
4879 (c_parser_statement_after_labels): Likewise.
4880 (c_parser_if_statement): Likewise.
4881 (c_parser_switch_statement): Likewise.
4882 (c_parser_do_statement): Likewise.
4883 (c_parser_for_statement): Likewise.
4884 (c_parser_unary_expression): Likewise.
4885 (c_parser_postfix_expression): Likewise.
4886 (c_parser_postfix_expression_after_primary): Likewise.
4887 (c_parser_postfix_expression_after_primary): Likewise.
4888 (c_parser_omp_clause_name): Likewise.
4889 (c_finish_omp_declare_simd): Likewise.
4890 (c_parser_cilk_verify_simd): Likewise.
4891 * c-typeck.c (build_array_ref): Likewise.
4892 (build_function_call_vec): Likewise.
4893 (convert_arguments): Likewise.
4894 (build_compound_expr): Likewise.
4895 (c_finish_return): Likewise.
4896 (c_finish_if_stmt): Likewise.
4897 (c_finish_loop): Likewise.
4898 (build_binary_op): Likewise.
4899
393e8e8b
MP
49002014-01-23 Marek Polacek <polacek@redhat.com>
4901
4902 PR c/59846
4903 * c-typeck.c (parser_build_binary_op): Use location instead of
4904 input_location.
4905 (build_binary_op): Pass location to shorten_compare.
4906
f04dda30
MP
49072014-01-23 Marek Polacek <polacek@redhat.com>
4908
4909 PR c/58346
4910 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4911 an empty aggregate.
4912
789eadcd
MP
49132014-01-23 Marek Polacek <polacek@redhat.com>
4914
4915 PR c/59871
4916 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4917 of a comma expression.
4918 (emit_side_effect_warnings): Likewise.
4919
40f14e9f
BI
49202014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4921
4922 PR c/59825
4923 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4924 function to use walk_tree and moved a lot of its functionality to
4925 expand_array_notations.
4926 (expand_array_notations): New function.
4927
74558dd9
BI
49282014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4929
4930 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4931 attribute an attribute without value.
4932
652fea39
JJ
49332014-01-23 Jakub Jelinek <jakub@redhat.com>
4934
4935 PR middle-end/58809
4936 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4937 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4938
f34f1c87
MP
49392014-01-22 Marek Polacek <polacek@redhat.com>
4940
4941 PR c/59891
4942 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4943 of remove_c_maybe_const_expr on op1 and op2.
4944
241f845a
JJ
49452014-01-15 Jakub Jelinek <jakub@redhat.com>
4946
4947 PR c/58943
4948 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4949 effects, preevaluate rhs using SAVE_EXPR first.
4950
9a74f20c
BI
49512014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4952
4953 PR c++/59631
4954 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4955 statements with if-elseif statements.
4956
96066ce1
MP
49572014-01-06 Marek Polacek <polacek@redhat.com>
4958
4959 PR c/57773
4960 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4961 defined bit-field types only in ISO C.
4962
23a5b65a
RS
49632014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4964
4965 Update copyright years
4966
f9030485
RS
49672014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4968
4969 * c-array-notation.c: Use the standard form for the copyright notice.
4970
41958c28
BI
49712013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4972
4973 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4974 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4975 field in parser is not empty. If not-empty, call the function
4976 c_parser_finish_omp_declare_simd.
4977 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4978 between SIMD-enabled functions and #pragma simd. Added new parameter.
4979 (c_parser_cilk_all_clauses): Modified the usage of the function
4980 c_parser_cilk_clause_vectorlength as mentioned above.
4981 (c_parser_cilk_simd_fn_vector_attrs): New function.
4982 (c_finish_cilk_simd_fn_tokens): Likewise.
4983 (is_cilkplus_vector_p): Likewise.
4984 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4985 "nomask," and "mask" strings in clause name.
4986 (c_parser_omp_all_clauses): Added 3 new case statements:
4987 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4988 PRAGMA_CILK_CLAUSE_NOMASK.
4989 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4990 check for vector attribute and if so call the function
4991 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4992 called the function c_finish_cilk_simd_fn_tokens.
4993 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4994 parser field is non-empty. If so, parse them as you would parse
4995 the omp declare simd pragma.
4996 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4997 Added a check when step is a parameter and flag it as error.
4998 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4999 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5000 pragma_omp_clause.
5001
cef0fd0e
TS
50022013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5003
5004 * c-parser.c (c_parser_omp_parallel): Fix description.
5005
12893402
BI
50062013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5007
5008 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5009 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5010 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5011 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5012
296674db
JM
50132013-12-04 Joseph Myers <joseph@codesourcery.com>
5014
5015 PR c/52023
5016 * c-parser.c (c_parser_alignas_specifier): Use
5017 c_sizeof_or_alignof_type instead of c_alignof.
5018 (c_parser_alignof_expression): Likewise, with min_alignof
5019 parameter depending on alignof spelling used.
5020
edd28054
MP
50212013-12-04 Marek Polacek <polacek@redhat.com>
5022
5023 PR c/54113
5024 * c-decl.c (start_function): Don't warn for missing prototype for
5025 inline functions.
5026
da0fc454
MP
50272013-12-03 Marek Polacek <polacek@redhat.com>
5028
5029 PR c/59351
5030 * c-decl.c (build_compound_literal): Allow compound literals with
5031 empty initial value.
5032
4c2ecab0
JM
50332013-12-02 Joseph Myers <joseph@codesourcery.com>
5034
5035 PR c/58235
5036 * c-typeck.c (build_modify_expr): Diagnose assignment to
5037 expression with array type.
5038
340baef7
JM
50392013-11-29 Joseph Myers <joseph@codesourcery.com>
5040
5041 PR c/42262
5042 * c-typeck.c (process_init_element): Do not treat a string as
5043 initializing a whole array when used with a designator for an
5044 individual element.
5045
6763b9f7
JM
50462013-11-29 Joseph Myers <joseph@codesourcery.com>
5047
5048 PR c/57574
5049 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5050 an inline function following a static declaration.
5051
e7bd1de1
JJ
50522013-11-28 Jakub Jelinek <jakub@redhat.com>
5053
5054 PR c/59310
5055 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5056 to p_name before calling c_parser_omp_teams instead of after.
5057 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5058 argument. Remove unused p_name variable.
5059
0136f8f0
AH
50602013-11-27 Aldy Hernandez <aldyh@redhat.com>
5061 Jakub Jelinek <jakub@redhat.com>
5062
5063 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5064 external_scope is NULL.
5065
241b71bb
TV
50662013-11-27 Tom de Vries <tom@codesourcery.com>
5067 Marc Glisse <marc.glisse@inria.fr>
5068
5069 PR c++/59032
5070 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5071
2fb9a547
AM
50722013-11-22 Andrew MacLeod <amacleod@redhat.com>
5073
5074 * c-typeck.c: Add required include files from gimple.h.
5075
8400e75e
DM
50762013-11-22 David Malcolm <dmalcolm@redhat.com>
5077
5078 * c-decl.c (define_label, shadow_tag_warned)
5079 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5080 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5081 (declspecs_add_type): Remove use of in_system_header macro.
5082 * c-parser.c (c_parser_unary_expression): Likewise.
5083 * c-typeck.c (store_init_value, process_init_element)
5084 (c_start_case): Likewise.
5085
5086 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5087 macro.
5088
5089 * c-parser.c (c_parser_set_source_position_from_token): Remove
5090 reference to in_system_header from comment.
5091
386b1f1f
RS
50922013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5093
5094 * c-decl.c (grokdeclarator): Update comment to refer to
5095 tree_to_[su]hwi rather than tree_low_cst.
5096
ae7e9ddd
RS
50972013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5098
5099 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5100 tree_to_uhwi throughout.
5101
9439e9a1
RS
51022013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5103
5104 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5105 throughout.
5106
9541ffee
RS
51072013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5108
5109 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5110 throughout.
5111
c02065fc
AH
51122013-11-15 Aldy Hernandez <aldyh@redhat.com>
5113
5114 * c-parser.c (c_parser_cilk_simd): New.
5115 (c_parser_cilk_verify_simd): New.
5116 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5117 (c_parser_omp_for_loop): Add case for NE_EXPR.
5118 Set c_break_label for CILK_SIMD.
5119 (c_parser_cilk_clause_vectorlength): New.
5120 (c_parser_cilk_clause_linear): New.
5121 (c_parser_cilk_clause_name): New.
5122 (c_parser_cilk_all_clauses): New.
5123 * c-typeck.c (build_unary_op): Pass location argument to
5124 readonly_error.
5125 (build_modify_expr): Same.
5126 (build_asm_expr): Same.
5127 (c_finish_bc_stmt): Error on break/continue in loops.
5128
18f429e2
AM
51292013-11-14 Andrew MacLeod <amacleod@redhat.com>
5130
5131 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5132
d8a2d370
DN
51332013-11-14 Diego Novillo <dnovillo@google.com>
5134
5135 * c-decl.c: Include print-tree.h.
5136 Include stor-layout.h.
5137 Include varasm.h.
5138 Include attribs.h.
5139 Include stringpool.h.
5140 * c-lang.c: Include fold-const.h.
5141 * c-parser.c: Include stringpool.h.
5142 Include attribs.h.
5143 Include stor-layout.h.
5144 Include varasm.h.
5145 Include trans-mem.h.
5146 * c-typeck.c: Include stor-layout.h.
5147 Include trans-mem.h.
5148 Include varasm.h.
5149 Include stmt.h.
5150
38b7bc7f
JM
51512013-11-13 Joseph Myers <joseph@codesourcery.com>
5152
5153 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5154 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5155 __auto_type.
5156 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5157 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5158 RID_AUTO_TYPE.
5159 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5160 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5161 (c_parser_declarator, c_parser_direct_declarator_inner)
5162 (c_parser_parameter_declaration, c_parser_type_name): All callers
5163 changed.
5164 (c_parser_declaration_or_fndef): Handle declarations with type
5165 determined from the initializer.
5166
45b0be94
AM
51672013-11-12 Andrew MacLeod <amacleod@redhat.com>
5168
18f429e2 5169 * c-typeck.c: Include gimplify.h.
45b0be94 5170
582d9b50
JM
51712013-11-12 Joseph Myers <joseph@codesourcery.com>
5172
5173 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5174 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5175 comment.
5176 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5177 or _Thread_local as appropriate in diagnostics.
5178 (build_null_declspecs): Initialize ret->thread_gnu_p.
5179 (declspecs_add_scspec): Handle either __thread or _Thread_local
5180 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5181 pedantic. Do not disallow _Thread_local extern and _Thread_local
5182 static.
5183
267bac10
JM
51842013-11-07 Joseph Myers <joseph@codesourcery.com>
5185 Andrew MacLeod <amacleod@redhat.com>
5186
5187 * c-aux-info.c (gen_type): Handle atomic qualifier.
5188 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5189 qualifiers when compating types.
5190 (shadow_tag_warned): Handle atomic_p in declspecs.
5191 (quals_from_declspecs): Likewise.
5192 (start_decl): Use c_type_promotes_to when promoting argument
5193 types.
5194 (grokdeclarator): Handle _Atomic.
5195 (get_parm_info): Diagnose any qualifier on "void" as only
5196 parameter.
5197 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5198 comparing types. Use c_type_promotes_to when promoting argument
5199 types.
5200 (finish_function): Use c_type_promotes_to when promoting argument
5201 types.
5202 (build_null_declspecs): Handle atomic_p in declspecs.
5203 (declspecs_add_qual): Handle RID_ATOMIC.
5204 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5205 (c_token_starts_declspecs): Handle RID_ATOMIC.
5206 (c_parser_declspecs): Handle atomic type specifiers and
5207 qualifiers.
5208 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5209 from types of expressions with atomic type.
5210 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5211 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5212 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5213 (c_parser_statement_after_labels, c_parser_switch_statement)
5214 (c_parser_for_statement, c_parser_expr_no_commas)
5215 (c_parser_conditional_expression, c_parser_binary_expression)
5216 (c_parser_cast_expression, c_parser_unary_expression)
5217 (c_parser_postfix_expression)
5218 (c_parser_postfix_expression_after_primary, c_parser_expression):
5219 Use convert_lvalue_to_rvalue.
5220 (c_parser_expression_conv, c_parser_expr_list): Document
5221 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5222 (c_parser_objc_synchronized_statement): Use
5223 convert_lvalue_to_rvalue.
5224 (c_parser_objc_selector): Handle RID_ATOMIC.
5225 (c_parser_objc_receiver, c_parser_array_notation): Use
5226 convert_lvalue_to_rvalue.
5227 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5228 _Atomic (type-name).
5229 (struct c_declspecs): Add atomic_p field.
5230 (convert_lvalue_to_rvalue): Declare.
5231 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5232 corresponding atomic types.
5233 (qualify_type): Don't add _Atomic qualifiers from second argument.
5234 (comp_target_types): Do not allow _Atomic mismatches.
5235 (type_lists_compatible_p): Do not remove atomic qualifiers when
5236 comparing types.
5237 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5238 (build_atomic_assign): New functions.
5239 (build_unary_op): Use build_atomic_assign for atomic increment and
5240 decrement.
5241 (build_conditional_expr): Do not treat _Atomic void as a qualified
5242 version of void.
5243 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5244 (find_anonymous_field_with_type, convert_to_anonymous_field)
5245 (convert_for_assignment): Do not remove atomic qualifiers when
5246 comparing types.
5247 (digest_init): Do not accept initialization of arrays of atomic
5248 elements by string constants.
5249 (build_asm_expr): Use convert_lvalue_to_rvalue.
5250 (build_binary_op): Do not treat _Atomic void as a qualified
5251 version of void.
5252
0c249d4b
DD
52532013-11-06 DJ Delorie <dj@redhat.com>
5254
5255 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5256 both explicit and builtin, print the location of the explicit one.
5257
6d7f7e0a
TB
52582013-11-05 Tobias Burnus <burnus@net-b.de>
5259
5260 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5261 c_parser_omp_distribute, c_parser_omp_teams,
5262 c_parser_omp_target, c_parser_omp_declare): Handle
5263 -fopenmp-simd.
5264
b906f4ca
MP
52652013-11-03 Marek Polacek <polacek@redhat.com>
5266
5267 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5268
ee1d5a02
JJ
52692013-11-01 Jakub Jelinek <jakub@redhat.com>
5270
5271 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5272 check_dup_generic at the end, unless remove is true.
5273 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5274 remove = true;.
5275 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5276
5a9785fb
JJ
52772013-10-31 Jakub Jelinek <jakub@redhat.com>
5278
5279 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5280 with decl that is not pointer nor array.
5281
939b37da
BI
52822013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5283
5284 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5285 a spawning function is found.
5286 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5287 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5288 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5289 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5290 case.
5291 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5292 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5293 expr.
5294 (c_finish_return): Added a check to reject _Cilk_spawn in return
5295 expression.
5296 (build_cilk_spawn): New function.
5297 (build_cilk_sync): Likewise.
5298 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5299
d4af74d4
TB
53002013-10-27 Tobias Burnus <burnus@net-b.de>
5301
5302 PR other/33426
5303 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5304 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5305 (c_parser_statement_after_labels): Update calls.
5306
d73749df 53072013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5308
5309 PR other/33426
5310 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5311 Handle PRAGMA_IVDEP.
5312 (c_parser_statement_after_labels): Update call.
5313
f28aa681
MP
53142013-10-24 Marek Polacek <polacek@redhat.com>
5315
5316 * c-parser.c (c_parser_struct_declaration): Add a comment.
5317 (c_parser_declarator): Don't allow _Alignas here.
5318
0645c1a2
AM
53192013-10-17 Andrew MacLeod <amacleod@redhat.com>
5320
5321 * c-parser.c: Include omp-low.h.
5322 * c-typeck.c: Likewise.
5323
568a31f2
MP
53242013-10-17 Marek Polacek <polacek@redhat.com>
5325
5326 PR c/58267
5327 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5328 Document syntax of the array-declarator.
5329 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5330 are not permitted.
5331 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5332 (c_parser_struct_declaration): Likewise.
5333 (c_parser_declarator): Likewise.
5334 (c_parser_direct_declarator_inner): Likewise.
5335 (c_parser_parameter_declaration): Likewise.
5336 (c_parser_type_name): Likewise.
5337
acf0174b
JJ
53382013-10-11 Jakub Jelinek <jakub@redhat.com>
5339
5340 * c-lang.h (current_omp_declare_target_attribute): New extern
5341 decl.
5342 * c-parser.c: Include c-lang.h.
5343 (struct c_parser): Change tokens to c_token *.
5344 Add tokens_buf field. Change tokens_avail type to unsigned int.
5345 (c_parser_consume_token): If parser->tokens isn't
5346 &parser->tokens_buf[0], increment parser->tokens.
5347 (c_parser_consume_pragma): Likewise.
5348 (enum pragma_context): Add pragma_struct and pragma_param.
5349 (c_parser_external_declaration): Adjust
5350 c_parser_declaration_or_fndef caller.
5351 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5352 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5353 Adjust recursive call.
5354 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5355 of pragma_external.
5356 (c_parser_parameter_declaration): Use pragma_param instead of
5357 pragma_external.
5358 (c_parser_compound_statement_nostart, c_parser_label,
5359 c_parser_for_statement): Adjust
5360 c_parser_declaration_or_fndef callers.
5361 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5362 it through to c_parser_conditional_expression.
5363 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5364 pass it through to c_parser_binary_expression. Adjust recursive
5365 call.
5366 (c_parser_binary_expression): Remove prec argument, add
5367 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5368 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5369 binop matches it, use build2 instead of parser_build_binary_op.
5370 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5371 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5372 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5373 Handle pragma_struct and pragma_param the same as pragma_external.
5374 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5375 (c_parser_omp_variable_list): Parse array sections for
5376 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5377 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5378 (c_parser_omp_clause_reduction): Handle user defined reductions.
5379 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5380 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5381 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5382 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5383 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5384 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5385 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5386 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5387 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5388 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5389 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5390 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5391 (c_parser_omp_for_loop): Add CODE argument, pass it through
5392 to c_finish_omp_for. Change last argument to cclauses,
5393 and adjust uses to grab parallel clauses from the array of all
5394 the split clauses. Adjust c_parser_binary_expression,
5395 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5396 (omp_split_clauses): New function.
5397 (c_parser_omp_simd): New function.
5398 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5399 Allow the function to be called also when parsing combined constructs,
5400 and call c_parser_omp_simd when parsing for simd.
5401 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5402 #pragma omp section, require exactly one structured-block instead of
5403 sequence of statements.
5404 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5405 Allow the function to be called also when parsing combined constructs.
5406 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5407 Allow the function to be called also when parsing combined
5408 constructs.
5409 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5410 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5411 c_parser_omp_teams, c_parser_omp_target_data,
5412 c_parser_omp_target_update, c_parser_omp_target,
5413 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5414 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5415 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5416 (c_parser_omp_construct): Add p_name and mask vars. Handle
5417 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5418 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5419 and c_parser_omp_sections callers.
5420 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5421 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5422 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5423 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5424 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5425 OMP_CLAUSE_DEPEND.
5426 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5427 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5428 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5429 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5430 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5431 * c-typeck.c: Include tree-inline.h.
5432 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5433 handle_omp_array_sections_1, handle_omp_array_sections,
5434 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5435 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5436 user defined reductions.
5437 (c_tree_equal): New function.
5438 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5439 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5440 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5441 c_check_omp_declare_reduction_r): New prototypes.
5442 * c-decl.c (current_omp_declare_target_attribute): New variable.
5443 (c_decl_attributes): New function.
5444 (start_decl, start_function): Use it instead of decl_attributes.
5445 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5446 c_omp_reduction_decl, c_omp_reduction_lookup,
5447 c_check_omp_declare_reduction_r): New functions.
5448
0a6c2227
TT
54492013-09-25 Tom Tromey <tromey@redhat.com>
5450
5451 * Make-lang.in (c/gccspec.o): Remove.
5452 (CFLAGS-c/gccspec.o): New variable.
5453 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5454 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5455 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5456
f3bc55f0
TT
54572013-09-25 Tom Tromey <tromey@redhat.com>
5458
5459 * Make-lang.in (c/gccspec.o): Don't use subshell.
5460
a24d975c
MP
54612013-09-18 Marek Polacek <polacek@redhat.com>
5462
5463 PR sanitize/58443
5464 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5465 Remove unnecessary check.
5466
ce6923c5
MP
54672013-09-18 Marek Polacek <polacek@redhat.com>
5468
5469 PR sanitizer/58411
5470 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5471 no_sanitize_undefined attribute.
5472
a1e51df9
KT
54732013-09-13 Kai Tietz <ktietz@redhat.com>
5474
5475 PR target/57848
5476 * c-decl.c (c_builtin_function_ext_scope): Remove
5477 wrong assumption that it is never called on prexisting
5478 symbol.
5479
0af94e6f
JR
54802013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5481
5482 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5483
20059c8b
GDR
54842013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5485
5486 * c-objc-common.c (c_tree_printer): Tidy.
5487
de5a5fa1
MP
54882013-08-30 Marek Polacek <polacek@redhat.com>
5489
5490 * c-typeck.c (build_binary_op): Add division by zero and shift
5491 instrumentation.
5492
2531a1d9 54932013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5494 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5495
6e2bcc98 5496 PR c/35649
2531a1d9
JR
5497 * c-typeck.c (c_common_type): Prefer double_type_node over
5498 other REAL_TYPE types with the same precision.
5499 (convert_arguments): Likewise.
5500
025311c4
GDR
55012013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5502
5503 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5504 (c_initialize_diagnostics): Call a destructor for the early printer.
5505
da6ca2b5
GDR
55062013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5507
5508 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5509 printer initialization.
5510
318cda85 55112013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5512
318cda85
BI
5513 PR c/57490
5514 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5515 check for truth values.
5516 (expand_array_notation_exprs): Added truth values case. Removed an
5517 unwanted else. Added for-loop to walk through subtrees in default
5518 case.
5519
b066401f
GDR
55202013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5521
5522 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5523
fb48aadc
JM
55242013-07-23 Joseph Myers <joseph@codesourcery.com>
5525
5526 * c-parser.c (struct c_generic_association): Fix typo.
5527
433cc7b0
TT
55282013-07-23 Tom Tromey <tromey@redhat.com>
5529 Joseph Myers <joseph@codesourcery.com>
5530
5531 * c-parser.c (struct c_generic_association): New.
5532 (c_generic_association_d): New typedef.
5533 (c_parser_generic_selection): New function.
5534 (c_parser_postfix_expression): Handle RID_GENERIC.
5535
26d40c3d
JM
55362013-07-13 Jason Merrill <jason@redhat.com>
5537
5538 PR c++/57793
5539 * c-decl.c (finish_struct): Check for too-large class.
5540
ecdbd01a 55412013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5542
5543 PR c/57821
5544 * c-typeck.c (set_init_index): When folding, check for index overflow.
5545
1141ed3f
BI
55462013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5547
5548 * c-parser.c (c_parser_array_notation): Removed rejection of array
5549 notations in an array of function pointers.
5550
713b46fa
BI
55512013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5552
5553 * c-array-notation.c (make_triplet_val_inv): New function.
5554 (create_cmp_incr): Likewise.
5555 (create_array_refs): Likewise.
5556 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5557 Also modularized common parts between functions and called the function.
5558 (build_array_notation_expr): Likewise.
5559 (fix_conditional_array_notations_1): Likewise.
5560 (fix_array_notation_expr): Likewise.
5561 (fix_array_notation_call_expr): Likewise.
5562
92f20202
MP
55632013-06-18 Marek Polacek <polacek@redhat.com>
5564
5565 PR c/57630
5566 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5567
73a23b06
BI
55682013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5569
5570 * c-array-notation.c (build_array_notation_expr): Reject array notation
5571 mismatch between LHS and RHS even inside a call_expr. Also, removed
5572 a couple while statements that were dead code.
5573
00b8517d
BI
55742013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5575
5576 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5577 excessive precision expressions in function parameters. Also removed
5578 couple unwanted while statements.
5579
1509bdda
BI
55802013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5581
5582 * c-array-notation.c (expand_array_notation_exprs): Added
5583 ARRAY_NOTATION_REF case.
5584
d60f1706
BI
55852013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5586
5587 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5588 function to c-family/array-notation-common.c.
5589 (is_cilkplus_reduce_builtin): Likewise.
5590 (find_rank): Likewise.
5591 (extract_array_notation_exprs): Likewise.
5592 (replace_array_notations): Likewise.
5593 (find_inv_trees): Likewise.
5594 (replace_inv_trees): Likewise.
5595 (contains_array_notation_expr): Likewise.
5596 (find_correct_array_notation_type): Likewise.
5597 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5598 (struct inv_list): Moved this to c-family/array-notation-common.c.
5599 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5600
6d6efbb3
BI
56012013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5602
5603 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5604 reduction functions outside the for-loop. Added a check if the fundecl
5605 is non-NULL. Finally, removed an unwanted if-statement, and made the
5606 body unconditional.
5607
25c22937
BI
56082013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5609
5610 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5611 condition of the if-statement matches the rank of else-block and then-
5612 block when array notations are used.
5613 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5614 expression after the entire function body is parsed.
5615 (c_parser_expr_no_commas): Delayed creating array notation expressions
5616 to the end of function parsing.
5617 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5618 whole if-statement instead of just the condition.
5619 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5620
edd25645
BI
56212013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5622
5623 PR c/57474
5624 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5625 array to NULL_TREE if they are unused. Also added a check for the
5626 field to be NULL before its fields are used in future.
5627
065ce7f1
RO
56282013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5629
5630 PR bootstrap/57450
5631 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5632 (build_array_notation_expr): Likewise.
5633
36536d79
BI
56342013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5635
5636 * c-typeck.c (build_array_ref): Added a check to see if array's
5637 index is greater than one. If true, then emit an error.
5638 (build_function_call_vec): Exclude error reporting and checking
5639 for builtin array-notation functions.
5640 (convert_arguments): Likewise.
5641 (c_finish_return): Added a check for array notations as a return
5642 expression. If true, then emit an error.
5643 (c_finish_loop): Added a check for array notations in a loop
5644 condition. If true then emit an error.
5645 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5646 (build_binary_op): Added a check for array notation expr inside
5647 op1 and op0. If present, we call another function to find correct
5648 type.
5649 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5650 * c-parser.c (c_parser_compound_statement): Check if array
5651 notation code is used in tree, if so, then transform them into
5652 appropriate C code.
5653 (c_parser_expr_no_commas): Check if array notation is used in LHS
5654 or RHS, if so, then build array notation expression instead of
5655 regular modify.
5656 (c_parser_postfix_expression_after_primary): Added a check for
5657 colon(s) after square braces, if so then handle it like an array
5658 notation. Also, break up array notations in unary op if found.
5659 (c_parser_direct_declarator_inner): Added a check for array
5660 notation.
5661 (c_parser_compound_statement): Added a check for array notation in
5662 a stmt. If one is present, then expand array notation expr.
5663 (c_parser_if_statement): Likewise.
5664 (c_parser_switch_statement): Added a check for array notations in
5665 a switch statement's condition. If true, then output an error.
5666 (c_parser_while_statement): Similarly, but for a while.
5667 (c_parser_do_statement): Similarly, but for a do-while.
5668 (c_parser_for_statement): Similarly, but for a for-loop.
5669 (c_parser_unary_expression): Check if array notation is used in a
5670 pre-increment or pre-decrement expression. If true, then expand
5671 them.
5672 (c_parser_array_notation): New function.
5673 * c-array-notation.c: New file.
5674 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5675
cd192ccc
MS
56762013-05-23 Mike Stump <mikestump@comcast.net>
5677
5678 * c-typeck.c (convert_for_assignment): Handle references to memory
5679 spaces better.
5680
427b248d
JM
56812013-05-16 Jason Merrill <jason@redhat.com>
5682
5683 * Make-lang.in (cc1$(exeext)): Use link mutex.
5684
44d90fe1
PC
56852013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5686
5687 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5688 to simply use OPT_Wpointer_arith.
5689 (build_unary_op): Likewise.
5690
4e7d7b3d
JJ
56912013-04-03 Jakub Jelinek <jakub@redhat.com>
5692
5693 PR c/19449
5694 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5695 argument. If set, or it temporarily for parsing of the first
5696 argument into force_folding_builtin_constant_p.
5697 (c_parser_postfix_expression): Adjust callers.
5698
839b422f
RB
56992013-03-21 Richard Biener <rguenther@suse.de>
5700
5701 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5702 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5703
2ee028f1
MP
57042013-02-12 Marek Polacek <polacek@redhat.com>
5705
5706 PR c/44938
5707 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5708 origtypes to NULL.
5709
8824edff
JJ
57102013-01-24 Jakub Jelinek <jakub@redhat.com>
5711
5712 PR c/56078
5713 * c-typeck.c (set_nonincremental_init_from_string): If
5714 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5715 returned false.
5716 (process_init_element): Likewise.
5717
eadd3d0d
JJ
57182012-12-20 Jakub Jelinek <jakub@redhat.com>
5719
5720 PR c++/55619
5721 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5722 argument, don't call default_function_array_conversion
5723 nor c_fully_fold here.
5724 (c_parser_asm_statement): Adjust callers.
5725 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5726 and outputs here, and call default_function_array_conversion
5727 on inputs that don't need to be addressable.
5728
f8a93a2e
JJ
57292012-12-18 Jakub Jelinek <jakub@redhat.com>
5730
5731 PR c/39464
5732 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5733 warning require that both c_common_unsigned_type as well as
5734 c_common_signed_type is the same for both mvl and mvr types.
5735
9771b263
DN
57362012-11-16 Diego Novillo <dnovillo@google.com>
5737
5738 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5739
5740 * c-common.c: Use new vec API in vec.h.
5741 * c-common.h: Likewise.
5742 * c-gimplify.c: Likewise.
5743 * c-pragma.c: Likewise.
5744 * c-pretty-print.c: Likewise.
5745 * c-pretty-print.h: Likewise.
5746 * c-semantics.c: Likewise.
5747 * c-decl.c: Likewise.
5748 * c-parser.c: Likewise.
5749 * c-tree.h: Likewise.
5750 * c-typeck.c: Likewise.
5751
880661a4
JW
57522012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5753
5754 PR c++/54930
5755 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5756
077d1abe
MLI
57572012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5758
5759 PR c/53066
5760 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5761 shadows a function, unless the variable is a function or a
5762 pointer-to-function.
5763
3a785c97
JJ
57642012-10-12 Jakub Jelinek <jakub@redhat.com>
5765
5766 PR c/54381
5767 * c-parser.c (struct c_tree_loc_pair): Removed.
5768 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5769 add location_t * and tree * arguments, fill in array of 3
5770 sizeof_arg trees and corresponding locs.
5771 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5772 c_parser_expr_list callers.
5773 (c_parser_postfix_expression_after_primary): Likewise. Pass
5774 array of 3 sizeof_arg trees and locs (corresponding to first
5775 3 arguments) to sizeof_pointer_memaccess_warning.
5776
703c8606
LC
57772012-10-09 Lawrence Crowl <crowl@google.com>
5778
5779 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5780 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5781 hash table.
5782
5d9de0d0
PC
57832012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5784
5785 PR c++/54194
5786 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5787 call.
5788
a212e43f
MG
57892012-10-09 Marc Glisse <marc.glisse@inria.fr>
5790
5791 PR c++/54427
5792 * c-typeck.c: Include c-common.h.
5793 (enum stv_conv): Moved to c-common.h.
5794 (scalar_to_vector): Moved to c-common.c.
5795 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5796 * Make-lang.in: c-typeck.c depends on c-common.h.
5797
3b78de56
AC
57982012-10-04 Arnaud Charlet <charlet@adacore.com>
5799
5800 * c-decl.c (c_write_global_declarations): Fix handling of
5801 -fdump-ada-spec*.
5802
78c60e3d
SS
58032012-09-30 Sharad Singhai <singhai@google.com>
5804
5805 * c-decl.c (c_write_global_declarations): Use a different method
5806 to determine if the dump has ben initialized.
5807
9f33203d
JM
58082012-09-14 Joseph Myers <joseph@codesourcery.com>
5809
5810 PR c/54552
5811 * c-typeck.c (c_cast_expr): When casting to a type requiring
5812 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5813 c_fully_fold first.
5814
a27d595d
JM
58152012-09-14 Joseph Myers <joseph@codesourcery.com>
5816
5817 PR c/54103
5818 * c-typeck.c (build_unary_op): Pass original argument of
5819 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5820 any C_MAYBE_CONST_EXPR, if it has integer operands.
5821 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5822 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5823 to c_objc_common_truthvalue_conversion, then remove any
5824 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5825 c_objc_common_truthvalue_conversion not
5826 c_common_truthvalue_conversion.
5827 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5828 call note_integer_operands for arguments with integer operands
5829 that are not integer constants.
5830
9feb29df
JJ
58312012-09-13 Jakub Jelinek <jakub@redhat.com>
5832
5833 PR c/54559
5834 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5835 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5836
d409320c
JJ
58372012-08-31 Jakub Jelinek <jakub@redhat.com>
5838
5839 PR c/54428
5840 * c-convert.c (convert): Don't call fold_convert_loc if
5841 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5842 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5843 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5844
6265d07c
JJ
58452012-08-24 Jakub Jelinek <jakub@redhat.com>
5846
5847 PR c/54355
5848 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5849 for nested and empty_ok arguments in the call to
5850 c_parser_declaration_or_fndef.
5851
1a4049e7
JJ
58522012-08-17 Jakub Jelinek <jakub@redhat.com>
5853
5854 * c-tree.h (c_last_sizeof_arg): Declare.
5855 * c-parser.c (struct c_tree_loc_pair): New type.
5856 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5857 non-NULL.
5858 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5859 (c_parser_postfix_expression_after_primary): Likewise. Call
5860 sizeof_pointer_memaccess_warning if needed.
5861 (sizeof_ptr_memacc_comptypes): New function.
5862 * c-typeck.c (c_last_sizeof_arg): New global variable.
5863 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5864
0229aee9
UB
58652012-07-24 Uros Bizjak <ubizjak@gmail.com>
5866
5867 * c-lang.h (lang_decl): Add variable_size GTY option.
5868
7ee2468b
SB
58692012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5870
5871 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5872 * Make-lang.in: Fix dependencies.
5873
d4a10d0a
SB
58742012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5875
5876 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5877 and add language Makefile hooks.
5878 * config-lang.in: New file.
5879 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5880 add the required "normal" config-lang.in rules.
5881 * c-lang.h: Moved from gcc/ to here.
5882 * c-tree.h: Likewise.
5883 * c-objc-common.c: Likewise.
5884 * c-objc-common.h: Likewise.
5885 * c-typeck.c: Likewise.
5886 * c-convert.c: Likewise.
5887 * c-lang.c: Likewise.
5888 * c-aux-info.c: Likewise.
5889 * c-errors.c: Likewise.
5890 * gccspec.c: Likewise.
5891 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5892 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5893\f
85ec4feb 5894Copyright (C) 2012-2018 Free Software Foundation, Inc.
d4a10d0a
SB
5895
5896Copying and distribution of this file, with or without modification,
5897are permitted in any medium without royalty provided the copyright
5898notice and this notice are preserved.