1 2019-01-30 Jakub Jelinek <jakub@redhat.com>
4 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
5 * c-decl.c (decl_jump_unsafe): Return false for
6 C_DECL_COMPOUND_LITERAL_P decls.
7 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
9 2019-01-29 Jakub Jelinek <jakub@redhat.com>
12 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
16 * c-decl.c (last_fileptr_type): Remove.
17 (last_structptr_types): New variable.
18 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
19 {old,new}rettype instead of the types themselves. Assert
20 last_structptr_types array has the same number of elements
21 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
22 argument oldtype and newtype. Instead of handling
23 just fileptr_type_node specially, handle all builtin_structptr_types
24 pointer nodes. Formatting fix.
26 2019-01-24 Martin Sebor <msebor@redhat.com>
31 * c-decl.c (match_builtin_function_types): Add arguments.
32 (diagnose_mismatched_decls): Diagnose mismatched declarations
33 of built-ins more strictly.
35 2019-01-24 Jakub Jelinek <jakub@redhat.com>
38 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
39 on #pragma omp cancel with different modifiers.
41 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
45 * c-typeck.c (convert_for_assignment): Upate the
46 warn_for_address_or_pointer_of_packed_member call.
48 2019-01-16 Tom Honermann <tom@honermann.net>
49 Jason Merrill <jason@redhat.com>
51 * c-typeck.c (digest_init): Revised the error message produced for
52 ill-formed cases of array initialization with a string literal.
53 (error_init): Make variadic.
55 2019-01-12 Jakub Jelinek <jakub@redhat.com>
57 * c-typeck.c (convert_for_assignment): Fix a comment typo.
59 2019-01-07 Jakub Jelinek <jakub@redhat.com>
62 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
63 if current_function_decl is non-NULL.
65 2019-01-07 Joseph Myers <joseph@codesourcery.com>
69 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
70 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
71 functions declared but never defined only for external scope, not
74 2019-01-07 Jakub Jelinek <jakub@redhat.com>
77 * c-parser.c (c_parser_postfix_expression): Parse
78 __builtin_convertvector.
80 2019-01-01 Jakub Jelinek <jakub@redhat.com>
82 Update copyright years.
84 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
87 * c-typeck.c (convert_for_assignment): Call
88 warn_for_address_or_pointer_of_packed_member.
90 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
92 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
93 a more specific error message (instead of just falling through).
95 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
97 * c-parser.c (c_parser_asm_statement): Keep track of the location each
98 asm qualifier is first seen; use that to give nicer "duplicate asm
99 qualifier" messages. Delete 'quals" variable, instead pass the
100 "is_volatile_ flag to build_asm_stmt directly.
101 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
102 * c-typeck.c (build_asm_stmt): Ditto; adjust.
104 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
106 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
107 "done" boolean variable.
109 2018-12-19 David Malcolm <dmalcolm@redhat.com>
112 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
113 Move from here to gcc-rich-location.h and gcc-rich-location.c.
114 (build_binary_op): Use struct op_location_t and
115 class binary_op_rich_location.
117 2018-12-11 Jakub Jelinek <jakub@redhat.com>
120 * c-convert.c (convert): Call c_fully_fold before calling
121 ubsan_instrument_float_cast.
123 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
125 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
128 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
130 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
131 after asm. Pass a flag for it to build_asm_expr.
132 * c-tree.h (build_asm_expr): Update declaration.
133 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
136 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
139 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
140 combination of volatile and goto, in any order, without repetitions.
142 2018-12-04 James Norris <jnorris@codesourcery.com>
143 Cesar Philippidis <cesar@codesourcery.com>
144 Julian Brown <julian@codesourcery.com>
146 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
149 2018-11-30 Richard Biener <rguenther@suse.de>
151 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
152 _Literal (type) { ... } as empty aggregate or vector constructor.
154 2018-11-29 Martin Sebor <msebor@redhat.com>
157 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
158 (convert_arguments): Add comments. Pass additional argument to
161 2018-11-29 Martin Sebor <msebor@redhat.com>
165 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
167 2018-11-23 Martin Sebor <msebor@redhat.com>
170 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
171 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
173 2018-11-20 Martin Sebor <msebor@redhat.com>
175 * c-parser.c (c_parser_has_attribute_expression): New function.
176 (c_parser_attribute): New function.
177 (c_parser_attributes): Move code into c_parser_attribute.
178 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
180 2018-11-15 Martin Sebor <msebor@redhat.com>
183 * c-decl.c (header_for_builtin_fn): Declare.
184 (diagnose_mismatched_decls): Diagnose declarations of built-in
185 functions without a prototype.
186 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
187 (convert_argument): Same.
188 (convert_arguments): Factor code out into convert_argument.
189 Detect mismatches between built-in formal arguments in calls
190 to built-in without prototype.
191 (build_conditional_expr): Same.
192 (type_or_builtin_type): New function.
193 (convert_for_assignment): Add argument. Conditionally issue
194 warnings instead of errors for mismatches.
196 2018-11-13 David Malcolm <dmalcolm@redhat.com>
198 * c-decl.c: Replace "source_location" with "location_t".
199 * c-tree.h: Likewise.
200 * c-typeck.c: Likewise.
201 * gimple-parser.c: Likewise.
203 2018-11-09 Jakub Jelinek <jakub@redhat.com>
205 * c-parser.c (c_parser_omp_clause_final): Use
206 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
207 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
208 parsing instead of c_parser_paren_condition.
209 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
210 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
211 c_fully_fold instead of c_parser_condition.
212 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
213 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
214 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
215 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
216 c_parser_expr_no_commas instead of c_parser_expression.
218 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
219 reduction clause with inscan modifier.
221 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
222 clauses other than atomic_default_mem_order.
224 2018-11-08 Jakub Jelinek <jakub@redhat.com>
226 * c-parser.c: Include memmode.h.
227 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
228 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
229 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
230 task_reduction clauses.
231 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
232 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
233 section, or lvalue assignment expression.
234 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
235 (c_parser_omp_clause_lastprivate): Parse optional
236 conditional: modifier.
237 (c_parser_omp_clause_hint): Require constant integer expression rather
238 than just integer expression.
239 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
241 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
242 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
243 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
245 (c_parser_omp_clause_depend): Parse iterator modifier and handle
246 iterators. Parse mutexinoutset and depobj kinds.
247 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
249 (c_parser_omp_all_clauses): Likewise. Handle
250 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
251 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
252 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
253 default memory order from requires directive if any. Adjust
254 c_finish_omp_atomic caller.
255 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
256 (c_parser_omp_flush): Parse flush with memory-order-clause.
257 (c_parser_omp_for_loop): Allow NE_EXPR even in
258 OpenMP loops, adjust c_finish_omp_for caller.
259 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
260 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
261 Allow to be called while parsing combined parallel master.
262 Parse combined master taskloop{, simd}.
263 (c_parser_omp_parallel): Parse combined
264 parallel master{, taskloop{, simd}} constructs.
265 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
266 (OMP_TASKGROUP_CLAUSE_MASK): Define.
267 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
268 (OMP_TASKWAIT_CLAUSE_MASK): Define.
269 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
270 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
271 around teams body. Use SET_EXPR_LOCATION.
272 (c_parser_omp_target_data): Allow target data
273 with only use_device_ptr clauses.
274 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
275 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
276 (c_parser_omp_requires): New function.
277 (c_finish_taskloop_clauses): New function.
278 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
279 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
280 declaration. Disallow in_reduction clause when combined with parallel
282 (c_parser_omp_construct): Adjust c_parser_omp_master and
283 c_parser_omp_taskgroup callers.
284 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
286 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
287 like OMP_CLAUSE_REDUCTION.
288 (handle_omp_array_sections): Likewise. Call save_expr on array
289 reductions before calling build_index_type. Handle depend clauses
291 (struct c_find_omp_var_s): New type.
292 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
293 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
294 with static, runtime or auto schedule kinds. Call save_expr for whole
295 array reduction sizes. Diagnose reductions with zero sized elements
296 or variable length structures. Diagnose nogroup clause used with
297 reduction clause(s). Handle depend clause with
298 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
299 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
300 some different type for other kinds. Use build_unary_op with
301 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
302 Handle depend clauses with iterators. Remove no longer needed special
303 case that predetermined const qualified vars may be specified in
304 firstprivate clause. Complain if const qualified vars are mentioned
305 in data-sharing clauses other than firstprivate or shared. Use
306 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
307 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
308 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
309 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
311 2018-10-29 David Malcolm <dmalcolm@redhat.com>
313 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
314 logic for change to name_hint::operator bool.
315 (undeclared_variable): Likewise.
316 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
317 (c_parser_parameter_declaration): Likewise.
319 2018-10-17 Joseph Myers <joseph@codesourcery.com>
321 * c-errors.c (pedwarn_c11): New function.
322 * c-parser.c (disable_extension_diagnostics): Save
323 warn_c11_c2x_compat and set it to 0.
324 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
325 (c_parser_static_assert_declaration_no_semi): Handle
326 _Static_assert without string constant.
327 * c-tree.h (pedwarn_c11): New prototype.
329 2018-10-17 David Malcolm <dmalcolm@redhat.com>
331 * Make-lang.in (selftest-c): New.
332 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
333 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
334 from gcc/Makefile.in.
336 2018-10-02 Richard Biener <rguenther@suse.de>
338 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
340 2018-09-26 Joseph Myers <joseph@codesourcery.com>
343 * c-typeck.c (build_binary_op): Use excess precision for
344 comparisons of integers and floating-point for C11 and later.
346 2018-09-26 Martin Jambor <mjambor@suse.cz>
349 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
352 2018-09-17 David Malcolm <dmalcolm@redhat.com>
354 * c-objc-common.c (range_label_for_type_mismatch::get_text):
355 Update for new param.
356 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
359 2018-09-17 Martin Jambor <mjambor@suse.cz>
362 * c-parser.c: (warn_for_abs): New function.
363 (c_parser_postfix_expression_after_primary): Call it.
365 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
367 * c-typeck.c (digest_init): Shorten overlength strings.
369 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
371 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
373 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
375 * c-decl.c (finish_decl): Call braced_list_to_string here ...
376 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
378 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
380 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
381 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
383 2018-08-27 David Malcolm <dmalcolm@redhat.com>
386 * c-decl.c (implicitly_declare): Update call to
387 maybe_add_include_fixit to suggest overriding the location, as it
389 * c-objc-common.c (c_tree_printer): Update for conversion of
390 show_caret_p to a tri-state.
392 2018-08-27 Martin Liska <mliska@suse.cz>
394 * c-decl.c (locate_old_decl): Use new function
395 fndecl_built_in_p and remove check for FUNCTION_DECL if
397 (diagnose_mismatched_decls): Likewise.
398 (merge_decls): Likewise.
399 (warn_if_shadowing): Likewise.
400 (pushdecl): Likewise.
401 (implicitly_declare): Likewise.
402 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
403 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
404 * c-typeck.c (build_function_call_vec): Likewise.
405 (convert_arguments): Likewise.
407 2018-08-20 David Malcolm <dmalcolm@redhat.com>
410 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
411 (diagnose_mismatched_decls): Likewise, in various places.
412 (warn_if_shadowing): Likewise.
413 (implicit_decl_warning): Likewise.
414 (implicitly_declare): Likewise.
415 (undeclared_variable): Likewise.
416 (declare_label): Likewise.
417 (grokdeclarator): Likewise.
418 (start_function): Likewise.
419 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
420 (c_parser_parameter_declaration): Likewise.
421 (c_parser_binary_expression): Likewise.
422 * c-typeck.c (c_expr_sizeof_expr): Likewise.
423 (parser_build_binary_op): Likewise.
424 (build_unary_op): Likewise.
425 (error_init): Likewise.
426 (pedwarn_init): Likewise.
427 (warning_init): Likewise.
428 (convert_for_assignment): Likewise.
430 2018-08-15 David Malcolm <dmalcolm@redhat.com>
432 * c-objc-common.c: Include "gcc-rich-location.h".
433 (c_tree_printer): Move implemenation of '%T' to...
434 (print_type): ...this new function.
435 (range_label_for_type_mismatch::get_text): New function.
436 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
437 range for the various ic_argpass cases.
438 (class maybe_range_label_for_tree_type_mismatch): New class.
439 (build_binary_op): Use it when calling binary_op_error.
441 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
443 * c-decl.c (start_decl): Do not warn if variables is named as main
444 and is a local variable.
446 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
449 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
450 objects of unknown size.
452 2018-08-13 Martin Sebor <msebor@redhat.com>
454 PR tree-optimization/71625
455 * c-parser.c (c_parser_declaration_or_fndef): Call
456 braced_list_to_string.
458 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
461 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
464 2018-08-01 Martin Sebor <msebor@redhat.com>
466 PR tree-optimization/86650
467 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
468 and TREE_BLOCK (t) from within percent_K_format to this callsite.
470 2018-08-01 Jakub Jelinek <jakub@redhat.com>
473 * c-typeck.c (init_field_decl_cmp): New function.
474 (output_pending_init_elements): Use it for field comparisons
475 instead of pure bit_position comparisons.
477 2018-07-12 Jakub Jelinek <jakub@redhat.com>
479 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
480 type here, instead add "omp declare target implicit" attribute.
481 (finish_decl): Diagnose vars without mappable type here.
483 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
484 Thomas Schwinge <thomas@codesourcery.com>
485 Cesar Philippidis <cesar@codesourcery.com>
487 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
488 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
489 to their non-present_or_* counterparts. Make 'self' an alias to
490 PRAGMA_OACC_CLAUSE_HOST.
491 (c_parser_oacc_data_clause): Update GOMP mappings for
492 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
493 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
494 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
495 Remove support for present_or_* clauses.
496 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
497 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
498 (OACC_DECLARE_CLAUSE_MASK): Likewise.
499 (OACC_DATA_CLAUSE_MASK): Likewise.
500 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
501 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
502 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
503 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
504 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
506 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
508 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
509 * gimple-parser.c (c_parser_gimple_statement): Likewise.
510 (c_parser_gimple_unary_expression): Likewise.
512 2018-06-15 Jakub Jelinek <jakub@redhat.com>
515 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
516 before doing POINTER_DIFF_EXPR.
518 2018-06-07 Marek Polacek <polacek@redhat.com>
521 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
522 for loop initial declarations.
524 2018-05-30 David Pagan <dave.pagan@oracle.com>
527 * c-decl.c (grokdeclarator): Update check for return type warnings.
528 (start_function): Likewise.
529 (finish_function): Likewise.
530 * c-typeck.c (c_finish_return): Update check for return type warnings.
531 Pass OPT_Wreturn_type to pedwarn when appropriate.
533 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
535 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
538 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
540 * gimple-parser.c: Include internal-fn.h.
541 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
542 (c_parser_gimple_call_internal): New function.
543 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
544 Fix typos in comment.
546 2018-05-10 Jakub Jelinek <jakub@redhat.com>
549 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
550 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
552 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
553 fold_offsetof_1, pass argtype as TYPE to it and drop the
556 2018-05-02 David Pagan <dave.pagan@oracle.com>
559 * c-decl.c (old_style_parameter_scope): New function.
560 * c-parser.c (c_parser_postfix_expression): Check for statement
561 expressions in old-style function parameter list declarations.
562 * c-parser.h (old_style_parameter_scope): New extern declaration.
564 2018-04-25 Jakub Jelinek <jakub@redhat.com>
567 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
568 it is not TREE_STATIC.
569 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
570 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
571 its COMPOUND_LITERAL_EXPR_DECL.
573 2018-03-21 Joseph Myers <joseph@codesourcery.com>
575 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
576 where all functions return the same _FloatN or _FloatNx type,
577 treat integer types as _Float64 instead of double.
579 2018-03-21 Jakub Jelinek <jakub@redhat.com>
582 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
583 building vector comparison, diagnose it and return error_mark_node.
585 2018-03-15 Jakub Jelinek <jakub@redhat.com>
588 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
589 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
590 INTEGER_TYPE element type.
592 2018-03-13 David Pagan <dave.pagan@oracle.com>
595 * c-typeck.c (output_init_element): Ensure field initializer
596 expression is always evaluated if there are side effects.
598 2018-03-06 Jakub Jelinek <jakub@redhat.com>
601 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
602 !building_stmt_list_p ().
604 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
607 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
608 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
609 and include the BIND_EXPR in the list of things that need to be
612 2018-02-09 Nathan Sidwell <nathan@acm.org>
615 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
616 to strict_aliasing_warning.
618 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
620 * c-typeck.c (really_start_incremental_init, push_init_level,
621 set_nonincremental_init, output_init_element, process_init_element):
622 Use DECL_UNNAMED_BIT_FIELD.
624 2018-01-31 Marek Polacek <polacek@redhat.com>
627 * c-parser.c (c_parser_compound_statement_nostart): Call
628 expansion_point_location_if_in_system_header.
630 2018-01-17 David Malcolm <dmalcolm@redhat.com>
633 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
636 2018-01-13 Jakub Jelinek <jakub@redhat.com>
639 * c-tree.h (decl_constant_value_1): Add a bool argument.
640 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
641 returning a CONSTRUCTOR if it is true. Use error_operand_p.
642 (decl_constant_value): Adjust caller.
643 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
644 decl_constant_value_1 as IN_INIT. Otherwise, punt if
645 decl_constant_value returns initializer that has BLKmode or
647 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
649 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
650 Alan Hayward <alan.hayward@arm.com>
651 David Sherwood <david.sherwood@arm.com>
653 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
654 TYPE_VECTOR_SUBPARTS.
656 2018-01-03 Jakub Jelinek <jakub@redhat.com>
658 Update copyright years.
660 2018-01-01 Jakub Jelinek <jakub@redhat.com>
663 * c-parser.c (c_parser_braced_init, c_parser_initelt,
664 c_parser_conditional_expression, c_parser_cast_expression,
665 c_parser_sizeof_expression, c_parser_alignof_expression,
666 c_parser_postfix_expression, c_parser_omp_declare_reduction,
667 c_parser_transaction_expression): Use set_error () method instead
668 of setting value member to error_mark_node.
670 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
672 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
673 and _Float<N>X built-in functions.
675 2017-12-22 Jakub Jelinek <jakub@redhat.com>
678 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
679 TYPE_STUB_DECL and call rest_of_type_compilation before processing
680 incomplete vars rather than after it.
683 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
684 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
685 and consider empty ones if there are no other stmts. For
686 -Wunused-value walk all statements before the one only followed by
689 2017-12-22 Mike Stump <mikestump@comcast.net>
690 Eric Botcazou <ebotcazou@adacore.com>
692 * c-parser.c (c_parser_while_statement): Add unroll parameter and
693 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
694 (c_parser_do_statement): Likewise.
695 (c_parser_for_statement): Likewise.
696 (c_parser_statement_after_labels): Adjust calls to above.
697 (c_parse_pragma_ivdep): New static function.
698 (c_parser_pragma_unroll): Likewise.
699 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
700 <PRAGMA_UNROLL>: New case.
702 2017-12-19 Jakub Jelinek <jakub@redhat.com>
704 * c-typeck.c (comptypes_internal, function_types_compatible_p,
705 perform_integral_promotions, digest_init): Replace Yoda conditions
706 with typical order conditions.
707 * c-decl.c (check_bitfield_type_and_width): Likewise.
709 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
711 * c-typeck.c (c_safe_arg_type_equiv_p,
712 c_safe_function_type_cast_p): New function.
713 (build_c_cast): Implement -Wcast-function-type.
715 2017-12-14 Richard Biener <rguenther@suse.de>
718 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
719 like REALPART_EXPR for the behavior of whether its operand
722 2017-12-12 Marek Polacek <polacek@redhat.com>
725 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
727 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
729 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
730 * c-parser.c (add_debug_begin_stmt): New.
731 (c_parser_declaration_or_fndef): Call it.
732 (c_parser_compound_statement_nostart): Likewise.
733 (c_parser_statement_after_labels): Likewise.
734 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
736 2017-12-07 Joseph Myers <joseph@codesourcery.com>
738 * c-decl.c (build_compound_literal): Add parameter alignas_align
739 and set alignment of decl if nonzero.
740 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
741 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
743 (c_parser_struct_declaration): Update syntax comment.
744 (c_parser_type_name): Add alignas_ok argument and pass it to
746 (c_parser_cast_expression): Pass true to c_parser_type_name and
747 give error if a cast used an _Alignas specifier.
748 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
749 give error if sizeof (type-name) used an _Alignas specifier.
750 (c_parser_alignof_expression): Pass true to c_parser_type_name and
751 give error if _Alignof (type-name) used an _Alignas specifier.
752 (c_parser_postfix_expression_after_paren_type): Check specified
753 alignment for a compound literal and pass it to
754 build_compound_literal.
755 * c-parser.h (c_parser_type_name): Update prototype.
756 * c-tree.h (build_compound_literal): Update prototype.
758 2017-12-07 Martin Sebor <msebor@redhat.com>
761 * c-decl.c (c_decl_attributes): Look up existing declaration and
762 pass it to decl_attributes.
764 2017-12-06 David Malcolm <dmalcolm@redhat.com>
767 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
768 reserved for use by the implementation.
770 2017-12-06 David Malcolm <dmalcolm@redhat.com>
772 * c-decl.c: Include "c-family/c-spellcheck.h".
774 2017-12-05 Martin Liska <mliska@suse.cz>
775 Jakub Jelinek <jakub@redhat.com>
777 * c-typeck.c (pointer_diff): Add new argument and instrument
779 (build_binary_op): Similar for pointer comparison.
781 2017-12-01 Jakub Jelinek <jakub@redhat.com>
784 * c-parser.c: Include tree-iterator.h.
785 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
786 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
790 * c-tree.h (decl_constant_value_1): Declare.
791 * c-typeck.c (decl_constant_value_1): New function.
792 (decl_constant_value): Use it.
793 * c-fold.c (c_fully_fold_internal): If in_init, use
794 decl_constant_value_1 instead of decl_constant_value.
796 2017-11-30 Jakub Jelinek <jakub@redhat.com>
798 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
800 2017-11-28 Jakub Jelinek <jakub@redhat.com>
803 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
804 c_switch_covers_all_cases_p returns true.
806 2017-11-28 Julia Koval <julia.koval@intel.com>
807 Sebastian Peryt <sebastian.peryt@intel.com>
809 * Make-lang.in (c/c-array-notation.o): Remove.
810 * c-array-notation.c: Delete.
811 * c-decl.c: Remove cilkplus condition.
812 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
813 c_parser_cilk_verify_simd, c_parser_array_notation,
814 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
815 c_parser_cilk_simd_fn_vector_attrs,
816 c_finish_cilk_simd_fn_tokens): Delete.
817 (c_parser_declaration_or_fndef): Remove cilkplus condition.
818 (c_parser_direct_declarator_inner): Ditto.
819 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
820 (c_parser_attributes, c_parser_compound_statement,
821 c_parser_statement_after_labels, c_parser_if_statement,
822 c_parser_switch_statement, c_parser_while_statement,
823 c_parser_do_statement, c_parser_for_statement,
824 c_parser_unary_expression, c_parser_postfix_expression,
825 c_parser_postfix_expression_after_primary,
826 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
827 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
829 * c-typeck.c (build_array_ref, build_function_call_vec,
831 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
832 c_finish_loop, build_binary_op): Remove cilkplus support.
834 2017-11-28 Jakub Jelinek <jakub@redhat.com>
836 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
839 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
841 * Make-lang.in (c.install-plugin): Install backend import library.
843 2017-11-23 Jakub Jelinek <jakub@redhat.com>
845 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
848 2017-11-23 Mike Stump <mikestump@comcast.net>
849 Eric Botcazou <ebotcazou@adacore.com>
851 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
853 (c_parser_do_statement): Likewise.
854 (c_parser_for_statement): Likewise.
856 2017-11-22 David Malcolm <dmalcolm@redhat.com>
859 * c-objc-common.c (c_tree_printer): Convert penultimate param from
860 bool to bool *. Within '%T' handling, if showing an "aka", use
861 "quoted" param to add appropriate quoting.
863 2017-11-22 Marek Polacek <polacek@redhat.com>
868 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
870 2017-11-21 David Malcolm <dmalcolm@redhat.com>
873 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
874 earlier failed lookups.
876 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
878 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
879 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
881 2017-11-20 David Malcolm <dmalcolm@redhat.com>
884 * c-decl.c: Include "c-family/known-headers.h".
885 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
887 (class suggest_missing_header): Move to known-header.h.
888 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
889 than get_c_name_hint.
891 2017-11-20 David Malcolm <dmalcolm@redhat.com>
893 * c-decl.c (get_c_name_hint): New function.
894 (class suggest_missing_header): New class.
895 (lookup_name_fuzzy): Call get_c_name_hint and use it to
896 suggest missing headers to the user.
898 2017-11-20 David Malcolm <dmalcolm@redhat.com>
900 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
901 Include "c-family/name-hint.h"
902 (implicit_decl_warning): Convert "hint" from
903 const char * to name_hint. Pass location to
904 lookup_name_fuzzy. Suppress any deferred diagnostic if the
905 warning was not printed.
906 (undeclared_variable): Likewise for "guessed_id".
907 (lookup_name_fuzzy): Convert return type from const char *
908 to name_hint. Add location_t param.
909 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
910 Include "c-family/name-hint.h"
911 (c_parser_declaration_or_fndef): Convert "hint" from
912 const char * to name_hint. Pass location to lookup_name_fuzzy.
913 (c_parser_parameter_declaration): Likewise.
915 2017-11-19 Jakub Jelinek <jakub@redhat.com>
919 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
921 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
922 handle_omp_array_sections): Likewise.
923 (digest_init): Don't call decl_constant_value_for_optimization.
924 * c-tree.h (decl_constant_value_for_optimization): Removed.
925 * c-fold.c (c_fold_array_ref): New function.
926 (c_fully_fold_internal): Add LVAL argument, propagate it through
927 recursive calls. For VAR_P call decl_constant_value and
928 unshare if not LVAL and either optimizing or IN_INIT. Remove
929 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
930 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
931 (c_fully_fold): Add LVAL argument, pass it through to
932 c_fully_fold_internal.
933 (decl_constant_value_for_optimization): Removed.
935 2017-11-15 Joseph Myers <joseph@codesourcery.com>
938 * c-parser.c (check_tgmath_function): New function.
939 (enum tgmath_parm_kind): New enum.
940 (c_parser_postfix_expression): Handle __builtin_tgmath.
942 2017-10-31 David Malcolm <dmalcolm@redhat.com>
944 * c-decl.c (implicit_decl_warning): Update for renaming of
945 pedwarn_at_rich_loc and warning_at_rich_loc.
946 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
947 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
948 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
949 (c_parser_struct_or_union_specifier): Likewise for renaming of
951 (c_parser_parameter_declaration): Likewise for renaming of
953 * c-typeck.c (build_component_ref): Likewise.
954 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
955 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
956 (set_init_label): Likewise for renaming of error_at_rich_loc.
958 2017-10-30 Richard Biener <rguenther@suse.de>
960 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
963 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
965 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
966 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
968 2017-10-25 David Malcolm <dmalcolm@redhat.com>
971 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
974 2017-10-25 Jakub Jelinek <jakub@redhat.com>
977 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
978 newdecl to corresponding __builtin_ if any.
980 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
983 * c-decl.c (diagnose_mismatched_decls): Use
984 OPT_Wbuiltin_declaration_mismatch.
986 2017-10-12 David Malcolm <dmalcolm@redhat.com>
988 * c-parser.c (c_parser_require): Add "type_is_unique" param and
989 use it to guard calls to maybe_suggest_missing_token_insertion.
990 (c_parser_parms_list_declarator): Override default value of new
991 "type_is_unique" param to c_parser_require.
992 (c_parser_asm_statement): Likewise.
993 * c-parser.h (c_parser_require): Add "type_is_unique" param,
996 2017-10-11 Nathan Sidwell <nathan@acm.org>
998 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1000 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1002 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1003 operating on trees as wide_ints.
1004 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1005 (c_tree_equal): Likewise.
1007 2017-10-04 David Malcolm <dmalcolm@redhat.com>
1009 * c-decl.c (push_parm_decl): Store c_parm's location into the
1011 (build_c_parm): Add "loc" param and store it within the c_parm.
1012 * c-parser.c (struct c_parser): Add "last_token_location" field.
1013 (c_parser_consume_token): Store location of the token into the
1015 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1016 when handling a FUNCTION_DECL, if it doesn't already have them.
1017 (c_parser_parameter_declaration): Generate a location for the
1018 parameter, and pass it to the call to build_c_parm.
1019 * c-tree.h (struct c_parm): Add field "loc".
1020 (build_c_parm): Add location_t param.
1021 * c-typeck.c (get_fndecl_argument_location): New function.
1022 (inform_for_arg): New function.
1023 (convert_for_assignment): Use inform_for_arg when dealing with
1026 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1028 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1030 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1031 don't SET_DECL_C_BIT_FIELD here.
1034 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1035 instead of trying to set just TREE_READONLY manually.
1037 2017-09-16 Tom de Vries <tom@codesourcery.com>
1040 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1043 2017-09-15 Joseph Myers <joseph@codesourcery.com>
1046 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1048 (build_conditional_expr): For C11, generate result with excess
1049 precision when one argument is an integer and the other is of a
1050 type using excess precision.
1052 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1054 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1056 2017-09-13 Marek Polacek <polacek@redhat.com>
1059 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1060 than expr.original_type.
1062 2017-09-12 Nathan Sidwell <nathan@acm.org>
1064 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1065 resort_sorted_fields): Moved from c-family/c-common.c.
1066 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1068 2017-09-01 Joseph Myers <joseph@codesourcery.com>
1071 * c-typeck.c (build_atomic_assign): Handle argument with excess
1072 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1073 argument passed to build_binary_op and convert_for_assignment but
1074 not for call to c_fully_fold.
1075 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1076 Ensure build_binary_op is called with argument with original
1077 semantic type. Avoid calling c_fully_fold with an
1078 EXCESS_PRECISION_EXPR from build_binary_op.
1080 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1083 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1085 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1086 Alan Hayward <alan.hayward@arm.com>
1087 David Sherwood <david.sherwood@arm.com>
1089 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1090 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1091 m1 and m2 to the signed equivalent of a fixed-point
1094 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1096 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1097 than CAN_HAVE_LOCATION_P when determining whether to use the
1098 location_t value within "value".
1100 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1102 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1103 rather than peeking the location of the first token.
1104 * c-tree.h (c_expr::get_location): New method.
1106 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1108 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1109 to check_function_arguments.
1111 2017-08-18 Marek Polacek <polacek@redhat.com>
1113 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1116 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1119 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1120 (check_bitfield_type_and_width): Don't allow bit-field with
1121 warn_if_not_aligned type.
1123 2017-08-14 Martin Sebor <msebor@redhat.com>
1126 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1128 2017-08-11 Marek Polacek <polacek@redhat.com>
1131 * c-decl.c (pushtag): Only print inform if the warning was printed.
1132 (grokdeclarator): Likewise.
1134 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1136 * c-parser.c (c_parser_error): Rename to...
1137 (c_parser_error_richloc): ...this, making static, and adding
1138 "richloc" parameter, passing it to the c_parse_error call,
1139 rather than calling c_parser_set_source_position_from_token.
1140 (c_parser_error): Reintroduce, reimplementing in terms of the
1141 above, converting return type from void to bool.
1142 (class token_pair): New class.
1143 (struct matching_paren_traits): New struct.
1144 (matching_parens): New typedef.
1145 (struct matching_brace_traits): New struct.
1146 (matching_braces): New typedef.
1147 (get_matching_symbol): New function.
1148 (c_parser_require): Add param MATCHING_LOCATION, using it to
1149 highlight matching "opening" tokens for missing "closing" tokens.
1150 (c_parser_skip_until_found): Likewise.
1151 (c_parser_static_assert_declaration_no_semi): Convert explicit
1152 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1153 class matching_parens, so that the pertinent open parenthesis is
1154 highlighted when there are problems locating the close
1156 (c_parser_struct_or_union_specifier): Likewise.
1157 (c_parser_typeof_specifier): Likewise.
1158 (c_parser_alignas_specifier): Likewise.
1159 (c_parser_simple_asm_expr): Likewise.
1160 (c_parser_braced_init): Likewise, for matching_braces.
1161 (c_parser_paren_condition): Likewise, for matching_parens.
1162 (c_parser_switch_statement): Likewise.
1163 (c_parser_for_statement): Likewise.
1164 (c_parser_asm_statement): Likewise.
1165 (c_parser_asm_operands): Likewise.
1166 (c_parser_cast_expression): Likewise.
1167 (c_parser_sizeof_expression): Likewise.
1168 (c_parser_alignof_expression): Likewise.
1169 (c_parser_generic_selection): Likewise.
1170 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1171 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1172 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1173 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1174 c_parser_skip_until_found call.
1175 (c_parser_objc_class_definition): Use class matching_parens as
1177 (c_parser_objc_method_decl): Likewise.
1178 (c_parser_objc_try_catch_finally_statement): Likewise.
1179 (c_parser_objc_synchronized_statement): Likewise.
1180 (c_parser_objc_at_property_declaration): Likewise.
1181 (c_parser_oacc_wait_list): Likewise.
1182 (c_parser_omp_var_list_parens): Likewise.
1183 (c_parser_omp_clause_collapse): Likewise.
1184 (c_parser_omp_clause_default): Likewise.
1185 (c_parser_omp_clause_if): Likewise.
1186 (c_parser_omp_clause_num_threads): Likewise.
1187 (c_parser_omp_clause_num_tasks): Likewise.
1188 (c_parser_omp_clause_grainsize): Likewise.
1189 (c_parser_omp_clause_priority): Likewise.
1190 (c_parser_omp_clause_hint): Likewise.
1191 (c_parser_omp_clause_defaultmap): Likewise.
1192 (c_parser_oacc_single_int_clause): Likewise.
1193 (c_parser_omp_clause_ordered): Likewise.
1194 (c_parser_omp_clause_reduction): Likewise.
1195 (c_parser_omp_clause_schedule): Likewise.
1196 (c_parser_omp_clause_num_teams): Likewise.
1197 (c_parser_omp_clause_thread_limit): Likewise.
1198 (c_parser_omp_clause_aligned): Likewise.
1199 (c_parser_omp_clause_linear): Likewise.
1200 (c_parser_omp_clause_safelen): Likewise.
1201 (c_parser_omp_clause_simdlen): Likewise.
1202 (c_parser_omp_clause_depend): Likewise.
1203 (c_parser_omp_clause_map): Likewise.
1204 (c_parser_omp_clause_device): Likewise.
1205 (c_parser_omp_clause_dist_schedule): Likewise.
1206 (c_parser_omp_clause_proc_bind): Likewise.
1207 (c_parser_omp_clause_uniform): Likewise.
1208 (c_parser_omp_for_loop): Likewise.
1209 (c_parser_cilk_clause_vectorlength): Likewise.
1210 (c_parser_cilk_clause_linear): Likewise.
1211 (c_parser_transaction_expression): Likewise.
1212 * c-parser.h (c_parser_require): Add param matching_location with
1213 default UNKNOWN_LOCATION.
1214 (c_parser_error): Convert return type from void to bool.
1215 (c_parser_skip_until_found): Add param matching_location with
1216 default UNKNOWN_LOCATION.
1218 2017-08-09 Marek Polacek <polacek@redhat.com>
1220 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1221 * c-tree.h (build_external_ref): Update declaration.
1222 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1223 (build_external_ref): Change the type of a parameter to bool.
1224 (parser_build_binary_op): Use true/false instead of 1/0.
1225 (pointer_diff): Likewise.
1226 (build_modify_expr): Likewise.
1227 (set_designator): Change the type of a parameter to bool.
1228 (set_init_index): Use true/false instead of 1/0.
1229 (set_init_label): Likewise.
1230 (output_init_element): Change the type of a parameter to bool.
1231 (output_pending_init_elements): Use true/false instead of 1/0.
1232 (process_init_element): Likewise.
1233 (build_binary_op): Change the type of a parameter to bool.
1235 2017-08-09 Marek Polacek <polacek@redhat.com>
1238 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1239 Call emit_diagnostic_valist instead of pedwarn.
1240 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1241 Print the relevant types in diagnostics.
1243 2017-08-09 Marek Polacek <polacek@redhat.com>
1246 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1247 build_conditional_expr.
1248 * c-parser.c (c_parser_conditional_expression): Create locations for
1249 EXP1 and EXP2 from their source ranges. Pass the locations down to
1250 build_conditional_expr.
1251 * c-tree.h (build_conditional_expr): Update declaration.
1252 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1253 For -Wsign-compare, also print the types.
1255 2017-08-08 Martin Liska <mliska@suse.cz>
1257 * c-convert.c: Include header files.
1258 * c-typeck.c: Likewise.
1260 2017-08-07 Martin Liska <mliska@suse.cz>
1262 * c-parser.c (c_parser_attributes): Canonicalize name of an
1265 2017-08-02 Marek Polacek <polacek@redhat.com>
1268 * c-parser.c (c_parser_unary_expression): Use set_error.
1272 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1273 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1275 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
1276 Martin Liska <mliska@suse.cz>
1278 * c-typeck.c (c_finish_goto_label): Build gimple predict
1281 2017-07-31 Martin Liska <mliska@suse.cz>
1284 * c-convert.c (convert): Guard condition with flag_sanitize_p
1285 also with current_function_decl non-null equality.
1286 * c-decl.c (grokdeclarator): Likewise.
1287 * c-typeck.c (build_binary_op): Likewise.
1289 2017-07-25 Marek Polacek <polacek@redhat.com>
1291 * c-decl.c (grokfield): Remove local variable.
1293 2017-07-25 Marek Polacek <polacek@redhat.com>
1296 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1297 macro expansion if the body is in { }.
1298 (c_parser_while_statement): Likewise.
1299 (c_parser_for_statement): Likewise.
1301 2017-07-18 Nathan Sidwell <nathan@acm.org>
1303 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1305 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1307 * c-decl.c (implicitly_declare): When suggesting a missing
1308 #include, provide a fix-it hint.
1310 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1312 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1313 and call that instead.
1314 * c-tree.h (selftest::run_c_tests): New decl.
1316 2017-06-26 Marek Polacek <polacek@redhat.com>
1319 * c-parser.c (c_parser_if_body): Set the location of the
1320 body of the conditional after parsing all the labels. Call
1321 warn_for_multistatement_macros.
1322 (c_parser_else_body): Likewise.
1323 (c_parser_switch_statement): Likewise.
1324 (c_parser_while_statement): Likewise.
1325 (c_parser_for_statement): Likewise.
1326 (c_parser_statement): Add a default argument. Save the location
1327 after labels have been parsed.
1328 (c_parser_c99_block_statement): Likewise.
1330 2017-06-19 Richard Biener <rguenther@suse.de>
1332 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1333 negated _Literals to parse _Literal (int) -1.
1335 2017-06-13 Martin Liska <mliska@suse.cz>
1338 * c-convert.c (convert): Use sanitize_flags_p.
1339 * c-decl.c (grokdeclarator): Likewise.
1340 * c-typeck.c (convert_for_assignment): Likewise.
1341 (c_finish_return): Likewise.
1342 (build_binary_op): Likewise.
1344 2017-06-08 Jakub Jelinek <jakub@redhat.com>
1347 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1348 to sizetype before size_binop.
1350 2017-06-07 Jakub Jelinek <jakub@redhat.com>
1352 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1355 2017-06-06 Marek Polacek <polacek@redhat.com>
1358 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1360 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1362 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1364 * c-parser.c (c_parser_binary_expression): Implement the
1365 -Wsizeof_pointer_div warning.
1366 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1367 from a parenthesized expression.
1368 (c_parser_expr_list): Use c_last_sizeof_loc.
1369 * c-tree.h (c_last_sizeof_loc): New external.
1370 * c-typeck.c (c_last_sizeof_loc): New variable.
1371 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1373 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1376 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1378 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1380 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1383 2017-05-24 Martin Sebor <msebor@redhat.com>
1386 * c-fold.c (c_fully_fold_internal): Adjust.
1387 * c-typeck.c (parser_build_unary_op): Adjust.
1389 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1391 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1392 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1395 2017-05-23 Marek Polacek <polacek@redhat.com>
1397 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1400 2017-05-22 Jakub Jelinek <jakub@redhat.com>
1402 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1403 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1404 it returned invariant. Call tree_invariant_p unconditionally
1405 afterwards to decide whether to return expr or op0.
1407 2017-05-22 Nathan Sidwell <nathan@acm.org>
1409 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1411 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1413 * c-parser.c (c_parser_omp_clause_default): Handle
1414 "OMP_CLAUSE_DEFAULT_PRESENT".
1416 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1418 * config-lang.in (gtfiles): Add c-family/c-format.c.
1420 2017-05-18 Nathan Sidwell <nathan@acm.org>
1422 * c-decl.c (pushdecl_top_level): Delete unused function.
1424 2017-05-18 Marek Polacek <polacek@redhat.com>
1426 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1427 (check_earlier_gotos): Likewise.
1428 (define_label): Likewise.
1429 (pending_xref_error): Likewise.
1430 (smallest_type_quals_location): Likewise.
1431 (grokdeclarator): Likewise.
1432 (grokparms): Likewise.
1433 (identifier_global_value): Likewise.
1434 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1435 (find_init_member): Likewise.
1437 2017-05-18 Marek Polacek <polacek@redhat.com>
1439 * c-decl.c (start_decl): Use false/true instead of 0/1.
1440 (grokdeclarator): Likewise.
1441 (finish_struct): Likewise.
1442 (start_function): Change the return type to bool. Use false/true
1444 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1445 * c-tree.h (start_function): Update.
1446 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1447 (set_designator): Change the return type to bool. Use false/true
1450 2017-05-17 Marek Polacek <polacek@redhat.com>
1452 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1453 * c-typeck.c: Likewise.
1455 2017-05-17 Marek Polacek <polacek@redhat.com>
1458 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1459 DECL_IGNORED_P even for non-static compound literals.
1461 2017-05-17 Martin Liska <mliska@suse.cz>
1463 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1464 use it instead of int type.
1466 2017-05-17 Marek Polacek <polacek@redhat.com>
1468 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1470 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1471 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1472 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1473 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1475 (c_parser_conditional_expression): Likewise.
1476 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1477 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1478 (process_init_element): Likewise.
1479 (build_binary_op): Likewise.
1480 (handle_omp_array_sections_1): Likewise.
1482 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1484 * c-parser.c (c_parser_omp_clause_num_gangs)
1485 (c_parser_omp_clause_num_workers)
1486 (c_parser_omp_clause_vector_length): Merge functions into...
1487 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1490 2017-05-11 Nathan Sidwell <nathan@acm.org>
1492 * gimple-parser.c: Don't #include tree-dump.h.
1494 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1497 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1499 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1502 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1503 incorrect __MEM syntax.
1505 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1508 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1511 2017-05-09 Nathan Sidwell <nathan@acm.org>
1513 * c-tree.h (pushdecl): Declare.
1515 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1517 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1518 with diagnostic_report_diagnostic.
1519 * c-errors.c (pedwarn_c99): Likewise.
1520 (pedwarn_c90): Likewise.
1522 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1525 * c-gimplify.c (c_gimplify_expr): Remove calls to
1526 cilk_gimplifY_call_params_in_spawned_fn.
1528 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1530 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1531 hint for removing extra semicolon.
1533 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1536 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1537 enabled, set specs->type to integer_type_node.
1539 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1541 * c-array-notation.c: Fix typo in comment.
1543 2017-03-29 Marek Polacek <polacek@redhat.com>
1546 * c-decl.c (finish_decl): Check VAR_P.
1548 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1551 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1552 * c-typeck.c (c_mark_addressable): Likewise. Look through
1553 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1555 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1557 2017-03-23 Marek Polacek <polacek@redhat.com>
1559 * c-tree.h: Remove a C_RID_YYCODE reference.
1561 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1564 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1565 optional COMPOUND_EXPR with ubsan instrumentation.
1567 2017-03-17 Marek Polacek <polacek@redhat.com>
1569 * c-parser.c: Add C11 references.
1571 2017-03-15 Marek Polacek <polacek@redhat.com>
1573 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1575 2017-03-11 Marek Polacek <polacek@redhat.com>
1577 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1579 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1581 PR translation/79848
1582 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1584 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1586 2017-03-09 Marek Polacek <polacek@redhat.com>
1589 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1590 parameter declarations with initializers.
1592 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1595 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1598 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1601 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1602 for "may only be used in compound statements" diagnostics, change it
1603 such that the same translatable string is used for all pragmas. For
1604 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1606 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1607 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1608 "may only be used in compound statements" diagnostics, such that the
1609 same translatable string is used for all pragmas.
1611 2017-03-04 Marek Polacek <polacek@redhat.com>
1614 * c-decl.c (implicit_decl_warning): Add missing space.
1616 2017-03-03 Marek Polacek <polacek@redhat.com>
1619 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1620 current_function_prototype_arg_types is error_mark_node. Fix
1621 formatting. Use TREE_VALUE instead of TREE_TYPE.
1623 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1626 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1627 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1628 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1632 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1633 instead of %<_Generic>.
1634 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1635 (c_parser_omp_target_exit_data): Use %<release%> instead of
1638 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1640 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1641 instead of just cond ? "..." : "...".
1642 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1643 for "enter"/"exit" keyword.
1644 (c_finish_oacc_routine): Don't use %s to supply portions of the
1647 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1650 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1651 handle -Wrestrict here.
1652 * c-typeck.c (build_function_call_vec): Adjust
1653 check_function_arguments caller.
1655 2017-02-23 Richard Biener <rguenther@suse.de>
1658 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1659 to initialize c_exprs to return.
1660 (c_parser_gimple_binary_expression): Likewise.
1661 (c_parser_gimple_unary_expression): Likewise.
1662 (c_parser_gimple_postfix_expression): Likewise.
1664 2017-02-22 Marek Polacek <polacek@redhat.com>
1667 * c-typeck.c (convert_arguments): Handle error_mark_node.
1669 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1671 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1672 value of c_parser_parse_ssa_name against error_mark_node and emit
1673 error if ssa name is anonymous and written as default definition.
1675 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1677 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1680 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1683 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1684 ignore #pragma omp target even when not followed by identifier.
1686 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1688 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1689 (c_parser_gimple_unary_expression): Likewise.
1691 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1693 * c-parser.c (c_parser_oacc_declare): Add missing space in
1696 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1699 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1700 set_c_expr_source_range when parsing ssa-name.
1702 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1703 Richard Biener <rguenther@suse.de>
1705 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1706 building IL when arguments are error_mark_node.
1707 (c_parser_gimple_unary_expression): Likewise.
1708 (c_parser_gimple_if_stmt): Likewise.
1709 (c_parser_gimple_switch_stmt): Likewise.
1710 (c_parser_gimple_return_stmt): Likewise.
1711 (c_parser_parse_ssa_name): When name lookup fails do not build
1712 an SSA name. Use undeclared rather than not declared in error
1715 2017-02-09 Marek Polacek <polacek@redhat.com>
1718 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1719 instead of c_parser_skip_until_found.
1721 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1724 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1725 symtab_node::get on automatic variables.
1727 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1728 Chung-Lin Tang <cltang@codesourcery.com>
1730 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1731 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1733 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1735 2017-02-07 Richard Biener <rguenther@suse.de>
1737 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1738 (c_parser_gimple_postfix_expression_after_primary):
1739 Do not use c_build_function_call_vec to avoid folding and promotion.
1742 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1745 * c-decl.c (pop_scope): Pass main_input_filename to
1746 build_translation_unit_decl.
1748 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1750 * c-parser.c: Include "read-rtl-function.h" and
1752 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1753 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1754 production. Update for renaming of field "gimple_pass" to
1755 "gimple_or_rtl_pass". If __RTL was seen, call
1756 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1757 to an auto_timevar, to cope with early exit.
1758 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1759 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1760 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1762 (c_parser_parse_rtl_body): New function.
1763 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1764 (struct c_declspecs): Rename field "gimple_pass" to
1765 "gimple_or_rtl_pass". Add field "rtl_p".
1766 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1767 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1768 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1769 (c_parser_gimple_or_rtl_pass_list): ...this.
1771 2017-01-20 Marek Polacek <polacek@redhat.com>
1774 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1776 2017-01-13 Richard Biener <rguenther@suse.de>
1778 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1781 2017-01-13 Richard Biener <rguenther@suse.de>
1783 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1784 _Literal ( type-name ) number.
1786 2017-01-12 Richard Biener <rguenther@suse.de>
1788 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1791 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1794 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1797 2017-01-11 Richard Biener <rguenther@suse.de>
1800 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1801 returns on parse errors.
1803 2017-01-04 Marek Polacek <polacek@redhat.com>
1806 * c-parser.c (c_parser_postfix_expression): Mark zero character
1807 constants by setting original_type in c_expr.
1808 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1809 with a zero character constant.
1810 (char_type_p): New function.
1812 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1814 * c-parser.c (c_parser_declaration_or_fndef): Create a
1815 rich_location at init_loc and parse it to start_init.
1816 (last_init_list_comma): New global.
1817 (c_parser_braced_init): Update last_init_list_comma when parsing
1818 commas. Pass it to pop_init_level. Pass location of closing
1819 brace to pop_init_level.
1820 (c_parser_postfix_expression_after_paren_type): Create a
1821 rich_location at type_loc and parse it to start_init.
1822 (c_parser_omp_declare_reduction): Likewise for loc.
1823 * c-tree.h (start_init): Add rich_location * param.
1824 (pop_init_level): Add location_t param.
1825 * c-typeck.c (struct initializer_stack): Add field
1826 "missing_brace_richloc".
1827 (start_init): Add richloc param, use it to initialize
1828 the stack node's missing_brace_richloc.
1829 (last_init_list_comma): New decl.
1830 (finish_implicit_inits): Pass last_init_list_comma to
1832 (push_init_level): When finding missing open braces, add fix-it
1833 hints to the richloc.
1834 (pop_init_level): Add "insert_before" param and pass it
1835 when calling pop_init_level. Add fixits about missing
1836 close braces to any richloc. Use the richloc for the
1837 -Wmissing-braces warning.
1838 (set_designator): Pass last_init_list_comma to pop_init_level.
1839 (process_init_element): Likewise.
1841 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1843 Update copyright years.
1845 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1848 * c-typeck.c (build_function_call_vec): If check_function_arguments
1849 returns true, set TREE_NO_WARNING on CALL_EXPR.
1852 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1853 to *expr instead of overwriting it.
1855 2016-12-20 Richard Biener <rguenther@suse.de>
1857 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1859 (c_parser_gimple_statement): Only build assigns for non-error
1861 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1863 2016-12-14 Martin Jambor <mjambor@suse.cz>
1865 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1867 (c_finish_oacc_routine): Adjusted call to
1868 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1869 to use their new names.
1870 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1872 (c_parser_oacc_update): Likewise.
1873 (c_parser_omp_simd): Likewise.
1874 (c_parser_omp_target_update): Likewise.
1875 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1876 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1878 (c_finish_omp_cancellation_point): Likewise.
1879 * gimple-parser.c: Do not include omp-low.h
1881 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1882 James Norris <jnorris@codesourcery.com>
1884 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1885 EXIT_DATA,WAIT} are not used in compound statements.
1886 (c_parser_oacc_enter_exit_data): Update diagnostics.
1888 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1891 * c-decl.c (diagnose_mismatched_decls): Use
1892 OPT_Wbuiltin_declaration_mismatch here too.
1894 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1895 Alan Hayward <alan.hayward@arm.com>
1896 David Sherwood <david.sherwood@arm.com>
1898 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1899 (make_label, finish_struct): Likewise.
1901 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1902 Richard Biener <rguenther@suse.de>
1904 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1905 * config-lang.in (gtfiles): Add c/c-parser.h.
1906 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1907 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1908 * c-parser.c (enum c_id_kind, struct c_token,
1909 c_parser_next_token_is, c_parser_next_token_is_not,
1910 c_parser_next_token_is_keyword,
1911 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1913 * c-parser.h: ... new header.
1914 * c-parser.c: Include c-parser.h and gimple-parser.h.
1915 (c_parser_peek_token, c_parser_peek_2nd_token,
1916 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1917 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1918 c_parser_error, c_parser_require, c_parser_skip_until_found,
1919 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1920 c_parser_type_name): Export.
1921 (c_parser_tokens_buf): New function.
1922 (c_parser_error): Likewise.
1923 (c_parser_set_error): Likewise.
1924 (c_parser_declspecs): Handle RID_GIMPLE.
1925 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1926 via c_parser_parse_gimple_body.
1927 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1928 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1929 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1930 c_parser_error, c_parser_require, c_parser_skip_until_found,
1931 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1932 c_parser_type_name): Declare.
1933 (struct c_parser): Declare forward.
1934 (c_parser_tokens_buf): Declare.
1935 (c_parser_error): Likewise.
1936 (c_parser_set_error): Likewise.
1937 * gimple-parser.c: New file.
1938 * gimple-parser.h: Likewise.
1940 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1943 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1946 2016-09-11 Le-Chun Wu <lcwu@google.com>
1947 Mark Wielaard <mjw@redhat.com>
1949 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1950 to the given -Wshadow= variant.
1952 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1954 * c-typeck.c: Include memmodel.h.
1956 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1959 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1960 instead of lhd_return_null_tree_v.
1962 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1965 * c-decl.c (smallest_type_quals_location): New static function.
1966 (grokdeclarator): Try to find the correct location for an ignored
1969 2016-09-26 Marek Polacek <polacek@redhat.com>
1972 * c-decl.c (pop_scope): Add gcc_fallthrough.
1974 2016-09-26 Marek Polacek <polacek@redhat.com>
1977 * c-parser.c (struct c_token): Add flags field.
1978 (c_lex_one_token): Pass it to c_lex_with_flags.
1979 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1980 into IFN_FALLTHROUGH.
1981 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1982 attribute fallthrough after a case label or default label.
1983 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1985 2016-09-24 Marek Polacek <polacek@redhat.com>
1988 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1989 have boolean value. Warn about ++/-- on booleans.
1991 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1993 * c-parser.c (incomplete_record_decls): Remove unnecessary
1994 = vNULL initialization of file scope vec.
1996 2016-09-16 Marek Polacek <polacek@redhat.com>
1998 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2000 2016-09-14 Marek Polacek <polacek@redhat.com>
2002 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2003 (fix_array_notation_expr): Likewise.
2004 * c-decl.c (finish_decl): Likewise.
2005 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2006 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2007 (function_to_pointer_conversion): Use false instead of 0.
2008 (convert_lvalue_to_rvalue): Likewise.
2009 (parser_build_unary_op): Likewise.
2010 (build_atomic_assign): Likewise.
2011 (build_unary_op): Change nonconvert parameter type to bool, use
2012 true/false instead of 1/0.
2013 (build_binary_op): Use true instead of 1.
2015 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2017 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2018 of add_fixit_insert to add_fixit_insert_before.
2020 2016-09-13 Marek Polacek <polacek@redhat.com>
2022 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2025 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2028 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2029 COMPOUND_EXPR to warn_for_omitted_condop.
2031 2016-09-07 David Malcolm <dmalcolm@redhat.com>
2033 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2034 c_get_substring_location for this new langhook.
2036 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2039 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2041 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2042 instead of mark_exp_read on low_bound/length expression.
2043 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2044 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2045 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2046 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2047 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2048 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2049 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2050 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2051 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2052 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2053 instead of mark_expr_read.
2054 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2055 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2056 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2057 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2058 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2059 array section bases outside of depend clause, for depend clause
2060 use convert_lvalue_to_rvalue on the base.
2061 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2062 linear, aligned, map, to and from clauses.
2063 (c_omp_clause_copy_ctor): New function.
2065 2016-09-01 Marek Polacek <polacek@redhat.com>
2068 * c-typeck.c (composite_type): Add FALLTHRU comment.
2070 2016-08-31 David Malcolm <dmalcolm@redhat.com>
2072 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2073 to the insertion fixits for "struct", "union", and "enum".
2075 2016-08-30 David Malcolm <dmalcolm@redhat.com>
2077 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2078 rather than add_fixit_misspelled_id.
2079 (undeclared_variable): Likewise.
2080 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2081 now-redundant "here" params from add_fixit_insert method calls.
2082 (c_parser_parameter_declaration): Likewise.
2083 * c-typeck.c (build_component_ref): Remove now-redundant range
2084 param from add_fixit_replace method calls.
2086 2016-08-25 Marek Polacek <polacek@redhat.com>
2088 * c-typeck.c (parser_build_binary_op): Pass LHS to
2089 warn_logical_not_parentheses.
2091 2016-08-25 Marek Polacek <polacek@redhat.com>
2094 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2095 or _FloatN or _FloatNx is not supported.
2096 (finish_declspecs): Set type to integer_type_node when _FloatN or
2097 _FloatNx is not supported.
2099 2016-08-19 Joseph Myers <joseph@codesourcery.com>
2102 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2103 (struct c_declspecs): Add field floatn_nx_idx.
2104 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2105 and _FloatNx type specifiers.
2106 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2107 (c_parser_declspecs, c_parser_attribute_any_word)
2108 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2109 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2110 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2111 narrower than double.
2113 2016-08-12 Jakub Jelinek <jakub@redhat.com>
2114 Martin Liska <mliska@suse.cz>
2117 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2118 % to determine val element to change. Assert that
2119 wchar_bytes * charwidth fits into val array.
2121 2016-08-12 Marek Polacek <polacek@redhat.com>
2124 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2125 (c_parser_postfix_expression): Likewise.
2126 * c-typeck.c (build_unary_op): Adjust fall through comment.
2127 (c_mark_addressable): Likewise.
2129 2016-08-11 Jakub Jelinek <jakub@redhat.com>
2132 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2133 array member through typedef, for orig_qual_indirect == 0 clear
2136 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2139 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2140 this up to selftest::run_c_tests.
2141 (selftest::run_c_tests): New function.
2143 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2145 * c-parser.c (struct oacc_routine_data): Add error_seen and
2146 fndecl_seen members.
2147 (c_finish_oacc_routine): Use these.
2148 (c_parser_declaration_or_fndef): Adjust.
2149 (c_parser_oacc_routine): Likewise. Support more C language
2150 constructs, and improve diagnostics. Move pragma context
2152 (c_parser_pragma): ... here.
2154 * c-parser.c (struct oacc_routine_data): New.
2155 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2157 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2158 declare target" attribute.
2160 2016-08-01 Jan Beulich <jbeulich@suse.com>
2162 * c-fold.c (c_fully_fold_internal): Also emit shift count
2163 warnings for vector types.
2164 * c-typeck.c (build_binary_op): Likewise.
2166 2016-07-29 Marek Polacek <polacek@redhat.com>
2169 * c-decl.c (finish_struct): Rephrase an error message.
2172 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2173 to error node for invalid code.
2176 * c-decl.c (implicitly_declare): Return decl early not only for
2177 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2179 2016-07-29 Jakub Jelinek <jakub@redhat.com>
2182 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2183 on GNU extern inline functions.
2185 2016-07-29 Marek Polacek <polacek@redhat.com>
2188 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2191 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
2193 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2195 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2197 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2199 (best_macro_match): Likewise, converting from a typedef to a
2201 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2202 (lookup_name_fuzzy): Update for change of best_macro_match to a
2203 subclass with a ctor that calls cpp_forall_identifiers.
2205 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2207 * c-decl.c (implicit_decl_warning): Update for conversion of
2208 return type of lookup_name_fuzzy to const char *.
2209 (undeclared_variable): Likewise.
2210 (lookup_name_fuzzy): Convert return type from tree to
2212 * c-parser.c (c_parser_declaration_or_fndef): Update for
2213 conversion of return type of lookup_name_fuzzy to const char *.
2214 (c_parser_parameter_declaration): Likewise.
2216 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2218 * c-parser.c (c_parser_oacc_declare): Don't scan for
2220 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2221 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2222 zero-length subarrays.
2224 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2227 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2228 instead of FUZZY_LOOKUP_NAME.
2229 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2230 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2232 2016-07-14 Jakub Jelinek <jakub@redhat.com>
2235 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2237 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2239 * c-parser.c (c_parser_generic_selection): Make type of variable
2241 (c_parser_omp_declare_simd): Likewise.
2243 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2245 * c-decl.c (struct c_struct_parse_info): Change member types
2246 from vec to auto_vec.
2247 (start_struct): Adjust.
2248 (finish_struct): Likewise.
2250 2016-07-02 Jakub Jelinek <jakub@redhat.com>
2253 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2255 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2257 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2258 Move pragma context checking into...
2259 (c_parser_omp_cancellation_point): ... here, and improve
2260 diagnostic messages.
2261 * c-typeck.c (c_finish_omp_cancel)
2262 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2264 2016-06-29 Jakub Jelinek <jakub@redhat.com>
2267 * c-typeck.c (c_build_qualified_type): Don't clear
2268 C_TYPE_INCOMPLETE_VARS for the main variant.
2270 2016-06-28 Martin Sebor <msebor@redhat.com>
2273 * c-typeck.c (output_init_element): Diagnose incompatible types
2274 before non-constant initializers.
2276 2016-06-28 Jakub Jelinek <jakub@redhat.com>
2278 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2280 2016-06-23 Andi Kleen <ak@linux.intel.com>
2282 * Make-lang.in: Add support for autofdo.
2284 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2287 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2288 (implicit_decl_warning): When issuing warnings for implicit
2289 declarations, attempt to provide a suggestion via
2291 (undeclared_variable): Likewise when issuing errors.
2292 (lookup_name_in_scope): Likewise.
2293 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2294 (best_macro_match): New typedef.
2295 (find_closest_macro_cpp_cb): New function.
2296 (lookup_name_fuzzy): New function.
2297 * c-parser.c: Include gcc-rich-location.h.
2298 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2299 (c_keyword_starts_typename): ...this new function.
2300 (c_parser_declaration_or_fndef): When issuing errors about
2301 missing "struct" etc, add a fixit. For other kinds of errors,
2302 attempt to provide a suggestion via lookup_name_fuzzy.
2303 (c_parser_parms_declarator): When looking ahead to detect typos in
2304 type names, also reject CPP_KEYWORD.
2305 (c_parser_parameter_declaration): When issuing errors about
2306 unknown type names, attempt to provide a suggestion via
2308 * c-tree.h (c_keyword_starts_typename): New prototype.
2310 2016-06-20 Joseph Myers <joseph@codesourcery.com>
2313 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2314 c_common_type returns error_mark_node.
2316 2016-06-19 Martin Sebor <msebor@redhat.com>
2319 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2320 __alignof__ (expression).
2322 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2324 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2326 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2328 * c-typeck.c (build_component_ref): Simplify fixit code by
2329 using gcc_rich_location::add_fixit_misspelled_id.
2330 (set_init_label): Likewise.
2332 2016-06-13 David Malcolm <dmalcolm@redhat.com>
2334 * c-parser.c (c_parser_initelt): Provide location of name for new
2335 location_t param of set_init_label.
2336 * c-tree.h (set_init_label): Add location_t param.
2337 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2338 param and use it when issuing error messages about unrecognized
2339 field names. Attempt to provide a fixit hint if appropriate,
2340 otherwise update the error message to provide the type name.
2342 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2345 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2348 2016-06-08 Martin Sebor <msebor@redhat.com>
2349 Jakub Jelinek <jakub@redhat.com>
2353 * c-typeck.c (convert_arguments): Don't promote last argument
2354 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2356 2016-06-08 Marek Polacek <polacek@redhat.com>
2359 * c-decl.c (grokdeclarator): Check TYPE_P.
2362 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2365 2016-06-07 David Malcolm <dmalcolm@redhat.com>
2367 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2368 and structure element reference, capture the location of the
2369 element name token and pass it to build_component_ref.
2370 (c_parser_postfix_expression_after_primary): Likewise for
2371 structure element dereference.
2372 (c_parser_omp_variable_list): Likewise for
2373 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2374 * c-tree.h (build_component_ref): Add location_t param.
2375 * c-typeck.c (build_component_ref): Add location_t param
2376 COMPONENT_LOC. Use it, if available, when issuing hints about
2377 mispelled member names to provide a fixit replacement hint.
2379 2016-06-06 Marek Polacek <polacek@redhat.com>
2382 * c-parser.c (c_parser_direct_declarator): Set location.
2384 2016-06-06 Marek Polacek <polacek@redhat.com>
2386 * c-typeck.c (comptypes_internal): Handle comparisons of
2387 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2388 TYPE_REF_CAN_ALIAS_ALL.
2390 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2392 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2393 arguments as addressable when async clause exists.
2395 2016-05-30 Jakub Jelinek <jakub@redhat.com>
2398 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2399 when combined with target construct.
2401 2016-05-26 Jakub Jelinek <jakub@redhat.com>
2403 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2404 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2406 2016-05-25 Marek Polacek <polacek@redhat.com>
2409 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2412 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2414 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2416 * c-parser.c (c_parser_oacc_declare): Add support for
2417 GOMP_MAP_FIRSTPRIVATE_POINTER.
2418 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2419 argument with enum c_omp_region_type ort.
2420 (handle_omp_array_sections): Likewise. Update call to
2421 handle_omp_array_sections_1.
2422 (c_finish_omp_clauses): Add specific errors and warning messages for
2423 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2424 call to handle_omp_array_sections.
2426 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2428 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2430 2016-05-24 Richard Biener <rguenther@suse.de>
2434 * c-typeck.c (build_array_ref): Do not complain about indexing
2435 non-lvalue vectors. Adjust for function name change.
2437 2016-05-20 Martin Sebor <msebor@redhat.com>
2440 * c-typeck.c (error_init): Use
2441 expansion_point_location_if_in_system_header.
2442 (warning_init): Same.
2444 2016-05-19 David Malcolm <dmalcolm@redhat.com>
2447 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2449 (c_parser_postfix_expression): Likewise.
2450 * c-tree.h (c_expr::set_error): New method.
2451 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2452 that result's range is initialized.
2454 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2456 * c-typeck.c (parser_build_unary_op): Fix formatting.
2458 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2460 * c-decl.c (grokdeclarator): Remove errmsg and use of
2461 targetm.invalid_return_type.
2462 (grokparms): Remove errmsg and use of
2463 targetm.invalid_parameter_type.
2465 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2467 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2468 function return type.
2470 2016-05-12 Marek Polacek <polacek@redhat.com>
2473 * c-decl.c (build_compound_literal): Pass LOC down to
2474 c_incomplete_type_error.
2475 * c-tree.h (require_complete_type): Adjust declaration.
2476 (c_incomplete_type_error): Likewise.
2477 * c-typeck.c (require_complete_type): Add location parameter, pass it
2478 down to c_incomplete_type_error.
2479 (c_incomplete_type_error): Add location parameter, pass it down to
2481 (build_component_ref): Pass location down to c_incomplete_type_error.
2482 (default_conversion): Pass location down to require_complete_type.
2483 (build_array_ref): Likewise.
2484 (build_function_call_vec): Likewise.
2485 (convert_arguments): Likewise.
2486 (build_unary_op): Likewise.
2487 (build_c_cast): Likewise.
2488 (build_modify_expr): Likewise.
2489 (convert_for_assignment): Likewise.
2490 (c_finish_omp_clauses): Likewise.
2492 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2495 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2497 * c-errors.c (pedwarn_c90): Return true if warned.
2498 * c-tree.h (pedwarn_c90): Change return type to bool.
2499 (enum c_declspec_word): Add new enumerator cdw_atomic.
2501 2016-05-11 Marek Polacek <polacek@redhat.com>
2504 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2505 diagnose_mismatched_attributes and call it.
2507 2016-05-10 Marek Polacek <polacek@redhat.com>
2510 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2511 on a declaration following the definition.
2513 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2515 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2516 parse it through to c_parser_c99_block_statement.
2517 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2520 2016-05-04 Marek Polacek <polacek@redhat.com>
2522 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2525 2016-05-04 Marek Polacek <polacek@redhat.com>
2528 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2529 for macro expansions.
2531 2016-05-03 Marek Polacek <polacek@redhat.com>
2534 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2535 check_builtin_function_arguments.
2537 2016-05-03 Richard Biener <rguenther@suse.de>
2539 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2540 the checksum from the previous stage.
2542 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2544 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2545 c_finish_omp_clauses.
2546 (c_parser_omp_all_clauses): Likewise.
2547 (c_parser_oacc_cache): Likewise.
2548 (c_parser_oacc_loop): Likewise.
2549 (omp_split_clauses): Likewise.
2550 (c_parser_omp_declare_target): Likewise.
2551 (c_parser_cilk_all_clauses): Likewise.
2552 (c_parser_cilk_for): Likewise.
2553 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2554 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2556 2016-05-02 Marek Polacek <polacek@redhat.com>
2559 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2562 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2565 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2566 OACC_LOOP_CLAUSE_MASK.
2567 (c_parser_oacc_kernels_parallel): Update call to
2568 c_oacc_split_loop_clauses.
2570 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2572 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2573 argument to build_modify_expr in two cases.
2575 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2577 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2578 warn_for_memset instead of warning directly here.
2580 2016-04-26 Marek Polacek <polacek@redhat.com>
2583 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2585 (c_parser_for_statement): ... here.
2586 (c_parser_if_statement): Use it.
2587 (c_parser_switch_statement): Use it.
2588 (c_parser_while_statement): Use it.
2591 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2593 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2596 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2597 instead of c_finish_cilk_clauses.
2598 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2599 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2600 floating-point variables in the linear clause for Cilk Plus.
2602 2016-04-18 Michael Matz <matz@suse.de>
2604 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2605 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2607 2016-04-15 Marek Polacek <polacek@redhat.com>
2610 * c-typeck.c (build_unary_op): Pass location down to error and
2613 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2616 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2618 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2619 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2620 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2621 Adjust c_parser_pragma callers.
2622 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2624 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2626 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2627 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2628 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2629 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2630 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2631 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2632 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2633 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2635 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2636 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2639 2016-04-13 Marek Polacek <polacek@redhat.com>
2642 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2644 (c_parser_statement): Likewise.
2645 (c_parser_c99_block_statement): Likewise.
2646 (c_parser_while_statement): Likewise.
2647 (c_parser_for_statement): Likewise.
2648 (c_parser_if_body): Don't set IF_P here.
2649 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2650 about dangling else here.
2651 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2652 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2653 warn about dangling else here.
2655 2016-04-04 Marek Polacek <polacek@redhat.com>
2658 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2660 2016-03-31 Marek Polacek <polacek@redhat.com>
2663 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2665 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2668 * c-parser.c (c_parser_postfix_expression): Set the source range
2669 for uses of "__builtin_types_compatible_p".
2671 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2674 * c-typeck.c (composite_type): Don't count void_list_node
2675 into len, if the list is terminated by void_list_node, start
2676 with void_list_node instead of NULL for newargs. Stop
2679 2016-03-16 Marek Polacek <polacek@redhat.com>
2682 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2683 nested functions returning VM types.
2685 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2687 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2688 when calling c_finish_omp_clauses.
2690 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2693 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2696 2016-03-04 Marek Polacek <polacek@redhat.com>
2699 * c-parser.c (c_parser_postfix_expression): Call
2700 c_parser_cast_expression rather than c_parser_postfix_expression.
2702 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2706 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2707 of incomplete decls to error_mark_node.
2709 2016-02-24 Marek Polacek <polacek@redhat.com>
2712 * c-decl.c (finish_decl): Don't update the copy of the type of a
2713 different decl type.
2715 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2718 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2719 in id_kind reclassification.
2721 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2724 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2726 2016-02-16 James Norris <jnorris@codesourcery.com>
2729 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2731 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2733 * c-decl.c (build_null_declspecs): Zero the entire struct.
2736 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2737 callers changed. If nested_p is true, use it to call
2738 finish_implicit_inits.
2739 * c-tree.h (finish_implicit_inits): Declare.
2740 * c-typeck.c (finish_implicit_inits): New function. Move code
2742 (push_init_level): ... here.
2743 (set_designator, process_init_element): Call finish_implicit_inits.
2745 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2748 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2749 arguments for -Waddress warning.
2751 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2754 * c-decl.c (finish_enum): When honoring mode attribute,
2755 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2757 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2760 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2761 all type variants, not just TYPE_MAIN_VARIANT.
2763 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2766 * c-decl.c (c_write_global_declarations_1): Warn with
2767 warn_unused_function if static prototype without definition
2770 2016-01-27 Marek Polacek <polacek@redhat.com>
2773 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2774 to unsigned, if needed. Add -Wsign-compare warning.
2776 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2778 PR tree-optimization/69483
2779 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2781 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2784 * c-tree.h (incomplete_record_decls): Declare.
2785 * c-parser.c (incomplete_record_decls): Define.
2786 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2787 report error if any decl has zero size.
2788 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2789 or enum type to incomplete_record_decls.
2791 2016-01-14 Tom de Vries <tom@codesourcery.com>
2793 PR tree-optimization/68773
2794 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2797 2016-01-14 Marek Polacek <polacek@redhat.com>
2800 * c-decl.c (grokdeclarator): Provide more information for invalid
2803 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2805 * c-parser.c (c_parser_unary_expression): For dereferences, build
2806 a combined location before calling build_indirect_ref, so that
2807 error reports cover the full range, manually updating the c_expr
2810 2016-01-06 Marek Polacek <polacek@redhat.com>
2813 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2814 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2817 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2819 Update copyright years.
2821 2016-01-04 Marek Polacek <polacek@redhat.com>
2824 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2825 optimization to use __atomic_fetch_* built-in if possible.
2827 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2829 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2831 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2834 2015-12-22 Marek Polacek <polacek@redhat.com>
2837 * c-typeck.c (build_component_ref): Warn when acessing elements of
2838 atomic structures or unions.
2840 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2842 * c-typeck.c: Include "gcc-rich-location.h".
2843 (build_binary_op): In the two places that call binary_op_error,
2844 create a gcc_rich_location and populate it with the location of
2845 the binary op and its two operands.
2847 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2849 * c-parser.c (c_parser_statement_after_labels): When calling
2850 c_finish_return, Use the return expression's location if it has
2851 one, falling back to the location of the first token within it.
2852 * c-typeck.c (c_finish_return): When issuing warnings about
2853 the incorrect presence/absence of a return value, issue a note
2854 showing the declaration of the function.
2856 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2858 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2860 (c_parser_peek_nth_token): New function.
2861 (c_parser_peek_conflict_marker): New function.
2862 (c_parser_error): Detect conflict markers and report them as such.
2864 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2866 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2867 to preserve range information for the primary expression
2868 in the call to c_parser_postfix_expression_after_primary.
2870 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2872 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2873 expression location, falling back on the first token location,
2874 rather than always using the latter.
2876 2015-12-16 Marek Polacek <polacek@redhat.com>
2879 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2882 2015-12-15 Marek Polacek <polacek@redhat.com>
2885 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2888 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2890 * c-parser.c (c_parser_alignof_expression): Capture location of
2891 closing parenthesis (if any), or of end of unary expression, and
2892 use it to build a src_range for the expression.
2894 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2897 * c-parser.c (c_parser_get_builtin_args): Add
2898 "out_close_paren_loc" param, and write back to it.
2899 (c_parser_postfix_expression): Capture the closing
2900 parenthesis location for RID_CHOOSE_EXPR,
2901 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2902 RID_BUILTIN_SHUFFLE and use it to set the source range
2903 for such expressions; within RID_BUILTIN_COMPLEX set
2904 the underlying location.
2906 2015-12-07 Marek Polacek <polacek@redhat.com>
2909 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2910 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2912 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2914 * c-tree.h (c_build_va_arg): Adjust prototype.
2915 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2916 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2917 parameter, adjust throughout and issue an error if EXPR is a component
2918 with reverse storage order.
2920 2015-12-02 Jason Merrill <jason@redhat.com>
2922 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2923 (c_fully_fold_internal, decl_constant_value_for_optimization):
2924 Move from c-common.c.
2925 * c-tree.h: Declare decl_constant_value_for_optimization.
2926 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2928 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2931 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2932 following link from declarator to next declarator. Track original
2933 qualified type and pass it to c_build_qualified_type.
2934 * c-typeck.c (c_build_qualified_type): Add arguments
2935 orig_qual_type and orig_qual_indirect.
2937 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2939 * c-parser.c (c_parser_omp_clause_name)
2940 (c_parser_oacc_all_clauses): Alphabetical sorting.
2942 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2945 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2948 2015-12-01 Julian Brown <julian@codesourcery.com>
2949 Cesar Philippidis <cesar@codesourcery.com>
2950 James Norris <James_Norris@mentor.com>
2952 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2953 (c_parser_oacc_clause_use_device): New function.
2954 (c_parser_oacc_all_clauses): Add use_device support.
2955 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2956 (c_parser_oacc_host_data): New function.
2957 (c_parser_omp_construct): Add host_data support.
2958 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2959 * c-typeck.c (c_finish_oacc_host_data): New function.
2960 (c_finish_omp_clauses): Add use_device support.
2962 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2965 * c-decl.c: Set TYPE_PACKED in variants.
2967 2015-11-27 Martin Liska <mliska@suse.cz>
2970 * c-array-notation.c (fix_builtin_array_notation_fn):
2971 Use release_vec_vec instead of vec::release.
2972 (build_array_notation_expr): Likewise.
2973 (fix_conditional_array_notations_1): Likewise.
2974 (fix_array_notation_expr): Likewise.
2975 (fix_array_notation_call_expr): Likewise.
2977 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2980 * c-parser.c (c_parser_compound_statement_nostart): If
2981 last_label is true, use pragma_stmt instead of pragma_compound
2982 as second c_parser_pragma argument.
2983 (c_parser_omp_ordered, c_parser_omp_target_update,
2984 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2985 false as second argument to c_parser_skip_to_pragma_eol after
2986 diagnosing standalone directives used in pragma_stmt context.
2988 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2990 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2991 with "if (ENABLE_OFFLOADING)".
2993 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2996 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2997 for various Objective-C constructs: Class.name syntax,
2998 @selector(), @protocol(), @encode(), and [] message syntax.
3000 2015-11-20 David Malcolm <dmalcolm@redhat.com>
3003 * c-typeck.c (should_suggest_deref_p): New function.
3004 (build_component_ref): Special-case POINTER_TYPE when
3005 generating a "not a structure of union" error message, and
3006 suggest a "->" rather than a ".", providing a fix-it hint.
3008 2015-11-19 David Malcolm <dmalcolm@redhat.com>
3010 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3011 candidate into a new function, find_closest_identifier.
3013 2015-11-19 Marek Polacek <polacek@redhat.com>
3016 * c-typeck.c (parser_build_binary_op): Properly handle
3017 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3019 2015-11-17 David Malcolm <dmalcolm@redhat.com>
3021 * c-parser.c (set_c_expr_source_range): Bulletproof both
3022 overloaded implementations against NULL expr->value.
3023 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3025 (c_parser_unary_expression): Likewise when handling addresses of
3027 (c_parser_postfix_expression): Likewise for statement expressions,
3028 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3029 __builtin_va_arg, and for __builtin_offset_of.
3030 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3031 src_range using the range of the braced initializer.
3032 (c_parser_transaction_expression): Set src_range for "ret" to a
3033 sane pair of values.
3035 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3037 * c-parser.c (c_finish_omp_declare_simd): Look for
3038 "simd" attribute as well. Update error message.
3040 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3042 * c-parser.c (c_parser_omp_declare_target): Adjust.
3044 2015-11-14 Jakub Jelinek <jakub@redhat.com>
3046 * c-typeck.c (c_finish_omp_clauses): Don't mark
3047 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3049 2015-11-14 Marek Polacek <polacek@redhat.com>
3051 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3052 * c-typeck.c: Likewise.
3054 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3056 * c-decl.c (warn_defaults_to): Pass line_table to
3058 * c-errors.c (pedwarn_c99): Likewise.
3059 (pedwarn_c90): Likewise.
3060 * c-parser.c (set_c_expr_source_range): New functions.
3061 (c_token::get_range): New method.
3062 (c_token::get_finish): New method.
3063 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3064 based on the range from the start of the LHS to the end of the
3066 (c_parser_conditional_expression): Likewise, based on the range
3067 from the start of the cond.value to the end of exp2.value.
3068 (c_parser_binary_expression): Call set_c_expr_source_range on
3069 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3070 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3071 based on the cast_loc through to the end of the expr.
3072 (c_parser_unary_expression): Likewise, based on the
3073 op_loc through to the end of op.
3074 (c_parser_sizeof_expression) Likewise, based on the start of the
3075 sizeof token through to either the closing paren or the end of
3077 (c_parser_postfix_expression): Likewise, using the token range,
3078 or from the open paren through to the close paren for
3079 parenthesized expressions.
3080 (c_parser_postfix_expression_after_primary): Likewise, for
3081 various kinds of expression.
3082 * c-tree.h (struct c_expr): Add field "src_range".
3083 (c_expr::get_start): New method.
3084 (c_expr::get_finish): New method.
3085 (set_c_expr_source_range): New decls.
3086 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3087 on ret for prefix unary ops.
3088 (parser_build_binary_op): Likewise, running from the start of
3089 arg1.value through to the end of arg2.value.
3091 2015-11-13 Marek Polacek <polacek@redhat.com>
3094 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3096 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3098 * c-typeck.c: Include spellcheck.h.
3099 (lookup_field_fuzzy_find_candidates): New function.
3100 (lookup_field_fuzzy): New function.
3101 (build_component_ref): If the field was not found, try using
3102 lookup_field_fuzzy and potentially offer a suggestion.
3104 2015-11-12 James Norris <jnorris@codesourcery.com>
3105 Joseph Myers <joseph@codesourcery.com>
3107 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3108 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3109 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3110 and PRAGMA_OMP_CLAUSE_LINK.
3111 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3112 and PRAGMA_OACC_CLAUSE_LINK.
3113 (OACC_DECLARE_CLAUSE_MASK): New definition.
3114 (c_parser_oacc_declare): New function.
3116 2015-11-12 Marek Polacek <polacek@redhat.com>
3119 * c-parser.c (c_parser_for_statement): Reclassify the token in
3122 2015-11-11 Marek Polacek <polacek@redhat.com>
3126 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3127 checking the size of an array.
3129 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
3131 * c-array-notation.c: Remove unused header files.
3132 * c-aux-info.c: Likewise.
3133 * c-convert.c: Likewise.
3134 * c-decl.c: Likewise.
3135 * c-errors.c: Likewise.
3136 * c-lang.c: Likewise.
3137 * c-objc-common.c: Likewise.
3138 * c-parser.c: Likewise.
3139 * c-typeck.c: Likewise.
3140 * gccspec.c: Likewise.
3142 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3143 Cesar Philippidis <cesar@codesourcery.com>
3144 James Norris <jnorris@codesourcery.com>
3145 Julian Brown <julian@codesourcery.com>
3146 Nathan Sidwell <nathan@codesourcery.com>
3149 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3151 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3152 (c_parser_pragma): Parse 'acc routine'.
3153 (OACC_ROUTINE_CLAUSE_MARK): Define.
3154 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3156 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3159 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3160 location of the backward-goto to the start of the loop body.
3162 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3165 * c-parser.c (c_parser_while_statement): Finish the loop before
3166 parsing ahead for misleading indentation.
3167 (c_parser_for_statement): Likewise.
3169 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3171 * c-decl.c (finish_struct): If the structure has reverse storage
3172 order, rewrite the type of array fields with scalar component. Call
3173 maybe_apply_pragma_scalar_storage_order on entry.
3174 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3175 errors on bit-fields and reverse SSO here and not...
3176 (c_mark_addressable): ...here.
3177 (output_init_element): Adjust call to initializer_constant_valid_p.
3178 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3180 2015-11-06 David Malcolm <dmalcolm@redhat.com>
3182 * c-decl.c (warn_defaults_to): Update for change in signature
3183 of diagnostic_set_info.
3184 * c-errors.c (pedwarn_c99): Likewise.
3185 (pedwarn_c90): Likewise.
3186 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3187 for textinfo::set_location.
3189 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3190 Thomas Schwinge <thomas@codesourcery.com>
3191 James Norris <jnorris@codesourcery.com>
3193 * c-parser.c (c_parser_omp_clause_name): Add support for
3194 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3195 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3196 default(none) in OpenACC.
3197 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3199 (c_parser_oacc_clause_tile): New function.
3200 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3201 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3202 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3204 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3205 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3207 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3208 (c_parser_oacc_update): Update the error message for missing clauses.
3209 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3210 and OMP_CLAUSE_INDEPENDENT.
3212 2015-11-05 Marek Polacek <polacek@redhat.com>
3215 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3216 deal with pre-evaluation on invalid types.
3218 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3219 Ilya Verbin <ilya.verbin@intel.com>
3221 * c-parser.c: Include context.h and gimple-expr.h.
3222 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3223 monotonic together with nonmonotonic.
3224 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3225 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3226 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3227 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3228 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3229 expressions on combined target teams before the target.
3230 (c_parser_omp_declare_target): If decl has "omp declare target" or
3231 "omp declare target link" attribute, and cgraph or varpool node already
3232 exists, then set corresponding flags. Call c_finish_omp_clauses
3233 in the parenthesized extended-list syntax case.
3234 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3236 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3237 on OMP_CLAUSE_REDUCTION array sections.
3238 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3239 into the constant offset, or for variable low-bound using
3240 POINTER_PLUS_EXPR. For structure element based array sections use
3241 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3242 (c_finish_omp_clauses): Drop generic_field_head, structure
3243 elements are now always mapped even as array section bases,
3244 diagnose same var in data sharing and mapping clauses. Diagnose if
3245 linear step on declare simd is neither a constant nor a uniform
3246 parameter. Look through POINTER_PLUS_EXPR for array section
3247 reductions. Diagnose the same var or function appearing multiple
3248 times on the same directive. Fix up wording for the to clause if t
3249 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3250 modifier on kinds other than dynamic or guided or nonmonotonic
3251 modifier together with ordered clause.
3253 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3254 Chung-Lin Tang <cltang@codesourcery.com>
3256 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3258 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3260 * c-array-notation.c: Reorder #include's and remove duplicates.
3261 * c-aux-info.c: Likewise.
3262 * c-convert.c: Likewise.
3263 * c-decl.c: Likewise.
3264 * c-errors.c: Likewise.
3265 * c-lang.c: Likewise.
3266 * c-objc-common.c: Likewise.
3267 * c-parser.c: Likewise.
3268 * c-typeck.c: Likewise.
3270 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
3273 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3274 after calling build_qualified_type.
3276 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3277 Thomas Schwinge <thomas@codesourcery.com>
3278 James Norris <jnorris@codesourcery.com>
3279 Joseph Myers <joseph@codesourcery.com>
3280 Julian Brown <julian@codesourcery.com>
3281 Bernd Schmidt <bschmidt@redhat.com>
3283 * c-parser.c (c_parser_oacc_shape_clause): New.
3284 (c_parser_oacc_simple_clause): New.
3285 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3286 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3288 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3289 James Norris <jnorris@codesourcery.com>
3290 Cesar Philippidis <cesar@codesourcery.com>
3294 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3295 parameters, and handle these. Adjust all users.
3296 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3298 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3300 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3302 (c_finish_omp_construct): Declare function.
3303 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3304 Merge functions into...
3305 (c_finish_omp_construct): ... this new function.
3307 2015-10-22 Richard Biener <rguenther@suse.de>
3309 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3310 before folding a MINUS_EXPR.
3312 2015-10-21 Marek Polacek <polacek@redhat.com>
3315 * c-decl.c (start_function): Warn about vararg functions without
3318 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3320 * c-typeck.c (build_conditional_expr): Use boolean vector
3321 type for vector comparison.
3322 (build_vec_cmp): New.
3323 (build_binary_op): Use build_vec_cmp for comparison.
3325 2015-10-20 Marek Polacek <polacek@redhat.com>
3327 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3329 2015-10-20 Marek Polacek <polacek@redhat.com>
3332 * c-parser.c (c_parser_attributes): Break out of the loop if the
3333 token after an attribute isn't a comma.
3335 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3336 Aldy Hernandez <aldyh@redhat.com>
3338 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3339 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3340 (c_parser_omp_variable_list): Handle structure elements for
3341 map, to and from clauses. Handle array sections in reduction
3342 clause. Formatting fixes.
3343 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3344 if clause modifiers.
3345 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3346 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3347 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3348 c_parser_omp_clause_is_device_ptr): New functions.
3349 (c_parser_omp_clause_ordered): Parse optional parameter.
3350 (c_parser_omp_clause_reduction): Handle array reductions.
3351 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3352 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3354 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3355 (c_parser_omp_clause_depend_sink): New function.
3356 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3357 (c_parser_omp_clause_map): Parse release/delete map kinds and
3358 optional always modifier.
3359 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3360 and c_finish_omp_clauses callers.
3361 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3362 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3363 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3364 (OMP_CRITICAL_CLAUSE_MASK): Define.
3365 (c_parser_omp_critical): Parse critical clauses.
3366 (c_parser_omp_for_loop): Handle doacross loops, adjust
3367 c_finish_omp_for and c_finish_omp_clauses callers.
3368 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3369 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3370 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3371 (c_parser_omp_for): Disallow ordered clause when combined with
3372 distribute. Disallow linear clause when combined with distribute
3373 and not combined with simd.
3374 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3375 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3376 parse clauses and if depend clause is found, don't parse a body.
3377 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3378 Allow target parallel without for after it.
3379 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3380 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3381 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3383 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3384 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3385 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3386 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3388 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3389 defaultmap and is_device_ptr clauses.
3390 (c_parser_omp_target): Parse target parallel and target simd. Set
3391 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3392 and target exit data. Diagnose invalid map kinds.
3393 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3394 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3396 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3398 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3399 (c_parser_omp_taskloop): New function.
3400 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3401 handle PRAGMA_OMP_TASKLOOP.
3402 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3403 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3404 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3405 Add IS_OMP argument, handle structure element bases, diagnose
3406 bitfields, pass IS_OMP recursively, diagnose known zero length
3407 array sections in depend clauses, handle array sections in reduction
3408 clause, diagnose negative length even for pointers.
3409 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3410 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3411 array sections in reduction clause, set
3412 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3413 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3414 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3415 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3417 2015-10-06 Marek Polacek <polacek@redhat.com>
3419 * c-parser.c (c_parser_statement_after_labels): Use
3420 protected_set_expr_location.
3421 (c_parser_omp_clause_num_gangs): Likewise.
3422 (c_parser_omp_clause_num_threads): Likewise.
3423 (c_parser_omp_clause_num_workers): Likewise.
3424 (c_parser_omp_clause_vector_length): Likewise.
3425 (c_parser_omp_clause_num_teams): Likewise.
3426 (c_parser_omp_clause_thread_limit): Likewise.
3427 * c-typeck.c (build_c_cast): Likewise.
3428 (c_cast_expr): Likewise.
3430 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3432 * c-typeck.c (c_tree_equal): Use real_equal instead of
3435 2015-10-04 Jason Merrill <jason@redhat.com>
3437 * c-parser.c (c_lex_one_token): Handle @synchronized.
3438 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3439 can change whether the function is transaction_safe.
3441 2015-10-02 Marek Polacek <polacek@redhat.com>
3444 * c-typeck.c (convert_for_assignment): Use the expansion point
3445 location throughout.
3447 2015-10-02 Marek Polacek <polacek@redhat.com>
3450 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3451 and pass it down to c_parser_if_statement.
3452 (c_parser_else_body): Add CHAIN parameter and pass it down to
3453 c_parser_statement_after_labels.
3454 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3455 duplicated if-else-if conditions.
3457 2015-10-01 Marek Polacek <polacek@redhat.com>
3459 * c-typeck.c (convert_for_assignment): Improve commentary.
3461 2015-09-30 Marek Polacek <polacek@redhat.com>
3464 * c-typeck.c (c_finish_return): Use the expansion point location for
3465 certain "return with value" warnings.
3467 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3469 * c-parser.c (pragma_lex): Add loc argument.
3471 2015-09-15 Marek Polacek <polacek@redhat.com>
3474 * c-decl.c (tag_exists_p): New function.
3475 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3476 struct/union/enum keywords are missing.
3477 * c-tree.h (tag_exists_p): Declare.
3479 2015-09-15 Marek Polacek <polacek@redhat.com>
3481 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3482 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3483 Return NULL_TREE instead of 0.
3484 (lookup_name): Return NULL_TREE instead of 0.
3485 (lookup_name_in_scope): Likewise.
3486 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3487 (parser_xref_tag): Use false instead of 0.
3488 (start_struct): Use true instead of 1.
3489 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3491 2015-09-14 Marek Polacek <polacek@redhat.com>
3493 * c-typeck.c (set_nonincremental_init_from_string): Use
3494 HOST_WIDE_INT_M1U when shifting a negative value.
3496 2015-09-09 Mark Wielaard <mjw@redhat.com>
3498 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3501 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3504 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3505 into OMP_FOR_PRE_BODY rather than before the loop.
3507 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3510 * c-parser.c (c_parser_oacc_all_clauses,
3511 c_parser_omp_all_clauses): Remove invalid clause from
3512 list of clauses even if parser->error is set.
3515 * c-parser.c (c_parser_omp_clause_aligned,
3516 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3518 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3522 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3523 instead of c_parser_unary_expression. If the result is !lvalue_p,
3524 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3526 2015-09-04 Marek Polacek <polacek@redhat.com>
3529 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3531 2015-09-03 Martin Sebor <msebor@redhat.com>
3534 * c-typeck.c (convert_arguments, parser_build_unary_op,
3535 build_conditional_expr, c_cast_expr, convert_for_assignment,
3536 build_binary_op, _objc_common_truthvalue_conversion): Call
3538 (c_decl_implicit): Define.
3540 2015-09-02 Marek Polacek <polacek@redhat.com>
3543 * c-parser.c (c_parser_enum_specifier): Give a better error for
3546 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3548 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3550 2015-08-12 Marek Polacek <polacek@redhat.com>
3552 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3555 2015-08-03 Marek Polacek <polacek@redhat.com>
3558 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3560 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3562 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3564 * c-parser.c (c_parser_if_body): Take token_indent_info
3565 argument. Call warn_for_misleading_indentation even when the
3566 body is a semicolon. Extract token_indent_infos corresponding
3567 to the guard, body and next tokens. Adjust call to
3568 warn_for_misleading_indentation accordingly.
3569 (c_parser_else_body): Likewise.
3570 (c_parser_if_statement): Likewise.
3571 (c_parser_while_statement): Likewise.
3572 (c_parser_for_statement): Likewise.
3574 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3575 Manuel López-Ibáñez <manu@gcc.gnu.org>
3577 * c-decl.c (get_parm_info): Remove static var. Update warning
3580 2015-07-27 Marek Polacek <polacek@redhat.com>
3584 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3586 2015-07-20 Marek Polacek <polacek@redhat.com>
3589 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3590 (build_binary_op): Warn about left shift overflows.
3592 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3594 * c-array-notation.c: Adjust includes for flags.h changes.
3595 * c-objc-common.c: Likewise.
3597 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3599 * c-array-notation.c: Adjust includes.
3600 * c-aux-info.c: Likewise.
3601 * c-convert.c: Likewise.
3602 * c-decl.c: Likewise.
3603 * c-errors.c: Likewise.
3604 * c-lang.c: Likewise.
3605 * c-objc-common.c: Likewise.
3606 * c-parser.c: Likewise.
3607 * c-typeck.c: Likewise.
3609 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3612 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3614 2015-06-29 Marek Polacek <polacek@redhat.com>
3617 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3618 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3619 about -Wswitch-bool here.
3620 (do_case): Update c_add_case_label call.
3621 (c_finish_case): Update c_do_switch_warnings call.
3623 2015-06-27 Marek Polacek <polacek@redhat.com>
3625 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3627 2015-06-26 Marek Polacek <polacek@redhat.com>
3629 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3631 * c-typeck.c (array_to_pointer_conversion): Likewise.
3632 (build_unary_op): Likewise.
3633 (c_finish_return): Likewise.
3635 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3637 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3638 * c-parser.c: Likewise.
3640 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3642 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3643 instead of pointer_hash.
3644 (detect_field_duplicates): Likewise.
3646 2015-06-25 Marek Polacek <polacek@redhat.com>
3648 * c-array-notation.c: Use VAR_P throughout.
3649 * c-decl.c: Likewise.
3650 * c-objc-common.c: Likewise.
3651 * c-parser.c: Likewise.
3652 * c-typeck.c: Likewise.
3654 2015-06-25 Marek Polacek <polacek@redhat.com>
3656 * c-decl.c: Use is_global_var throughout.
3657 * c-parser.c: Likewise.
3658 * c-typeck.c: Likewise.
3660 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3662 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3663 * c-aux-info.c: Likewise.
3664 * c-convert.c: Likewise.
3665 * c-decl.c: Likewise.
3666 * c-errors.c: Likewise.
3667 * c-lang.c: Likewise.
3668 * c-objc-common.c: Likewise.
3669 * c-parser.c: Likewise.
3670 * c-typeck.c: Likewise.
3672 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3675 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3678 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3680 * c-decl.c (pop_scope): Register the main translation unit
3681 through the new debug hook.
3683 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3685 * c-array-notation.c : Adjust include files.
3686 * c-aux-info.c : Likewise.
3687 * c-convert.c : Likewise.
3688 * c-decl.c : Likewise.
3689 * c-errors.c : Likewise.
3690 * c-lang.c : Likewise.
3691 * c-lang.h : Likewise.
3692 * c-objc-common.c : Likewise.
3693 * c-parser.c : Likewise.
3694 * c-typeck.c : Likewise.
3696 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3698 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3699 immediately clobber it.
3700 (c_write_global_declarations_1): Remove call to
3701 check_global_declaration_1.
3702 (c_write_global_declarations_2): Remove.
3703 (c_write_final_cleanups): Rename from c_write_global_declarations.
3704 Remove call to finalize_compilation_unit.
3705 Remove calls to debugging hooks.
3706 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3707 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3708 * c-tree.h: Remove c_write_global_declarations.
3710 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3712 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3713 * c-aux-info.c: Likewise.
3714 * c-convert.c: Likewise.
3715 * c-decl.c: Likewise.
3716 * c-errors.c: Likewise.
3717 * c-lang.c: Likewise.
3718 * c-objc-common.c: Likewise.
3719 * c-parser.c: Likewise.
3720 * c-typeck.c: Likewise.
3722 2015-06-04 Marek Polacek <polacek@redhat.com>
3725 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3728 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3730 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3731 Warn for empty struct.
3732 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3734 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3736 * c-decl.c (start_function): Call plugin before parsing.
3737 (finish_function): Call plugin after parsing.
3739 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3742 * c-decl.c (merge_decls): Merge DECL_COMMON.
3744 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3746 * Make-lang.in (check_gcc_pallelize): Define.
3748 2015-05-22 Marek Polacek <polacek@redhat.com>
3751 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3754 2015-05-21 Marek Polacek <polacek@redhat.com>
3756 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3759 2015-05-20 Marek Polacek <polacek@redhat.com>
3761 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3762 * c-typeck.c: Likewise.
3764 2015-05-19 Marek Polacek <polacek@redhat.com>
3766 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3768 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3771 * c-parser.c (c_parser_omp_for_loop): Don't add
3772 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3773 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3774 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3777 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3779 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3782 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3785 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3788 2015-05-14 Marek Polacek <polacek@redhat.com>
3792 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3795 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3797 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3798 to add a call to warn_for_misleading_indentation.
3799 (c_parser_else_body): Likewise, adding param "else_loc".
3800 (c_parser_if_statement): Check for misleading indentation.
3801 (c_parser_while_statement): Likewise.
3802 (c_parser_for_statement): Likewise.
3804 2015-05-08 Marek Polacek <polacek@redhat.com>
3807 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3808 (output_init_element): Likewise.
3810 2015-05-07 Marek Polacek <polacek@redhat.com>
3813 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3816 2015-04-30 Marek Polacek <polacek@redhat.com>
3818 * c-typeck.c (set_init_label): Call error_at instead of error and
3821 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3824 * c-typeck.c (c_build_va_arg): Clarify the error message.
3826 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3828 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3829 OMP_STANDALONE_CLAUSES.
3831 2015-04-28 Marek Polacek <polacek@redhat.com>
3833 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3835 2015-04-28 Marek Polacek <polacek@redhat.com>
3838 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3840 2015-04-25 Marek Polacek <polacek@redhat.com>
3843 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3846 2015-04-23 Marek Polacek <polacek@redhat.com>
3849 * c-decl.c (set_labels_context_r): New function.
3850 (store_parm_decls): Call it via walk_tree_without_duplicates.
3851 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3852 instead of create_tmp_var. Build TARGET_EXPR instead of
3854 (build_atomic_assign): Use create_tmp_var_raw instead of
3855 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3857 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3859 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3860 (c_parser_omp_target_update): Add missed %> to error_at ().
3862 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3865 * c-decl.c (c_default_pointer_mode): Remove definition.
3866 * c-tree.h (c_default_pointer_mode): Remove declaration.
3868 2015-03-27 Tobias Burnus <burnus@net-b.de>
3871 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3873 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3874 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3875 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3877 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3879 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3880 attribute for DECL_EXTERNAL VAR_DECLs.
3882 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3884 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3887 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3890 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3891 before preparing arguments to warn_logical_not_parentheses.
3893 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3896 * c-typeck.c (parser_build_binary_op): Don't warn for
3897 !!x == y or !b == y where b is _Bool.
3899 2015-03-09 Marek Polacek <polacek@redhat.com>
3901 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3902 * c-decl.c (grokdeclarator): Likewise.
3903 * c-typeck.c (build_binary_op): Likewise.
3905 2015-02-27 Marek Polacek <polacek@redhat.com>
3908 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3910 2015-02-14 Marek Polacek <polacek@redhat.com>
3913 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3914 declared through a typedef name.
3916 2015-02-13 Marek Polacek <polacek@redhat.com>
3919 * c-decl.c (grokdeclarator): Print also the type when giving
3920 the error message about array's incomplete element type.
3922 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3925 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3926 check in the POP macro.
3928 2015-02-09 Marek Polacek <polacek@redhat.com>
3931 * c-typeck.c (process_init_element): Don't always wrap
3932 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3933 initializing a range of elements.
3935 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3939 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3941 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3943 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3944 processing enum declaration.
3946 2015-01-29 Marek Polacek <polacek@redhat.com>
3949 * c-typeck.c (pop_init_level): If constructor_elements has
3950 exactly one element with integer_zerop value, set constructor_zeroinit
3951 to 1. Remove braces around warning_init call.
3953 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3956 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3957 of FUNCTION_DECLs with error_mark_node.
3959 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3962 * c-typeck.c (convert_arguments): Return -1 if there are
3963 error_args, even if we've diagnosed too many arguments.
3965 2015-01-21 Richard Biener <rguenther@suse.de>
3968 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3969 for builtins the user declared correctly.
3971 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3972 Bernd Schmidt <bernds@codesourcery.com>
3973 Cesar Philippidis <cesar@codesourcery.com>
3974 James Norris <jnorris@codesourcery.com>
3975 Jakub Jelinek <jakub@redhat.com>
3976 Ilmir Usmanov <i.usmanov@samsung.com>
3978 * c-parser.c: Include "gomp-constants.h".
3979 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3980 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3981 Use OMP_CLAUSE_SET_MAP_KIND.
3982 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3983 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3984 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3985 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3986 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3987 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3988 "copyout", "create", "delete", "deviceptr", "gang", "host",
3989 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3990 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3991 "present_or_create", "pcreate", "seq", "self", "vector",
3992 "vector_length", "wait", "worker".
3993 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3994 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3995 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3996 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3997 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3998 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3999 (c_parser_oacc_data_clause_deviceptr)
4000 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4001 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4002 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4003 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4004 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4005 (c_parser_oacc_parallel, c_parser_oacc_update)
4006 (c_parser_oacc_wait): New functions.
4007 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4008 (c_finish_oacc_data): New prototypes.
4009 * c-typeck.c: Include "gomp-constants.h".
4010 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4011 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4012 OMP_CLAUSE_SET_MAP_KIND.
4013 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4014 (c_finish_oacc_data): New functions.
4015 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4016 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4017 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4018 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4019 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4020 GOMP_MAP_FORCE_DEVICEPTR.
4022 2015-01-09 Michael Collison <michael.collison@linaro.org>
4024 * c-array-notation.c: Include hash-set.h, machmode.h,
4025 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4026 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4027 * c-aux-info.c: Ditto.
4028 * c-convert.c: Ditto.
4030 * c-errors.c: Ditto.
4031 * c-lang.c: Dittoxs.
4032 * c-objc-common.c: Ditto.
4033 * c-parser.c: Ditto.
4034 * c-typeck.c: Include hash-set.h, machmode.h,
4035 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4036 fold-const.h, wide-int.h, inchash.h, real.h and
4037 fixed-value.h due to flattening of tree.h.
4039 2015-01-07 Marek Polacek <polacek@redhat.com>
4042 * c-typeck.c (process_init_element): Disallow initialization of
4043 a flexible array member with a string constant if the structure
4046 2015-01-05 Jakub Jelinek <jakub@redhat.com>
4049 * c-typeck.c (convert_for_assignment, c_finish_return): For
4050 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4051 types also set in_late_binary_op around convert call.
4052 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4053 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4054 result on expr as last argument to ubsan_instrument_float_cast,
4055 if in_late_binary_op, don't use c_save_expr but save_expr.
4057 Update copyright years.
4059 2015-01-05 Marek Polacek <polacek@redhat.com>
4062 * c-typeck.c (build_array_ref): Pass loc down to
4063 warn_array_subscript_with_type_char.
4065 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
4067 * c-typeck.c: New behavious for pointers to arrays with qualifiers
4068 (common-pointer-type): For pointers to arrays take qualifiers from
4070 (build_conditional_expr): Add warnings for lost qualifiers.
4071 (comp-target-types): Allow pointers to arrays with different qualifiers.
4072 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
4073 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
4074 to PEDWARN_FOR_QUALIFIERS.
4076 2014-12-17 Jakub Jelinek <jakub@redhat.com>
4079 * c-convert.c: Include ubsan.h.
4080 (convert): For real -> integral casts and
4081 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4082 instead instrument the float cast directly.
4084 2014-11-29 Jakub Jelinek <jakub@redhat.com>
4086 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4087 c_finish_stmt_expr): Remove NULL last argument from
4088 create_tmp_var_raw and create_tmp_var calls.
4089 * c-array-notation.c (fix_builtin_array_notation_fn,
4090 build_array_notation_expr, fix_conditional_array_notations_1,
4091 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4093 2014-11-28 Marek Polacek <polacek@redhat.com>
4096 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4097 convert the right operand to integer type.
4099 2014-11-25 Marek Polacek <polacek@redhat.com>
4102 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4103 for inline functions.
4105 2014-11-21 Jakub Jelinek <jakub@redhat.com>
4108 * c-typeck.c (build_array_ref): Adjust
4109 convert_vector_to_pointer_for_subscript caller. If it returns true,
4110 call non_lvalue_loc on the result.
4112 2014-11-11 Richard Biener <rguenther@suse.de>
4114 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4117 2014-11-10 Andi Kleen <ak@linux.intel.com>
4120 * c-parser.c (c_parser_statement_after_labels): Call
4122 (c_parser_if_statement): Dito.
4123 (c_parser_switch_statement): Dito.
4124 (c_parser_while_statement): Dito.
4125 (c_parser_do_statement): Dito.
4126 (c_parser_for_statement): Dito.
4127 * c-typeck.c (c_finish_loop): Dito.
4129 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4131 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4132 OPT_Wshift_count_overflow in the warnings.
4134 2014-10-30 Marek Polacek <polacek@redhat.com>
4136 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4137 print the stripped version as well, if they're not the same.
4139 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4141 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4144 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
4146 * c-decl.c: Adjust include files.
4147 * c-parser.c: Ditto.
4149 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4150 Tom Tromey <tromey@redhat.com>
4152 * c-tree.h (enum c_oracle_request): New.
4153 (c_binding_oracle_function): New typedef.
4154 (c_binding_oracle, c_pushtag, c_bind): Declare.
4155 * c-decl.c (c_binding_oracle): New global.
4156 (I_SYMBOL_CHECKED): New macro.
4157 (i_symbol_binding): New function.
4158 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4159 (I_TAG_CHECKED): New macro.
4160 (i_tag_binding): New function.
4161 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4162 (I_LABEL_CHECKED): New macro.
4163 (i_label_binding): New function.
4164 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4165 (c_print_identifier): Save and restore c_binding_oracle.
4166 (c_pushtag, c_bind): New functions.
4168 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
4170 * c-typeck.c: Adjust include files.
4172 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4175 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4176 initialization here...
4177 (c_initialize_diagnostics): ... but here. Set defaults after
4178 building pretty-printer.
4180 2014-10-23 Marek Polacek <polacek@redhat.com>
4183 * c-decl.c (pop_scope): Don't print warning in external_scope.
4185 2014-10-19 Marek Polacek <polacek@redhat.com>
4188 * c-typeck.c (output_init_element): Allow initializing objects with
4189 static storage duration with compound literals even in C99 and add
4192 2014-10-17 Marek Polacek <polacek@redhat.com>
4195 * c-typeck.c (digest_init): Allow initializing objects with static
4196 storage duration with compound literals even in C99 and add pedwarn
4199 2014-10-17 Marek Polacek <polacek@redhat.com>
4202 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4203 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4204 error multiple times. Print the type.
4206 2014-10-17 Marek Polacek <polacek@redhat.com>
4209 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4212 2014-10-17 Marek Polacek <polacek@redhat.com>
4214 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4215 (start_function): Use OPT_Wimplicit_int instead of 0.
4216 (store_parm_decls_oldstyle): Likewise.
4218 2014-10-17 Alan Modra <amodra@gmail.com>
4221 * c-decl.c (merge_decls): Don't merge section name or tls model
4222 to newdecl symtab node, instead merge to olddecl. Override
4223 existing olddecl section name. Set tls_model for all thread-local
4224 vars, not just OMP thread-private ones. Remove incorrect comment.
4226 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
4228 * c-decl.c: Adjust include files.
4230 2014-10-14 DJ Delorie <dj@redhat.com>
4232 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4233 (c_token_starts_typename): Check all __intN, not just __int128.
4234 (c_token_starts_declspecs): Likewise.
4235 (c_parser_declspecs): Likewise.
4236 (c_parser_attribute_any_word): Likewise.
4237 (c_parser_objc_selector): Likewise.
4238 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4239 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4241 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4243 (finish_declspecs): Likewise.
4245 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4247 * c-parser.c (c_parser_all_labels): New function to replace
4249 (c_parser_statement): Call the new function.
4251 2014-10-09 Marek Polacek <polacek@redhat.com>
4254 * c-typeck.c (pop_init_level): Don't warn about initializing
4257 2014-10-07 Marek Polacek <polacek@redhat.com>
4260 * c-decl.c (header_for_builtin_fn): New function.
4261 (implicitly_declare): Suggest which header to include.
4263 2014-10-07 Marek Polacek <polacek@redhat.com>
4265 * c-convert.c (convert): Use error_operand_p.
4266 * c-typeck.c (require_complete_type): Likewise.
4267 (really_atomic_lvalue): Likewise.
4268 (digest_init): Likewise.
4269 (handle_omp_array_sections_1): Likewise.
4271 2014-10-03 Marek Polacek <polacek@redhat.com>
4274 * c-decl.c (pop_scope): Don't warn about "inline function declared
4275 but never defined" for functions marked with gnu_inline attribute.
4277 2014-09-25 Jakub Jelinek <jakub@redhat.com>
4280 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4281 on low_bound and length.
4283 2014-09-24 Marek Polacek <polacek@redhat.com>
4287 * c-parser.c: Don't define CPP_KEYWORD.
4288 (c_parser_switch_statement): Pass original type to c_finish_case.
4289 * c-tree.h (c_finish_case): Update declaration.
4290 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4291 conditionally to c_do_switch_warnings.
4293 2014-09-03 Marek Polacek <polacek@redhat.com>
4296 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4299 2014-09-02 Jakub Jelinek <jakub@redhat.com>
4300 Balaji V. Iyer <balaji.v.iyer@intel.com>
4301 Igor Zamyatin <igor.zamyatin@intel.com>
4303 * c-parser.c (c_parser_cilk_for): New function.
4304 (c_parser_cilk_grainsize): Likewise.
4305 (c_get_temp_regvar): Likewise.
4306 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4307 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4308 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4309 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4312 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4314 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4315 with using HOST_WIDE_INT without truncation to 'int'
4317 2014-08-22 Marek Polacek <polacek@redhat.com>
4320 * c-typeck.c (parser_build_binary_op): Adjust call to
4321 warn_logical_not_parentheses.
4323 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4326 * c-parser.c (c_parser_array_notation): Check for correct
4327 type of an array added.
4329 2014-08-19 Marek Polacek <polacek@redhat.com>
4332 * c-typeck.c (build_binary_op): If either operand of a comparison
4333 is a boolean expression, call maybe_warn_bool_compare.
4335 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4338 * c-typeck.c (build_c_cast): Do a conversion even when the
4339 TYPE_MAIN_VARIANTs are the same.
4341 2014-08-19 Marek Polacek <polacek@redhat.com>
4343 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4344 pedwarn_c99 instead of pedwarn.
4345 (grokfield): Likewise.
4346 (warn_defaults_to): New function.
4347 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4348 Unconditionally call pedwarn_c99 instead of pedwarn.
4349 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4350 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4351 check flag_isoc11 before.
4352 * c-errors.c (pedwarn_c99): Change the return type to bool.
4353 Handle -Wc99-c11-compat.
4354 * c-parser.c (disable_extension_diagnostics): Handle
4355 warn_c99_c11_compat.
4356 (restore_extension_diagnostics): Likewise.
4357 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4358 instead of pedwarn, don't check flag_isoc11 before.
4359 (c_parser_declspecs): Likewise.
4360 (c_parser_alignas_specifier): Likewise.
4361 (c_parser_alignof_expression): Likewise.
4362 (c_parser_generic_selection): Likewise.
4363 * c-tree.h (pedwarn_c99): Update declaration.
4364 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4367 2014-08-19 Marek Polacek <polacek@redhat.com>
4369 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4371 * c-errors.c: Include "opts.h".
4372 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4373 * c-parser.c (disable_extension_diagnostics): Handle negative value
4374 of warn_c90_c99_compat, too.
4375 (restore_extension_diagnostics): Likewise.
4376 (c_parser_compound_statement_nostart): Pass
4377 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4379 2014-08-12 Marek Polacek <polacek@redhat.com>
4381 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4383 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4385 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4387 2014-08-10 Marek Polacek <polacek@redhat.com>
4390 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4391 Call pedwarn_c90 instead of pedwarn.
4392 (check_bitfield_type_and_width): Likewise.
4393 (declspecs_add_qual): Likewise.
4394 (declspecs_add_type): Likewise.
4395 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4396 Adjust to only call pedwarn_c90.
4397 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4398 pedwarn_c90 instead of pedwarn.
4399 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4400 * c-parser.c (disable_extension_diagnostics): Handle
4401 warn_c90_c99_compat.
4402 (restore_extension_diagnostics): Likewise.
4403 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4404 pedwarn_c90 instead of pedwarn.
4405 (c_parser_initelt): Likewise.
4406 (c_parser_postfix_expression): Likewise.
4407 (c_parser_postfix_expression_after_paren_type): Likewise.
4408 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4409 * c-tree.h: Fix formatting.
4410 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4411 pedwarn_c90 instead of pedwarn.
4413 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4415 * c-typeck.c: Remove include of pointer-set.h.
4417 2014-08-07 Marek Polacek <polacek@redhat.com>
4419 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4421 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4423 * c-typeck.c: Use hash_map instead of pointer_map.
4425 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4427 * c-decl.c: Use hash_set instead of pointer_set.
4429 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4432 * c-array-notation.c (expand_array_notations): Handling
4435 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
4438 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4441 2014-07-30 Tom Tromey <tromey@redhat.com>
4443 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4445 (really_start_incremental_init, push_init_level): Initialize
4447 (pop_init_level): Set global designator_depth.
4448 (process_init_element): Check for designated_init attribute.
4450 2014-07-20 Marek Polacek <polacek@redhat.com>
4453 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4454 (implicitly_declare): Pass location to implicit_decl_warning.
4456 2014-07-14 Jakub Jelinek <jakub@redhat.com>
4459 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4460 If non-NULL, call c_parser_check_literal_zero.
4461 (c_parser_check_literal_zero): New function.
4462 (c_parser_postfix_expression_after_primary): Adjust
4463 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4465 2014-07-06 Marek Polacek <polacek@redhat.com>
4468 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4469 * c-tree.h (C_ARRAY_PARAMETER): Define.
4470 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4473 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4474 Chen Gang <gang.chen.5i5j@gmail.com>
4476 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4479 2014-07-01 Marek Polacek <polacek@redhat.com>
4481 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4482 instead of 0 to WARN_FOR_ASSIGNMENT.
4484 2014-07-01 Marek Polacek <polacek@redhat.com>
4487 * c-typeck.c (convert_for_assignment): Pass
4488 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4490 2014-06-30 Marek Polacek <polacek@redhat.com>
4492 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4493 has no_sanitize_undefined attribute.
4495 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4498 * c-array-notation.c (fix_builtin_array_notation_fn):
4499 Check for 0 arguments in builtin call. Check that bultin argument is
4501 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4504 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4506 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4507 qualifiers in __auto_type for atomic types.
4508 (c_parser_typeof_specifier): Discard all type qualifiers in
4509 __typeof__ for atomic types.
4511 2014-06-25 Marek Polacek <polacek@redhat.com>
4514 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4515 the return expression to c_finish_return.
4517 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4519 * c-typeck.c (c_finish_omp_clauses): Make sure
4520 OMP_CLAUSE_LINEAR_STEP has correct type.
4522 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4526 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4528 * c-parser.c (c_parser_omp_for_loop): For
4529 #pragma omp parallel for simd move lastprivate clause from parallel
4530 to for rather than simd.
4532 2014-06-23 Marek Polacek <polacek@redhat.com>
4534 * c-typeck.c (parser_build_binary_op): Don't call
4535 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4537 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4539 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4540 * c-decl.c (merge_decls): Likewise.
4542 2014-06-09 Marek Polacek <polacek@redhat.com>
4545 * c-typeck.c (error_init): Call inform instead of error_at.
4546 (pedwarn_init): Call inform instead of pedwarn.
4547 (warning_init): Call inform instead of warning_at.
4549 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4551 * c-decl.c (merge_decls): Use set_decl_section_name.
4552 (duplicate_decls): Remove node if it exists.
4554 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4557 * c-typeck.c (push_init_level, process_init_element,
4558 pop_init_level): Correct check for zero initialization, move
4559 missing brace warning to respect zero initialization.
4561 2014-06-05 Marek Polacek <polacek@redhat.com>
4564 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4566 2014-06-05 Marek Polacek <polacek@redhat.com>
4569 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4570 on the left hand side operand of a comparison.
4572 2014-06-05 Marek Polacek <polacek@redhat.com>
4575 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4576 Print note only if the warning was printed.
4578 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4581 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4584 2014-06-03 Marek Polacek <polacek@redhat.com>
4587 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4589 * c-tree.h (c_start_case): Update.
4590 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4591 switch condition has boolean value.
4593 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4595 * c-decl.c: Include builtins.h.
4596 * c-parser.c: Likewise.
4598 2014-05-27 Marek Polacek <polacek@redhat.com>
4601 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4602 error and warning calls to error_at and warning_at. Pass location of
4603 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4604 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4605 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4607 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4610 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4611 function parameters.
4613 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4615 * c-decl.c (merge_decls): Preserve symtab node pointers.
4616 (duplicate_decls): Free new decl.
4618 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4620 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4623 * c-parser.c (c_parser_omp_target): Return bool values.
4625 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4627 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4628 num_teams_loc variable to num_thread_limit_loc.
4630 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4632 * c-array-notation.c (expand_array_notations): Use void_node
4633 instead of void_zero_node.
4635 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4637 * c-decl.c (finish_struct): Adjust.
4638 (finish_enum): Likewise.
4640 (record_inline_static): Likewise.
4641 (push_scope): Likewise.
4642 (make_label): Likewise.
4643 (lookup_label_for_goto): Likewise.
4644 (finish_struct): Likewise.
4645 (finish_enum): Likewise.
4646 (store_parm_decls): Likewise.
4647 (c_push_function_context): Likewise.
4648 * c-lang.h: Remove usage of variable_size gty attribute.
4649 * c-parser.c (c_parse_init): Adjust.
4650 (c_parse_file): Likewise.
4652 2014-05-13 Marek Polacek <polacek@redhat.com>
4655 * c-typeck.c (convert_for_assignment): Pass location to
4656 WARN_FOR_ASSIGNMENT instead of input_location.
4658 2014-05-10 Marek Polacek <polacek@redhat.com>
4660 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4661 maybe_warn_string_init.
4662 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4663 maybe_warn_string_init.
4664 * c-tree.h (maybe_warn_string_init): Update declaration.
4665 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4666 Call pedwarn_init with loc instead of with input_location.
4667 (digest_init): Pass init_loc to maybe_warn_string_init.
4668 (pop_init_level): Call pedwarn_init with loc instead of with
4670 (set_init_index): Likewise.
4671 (process_init_element): Likewise.
4673 2014-05-09 Marek Polacek <polacek@redhat.com>
4676 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4677 (c_parser_initelt): Pass location to set_init_label. Pass array index
4678 location to set_init_index.
4679 * c-tree.h (push_init_level): Update declaration.
4680 (pop_init_level): Likewise.
4681 (set_init_index): Likewise.
4682 (set_init_label): Likewise.
4683 * c-typeck.c (error_init): Add location parameter. Call error_at
4685 (digest_init): Pass init_loc to error_init.
4686 (really_start_incremental_init):
4687 (push_init_level): Add location parameter. Pass loc to pop_init_level
4689 (pop_init_level): Likewise.
4690 (set_designator): Add location parameter. Pass loc to pop_init_level,
4691 push_init_level, and error_init.
4692 (set_init_index): Add location parameter. Pass loc to error_init and
4694 (set_init_label): Likewise.
4695 (output_init_element): Pass loc to error_init.
4696 (process_init_element): Pass loc to error_init, pop_init_level,
4697 pedwarn_init, and push_init_level.
4699 2014-05-09 Marek Polacek <polacek@redhat.com>
4702 * c-parser.c (c_parser_attributes): Parse the arguments as an
4703 expression-list if the attribute takes identifier.
4705 2014-05-08 Marek Polacek <polacek@redhat.com>
4708 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4711 2014-05-08 Marek Polacek <polacek@redhat.com>
4714 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4717 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4718 Mike Stump <mikestump@comcast.net>
4719 Richard Sandiford <rdsandiford@googlemail.com>
4721 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4722 (finish_enum): Use wide-int interfaces.
4723 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4724 * c-typeck.c (build_c_cast): Likewise.
4725 (set_nonincremental_init_from_string): Likewise.
4726 (c_tree_equal): Likewise.
4728 2014-05-02 Marek Polacek <polacek@redhat.com>
4731 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4732 Return size_one_node when the type is not complete.
4733 (pointer_diff): Remove comment.
4734 (build_unary_op): Improve error messages.
4736 2014-05-02 Marek Polacek <polacek@redhat.com>
4738 * c-typeck.c (c_finish_return): Separate warning_at calls.
4740 2014-05-02 Marek Polacek <polacek@redhat.com>
4742 * c-tree.h (error_init): Remove declaration.
4743 (pedwarn_init): Likewise.
4744 * c-typeck.c (error_init): Make static and move above.
4745 (pedwarn_init): Likewise.
4746 (warning_init): Move above.
4747 (maybe_warn_string_init): Likewise.
4749 2014-05-01 Jeff Law <law@redhat.com>
4753 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4754 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4757 2014-05-02 Marek Polacek <polacek@redhat.com>
4760 * c-typeck.c (push_init_level): Set constructor_designated to
4761 p->designated for structures.
4763 2014-05-01 Marek Polacek <polacek@redhat.com>
4766 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4767 function-definition has an attribute after the declarator.
4769 2014-05-01 Marek Polacek <polacek@redhat.com>
4772 * c-typeck.c (warning_init): Add location_t parameter. Call
4773 warning_at instead of warning.
4774 (push_init_level): Pass input_location to warning_init.
4775 (add_pending_init): Add location_t parameter. Pass loc to
4777 (set_nonincremental_init): Pass input_location to add_pending_init.
4778 (set_nonincremental_init_from_string): Likewise.
4779 (output_init_element): Pass loc to warning_init and to
4782 2014-05-01 Marek Polacek <polacek@redhat.com>
4785 * c-typeck.c (c_finish_return): Distinguish between label and variable
4786 when warning about returning local address.
4788 2014-05-01 Marek Polacek <polacek@redhat.com>
4791 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4794 2014-05-01 Marek Polacek <polacek@redhat.com>
4797 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4798 instead of 0 to WARN_FOR_QUALIFIERS.
4800 2014-05-01 Marek Polacek <polacek@redhat.com>
4803 * c-typeck.c (default_conversion): Use better location for
4806 2014-04-30 Marek Polacek <polacek@redhat.com>
4808 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4809 also when SANITIZE_FLOAT_DIVIDE is on.
4811 2014-04-30 Marek Polacek <polacek@redhat.com>
4814 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4815 and pedwarn_init. Use loc insted of input_location.
4817 2014-04-30 Marek Polacek <polacek@redhat.com>
4820 * c-typeck.c (build_binary_op): Use location when warning about
4823 2014-04-25 Marek Polacek <polacek@redhat.com>
4826 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4827 always_inline/noinline and hot/cold attributes.
4829 2014-04-25 Marek Polacek <polacek@redhat.com>
4832 * c-parser.c (c_parser_initelt): Pass input_location to
4833 process_init_element.
4834 (c_parser_initval): Pass loc to process_init_element.
4835 * c-tree.h (process_init_element): Adjust declaration.
4836 * c-typeck.c (push_init_level): Pass input_location to
4837 process_init_element.
4838 (pop_init_level): Likewise.
4839 (set_designator): Likewise.
4840 (output_init_element): Add location_t parameter. Pass loc to
4842 (output_pending_init_elements): Pass input_location to
4843 output_init_element.
4844 (process_init_element): Add location_t parameter. Pass loc to
4845 output_init_element.
4847 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4849 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4850 atomic-clause, allow comma in between atomic-clause and
4853 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4856 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4857 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4859 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4862 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4863 create_tmp_var instead build_decl for creating temps.
4864 (build_array_notation_expr): Likewise.
4865 (fix_conditional_array_notations_1): Likewise.
4866 (fix_array_notation_expr): Likewise.
4867 (fix_array_notation_call_expr): Likewise.
4869 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4872 * c-tree.h (c_build_function_call_vec): New prototype.
4873 * c-typeck.c (build_function_call_vec): Don't call
4874 resolve_overloaded_builtin here.
4875 (c_build_function_call_vec): New wrapper function around
4876 build_function_call_vec. Call resolve_overloaded_builtin here.
4877 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4878 Call c_build_function_call_vec instead of build_function_call_vec.
4879 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4880 * c-decl.c (finish_decl): Likewise.
4882 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4885 * c-typeck.c: Use correct format string in cast-qual warning
4887 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4889 * c-decl.c (c_decl_attributes): Use
4890 lang_hooks.types.omp_mappable_type.
4891 * c-typeck.c (c_finish_omp_clauses): Likewise.
4893 2014-03-06 Marek Polacek <polacek@redhat.com>
4896 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4897 of checking tree code.
4899 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4901 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4902 (c_parser_parameter_declaration): Likewise.
4904 2014-02-19 Marek Polacek <polacek@redhat.com>
4907 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4908 Call mark_exp_read on exp.value.
4909 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4910 TREE_ADDRESSABLE on old instead of val.
4911 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4913 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4915 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4916 C_EXPR_APPEND by vec_safe_push.
4917 * c-tree.h (C_EXPR_APPEND): Remove.
4919 2014-01-31 Marek Polacek <polacek@redhat.com>
4922 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4923 build_function_call_vec.
4924 (build_function_call): Likewise.
4925 (build_atomic_assign): Likewise.
4926 (build_function_call_vec): Add arg_loc parameter. Use it.
4927 (convert_arguments): Likewise.
4928 (convert_for_assignment): Rename rhs_loc to expr_loc.
4929 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4930 (c_parser_objc_keywordexpr): Likewise.
4931 (c_parser_postfix_expression_after_primary): Call
4932 build_function_call_vec with expr_loc rather than op_loc.
4933 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4934 build_function_call_vec.
4935 (c_parser_expr_list): Add locations parameter. Fill it with locations
4936 of function arguments.
4937 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4939 2014-01-30 Marek Polacek <polacek@redhat.com>
4942 * c-typeck.c (build_function_call_vec): Use loc parameter.
4943 (convert_arguments): Add location parameter. Use it.
4944 (ep_convert_and_check): Likewise.
4945 (build_atomic_assign): Adjust convert_for_assignment call.
4946 (build_modify_expr): Likewise.
4947 (digest_init): Likewise.
4948 (c_finish_return): Likewise.
4949 (build_conditional_expr): Adjust ep_convert_and_check calls.
4950 (convert_for_assignment): Add rhs_loc parameter. Use it.
4951 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4954 2014-01-30 Richard Biener <rguenther@suse.de>
4957 * c-typeck.c (build_function_call_vec): Do not replace calls
4958 to a function via an incompatible type with a runtime abort.
4960 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4962 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4963 flag_enable_cilkplus with flag_cilkplus.
4964 (c_parser_direct_declarator_inner): Likewise.
4965 (c_parser_attribute_any_word): Likewise.
4966 (c_parser_attributes): Likewise.
4967 (c_parser_compound_statement): Likewise.
4968 (c_parser_statement_after_labels): Likewise.
4969 (c_parser_if_statement): Likewise.
4970 (c_parser_switch_statement): Likewise.
4971 (c_parser_do_statement): Likewise.
4972 (c_parser_for_statement): Likewise.
4973 (c_parser_unary_expression): Likewise.
4974 (c_parser_postfix_expression): Likewise.
4975 (c_parser_postfix_expression_after_primary): Likewise.
4976 (c_parser_postfix_expression_after_primary): Likewise.
4977 (c_parser_omp_clause_name): Likewise.
4978 (c_finish_omp_declare_simd): Likewise.
4979 (c_parser_cilk_verify_simd): Likewise.
4980 * c-typeck.c (build_array_ref): Likewise.
4981 (build_function_call_vec): Likewise.
4982 (convert_arguments): Likewise.
4983 (build_compound_expr): Likewise.
4984 (c_finish_return): Likewise.
4985 (c_finish_if_stmt): Likewise.
4986 (c_finish_loop): Likewise.
4987 (build_binary_op): Likewise.
4989 2014-01-23 Marek Polacek <polacek@redhat.com>
4992 * c-typeck.c (parser_build_binary_op): Use location instead of
4994 (build_binary_op): Pass location to shorten_compare.
4996 2014-01-23 Marek Polacek <polacek@redhat.com>
4999 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5002 2014-01-23 Marek Polacek <polacek@redhat.com>
5005 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5006 of a comma expression.
5007 (emit_side_effect_warnings): Likewise.
5009 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5012 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5013 function to use walk_tree and moved a lot of its functionality to
5014 expand_array_notations.
5015 (expand_array_notations): New function.
5017 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5019 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5020 attribute an attribute without value.
5022 2014-01-23 Jakub Jelinek <jakub@redhat.com>
5025 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5026 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5028 2014-01-22 Marek Polacek <polacek@redhat.com>
5031 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5032 of remove_c_maybe_const_expr on op1 and op2.
5034 2014-01-15 Jakub Jelinek <jakub@redhat.com>
5037 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5038 effects, preevaluate rhs using SAVE_EXPR first.
5040 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5043 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5044 statements with if-elseif statements.
5046 2014-01-06 Marek Polacek <polacek@redhat.com>
5049 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5050 defined bit-field types only in ISO C.
5052 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5054 Update copyright years
5056 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5058 * c-array-notation.c: Use the standard form for the copyright notice.
5060 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5062 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5063 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5064 field in parser is not empty. If not-empty, call the function
5065 c_parser_finish_omp_declare_simd.
5066 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5067 between SIMD-enabled functions and #pragma simd. Added new parameter.
5068 (c_parser_cilk_all_clauses): Modified the usage of the function
5069 c_parser_cilk_clause_vectorlength as mentioned above.
5070 (c_parser_cilk_simd_fn_vector_attrs): New function.
5071 (c_finish_cilk_simd_fn_tokens): Likewise.
5072 (is_cilkplus_vector_p): Likewise.
5073 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5074 "nomask," and "mask" strings in clause name.
5075 (c_parser_omp_all_clauses): Added 3 new case statements:
5076 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5077 PRAGMA_CILK_CLAUSE_NOMASK.
5078 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5079 check for vector attribute and if so call the function
5080 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5081 called the function c_finish_cilk_simd_fn_tokens.
5082 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5083 parser field is non-empty. If so, parse them as you would parse
5084 the omp declare simd pragma.
5085 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5086 Added a check when step is a parameter and flag it as error.
5087 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5088 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5091 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5093 * c-parser.c (c_parser_omp_parallel): Fix description.
5095 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5097 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5098 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5099 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5100 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5102 2013-12-04 Joseph Myers <joseph@codesourcery.com>
5105 * c-parser.c (c_parser_alignas_specifier): Use
5106 c_sizeof_or_alignof_type instead of c_alignof.
5107 (c_parser_alignof_expression): Likewise, with min_alignof
5108 parameter depending on alignof spelling used.
5110 2013-12-04 Marek Polacek <polacek@redhat.com>
5113 * c-decl.c (start_function): Don't warn for missing prototype for
5116 2013-12-03 Marek Polacek <polacek@redhat.com>
5119 * c-decl.c (build_compound_literal): Allow compound literals with
5120 empty initial value.
5122 2013-12-02 Joseph Myers <joseph@codesourcery.com>
5125 * c-typeck.c (build_modify_expr): Diagnose assignment to
5126 expression with array type.
5128 2013-11-29 Joseph Myers <joseph@codesourcery.com>
5131 * c-typeck.c (process_init_element): Do not treat a string as
5132 initializing a whole array when used with a designator for an
5135 2013-11-29 Joseph Myers <joseph@codesourcery.com>
5138 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5139 an inline function following a static declaration.
5141 2013-11-28 Jakub Jelinek <jakub@redhat.com>
5144 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5145 to p_name before calling c_parser_omp_teams instead of after.
5146 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5147 argument. Remove unused p_name variable.
5149 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
5150 Jakub Jelinek <jakub@redhat.com>
5152 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5153 external_scope is NULL.
5155 2013-11-27 Tom de Vries <tom@codesourcery.com>
5156 Marc Glisse <marc.glisse@inria.fr>
5159 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5161 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
5163 * c-typeck.c: Add required include files from gimple.h.
5165 2013-11-22 David Malcolm <dmalcolm@redhat.com>
5167 * c-decl.c (define_label, shadow_tag_warned)
5168 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5169 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5170 (declspecs_add_type): Remove use of in_system_header macro.
5171 * c-parser.c (c_parser_unary_expression): Likewise.
5172 * c-typeck.c (store_init_value, process_init_element)
5173 (c_start_case): Likewise.
5175 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5178 * c-parser.c (c_parser_set_source_position_from_token): Remove
5179 reference to in_system_header from comment.
5181 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5183 * c-decl.c (grokdeclarator): Update comment to refer to
5184 tree_to_[su]hwi rather than tree_low_cst.
5186 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5188 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5189 tree_to_uhwi throughout.
5191 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5193 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5196 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5198 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5201 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
5203 * c-parser.c (c_parser_cilk_simd): New.
5204 (c_parser_cilk_verify_simd): New.
5205 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5206 (c_parser_omp_for_loop): Add case for NE_EXPR.
5207 Set c_break_label for CILK_SIMD.
5208 (c_parser_cilk_clause_vectorlength): New.
5209 (c_parser_cilk_clause_linear): New.
5210 (c_parser_cilk_clause_name): New.
5211 (c_parser_cilk_all_clauses): New.
5212 * c-typeck.c (build_unary_op): Pass location argument to
5214 (build_modify_expr): Same.
5215 (build_asm_expr): Same.
5216 (c_finish_bc_stmt): Error on break/continue in loops.
5218 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
5220 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5222 2013-11-14 Diego Novillo <dnovillo@google.com>
5224 * c-decl.c: Include print-tree.h.
5225 Include stor-layout.h.
5228 Include stringpool.h.
5229 * c-lang.c: Include fold-const.h.
5230 * c-parser.c: Include stringpool.h.
5232 Include stor-layout.h.
5234 Include trans-mem.h.
5235 * c-typeck.c: Include stor-layout.h.
5236 Include trans-mem.h.
5240 2013-11-13 Joseph Myers <joseph@codesourcery.com>
5242 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5243 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5245 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5246 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5248 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5249 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5250 (c_parser_declarator, c_parser_direct_declarator_inner)
5251 (c_parser_parameter_declaration, c_parser_type_name): All callers
5253 (c_parser_declaration_or_fndef): Handle declarations with type
5254 determined from the initializer.
5256 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
5258 * c-typeck.c: Include gimplify.h.
5260 2013-11-12 Joseph Myers <joseph@codesourcery.com>
5262 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5263 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5265 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5266 or _Thread_local as appropriate in diagnostics.
5267 (build_null_declspecs): Initialize ret->thread_gnu_p.
5268 (declspecs_add_scspec): Handle either __thread or _Thread_local
5269 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5270 pedantic. Do not disallow _Thread_local extern and _Thread_local
5273 2013-11-07 Joseph Myers <joseph@codesourcery.com>
5274 Andrew MacLeod <amacleod@redhat.com>
5276 * c-aux-info.c (gen_type): Handle atomic qualifier.
5277 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5278 qualifiers when compating types.
5279 (shadow_tag_warned): Handle atomic_p in declspecs.
5280 (quals_from_declspecs): Likewise.
5281 (start_decl): Use c_type_promotes_to when promoting argument
5283 (grokdeclarator): Handle _Atomic.
5284 (get_parm_info): Diagnose any qualifier on "void" as only
5286 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5287 comparing types. Use c_type_promotes_to when promoting argument
5289 (finish_function): Use c_type_promotes_to when promoting argument
5291 (build_null_declspecs): Handle atomic_p in declspecs.
5292 (declspecs_add_qual): Handle RID_ATOMIC.
5293 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5294 (c_token_starts_declspecs): Handle RID_ATOMIC.
5295 (c_parser_declspecs): Handle atomic type specifiers and
5297 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5298 from types of expressions with atomic type.
5299 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5300 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5301 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5302 (c_parser_statement_after_labels, c_parser_switch_statement)
5303 (c_parser_for_statement, c_parser_expr_no_commas)
5304 (c_parser_conditional_expression, c_parser_binary_expression)
5305 (c_parser_cast_expression, c_parser_unary_expression)
5306 (c_parser_postfix_expression)
5307 (c_parser_postfix_expression_after_primary, c_parser_expression):
5308 Use convert_lvalue_to_rvalue.
5309 (c_parser_expression_conv, c_parser_expr_list): Document
5310 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5311 (c_parser_objc_synchronized_statement): Use
5312 convert_lvalue_to_rvalue.
5313 (c_parser_objc_selector): Handle RID_ATOMIC.
5314 (c_parser_objc_receiver, c_parser_array_notation): Use
5315 convert_lvalue_to_rvalue.
5316 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5317 _Atomic (type-name).
5318 (struct c_declspecs): Add atomic_p field.
5319 (convert_lvalue_to_rvalue): Declare.
5320 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5321 corresponding atomic types.
5322 (qualify_type): Don't add _Atomic qualifiers from second argument.
5323 (comp_target_types): Do not allow _Atomic mismatches.
5324 (type_lists_compatible_p): Do not remove atomic qualifiers when
5326 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5327 (build_atomic_assign): New functions.
5328 (build_unary_op): Use build_atomic_assign for atomic increment and
5330 (build_conditional_expr): Do not treat _Atomic void as a qualified
5332 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5333 (find_anonymous_field_with_type, convert_to_anonymous_field)
5334 (convert_for_assignment): Do not remove atomic qualifiers when
5336 (digest_init): Do not accept initialization of arrays of atomic
5337 elements by string constants.
5338 (build_asm_expr): Use convert_lvalue_to_rvalue.
5339 (build_binary_op): Do not treat _Atomic void as a qualified
5342 2013-11-06 DJ Delorie <dj@redhat.com>
5344 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5345 both explicit and builtin, print the location of the explicit one.
5347 2013-11-05 Tobias Burnus <burnus@net-b.de>
5349 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5350 c_parser_omp_distribute, c_parser_omp_teams,
5351 c_parser_omp_target, c_parser_omp_declare): Handle
5354 2013-11-03 Marek Polacek <polacek@redhat.com>
5356 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5358 2013-11-01 Jakub Jelinek <jakub@redhat.com>
5360 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5361 check_dup_generic at the end, unless remove is true.
5362 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5364 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5366 2013-10-31 Jakub Jelinek <jakub@redhat.com>
5368 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5369 with decl that is not pointer nor array.
5371 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5373 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5374 a spawning function is found.
5375 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5376 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5377 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5378 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5380 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5381 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5383 (c_finish_return): Added a check to reject _Cilk_spawn in return
5385 (build_cilk_spawn): New function.
5386 (build_cilk_sync): Likewise.
5387 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5389 2013-10-27 Tobias Burnus <burnus@net-b.de>
5392 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5393 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5394 (c_parser_statement_after_labels): Update calls.
5396 2013-10-24 Tobias Burnus <burnus@net-b.de>
5399 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5400 Handle PRAGMA_IVDEP.
5401 (c_parser_statement_after_labels): Update call.
5403 2013-10-24 Marek Polacek <polacek@redhat.com>
5405 * c-parser.c (c_parser_struct_declaration): Add a comment.
5406 (c_parser_declarator): Don't allow _Alignas here.
5408 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
5410 * c-parser.c: Include omp-low.h.
5411 * c-typeck.c: Likewise.
5413 2013-10-17 Marek Polacek <polacek@redhat.com>
5416 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5417 Document syntax of the array-declarator.
5418 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5420 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5421 (c_parser_struct_declaration): Likewise.
5422 (c_parser_declarator): Likewise.
5423 (c_parser_direct_declarator_inner): Likewise.
5424 (c_parser_parameter_declaration): Likewise.
5425 (c_parser_type_name): Likewise.
5427 2013-10-11 Jakub Jelinek <jakub@redhat.com>
5429 * c-lang.h (current_omp_declare_target_attribute): New extern
5431 * c-parser.c: Include c-lang.h.
5432 (struct c_parser): Change tokens to c_token *.
5433 Add tokens_buf field. Change tokens_avail type to unsigned int.
5434 (c_parser_consume_token): If parser->tokens isn't
5435 &parser->tokens_buf[0], increment parser->tokens.
5436 (c_parser_consume_pragma): Likewise.
5437 (enum pragma_context): Add pragma_struct and pragma_param.
5438 (c_parser_external_declaration): Adjust
5439 c_parser_declaration_or_fndef caller.
5440 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5441 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5442 Adjust recursive call.
5443 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5445 (c_parser_parameter_declaration): Use pragma_param instead of
5447 (c_parser_compound_statement_nostart, c_parser_label,
5448 c_parser_for_statement): Adjust
5449 c_parser_declaration_or_fndef callers.
5450 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5451 it through to c_parser_conditional_expression.
5452 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5453 pass it through to c_parser_binary_expression. Adjust recursive
5455 (c_parser_binary_expression): Remove prec argument, add
5456 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5457 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5458 binop matches it, use build2 instead of parser_build_binary_op.
5459 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5460 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5461 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5462 Handle pragma_struct and pragma_param the same as pragma_external.
5463 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5464 (c_parser_omp_variable_list): Parse array sections for
5465 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5466 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5467 (c_parser_omp_clause_reduction): Handle user defined reductions.
5468 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5469 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5470 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5471 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5472 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5473 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5474 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5475 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5476 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5477 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5478 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5479 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5480 (c_parser_omp_for_loop): Add CODE argument, pass it through
5481 to c_finish_omp_for. Change last argument to cclauses,
5482 and adjust uses to grab parallel clauses from the array of all
5483 the split clauses. Adjust c_parser_binary_expression,
5484 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5485 (omp_split_clauses): New function.
5486 (c_parser_omp_simd): New function.
5487 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5488 Allow the function to be called also when parsing combined constructs,
5489 and call c_parser_omp_simd when parsing for simd.
5490 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5491 #pragma omp section, require exactly one structured-block instead of
5492 sequence of statements.
5493 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5494 Allow the function to be called also when parsing combined constructs.
5495 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5496 Allow the function to be called also when parsing combined
5498 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5499 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5500 c_parser_omp_teams, c_parser_omp_target_data,
5501 c_parser_omp_target_update, c_parser_omp_target,
5502 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5503 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5504 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5505 (c_parser_omp_construct): Add p_name and mask vars. Handle
5506 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5507 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5508 and c_parser_omp_sections callers.
5509 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5510 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5511 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5512 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5513 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5515 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5516 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5517 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5518 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5519 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5520 * c-typeck.c: Include tree-inline.h.
5521 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5522 handle_omp_array_sections_1, handle_omp_array_sections,
5523 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5524 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5525 user defined reductions.
5526 (c_tree_equal): New function.
5527 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5528 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5529 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5530 c_check_omp_declare_reduction_r): New prototypes.
5531 * c-decl.c (current_omp_declare_target_attribute): New variable.
5532 (c_decl_attributes): New function.
5533 (start_decl, start_function): Use it instead of decl_attributes.
5534 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5535 c_omp_reduction_decl, c_omp_reduction_lookup,
5536 c_check_omp_declare_reduction_r): New functions.
5538 2013-09-25 Tom Tromey <tromey@redhat.com>
5540 * Make-lang.in (c/gccspec.o): Remove.
5541 (CFLAGS-c/gccspec.o): New variable.
5542 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5543 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5544 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5546 2013-09-25 Tom Tromey <tromey@redhat.com>
5548 * Make-lang.in (c/gccspec.o): Don't use subshell.
5550 2013-09-18 Marek Polacek <polacek@redhat.com>
5553 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5554 Remove unnecessary check.
5556 2013-09-18 Marek Polacek <polacek@redhat.com>
5559 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5560 no_sanitize_undefined attribute.
5562 2013-09-13 Kai Tietz <ktietz@redhat.com>
5565 * c-decl.c (c_builtin_function_ext_scope): Remove
5566 wrong assumption that it is never called on prexisting
5569 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5571 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5573 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5575 * c-objc-common.c (c_tree_printer): Tidy.
5577 2013-08-30 Marek Polacek <polacek@redhat.com>
5579 * c-typeck.c (build_binary_op): Add division by zero and shift
5582 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5583 Joseph Myers <joseph@codesourcery.com>
5586 * c-typeck.c (c_common_type): Prefer double_type_node over
5587 other REAL_TYPE types with the same precision.
5588 (convert_arguments): Likewise.
5590 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5592 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5593 (c_initialize_diagnostics): Call a destructor for the early printer.
5595 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5597 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5598 printer initialization.
5600 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5603 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5604 check for truth values.
5605 (expand_array_notation_exprs): Added truth values case. Removed an
5606 unwanted else. Added for-loop to walk through subtrees in default
5609 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5611 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5613 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5615 * c-parser.c (struct c_generic_association): Fix typo.
5617 2013-07-23 Tom Tromey <tromey@redhat.com>
5618 Joseph Myers <joseph@codesourcery.com>
5620 * c-parser.c (struct c_generic_association): New.
5621 (c_generic_association_d): New typedef.
5622 (c_parser_generic_selection): New function.
5623 (c_parser_postfix_expression): Handle RID_GENERIC.
5625 2013-07-13 Jason Merrill <jason@redhat.com>
5628 * c-decl.c (finish_struct): Check for too-large class.
5630 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5633 * c-typeck.c (set_init_index): When folding, check for index overflow.
5635 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5637 * c-parser.c (c_parser_array_notation): Removed rejection of array
5638 notations in an array of function pointers.
5640 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5642 * c-array-notation.c (make_triplet_val_inv): New function.
5643 (create_cmp_incr): Likewise.
5644 (create_array_refs): Likewise.
5645 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5646 Also modularized common parts between functions and called the function.
5647 (build_array_notation_expr): Likewise.
5648 (fix_conditional_array_notations_1): Likewise.
5649 (fix_array_notation_expr): Likewise.
5650 (fix_array_notation_call_expr): Likewise.
5652 2013-06-18 Marek Polacek <polacek@redhat.com>
5655 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5657 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5659 * c-array-notation.c (build_array_notation_expr): Reject array notation
5660 mismatch between LHS and RHS even inside a call_expr. Also, removed
5661 a couple while statements that were dead code.
5663 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5665 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5666 excessive precision expressions in function parameters. Also removed
5667 couple unwanted while statements.
5669 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5671 * c-array-notation.c (expand_array_notation_exprs): Added
5672 ARRAY_NOTATION_REF case.
5674 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5676 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5677 function to c-family/array-notation-common.c.
5678 (is_cilkplus_reduce_builtin): Likewise.
5679 (find_rank): Likewise.
5680 (extract_array_notation_exprs): Likewise.
5681 (replace_array_notations): Likewise.
5682 (find_inv_trees): Likewise.
5683 (replace_inv_trees): Likewise.
5684 (contains_array_notation_expr): Likewise.
5685 (find_correct_array_notation_type): Likewise.
5686 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5687 (struct inv_list): Moved this to c-family/array-notation-common.c.
5688 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5690 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5692 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5693 reduction functions outside the for-loop. Added a check if the fundecl
5694 is non-NULL. Finally, removed an unwanted if-statement, and made the
5697 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5699 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5700 condition of the if-statement matches the rank of else-block and then-
5701 block when array notations are used.
5702 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5703 expression after the entire function body is parsed.
5704 (c_parser_expr_no_commas): Delayed creating array notation expressions
5705 to the end of function parsing.
5706 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5707 whole if-statement instead of just the condition.
5708 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5710 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5713 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5714 array to NULL_TREE if they are unused. Also added a check for the
5715 field to be NULL before its fields are used in future.
5717 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5720 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5721 (build_array_notation_expr): Likewise.
5723 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5725 * c-typeck.c (build_array_ref): Added a check to see if array's
5726 index is greater than one. If true, then emit an error.
5727 (build_function_call_vec): Exclude error reporting and checking
5728 for builtin array-notation functions.
5729 (convert_arguments): Likewise.
5730 (c_finish_return): Added a check for array notations as a return
5731 expression. If true, then emit an error.
5732 (c_finish_loop): Added a check for array notations in a loop
5733 condition. If true then emit an error.
5734 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5735 (build_binary_op): Added a check for array notation expr inside
5736 op1 and op0. If present, we call another function to find correct
5738 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5739 * c-parser.c (c_parser_compound_statement): Check if array
5740 notation code is used in tree, if so, then transform them into
5742 (c_parser_expr_no_commas): Check if array notation is used in LHS
5743 or RHS, if so, then build array notation expression instead of
5745 (c_parser_postfix_expression_after_primary): Added a check for
5746 colon(s) after square braces, if so then handle it like an array
5747 notation. Also, break up array notations in unary op if found.
5748 (c_parser_direct_declarator_inner): Added a check for array
5750 (c_parser_compound_statement): Added a check for array notation in
5751 a stmt. If one is present, then expand array notation expr.
5752 (c_parser_if_statement): Likewise.
5753 (c_parser_switch_statement): Added a check for array notations in
5754 a switch statement's condition. If true, then output an error.
5755 (c_parser_while_statement): Similarly, but for a while.
5756 (c_parser_do_statement): Similarly, but for a do-while.
5757 (c_parser_for_statement): Similarly, but for a for-loop.
5758 (c_parser_unary_expression): Check if array notation is used in a
5759 pre-increment or pre-decrement expression. If true, then expand
5761 (c_parser_array_notation): New function.
5762 * c-array-notation.c: New file.
5763 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5765 2013-05-23 Mike Stump <mikestump@comcast.net>
5767 * c-typeck.c (convert_for_assignment): Handle references to memory
5770 2013-05-16 Jason Merrill <jason@redhat.com>
5772 * Make-lang.in (cc1$(exeext)): Use link mutex.
5774 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5776 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5777 to simply use OPT_Wpointer_arith.
5778 (build_unary_op): Likewise.
5780 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5783 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5784 argument. If set, or it temporarily for parsing of the first
5785 argument into force_folding_builtin_constant_p.
5786 (c_parser_postfix_expression): Adjust callers.
5788 2013-03-21 Richard Biener <rguenther@suse.de>
5790 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5791 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5793 2013-02-12 Marek Polacek <polacek@redhat.com>
5796 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5799 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5802 * c-typeck.c (set_nonincremental_init_from_string): If
5803 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5805 (process_init_element): Likewise.
5807 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5810 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5811 argument, don't call default_function_array_conversion
5812 nor c_fully_fold here.
5813 (c_parser_asm_statement): Adjust callers.
5814 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5815 and outputs here, and call default_function_array_conversion
5816 on inputs that don't need to be addressable.
5818 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5821 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5822 warning require that both c_common_unsigned_type as well as
5823 c_common_signed_type is the same for both mvl and mvr types.
5825 2012-11-16 Diego Novillo <dnovillo@google.com>
5827 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5829 * c-common.c: Use new vec API in vec.h.
5830 * c-common.h: Likewise.
5831 * c-gimplify.c: Likewise.
5832 * c-pragma.c: Likewise.
5833 * c-pretty-print.c: Likewise.
5834 * c-pretty-print.h: Likewise.
5835 * c-semantics.c: Likewise.
5836 * c-decl.c: Likewise.
5837 * c-parser.c: Likewise.
5838 * c-tree.h: Likewise.
5839 * c-typeck.c: Likewise.
5841 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5844 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5846 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5849 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5850 shadows a function, unless the variable is a function or a
5851 pointer-to-function.
5853 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5856 * c-parser.c (struct c_tree_loc_pair): Removed.
5857 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5858 add location_t * and tree * arguments, fill in array of 3
5859 sizeof_arg trees and corresponding locs.
5860 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5861 c_parser_expr_list callers.
5862 (c_parser_postfix_expression_after_primary): Likewise. Pass
5863 array of 3 sizeof_arg trees and locs (corresponding to first
5864 3 arguments) to sizeof_pointer_memaccess_warning.
5866 2012-10-09 Lawrence Crowl <crowl@google.com>
5868 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5869 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5872 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5875 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5878 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5881 * c-typeck.c: Include c-common.h.
5882 (enum stv_conv): Moved to c-common.h.
5883 (scalar_to_vector): Moved to c-common.c.
5884 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5885 * Make-lang.in: c-typeck.c depends on c-common.h.
5887 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5889 * c-decl.c (c_write_global_declarations): Fix handling of
5892 2012-09-30 Sharad Singhai <singhai@google.com>
5894 * c-decl.c (c_write_global_declarations): Use a different method
5895 to determine if the dump has ben initialized.
5897 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5900 * c-typeck.c (c_cast_expr): When casting to a type requiring
5901 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5904 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5907 * c-typeck.c (build_unary_op): Pass original argument of
5908 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5909 any C_MAYBE_CONST_EXPR, if it has integer operands.
5910 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5911 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5912 to c_objc_common_truthvalue_conversion, then remove any
5913 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5914 c_objc_common_truthvalue_conversion not
5915 c_common_truthvalue_conversion.
5916 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5917 call note_integer_operands for arguments with integer operands
5918 that are not integer constants.
5920 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5923 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5924 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5926 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5929 * c-convert.c (convert): Don't call fold_convert_loc if
5930 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5931 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5932 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5934 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5937 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5938 for nested and empty_ok arguments in the call to
5939 c_parser_declaration_or_fndef.
5941 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5943 * c-tree.h (c_last_sizeof_arg): Declare.
5944 * c-parser.c (struct c_tree_loc_pair): New type.
5945 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5947 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5948 (c_parser_postfix_expression_after_primary): Likewise. Call
5949 sizeof_pointer_memaccess_warning if needed.
5950 (sizeof_ptr_memacc_comptypes): New function.
5951 * c-typeck.c (c_last_sizeof_arg): New global variable.
5952 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5954 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5956 * c-lang.h (lang_decl): Add variable_size GTY option.
5958 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5960 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5961 * Make-lang.in: Fix dependencies.
5963 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5965 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5966 and add language Makefile hooks.
5967 * config-lang.in: New file.
5968 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5969 add the required "normal" config-lang.in rules.
5970 * c-lang.h: Moved from gcc/ to here.
5971 * c-tree.h: Likewise.
5972 * c-objc-common.c: Likewise.
5973 * c-objc-common.h: Likewise.
5974 * c-typeck.c: Likewise.
5975 * c-convert.c: Likewise.
5976 * c-lang.c: Likewise.
5977 * c-aux-info.c: Likewise.
5978 * c-errors.c: Likewise.
5979 * gccspec.c: Likewise.
5980 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5981 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5983 Copyright (C) 2012-2019 Free Software Foundation, Inc.
5985 Copying and distribution of this file, with or without modification,
5986 are permitted in any medium without royalty provided the copyright
5987 notice and this notice are preserved.