1 2022-07-04 Tobias Burnus <tobias@codesourcery.com>
2 Chung-Lin Tang <cltang@codesourcery.com>
3 Thomas Schwinge <thomas@codesourcery.com>
5 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
6 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
7 OMP_REQUIRES_TARGET_USED.
8 (c_parser_omp_requires): Remove sorry.
10 2022-07-01 Tobias Burnus <tobias@codesourcery.com>
12 * c-parser.cc (c_parser_omp_target_enter_data,
13 c_parser_omp_target_exit_data): Accept tofrom
14 map-type modifier but use 'to' / 'from' internally.
16 2022-06-16 David Malcolm <dmalcolm@redhat.com>
18 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
19 group the warning with any note.
20 (warn_about_goto): Likewise to group error or warning with note.
21 Bail out if the warning wasn't emitted, to avoid emitting orphan
23 (lookup_label_for_goto): Add auto_diagnostic_group to
24 group the error with the note.
25 (check_earlier_gotos): Likewise.
26 (c_check_switch_jump_warnings): Likewise for any error/warning.
27 Conditionalize emission of the notes.
28 (diagnose_uninitialized_cst_member): Likewise for warning,
29 conditionalizing emission of the note.
30 (grokdeclarator): Add auto_diagnostic_group to group the "array
31 type has incomplete element type" error with any note.
32 (parser_xref_tag): Add auto_diagnostic_group to group warnings
33 with their notes. Conditionalize emission of notes.
34 (start_struct): Add auto_diagnostic_group to group the
35 "redefinition of" errors with any note.
36 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
37 (check_for_loop_decls): Likewise for pre-C99 error.
39 2022-06-07 Jakub Jelinek <jakub@redhat.com>
41 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
42 style linear clause modifiers. Set
43 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
44 old style modifiers are used.
45 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
46 with val modifier on simd or for if the old style modifiers are
49 2022-06-02 David Malcolm <dmalcolm@redhat.com>
51 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
52 (c_get_sarif_source_language): New.
53 * c-tree.h (c_get_sarif_source_language): New decl.
55 2022-05-31 Jason Merrill <jason@redhat.com>
57 * Make-lang.in (c.tags): Look at *.cc.
59 2022-05-31 Jakub Jelinek <jakub@redhat.com>
61 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
64 2022-05-28 Jakub Jelinek <jakub@redhat.com>
66 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
67 seen first, use "%<to%>" or "%<enter%>" depending on
68 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
69 "%<to%> or %<enter%>" wording.
71 2022-05-27 Jakub Jelinek <jakub@redhat.com>
73 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
74 (c_parser_omp_all_clauses): For to clause on declare target, use
75 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
76 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
77 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
78 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
79 OMP_CLAUSE_TO_DECLARE.
80 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
81 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
82 name in diagnostics instead of
83 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
85 2022-05-25 Jakub Jelinek <jakub@redhat.com>
88 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
89 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
90 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
91 diagnostic and fixit hint if DATUM has pointer type.
92 * c-parser.cc (c_parser_postfix_expression,
93 c_parser_omp_variable_list): Adjust build_component_ref callers.
94 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
97 2022-05-24 Jakub Jelinek <jakub@redhat.com>
100 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
102 2022-05-18 Marek Polacek <polacek@redhat.com>
105 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
107 * c-tree.h (comptypes_check_enum_int): Declare.
108 * c-typeck.cc (comptypes): No longer static.
110 2022-05-17 Marek Polacek <polacek@redhat.com>
112 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
115 2022-05-17 Jakub Jelinek <jakub@redhat.com>
117 * c-parser.cc (c_parser_omp_clause_depend): Parse
118 inoutset depend-kind.
119 (c_parser_omp_depobj): Likewise.
121 2022-05-16 Martin Liska <mliska@suse.cz>
123 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
125 2022-05-12 Jakub Jelinek <jakub@redhat.com>
127 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
129 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
130 in postfix expressions.
131 (c_parser_omp_variable_list): Handle omp_all_memory in depend
133 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
134 keyword in depend clause as null_pointer_node, diagnose invalid
137 2022-05-09 Martin Liska <mliska@suse.cz>
139 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
141 (c_parser_binary_expression): Likewise.
143 2022-05-07 Marek Polacek <polacek@redhat.com>
147 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
149 2022-04-08 Jakub Jelinek <jakub@redhat.com>
152 * c-typeck.cc (c_build_va_arg): Reject function types.
154 2022-03-22 Marek Polacek <polacek@redhat.com>
158 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
159 (start_init): Set it.
160 (finish_init): Restore constructor_designated.
161 (push_init_level): Set constructor_designated to the value of
162 constructor_designated in the upper constructor_stack.
164 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
167 * c-typeck.cc (handle_omp_array_sections_1)
168 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
169 instead of 'c_omp_map_clause_name'.
171 2022-03-09 Joseph Myers <joseph@codesourcery.com>
173 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
174 differently from earlier standards for unprototyped function type
177 2022-03-09 Jakub Jelinek <jakub@redhat.com>
180 * c-fold.cc (c_fully_fold_internal): Don't emit
181 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
182 * c-typeck.cc (build_binary_op): Likewise.
184 2022-03-07 Jakub Jelinek <jakub@redhat.com>
186 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
189 2022-02-23 Richard Biener <rguenther@suse.de>
191 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
192 SSA names without definition.
193 (c_parser_gimple_declaration): Handle pointer typed SSA names.
195 2022-02-17 Jakub Jelinek <jakub@redhat.com>
198 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
199 convert_lvalue_to_rvalue and build_indirect_ref instead of
200 build_simple_mem_ref.
202 2022-02-11 Richard Biener <rguenther@suse.de>
204 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
207 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
209 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
211 (c_parser_omp_variable_list): Handle array sections.
212 (c_parser_omp_clause_has_device_addr): Added.
213 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
215 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
217 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
218 (c_finish_omp_clauses): Handle array sections.
220 2022-02-09 Jakub Jelinek <jakub@redhat.com>
223 * c-parser.cc (c_parser_postfix_expression)
224 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
225 instead of build1_loc to build PAREN_EXPR.
226 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
227 * c-fold.cc (c_fully_fold_internal): Likewise.
229 2022-01-17 Martin Liska <mliska@suse.cz>
231 * Make-lang.in: Rename .c names to .cc.
232 * c-convert.cc: Likewise.
233 * c-decl.cc (struct lang_identifier): Likewise.
234 (pop_scope): Likewise.
235 (finish_decl): Likewise.
236 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
237 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
238 * c-parser.h (GCC_C_PARSER_H): Likewise.
239 * c-tree.h (c_keyword_starts_typename): Likewise.
240 (finish_declspecs): Likewise.
241 (c_get_alias_set): Likewise.
242 (enum c_oracle_request): Likewise.
243 (tag_exists_p): Likewise.
244 (set_c_expr_source_range): Likewise.
245 * c-typeck.cc (c_common_type): Likewise.
246 (c_finish_omp_clauses): Likewise.
247 * config-lang.in: Likewise.
249 2022-01-17 Martin Liska <mliska@suse.cz>
251 * c-aux-info.c: Moved to...
252 * c-aux-info.cc: ...here.
253 * c-convert.c: Moved to...
254 * c-convert.cc: ...here.
255 * c-decl.c: Moved to...
256 * c-decl.cc: ...here.
257 * c-errors.c: Moved to...
258 * c-errors.cc: ...here.
259 * c-fold.c: Moved to...
260 * c-fold.cc: ...here.
261 * c-lang.c: Moved to...
262 * c-lang.cc: ...here.
263 * c-objc-common.c: Moved to...
264 * c-objc-common.cc: ...here.
265 * c-parser.c: Moved to...
266 * c-parser.cc: ...here.
267 * c-typeck.c: Moved to...
268 * c-typeck.cc: ...here.
269 * gccspec.c: Moved to...
270 * gccspec.cc: ...here.
271 * gimple-parser.c: Moved to...
272 * gimple-parser.cc: ...here.
274 2022-01-17 Andrew Stubbs <ams@codesourcery.com>
276 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
278 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
281 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
282 outer node for ARRAY_REFs.
284 2022-01-01 Jakub Jelinek <jakub@redhat.com>
287 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
288 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
290 2021-12-17 Marek Polacek <polacek@redhat.com>
293 * c-decl.c (c_warn_unused_attributes): Don't warn for
295 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
296 arguments when the attribute is ignored.
298 2021-12-14 Jakub Jelinek <jakub@redhat.com>
301 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
302 consume the pragma and silently skip to the pragma eol.
304 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
306 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
307 * c-parser.c: Likewise.
309 2021-12-09 Jakub Jelinek <jakub@redhat.com>
312 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
313 to resort_data.new_value.
315 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
317 * c-parser.c (struct omp_dim): New struct type for use inside
318 c_parser_omp_variable_list.
319 (c_parser_omp_variable_list): Allow multiple levels of array and
320 component accesses in array section base-pointer expression.
321 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
322 c_parser_omp_var_list_parens.
323 (c_parser_omp_clause_from): Likewise.
324 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
325 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
327 (c_finish_omp_clauses): Extend allowed ranged of expressions
328 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
330 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
333 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
334 call to c_parser_omp_variable_list to 'true'.
335 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
337 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
339 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
341 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
342 orphan loop" checking.
344 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
345 Thomas Schwinge <thomas@codesourcery.com>
347 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
348 OpenACC gang reductions.
350 2021-11-30 Richard Biener <rguenther@suse.de>
352 * gimple-parser.c (c_parser_gimple_postfix_expression):
353 avoid unreachable code after break.
355 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
358 * Make-lang.in: Use ETAGS variable in TAGS target.
360 2021-11-29 Richard Biener <rguenther@suse.de>
362 * c-typeck.c (c_tree_equal): Remove unreachable return.
363 * c-parser.c (get_matching_symbol): Likewise.
365 2021-11-23 Jakub Jelinek <jakub@redhat.com>
367 * c-typeck.c (c_clone_omp_udr): Don't initialize
368 id.transform_lang_insert_block.
370 2021-11-19 Martin Sebor <msebor@redhat.com>
374 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
375 code resulting from macro expansion.
377 2021-11-19 Martin Liska <mliska@suse.cz>
380 2021-11-19 Martin Liska <mliska@suse.cz>
382 * c-parser.c (add_debug_begin_stmt): Use option directly.
384 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
386 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
387 * c-parser.c (c_parser_postfix_expression): Likewise.
389 2021-11-18 Martin Liska <mliska@suse.cz>
391 * c-parser.c (add_debug_begin_stmt): Use option directly.
393 2021-11-17 Martin Sebor <msebor@redhat.com>
396 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
397 bounds before deciding if they're constant.
399 2021-11-15 Jakub Jelinek <jakub@redhat.com>
401 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
402 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
404 2021-11-11 Jakub Jelinek <jakub@redhat.com>
406 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
407 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
408 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
409 OMP_CLAUSE_NUM_TEAMS_EXPR.
410 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
411 combined target teams even lower-bound expression.
413 2021-11-11 Richard Biener <rguenther@suse.de>
415 * gimple-parser.c: Shuffle bitmap.h include.
417 2021-11-03 Joseph Myers <joseph@codesourcery.com>
420 * c-convert.c (c_convert): New function, based on convert.
421 (convert): Make into wrapper of c_convert.
422 (convert_init): New function.
423 * c-typeck.c (enum impl_conv): Add ic_init_const.
424 (convert_for_assignment): Handle ic_init_const like ic_init. Add
425 new argument to convert_and_check call.
426 (digest_init): Pass ic_init_const to convert_for_assignment for
427 initializers required to be constant.
429 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
431 * c-tree.h (c_simulate_record_decl): Declare.
432 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
433 * c-decl.c (c_simulate_record_decl): New function.
435 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
438 * Make-lang.in: Add dummy c.install-dvi target.
440 2021-10-15 Richard Biener <rguenther@suse.de>
444 (c_parser_gimple_postfix_expression_after_primary): Check
445 for a pointer do be dereferenced by ->.
447 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
449 * c-parser.c (c_finish_omp_declare_variant): Change call from
450 c_omp_check_context_selector to omp_check_context_selector. Change
451 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
453 2021-10-09 Jakub Jelinek <jakub@redhat.com>
455 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
456 (c_parser_omp_scan_loop_body): Use it.
457 (c_parser_omp_sections_scope): Likewise.
459 2021-10-07 Richard Biener <rguenther@suse.de>
461 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
463 2021-10-05 Richard Biener <rguenther@suse.de>
466 * gimple-parser.c (c_parser_gimple_postfix_expression):
467 Accept more address _Literals.
469 2021-10-04 Marek Polacek <polacek@redhat.com>
472 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
474 2021-10-01 Martin Sebor <msebor@redhat.com>
477 * c-typeck.c (maybe_warn_for_null_address): New function.
478 (build_binary_op): Call it.
480 2021-10-01 Jakub Jelinek <jakub@redhat.com>
481 Richard Biener <rguenther@suse.de>
484 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
485 for division even for SANITIZE_SI_OVERFLOW.
487 2021-10-01 Jakub Jelinek <jakub@redhat.com>
489 * c-parser.c (c_parser_omp_clause_order): Set
490 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
492 2021-09-28 Andrew Pinski <apinski@marvell.com>
495 * c-parser.c (c_parser_statement_after_labels): Pass
496 the c_expr instead of the tree to c_finish_goto_ptr.
497 * c-typeck.c (c_finish_goto_ptr): Change the second
498 argument type to c_expr.
499 * c-tree.h (c_finish_goto_ptr): Likewise.
500 Error out if the expression was not of a pointer type.
502 2021-09-22 Jakub Jelinek <jakub@redhat.com>
504 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
507 2021-09-18 Jakub Jelinek <jakub@redhat.com>
509 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
510 and reproducible modifiers.
511 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
513 2021-09-18 Jakub Jelinek <jakub@redhat.com>
515 * c-parser.c (c_parser_omp_clause_default): Handle private and
516 firstprivate arguments, adjust diagnostics on unknown argument.
518 2021-09-17 Jakub Jelinek <jakub@redhat.com>
520 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
523 2021-09-10 Jakub Jelinek <jakub@redhat.com>
525 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
526 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
527 don't call build_conditional_expr, instead build a COND_EXPR directly.
528 (c_parser_binary_expression): Avoid calling parser_build_binary_op
529 if omp_atomic_lhs even in more cases for >, < or ==.
530 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
531 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
532 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
533 * c-typeck.c (build_binary_op): For flag_openmp only handle
536 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
538 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
541 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
543 * c-decl.c (enum deprecated_states): Add unavailable state.
544 (merge_decls): Copy unavailability.
545 (quals_from_declspecs): Handle unavailable case.
546 (start_decl): Amend the logic handling suppression of nested
547 deprecation states to include unavailability.
548 (smallest_type_quals_location): Amend comment.
549 (grokdeclarator): Handle the unavailable deprecation state.
550 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
551 * c-tree.h (struct c_declspecs): Add unavailable_p.
552 * c-typeck.c (build_component_ref): Handle unavailability.
553 (build_external_ref): Likewise.
555 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
556 Joseph Myers <joseph@codesourcery.com>
559 * c-decl.c (duplicate_decls): On significant mismatches, mark the
560 types of both (non-function) decls as error_mark_node, so that the
561 middle-end can see the code is malformed.
562 (free_attr_access_data): Don't process if the type has been set to
565 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
567 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
568 and 'ancestor' in 'target device' clauses.
570 2021-08-23 Jakub Jelinek <jakub@redhat.com>
572 * c-parser.c (c_parser_omp_clause_num_tasks,
573 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
575 2021-08-22 Martin Uecker <muecker@gwdg.de>
578 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
579 for pointers to arrays with qualifiers.
580 (build_conditional_expr): For C23 don't lose qualifiers for pointers
581 to arrays when the other pointer is a void pointer. Update warnings.
582 (convert_for_assignment): Update warnings for C2X when converting from
583 void* with qualifiers to a pointer to array with the same qualifiers.
585 2021-08-20 Jakub Jelinek <jakub@redhat.com>
587 * c-parser.c (c_parser_omp_error): New function.
588 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
590 2021-08-20 Jakub Jelinek <jakub@redhat.com>
592 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
593 comma at the end of list.
594 (c_parser_omp_requires): Likewise.
596 2021-08-19 Jakub Jelinek <jakub@redhat.com>
598 * c-parser.c (c_parser_omp_requires): Don't call
599 c_parser_peek_2nd_token and optionally consume token if current
600 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
602 2021-08-18 Jakub Jelinek <jakub@redhat.com>
604 * c-parser.c (c_parser_omp_nothing): New function.
605 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
607 2021-08-18 Jakub Jelinek <jakub@redhat.com>
609 * c-parser.c (c_parser_statement_after_labels): Add restart label
610 near the start of the function. If c_parser_pragma returns false,
612 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
613 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
614 return what c_parser_omp_declare returned. Return true instead of
615 false after emitting errors that the directive is not allowed in
617 (c_parser_omp_ordered): Return true instead of
618 false after emitting errors that the directive is not allowed in
620 (c_parser_omp_target_update): Likewise.
621 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
622 Change return type from tree to bool, return false if the
623 directive should be ignored in pragma_stmt contexts.
624 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
625 return their result directly.
626 (c_parser_omp_cancellation_point): Change return type from void to
627 bool, return false if the directive should be ignored in pragma_stmt
629 (c_parser_omp_declare): Likewise.
631 2021-08-17 Jakub Jelinek <jakub@redhat.com>
633 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
634 (c_parser_omp_scope): New function.
635 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
637 2021-08-12 Jakub Jelinek <jakub@redhat.com>
639 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
640 (c_parser_omp_clause_filter): New function.
641 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
642 (OMP_MASKED_CLAUSE_MASK): Define.
643 (c_parser_omp_masked): New function.
644 (c_parser_omp_parallel): Handle parallel masked.
645 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
646 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
648 2021-08-12 Martin Uecker <muecker@gwdg.de>
652 * c-typeck.c (c_expr_sizeof_type): Evaluate
653 size expressions for structs of variable size.
655 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
657 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
658 'primary' as alias for 'master'.
660 2021-08-10 Martin Uecker <muecker@gwdg.de>
663 * c-typeck.c (c_expr_sizeof_expr): Evaluate
664 size expressions for structs of variable size.
666 2021-08-06 Tamar Christina <tamar.christina@arm.com>
668 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
669 * c-tree.h (c_simulate_enum_decl): Likewise.
671 2021-08-06 Martin Sebor <msebor@redhat.com>
673 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
674 vec arguments to by-reference.
675 (c_finish_omp_declare_simd): Same.
676 (c_parser_compound_statement_nostart): Same.
677 (c_parser_for_statement): Same.
678 (c_parser_objc_methodprotolist): Same.
679 (c_parser_oacc_routine): Same.
680 (c_parser_omp_for_loop): Same.
681 (c_parser_omp_declare_simd): Same.
683 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
684 Joseph Myers <joseph@codesourcery.com>
685 Cesar Philippidis <cesar@codesourcery.com>
687 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
688 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
689 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
690 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
692 2021-07-20 Martin Sebor <msebor@redhat.com>
694 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
696 * c-typeck.c (c_build_function_call_vec): Same.
698 2021-07-15 Martin Sebor <msebor@redhat.com>
702 * c-decl.c (get_parm_array_spec): Strip nops.
704 2021-07-06 Martin Sebor <msebor@redhat.com>
706 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
708 2021-07-02 Jakub Jelinek <jakub@redhat.com>
711 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
712 appears before a CPP_NAME.
714 2021-06-25 Martin Sebor <msebor@redhat.com>
716 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
717 warning_suppressed_p, suppress_warning, and copy_no_warning.
718 (diagnose_mismatched_decls): Same.
719 (duplicate_decls): Same.
720 (grokdeclarator): Same.
721 (finish_function): Same.
722 (c_write_global_declarations_1): Same.
723 * c-fold.c (c_fully_fold_internal): Same.
724 * c-parser.c (c_parser_expr_no_commas): Same.
725 (c_parser_postfix_expression): Same.
726 * c-typeck.c (array_to_pointer_conversion): Same.
727 (function_to_pointer_conversion): Same.
728 (default_function_array_conversion): Same.
729 (convert_lvalue_to_rvalue): Same.
730 (default_conversion): Same.
731 (build_indirect_ref): Same.
732 (build_function_call_vec): Same.
733 (build_atomic_assign): Same.
734 (build_unary_op): Same.
735 (c_finish_return): Same.
736 (emit_side_effect_warnings): Same.
737 (c_finish_stmt_expr): Same.
738 (c_omp_clause_copy_ctor): Same.
740 2021-06-24 Jakub Jelinek <jakub@redhat.com>
743 * c-parser.c (c_parser_has_attribute_expression): Set source range for
746 2021-06-24 Jakub Jelinek <jakub@redhat.com>
749 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
752 2021-06-24 Jakub Jelinek <jakub@redhat.com>
754 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
755 C_ORT_OMP for clauses on target construct.
756 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
757 (c_parser_omp_target): For non-combined target add
758 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
759 C_ORT_OMP_TARGET to c_finish_omp_clauses.
760 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
761 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
762 never present on C_ORT_*DECLARE_SIMD.
763 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
764 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
765 corresponding map clauses.
767 2021-06-21 Jakub Jelinek <jakub@redhat.com>
770 * c-typeck.c (c_mark_addressable): Diagnose trying to make
771 bit-fields addressable.
773 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
775 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
778 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
781 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
782 var in the error case.
784 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
787 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
788 spot built-in functions.
790 2021-06-06 Jakub Jelinek <jakub@redhat.com>
793 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
794 even when target is combined with other constructs.
796 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
799 * c-decl.c (finish_struct): Fix thinko in previous change.
800 * c-typeck.c (convert_for_assignment): Do not warn on pointer
801 assignment and initialization for storage order purposes if the
802 RHS is a call to a DECL_IS_MALLOC function.
804 2021-06-04 Martin Sebor <msebor@redhat.com>
807 * c-objc-common.c (print_type): Handle erroneous types.
809 2021-06-03 Jakub Jelinek <jakub@redhat.com>
812 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
813 after depend only cases.
815 2021-05-31 Richard Biener <rguenther@suse.de>
818 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
819 * c-parser.c (c_parser_postfix_expression): Likewise.
821 2021-05-28 Richard Biener <rguenther@suse.de>
824 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
825 invalid if conditions.
827 2021-05-28 Jakub Jelinek <jakub@redhat.com>
830 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
831 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
832 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
833 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
834 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
835 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
836 if present in map_head, map_field_head or map_firstprivate_head
839 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
841 * c-parser.c (c_parser_omp_clause_affinity): New.
842 (c_parser_omp_clause_name, c_parser_omp_variable_list,
843 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
844 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
845 c_finish_omp_clauses): Likewise.
847 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
850 * c-decl.c (finish_struct): Warn for a union containing an aggregate
851 field with a differing scalar storage order.
853 2021-05-21 Jakub Jelinek <jakub@redhat.com>
856 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
857 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
858 if a decl is mentioned both in map clause and in such firstprivate
859 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
861 2021-05-19 Jakub Jelinek <jakub@redhat.com>
864 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
865 master when combined with taskloop.
866 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
867 parallel master when not combined with taskloop.
869 2021-05-18 Richard Biener <rguenther@suse.de>
872 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
873 Diagnose calls to non-functions.
874 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
876 2021-05-17 Richard Biener <rguenther@suse.de>
879 * gimple-parser.c (c_parser_gimple_label): Avoid building
880 a GIMPLE label with NULL label decl.
882 2021-05-13 Martin Sebor <msebor@redhat.com>
885 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
887 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
889 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
892 2021-05-10 Martin Liska <mliska@suse.cz>
894 * c-aux-info.c (affix_data_type): Use startswith
895 function instead of strncmp.
896 * c-typeck.c (build_function_call_vec): Likewise.
897 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
899 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
901 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
902 on the address of a pointer field in a record with reverse SSO.
904 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
906 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
907 for || and && reductions.
909 2021-04-29 Joseph Myers <joseph@codesourcery.com>
911 * c-typeck.c (function_types_compatible_p): For C2X, treat
912 unprototyped function as compatible with non-variadic prototyped
913 function even if some argument types are changed by the default
916 2021-04-15 Martin Sebor <msebor@redhat.com>
920 * c-decl.c (pushdecl): Always propagate type attribute.
922 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
925 * c-typeck.c (c_common_type): Do not drop attributes that
926 affect type identity.
928 2021-04-10 Jakub Jelinek <jakub@redhat.com>
931 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
934 2021-03-25 Jakub Jelinek <jakub@redhat.com>
937 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
940 2021-03-19 Jakub Jelinek <jakub@redhat.com>
943 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
944 with modifycode NOP_EXPR produces and mark the _Atomic var as read
946 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
947 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
948 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
950 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
953 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
954 ensure that the varpool node is marked as offloadable.
956 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
959 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
961 2021-02-24 Martin Sebor <msebor@redhat.com>
964 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
966 2021-02-18 Jakub Jelinek <jakub@redhat.com>
969 * c-typeck.c (c_finish_return): Don't wrap retval into
970 EXCESS_PRECISION_EXPR in functions that return void.
972 2021-02-11 Marek Polacek <polacek@redhat.com>
974 * c-parser.c (c_parser_if_statement): Use vec_free.
976 2021-02-04 Martin Sebor <msebor@redhat.com>
979 * c-decl.c (locate_old_decl): Add type to diagnostic output.
980 (diagnose_mismatched_decls): Same.
981 (start_function): Introduce temporaries for better readability.
982 * c-typeck.c (comptypes_internal): Only consider complete enum
983 types in comparisons with integers.
985 2021-02-01 Martin Sebor <msebor@redhat.com>
988 * c-decl.c (free_attr_access_data): New function.
989 (c_parse_final_cleanups): Call free_attr_access_data.
991 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
993 * c-parser.c (c_parser_omp_clause_detach): New.
994 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
995 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
996 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
997 clause. Prevent use of detach with mergeable and overriding the
998 data sharing mode of the event handle.
1000 2021-01-15 Jakub Jelinek <jakub@redhat.com>
1002 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1003 unqualified element type and then call c_build_qualified_type on the
1006 2021-01-07 Richard Biener <rguenther@suse.de>
1008 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1009 reallocate loop array if it is too small.
1011 2020-12-16 Martin Uecker <muecker@gwdg.de>
1014 * c-typeck.c (build_modify_expr): Drop qualifiers.
1016 2020-12-16 Martin Uecker <muecker@gwdg.de>
1019 * c-parser.c (c_parser_expression): Look into
1020 nop expression when marking expressions as read.
1022 2020-12-14 Martin Liska <mliska@suse.cz>
1025 * c-typeck.c (pointer_diff): Do not emit a top-level
1027 (build_binary_op): Likewise.
1029 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
1031 * c-parser.c (c_parser_omp_allocate): New.
1032 (c_parser_omp_construct): Call it.
1034 2020-12-09 Richard Biener <rguenther@suse.de>
1037 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1040 2020-12-07 Martin Uecker <muecker@gwdg.de>
1043 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1044 that drops qualifiers to the end of the function.
1046 2020-11-26 Martin Uecker <muecker@gwdg.de>
1050 * c-parser.c (c_parser_declaration_or_fndef): Remove
1051 redundant code to drop qualifiers of _Atomic types for __auto_type.
1052 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1053 types for __typeof__.
1055 2020-11-24 Jakub Jelinek <jakub@redhat.com>
1058 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1059 expressions, use make_node instead of build2 to avoid checking build2
1062 2020-11-23 Joseph Myers <joseph@codesourcery.com>
1065 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1066 for comparisons of complete and incomplete pointers.
1068 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1070 * c-aux-info.c (gen_type): Support opaque types.
1072 2020-11-20 Martin Sebor <msebor@redhat.com>
1075 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1077 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1080 * Make-lang.in (c.serial): Change from goal to a variable.
1081 (.PHONY): Drop c.serial.
1083 2020-11-20 Martin Uecker <muecker@gwdg.de>
1085 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1087 2020-11-19 Jakub Jelinek <jakub@redhat.com>
1090 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1093 2020-11-18 Jakub Jelinek <jakub@redhat.com>
1095 * Make-lang.in (c.serial): New goal.
1096 (.PHONY): Add c.serial c.prev.
1097 (cc1$(exeext)): Call LINK_PROGRESS.
1099 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1101 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1103 * c-typeck.c (build_asm_expr): Remove an assert checking output
1104 absence for asm goto.
1106 2020-11-13 Jakub Jelinek <jakub@redhat.com>
1108 * c-typeck.c (c_finish_omp_clauses): Don't clear
1109 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1111 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1114 * c-parser.c (c_parser_objc_class_definition): Pass the
1115 location of the class name to the interface declaration.
1117 2020-11-10 Strager Neds <strager.nds@gmail.com>
1119 * c-decl.c (merge_decls): Use new overload of
1120 set_decl_section_name.
1122 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1124 * c-parser.c (c_parser_omp_target_data): Add use of
1125 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1126 handled map clause kind.
1127 (c_parser_omp_target_enter_data): Likewise.
1128 (c_parser_omp_target_exit_data): Likewise.
1129 (c_parser_omp_target): Likewise.
1130 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1131 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1132 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1133 same struct field access to co-exist on OpenMP construct.
1135 2020-11-07 Martin Uecker <muecker@gwdg.de>
1137 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1138 (c_parser_all_labels): Likewise.
1140 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1142 * c-parser.c (c_parser_objc_at_property_declaration):
1143 Improve parsing fidelity. Associate better location info
1144 with @property attributes. Clean up the interface to
1145 objc_add_property_declaration ().
1147 2020-11-06 Nathan Sidwell <nathan@acm.org>
1149 * c-decl.c (diagnose_mismatched_decls): Rename
1150 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1151 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1152 (collect_source_refs): Likewise.
1153 * c-typeck.c (inform_declaration, inform_for_arg)
1154 (convert_for_assignment): Likewise.
1156 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
1158 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1160 (c_parser_omp_construct): Update call.
1162 2020-11-04 Jakub Jelinek <jakub@redhat.com>
1165 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1166 find underlying decl to clear in the aligned_head bitmap.
1168 2020-11-04 Joseph Myers <joseph@codesourcery.com>
1170 * c-decl.c (handle_nodiscard_attribute): New.
1171 (std_attribute_table): Add nodiscard.
1172 * c-parser.c (c_parser_std_attribute): Expect argument to
1173 nodiscard attribute to be a string. Do not special-case ignoring
1175 * c-typeck.c (maybe_warn_nodiscard): New.
1176 (build_compound_expr, emit_side_effect_warnings): Call
1177 maybe_warn_nodiscard.
1178 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1179 emit_side_effect_warnings if warn_unused_result.
1181 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
1183 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1185 (finish_init): Likewise.
1186 (pop_init_level): Likewise.
1188 2020-10-28 Joseph Myers <joseph@codesourcery.com>
1190 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1191 error_at for omitted parameter name.
1193 2020-10-28 Jakub Jelinek <jakub@redhat.com>
1195 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1196 (c_parser_omp_clause_allocate): New function.
1197 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1198 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1199 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1200 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1201 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1202 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1203 PRAGMA_OMP_CLAUSE_ALLOCATE.
1204 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1206 2020-10-27 Joseph Myers <joseph@codesourcery.com>
1208 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1209 standard attributes.
1211 2020-10-23 Marek Polacek <polacek@redhat.com>
1214 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1215 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1216 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1217 * c-tree.h (char_type_p): Declare.
1218 * c-typeck.c (char_type_p): No longer static.
1220 2020-10-23 Martin Sebor <msebor@redhat.com>
1223 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1225 2020-09-19 Martin Sebor <msebor@redhat.com>
1228 * c-decl.c (lookup_last_decl): Define new function.
1229 (c_decl_attributes): Call it.
1230 (start_decl): Add argument and use it.
1231 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1232 (get_parm_array_spec): Define new function.
1233 (push_parm_decl): Call get_parm_array_spec.
1234 (start_function): Call warn_parm_array_mismatch. Build attribute
1235 access and add it to current function.
1236 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1237 in forms of array parameters.
1238 * c-tree.h (start_decl): Add argument.
1240 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1242 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1244 (in_statement): New.
1245 (start_function): Adjust for above change.
1246 (c_push_function_context, c_pop_function_context): Likewise.
1247 * c-lang.h (struct language_function): Likewise.
1248 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1249 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1251 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1252 (c_parser_switch_statement): Adjust break/switch context handling
1253 and calls to renamed functions.
1254 (c_parser_while_statement): Adjust break/switch context handling and
1256 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1257 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1258 (c_parser_omp_for_loop): Adjust break/switch context handling.
1259 * c-tree.h (c_break_label, c_cont_label): Delete.
1260 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1261 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1262 (in_statement, switch_statement_break_seen_p): Declare.
1263 (c_start_case, c_finish_case): Renamed to...
1264 (c_start_switch, c_finish_switch).
1265 (c_finish_bc_stmt): Adjust arguments.
1266 * c-typeck.c (build_function_call_vec): Don't try to print
1267 statements with %qE format.
1268 (struct c_switch): Rename switch_expr field to switch_stmt.
1269 Add break_stmt_seen_p field.
1270 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1271 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1272 (do_case): Update for changes to struct c_switch.
1273 (c_finish_case): Rename to c_finish_switch. Update for changes to
1274 struct c_switch and change of representation from SWITCH_EXPR to
1276 (c_finish_loop): Delete.
1277 (c_finish_bc_stmt): Update to reflect changes to break/continue
1278 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1279 of a GOTO_EXPR except for objc foreach loops.
1281 2020-09-01 Jakub Jelinek <jakub@redhat.com>
1284 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1287 2020-08-28 Martin Sebor <msebor@redhat.com>
1290 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1293 2020-08-27 Martin Liska <mliska@suse.cz>
1295 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1296 growth function to true.
1298 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
1301 * c-typeck.c (handle_omp_array_sections_1): Talk about
1302 array function parameter in the error message.
1304 2020-08-18 Jakub Jelinek <jakub@redhat.com>
1307 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1308 to int, holding index of the match. Call mark_exp_read on the selector
1309 expression and on expressions other than the selected one.
1311 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1314 * c-typeck.c (process_init_element): Split test for whether to
1315 recurse into a record, union or array into...
1316 (initialize_elementwise_p): ...this new function. Don't recurse
1317 into a vector type if the initialization value is also a vector.
1319 2020-07-31 Richard Biener <rguenther@suse.de>
1322 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1323 Define to c_common_finalize_early_debug.
1325 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
1327 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1328 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1329 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1331 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1334 * c-decl.c (finish_decl): Call target hook
1335 lower_local_decl_alignment to lower local decl alignment.
1337 2020-07-09 Julian Brown <julian@codesourcery.com>
1338 Thomas Schwinge <thomas@codesourcery.com>
1341 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1342 for standalone attach/detach clauses.
1344 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
1346 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1347 set, warn for conversion between pointers that point to incompatible
1348 scalar storage orders.
1350 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1352 * c-parser.c (c_parser_statement_after_labels): Pass correct
1353 parameters to c_parser_do_statement.
1355 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1357 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1359 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1360 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1362 * c-tree.h (c_in_omp_for): Declare.
1363 * c-typeck.c (c_in_omp_for): Define.
1364 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1365 (digest_init): Likewise.
1366 (build_binary_op): Likewise.
1368 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1370 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1371 from kind by comma rather than colon.
1373 2020-06-05 Mark Wielaard <mark@klomp.org>
1375 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1376 an undeclared builtin, then add a fixit header hint, if found.
1377 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1378 warning_at about implicit builtin declaration type mismatch.
1380 2020-06-03 Mark Wielaard <mark@klomp.org>
1382 * c-parser.c (struct c_parser): Add seen_string_literal
1384 (c_parser_consume_token): Reset seen_string_literal.
1385 (c_parser_error_richloc): Add name_hint if seen_string_literal
1386 and next token is a CPP_NAME and we have a missing header
1387 suggestion for the name.
1388 (c_parser_string_literal): Set seen_string_literal.
1390 2020-06-03 Mark Wielaard <mark@klomp.org>
1392 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1393 scope with matching_parens after CPP_OPEN_PAREN.
1395 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
1397 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1399 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1401 * Make-lang.in: Remove extra slash.
1403 2020-05-19 Martin Liska <mliska@suse.cz>
1405 * c-parser.c: Fix typo.
1407 2020-05-14 Jakub Jelinek <jakub@redhat.com>
1409 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1411 2020-05-07 Richard Biener <rguenther@suse.de>
1414 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1417 2020-04-30 Jakub Jelinek <jakub@redhat.com>
1420 * c-decl.c (set_labels_context_r): In addition to context-less
1421 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1422 parent function if any.
1423 (store_parm_decls): Adjust comment.
1425 2020-04-19 Jakub Jelinek <jakub@redhat.com>
1428 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1429 two CPP_COLON tokens.
1431 2020-04-17 Jakub Jelinek <jakub@redhat.com>
1434 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1437 2020-04-15 Jakub Jelinek <jakub@redhat.com>
1440 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1441 requires directive when not at file scope.
1443 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
1446 * c-decl.c (c_check_in_current_scope): New function.
1447 * c-tree.h (c_check_in_current_scope): Declare it.
1448 * c-parser.c (c_parser_oacc_declare): Add check that variables
1449 are declared in the same scope as the directive. Fix handling
1452 2020-04-07 Jakub Jelinek <jakub@redhat.com>
1455 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1456 if c_parser_omp_master succeeded.
1458 2020-03-23 Jakub Jelinek <jakub@redhat.com>
1460 PR gcov-profile/94029
1462 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1463 the function_start_locus location. Don't do that afterwards for the
1464 __GIMPLE body parsing.
1466 2020-03-19 Jakub Jelinek <jakub@redhat.com>
1468 PR gcov-profile/94029
1469 * c-tree.h (finish_function): Add location_t argument defaulted to
1471 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1472 set it to the locus of closing } if non-NULL.
1473 (c_parser_compound_statement_nostart): Return locus of closing }.
1474 (c_parser_parse_rtl_body): Likewise.
1475 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1477 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1478 input_location to set function_end_locus.
1480 2020-03-17 Jakub Jelinek <jakub@redhat.com>
1483 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1484 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1485 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1486 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1488 (finish_incomplete_vars): New function, moved from finish_struct. Use
1489 relayout_decl instead of layout_decl.
1490 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1491 being TYPE_VFIELD. Use finish_incomplete_vars.
1492 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1493 finish_incomplete_vars.
1494 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1495 also on ENUMERAL_TYPEs.
1497 2020-03-16 Jakub Jelinek <jakub@redhat.com>
1500 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1502 2020-03-13 Martin Sebor <msebor@redhat.com>
1505 * c-decl.c (builtin_structptr_type_count): New constant.
1506 (match_builtin_function_types): Reject decls that are incompatible
1507 in types pointed to by pointers.
1508 (diagnose_mismatched_decls): Adjust comments.
1510 2020-03-05 Joseph Myers <joseph@codesourcery.com>
1513 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1514 empty when initialized type is error_mark_node.
1515 (set_designator, process_init_element): Ignore initializers for
1516 elements of a variable-size type or of error_mark_node.
1518 2020-03-01 Martin Sebor <msebor@redhat.com>
1521 * c-decl.c (types_close_enough_to_match): New function.
1522 (match_builtin_function_types):
1523 (diagnose_mismatched_decls): Add missing inform call to a warning.
1525 2020-03-01 Martin Sebor <msebor@redhat.com>
1528 * c-typeck.c (build_functype_attribute_variant): New function.
1529 (composite_type): Call it.
1531 2020-02-25 Jakub Jelinek <jakub@redhat.com>
1534 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1535 Rename last argument from probablity to probability.
1537 2020-02-13 Jakub Jelinek <jakub@redhat.com>
1540 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1541 *expr if it has side effects.
1543 2020-01-30 Jeff Law <law@redhat.com>
1546 * c-parser.c (c_parser_switch_statement): Make sure to request
1547 marking the switch expr as used.
1549 2020-01-22 Joseph Myers <joseph@codesourcery.com>
1552 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1553 argument with integer operands.
1555 2020-01-16 Kerem Kat <keremkat@gmail.com>
1558 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1559 to support 4 available tokens.
1561 2020-01-15 Joseph Myers <joseph@codesourcery.com>
1564 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1565 determine whether to set DECL_CONTEXT.
1567 2020-01-13 Joseph Myers <joseph@codesourcery.com>
1570 * c-typeck.c (build_c_cast): Check for expressions with integer
1571 operands that can occur in an unevaluated part of an integer
1572 constant expression and call note_integer_operands as needed.
1574 2019-01-08 Richard Biener <rguenther@suse.de>
1577 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1580 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1582 Update copyright years.
1584 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1586 * c-decl.c (collect_source_ref_cb): Delete.
1587 (for_each_global_decl): Rename into...
1588 (collect_source_refs): ...this. Call collect_source_ref directly.
1589 (c_parse_final_cleanups): Always call collect_source_ref on the main
1592 2019-12-19 Julian Brown <julian@codesourcery.com>
1593 Cesar Philippidis <cesar@codesourcery.com>
1595 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1597 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1598 Allow deref (->) in variable lists if true.
1599 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1600 Pass to c_parser_omp_variable_list.
1601 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1602 call to c_parser_omp_variable_list.
1603 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1604 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1605 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1606 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1607 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1608 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1609 and detach. Support deref.
1610 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1611 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1612 (c_oacc_check_attachments): New function.
1613 (c_finish_omp_clauses): Check attach/detach arguments for being
1614 pointers using above. Support deref.
1616 2019-12-19 Julian Brown <julian@codesourcery.com>
1617 Maciej W. Rozycki <macro@codesourcery.com>
1618 Tobias Burnus <tobias@codesourcery.com>
1619 Thomas Schwinge <thomas@codesourcery.com>
1621 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1622 (c_parser_oacc_data_clause): Likewise.
1623 (c_parser_oacc_all_clauses): Likewise.
1624 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1625 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1626 PRAGMA_OACC_CLAUSE_NO_CREATE.
1627 * c-typeck.c (handle_omp_array_sections): Support
1630 2019-12-09 David Malcolm <dmalcolm@redhat.com>
1632 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1633 Replace label_text ctor calls.
1635 2019-12-04 Joseph Myers <joseph@codesourcery.com>
1639 * c-typeck.c (convert_lvalue_to_rvalue): Call
1640 require_complete_type for arguments not of void types.
1641 (build_indirect_ref): Do not diagnose dereferencing pointers to
1643 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1645 2019-12-03 Joseph Myers <joseph@codesourcery.com>
1648 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1649 old-style parameter definitions.
1651 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1655 * c-decl.c (flexible_array_type_p): Move to common code.
1657 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1659 * c-decl.c (start_decl): Allow initialization of variables whose
1660 size is a POLY_INT_CST.
1661 (finish_decl): Use verify_type_context to check whether the target
1662 allows variables with a particular type to have static or thread-local
1663 storage duration. Don't raise a second error if such variables do
1664 not have a constant size.
1665 (grokdeclarator): Use verify_type_context to check whether the
1666 target allows fields or array elements to have a particular type.
1667 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1668 the target allows pointer difference for the types involved.
1669 (build_unary_op): Likewise for pointer increment and decrement.
1671 2019-11-29 Joseph Myers <joseph@codesourcery.com>
1673 * c-parser.c (struct c_parser): Add members raw_tokens and
1675 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1676 using previously-lexed raw tokens.
1677 (c_parser_peek_nth_token_raw)
1678 (c_parser_check_balanced_raw_token_sequence): New functions.
1679 (c_parser_nth_token_starts_std_attributes): Use
1680 c_parser_check_balanced_raw_token_sequence for Objective-C.
1682 2019-11-25 Joseph Myers <joseph@codesourcery.com>
1685 * c-decl.c (finish_declspecs): Use int instead of decimal
1686 floating-point types if decimal floating-point not supported.
1688 2019-11-25 Joseph Myers <joseph@codesourcery.com>
1690 * c-tree.h (struct c_declarator): Use a structure for id member.
1691 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1692 declarators at the start, not when handling individual declarators
1693 later. Use u.id.id instead of u.id.
1694 (grokfield): Use u.id.id instead of u.id.
1695 (build_id_declarator): Set u.id.id and u.id.attrs.
1696 (finish_declspecs): Handle postfix attributes in case of typedef
1697 name or typeof used.
1698 * c-parser.c (c_parser_direct_declarator)
1699 (c_parser_direct_declarator_inner): Place declarator for
1700 attributes inside that for function or array, not outside. Set
1701 u.id.attrs for identifiers.
1702 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1703 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1706 2019-11-22 Jakub Jelinek <jakub@redhat.com>
1709 * c-decl.c (identifier_global_tag): Define.
1711 2019-11-20 Richard Biener <rguenther@suse.de>
1714 * c-decl.c (grokdeclarator): Prevent inlining of nested
1715 function with VLA arguments.
1717 2019-11-20 Joseph Myers <joseph@codesourcery.com>
1719 * c-decl.c (c_warn_type_attributes): New function.
1720 (groktypename, grokdeclarator, finish_declspecs): Call
1721 c_warn_type_attributes before applying attributes to types.
1722 * c-tree.h (c_warn_type_attributes): Declare.
1724 2019-11-19 Joseph Myers <joseph@codesourcery.com>
1726 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1727 standard attributes.
1728 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1729 pedwarn for unknown standard attributes and return error_mark_node
1732 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1734 * c-parser.c (c_parser_parse_rtl_body): Always call
1735 run_rtl_passes, even if startwith pass is not provided.
1737 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1739 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1740 duplicate standard attributes.
1742 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1744 * c-decl.c (std_attribute_table): Add maybe_unused.
1746 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1748 * c-decl.c (std_attribute_table): Add fallthrough.
1749 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1750 attribute at top level.
1752 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1754 * c-decl.c (std_attribute_table): New.
1755 (c_init_decl_processing): Register attributes from
1756 std_attribute_table.
1757 * c-parser.c (c_parser_attribute_arguments): Add arguments
1758 require_string and allow_empty_args. All callers changed.
1759 (c_parser_std_attribute): Set require_string argument for
1760 "deprecated" attribute.
1762 2019-11-14 Joseph Myers <joseph@codesourcery.com>
1764 * c-parser.c (c_parser_postfix_expression)
1765 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1766 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1768 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1770 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1771 of build_same_sized_truth_vector_type.
1772 (build_vec_cmp): Likewise.
1774 2019-11-14 Jakub Jelinek <jakub@redhat.com>
1776 * c-parser.c (c_parser_omp_context_selector): Don't require score
1777 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1780 * c-parser.c (c_parser_omp_context_selector): Rename
1781 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1782 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1783 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1784 and string literals.
1786 2019-11-14 Joseph Myers <joseph@codesourcery.com>
1788 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1789 ctsk_tagfirstref_attrs.
1790 (struct c_declspecs): Update description of attrs. Add
1791 postfix_attrs and non_std_attrs_seen_p. Increase size of
1792 typespec_kind bit-field.
1793 (c_warn_unused_attributes): New declaration.
1794 (parser_xref_tag): Update prototype.
1795 * c-decl.c (c_warn_unused_attributes): New function.
1796 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1797 ctsk_tagref_attrs. Handle attribute declarations.
1798 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1799 (grokdeclarator): Handle standard attributes.
1800 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1801 attributes to incomplete type reference.
1802 (xref_tag): Update call to parser_xref_tag.
1803 (declspecs_add_addrspace, declspecs_add_type)
1804 (declspecs_add_scspec, declspecs_add_attrs): Set
1805 non_std_attrs_seen_p.
1806 (finish_declspecs): Apply postfix standard attributes to type.
1807 * c-parser.c (c_token_starts_declspecs)
1808 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1809 (c_parser_next_tokens_start_declaration): Update comments.
1810 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1811 parser->tokens[2] to parser->tokens[1].
1812 (c_parser_nth_token_starts_std_attributes)
1813 (c_parser_std_attribute_specifier_sequence): New functions.
1814 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1815 attrs. All callers changed. Handle standard attributes.
1816 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1817 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1818 All callers changed.
1819 (c_parser_declspecs): Add arguments start_std_attr_ok and
1820 end_std_attr_ok. All callers changed. Handle standard
1822 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1823 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1824 (c_parser_compound_statement_nostart, c_parser_all_labels)
1825 (c_parser_label, c_parser_statement, c_parser_for_statement):
1826 Handle standard attributes.
1827 * c-parser.h (c_parser_declspecs): Update prototype.
1828 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1831 2019-11-12 Martin Liska <mliska@suse.cz>
1833 * gimple-parser.c: Do not include params.h.
1835 2019-11-12 Martin Liska <mliska@suse.cz>
1837 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1838 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1841 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1842 Frederik Harwath <frederik@codesourcery.com>
1845 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1846 (c_parser_oacc_kernels_parallel): Rename function to...
1847 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1848 (c_parser_omp_construct): Update accordingly.
1851 2019-11-11 Jakub Jelinek <jakub@redhat.com>
1853 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1854 without corresponding end declare target.
1856 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1858 * c-convert.c (convert): Only handle vector conversions if one of
1859 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1861 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1862 vectors satisfy gnu_vector_type_p.
1863 (build_unary_op): Only allow unary operators to be applied to
1864 vectors if they satisfy gnu_vector_type_p.
1865 (digest_init): Only allow by-element initialization of vectors
1866 if they satisfy gnu_vector_type_p.
1867 (really_start_incremental_init): Likewise.
1868 (push_init_level): Likewise.
1869 (pop_init_level): Likewise.
1870 (process_init_element): Likewise.
1871 (build_binary_op): Only allow binary operators to be applied to
1872 vectors if they satisfy gnu_vector_type_p.
1874 2019-11-08 Joseph Myers <joseph@codesourcery.com>
1876 * c-decl.c (grokparms): Convert () in a function definition to
1878 (store_parm_decls_oldstyle): Pedwarn for C2x.
1879 (store_parm_decls): Update comment about () not generating a
1882 2019-11-07 Joseph Myers <joseph@codesourcery.com>
1884 * c-parser.c (c_parser_attribute_arguments): New function.
1885 Factored out of c_parser_gnu_attribute.
1886 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1887 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1888 (c_parser_std_attribute_specifier): New functions.
1889 (c_parser_transaction_attributes): Use
1890 c_parser_std_attribute_specifier.
1892 2019-11-07 Joseph Myers <joseph@codesourcery.com>
1894 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1895 lex_joined_string and translate_strings_p.
1896 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1898 (c_parser_string_literal): New function.
1899 (c_parser_static_assert_declaration_no_semi): Use
1900 c_parser_string_literal. Do not set lex_untranslated_string.
1901 (c_parser_asm_string_literal): Use c_parser_string_literal.
1902 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1903 (c_parser_gnu_attributes): Set and restore translate_strings_p
1904 instead of lex_untranslated_string.
1905 (c_parser_asm_statement): Do not set lex_untranslated_string.
1906 (c_parser_asm_operands): Likewise.
1907 (c_parser_has_attribute_expression): Set and restore
1908 translate_strings_p instead of lex_untranslated_string.
1909 (c_parser_postfix_expression): Use c_parser_string_literal.
1910 (pragma_lex): Likewise.
1911 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1912 (c_parse_file): Set translate_strings_p.
1913 * gimple-parser.c (c_parser_gimple_postfix_expression)
1914 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1915 * c-parser.c (c_parser_string_literal): Declare function.
1917 2019-11-02 Jakub Jelinek <jakub@redhat.com>
1919 * c-parser.c (c_finish_omp_declare_variant): Use
1920 omp_get_context_selector instead of c_omp_get_context_selector.
1922 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1924 * c-tree.h (c_simulate_enum_decl): Declare.
1925 * c-decl.c (c_simulate_enum_decl): New function.
1926 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1928 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1930 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1931 * c-decl.c (c_simulate_builtin_function_decl): New function.
1932 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1935 2019-10-28 Martin Sebor <msebor@redhat.com>
1938 * c-decl.c (names_builtin_p): Define a new function.
1940 2019-10-28 Richard Biener <rguenther@suse.de>
1943 * gimple-parser.c (c_parser_parse_gimple_body): Make
1944 current_bb the entry block initially to easier recover
1946 (c_parser_gimple_compound_statement): Adjust.
1948 2019-10-24 Jakub Jelinek <jakub@redhat.com>
1950 * c-parser.c (c_finish_omp_declare_variant): Use
1951 omp_context_selector_matches instead of
1952 c_omp_context_selector_matches.
1953 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1954 attribute in between declare target and end declare target
1957 2019-10-15 Joseph Myers <joseph@codesourcery.com>
1959 * c-parser.c (c_parser_attribute_any_word): Rename to
1960 c_parser_gnu_attribute_any_word. All callers changed.
1961 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1963 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1965 (c_parser_declaration_or_fndef, c_parser_declspecs)
1966 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1967 (c_parser_struct_declaration, c_parser_declarator)
1968 (c_parser_gnu_attribute, c_parser_compound_statement)
1969 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1970 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1971 attribute-related syntax productions.
1973 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1975 * c-objc-common.c (useful_aka_type_p): Replace with...
1976 (get_aka_type): ...this new function. Given the original type,
1977 decide which aka type to print (if any). Only look through typedefs
1978 if user_facing_original_type_p.
1979 (print_type): Update accordingly.
1981 2019-10-14 Jakub Jelinek <jakub@redhat.com>
1983 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1984 into int NESTED, if it is 2, diagnose missing commas in between
1986 (c_parser_omp_context_selector): Pass 2 as last argument to
1987 c_parser_omp_all_clauses.
1989 2019-10-12 Jakub Jelinek <jakub@redhat.com>
1991 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1992 For simd properties, put them directly into TREE_VALUE.
1993 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1994 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1995 add "omp declare variant base" attribute rather than
1996 "omp declare variant".
1998 2019-10-11 Joseph Myers <joseph@codesourcery.com>
2000 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2002 2019-10-10 Jakub Jelinek <jakub@redhat.com>
2004 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2005 true, terminate processing on closing paren and don't skip to end of
2007 (c_parser_omp_declare_simd): Handle also declare variant.
2008 (omp_construct_selectors, omp_device_selectors,
2009 omp_implementation_selectors, omp_user_selectors): New variables.
2010 (c_parser_omp_context_selector,
2011 c_parser_omp_context_selector_specification,
2012 c_finish_omp_declare_variant): New functions.
2013 (c_finish_omp_declare_simd): Handle both declare simd and
2015 (c_parser_omp_declare): Handle declare variant.
2017 2019-10-02 Joseph Myers <joseph@codesourcery.com>
2019 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2022 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2024 * c-objc-common.c (useful_aka_type_p): New function.
2025 (print_type): Use it to decide whether an aka type is worth printing.
2027 2019-09-27 Jakub Jelinek <jakub@redhat.com>
2030 * c-parser.c (c_parser_predefined_identifier): New function.
2031 (c_parser_postfix_expression): Use it.
2032 (c_parser_omp_variable_list): Parse predefined identifiers.
2033 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2034 in shared and firstprivate clauses, even when they are predetermined
2037 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2039 * c-typeck.c (build_function_call_vec): Take the original function
2040 decl as an optional final parameter. Pass all built-in calls to
2041 check_builtin_function_arguments.
2043 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2046 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2047 of identifiers in the external scope only for variables and functions.
2049 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2052 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2054 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2057 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2058 after determining that the first token is not
2059 PRAGMA_GCC_PCH_PREPROCESS.
2061 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2063 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2064 FUNCTION_DECL to the right value in the presence of nested declarators.
2066 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2069 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2071 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2074 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2075 of a built_in_function.
2076 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2078 2019-08-10 Jakub Jelinek <jakub@redhat.com>
2080 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2081 (c_parser_omp_clause_device_type): New function.
2082 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2083 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2084 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2085 diagnostics for declare target with clauses nested in clause-less
2086 declare target declaration-definition-seq.
2087 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2089 2019-08-09 Jakub Jelinek <jakub@redhat.com>
2091 * c-parser.c (check_no_duplicate_clause): Simplify using
2093 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2094 directive name modifiers.
2095 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2098 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2099 check_no_duplicate_clause call. Comment it out, instead emit a
2100 warning for duplicate dist_schedule clauses.
2102 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2104 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2106 2019-08-08 Jakub Jelinek <jakub@redhat.com>
2108 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2109 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2110 instead of generic_head to track duplicates.
2112 2019-08-07 Jakub Jelinek <jakub@redhat.com>
2114 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2115 (c_parser_omp_clause_use_device_addr): New function.
2116 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2117 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2118 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2119 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2120 map or use_device_* clauses.
2121 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2122 in OpenMP, require pointer type rather than pointer or array type.
2123 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2125 2019-07-31 Jakub Jelinek <jakub@redhat.com>
2128 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2129 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2132 2019-07-25 Martin Liska <mliska@suse.cz>
2133 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2136 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2138 2019-07-25 Martin Liska <mliska@suse.cz>
2140 * c-decl.c (merge_decls): Use new macros
2141 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2143 2019-07-23 Richard Biener <rguenther@suse.de>
2145 PR tree-optimization/83518
2146 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2147 a CFG also rebuild cgraph edges.
2149 2019-07-20 Jakub Jelinek <jakub@redhat.com>
2151 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2152 (c_parser_omp_clause_bind): New function.
2153 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2154 (OMP_LOOP_CLAUSE_MASK): Define.
2155 (c_parser_omp_loop): New function.
2156 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2157 loop combined with parallel or teams.
2158 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2159 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2161 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2164 * c-decl.c (finish_function): Check targetm.warn_func_return
2165 before issuing a -Wreturn-type warning.
2167 2019-07-12 Alexandre Oliva <oliva@adacore.com>
2169 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2170 (c_parser_compound_statement): Call it.
2172 2019-07-12 Jakub Jelinek <jakub@redhat.com>
2174 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2175 (c_parser_omp_clause_order): New function.
2176 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2177 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2178 PRAGMA_OMP_CLAUSE_ORDER.
2179 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2181 2019-07-10 Richard Biener <rguenther@suse.de>
2183 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2184 _Literal (int *) &x for address literals.
2186 2019-07-09 Martin Sebor <msebor@redhat.com>
2189 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2191 (field_decl_cmp): Same.
2192 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2194 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2196 2019-07-09 Martin Sebor <msebor@redhat.com>
2199 * c-decl.c: Change class-key from class to struct and vice versa
2200 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2201 * gimple-parser.c: Same.
2203 2019-07-01 Richard Biener <rguenther@suse.de>
2205 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2206 _Literal (char *) &"foo" for address literals pointing to
2209 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2211 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2212 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2213 C incompatibility if alternate "__intN__" form is used.
2215 2019-06-24 Martin Sebor <msebor@redhat.com>
2217 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2219 2019-06-10 Jakub Jelinek <jakub@redhat.com>
2221 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2222 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2223 (c_parser_omp_scan_loop_body): New function.
2224 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2225 inscan reduction clauses.
2226 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2227 non-inscan reductions on the same construct, or inscan reductions with
2228 ordered or schedule clauses, or inscan array reductions.
2230 2019-06-05 Martin Sebor <msebor@redhat.com>
2233 * c-typeck.c (c_finish_return): Only consider functions returning
2234 pointers as candidates for -Wreturn-local-addr.
2236 2019-06-05 Martin Sebor <msebor@redhat.com>
2238 * c-decl.c (start_decl): Adjust quoting and hyphenation
2240 (finish_decl): Same.
2241 (finish_enum): Same.
2242 (start_function): Same.
2243 (declspecs_add_type): Same.
2244 * c-parser.c (warn_for_abs): Same.
2245 * c-typeck.c (build_binary_op): Same.
2247 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2250 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2251 marked with an OpenACC 'routine' directive.
2254 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2255 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2258 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2259 clauses from "omp declare target" attribute.
2261 2019-05-16 Martin Sebor <msebor@redhat.com>
2263 * c-decl.c (start_decl): Quote keywords, operators, and
2264 types in diagnostics.
2265 (finish_decl): Same.
2266 * c-parser.c (c_parser_asm_statement): Same.
2267 (c_parser_conditional_expression): Same.
2268 (c_parser_transaction_cancel): Same.
2269 * c-typeck.c (c_common_type): Same.
2270 (build_conditional_expr): Same.
2271 (digest_init): Same.
2272 (process_init_element): Same.
2273 (build_binary_op): Same.
2275 2019-05-17 Richard Biener <rguenther@suse.de>
2277 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2278 (c_parser_gimple_unary_expression): Likewise.
2279 (c_parser_gimple_parentized_ternary_expression): New function.
2281 2019-05-16 Richard Biener <rguenther@suse.de>
2283 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2284 (c_parser_gimple_unary_expression): Likewise.
2286 2019-05-15 Richard Biener <rguenther@suse.de>
2288 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2291 2019-05-14 Richard Biener <rguenther@suse.de>
2293 * gimple-parser.c (c_parser_gimple_statement): Remove
2294 questionable auto-promotion to VIEW_CONVERT_EXPR.
2295 (c_parser_gimple_typespec): Split out from __MEM parsing.
2296 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2297 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2298 as __VIEW_CONVERT with -gimple.
2300 2019-05-09 Martin Liska <mliska@suse.cz>
2302 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2304 (c_parser_gimple_unary_expression): Parse also binary expression
2306 (c_parser_gimple_parentized_binary_expression): New function.
2308 2019-05-09 Martin Liska <mliska@suse.cz>
2310 * gimple-parser.c (struct gimple_parser): Add probability.
2311 for gimple_parser_edge.
2312 (gimple_parser::push_edge): Add new argument probability.
2313 (c_parser_gimple_parse_bb_spec): Parse also probability
2315 (c_parser_parse_gimple_body): Set edge probability.
2316 (c_parser_gimple_compound_statement): Consume token
2317 before calling c_parser_gimple_goto_stmt.
2319 (c_parser_gimple_statement): Pass new argument.
2320 (c_parser_gimple_goto_stmt): Likewise.
2321 (c_parser_gimple_if_stmt): Likewise.
2322 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2323 * c-parser.c (c_parser_declaration_or_fndef): Pass
2324 hot_bb_threshold argument.
2325 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2327 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2329 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2332 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2333 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2334 (c_parser_do_statement): Likewise.
2335 (c_parser_for_statement): Likewise. Formatting fixes.
2336 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2337 emit DEBUG_BEGIN_STMTs if needed.
2339 2019-04-19 Jakub Jelinek <jakub@redhat.com>
2342 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2343 (c_start_case): Don't clear it.
2344 (do_case): Adjust c_add_case_label caller.
2345 (c_finish_case): Adjust c_do_switch_warnings caller.
2348 * c-decl.c (merge_decls): If remove is main variant and
2349 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2350 variant that has newdecl as TYPE_NAME if any.
2352 2019-04-12 Jakub Jelinek <jakub@redhat.com>
2355 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2356 don't try to remove it from the variant list, but instead assert
2359 2019-04-01 Richard Biener <rguenther@suse.de>
2362 * c-tree.h (c_get_alias_set): Declare.
2363 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2364 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2365 as the underlying integer type.
2367 2019-03-19 Martin Sebor <msebor@redhat.com>
2369 PR tree-optimization/89688
2370 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2371 kinds of initializers.
2373 2019-03-19 Jakub Jelinek <jakub@redhat.com>
2376 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2377 return type even if quals_used is 0. Formatting fixes.
2379 2019-03-14 Richard Biener <rguenther@suse.de>
2381 * c-tree.h (enum c_declspec_il): New.
2382 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2384 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2385 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2386 (c_parser_declspecs): Adjust.
2387 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2388 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2390 (struct gimple_parser): New.
2391 (gimple_parser::push_edge): New method.
2392 (c_parser_gimple_parse_bb_spec): New helper.
2393 (c_parser_parse_gimple_body): Get start pass and IL specification.
2394 Initialize SSA and CFG.
2395 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2396 Build a gimple_parser parsing state and pass it along.
2397 (c_parser_gimple_statement): Change intermittend __PHI internal
2398 function argument for the edge.
2399 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2400 (c_parser_gimple_goto_stmt): Record edges to build.
2401 (c_parser_gimple_if_stmt): Likewise.
2402 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2403 (c_parser_gimple_or_rtl_pass_list): Likewise.
2405 2019-03-11 Martin Liska <mliska@suse.cz>
2407 * c-decl.c (check_for_loop_decls): Wrap an option name
2408 in a string format message and fix GNU coding style.
2409 * c-parser.c (c_parser_declspecs): Likewise.
2411 2019-03-08 Jakub Jelinek <jakub@redhat.com>
2413 PR tree-optimization/89550
2414 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2416 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2417 or warning returned true.
2419 2019-02-28 Jakub Jelinek <jakub@redhat.com>
2422 * c-typeck.c (convert_arguments): Call inform_declaration only if
2423 the previous warning_at call returned true.
2425 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2427 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2428 parameter. Adjust all users.
2429 (c_parser_oacc_simple_clause): Replace parser with loc formal
2430 parameter. Adjust all users.
2432 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
2435 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2436 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2438 2019-02-15 Jakub Jelinek <jakub@redhat.com>
2441 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2442 before c_decl_attributes rather than after it.
2444 2019-02-06 Jakub Jelinek <jakub@redhat.com>
2447 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2448 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2449 instead of 3 nested ifs.
2451 2019-02-06 Joseph Myers <joseph@codesourcery.com>
2454 * c-decl.c (finish_decl): Do not complete array types for arrays
2455 with external linkage not at file scope.
2457 2019-02-05 Richard Biener <rguenther@suse.de>
2460 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2461 all type variants when not supported.
2463 2019-01-30 Jakub Jelinek <jakub@redhat.com>
2466 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2467 * c-decl.c (decl_jump_unsafe): Return false for
2468 C_DECL_COMPOUND_LITERAL_P decls.
2469 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2471 2019-01-29 Jakub Jelinek <jakub@redhat.com>
2474 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2478 * c-decl.c (last_fileptr_type): Remove.
2479 (last_structptr_types): New variable.
2480 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2481 {old,new}rettype instead of the types themselves. Assert
2482 last_structptr_types array has the same number of elements
2483 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2484 argument oldtype and newtype. Instead of handling
2485 just fileptr_type_node specially, handle all builtin_structptr_types
2486 pointer nodes. Formatting fix.
2488 2019-01-24 Martin Sebor <msebor@redhat.com>
2493 * c-decl.c (match_builtin_function_types): Add arguments.
2494 (diagnose_mismatched_decls): Diagnose mismatched declarations
2495 of built-ins more strictly.
2497 2019-01-24 Jakub Jelinek <jakub@redhat.com>
2500 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2501 on #pragma omp cancel with different modifiers.
2503 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2507 * c-typeck.c (convert_for_assignment): Upate the
2508 warn_for_address_or_pointer_of_packed_member call.
2510 2019-01-16 Tom Honermann <tom@honermann.net>
2511 Jason Merrill <jason@redhat.com>
2513 * c-typeck.c (digest_init): Revised the error message produced for
2514 ill-formed cases of array initialization with a string literal.
2515 (error_init): Make variadic.
2517 2019-01-12 Jakub Jelinek <jakub@redhat.com>
2519 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2521 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2524 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2525 if current_function_decl is non-NULL.
2527 2019-01-07 Joseph Myers <joseph@codesourcery.com>
2531 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2532 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2533 functions declared but never defined only for external scope, not
2536 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2539 * c-parser.c (c_parser_postfix_expression): Parse
2540 __builtin_convertvector.
2542 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2544 Update copyright years.
2546 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2549 * c-typeck.c (convert_for_assignment): Call
2550 warn_for_address_or_pointer_of_packed_member.
2552 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2554 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2555 a more specific error message (instead of just falling through).
2557 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2559 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2560 asm qualifier is first seen; use that to give nicer "duplicate asm
2561 qualifier" messages. Delete 'quals" variable, instead pass the
2562 "is_volatile_ flag to build_asm_stmt directly.
2563 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2564 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2566 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2568 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2569 "done" boolean variable.
2571 2018-12-19 David Malcolm <dmalcolm@redhat.com>
2574 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2575 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2576 (build_binary_op): Use struct op_location_t and
2577 class binary_op_rich_location.
2579 2018-12-11 Jakub Jelinek <jakub@redhat.com>
2582 * c-convert.c (convert): Call c_fully_fold before calling
2583 ubsan_instrument_float_cast.
2585 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2587 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2590 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2592 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2593 after asm. Pass a flag for it to build_asm_expr.
2594 * c-tree.h (build_asm_expr): Update declaration.
2595 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2598 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2601 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2602 combination of volatile and goto, in any order, without repetitions.
2604 2018-12-04 James Norris <jnorris@codesourcery.com>
2605 Cesar Philippidis <cesar@codesourcery.com>
2606 Julian Brown <julian@codesourcery.com>
2608 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2611 2018-11-30 Richard Biener <rguenther@suse.de>
2613 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2614 _Literal (type) { ... } as empty aggregate or vector constructor.
2616 2018-11-29 Martin Sebor <msebor@redhat.com>
2619 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2620 (convert_arguments): Add comments. Pass additional argument to
2623 2018-11-29 Martin Sebor <msebor@redhat.com>
2627 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2629 2018-11-23 Martin Sebor <msebor@redhat.com>
2632 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2633 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2635 2018-11-20 Martin Sebor <msebor@redhat.com>
2637 * c-parser.c (c_parser_has_attribute_expression): New function.
2638 (c_parser_attribute): New function.
2639 (c_parser_attributes): Move code into c_parser_attribute.
2640 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2642 2018-11-15 Martin Sebor <msebor@redhat.com>
2645 * c-decl.c (header_for_builtin_fn): Declare.
2646 (diagnose_mismatched_decls): Diagnose declarations of built-in
2647 functions without a prototype.
2648 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2649 (convert_argument): Same.
2650 (convert_arguments): Factor code out into convert_argument.
2651 Detect mismatches between built-in formal arguments in calls
2652 to built-in without prototype.
2653 (build_conditional_expr): Same.
2654 (type_or_builtin_type): New function.
2655 (convert_for_assignment): Add argument. Conditionally issue
2656 warnings instead of errors for mismatches.
2658 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2660 * c-decl.c: Replace "source_location" with "location_t".
2661 * c-tree.h: Likewise.
2662 * c-typeck.c: Likewise.
2663 * gimple-parser.c: Likewise.
2665 2018-11-09 Jakub Jelinek <jakub@redhat.com>
2667 * c-parser.c (c_parser_omp_clause_final): Use
2668 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2669 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2670 parsing instead of c_parser_paren_condition.
2671 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2672 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2673 c_fully_fold instead of c_parser_condition.
2674 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2675 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2676 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2677 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2678 c_parser_expr_no_commas instead of c_parser_expression.
2680 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2681 reduction clause with inscan modifier.
2683 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2684 clauses other than atomic_default_mem_order.
2686 2018-11-08 Jakub Jelinek <jakub@redhat.com>
2688 * c-parser.c: Include memmode.h.
2689 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2690 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2691 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2692 task_reduction clauses.
2693 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2694 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2695 section, or lvalue assignment expression.
2696 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2697 (c_parser_omp_clause_lastprivate): Parse optional
2698 conditional: modifier.
2699 (c_parser_omp_clause_hint): Require constant integer expression rather
2700 than just integer expression.
2701 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2703 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2704 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2705 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2707 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2708 iterators. Parse mutexinoutset and depobj kinds.
2709 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2711 (c_parser_omp_all_clauses): Likewise. Handle
2712 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2713 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2714 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2715 default memory order from requires directive if any. Adjust
2716 c_finish_omp_atomic caller.
2717 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2718 (c_parser_omp_flush): Parse flush with memory-order-clause.
2719 (c_parser_omp_for_loop): Allow NE_EXPR even in
2720 OpenMP loops, adjust c_finish_omp_for caller.
2721 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2722 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2723 Allow to be called while parsing combined parallel master.
2724 Parse combined master taskloop{, simd}.
2725 (c_parser_omp_parallel): Parse combined
2726 parallel master{, taskloop{, simd}} constructs.
2727 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2728 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2729 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2730 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2731 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2732 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2733 around teams body. Use SET_EXPR_LOCATION.
2734 (c_parser_omp_target_data): Allow target data
2735 with only use_device_ptr clauses.
2736 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2737 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2738 (c_parser_omp_requires): New function.
2739 (c_finish_taskloop_clauses): New function.
2740 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2741 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2742 declaration. Disallow in_reduction clause when combined with parallel
2744 (c_parser_omp_construct): Adjust c_parser_omp_master and
2745 c_parser_omp_taskgroup callers.
2746 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2748 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2749 like OMP_CLAUSE_REDUCTION.
2750 (handle_omp_array_sections): Likewise. Call save_expr on array
2751 reductions before calling build_index_type. Handle depend clauses
2753 (struct c_find_omp_var_s): New type.
2754 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2755 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2756 with static, runtime or auto schedule kinds. Call save_expr for whole
2757 array reduction sizes. Diagnose reductions with zero sized elements
2758 or variable length structures. Diagnose nogroup clause used with
2759 reduction clause(s). Handle depend clause with
2760 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2761 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2762 some different type for other kinds. Use build_unary_op with
2763 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2764 Handle depend clauses with iterators. Remove no longer needed special
2765 case that predetermined const qualified vars may be specified in
2766 firstprivate clause. Complain if const qualified vars are mentioned
2767 in data-sharing clauses other than firstprivate or shared. Use
2768 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2769 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2770 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2771 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2773 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2775 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2776 logic for change to name_hint::operator bool.
2777 (undeclared_variable): Likewise.
2778 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2779 (c_parser_parameter_declaration): Likewise.
2781 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2783 * c-errors.c (pedwarn_c11): New function.
2784 * c-parser.c (disable_extension_diagnostics): Save
2785 warn_c11_c2x_compat and set it to 0.
2786 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2787 (c_parser_static_assert_declaration_no_semi): Handle
2788 _Static_assert without string constant.
2789 * c-tree.h (pedwarn_c11): New prototype.
2791 2018-10-17 David Malcolm <dmalcolm@redhat.com>
2793 * Make-lang.in (selftest-c): New.
2794 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2795 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2796 from gcc/Makefile.in.
2798 2018-10-02 Richard Biener <rguenther@suse.de>
2800 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2802 2018-09-26 Joseph Myers <joseph@codesourcery.com>
2805 * c-typeck.c (build_binary_op): Use excess precision for
2806 comparisons of integers and floating-point for C11 and later.
2808 2018-09-26 Martin Jambor <mjambor@suse.cz>
2811 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
2814 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2816 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2817 Update for new param.
2818 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2821 2018-09-17 Martin Jambor <mjambor@suse.cz>
2824 * c-parser.c: (warn_for_abs): New function.
2825 (c_parser_postfix_expression_after_primary): Call it.
2827 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2829 * c-typeck.c (digest_init): Shorten overlength strings.
2831 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2833 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2835 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2837 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2838 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2840 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
2842 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2843 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2845 2018-08-27 David Malcolm <dmalcolm@redhat.com>
2848 * c-decl.c (implicitly_declare): Update call to
2849 maybe_add_include_fixit to suggest overriding the location, as it
2851 * c-objc-common.c (c_tree_printer): Update for conversion of
2852 show_caret_p to a tri-state.
2854 2018-08-27 Martin Liska <mliska@suse.cz>
2856 * c-decl.c (locate_old_decl): Use new function
2857 fndecl_built_in_p and remove check for FUNCTION_DECL if
2859 (diagnose_mismatched_decls): Likewise.
2860 (merge_decls): Likewise.
2861 (warn_if_shadowing): Likewise.
2862 (pushdecl): Likewise.
2863 (implicitly_declare): Likewise.
2864 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2865 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2866 * c-typeck.c (build_function_call_vec): Likewise.
2867 (convert_arguments): Likewise.
2869 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2872 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2873 (diagnose_mismatched_decls): Likewise, in various places.
2874 (warn_if_shadowing): Likewise.
2875 (implicit_decl_warning): Likewise.
2876 (implicitly_declare): Likewise.
2877 (undeclared_variable): Likewise.
2878 (declare_label): Likewise.
2879 (grokdeclarator): Likewise.
2880 (start_function): Likewise.
2881 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2882 (c_parser_parameter_declaration): Likewise.
2883 (c_parser_binary_expression): Likewise.
2884 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2885 (parser_build_binary_op): Likewise.
2886 (build_unary_op): Likewise.
2887 (error_init): Likewise.
2888 (pedwarn_init): Likewise.
2889 (warning_init): Likewise.
2890 (convert_for_assignment): Likewise.
2892 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2894 * c-objc-common.c: Include "gcc-rich-location.h".
2895 (c_tree_printer): Move implemenation of '%T' to...
2896 (print_type): ...this new function.
2897 (range_label_for_type_mismatch::get_text): New function.
2898 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2899 range for the various ic_argpass cases.
2900 (class maybe_range_label_for_tree_type_mismatch): New class.
2901 (build_binary_op): Use it when calling binary_op_error.
2903 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2905 * c-decl.c (start_decl): Do not warn if variables is named as main
2906 and is a local variable.
2908 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2911 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2912 objects of unknown size.
2914 2018-08-13 Martin Sebor <msebor@redhat.com>
2916 PR tree-optimization/71625
2917 * c-parser.c (c_parser_declaration_or_fndef): Call
2918 braced_list_to_string.
2920 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2923 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2926 2018-08-01 Martin Sebor <msebor@redhat.com>
2928 PR tree-optimization/86650
2929 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2930 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2932 2018-08-01 Jakub Jelinek <jakub@redhat.com>
2935 * c-typeck.c (init_field_decl_cmp): New function.
2936 (output_pending_init_elements): Use it for field comparisons
2937 instead of pure bit_position comparisons.
2939 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2941 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2942 type here, instead add "omp declare target implicit" attribute.
2943 (finish_decl): Diagnose vars without mappable type here.
2945 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2946 Thomas Schwinge <thomas@codesourcery.com>
2947 Cesar Philippidis <cesar@codesourcery.com>
2949 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2950 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2951 to their non-present_or_* counterparts. Make 'self' an alias to
2952 PRAGMA_OACC_CLAUSE_HOST.
2953 (c_parser_oacc_data_clause): Update GOMP mappings for
2954 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2955 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2956 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2957 Remove support for present_or_* clauses.
2958 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2959 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2960 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2961 (OACC_DATA_CLAUSE_MASK): Likewise.
2962 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2963 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2964 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2965 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2966 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2968 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2970 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2971 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2972 (c_parser_gimple_unary_expression): Likewise.
2974 2018-06-15 Jakub Jelinek <jakub@redhat.com>
2977 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2978 before doing POINTER_DIFF_EXPR.
2980 2018-06-07 Marek Polacek <polacek@redhat.com>
2983 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2984 for loop initial declarations.
2986 2018-05-30 David Pagan <dave.pagan@oracle.com>
2989 * c-decl.c (grokdeclarator): Update check for return type warnings.
2990 (start_function): Likewise.
2991 (finish_function): Likewise.
2992 * c-typeck.c (c_finish_return): Update check for return type warnings.
2993 Pass OPT_Wreturn_type to pedwarn when appropriate.
2995 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2997 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3000 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3002 * gimple-parser.c: Include internal-fn.h.
3003 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3004 (c_parser_gimple_call_internal): New function.
3005 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3006 Fix typos in comment.
3008 2018-05-10 Jakub Jelinek <jakub@redhat.com>
3011 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3012 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3014 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3015 fold_offsetof_1, pass argtype as TYPE to it and drop the
3018 2018-05-02 David Pagan <dave.pagan@oracle.com>
3021 * c-decl.c (old_style_parameter_scope): New function.
3022 * c-parser.c (c_parser_postfix_expression): Check for statement
3023 expressions in old-style function parameter list declarations.
3024 * c-parser.h (old_style_parameter_scope): New extern declaration.
3026 2018-04-25 Jakub Jelinek <jakub@redhat.com>
3029 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3030 it is not TREE_STATIC.
3031 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3032 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3033 its COMPOUND_LITERAL_EXPR_DECL.
3035 2018-03-21 Joseph Myers <joseph@codesourcery.com>
3037 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3038 where all functions return the same _FloatN or _FloatNx type,
3039 treat integer types as _Float64 instead of double.
3041 2018-03-21 Jakub Jelinek <jakub@redhat.com>
3044 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3045 building vector comparison, diagnose it and return error_mark_node.
3047 2018-03-15 Jakub Jelinek <jakub@redhat.com>
3050 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3051 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3052 INTEGER_TYPE element type.
3054 2018-03-13 David Pagan <dave.pagan@oracle.com>
3057 * c-typeck.c (output_init_element): Ensure field initializer
3058 expression is always evaluated if there are side effects.
3060 2018-03-06 Jakub Jelinek <jakub@redhat.com>
3063 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3064 !building_stmt_list_p ().
3066 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3069 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3070 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3071 and include the BIND_EXPR in the list of things that need to be
3074 2018-02-09 Nathan Sidwell <nathan@acm.org>
3077 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3078 to strict_aliasing_warning.
3080 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3082 * c-typeck.c (really_start_incremental_init, push_init_level,
3083 set_nonincremental_init, output_init_element, process_init_element):
3084 Use DECL_UNNAMED_BIT_FIELD.
3086 2018-01-31 Marek Polacek <polacek@redhat.com>
3089 * c-parser.c (c_parser_compound_statement_nostart): Call
3090 expansion_point_location_if_in_system_header.
3092 2018-01-17 David Malcolm <dmalcolm@redhat.com>
3095 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3098 2018-01-13 Jakub Jelinek <jakub@redhat.com>
3101 * c-tree.h (decl_constant_value_1): Add a bool argument.
3102 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3103 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3104 (decl_constant_value): Adjust caller.
3105 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3106 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3107 decl_constant_value returns initializer that has BLKmode or
3109 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3111 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3112 Alan Hayward <alan.hayward@arm.com>
3113 David Sherwood <david.sherwood@arm.com>
3115 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3116 TYPE_VECTOR_SUBPARTS.
3118 2018-01-03 Jakub Jelinek <jakub@redhat.com>
3120 Update copyright years.
3122 2018-01-01 Jakub Jelinek <jakub@redhat.com>
3125 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3126 c_parser_conditional_expression, c_parser_cast_expression,
3127 c_parser_sizeof_expression, c_parser_alignof_expression,
3128 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3129 c_parser_transaction_expression): Use set_error () method instead
3130 of setting value member to error_mark_node.
3132 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3134 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3135 and _Float<N>X built-in functions.
3137 2017-12-22 Jakub Jelinek <jakub@redhat.com>
3140 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3141 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3142 incomplete vars rather than after it.
3145 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3146 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3147 and consider empty ones if there are no other stmts. For
3148 -Wunused-value walk all statements before the one only followed by
3151 2017-12-22 Mike Stump <mikestump@comcast.net>
3152 Eric Botcazou <ebotcazou@adacore.com>
3154 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3155 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3156 (c_parser_do_statement): Likewise.
3157 (c_parser_for_statement): Likewise.
3158 (c_parser_statement_after_labels): Adjust calls to above.
3159 (c_parse_pragma_ivdep): New static function.
3160 (c_parser_pragma_unroll): Likewise.
3161 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3162 <PRAGMA_UNROLL>: New case.
3164 2017-12-19 Jakub Jelinek <jakub@redhat.com>
3166 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3167 perform_integral_promotions, digest_init): Replace Yoda conditions
3168 with typical order conditions.
3169 * c-decl.c (check_bitfield_type_and_width): Likewise.
3171 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3173 * c-typeck.c (c_safe_arg_type_equiv_p,
3174 c_safe_function_type_cast_p): New function.
3175 (build_c_cast): Implement -Wcast-function-type.
3177 2017-12-14 Richard Biener <rguenther@suse.de>
3180 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3181 like REALPART_EXPR for the behavior of whether its operand
3184 2017-12-12 Marek Polacek <polacek@redhat.com>
3187 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3189 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
3191 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3192 * c-parser.c (add_debug_begin_stmt): New.
3193 (c_parser_declaration_or_fndef): Call it.
3194 (c_parser_compound_statement_nostart): Likewise.
3195 (c_parser_statement_after_labels): Likewise.
3196 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3198 2017-12-07 Joseph Myers <joseph@codesourcery.com>
3200 * c-decl.c (build_compound_literal): Add parameter alignas_align
3201 and set alignment of decl if nonzero.
3202 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3203 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3205 (c_parser_struct_declaration): Update syntax comment.
3206 (c_parser_type_name): Add alignas_ok argument and pass it to
3208 (c_parser_cast_expression): Pass true to c_parser_type_name and
3209 give error if a cast used an _Alignas specifier.
3210 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3211 give error if sizeof (type-name) used an _Alignas specifier.
3212 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3213 give error if _Alignof (type-name) used an _Alignas specifier.
3214 (c_parser_postfix_expression_after_paren_type): Check specified
3215 alignment for a compound literal and pass it to
3216 build_compound_literal.
3217 * c-parser.h (c_parser_type_name): Update prototype.
3218 * c-tree.h (build_compound_literal): Update prototype.
3220 2017-12-07 Martin Sebor <msebor@redhat.com>
3223 * c-decl.c (c_decl_attributes): Look up existing declaration and
3224 pass it to decl_attributes.
3226 2017-12-06 David Malcolm <dmalcolm@redhat.com>
3229 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3230 reserved for use by the implementation.
3232 2017-12-06 David Malcolm <dmalcolm@redhat.com>
3234 * c-decl.c: Include "c-family/c-spellcheck.h".
3236 2017-12-05 Martin Liska <mliska@suse.cz>
3237 Jakub Jelinek <jakub@redhat.com>
3239 * c-typeck.c (pointer_diff): Add new argument and instrument
3240 pointer subtraction.
3241 (build_binary_op): Similar for pointer comparison.
3243 2017-12-01 Jakub Jelinek <jakub@redhat.com>
3246 * c-parser.c: Include tree-iterator.h.
3247 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3248 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3252 * c-tree.h (decl_constant_value_1): Declare.
3253 * c-typeck.c (decl_constant_value_1): New function.
3254 (decl_constant_value): Use it.
3255 * c-fold.c (c_fully_fold_internal): If in_init, use
3256 decl_constant_value_1 instead of decl_constant_value.
3258 2017-11-30 Jakub Jelinek <jakub@redhat.com>
3260 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3262 2017-11-28 Jakub Jelinek <jakub@redhat.com>
3265 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3266 c_switch_covers_all_cases_p returns true.
3268 2017-11-28 Julia Koval <julia.koval@intel.com>
3269 Sebastian Peryt <sebastian.peryt@intel.com>
3271 * Make-lang.in (c/c-array-notation.o): Remove.
3272 * c-array-notation.c: Delete.
3273 * c-decl.c: Remove cilkplus condition.
3274 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3275 c_parser_cilk_verify_simd, c_parser_array_notation,
3276 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3277 c_parser_cilk_simd_fn_vector_attrs,
3278 c_finish_cilk_simd_fn_tokens): Delete.
3279 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3280 (c_parser_direct_declarator_inner): Ditto.
3281 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3282 (c_parser_attributes, c_parser_compound_statement,
3283 c_parser_statement_after_labels, c_parser_if_statement,
3284 c_parser_switch_statement, c_parser_while_statement,
3285 c_parser_do_statement, c_parser_for_statement,
3286 c_parser_unary_expression, c_parser_postfix_expression,
3287 c_parser_postfix_expression_after_primary,
3288 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3289 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3291 * c-typeck.c (build_array_ref, build_function_call_vec,
3293 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3294 c_finish_loop, build_binary_op): Remove cilkplus support.
3296 2017-11-28 Jakub Jelinek <jakub@redhat.com>
3298 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3301 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
3303 * Make-lang.in (c.install-plugin): Install backend import library.
3305 2017-11-23 Jakub Jelinek <jakub@redhat.com>
3307 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3308 pragma_stmt context.
3310 2017-11-23 Mike Stump <mikestump@comcast.net>
3311 Eric Botcazou <ebotcazou@adacore.com>
3313 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3315 (c_parser_do_statement): Likewise.
3316 (c_parser_for_statement): Likewise.
3318 2017-11-22 David Malcolm <dmalcolm@redhat.com>
3321 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3322 bool to bool *. Within '%T' handling, if showing an "aka", use
3323 "quoted" param to add appropriate quoting.
3325 2017-11-22 Marek Polacek <polacek@redhat.com>
3330 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3332 2017-11-21 David Malcolm <dmalcolm@redhat.com>
3335 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3336 earlier failed lookups.
3338 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
3340 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3341 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3343 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3346 * c-decl.c: Include "c-family/known-headers.h".
3347 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3348 to known-headers.cc.
3349 (class suggest_missing_header): Move to known-header.h.
3350 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3351 than get_c_name_hint.
3353 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3355 * c-decl.c (get_c_name_hint): New function.
3356 (class suggest_missing_header): New class.
3357 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3358 suggest missing headers to the user.
3360 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3362 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3363 Include "c-family/name-hint.h"
3364 (implicit_decl_warning): Convert "hint" from
3365 const char * to name_hint. Pass location to
3366 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3367 warning was not printed.
3368 (undeclared_variable): Likewise for "guessed_id".
3369 (lookup_name_fuzzy): Convert return type from const char *
3370 to name_hint. Add location_t param.
3371 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3372 Include "c-family/name-hint.h"
3373 (c_parser_declaration_or_fndef): Convert "hint" from
3374 const char * to name_hint. Pass location to lookup_name_fuzzy.
3375 (c_parser_parameter_declaration): Likewise.
3377 2017-11-19 Jakub Jelinek <jakub@redhat.com>
3381 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3383 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3384 handle_omp_array_sections): Likewise.
3385 (digest_init): Don't call decl_constant_value_for_optimization.
3386 * c-tree.h (decl_constant_value_for_optimization): Removed.
3387 * c-fold.c (c_fold_array_ref): New function.
3388 (c_fully_fold_internal): Add LVAL argument, propagate it through
3389 recursive calls. For VAR_P call decl_constant_value and
3390 unshare if not LVAL and either optimizing or IN_INIT. Remove
3391 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3392 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3393 (c_fully_fold): Add LVAL argument, pass it through to
3394 c_fully_fold_internal.
3395 (decl_constant_value_for_optimization): Removed.
3397 2017-11-15 Joseph Myers <joseph@codesourcery.com>
3400 * c-parser.c (check_tgmath_function): New function.
3401 (enum tgmath_parm_kind): New enum.
3402 (c_parser_postfix_expression): Handle __builtin_tgmath.
3404 2017-10-31 David Malcolm <dmalcolm@redhat.com>
3406 * c-decl.c (implicit_decl_warning): Update for renaming of
3407 pedwarn_at_rich_loc and warning_at_rich_loc.
3408 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3409 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3410 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3411 (c_parser_struct_or_union_specifier): Likewise for renaming of
3412 pedwarn_at_rich_loc.
3413 (c_parser_parameter_declaration): Likewise for renaming of
3415 * c-typeck.c (build_component_ref): Likewise.
3416 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3417 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3418 (set_init_label): Likewise for renaming of error_at_rich_loc.
3420 2017-10-30 Richard Biener <rguenther@suse.de>
3422 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3425 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3427 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3428 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3430 2017-10-25 David Malcolm <dmalcolm@redhat.com>
3433 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3436 2017-10-25 Jakub Jelinek <jakub@redhat.com>
3439 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3440 newdecl to corresponding __builtin_ if any.
3442 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3445 * c-decl.c (diagnose_mismatched_decls): Use
3446 OPT_Wbuiltin_declaration_mismatch.
3448 2017-10-12 David Malcolm <dmalcolm@redhat.com>
3450 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3451 use it to guard calls to maybe_suggest_missing_token_insertion.
3452 (c_parser_parms_list_declarator): Override default value of new
3453 "type_is_unique" param to c_parser_require.
3454 (c_parser_asm_statement): Likewise.
3455 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3458 2017-10-11 Nathan Sidwell <nathan@acm.org>
3460 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3462 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3464 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3465 operating on trees as wide_ints.
3466 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3467 (c_tree_equal): Likewise.
3469 2017-10-04 David Malcolm <dmalcolm@redhat.com>
3471 * c-decl.c (push_parm_decl): Store c_parm's location into the
3473 (build_c_parm): Add "loc" param and store it within the c_parm.
3474 * c-parser.c (struct c_parser): Add "last_token_location" field.
3475 (c_parser_consume_token): Store location of the token into the
3477 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3478 when handling a FUNCTION_DECL, if it doesn't already have them.
3479 (c_parser_parameter_declaration): Generate a location for the
3480 parameter, and pass it to the call to build_c_parm.
3481 * c-tree.h (struct c_parm): Add field "loc".
3482 (build_c_parm): Add location_t param.
3483 * c-typeck.c (get_fndecl_argument_location): New function.
3484 (inform_for_arg): New function.
3485 (convert_for_assignment): Use inform_for_arg when dealing with
3488 2017-09-29 Jakub Jelinek <jakub@redhat.com>
3490 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3492 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3493 don't SET_DECL_C_BIT_FIELD here.
3496 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3497 instead of trying to set just TREE_READONLY manually.
3499 2017-09-16 Tom de Vries <tom@codesourcery.com>
3502 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3505 2017-09-15 Joseph Myers <joseph@codesourcery.com>
3508 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3510 (build_conditional_expr): For C11, generate result with excess
3511 precision when one argument is an integer and the other is of a
3512 type using excess precision.
3514 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3516 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3518 2017-09-13 Marek Polacek <polacek@redhat.com>
3521 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3522 than expr.original_type.
3524 2017-09-12 Nathan Sidwell <nathan@acm.org>
3526 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3527 resort_sorted_fields): Moved from c-family/c-common.c.
3528 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3530 2017-09-01 Joseph Myers <joseph@codesourcery.com>
3533 * c-typeck.c (build_atomic_assign): Handle argument with excess
3534 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3535 argument passed to build_binary_op and convert_for_assignment but
3536 not for call to c_fully_fold.
3537 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3538 Ensure build_binary_op is called with argument with original
3539 semantic type. Avoid calling c_fully_fold with an
3540 EXCESS_PRECISION_EXPR from build_binary_op.
3542 2017-09-01 Jakub Jelinek <jakub@redhat.com>
3545 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3547 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3548 Alan Hayward <alan.hayward@arm.com>
3549 David Sherwood <david.sherwood@arm.com>
3551 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3552 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3553 m1 and m2 to the signed equivalent of a fixed-point
3556 2017-08-24 David Malcolm <dmalcolm@redhat.com>
3558 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3559 than CAN_HAVE_LOCATION_P when determining whether to use the
3560 location_t value within "value".
3562 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3564 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3565 rather than peeking the location of the first token.
3566 * c-tree.h (c_expr::get_location): New method.
3568 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3570 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3571 to check_function_arguments.
3573 2017-08-18 Marek Polacek <polacek@redhat.com>
3575 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3578 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3581 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3582 (check_bitfield_type_and_width): Don't allow bit-field with
3583 warn_if_not_aligned type.
3585 2017-08-14 Martin Sebor <msebor@redhat.com>
3588 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3590 2017-08-11 Marek Polacek <polacek@redhat.com>
3593 * c-decl.c (pushtag): Only print inform if the warning was printed.
3594 (grokdeclarator): Likewise.
3596 2017-08-10 David Malcolm <dmalcolm@redhat.com>
3598 * c-parser.c (c_parser_error): Rename to...
3599 (c_parser_error_richloc): ...this, making static, and adding
3600 "richloc" parameter, passing it to the c_parse_error call,
3601 rather than calling c_parser_set_source_position_from_token.
3602 (c_parser_error): Reintroduce, reimplementing in terms of the
3603 above, converting return type from void to bool.
3604 (class token_pair): New class.
3605 (struct matching_paren_traits): New struct.
3606 (matching_parens): New typedef.
3607 (struct matching_brace_traits): New struct.
3608 (matching_braces): New typedef.
3609 (get_matching_symbol): New function.
3610 (c_parser_require): Add param MATCHING_LOCATION, using it to
3611 highlight matching "opening" tokens for missing "closing" tokens.
3612 (c_parser_skip_until_found): Likewise.
3613 (c_parser_static_assert_declaration_no_semi): Convert explicit
3614 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3615 class matching_parens, so that the pertinent open parenthesis is
3616 highlighted when there are problems locating the close
3618 (c_parser_struct_or_union_specifier): Likewise.
3619 (c_parser_typeof_specifier): Likewise.
3620 (c_parser_alignas_specifier): Likewise.
3621 (c_parser_simple_asm_expr): Likewise.
3622 (c_parser_braced_init): Likewise, for matching_braces.
3623 (c_parser_paren_condition): Likewise, for matching_parens.
3624 (c_parser_switch_statement): Likewise.
3625 (c_parser_for_statement): Likewise.
3626 (c_parser_asm_statement): Likewise.
3627 (c_parser_asm_operands): Likewise.
3628 (c_parser_cast_expression): Likewise.
3629 (c_parser_sizeof_expression): Likewise.
3630 (c_parser_alignof_expression): Likewise.
3631 (c_parser_generic_selection): Likewise.
3632 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3633 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3634 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3635 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3636 c_parser_skip_until_found call.
3637 (c_parser_objc_class_definition): Use class matching_parens as
3639 (c_parser_objc_method_decl): Likewise.
3640 (c_parser_objc_try_catch_finally_statement): Likewise.
3641 (c_parser_objc_synchronized_statement): Likewise.
3642 (c_parser_objc_at_property_declaration): Likewise.
3643 (c_parser_oacc_wait_list): Likewise.
3644 (c_parser_omp_var_list_parens): Likewise.
3645 (c_parser_omp_clause_collapse): Likewise.
3646 (c_parser_omp_clause_default): Likewise.
3647 (c_parser_omp_clause_if): Likewise.
3648 (c_parser_omp_clause_num_threads): Likewise.
3649 (c_parser_omp_clause_num_tasks): Likewise.
3650 (c_parser_omp_clause_grainsize): Likewise.
3651 (c_parser_omp_clause_priority): Likewise.
3652 (c_parser_omp_clause_hint): Likewise.
3653 (c_parser_omp_clause_defaultmap): Likewise.
3654 (c_parser_oacc_single_int_clause): Likewise.
3655 (c_parser_omp_clause_ordered): Likewise.
3656 (c_parser_omp_clause_reduction): Likewise.
3657 (c_parser_omp_clause_schedule): Likewise.
3658 (c_parser_omp_clause_num_teams): Likewise.
3659 (c_parser_omp_clause_thread_limit): Likewise.
3660 (c_parser_omp_clause_aligned): Likewise.
3661 (c_parser_omp_clause_linear): Likewise.
3662 (c_parser_omp_clause_safelen): Likewise.
3663 (c_parser_omp_clause_simdlen): Likewise.
3664 (c_parser_omp_clause_depend): Likewise.
3665 (c_parser_omp_clause_map): Likewise.
3666 (c_parser_omp_clause_device): Likewise.
3667 (c_parser_omp_clause_dist_schedule): Likewise.
3668 (c_parser_omp_clause_proc_bind): Likewise.
3669 (c_parser_omp_clause_uniform): Likewise.
3670 (c_parser_omp_for_loop): Likewise.
3671 (c_parser_cilk_clause_vectorlength): Likewise.
3672 (c_parser_cilk_clause_linear): Likewise.
3673 (c_parser_transaction_expression): Likewise.
3674 * c-parser.h (c_parser_require): Add param matching_location with
3675 default UNKNOWN_LOCATION.
3676 (c_parser_error): Convert return type from void to bool.
3677 (c_parser_skip_until_found): Add param matching_location with
3678 default UNKNOWN_LOCATION.
3680 2017-08-09 Marek Polacek <polacek@redhat.com>
3682 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3683 * c-tree.h (build_external_ref): Update declaration.
3684 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3685 (build_external_ref): Change the type of a parameter to bool.
3686 (parser_build_binary_op): Use true/false instead of 1/0.
3687 (pointer_diff): Likewise.
3688 (build_modify_expr): Likewise.
3689 (set_designator): Change the type of a parameter to bool.
3690 (set_init_index): Use true/false instead of 1/0.
3691 (set_init_label): Likewise.
3692 (output_init_element): Change the type of a parameter to bool.
3693 (output_pending_init_elements): Use true/false instead of 1/0.
3694 (process_init_element): Likewise.
3695 (build_binary_op): Change the type of a parameter to bool.
3697 2017-08-09 Marek Polacek <polacek@redhat.com>
3700 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3701 Call emit_diagnostic_valist instead of pedwarn.
3702 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3703 Print the relevant types in diagnostics.
3705 2017-08-09 Marek Polacek <polacek@redhat.com>
3708 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
3709 build_conditional_expr.
3710 * c-parser.c (c_parser_conditional_expression): Create locations for
3711 EXP1 and EXP2 from their source ranges. Pass the locations down to
3712 build_conditional_expr.
3713 * c-tree.h (build_conditional_expr): Update declaration.
3714 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3715 For -Wsign-compare, also print the types.
3717 2017-08-08 Martin Liska <mliska@suse.cz>
3719 * c-convert.c: Include header files.
3720 * c-typeck.c: Likewise.
3722 2017-08-07 Martin Liska <mliska@suse.cz>
3724 * c-parser.c (c_parser_attributes): Canonicalize name of an
3727 2017-08-02 Marek Polacek <polacek@redhat.com>
3730 * c-parser.c (c_parser_unary_expression): Use set_error.
3734 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3735 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3737 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
3738 Martin Liska <mliska@suse.cz>
3740 * c-typeck.c (c_finish_goto_label): Build gimple predict
3743 2017-07-31 Martin Liska <mliska@suse.cz>
3746 * c-convert.c (convert): Guard condition with flag_sanitize_p
3747 also with current_function_decl non-null equality.
3748 * c-decl.c (grokdeclarator): Likewise.
3749 * c-typeck.c (build_binary_op): Likewise.
3751 2017-07-25 Marek Polacek <polacek@redhat.com>
3753 * c-decl.c (grokfield): Remove local variable.
3755 2017-07-25 Marek Polacek <polacek@redhat.com>
3758 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3759 macro expansion if the body is in { }.
3760 (c_parser_while_statement): Likewise.
3761 (c_parser_for_statement): Likewise.
3763 2017-07-18 Nathan Sidwell <nathan@acm.org>
3765 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3767 2017-07-14 David Malcolm <dmalcolm@redhat.com>
3769 * c-decl.c (implicitly_declare): When suggesting a missing
3770 #include, provide a fix-it hint.
3772 2017-07-06 David Malcolm <dmalcolm@redhat.com>
3774 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3775 and call that instead.
3776 * c-tree.h (selftest::run_c_tests): New decl.
3778 2017-06-26 Marek Polacek <polacek@redhat.com>
3781 * c-parser.c (c_parser_if_body): Set the location of the
3782 body of the conditional after parsing all the labels. Call
3783 warn_for_multistatement_macros.
3784 (c_parser_else_body): Likewise.
3785 (c_parser_switch_statement): Likewise.
3786 (c_parser_while_statement): Likewise.
3787 (c_parser_for_statement): Likewise.
3788 (c_parser_statement): Add a default argument. Save the location
3789 after labels have been parsed.
3790 (c_parser_c99_block_statement): Likewise.
3792 2017-06-19 Richard Biener <rguenther@suse.de>
3794 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3795 negated _Literals to parse _Literal (int) -1.
3797 2017-06-13 Martin Liska <mliska@suse.cz>
3800 * c-convert.c (convert): Use sanitize_flags_p.
3801 * c-decl.c (grokdeclarator): Likewise.
3802 * c-typeck.c (convert_for_assignment): Likewise.
3803 (c_finish_return): Likewise.
3804 (build_binary_op): Likewise.
3806 2017-06-08 Jakub Jelinek <jakub@redhat.com>
3809 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3810 to sizetype before size_binop.
3812 2017-06-07 Jakub Jelinek <jakub@redhat.com>
3814 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3817 2017-06-06 Marek Polacek <polacek@redhat.com>
3820 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3822 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3824 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3826 * c-parser.c (c_parser_binary_expression): Implement the
3827 -Wsizeof_pointer_div warning.
3828 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3829 from a parenthesized expression.
3830 (c_parser_expr_list): Use c_last_sizeof_loc.
3831 * c-tree.h (c_last_sizeof_loc): New external.
3832 * c-typeck.c (c_last_sizeof_loc): New variable.
3833 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3835 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3838 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3840 2017-05-30 David Malcolm <dmalcolm@redhat.com>
3842 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3845 2017-05-24 Martin Sebor <msebor@redhat.com>
3848 * c-fold.c (c_fully_fold_internal): Adjust.
3849 * c-typeck.c (parser_build_unary_op): Adjust.
3851 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3853 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3854 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3857 2017-05-23 Marek Polacek <polacek@redhat.com>
3859 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3862 2017-05-22 Jakub Jelinek <jakub@redhat.com>
3864 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3865 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3866 it returned invariant. Call tree_invariant_p unconditionally
3867 afterwards to decide whether to return expr or op0.
3869 2017-05-22 Nathan Sidwell <nathan@acm.org>
3871 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3873 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3875 * c-parser.c (c_parser_omp_clause_default): Handle
3876 "OMP_CLAUSE_DEFAULT_PRESENT".
3878 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3880 * config-lang.in (gtfiles): Add c-family/c-format.c.
3882 2017-05-18 Nathan Sidwell <nathan@acm.org>
3884 * c-decl.c (pushdecl_top_level): Delete unused function.
3886 2017-05-18 Marek Polacek <polacek@redhat.com>
3888 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3889 (check_earlier_gotos): Likewise.
3890 (define_label): Likewise.
3891 (pending_xref_error): Likewise.
3892 (smallest_type_quals_location): Likewise.
3893 (grokdeclarator): Likewise.
3894 (grokparms): Likewise.
3895 (identifier_global_value): Likewise.
3896 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3897 (find_init_member): Likewise.
3899 2017-05-18 Marek Polacek <polacek@redhat.com>
3901 * c-decl.c (start_decl): Use false/true instead of 0/1.
3902 (grokdeclarator): Likewise.
3903 (finish_struct): Likewise.
3904 (start_function): Change the return type to bool. Use false/true
3906 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3907 * c-tree.h (start_function): Update.
3908 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3909 (set_designator): Change the return type to bool. Use false/true
3912 2017-05-17 Marek Polacek <polacek@redhat.com>
3914 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3915 * c-typeck.c: Likewise.
3917 2017-05-17 Marek Polacek <polacek@redhat.com>
3920 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3921 DECL_IGNORED_P even for non-static compound literals.
3923 2017-05-17 Martin Liska <mliska@suse.cz>
3925 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3926 use it instead of int type.
3928 2017-05-17 Marek Polacek <polacek@redhat.com>
3930 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3932 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
3933 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
3934 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3935 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3937 (c_parser_conditional_expression): Likewise.
3938 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3939 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3940 (process_init_element): Likewise.
3941 (build_binary_op): Likewise.
3942 (handle_omp_array_sections_1): Likewise.
3944 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3946 * c-parser.c (c_parser_omp_clause_num_gangs)
3947 (c_parser_omp_clause_num_workers)
3948 (c_parser_omp_clause_vector_length): Merge functions into...
3949 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3952 2017-05-11 Nathan Sidwell <nathan@acm.org>
3954 * gimple-parser.c: Don't #include tree-dump.h.
3956 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3959 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3961 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3964 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3965 incorrect __MEM syntax.
3967 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3970 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3973 2017-05-09 Nathan Sidwell <nathan@acm.org>
3975 * c-tree.h (pushdecl): Declare.
3977 2017-05-05 David Malcolm <dmalcolm@redhat.com>
3979 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3980 with diagnostic_report_diagnostic.
3981 * c-errors.c (pedwarn_c99): Likewise.
3982 (pedwarn_c90): Likewise.
3984 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3987 * c-gimplify.c (c_gimplify_expr): Remove calls to
3988 cilk_gimplifY_call_params_in_spawned_fn.
3990 2017-04-25 David Malcolm <dmalcolm@redhat.com>
3992 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3993 hint for removing extra semicolon.
3995 2017-04-21 Jakub Jelinek <jakub@redhat.com>
3998 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3999 enabled, set specs->type to integer_type_node.
4001 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
4003 * c-array-notation.c: Fix typo in comment.
4005 2017-03-29 Marek Polacek <polacek@redhat.com>
4008 * c-decl.c (finish_decl): Check VAR_P.
4010 2017-03-27 Jakub Jelinek <jakub@redhat.com>
4013 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4014 * c-typeck.c (c_mark_addressable): Likewise. Look through
4015 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4017 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4019 2017-03-23 Marek Polacek <polacek@redhat.com>
4021 * c-tree.h: Remove a C_RID_YYCODE reference.
4023 2017-03-21 Jakub Jelinek <jakub@redhat.com>
4026 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4027 optional COMPOUND_EXPR with ubsan instrumentation.
4029 2017-03-17 Marek Polacek <polacek@redhat.com>
4031 * c-parser.c: Add C11 references.
4033 2017-03-15 Marek Polacek <polacek@redhat.com>
4035 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4037 2017-03-11 Marek Polacek <polacek@redhat.com>
4039 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4041 2017-03-10 David Malcolm <dmalcolm@redhat.com>
4043 PR translation/79848
4044 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4046 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4048 2017-03-09 Marek Polacek <polacek@redhat.com>
4051 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4052 parameter declarations with initializers.
4054 2017-03-09 Jakub Jelinek <jakub@redhat.com>
4057 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4060 2017-03-07 Jakub Jelinek <jakub@redhat.com>
4063 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4064 for "may only be used in compound statements" diagnostics, change it
4065 such that the same translatable string is used for all pragmas. For
4066 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4068 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4069 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4070 "may only be used in compound statements" diagnostics, such that the
4071 same translatable string is used for all pragmas.
4073 2017-03-04 Marek Polacek <polacek@redhat.com>
4076 * c-decl.c (implicit_decl_warning): Add missing space.
4078 2017-03-03 Marek Polacek <polacek@redhat.com>
4081 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4082 current_function_prototype_arg_types is error_mark_node. Fix
4083 formatting. Use TREE_VALUE instead of TREE_TYPE.
4085 2017-03-03 Jakub Jelinek <jakub@redhat.com>
4088 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4089 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4090 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4094 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4095 instead of %<_Generic>.
4096 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4097 (c_parser_omp_target_exit_data): Use %<release%> instead of
4100 2017-02-28 Jakub Jelinek <jakub@redhat.com>
4102 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4103 instead of just cond ? "..." : "...".
4104 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4105 for "enter"/"exit" keyword.
4106 (c_finish_oacc_routine): Don't use %s to supply portions of the
4109 2017-02-24 Jakub Jelinek <jakub@redhat.com>
4112 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4113 handle -Wrestrict here.
4114 * c-typeck.c (build_function_call_vec): Adjust
4115 check_function_arguments caller.
4117 2017-02-23 Richard Biener <rguenther@suse.de>
4120 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4121 to initialize c_exprs to return.
4122 (c_parser_gimple_binary_expression): Likewise.
4123 (c_parser_gimple_unary_expression): Likewise.
4124 (c_parser_gimple_postfix_expression): Likewise.
4126 2017-02-22 Marek Polacek <polacek@redhat.com>
4129 * c-typeck.c (convert_arguments): Handle error_mark_node.
4131 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4133 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4134 value of c_parser_parse_ssa_name against error_mark_node and emit
4135 error if ssa name is anonymous and written as default definition.
4137 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4139 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4142 2017-02-16 Jakub Jelinek <jakub@redhat.com>
4145 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4146 ignore #pragma omp target even when not followed by identifier.
4148 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4150 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4151 (c_parser_gimple_unary_expression): Likewise.
4153 2017-02-13 Jakub Jelinek <jakub@redhat.com>
4155 * c-parser.c (c_parser_oacc_declare): Add missing space in
4158 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4161 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4162 set_c_expr_source_range when parsing ssa-name.
4164 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
4165 Richard Biener <rguenther@suse.de>
4167 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4168 building IL when arguments are error_mark_node.
4169 (c_parser_gimple_unary_expression): Likewise.
4170 (c_parser_gimple_if_stmt): Likewise.
4171 (c_parser_gimple_switch_stmt): Likewise.
4172 (c_parser_gimple_return_stmt): Likewise.
4173 (c_parser_parse_ssa_name): When name lookup fails do not build
4174 an SSA name. Use undeclared rather than not declared in error
4177 2017-02-09 Marek Polacek <polacek@redhat.com>
4180 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4181 instead of c_parser_skip_until_found.
4183 2017-02-09 Jakub Jelinek <jakub@redhat.com>
4186 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4187 symtab_node::get on automatic variables.
4189 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4190 Chung-Lin Tang <cltang@codesourcery.com>
4192 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4193 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4195 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4197 2017-02-07 Richard Biener <rguenther@suse.de>
4199 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4200 (c_parser_gimple_postfix_expression_after_primary):
4201 Do not use c_build_function_call_vec to avoid folding and promotion.
4204 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4207 * c-decl.c (pop_scope): Pass main_input_filename to
4208 build_translation_unit_decl.
4210 2017-01-24 David Malcolm <dmalcolm@redhat.com>
4212 * c-parser.c: Include "read-rtl-function.h" and
4214 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4215 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4216 production. Update for renaming of field "gimple_pass" to
4217 "gimple_or_rtl_pass". If __RTL was seen, call
4218 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4219 to an auto_timevar, to cope with early exit.
4220 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4221 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4222 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4224 (c_parser_parse_rtl_body): New function.
4225 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4226 (struct c_declspecs): Rename field "gimple_pass" to
4227 "gimple_or_rtl_pass". Add field "rtl_p".
4228 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4229 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4230 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4231 (c_parser_gimple_or_rtl_pass_list): ...this.
4233 2017-01-20 Marek Polacek <polacek@redhat.com>
4236 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4238 2017-01-13 Richard Biener <rguenther@suse.de>
4240 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4243 2017-01-13 Richard Biener <rguenther@suse.de>
4245 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4246 _Literal ( type-name ) number.
4248 2017-01-12 Richard Biener <rguenther@suse.de>
4250 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4253 2017-01-11 Jakub Jelinek <jakub@redhat.com>
4256 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4259 2017-01-11 Richard Biener <rguenther@suse.de>
4262 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4263 returns on parse errors.
4265 2017-01-04 Marek Polacek <polacek@redhat.com>
4268 * c-parser.c (c_parser_postfix_expression): Mark zero character
4269 constants by setting original_type in c_expr.
4270 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4271 with a zero character constant.
4272 (char_type_p): New function.
4274 2017-01-04 David Malcolm <dmalcolm@redhat.com>
4276 * c-parser.c (c_parser_declaration_or_fndef): Create a
4277 rich_location at init_loc and parse it to start_init.
4278 (last_init_list_comma): New global.
4279 (c_parser_braced_init): Update last_init_list_comma when parsing
4280 commas. Pass it to pop_init_level. Pass location of closing
4281 brace to pop_init_level.
4282 (c_parser_postfix_expression_after_paren_type): Create a
4283 rich_location at type_loc and parse it to start_init.
4284 (c_parser_omp_declare_reduction): Likewise for loc.
4285 * c-tree.h (start_init): Add rich_location * param.
4286 (pop_init_level): Add location_t param.
4287 * c-typeck.c (struct initializer_stack): Add field
4288 "missing_brace_richloc".
4289 (start_init): Add richloc param, use it to initialize
4290 the stack node's missing_brace_richloc.
4291 (last_init_list_comma): New decl.
4292 (finish_implicit_inits): Pass last_init_list_comma to
4294 (push_init_level): When finding missing open braces, add fix-it
4295 hints to the richloc.
4296 (pop_init_level): Add "insert_before" param and pass it
4297 when calling pop_init_level. Add fixits about missing
4298 close braces to any richloc. Use the richloc for the
4299 -Wmissing-braces warning.
4300 (set_designator): Pass last_init_list_comma to pop_init_level.
4301 (process_init_element): Likewise.
4303 2017-01-01 Jakub Jelinek <jakub@redhat.com>
4305 Update copyright years.
4307 2016-12-21 Jakub Jelinek <jakub@redhat.com>
4310 * c-typeck.c (build_function_call_vec): If check_function_arguments
4311 returns true, set TREE_NO_WARNING on CALL_EXPR.
4314 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4315 to *expr instead of overwriting it.
4317 2016-12-20 Richard Biener <rguenther@suse.de>
4319 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4321 (c_parser_gimple_statement): Only build assigns for non-error
4323 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4325 2016-12-14 Martin Jambor <mjambor@suse.cz>
4327 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4329 (c_finish_oacc_routine): Adjusted call to
4330 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4331 to use their new names.
4332 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4334 (c_parser_oacc_update): Likewise.
4335 (c_parser_omp_simd): Likewise.
4336 (c_parser_omp_target_update): Likewise.
4337 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4338 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4340 (c_finish_omp_cancellation_point): Likewise.
4341 * gimple-parser.c: Do not include omp-low.h
4343 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4344 James Norris <jnorris@codesourcery.com>
4346 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4347 EXIT_DATA,WAIT} are not used in compound statements.
4348 (c_parser_oacc_enter_exit_data): Update diagnostics.
4350 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4353 * c-decl.c (diagnose_mismatched_decls): Use
4354 OPT_Wbuiltin_declaration_mismatch here too.
4356 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
4357 Alan Hayward <alan.hayward@arm.com>
4358 David Sherwood <david.sherwood@arm.com>
4360 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4361 (make_label, finish_struct): Likewise.
4363 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
4364 Richard Biener <rguenther@suse.de>
4366 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4367 * config-lang.in (gtfiles): Add c/c-parser.h.
4368 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4369 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4370 * c-parser.c (enum c_id_kind, struct c_token,
4371 c_parser_next_token_is, c_parser_next_token_is_not,
4372 c_parser_next_token_is_keyword,
4373 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4375 * c-parser.h: ... new header.
4376 * c-parser.c: Include c-parser.h and gimple-parser.h.
4377 (c_parser_peek_token, c_parser_peek_2nd_token,
4378 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4379 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4380 c_parser_error, c_parser_require, c_parser_skip_until_found,
4381 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4382 c_parser_type_name): Export.
4383 (c_parser_tokens_buf): New function.
4384 (c_parser_error): Likewise.
4385 (c_parser_set_error): Likewise.
4386 (c_parser_declspecs): Handle RID_GIMPLE.
4387 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4388 via c_parser_parse_gimple_body.
4389 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4390 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4391 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4392 c_parser_error, c_parser_require, c_parser_skip_until_found,
4393 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4394 c_parser_type_name): Declare.
4395 (struct c_parser): Declare forward.
4396 (c_parser_tokens_buf): Declare.
4397 (c_parser_error): Likewise.
4398 (c_parser_set_error): Likewise.
4399 * gimple-parser.c: New file.
4400 * gimple-parser.h: Likewise.
4402 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4405 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4408 2016-09-11 Le-Chun Wu <lcwu@google.com>
4409 Mark Wielaard <mjw@redhat.com>
4411 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4412 to the given -Wshadow= variant.
4414 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4416 * c-typeck.c: Include memmodel.h.
4418 2016-10-13 Jakub Jelinek <jakub@redhat.com>
4421 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4422 instead of lhd_return_null_tree_v.
4424 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4427 * c-decl.c (smallest_type_quals_location): New static function.
4428 (grokdeclarator): Try to find the correct location for an ignored
4431 2016-09-26 Marek Polacek <polacek@redhat.com>
4434 * c-decl.c (pop_scope): Add gcc_fallthrough.
4436 2016-09-26 Marek Polacek <polacek@redhat.com>
4439 * c-parser.c (struct c_token): Add flags field.
4440 (c_lex_one_token): Pass it to c_lex_with_flags.
4441 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4442 into IFN_FALLTHROUGH.
4443 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4444 attribute fallthrough after a case label or default label.
4445 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4447 2016-09-24 Marek Polacek <polacek@redhat.com>
4450 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4451 have boolean value. Warn about ++/-- on booleans.
4453 2016-09-23 Jakub Jelinek <jakub@redhat.com>
4455 * c-parser.c (incomplete_record_decls): Remove unnecessary
4456 = vNULL initialization of file scope vec.
4458 2016-09-16 Marek Polacek <polacek@redhat.com>
4460 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4462 2016-09-14 Marek Polacek <polacek@redhat.com>
4464 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4465 (fix_array_notation_expr): Likewise.
4466 * c-decl.c (finish_decl): Likewise.
4467 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4468 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4469 (function_to_pointer_conversion): Use false instead of 0.
4470 (convert_lvalue_to_rvalue): Likewise.
4471 (parser_build_unary_op): Likewise.
4472 (build_atomic_assign): Likewise.
4473 (build_unary_op): Change nonconvert parameter type to bool, use
4474 true/false instead of 1/0.
4475 (build_binary_op): Use true instead of 1.
4477 2016-09-13 David Malcolm <dmalcolm@redhat.com>
4479 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4480 of add_fixit_insert to add_fixit_insert_before.
4482 2016-09-13 Marek Polacek <polacek@redhat.com>
4484 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4487 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4490 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4491 COMPOUND_EXPR to warn_for_omitted_condop.
4493 2016-09-07 David Malcolm <dmalcolm@redhat.com>
4495 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4496 c_get_substring_location for this new langhook.
4498 2016-09-02 Jakub Jelinek <jakub@redhat.com>
4501 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4503 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4504 instead of mark_exp_read on low_bound/length expression.
4505 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4506 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4507 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4508 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4509 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4510 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4511 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4512 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4513 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4514 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4515 instead of mark_expr_read.
4516 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4517 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4518 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4519 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4520 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4521 array section bases outside of depend clause, for depend clause
4522 use convert_lvalue_to_rvalue on the base.
4523 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4524 linear, aligned, map, to and from clauses.
4525 (c_omp_clause_copy_ctor): New function.
4527 2016-09-01 Marek Polacek <polacek@redhat.com>
4530 * c-typeck.c (composite_type): Add FALLTHRU comment.
4532 2016-08-31 David Malcolm <dmalcolm@redhat.com>
4534 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4535 to the insertion fixits for "struct", "union", and "enum".
4537 2016-08-30 David Malcolm <dmalcolm@redhat.com>
4539 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4540 rather than add_fixit_misspelled_id.
4541 (undeclared_variable): Likewise.
4542 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4543 now-redundant "here" params from add_fixit_insert method calls.
4544 (c_parser_parameter_declaration): Likewise.
4545 * c-typeck.c (build_component_ref): Remove now-redundant range
4546 param from add_fixit_replace method calls.
4548 2016-08-25 Marek Polacek <polacek@redhat.com>
4550 * c-typeck.c (parser_build_binary_op): Pass LHS to
4551 warn_logical_not_parentheses.
4553 2016-08-25 Marek Polacek <polacek@redhat.com>
4556 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4557 or _FloatN or _FloatNx is not supported.
4558 (finish_declspecs): Set type to integer_type_node when _FloatN or
4559 _FloatNx is not supported.
4561 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4564 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4565 (struct c_declspecs): Add field floatn_nx_idx.
4566 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4567 and _FloatNx type specifiers.
4568 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4569 (c_parser_declspecs, c_parser_attribute_any_word)
4570 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4571 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4572 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4573 narrower than double.
4575 2016-08-12 Jakub Jelinek <jakub@redhat.com>
4576 Martin Liska <mliska@suse.cz>
4579 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4580 % to determine val element to change. Assert that
4581 wchar_bytes * charwidth fits into val array.
4583 2016-08-12 Marek Polacek <polacek@redhat.com>
4586 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4587 (c_parser_postfix_expression): Likewise.
4588 * c-typeck.c (build_unary_op): Adjust fall through comment.
4589 (c_mark_addressable): Likewise.
4591 2016-08-11 Jakub Jelinek <jakub@redhat.com>
4594 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4595 array member through typedef, for orig_qual_indirect == 0 clear
4598 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4601 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4602 this up to selftest::run_c_tests.
4603 (selftest::run_c_tests): New function.
4605 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4607 * c-parser.c (struct oacc_routine_data): Add error_seen and
4608 fndecl_seen members.
4609 (c_finish_oacc_routine): Use these.
4610 (c_parser_declaration_or_fndef): Adjust.
4611 (c_parser_oacc_routine): Likewise. Support more C language
4612 constructs, and improve diagnostics. Move pragma context
4614 (c_parser_pragma): ... here.
4616 * c-parser.c (struct oacc_routine_data): New.
4617 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4619 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4620 declare target" attribute.
4622 2016-08-01 Jan Beulich <jbeulich@suse.com>
4624 * c-fold.c (c_fully_fold_internal): Also emit shift count
4625 warnings for vector types.
4626 * c-typeck.c (build_binary_op): Likewise.
4628 2016-07-29 Marek Polacek <polacek@redhat.com>
4631 * c-decl.c (finish_struct): Rephrase an error message.
4634 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4635 to error node for invalid code.
4638 * c-decl.c (implicitly_declare): Return decl early not only for
4639 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4641 2016-07-29 Jakub Jelinek <jakub@redhat.com>
4644 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4645 on GNU extern inline functions.
4647 2016-07-29 Marek Polacek <polacek@redhat.com>
4650 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4653 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
4655 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4657 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4659 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4661 (best_macro_match): Likewise, converting from a typedef to a
4663 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4664 (lookup_name_fuzzy): Update for change of best_macro_match to a
4665 subclass with a ctor that calls cpp_forall_identifiers.
4667 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4669 * c-decl.c (implicit_decl_warning): Update for conversion of
4670 return type of lookup_name_fuzzy to const char *.
4671 (undeclared_variable): Likewise.
4672 (lookup_name_fuzzy): Convert return type from tree to
4674 * c-parser.c (c_parser_declaration_or_fndef): Update for
4675 conversion of return type of lookup_name_fuzzy to const char *.
4676 (c_parser_parameter_declaration): Likewise.
4678 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4680 * c-parser.c (c_parser_oacc_declare): Don't scan for
4682 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4683 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4684 zero-length subarrays.
4686 2016-07-15 Jakub Jelinek <jakub@redhat.com>
4689 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4690 instead of FUZZY_LOOKUP_NAME.
4691 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4692 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4694 2016-07-14 Jakub Jelinek <jakub@redhat.com>
4697 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4699 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4701 * c-parser.c (c_parser_generic_selection): Make type of variable
4703 (c_parser_omp_declare_simd): Likewise.
4705 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4707 * c-decl.c (struct c_struct_parse_info): Change member types
4708 from vec to auto_vec.
4709 (start_struct): Adjust.
4710 (finish_struct): Likewise.
4712 2016-07-02 Jakub Jelinek <jakub@redhat.com>
4715 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4717 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4719 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4720 Move pragma context checking into...
4721 (c_parser_omp_cancellation_point): ... here, and improve
4722 diagnostic messages.
4723 * c-typeck.c (c_finish_omp_cancel)
4724 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4726 2016-06-29 Jakub Jelinek <jakub@redhat.com>
4729 * c-typeck.c (c_build_qualified_type): Don't clear
4730 C_TYPE_INCOMPLETE_VARS for the main variant.
4732 2016-06-28 Martin Sebor <msebor@redhat.com>
4735 * c-typeck.c (output_init_element): Diagnose incompatible types
4736 before non-constant initializers.
4738 2016-06-28 Jakub Jelinek <jakub@redhat.com>
4740 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4742 2016-06-23 Andi Kleen <ak@linux.intel.com>
4744 * Make-lang.in: Add support for autofdo.
4746 2016-06-22 David Malcolm <dmalcolm@redhat.com>
4749 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4750 (implicit_decl_warning): When issuing warnings for implicit
4751 declarations, attempt to provide a suggestion via
4753 (undeclared_variable): Likewise when issuing errors.
4754 (lookup_name_in_scope): Likewise.
4755 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4756 (best_macro_match): New typedef.
4757 (find_closest_macro_cpp_cb): New function.
4758 (lookup_name_fuzzy): New function.
4759 * c-parser.c: Include gcc-rich-location.h.
4760 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4761 (c_keyword_starts_typename): ...this new function.
4762 (c_parser_declaration_or_fndef): When issuing errors about
4763 missing "struct" etc, add a fixit. For other kinds of errors,
4764 attempt to provide a suggestion via lookup_name_fuzzy.
4765 (c_parser_parms_declarator): When looking ahead to detect typos in
4766 type names, also reject CPP_KEYWORD.
4767 (c_parser_parameter_declaration): When issuing errors about
4768 unknown type names, attempt to provide a suggestion via
4770 * c-tree.h (c_keyword_starts_typename): New prototype.
4772 2016-06-20 Joseph Myers <joseph@codesourcery.com>
4775 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4776 c_common_type returns error_mark_node.
4778 2016-06-19 Martin Sebor <msebor@redhat.com>
4781 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4782 __alignof__ (expression).
4784 2016-06-14 David Malcolm <dmalcolm@redhat.com>
4786 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4788 2016-06-14 David Malcolm <dmalcolm@redhat.com>
4790 * c-typeck.c (build_component_ref): Simplify fixit code by
4791 using gcc_rich_location::add_fixit_misspelled_id.
4792 (set_init_label): Likewise.
4794 2016-06-13 David Malcolm <dmalcolm@redhat.com>
4796 * c-parser.c (c_parser_initelt): Provide location of name for new
4797 location_t param of set_init_label.
4798 * c-tree.h (set_init_label): Add location_t param.
4799 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4800 param and use it when issuing error messages about unrecognized
4801 field names. Attempt to provide a fixit hint if appropriate,
4802 otherwise update the error message to provide the type name.
4804 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4807 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4810 2016-06-08 Martin Sebor <msebor@redhat.com>
4811 Jakub Jelinek <jakub@redhat.com>
4815 * c-typeck.c (convert_arguments): Don't promote last argument
4816 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4818 2016-06-08 Marek Polacek <polacek@redhat.com>
4821 * c-decl.c (grokdeclarator): Check TYPE_P.
4824 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4827 2016-06-07 David Malcolm <dmalcolm@redhat.com>
4829 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4830 and structure element reference, capture the location of the
4831 element name token and pass it to build_component_ref.
4832 (c_parser_postfix_expression_after_primary): Likewise for
4833 structure element dereference.
4834 (c_parser_omp_variable_list): Likewise for
4835 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4836 * c-tree.h (build_component_ref): Add location_t param.
4837 * c-typeck.c (build_component_ref): Add location_t param
4838 COMPONENT_LOC. Use it, if available, when issuing hints about
4839 mispelled member names to provide a fixit replacement hint.
4841 2016-06-06 Marek Polacek <polacek@redhat.com>
4844 * c-parser.c (c_parser_direct_declarator): Set location.
4846 2016-06-06 Marek Polacek <polacek@redhat.com>
4848 * c-typeck.c (comptypes_internal): Handle comparisons of
4849 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4850 TYPE_REF_CAN_ALIAS_ALL.
4852 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4854 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4855 arguments as addressable when async clause exists.
4857 2016-05-30 Jakub Jelinek <jakub@redhat.com>
4860 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4861 when combined with target construct.
4863 2016-05-26 Jakub Jelinek <jakub@redhat.com>
4865 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4866 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4868 2016-05-25 Marek Polacek <polacek@redhat.com>
4871 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4874 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4876 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4878 * c-parser.c (c_parser_oacc_declare): Add support for
4879 GOMP_MAP_FIRSTPRIVATE_POINTER.
4880 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4881 argument with enum c_omp_region_type ort.
4882 (handle_omp_array_sections): Likewise. Update call to
4883 handle_omp_array_sections_1.
4884 (c_finish_omp_clauses): Add specific errors and warning messages for
4885 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4886 call to handle_omp_array_sections.
4888 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4890 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4892 2016-05-24 Richard Biener <rguenther@suse.de>
4896 * c-typeck.c (build_array_ref): Do not complain about indexing
4897 non-lvalue vectors. Adjust for function name change.
4899 2016-05-20 Martin Sebor <msebor@redhat.com>
4902 * c-typeck.c (error_init): Use
4903 expansion_point_location_if_in_system_header.
4904 (warning_init): Same.
4906 2016-05-19 David Malcolm <dmalcolm@redhat.com>
4909 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4911 (c_parser_postfix_expression): Likewise.
4912 * c-tree.h (c_expr::set_error): New method.
4913 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4914 that result's range is initialized.
4916 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4918 * c-typeck.c (parser_build_unary_op): Fix formatting.
4920 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4922 * c-decl.c (grokdeclarator): Remove errmsg and use of
4923 targetm.invalid_return_type.
4924 (grokparms): Remove errmsg and use of
4925 targetm.invalid_parameter_type.
4927 2016-05-13 Joseph Myers <joseph@codesourcery.com>
4929 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4930 function return type.
4932 2016-05-12 Marek Polacek <polacek@redhat.com>
4935 * c-decl.c (build_compound_literal): Pass LOC down to
4936 c_incomplete_type_error.
4937 * c-tree.h (require_complete_type): Adjust declaration.
4938 (c_incomplete_type_error): Likewise.
4939 * c-typeck.c (require_complete_type): Add location parameter, pass it
4940 down to c_incomplete_type_error.
4941 (c_incomplete_type_error): Add location parameter, pass it down to
4943 (build_component_ref): Pass location down to c_incomplete_type_error.
4944 (default_conversion): Pass location down to require_complete_type.
4945 (build_array_ref): Likewise.
4946 (build_function_call_vec): Likewise.
4947 (convert_arguments): Likewise.
4948 (build_unary_op): Likewise.
4949 (build_c_cast): Likewise.
4950 (build_modify_expr): Likewise.
4951 (convert_for_assignment): Likewise.
4952 (c_finish_omp_clauses): Likewise.
4954 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4957 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4959 * c-errors.c (pedwarn_c90): Return true if warned.
4960 * c-tree.h (pedwarn_c90): Change return type to bool.
4961 (enum c_declspec_word): Add new enumerator cdw_atomic.
4963 2016-05-11 Marek Polacek <polacek@redhat.com>
4966 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4967 diagnose_mismatched_attributes and call it.
4969 2016-05-10 Marek Polacek <polacek@redhat.com>
4972 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4973 on a declaration following the definition.
4975 2016-05-05 Jakub Jelinek <jakub@redhat.com>
4977 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4978 parse it through to c_parser_c99_block_statement.
4979 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4982 2016-05-04 Marek Polacek <polacek@redhat.com>
4984 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4987 2016-05-04 Marek Polacek <polacek@redhat.com>
4990 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4991 for macro expansions.
4993 2016-05-03 Marek Polacek <polacek@redhat.com>
4996 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4997 check_builtin_function_arguments.
4999 2016-05-03 Richard Biener <rguenther@suse.de>
5001 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5002 the checksum from the previous stage.
5004 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5006 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5007 c_finish_omp_clauses.
5008 (c_parser_omp_all_clauses): Likewise.
5009 (c_parser_oacc_cache): Likewise.
5010 (c_parser_oacc_loop): Likewise.
5011 (omp_split_clauses): Likewise.
5012 (c_parser_omp_declare_target): Likewise.
5013 (c_parser_cilk_all_clauses): Likewise.
5014 (c_parser_cilk_for): Likewise.
5015 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5016 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5018 2016-05-02 Marek Polacek <polacek@redhat.com>
5021 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5024 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5027 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5028 OACC_LOOP_CLAUSE_MASK.
5029 (c_parser_oacc_kernels_parallel): Update call to
5030 c_oacc_split_loop_clauses.
5032 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
5034 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5035 argument to build_modify_expr in two cases.
5037 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5039 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5040 warn_for_memset instead of warning directly here.
5042 2016-04-26 Marek Polacek <polacek@redhat.com>
5045 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5047 (c_parser_for_statement): ... here.
5048 (c_parser_if_statement): Use it.
5049 (c_parser_switch_statement): Use it.
5050 (c_parser_while_statement): Use it.
5053 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5055 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5058 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5059 instead of c_finish_cilk_clauses.
5060 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5061 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5062 floating-point variables in the linear clause for Cilk Plus.
5064 2016-04-18 Michael Matz <matz@suse.de>
5066 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5067 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5069 2016-04-15 Marek Polacek <polacek@redhat.com>
5072 * c-typeck.c (build_unary_op): Pass location down to error and
5075 2016-04-15 Jakub Jelinek <jakub@redhat.com>
5078 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5080 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5081 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5082 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5083 Adjust c_parser_pragma callers.
5084 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5086 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5088 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5089 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5090 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5091 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5092 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5093 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5094 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5095 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5097 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5098 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5101 2016-04-13 Marek Polacek <polacek@redhat.com>
5104 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5106 (c_parser_statement): Likewise.
5107 (c_parser_c99_block_statement): Likewise.
5108 (c_parser_while_statement): Likewise.
5109 (c_parser_for_statement): Likewise.
5110 (c_parser_if_body): Don't set IF_P here.
5111 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5112 about dangling else here.
5113 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5114 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5115 warn about dangling else here.
5117 2016-04-04 Marek Polacek <polacek@redhat.com>
5120 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5122 2016-03-31 Marek Polacek <polacek@redhat.com>
5125 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5127 2016-03-18 David Malcolm <dmalcolm@redhat.com>
5130 * c-parser.c (c_parser_postfix_expression): Set the source range
5131 for uses of "__builtin_types_compatible_p".
5133 2016-03-17 Jakub Jelinek <jakub@redhat.com>
5136 * c-typeck.c (composite_type): Don't count void_list_node
5137 into len, if the list is terminated by void_list_node, start
5138 with void_list_node instead of NULL for newargs. Stop
5141 2016-03-16 Marek Polacek <polacek@redhat.com>
5144 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5145 nested functions returning VM types.
5147 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5149 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5150 when calling c_finish_omp_clauses.
5152 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5155 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5158 2016-03-04 Marek Polacek <polacek@redhat.com>
5161 * c-parser.c (c_parser_postfix_expression): Call
5162 c_parser_cast_expression rather than c_parser_postfix_expression.
5164 2016-03-01 Jakub Jelinek <jakub@redhat.com>
5168 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5169 of incomplete decls to error_mark_node.
5171 2016-02-24 Marek Polacek <polacek@redhat.com>
5174 * c-decl.c (finish_decl): Don't update the copy of the type of a
5175 different decl type.
5177 2016-02-23 Jakub Jelinek <jakub@redhat.com>
5180 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5181 in id_kind reclassification.
5183 2016-02-16 Jakub Jelinek <jakub@redhat.com>
5186 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5188 2016-02-16 James Norris <jnorris@codesourcery.com>
5191 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5193 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5195 * c-decl.c (build_null_declspecs): Zero the entire struct.
5198 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5199 callers changed. If nested_p is true, use it to call
5200 finish_implicit_inits.
5201 * c-tree.h (finish_implicit_inits): Declare.
5202 * c-typeck.c (finish_implicit_inits): New function. Move code
5204 (push_init_level): ... here.
5205 (set_designator, process_init_element): Call finish_implicit_inits.
5207 2016-02-11 Jakub Jelinek <jakub@redhat.com>
5210 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5211 arguments for -Waddress warning.
5213 2016-02-04 Jakub Jelinek <jakub@redhat.com>
5216 * c-decl.c (finish_enum): When honoring mode attribute,
5217 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5219 2016-01-29 Jakub Jelinek <jakub@redhat.com>
5222 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5223 all type variants, not just TYPE_MAIN_VARIANT.
5225 2016-01-27 Jakub Jelinek <jakub@redhat.com>
5228 * c-decl.c (c_write_global_declarations_1): Warn with
5229 warn_unused_function if static prototype without definition
5232 2016-01-27 Marek Polacek <polacek@redhat.com>
5235 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5236 to unsigned, if needed. Add -Wsign-compare warning.
5238 2016-01-26 Jakub Jelinek <jakub@redhat.com>
5240 PR tree-optimization/69483
5241 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5243 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5246 * c-tree.h (incomplete_record_decls): Declare.
5247 * c-parser.c (incomplete_record_decls): Define.
5248 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5249 report error if any decl has zero size.
5250 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5251 or enum type to incomplete_record_decls.
5253 2016-01-14 Tom de Vries <tom@codesourcery.com>
5255 PR tree-optimization/68773
5256 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5259 2016-01-14 Marek Polacek <polacek@redhat.com>
5262 * c-decl.c (grokdeclarator): Provide more information for invalid
5265 2016-01-06 David Malcolm <dmalcolm@redhat.com>
5267 * c-parser.c (c_parser_unary_expression): For dereferences, build
5268 a combined location before calling build_indirect_ref, so that
5269 error reports cover the full range, manually updating the c_expr
5272 2016-01-06 Marek Polacek <polacek@redhat.com>
5275 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5276 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5279 2016-01-04 Jakub Jelinek <jakub@redhat.com>
5281 Update copyright years.
5283 2016-01-04 Marek Polacek <polacek@redhat.com>
5286 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5287 optimization to use __atomic_fetch_* built-in if possible.
5289 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5291 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5293 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5296 2015-12-22 Marek Polacek <polacek@redhat.com>
5299 * c-typeck.c (build_component_ref): Warn when acessing elements of
5300 atomic structures or unions.
5302 2015-12-21 David Malcolm <dmalcolm@redhat.com>
5304 * c-typeck.c: Include "gcc-rich-location.h".
5305 (build_binary_op): In the two places that call binary_op_error,
5306 create a gcc_rich_location and populate it with the location of
5307 the binary op and its two operands.
5309 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5311 * c-parser.c (c_parser_statement_after_labels): When calling
5312 c_finish_return, Use the return expression's location if it has
5313 one, falling back to the location of the first token within it.
5314 * c-typeck.c (c_finish_return): When issuing warnings about
5315 the incorrect presence/absence of a return value, issue a note
5316 showing the declaration of the function.
5318 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5320 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5322 (c_parser_peek_nth_token): New function.
5323 (c_parser_peek_conflict_marker): New function.
5324 (c_parser_error): Detect conflict markers and report them as such.
5326 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5328 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5329 to preserve range information for the primary expression
5330 in the call to c_parser_postfix_expression_after_primary.
5332 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5334 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5335 expression location, falling back on the first token location,
5336 rather than always using the latter.
5338 2015-12-16 Marek Polacek <polacek@redhat.com>
5341 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5344 2015-12-15 Marek Polacek <polacek@redhat.com>
5347 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5350 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5352 * c-parser.c (c_parser_alignof_expression): Capture location of
5353 closing parenthesis (if any), or of end of unary expression, and
5354 use it to build a src_range for the expression.
5356 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5359 * c-parser.c (c_parser_get_builtin_args): Add
5360 "out_close_paren_loc" param, and write back to it.
5361 (c_parser_postfix_expression): Capture the closing
5362 parenthesis location for RID_CHOOSE_EXPR,
5363 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5364 RID_BUILTIN_SHUFFLE and use it to set the source range
5365 for such expressions; within RID_BUILTIN_COMPLEX set
5366 the underlying location.
5368 2015-12-07 Marek Polacek <polacek@redhat.com>
5371 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5372 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5374 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5376 * c-tree.h (c_build_va_arg): Adjust prototype.
5377 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5378 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5379 parameter, adjust throughout and issue an error if EXPR is a component
5380 with reverse storage order.
5382 2015-12-02 Jason Merrill <jason@redhat.com>
5384 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5385 (c_fully_fold_internal, decl_constant_value_for_optimization):
5386 Move from c-common.c.
5387 * c-tree.h: Declare decl_constant_value_for_optimization.
5388 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5390 2015-12-02 Joseph Myers <joseph@codesourcery.com>
5393 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5394 following link from declarator to next declarator. Track original
5395 qualified type and pass it to c_build_qualified_type.
5396 * c-typeck.c (c_build_qualified_type): Add arguments
5397 orig_qual_type and orig_qual_indirect.
5399 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5401 * c-parser.c (c_parser_omp_clause_name)
5402 (c_parser_oacc_all_clauses): Alphabetical sorting.
5404 2015-12-02 Jakub Jelinek <jakub@redhat.com>
5407 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5410 2015-12-01 Julian Brown <julian@codesourcery.com>
5411 Cesar Philippidis <cesar@codesourcery.com>
5412 James Norris <James_Norris@mentor.com>
5414 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5415 (c_parser_oacc_clause_use_device): New function.
5416 (c_parser_oacc_all_clauses): Add use_device support.
5417 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5418 (c_parser_oacc_host_data): New function.
5419 (c_parser_omp_construct): Add host_data support.
5420 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5421 * c-typeck.c (c_finish_oacc_host_data): New function.
5422 (c_finish_omp_clauses): Add use_device support.
5424 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
5427 * c-decl.c: Set TYPE_PACKED in variants.
5429 2015-11-27 Martin Liska <mliska@suse.cz>
5432 * c-array-notation.c (fix_builtin_array_notation_fn):
5433 Use release_vec_vec instead of vec::release.
5434 (build_array_notation_expr): Likewise.
5435 (fix_conditional_array_notations_1): Likewise.
5436 (fix_array_notation_expr): Likewise.
5437 (fix_array_notation_call_expr): Likewise.
5439 2015-11-27 Jakub Jelinek <jakub@redhat.com>
5442 * c-parser.c (c_parser_compound_statement_nostart): If
5443 last_label is true, use pragma_stmt instead of pragma_compound
5444 as second c_parser_pragma argument.
5445 (c_parser_omp_ordered, c_parser_omp_target_update,
5446 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5447 false as second argument to c_parser_skip_to_pragma_eol after
5448 diagnosing standalone directives used in pragma_stmt context.
5450 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5452 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5453 with "if (ENABLE_OFFLOADING)".
5455 2015-11-23 David Malcolm <dmalcolm@redhat.com>
5458 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5459 for various Objective-C constructs: Class.name syntax,
5460 @selector(), @protocol(), @encode(), and [] message syntax.
5462 2015-11-20 David Malcolm <dmalcolm@redhat.com>
5465 * c-typeck.c (should_suggest_deref_p): New function.
5466 (build_component_ref): Special-case POINTER_TYPE when
5467 generating a "not a structure of union" error message, and
5468 suggest a "->" rather than a ".", providing a fix-it hint.
5470 2015-11-19 David Malcolm <dmalcolm@redhat.com>
5472 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5473 candidate into a new function, find_closest_identifier.
5475 2015-11-19 Marek Polacek <polacek@redhat.com>
5478 * c-typeck.c (parser_build_binary_op): Properly handle
5479 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5481 2015-11-17 David Malcolm <dmalcolm@redhat.com>
5483 * c-parser.c (set_c_expr_source_range): Bulletproof both
5484 overloaded implementations against NULL expr->value.
5485 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5487 (c_parser_unary_expression): Likewise when handling addresses of
5489 (c_parser_postfix_expression): Likewise for statement expressions,
5490 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5491 __builtin_va_arg, and for __builtin_offset_of.
5492 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5493 src_range using the range of the braced initializer.
5494 (c_parser_transaction_expression): Set src_range for "ret" to a
5495 sane pair of values.
5497 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5499 * c-parser.c (c_finish_omp_declare_simd): Look for
5500 "simd" attribute as well. Update error message.
5502 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5504 * c-parser.c (c_parser_omp_declare_target): Adjust.
5506 2015-11-14 Jakub Jelinek <jakub@redhat.com>
5508 * c-typeck.c (c_finish_omp_clauses): Don't mark
5509 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5511 2015-11-14 Marek Polacek <polacek@redhat.com>
5513 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5514 * c-typeck.c: Likewise.
5516 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5518 * c-decl.c (warn_defaults_to): Pass line_table to
5520 * c-errors.c (pedwarn_c99): Likewise.
5521 (pedwarn_c90): Likewise.
5522 * c-parser.c (set_c_expr_source_range): New functions.
5523 (c_token::get_range): New method.
5524 (c_token::get_finish): New method.
5525 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5526 based on the range from the start of the LHS to the end of the
5528 (c_parser_conditional_expression): Likewise, based on the range
5529 from the start of the cond.value to the end of exp2.value.
5530 (c_parser_binary_expression): Call set_c_expr_source_range on
5531 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5532 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5533 based on the cast_loc through to the end of the expr.
5534 (c_parser_unary_expression): Likewise, based on the
5535 op_loc through to the end of op.
5536 (c_parser_sizeof_expression) Likewise, based on the start of the
5537 sizeof token through to either the closing paren or the end of
5539 (c_parser_postfix_expression): Likewise, using the token range,
5540 or from the open paren through to the close paren for
5541 parenthesized expressions.
5542 (c_parser_postfix_expression_after_primary): Likewise, for
5543 various kinds of expression.
5544 * c-tree.h (struct c_expr): Add field "src_range".
5545 (c_expr::get_start): New method.
5546 (c_expr::get_finish): New method.
5547 (set_c_expr_source_range): New decls.
5548 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5549 on ret for prefix unary ops.
5550 (parser_build_binary_op): Likewise, running from the start of
5551 arg1.value through to the end of arg2.value.
5553 2015-11-13 Marek Polacek <polacek@redhat.com>
5556 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5558 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5560 * c-typeck.c: Include spellcheck.h.
5561 (lookup_field_fuzzy_find_candidates): New function.
5562 (lookup_field_fuzzy): New function.
5563 (build_component_ref): If the field was not found, try using
5564 lookup_field_fuzzy and potentially offer a suggestion.
5566 2015-11-12 James Norris <jnorris@codesourcery.com>
5567 Joseph Myers <joseph@codesourcery.com>
5569 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5570 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5571 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5572 and PRAGMA_OMP_CLAUSE_LINK.
5573 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5574 and PRAGMA_OACC_CLAUSE_LINK.
5575 (OACC_DECLARE_CLAUSE_MASK): New definition.
5576 (c_parser_oacc_declare): New function.
5578 2015-11-12 Marek Polacek <polacek@redhat.com>
5581 * c-parser.c (c_parser_for_statement): Reclassify the token in
5584 2015-11-11 Marek Polacek <polacek@redhat.com>
5588 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5589 checking the size of an array.
5591 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
5593 * c-array-notation.c: Remove unused header files.
5594 * c-aux-info.c: Likewise.
5595 * c-convert.c: Likewise.
5596 * c-decl.c: Likewise.
5597 * c-errors.c: Likewise.
5598 * c-lang.c: Likewise.
5599 * c-objc-common.c: Likewise.
5600 * c-parser.c: Likewise.
5601 * c-typeck.c: Likewise.
5602 * gccspec.c: Likewise.
5604 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5605 Cesar Philippidis <cesar@codesourcery.com>
5606 James Norris <jnorris@codesourcery.com>
5607 Julian Brown <julian@codesourcery.com>
5608 Nathan Sidwell <nathan@codesourcery.com>
5610 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5612 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5613 (c_parser_pragma): Parse 'acc routine'.
5614 (OACC_ROUTINE_CLAUSE_MARK): Define.
5615 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5617 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5620 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5621 location of the backward-goto to the start of the loop body.
5623 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5626 * c-parser.c (c_parser_while_statement): Finish the loop before
5627 parsing ahead for misleading indentation.
5628 (c_parser_for_statement): Likewise.
5630 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5632 * c-decl.c (finish_struct): If the structure has reverse storage
5633 order, rewrite the type of array fields with scalar component. Call
5634 maybe_apply_pragma_scalar_storage_order on entry.
5635 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5636 errors on bit-fields and reverse SSO here and not...
5637 (c_mark_addressable): ...here.
5638 (output_init_element): Adjust call to initializer_constant_valid_p.
5639 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5641 2015-11-06 David Malcolm <dmalcolm@redhat.com>
5643 * c-decl.c (warn_defaults_to): Update for change in signature
5644 of diagnostic_set_info.
5645 * c-errors.c (pedwarn_c99): Likewise.
5646 (pedwarn_c90): Likewise.
5647 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5648 for textinfo::set_location.
5650 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5651 Thomas Schwinge <thomas@codesourcery.com>
5652 James Norris <jnorris@codesourcery.com>
5654 * c-parser.c (c_parser_omp_clause_name): Add support for
5655 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5656 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5657 default(none) in OpenACC.
5658 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5660 (c_parser_oacc_clause_tile): New function.
5661 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5662 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5663 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5665 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5666 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5668 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5669 (c_parser_oacc_update): Update the error message for missing clauses.
5670 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5671 and OMP_CLAUSE_INDEPENDENT.
5673 2015-11-05 Marek Polacek <polacek@redhat.com>
5676 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5677 deal with pre-evaluation on invalid types.
5679 2015-11-05 Jakub Jelinek <jakub@redhat.com>
5680 Ilya Verbin <ilya.verbin@intel.com>
5682 * c-parser.c: Include context.h and gimple-expr.h.
5683 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5684 monotonic together with nonmonotonic.
5685 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5686 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5687 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5688 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5689 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5690 expressions on combined target teams before the target.
5691 (c_parser_omp_declare_target): If decl has "omp declare target" or
5692 "omp declare target link" attribute, and cgraph or varpool node already
5693 exists, then set corresponding flags. Call c_finish_omp_clauses
5694 in the parenthesized extended-list syntax case.
5695 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5697 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5698 on OMP_CLAUSE_REDUCTION array sections.
5699 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5700 into the constant offset, or for variable low-bound using
5701 POINTER_PLUS_EXPR. For structure element based array sections use
5702 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5703 (c_finish_omp_clauses): Drop generic_field_head, structure
5704 elements are now always mapped even as array section bases,
5705 diagnose same var in data sharing and mapping clauses. Diagnose if
5706 linear step on declare simd is neither a constant nor a uniform
5707 parameter. Look through POINTER_PLUS_EXPR for array section
5708 reductions. Diagnose the same var or function appearing multiple
5709 times on the same directive. Fix up wording for the to clause if t
5710 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5711 modifier on kinds other than dynamic or guided or nonmonotonic
5712 modifier together with ordered clause.
5714 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5715 Chung-Lin Tang <cltang@codesourcery.com>
5717 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5719 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
5721 * c-array-notation.c: Reorder #include's and remove duplicates.
5722 * c-aux-info.c: Likewise.
5723 * c-convert.c: Likewise.
5724 * c-decl.c: Likewise.
5725 * c-errors.c: Likewise.
5726 * c-lang.c: Likewise.
5727 * c-objc-common.c: Likewise.
5728 * c-parser.c: Likewise.
5729 * c-typeck.c: Likewise.
5731 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
5734 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5735 after calling build_qualified_type.
5737 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5738 Thomas Schwinge <thomas@codesourcery.com>
5739 James Norris <jnorris@codesourcery.com>
5740 Joseph Myers <joseph@codesourcery.com>
5741 Julian Brown <julian@codesourcery.com>
5742 Bernd Schmidt <bschmidt@redhat.com>
5744 * c-parser.c (c_parser_oacc_shape_clause): New.
5745 (c_parser_oacc_simple_clause): New.
5746 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5747 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5749 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5750 James Norris <jnorris@codesourcery.com>
5751 Cesar Philippidis <cesar@codesourcery.com>
5755 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5756 parameters, and handle these. Adjust all users.
5757 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5759 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5761 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5763 (c_finish_omp_construct): Declare function.
5764 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5765 Merge functions into...
5766 (c_finish_omp_construct): ... this new function.
5768 2015-10-22 Richard Biener <rguenther@suse.de>
5770 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5771 before folding a MINUS_EXPR.
5773 2015-10-21 Marek Polacek <polacek@redhat.com>
5776 * c-decl.c (start_function): Warn about vararg functions without
5779 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5781 * c-typeck.c (build_conditional_expr): Use boolean vector
5782 type for vector comparison.
5783 (build_vec_cmp): New.
5784 (build_binary_op): Use build_vec_cmp for comparison.
5786 2015-10-20 Marek Polacek <polacek@redhat.com>
5788 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5790 2015-10-20 Marek Polacek <polacek@redhat.com>
5793 * c-parser.c (c_parser_attributes): Break out of the loop if the
5794 token after an attribute isn't a comma.
5796 2015-10-13 Jakub Jelinek <jakub@redhat.com>
5797 Aldy Hernandez <aldyh@redhat.com>
5799 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5800 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5801 (c_parser_omp_variable_list): Handle structure elements for
5802 map, to and from clauses. Handle array sections in reduction
5803 clause. Formatting fixes.
5804 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5805 if clause modifiers.
5806 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5807 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5808 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5809 c_parser_omp_clause_is_device_ptr): New functions.
5810 (c_parser_omp_clause_ordered): Parse optional parameter.
5811 (c_parser_omp_clause_reduction): Handle array reductions.
5812 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5813 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5815 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5816 (c_parser_omp_clause_depend_sink): New function.
5817 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5818 (c_parser_omp_clause_map): Parse release/delete map kinds and
5819 optional always modifier.
5820 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5821 and c_finish_omp_clauses callers.
5822 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5823 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5824 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5825 (OMP_CRITICAL_CLAUSE_MASK): Define.
5826 (c_parser_omp_critical): Parse critical clauses.
5827 (c_parser_omp_for_loop): Handle doacross loops, adjust
5828 c_finish_omp_for and c_finish_omp_clauses callers.
5829 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5830 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5831 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5832 (c_parser_omp_for): Disallow ordered clause when combined with
5833 distribute. Disallow linear clause when combined with distribute
5834 and not combined with simd.
5835 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5836 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5837 parse clauses and if depend clause is found, don't parse a body.
5838 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5839 Allow target parallel without for after it.
5840 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5841 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5842 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5844 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5845 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5846 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5847 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5849 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5850 defaultmap and is_device_ptr clauses.
5851 (c_parser_omp_target): Parse target parallel and target simd. Set
5852 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5853 and target exit data. Diagnose invalid map kinds.
5854 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5855 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5857 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5859 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5860 (c_parser_omp_taskloop): New function.
5861 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5862 handle PRAGMA_OMP_TASKLOOP.
5863 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5864 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5865 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5866 Add IS_OMP argument, handle structure element bases, diagnose
5867 bitfields, pass IS_OMP recursively, diagnose known zero length
5868 array sections in depend clauses, handle array sections in reduction
5869 clause, diagnose negative length even for pointers.
5870 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5871 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5872 array sections in reduction clause, set
5873 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5874 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5875 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5876 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5878 2015-10-06 Marek Polacek <polacek@redhat.com>
5880 * c-parser.c (c_parser_statement_after_labels): Use
5881 protected_set_expr_location.
5882 (c_parser_omp_clause_num_gangs): Likewise.
5883 (c_parser_omp_clause_num_threads): Likewise.
5884 (c_parser_omp_clause_num_workers): Likewise.
5885 (c_parser_omp_clause_vector_length): Likewise.
5886 (c_parser_omp_clause_num_teams): Likewise.
5887 (c_parser_omp_clause_thread_limit): Likewise.
5888 * c-typeck.c (build_c_cast): Likewise.
5889 (c_cast_expr): Likewise.
5891 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5893 * c-typeck.c (c_tree_equal): Use real_equal instead of
5896 2015-10-04 Jason Merrill <jason@redhat.com>
5898 * c-parser.c (c_lex_one_token): Handle @synchronized.
5899 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5900 can change whether the function is transaction_safe.
5902 2015-10-02 Marek Polacek <polacek@redhat.com>
5905 * c-typeck.c (convert_for_assignment): Use the expansion point
5906 location throughout.
5908 2015-10-02 Marek Polacek <polacek@redhat.com>
5911 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5912 and pass it down to c_parser_if_statement.
5913 (c_parser_else_body): Add CHAIN parameter and pass it down to
5914 c_parser_statement_after_labels.
5915 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5916 duplicated if-else-if conditions.
5918 2015-10-01 Marek Polacek <polacek@redhat.com>
5920 * c-typeck.c (convert_for_assignment): Improve commentary.
5922 2015-09-30 Marek Polacek <polacek@redhat.com>
5925 * c-typeck.c (c_finish_return): Use the expansion point location for
5926 certain "return with value" warnings.
5928 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5930 * c-parser.c (pragma_lex): Add loc argument.
5932 2015-09-15 Marek Polacek <polacek@redhat.com>
5935 * c-decl.c (tag_exists_p): New function.
5936 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5937 struct/union/enum keywords are missing.
5938 * c-tree.h (tag_exists_p): Declare.
5940 2015-09-15 Marek Polacek <polacek@redhat.com>
5942 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5943 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5944 Return NULL_TREE instead of 0.
5945 (lookup_name): Return NULL_TREE instead of 0.
5946 (lookup_name_in_scope): Likewise.
5947 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5948 (parser_xref_tag): Use false instead of 0.
5949 (start_struct): Use true instead of 1.
5950 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5952 2015-09-14 Marek Polacek <polacek@redhat.com>
5954 * c-typeck.c (set_nonincremental_init_from_string): Use
5955 HOST_WIDE_INT_M1U when shifting a negative value.
5957 2015-09-09 Mark Wielaard <mjw@redhat.com>
5959 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5962 2015-09-10 Jakub Jelinek <jakub@redhat.com>
5965 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5966 into OMP_FOR_PRE_BODY rather than before the loop.
5968 2015-09-09 Jakub Jelinek <jakub@redhat.com>
5971 * c-parser.c (c_parser_oacc_all_clauses,
5972 c_parser_omp_all_clauses): Remove invalid clause from
5973 list of clauses even if parser->error is set.
5976 * c-parser.c (c_parser_omp_clause_aligned,
5977 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5979 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5983 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5984 instead of c_parser_unary_expression. If the result is !lvalue_p,
5985 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5987 2015-09-04 Marek Polacek <polacek@redhat.com>
5990 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5992 2015-09-03 Martin Sebor <msebor@redhat.com>
5995 * c-typeck.c (convert_arguments, parser_build_unary_op,
5996 build_conditional_expr, c_cast_expr, convert_for_assignment,
5997 build_binary_op, _objc_common_truthvalue_conversion): Call
5999 (c_decl_implicit): Define.
6001 2015-09-02 Marek Polacek <polacek@redhat.com>
6004 * c-parser.c (c_parser_enum_specifier): Give a better error for
6007 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6009 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6011 2015-08-12 Marek Polacek <polacek@redhat.com>
6013 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6016 2015-08-03 Marek Polacek <polacek@redhat.com>
6019 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6021 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6023 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6025 * c-parser.c (c_parser_if_body): Take token_indent_info
6026 argument. Call warn_for_misleading_indentation even when the
6027 body is a semicolon. Extract token_indent_infos corresponding
6028 to the guard, body and next tokens. Adjust call to
6029 warn_for_misleading_indentation accordingly.
6030 (c_parser_else_body): Likewise.
6031 (c_parser_if_statement): Likewise.
6032 (c_parser_while_statement): Likewise.
6033 (c_parser_for_statement): Likewise.
6035 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6036 Manuel López-Ibáñez <manu@gcc.gnu.org>
6038 * c-decl.c (get_parm_info): Remove static var. Update warning
6041 2015-07-27 Marek Polacek <polacek@redhat.com>
6045 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6047 2015-07-20 Marek Polacek <polacek@redhat.com>
6050 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6051 (build_binary_op): Warn about left shift overflows.
6053 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
6055 * c-array-notation.c: Adjust includes for flags.h changes.
6056 * c-objc-common.c: Likewise.
6058 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
6060 * c-array-notation.c: Adjust includes.
6061 * c-aux-info.c: Likewise.
6062 * c-convert.c: Likewise.
6063 * c-decl.c: Likewise.
6064 * c-errors.c: Likewise.
6065 * c-lang.c: Likewise.
6066 * c-objc-common.c: Likewise.
6067 * c-parser.c: Likewise.
6068 * c-typeck.c: Likewise.
6070 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6073 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6075 2015-06-29 Marek Polacek <polacek@redhat.com>
6078 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6079 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6080 about -Wswitch-bool here.
6081 (do_case): Update c_add_case_label call.
6082 (c_finish_case): Update c_do_switch_warnings call.
6084 2015-06-27 Marek Polacek <polacek@redhat.com>
6086 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6088 2015-06-26 Marek Polacek <polacek@redhat.com>
6090 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6092 * c-typeck.c (array_to_pointer_conversion): Likewise.
6093 (build_unary_op): Likewise.
6094 (c_finish_return): Likewise.
6096 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
6098 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6099 * c-parser.c: Likewise.
6101 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6103 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6104 instead of pointer_hash.
6105 (detect_field_duplicates): Likewise.
6107 2015-06-25 Marek Polacek <polacek@redhat.com>
6109 * c-array-notation.c: Use VAR_P throughout.
6110 * c-decl.c: Likewise.
6111 * c-objc-common.c: Likewise.
6112 * c-parser.c: Likewise.
6113 * c-typeck.c: Likewise.
6115 2015-06-25 Marek Polacek <polacek@redhat.com>
6117 * c-decl.c: Use is_global_var throughout.
6118 * c-parser.c: Likewise.
6119 * c-typeck.c: Likewise.
6121 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
6123 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6124 * c-aux-info.c: Likewise.
6125 * c-convert.c: Likewise.
6126 * c-decl.c: Likewise.
6127 * c-errors.c: Likewise.
6128 * c-lang.c: Likewise.
6129 * c-objc-common.c: Likewise.
6130 * c-parser.c: Likewise.
6131 * c-typeck.c: Likewise.
6133 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
6136 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6139 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6141 * c-decl.c (pop_scope): Register the main translation unit
6142 through the new debug hook.
6144 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
6146 * c-array-notation.c : Adjust include files.
6147 * c-aux-info.c : Likewise.
6148 * c-convert.c : Likewise.
6149 * c-decl.c : Likewise.
6150 * c-errors.c : Likewise.
6151 * c-lang.c : Likewise.
6152 * c-lang.h : Likewise.
6153 * c-objc-common.c : Likewise.
6154 * c-parser.c : Likewise.
6155 * c-typeck.c : Likewise.
6157 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
6159 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6160 immediately clobber it.
6161 (c_write_global_declarations_1): Remove call to
6162 check_global_declaration_1.
6163 (c_write_global_declarations_2): Remove.
6164 (c_write_final_cleanups): Rename from c_write_global_declarations.
6165 Remove call to finalize_compilation_unit.
6166 Remove calls to debugging hooks.
6167 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6168 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6169 * c-tree.h: Remove c_write_global_declarations.
6171 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
6173 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6174 * c-aux-info.c: Likewise.
6175 * c-convert.c: Likewise.
6176 * c-decl.c: Likewise.
6177 * c-errors.c: Likewise.
6178 * c-lang.c: Likewise.
6179 * c-objc-common.c: Likewise.
6180 * c-parser.c: Likewise.
6181 * c-typeck.c: Likewise.
6183 2015-06-04 Marek Polacek <polacek@redhat.com>
6186 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6189 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6191 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6192 Warn for empty struct.
6193 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6195 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6197 * c-decl.c (start_function): Call plugin before parsing.
6198 (finish_function): Call plugin after parsing.
6200 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6203 * c-decl.c (merge_decls): Merge DECL_COMMON.
6205 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
6207 * Make-lang.in (check_gcc_pallelize): Define.
6209 2015-05-22 Marek Polacek <polacek@redhat.com>
6212 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6215 2015-05-21 Marek Polacek <polacek@redhat.com>
6217 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6220 2015-05-20 Marek Polacek <polacek@redhat.com>
6222 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6223 * c-typeck.c: Likewise.
6225 2015-05-19 Marek Polacek <polacek@redhat.com>
6227 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6229 2015-05-19 Jakub Jelinek <jakub@redhat.com>
6232 * c-parser.c (c_parser_omp_for_loop): Don't add
6233 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6234 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6235 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6238 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6240 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
6243 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6246 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6249 2015-05-14 Marek Polacek <polacek@redhat.com>
6253 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6256 2015-05-12 David Malcolm <dmalcolm@redhat.com>
6258 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6259 to add a call to warn_for_misleading_indentation.
6260 (c_parser_else_body): Likewise, adding param "else_loc".
6261 (c_parser_if_statement): Check for misleading indentation.
6262 (c_parser_while_statement): Likewise.
6263 (c_parser_for_statement): Likewise.
6265 2015-05-08 Marek Polacek <polacek@redhat.com>
6268 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6269 (output_init_element): Likewise.
6271 2015-05-07 Marek Polacek <polacek@redhat.com>
6274 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6277 2015-04-30 Marek Polacek <polacek@redhat.com>
6279 * c-typeck.c (set_init_label): Call error_at instead of error and
6282 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6285 * c-typeck.c (c_build_va_arg): Clarify the error message.
6287 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6289 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6290 OMP_STANDALONE_CLAUSES.
6292 2015-04-28 Marek Polacek <polacek@redhat.com>
6294 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6296 2015-04-28 Marek Polacek <polacek@redhat.com>
6299 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6301 2015-04-25 Marek Polacek <polacek@redhat.com>
6304 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6307 2015-04-23 Marek Polacek <polacek@redhat.com>
6310 * c-decl.c (set_labels_context_r): New function.
6311 (store_parm_decls): Call it via walk_tree_without_duplicates.
6312 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6313 instead of create_tmp_var. Build TARGET_EXPR instead of
6315 (build_atomic_assign): Use create_tmp_var_raw instead of
6316 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6318 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6320 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6321 (c_parser_omp_target_update): Add missed %> to error_at ().
6323 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6326 * c-decl.c (c_default_pointer_mode): Remove definition.
6327 * c-tree.h (c_default_pointer_mode): Remove declaration.
6329 2015-03-27 Tobias Burnus <burnus@net-b.de>
6332 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6334 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6335 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6336 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6338 2015-03-19 Jakub Jelinek <jakub@redhat.com>
6340 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6341 attribute for DECL_EXTERNAL VAR_DECLs.
6343 2015-03-11 Jakub Jelinek <jakub@redhat.com>
6345 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6348 2015-03-10 Jakub Jelinek <jakub@redhat.com>
6351 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6352 before preparing arguments to warn_logical_not_parentheses.
6354 2015-03-09 Jakub Jelinek <jakub@redhat.com>
6357 * c-typeck.c (parser_build_binary_op): Don't warn for
6358 !!x == y or !b == y where b is _Bool.
6360 2015-03-09 Marek Polacek <polacek@redhat.com>
6362 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6363 * c-decl.c (grokdeclarator): Likewise.
6364 * c-typeck.c (build_binary_op): Likewise.
6366 2015-02-27 Marek Polacek <polacek@redhat.com>
6369 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6371 2015-02-14 Marek Polacek <polacek@redhat.com>
6374 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6375 declared through a typedef name.
6377 2015-02-13 Marek Polacek <polacek@redhat.com>
6380 * c-decl.c (grokdeclarator): Print also the type when giving
6381 the error message about array's incomplete element type.
6383 2015-02-11 Jakub Jelinek <jakub@redhat.com>
6386 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6387 check in the POP macro.
6389 2015-02-09 Marek Polacek <polacek@redhat.com>
6392 * c-typeck.c (process_init_element): Don't always wrap
6393 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6394 initializing a range of elements.
6396 2015-02-04 Jakub Jelinek <jakub@redhat.com>
6400 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6402 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
6404 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6405 processing enum declaration.
6407 2015-01-29 Marek Polacek <polacek@redhat.com>
6410 * c-typeck.c (pop_init_level): If constructor_elements has
6411 exactly one element with integer_zerop value, set constructor_zeroinit
6412 to 1. Remove braces around warning_init call.
6414 2015-01-27 Jakub Jelinek <jakub@redhat.com>
6417 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6418 of FUNCTION_DECLs with error_mark_node.
6420 2015-01-26 Jakub Jelinek <jakub@redhat.com>
6423 * c-typeck.c (convert_arguments): Return -1 if there are
6424 error_args, even if we've diagnosed too many arguments.
6426 2015-01-21 Richard Biener <rguenther@suse.de>
6429 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6430 for builtins the user declared correctly.
6432 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6433 Bernd Schmidt <bernds@codesourcery.com>
6434 Cesar Philippidis <cesar@codesourcery.com>
6435 James Norris <jnorris@codesourcery.com>
6436 Jakub Jelinek <jakub@redhat.com>
6437 Ilmir Usmanov <i.usmanov@samsung.com>
6439 * c-parser.c: Include "gomp-constants.h".
6440 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6441 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6442 Use OMP_CLAUSE_SET_MAP_KIND.
6443 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6444 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6445 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6446 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6447 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6448 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6449 "copyout", "create", "delete", "deviceptr", "gang", "host",
6450 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6451 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6452 "present_or_create", "pcreate", "seq", "self", "vector",
6453 "vector_length", "wait", "worker".
6454 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6455 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6456 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6457 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6458 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6459 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6460 (c_parser_oacc_data_clause_deviceptr)
6461 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6462 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6463 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6464 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6465 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6466 (c_parser_oacc_parallel, c_parser_oacc_update)
6467 (c_parser_oacc_wait): New functions.
6468 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6469 (c_finish_oacc_data): New prototypes.
6470 * c-typeck.c: Include "gomp-constants.h".
6471 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6472 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6473 OMP_CLAUSE_SET_MAP_KIND.
6474 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6475 (c_finish_oacc_data): New functions.
6476 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6477 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6478 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6479 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6480 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6481 GOMP_MAP_FORCE_DEVICEPTR.
6483 2015-01-09 Michael Collison <michael.collison@linaro.org>
6485 * c-array-notation.c: Include hash-set.h, machmode.h,
6486 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6487 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6488 * c-aux-info.c: Ditto.
6489 * c-convert.c: Ditto.
6491 * c-errors.c: Ditto.
6492 * c-lang.c: Dittoxs.
6493 * c-objc-common.c: Ditto.
6494 * c-parser.c: Ditto.
6495 * c-typeck.c: Include hash-set.h, machmode.h,
6496 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6497 fold-const.h, wide-int.h, inchash.h, real.h and
6498 fixed-value.h due to flattening of tree.h.
6500 2015-01-07 Marek Polacek <polacek@redhat.com>
6503 * c-typeck.c (process_init_element): Disallow initialization of
6504 a flexible array member with a string constant if the structure
6507 2015-01-05 Jakub Jelinek <jakub@redhat.com>
6510 * c-typeck.c (convert_for_assignment, c_finish_return): For
6511 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6512 types also set in_late_binary_op around convert call.
6513 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6514 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6515 result on expr as last argument to ubsan_instrument_float_cast,
6516 if in_late_binary_op, don't use c_save_expr but save_expr.
6518 Update copyright years.
6520 2015-01-05 Marek Polacek <polacek@redhat.com>
6523 * c-typeck.c (build_array_ref): Pass loc down to
6524 warn_array_subscript_with_type_char.
6526 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
6528 * c-typeck.c: New behavious for pointers to arrays with qualifiers
6529 (common-pointer-type): For pointers to arrays take qualifiers from
6531 (build_conditional_expr): Add warnings for lost qualifiers.
6532 (comp-target-types): Allow pointers to arrays with different qualifiers.
6533 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
6534 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
6535 to PEDWARN_FOR_QUALIFIERS.
6537 2014-12-17 Jakub Jelinek <jakub@redhat.com>
6540 * c-convert.c: Include ubsan.h.
6541 (convert): For real -> integral casts and
6542 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6543 instead instrument the float cast directly.
6545 2014-11-29 Jakub Jelinek <jakub@redhat.com>
6547 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6548 c_finish_stmt_expr): Remove NULL last argument from
6549 create_tmp_var_raw and create_tmp_var calls.
6550 * c-array-notation.c (fix_builtin_array_notation_fn,
6551 build_array_notation_expr, fix_conditional_array_notations_1,
6552 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6554 2014-11-28 Marek Polacek <polacek@redhat.com>
6557 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6558 convert the right operand to integer type.
6560 2014-11-25 Marek Polacek <polacek@redhat.com>
6563 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6564 for inline functions.
6566 2014-11-21 Jakub Jelinek <jakub@redhat.com>
6569 * c-typeck.c (build_array_ref): Adjust
6570 convert_vector_to_pointer_for_subscript caller. If it returns true,
6571 call non_lvalue_loc on the result.
6573 2014-11-11 Richard Biener <rguenther@suse.de>
6575 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6578 2014-11-10 Andi Kleen <ak@linux.intel.com>
6581 * c-parser.c (c_parser_statement_after_labels): Call
6583 (c_parser_if_statement): Dito.
6584 (c_parser_switch_statement): Dito.
6585 (c_parser_while_statement): Dito.
6586 (c_parser_do_statement): Dito.
6587 (c_parser_for_statement): Dito.
6588 * c-typeck.c (c_finish_loop): Dito.
6590 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6592 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6593 OPT_Wshift_count_overflow in the warnings.
6595 2014-10-30 Marek Polacek <polacek@redhat.com>
6597 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6598 print the stripped version as well, if they're not the same.
6600 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6602 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6605 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
6607 * c-decl.c: Adjust include files.
6608 * c-parser.c: Ditto.
6610 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6611 Tom Tromey <tromey@redhat.com>
6613 * c-tree.h (enum c_oracle_request): New.
6614 (c_binding_oracle_function): New typedef.
6615 (c_binding_oracle, c_pushtag, c_bind): Declare.
6616 * c-decl.c (c_binding_oracle): New global.
6617 (I_SYMBOL_CHECKED): New macro.
6618 (i_symbol_binding): New function.
6619 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6620 (I_TAG_CHECKED): New macro.
6621 (i_tag_binding): New function.
6622 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6623 (I_LABEL_CHECKED): New macro.
6624 (i_label_binding): New function.
6625 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6626 (c_print_identifier): Save and restore c_binding_oracle.
6627 (c_pushtag, c_bind): New functions.
6629 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
6631 * c-typeck.c: Adjust include files.
6633 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6636 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6637 initialization here...
6638 (c_initialize_diagnostics): ... but here. Set defaults after
6639 building pretty-printer.
6641 2014-10-23 Marek Polacek <polacek@redhat.com>
6644 * c-decl.c (pop_scope): Don't print warning in external_scope.
6646 2014-10-19 Marek Polacek <polacek@redhat.com>
6649 * c-typeck.c (output_init_element): Allow initializing objects with
6650 static storage duration with compound literals even in C99 and add
6653 2014-10-17 Marek Polacek <polacek@redhat.com>
6656 * c-typeck.c (digest_init): Allow initializing objects with static
6657 storage duration with compound literals even in C99 and add pedwarn
6660 2014-10-17 Marek Polacek <polacek@redhat.com>
6663 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6664 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6665 error multiple times. Print the type.
6667 2014-10-17 Marek Polacek <polacek@redhat.com>
6670 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6673 2014-10-17 Marek Polacek <polacek@redhat.com>
6675 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6676 (start_function): Use OPT_Wimplicit_int instead of 0.
6677 (store_parm_decls_oldstyle): Likewise.
6679 2014-10-17 Alan Modra <amodra@gmail.com>
6682 * c-decl.c (merge_decls): Don't merge section name or tls model
6683 to newdecl symtab node, instead merge to olddecl. Override
6684 existing olddecl section name. Set tls_model for all thread-local
6685 vars, not just OMP thread-private ones. Remove incorrect comment.
6687 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
6689 * c-decl.c: Adjust include files.
6691 2014-10-14 DJ Delorie <dj@redhat.com>
6693 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6694 (c_token_starts_typename): Check all __intN, not just __int128.
6695 (c_token_starts_declspecs): Likewise.
6696 (c_parser_declspecs): Likewise.
6697 (c_parser_attribute_any_word): Likewise.
6698 (c_parser_objc_selector): Likewise.
6699 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6700 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6702 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6704 (finish_declspecs): Likewise.
6706 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6708 * c-parser.c (c_parser_all_labels): New function to replace
6710 (c_parser_statement): Call the new function.
6712 2014-10-09 Marek Polacek <polacek@redhat.com>
6715 * c-typeck.c (pop_init_level): Don't warn about initializing
6718 2014-10-07 Marek Polacek <polacek@redhat.com>
6721 * c-decl.c (header_for_builtin_fn): New function.
6722 (implicitly_declare): Suggest which header to include.
6724 2014-10-07 Marek Polacek <polacek@redhat.com>
6726 * c-convert.c (convert): Use error_operand_p.
6727 * c-typeck.c (require_complete_type): Likewise.
6728 (really_atomic_lvalue): Likewise.
6729 (digest_init): Likewise.
6730 (handle_omp_array_sections_1): Likewise.
6732 2014-10-03 Marek Polacek <polacek@redhat.com>
6735 * c-decl.c (pop_scope): Don't warn about "inline function declared
6736 but never defined" for functions marked with gnu_inline attribute.
6738 2014-09-25 Jakub Jelinek <jakub@redhat.com>
6741 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6742 on low_bound and length.
6744 2014-09-24 Marek Polacek <polacek@redhat.com>
6748 * c-parser.c: Don't define CPP_KEYWORD.
6749 (c_parser_switch_statement): Pass original type to c_finish_case.
6750 * c-tree.h (c_finish_case): Update declaration.
6751 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6752 conditionally to c_do_switch_warnings.
6754 2014-09-03 Marek Polacek <polacek@redhat.com>
6757 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6760 2014-09-02 Jakub Jelinek <jakub@redhat.com>
6761 Balaji V. Iyer <balaji.v.iyer@intel.com>
6762 Igor Zamyatin <igor.zamyatin@intel.com>
6764 * c-parser.c (c_parser_cilk_for): New function.
6765 (c_parser_cilk_grainsize): Likewise.
6766 (c_get_temp_regvar): Likewise.
6767 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6768 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6769 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6770 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6773 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6775 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6776 with using HOST_WIDE_INT without truncation to 'int'
6778 2014-08-22 Marek Polacek <polacek@redhat.com>
6781 * c-typeck.c (parser_build_binary_op): Adjust call to
6782 warn_logical_not_parentheses.
6784 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6787 * c-parser.c (c_parser_array_notation): Check for correct
6788 type of an array added.
6790 2014-08-19 Marek Polacek <polacek@redhat.com>
6793 * c-typeck.c (build_binary_op): If either operand of a comparison
6794 is a boolean expression, call maybe_warn_bool_compare.
6796 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6799 * c-typeck.c (build_c_cast): Do a conversion even when the
6800 TYPE_MAIN_VARIANTs are the same.
6802 2014-08-19 Marek Polacek <polacek@redhat.com>
6804 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6805 pedwarn_c99 instead of pedwarn.
6806 (grokfield): Likewise.
6807 (warn_defaults_to): New function.
6808 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6809 Unconditionally call pedwarn_c99 instead of pedwarn.
6810 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6811 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6812 check flag_isoc11 before.
6813 * c-errors.c (pedwarn_c99): Change the return type to bool.
6814 Handle -Wc99-c11-compat.
6815 * c-parser.c (disable_extension_diagnostics): Handle
6816 warn_c99_c11_compat.
6817 (restore_extension_diagnostics): Likewise.
6818 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6819 instead of pedwarn, don't check flag_isoc11 before.
6820 (c_parser_declspecs): Likewise.
6821 (c_parser_alignas_specifier): Likewise.
6822 (c_parser_alignof_expression): Likewise.
6823 (c_parser_generic_selection): Likewise.
6824 * c-tree.h (pedwarn_c99): Update declaration.
6825 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6828 2014-08-19 Marek Polacek <polacek@redhat.com>
6830 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6832 * c-errors.c: Include "opts.h".
6833 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6834 * c-parser.c (disable_extension_diagnostics): Handle negative value
6835 of warn_c90_c99_compat, too.
6836 (restore_extension_diagnostics): Likewise.
6837 (c_parser_compound_statement_nostart): Pass
6838 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6840 2014-08-12 Marek Polacek <polacek@redhat.com>
6842 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6844 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6846 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6848 2014-08-10 Marek Polacek <polacek@redhat.com>
6851 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6852 Call pedwarn_c90 instead of pedwarn.
6853 (check_bitfield_type_and_width): Likewise.
6854 (declspecs_add_qual): Likewise.
6855 (declspecs_add_type): Likewise.
6856 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6857 Adjust to only call pedwarn_c90.
6858 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6859 pedwarn_c90 instead of pedwarn.
6860 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6861 * c-parser.c (disable_extension_diagnostics): Handle
6862 warn_c90_c99_compat.
6863 (restore_extension_diagnostics): Likewise.
6864 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6865 pedwarn_c90 instead of pedwarn.
6866 (c_parser_initelt): Likewise.
6867 (c_parser_postfix_expression): Likewise.
6868 (c_parser_postfix_expression_after_paren_type): Likewise.
6869 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6870 * c-tree.h: Fix formatting.
6871 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6872 pedwarn_c90 instead of pedwarn.
6874 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6876 * c-typeck.c: Remove include of pointer-set.h.
6878 2014-08-07 Marek Polacek <polacek@redhat.com>
6880 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6882 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6884 * c-typeck.c: Use hash_map instead of pointer_map.
6886 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6888 * c-decl.c: Use hash_set instead of pointer_set.
6890 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6893 * c-array-notation.c (expand_array_notations): Handling
6896 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
6899 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6902 2014-07-30 Tom Tromey <tromey@redhat.com>
6904 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6906 (really_start_incremental_init, push_init_level): Initialize
6908 (pop_init_level): Set global designator_depth.
6909 (process_init_element): Check for designated_init attribute.
6911 2014-07-20 Marek Polacek <polacek@redhat.com>
6914 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6915 (implicitly_declare): Pass location to implicit_decl_warning.
6917 2014-07-14 Jakub Jelinek <jakub@redhat.com>
6920 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6921 If non-NULL, call c_parser_check_literal_zero.
6922 (c_parser_check_literal_zero): New function.
6923 (c_parser_postfix_expression_after_primary): Adjust
6924 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6926 2014-07-06 Marek Polacek <polacek@redhat.com>
6929 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6930 * c-tree.h (C_ARRAY_PARAMETER): Define.
6931 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6934 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
6935 Chen Gang <gang.chen.5i5j@gmail.com>
6937 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6940 2014-07-01 Marek Polacek <polacek@redhat.com>
6942 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6943 instead of 0 to WARN_FOR_ASSIGNMENT.
6945 2014-07-01 Marek Polacek <polacek@redhat.com>
6948 * c-typeck.c (convert_for_assignment): Pass
6949 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6951 2014-06-30 Marek Polacek <polacek@redhat.com>
6953 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6954 has no_sanitize_undefined attribute.
6956 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6959 * c-array-notation.c (fix_builtin_array_notation_fn):
6960 Check for 0 arguments in builtin call. Check that bultin argument is
6962 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6965 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6967 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6968 qualifiers in __auto_type for atomic types.
6969 (c_parser_typeof_specifier): Discard all type qualifiers in
6970 __typeof__ for atomic types.
6972 2014-06-25 Marek Polacek <polacek@redhat.com>
6975 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6976 the return expression to c_finish_return.
6978 2014-06-25 Jakub Jelinek <jakub@redhat.com>
6980 * c-typeck.c (c_finish_omp_clauses): Make sure
6981 OMP_CLAUSE_LINEAR_STEP has correct type.
6983 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6987 2014-06-24 Jakub Jelinek <jakub@redhat.com>
6989 * c-parser.c (c_parser_omp_for_loop): For
6990 #pragma omp parallel for simd move lastprivate clause from parallel
6991 to for rather than simd.
6993 2014-06-23 Marek Polacek <polacek@redhat.com>
6995 * c-typeck.c (parser_build_binary_op): Don't call
6996 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6998 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
7000 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7001 * c-decl.c (merge_decls): Likewise.
7003 2014-06-09 Marek Polacek <polacek@redhat.com>
7006 * c-typeck.c (error_init): Call inform instead of error_at.
7007 (pedwarn_init): Call inform instead of pedwarn.
7008 (warning_init): Call inform instead of warning_at.
7010 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
7012 * c-decl.c (merge_decls): Use set_decl_section_name.
7013 (duplicate_decls): Remove node if it exists.
7015 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7018 * c-typeck.c (push_init_level, process_init_element,
7019 pop_init_level): Correct check for zero initialization, move
7020 missing brace warning to respect zero initialization.
7022 2014-06-05 Marek Polacek <polacek@redhat.com>
7025 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7027 2014-06-05 Marek Polacek <polacek@redhat.com>
7030 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
7031 on the left hand side operand of a comparison.
7033 2014-06-05 Marek Polacek <polacek@redhat.com>
7036 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7037 Print note only if the warning was printed.
7039 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7042 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7045 2014-06-03 Marek Polacek <polacek@redhat.com>
7048 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7050 * c-tree.h (c_start_case): Update.
7051 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7052 switch condition has boolean value.
7054 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
7056 * c-decl.c: Include builtins.h.
7057 * c-parser.c: Likewise.
7059 2014-05-27 Marek Polacek <polacek@redhat.com>
7062 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7063 error and warning calls to error_at and warning_at. Pass location of
7064 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7065 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7066 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7068 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7071 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7072 function parameters.
7074 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
7076 * c-decl.c (merge_decls): Preserve symtab node pointers.
7077 (duplicate_decls): Free new decl.
7079 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7081 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7084 * c-parser.c (c_parser_omp_target): Return bool values.
7086 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7088 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7089 num_teams_loc variable to num_thread_limit_loc.
7091 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7093 * c-array-notation.c (expand_array_notations): Use void_node
7094 instead of void_zero_node.
7096 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7098 * c-decl.c (finish_struct): Adjust.
7099 (finish_enum): Likewise.
7101 (record_inline_static): Likewise.
7102 (push_scope): Likewise.
7103 (make_label): Likewise.
7104 (lookup_label_for_goto): Likewise.
7105 (finish_struct): Likewise.
7106 (finish_enum): Likewise.
7107 (store_parm_decls): Likewise.
7108 (c_push_function_context): Likewise.
7109 * c-lang.h: Remove usage of variable_size gty attribute.
7110 * c-parser.c (c_parse_init): Adjust.
7111 (c_parse_file): Likewise.
7113 2014-05-13 Marek Polacek <polacek@redhat.com>
7116 * c-typeck.c (convert_for_assignment): Pass location to
7117 WARN_FOR_ASSIGNMENT instead of input_location.
7119 2014-05-10 Marek Polacek <polacek@redhat.com>
7121 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7122 maybe_warn_string_init.
7123 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7124 maybe_warn_string_init.
7125 * c-tree.h (maybe_warn_string_init): Update declaration.
7126 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7127 Call pedwarn_init with loc instead of with input_location.
7128 (digest_init): Pass init_loc to maybe_warn_string_init.
7129 (pop_init_level): Call pedwarn_init with loc instead of with
7131 (set_init_index): Likewise.
7132 (process_init_element): Likewise.
7134 2014-05-09 Marek Polacek <polacek@redhat.com>
7137 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7138 (c_parser_initelt): Pass location to set_init_label. Pass array index
7139 location to set_init_index.
7140 * c-tree.h (push_init_level): Update declaration.
7141 (pop_init_level): Likewise.
7142 (set_init_index): Likewise.
7143 (set_init_label): Likewise.
7144 * c-typeck.c (error_init): Add location parameter. Call error_at
7146 (digest_init): Pass init_loc to error_init.
7147 (really_start_incremental_init):
7148 (push_init_level): Add location parameter. Pass loc to pop_init_level
7150 (pop_init_level): Likewise.
7151 (set_designator): Add location parameter. Pass loc to pop_init_level,
7152 push_init_level, and error_init.
7153 (set_init_index): Add location parameter. Pass loc to error_init and
7155 (set_init_label): Likewise.
7156 (output_init_element): Pass loc to error_init.
7157 (process_init_element): Pass loc to error_init, pop_init_level,
7158 pedwarn_init, and push_init_level.
7160 2014-05-09 Marek Polacek <polacek@redhat.com>
7163 * c-parser.c (c_parser_attributes): Parse the arguments as an
7164 expression-list if the attribute takes identifier.
7166 2014-05-08 Marek Polacek <polacek@redhat.com>
7169 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7172 2014-05-08 Marek Polacek <polacek@redhat.com>
7175 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7178 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7179 Mike Stump <mikestump@comcast.net>
7180 Richard Sandiford <rdsandiford@googlemail.com>
7182 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7183 (finish_enum): Use wide-int interfaces.
7184 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7185 * c-typeck.c (build_c_cast): Likewise.
7186 (set_nonincremental_init_from_string): Likewise.
7187 (c_tree_equal): Likewise.
7189 2014-05-02 Marek Polacek <polacek@redhat.com>
7192 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7193 Return size_one_node when the type is not complete.
7194 (pointer_diff): Remove comment.
7195 (build_unary_op): Improve error messages.
7197 2014-05-02 Marek Polacek <polacek@redhat.com>
7199 * c-typeck.c (c_finish_return): Separate warning_at calls.
7201 2014-05-02 Marek Polacek <polacek@redhat.com>
7203 * c-tree.h (error_init): Remove declaration.
7204 (pedwarn_init): Likewise.
7205 * c-typeck.c (error_init): Make static and move above.
7206 (pedwarn_init): Likewise.
7207 (warning_init): Move above.
7208 (maybe_warn_string_init): Likewise.
7210 2014-05-01 Jeff Law <law@redhat.com>
7214 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7215 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7218 2014-05-02 Marek Polacek <polacek@redhat.com>
7221 * c-typeck.c (push_init_level): Set constructor_designated to
7222 p->designated for structures.
7224 2014-05-01 Marek Polacek <polacek@redhat.com>
7227 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7228 function-definition has an attribute after the declarator.
7230 2014-05-01 Marek Polacek <polacek@redhat.com>
7233 * c-typeck.c (warning_init): Add location_t parameter. Call
7234 warning_at instead of warning.
7235 (push_init_level): Pass input_location to warning_init.
7236 (add_pending_init): Add location_t parameter. Pass loc to
7238 (set_nonincremental_init): Pass input_location to add_pending_init.
7239 (set_nonincremental_init_from_string): Likewise.
7240 (output_init_element): Pass loc to warning_init and to
7243 2014-05-01 Marek Polacek <polacek@redhat.com>
7246 * c-typeck.c (c_finish_return): Distinguish between label and variable
7247 when warning about returning local address.
7249 2014-05-01 Marek Polacek <polacek@redhat.com>
7252 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7255 2014-05-01 Marek Polacek <polacek@redhat.com>
7258 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7259 instead of 0 to WARN_FOR_QUALIFIERS.
7261 2014-05-01 Marek Polacek <polacek@redhat.com>
7264 * c-typeck.c (default_conversion): Use better location for
7267 2014-04-30 Marek Polacek <polacek@redhat.com>
7269 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7270 also when SANITIZE_FLOAT_DIVIDE is on.
7272 2014-04-30 Marek Polacek <polacek@redhat.com>
7275 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7276 and pedwarn_init. Use loc insted of input_location.
7278 2014-04-30 Marek Polacek <polacek@redhat.com>
7281 * c-typeck.c (build_binary_op): Use location when warning about
7284 2014-04-25 Marek Polacek <polacek@redhat.com>
7287 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7288 always_inline/noinline and hot/cold attributes.
7290 2014-04-25 Marek Polacek <polacek@redhat.com>
7293 * c-parser.c (c_parser_initelt): Pass input_location to
7294 process_init_element.
7295 (c_parser_initval): Pass loc to process_init_element.
7296 * c-tree.h (process_init_element): Adjust declaration.
7297 * c-typeck.c (push_init_level): Pass input_location to
7298 process_init_element.
7299 (pop_init_level): Likewise.
7300 (set_designator): Likewise.
7301 (output_init_element): Add location_t parameter. Pass loc to
7303 (output_pending_init_elements): Pass input_location to
7304 output_init_element.
7305 (process_init_element): Add location_t parameter. Pass loc to
7306 output_init_element.
7308 2014-04-24 Jakub Jelinek <jakub@redhat.com>
7310 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7311 atomic-clause, allow comma in between atomic-clause and
7314 2014-04-22 Jakub Jelinek <jakub@redhat.com>
7317 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7318 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7320 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7323 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7324 create_tmp_var instead build_decl for creating temps.
7325 (build_array_notation_expr): Likewise.
7326 (fix_conditional_array_notations_1): Likewise.
7327 (fix_array_notation_expr): Likewise.
7328 (fix_array_notation_call_expr): Likewise.
7330 2014-03-28 Jakub Jelinek <jakub@redhat.com>
7333 * c-tree.h (c_build_function_call_vec): New prototype.
7334 * c-typeck.c (build_function_call_vec): Don't call
7335 resolve_overloaded_builtin here.
7336 (c_build_function_call_vec): New wrapper function around
7337 build_function_call_vec. Call resolve_overloaded_builtin here.
7338 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7339 Call c_build_function_call_vec instead of build_function_call_vec.
7340 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7341 * c-decl.c (finish_decl): Likewise.
7343 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7346 * c-typeck.c: Use correct format string in cast-qual warning
7348 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7350 * c-decl.c (c_decl_attributes): Use
7351 lang_hooks.types.omp_mappable_type.
7352 * c-typeck.c (c_finish_omp_clauses): Likewise.
7354 2014-03-06 Marek Polacek <polacek@redhat.com>
7357 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7358 of checking tree code.
7360 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7362 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7363 (c_parser_parameter_declaration): Likewise.
7365 2014-02-19 Marek Polacek <polacek@redhat.com>
7368 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7369 Call mark_exp_read on exp.value.
7370 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7371 TREE_ADDRESSABLE on old instead of val.
7372 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7374 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7376 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7377 C_EXPR_APPEND by vec_safe_push.
7378 * c-tree.h (C_EXPR_APPEND): Remove.
7380 2014-01-31 Marek Polacek <polacek@redhat.com>
7383 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7384 build_function_call_vec.
7385 (build_function_call): Likewise.
7386 (build_atomic_assign): Likewise.
7387 (build_function_call_vec): Add arg_loc parameter. Use it.
7388 (convert_arguments): Likewise.
7389 (convert_for_assignment): Rename rhs_loc to expr_loc.
7390 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7391 (c_parser_objc_keywordexpr): Likewise.
7392 (c_parser_postfix_expression_after_primary): Call
7393 build_function_call_vec with expr_loc rather than op_loc.
7394 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7395 build_function_call_vec.
7396 (c_parser_expr_list): Add locations parameter. Fill it with locations
7397 of function arguments.
7398 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7400 2014-01-30 Marek Polacek <polacek@redhat.com>
7403 * c-typeck.c (build_function_call_vec): Use loc parameter.
7404 (convert_arguments): Add location parameter. Use it.
7405 (ep_convert_and_check): Likewise.
7406 (build_atomic_assign): Adjust convert_for_assignment call.
7407 (build_modify_expr): Likewise.
7408 (digest_init): Likewise.
7409 (c_finish_return): Likewise.
7410 (build_conditional_expr): Adjust ep_convert_and_check calls.
7411 (convert_for_assignment): Add rhs_loc parameter. Use it.
7412 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7415 2014-01-30 Richard Biener <rguenther@suse.de>
7418 * c-typeck.c (build_function_call_vec): Do not replace calls
7419 to a function via an incompatible type with a runtime abort.
7421 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7423 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7424 flag_enable_cilkplus with flag_cilkplus.
7425 (c_parser_direct_declarator_inner): Likewise.
7426 (c_parser_attribute_any_word): Likewise.
7427 (c_parser_attributes): Likewise.
7428 (c_parser_compound_statement): Likewise.
7429 (c_parser_statement_after_labels): Likewise.
7430 (c_parser_if_statement): Likewise.
7431 (c_parser_switch_statement): Likewise.
7432 (c_parser_do_statement): Likewise.
7433 (c_parser_for_statement): Likewise.
7434 (c_parser_unary_expression): Likewise.
7435 (c_parser_postfix_expression): Likewise.
7436 (c_parser_postfix_expression_after_primary): Likewise.
7437 (c_parser_postfix_expression_after_primary): Likewise.
7438 (c_parser_omp_clause_name): Likewise.
7439 (c_finish_omp_declare_simd): Likewise.
7440 (c_parser_cilk_verify_simd): Likewise.
7441 * c-typeck.c (build_array_ref): Likewise.
7442 (build_function_call_vec): Likewise.
7443 (convert_arguments): Likewise.
7444 (build_compound_expr): Likewise.
7445 (c_finish_return): Likewise.
7446 (c_finish_if_stmt): Likewise.
7447 (c_finish_loop): Likewise.
7448 (build_binary_op): Likewise.
7450 2014-01-23 Marek Polacek <polacek@redhat.com>
7453 * c-typeck.c (parser_build_binary_op): Use location instead of
7455 (build_binary_op): Pass location to shorten_compare.
7457 2014-01-23 Marek Polacek <polacek@redhat.com>
7460 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7463 2014-01-23 Marek Polacek <polacek@redhat.com>
7466 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7467 of a comma expression.
7468 (emit_side_effect_warnings): Likewise.
7470 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7473 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7474 function to use walk_tree and moved a lot of its functionality to
7475 expand_array_notations.
7476 (expand_array_notations): New function.
7478 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7480 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7481 attribute an attribute without value.
7483 2014-01-23 Jakub Jelinek <jakub@redhat.com>
7486 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7487 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7489 2014-01-22 Marek Polacek <polacek@redhat.com>
7492 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7493 of remove_c_maybe_const_expr on op1 and op2.
7495 2014-01-15 Jakub Jelinek <jakub@redhat.com>
7498 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7499 effects, preevaluate rhs using SAVE_EXPR first.
7501 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7504 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7505 statements with if-elseif statements.
7507 2014-01-06 Marek Polacek <polacek@redhat.com>
7510 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7511 defined bit-field types only in ISO C.
7513 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7515 Update copyright years
7517 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7519 * c-array-notation.c: Use the standard form for the copyright notice.
7521 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7523 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7524 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7525 field in parser is not empty. If not-empty, call the function
7526 c_parser_finish_omp_declare_simd.
7527 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7528 between SIMD-enabled functions and #pragma simd. Added new parameter.
7529 (c_parser_cilk_all_clauses): Modified the usage of the function
7530 c_parser_cilk_clause_vectorlength as mentioned above.
7531 (c_parser_cilk_simd_fn_vector_attrs): New function.
7532 (c_finish_cilk_simd_fn_tokens): Likewise.
7533 (is_cilkplus_vector_p): Likewise.
7534 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7535 "nomask," and "mask" strings in clause name.
7536 (c_parser_omp_all_clauses): Added 3 new case statements:
7537 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7538 PRAGMA_CILK_CLAUSE_NOMASK.
7539 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7540 check for vector attribute and if so call the function
7541 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7542 called the function c_finish_cilk_simd_fn_tokens.
7543 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7544 parser field is non-empty. If so, parse them as you would parse
7545 the omp declare simd pragma.
7546 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7547 Added a check when step is a parameter and flag it as error.
7548 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7549 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7552 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7554 * c-parser.c (c_parser_omp_parallel): Fix description.
7556 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7558 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7559 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7560 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7561 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7563 2013-12-04 Joseph Myers <joseph@codesourcery.com>
7566 * c-parser.c (c_parser_alignas_specifier): Use
7567 c_sizeof_or_alignof_type instead of c_alignof.
7568 (c_parser_alignof_expression): Likewise, with min_alignof
7569 parameter depending on alignof spelling used.
7571 2013-12-04 Marek Polacek <polacek@redhat.com>
7574 * c-decl.c (start_function): Don't warn for missing prototype for
7577 2013-12-03 Marek Polacek <polacek@redhat.com>
7580 * c-decl.c (build_compound_literal): Allow compound literals with
7581 empty initial value.
7583 2013-12-02 Joseph Myers <joseph@codesourcery.com>
7586 * c-typeck.c (build_modify_expr): Diagnose assignment to
7587 expression with array type.
7589 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7592 * c-typeck.c (process_init_element): Do not treat a string as
7593 initializing a whole array when used with a designator for an
7596 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7599 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7600 an inline function following a static declaration.
7602 2013-11-28 Jakub Jelinek <jakub@redhat.com>
7605 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7606 to p_name before calling c_parser_omp_teams instead of after.
7607 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7608 argument. Remove unused p_name variable.
7610 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
7611 Jakub Jelinek <jakub@redhat.com>
7613 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7614 external_scope is NULL.
7616 2013-11-27 Tom de Vries <tom@codesourcery.com>
7617 Marc Glisse <marc.glisse@inria.fr>
7620 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7622 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
7624 * c-typeck.c: Add required include files from gimple.h.
7626 2013-11-22 David Malcolm <dmalcolm@redhat.com>
7628 * c-decl.c (define_label, shadow_tag_warned)
7629 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7630 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7631 (declspecs_add_type): Remove use of in_system_header macro.
7632 * c-parser.c (c_parser_unary_expression): Likewise.
7633 * c-typeck.c (store_init_value, process_init_element)
7634 (c_start_case): Likewise.
7636 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7639 * c-parser.c (c_parser_set_source_position_from_token): Remove
7640 reference to in_system_header from comment.
7642 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7644 * c-decl.c (grokdeclarator): Update comment to refer to
7645 tree_to_[su]hwi rather than tree_low_cst.
7647 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7649 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7650 tree_to_uhwi throughout.
7652 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7654 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7657 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7659 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7662 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
7664 * c-parser.c (c_parser_cilk_simd): New.
7665 (c_parser_cilk_verify_simd): New.
7666 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7667 (c_parser_omp_for_loop): Add case for NE_EXPR.
7668 Set c_break_label for CILK_SIMD.
7669 (c_parser_cilk_clause_vectorlength): New.
7670 (c_parser_cilk_clause_linear): New.
7671 (c_parser_cilk_clause_name): New.
7672 (c_parser_cilk_all_clauses): New.
7673 * c-typeck.c (build_unary_op): Pass location argument to
7675 (build_modify_expr): Same.
7676 (build_asm_expr): Same.
7677 (c_finish_bc_stmt): Error on break/continue in loops.
7679 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
7681 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7683 2013-11-14 Diego Novillo <dnovillo@google.com>
7685 * c-decl.c: Include print-tree.h.
7686 Include stor-layout.h.
7689 Include stringpool.h.
7690 * c-lang.c: Include fold-const.h.
7691 * c-parser.c: Include stringpool.h.
7693 Include stor-layout.h.
7695 Include trans-mem.h.
7696 * c-typeck.c: Include stor-layout.h.
7697 Include trans-mem.h.
7701 2013-11-13 Joseph Myers <joseph@codesourcery.com>
7703 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7704 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7706 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7707 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7709 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7710 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7711 (c_parser_declarator, c_parser_direct_declarator_inner)
7712 (c_parser_parameter_declaration, c_parser_type_name): All callers
7714 (c_parser_declaration_or_fndef): Handle declarations with type
7715 determined from the initializer.
7717 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
7719 * c-typeck.c: Include gimplify.h.
7721 2013-11-12 Joseph Myers <joseph@codesourcery.com>
7723 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7724 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7726 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7727 or _Thread_local as appropriate in diagnostics.
7728 (build_null_declspecs): Initialize ret->thread_gnu_p.
7729 (declspecs_add_scspec): Handle either __thread or _Thread_local
7730 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7731 pedantic. Do not disallow _Thread_local extern and _Thread_local
7734 2013-11-07 Joseph Myers <joseph@codesourcery.com>
7735 Andrew MacLeod <amacleod@redhat.com>
7737 * c-aux-info.c (gen_type): Handle atomic qualifier.
7738 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7739 qualifiers when compating types.
7740 (shadow_tag_warned): Handle atomic_p in declspecs.
7741 (quals_from_declspecs): Likewise.
7742 (start_decl): Use c_type_promotes_to when promoting argument
7744 (grokdeclarator): Handle _Atomic.
7745 (get_parm_info): Diagnose any qualifier on "void" as only
7747 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7748 comparing types. Use c_type_promotes_to when promoting argument
7750 (finish_function): Use c_type_promotes_to when promoting argument
7752 (build_null_declspecs): Handle atomic_p in declspecs.
7753 (declspecs_add_qual): Handle RID_ATOMIC.
7754 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7755 (c_token_starts_declspecs): Handle RID_ATOMIC.
7756 (c_parser_declspecs): Handle atomic type specifiers and
7758 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7759 from types of expressions with atomic type.
7760 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7761 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7762 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7763 (c_parser_statement_after_labels, c_parser_switch_statement)
7764 (c_parser_for_statement, c_parser_expr_no_commas)
7765 (c_parser_conditional_expression, c_parser_binary_expression)
7766 (c_parser_cast_expression, c_parser_unary_expression)
7767 (c_parser_postfix_expression)
7768 (c_parser_postfix_expression_after_primary, c_parser_expression):
7769 Use convert_lvalue_to_rvalue.
7770 (c_parser_expression_conv, c_parser_expr_list): Document
7771 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7772 (c_parser_objc_synchronized_statement): Use
7773 convert_lvalue_to_rvalue.
7774 (c_parser_objc_selector): Handle RID_ATOMIC.
7775 (c_parser_objc_receiver, c_parser_array_notation): Use
7776 convert_lvalue_to_rvalue.
7777 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7778 _Atomic (type-name).
7779 (struct c_declspecs): Add atomic_p field.
7780 (convert_lvalue_to_rvalue): Declare.
7781 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7782 corresponding atomic types.
7783 (qualify_type): Don't add _Atomic qualifiers from second argument.
7784 (comp_target_types): Do not allow _Atomic mismatches.
7785 (type_lists_compatible_p): Do not remove atomic qualifiers when
7787 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7788 (build_atomic_assign): New functions.
7789 (build_unary_op): Use build_atomic_assign for atomic increment and
7791 (build_conditional_expr): Do not treat _Atomic void as a qualified
7793 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7794 (find_anonymous_field_with_type, convert_to_anonymous_field)
7795 (convert_for_assignment): Do not remove atomic qualifiers when
7797 (digest_init): Do not accept initialization of arrays of atomic
7798 elements by string constants.
7799 (build_asm_expr): Use convert_lvalue_to_rvalue.
7800 (build_binary_op): Do not treat _Atomic void as a qualified
7803 2013-11-06 DJ Delorie <dj@redhat.com>
7805 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7806 both explicit and builtin, print the location of the explicit one.
7808 2013-11-05 Tobias Burnus <burnus@net-b.de>
7810 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7811 c_parser_omp_distribute, c_parser_omp_teams,
7812 c_parser_omp_target, c_parser_omp_declare): Handle
7815 2013-11-03 Marek Polacek <polacek@redhat.com>
7817 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7819 2013-11-01 Jakub Jelinek <jakub@redhat.com>
7821 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7822 check_dup_generic at the end, unless remove is true.
7823 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7825 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7827 2013-10-31 Jakub Jelinek <jakub@redhat.com>
7829 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7830 with decl that is not pointer nor array.
7832 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7834 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7835 a spawning function is found.
7836 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7837 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7838 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7839 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7841 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7842 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7844 (c_finish_return): Added a check to reject _Cilk_spawn in return
7846 (build_cilk_spawn): New function.
7847 (build_cilk_sync): Likewise.
7848 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
7850 2013-10-27 Tobias Burnus <burnus@net-b.de>
7853 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7854 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7855 (c_parser_statement_after_labels): Update calls.
7857 2013-10-24 Tobias Burnus <burnus@net-b.de>
7860 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7861 Handle PRAGMA_IVDEP.
7862 (c_parser_statement_after_labels): Update call.
7864 2013-10-24 Marek Polacek <polacek@redhat.com>
7866 * c-parser.c (c_parser_struct_declaration): Add a comment.
7867 (c_parser_declarator): Don't allow _Alignas here.
7869 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
7871 * c-parser.c: Include omp-low.h.
7872 * c-typeck.c: Likewise.
7874 2013-10-17 Marek Polacek <polacek@redhat.com>
7877 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7878 Document syntax of the array-declarator.
7879 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7881 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7882 (c_parser_struct_declaration): Likewise.
7883 (c_parser_declarator): Likewise.
7884 (c_parser_direct_declarator_inner): Likewise.
7885 (c_parser_parameter_declaration): Likewise.
7886 (c_parser_type_name): Likewise.
7888 2013-10-11 Jakub Jelinek <jakub@redhat.com>
7890 * c-lang.h (current_omp_declare_target_attribute): New extern
7892 * c-parser.c: Include c-lang.h.
7893 (struct c_parser): Change tokens to c_token *.
7894 Add tokens_buf field. Change tokens_avail type to unsigned int.
7895 (c_parser_consume_token): If parser->tokens isn't
7896 &parser->tokens_buf[0], increment parser->tokens.
7897 (c_parser_consume_pragma): Likewise.
7898 (enum pragma_context): Add pragma_struct and pragma_param.
7899 (c_parser_external_declaration): Adjust
7900 c_parser_declaration_or_fndef caller.
7901 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7902 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7903 Adjust recursive call.
7904 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7906 (c_parser_parameter_declaration): Use pragma_param instead of
7908 (c_parser_compound_statement_nostart, c_parser_label,
7909 c_parser_for_statement): Adjust
7910 c_parser_declaration_or_fndef callers.
7911 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7912 it through to c_parser_conditional_expression.
7913 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7914 pass it through to c_parser_binary_expression. Adjust recursive
7916 (c_parser_binary_expression): Remove prec argument, add
7917 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7918 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7919 binop matches it, use build2 instead of parser_build_binary_op.
7920 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7921 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7922 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7923 Handle pragma_struct and pragma_param the same as pragma_external.
7924 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7925 (c_parser_omp_variable_list): Parse array sections for
7926 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7927 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7928 (c_parser_omp_clause_reduction): Handle user defined reductions.
7929 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7930 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7931 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7932 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7933 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7934 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7935 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7936 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7937 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7938 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7939 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7940 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7941 (c_parser_omp_for_loop): Add CODE argument, pass it through
7942 to c_finish_omp_for. Change last argument to cclauses,
7943 and adjust uses to grab parallel clauses from the array of all
7944 the split clauses. Adjust c_parser_binary_expression,
7945 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7946 (omp_split_clauses): New function.
7947 (c_parser_omp_simd): New function.
7948 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7949 Allow the function to be called also when parsing combined constructs,
7950 and call c_parser_omp_simd when parsing for simd.
7951 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7952 #pragma omp section, require exactly one structured-block instead of
7953 sequence of statements.
7954 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7955 Allow the function to be called also when parsing combined constructs.
7956 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7957 Allow the function to be called also when parsing combined
7959 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7960 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7961 c_parser_omp_teams, c_parser_omp_target_data,
7962 c_parser_omp_target_update, c_parser_omp_target,
7963 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7964 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7965 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7966 (c_parser_omp_construct): Add p_name and mask vars. Handle
7967 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7968 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7969 and c_parser_omp_sections callers.
7970 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7971 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7972 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7973 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7974 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7976 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7977 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7978 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7979 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7980 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7981 * c-typeck.c: Include tree-inline.h.
7982 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7983 handle_omp_array_sections_1, handle_omp_array_sections,
7984 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7985 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7986 user defined reductions.
7987 (c_tree_equal): New function.
7988 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7989 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7990 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7991 c_check_omp_declare_reduction_r): New prototypes.
7992 * c-decl.c (current_omp_declare_target_attribute): New variable.
7993 (c_decl_attributes): New function.
7994 (start_decl, start_function): Use it instead of decl_attributes.
7995 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7996 c_omp_reduction_decl, c_omp_reduction_lookup,
7997 c_check_omp_declare_reduction_r): New functions.
7999 2013-09-25 Tom Tromey <tromey@redhat.com>
8001 * Make-lang.in (c/gccspec.o): Remove.
8002 (CFLAGS-c/gccspec.o): New variable.
8003 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8004 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8005 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8007 2013-09-25 Tom Tromey <tromey@redhat.com>
8009 * Make-lang.in (c/gccspec.o): Don't use subshell.
8011 2013-09-18 Marek Polacek <polacek@redhat.com>
8014 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8015 Remove unnecessary check.
8017 2013-09-18 Marek Polacek <polacek@redhat.com>
8020 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8021 no_sanitize_undefined attribute.
8023 2013-09-13 Kai Tietz <ktietz@redhat.com>
8026 * c-decl.c (c_builtin_function_ext_scope): Remove
8027 wrong assumption that it is never called on prexisting
8030 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8032 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8034 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8036 * c-objc-common.c (c_tree_printer): Tidy.
8038 2013-08-30 Marek Polacek <polacek@redhat.com>
8040 * c-typeck.c (build_binary_op): Add division by zero and shift
8043 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
8044 Joseph Myers <joseph@codesourcery.com>
8047 * c-typeck.c (c_common_type): Prefer double_type_node over
8048 other REAL_TYPE types with the same precision.
8049 (convert_arguments): Likewise.
8051 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8053 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8054 (c_initialize_diagnostics): Call a destructor for the early printer.
8056 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8058 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8059 printer initialization.
8061 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
8064 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8065 check for truth values.
8066 (expand_array_notation_exprs): Added truth values case. Removed an
8067 unwanted else. Added for-loop to walk through subtrees in default
8070 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8072 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8074 2013-07-23 Joseph Myers <joseph@codesourcery.com>
8076 * c-parser.c (struct c_generic_association): Fix typo.
8078 2013-07-23 Tom Tromey <tromey@redhat.com>
8079 Joseph Myers <joseph@codesourcery.com>
8081 * c-parser.c (struct c_generic_association): New.
8082 (c_generic_association_d): New typedef.
8083 (c_parser_generic_selection): New function.
8084 (c_parser_postfix_expression): Handle RID_GENERIC.
8086 2013-07-13 Jason Merrill <jason@redhat.com>
8089 * c-decl.c (finish_struct): Check for too-large class.
8091 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
8094 * c-typeck.c (set_init_index): When folding, check for index overflow.
8096 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8098 * c-parser.c (c_parser_array_notation): Removed rejection of array
8099 notations in an array of function pointers.
8101 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8103 * c-array-notation.c (make_triplet_val_inv): New function.
8104 (create_cmp_incr): Likewise.
8105 (create_array_refs): Likewise.
8106 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8107 Also modularized common parts between functions and called the function.
8108 (build_array_notation_expr): Likewise.
8109 (fix_conditional_array_notations_1): Likewise.
8110 (fix_array_notation_expr): Likewise.
8111 (fix_array_notation_call_expr): Likewise.
8113 2013-06-18 Marek Polacek <polacek@redhat.com>
8116 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8118 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8120 * c-array-notation.c (build_array_notation_expr): Reject array notation
8121 mismatch between LHS and RHS even inside a call_expr. Also, removed
8122 a couple while statements that were dead code.
8124 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8126 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8127 excessive precision expressions in function parameters. Also removed
8128 couple unwanted while statements.
8130 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8132 * c-array-notation.c (expand_array_notation_exprs): Added
8133 ARRAY_NOTATION_REF case.
8135 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8137 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8138 function to c-family/array-notation-common.c.
8139 (is_cilkplus_reduce_builtin): Likewise.
8140 (find_rank): Likewise.
8141 (extract_array_notation_exprs): Likewise.
8142 (replace_array_notations): Likewise.
8143 (find_inv_trees): Likewise.
8144 (replace_inv_trees): Likewise.
8145 (contains_array_notation_expr): Likewise.
8146 (find_correct_array_notation_type): Likewise.
8147 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8148 (struct inv_list): Moved this to c-family/array-notation-common.c.
8149 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
8151 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8153 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8154 reduction functions outside the for-loop. Added a check if the fundecl
8155 is non-NULL. Finally, removed an unwanted if-statement, and made the
8158 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8160 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8161 condition of the if-statement matches the rank of else-block and then-
8162 block when array notations are used.
8163 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8164 expression after the entire function body is parsed.
8165 (c_parser_expr_no_commas): Delayed creating array notation expressions
8166 to the end of function parsing.
8167 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8168 whole if-statement instead of just the condition.
8169 (expand_array_notation_exprs): Added MODIFY_EXPR case.
8171 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8174 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8175 array to NULL_TREE if they are unused. Also added a check for the
8176 field to be NULL before its fields are used in future.
8178 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8181 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8182 (build_array_notation_expr): Likewise.
8184 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8186 * c-typeck.c (build_array_ref): Added a check to see if array's
8187 index is greater than one. If true, then emit an error.
8188 (build_function_call_vec): Exclude error reporting and checking
8189 for builtin array-notation functions.
8190 (convert_arguments): Likewise.
8191 (c_finish_return): Added a check for array notations as a return
8192 expression. If true, then emit an error.
8193 (c_finish_loop): Added a check for array notations in a loop
8194 condition. If true then emit an error.
8195 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8196 (build_binary_op): Added a check for array notation expr inside
8197 op1 and op0. If present, we call another function to find correct
8199 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8200 * c-parser.c (c_parser_compound_statement): Check if array
8201 notation code is used in tree, if so, then transform them into
8203 (c_parser_expr_no_commas): Check if array notation is used in LHS
8204 or RHS, if so, then build array notation expression instead of
8206 (c_parser_postfix_expression_after_primary): Added a check for
8207 colon(s) after square braces, if so then handle it like an array
8208 notation. Also, break up array notations in unary op if found.
8209 (c_parser_direct_declarator_inner): Added a check for array
8211 (c_parser_compound_statement): Added a check for array notation in
8212 a stmt. If one is present, then expand array notation expr.
8213 (c_parser_if_statement): Likewise.
8214 (c_parser_switch_statement): Added a check for array notations in
8215 a switch statement's condition. If true, then output an error.
8216 (c_parser_while_statement): Similarly, but for a while.
8217 (c_parser_do_statement): Similarly, but for a do-while.
8218 (c_parser_for_statement): Similarly, but for a for-loop.
8219 (c_parser_unary_expression): Check if array notation is used in a
8220 pre-increment or pre-decrement expression. If true, then expand
8222 (c_parser_array_notation): New function.
8223 * c-array-notation.c: New file.
8224 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
8226 2013-05-23 Mike Stump <mikestump@comcast.net>
8228 * c-typeck.c (convert_for_assignment): Handle references to memory
8231 2013-05-16 Jason Merrill <jason@redhat.com>
8233 * Make-lang.in (cc1$(exeext)): Use link mutex.
8235 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8237 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8238 to simply use OPT_Wpointer_arith.
8239 (build_unary_op): Likewise.
8241 2013-04-03 Jakub Jelinek <jakub@redhat.com>
8244 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8245 argument. If set, or it temporarily for parsing of the first
8246 argument into force_folding_builtin_constant_p.
8247 (c_parser_postfix_expression): Adjust callers.
8249 2013-03-21 Richard Biener <rguenther@suse.de>
8251 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8252 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8254 2013-02-12 Marek Polacek <polacek@redhat.com>
8257 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8260 2013-01-24 Jakub Jelinek <jakub@redhat.com>
8263 * c-typeck.c (set_nonincremental_init_from_string): If
8264 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8266 (process_init_element): Likewise.
8268 2012-12-20 Jakub Jelinek <jakub@redhat.com>
8271 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8272 argument, don't call default_function_array_conversion
8273 nor c_fully_fold here.
8274 (c_parser_asm_statement): Adjust callers.
8275 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8276 and outputs here, and call default_function_array_conversion
8277 on inputs that don't need to be addressable.
8279 2012-12-18 Jakub Jelinek <jakub@redhat.com>
8282 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8283 warning require that both c_common_unsigned_type as well as
8284 c_common_signed_type is the same for both mvl and mvr types.
8286 2012-11-16 Diego Novillo <dnovillo@google.com>
8288 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8290 * c-common.c: Use new vec API in vec.h.
8291 * c-common.h: Likewise.
8292 * c-gimplify.c: Likewise.
8293 * c-pragma.c: Likewise.
8294 * c-pretty-print.c: Likewise.
8295 * c-pretty-print.h: Likewise.
8296 * c-semantics.c: Likewise.
8297 * c-decl.c: Likewise.
8298 * c-parser.c: Likewise.
8299 * c-tree.h: Likewise.
8300 * c-typeck.c: Likewise.
8302 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8305 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8307 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8310 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8311 shadows a function, unless the variable is a function or a
8312 pointer-to-function.
8314 2012-10-12 Jakub Jelinek <jakub@redhat.com>
8317 * c-parser.c (struct c_tree_loc_pair): Removed.
8318 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8319 add location_t * and tree * arguments, fill in array of 3
8320 sizeof_arg trees and corresponding locs.
8321 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8322 c_parser_expr_list callers.
8323 (c_parser_postfix_expression_after_primary): Likewise. Pass
8324 array of 3 sizeof_arg trees and locs (corresponding to first
8325 3 arguments) to sizeof_pointer_memaccess_warning.
8327 2012-10-09 Lawrence Crowl <crowl@google.com>
8329 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8330 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8333 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8336 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8339 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
8342 * c-typeck.c: Include c-common.h.
8343 (enum stv_conv): Moved to c-common.h.
8344 (scalar_to_vector): Moved to c-common.c.
8345 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8346 * Make-lang.in: c-typeck.c depends on c-common.h.
8348 2012-10-04 Arnaud Charlet <charlet@adacore.com>
8350 * c-decl.c (c_write_global_declarations): Fix handling of
8353 2012-09-30 Sharad Singhai <singhai@google.com>
8355 * c-decl.c (c_write_global_declarations): Use a different method
8356 to determine if the dump has ben initialized.
8358 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8361 * c-typeck.c (c_cast_expr): When casting to a type requiring
8362 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8365 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8368 * c-typeck.c (build_unary_op): Pass original argument of
8369 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8370 any C_MAYBE_CONST_EXPR, if it has integer operands.
8371 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8372 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8373 to c_objc_common_truthvalue_conversion, then remove any
8374 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8375 c_objc_common_truthvalue_conversion not
8376 c_common_truthvalue_conversion.
8377 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8378 call note_integer_operands for arguments with integer operands
8379 that are not integer constants.
8381 2012-09-13 Jakub Jelinek <jakub@redhat.com>
8384 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8385 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8387 2012-08-31 Jakub Jelinek <jakub@redhat.com>
8390 * c-convert.c (convert): Don't call fold_convert_loc if
8391 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8392 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8393 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8395 2012-08-24 Jakub Jelinek <jakub@redhat.com>
8398 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8399 for nested and empty_ok arguments in the call to
8400 c_parser_declaration_or_fndef.
8402 2012-08-17 Jakub Jelinek <jakub@redhat.com>
8404 * c-tree.h (c_last_sizeof_arg): Declare.
8405 * c-parser.c (struct c_tree_loc_pair): New type.
8406 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8408 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8409 (c_parser_postfix_expression_after_primary): Likewise. Call
8410 sizeof_pointer_memaccess_warning if needed.
8411 (sizeof_ptr_memacc_comptypes): New function.
8412 * c-typeck.c (c_last_sizeof_arg): New global variable.
8413 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8415 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
8417 * c-lang.h (lang_decl): Add variable_size GTY option.
8419 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8421 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8422 * Make-lang.in: Fix dependencies.
8424 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8426 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8427 and add language Makefile hooks.
8428 * config-lang.in: New file.
8429 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8430 add the required "normal" config-lang.in rules.
8431 * c-lang.h: Moved from gcc/ to here.
8432 * c-tree.h: Likewise.
8433 * c-objc-common.c: Likewise.
8434 * c-objc-common.h: Likewise.
8435 * c-typeck.c: Likewise.
8436 * c-convert.c: Likewise.
8437 * c-lang.c: Likewise.
8438 * c-aux-info.c: Likewise.
8439 * c-errors.c: Likewise.
8440 * gccspec.c: Likewise.
8441 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8442 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8444 Copyright (C) 2012-2022 Free Software Foundation, Inc.
8446 Copying and distribution of this file, with or without modification,
8447 are permitted in any medium without royalty provided the copyright
8448 notice and this notice are preserved.