re PR c/89525 (inform messages from -Wbuiltin-declaration-mismatch even with -w)
[gcc.git] / gcc / c / ChangeLog
1 2019-02-28 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/89525
4 * c-typeck.c (convert_arguments): Call inform_declaration only if
5 the previous warning_at call returned true.
6
7 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
8
9 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
10 parameter. Adjust all users.
11 (c_parser_oacc_simple_clause): Replace parser with loc formal
12 parameter. Adjust all users.
13
14 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
15
16 PR c/87924
17 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
18 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
19
20 2019-02-15 Jakub Jelinek <jakub@redhat.com>
21
22 PR c/89340
23 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
24 before c_decl_attributes rather than after it.
25
26 2019-02-06 Jakub Jelinek <jakub@redhat.com>
27
28 PR c/89211
29 * c-parser.c (c_parser_declaration_or_fndef): Don't update
30 DECL_ARGUMENTS of d if it has been defined already. Use a single if
31 instead of 3 nested ifs.
32
33 2019-02-06 Joseph Myers <joseph@codesourcery.com>
34
35 PR c/88584
36 * c-decl.c (finish_decl): Do not complete array types for arrays
37 with external linkage not at file scope.
38
39 2019-02-05 Richard Biener <rguenther@suse.de>
40
41 PR c/88606
42 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
43 all type variants when not supported.
44
45 2019-01-30 Jakub Jelinek <jakub@redhat.com>
46
47 PR c/89061
48 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
49 * c-decl.c (decl_jump_unsafe): Return false for
50 C_DECL_COMPOUND_LITERAL_P decls.
51 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
52
53 2019-01-29 Jakub Jelinek <jakub@redhat.com>
54
55 PR c/89045
56 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
57 scope.
58
59 PR c/86125
60 * c-decl.c (last_fileptr_type): Remove.
61 (last_structptr_types): New variable.
62 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
63 {old,new}rettype instead of the types themselves. Assert
64 last_structptr_types array has the same number of elements
65 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
66 argument oldtype and newtype. Instead of handling
67 just fileptr_type_node specially, handle all builtin_structptr_types
68 pointer nodes. Formatting fix.
69
70 2019-01-24 Martin Sebor <msebor@redhat.com>
71
72 PR c/86125
73 PR c/88886
74 PR middle-end/86308
75 * c-decl.c (match_builtin_function_types): Add arguments.
76 (diagnose_mismatched_decls): Diagnose mismatched declarations
77 of built-ins more strictly.
78
79 2019-01-24 Jakub Jelinek <jakub@redhat.com>
80
81 PR c++/88976
82 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
83 on #pragma omp cancel with different modifiers.
84
85 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
86
87 PR c/51628
88 PR c/88664
89 * c-typeck.c (convert_for_assignment): Upate the
90 warn_for_address_or_pointer_of_packed_member call.
91
92 2019-01-16 Tom Honermann <tom@honermann.net>
93 Jason Merrill <jason@redhat.com>
94
95 * c-typeck.c (digest_init): Revised the error message produced for
96 ill-formed cases of array initialization with a string literal.
97 (error_init): Make variadic.
98
99 2019-01-12 Jakub Jelinek <jakub@redhat.com>
100
101 * c-typeck.c (convert_for_assignment): Fix a comment typo.
102
103 2019-01-07 Jakub Jelinek <jakub@redhat.com>
104
105 PR c/88701
106 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
107 if current_function_decl is non-NULL.
108
109 2019-01-07 Joseph Myers <joseph@codesourcery.com>
110
111 PR c/88720
112 PR c/88726
113 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
114 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
115 functions declared but never defined only for external scope, not
116 for other scopes.
117
118 2019-01-07 Jakub Jelinek <jakub@redhat.com>
119
120 PR c++/85052
121 * c-parser.c (c_parser_postfix_expression): Parse
122 __builtin_convertvector.
123
124 2019-01-01 Jakub Jelinek <jakub@redhat.com>
125
126 Update copyright years.
127
128 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
129
130 PR c/51628
131 * c-typeck.c (convert_for_assignment): Call
132 warn_for_address_or_pointer_of_packed_member.
133
134 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
135
136 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
137 a more specific error message (instead of just falling through).
138
139 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
140
141 * c-parser.c (c_parser_asm_statement): Keep track of the location each
142 asm qualifier is first seen; use that to give nicer "duplicate asm
143 qualifier" messages. Delete 'quals" variable, instead pass the
144 "is_volatile_ flag to build_asm_stmt directly.
145 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
146 * c-typeck.c (build_asm_stmt): Ditto; adjust.
147
148 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
149
150 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
151 "done" boolean variable.
152
153 2018-12-19 David Malcolm <dmalcolm@redhat.com>
154
155 PR c++/87504
156 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
157 Move from here to gcc-rich-location.h and gcc-rich-location.c.
158 (build_binary_op): Use struct op_location_t and
159 class binary_op_rich_location.
160
161 2018-12-11 Jakub Jelinek <jakub@redhat.com>
162
163 PR sanitizer/88426
164 * c-convert.c (convert): Call c_fully_fold before calling
165 ubsan_instrument_float_cast.
166
167 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
168
169 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
170 setting "quals".
171
172 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
173
174 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
175 after asm. Pass a flag for it to build_asm_expr.
176 * c-tree.h (build_asm_expr): Update declaration.
177 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
178 set ASM_INLINE_P.
179
180 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
181
182 PR inline-asm/55681
183 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
184 combination of volatile and goto, in any order, without repetitions.
185
186 2018-12-04 James Norris <jnorris@codesourcery.com>
187 Cesar Philippidis <cesar@codesourcery.com>
188 Julian Brown <julian@codesourcery.com>
189
190 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
191 code.
192
193 2018-11-30 Richard Biener <rguenther@suse.de>
194
195 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
196 _Literal (type) { ... } as empty aggregate or vector constructor.
197
198 2018-11-29 Martin Sebor <msebor@redhat.com>
199
200 PR c/88091
201 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
202 (convert_arguments): Add comments. Pass additional argument to
203 the function above.
204
205 2018-11-29 Martin Sebor <msebor@redhat.com>
206
207 PR c/88172
208 PR testsuite/88208
209 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
210
211 2018-11-23 Martin Sebor <msebor@redhat.com>
212
213 PR testsuite/88098
214 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
215 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
216
217 2018-11-20 Martin Sebor <msebor@redhat.com>
218
219 * c-parser.c (c_parser_has_attribute_expression): New function.
220 (c_parser_attribute): New function.
221 (c_parser_attributes): Move code into c_parser_attribute.
222 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
223
224 2018-11-15 Martin Sebor <msebor@redhat.com>
225
226 PR c/83656
227 * c-decl.c (header_for_builtin_fn): Declare.
228 (diagnose_mismatched_decls): Diagnose declarations of built-in
229 functions without a prototype.
230 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
231 (convert_argument): Same.
232 (convert_arguments): Factor code out into convert_argument.
233 Detect mismatches between built-in formal arguments in calls
234 to built-in without prototype.
235 (build_conditional_expr): Same.
236 (type_or_builtin_type): New function.
237 (convert_for_assignment): Add argument. Conditionally issue
238 warnings instead of errors for mismatches.
239
240 2018-11-13 David Malcolm <dmalcolm@redhat.com>
241
242 * c-decl.c: Replace "source_location" with "location_t".
243 * c-tree.h: Likewise.
244 * c-typeck.c: Likewise.
245 * gimple-parser.c: Likewise.
246
247 2018-11-09 Jakub Jelinek <jakub@redhat.com>
248
249 * c-parser.c (c_parser_omp_clause_final): Use
250 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
251 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
252 parsing instead of c_parser_paren_condition.
253 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
254 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
255 c_fully_fold instead of c_parser_condition.
256 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
257 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
258 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
259 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
260 c_parser_expr_no_commas instead of c_parser_expression.
261
262 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
263 reduction clause with inscan modifier.
264
265 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
266 clauses other than atomic_default_mem_order.
267
268 2018-11-08 Jakub Jelinek <jakub@redhat.com>
269
270 * c-parser.c: Include memmode.h.
271 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
272 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
273 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
274 task_reduction clauses.
275 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
276 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
277 section, or lvalue assignment expression.
278 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
279 (c_parser_omp_clause_lastprivate): Parse optional
280 conditional: modifier.
281 (c_parser_omp_clause_hint): Require constant integer expression rather
282 than just integer expression.
283 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
284 clause.
285 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
286 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
287 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
288 functions.
289 (c_parser_omp_clause_depend): Parse iterator modifier and handle
290 iterators. Parse mutexinoutset and depobj kinds.
291 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
292 callers.
293 (c_parser_omp_all_clauses): Likewise. Handle
294 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
295 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
296 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
297 default memory order from requires directive if any. Adjust
298 c_finish_omp_atomic caller.
299 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
300 (c_parser_omp_flush): Parse flush with memory-order-clause.
301 (c_parser_omp_for_loop): Allow NE_EXPR even in
302 OpenMP loops, adjust c_finish_omp_for caller.
303 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
304 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
305 Allow to be called while parsing combined parallel master.
306 Parse combined master taskloop{, simd}.
307 (c_parser_omp_parallel): Parse combined
308 parallel master{, taskloop{, simd}} constructs.
309 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
310 (OMP_TASKGROUP_CLAUSE_MASK): Define.
311 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
312 (OMP_TASKWAIT_CLAUSE_MASK): Define.
313 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
314 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
315 around teams body. Use SET_EXPR_LOCATION.
316 (c_parser_omp_target_data): Allow target data
317 with only use_device_ptr clauses.
318 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
319 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
320 (c_parser_omp_requires): New function.
321 (c_finish_taskloop_clauses): New function.
322 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
323 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
324 declaration. Disallow in_reduction clause when combined with parallel
325 master.
326 (c_parser_omp_construct): Adjust c_parser_omp_master and
327 c_parser_omp_taskgroup callers.
328 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
329 other than cancel.
330 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
331 like OMP_CLAUSE_REDUCTION.
332 (handle_omp_array_sections): Likewise. Call save_expr on array
333 reductions before calling build_index_type. Handle depend clauses
334 with iterators.
335 (struct c_find_omp_var_s): New type.
336 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
337 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
338 with static, runtime or auto schedule kinds. Call save_expr for whole
339 array reduction sizes. Diagnose reductions with zero sized elements
340 or variable length structures. Diagnose nogroup clause used with
341 reduction clause(s). Handle depend clause with
342 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
343 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
344 some different type for other kinds. Use build_unary_op with
345 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
346 Handle depend clauses with iterators. Remove no longer needed special
347 case that predetermined const qualified vars may be specified in
348 firstprivate clause. Complain if const qualified vars are mentioned
349 in data-sharing clauses other than firstprivate or shared. Use
350 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
351 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
352 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
353 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
354
355 2018-10-29 David Malcolm <dmalcolm@redhat.com>
356
357 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
358 logic for change to name_hint::operator bool.
359 (undeclared_variable): Likewise.
360 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
361 (c_parser_parameter_declaration): Likewise.
362
363 2018-10-17 Joseph Myers <joseph@codesourcery.com>
364
365 * c-errors.c (pedwarn_c11): New function.
366 * c-parser.c (disable_extension_diagnostics): Save
367 warn_c11_c2x_compat and set it to 0.
368 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
369 (c_parser_static_assert_declaration_no_semi): Handle
370 _Static_assert without string constant.
371 * c-tree.h (pedwarn_c11): New prototype.
372
373 2018-10-17 David Malcolm <dmalcolm@redhat.com>
374
375 * Make-lang.in (selftest-c): New.
376 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
377 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
378 from gcc/Makefile.in.
379
380 2018-10-02 Richard Biener <rguenther@suse.de>
381
382 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
383
384 2018-09-26 Joseph Myers <joseph@codesourcery.com>
385
386 PR c/87390
387 * c-typeck.c (build_binary_op): Use excess precision for
388 comparisons of integers and floating-point for C11 and later.
389
390 2018-09-26 Martin Jambor <mjambor@suse.cz>
391
392 PR c/87347
393 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
394 comment.
395
396 2018-09-17 David Malcolm <dmalcolm@redhat.com>
397
398 * c-objc-common.c (range_label_for_type_mismatch::get_text):
399 Update for new param.
400 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
401 Likewise.
402
403 2018-09-17 Martin Jambor <mjambor@suse.cz>
404
405 PR c/63886
406 * c-parser.c: (warn_for_abs): New function.
407 (c_parser_postfix_expression_after_primary): Call it.
408
409 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
410
411 * c-typeck.c (digest_init): Shorten overlength strings.
412
413 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
414
415 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
416
417 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
418
419 * c-decl.c (finish_decl): Call braced_list_to_string here ...
420 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
421
422 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
423
424 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
425 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
426
427 2018-08-27 David Malcolm <dmalcolm@redhat.com>
428
429 PR 87091
430 * c-decl.c (implicitly_declare): Update call to
431 maybe_add_include_fixit to suggest overriding the location, as it
432 is for a note.
433 * c-objc-common.c (c_tree_printer): Update for conversion of
434 show_caret_p to a tri-state.
435
436 2018-08-27 Martin Liska <mliska@suse.cz>
437
438 * c-decl.c (locate_old_decl): Use new function
439 fndecl_built_in_p and remove check for FUNCTION_DECL if
440 possible.
441 (diagnose_mismatched_decls): Likewise.
442 (merge_decls): Likewise.
443 (warn_if_shadowing): Likewise.
444 (pushdecl): Likewise.
445 (implicitly_declare): Likewise.
446 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
447 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
448 * c-typeck.c (build_function_call_vec): Likewise.
449 (convert_arguments): Likewise.
450
451 2018-08-20 David Malcolm <dmalcolm@redhat.com>
452
453 PR other/84889
454 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
455 (diagnose_mismatched_decls): Likewise, in various places.
456 (warn_if_shadowing): Likewise.
457 (implicit_decl_warning): Likewise.
458 (implicitly_declare): Likewise.
459 (undeclared_variable): Likewise.
460 (declare_label): Likewise.
461 (grokdeclarator): Likewise.
462 (start_function): Likewise.
463 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
464 (c_parser_parameter_declaration): Likewise.
465 (c_parser_binary_expression): Likewise.
466 * c-typeck.c (c_expr_sizeof_expr): Likewise.
467 (parser_build_binary_op): Likewise.
468 (build_unary_op): Likewise.
469 (error_init): Likewise.
470 (pedwarn_init): Likewise.
471 (warning_init): Likewise.
472 (convert_for_assignment): Likewise.
473
474 2018-08-15 David Malcolm <dmalcolm@redhat.com>
475
476 * c-objc-common.c: Include "gcc-rich-location.h".
477 (c_tree_printer): Move implemenation of '%T' to...
478 (print_type): ...this new function.
479 (range_label_for_type_mismatch::get_text): New function.
480 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
481 range for the various ic_argpass cases.
482 (class maybe_range_label_for_tree_type_mismatch): New class.
483 (build_binary_op): Use it when calling binary_op_error.
484
485 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
486
487 * c-decl.c (start_decl): Do not warn if variables is named as main
488 and is a local variable.
489
490 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
491
492 PR c/19315
493 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
494 objects of unknown size.
495
496 2018-08-13 Martin Sebor <msebor@redhat.com>
497
498 PR tree-optimization/71625
499 * c-parser.c (c_parser_declaration_or_fndef): Call
500 braced_list_to_string.
501
502 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
503
504 PR c/86690
505 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
506 errors.
507
508 2018-08-01 Martin Sebor <msebor@redhat.com>
509
510 PR tree-optimization/86650
511 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
512 and TREE_BLOCK (t) from within percent_K_format to this callsite.
513
514 2018-08-01 Jakub Jelinek <jakub@redhat.com>
515
516 PR c/85704
517 * c-typeck.c (init_field_decl_cmp): New function.
518 (output_pending_init_elements): Use it for field comparisons
519 instead of pure bit_position comparisons.
520
521 2018-07-12 Jakub Jelinek <jakub@redhat.com>
522
523 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
524 type here, instead add "omp declare target implicit" attribute.
525 (finish_decl): Diagnose vars without mappable type here.
526
527 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
528 Thomas Schwinge <thomas@codesourcery.com>
529 Cesar Philippidis <cesar@codesourcery.com>
530
531 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
532 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
533 to their non-present_or_* counterparts. Make 'self' an alias to
534 PRAGMA_OACC_CLAUSE_HOST.
535 (c_parser_oacc_data_clause): Update GOMP mappings for
536 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
537 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
538 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
539 Remove support for present_or_* clauses.
540 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
541 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
542 (OACC_DECLARE_CLAUSE_MASK): Likewise.
543 (OACC_DATA_CLAUSE_MASK): Likewise.
544 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
545 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
546 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
547 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
548 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
549
550 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
551
552 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
553 * gimple-parser.c (c_parser_gimple_statement): Likewise.
554 (c_parser_gimple_unary_expression): Likewise.
555
556 2018-06-15 Jakub Jelinek <jakub@redhat.com>
557
558 PR c/86093
559 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
560 before doing POINTER_DIFF_EXPR.
561
562 2018-06-07 Marek Polacek <polacek@redhat.com>
563
564 PR c/85318
565 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
566 for loop initial declarations.
567
568 2018-05-30 David Pagan <dave.pagan@oracle.com>
569
570 PR c/55976
571 * c-decl.c (grokdeclarator): Update check for return type warnings.
572 (start_function): Likewise.
573 (finish_function): Likewise.
574 * c-typeck.c (c_finish_return): Update check for return type warnings.
575 Pass OPT_Wreturn_type to pedwarn when appropriate.
576
577 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
578
579 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
580 __FMA_EXPR handlng.
581
582 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
583
584 * gimple-parser.c: Include internal-fn.h.
585 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
586 (c_parser_gimple_call_internal): New function.
587 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
588 Fix typos in comment.
589
590 2018-05-10 Jakub Jelinek <jakub@redhat.com>
591
592 PR c++/85662
593 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
594 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
595 fold_convert_loc.
596 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
597 fold_offsetof_1, pass argtype as TYPE to it and drop the
598 fold_convert_loc.
599
600 2018-05-02 David Pagan <dave.pagan@oracle.com>
601
602 PR c/30552
603 * c-decl.c (old_style_parameter_scope): New function.
604 * c-parser.c (c_parser_postfix_expression): Check for statement
605 expressions in old-style function parameter list declarations.
606 * c-parser.h (old_style_parameter_scope): New extern declaration.
607
608 2018-04-25 Jakub Jelinek <jakub@redhat.com>
609
610 PR sanitizer/84307
611 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
612 it is not TREE_STATIC.
613 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
614 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
615 its COMPOUND_LITERAL_EXPR_DECL.
616
617 2018-03-21 Joseph Myers <joseph@codesourcery.com>
618
619 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
620 where all functions return the same _FloatN or _FloatNx type,
621 treat integer types as _Float64 instead of double.
622
623 2018-03-21 Jakub Jelinek <jakub@redhat.com>
624
625 PR c/84999
626 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
627 building vector comparison, diagnose it and return error_mark_node.
628
629 2018-03-15 Jakub Jelinek <jakub@redhat.com>
630
631 PR c/84853
632 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
633 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
634 INTEGER_TYPE element type.
635
636 2018-03-13 David Pagan <dave.pagan@oracle.com>
637
638 PR c/46921
639 * c-typeck.c (output_init_element): Ensure field initializer
640 expression is always evaluated if there are side effects.
641
642 2018-03-06 Jakub Jelinek <jakub@redhat.com>
643
644 PR c/84721
645 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
646 !building_stmt_list_p ().
647
648 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
649
650 PR c/84305
651 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
652 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
653 and include the BIND_EXPR in the list of things that need to be
654 pre-evaluated.
655
656 2018-02-09 Nathan Sidwell <nathan@acm.org>
657
658 PR c/84293
659 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
660 to strict_aliasing_warning.
661
662 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
663
664 * c-typeck.c (really_start_incremental_init, push_init_level,
665 set_nonincremental_init, output_init_element, process_init_element):
666 Use DECL_UNNAMED_BIT_FIELD.
667
668 2018-01-31 Marek Polacek <polacek@redhat.com>
669
670 PR c/81779
671 * c-parser.c (c_parser_compound_statement_nostart): Call
672 expansion_point_location_if_in_system_header.
673
674 2018-01-17 David Malcolm <dmalcolm@redhat.com>
675
676 PR c++/83814
677 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
678 the C part.
679
680 2018-01-13 Jakub Jelinek <jakub@redhat.com>
681
682 PR c/83801
683 * c-tree.h (decl_constant_value_1): Add a bool argument.
684 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
685 returning a CONSTRUCTOR if it is true. Use error_operand_p.
686 (decl_constant_value): Adjust caller.
687 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
688 decl_constant_value_1 as IN_INIT. Otherwise, punt if
689 decl_constant_value returns initializer that has BLKmode or
690 array type.
691 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
692
693 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
694 Alan Hayward <alan.hayward@arm.com>
695 David Sherwood <david.sherwood@arm.com>
696
697 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
698 TYPE_VECTOR_SUBPARTS.
699
700 2018-01-03 Jakub Jelinek <jakub@redhat.com>
701
702 Update copyright years.
703
704 2018-01-01 Jakub Jelinek <jakub@redhat.com>
705
706 PR c/83595
707 * c-parser.c (c_parser_braced_init, c_parser_initelt,
708 c_parser_conditional_expression, c_parser_cast_expression,
709 c_parser_sizeof_expression, c_parser_alignof_expression,
710 c_parser_postfix_expression, c_parser_omp_declare_reduction,
711 c_parser_transaction_expression): Use set_error () method instead
712 of setting value member to error_mark_node.
713
714 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
715
716 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
717 and _Float<N>X built-in functions.
718
719 2017-12-22 Jakub Jelinek <jakub@redhat.com>
720
721 PR debug/83550
722 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
723 TYPE_STUB_DECL and call rest_of_type_compilation before processing
724 incomplete vars rather than after it.
725
726 PR debug/83547
727 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
728 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
729 and consider empty ones if there are no other stmts. For
730 -Wunused-value walk all statements before the one only followed by
731 DEBUG_BEGIN_STMTs.
732
733 2017-12-22 Mike Stump <mikestump@comcast.net>
734 Eric Botcazou <ebotcazou@adacore.com>
735
736 * c-parser.c (c_parser_while_statement): Add unroll parameter and
737 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
738 (c_parser_do_statement): Likewise.
739 (c_parser_for_statement): Likewise.
740 (c_parser_statement_after_labels): Adjust calls to above.
741 (c_parse_pragma_ivdep): New static function.
742 (c_parser_pragma_unroll): Likewise.
743 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
744 <PRAGMA_UNROLL>: New case.
745
746 2017-12-19 Jakub Jelinek <jakub@redhat.com>
747
748 * c-typeck.c (comptypes_internal, function_types_compatible_p,
749 perform_integral_promotions, digest_init): Replace Yoda conditions
750 with typical order conditions.
751 * c-decl.c (check_bitfield_type_and_width): Likewise.
752
753 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
754
755 * c-typeck.c (c_safe_arg_type_equiv_p,
756 c_safe_function_type_cast_p): New function.
757 (build_c_cast): Implement -Wcast-function-type.
758
759 2017-12-14 Richard Biener <rguenther@suse.de>
760
761 PR c/83415
762 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
763 like REALPART_EXPR for the behavior of whether its operand
764 is an lvalue.
765
766 2017-12-12 Marek Polacek <polacek@redhat.com>
767
768 PR c/82679
769 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
770
771 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
772
773 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
774 * c-parser.c (add_debug_begin_stmt): New.
775 (c_parser_declaration_or_fndef): Call it.
776 (c_parser_compound_statement_nostart): Likewise.
777 (c_parser_statement_after_labels): Likewise.
778 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
779
780 2017-12-07 Joseph Myers <joseph@codesourcery.com>
781
782 * c-decl.c (build_compound_literal): Add parameter alignas_align
783 and set alignment of decl if nonzero.
784 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
785 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
786 qualifier.
787 (c_parser_struct_declaration): Update syntax comment.
788 (c_parser_type_name): Add alignas_ok argument and pass it to
789 c_parser_declspecs.
790 (c_parser_cast_expression): Pass true to c_parser_type_name and
791 give error if a cast used an _Alignas specifier.
792 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
793 give error if sizeof (type-name) used an _Alignas specifier.
794 (c_parser_alignof_expression): Pass true to c_parser_type_name and
795 give error if _Alignof (type-name) used an _Alignas specifier.
796 (c_parser_postfix_expression_after_paren_type): Check specified
797 alignment for a compound literal and pass it to
798 build_compound_literal.
799 * c-parser.h (c_parser_type_name): Update prototype.
800 * c-tree.h (build_compound_literal): Update prototype.
801
802 2017-12-07 Martin Sebor <msebor@redhat.com>
803
804 PR c/81544
805 * c-decl.c (c_decl_attributes): Look up existing declaration and
806 pass it to decl_attributes.
807
808 2017-12-06 David Malcolm <dmalcolm@redhat.com>
809
810 PR c/83236
811 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
812 reserved for use by the implementation.
813
814 2017-12-06 David Malcolm <dmalcolm@redhat.com>
815
816 * c-decl.c: Include "c-family/c-spellcheck.h".
817
818 2017-12-05 Martin Liska <mliska@suse.cz>
819 Jakub Jelinek <jakub@redhat.com>
820
821 * c-typeck.c (pointer_diff): Add new argument and instrument
822 pointer subtraction.
823 (build_binary_op): Similar for pointer comparison.
824
825 2017-12-01 Jakub Jelinek <jakub@redhat.com>
826
827 PR c/79153
828 * c-parser.c: Include tree-iterator.h.
829 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
830 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
831 on it.
832
833 PR c/83222
834 * c-tree.h (decl_constant_value_1): Declare.
835 * c-typeck.c (decl_constant_value_1): New function.
836 (decl_constant_value): Use it.
837 * c-fold.c (c_fully_fold_internal): If in_init, use
838 decl_constant_value_1 instead of decl_constant_value.
839
840 2017-11-30 Jakub Jelinek <jakub@redhat.com>
841
842 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
843
844 2017-11-28 Jakub Jelinek <jakub@redhat.com>
845
846 PR sanitizer/81275
847 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
848 c_switch_covers_all_cases_p returns true.
849
850 2017-11-28 Julia Koval <julia.koval@intel.com>
851 Sebastian Peryt <sebastian.peryt@intel.com>
852
853 * Make-lang.in (c/c-array-notation.o): Remove.
854 * c-array-notation.c: Delete.
855 * c-decl.c: Remove cilkplus condition.
856 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
857 c_parser_cilk_verify_simd, c_parser_array_notation,
858 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
859 c_parser_cilk_simd_fn_vector_attrs,
860 c_finish_cilk_simd_fn_tokens): Delete.
861 (c_parser_declaration_or_fndef): Remove cilkplus condition.
862 (c_parser_direct_declarator_inner): Ditto.
863 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
864 (c_parser_attributes, c_parser_compound_statement,
865 c_parser_statement_after_labels, c_parser_if_statement,
866 c_parser_switch_statement, c_parser_while_statement,
867 c_parser_do_statement, c_parser_for_statement,
868 c_parser_unary_expression, c_parser_postfix_expression,
869 c_parser_postfix_expression_after_primary,
870 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
871 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
872 support.
873 * c-typeck.c (build_array_ref, build_function_call_vec,
874 convert_arguments,
875 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
876 c_finish_loop, build_binary_op): Remove cilkplus support.
877
878 2017-11-28 Jakub Jelinek <jakub@redhat.com>
879
880 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
881 of build3.
882
883 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
884
885 * Make-lang.in (c.install-plugin): Install backend import library.
886
887 2017-11-23 Jakub Jelinek <jakub@redhat.com>
888
889 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
890 pragma_stmt context.
891
892 2017-11-23 Mike Stump <mikestump@comcast.net>
893 Eric Botcazou <ebotcazou@adacore.com>
894
895 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
896 ANNOTATE_EXPR.
897 (c_parser_do_statement): Likewise.
898 (c_parser_for_statement): Likewise.
899
900 2017-11-22 David Malcolm <dmalcolm@redhat.com>
901
902 PR c++/62170
903 * c-objc-common.c (c_tree_printer): Convert penultimate param from
904 bool to bool *. Within '%T' handling, if showing an "aka", use
905 "quoted" param to add appropriate quoting.
906
907 2017-11-22 Marek Polacek <polacek@redhat.com>
908
909 PR c++/60336
910 PR middle-end/67239
911 PR target/68355
912 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
913
914 2017-11-21 David Malcolm <dmalcolm@redhat.com>
915
916 PR c/83056
917 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
918 earlier failed lookups.
919
920 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
921
922 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
923 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
924
925 2017-11-20 David Malcolm <dmalcolm@redhat.com>
926
927 PR c/81404
928 * c-decl.c: Include "c-family/known-headers.h".
929 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
930 to known-headers.cc.
931 (class suggest_missing_header): Move to known-header.h.
932 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
933 than get_c_name_hint.
934
935 2017-11-20 David Malcolm <dmalcolm@redhat.com>
936
937 * c-decl.c (get_c_name_hint): New function.
938 (class suggest_missing_header): New class.
939 (lookup_name_fuzzy): Call get_c_name_hint and use it to
940 suggest missing headers to the user.
941
942 2017-11-20 David Malcolm <dmalcolm@redhat.com>
943
944 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
945 Include "c-family/name-hint.h"
946 (implicit_decl_warning): Convert "hint" from
947 const char * to name_hint. Pass location to
948 lookup_name_fuzzy. Suppress any deferred diagnostic if the
949 warning was not printed.
950 (undeclared_variable): Likewise for "guessed_id".
951 (lookup_name_fuzzy): Convert return type from const char *
952 to name_hint. Add location_t param.
953 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
954 Include "c-family/name-hint.h"
955 (c_parser_declaration_or_fndef): Convert "hint" from
956 const char * to name_hint. Pass location to lookup_name_fuzzy.
957 (c_parser_parameter_declaration): Likewise.
958
959 2017-11-19 Jakub Jelinek <jakub@redhat.com>
960
961 PR c/66618
962 PR c/69960
963 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
964 where needed.
965 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
966 handle_omp_array_sections): Likewise.
967 (digest_init): Don't call decl_constant_value_for_optimization.
968 * c-tree.h (decl_constant_value_for_optimization): Removed.
969 * c-fold.c (c_fold_array_ref): New function.
970 (c_fully_fold_internal): Add LVAL argument, propagate it through
971 recursive calls. For VAR_P call decl_constant_value and
972 unshare if not LVAL and either optimizing or IN_INIT. Remove
973 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
974 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
975 (c_fully_fold): Add LVAL argument, pass it through to
976 c_fully_fold_internal.
977 (decl_constant_value_for_optimization): Removed.
978
979 2017-11-15 Joseph Myers <joseph@codesourcery.com>
980
981 PR c/81156
982 * c-parser.c (check_tgmath_function): New function.
983 (enum tgmath_parm_kind): New enum.
984 (c_parser_postfix_expression): Handle __builtin_tgmath.
985
986 2017-10-31 David Malcolm <dmalcolm@redhat.com>
987
988 * c-decl.c (implicit_decl_warning): Update for renaming of
989 pedwarn_at_rich_loc and warning_at_rich_loc.
990 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
991 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
992 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
993 (c_parser_struct_or_union_specifier): Likewise for renaming of
994 pedwarn_at_rich_loc.
995 (c_parser_parameter_declaration): Likewise for renaming of
996 error_at_rich_loc.
997 * c-typeck.c (build_component_ref): Likewise.
998 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
999 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1000 (set_init_label): Likewise for renaming of error_at_rich_loc.
1001
1002 2017-10-30 Richard Biener <rguenther@suse.de>
1003
1004 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1005 stmts.
1006
1007 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1008
1009 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1010 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1011
1012 2017-10-25 David Malcolm <dmalcolm@redhat.com>
1013
1014 PR c/7356
1015 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1016 semicolons.
1017
1018 2017-10-25 Jakub Jelinek <jakub@redhat.com>
1019
1020 PR libstdc++/81706
1021 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1022 newdecl to corresponding __builtin_ if any.
1023
1024 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1025
1026 PR c++/82466
1027 * c-decl.c (diagnose_mismatched_decls): Use
1028 OPT_Wbuiltin_declaration_mismatch.
1029
1030 2017-10-12 David Malcolm <dmalcolm@redhat.com>
1031
1032 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1033 use it to guard calls to maybe_suggest_missing_token_insertion.
1034 (c_parser_parms_list_declarator): Override default value of new
1035 "type_is_unique" param to c_parser_require.
1036 (c_parser_asm_statement): Likewise.
1037 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1038 defaulting to true.
1039
1040 2017-10-11 Nathan Sidwell <nathan@acm.org>
1041
1042 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1043
1044 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1045
1046 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1047 operating on trees as wide_ints.
1048 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1049 (c_tree_equal): Likewise.
1050
1051 2017-10-04 David Malcolm <dmalcolm@redhat.com>
1052
1053 * c-decl.c (push_parm_decl): Store c_parm's location into the
1054 PARAM_DECL.
1055 (build_c_parm): Add "loc" param and store it within the c_parm.
1056 * c-parser.c (struct c_parser): Add "last_token_location" field.
1057 (c_parser_consume_token): Store location of the token into the
1058 new field.
1059 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1060 when handling a FUNCTION_DECL, if it doesn't already have them.
1061 (c_parser_parameter_declaration): Generate a location for the
1062 parameter, and pass it to the call to build_c_parm.
1063 * c-tree.h (struct c_parm): Add field "loc".
1064 (build_c_parm): Add location_t param.
1065 * c-typeck.c (get_fndecl_argument_location): New function.
1066 (inform_for_arg): New function.
1067 (convert_for_assignment): Use inform_for_arg when dealing with
1068 ic_argpass.
1069
1070 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1071
1072 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1073 width is non-NULL.
1074 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1075 don't SET_DECL_C_BIT_FIELD here.
1076
1077 PR c/82340
1078 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1079 instead of trying to set just TREE_READONLY manually.
1080
1081 2017-09-16 Tom de Vries <tom@codesourcery.com>
1082
1083 PR c/81875
1084 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1085 cond itself.
1086
1087 2017-09-15 Joseph Myers <joseph@codesourcery.com>
1088
1089 PR c/82071
1090 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1091 for C11.
1092 (build_conditional_expr): For C11, generate result with excess
1093 precision when one argument is an integer and the other is of a
1094 type using excess precision.
1095
1096 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1097
1098 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1099
1100 2017-09-13 Marek Polacek <polacek@redhat.com>
1101
1102 PR c/82167
1103 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1104 than expr.original_type.
1105
1106 2017-09-12 Nathan Sidwell <nathan@acm.org>
1107
1108 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1109 resort_sorted_fields): Moved from c-family/c-common.c.
1110 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1111
1112 2017-09-01 Joseph Myers <joseph@codesourcery.com>
1113
1114 PR c/82071
1115 * c-typeck.c (build_atomic_assign): Handle argument with excess
1116 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1117 argument passed to build_binary_op and convert_for_assignment but
1118 not for call to c_fully_fold.
1119 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1120 Ensure build_binary_op is called with argument with original
1121 semantic type. Avoid calling c_fully_fold with an
1122 EXCESS_PRECISION_EXPR from build_binary_op.
1123
1124 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1125
1126 PR c/81887
1127 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1128
1129 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1130 Alan Hayward <alan.hayward@arm.com>
1131 David Sherwood <david.sherwood@arm.com>
1132
1133 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1134 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1135 m1 and m2 to the signed equivalent of a fixed-point
1136 SCALAR_TYPE_MODE.
1137
1138 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1139
1140 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1141 than CAN_HAVE_LOCATION_P when determining whether to use the
1142 location_t value within "value".
1143
1144 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1145
1146 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1147 rather than peeking the location of the first token.
1148 * c-tree.h (c_expr::get_location): New method.
1149
1150 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1151
1152 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1153 to check_function_arguments.
1154
1155 2017-08-18 Marek Polacek <polacek@redhat.com>
1156
1157 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1158 commentary.
1159
1160 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1161
1162 PR c/53037
1163 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1164 (check_bitfield_type_and_width): Don't allow bit-field with
1165 warn_if_not_aligned type.
1166
1167 2017-08-14 Martin Sebor <msebor@redhat.com>
1168
1169 PR c/81117
1170 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1171
1172 2017-08-11 Marek Polacek <polacek@redhat.com>
1173
1174 PR c/81795
1175 * c-decl.c (pushtag): Only print inform if the warning was printed.
1176 (grokdeclarator): Likewise.
1177
1178 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1179
1180 * c-parser.c (c_parser_error): Rename to...
1181 (c_parser_error_richloc): ...this, making static, and adding
1182 "richloc" parameter, passing it to the c_parse_error call,
1183 rather than calling c_parser_set_source_position_from_token.
1184 (c_parser_error): Reintroduce, reimplementing in terms of the
1185 above, converting return type from void to bool.
1186 (class token_pair): New class.
1187 (struct matching_paren_traits): New struct.
1188 (matching_parens): New typedef.
1189 (struct matching_brace_traits): New struct.
1190 (matching_braces): New typedef.
1191 (get_matching_symbol): New function.
1192 (c_parser_require): Add param MATCHING_LOCATION, using it to
1193 highlight matching "opening" tokens for missing "closing" tokens.
1194 (c_parser_skip_until_found): Likewise.
1195 (c_parser_static_assert_declaration_no_semi): Convert explicit
1196 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1197 class matching_parens, so that the pertinent open parenthesis is
1198 highlighted when there are problems locating the close
1199 parenthesis.
1200 (c_parser_struct_or_union_specifier): Likewise.
1201 (c_parser_typeof_specifier): Likewise.
1202 (c_parser_alignas_specifier): Likewise.
1203 (c_parser_simple_asm_expr): Likewise.
1204 (c_parser_braced_init): Likewise, for matching_braces.
1205 (c_parser_paren_condition): Likewise, for matching_parens.
1206 (c_parser_switch_statement): Likewise.
1207 (c_parser_for_statement): Likewise.
1208 (c_parser_asm_statement): Likewise.
1209 (c_parser_asm_operands): Likewise.
1210 (c_parser_cast_expression): Likewise.
1211 (c_parser_sizeof_expression): Likewise.
1212 (c_parser_alignof_expression): Likewise.
1213 (c_parser_generic_selection): Likewise.
1214 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1215 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1216 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1217 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1218 c_parser_skip_until_found call.
1219 (c_parser_objc_class_definition): Use class matching_parens as
1220 above.
1221 (c_parser_objc_method_decl): Likewise.
1222 (c_parser_objc_try_catch_finally_statement): Likewise.
1223 (c_parser_objc_synchronized_statement): Likewise.
1224 (c_parser_objc_at_property_declaration): Likewise.
1225 (c_parser_oacc_wait_list): Likewise.
1226 (c_parser_omp_var_list_parens): Likewise.
1227 (c_parser_omp_clause_collapse): Likewise.
1228 (c_parser_omp_clause_default): Likewise.
1229 (c_parser_omp_clause_if): Likewise.
1230 (c_parser_omp_clause_num_threads): Likewise.
1231 (c_parser_omp_clause_num_tasks): Likewise.
1232 (c_parser_omp_clause_grainsize): Likewise.
1233 (c_parser_omp_clause_priority): Likewise.
1234 (c_parser_omp_clause_hint): Likewise.
1235 (c_parser_omp_clause_defaultmap): Likewise.
1236 (c_parser_oacc_single_int_clause): Likewise.
1237 (c_parser_omp_clause_ordered): Likewise.
1238 (c_parser_omp_clause_reduction): Likewise.
1239 (c_parser_omp_clause_schedule): Likewise.
1240 (c_parser_omp_clause_num_teams): Likewise.
1241 (c_parser_omp_clause_thread_limit): Likewise.
1242 (c_parser_omp_clause_aligned): Likewise.
1243 (c_parser_omp_clause_linear): Likewise.
1244 (c_parser_omp_clause_safelen): Likewise.
1245 (c_parser_omp_clause_simdlen): Likewise.
1246 (c_parser_omp_clause_depend): Likewise.
1247 (c_parser_omp_clause_map): Likewise.
1248 (c_parser_omp_clause_device): Likewise.
1249 (c_parser_omp_clause_dist_schedule): Likewise.
1250 (c_parser_omp_clause_proc_bind): Likewise.
1251 (c_parser_omp_clause_uniform): Likewise.
1252 (c_parser_omp_for_loop): Likewise.
1253 (c_parser_cilk_clause_vectorlength): Likewise.
1254 (c_parser_cilk_clause_linear): Likewise.
1255 (c_parser_transaction_expression): Likewise.
1256 * c-parser.h (c_parser_require): Add param matching_location with
1257 default UNKNOWN_LOCATION.
1258 (c_parser_error): Convert return type from void to bool.
1259 (c_parser_skip_until_found): Add param matching_location with
1260 default UNKNOWN_LOCATION.
1261
1262 2017-08-09 Marek Polacek <polacek@redhat.com>
1263
1264 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1265 * c-tree.h (build_external_ref): Update declaration.
1266 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1267 (build_external_ref): Change the type of a parameter to bool.
1268 (parser_build_binary_op): Use true/false instead of 1/0.
1269 (pointer_diff): Likewise.
1270 (build_modify_expr): Likewise.
1271 (set_designator): Change the type of a parameter to bool.
1272 (set_init_index): Use true/false instead of 1/0.
1273 (set_init_label): Likewise.
1274 (output_init_element): Change the type of a parameter to bool.
1275 (output_pending_init_elements): Use true/false instead of 1/0.
1276 (process_init_element): Likewise.
1277 (build_binary_op): Change the type of a parameter to bool.
1278
1279 2017-08-09 Marek Polacek <polacek@redhat.com>
1280
1281 PR c/81233
1282 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1283 Call emit_diagnostic_valist instead of pedwarn.
1284 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1285 Print the relevant types in diagnostics.
1286
1287 2017-08-09 Marek Polacek <polacek@redhat.com>
1288
1289 PR c/81417
1290 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1291 build_conditional_expr.
1292 * c-parser.c (c_parser_conditional_expression): Create locations for
1293 EXP1 and EXP2 from their source ranges. Pass the locations down to
1294 build_conditional_expr.
1295 * c-tree.h (build_conditional_expr): Update declaration.
1296 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1297 For -Wsign-compare, also print the types.
1298
1299 2017-08-08 Martin Liska <mliska@suse.cz>
1300
1301 * c-convert.c: Include header files.
1302 * c-typeck.c: Likewise.
1303
1304 2017-08-07 Martin Liska <mliska@suse.cz>
1305
1306 * c-parser.c (c_parser_attributes): Canonicalize name of an
1307 attribute.
1308
1309 2017-08-02 Marek Polacek <polacek@redhat.com>
1310
1311 PR c/81289
1312 * c-parser.c (c_parser_unary_expression): Use set_error.
1313
1314 PR c/81448
1315 PR c/81306
1316 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1317 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1318
1319 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
1320 Martin Liska <mliska@suse.cz>
1321
1322 * c-typeck.c (c_finish_goto_label): Build gimple predict
1323 statement.
1324
1325 2017-07-31 Martin Liska <mliska@suse.cz>
1326
1327 PR sanitize/81530
1328 * c-convert.c (convert): Guard condition with flag_sanitize_p
1329 also with current_function_decl non-null equality.
1330 * c-decl.c (grokdeclarator): Likewise.
1331 * c-typeck.c (build_binary_op): Likewise.
1332
1333 2017-07-25 Marek Polacek <polacek@redhat.com>
1334
1335 * c-decl.c (grokfield): Remove local variable.
1336
1337 2017-07-25 Marek Polacek <polacek@redhat.com>
1338
1339 PR c/81364
1340 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1341 macro expansion if the body is in { }.
1342 (c_parser_while_statement): Likewise.
1343 (c_parser_for_statement): Likewise.
1344
1345 2017-07-18 Nathan Sidwell <nathan@acm.org>
1346
1347 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1348
1349 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1350
1351 * c-decl.c (implicitly_declare): When suggesting a missing
1352 #include, provide a fix-it hint.
1353
1354 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1355
1356 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1357 and call that instead.
1358 * c-tree.h (selftest::run_c_tests): New decl.
1359
1360 2017-06-26 Marek Polacek <polacek@redhat.com>
1361
1362 PR c/80116
1363 * c-parser.c (c_parser_if_body): Set the location of the
1364 body of the conditional after parsing all the labels. Call
1365 warn_for_multistatement_macros.
1366 (c_parser_else_body): Likewise.
1367 (c_parser_switch_statement): Likewise.
1368 (c_parser_while_statement): Likewise.
1369 (c_parser_for_statement): Likewise.
1370 (c_parser_statement): Add a default argument. Save the location
1371 after labels have been parsed.
1372 (c_parser_c99_block_statement): Likewise.
1373
1374 2017-06-19 Richard Biener <rguenther@suse.de>
1375
1376 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1377 negated _Literals to parse _Literal (int) -1.
1378
1379 2017-06-13 Martin Liska <mliska@suse.cz>
1380
1381 PR sanitize/78204
1382 * c-convert.c (convert): Use sanitize_flags_p.
1383 * c-decl.c (grokdeclarator): Likewise.
1384 * c-typeck.c (convert_for_assignment): Likewise.
1385 (c_finish_return): Likewise.
1386 (build_binary_op): Likewise.
1387
1388 2017-06-08 Jakub Jelinek <jakub@redhat.com>
1389
1390 PR c/81006
1391 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1392 to sizetype before size_binop.
1393
1394 2017-06-07 Jakub Jelinek <jakub@redhat.com>
1395
1396 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1397 of TDI_generic.
1398
1399 2017-06-06 Marek Polacek <polacek@redhat.com>
1400
1401 PR c/79983
1402 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1403 ref.
1404 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1405
1406 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1407
1408 * c-parser.c (c_parser_binary_expression): Implement the
1409 -Wsizeof_pointer_div warning.
1410 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1411 from a parenthesized expression.
1412 (c_parser_expr_list): Use c_last_sizeof_loc.
1413 * c-tree.h (c_last_sizeof_loc): New external.
1414 * c-typeck.c (c_last_sizeof_loc): New variable.
1415 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1416
1417 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1418
1419 PR testsuite/80580
1420 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1421
1422 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1423
1424 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1425 parameters.
1426
1427 2017-05-24 Martin Sebor <msebor@redhat.com>
1428
1429 PR c/80731
1430 * c-fold.c (c_fully_fold_internal): Adjust.
1431 * c-typeck.c (parser_build_unary_op): Adjust.
1432
1433 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1434
1435 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1436 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1437 "VECTOR_LENGTH".
1438
1439 2017-05-23 Marek Polacek <polacek@redhat.com>
1440
1441 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1442 quotes.
1443
1444 2017-05-22 Jakub Jelinek <jakub@redhat.com>
1445
1446 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1447 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1448 it returned invariant. Call tree_invariant_p unconditionally
1449 afterwards to decide whether to return expr or op0.
1450
1451 2017-05-22 Nathan Sidwell <nathan@acm.org>
1452
1453 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1454
1455 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1456
1457 * c-parser.c (c_parser_omp_clause_default): Handle
1458 "OMP_CLAUSE_DEFAULT_PRESENT".
1459
1460 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1461
1462 * config-lang.in (gtfiles): Add c-family/c-format.c.
1463
1464 2017-05-18 Nathan Sidwell <nathan@acm.org>
1465
1466 * c-decl.c (pushdecl_top_level): Delete unused function.
1467
1468 2017-05-18 Marek Polacek <polacek@redhat.com>
1469
1470 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1471 (check_earlier_gotos): Likewise.
1472 (define_label): Likewise.
1473 (pending_xref_error): Likewise.
1474 (smallest_type_quals_location): Likewise.
1475 (grokdeclarator): Likewise.
1476 (grokparms): Likewise.
1477 (identifier_global_value): Likewise.
1478 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1479 (find_init_member): Likewise.
1480
1481 2017-05-18 Marek Polacek <polacek@redhat.com>
1482
1483 * c-decl.c (start_decl): Use false/true instead of 0/1.
1484 (grokdeclarator): Likewise.
1485 (finish_struct): Likewise.
1486 (start_function): Change the return type to bool. Use false/true
1487 instead of 0/1.
1488 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1489 * c-tree.h (start_function): Update.
1490 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1491 (set_designator): Change the return type to bool. Use false/true
1492 instead of 0/1.
1493
1494 2017-05-17 Marek Polacek <polacek@redhat.com>
1495
1496 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1497 * c-typeck.c: Likewise.
1498
1499 2017-05-17 Marek Polacek <polacek@redhat.com>
1500
1501 PR sanitizer/80659
1502 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1503 DECL_IGNORED_P even for non-static compound literals.
1504
1505 2017-05-17 Martin Liska <mliska@suse.cz>
1506
1507 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1508 use it instead of int type.
1509
1510 2017-05-17 Marek Polacek <polacek@redhat.com>
1511
1512 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1513 call c_fully_fold.
1514 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1515 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1516 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1517 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1518 save_expr.
1519 (c_parser_conditional_expression): Likewise.
1520 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1521 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1522 (process_init_element): Likewise.
1523 (build_binary_op): Likewise.
1524 (handle_omp_array_sections_1): Likewise.
1525
1526 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1527
1528 * c-parser.c (c_parser_omp_clause_num_gangs)
1529 (c_parser_omp_clause_num_workers)
1530 (c_parser_omp_clause_vector_length): Merge functions into...
1531 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1532 all users.
1533
1534 2017-05-11 Nathan Sidwell <nathan@acm.org>
1535
1536 * gimple-parser.c: Don't #include tree-dump.h.
1537
1538 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1539
1540 PR testsuite/80580
1541 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1542
1543 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1544
1545 PR testsuite/80580
1546 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1547 incorrect __MEM syntax.
1548
1549 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1550
1551 PR testsuite/80580
1552 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1553 type of unary '*'.
1554
1555 2017-05-09 Nathan Sidwell <nathan@acm.org>
1556
1557 * c-tree.h (pushdecl): Declare.
1558
1559 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1560
1561 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1562 with diagnostic_report_diagnostic.
1563 * c-errors.c (pedwarn_c99): Likewise.
1564 (pedwarn_c90): Likewise.
1565
1566 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1567
1568 PR c++/80038
1569 * c-gimplify.c (c_gimplify_expr): Remove calls to
1570 cilk_gimplifY_call_params_in_spawned_fn.
1571
1572 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1573
1574 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1575 hint for removing extra semicolon.
1576
1577 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1578
1579 PR c/80468
1580 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1581 enabled, set specs->type to integer_type_node.
1582
1583 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1584
1585 * c-array-notation.c: Fix typo in comment.
1586
1587 2017-03-29 Marek Polacek <polacek@redhat.com>
1588
1589 PR c/79730
1590 * c-decl.c (finish_decl): Check VAR_P.
1591
1592 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1593
1594 PR middle-end/80162
1595 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1596 * c-typeck.c (c_mark_addressable): Likewise. Look through
1597 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1598 to ARRAY_TYPE.
1599 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1600
1601 2017-03-23 Marek Polacek <polacek@redhat.com>
1602
1603 * c-tree.h: Remove a C_RID_YYCODE reference.
1604
1605 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1606
1607 PR c/80097
1608 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1609 optional COMPOUND_EXPR with ubsan instrumentation.
1610
1611 2017-03-17 Marek Polacek <polacek@redhat.com>
1612
1613 * c-parser.c: Add C11 references.
1614
1615 2017-03-15 Marek Polacek <polacek@redhat.com>
1616
1617 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1618
1619 2017-03-11 Marek Polacek <polacek@redhat.com>
1620
1621 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1622
1623 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1624
1625 PR translation/79848
1626 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1627 "%qs".
1628 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1629
1630 2017-03-09 Marek Polacek <polacek@redhat.com>
1631
1632 PR sanitizer/79757
1633 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1634 parameter declarations with initializers.
1635
1636 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1637
1638 PR c/79969
1639 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1640 TYPE_STUB_DECL.
1641
1642 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1643
1644 PR c/79834
1645 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1646 for "may only be used in compound statements" diagnostics, change it
1647 such that the same translatable string is used for all pragmas. For
1648 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1649 diagnostics.
1650 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1651 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1652 "may only be used in compound statements" diagnostics, such that the
1653 same translatable string is used for all pragmas.
1654
1655 2017-03-04 Marek Polacek <polacek@redhat.com>
1656
1657 PR c/79847
1658 * c-decl.c (implicit_decl_warning): Add missing space.
1659
1660 2017-03-03 Marek Polacek <polacek@redhat.com>
1661
1662 PR c/79758
1663 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1664 current_function_prototype_arg_types is error_mark_node. Fix
1665 formatting. Use TREE_VALUE instead of TREE_TYPE.
1666
1667 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1668
1669 PR c/79837
1670 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1671 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1672 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1673 diagnostics.
1674
1675 PR c/79836
1676 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1677 instead of %<_Generic>.
1678 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1679 (c_parser_omp_target_exit_data): Use %<release%> instead of
1680 %<release>.
1681
1682 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1683
1684 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1685 instead of just cond ? "..." : "...".
1686 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1687 for "enter"/"exit" keyword.
1688 (c_finish_oacc_routine): Don't use %s to supply portions of the
1689 message.
1690
1691 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1692
1693 PR c++/79588
1694 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1695 handle -Wrestrict here.
1696 * c-typeck.c (build_function_call_vec): Adjust
1697 check_function_arguments caller.
1698
1699 2017-02-23 Richard Biener <rguenther@suse.de>
1700
1701 PR c/79684
1702 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1703 to initialize c_exprs to return.
1704 (c_parser_gimple_binary_expression): Likewise.
1705 (c_parser_gimple_unary_expression): Likewise.
1706 (c_parser_gimple_postfix_expression): Likewise.
1707
1708 2017-02-22 Marek Polacek <polacek@redhat.com>
1709
1710 PR c/79662
1711 * c-typeck.c (convert_arguments): Handle error_mark_node.
1712
1713 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1714
1715 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1716 value of c_parser_parse_ssa_name against error_mark_node and emit
1717 error if ssa name is anonymous and written as default definition.
1718
1719 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1720
1721 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1722 FMA_EXPR.
1723
1724 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1725
1726 PR c++/79512
1727 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1728 ignore #pragma omp target even when not followed by identifier.
1729
1730 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1731
1732 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1733 (c_parser_gimple_unary_expression): Likewise.
1734
1735 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1736
1737 * c-parser.c (c_parser_oacc_declare): Add missing space in
1738 diagnostics.
1739
1740 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1741
1742 PR c/79478
1743 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1744 set_c_expr_source_range when parsing ssa-name.
1745
1746 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1747 Richard Biener <rguenther@suse.de>
1748
1749 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1750 building IL when arguments are error_mark_node.
1751 (c_parser_gimple_unary_expression): Likewise.
1752 (c_parser_gimple_if_stmt): Likewise.
1753 (c_parser_gimple_switch_stmt): Likewise.
1754 (c_parser_gimple_return_stmt): Likewise.
1755 (c_parser_parse_ssa_name): When name lookup fails do not build
1756 an SSA name. Use undeclared rather than not declared in error
1757 reporting.
1758
1759 2017-02-09 Marek Polacek <polacek@redhat.com>
1760
1761 PR c/79428
1762 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1763 instead of c_parser_skip_until_found.
1764
1765 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1766
1767 PR c/79431
1768 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1769 symtab_node::get on automatic variables.
1770
1771 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1772 Chung-Lin Tang <cltang@codesourcery.com>
1773
1774 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1775 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1776 semantic checking.
1777 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1778
1779 2017-02-07 Richard Biener <rguenther@suse.de>
1780
1781 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1782 (c_parser_gimple_postfix_expression_after_primary):
1783 Do not use c_build_function_call_vec to avoid folding and promotion.
1784 Simplify.
1785
1786 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1787
1788 PR lto/79061
1789 * c-decl.c (pop_scope): Pass main_input_filename to
1790 build_translation_unit_decl.
1791
1792 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1793
1794 * c-parser.c: Include "read-rtl-function.h" and
1795 "run-rtl-passes.h".
1796 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1797 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1798 production. Update for renaming of field "gimple_pass" to
1799 "gimple_or_rtl_pass". If __RTL was seen, call
1800 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1801 to an auto_timevar, to cope with early exit.
1802 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1803 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1804 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1805 Handle RID_RTL.
1806 (c_parser_parse_rtl_body): New function.
1807 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1808 (struct c_declspecs): Rename field "gimple_pass" to
1809 "gimple_or_rtl_pass". Add field "rtl_p".
1810 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1811 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1812 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1813 (c_parser_gimple_or_rtl_pass_list): ...this.
1814
1815 2017-01-20 Marek Polacek <polacek@redhat.com>
1816
1817 PR c/64279
1818 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1819
1820 2017-01-13 Richard Biener <rguenther@suse.de>
1821
1822 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1823 nops.
1824
1825 2017-01-13 Richard Biener <rguenther@suse.de>
1826
1827 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1828 _Literal ( type-name ) number.
1829
1830 2017-01-12 Richard Biener <rguenther@suse.de>
1831
1832 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1833 __MEM.
1834
1835 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1836
1837 PR c++/72813
1838 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1839 PCH file.
1840
1841 2017-01-11 Richard Biener <rguenther@suse.de>
1842
1843 PR bootstrap/79052
1844 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1845 returns on parse errors.
1846
1847 2017-01-04 Marek Polacek <polacek@redhat.com>
1848
1849 PR c++/64767
1850 * c-parser.c (c_parser_postfix_expression): Mark zero character
1851 constants by setting original_type in c_expr.
1852 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1853 with a zero character constant.
1854 (char_type_p): New function.
1855
1856 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1857
1858 * c-parser.c (c_parser_declaration_or_fndef): Create a
1859 rich_location at init_loc and parse it to start_init.
1860 (last_init_list_comma): New global.
1861 (c_parser_braced_init): Update last_init_list_comma when parsing
1862 commas. Pass it to pop_init_level. Pass location of closing
1863 brace to pop_init_level.
1864 (c_parser_postfix_expression_after_paren_type): Create a
1865 rich_location at type_loc and parse it to start_init.
1866 (c_parser_omp_declare_reduction): Likewise for loc.
1867 * c-tree.h (start_init): Add rich_location * param.
1868 (pop_init_level): Add location_t param.
1869 * c-typeck.c (struct initializer_stack): Add field
1870 "missing_brace_richloc".
1871 (start_init): Add richloc param, use it to initialize
1872 the stack node's missing_brace_richloc.
1873 (last_init_list_comma): New decl.
1874 (finish_implicit_inits): Pass last_init_list_comma to
1875 pop_init_level.
1876 (push_init_level): When finding missing open braces, add fix-it
1877 hints to the richloc.
1878 (pop_init_level): Add "insert_before" param and pass it
1879 when calling pop_init_level. Add fixits about missing
1880 close braces to any richloc. Use the richloc for the
1881 -Wmissing-braces warning.
1882 (set_designator): Pass last_init_list_comma to pop_init_level.
1883 (process_init_element): Likewise.
1884
1885 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1886
1887 Update copyright years.
1888
1889 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1890
1891 PR bootstrap/78817
1892 * c-typeck.c (build_function_call_vec): If check_function_arguments
1893 returns true, set TREE_NO_WARNING on CALL_EXPR.
1894
1895 PR c/77767
1896 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1897 to *expr instead of overwriting it.
1898
1899 2016-12-20 Richard Biener <rguenther@suse.de>
1900
1901 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1902 error recovery.
1903 (c_parser_gimple_statement): Only build assigns for non-error
1904 stmts.
1905 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1906
1907 2016-12-14 Martin Jambor <mjambor@suse.cz>
1908
1909 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1910 omp-low.h.
1911 (c_finish_oacc_routine): Adjusted call to
1912 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1913 to use their new names.
1914 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1915 use its new name.
1916 (c_parser_oacc_update): Likewise.
1917 (c_parser_omp_simd): Likewise.
1918 (c_parser_omp_target_update): Likewise.
1919 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1920 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1921 name.
1922 (c_finish_omp_cancellation_point): Likewise.
1923 * gimple-parser.c: Do not include omp-low.h
1924
1925 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1926 James Norris <jnorris@codesourcery.com>
1927
1928 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1929 EXIT_DATA,WAIT} are not used in compound statements.
1930 (c_parser_oacc_enter_exit_data): Update diagnostics.
1931
1932 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1933
1934 PR c++/71973
1935 * c-decl.c (diagnose_mismatched_decls): Use
1936 OPT_Wbuiltin_declaration_mismatch here too.
1937
1938 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1939 Alan Hayward <alan.hayward@arm.com>
1940 David Sherwood <david.sherwood@arm.com>
1941
1942 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1943 (make_label, finish_struct): Likewise.
1944
1945 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1946 Richard Biener <rguenther@suse.de>
1947
1948 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1949 * config-lang.in (gtfiles): Add c/c-parser.h.
1950 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1951 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1952 * c-parser.c (enum c_id_kind, struct c_token,
1953 c_parser_next_token_is, c_parser_next_token_is_not,
1954 c_parser_next_token_is_keyword,
1955 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1956 Split out to ...
1957 * c-parser.h: ... new header.
1958 * c-parser.c: Include c-parser.h and gimple-parser.h.
1959 (c_parser_peek_token, c_parser_peek_2nd_token,
1960 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1961 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1962 c_parser_error, c_parser_require, c_parser_skip_until_found,
1963 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1964 c_parser_type_name): Export.
1965 (c_parser_tokens_buf): New function.
1966 (c_parser_error): Likewise.
1967 (c_parser_set_error): Likewise.
1968 (c_parser_declspecs): Handle RID_GIMPLE.
1969 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1970 via c_parser_parse_gimple_body.
1971 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1972 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1973 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1974 c_parser_error, c_parser_require, c_parser_skip_until_found,
1975 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1976 c_parser_type_name): Declare.
1977 (struct c_parser): Declare forward.
1978 (c_parser_tokens_buf): Declare.
1979 (c_parser_error): Likewise.
1980 (c_parser_set_error): Likewise.
1981 * gimple-parser.c: New file.
1982 * gimple-parser.h: Likewise.
1983
1984 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1985
1986 PR c/35503
1987 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1988 warn_for_restrict.
1989
1990 2016-09-11 Le-Chun Wu <lcwu@google.com>
1991 Mark Wielaard <mjw@redhat.com>
1992
1993 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1994 to the given -Wshadow= variant.
1995
1996 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1997
1998 * c-typeck.c: Include memmodel.h.
1999
2000 2016-10-13 Jakub Jelinek <jakub@redhat.com>
2001
2002 PR target/77957
2003 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2004 instead of lhd_return_null_tree_v.
2005
2006 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2007
2008 PR c++/69733
2009 * c-decl.c (smallest_type_quals_location): New static function.
2010 (grokdeclarator): Try to find the correct location for an ignored
2011 qualifier.
2012
2013 2016-09-26 Marek Polacek <polacek@redhat.com>
2014
2015 PR c/7652
2016 * c-decl.c (pop_scope): Add gcc_fallthrough.
2017
2018 2016-09-26 Marek Polacek <polacek@redhat.com>
2019
2020 PR c/7652
2021 * c-parser.c (struct c_token): Add flags field.
2022 (c_lex_one_token): Pass it to c_lex_with_flags.
2023 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2024 into IFN_FALLTHROUGH.
2025 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2026 attribute fallthrough after a case label or default label.
2027 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2028
2029 2016-09-24 Marek Polacek <polacek@redhat.com>
2030
2031 PR c/77490
2032 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2033 have boolean value. Warn about ++/-- on booleans.
2034
2035 2016-09-23 Jakub Jelinek <jakub@redhat.com>
2036
2037 * c-parser.c (incomplete_record_decls): Remove unnecessary
2038 = vNULL initialization of file scope vec.
2039
2040 2016-09-16 Marek Polacek <polacek@redhat.com>
2041
2042 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2043
2044 2016-09-14 Marek Polacek <polacek@redhat.com>
2045
2046 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2047 (fix_array_notation_expr): Likewise.
2048 * c-decl.c (finish_decl): Likewise.
2049 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2050 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2051 (function_to_pointer_conversion): Use false instead of 0.
2052 (convert_lvalue_to_rvalue): Likewise.
2053 (parser_build_unary_op): Likewise.
2054 (build_atomic_assign): Likewise.
2055 (build_unary_op): Change nonconvert parameter type to bool, use
2056 true/false instead of 1/0.
2057 (build_binary_op): Use true instead of 1.
2058
2059 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2060
2061 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2062 of add_fixit_insert to add_fixit_insert_before.
2063
2064 2016-09-13 Marek Polacek <polacek@redhat.com>
2065
2066 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2067 it.
2068
2069 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2070
2071 PR c++/77496
2072 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2073 COMPOUND_EXPR to warn_for_omitted_condop.
2074
2075 2016-09-07 David Malcolm <dmalcolm@redhat.com>
2076
2077 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2078 c_get_substring_location for this new langhook.
2079
2080 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2081
2082 PR c/65467
2083 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2084 flag_openmp.
2085 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2086 instead of mark_exp_read on low_bound/length expression.
2087 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2088 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2089 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2090 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2091 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2092 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2093 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2094 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2095 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2096 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2097 instead of mark_expr_read.
2098 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2099 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2100 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2101 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2102 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2103 array section bases outside of depend clause, for depend clause
2104 use convert_lvalue_to_rvalue on the base.
2105 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2106 linear, aligned, map, to and from clauses.
2107 (c_omp_clause_copy_ctor): New function.
2108
2109 2016-09-01 Marek Polacek <polacek@redhat.com>
2110
2111 PR c/7652
2112 * c-typeck.c (composite_type): Add FALLTHRU comment.
2113
2114 2016-08-31 David Malcolm <dmalcolm@redhat.com>
2115
2116 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2117 to the insertion fixits for "struct", "union", and "enum".
2118
2119 2016-08-30 David Malcolm <dmalcolm@redhat.com>
2120
2121 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2122 rather than add_fixit_misspelled_id.
2123 (undeclared_variable): Likewise.
2124 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2125 now-redundant "here" params from add_fixit_insert method calls.
2126 (c_parser_parameter_declaration): Likewise.
2127 * c-typeck.c (build_component_ref): Remove now-redundant range
2128 param from add_fixit_replace method calls.
2129
2130 2016-08-25 Marek Polacek <polacek@redhat.com>
2131
2132 * c-typeck.c (parser_build_binary_op): Pass LHS to
2133 warn_logical_not_parentheses.
2134
2135 2016-08-25 Marek Polacek <polacek@redhat.com>
2136
2137 PR c/77323
2138 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2139 or _FloatN or _FloatNx is not supported.
2140 (finish_declspecs): Set type to integer_type_node when _FloatN or
2141 _FloatNx is not supported.
2142
2143 2016-08-19 Joseph Myers <joseph@codesourcery.com>
2144
2145 PR c/32187
2146 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2147 (struct c_declspecs): Add field floatn_nx_idx.
2148 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2149 and _FloatNx type specifiers.
2150 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2151 (c_parser_declspecs, c_parser_attribute_any_word)
2152 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2153 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2154 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2155 narrower than double.
2156
2157 2016-08-12 Jakub Jelinek <jakub@redhat.com>
2158 Martin Liska <mliska@suse.cz>
2159
2160 PR c/67410
2161 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2162 % to determine val element to change. Assert that
2163 wchar_bytes * charwidth fits into val array.
2164
2165 2016-08-12 Marek Polacek <polacek@redhat.com>
2166
2167 PR c/7652
2168 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2169 (c_parser_postfix_expression): Likewise.
2170 * c-typeck.c (build_unary_op): Adjust fall through comment.
2171 (c_mark_addressable): Likewise.
2172
2173 2016-08-11 Jakub Jelinek <jakub@redhat.com>
2174
2175 PR c/72816
2176 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2177 array member through typedef, for orig_qual_indirect == 0 clear
2178 orig_qual_type.
2179
2180 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2181
2182 PR c/64955
2183 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2184 this up to selftest::run_c_tests.
2185 (selftest::run_c_tests): New function.
2186
2187 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2188
2189 * c-parser.c (struct oacc_routine_data): Add error_seen and
2190 fndecl_seen members.
2191 (c_finish_oacc_routine): Use these.
2192 (c_parser_declaration_or_fndef): Adjust.
2193 (c_parser_oacc_routine): Likewise. Support more C language
2194 constructs, and improve diagnostics. Move pragma context
2195 checking...
2196 (c_parser_pragma): ... here.
2197
2198 * c-parser.c (struct oacc_routine_data): New.
2199 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2200 Simplify code.
2201 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2202 declare target" attribute.
2203
2204 2016-08-01 Jan Beulich <jbeulich@suse.com>
2205
2206 * c-fold.c (c_fully_fold_internal): Also emit shift count
2207 warnings for vector types.
2208 * c-typeck.c (build_binary_op): Likewise.
2209
2210 2016-07-29 Marek Polacek <polacek@redhat.com>
2211
2212 PR c/71742
2213 * c-decl.c (finish_struct): Rephrase an error message.
2214
2215 PR c/71853
2216 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2217 to error node for invalid code.
2218
2219 PR c/71573
2220 * c-decl.c (implicitly_declare): Return decl early not only for
2221 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2222
2223 2016-07-29 Jakub Jelinek <jakub@redhat.com>
2224
2225 PR c/71969
2226 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2227 on GNU extern inline functions.
2228
2229 2016-07-29 Marek Polacek <polacek@redhat.com>
2230
2231 PR c/71583
2232 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2233 check expr.value.
2234
2235 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
2236
2237 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2238
2239 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2240
2241 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2242 spellcheck-tree.h
2243 (best_macro_match): Likewise, converting from a typedef to a
2244 subclass.
2245 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2246 (lookup_name_fuzzy): Update for change of best_macro_match to a
2247 subclass with a ctor that calls cpp_forall_identifiers.
2248
2249 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2250
2251 * c-decl.c (implicit_decl_warning): Update for conversion of
2252 return type of lookup_name_fuzzy to const char *.
2253 (undeclared_variable): Likewise.
2254 (lookup_name_fuzzy): Convert return type from tree to
2255 const char *.
2256 * c-parser.c (c_parser_declaration_or_fndef): Update for
2257 conversion of return type of lookup_name_fuzzy to const char *.
2258 (c_parser_parameter_declaration): Likewise.
2259
2260 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2261
2262 * c-parser.c (c_parser_oacc_declare): Don't scan for
2263 GOMP_MAP_POINTER.
2264 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2265 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2266 zero-length subarrays.
2267
2268 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2269
2270 PR c/71858
2271 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2272 instead of FUZZY_LOOKUP_NAME.
2273 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2274 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2275
2276 2016-07-14 Jakub Jelinek <jakub@redhat.com>
2277
2278 PR c/71858
2279 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2280
2281 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2282
2283 * c-parser.c (c_parser_generic_selection): Make type of variable
2284 auto_vec.
2285 (c_parser_omp_declare_simd): Likewise.
2286
2287 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2288
2289 * c-decl.c (struct c_struct_parse_info): Change member types
2290 from vec to auto_vec.
2291 (start_struct): Adjust.
2292 (finish_struct): Likewise.
2293
2294 2016-07-02 Jakub Jelinek <jakub@redhat.com>
2295
2296 PR c/71719
2297 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2298
2299 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2300
2301 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2302 Move pragma context checking into...
2303 (c_parser_omp_cancellation_point): ... here, and improve
2304 diagnostic messages.
2305 * c-typeck.c (c_finish_omp_cancel)
2306 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2307
2308 2016-06-29 Jakub Jelinek <jakub@redhat.com>
2309
2310 PR c/71685
2311 * c-typeck.c (c_build_qualified_type): Don't clear
2312 C_TYPE_INCOMPLETE_VARS for the main variant.
2313
2314 2016-06-28 Martin Sebor <msebor@redhat.com>
2315
2316 PR c/71552
2317 * c-typeck.c (output_init_element): Diagnose incompatible types
2318 before non-constant initializers.
2319
2320 2016-06-28 Jakub Jelinek <jakub@redhat.com>
2321
2322 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2323
2324 2016-06-23 Andi Kleen <ak@linux.intel.com>
2325
2326 * Make-lang.in: Add support for autofdo.
2327
2328 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2329
2330 PR c/70339
2331 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2332 (implicit_decl_warning): When issuing warnings for implicit
2333 declarations, attempt to provide a suggestion via
2334 lookup_name_fuzzy.
2335 (undeclared_variable): Likewise when issuing errors.
2336 (lookup_name_in_scope): Likewise.
2337 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2338 (best_macro_match): New typedef.
2339 (find_closest_macro_cpp_cb): New function.
2340 (lookup_name_fuzzy): New function.
2341 * c-parser.c: Include gcc-rich-location.h.
2342 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2343 (c_keyword_starts_typename): ...this new function.
2344 (c_parser_declaration_or_fndef): When issuing errors about
2345 missing "struct" etc, add a fixit. For other kinds of errors,
2346 attempt to provide a suggestion via lookup_name_fuzzy.
2347 (c_parser_parms_declarator): When looking ahead to detect typos in
2348 type names, also reject CPP_KEYWORD.
2349 (c_parser_parameter_declaration): When issuing errors about
2350 unknown type names, attempt to provide a suggestion via
2351 lookup_name_fuzzy.
2352 * c-tree.h (c_keyword_starts_typename): New prototype.
2353
2354 2016-06-20 Joseph Myers <joseph@codesourcery.com>
2355
2356 PR c/71601
2357 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2358 c_common_type returns error_mark_node.
2359
2360 2016-06-19 Martin Sebor <msebor@redhat.com>
2361
2362 PR c/69507
2363 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2364 __alignof__ (expression).
2365
2366 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2367
2368 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2369
2370 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2371
2372 * c-typeck.c (build_component_ref): Simplify fixit code by
2373 using gcc_rich_location::add_fixit_misspelled_id.
2374 (set_init_label): Likewise.
2375
2376 2016-06-13 David Malcolm <dmalcolm@redhat.com>
2377
2378 * c-parser.c (c_parser_initelt): Provide location of name for new
2379 location_t param of set_init_label.
2380 * c-tree.h (set_init_label): Add location_t param.
2381 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2382 param and use it when issuing error messages about unrecognized
2383 field names. Attempt to provide a fixit hint if appropriate,
2384 otherwise update the error message to provide the type name.
2385
2386 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2387
2388 PR c/71381
2389 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2390 Loosen checking.
2391
2392 2016-06-08 Martin Sebor <msebor@redhat.com>
2393 Jakub Jelinek <jakub@redhat.com>
2394
2395 PR c++/70507
2396 PR c/68120
2397 * c-typeck.c (convert_arguments): Don't promote last argument
2398 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2399
2400 2016-06-08 Marek Polacek <polacek@redhat.com>
2401
2402 PR c/71418
2403 * c-decl.c (grokdeclarator): Check TYPE_P.
2404
2405 PR c/71426
2406 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2407 code.
2408
2409 2016-06-07 David Malcolm <dmalcolm@redhat.com>
2410
2411 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2412 and structure element reference, capture the location of the
2413 element name token and pass it to build_component_ref.
2414 (c_parser_postfix_expression_after_primary): Likewise for
2415 structure element dereference.
2416 (c_parser_omp_variable_list): Likewise for
2417 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2418 * c-tree.h (build_component_ref): Add location_t param.
2419 * c-typeck.c (build_component_ref): Add location_t param
2420 COMPONENT_LOC. Use it, if available, when issuing hints about
2421 mispelled member names to provide a fixit replacement hint.
2422
2423 2016-06-06 Marek Polacek <polacek@redhat.com>
2424
2425 PR c/71362
2426 * c-parser.c (c_parser_direct_declarator): Set location.
2427
2428 2016-06-06 Marek Polacek <polacek@redhat.com>
2429
2430 * c-typeck.c (comptypes_internal): Handle comparisons of
2431 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2432 TYPE_REF_CAN_ALIAS_ALL.
2433
2434 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2435
2436 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2437 arguments as addressable when async clause exists.
2438
2439 2016-05-30 Jakub Jelinek <jakub@redhat.com>
2440
2441 PR c++/71349
2442 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2443 when combined with target construct.
2444
2445 2016-05-26 Jakub Jelinek <jakub@redhat.com>
2446
2447 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2448 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2449
2450 2016-05-25 Marek Polacek <polacek@redhat.com>
2451
2452 PR c/71265
2453 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2454
2455 PR c/71266
2456 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2457
2458 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2459
2460 * c-parser.c (c_parser_oacc_declare): Add support for
2461 GOMP_MAP_FIRSTPRIVATE_POINTER.
2462 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2463 argument with enum c_omp_region_type ort.
2464 (handle_omp_array_sections): Likewise. Update call to
2465 handle_omp_array_sections_1.
2466 (c_finish_omp_clauses): Add specific errors and warning messages for
2467 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2468 call to handle_omp_array_sections.
2469
2470 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2471
2472 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2473
2474 2016-05-24 Richard Biener <rguenther@suse.de>
2475
2476 PR middle-end/70434
2477 PR c/69504
2478 * c-typeck.c (build_array_ref): Do not complain about indexing
2479 non-lvalue vectors. Adjust for function name change.
2480
2481 2016-05-20 Martin Sebor <msebor@redhat.com>
2482
2483 PR c/71115
2484 * c-typeck.c (error_init): Use
2485 expansion_point_location_if_in_system_header.
2486 (warning_init): Same.
2487
2488 2016-05-19 David Malcolm <dmalcolm@redhat.com>
2489
2490 PR c/71171
2491 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2492 in error-handling.
2493 (c_parser_postfix_expression): Likewise.
2494 * c-tree.h (c_expr::set_error): New method.
2495 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2496 that result's range is initialized.
2497
2498 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2499
2500 * c-typeck.c (parser_build_unary_op): Fix formatting.
2501
2502 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2503
2504 * c-decl.c (grokdeclarator): Remove errmsg and use of
2505 targetm.invalid_return_type.
2506 (grokparms): Remove errmsg and use of
2507 targetm.invalid_parameter_type.
2508
2509 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2510
2511 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2512 function return type.
2513
2514 2016-05-12 Marek Polacek <polacek@redhat.com>
2515
2516 PR c/70756
2517 * c-decl.c (build_compound_literal): Pass LOC down to
2518 c_incomplete_type_error.
2519 * c-tree.h (require_complete_type): Adjust declaration.
2520 (c_incomplete_type_error): Likewise.
2521 * c-typeck.c (require_complete_type): Add location parameter, pass it
2522 down to c_incomplete_type_error.
2523 (c_incomplete_type_error): Add location parameter, pass it down to
2524 error_at.
2525 (build_component_ref): Pass location down to c_incomplete_type_error.
2526 (default_conversion): Pass location down to require_complete_type.
2527 (build_array_ref): Likewise.
2528 (build_function_call_vec): Likewise.
2529 (convert_arguments): Likewise.
2530 (build_unary_op): Likewise.
2531 (build_c_cast): Likewise.
2532 (build_modify_expr): Likewise.
2533 (convert_for_assignment): Likewise.
2534 (c_finish_omp_clauses): Likewise.
2535
2536 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2537
2538 PR c/43651
2539 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2540 is enabled.
2541 * c-errors.c (pedwarn_c90): Return true if warned.
2542 * c-tree.h (pedwarn_c90): Change return type to bool.
2543 (enum c_declspec_word): Add new enumerator cdw_atomic.
2544
2545 2016-05-11 Marek Polacek <polacek@redhat.com>
2546
2547 PR c++/71024
2548 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2549 diagnose_mismatched_attributes and call it.
2550
2551 2016-05-10 Marek Polacek <polacek@redhat.com>
2552
2553 PR c/70255
2554 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2555 on a declaration following the definition.
2556
2557 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2558
2559 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2560 parse it through to c_parser_c99_block_statement.
2561 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2562 caller.
2563
2564 2016-05-04 Marek Polacek <polacek@redhat.com>
2565
2566 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2567 OPT_Wdangling_else.
2568
2569 2016-05-04 Marek Polacek <polacek@redhat.com>
2570
2571 PR c/48778
2572 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2573 for macro expansions.
2574
2575 2016-05-03 Marek Polacek <polacek@redhat.com>
2576
2577 PR c/70859
2578 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2579 check_builtin_function_arguments.
2580
2581 2016-05-03 Richard Biener <rguenther@suse.de>
2582
2583 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2584 the checksum from the previous stage.
2585
2586 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2587
2588 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2589 c_finish_omp_clauses.
2590 (c_parser_omp_all_clauses): Likewise.
2591 (c_parser_oacc_cache): Likewise.
2592 (c_parser_oacc_loop): Likewise.
2593 (omp_split_clauses): Likewise.
2594 (c_parser_omp_declare_target): Likewise.
2595 (c_parser_cilk_all_clauses): Likewise.
2596 (c_parser_cilk_for): Likewise.
2597 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2598 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2599
2600 2016-05-02 Marek Polacek <polacek@redhat.com>
2601
2602 PR c/70851
2603 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2604 incomplete type.
2605
2606 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2607
2608 PR middle-end/70626
2609 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2610 OACC_LOOP_CLAUSE_MASK.
2611 (c_parser_oacc_kernels_parallel): Update call to
2612 c_oacc_split_loop_clauses.
2613
2614 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2615
2616 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2617 argument to build_modify_expr in two cases.
2618
2619 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2620
2621 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2622 warn_for_memset instead of warning directly here.
2623
2624 2016-04-26 Marek Polacek <polacek@redhat.com>
2625
2626 PR c/67784
2627 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2628 out of ...
2629 (c_parser_for_statement): ... here.
2630 (c_parser_if_statement): Use it.
2631 (c_parser_switch_statement): Use it.
2632 (c_parser_while_statement): Use it.
2633
2634 PR c/70791
2635 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2636
2637 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2638
2639 PR c++/69363
2640 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2641 instead of c_finish_cilk_clauses.
2642 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2643 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2644 floating-point variables in the linear clause for Cilk Plus.
2645
2646 2016-04-18 Michael Matz <matz@suse.de>
2647
2648 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2649 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2650
2651 2016-04-15 Marek Polacek <polacek@redhat.com>
2652
2653 PR c/70671
2654 * c-typeck.c (build_unary_op): Pass location down to error and
2655 warning call.
2656
2657 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2658
2659 PR c/70436
2660 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2661 where needed.
2662 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2663 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2664 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2665 Adjust c_parser_pragma callers.
2666 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2667 caller.
2668 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2669 c_parser_statement.
2670 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2671 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2672 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2673 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2674 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2675 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2676 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2677 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2678 down where needed.
2679 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2680 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2681 calls.
2682
2683 2016-04-13 Marek Polacek <polacek@redhat.com>
2684
2685 PR c/70436
2686 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2687 adjust callers.
2688 (c_parser_statement): Likewise.
2689 (c_parser_c99_block_statement): Likewise.
2690 (c_parser_while_statement): Likewise.
2691 (c_parser_for_statement): Likewise.
2692 (c_parser_if_body): Don't set IF_P here.
2693 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2694 about dangling else here.
2695 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2696 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2697 warn about dangling else here.
2698
2699 2016-04-04 Marek Polacek <polacek@redhat.com>
2700
2701 PR c/70307
2702 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2703
2704 2016-03-31 Marek Polacek <polacek@redhat.com>
2705
2706 PR c/70297
2707 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2708
2709 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2710
2711 PR c/70281
2712 * c-parser.c (c_parser_postfix_expression): Set the source range
2713 for uses of "__builtin_types_compatible_p".
2714
2715 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2716
2717 PR c/70280
2718 * c-typeck.c (composite_type): Don't count void_list_node
2719 into len, if the list is terminated by void_list_node, start
2720 with void_list_node instead of NULL for newargs. Stop
2721 at void_list_node.
2722
2723 2016-03-16 Marek Polacek <polacek@redhat.com>
2724
2725 PR c/70093
2726 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2727 nested functions returning VM types.
2728
2729 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2730
2731 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2732 when calling c_finish_omp_clauses.
2733
2734 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2735
2736 PR c/69824
2737 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2738 for later.
2739
2740 2016-03-04 Marek Polacek <polacek@redhat.com>
2741
2742 PR c/69798
2743 * c-parser.c (c_parser_postfix_expression): Call
2744 c_parser_cast_expression rather than c_parser_postfix_expression.
2745
2746 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2747
2748 PR c/69796
2749 PR c/69974
2750 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2751 of incomplete decls to error_mark_node.
2752
2753 2016-02-24 Marek Polacek <polacek@redhat.com>
2754
2755 PR c/69819
2756 * c-decl.c (finish_decl): Don't update the copy of the type of a
2757 different decl type.
2758
2759 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2760
2761 PR objc/69844
2762 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2763 in id_kind reclassification.
2764
2765 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2766
2767 PR c/69835
2768 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2769
2770 2016-02-16 James Norris <jnorris@codesourcery.com>
2771
2772 PR c/64748
2773 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2774
2775 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2776
2777 * c-decl.c (build_null_declspecs): Zero the entire struct.
2778
2779 PR c/69522
2780 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2781 callers changed. If nested_p is true, use it to call
2782 finish_implicit_inits.
2783 * c-tree.h (finish_implicit_inits): Declare.
2784 * c-typeck.c (finish_implicit_inits): New function. Move code
2785 from ...
2786 (push_init_level): ... here.
2787 (set_designator, process_init_element): Call finish_implicit_inits.
2788
2789 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2790
2791 PR c/69768
2792 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2793 arguments for -Waddress warning.
2794
2795 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2796
2797 PR c/69669
2798 * c-decl.c (finish_enum): When honoring mode attribute,
2799 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2800
2801 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2802
2803 PR debug/69518
2804 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2805 all type variants, not just TYPE_MAIN_VARIANT.
2806
2807 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2808
2809 PR debug/66869
2810 * c-decl.c (c_write_global_declarations_1): Warn with
2811 warn_unused_function if static prototype without definition
2812 is not C_DECL_USED.
2813
2814 2016-01-27 Marek Polacek <polacek@redhat.com>
2815
2816 PR c/68062
2817 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2818 to unsigned, if needed. Add -Wsign-compare warning.
2819
2820 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2821
2822 PR tree-optimization/69483
2823 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2824
2825 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2826
2827 PR c/24293
2828 * c-tree.h (incomplete_record_decls): Declare.
2829 * c-parser.c (incomplete_record_decls): Define.
2830 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2831 report error if any decl has zero size.
2832 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2833 or enum type to incomplete_record_decls.
2834
2835 2016-01-14 Tom de Vries <tom@codesourcery.com>
2836
2837 PR tree-optimization/68773
2838 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2839 set force_output.
2840
2841 2016-01-14 Marek Polacek <polacek@redhat.com>
2842
2843 PR c/69262
2844 * c-decl.c (grokdeclarator): Provide more information for invalid
2845 array declarations.
2846
2847 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2848
2849 * c-parser.c (c_parser_unary_expression): For dereferences, build
2850 a combined location before calling build_indirect_ref, so that
2851 error reports cover the full range, manually updating the c_expr
2852 src_range.
2853
2854 2016-01-06 Marek Polacek <polacek@redhat.com>
2855
2856 PR sanitizer/69099
2857 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2858 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2859 NULL.
2860
2861 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2862
2863 Update copyright years.
2864
2865 2016-01-04 Marek Polacek <polacek@redhat.com>
2866
2867 PR c/68908
2868 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2869 optimization to use __atomic_fetch_* built-in if possible.
2870
2871 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2872
2873 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2874 into...
2875 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2876 all users.
2877
2878 2015-12-22 Marek Polacek <polacek@redhat.com>
2879
2880 PR c/69002
2881 * c-typeck.c (build_component_ref): Warn when acessing elements of
2882 atomic structures or unions.
2883
2884 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2885
2886 * c-typeck.c: Include "gcc-rich-location.h".
2887 (build_binary_op): In the two places that call binary_op_error,
2888 create a gcc_rich_location and populate it with the location of
2889 the binary op and its two operands.
2890
2891 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2892
2893 * c-parser.c (c_parser_statement_after_labels): When calling
2894 c_finish_return, Use the return expression's location if it has
2895 one, falling back to the location of the first token within it.
2896 * c-typeck.c (c_finish_return): When issuing warnings about
2897 the incorrect presence/absence of a return value, issue a note
2898 showing the declaration of the function.
2899
2900 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2901
2902 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2903 to 4.
2904 (c_parser_peek_nth_token): New function.
2905 (c_parser_peek_conflict_marker): New function.
2906 (c_parser_error): Detect conflict markers and report them as such.
2907
2908 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2909
2910 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2911 to preserve range information for the primary expression
2912 in the call to c_parser_postfix_expression_after_primary.
2913
2914 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2915
2916 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2917 expression location, falling back on the first token location,
2918 rather than always using the latter.
2919
2920 2015-12-16 Marek Polacek <polacek@redhat.com>
2921
2922 PR c/64637
2923 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2924 available.
2925
2926 2015-12-15 Marek Polacek <polacek@redhat.com>
2927
2928 PR c/68907
2929 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2930 artificial decl.
2931
2932 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2933
2934 * c-parser.c (c_parser_alignof_expression): Capture location of
2935 closing parenthesis (if any), or of end of unary expression, and
2936 use it to build a src_range for the expression.
2937
2938 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2939
2940 PR c/68757
2941 * c-parser.c (c_parser_get_builtin_args): Add
2942 "out_close_paren_loc" param, and write back to it.
2943 (c_parser_postfix_expression): Capture the closing
2944 parenthesis location for RID_CHOOSE_EXPR,
2945 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2946 RID_BUILTIN_SHUFFLE and use it to set the source range
2947 for such expressions; within RID_BUILTIN_COMPLEX set
2948 the underlying location.
2949
2950 2015-12-07 Marek Polacek <polacek@redhat.com>
2951
2952 PR c/68668
2953 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2954 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2955
2956 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2957
2958 * c-tree.h (c_build_va_arg): Adjust prototype.
2959 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2960 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2961 parameter, adjust throughout and issue an error if EXPR is a component
2962 with reverse storage order.
2963
2964 2015-12-02 Jason Merrill <jason@redhat.com>
2965
2966 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2967 (c_fully_fold_internal, decl_constant_value_for_optimization):
2968 Move from c-common.c.
2969 * c-tree.h: Declare decl_constant_value_for_optimization.
2970 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2971
2972 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2973
2974 PR c/68162
2975 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2976 following link from declarator to next declarator. Track original
2977 qualified type and pass it to c_build_qualified_type.
2978 * c-typeck.c (c_build_qualified_type): Add arguments
2979 orig_qual_type and orig_qual_indirect.
2980
2981 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2982
2983 * c-parser.c (c_parser_omp_clause_name)
2984 (c_parser_oacc_all_clauses): Alphabetical sorting.
2985
2986 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2987
2988 PR c/68533
2989 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2990 for diagnostics.
2991
2992 2015-12-01 Julian Brown <julian@codesourcery.com>
2993 Cesar Philippidis <cesar@codesourcery.com>
2994 James Norris <James_Norris@mentor.com>
2995
2996 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2997 (c_parser_oacc_clause_use_device): New function.
2998 (c_parser_oacc_all_clauses): Add use_device support.
2999 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3000 (c_parser_oacc_host_data): New function.
3001 (c_parser_omp_construct): Add host_data support.
3002 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3003 * c-typeck.c (c_finish_oacc_host_data): New function.
3004 (c_finish_omp_clauses): Add use_device support.
3005
3006 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
3007
3008 PR c/67106
3009 * c-decl.c: Set TYPE_PACKED in variants.
3010
3011 2015-11-27 Martin Liska <mliska@suse.cz>
3012
3013 PR c++/68312
3014 * c-array-notation.c (fix_builtin_array_notation_fn):
3015 Use release_vec_vec instead of vec::release.
3016 (build_array_notation_expr): Likewise.
3017 (fix_conditional_array_notations_1): Likewise.
3018 (fix_array_notation_expr): Likewise.
3019 (fix_array_notation_call_expr): Likewise.
3020
3021 2015-11-27 Jakub Jelinek <jakub@redhat.com>
3022
3023 PR c/63326
3024 * c-parser.c (c_parser_compound_statement_nostart): If
3025 last_label is true, use pragma_stmt instead of pragma_compound
3026 as second c_parser_pragma argument.
3027 (c_parser_omp_ordered, c_parser_omp_target_update,
3028 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3029 false as second argument to c_parser_skip_to_pragma_eol after
3030 diagnosing standalone directives used in pragma_stmt context.
3031
3032 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3033
3034 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3035 with "if (ENABLE_OFFLOADING)".
3036
3037 2015-11-23 David Malcolm <dmalcolm@redhat.com>
3038
3039 PR objc/68438
3040 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3041 for various Objective-C constructs: Class.name syntax,
3042 @selector(), @protocol(), @encode(), and [] message syntax.
3043
3044 2015-11-20 David Malcolm <dmalcolm@redhat.com>
3045
3046 PR 62314
3047 * c-typeck.c (should_suggest_deref_p): New function.
3048 (build_component_ref): Special-case POINTER_TYPE when
3049 generating a "not a structure of union" error message, and
3050 suggest a "->" rather than a ".", providing a fix-it hint.
3051
3052 2015-11-19 David Malcolm <dmalcolm@redhat.com>
3053
3054 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3055 candidate into a new function, find_closest_identifier.
3056
3057 2015-11-19 Marek Polacek <polacek@redhat.com>
3058
3059 PR c/68412
3060 * c-typeck.c (parser_build_binary_op): Properly handle
3061 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3062
3063 2015-11-17 David Malcolm <dmalcolm@redhat.com>
3064
3065 * c-parser.c (set_c_expr_source_range): Bulletproof both
3066 overloaded implementations against NULL expr->value.
3067 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3068 values.
3069 (c_parser_unary_expression): Likewise when handling addresses of
3070 labels.
3071 (c_parser_postfix_expression): Likewise for statement expressions,
3072 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3073 __builtin_va_arg, and for __builtin_offset_of.
3074 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3075 src_range using the range of the braced initializer.
3076 (c_parser_transaction_expression): Set src_range for "ret" to a
3077 sane pair of values.
3078
3079 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3080
3081 * c-parser.c (c_finish_omp_declare_simd): Look for
3082 "simd" attribute as well. Update error message.
3083
3084 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3085
3086 * c-parser.c (c_parser_omp_declare_target): Adjust.
3087
3088 2015-11-14 Jakub Jelinek <jakub@redhat.com>
3089
3090 * c-typeck.c (c_finish_omp_clauses): Don't mark
3091 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3092
3093 2015-11-14 Marek Polacek <polacek@redhat.com>
3094
3095 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3096 * c-typeck.c: Likewise.
3097
3098 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3099
3100 * c-decl.c (warn_defaults_to): Pass line_table to
3101 rich_location ctor.
3102 * c-errors.c (pedwarn_c99): Likewise.
3103 (pedwarn_c90): Likewise.
3104 * c-parser.c (set_c_expr_source_range): New functions.
3105 (c_token::get_range): New method.
3106 (c_token::get_finish): New method.
3107 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3108 based on the range from the start of the LHS to the end of the
3109 RHS.
3110 (c_parser_conditional_expression): Likewise, based on the range
3111 from the start of the cond.value to the end of exp2.value.
3112 (c_parser_binary_expression): Call set_c_expr_source_range on
3113 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3114 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3115 based on the cast_loc through to the end of the expr.
3116 (c_parser_unary_expression): Likewise, based on the
3117 op_loc through to the end of op.
3118 (c_parser_sizeof_expression) Likewise, based on the start of the
3119 sizeof token through to either the closing paren or the end of
3120 expr.
3121 (c_parser_postfix_expression): Likewise, using the token range,
3122 or from the open paren through to the close paren for
3123 parenthesized expressions.
3124 (c_parser_postfix_expression_after_primary): Likewise, for
3125 various kinds of expression.
3126 * c-tree.h (struct c_expr): Add field "src_range".
3127 (c_expr::get_start): New method.
3128 (c_expr::get_finish): New method.
3129 (set_c_expr_source_range): New decls.
3130 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3131 on ret for prefix unary ops.
3132 (parser_build_binary_op): Likewise, running from the start of
3133 arg1.value through to the end of arg2.value.
3134
3135 2015-11-13 Marek Polacek <polacek@redhat.com>
3136
3137 PR c/68320
3138 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3139
3140 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3141
3142 * c-typeck.c: Include spellcheck.h.
3143 (lookup_field_fuzzy_find_candidates): New function.
3144 (lookup_field_fuzzy): New function.
3145 (build_component_ref): If the field was not found, try using
3146 lookup_field_fuzzy and potentially offer a suggestion.
3147
3148 2015-11-12 James Norris <jnorris@codesourcery.com>
3149 Joseph Myers <joseph@codesourcery.com>
3150
3151 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3152 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3153 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3154 and PRAGMA_OMP_CLAUSE_LINK.
3155 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3156 and PRAGMA_OACC_CLAUSE_LINK.
3157 (OACC_DECLARE_CLAUSE_MASK): New definition.
3158 (c_parser_oacc_declare): New function.
3159
3160 2015-11-12 Marek Polacek <polacek@redhat.com>
3161
3162 PR c/67784
3163 * c-parser.c (c_parser_for_statement): Reclassify the token in
3164 a correct scope.
3165
3166 2015-11-11 Marek Polacek <polacek@redhat.com>
3167
3168 PR c/68107
3169 PR c++/68266
3170 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3171 checking the size of an array.
3172
3173 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
3174
3175 * c-array-notation.c: Remove unused header files.
3176 * c-aux-info.c: Likewise.
3177 * c-convert.c: Likewise.
3178 * c-decl.c: Likewise.
3179 * c-errors.c: Likewise.
3180 * c-lang.c: Likewise.
3181 * c-objc-common.c: Likewise.
3182 * c-parser.c: Likewise.
3183 * c-typeck.c: Likewise.
3184 * gccspec.c: Likewise.
3185
3186 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3187 Cesar Philippidis <cesar@codesourcery.com>
3188 James Norris <jnorris@codesourcery.com>
3189 Julian Brown <julian@codesourcery.com>
3190 Nathan Sidwell <nathan@codesourcery.com>
3191
3192 c/
3193 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3194 routine arg.
3195 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3196 (c_parser_pragma): Parse 'acc routine'.
3197 (OACC_ROUTINE_CLAUSE_MARK): Define.
3198 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3199
3200 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3201
3202 PR debug/67192
3203 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3204 location of the backward-goto to the start of the loop body.
3205
3206 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3207
3208 PR debug/67192
3209 * c-parser.c (c_parser_while_statement): Finish the loop before
3210 parsing ahead for misleading indentation.
3211 (c_parser_for_statement): Likewise.
3212
3213 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3214
3215 * c-decl.c (finish_struct): If the structure has reverse storage
3216 order, rewrite the type of array fields with scalar component. Call
3217 maybe_apply_pragma_scalar_storage_order on entry.
3218 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3219 errors on bit-fields and reverse SSO here and not...
3220 (c_mark_addressable): ...here.
3221 (output_init_element): Adjust call to initializer_constant_valid_p.
3222 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3223
3224 2015-11-06 David Malcolm <dmalcolm@redhat.com>
3225
3226 * c-decl.c (warn_defaults_to): Update for change in signature
3227 of diagnostic_set_info.
3228 * c-errors.c (pedwarn_c99): Likewise.
3229 (pedwarn_c90): Likewise.
3230 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3231 for textinfo::set_location.
3232
3233 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3234 Thomas Schwinge <thomas@codesourcery.com>
3235 James Norris <jnorris@codesourcery.com>
3236
3237 * c-parser.c (c_parser_omp_clause_name): Add support for
3238 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3239 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3240 default(none) in OpenACC.
3241 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3242 arguments.
3243 (c_parser_oacc_clause_tile): New function.
3244 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3245 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3246 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3247 TILE}.
3248 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3249 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3250 FIRSTPRIVATE}.
3251 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3252 (c_parser_oacc_update): Update the error message for missing clauses.
3253 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3254 and OMP_CLAUSE_INDEPENDENT.
3255
3256 2015-11-05 Marek Polacek <polacek@redhat.com>
3257
3258 PR c/68090
3259 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3260 deal with pre-evaluation on invalid types.
3261
3262 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3263 Ilya Verbin <ilya.verbin@intel.com>
3264
3265 * c-parser.c: Include context.h and gimple-expr.h.
3266 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3267 monotonic together with nonmonotonic.
3268 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3269 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3270 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3271 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3272 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3273 expressions on combined target teams before the target.
3274 (c_parser_omp_declare_target): If decl has "omp declare target" or
3275 "omp declare target link" attribute, and cgraph or varpool node already
3276 exists, then set corresponding flags. Call c_finish_omp_clauses
3277 in the parenthesized extended-list syntax case.
3278 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3279 declare target.
3280 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3281 on OMP_CLAUSE_REDUCTION array sections.
3282 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3283 into the constant offset, or for variable low-bound using
3284 POINTER_PLUS_EXPR. For structure element based array sections use
3285 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3286 (c_finish_omp_clauses): Drop generic_field_head, structure
3287 elements are now always mapped even as array section bases,
3288 diagnose same var in data sharing and mapping clauses. Diagnose if
3289 linear step on declare simd is neither a constant nor a uniform
3290 parameter. Look through POINTER_PLUS_EXPR for array section
3291 reductions. Diagnose the same var or function appearing multiple
3292 times on the same directive. Fix up wording for the to clause if t
3293 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3294 modifier on kinds other than dynamic or guided or nonmonotonic
3295 modifier together with ordered clause.
3296
3297 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3298 Chung-Lin Tang <cltang@codesourcery.com>
3299
3300 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3301
3302 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3303
3304 * c-array-notation.c: Reorder #include's and remove duplicates.
3305 * c-aux-info.c: Likewise.
3306 * c-convert.c: Likewise.
3307 * c-decl.c: Likewise.
3308 * c-errors.c: Likewise.
3309 * c-lang.c: Likewise.
3310 * c-objc-common.c: Likewise.
3311 * c-parser.c: Likewise.
3312 * c-typeck.c: Likewise.
3313
3314 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
3315
3316 PR debug/66068
3317 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3318 after calling build_qualified_type.
3319
3320 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3321 Thomas Schwinge <thomas@codesourcery.com>
3322 James Norris <jnorris@codesourcery.com>
3323 Joseph Myers <joseph@codesourcery.com>
3324 Julian Brown <julian@codesourcery.com>
3325 Bernd Schmidt <bschmidt@redhat.com>
3326
3327 * c-parser.c (c_parser_oacc_shape_clause): New.
3328 (c_parser_oacc_simple_clause): New.
3329 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3330 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3331
3332 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3333 James Norris <jnorris@codesourcery.com>
3334 Cesar Philippidis <cesar@codesourcery.com>
3335
3336 PR c/64765
3337 PR c/64880
3338 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3339 parameters, and handle these. Adjust all users.
3340 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3341 into...
3342 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3343 all users.
3344 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3345 declare functions.
3346 (c_finish_omp_construct): Declare function.
3347 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3348 Merge functions into...
3349 (c_finish_omp_construct): ... this new function.
3350
3351 2015-10-22 Richard Biener <rguenther@suse.de>
3352
3353 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3354 before folding a MINUS_EXPR.
3355
3356 2015-10-21 Marek Polacek <polacek@redhat.com>
3357
3358 PR c/68024
3359 * c-decl.c (start_function): Warn about vararg functions without
3360 a prototype.
3361
3362 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3363
3364 * c-typeck.c (build_conditional_expr): Use boolean vector
3365 type for vector comparison.
3366 (build_vec_cmp): New.
3367 (build_binary_op): Use build_vec_cmp for comparison.
3368
3369 2015-10-20 Marek Polacek <polacek@redhat.com>
3370
3371 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3372
3373 2015-10-20 Marek Polacek <polacek@redhat.com>
3374
3375 PR c/67964
3376 * c-parser.c (c_parser_attributes): Break out of the loop if the
3377 token after an attribute isn't a comma.
3378
3379 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3380 Aldy Hernandez <aldyh@redhat.com>
3381
3382 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3383 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3384 (c_parser_omp_variable_list): Handle structure elements for
3385 map, to and from clauses. Handle array sections in reduction
3386 clause. Formatting fixes.
3387 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3388 if clause modifiers.
3389 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3390 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3391 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3392 c_parser_omp_clause_is_device_ptr): New functions.
3393 (c_parser_omp_clause_ordered): Parse optional parameter.
3394 (c_parser_omp_clause_reduction): Handle array reductions.
3395 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3396 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3397 functions.
3398 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3399 (c_parser_omp_clause_depend_sink): New function.
3400 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3401 (c_parser_omp_clause_map): Parse release/delete map kinds and
3402 optional always modifier.
3403 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3404 and c_finish_omp_clauses callers.
3405 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3406 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3407 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3408 (OMP_CRITICAL_CLAUSE_MASK): Define.
3409 (c_parser_omp_critical): Parse critical clauses.
3410 (c_parser_omp_for_loop): Handle doacross loops, adjust
3411 c_finish_omp_for and c_finish_omp_clauses callers.
3412 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3413 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3414 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3415 (c_parser_omp_for): Disallow ordered clause when combined with
3416 distribute. Disallow linear clause when combined with distribute
3417 and not combined with simd.
3418 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3419 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3420 parse clauses and if depend clause is found, don't parse a body.
3421 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3422 Allow target parallel without for after it.
3423 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3424 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3425 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3426 invalid kinds.
3427 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3428 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3429 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3430 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3431 functions.
3432 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3433 defaultmap and is_device_ptr clauses.
3434 (c_parser_omp_target): Parse target parallel and target simd. Set
3435 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3436 and target exit data. Diagnose invalid map kinds.
3437 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3438 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3439 construct.
3440 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3441 &omp_priv.
3442 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3443 (c_parser_omp_taskloop): New function.
3444 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3445 handle PRAGMA_OMP_TASKLOOP.
3446 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3447 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3448 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3449 Add IS_OMP argument, handle structure element bases, diagnose
3450 bitfields, pass IS_OMP recursively, diagnose known zero length
3451 array sections in depend clauses, handle array sections in reduction
3452 clause, diagnose negative length even for pointers.
3453 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3454 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3455 array sections in reduction clause, set
3456 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3457 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3458 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3459 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3460
3461 2015-10-06 Marek Polacek <polacek@redhat.com>
3462
3463 * c-parser.c (c_parser_statement_after_labels): Use
3464 protected_set_expr_location.
3465 (c_parser_omp_clause_num_gangs): Likewise.
3466 (c_parser_omp_clause_num_threads): Likewise.
3467 (c_parser_omp_clause_num_workers): Likewise.
3468 (c_parser_omp_clause_vector_length): Likewise.
3469 (c_parser_omp_clause_num_teams): Likewise.
3470 (c_parser_omp_clause_thread_limit): Likewise.
3471 * c-typeck.c (build_c_cast): Likewise.
3472 (c_cast_expr): Likewise.
3473
3474 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3475
3476 * c-typeck.c (c_tree_equal): Use real_equal instead of
3477 REAL_VALUES_EQUAL.
3478
3479 2015-10-04 Jason Merrill <jason@redhat.com>
3480
3481 * c-parser.c (c_lex_one_token): Handle @synchronized.
3482 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3483 can change whether the function is transaction_safe.
3484
3485 2015-10-02 Marek Polacek <polacek@redhat.com>
3486
3487 PR c/67730
3488 * c-typeck.c (convert_for_assignment): Use the expansion point
3489 location throughout.
3490
3491 2015-10-02 Marek Polacek <polacek@redhat.com>
3492
3493 PR c/64249
3494 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3495 and pass it down to c_parser_if_statement.
3496 (c_parser_else_body): Add CHAIN parameter and pass it down to
3497 c_parser_statement_after_labels.
3498 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3499 duplicated if-else-if conditions.
3500
3501 2015-10-01 Marek Polacek <polacek@redhat.com>
3502
3503 * c-typeck.c (convert_for_assignment): Improve commentary.
3504
3505 2015-09-30 Marek Polacek <polacek@redhat.com>
3506
3507 PR c/67730
3508 * c-typeck.c (c_finish_return): Use the expansion point location for
3509 certain "return with value" warnings.
3510
3511 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3512
3513 * c-parser.c (pragma_lex): Add loc argument.
3514
3515 2015-09-15 Marek Polacek <polacek@redhat.com>
3516
3517 PR c/67580
3518 * c-decl.c (tag_exists_p): New function.
3519 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3520 struct/union/enum keywords are missing.
3521 * c-tree.h (tag_exists_p): Declare.
3522
3523 2015-09-15 Marek Polacek <polacek@redhat.com>
3524
3525 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3526 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3527 Return NULL_TREE instead of 0.
3528 (lookup_name): Return NULL_TREE instead of 0.
3529 (lookup_name_in_scope): Likewise.
3530 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3531 (parser_xref_tag): Use false instead of 0.
3532 (start_struct): Use true instead of 1.
3533 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3534
3535 2015-09-14 Marek Polacek <polacek@redhat.com>
3536
3537 * c-typeck.c (set_nonincremental_init_from_string): Use
3538 HOST_WIDE_INT_M1U when shifting a negative value.
3539
3540 2015-09-09 Mark Wielaard <mjw@redhat.com>
3541
3542 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3543 parm against NULL.
3544
3545 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3546
3547 PR c/67502
3548 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3549 into OMP_FOR_PRE_BODY rather than before the loop.
3550
3551 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3552
3553 PR c/67501
3554 * c-parser.c (c_parser_oacc_all_clauses,
3555 c_parser_omp_all_clauses): Remove invalid clause from
3556 list of clauses even if parser->error is set.
3557
3558 PR c/67500
3559 * c-parser.c (c_parser_omp_clause_aligned,
3560 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3561 test for errors.
3562 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3563 error_mark_node.
3564
3565 PR c/67495
3566 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3567 instead of c_parser_unary_expression. If the result is !lvalue_p,
3568 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3569
3570 2015-09-04 Marek Polacek <polacek@redhat.com>
3571
3572 PR sanitizer/67279
3573 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3574
3575 2015-09-03 Martin Sebor <msebor@redhat.com>
3576
3577 PR c/66516
3578 * c-typeck.c (convert_arguments, parser_build_unary_op,
3579 build_conditional_expr, c_cast_expr, convert_for_assignment,
3580 build_binary_op, _objc_common_truthvalue_conversion): Call
3581 reject_gcc_builtin.
3582 (c_decl_implicit): Define.
3583
3584 2015-09-02 Marek Polacek <polacek@redhat.com>
3585
3586 PR c/67432
3587 * c-parser.c (c_parser_enum_specifier): Give a better error for
3588 an empty enum.
3589
3590 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3591
3592 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3593
3594 2015-08-12 Marek Polacek <polacek@redhat.com>
3595
3596 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3597 LOC to it.
3598
3599 2015-08-03 Marek Polacek <polacek@redhat.com>
3600
3601 PR c/67088
3602 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3603 Use it.
3604 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3605
3606 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3607
3608 * c-parser.c (c_parser_if_body): Take token_indent_info
3609 argument. Call warn_for_misleading_indentation even when the
3610 body is a semicolon. Extract token_indent_infos corresponding
3611 to the guard, body and next tokens. Adjust call to
3612 warn_for_misleading_indentation accordingly.
3613 (c_parser_else_body): Likewise.
3614 (c_parser_if_statement): Likewise.
3615 (c_parser_while_statement): Likewise.
3616 (c_parser_for_statement): Likewise.
3617
3618 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3619 Manuel López-Ibáñez <manu@gcc.gnu.org>
3620
3621 * c-decl.c (get_parm_info): Remove static var. Update warning
3622 message.
3623
3624 2015-07-27 Marek Polacek <polacek@redhat.com>
3625
3626 PR c++/66555
3627 PR c/54979
3628 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3629
3630 2015-07-20 Marek Polacek <polacek@redhat.com>
3631
3632 PR c++/55095
3633 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3634 (build_binary_op): Warn about left shift overflows.
3635
3636 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3637
3638 * c-array-notation.c: Adjust includes for flags.h changes.
3639 * c-objc-common.c: Likewise.
3640
3641 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3642
3643 * c-array-notation.c: Adjust includes.
3644 * c-aux-info.c: Likewise.
3645 * c-convert.c: Likewise.
3646 * c-decl.c: Likewise.
3647 * c-errors.c: Likewise.
3648 * c-lang.c: Likewise.
3649 * c-objc-common.c: Likewise.
3650 * c-parser.c: Likewise.
3651 * c-typeck.c: Likewise.
3652
3653 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3654
3655 PR fortran/66605
3656 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3657
3658 2015-06-29 Marek Polacek <polacek@redhat.com>
3659
3660 PR c/66322
3661 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3662 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3663 about -Wswitch-bool here.
3664 (do_case): Update c_add_case_label call.
3665 (c_finish_case): Update c_do_switch_warnings call.
3666
3667 2015-06-27 Marek Polacek <polacek@redhat.com>
3668
3669 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3670
3671 2015-06-26 Marek Polacek <polacek@redhat.com>
3672
3673 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3674 INDIRECT_REF_P.
3675 * c-typeck.c (array_to_pointer_conversion): Likewise.
3676 (build_unary_op): Likewise.
3677 (c_finish_return): Likewise.
3678
3679 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3680
3681 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3682 * c-parser.c: Likewise.
3683
3684 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3685
3686 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3687 instead of pointer_hash.
3688 (detect_field_duplicates): Likewise.
3689
3690 2015-06-25 Marek Polacek <polacek@redhat.com>
3691
3692 * c-array-notation.c: Use VAR_P throughout.
3693 * c-decl.c: Likewise.
3694 * c-objc-common.c: Likewise.
3695 * c-parser.c: Likewise.
3696 * c-typeck.c: Likewise.
3697
3698 2015-06-25 Marek Polacek <polacek@redhat.com>
3699
3700 * c-decl.c: Use is_global_var throughout.
3701 * c-parser.c: Likewise.
3702 * c-typeck.c: Likewise.
3703
3704 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3705
3706 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3707 * c-aux-info.c: Likewise.
3708 * c-convert.c: Likewise.
3709 * c-decl.c: Likewise.
3710 * c-errors.c: Likewise.
3711 * c-lang.c: Likewise.
3712 * c-objc-common.c: Likewise.
3713 * c-parser.c: Likewise.
3714 * c-typeck.c: Likewise.
3715
3716 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3717
3718 PR middle-end/66325
3719 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3720 variants.
3721
3722 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3723
3724 * c-decl.c (pop_scope): Register the main translation unit
3725 through the new debug hook.
3726
3727 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3728
3729 * c-array-notation.c : Adjust include files.
3730 * c-aux-info.c : Likewise.
3731 * c-convert.c : Likewise.
3732 * c-decl.c : Likewise.
3733 * c-errors.c : Likewise.
3734 * c-lang.c : Likewise.
3735 * c-lang.h : Likewise.
3736 * c-objc-common.c : Likewise.
3737 * c-parser.c : Likewise.
3738 * c-typeck.c : Likewise.
3739
3740 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3741
3742 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3743 immediately clobber it.
3744 (c_write_global_declarations_1): Remove call to
3745 check_global_declaration_1.
3746 (c_write_global_declarations_2): Remove.
3747 (c_write_final_cleanups): Rename from c_write_global_declarations.
3748 Remove call to finalize_compilation_unit.
3749 Remove calls to debugging hooks.
3750 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3751 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3752 * c-tree.h: Remove c_write_global_declarations.
3753
3754 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3755
3756 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3757 * c-aux-info.c: Likewise.
3758 * c-convert.c: Likewise.
3759 * c-decl.c: Likewise.
3760 * c-errors.c: Likewise.
3761 * c-lang.c: Likewise.
3762 * c-objc-common.c: Likewise.
3763 * c-parser.c: Likewise.
3764 * c-typeck.c: Likewise.
3765
3766 2015-06-04 Marek Polacek <polacek@redhat.com>
3767
3768 PR c/66341
3769 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3770 it is a lvalue.
3771
3772 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3773
3774 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3775 Warn for empty struct.
3776 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3777
3778 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3779
3780 * c-decl.c (start_function): Call plugin before parsing.
3781 (finish_function): Call plugin after parsing.
3782
3783 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3784
3785 PR c/49551
3786 * c-decl.c (merge_decls): Merge DECL_COMMON.
3787
3788 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3789
3790 * Make-lang.in (check_gcc_pallelize): Define.
3791
3792 2015-05-22 Marek Polacek <polacek@redhat.com>
3793
3794 PR c/47043
3795 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3796 attributes.
3797
3798 2015-05-21 Marek Polacek <polacek@redhat.com>
3799
3800 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3801 DECL_BUILT_IN.
3802
3803 2015-05-20 Marek Polacek <polacek@redhat.com>
3804
3805 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3806 * c-typeck.c: Likewise.
3807
3808 2015-05-19 Marek Polacek <polacek@redhat.com>
3809
3810 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3811
3812 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3813
3814 PR middle-end/66199
3815 * c-parser.c (c_parser_omp_for_loop): Don't add
3816 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3817 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3818 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3819 constructs.
3820
3821 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3822
3823 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3824 swaps.
3825
3826 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3827
3828 PR fortran/44054
3829 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3830 accessor function.
3831
3832 2015-05-14 Marek Polacek <polacek@redhat.com>
3833
3834 PR c/66066
3835 PR c/66127
3836 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3837 rather than with 0.
3838
3839 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3840
3841 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3842 to add a call to warn_for_misleading_indentation.
3843 (c_parser_else_body): Likewise, adding param "else_loc".
3844 (c_parser_if_statement): Check for misleading indentation.
3845 (c_parser_while_statement): Likewise.
3846 (c_parser_for_statement): Likewise.
3847
3848 2015-05-08 Marek Polacek <polacek@redhat.com>
3849
3850 PR c/64918
3851 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3852 (output_init_element): Likewise.
3853
3854 2015-05-07 Marek Polacek <polacek@redhat.com>
3855
3856 PR c/65179
3857 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3858 value.
3859
3860 2015-04-30 Marek Polacek <polacek@redhat.com>
3861
3862 * c-typeck.c (set_init_label): Call error_at instead of error and
3863 pass LOC to it.
3864
3865 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3866 the type of a decl.
3867
3868 * c-typeck.c (c_build_va_arg): Clarify the error message.
3869
3870 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3871
3872 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3873 OMP_STANDALONE_CLAUSES.
3874
3875 2015-04-28 Marek Polacek <polacek@redhat.com>
3876
3877 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3878
3879 2015-04-28 Marek Polacek <polacek@redhat.com>
3880
3881 PR c/65901
3882 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3883
3884 2015-04-25 Marek Polacek <polacek@redhat.com>
3885
3886 PR c/52085
3887 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3888 attribute.
3889
3890 2015-04-23 Marek Polacek <polacek@redhat.com>
3891
3892 PR c/65345
3893 * c-decl.c (set_labels_context_r): New function.
3894 (store_parm_decls): Call it via walk_tree_without_duplicates.
3895 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3896 instead of create_tmp_var. Build TARGET_EXPR instead of
3897 COMPOUND_EXPR.
3898 (build_atomic_assign): Use create_tmp_var_raw instead of
3899 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3900
3901 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3902
3903 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3904 (c_parser_omp_target_update): Add missed %> to error_at ().
3905
3906 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3907
3908 PR target/55143
3909 * c-decl.c (c_default_pointer_mode): Remove definition.
3910 * c-tree.h (c_default_pointer_mode): Remove declaration.
3911
3912 2015-03-27 Tobias Burnus <burnus@net-b.de>
3913
3914 PR c/65586
3915 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3916 error out.
3917 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3918 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3919 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3920
3921 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3922
3923 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3924 attribute for DECL_EXTERNAL VAR_DECLs.
3925
3926 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3927
3928 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3929 argument.
3930
3931 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3932
3933 PR c/65120
3934 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3935 before preparing arguments to warn_logical_not_parentheses.
3936
3937 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3938
3939 PR c/65120
3940 * c-typeck.c (parser_build_binary_op): Don't warn for
3941 !!x == y or !b == y where b is _Bool.
3942
3943 2015-03-09 Marek Polacek <polacek@redhat.com>
3944
3945 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3946 * c-decl.c (grokdeclarator): Likewise.
3947 * c-typeck.c (build_binary_op): Likewise.
3948
3949 2015-02-27 Marek Polacek <polacek@redhat.com>
3950
3951 PR c/65228
3952 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3953
3954 2015-02-14 Marek Polacek <polacek@redhat.com>
3955
3956 PR c/64768
3957 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3958 declared through a typedef name.
3959
3960 2015-02-13 Marek Polacek <polacek@redhat.com>
3961
3962 PR c/65050
3963 * c-decl.c (grokdeclarator): Print also the type when giving
3964 the error message about array's incomplete element type.
3965
3966 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3967
3968 PR c/64824
3969 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3970 check in the POP macro.
3971
3972 2015-02-09 Marek Polacek <polacek@redhat.com>
3973
3974 PR c/64856
3975 * c-typeck.c (process_init_element): Don't always wrap
3976 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3977 initializing a range of elements.
3978
3979 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3980
3981 PR c/64824
3982 PR c/64868
3983 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3984
3985 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3986
3987 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3988 processing enum declaration.
3989
3990 2015-01-29 Marek Polacek <polacek@redhat.com>
3991
3992 PR c/64709
3993 * c-typeck.c (pop_init_level): If constructor_elements has
3994 exactly one element with integer_zerop value, set constructor_zeroinit
3995 to 1. Remove braces around warning_init call.
3996
3997 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3998
3999 PR c/64766
4000 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4001 of FUNCTION_DECLs with error_mark_node.
4002
4003 2015-01-26 Jakub Jelinek <jakub@redhat.com>
4004
4005 PR c/64778
4006 * c-typeck.c (convert_arguments): Return -1 if there are
4007 error_args, even if we've diagnosed too many arguments.
4008
4009 2015-01-21 Richard Biener <rguenther@suse.de>
4010
4011 PR middle-end/64313
4012 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4013 for builtins the user declared correctly.
4014
4015 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4016 Bernd Schmidt <bernds@codesourcery.com>
4017 Cesar Philippidis <cesar@codesourcery.com>
4018 James Norris <jnorris@codesourcery.com>
4019 Jakub Jelinek <jakub@redhat.com>
4020 Ilmir Usmanov <i.usmanov@samsung.com>
4021
4022 * c-parser.c: Include "gomp-constants.h".
4023 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4024 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4025 Use OMP_CLAUSE_SET_MAP_KIND.
4026 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4027 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4028 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4029 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4030 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4031 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4032 "copyout", "create", "delete", "deviceptr", "gang", "host",
4033 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4034 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4035 "present_or_create", "pcreate", "seq", "self", "vector",
4036 "vector_length", "wait", "worker".
4037 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4038 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4039 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4040 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4041 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4042 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4043 (c_parser_oacc_data_clause_deviceptr)
4044 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4045 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4046 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4047 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4048 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4049 (c_parser_oacc_parallel, c_parser_oacc_update)
4050 (c_parser_oacc_wait): New functions.
4051 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4052 (c_finish_oacc_data): New prototypes.
4053 * c-typeck.c: Include "gomp-constants.h".
4054 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4055 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4056 OMP_CLAUSE_SET_MAP_KIND.
4057 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4058 (c_finish_oacc_data): New functions.
4059 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4060 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4061 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4062 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4063 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4064 GOMP_MAP_FORCE_DEVICEPTR.
4065
4066 2015-01-09 Michael Collison <michael.collison@linaro.org>
4067
4068 * c-array-notation.c: Include hash-set.h, machmode.h,
4069 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4070 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4071 * c-aux-info.c: Ditto.
4072 * c-convert.c: Ditto.
4073 * c-decl.c: Ditto.
4074 * c-errors.c: Ditto.
4075 * c-lang.c: Dittoxs.
4076 * c-objc-common.c: Ditto.
4077 * c-parser.c: Ditto.
4078 * c-typeck.c: Include hash-set.h, machmode.h,
4079 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4080 fold-const.h, wide-int.h, inchash.h, real.h and
4081 fixed-value.h due to flattening of tree.h.
4082
4083 2015-01-07 Marek Polacek <polacek@redhat.com>
4084
4085 PR c/64417
4086 * c-typeck.c (process_init_element): Disallow initialization of
4087 a flexible array member with a string constant if the structure
4088 is in an array.
4089
4090 2015-01-05 Jakub Jelinek <jakub@redhat.com>
4091
4092 PR sanitizer/64344
4093 * c-typeck.c (convert_for_assignment, c_finish_return): For
4094 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4095 types also set in_late_binary_op around convert call.
4096 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4097 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4098 result on expr as last argument to ubsan_instrument_float_cast,
4099 if in_late_binary_op, don't use c_save_expr but save_expr.
4100
4101 Update copyright years.
4102
4103 2015-01-05 Marek Polacek <polacek@redhat.com>
4104
4105 PR c/64423
4106 * c-typeck.c (build_array_ref): Pass loc down to
4107 warn_array_subscript_with_type_char.
4108
4109 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
4110
4111 * c-typeck.c: New behavious for pointers to arrays with qualifiers
4112 (common-pointer-type): For pointers to arrays take qualifiers from
4113 element type.
4114 (build_conditional_expr): Add warnings for lost qualifiers.
4115 (comp-target-types): Allow pointers to arrays with different qualifiers.
4116 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
4117 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
4118 to PEDWARN_FOR_QUALIFIERS.
4119
4120 2014-12-17 Jakub Jelinek <jakub@redhat.com>
4121
4122 PR sanitizer/64289
4123 * c-convert.c: Include ubsan.h.
4124 (convert): For real -> integral casts and
4125 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4126 instead instrument the float cast directly.
4127
4128 2014-11-29 Jakub Jelinek <jakub@redhat.com>
4129
4130 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4131 c_finish_stmt_expr): Remove NULL last argument from
4132 create_tmp_var_raw and create_tmp_var calls.
4133 * c-array-notation.c (fix_builtin_array_notation_fn,
4134 build_array_notation_expr, fix_conditional_array_notations_1,
4135 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4136
4137 2014-11-28 Marek Polacek <polacek@redhat.com>
4138
4139 PR c/63862
4140 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4141 convert the right operand to integer type.
4142
4143 2014-11-25 Marek Polacek <polacek@redhat.com>
4144
4145 PR c/63877
4146 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4147 for inline functions.
4148
4149 2014-11-21 Jakub Jelinek <jakub@redhat.com>
4150
4151 PR target/63764
4152 * c-typeck.c (build_array_ref): Adjust
4153 convert_vector_to_pointer_for_subscript caller. If it returns true,
4154 call non_lvalue_loc on the result.
4155
4156 2014-11-11 Richard Biener <rguenther@suse.de>
4157
4158 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4159 to true.
4160
4161 2014-11-10 Andi Kleen <ak@linux.intel.com>
4162
4163 PR c/60804
4164 * c-parser.c (c_parser_statement_after_labels): Call
4165 check_no_cilk.
4166 (c_parser_if_statement): Dito.
4167 (c_parser_switch_statement): Dito.
4168 (c_parser_while_statement): Dito.
4169 (c_parser_do_statement): Dito.
4170 (c_parser_for_statement): Dito.
4171 * c-typeck.c (c_finish_loop): Dito.
4172
4173 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4174
4175 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4176 OPT_Wshift_count_overflow in the warnings.
4177
4178 2014-10-30 Marek Polacek <polacek@redhat.com>
4179
4180 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4181 print the stripped version as well, if they're not the same.
4182
4183 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4184
4185 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4186 machine_mode.
4187
4188 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
4189
4190 * c-decl.c: Adjust include files.
4191 * c-parser.c: Ditto.
4192
4193 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4194 Tom Tromey <tromey@redhat.com>
4195
4196 * c-tree.h (enum c_oracle_request): New.
4197 (c_binding_oracle_function): New typedef.
4198 (c_binding_oracle, c_pushtag, c_bind): Declare.
4199 * c-decl.c (c_binding_oracle): New global.
4200 (I_SYMBOL_CHECKED): New macro.
4201 (i_symbol_binding): New function.
4202 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4203 (I_TAG_CHECKED): New macro.
4204 (i_tag_binding): New function.
4205 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4206 (I_LABEL_CHECKED): New macro.
4207 (i_label_binding): New function.
4208 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4209 (c_print_identifier): Save and restore c_binding_oracle.
4210 (c_pushtag, c_bind): New functions.
4211
4212 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
4213
4214 * c-typeck.c: Adjust include files.
4215
4216 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4217
4218 PR c++/53061
4219 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4220 initialization here...
4221 (c_initialize_diagnostics): ... but here. Set defaults after
4222 building pretty-printer.
4223
4224 2014-10-23 Marek Polacek <polacek@redhat.com>
4225
4226 PR c/63626
4227 * c-decl.c (pop_scope): Don't print warning in external_scope.
4228
4229 2014-10-19 Marek Polacek <polacek@redhat.com>
4230
4231 PR c/63567
4232 * c-typeck.c (output_init_element): Allow initializing objects with
4233 static storage duration with compound literals even in C99 and add
4234 pedwarn for it.
4235
4236 2014-10-17 Marek Polacek <polacek@redhat.com>
4237
4238 PR c/63567
4239 * c-typeck.c (digest_init): Allow initializing objects with static
4240 storage duration with compound literals even in C99 and add pedwarn
4241 for it.
4242
4243 2014-10-17 Marek Polacek <polacek@redhat.com>
4244
4245 PR c/63543
4246 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4247 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4248 error multiple times. Print the type.
4249
4250 2014-10-17 Marek Polacek <polacek@redhat.com>
4251
4252 PR c/63549
4253 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4254 type.
4255
4256 2014-10-17 Marek Polacek <polacek@redhat.com>
4257
4258 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4259 (start_function): Use OPT_Wimplicit_int instead of 0.
4260 (store_parm_decls_oldstyle): Likewise.
4261
4262 2014-10-17 Alan Modra <amodra@gmail.com>
4263
4264 PR middle-end/61848
4265 * c-decl.c (merge_decls): Don't merge section name or tls model
4266 to newdecl symtab node, instead merge to olddecl. Override
4267 existing olddecl section name. Set tls_model for all thread-local
4268 vars, not just OMP thread-private ones. Remove incorrect comment.
4269
4270 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
4271
4272 * c-decl.c: Adjust include files.
4273
4274 2014-10-14 DJ Delorie <dj@redhat.com>
4275
4276 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4277 (c_token_starts_typename): Check all __intN, not just __int128.
4278 (c_token_starts_declspecs): Likewise.
4279 (c_parser_declspecs): Likewise.
4280 (c_parser_attribute_any_word): Likewise.
4281 (c_parser_objc_selector): Likewise.
4282 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4283 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4284 is specified.
4285 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4286 __int128.
4287 (finish_declspecs): Likewise.
4288
4289 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4290
4291 * c-parser.c (c_parser_all_labels): New function to replace
4292 the duplicate code.
4293 (c_parser_statement): Call the new function.
4294
4295 2014-10-09 Marek Polacek <polacek@redhat.com>
4296
4297 PR c/63480
4298 * c-typeck.c (pop_init_level): Don't warn about initializing
4299 with { }.
4300
4301 2014-10-07 Marek Polacek <polacek@redhat.com>
4302
4303 PR c/59717
4304 * c-decl.c (header_for_builtin_fn): New function.
4305 (implicitly_declare): Suggest which header to include.
4306
4307 2014-10-07 Marek Polacek <polacek@redhat.com>
4308
4309 * c-convert.c (convert): Use error_operand_p.
4310 * c-typeck.c (require_complete_type): Likewise.
4311 (really_atomic_lvalue): Likewise.
4312 (digest_init): Likewise.
4313 (handle_omp_array_sections_1): Likewise.
4314
4315 2014-10-03 Marek Polacek <polacek@redhat.com>
4316
4317 PR c/63453
4318 * c-decl.c (pop_scope): Don't warn about "inline function declared
4319 but never defined" for functions marked with gnu_inline attribute.
4320
4321 2014-09-25 Jakub Jelinek <jakub@redhat.com>
4322
4323 PR c++/63249
4324 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4325 on low_bound and length.
4326
4327 2014-09-24 Marek Polacek <polacek@redhat.com>
4328
4329 PR c/61405
4330 PR c/53874
4331 * c-parser.c: Don't define CPP_KEYWORD.
4332 (c_parser_switch_statement): Pass original type to c_finish_case.
4333 * c-tree.h (c_finish_case): Update declaration.
4334 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4335 conditionally to c_do_switch_warnings.
4336
4337 2014-09-03 Marek Polacek <polacek@redhat.com>
4338
4339 PR c/62024
4340 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4341 conversions.
4342
4343 2014-09-02 Jakub Jelinek <jakub@redhat.com>
4344 Balaji V. Iyer <balaji.v.iyer@intel.com>
4345 Igor Zamyatin <igor.zamyatin@intel.com>
4346
4347 * c-parser.c (c_parser_cilk_for): New function.
4348 (c_parser_cilk_grainsize): Likewise.
4349 (c_get_temp_regvar): Likewise.
4350 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4351 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4352 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4353 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4354 case.
4355
4356 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4357
4358 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4359 with using HOST_WIDE_INT without truncation to 'int'
4360
4361 2014-08-22 Marek Polacek <polacek@redhat.com>
4362
4363 PR c++/62199
4364 * c-typeck.c (parser_build_binary_op): Adjust call to
4365 warn_logical_not_parentheses.
4366
4367 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4368
4369 PR other/62008
4370 * c-parser.c (c_parser_array_notation): Check for correct
4371 type of an array added.
4372
4373 2014-08-19 Marek Polacek <polacek@redhat.com>
4374
4375 PR c++/62153
4376 * c-typeck.c (build_binary_op): If either operand of a comparison
4377 is a boolean expression, call maybe_warn_bool_compare.
4378
4379 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4380
4381 PR c/45584
4382 * c-typeck.c (build_c_cast): Do a conversion even when the
4383 TYPE_MAIN_VARIANTs are the same.
4384
4385 2014-08-19 Marek Polacek <polacek@redhat.com>
4386
4387 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4388 pedwarn_c99 instead of pedwarn.
4389 (grokfield): Likewise.
4390 (warn_defaults_to): New function.
4391 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4392 Unconditionally call pedwarn_c99 instead of pedwarn.
4393 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4394 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4395 check flag_isoc11 before.
4396 * c-errors.c (pedwarn_c99): Change the return type to bool.
4397 Handle -Wc99-c11-compat.
4398 * c-parser.c (disable_extension_diagnostics): Handle
4399 warn_c99_c11_compat.
4400 (restore_extension_diagnostics): Likewise.
4401 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4402 instead of pedwarn, don't check flag_isoc11 before.
4403 (c_parser_declspecs): Likewise.
4404 (c_parser_alignas_specifier): Likewise.
4405 (c_parser_alignof_expression): Likewise.
4406 (c_parser_generic_selection): Likewise.
4407 * c-tree.h (pedwarn_c99): Update declaration.
4408 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4409 of pedwarn_c99.
4410
4411 2014-08-19 Marek Polacek <polacek@redhat.com>
4412
4413 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4414 to pedwarn_c90.
4415 * c-errors.c: Include "opts.h".
4416 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4417 * c-parser.c (disable_extension_diagnostics): Handle negative value
4418 of warn_c90_c99_compat, too.
4419 (restore_extension_diagnostics): Likewise.
4420 (c_parser_compound_statement_nostart): Pass
4421 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4422
4423 2014-08-12 Marek Polacek <polacek@redhat.com>
4424
4425 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4426 Add pedwarn.
4427 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4428 Likewise.
4429 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4430
4431 2014-08-10 Marek Polacek <polacek@redhat.com>
4432
4433 PR c/51849
4434 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4435 Call pedwarn_c90 instead of pedwarn.
4436 (check_bitfield_type_and_width): Likewise.
4437 (declspecs_add_qual): Likewise.
4438 (declspecs_add_type): Likewise.
4439 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4440 Adjust to only call pedwarn_c90.
4441 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4442 pedwarn_c90 instead of pedwarn.
4443 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4444 * c-parser.c (disable_extension_diagnostics): Handle
4445 warn_c90_c99_compat.
4446 (restore_extension_diagnostics): Likewise.
4447 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4448 pedwarn_c90 instead of pedwarn.
4449 (c_parser_initelt): Likewise.
4450 (c_parser_postfix_expression): Likewise.
4451 (c_parser_postfix_expression_after_paren_type): Likewise.
4452 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4453 * c-tree.h: Fix formatting.
4454 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4455 pedwarn_c90 instead of pedwarn.
4456
4457 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4458
4459 * c-typeck.c: Remove include of pointer-set.h.
4460
4461 2014-08-07 Marek Polacek <polacek@redhat.com>
4462
4463 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4464
4465 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4466
4467 * c-typeck.c: Use hash_map instead of pointer_map.
4468
4469 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4470
4471 * c-decl.c: Use hash_set instead of pointer_set.
4472
4473 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4474
4475 PR middle-end/61455
4476 * c-array-notation.c (expand_array_notations): Handling
4477 of DECL_EXPR added.
4478
4479 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
4480
4481 PR c++/60517
4482 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4483 a local variable.
4484
4485 2014-07-30 Tom Tromey <tromey@redhat.com>
4486
4487 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4488 field.
4489 (really_start_incremental_init, push_init_level): Initialize
4490 designator_depth.
4491 (pop_init_level): Set global designator_depth.
4492 (process_init_element): Check for designated_init attribute.
4493
4494 2014-07-20 Marek Polacek <polacek@redhat.com>
4495
4496 PR c/61852
4497 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4498 (implicitly_declare): Pass location to implicit_decl_warning.
4499
4500 2014-07-14 Jakub Jelinek <jakub@redhat.com>
4501
4502 PR middle-end/61294
4503 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4504 If non-NULL, call c_parser_check_literal_zero.
4505 (c_parser_check_literal_zero): New function.
4506 (c_parser_postfix_expression_after_primary): Adjust
4507 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4508
4509 2014-07-06 Marek Polacek <polacek@redhat.com>
4510
4511 PR c/6940
4512 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4513 * c-tree.h (C_ARRAY_PARAMETER): Define.
4514 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4515 function parameter.
4516
4517 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4518 Chen Gang <gang.chen.5i5j@gmail.com>
4519
4520 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4521 releasing symbol.
4522
4523 2014-07-01 Marek Polacek <polacek@redhat.com>
4524
4525 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4526 instead of 0 to WARN_FOR_ASSIGNMENT.
4527
4528 2014-07-01 Marek Polacek <polacek@redhat.com>
4529
4530 PR c/58286
4531 * c-typeck.c (convert_for_assignment): Pass
4532 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4533
4534 2014-06-30 Marek Polacek <polacek@redhat.com>
4535
4536 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4537 has no_sanitize_undefined attribute.
4538
4539 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4540
4541 PR middle-end/57541
4542 * c-array-notation.c (fix_builtin_array_notation_fn):
4543 Check for 0 arguments in builtin call. Check that bultin argument is
4544 correct.
4545 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4546 index.
4547
4548 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4549
4550 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4551 qualifiers in __auto_type for atomic types.
4552 (c_parser_typeof_specifier): Discard all type qualifiers in
4553 __typeof__ for atomic types.
4554
4555 2014-06-25 Marek Polacek <polacek@redhat.com>
4556
4557 PR c/61162
4558 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4559 the return expression to c_finish_return.
4560
4561 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4562
4563 * c-typeck.c (c_finish_omp_clauses): Make sure
4564 OMP_CLAUSE_LINEAR_STEP has correct type.
4565
4566 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4567
4568 * c-decl.c: Adjust.
4569
4570 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4571
4572 * c-parser.c (c_parser_omp_for_loop): For
4573 #pragma omp parallel for simd move lastprivate clause from parallel
4574 to for rather than simd.
4575
4576 2014-06-23 Marek Polacek <polacek@redhat.com>
4577
4578 * c-typeck.c (parser_build_binary_op): Don't call
4579 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4580
4581 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4582
4583 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4584 * c-decl.c (merge_decls): Likewise.
4585
4586 2014-06-09 Marek Polacek <polacek@redhat.com>
4587
4588 PR c/36446
4589 * c-typeck.c (error_init): Call inform instead of error_at.
4590 (pedwarn_init): Call inform instead of pedwarn.
4591 (warning_init): Call inform instead of warning_at.
4592
4593 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4594
4595 * c-decl.c (merge_decls): Use set_decl_section_name.
4596 (duplicate_decls): Remove node if it exists.
4597
4598 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4599
4600 PR c/53119
4601 * c-typeck.c (push_init_level, process_init_element,
4602 pop_init_level): Correct check for zero initialization, move
4603 missing brace warning to respect zero initialization.
4604
4605 2014-06-05 Marek Polacek <polacek@redhat.com>
4606
4607 PR c/56724
4608 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4609
4610 2014-06-05 Marek Polacek <polacek@redhat.com>
4611
4612 PR c/49706
4613 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4614 on the left hand side operand of a comparison.
4615
4616 2014-06-05 Marek Polacek <polacek@redhat.com>
4617
4618 PR c/48062
4619 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4620 Print note only if the warning was printed.
4621
4622 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4623
4624 PR c/58942
4625 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4626 with a pointer.
4627
4628 2014-06-03 Marek Polacek <polacek@redhat.com>
4629
4630 PR c/60439
4631 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4632 c_start_case.
4633 * c-tree.h (c_start_case): Update.
4634 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4635 switch condition has boolean value.
4636
4637 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4638
4639 * c-decl.c: Include builtins.h.
4640 * c-parser.c: Likewise.
4641
4642 2014-05-27 Marek Polacek <polacek@redhat.com>
4643
4644 PR c/56724
4645 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4646 error and warning calls to error_at and warning_at. Pass location of
4647 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4648 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4649 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4650
4651 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4652
4653 PR c/61191
4654 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4655 function parameters.
4656
4657 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4658
4659 * c-decl.c (merge_decls): Preserve symtab node pointers.
4660 (duplicate_decls): Free new decl.
4661
4662 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4663
4664 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4665 initialization.
4666
4667 * c-parser.c (c_parser_omp_target): Return bool values.
4668
4669 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4670
4671 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4672 num_teams_loc variable to num_thread_limit_loc.
4673
4674 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4675
4676 * c-array-notation.c (expand_array_notations): Use void_node
4677 instead of void_zero_node.
4678
4679 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4680
4681 * c-decl.c (finish_struct): Adjust.
4682 (finish_enum): Likewise.
4683 (bind): Adjust.
4684 (record_inline_static): Likewise.
4685 (push_scope): Likewise.
4686 (make_label): Likewise.
4687 (lookup_label_for_goto): Likewise.
4688 (finish_struct): Likewise.
4689 (finish_enum): Likewise.
4690 (store_parm_decls): Likewise.
4691 (c_push_function_context): Likewise.
4692 * c-lang.h: Remove usage of variable_size gty attribute.
4693 * c-parser.c (c_parse_init): Adjust.
4694 (c_parse_file): Likewise.
4695
4696 2014-05-13 Marek Polacek <polacek@redhat.com>
4697
4698 PR c/61162
4699 * c-typeck.c (convert_for_assignment): Pass location to
4700 WARN_FOR_ASSIGNMENT instead of input_location.
4701
4702 2014-05-10 Marek Polacek <polacek@redhat.com>
4703
4704 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4705 maybe_warn_string_init.
4706 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4707 maybe_warn_string_init.
4708 * c-tree.h (maybe_warn_string_init): Update declaration.
4709 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4710 Call pedwarn_init with loc instead of with input_location.
4711 (digest_init): Pass init_loc to maybe_warn_string_init.
4712 (pop_init_level): Call pedwarn_init with loc instead of with
4713 input_location.
4714 (set_init_index): Likewise.
4715 (process_init_element): Likewise.
4716
4717 2014-05-09 Marek Polacek <polacek@redhat.com>
4718
4719 PR c/61096
4720 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4721 (c_parser_initelt): Pass location to set_init_label. Pass array index
4722 location to set_init_index.
4723 * c-tree.h (push_init_level): Update declaration.
4724 (pop_init_level): Likewise.
4725 (set_init_index): Likewise.
4726 (set_init_label): Likewise.
4727 * c-typeck.c (error_init): Add location parameter. Call error_at
4728 instead of error.
4729 (digest_init): Pass init_loc to error_init.
4730 (really_start_incremental_init):
4731 (push_init_level): Add location parameter. Pass loc to pop_init_level
4732 and error_init.
4733 (pop_init_level): Likewise.
4734 (set_designator): Add location parameter. Pass loc to pop_init_level,
4735 push_init_level, and error_init.
4736 (set_init_index): Add location parameter. Pass loc to error_init and
4737 set_designator.
4738 (set_init_label): Likewise.
4739 (output_init_element): Pass loc to error_init.
4740 (process_init_element): Pass loc to error_init, pop_init_level,
4741 pedwarn_init, and push_init_level.
4742
4743 2014-05-09 Marek Polacek <polacek@redhat.com>
4744
4745 PR c/50459
4746 * c-parser.c (c_parser_attributes): Parse the arguments as an
4747 expression-list if the attribute takes identifier.
4748
4749 2014-05-08 Marek Polacek <polacek@redhat.com>
4750
4751 PR c/61053
4752 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4753 TYPE_ALIGN_UNIT.
4754
4755 2014-05-08 Marek Polacek <polacek@redhat.com>
4756
4757 PR c/61077
4758 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4759 of main.
4760
4761 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4762 Mike Stump <mikestump@comcast.net>
4763 Richard Sandiford <rdsandiford@googlemail.com>
4764
4765 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4766 (finish_enum): Use wide-int interfaces.
4767 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4768 * c-typeck.c (build_c_cast): Likewise.
4769 (set_nonincremental_init_from_string): Likewise.
4770 (c_tree_equal): Likewise.
4771
4772 2014-05-02 Marek Polacek <polacek@redhat.com>
4773
4774 PR c/25801
4775 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4776 Return size_one_node when the type is not complete.
4777 (pointer_diff): Remove comment.
4778 (build_unary_op): Improve error messages.
4779
4780 2014-05-02 Marek Polacek <polacek@redhat.com>
4781
4782 * c-typeck.c (c_finish_return): Separate warning_at calls.
4783
4784 2014-05-02 Marek Polacek <polacek@redhat.com>
4785
4786 * c-tree.h (error_init): Remove declaration.
4787 (pedwarn_init): Likewise.
4788 * c-typeck.c (error_init): Make static and move above.
4789 (pedwarn_init): Likewise.
4790 (warning_init): Move above.
4791 (maybe_warn_string_init): Likewise.
4792
4793 2014-05-01 Jeff Law <law@redhat.com>
4794
4795 Revert:
4796
4797 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4798 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4799 avoid goto.
4800
4801 2014-05-02 Marek Polacek <polacek@redhat.com>
4802
4803 PR c/60784
4804 * c-typeck.c (push_init_level): Set constructor_designated to
4805 p->designated for structures.
4806
4807 2014-05-01 Marek Polacek <polacek@redhat.com>
4808
4809 PR c/60915
4810 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4811 function-definition has an attribute after the declarator.
4812
4813 2014-05-01 Marek Polacek <polacek@redhat.com>
4814
4815 PR c/60257
4816 * c-typeck.c (warning_init): Add location_t parameter. Call
4817 warning_at instead of warning.
4818 (push_init_level): Pass input_location to warning_init.
4819 (add_pending_init): Add location_t parameter. Pass loc to
4820 warning_init.
4821 (set_nonincremental_init): Pass input_location to add_pending_init.
4822 (set_nonincremental_init_from_string): Likewise.
4823 (output_init_element): Pass loc to warning_init and to
4824 add_pending_init.
4825
4826 2014-05-01 Marek Polacek <polacek@redhat.com>
4827
4828 PR c/43395
4829 * c-typeck.c (c_finish_return): Distinguish between label and variable
4830 when warning about returning local address.
4831
4832 2014-05-01 Marek Polacek <polacek@redhat.com>
4833
4834 PR c/29467
4835 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4836 in C89 mode.
4837
4838 2014-05-01 Marek Polacek <polacek@redhat.com>
4839
4840 PR c/43245
4841 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4842 instead of 0 to WARN_FOR_QUALIFIERS.
4843
4844 2014-05-01 Marek Polacek <polacek@redhat.com>
4845
4846 PR c/56989
4847 * c-typeck.c (default_conversion): Use better location for
4848 error call.
4849
4850 2014-04-30 Marek Polacek <polacek@redhat.com>
4851
4852 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4853 also when SANITIZE_FLOAT_DIVIDE is on.
4854
4855 2014-04-30 Marek Polacek <polacek@redhat.com>
4856
4857 PR c/60139
4858 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4859 and pedwarn_init. Use loc insted of input_location.
4860
4861 2014-04-30 Marek Polacek <polacek@redhat.com>
4862
4863 PR c/60351
4864 * c-typeck.c (build_binary_op): Use location when warning about
4865 shift count.
4866
4867 2014-04-25 Marek Polacek <polacek@redhat.com>
4868
4869 PR c/18079
4870 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4871 always_inline/noinline and hot/cold attributes.
4872
4873 2014-04-25 Marek Polacek <polacek@redhat.com>
4874
4875 PR c/60114
4876 * c-parser.c (c_parser_initelt): Pass input_location to
4877 process_init_element.
4878 (c_parser_initval): Pass loc to process_init_element.
4879 * c-tree.h (process_init_element): Adjust declaration.
4880 * c-typeck.c (push_init_level): Pass input_location to
4881 process_init_element.
4882 (pop_init_level): Likewise.
4883 (set_designator): Likewise.
4884 (output_init_element): Add location_t parameter. Pass loc to
4885 digest_init.
4886 (output_pending_init_elements): Pass input_location to
4887 output_init_element.
4888 (process_init_element): Add location_t parameter. Pass loc to
4889 output_init_element.
4890
4891 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4892
4893 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4894 atomic-clause, allow comma in between atomic-clause and
4895 seq_cst.
4896
4897 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4898
4899 PR c/59073
4900 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4901 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4902
4903 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4904
4905 PR middle-end/60469
4906 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4907 create_tmp_var instead build_decl for creating temps.
4908 (build_array_notation_expr): Likewise.
4909 (fix_conditional_array_notations_1): Likewise.
4910 (fix_array_notation_expr): Likewise.
4911 (fix_array_notation_call_expr): Likewise.
4912
4913 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4914
4915 PR c++/60689
4916 * c-tree.h (c_build_function_call_vec): New prototype.
4917 * c-typeck.c (build_function_call_vec): Don't call
4918 resolve_overloaded_builtin here.
4919 (c_build_function_call_vec): New wrapper function around
4920 build_function_call_vec. Call resolve_overloaded_builtin here.
4921 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4922 Call c_build_function_call_vec instead of build_function_call_vec.
4923 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4924 * c-decl.c (finish_decl): Likewise.
4925
4926 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4927
4928 PR c/55383
4929 * c-typeck.c: Use correct format string in cast-qual warning
4930
4931 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4932
4933 * c-decl.c (c_decl_attributes): Use
4934 lang_hooks.types.omp_mappable_type.
4935 * c-typeck.c (c_finish_omp_clauses): Likewise.
4936
4937 2014-03-06 Marek Polacek <polacek@redhat.com>
4938
4939 PR c/60197
4940 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4941 of checking tree code.
4942
4943 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4944
4945 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4946 (c_parser_parameter_declaration): Likewise.
4947
4948 2014-02-19 Marek Polacek <polacek@redhat.com>
4949
4950 PR c/60195
4951 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4952 Call mark_exp_read on exp.value.
4953 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4954 TREE_ADDRESSABLE on old instead of val.
4955 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4956
4957 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4958
4959 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4960 C_EXPR_APPEND by vec_safe_push.
4961 * c-tree.h (C_EXPR_APPEND): Remove.
4962
4963 2014-01-31 Marek Polacek <polacek@redhat.com>
4964
4965 PR c/59963
4966 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4967 build_function_call_vec.
4968 (build_function_call): Likewise.
4969 (build_atomic_assign): Likewise.
4970 (build_function_call_vec): Add arg_loc parameter. Use it.
4971 (convert_arguments): Likewise.
4972 (convert_for_assignment): Rename rhs_loc to expr_loc.
4973 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4974 (c_parser_objc_keywordexpr): Likewise.
4975 (c_parser_postfix_expression_after_primary): Call
4976 build_function_call_vec with expr_loc rather than op_loc.
4977 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4978 build_function_call_vec.
4979 (c_parser_expr_list): Add locations parameter. Fill it with locations
4980 of function arguments.
4981 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4982
4983 2014-01-30 Marek Polacek <polacek@redhat.com>
4984
4985 PR c/59940
4986 * c-typeck.c (build_function_call_vec): Use loc parameter.
4987 (convert_arguments): Add location parameter. Use it.
4988 (ep_convert_and_check): Likewise.
4989 (build_atomic_assign): Adjust convert_for_assignment call.
4990 (build_modify_expr): Likewise.
4991 (digest_init): Likewise.
4992 (c_finish_return): Likewise.
4993 (build_conditional_expr): Adjust ep_convert_and_check calls.
4994 (convert_for_assignment): Add rhs_loc parameter. Use it.
4995 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4996 calls.
4997
4998 2014-01-30 Richard Biener <rguenther@suse.de>
4999
5000 PR c/59905
5001 * c-typeck.c (build_function_call_vec): Do not replace calls
5002 to a function via an incompatible type with a runtime abort.
5003
5004 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5005
5006 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5007 flag_enable_cilkplus with flag_cilkplus.
5008 (c_parser_direct_declarator_inner): Likewise.
5009 (c_parser_attribute_any_word): Likewise.
5010 (c_parser_attributes): Likewise.
5011 (c_parser_compound_statement): Likewise.
5012 (c_parser_statement_after_labels): Likewise.
5013 (c_parser_if_statement): Likewise.
5014 (c_parser_switch_statement): Likewise.
5015 (c_parser_do_statement): Likewise.
5016 (c_parser_for_statement): Likewise.
5017 (c_parser_unary_expression): Likewise.
5018 (c_parser_postfix_expression): Likewise.
5019 (c_parser_postfix_expression_after_primary): Likewise.
5020 (c_parser_postfix_expression_after_primary): Likewise.
5021 (c_parser_omp_clause_name): Likewise.
5022 (c_finish_omp_declare_simd): Likewise.
5023 (c_parser_cilk_verify_simd): Likewise.
5024 * c-typeck.c (build_array_ref): Likewise.
5025 (build_function_call_vec): Likewise.
5026 (convert_arguments): Likewise.
5027 (build_compound_expr): Likewise.
5028 (c_finish_return): Likewise.
5029 (c_finish_if_stmt): Likewise.
5030 (c_finish_loop): Likewise.
5031 (build_binary_op): Likewise.
5032
5033 2014-01-23 Marek Polacek <polacek@redhat.com>
5034
5035 PR c/59846
5036 * c-typeck.c (parser_build_binary_op): Use location instead of
5037 input_location.
5038 (build_binary_op): Pass location to shorten_compare.
5039
5040 2014-01-23 Marek Polacek <polacek@redhat.com>
5041
5042 PR c/58346
5043 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5044 an empty aggregate.
5045
5046 2014-01-23 Marek Polacek <polacek@redhat.com>
5047
5048 PR c/59871
5049 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5050 of a comma expression.
5051 (emit_side_effect_warnings): Likewise.
5052
5053 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5054
5055 PR c/59825
5056 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5057 function to use walk_tree and moved a lot of its functionality to
5058 expand_array_notations.
5059 (expand_array_notations): New function.
5060
5061 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5062
5063 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5064 attribute an attribute without value.
5065
5066 2014-01-23 Jakub Jelinek <jakub@redhat.com>
5067
5068 PR middle-end/58809
5069 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5070 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5071
5072 2014-01-22 Marek Polacek <polacek@redhat.com>
5073
5074 PR c/59891
5075 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5076 of remove_c_maybe_const_expr on op1 and op2.
5077
5078 2014-01-15 Jakub Jelinek <jakub@redhat.com>
5079
5080 PR c/58943
5081 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5082 effects, preevaluate rhs using SAVE_EXPR first.
5083
5084 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5085
5086 PR c++/59631
5087 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5088 statements with if-elseif statements.
5089
5090 2014-01-06 Marek Polacek <polacek@redhat.com>
5091
5092 PR c/57773
5093 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5094 defined bit-field types only in ISO C.
5095
5096 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5097
5098 Update copyright years
5099
5100 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5101
5102 * c-array-notation.c: Use the standard form for the copyright notice.
5103
5104 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5105
5106 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5107 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5108 field in parser is not empty. If not-empty, call the function
5109 c_parser_finish_omp_declare_simd.
5110 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5111 between SIMD-enabled functions and #pragma simd. Added new parameter.
5112 (c_parser_cilk_all_clauses): Modified the usage of the function
5113 c_parser_cilk_clause_vectorlength as mentioned above.
5114 (c_parser_cilk_simd_fn_vector_attrs): New function.
5115 (c_finish_cilk_simd_fn_tokens): Likewise.
5116 (is_cilkplus_vector_p): Likewise.
5117 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5118 "nomask," and "mask" strings in clause name.
5119 (c_parser_omp_all_clauses): Added 3 new case statements:
5120 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5121 PRAGMA_CILK_CLAUSE_NOMASK.
5122 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5123 check for vector attribute and if so call the function
5124 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5125 called the function c_finish_cilk_simd_fn_tokens.
5126 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5127 parser field is non-empty. If so, parse them as you would parse
5128 the omp declare simd pragma.
5129 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5130 Added a check when step is a parameter and flag it as error.
5131 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5132 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5133 pragma_omp_clause.
5134
5135 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5136
5137 * c-parser.c (c_parser_omp_parallel): Fix description.
5138
5139 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5140
5141 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5142 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5143 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5144 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5145
5146 2013-12-04 Joseph Myers <joseph@codesourcery.com>
5147
5148 PR c/52023
5149 * c-parser.c (c_parser_alignas_specifier): Use
5150 c_sizeof_or_alignof_type instead of c_alignof.
5151 (c_parser_alignof_expression): Likewise, with min_alignof
5152 parameter depending on alignof spelling used.
5153
5154 2013-12-04 Marek Polacek <polacek@redhat.com>
5155
5156 PR c/54113
5157 * c-decl.c (start_function): Don't warn for missing prototype for
5158 inline functions.
5159
5160 2013-12-03 Marek Polacek <polacek@redhat.com>
5161
5162 PR c/59351
5163 * c-decl.c (build_compound_literal): Allow compound literals with
5164 empty initial value.
5165
5166 2013-12-02 Joseph Myers <joseph@codesourcery.com>
5167
5168 PR c/58235
5169 * c-typeck.c (build_modify_expr): Diagnose assignment to
5170 expression with array type.
5171
5172 2013-11-29 Joseph Myers <joseph@codesourcery.com>
5173
5174 PR c/42262
5175 * c-typeck.c (process_init_element): Do not treat a string as
5176 initializing a whole array when used with a designator for an
5177 individual element.
5178
5179 2013-11-29 Joseph Myers <joseph@codesourcery.com>
5180
5181 PR c/57574
5182 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5183 an inline function following a static declaration.
5184
5185 2013-11-28 Jakub Jelinek <jakub@redhat.com>
5186
5187 PR c/59310
5188 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5189 to p_name before calling c_parser_omp_teams instead of after.
5190 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5191 argument. Remove unused p_name variable.
5192
5193 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
5194 Jakub Jelinek <jakub@redhat.com>
5195
5196 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5197 external_scope is NULL.
5198
5199 2013-11-27 Tom de Vries <tom@codesourcery.com>
5200 Marc Glisse <marc.glisse@inria.fr>
5201
5202 PR c++/59032
5203 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5204
5205 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
5206
5207 * c-typeck.c: Add required include files from gimple.h.
5208
5209 2013-11-22 David Malcolm <dmalcolm@redhat.com>
5210
5211 * c-decl.c (define_label, shadow_tag_warned)
5212 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5213 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5214 (declspecs_add_type): Remove use of in_system_header macro.
5215 * c-parser.c (c_parser_unary_expression): Likewise.
5216 * c-typeck.c (store_init_value, process_init_element)
5217 (c_start_case): Likewise.
5218
5219 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5220 macro.
5221
5222 * c-parser.c (c_parser_set_source_position_from_token): Remove
5223 reference to in_system_header from comment.
5224
5225 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5226
5227 * c-decl.c (grokdeclarator): Update comment to refer to
5228 tree_to_[su]hwi rather than tree_low_cst.
5229
5230 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5231
5232 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5233 tree_to_uhwi throughout.
5234
5235 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5236
5237 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5238 throughout.
5239
5240 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5241
5242 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5243 throughout.
5244
5245 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
5246
5247 * c-parser.c (c_parser_cilk_simd): New.
5248 (c_parser_cilk_verify_simd): New.
5249 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5250 (c_parser_omp_for_loop): Add case for NE_EXPR.
5251 Set c_break_label for CILK_SIMD.
5252 (c_parser_cilk_clause_vectorlength): New.
5253 (c_parser_cilk_clause_linear): New.
5254 (c_parser_cilk_clause_name): New.
5255 (c_parser_cilk_all_clauses): New.
5256 * c-typeck.c (build_unary_op): Pass location argument to
5257 readonly_error.
5258 (build_modify_expr): Same.
5259 (build_asm_expr): Same.
5260 (c_finish_bc_stmt): Error on break/continue in loops.
5261
5262 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
5263
5264 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5265
5266 2013-11-14 Diego Novillo <dnovillo@google.com>
5267
5268 * c-decl.c: Include print-tree.h.
5269 Include stor-layout.h.
5270 Include varasm.h.
5271 Include attribs.h.
5272 Include stringpool.h.
5273 * c-lang.c: Include fold-const.h.
5274 * c-parser.c: Include stringpool.h.
5275 Include attribs.h.
5276 Include stor-layout.h.
5277 Include varasm.h.
5278 Include trans-mem.h.
5279 * c-typeck.c: Include stor-layout.h.
5280 Include trans-mem.h.
5281 Include varasm.h.
5282 Include stmt.h.
5283
5284 2013-11-13 Joseph Myers <joseph@codesourcery.com>
5285
5286 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5287 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5288 __auto_type.
5289 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5290 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5291 RID_AUTO_TYPE.
5292 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5293 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5294 (c_parser_declarator, c_parser_direct_declarator_inner)
5295 (c_parser_parameter_declaration, c_parser_type_name): All callers
5296 changed.
5297 (c_parser_declaration_or_fndef): Handle declarations with type
5298 determined from the initializer.
5299
5300 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
5301
5302 * c-typeck.c: Include gimplify.h.
5303
5304 2013-11-12 Joseph Myers <joseph@codesourcery.com>
5305
5306 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5307 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5308 comment.
5309 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5310 or _Thread_local as appropriate in diagnostics.
5311 (build_null_declspecs): Initialize ret->thread_gnu_p.
5312 (declspecs_add_scspec): Handle either __thread or _Thread_local
5313 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5314 pedantic. Do not disallow _Thread_local extern and _Thread_local
5315 static.
5316
5317 2013-11-07 Joseph Myers <joseph@codesourcery.com>
5318 Andrew MacLeod <amacleod@redhat.com>
5319
5320 * c-aux-info.c (gen_type): Handle atomic qualifier.
5321 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5322 qualifiers when compating types.
5323 (shadow_tag_warned): Handle atomic_p in declspecs.
5324 (quals_from_declspecs): Likewise.
5325 (start_decl): Use c_type_promotes_to when promoting argument
5326 types.
5327 (grokdeclarator): Handle _Atomic.
5328 (get_parm_info): Diagnose any qualifier on "void" as only
5329 parameter.
5330 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5331 comparing types. Use c_type_promotes_to when promoting argument
5332 types.
5333 (finish_function): Use c_type_promotes_to when promoting argument
5334 types.
5335 (build_null_declspecs): Handle atomic_p in declspecs.
5336 (declspecs_add_qual): Handle RID_ATOMIC.
5337 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5338 (c_token_starts_declspecs): Handle RID_ATOMIC.
5339 (c_parser_declspecs): Handle atomic type specifiers and
5340 qualifiers.
5341 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5342 from types of expressions with atomic type.
5343 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5344 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5345 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5346 (c_parser_statement_after_labels, c_parser_switch_statement)
5347 (c_parser_for_statement, c_parser_expr_no_commas)
5348 (c_parser_conditional_expression, c_parser_binary_expression)
5349 (c_parser_cast_expression, c_parser_unary_expression)
5350 (c_parser_postfix_expression)
5351 (c_parser_postfix_expression_after_primary, c_parser_expression):
5352 Use convert_lvalue_to_rvalue.
5353 (c_parser_expression_conv, c_parser_expr_list): Document
5354 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5355 (c_parser_objc_synchronized_statement): Use
5356 convert_lvalue_to_rvalue.
5357 (c_parser_objc_selector): Handle RID_ATOMIC.
5358 (c_parser_objc_receiver, c_parser_array_notation): Use
5359 convert_lvalue_to_rvalue.
5360 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5361 _Atomic (type-name).
5362 (struct c_declspecs): Add atomic_p field.
5363 (convert_lvalue_to_rvalue): Declare.
5364 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5365 corresponding atomic types.
5366 (qualify_type): Don't add _Atomic qualifiers from second argument.
5367 (comp_target_types): Do not allow _Atomic mismatches.
5368 (type_lists_compatible_p): Do not remove atomic qualifiers when
5369 comparing types.
5370 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5371 (build_atomic_assign): New functions.
5372 (build_unary_op): Use build_atomic_assign for atomic increment and
5373 decrement.
5374 (build_conditional_expr): Do not treat _Atomic void as a qualified
5375 version of void.
5376 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5377 (find_anonymous_field_with_type, convert_to_anonymous_field)
5378 (convert_for_assignment): Do not remove atomic qualifiers when
5379 comparing types.
5380 (digest_init): Do not accept initialization of arrays of atomic
5381 elements by string constants.
5382 (build_asm_expr): Use convert_lvalue_to_rvalue.
5383 (build_binary_op): Do not treat _Atomic void as a qualified
5384 version of void.
5385
5386 2013-11-06 DJ Delorie <dj@redhat.com>
5387
5388 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5389 both explicit and builtin, print the location of the explicit one.
5390
5391 2013-11-05 Tobias Burnus <burnus@net-b.de>
5392
5393 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5394 c_parser_omp_distribute, c_parser_omp_teams,
5395 c_parser_omp_target, c_parser_omp_declare): Handle
5396 -fopenmp-simd.
5397
5398 2013-11-03 Marek Polacek <polacek@redhat.com>
5399
5400 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5401
5402 2013-11-01 Jakub Jelinek <jakub@redhat.com>
5403
5404 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5405 check_dup_generic at the end, unless remove is true.
5406 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5407 remove = true;.
5408 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5409
5410 2013-10-31 Jakub Jelinek <jakub@redhat.com>
5411
5412 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5413 with decl that is not pointer nor array.
5414
5415 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5416
5417 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5418 a spawning function is found.
5419 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5420 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5421 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5422 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5423 case.
5424 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5425 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5426 expr.
5427 (c_finish_return): Added a check to reject _Cilk_spawn in return
5428 expression.
5429 (build_cilk_spawn): New function.
5430 (build_cilk_sync): Likewise.
5431 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5432
5433 2013-10-27 Tobias Burnus <burnus@net-b.de>
5434
5435 PR other/33426
5436 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5437 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5438 (c_parser_statement_after_labels): Update calls.
5439
5440 2013-10-24 Tobias Burnus <burnus@net-b.de>
5441
5442 PR other/33426
5443 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5444 Handle PRAGMA_IVDEP.
5445 (c_parser_statement_after_labels): Update call.
5446
5447 2013-10-24 Marek Polacek <polacek@redhat.com>
5448
5449 * c-parser.c (c_parser_struct_declaration): Add a comment.
5450 (c_parser_declarator): Don't allow _Alignas here.
5451
5452 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
5453
5454 * c-parser.c: Include omp-low.h.
5455 * c-typeck.c: Likewise.
5456
5457 2013-10-17 Marek Polacek <polacek@redhat.com>
5458
5459 PR c/58267
5460 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5461 Document syntax of the array-declarator.
5462 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5463 are not permitted.
5464 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5465 (c_parser_struct_declaration): Likewise.
5466 (c_parser_declarator): Likewise.
5467 (c_parser_direct_declarator_inner): Likewise.
5468 (c_parser_parameter_declaration): Likewise.
5469 (c_parser_type_name): Likewise.
5470
5471 2013-10-11 Jakub Jelinek <jakub@redhat.com>
5472
5473 * c-lang.h (current_omp_declare_target_attribute): New extern
5474 decl.
5475 * c-parser.c: Include c-lang.h.
5476 (struct c_parser): Change tokens to c_token *.
5477 Add tokens_buf field. Change tokens_avail type to unsigned int.
5478 (c_parser_consume_token): If parser->tokens isn't
5479 &parser->tokens_buf[0], increment parser->tokens.
5480 (c_parser_consume_pragma): Likewise.
5481 (enum pragma_context): Add pragma_struct and pragma_param.
5482 (c_parser_external_declaration): Adjust
5483 c_parser_declaration_or_fndef caller.
5484 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5485 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5486 Adjust recursive call.
5487 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5488 of pragma_external.
5489 (c_parser_parameter_declaration): Use pragma_param instead of
5490 pragma_external.
5491 (c_parser_compound_statement_nostart, c_parser_label,
5492 c_parser_for_statement): Adjust
5493 c_parser_declaration_or_fndef callers.
5494 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5495 it through to c_parser_conditional_expression.
5496 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5497 pass it through to c_parser_binary_expression. Adjust recursive
5498 call.
5499 (c_parser_binary_expression): Remove prec argument, add
5500 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5501 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5502 binop matches it, use build2 instead of parser_build_binary_op.
5503 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5504 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5505 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5506 Handle pragma_struct and pragma_param the same as pragma_external.
5507 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5508 (c_parser_omp_variable_list): Parse array sections for
5509 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5510 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5511 (c_parser_omp_clause_reduction): Handle user defined reductions.
5512 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5513 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5514 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5515 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5516 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5517 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5518 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5519 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5520 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5521 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5522 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5523 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5524 (c_parser_omp_for_loop): Add CODE argument, pass it through
5525 to c_finish_omp_for. Change last argument to cclauses,
5526 and adjust uses to grab parallel clauses from the array of all
5527 the split clauses. Adjust c_parser_binary_expression,
5528 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5529 (omp_split_clauses): New function.
5530 (c_parser_omp_simd): New function.
5531 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5532 Allow the function to be called also when parsing combined constructs,
5533 and call c_parser_omp_simd when parsing for simd.
5534 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5535 #pragma omp section, require exactly one structured-block instead of
5536 sequence of statements.
5537 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5538 Allow the function to be called also when parsing combined constructs.
5539 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5540 Allow the function to be called also when parsing combined
5541 constructs.
5542 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5543 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5544 c_parser_omp_teams, c_parser_omp_target_data,
5545 c_parser_omp_target_update, c_parser_omp_target,
5546 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5547 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5548 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5549 (c_parser_omp_construct): Add p_name and mask vars. Handle
5550 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5551 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5552 and c_parser_omp_sections callers.
5553 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5554 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5555 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5556 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5557 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5558 OMP_CLAUSE_DEPEND.
5559 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5560 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5561 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5562 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5563 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5564 * c-typeck.c: Include tree-inline.h.
5565 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5566 handle_omp_array_sections_1, handle_omp_array_sections,
5567 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5568 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5569 user defined reductions.
5570 (c_tree_equal): New function.
5571 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5572 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5573 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5574 c_check_omp_declare_reduction_r): New prototypes.
5575 * c-decl.c (current_omp_declare_target_attribute): New variable.
5576 (c_decl_attributes): New function.
5577 (start_decl, start_function): Use it instead of decl_attributes.
5578 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5579 c_omp_reduction_decl, c_omp_reduction_lookup,
5580 c_check_omp_declare_reduction_r): New functions.
5581
5582 2013-09-25 Tom Tromey <tromey@redhat.com>
5583
5584 * Make-lang.in (c/gccspec.o): Remove.
5585 (CFLAGS-c/gccspec.o): New variable.
5586 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5587 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5588 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5589
5590 2013-09-25 Tom Tromey <tromey@redhat.com>
5591
5592 * Make-lang.in (c/gccspec.o): Don't use subshell.
5593
5594 2013-09-18 Marek Polacek <polacek@redhat.com>
5595
5596 PR sanitize/58443
5597 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5598 Remove unnecessary check.
5599
5600 2013-09-18 Marek Polacek <polacek@redhat.com>
5601
5602 PR sanitizer/58411
5603 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5604 no_sanitize_undefined attribute.
5605
5606 2013-09-13 Kai Tietz <ktietz@redhat.com>
5607
5608 PR target/57848
5609 * c-decl.c (c_builtin_function_ext_scope): Remove
5610 wrong assumption that it is never called on prexisting
5611 symbol.
5612
5613 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5614
5615 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5616
5617 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5618
5619 * c-objc-common.c (c_tree_printer): Tidy.
5620
5621 2013-08-30 Marek Polacek <polacek@redhat.com>
5622
5623 * c-typeck.c (build_binary_op): Add division by zero and shift
5624 instrumentation.
5625
5626 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5627 Joseph Myers <joseph@codesourcery.com>
5628
5629 PR c/35649
5630 * c-typeck.c (c_common_type): Prefer double_type_node over
5631 other REAL_TYPE types with the same precision.
5632 (convert_arguments): Likewise.
5633
5634 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5635
5636 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5637 (c_initialize_diagnostics): Call a destructor for the early printer.
5638
5639 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5640
5641 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5642 printer initialization.
5643
5644 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5645
5646 PR c/57490
5647 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5648 check for truth values.
5649 (expand_array_notation_exprs): Added truth values case. Removed an
5650 unwanted else. Added for-loop to walk through subtrees in default
5651 case.
5652
5653 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5654
5655 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5656
5657 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5658
5659 * c-parser.c (struct c_generic_association): Fix typo.
5660
5661 2013-07-23 Tom Tromey <tromey@redhat.com>
5662 Joseph Myers <joseph@codesourcery.com>
5663
5664 * c-parser.c (struct c_generic_association): New.
5665 (c_generic_association_d): New typedef.
5666 (c_parser_generic_selection): New function.
5667 (c_parser_postfix_expression): Handle RID_GENERIC.
5668
5669 2013-07-13 Jason Merrill <jason@redhat.com>
5670
5671 PR c++/57793
5672 * c-decl.c (finish_struct): Check for too-large class.
5673
5674 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5675
5676 PR c/57821
5677 * c-typeck.c (set_init_index): When folding, check for index overflow.
5678
5679 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5680
5681 * c-parser.c (c_parser_array_notation): Removed rejection of array
5682 notations in an array of function pointers.
5683
5684 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5685
5686 * c-array-notation.c (make_triplet_val_inv): New function.
5687 (create_cmp_incr): Likewise.
5688 (create_array_refs): Likewise.
5689 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5690 Also modularized common parts between functions and called the function.
5691 (build_array_notation_expr): Likewise.
5692 (fix_conditional_array_notations_1): Likewise.
5693 (fix_array_notation_expr): Likewise.
5694 (fix_array_notation_call_expr): Likewise.
5695
5696 2013-06-18 Marek Polacek <polacek@redhat.com>
5697
5698 PR c/57630
5699 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5700
5701 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5702
5703 * c-array-notation.c (build_array_notation_expr): Reject array notation
5704 mismatch between LHS and RHS even inside a call_expr. Also, removed
5705 a couple while statements that were dead code.
5706
5707 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5708
5709 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5710 excessive precision expressions in function parameters. Also removed
5711 couple unwanted while statements.
5712
5713 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5714
5715 * c-array-notation.c (expand_array_notation_exprs): Added
5716 ARRAY_NOTATION_REF case.
5717
5718 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5719
5720 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5721 function to c-family/array-notation-common.c.
5722 (is_cilkplus_reduce_builtin): Likewise.
5723 (find_rank): Likewise.
5724 (extract_array_notation_exprs): Likewise.
5725 (replace_array_notations): Likewise.
5726 (find_inv_trees): Likewise.
5727 (replace_inv_trees): Likewise.
5728 (contains_array_notation_expr): Likewise.
5729 (find_correct_array_notation_type): Likewise.
5730 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5731 (struct inv_list): Moved this to c-family/array-notation-common.c.
5732 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5733
5734 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5735
5736 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5737 reduction functions outside the for-loop. Added a check if the fundecl
5738 is non-NULL. Finally, removed an unwanted if-statement, and made the
5739 body unconditional.
5740
5741 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5742
5743 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5744 condition of the if-statement matches the rank of else-block and then-
5745 block when array notations are used.
5746 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5747 expression after the entire function body is parsed.
5748 (c_parser_expr_no_commas): Delayed creating array notation expressions
5749 to the end of function parsing.
5750 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5751 whole if-statement instead of just the condition.
5752 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5753
5754 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5755
5756 PR c/57474
5757 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5758 array to NULL_TREE if they are unused. Also added a check for the
5759 field to be NULL before its fields are used in future.
5760
5761 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5762
5763 PR bootstrap/57450
5764 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5765 (build_array_notation_expr): Likewise.
5766
5767 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5768
5769 * c-typeck.c (build_array_ref): Added a check to see if array's
5770 index is greater than one. If true, then emit an error.
5771 (build_function_call_vec): Exclude error reporting and checking
5772 for builtin array-notation functions.
5773 (convert_arguments): Likewise.
5774 (c_finish_return): Added a check for array notations as a return
5775 expression. If true, then emit an error.
5776 (c_finish_loop): Added a check for array notations in a loop
5777 condition. If true then emit an error.
5778 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5779 (build_binary_op): Added a check for array notation expr inside
5780 op1 and op0. If present, we call another function to find correct
5781 type.
5782 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5783 * c-parser.c (c_parser_compound_statement): Check if array
5784 notation code is used in tree, if so, then transform them into
5785 appropriate C code.
5786 (c_parser_expr_no_commas): Check if array notation is used in LHS
5787 or RHS, if so, then build array notation expression instead of
5788 regular modify.
5789 (c_parser_postfix_expression_after_primary): Added a check for
5790 colon(s) after square braces, if so then handle it like an array
5791 notation. Also, break up array notations in unary op if found.
5792 (c_parser_direct_declarator_inner): Added a check for array
5793 notation.
5794 (c_parser_compound_statement): Added a check for array notation in
5795 a stmt. If one is present, then expand array notation expr.
5796 (c_parser_if_statement): Likewise.
5797 (c_parser_switch_statement): Added a check for array notations in
5798 a switch statement's condition. If true, then output an error.
5799 (c_parser_while_statement): Similarly, but for a while.
5800 (c_parser_do_statement): Similarly, but for a do-while.
5801 (c_parser_for_statement): Similarly, but for a for-loop.
5802 (c_parser_unary_expression): Check if array notation is used in a
5803 pre-increment or pre-decrement expression. If true, then expand
5804 them.
5805 (c_parser_array_notation): New function.
5806 * c-array-notation.c: New file.
5807 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5808
5809 2013-05-23 Mike Stump <mikestump@comcast.net>
5810
5811 * c-typeck.c (convert_for_assignment): Handle references to memory
5812 spaces better.
5813
5814 2013-05-16 Jason Merrill <jason@redhat.com>
5815
5816 * Make-lang.in (cc1$(exeext)): Use link mutex.
5817
5818 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5819
5820 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5821 to simply use OPT_Wpointer_arith.
5822 (build_unary_op): Likewise.
5823
5824 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5825
5826 PR c/19449
5827 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5828 argument. If set, or it temporarily for parsing of the first
5829 argument into force_folding_builtin_constant_p.
5830 (c_parser_postfix_expression): Adjust callers.
5831
5832 2013-03-21 Richard Biener <rguenther@suse.de>
5833
5834 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5835 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5836
5837 2013-02-12 Marek Polacek <polacek@redhat.com>
5838
5839 PR c/44938
5840 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5841 origtypes to NULL.
5842
5843 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5844
5845 PR c/56078
5846 * c-typeck.c (set_nonincremental_init_from_string): If
5847 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5848 returned false.
5849 (process_init_element): Likewise.
5850
5851 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5852
5853 PR c++/55619
5854 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5855 argument, don't call default_function_array_conversion
5856 nor c_fully_fold here.
5857 (c_parser_asm_statement): Adjust callers.
5858 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5859 and outputs here, and call default_function_array_conversion
5860 on inputs that don't need to be addressable.
5861
5862 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5863
5864 PR c/39464
5865 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5866 warning require that both c_common_unsigned_type as well as
5867 c_common_signed_type is the same for both mvl and mvr types.
5868
5869 2012-11-16 Diego Novillo <dnovillo@google.com>
5870
5871 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5872
5873 * c-common.c: Use new vec API in vec.h.
5874 * c-common.h: Likewise.
5875 * c-gimplify.c: Likewise.
5876 * c-pragma.c: Likewise.
5877 * c-pretty-print.c: Likewise.
5878 * c-pretty-print.h: Likewise.
5879 * c-semantics.c: Likewise.
5880 * c-decl.c: Likewise.
5881 * c-parser.c: Likewise.
5882 * c-tree.h: Likewise.
5883 * c-typeck.c: Likewise.
5884
5885 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5886
5887 PR c++/54930
5888 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5889
5890 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5891
5892 PR c/53066
5893 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5894 shadows a function, unless the variable is a function or a
5895 pointer-to-function.
5896
5897 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5898
5899 PR c/54381
5900 * c-parser.c (struct c_tree_loc_pair): Removed.
5901 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5902 add location_t * and tree * arguments, fill in array of 3
5903 sizeof_arg trees and corresponding locs.
5904 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5905 c_parser_expr_list callers.
5906 (c_parser_postfix_expression_after_primary): Likewise. Pass
5907 array of 3 sizeof_arg trees and locs (corresponding to first
5908 3 arguments) to sizeof_pointer_memaccess_warning.
5909
5910 2012-10-09 Lawrence Crowl <crowl@google.com>
5911
5912 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5913 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5914 hash table.
5915
5916 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5917
5918 PR c++/54194
5919 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5920 call.
5921
5922 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5923
5924 PR c++/54427
5925 * c-typeck.c: Include c-common.h.
5926 (enum stv_conv): Moved to c-common.h.
5927 (scalar_to_vector): Moved to c-common.c.
5928 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5929 * Make-lang.in: c-typeck.c depends on c-common.h.
5930
5931 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5932
5933 * c-decl.c (c_write_global_declarations): Fix handling of
5934 -fdump-ada-spec*.
5935
5936 2012-09-30 Sharad Singhai <singhai@google.com>
5937
5938 * c-decl.c (c_write_global_declarations): Use a different method
5939 to determine if the dump has ben initialized.
5940
5941 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5942
5943 PR c/54552
5944 * c-typeck.c (c_cast_expr): When casting to a type requiring
5945 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5946 c_fully_fold first.
5947
5948 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5949
5950 PR c/54103
5951 * c-typeck.c (build_unary_op): Pass original argument of
5952 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5953 any C_MAYBE_CONST_EXPR, if it has integer operands.
5954 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5955 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5956 to c_objc_common_truthvalue_conversion, then remove any
5957 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5958 c_objc_common_truthvalue_conversion not
5959 c_common_truthvalue_conversion.
5960 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5961 call note_integer_operands for arguments with integer operands
5962 that are not integer constants.
5963
5964 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5965
5966 PR c/54559
5967 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5968 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5969
5970 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5971
5972 PR c/54428
5973 * c-convert.c (convert): Don't call fold_convert_loc if
5974 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5975 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5976 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5977
5978 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5979
5980 PR c/54355
5981 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5982 for nested and empty_ok arguments in the call to
5983 c_parser_declaration_or_fndef.
5984
5985 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5986
5987 * c-tree.h (c_last_sizeof_arg): Declare.
5988 * c-parser.c (struct c_tree_loc_pair): New type.
5989 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5990 non-NULL.
5991 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5992 (c_parser_postfix_expression_after_primary): Likewise. Call
5993 sizeof_pointer_memaccess_warning if needed.
5994 (sizeof_ptr_memacc_comptypes): New function.
5995 * c-typeck.c (c_last_sizeof_arg): New global variable.
5996 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5997
5998 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5999
6000 * c-lang.h (lang_decl): Add variable_size GTY option.
6001
6002 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6003
6004 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6005 * Make-lang.in: Fix dependencies.
6006
6007 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6008
6009 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6010 and add language Makefile hooks.
6011 * config-lang.in: New file.
6012 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6013 add the required "normal" config-lang.in rules.
6014 * c-lang.h: Moved from gcc/ to here.
6015 * c-tree.h: Likewise.
6016 * c-objc-common.c: Likewise.
6017 * c-objc-common.h: Likewise.
6018 * c-typeck.c: Likewise.
6019 * c-convert.c: Likewise.
6020 * c-lang.c: Likewise.
6021 * c-aux-info.c: Likewise.
6022 * c-errors.c: Likewise.
6023 * gccspec.c: Likewise.
6024 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6025 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6026 \f
6027 Copyright (C) 2012-2019 Free Software Foundation, Inc.
6028
6029 Copying and distribution of this file, with or without modification,
6030 are permitted in any medium without royalty provided the copyright
6031 notice and this notice are preserved.