1 2022-10-20 Richard Biener <rguenther@suse.de>
5 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
6 the parsed IL and zap the body on error.
8 2022-10-18 Joseph Myers <joseph@codesourcery.com>
11 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
12 with previous declaration visible.
14 2022-10-18 Joseph Myers <joseph@codesourcery.com>
17 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
18 convert all to the type of the enumeration. pedwarn if no integer
19 type fits all enumerators and default to
20 widest_integer_literal_type_node in that case. Otherwise pedwarn
21 for type wider than intmax_t.
22 (build_enumerator): pedwarn for enumerators outside the range of
23 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
24 enumerators outside the range of int. On overflow, attempt to
25 find a wider type that can hold the value of the next enumerator.
26 Do not convert value to type determined with
27 c_common_type_for_size.
29 2022-10-14 Jakub Jelinek <jakub@redhat.com>
31 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
34 2022-10-14 Joseph Myers <joseph@codesourcery.com>
36 * c-decl.cc (build_compound_literal): Add parameter scspecs.
37 Handle storage class specifiers.
38 * c-parser.cc (c_token_starts_compound_literal)
39 (c_parser_compound_literal_scspecs): New.
40 (c_parser_postfix_expression_after_paren_type): Add parameter
41 scspecs. Call pedwarn_c11 for use of storage class specifiers.
42 Update call to build_compound_literal.
43 (c_parser_cast_expression, c_parser_sizeof_expression)
44 (c_parser_alignof_expression): Handle storage class specifiers for
45 compound literals. Update calls to
46 c_parser_postfix_expression_after_paren_type.
47 (c_parser_postfix_expression): Update syntax comment.
48 * c-tree.h (build_compound_literal): Update prototype.
49 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
50 register compound literal.
52 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
54 * c-decl.cc (flexible_array_member_type_p): New function.
55 (one_element_array_type_p): Likewise.
56 (zero_length_array_type_p): Likewise.
57 (add_flexible_array_elts_to_size): Call new utility
58 routine flexible_array_member_type_p.
59 (is_flexible_array_member_p): New function.
60 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
62 2022-10-06 Joseph Myers <joseph@codesourcery.com>
64 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
66 (c_keyword_starts_typename, c_token_starts_declspecs)
67 (c_parser_declspecs, c_parser_objc_selector): Handle
69 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
70 Distinguish typeof for C2x from __typeof__ for all standard
71 versions and typeof before C2x.
72 * c-typeck.cc (build_function_call_vec): Use unqualified version
73 of non-void return type.
74 (build_unary_op): Use unqualified type for increment and
77 2022-10-06 Jakub Jelinek <jakub@redhat.com>
79 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
80 call for holds clause on assume construct.
82 2022-10-06 Jakub Jelinek <jakub@redhat.com>
85 * c-parser.cc (handle_assume_attribute): New function.
86 (c_parser_declaration_or_fndef): Handle assume attribute.
87 (c_parser_attribute_arguments): Add assume_attr argument,
88 if true, parse first argument as conditional expression.
89 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
90 c_parser_attribute_arguments callers.
91 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
94 2022-10-04 Jakub Jelinek <jakub@redhat.com>
96 * c-lang.h (struct c_omp_declare_target_attr): New type.
97 (current_omp_declare_target_attribute): Change type from
98 int to vec<c_omp_declare_target_attr, va_gc> *.
99 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
100 If last pushed directive was begin declare target, use different
101 wording and simplify format strings for easier translations.
102 (c_parser_omp_clause_device_type): Uncomment
103 check_no_duplicate_clause call.
104 (c_parser_omp_declare_target): Adjust for the
105 current_omp_declare_target_attribute type change, push { -1 }.
106 Use error_at rather than warning_at for declare target with
107 only device_type clauses.
108 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
109 (c_parser_omp_begin): Add begin declare target support.
110 (c_parser_omp_end): Adjust for the
111 current_omp_declare_target_attribute type change, adjust
112 diagnostics wording and simplify format strings for easier
114 * c-decl.cc (current_omp_declare_target_attribute): Change type from
115 int to vec<c_omp_declare_target_attr, va_gc> *.
116 (c_decl_attributes): Adjust for the
117 current_omp_declare_target_attribute type change. If device_type
118 was present on begin declare target, add "omp declare target host"
119 and/or "omp declare target nohost" attributes.
121 2022-09-29 Joseph Myers <joseph@codesourcery.com>
123 * c-decl.cc (handle_std_noreturn_attribute): New function.
124 (std_attribute_table): Add _Noreturn and noreturn.
126 2022-09-27 Jakub Jelinek <jakub@redhat.com>
128 * c-lang.h (current_omp_begin_assumes): Declare.
129 * c-parser.cc: Include bitmap.h.
130 (c_parser_omp_end_declare_target): Rename to ...
131 (c_parser_omp_end): ... this. Handle also end assumes.
132 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
133 c_parser_omp_assumes, c_parser_omp_assume): New functions.
134 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
135 without corresponding #pragma omp end assumes.
136 (c_parser_pragma): Use %s in may only be used at file scope
137 diagnostics to decrease number of translatable messages. Handle
138 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
139 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
140 for it rather than c_parser_omp_end_declare_target.
141 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
142 * c-decl.cc (current_omp_begin_assumes): Define.
144 2022-09-24 Jakub Jelinek <jakub@redhat.com>
147 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
148 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
149 t2 have different types.
151 2022-09-22 David Malcolm <dmalcolm@redhat.com>
154 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
155 (c_parser_cast_expression): Likewise.
156 (c_parser_alignof_expression): Likewise.
157 (c_parser_postfix_expression_after_paren_type): Likewise.
158 (c_parser_postfix_expression_after_primary): Likewise.
159 (c_parser_expression): Likewise.
160 (c_parser_omp_variable_list): Likewise.
161 (c_parser_transaction_expression): Likewise.
162 * c-tree.h (c_expr::set_error): Likewise.
163 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
164 (parser_build_unary_op): Likewise.
165 (parser_build_binary_op): Likewise.
166 (digest_init): Likewise.
167 (pop_init_level): Likewise.
168 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
170 2022-09-19 Marek Polacek <polacek@redhat.com>
173 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
176 2022-09-15 Richard Biener <rguenther@suse.de>
178 * c-decl.cc (build_void_list_node): Remove.
180 2022-09-14 Julian Brown <julian@codesourcery.com>
182 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
185 2022-09-07 Joseph Myers <joseph@codesourcery.com>
187 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
188 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
189 for C2x spellings of keywords.
190 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
192 2022-09-06 Jakub Jelinek <jakub@redhat.com>
194 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
195 in omp_cur_iteration - 1 has integer_type_node type.
197 2022-09-03 Jakub Jelinek <jakub@redhat.com>
199 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
200 (c_parser_omp_clause_depend_sink): Renamed to ...
201 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
202 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
203 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
204 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
205 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
206 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
207 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
208 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
209 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
210 (c_parser_omp_clause_doacross): New function.
211 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
212 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
213 OMP_CLAUSE_DEPEND_SOURCE.
214 (c_parser_omp_for_loop): Don't diagnose here linear clause together
215 with ordered with argument.
216 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
218 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
219 (c_parser_omp_ordered): Handle also doacross and adjust for it
221 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
222 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
224 2022-09-02 David Malcolm <dmalcolm@redhat.com>
227 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
228 (c_parser_expr_no_commas): Likewise.
229 (c_parser_conditional_expression): Likewise.
230 (c_parser_binary_expression): Clear m_decimal when popping the
232 (c_parser_unary_expression): Clear ret.m_decimal.
233 (c_parser_has_attribute_expression): Likewise for result.
234 (c_parser_predefined_identifier): Likewise for expr.
235 (c_parser_postfix_expression): Likewise for expr.
236 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
238 * c-tree.h (c_expr::m_decimal): New bitfield.
239 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
240 (parser_build_binary_op): Call check_for_xor_used_as_pow.
242 2022-09-01 Joseph Myers <joseph@codesourcery.com>
244 * c-decl.cc (grokparms): Handle () in a function declaration the
245 same as (void) for C2X.
247 2022-08-31 Joseph Myers <joseph@codesourcery.com>
249 * c-parser.cc (c_parser_label): Pass attributes to do_case.
250 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
253 2022-08-26 Jakub Jelinek <jakub@redhat.com>
255 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
257 2022-08-25 Marek Polacek <polacek@redhat.com>
259 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
260 Give a better diagnostic when converting to nullptr_t.
261 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
263 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
264 (c_parser_postfix_expression): Handle RID_NULLPTR.
265 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
267 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
268 (build_conditional_expr): Handle the case when the second/third operand
269 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
270 (convert_for_assignment): Handle converting an expression of type
271 nullptr_t to pointer/bool.
272 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
273 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
275 2022-08-25 Joseph Myers <joseph@codesourcery.com>
277 * c-decl.cc (start_decl): Do not diagnose initialization of
278 variable-sized objects here.
279 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
281 (c_parser_initializer): Diagnose initialization of variable-sized
282 objects other than with braced initializer.
283 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
284 braces and update diagnostic text. Diagnose initialization of
285 variable-sized objects with nonempty braces.
286 * c-typeck.cc (digest_init): Update diagnostic for initialization
287 of variable-sized objects.
288 (really_start_incremental_init, set_designator)
289 (process_init_element): Update comments.
290 (pop_init_level): Allow scalar empty initializers.
292 2022-08-17 Tobias Burnus <tobias@codesourcery.com>
293 Chung-Lin Tang <cltang@codesourcery.com>
296 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
297 instead of removed langhook.
298 * c-typeck.cc (c_finish_omp_clauses): Likewise.
300 2022-08-11 Marek Polacek <polacek@redhat.com>
303 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
304 Call suppress_warning.
305 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
306 (c_parser_omp_declare_reduction): Pass omp_priv down to
307 c_parser_initializer.
309 2022-08-08 Tom Honermann <tom@honermann.net>
311 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
312 of CPP_UTF8STRING when char8_t support is enabled.
313 * c-typeck.cc (digest_init): Allow initialization of an array
314 of character type by a string literal with type array of
317 2022-08-01 David Malcolm <dmalcolm@redhat.com>
319 * c-typeck.cc (build_c_cast): Quote names of address spaces in
321 (convert_for_assignment): Add a note to address space mismatch
322 diagnostics, specifying the expected and actual types.
324 2022-07-10 Lewis Hyatt <lhyatt@gmail.com>
326 PR preprocessor/97498
327 * c-parser.cc (c_parser_pragma): Set input_location to the
328 location of the pragma, rather than the start of the line.
330 2022-07-04 Tobias Burnus <tobias@codesourcery.com>
331 Chung-Lin Tang <cltang@codesourcery.com>
332 Thomas Schwinge <thomas@codesourcery.com>
334 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
335 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
336 OMP_REQUIRES_TARGET_USED.
337 (c_parser_omp_requires): Remove sorry.
339 2022-07-01 Tobias Burnus <tobias@codesourcery.com>
341 * c-parser.cc (c_parser_omp_target_enter_data,
342 c_parser_omp_target_exit_data): Accept tofrom
343 map-type modifier but use 'to' / 'from' internally.
345 2022-06-16 David Malcolm <dmalcolm@redhat.com>
347 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
348 group the warning with any note.
349 (warn_about_goto): Likewise to group error or warning with note.
350 Bail out if the warning wasn't emitted, to avoid emitting orphan
352 (lookup_label_for_goto): Add auto_diagnostic_group to
353 group the error with the note.
354 (check_earlier_gotos): Likewise.
355 (c_check_switch_jump_warnings): Likewise for any error/warning.
356 Conditionalize emission of the notes.
357 (diagnose_uninitialized_cst_member): Likewise for warning,
358 conditionalizing emission of the note.
359 (grokdeclarator): Add auto_diagnostic_group to group the "array
360 type has incomplete element type" error with any note.
361 (parser_xref_tag): Add auto_diagnostic_group to group warnings
362 with their notes. Conditionalize emission of notes.
363 (start_struct): Add auto_diagnostic_group to group the
364 "redefinition of" errors with any note.
365 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
366 (check_for_loop_decls): Likewise for pre-C99 error.
368 2022-06-07 Jakub Jelinek <jakub@redhat.com>
370 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
371 style linear clause modifiers. Set
372 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
373 old style modifiers are used.
374 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
375 with val modifier on simd or for if the old style modifiers are
378 2022-06-02 David Malcolm <dmalcolm@redhat.com>
380 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
381 (c_get_sarif_source_language): New.
382 * c-tree.h (c_get_sarif_source_language): New decl.
384 2022-05-31 Jason Merrill <jason@redhat.com>
386 * Make-lang.in (c.tags): Look at *.cc.
388 2022-05-31 Jakub Jelinek <jakub@redhat.com>
390 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
393 2022-05-28 Jakub Jelinek <jakub@redhat.com>
395 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
396 seen first, use "%<to%>" or "%<enter%>" depending on
397 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
398 "%<to%> or %<enter%>" wording.
400 2022-05-27 Jakub Jelinek <jakub@redhat.com>
402 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
403 (c_parser_omp_all_clauses): For to clause on declare target, use
404 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
405 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
406 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
407 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
408 OMP_CLAUSE_TO_DECLARE.
409 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
410 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
411 name in diagnostics instead of
412 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
414 2022-05-25 Jakub Jelinek <jakub@redhat.com>
417 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
418 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
419 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
420 diagnostic and fixit hint if DATUM has pointer type.
421 * c-parser.cc (c_parser_postfix_expression,
422 c_parser_omp_variable_list): Adjust build_component_ref callers.
423 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
426 2022-05-24 Jakub Jelinek <jakub@redhat.com>
429 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
431 2022-05-18 Marek Polacek <polacek@redhat.com>
434 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
436 * c-tree.h (comptypes_check_enum_int): Declare.
437 * c-typeck.cc (comptypes): No longer static.
439 2022-05-17 Marek Polacek <polacek@redhat.com>
441 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
444 2022-05-17 Jakub Jelinek <jakub@redhat.com>
446 * c-parser.cc (c_parser_omp_clause_depend): Parse
447 inoutset depend-kind.
448 (c_parser_omp_depobj): Likewise.
450 2022-05-16 Martin Liska <mliska@suse.cz>
452 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
454 2022-05-12 Jakub Jelinek <jakub@redhat.com>
456 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
458 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
459 in postfix expressions.
460 (c_parser_omp_variable_list): Handle omp_all_memory in depend
462 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
463 keyword in depend clause as null_pointer_node, diagnose invalid
466 2022-05-09 Martin Liska <mliska@suse.cz>
468 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
470 (c_parser_binary_expression): Likewise.
472 2022-05-07 Marek Polacek <polacek@redhat.com>
476 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
478 2022-04-08 Jakub Jelinek <jakub@redhat.com>
481 * c-typeck.cc (c_build_va_arg): Reject function types.
483 2022-03-22 Marek Polacek <polacek@redhat.com>
487 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
488 (start_init): Set it.
489 (finish_init): Restore constructor_designated.
490 (push_init_level): Set constructor_designated to the value of
491 constructor_designated in the upper constructor_stack.
493 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
496 * c-typeck.cc (handle_omp_array_sections_1)
497 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
498 instead of 'c_omp_map_clause_name'.
500 2022-03-09 Joseph Myers <joseph@codesourcery.com>
502 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
503 differently from earlier standards for unprototyped function type
506 2022-03-09 Jakub Jelinek <jakub@redhat.com>
509 * c-fold.cc (c_fully_fold_internal): Don't emit
510 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
511 * c-typeck.cc (build_binary_op): Likewise.
513 2022-03-07 Jakub Jelinek <jakub@redhat.com>
515 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
518 2022-02-23 Richard Biener <rguenther@suse.de>
520 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
521 SSA names without definition.
522 (c_parser_gimple_declaration): Handle pointer typed SSA names.
524 2022-02-17 Jakub Jelinek <jakub@redhat.com>
527 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
528 convert_lvalue_to_rvalue and build_indirect_ref instead of
529 build_simple_mem_ref.
531 2022-02-11 Richard Biener <rguenther@suse.de>
533 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
536 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
538 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
540 (c_parser_omp_variable_list): Handle array sections.
541 (c_parser_omp_clause_has_device_addr): Added.
542 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
544 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
546 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
547 (c_finish_omp_clauses): Handle array sections.
549 2022-02-09 Jakub Jelinek <jakub@redhat.com>
552 * c-parser.cc (c_parser_postfix_expression)
553 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
554 instead of build1_loc to build PAREN_EXPR.
555 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
556 * c-fold.cc (c_fully_fold_internal): Likewise.
558 2022-01-17 Martin Liska <mliska@suse.cz>
560 * Make-lang.in: Rename .c names to .cc.
561 * c-convert.cc: Likewise.
562 * c-decl.cc (struct lang_identifier): Likewise.
563 (pop_scope): Likewise.
564 (finish_decl): Likewise.
565 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
566 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
567 * c-parser.h (GCC_C_PARSER_H): Likewise.
568 * c-tree.h (c_keyword_starts_typename): Likewise.
569 (finish_declspecs): Likewise.
570 (c_get_alias_set): Likewise.
571 (enum c_oracle_request): Likewise.
572 (tag_exists_p): Likewise.
573 (set_c_expr_source_range): Likewise.
574 * c-typeck.cc (c_common_type): Likewise.
575 (c_finish_omp_clauses): Likewise.
576 * config-lang.in: Likewise.
578 2022-01-17 Martin Liska <mliska@suse.cz>
580 * c-aux-info.c: Moved to...
581 * c-aux-info.cc: ...here.
582 * c-convert.c: Moved to...
583 * c-convert.cc: ...here.
584 * c-decl.c: Moved to...
585 * c-decl.cc: ...here.
586 * c-errors.c: Moved to...
587 * c-errors.cc: ...here.
588 * c-fold.c: Moved to...
589 * c-fold.cc: ...here.
590 * c-lang.c: Moved to...
591 * c-lang.cc: ...here.
592 * c-objc-common.c: Moved to...
593 * c-objc-common.cc: ...here.
594 * c-parser.c: Moved to...
595 * c-parser.cc: ...here.
596 * c-typeck.c: Moved to...
597 * c-typeck.cc: ...here.
598 * gccspec.c: Moved to...
599 * gccspec.cc: ...here.
600 * gimple-parser.c: Moved to...
601 * gimple-parser.cc: ...here.
603 2022-01-17 Andrew Stubbs <ams@codesourcery.com>
605 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
607 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
610 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
611 outer node for ARRAY_REFs.
613 2022-01-01 Jakub Jelinek <jakub@redhat.com>
616 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
617 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
619 2021-12-17 Marek Polacek <polacek@redhat.com>
622 * c-decl.c (c_warn_unused_attributes): Don't warn for
624 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
625 arguments when the attribute is ignored.
627 2021-12-14 Jakub Jelinek <jakub@redhat.com>
630 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
631 consume the pragma and silently skip to the pragma eol.
633 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
635 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
636 * c-parser.c: Likewise.
638 2021-12-09 Jakub Jelinek <jakub@redhat.com>
641 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
642 to resort_data.new_value.
644 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
646 * c-parser.c (struct omp_dim): New struct type for use inside
647 c_parser_omp_variable_list.
648 (c_parser_omp_variable_list): Allow multiple levels of array and
649 component accesses in array section base-pointer expression.
650 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
651 c_parser_omp_var_list_parens.
652 (c_parser_omp_clause_from): Likewise.
653 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
654 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
656 (c_finish_omp_clauses): Extend allowed ranged of expressions
657 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
659 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
662 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
663 call to c_parser_omp_variable_list to 'true'.
664 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
666 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
668 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
670 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
671 orphan loop" checking.
673 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
674 Thomas Schwinge <thomas@codesourcery.com>
676 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
677 OpenACC gang reductions.
679 2021-11-30 Richard Biener <rguenther@suse.de>
681 * gimple-parser.c (c_parser_gimple_postfix_expression):
682 avoid unreachable code after break.
684 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
687 * Make-lang.in: Use ETAGS variable in TAGS target.
689 2021-11-29 Richard Biener <rguenther@suse.de>
691 * c-typeck.c (c_tree_equal): Remove unreachable return.
692 * c-parser.c (get_matching_symbol): Likewise.
694 2021-11-23 Jakub Jelinek <jakub@redhat.com>
696 * c-typeck.c (c_clone_omp_udr): Don't initialize
697 id.transform_lang_insert_block.
699 2021-11-19 Martin Sebor <msebor@redhat.com>
703 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
704 code resulting from macro expansion.
706 2021-11-19 Martin Liska <mliska@suse.cz>
709 2021-11-19 Martin Liska <mliska@suse.cz>
711 * c-parser.c (add_debug_begin_stmt): Use option directly.
713 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
715 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
716 * c-parser.c (c_parser_postfix_expression): Likewise.
718 2021-11-18 Martin Liska <mliska@suse.cz>
720 * c-parser.c (add_debug_begin_stmt): Use option directly.
722 2021-11-17 Martin Sebor <msebor@redhat.com>
725 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
726 bounds before deciding if they're constant.
728 2021-11-15 Jakub Jelinek <jakub@redhat.com>
730 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
731 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
733 2021-11-11 Jakub Jelinek <jakub@redhat.com>
735 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
736 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
737 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
738 OMP_CLAUSE_NUM_TEAMS_EXPR.
739 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
740 combined target teams even lower-bound expression.
742 2021-11-11 Richard Biener <rguenther@suse.de>
744 * gimple-parser.c: Shuffle bitmap.h include.
746 2021-11-03 Joseph Myers <joseph@codesourcery.com>
749 * c-convert.c (c_convert): New function, based on convert.
750 (convert): Make into wrapper of c_convert.
751 (convert_init): New function.
752 * c-typeck.c (enum impl_conv): Add ic_init_const.
753 (convert_for_assignment): Handle ic_init_const like ic_init. Add
754 new argument to convert_and_check call.
755 (digest_init): Pass ic_init_const to convert_for_assignment for
756 initializers required to be constant.
758 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
760 * c-tree.h (c_simulate_record_decl): Declare.
761 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
762 * c-decl.c (c_simulate_record_decl): New function.
764 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
767 * Make-lang.in: Add dummy c.install-dvi target.
769 2021-10-15 Richard Biener <rguenther@suse.de>
773 (c_parser_gimple_postfix_expression_after_primary): Check
774 for a pointer do be dereferenced by ->.
776 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
778 * c-parser.c (c_finish_omp_declare_variant): Change call from
779 c_omp_check_context_selector to omp_check_context_selector. Change
780 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
782 2021-10-09 Jakub Jelinek <jakub@redhat.com>
784 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
785 (c_parser_omp_scan_loop_body): Use it.
786 (c_parser_omp_sections_scope): Likewise.
788 2021-10-07 Richard Biener <rguenther@suse.de>
790 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
792 2021-10-05 Richard Biener <rguenther@suse.de>
795 * gimple-parser.c (c_parser_gimple_postfix_expression):
796 Accept more address _Literals.
798 2021-10-04 Marek Polacek <polacek@redhat.com>
801 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
803 2021-10-01 Martin Sebor <msebor@redhat.com>
806 * c-typeck.c (maybe_warn_for_null_address): New function.
807 (build_binary_op): Call it.
809 2021-10-01 Jakub Jelinek <jakub@redhat.com>
810 Richard Biener <rguenther@suse.de>
813 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
814 for division even for SANITIZE_SI_OVERFLOW.
816 2021-10-01 Jakub Jelinek <jakub@redhat.com>
818 * c-parser.c (c_parser_omp_clause_order): Set
819 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
821 2021-09-28 Andrew Pinski <apinski@marvell.com>
824 * c-parser.c (c_parser_statement_after_labels): Pass
825 the c_expr instead of the tree to c_finish_goto_ptr.
826 * c-typeck.c (c_finish_goto_ptr): Change the second
827 argument type to c_expr.
828 * c-tree.h (c_finish_goto_ptr): Likewise.
829 Error out if the expression was not of a pointer type.
831 2021-09-22 Jakub Jelinek <jakub@redhat.com>
833 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
836 2021-09-18 Jakub Jelinek <jakub@redhat.com>
838 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
839 and reproducible modifiers.
840 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
842 2021-09-18 Jakub Jelinek <jakub@redhat.com>
844 * c-parser.c (c_parser_omp_clause_default): Handle private and
845 firstprivate arguments, adjust diagnostics on unknown argument.
847 2021-09-17 Jakub Jelinek <jakub@redhat.com>
849 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
852 2021-09-10 Jakub Jelinek <jakub@redhat.com>
854 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
855 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
856 don't call build_conditional_expr, instead build a COND_EXPR directly.
857 (c_parser_binary_expression): Avoid calling parser_build_binary_op
858 if omp_atomic_lhs even in more cases for >, < or ==.
859 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
860 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
861 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
862 * c-typeck.c (build_binary_op): For flag_openmp only handle
865 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
867 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
870 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
872 * c-decl.c (enum deprecated_states): Add unavailable state.
873 (merge_decls): Copy unavailability.
874 (quals_from_declspecs): Handle unavailable case.
875 (start_decl): Amend the logic handling suppression of nested
876 deprecation states to include unavailability.
877 (smallest_type_quals_location): Amend comment.
878 (grokdeclarator): Handle the unavailable deprecation state.
879 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
880 * c-tree.h (struct c_declspecs): Add unavailable_p.
881 * c-typeck.c (build_component_ref): Handle unavailability.
882 (build_external_ref): Likewise.
884 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
885 Joseph Myers <joseph@codesourcery.com>
888 * c-decl.c (duplicate_decls): On significant mismatches, mark the
889 types of both (non-function) decls as error_mark_node, so that the
890 middle-end can see the code is malformed.
891 (free_attr_access_data): Don't process if the type has been set to
894 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
896 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
897 and 'ancestor' in 'target device' clauses.
899 2021-08-23 Jakub Jelinek <jakub@redhat.com>
901 * c-parser.c (c_parser_omp_clause_num_tasks,
902 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
904 2021-08-22 Martin Uecker <muecker@gwdg.de>
907 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
908 for pointers to arrays with qualifiers.
909 (build_conditional_expr): For C23 don't lose qualifiers for pointers
910 to arrays when the other pointer is a void pointer. Update warnings.
911 (convert_for_assignment): Update warnings for C2X when converting from
912 void* with qualifiers to a pointer to array with the same qualifiers.
914 2021-08-20 Jakub Jelinek <jakub@redhat.com>
916 * c-parser.c (c_parser_omp_error): New function.
917 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
919 2021-08-20 Jakub Jelinek <jakub@redhat.com>
921 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
922 comma at the end of list.
923 (c_parser_omp_requires): Likewise.
925 2021-08-19 Jakub Jelinek <jakub@redhat.com>
927 * c-parser.c (c_parser_omp_requires): Don't call
928 c_parser_peek_2nd_token and optionally consume token if current
929 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
931 2021-08-18 Jakub Jelinek <jakub@redhat.com>
933 * c-parser.c (c_parser_omp_nothing): New function.
934 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
936 2021-08-18 Jakub Jelinek <jakub@redhat.com>
938 * c-parser.c (c_parser_statement_after_labels): Add restart label
939 near the start of the function. If c_parser_pragma returns false,
941 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
942 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
943 return what c_parser_omp_declare returned. Return true instead of
944 false after emitting errors that the directive is not allowed in
946 (c_parser_omp_ordered): Return true instead of
947 false after emitting errors that the directive is not allowed in
949 (c_parser_omp_target_update): Likewise.
950 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
951 Change return type from tree to bool, return false if the
952 directive should be ignored in pragma_stmt contexts.
953 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
954 return their result directly.
955 (c_parser_omp_cancellation_point): Change return type from void to
956 bool, return false if the directive should be ignored in pragma_stmt
958 (c_parser_omp_declare): Likewise.
960 2021-08-17 Jakub Jelinek <jakub@redhat.com>
962 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
963 (c_parser_omp_scope): New function.
964 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
966 2021-08-12 Jakub Jelinek <jakub@redhat.com>
968 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
969 (c_parser_omp_clause_filter): New function.
970 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
971 (OMP_MASKED_CLAUSE_MASK): Define.
972 (c_parser_omp_masked): New function.
973 (c_parser_omp_parallel): Handle parallel masked.
974 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
975 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
977 2021-08-12 Martin Uecker <muecker@gwdg.de>
981 * c-typeck.c (c_expr_sizeof_type): Evaluate
982 size expressions for structs of variable size.
984 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
986 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
987 'primary' as alias for 'master'.
989 2021-08-10 Martin Uecker <muecker@gwdg.de>
992 * c-typeck.c (c_expr_sizeof_expr): Evaluate
993 size expressions for structs of variable size.
995 2021-08-06 Tamar Christina <tamar.christina@arm.com>
997 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
998 * c-tree.h (c_simulate_enum_decl): Likewise.
1000 2021-08-06 Martin Sebor <msebor@redhat.com>
1002 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
1003 vec arguments to by-reference.
1004 (c_finish_omp_declare_simd): Same.
1005 (c_parser_compound_statement_nostart): Same.
1006 (c_parser_for_statement): Same.
1007 (c_parser_objc_methodprotolist): Same.
1008 (c_parser_oacc_routine): Same.
1009 (c_parser_omp_for_loop): Same.
1010 (c_parser_omp_declare_simd): Same.
1012 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1013 Joseph Myers <joseph@codesourcery.com>
1014 Cesar Philippidis <cesar@codesourcery.com>
1016 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
1017 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1018 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1019 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1021 2021-07-20 Martin Sebor <msebor@redhat.com>
1023 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
1025 * c-typeck.c (c_build_function_call_vec): Same.
1027 2021-07-15 Martin Sebor <msebor@redhat.com>
1031 * c-decl.c (get_parm_array_spec): Strip nops.
1033 2021-07-06 Martin Sebor <msebor@redhat.com>
1035 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
1037 2021-07-02 Jakub Jelinek <jakub@redhat.com>
1040 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
1041 appears before a CPP_NAME.
1043 2021-06-25 Martin Sebor <msebor@redhat.com>
1045 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
1046 warning_suppressed_p, suppress_warning, and copy_no_warning.
1047 (diagnose_mismatched_decls): Same.
1048 (duplicate_decls): Same.
1049 (grokdeclarator): Same.
1050 (finish_function): Same.
1051 (c_write_global_declarations_1): Same.
1052 * c-fold.c (c_fully_fold_internal): Same.
1053 * c-parser.c (c_parser_expr_no_commas): Same.
1054 (c_parser_postfix_expression): Same.
1055 * c-typeck.c (array_to_pointer_conversion): Same.
1056 (function_to_pointer_conversion): Same.
1057 (default_function_array_conversion): Same.
1058 (convert_lvalue_to_rvalue): Same.
1059 (default_conversion): Same.
1060 (build_indirect_ref): Same.
1061 (build_function_call_vec): Same.
1062 (build_atomic_assign): Same.
1063 (build_unary_op): Same.
1064 (c_finish_return): Same.
1065 (emit_side_effect_warnings): Same.
1066 (c_finish_stmt_expr): Same.
1067 (c_omp_clause_copy_ctor): Same.
1069 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1072 * c-parser.c (c_parser_has_attribute_expression): Set source range for
1075 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1078 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
1081 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1083 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
1084 C_ORT_OMP for clauses on target construct.
1085 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
1086 (c_parser_omp_target): For non-combined target add
1087 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
1088 C_ORT_OMP_TARGET to c_finish_omp_clauses.
1089 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
1090 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
1091 never present on C_ORT_*DECLARE_SIMD.
1092 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
1093 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
1094 corresponding map clauses.
1096 2021-06-21 Jakub Jelinek <jakub@redhat.com>
1098 PR inline-asm/100785
1099 * c-typeck.c (c_mark_addressable): Diagnose trying to make
1100 bit-fields addressable.
1102 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1104 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
1107 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
1110 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
1111 var in the error case.
1113 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
1116 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
1117 spot built-in functions.
1119 2021-06-06 Jakub Jelinek <jakub@redhat.com>
1122 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
1123 even when target is combined with other constructs.
1125 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
1128 * c-decl.c (finish_struct): Fix thinko in previous change.
1129 * c-typeck.c (convert_for_assignment): Do not warn on pointer
1130 assignment and initialization for storage order purposes if the
1131 RHS is a call to a DECL_IS_MALLOC function.
1133 2021-06-04 Martin Sebor <msebor@redhat.com>
1136 * c-objc-common.c (print_type): Handle erroneous types.
1138 2021-06-03 Jakub Jelinek <jakub@redhat.com>
1141 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
1142 after depend only cases.
1144 2021-05-31 Richard Biener <rguenther@suse.de>
1147 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
1148 * c-parser.c (c_parser_postfix_expression): Likewise.
1150 2021-05-28 Richard Biener <rguenther@suse.de>
1153 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
1154 invalid if conditions.
1156 2021-05-28 Jakub Jelinek <jakub@redhat.com>
1159 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
1160 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1161 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
1162 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1163 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1164 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1165 if present in map_head, map_field_head or map_firstprivate_head
1168 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1170 * c-parser.c (c_parser_omp_clause_affinity): New.
1171 (c_parser_omp_clause_name, c_parser_omp_variable_list,
1172 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
1173 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
1174 c_finish_omp_clauses): Likewise.
1176 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
1179 * c-decl.c (finish_struct): Warn for a union containing an aggregate
1180 field with a differing scalar storage order.
1182 2021-05-21 Jakub Jelinek <jakub@redhat.com>
1185 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
1186 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1187 if a decl is mentioned both in map clause and in such firstprivate
1188 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1190 2021-05-19 Jakub Jelinek <jakub@redhat.com>
1193 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
1194 master when combined with taskloop.
1195 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1196 parallel master when not combined with taskloop.
1198 2021-05-18 Richard Biener <rguenther@suse.de>
1201 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
1202 Diagnose calls to non-functions.
1203 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
1205 2021-05-17 Richard Biener <rguenther@suse.de>
1208 * gimple-parser.c (c_parser_gimple_label): Avoid building
1209 a GIMPLE label with NULL label decl.
1211 2021-05-13 Martin Sebor <msebor@redhat.com>
1214 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
1216 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1218 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
1221 2021-05-10 Martin Liska <mliska@suse.cz>
1223 * c-aux-info.c (affix_data_type): Use startswith
1224 function instead of strncmp.
1225 * c-typeck.c (build_function_call_vec): Likewise.
1226 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
1228 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
1230 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
1231 on the address of a pointer field in a record with reverse SSO.
1233 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
1235 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
1236 for || and && reductions.
1238 2021-04-29 Joseph Myers <joseph@codesourcery.com>
1240 * c-typeck.c (function_types_compatible_p): For C2X, treat
1241 unprototyped function as compatible with non-variadic prototyped
1242 function even if some argument types are changed by the default
1243 argument promotions.
1245 2021-04-15 Martin Sebor <msebor@redhat.com>
1249 * c-decl.c (pushdecl): Always propagate type attribute.
1251 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1254 * c-typeck.c (c_common_type): Do not drop attributes that
1255 affect type identity.
1257 2021-04-10 Jakub Jelinek <jakub@redhat.com>
1260 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1263 2021-03-25 Jakub Jelinek <jakub@redhat.com>
1266 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1269 2021-03-19 Jakub Jelinek <jakub@redhat.com>
1272 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1273 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1275 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1276 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1277 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1279 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
1282 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1283 ensure that the varpool node is marked as offloadable.
1285 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
1288 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
1290 2021-02-24 Martin Sebor <msebor@redhat.com>
1293 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
1295 2021-02-18 Jakub Jelinek <jakub@redhat.com>
1298 * c-typeck.c (c_finish_return): Don't wrap retval into
1299 EXCESS_PRECISION_EXPR in functions that return void.
1301 2021-02-11 Marek Polacek <polacek@redhat.com>
1303 * c-parser.c (c_parser_if_statement): Use vec_free.
1305 2021-02-04 Martin Sebor <msebor@redhat.com>
1308 * c-decl.c (locate_old_decl): Add type to diagnostic output.
1309 (diagnose_mismatched_decls): Same.
1310 (start_function): Introduce temporaries for better readability.
1311 * c-typeck.c (comptypes_internal): Only consider complete enum
1312 types in comparisons with integers.
1314 2021-02-01 Martin Sebor <msebor@redhat.com>
1317 * c-decl.c (free_attr_access_data): New function.
1318 (c_parse_final_cleanups): Call free_attr_access_data.
1320 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1322 * c-parser.c (c_parser_omp_clause_detach): New.
1323 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
1324 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1325 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
1326 clause. Prevent use of detach with mergeable and overriding the
1327 data sharing mode of the event handle.
1329 2021-01-15 Jakub Jelinek <jakub@redhat.com>
1331 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1332 unqualified element type and then call c_build_qualified_type on the
1335 2021-01-07 Richard Biener <rguenther@suse.de>
1337 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1338 reallocate loop array if it is too small.
1340 2020-12-16 Martin Uecker <muecker@gwdg.de>
1343 * c-typeck.c (build_modify_expr): Drop qualifiers.
1345 2020-12-16 Martin Uecker <muecker@gwdg.de>
1348 * c-parser.c (c_parser_expression): Look into
1349 nop expression when marking expressions as read.
1351 2020-12-14 Martin Liska <mliska@suse.cz>
1354 * c-typeck.c (pointer_diff): Do not emit a top-level
1356 (build_binary_op): Likewise.
1358 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
1360 * c-parser.c (c_parser_omp_allocate): New.
1361 (c_parser_omp_construct): Call it.
1363 2020-12-09 Richard Biener <rguenther@suse.de>
1366 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1369 2020-12-07 Martin Uecker <muecker@gwdg.de>
1372 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1373 that drops qualifiers to the end of the function.
1375 2020-11-26 Martin Uecker <muecker@gwdg.de>
1379 * c-parser.c (c_parser_declaration_or_fndef): Remove
1380 redundant code to drop qualifiers of _Atomic types for __auto_type.
1381 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1382 types for __typeof__.
1384 2020-11-24 Jakub Jelinek <jakub@redhat.com>
1387 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1388 expressions, use make_node instead of build2 to avoid checking build2
1391 2020-11-23 Joseph Myers <joseph@codesourcery.com>
1394 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1395 for comparisons of complete and incomplete pointers.
1397 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1399 * c-aux-info.c (gen_type): Support opaque types.
1401 2020-11-20 Martin Sebor <msebor@redhat.com>
1404 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1406 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1409 * Make-lang.in (c.serial): Change from goal to a variable.
1410 (.PHONY): Drop c.serial.
1412 2020-11-20 Martin Uecker <muecker@gwdg.de>
1414 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1416 2020-11-19 Jakub Jelinek <jakub@redhat.com>
1419 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1422 2020-11-18 Jakub Jelinek <jakub@redhat.com>
1424 * Make-lang.in (c.serial): New goal.
1425 (.PHONY): Add c.serial c.prev.
1426 (cc1$(exeext)): Call LINK_PROGRESS.
1428 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1430 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1432 * c-typeck.c (build_asm_expr): Remove an assert checking output
1433 absence for asm goto.
1435 2020-11-13 Jakub Jelinek <jakub@redhat.com>
1437 * c-typeck.c (c_finish_omp_clauses): Don't clear
1438 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1440 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1443 * c-parser.c (c_parser_objc_class_definition): Pass the
1444 location of the class name to the interface declaration.
1446 2020-11-10 Strager Neds <strager.nds@gmail.com>
1448 * c-decl.c (merge_decls): Use new overload of
1449 set_decl_section_name.
1451 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1453 * c-parser.c (c_parser_omp_target_data): Add use of
1454 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1455 handled map clause kind.
1456 (c_parser_omp_target_enter_data): Likewise.
1457 (c_parser_omp_target_exit_data): Likewise.
1458 (c_parser_omp_target): Likewise.
1459 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1460 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1461 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1462 same struct field access to co-exist on OpenMP construct.
1464 2020-11-07 Martin Uecker <muecker@gwdg.de>
1466 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1467 (c_parser_all_labels): Likewise.
1469 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1471 * c-parser.c (c_parser_objc_at_property_declaration):
1472 Improve parsing fidelity. Associate better location info
1473 with @property attributes. Clean up the interface to
1474 objc_add_property_declaration ().
1476 2020-11-06 Nathan Sidwell <nathan@acm.org>
1478 * c-decl.c (diagnose_mismatched_decls): Rename
1479 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1480 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1481 (collect_source_refs): Likewise.
1482 * c-typeck.c (inform_declaration, inform_for_arg)
1483 (convert_for_assignment): Likewise.
1485 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
1487 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1489 (c_parser_omp_construct): Update call.
1491 2020-11-04 Jakub Jelinek <jakub@redhat.com>
1494 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1495 find underlying decl to clear in the aligned_head bitmap.
1497 2020-11-04 Joseph Myers <joseph@codesourcery.com>
1499 * c-decl.c (handle_nodiscard_attribute): New.
1500 (std_attribute_table): Add nodiscard.
1501 * c-parser.c (c_parser_std_attribute): Expect argument to
1502 nodiscard attribute to be a string. Do not special-case ignoring
1504 * c-typeck.c (maybe_warn_nodiscard): New.
1505 (build_compound_expr, emit_side_effect_warnings): Call
1506 maybe_warn_nodiscard.
1507 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1508 emit_side_effect_warnings if warn_unused_result.
1510 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
1512 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1514 (finish_init): Likewise.
1515 (pop_init_level): Likewise.
1517 2020-10-28 Joseph Myers <joseph@codesourcery.com>
1519 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1520 error_at for omitted parameter name.
1522 2020-10-28 Jakub Jelinek <jakub@redhat.com>
1524 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1525 (c_parser_omp_clause_allocate): New function.
1526 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1527 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1528 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1529 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1530 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1531 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1532 PRAGMA_OMP_CLAUSE_ALLOCATE.
1533 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1535 2020-10-27 Joseph Myers <joseph@codesourcery.com>
1537 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1538 standard attributes.
1540 2020-10-23 Marek Polacek <polacek@redhat.com>
1543 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1544 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1545 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1546 * c-tree.h (char_type_p): Declare.
1547 * c-typeck.c (char_type_p): No longer static.
1549 2020-10-23 Martin Sebor <msebor@redhat.com>
1552 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1554 2020-09-19 Martin Sebor <msebor@redhat.com>
1557 * c-decl.c (lookup_last_decl): Define new function.
1558 (c_decl_attributes): Call it.
1559 (start_decl): Add argument and use it.
1560 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1561 (get_parm_array_spec): Define new function.
1562 (push_parm_decl): Call get_parm_array_spec.
1563 (start_function): Call warn_parm_array_mismatch. Build attribute
1564 access and add it to current function.
1565 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1566 in forms of array parameters.
1567 * c-tree.h (start_decl): Add argument.
1569 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1571 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1573 (in_statement): New.
1574 (start_function): Adjust for above change.
1575 (c_push_function_context, c_pop_function_context): Likewise.
1576 * c-lang.h (struct language_function): Likewise.
1577 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1578 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1580 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1581 (c_parser_switch_statement): Adjust break/switch context handling
1582 and calls to renamed functions.
1583 (c_parser_while_statement): Adjust break/switch context handling and
1585 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1586 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1587 (c_parser_omp_for_loop): Adjust break/switch context handling.
1588 * c-tree.h (c_break_label, c_cont_label): Delete.
1589 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1590 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1591 (in_statement, switch_statement_break_seen_p): Declare.
1592 (c_start_case, c_finish_case): Renamed to...
1593 (c_start_switch, c_finish_switch).
1594 (c_finish_bc_stmt): Adjust arguments.
1595 * c-typeck.c (build_function_call_vec): Don't try to print
1596 statements with %qE format.
1597 (struct c_switch): Rename switch_expr field to switch_stmt.
1598 Add break_stmt_seen_p field.
1599 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1600 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1601 (do_case): Update for changes to struct c_switch.
1602 (c_finish_case): Rename to c_finish_switch. Update for changes to
1603 struct c_switch and change of representation from SWITCH_EXPR to
1605 (c_finish_loop): Delete.
1606 (c_finish_bc_stmt): Update to reflect changes to break/continue
1607 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1608 of a GOTO_EXPR except for objc foreach loops.
1610 2020-09-01 Jakub Jelinek <jakub@redhat.com>
1613 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1616 2020-08-28 Martin Sebor <msebor@redhat.com>
1619 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1622 2020-08-27 Martin Liska <mliska@suse.cz>
1624 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1625 growth function to true.
1627 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
1630 * c-typeck.c (handle_omp_array_sections_1): Talk about
1631 array function parameter in the error message.
1633 2020-08-18 Jakub Jelinek <jakub@redhat.com>
1636 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1637 to int, holding index of the match. Call mark_exp_read on the selector
1638 expression and on expressions other than the selected one.
1640 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1643 * c-typeck.c (process_init_element): Split test for whether to
1644 recurse into a record, union or array into...
1645 (initialize_elementwise_p): ...this new function. Don't recurse
1646 into a vector type if the initialization value is also a vector.
1648 2020-07-31 Richard Biener <rguenther@suse.de>
1651 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1652 Define to c_common_finalize_early_debug.
1654 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
1656 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1657 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1658 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1660 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1663 * c-decl.c (finish_decl): Call target hook
1664 lower_local_decl_alignment to lower local decl alignment.
1666 2020-07-09 Julian Brown <julian@codesourcery.com>
1667 Thomas Schwinge <thomas@codesourcery.com>
1670 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1671 for standalone attach/detach clauses.
1673 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
1675 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1676 set, warn for conversion between pointers that point to incompatible
1677 scalar storage orders.
1679 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1681 * c-parser.c (c_parser_statement_after_labels): Pass correct
1682 parameters to c_parser_do_statement.
1684 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1686 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1688 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1689 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1691 * c-tree.h (c_in_omp_for): Declare.
1692 * c-typeck.c (c_in_omp_for): Define.
1693 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1694 (digest_init): Likewise.
1695 (build_binary_op): Likewise.
1697 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1699 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1700 from kind by comma rather than colon.
1702 2020-06-05 Mark Wielaard <mark@klomp.org>
1704 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1705 an undeclared builtin, then add a fixit header hint, if found.
1706 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1707 warning_at about implicit builtin declaration type mismatch.
1709 2020-06-03 Mark Wielaard <mark@klomp.org>
1711 * c-parser.c (struct c_parser): Add seen_string_literal
1713 (c_parser_consume_token): Reset seen_string_literal.
1714 (c_parser_error_richloc): Add name_hint if seen_string_literal
1715 and next token is a CPP_NAME and we have a missing header
1716 suggestion for the name.
1717 (c_parser_string_literal): Set seen_string_literal.
1719 2020-06-03 Mark Wielaard <mark@klomp.org>
1721 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1722 scope with matching_parens after CPP_OPEN_PAREN.
1724 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
1726 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1728 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1730 * Make-lang.in: Remove extra slash.
1732 2020-05-19 Martin Liska <mliska@suse.cz>
1734 * c-parser.c: Fix typo.
1736 2020-05-14 Jakub Jelinek <jakub@redhat.com>
1738 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1740 2020-05-07 Richard Biener <rguenther@suse.de>
1743 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1746 2020-04-30 Jakub Jelinek <jakub@redhat.com>
1749 * c-decl.c (set_labels_context_r): In addition to context-less
1750 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1751 parent function if any.
1752 (store_parm_decls): Adjust comment.
1754 2020-04-19 Jakub Jelinek <jakub@redhat.com>
1757 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1758 two CPP_COLON tokens.
1760 2020-04-17 Jakub Jelinek <jakub@redhat.com>
1763 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1766 2020-04-15 Jakub Jelinek <jakub@redhat.com>
1769 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1770 requires directive when not at file scope.
1772 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
1775 * c-decl.c (c_check_in_current_scope): New function.
1776 * c-tree.h (c_check_in_current_scope): Declare it.
1777 * c-parser.c (c_parser_oacc_declare): Add check that variables
1778 are declared in the same scope as the directive. Fix handling
1781 2020-04-07 Jakub Jelinek <jakub@redhat.com>
1784 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1785 if c_parser_omp_master succeeded.
1787 2020-03-23 Jakub Jelinek <jakub@redhat.com>
1789 PR gcov-profile/94029
1791 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1792 the function_start_locus location. Don't do that afterwards for the
1793 __GIMPLE body parsing.
1795 2020-03-19 Jakub Jelinek <jakub@redhat.com>
1797 PR gcov-profile/94029
1798 * c-tree.h (finish_function): Add location_t argument defaulted to
1800 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1801 set it to the locus of closing } if non-NULL.
1802 (c_parser_compound_statement_nostart): Return locus of closing }.
1803 (c_parser_parse_rtl_body): Likewise.
1804 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1806 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1807 input_location to set function_end_locus.
1809 2020-03-17 Jakub Jelinek <jakub@redhat.com>
1812 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1813 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1814 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1815 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1817 (finish_incomplete_vars): New function, moved from finish_struct. Use
1818 relayout_decl instead of layout_decl.
1819 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1820 being TYPE_VFIELD. Use finish_incomplete_vars.
1821 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1822 finish_incomplete_vars.
1823 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1824 also on ENUMERAL_TYPEs.
1826 2020-03-16 Jakub Jelinek <jakub@redhat.com>
1829 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1831 2020-03-13 Martin Sebor <msebor@redhat.com>
1834 * c-decl.c (builtin_structptr_type_count): New constant.
1835 (match_builtin_function_types): Reject decls that are incompatible
1836 in types pointed to by pointers.
1837 (diagnose_mismatched_decls): Adjust comments.
1839 2020-03-05 Joseph Myers <joseph@codesourcery.com>
1842 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1843 empty when initialized type is error_mark_node.
1844 (set_designator, process_init_element): Ignore initializers for
1845 elements of a variable-size type or of error_mark_node.
1847 2020-03-01 Martin Sebor <msebor@redhat.com>
1850 * c-decl.c (types_close_enough_to_match): New function.
1851 (match_builtin_function_types):
1852 (diagnose_mismatched_decls): Add missing inform call to a warning.
1854 2020-03-01 Martin Sebor <msebor@redhat.com>
1857 * c-typeck.c (build_functype_attribute_variant): New function.
1858 (composite_type): Call it.
1860 2020-02-25 Jakub Jelinek <jakub@redhat.com>
1863 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1864 Rename last argument from probablity to probability.
1866 2020-02-13 Jakub Jelinek <jakub@redhat.com>
1869 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1870 *expr if it has side effects.
1872 2020-01-30 Jeff Law <law@redhat.com>
1875 * c-parser.c (c_parser_switch_statement): Make sure to request
1876 marking the switch expr as used.
1878 2020-01-22 Joseph Myers <joseph@codesourcery.com>
1881 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1882 argument with integer operands.
1884 2020-01-16 Kerem Kat <keremkat@gmail.com>
1887 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1888 to support 4 available tokens.
1890 2020-01-15 Joseph Myers <joseph@codesourcery.com>
1893 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1894 determine whether to set DECL_CONTEXT.
1896 2020-01-13 Joseph Myers <joseph@codesourcery.com>
1899 * c-typeck.c (build_c_cast): Check for expressions with integer
1900 operands that can occur in an unevaluated part of an integer
1901 constant expression and call note_integer_operands as needed.
1903 2019-01-08 Richard Biener <rguenther@suse.de>
1906 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1909 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1911 Update copyright years.
1913 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1915 * c-decl.c (collect_source_ref_cb): Delete.
1916 (for_each_global_decl): Rename into...
1917 (collect_source_refs): ...this. Call collect_source_ref directly.
1918 (c_parse_final_cleanups): Always call collect_source_ref on the main
1921 2019-12-19 Julian Brown <julian@codesourcery.com>
1922 Cesar Philippidis <cesar@codesourcery.com>
1924 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1926 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1927 Allow deref (->) in variable lists if true.
1928 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1929 Pass to c_parser_omp_variable_list.
1930 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1931 call to c_parser_omp_variable_list.
1932 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1933 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1934 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1935 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1936 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1937 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1938 and detach. Support deref.
1939 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1940 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1941 (c_oacc_check_attachments): New function.
1942 (c_finish_omp_clauses): Check attach/detach arguments for being
1943 pointers using above. Support deref.
1945 2019-12-19 Julian Brown <julian@codesourcery.com>
1946 Maciej W. Rozycki <macro@codesourcery.com>
1947 Tobias Burnus <tobias@codesourcery.com>
1948 Thomas Schwinge <thomas@codesourcery.com>
1950 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1951 (c_parser_oacc_data_clause): Likewise.
1952 (c_parser_oacc_all_clauses): Likewise.
1953 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1954 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1955 PRAGMA_OACC_CLAUSE_NO_CREATE.
1956 * c-typeck.c (handle_omp_array_sections): Support
1959 2019-12-09 David Malcolm <dmalcolm@redhat.com>
1961 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1962 Replace label_text ctor calls.
1964 2019-12-04 Joseph Myers <joseph@codesourcery.com>
1968 * c-typeck.c (convert_lvalue_to_rvalue): Call
1969 require_complete_type for arguments not of void types.
1970 (build_indirect_ref): Do not diagnose dereferencing pointers to
1972 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1974 2019-12-03 Joseph Myers <joseph@codesourcery.com>
1977 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1978 old-style parameter definitions.
1980 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1984 * c-decl.c (flexible_array_type_p): Move to common code.
1986 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1988 * c-decl.c (start_decl): Allow initialization of variables whose
1989 size is a POLY_INT_CST.
1990 (finish_decl): Use verify_type_context to check whether the target
1991 allows variables with a particular type to have static or thread-local
1992 storage duration. Don't raise a second error if such variables do
1993 not have a constant size.
1994 (grokdeclarator): Use verify_type_context to check whether the
1995 target allows fields or array elements to have a particular type.
1996 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1997 the target allows pointer difference for the types involved.
1998 (build_unary_op): Likewise for pointer increment and decrement.
2000 2019-11-29 Joseph Myers <joseph@codesourcery.com>
2002 * c-parser.c (struct c_parser): Add members raw_tokens and
2004 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
2005 using previously-lexed raw tokens.
2006 (c_parser_peek_nth_token_raw)
2007 (c_parser_check_balanced_raw_token_sequence): New functions.
2008 (c_parser_nth_token_starts_std_attributes): Use
2009 c_parser_check_balanced_raw_token_sequence for Objective-C.
2011 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2014 * c-decl.c (finish_declspecs): Use int instead of decimal
2015 floating-point types if decimal floating-point not supported.
2017 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2019 * c-tree.h (struct c_declarator): Use a structure for id member.
2020 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
2021 declarators at the start, not when handling individual declarators
2022 later. Use u.id.id instead of u.id.
2023 (grokfield): Use u.id.id instead of u.id.
2024 (build_id_declarator): Set u.id.id and u.id.attrs.
2025 (finish_declspecs): Handle postfix attributes in case of typedef
2026 name or typeof used.
2027 * c-parser.c (c_parser_direct_declarator)
2028 (c_parser_direct_declarator_inner): Place declarator for
2029 attributes inside that for function or array, not outside. Set
2030 u.id.attrs for identifiers.
2031 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
2032 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
2035 2019-11-22 Jakub Jelinek <jakub@redhat.com>
2038 * c-decl.c (identifier_global_tag): Define.
2040 2019-11-20 Richard Biener <rguenther@suse.de>
2043 * c-decl.c (grokdeclarator): Prevent inlining of nested
2044 function with VLA arguments.
2046 2019-11-20 Joseph Myers <joseph@codesourcery.com>
2048 * c-decl.c (c_warn_type_attributes): New function.
2049 (groktypename, grokdeclarator, finish_declspecs): Call
2050 c_warn_type_attributes before applying attributes to types.
2051 * c-tree.h (c_warn_type_attributes): Declare.
2053 2019-11-19 Joseph Myers <joseph@codesourcery.com>
2055 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
2056 standard attributes.
2057 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
2058 pedwarn for unknown standard attributes and return error_mark_node
2061 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
2063 * c-parser.c (c_parser_parse_rtl_body): Always call
2064 run_rtl_passes, even if startwith pass is not provided.
2066 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2068 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
2069 duplicate standard attributes.
2071 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2073 * c-decl.c (std_attribute_table): Add maybe_unused.
2075 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2077 * c-decl.c (std_attribute_table): Add fallthrough.
2078 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
2079 attribute at top level.
2081 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2083 * c-decl.c (std_attribute_table): New.
2084 (c_init_decl_processing): Register attributes from
2085 std_attribute_table.
2086 * c-parser.c (c_parser_attribute_arguments): Add arguments
2087 require_string and allow_empty_args. All callers changed.
2088 (c_parser_std_attribute): Set require_string argument for
2089 "deprecated" attribute.
2091 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2093 * c-parser.c (c_parser_postfix_expression)
2094 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
2095 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
2097 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
2099 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
2100 of build_same_sized_truth_vector_type.
2101 (build_vec_cmp): Likewise.
2103 2019-11-14 Jakub Jelinek <jakub@redhat.com>
2105 * c-parser.c (c_parser_omp_context_selector): Don't require score
2106 argument to fit into shwi, just to be INTEGER_CST. Diagnose
2109 * c-parser.c (c_parser_omp_context_selector): Rename
2110 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
2111 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
2112 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
2113 and string literals.
2115 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2117 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
2118 ctsk_tagfirstref_attrs.
2119 (struct c_declspecs): Update description of attrs. Add
2120 postfix_attrs and non_std_attrs_seen_p. Increase size of
2121 typespec_kind bit-field.
2122 (c_warn_unused_attributes): New declaration.
2123 (parser_xref_tag): Update prototype.
2124 * c-decl.c (c_warn_unused_attributes): New function.
2125 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
2126 ctsk_tagref_attrs. Handle attribute declarations.
2127 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
2128 (grokdeclarator): Handle standard attributes.
2129 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
2130 attributes to incomplete type reference.
2131 (xref_tag): Update call to parser_xref_tag.
2132 (declspecs_add_addrspace, declspecs_add_type)
2133 (declspecs_add_scspec, declspecs_add_attrs): Set
2134 non_std_attrs_seen_p.
2135 (finish_declspecs): Apply postfix standard attributes to type.
2136 * c-parser.c (c_token_starts_declspecs)
2137 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
2138 (c_parser_next_tokens_start_declaration): Update comments.
2139 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
2140 parser->tokens[2] to parser->tokens[1].
2141 (c_parser_nth_token_starts_std_attributes)
2142 (c_parser_std_attribute_specifier_sequence): New functions.
2143 (c_parser_declaration_or_fndef): Add arguments have_attrs and
2144 attrs. All callers changed. Handle standard attributes.
2145 (c_parser_parms_declarator, c_parser_parms_list_declarator)
2146 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
2147 All callers changed.
2148 (c_parser_declspecs): Add arguments start_std_attr_ok and
2149 end_std_attr_ok. All callers changed. Handle standard
2151 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2152 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
2153 (c_parser_compound_statement_nostart, c_parser_all_labels)
2154 (c_parser_label, c_parser_statement, c_parser_for_statement):
2155 Handle standard attributes.
2156 * c-parser.h (c_parser_declspecs): Update prototype.
2157 * gimple-parser.c (c_parser_gimple_declaration): Update call to
2160 2019-11-12 Martin Liska <mliska@suse.cz>
2162 * gimple-parser.c: Do not include params.h.
2164 2019-11-12 Martin Liska <mliska@suse.cz>
2166 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
2167 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
2170 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2171 Frederik Harwath <frederik@codesourcery.com>
2174 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
2175 (c_parser_oacc_kernels_parallel): Rename function to...
2176 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
2177 (c_parser_omp_construct): Update accordingly.
2180 2019-11-11 Jakub Jelinek <jakub@redhat.com>
2182 * c-parser.c (c_parser_translation_unit): Diagnose declare target
2183 without corresponding end declare target.
2185 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2187 * c-convert.c (convert): Only handle vector conversions if one of
2188 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
2190 * c-typeck.c (build_array_ref): Only allow vector indexing if the
2191 vectors satisfy gnu_vector_type_p.
2192 (build_unary_op): Only allow unary operators to be applied to
2193 vectors if they satisfy gnu_vector_type_p.
2194 (digest_init): Only allow by-element initialization of vectors
2195 if they satisfy gnu_vector_type_p.
2196 (really_start_incremental_init): Likewise.
2197 (push_init_level): Likewise.
2198 (pop_init_level): Likewise.
2199 (process_init_element): Likewise.
2200 (build_binary_op): Only allow binary operators to be applied to
2201 vectors if they satisfy gnu_vector_type_p.
2203 2019-11-08 Joseph Myers <joseph@codesourcery.com>
2205 * c-decl.c (grokparms): Convert () in a function definition to
2207 (store_parm_decls_oldstyle): Pedwarn for C2x.
2208 (store_parm_decls): Update comment about () not generating a
2211 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2213 * c-parser.c (c_parser_attribute_arguments): New function.
2214 Factored out of c_parser_gnu_attribute.
2215 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
2216 (c_parser_balanced_token_sequence, c_parser_std_attribute)
2217 (c_parser_std_attribute_specifier): New functions.
2218 (c_parser_transaction_attributes): Use
2219 c_parser_std_attribute_specifier.
2221 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2223 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
2224 lex_joined_string and translate_strings_p.
2225 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
2227 (c_parser_string_literal): New function.
2228 (c_parser_static_assert_declaration_no_semi): Use
2229 c_parser_string_literal. Do not set lex_untranslated_string.
2230 (c_parser_asm_string_literal): Use c_parser_string_literal.
2231 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
2232 (c_parser_gnu_attributes): Set and restore translate_strings_p
2233 instead of lex_untranslated_string.
2234 (c_parser_asm_statement): Do not set lex_untranslated_string.
2235 (c_parser_asm_operands): Likewise.
2236 (c_parser_has_attribute_expression): Set and restore
2237 translate_strings_p instead of lex_untranslated_string.
2238 (c_parser_postfix_expression): Use c_parser_string_literal.
2239 (pragma_lex): Likewise.
2240 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
2241 (c_parse_file): Set translate_strings_p.
2242 * gimple-parser.c (c_parser_gimple_postfix_expression)
2243 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
2244 * c-parser.c (c_parser_string_literal): Declare function.
2246 2019-11-02 Jakub Jelinek <jakub@redhat.com>
2248 * c-parser.c (c_finish_omp_declare_variant): Use
2249 omp_get_context_selector instead of c_omp_get_context_selector.
2251 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2253 * c-tree.h (c_simulate_enum_decl): Declare.
2254 * c-decl.c (c_simulate_enum_decl): New function.
2255 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2257 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2259 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2260 * c-decl.c (c_simulate_builtin_function_decl): New function.
2261 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2264 2019-10-28 Martin Sebor <msebor@redhat.com>
2267 * c-decl.c (names_builtin_p): Define a new function.
2269 2019-10-28 Richard Biener <rguenther@suse.de>
2272 * gimple-parser.c (c_parser_parse_gimple_body): Make
2273 current_bb the entry block initially to easier recover
2275 (c_parser_gimple_compound_statement): Adjust.
2277 2019-10-24 Jakub Jelinek <jakub@redhat.com>
2279 * c-parser.c (c_finish_omp_declare_variant): Use
2280 omp_context_selector_matches instead of
2281 c_omp_context_selector_matches.
2282 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2283 attribute in between declare target and end declare target
2286 2019-10-15 Joseph Myers <joseph@codesourcery.com>
2288 * c-parser.c (c_parser_attribute_any_word): Rename to
2289 c_parser_gnu_attribute_any_word. All callers changed.
2290 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
2292 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
2294 (c_parser_declaration_or_fndef, c_parser_declspecs)
2295 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2296 (c_parser_struct_declaration, c_parser_declarator)
2297 (c_parser_gnu_attribute, c_parser_compound_statement)
2298 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
2299 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
2300 attribute-related syntax productions.
2302 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2304 * c-objc-common.c (useful_aka_type_p): Replace with...
2305 (get_aka_type): ...this new function. Given the original type,
2306 decide which aka type to print (if any). Only look through typedefs
2307 if user_facing_original_type_p.
2308 (print_type): Update accordingly.
2310 2019-10-14 Jakub Jelinek <jakub@redhat.com>
2312 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
2313 into int NESTED, if it is 2, diagnose missing commas in between
2315 (c_parser_omp_context_selector): Pass 2 as last argument to
2316 c_parser_omp_all_clauses.
2318 2019-10-12 Jakub Jelinek <jakub@redhat.com>
2320 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
2321 For simd properties, put them directly into TREE_VALUE.
2322 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
2323 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
2324 add "omp declare variant base" attribute rather than
2325 "omp declare variant".
2327 2019-10-11 Joseph Myers <joseph@codesourcery.com>
2329 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2331 2019-10-10 Jakub Jelinek <jakub@redhat.com>
2333 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2334 true, terminate processing on closing paren and don't skip to end of
2336 (c_parser_omp_declare_simd): Handle also declare variant.
2337 (omp_construct_selectors, omp_device_selectors,
2338 omp_implementation_selectors, omp_user_selectors): New variables.
2339 (c_parser_omp_context_selector,
2340 c_parser_omp_context_selector_specification,
2341 c_finish_omp_declare_variant): New functions.
2342 (c_finish_omp_declare_simd): Handle both declare simd and
2344 (c_parser_omp_declare): Handle declare variant.
2346 2019-10-02 Joseph Myers <joseph@codesourcery.com>
2348 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2351 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2353 * c-objc-common.c (useful_aka_type_p): New function.
2354 (print_type): Use it to decide whether an aka type is worth printing.
2356 2019-09-27 Jakub Jelinek <jakub@redhat.com>
2359 * c-parser.c (c_parser_predefined_identifier): New function.
2360 (c_parser_postfix_expression): Use it.
2361 (c_parser_omp_variable_list): Parse predefined identifiers.
2362 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2363 in shared and firstprivate clauses, even when they are predetermined
2366 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2368 * c-typeck.c (build_function_call_vec): Take the original function
2369 decl as an optional final parameter. Pass all built-in calls to
2370 check_builtin_function_arguments.
2372 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2375 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2376 of identifiers in the external scope only for variables and functions.
2378 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2381 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2383 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2386 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2387 after determining that the first token is not
2388 PRAGMA_GCC_PCH_PREPROCESS.
2390 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2392 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2393 FUNCTION_DECL to the right value in the presence of nested declarators.
2395 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2398 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2400 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2403 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2404 of a built_in_function.
2405 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2407 2019-08-10 Jakub Jelinek <jakub@redhat.com>
2409 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2410 (c_parser_omp_clause_device_type): New function.
2411 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2412 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2413 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2414 diagnostics for declare target with clauses nested in clause-less
2415 declare target declaration-definition-seq.
2416 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2418 2019-08-09 Jakub Jelinek <jakub@redhat.com>
2420 * c-parser.c (check_no_duplicate_clause): Simplify using
2422 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2423 directive name modifiers.
2424 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2427 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2428 check_no_duplicate_clause call. Comment it out, instead emit a
2429 warning for duplicate dist_schedule clauses.
2431 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2433 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2435 2019-08-08 Jakub Jelinek <jakub@redhat.com>
2437 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2438 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2439 instead of generic_head to track duplicates.
2441 2019-08-07 Jakub Jelinek <jakub@redhat.com>
2443 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2444 (c_parser_omp_clause_use_device_addr): New function.
2445 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2446 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2447 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2448 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2449 map or use_device_* clauses.
2450 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2451 in OpenMP, require pointer type rather than pointer or array type.
2452 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2454 2019-07-31 Jakub Jelinek <jakub@redhat.com>
2457 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2458 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2461 2019-07-25 Martin Liska <mliska@suse.cz>
2462 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2465 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2467 2019-07-25 Martin Liska <mliska@suse.cz>
2469 * c-decl.c (merge_decls): Use new macros
2470 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2472 2019-07-23 Richard Biener <rguenther@suse.de>
2474 PR tree-optimization/83518
2475 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2476 a CFG also rebuild cgraph edges.
2478 2019-07-20 Jakub Jelinek <jakub@redhat.com>
2480 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2481 (c_parser_omp_clause_bind): New function.
2482 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2483 (OMP_LOOP_CLAUSE_MASK): Define.
2484 (c_parser_omp_loop): New function.
2485 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2486 loop combined with parallel or teams.
2487 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2488 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2490 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2493 * c-decl.c (finish_function): Check targetm.warn_func_return
2494 before issuing a -Wreturn-type warning.
2496 2019-07-12 Alexandre Oliva <oliva@adacore.com>
2498 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2499 (c_parser_compound_statement): Call it.
2501 2019-07-12 Jakub Jelinek <jakub@redhat.com>
2503 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2504 (c_parser_omp_clause_order): New function.
2505 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2506 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2507 PRAGMA_OMP_CLAUSE_ORDER.
2508 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2510 2019-07-10 Richard Biener <rguenther@suse.de>
2512 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2513 _Literal (int *) &x for address literals.
2515 2019-07-09 Martin Sebor <msebor@redhat.com>
2518 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2520 (field_decl_cmp): Same.
2521 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2523 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2525 2019-07-09 Martin Sebor <msebor@redhat.com>
2528 * c-decl.c: Change class-key from class to struct and vice versa
2529 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2530 * gimple-parser.c: Same.
2532 2019-07-01 Richard Biener <rguenther@suse.de>
2534 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2535 _Literal (char *) &"foo" for address literals pointing to
2538 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2540 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2541 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2542 C incompatibility if alternate "__intN__" form is used.
2544 2019-06-24 Martin Sebor <msebor@redhat.com>
2546 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2548 2019-06-10 Jakub Jelinek <jakub@redhat.com>
2550 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2551 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2552 (c_parser_omp_scan_loop_body): New function.
2553 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2554 inscan reduction clauses.
2555 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2556 non-inscan reductions on the same construct, or inscan reductions with
2557 ordered or schedule clauses, or inscan array reductions.
2559 2019-06-05 Martin Sebor <msebor@redhat.com>
2562 * c-typeck.c (c_finish_return): Only consider functions returning
2563 pointers as candidates for -Wreturn-local-addr.
2565 2019-06-05 Martin Sebor <msebor@redhat.com>
2567 * c-decl.c (start_decl): Adjust quoting and hyphenation
2569 (finish_decl): Same.
2570 (finish_enum): Same.
2571 (start_function): Same.
2572 (declspecs_add_type): Same.
2573 * c-parser.c (warn_for_abs): Same.
2574 * c-typeck.c (build_binary_op): Same.
2576 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2579 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2580 marked with an OpenACC 'routine' directive.
2583 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2584 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2587 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2588 clauses from "omp declare target" attribute.
2590 2019-05-16 Martin Sebor <msebor@redhat.com>
2592 * c-decl.c (start_decl): Quote keywords, operators, and
2593 types in diagnostics.
2594 (finish_decl): Same.
2595 * c-parser.c (c_parser_asm_statement): Same.
2596 (c_parser_conditional_expression): Same.
2597 (c_parser_transaction_cancel): Same.
2598 * c-typeck.c (c_common_type): Same.
2599 (build_conditional_expr): Same.
2600 (digest_init): Same.
2601 (process_init_element): Same.
2602 (build_binary_op): Same.
2604 2019-05-17 Richard Biener <rguenther@suse.de>
2606 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2607 (c_parser_gimple_unary_expression): Likewise.
2608 (c_parser_gimple_parentized_ternary_expression): New function.
2610 2019-05-16 Richard Biener <rguenther@suse.de>
2612 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2613 (c_parser_gimple_unary_expression): Likewise.
2615 2019-05-15 Richard Biener <rguenther@suse.de>
2617 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2620 2019-05-14 Richard Biener <rguenther@suse.de>
2622 * gimple-parser.c (c_parser_gimple_statement): Remove
2623 questionable auto-promotion to VIEW_CONVERT_EXPR.
2624 (c_parser_gimple_typespec): Split out from __MEM parsing.
2625 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2626 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2627 as __VIEW_CONVERT with -gimple.
2629 2019-05-09 Martin Liska <mliska@suse.cz>
2631 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2633 (c_parser_gimple_unary_expression): Parse also binary expression
2635 (c_parser_gimple_parentized_binary_expression): New function.
2637 2019-05-09 Martin Liska <mliska@suse.cz>
2639 * gimple-parser.c (struct gimple_parser): Add probability.
2640 for gimple_parser_edge.
2641 (gimple_parser::push_edge): Add new argument probability.
2642 (c_parser_gimple_parse_bb_spec): Parse also probability
2644 (c_parser_parse_gimple_body): Set edge probability.
2645 (c_parser_gimple_compound_statement): Consume token
2646 before calling c_parser_gimple_goto_stmt.
2648 (c_parser_gimple_statement): Pass new argument.
2649 (c_parser_gimple_goto_stmt): Likewise.
2650 (c_parser_gimple_if_stmt): Likewise.
2651 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2652 * c-parser.c (c_parser_declaration_or_fndef): Pass
2653 hot_bb_threshold argument.
2654 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2656 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2658 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2661 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2662 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2663 (c_parser_do_statement): Likewise.
2664 (c_parser_for_statement): Likewise. Formatting fixes.
2665 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2666 emit DEBUG_BEGIN_STMTs if needed.
2668 2019-04-19 Jakub Jelinek <jakub@redhat.com>
2671 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2672 (c_start_case): Don't clear it.
2673 (do_case): Adjust c_add_case_label caller.
2674 (c_finish_case): Adjust c_do_switch_warnings caller.
2677 * c-decl.c (merge_decls): If remove is main variant and
2678 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2679 variant that has newdecl as TYPE_NAME if any.
2681 2019-04-12 Jakub Jelinek <jakub@redhat.com>
2684 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2685 don't try to remove it from the variant list, but instead assert
2688 2019-04-01 Richard Biener <rguenther@suse.de>
2691 * c-tree.h (c_get_alias_set): Declare.
2692 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2693 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2694 as the underlying integer type.
2696 2019-03-19 Martin Sebor <msebor@redhat.com>
2698 PR tree-optimization/89688
2699 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2700 kinds of initializers.
2702 2019-03-19 Jakub Jelinek <jakub@redhat.com>
2705 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2706 return type even if quals_used is 0. Formatting fixes.
2708 2019-03-14 Richard Biener <rguenther@suse.de>
2710 * c-tree.h (enum c_declspec_il): New.
2711 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2713 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2714 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2715 (c_parser_declspecs): Adjust.
2716 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2717 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2719 (struct gimple_parser): New.
2720 (gimple_parser::push_edge): New method.
2721 (c_parser_gimple_parse_bb_spec): New helper.
2722 (c_parser_parse_gimple_body): Get start pass and IL specification.
2723 Initialize SSA and CFG.
2724 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2725 Build a gimple_parser parsing state and pass it along.
2726 (c_parser_gimple_statement): Change intermittend __PHI internal
2727 function argument for the edge.
2728 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2729 (c_parser_gimple_goto_stmt): Record edges to build.
2730 (c_parser_gimple_if_stmt): Likewise.
2731 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2732 (c_parser_gimple_or_rtl_pass_list): Likewise.
2734 2019-03-11 Martin Liska <mliska@suse.cz>
2736 * c-decl.c (check_for_loop_decls): Wrap an option name
2737 in a string format message and fix GNU coding style.
2738 * c-parser.c (c_parser_declspecs): Likewise.
2740 2019-03-08 Jakub Jelinek <jakub@redhat.com>
2742 PR tree-optimization/89550
2743 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2745 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2746 or warning returned true.
2748 2019-02-28 Jakub Jelinek <jakub@redhat.com>
2751 * c-typeck.c (convert_arguments): Call inform_declaration only if
2752 the previous warning_at call returned true.
2754 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2756 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2757 parameter. Adjust all users.
2758 (c_parser_oacc_simple_clause): Replace parser with loc formal
2759 parameter. Adjust all users.
2761 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
2764 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2765 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2767 2019-02-15 Jakub Jelinek <jakub@redhat.com>
2770 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2771 before c_decl_attributes rather than after it.
2773 2019-02-06 Jakub Jelinek <jakub@redhat.com>
2776 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2777 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2778 instead of 3 nested ifs.
2780 2019-02-06 Joseph Myers <joseph@codesourcery.com>
2783 * c-decl.c (finish_decl): Do not complete array types for arrays
2784 with external linkage not at file scope.
2786 2019-02-05 Richard Biener <rguenther@suse.de>
2789 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2790 all type variants when not supported.
2792 2019-01-30 Jakub Jelinek <jakub@redhat.com>
2795 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2796 * c-decl.c (decl_jump_unsafe): Return false for
2797 C_DECL_COMPOUND_LITERAL_P decls.
2798 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2800 2019-01-29 Jakub Jelinek <jakub@redhat.com>
2803 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2807 * c-decl.c (last_fileptr_type): Remove.
2808 (last_structptr_types): New variable.
2809 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2810 {old,new}rettype instead of the types themselves. Assert
2811 last_structptr_types array has the same number of elements
2812 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2813 argument oldtype and newtype. Instead of handling
2814 just fileptr_type_node specially, handle all builtin_structptr_types
2815 pointer nodes. Formatting fix.
2817 2019-01-24 Martin Sebor <msebor@redhat.com>
2822 * c-decl.c (match_builtin_function_types): Add arguments.
2823 (diagnose_mismatched_decls): Diagnose mismatched declarations
2824 of built-ins more strictly.
2826 2019-01-24 Jakub Jelinek <jakub@redhat.com>
2829 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2830 on #pragma omp cancel with different modifiers.
2832 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2836 * c-typeck.c (convert_for_assignment): Upate the
2837 warn_for_address_or_pointer_of_packed_member call.
2839 2019-01-16 Tom Honermann <tom@honermann.net>
2840 Jason Merrill <jason@redhat.com>
2842 * c-typeck.c (digest_init): Revised the error message produced for
2843 ill-formed cases of array initialization with a string literal.
2844 (error_init): Make variadic.
2846 2019-01-12 Jakub Jelinek <jakub@redhat.com>
2848 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2850 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2853 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2854 if current_function_decl is non-NULL.
2856 2019-01-07 Joseph Myers <joseph@codesourcery.com>
2860 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2861 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2862 functions declared but never defined only for external scope, not
2865 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2868 * c-parser.c (c_parser_postfix_expression): Parse
2869 __builtin_convertvector.
2871 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2873 Update copyright years.
2875 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2878 * c-typeck.c (convert_for_assignment): Call
2879 warn_for_address_or_pointer_of_packed_member.
2881 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2883 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2884 a more specific error message (instead of just falling through).
2886 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2888 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2889 asm qualifier is first seen; use that to give nicer "duplicate asm
2890 qualifier" messages. Delete 'quals" variable, instead pass the
2891 "is_volatile_ flag to build_asm_stmt directly.
2892 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2893 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2895 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2897 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2898 "done" boolean variable.
2900 2018-12-19 David Malcolm <dmalcolm@redhat.com>
2903 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2904 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2905 (build_binary_op): Use struct op_location_t and
2906 class binary_op_rich_location.
2908 2018-12-11 Jakub Jelinek <jakub@redhat.com>
2911 * c-convert.c (convert): Call c_fully_fold before calling
2912 ubsan_instrument_float_cast.
2914 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2916 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2919 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2921 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2922 after asm. Pass a flag for it to build_asm_expr.
2923 * c-tree.h (build_asm_expr): Update declaration.
2924 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2927 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2930 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2931 combination of volatile and goto, in any order, without repetitions.
2933 2018-12-04 James Norris <jnorris@codesourcery.com>
2934 Cesar Philippidis <cesar@codesourcery.com>
2935 Julian Brown <julian@codesourcery.com>
2937 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2940 2018-11-30 Richard Biener <rguenther@suse.de>
2942 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2943 _Literal (type) { ... } as empty aggregate or vector constructor.
2945 2018-11-29 Martin Sebor <msebor@redhat.com>
2948 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2949 (convert_arguments): Add comments. Pass additional argument to
2952 2018-11-29 Martin Sebor <msebor@redhat.com>
2956 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2958 2018-11-23 Martin Sebor <msebor@redhat.com>
2961 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2962 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2964 2018-11-20 Martin Sebor <msebor@redhat.com>
2966 * c-parser.c (c_parser_has_attribute_expression): New function.
2967 (c_parser_attribute): New function.
2968 (c_parser_attributes): Move code into c_parser_attribute.
2969 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2971 2018-11-15 Martin Sebor <msebor@redhat.com>
2974 * c-decl.c (header_for_builtin_fn): Declare.
2975 (diagnose_mismatched_decls): Diagnose declarations of built-in
2976 functions without a prototype.
2977 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2978 (convert_argument): Same.
2979 (convert_arguments): Factor code out into convert_argument.
2980 Detect mismatches between built-in formal arguments in calls
2981 to built-in without prototype.
2982 (build_conditional_expr): Same.
2983 (type_or_builtin_type): New function.
2984 (convert_for_assignment): Add argument. Conditionally issue
2985 warnings instead of errors for mismatches.
2987 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2989 * c-decl.c: Replace "source_location" with "location_t".
2990 * c-tree.h: Likewise.
2991 * c-typeck.c: Likewise.
2992 * gimple-parser.c: Likewise.
2994 2018-11-09 Jakub Jelinek <jakub@redhat.com>
2996 * c-parser.c (c_parser_omp_clause_final): Use
2997 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2998 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2999 parsing instead of c_parser_paren_condition.
3000 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
3001 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
3002 c_fully_fold instead of c_parser_condition.
3003 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
3004 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
3005 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
3006 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
3007 c_parser_expr_no_commas instead of c_parser_expression.
3009 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
3010 reduction clause with inscan modifier.
3012 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
3013 clauses other than atomic_default_mem_order.
3015 2018-11-08 Jakub Jelinek <jakub@redhat.com>
3017 * c-parser.c: Include memmode.h.
3018 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
3019 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
3020 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
3021 task_reduction clauses.
3022 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
3023 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
3024 section, or lvalue assignment expression.
3025 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
3026 (c_parser_omp_clause_lastprivate): Parse optional
3027 conditional: modifier.
3028 (c_parser_omp_clause_hint): Require constant integer expression rather
3029 than just integer expression.
3030 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
3032 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
3033 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
3034 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
3036 (c_parser_omp_clause_depend): Parse iterator modifier and handle
3037 iterators. Parse mutexinoutset and depobj kinds.
3038 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
3040 (c_parser_omp_all_clauses): Likewise. Handle
3041 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
3042 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3043 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
3044 default memory order from requires directive if any. Adjust
3045 c_finish_omp_atomic caller.
3046 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
3047 (c_parser_omp_flush): Parse flush with memory-order-clause.
3048 (c_parser_omp_for_loop): Allow NE_EXPR even in
3049 OpenMP loops, adjust c_finish_omp_for caller.
3050 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
3051 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
3052 Allow to be called while parsing combined parallel master.
3053 Parse combined master taskloop{, simd}.
3054 (c_parser_omp_parallel): Parse combined
3055 parallel master{, taskloop{, simd}} constructs.
3056 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
3057 (OMP_TASKGROUP_CLAUSE_MASK): Define.
3058 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
3059 (OMP_TASKWAIT_CLAUSE_MASK): Define.
3060 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
3061 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
3062 around teams body. Use SET_EXPR_LOCATION.
3063 (c_parser_omp_target_data): Allow target data
3064 with only use_device_ptr clauses.
3065 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
3066 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
3067 (c_parser_omp_requires): New function.
3068 (c_finish_taskloop_clauses): New function.
3069 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
3070 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
3071 declaration. Disallow in_reduction clause when combined with parallel
3073 (c_parser_omp_construct): Adjust c_parser_omp_master and
3074 c_parser_omp_taskgroup callers.
3075 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
3077 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
3078 like OMP_CLAUSE_REDUCTION.
3079 (handle_omp_array_sections): Likewise. Call save_expr on array
3080 reductions before calling build_index_type. Handle depend clauses
3082 (struct c_find_omp_var_s): New type.
3083 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
3084 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
3085 with static, runtime or auto schedule kinds. Call save_expr for whole
3086 array reduction sizes. Diagnose reductions with zero sized elements
3087 or variable length structures. Diagnose nogroup clause used with
3088 reduction clause(s). Handle depend clause with
3089 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
3090 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
3091 some different type for other kinds. Use build_unary_op with
3092 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
3093 Handle depend clauses with iterators. Remove no longer needed special
3094 case that predetermined const qualified vars may be specified in
3095 firstprivate clause. Complain if const qualified vars are mentioned
3096 in data-sharing clauses other than firstprivate or shared. Use
3097 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
3098 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
3099 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
3100 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
3102 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3104 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
3105 logic for change to name_hint::operator bool.
3106 (undeclared_variable): Likewise.
3107 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3108 (c_parser_parameter_declaration): Likewise.
3110 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3112 * c-errors.c (pedwarn_c11): New function.
3113 * c-parser.c (disable_extension_diagnostics): Save
3114 warn_c11_c2x_compat and set it to 0.
3115 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
3116 (c_parser_static_assert_declaration_no_semi): Handle
3117 _Static_assert without string constant.
3118 * c-tree.h (pedwarn_c11): New prototype.
3120 2018-10-17 David Malcolm <dmalcolm@redhat.com>
3122 * Make-lang.in (selftest-c): New.
3123 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3124 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
3125 from gcc/Makefile.in.
3127 2018-10-02 Richard Biener <rguenther@suse.de>
3129 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
3131 2018-09-26 Joseph Myers <joseph@codesourcery.com>
3134 * c-typeck.c (build_binary_op): Use excess precision for
3135 comparisons of integers and floating-point for C11 and later.
3137 2018-09-26 Martin Jambor <mjambor@suse.cz>
3140 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
3143 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3145 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3146 Update for new param.
3147 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
3150 2018-09-17 Martin Jambor <mjambor@suse.cz>
3153 * c-parser.c: (warn_for_abs): New function.
3154 (c_parser_postfix_expression_after_primary): Call it.
3156 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3158 * c-typeck.c (digest_init): Shorten overlength strings.
3160 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3162 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
3164 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3166 * c-decl.c (finish_decl): Call braced_list_to_string here ...
3167 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
3169 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
3171 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
3172 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
3174 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3177 * c-decl.c (implicitly_declare): Update call to
3178 maybe_add_include_fixit to suggest overriding the location, as it
3180 * c-objc-common.c (c_tree_printer): Update for conversion of
3181 show_caret_p to a tri-state.
3183 2018-08-27 Martin Liska <mliska@suse.cz>
3185 * c-decl.c (locate_old_decl): Use new function
3186 fndecl_built_in_p and remove check for FUNCTION_DECL if
3188 (diagnose_mismatched_decls): Likewise.
3189 (merge_decls): Likewise.
3190 (warn_if_shadowing): Likewise.
3191 (pushdecl): Likewise.
3192 (implicitly_declare): Likewise.
3193 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3194 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
3195 * c-typeck.c (build_function_call_vec): Likewise.
3196 (convert_arguments): Likewise.
3198 2018-08-20 David Malcolm <dmalcolm@redhat.com>
3201 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
3202 (diagnose_mismatched_decls): Likewise, in various places.
3203 (warn_if_shadowing): Likewise.
3204 (implicit_decl_warning): Likewise.
3205 (implicitly_declare): Likewise.
3206 (undeclared_variable): Likewise.
3207 (declare_label): Likewise.
3208 (grokdeclarator): Likewise.
3209 (start_function): Likewise.
3210 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3211 (c_parser_parameter_declaration): Likewise.
3212 (c_parser_binary_expression): Likewise.
3213 * c-typeck.c (c_expr_sizeof_expr): Likewise.
3214 (parser_build_binary_op): Likewise.
3215 (build_unary_op): Likewise.
3216 (error_init): Likewise.
3217 (pedwarn_init): Likewise.
3218 (warning_init): Likewise.
3219 (convert_for_assignment): Likewise.
3221 2018-08-15 David Malcolm <dmalcolm@redhat.com>
3223 * c-objc-common.c: Include "gcc-rich-location.h".
3224 (c_tree_printer): Move implemenation of '%T' to...
3225 (print_type): ...this new function.
3226 (range_label_for_type_mismatch::get_text): New function.
3227 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
3228 range for the various ic_argpass cases.
3229 (class maybe_range_label_for_tree_type_mismatch): New class.
3230 (build_binary_op): Use it when calling binary_op_error.
3232 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3234 * c-decl.c (start_decl): Do not warn if variables is named as main
3235 and is a local variable.
3237 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3240 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
3241 objects of unknown size.
3243 2018-08-13 Martin Sebor <msebor@redhat.com>
3245 PR tree-optimization/71625
3246 * c-parser.c (c_parser_declaration_or_fndef): Call
3247 braced_list_to_string.
3249 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3252 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3255 2018-08-01 Martin Sebor <msebor@redhat.com>
3257 PR tree-optimization/86650
3258 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3259 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3261 2018-08-01 Jakub Jelinek <jakub@redhat.com>
3264 * c-typeck.c (init_field_decl_cmp): New function.
3265 (output_pending_init_elements): Use it for field comparisons
3266 instead of pure bit_position comparisons.
3268 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3270 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3271 type here, instead add "omp declare target implicit" attribute.
3272 (finish_decl): Diagnose vars without mappable type here.
3274 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3275 Thomas Schwinge <thomas@codesourcery.com>
3276 Cesar Philippidis <cesar@codesourcery.com>
3278 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3279 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3280 to their non-present_or_* counterparts. Make 'self' an alias to
3281 PRAGMA_OACC_CLAUSE_HOST.
3282 (c_parser_oacc_data_clause): Update GOMP mappings for
3283 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3284 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3285 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
3286 Remove support for present_or_* clauses.
3287 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3288 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
3289 (OACC_DECLARE_CLAUSE_MASK): Likewise.
3290 (OACC_DATA_CLAUSE_MASK): Likewise.
3291 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3292 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
3293 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
3294 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
3295 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
3297 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3299 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
3300 * gimple-parser.c (c_parser_gimple_statement): Likewise.
3301 (c_parser_gimple_unary_expression): Likewise.
3303 2018-06-15 Jakub Jelinek <jakub@redhat.com>
3306 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
3307 before doing POINTER_DIFF_EXPR.
3309 2018-06-07 Marek Polacek <polacek@redhat.com>
3312 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
3313 for loop initial declarations.
3315 2018-05-30 David Pagan <dave.pagan@oracle.com>
3318 * c-decl.c (grokdeclarator): Update check for return type warnings.
3319 (start_function): Likewise.
3320 (finish_function): Likewise.
3321 * c-typeck.c (c_finish_return): Update check for return type warnings.
3322 Pass OPT_Wreturn_type to pedwarn when appropriate.
3324 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3326 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3329 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3331 * gimple-parser.c: Include internal-fn.h.
3332 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3333 (c_parser_gimple_call_internal): New function.
3334 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3335 Fix typos in comment.
3337 2018-05-10 Jakub Jelinek <jakub@redhat.com>
3340 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3341 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3343 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3344 fold_offsetof_1, pass argtype as TYPE to it and drop the
3347 2018-05-02 David Pagan <dave.pagan@oracle.com>
3350 * c-decl.c (old_style_parameter_scope): New function.
3351 * c-parser.c (c_parser_postfix_expression): Check for statement
3352 expressions in old-style function parameter list declarations.
3353 * c-parser.h (old_style_parameter_scope): New extern declaration.
3355 2018-04-25 Jakub Jelinek <jakub@redhat.com>
3358 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3359 it is not TREE_STATIC.
3360 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3361 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3362 its COMPOUND_LITERAL_EXPR_DECL.
3364 2018-03-21 Joseph Myers <joseph@codesourcery.com>
3366 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3367 where all functions return the same _FloatN or _FloatNx type,
3368 treat integer types as _Float64 instead of double.
3370 2018-03-21 Jakub Jelinek <jakub@redhat.com>
3373 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3374 building vector comparison, diagnose it and return error_mark_node.
3376 2018-03-15 Jakub Jelinek <jakub@redhat.com>
3379 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3380 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3381 INTEGER_TYPE element type.
3383 2018-03-13 David Pagan <dave.pagan@oracle.com>
3386 * c-typeck.c (output_init_element): Ensure field initializer
3387 expression is always evaluated if there are side effects.
3389 2018-03-06 Jakub Jelinek <jakub@redhat.com>
3392 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3393 !building_stmt_list_p ().
3395 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3398 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3399 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3400 and include the BIND_EXPR in the list of things that need to be
3403 2018-02-09 Nathan Sidwell <nathan@acm.org>
3406 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3407 to strict_aliasing_warning.
3409 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3411 * c-typeck.c (really_start_incremental_init, push_init_level,
3412 set_nonincremental_init, output_init_element, process_init_element):
3413 Use DECL_UNNAMED_BIT_FIELD.
3415 2018-01-31 Marek Polacek <polacek@redhat.com>
3418 * c-parser.c (c_parser_compound_statement_nostart): Call
3419 expansion_point_location_if_in_system_header.
3421 2018-01-17 David Malcolm <dmalcolm@redhat.com>
3424 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3427 2018-01-13 Jakub Jelinek <jakub@redhat.com>
3430 * c-tree.h (decl_constant_value_1): Add a bool argument.
3431 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3432 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3433 (decl_constant_value): Adjust caller.
3434 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3435 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3436 decl_constant_value returns initializer that has BLKmode or
3438 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3440 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3441 Alan Hayward <alan.hayward@arm.com>
3442 David Sherwood <david.sherwood@arm.com>
3444 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3445 TYPE_VECTOR_SUBPARTS.
3447 2018-01-03 Jakub Jelinek <jakub@redhat.com>
3449 Update copyright years.
3451 2018-01-01 Jakub Jelinek <jakub@redhat.com>
3454 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3455 c_parser_conditional_expression, c_parser_cast_expression,
3456 c_parser_sizeof_expression, c_parser_alignof_expression,
3457 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3458 c_parser_transaction_expression): Use set_error () method instead
3459 of setting value member to error_mark_node.
3461 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3463 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3464 and _Float<N>X built-in functions.
3466 2017-12-22 Jakub Jelinek <jakub@redhat.com>
3469 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3470 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3471 incomplete vars rather than after it.
3474 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3475 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3476 and consider empty ones if there are no other stmts. For
3477 -Wunused-value walk all statements before the one only followed by
3480 2017-12-22 Mike Stump <mikestump@comcast.net>
3481 Eric Botcazou <ebotcazou@adacore.com>
3483 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3484 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3485 (c_parser_do_statement): Likewise.
3486 (c_parser_for_statement): Likewise.
3487 (c_parser_statement_after_labels): Adjust calls to above.
3488 (c_parse_pragma_ivdep): New static function.
3489 (c_parser_pragma_unroll): Likewise.
3490 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3491 <PRAGMA_UNROLL>: New case.
3493 2017-12-19 Jakub Jelinek <jakub@redhat.com>
3495 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3496 perform_integral_promotions, digest_init): Replace Yoda conditions
3497 with typical order conditions.
3498 * c-decl.c (check_bitfield_type_and_width): Likewise.
3500 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3502 * c-typeck.c (c_safe_arg_type_equiv_p,
3503 c_safe_function_type_cast_p): New function.
3504 (build_c_cast): Implement -Wcast-function-type.
3506 2017-12-14 Richard Biener <rguenther@suse.de>
3509 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3510 like REALPART_EXPR for the behavior of whether its operand
3513 2017-12-12 Marek Polacek <polacek@redhat.com>
3516 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3518 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
3520 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3521 * c-parser.c (add_debug_begin_stmt): New.
3522 (c_parser_declaration_or_fndef): Call it.
3523 (c_parser_compound_statement_nostart): Likewise.
3524 (c_parser_statement_after_labels): Likewise.
3525 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3527 2017-12-07 Joseph Myers <joseph@codesourcery.com>
3529 * c-decl.c (build_compound_literal): Add parameter alignas_align
3530 and set alignment of decl if nonzero.
3531 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3532 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3534 (c_parser_struct_declaration): Update syntax comment.
3535 (c_parser_type_name): Add alignas_ok argument and pass it to
3537 (c_parser_cast_expression): Pass true to c_parser_type_name and
3538 give error if a cast used an _Alignas specifier.
3539 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3540 give error if sizeof (type-name) used an _Alignas specifier.
3541 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3542 give error if _Alignof (type-name) used an _Alignas specifier.
3543 (c_parser_postfix_expression_after_paren_type): Check specified
3544 alignment for a compound literal and pass it to
3545 build_compound_literal.
3546 * c-parser.h (c_parser_type_name): Update prototype.
3547 * c-tree.h (build_compound_literal): Update prototype.
3549 2017-12-07 Martin Sebor <msebor@redhat.com>
3552 * c-decl.c (c_decl_attributes): Look up existing declaration and
3553 pass it to decl_attributes.
3555 2017-12-06 David Malcolm <dmalcolm@redhat.com>
3558 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3559 reserved for use by the implementation.
3561 2017-12-06 David Malcolm <dmalcolm@redhat.com>
3563 * c-decl.c: Include "c-family/c-spellcheck.h".
3565 2017-12-05 Martin Liska <mliska@suse.cz>
3566 Jakub Jelinek <jakub@redhat.com>
3568 * c-typeck.c (pointer_diff): Add new argument and instrument
3569 pointer subtraction.
3570 (build_binary_op): Similar for pointer comparison.
3572 2017-12-01 Jakub Jelinek <jakub@redhat.com>
3575 * c-parser.c: Include tree-iterator.h.
3576 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3577 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3581 * c-tree.h (decl_constant_value_1): Declare.
3582 * c-typeck.c (decl_constant_value_1): New function.
3583 (decl_constant_value): Use it.
3584 * c-fold.c (c_fully_fold_internal): If in_init, use
3585 decl_constant_value_1 instead of decl_constant_value.
3587 2017-11-30 Jakub Jelinek <jakub@redhat.com>
3589 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3591 2017-11-28 Jakub Jelinek <jakub@redhat.com>
3594 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3595 c_switch_covers_all_cases_p returns true.
3597 2017-11-28 Julia Koval <julia.koval@intel.com>
3598 Sebastian Peryt <sebastian.peryt@intel.com>
3600 * Make-lang.in (c/c-array-notation.o): Remove.
3601 * c-array-notation.c: Delete.
3602 * c-decl.c: Remove cilkplus condition.
3603 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3604 c_parser_cilk_verify_simd, c_parser_array_notation,
3605 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3606 c_parser_cilk_simd_fn_vector_attrs,
3607 c_finish_cilk_simd_fn_tokens): Delete.
3608 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3609 (c_parser_direct_declarator_inner): Ditto.
3610 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3611 (c_parser_attributes, c_parser_compound_statement,
3612 c_parser_statement_after_labels, c_parser_if_statement,
3613 c_parser_switch_statement, c_parser_while_statement,
3614 c_parser_do_statement, c_parser_for_statement,
3615 c_parser_unary_expression, c_parser_postfix_expression,
3616 c_parser_postfix_expression_after_primary,
3617 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3618 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3620 * c-typeck.c (build_array_ref, build_function_call_vec,
3622 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3623 c_finish_loop, build_binary_op): Remove cilkplus support.
3625 2017-11-28 Jakub Jelinek <jakub@redhat.com>
3627 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3630 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
3632 * Make-lang.in (c.install-plugin): Install backend import library.
3634 2017-11-23 Jakub Jelinek <jakub@redhat.com>
3636 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3637 pragma_stmt context.
3639 2017-11-23 Mike Stump <mikestump@comcast.net>
3640 Eric Botcazou <ebotcazou@adacore.com>
3642 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3644 (c_parser_do_statement): Likewise.
3645 (c_parser_for_statement): Likewise.
3647 2017-11-22 David Malcolm <dmalcolm@redhat.com>
3650 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3651 bool to bool *. Within '%T' handling, if showing an "aka", use
3652 "quoted" param to add appropriate quoting.
3654 2017-11-22 Marek Polacek <polacek@redhat.com>
3659 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3661 2017-11-21 David Malcolm <dmalcolm@redhat.com>
3664 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3665 earlier failed lookups.
3667 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
3669 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3670 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3672 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3675 * c-decl.c: Include "c-family/known-headers.h".
3676 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3677 to known-headers.cc.
3678 (class suggest_missing_header): Move to known-header.h.
3679 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3680 than get_c_name_hint.
3682 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3684 * c-decl.c (get_c_name_hint): New function.
3685 (class suggest_missing_header): New class.
3686 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3687 suggest missing headers to the user.
3689 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3691 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3692 Include "c-family/name-hint.h"
3693 (implicit_decl_warning): Convert "hint" from
3694 const char * to name_hint. Pass location to
3695 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3696 warning was not printed.
3697 (undeclared_variable): Likewise for "guessed_id".
3698 (lookup_name_fuzzy): Convert return type from const char *
3699 to name_hint. Add location_t param.
3700 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3701 Include "c-family/name-hint.h"
3702 (c_parser_declaration_or_fndef): Convert "hint" from
3703 const char * to name_hint. Pass location to lookup_name_fuzzy.
3704 (c_parser_parameter_declaration): Likewise.
3706 2017-11-19 Jakub Jelinek <jakub@redhat.com>
3710 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3712 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3713 handle_omp_array_sections): Likewise.
3714 (digest_init): Don't call decl_constant_value_for_optimization.
3715 * c-tree.h (decl_constant_value_for_optimization): Removed.
3716 * c-fold.c (c_fold_array_ref): New function.
3717 (c_fully_fold_internal): Add LVAL argument, propagate it through
3718 recursive calls. For VAR_P call decl_constant_value and
3719 unshare if not LVAL and either optimizing or IN_INIT. Remove
3720 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3721 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3722 (c_fully_fold): Add LVAL argument, pass it through to
3723 c_fully_fold_internal.
3724 (decl_constant_value_for_optimization): Removed.
3726 2017-11-15 Joseph Myers <joseph@codesourcery.com>
3729 * c-parser.c (check_tgmath_function): New function.
3730 (enum tgmath_parm_kind): New enum.
3731 (c_parser_postfix_expression): Handle __builtin_tgmath.
3733 2017-10-31 David Malcolm <dmalcolm@redhat.com>
3735 * c-decl.c (implicit_decl_warning): Update for renaming of
3736 pedwarn_at_rich_loc and warning_at_rich_loc.
3737 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3738 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3739 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3740 (c_parser_struct_or_union_specifier): Likewise for renaming of
3741 pedwarn_at_rich_loc.
3742 (c_parser_parameter_declaration): Likewise for renaming of
3744 * c-typeck.c (build_component_ref): Likewise.
3745 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3746 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3747 (set_init_label): Likewise for renaming of error_at_rich_loc.
3749 2017-10-30 Richard Biener <rguenther@suse.de>
3751 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3754 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3756 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3757 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3759 2017-10-25 David Malcolm <dmalcolm@redhat.com>
3762 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3765 2017-10-25 Jakub Jelinek <jakub@redhat.com>
3768 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3769 newdecl to corresponding __builtin_ if any.
3771 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3774 * c-decl.c (diagnose_mismatched_decls): Use
3775 OPT_Wbuiltin_declaration_mismatch.
3777 2017-10-12 David Malcolm <dmalcolm@redhat.com>
3779 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3780 use it to guard calls to maybe_suggest_missing_token_insertion.
3781 (c_parser_parms_list_declarator): Override default value of new
3782 "type_is_unique" param to c_parser_require.
3783 (c_parser_asm_statement): Likewise.
3784 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3787 2017-10-11 Nathan Sidwell <nathan@acm.org>
3789 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3791 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3793 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3794 operating on trees as wide_ints.
3795 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3796 (c_tree_equal): Likewise.
3798 2017-10-04 David Malcolm <dmalcolm@redhat.com>
3800 * c-decl.c (push_parm_decl): Store c_parm's location into the
3802 (build_c_parm): Add "loc" param and store it within the c_parm.
3803 * c-parser.c (struct c_parser): Add "last_token_location" field.
3804 (c_parser_consume_token): Store location of the token into the
3806 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3807 when handling a FUNCTION_DECL, if it doesn't already have them.
3808 (c_parser_parameter_declaration): Generate a location for the
3809 parameter, and pass it to the call to build_c_parm.
3810 * c-tree.h (struct c_parm): Add field "loc".
3811 (build_c_parm): Add location_t param.
3812 * c-typeck.c (get_fndecl_argument_location): New function.
3813 (inform_for_arg): New function.
3814 (convert_for_assignment): Use inform_for_arg when dealing with
3817 2017-09-29 Jakub Jelinek <jakub@redhat.com>
3819 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3821 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3822 don't SET_DECL_C_BIT_FIELD here.
3825 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3826 instead of trying to set just TREE_READONLY manually.
3828 2017-09-16 Tom de Vries <tom@codesourcery.com>
3831 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3834 2017-09-15 Joseph Myers <joseph@codesourcery.com>
3837 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3839 (build_conditional_expr): For C11, generate result with excess
3840 precision when one argument is an integer and the other is of a
3841 type using excess precision.
3843 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3845 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3847 2017-09-13 Marek Polacek <polacek@redhat.com>
3850 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3851 than expr.original_type.
3853 2017-09-12 Nathan Sidwell <nathan@acm.org>
3855 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3856 resort_sorted_fields): Moved from c-family/c-common.c.
3857 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3859 2017-09-01 Joseph Myers <joseph@codesourcery.com>
3862 * c-typeck.c (build_atomic_assign): Handle argument with excess
3863 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3864 argument passed to build_binary_op and convert_for_assignment but
3865 not for call to c_fully_fold.
3866 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3867 Ensure build_binary_op is called with argument with original
3868 semantic type. Avoid calling c_fully_fold with an
3869 EXCESS_PRECISION_EXPR from build_binary_op.
3871 2017-09-01 Jakub Jelinek <jakub@redhat.com>
3874 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3876 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3877 Alan Hayward <alan.hayward@arm.com>
3878 David Sherwood <david.sherwood@arm.com>
3880 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3881 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3882 m1 and m2 to the signed equivalent of a fixed-point
3885 2017-08-24 David Malcolm <dmalcolm@redhat.com>
3887 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3888 than CAN_HAVE_LOCATION_P when determining whether to use the
3889 location_t value within "value".
3891 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3893 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3894 rather than peeking the location of the first token.
3895 * c-tree.h (c_expr::get_location): New method.
3897 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3899 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3900 to check_function_arguments.
3902 2017-08-18 Marek Polacek <polacek@redhat.com>
3904 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3907 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3910 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3911 (check_bitfield_type_and_width): Don't allow bit-field with
3912 warn_if_not_aligned type.
3914 2017-08-14 Martin Sebor <msebor@redhat.com>
3917 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3919 2017-08-11 Marek Polacek <polacek@redhat.com>
3922 * c-decl.c (pushtag): Only print inform if the warning was printed.
3923 (grokdeclarator): Likewise.
3925 2017-08-10 David Malcolm <dmalcolm@redhat.com>
3927 * c-parser.c (c_parser_error): Rename to...
3928 (c_parser_error_richloc): ...this, making static, and adding
3929 "richloc" parameter, passing it to the c_parse_error call,
3930 rather than calling c_parser_set_source_position_from_token.
3931 (c_parser_error): Reintroduce, reimplementing in terms of the
3932 above, converting return type from void to bool.
3933 (class token_pair): New class.
3934 (struct matching_paren_traits): New struct.
3935 (matching_parens): New typedef.
3936 (struct matching_brace_traits): New struct.
3937 (matching_braces): New typedef.
3938 (get_matching_symbol): New function.
3939 (c_parser_require): Add param MATCHING_LOCATION, using it to
3940 highlight matching "opening" tokens for missing "closing" tokens.
3941 (c_parser_skip_until_found): Likewise.
3942 (c_parser_static_assert_declaration_no_semi): Convert explicit
3943 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3944 class matching_parens, so that the pertinent open parenthesis is
3945 highlighted when there are problems locating the close
3947 (c_parser_struct_or_union_specifier): Likewise.
3948 (c_parser_typeof_specifier): Likewise.
3949 (c_parser_alignas_specifier): Likewise.
3950 (c_parser_simple_asm_expr): Likewise.
3951 (c_parser_braced_init): Likewise, for matching_braces.
3952 (c_parser_paren_condition): Likewise, for matching_parens.
3953 (c_parser_switch_statement): Likewise.
3954 (c_parser_for_statement): Likewise.
3955 (c_parser_asm_statement): Likewise.
3956 (c_parser_asm_operands): Likewise.
3957 (c_parser_cast_expression): Likewise.
3958 (c_parser_sizeof_expression): Likewise.
3959 (c_parser_alignof_expression): Likewise.
3960 (c_parser_generic_selection): Likewise.
3961 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3962 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3963 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3964 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3965 c_parser_skip_until_found call.
3966 (c_parser_objc_class_definition): Use class matching_parens as
3968 (c_parser_objc_method_decl): Likewise.
3969 (c_parser_objc_try_catch_finally_statement): Likewise.
3970 (c_parser_objc_synchronized_statement): Likewise.
3971 (c_parser_objc_at_property_declaration): Likewise.
3972 (c_parser_oacc_wait_list): Likewise.
3973 (c_parser_omp_var_list_parens): Likewise.
3974 (c_parser_omp_clause_collapse): Likewise.
3975 (c_parser_omp_clause_default): Likewise.
3976 (c_parser_omp_clause_if): Likewise.
3977 (c_parser_omp_clause_num_threads): Likewise.
3978 (c_parser_omp_clause_num_tasks): Likewise.
3979 (c_parser_omp_clause_grainsize): Likewise.
3980 (c_parser_omp_clause_priority): Likewise.
3981 (c_parser_omp_clause_hint): Likewise.
3982 (c_parser_omp_clause_defaultmap): Likewise.
3983 (c_parser_oacc_single_int_clause): Likewise.
3984 (c_parser_omp_clause_ordered): Likewise.
3985 (c_parser_omp_clause_reduction): Likewise.
3986 (c_parser_omp_clause_schedule): Likewise.
3987 (c_parser_omp_clause_num_teams): Likewise.
3988 (c_parser_omp_clause_thread_limit): Likewise.
3989 (c_parser_omp_clause_aligned): Likewise.
3990 (c_parser_omp_clause_linear): Likewise.
3991 (c_parser_omp_clause_safelen): Likewise.
3992 (c_parser_omp_clause_simdlen): Likewise.
3993 (c_parser_omp_clause_depend): Likewise.
3994 (c_parser_omp_clause_map): Likewise.
3995 (c_parser_omp_clause_device): Likewise.
3996 (c_parser_omp_clause_dist_schedule): Likewise.
3997 (c_parser_omp_clause_proc_bind): Likewise.
3998 (c_parser_omp_clause_uniform): Likewise.
3999 (c_parser_omp_for_loop): Likewise.
4000 (c_parser_cilk_clause_vectorlength): Likewise.
4001 (c_parser_cilk_clause_linear): Likewise.
4002 (c_parser_transaction_expression): Likewise.
4003 * c-parser.h (c_parser_require): Add param matching_location with
4004 default UNKNOWN_LOCATION.
4005 (c_parser_error): Convert return type from void to bool.
4006 (c_parser_skip_until_found): Add param matching_location with
4007 default UNKNOWN_LOCATION.
4009 2017-08-09 Marek Polacek <polacek@redhat.com>
4011 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
4012 * c-tree.h (build_external_ref): Update declaration.
4013 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
4014 (build_external_ref): Change the type of a parameter to bool.
4015 (parser_build_binary_op): Use true/false instead of 1/0.
4016 (pointer_diff): Likewise.
4017 (build_modify_expr): Likewise.
4018 (set_designator): Change the type of a parameter to bool.
4019 (set_init_index): Use true/false instead of 1/0.
4020 (set_init_label): Likewise.
4021 (output_init_element): Change the type of a parameter to bool.
4022 (output_pending_init_elements): Use true/false instead of 1/0.
4023 (process_init_element): Likewise.
4024 (build_binary_op): Change the type of a parameter to bool.
4026 2017-08-09 Marek Polacek <polacek@redhat.com>
4029 * c-typeck.c (pedwarn_init): Make the function take a variable list.
4030 Call emit_diagnostic_valist instead of pedwarn.
4031 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
4032 Print the relevant types in diagnostics.
4034 2017-08-09 Marek Polacek <polacek@redhat.com>
4037 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
4038 build_conditional_expr.
4039 * c-parser.c (c_parser_conditional_expression): Create locations for
4040 EXP1 and EXP2 from their source ranges. Pass the locations down to
4041 build_conditional_expr.
4042 * c-tree.h (build_conditional_expr): Update declaration.
4043 * c-typeck.c (build_conditional_expr): Add location_t parameters.
4044 For -Wsign-compare, also print the types.
4046 2017-08-08 Martin Liska <mliska@suse.cz>
4048 * c-convert.c: Include header files.
4049 * c-typeck.c: Likewise.
4051 2017-08-07 Martin Liska <mliska@suse.cz>
4053 * c-parser.c (c_parser_attributes): Canonicalize name of an
4056 2017-08-02 Marek Polacek <polacek@redhat.com>
4059 * c-parser.c (c_parser_unary_expression): Use set_error.
4063 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
4064 warnings. Avoid walking MACRO_MAP_LOCATIONS.
4066 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
4067 Martin Liska <mliska@suse.cz>
4069 * c-typeck.c (c_finish_goto_label): Build gimple predict
4072 2017-07-31 Martin Liska <mliska@suse.cz>
4075 * c-convert.c (convert): Guard condition with flag_sanitize_p
4076 also with current_function_decl non-null equality.
4077 * c-decl.c (grokdeclarator): Likewise.
4078 * c-typeck.c (build_binary_op): Likewise.
4080 2017-07-25 Marek Polacek <polacek@redhat.com>
4082 * c-decl.c (grokfield): Remove local variable.
4084 2017-07-25 Marek Polacek <polacek@redhat.com>
4087 * c-parser.c (c_parser_else_body): Don't warn about multistatement
4088 macro expansion if the body is in { }.
4089 (c_parser_while_statement): Likewise.
4090 (c_parser_for_statement): Likewise.
4092 2017-07-18 Nathan Sidwell <nathan@acm.org>
4094 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
4096 2017-07-14 David Malcolm <dmalcolm@redhat.com>
4098 * c-decl.c (implicitly_declare): When suggesting a missing
4099 #include, provide a fix-it hint.
4101 2017-07-06 David Malcolm <dmalcolm@redhat.com>
4103 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
4104 and call that instead.
4105 * c-tree.h (selftest::run_c_tests): New decl.
4107 2017-06-26 Marek Polacek <polacek@redhat.com>
4110 * c-parser.c (c_parser_if_body): Set the location of the
4111 body of the conditional after parsing all the labels. Call
4112 warn_for_multistatement_macros.
4113 (c_parser_else_body): Likewise.
4114 (c_parser_switch_statement): Likewise.
4115 (c_parser_while_statement): Likewise.
4116 (c_parser_for_statement): Likewise.
4117 (c_parser_statement): Add a default argument. Save the location
4118 after labels have been parsed.
4119 (c_parser_c99_block_statement): Likewise.
4121 2017-06-19 Richard Biener <rguenther@suse.de>
4123 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4124 negated _Literals to parse _Literal (int) -1.
4126 2017-06-13 Martin Liska <mliska@suse.cz>
4129 * c-convert.c (convert): Use sanitize_flags_p.
4130 * c-decl.c (grokdeclarator): Likewise.
4131 * c-typeck.c (convert_for_assignment): Likewise.
4132 (c_finish_return): Likewise.
4133 (build_binary_op): Likewise.
4135 2017-06-08 Jakub Jelinek <jakub@redhat.com>
4138 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
4139 to sizetype before size_binop.
4141 2017-06-07 Jakub Jelinek <jakub@redhat.com>
4143 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
4146 2017-06-06 Marek Polacek <polacek@redhat.com>
4149 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
4151 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
4153 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4155 * c-parser.c (c_parser_binary_expression): Implement the
4156 -Wsizeof_pointer_div warning.
4157 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
4158 from a parenthesized expression.
4159 (c_parser_expr_list): Use c_last_sizeof_loc.
4160 * c-tree.h (c_last_sizeof_loc): New external.
4161 * c-typeck.c (c_last_sizeof_loc): New variable.
4162 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
4164 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
4167 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
4169 2017-05-30 David Malcolm <dmalcolm@redhat.com>
4171 * c-objc-common.c (c_tree_printer): Gain bool and const char **
4174 2017-05-24 Martin Sebor <msebor@redhat.com>
4177 * c-fold.c (c_fully_fold_internal): Adjust.
4178 * c-typeck.c (parser_build_unary_op): Adjust.
4180 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
4182 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
4183 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
4186 2017-05-23 Marek Polacek <polacek@redhat.com>
4188 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
4191 2017-05-22 Jakub Jelinek <jakub@redhat.com>
4193 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
4194 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
4195 it returned invariant. Call tree_invariant_p unconditionally
4196 afterwards to decide whether to return expr or op0.
4198 2017-05-22 Nathan Sidwell <nathan@acm.org>
4200 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
4202 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
4204 * c-parser.c (c_parser_omp_clause_default): Handle
4205 "OMP_CLAUSE_DEFAULT_PRESENT".
4207 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4209 * config-lang.in (gtfiles): Add c-family/c-format.c.
4211 2017-05-18 Nathan Sidwell <nathan@acm.org>
4213 * c-decl.c (pushdecl_top_level): Delete unused function.
4215 2017-05-18 Marek Polacek <polacek@redhat.com>
4217 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
4218 (check_earlier_gotos): Likewise.
4219 (define_label): Likewise.
4220 (pending_xref_error): Likewise.
4221 (smallest_type_quals_location): Likewise.
4222 (grokdeclarator): Likewise.
4223 (grokparms): Likewise.
4224 (identifier_global_value): Likewise.
4225 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
4226 (find_init_member): Likewise.
4228 2017-05-18 Marek Polacek <polacek@redhat.com>
4230 * c-decl.c (start_decl): Use false/true instead of 0/1.
4231 (grokdeclarator): Likewise.
4232 (finish_struct): Likewise.
4233 (start_function): Change the return type to bool. Use false/true
4235 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
4236 * c-tree.h (start_function): Update.
4237 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
4238 (set_designator): Change the return type to bool. Use false/true
4241 2017-05-17 Marek Polacek <polacek@redhat.com>
4243 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
4244 * c-typeck.c: Likewise.
4246 2017-05-17 Marek Polacek <polacek@redhat.com>
4249 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4250 DECL_IGNORED_P even for non-static compound literals.
4252 2017-05-17 Martin Liska <mliska@suse.cz>
4254 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4255 use it instead of int type.
4257 2017-05-17 Marek Polacek <polacek@redhat.com>
4259 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4261 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
4262 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
4263 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4264 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4266 (c_parser_conditional_expression): Likewise.
4267 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4268 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4269 (process_init_element): Likewise.
4270 (build_binary_op): Likewise.
4271 (handle_omp_array_sections_1): Likewise.
4273 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4275 * c-parser.c (c_parser_omp_clause_num_gangs)
4276 (c_parser_omp_clause_num_workers)
4277 (c_parser_omp_clause_vector_length): Merge functions into...
4278 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4281 2017-05-11 Nathan Sidwell <nathan@acm.org>
4283 * gimple-parser.c: Don't #include tree-dump.h.
4285 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4288 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
4290 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4293 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4294 incorrect __MEM syntax.
4296 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4299 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
4302 2017-05-09 Nathan Sidwell <nathan@acm.org>
4304 * c-tree.h (pushdecl): Declare.
4306 2017-05-05 David Malcolm <dmalcolm@redhat.com>
4308 * c-decl.c (warn_defaults_to): Replace report_diagnostic
4309 with diagnostic_report_diagnostic.
4310 * c-errors.c (pedwarn_c99): Likewise.
4311 (pedwarn_c90): Likewise.
4313 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4316 * c-gimplify.c (c_gimplify_expr): Remove calls to
4317 cilk_gimplifY_call_params_in_spawned_fn.
4319 2017-04-25 David Malcolm <dmalcolm@redhat.com>
4321 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
4322 hint for removing extra semicolon.
4324 2017-04-21 Jakub Jelinek <jakub@redhat.com>
4327 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
4328 enabled, set specs->type to integer_type_node.
4330 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
4332 * c-array-notation.c: Fix typo in comment.
4334 2017-03-29 Marek Polacek <polacek@redhat.com>
4337 * c-decl.c (finish_decl): Check VAR_P.
4339 2017-03-27 Jakub Jelinek <jakub@redhat.com>
4342 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4343 * c-typeck.c (c_mark_addressable): Likewise. Look through
4344 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4346 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4348 2017-03-23 Marek Polacek <polacek@redhat.com>
4350 * c-tree.h: Remove a C_RID_YYCODE reference.
4352 2017-03-21 Jakub Jelinek <jakub@redhat.com>
4355 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4356 optional COMPOUND_EXPR with ubsan instrumentation.
4358 2017-03-17 Marek Polacek <polacek@redhat.com>
4360 * c-parser.c: Add C11 references.
4362 2017-03-15 Marek Polacek <polacek@redhat.com>
4364 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4366 2017-03-11 Marek Polacek <polacek@redhat.com>
4368 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4370 2017-03-10 David Malcolm <dmalcolm@redhat.com>
4372 PR translation/79848
4373 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4375 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4377 2017-03-09 Marek Polacek <polacek@redhat.com>
4380 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4381 parameter declarations with initializers.
4383 2017-03-09 Jakub Jelinek <jakub@redhat.com>
4386 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4389 2017-03-07 Jakub Jelinek <jakub@redhat.com>
4392 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4393 for "may only be used in compound statements" diagnostics, change it
4394 such that the same translatable string is used for all pragmas. For
4395 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4397 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4398 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4399 "may only be used in compound statements" diagnostics, such that the
4400 same translatable string is used for all pragmas.
4402 2017-03-04 Marek Polacek <polacek@redhat.com>
4405 * c-decl.c (implicit_decl_warning): Add missing space.
4407 2017-03-03 Marek Polacek <polacek@redhat.com>
4410 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4411 current_function_prototype_arg_types is error_mark_node. Fix
4412 formatting. Use TREE_VALUE instead of TREE_TYPE.
4414 2017-03-03 Jakub Jelinek <jakub@redhat.com>
4417 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4418 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4419 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4423 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4424 instead of %<_Generic>.
4425 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4426 (c_parser_omp_target_exit_data): Use %<release%> instead of
4429 2017-02-28 Jakub Jelinek <jakub@redhat.com>
4431 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4432 instead of just cond ? "..." : "...".
4433 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4434 for "enter"/"exit" keyword.
4435 (c_finish_oacc_routine): Don't use %s to supply portions of the
4438 2017-02-24 Jakub Jelinek <jakub@redhat.com>
4441 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4442 handle -Wrestrict here.
4443 * c-typeck.c (build_function_call_vec): Adjust
4444 check_function_arguments caller.
4446 2017-02-23 Richard Biener <rguenther@suse.de>
4449 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4450 to initialize c_exprs to return.
4451 (c_parser_gimple_binary_expression): Likewise.
4452 (c_parser_gimple_unary_expression): Likewise.
4453 (c_parser_gimple_postfix_expression): Likewise.
4455 2017-02-22 Marek Polacek <polacek@redhat.com>
4458 * c-typeck.c (convert_arguments): Handle error_mark_node.
4460 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4462 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4463 value of c_parser_parse_ssa_name against error_mark_node and emit
4464 error if ssa name is anonymous and written as default definition.
4466 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4468 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4471 2017-02-16 Jakub Jelinek <jakub@redhat.com>
4474 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4475 ignore #pragma omp target even when not followed by identifier.
4477 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4479 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4480 (c_parser_gimple_unary_expression): Likewise.
4482 2017-02-13 Jakub Jelinek <jakub@redhat.com>
4484 * c-parser.c (c_parser_oacc_declare): Add missing space in
4487 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4490 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4491 set_c_expr_source_range when parsing ssa-name.
4493 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
4494 Richard Biener <rguenther@suse.de>
4496 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4497 building IL when arguments are error_mark_node.
4498 (c_parser_gimple_unary_expression): Likewise.
4499 (c_parser_gimple_if_stmt): Likewise.
4500 (c_parser_gimple_switch_stmt): Likewise.
4501 (c_parser_gimple_return_stmt): Likewise.
4502 (c_parser_parse_ssa_name): When name lookup fails do not build
4503 an SSA name. Use undeclared rather than not declared in error
4506 2017-02-09 Marek Polacek <polacek@redhat.com>
4509 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4510 instead of c_parser_skip_until_found.
4512 2017-02-09 Jakub Jelinek <jakub@redhat.com>
4515 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4516 symtab_node::get on automatic variables.
4518 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4519 Chung-Lin Tang <cltang@codesourcery.com>
4521 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4522 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4524 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4526 2017-02-07 Richard Biener <rguenther@suse.de>
4528 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4529 (c_parser_gimple_postfix_expression_after_primary):
4530 Do not use c_build_function_call_vec to avoid folding and promotion.
4533 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4536 * c-decl.c (pop_scope): Pass main_input_filename to
4537 build_translation_unit_decl.
4539 2017-01-24 David Malcolm <dmalcolm@redhat.com>
4541 * c-parser.c: Include "read-rtl-function.h" and
4543 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4544 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4545 production. Update for renaming of field "gimple_pass" to
4546 "gimple_or_rtl_pass". If __RTL was seen, call
4547 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4548 to an auto_timevar, to cope with early exit.
4549 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4550 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4551 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4553 (c_parser_parse_rtl_body): New function.
4554 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4555 (struct c_declspecs): Rename field "gimple_pass" to
4556 "gimple_or_rtl_pass". Add field "rtl_p".
4557 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4558 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4559 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4560 (c_parser_gimple_or_rtl_pass_list): ...this.
4562 2017-01-20 Marek Polacek <polacek@redhat.com>
4565 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4567 2017-01-13 Richard Biener <rguenther@suse.de>
4569 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4572 2017-01-13 Richard Biener <rguenther@suse.de>
4574 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4575 _Literal ( type-name ) number.
4577 2017-01-12 Richard Biener <rguenther@suse.de>
4579 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4582 2017-01-11 Jakub Jelinek <jakub@redhat.com>
4585 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4588 2017-01-11 Richard Biener <rguenther@suse.de>
4591 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4592 returns on parse errors.
4594 2017-01-04 Marek Polacek <polacek@redhat.com>
4597 * c-parser.c (c_parser_postfix_expression): Mark zero character
4598 constants by setting original_type in c_expr.
4599 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4600 with a zero character constant.
4601 (char_type_p): New function.
4603 2017-01-04 David Malcolm <dmalcolm@redhat.com>
4605 * c-parser.c (c_parser_declaration_or_fndef): Create a
4606 rich_location at init_loc and parse it to start_init.
4607 (last_init_list_comma): New global.
4608 (c_parser_braced_init): Update last_init_list_comma when parsing
4609 commas. Pass it to pop_init_level. Pass location of closing
4610 brace to pop_init_level.
4611 (c_parser_postfix_expression_after_paren_type): Create a
4612 rich_location at type_loc and parse it to start_init.
4613 (c_parser_omp_declare_reduction): Likewise for loc.
4614 * c-tree.h (start_init): Add rich_location * param.
4615 (pop_init_level): Add location_t param.
4616 * c-typeck.c (struct initializer_stack): Add field
4617 "missing_brace_richloc".
4618 (start_init): Add richloc param, use it to initialize
4619 the stack node's missing_brace_richloc.
4620 (last_init_list_comma): New decl.
4621 (finish_implicit_inits): Pass last_init_list_comma to
4623 (push_init_level): When finding missing open braces, add fix-it
4624 hints to the richloc.
4625 (pop_init_level): Add "insert_before" param and pass it
4626 when calling pop_init_level. Add fixits about missing
4627 close braces to any richloc. Use the richloc for the
4628 -Wmissing-braces warning.
4629 (set_designator): Pass last_init_list_comma to pop_init_level.
4630 (process_init_element): Likewise.
4632 2017-01-01 Jakub Jelinek <jakub@redhat.com>
4634 Update copyright years.
4636 2016-12-21 Jakub Jelinek <jakub@redhat.com>
4639 * c-typeck.c (build_function_call_vec): If check_function_arguments
4640 returns true, set TREE_NO_WARNING on CALL_EXPR.
4643 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4644 to *expr instead of overwriting it.
4646 2016-12-20 Richard Biener <rguenther@suse.de>
4648 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4650 (c_parser_gimple_statement): Only build assigns for non-error
4652 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4654 2016-12-14 Martin Jambor <mjambor@suse.cz>
4656 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4658 (c_finish_oacc_routine): Adjusted call to
4659 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4660 to use their new names.
4661 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4663 (c_parser_oacc_update): Likewise.
4664 (c_parser_omp_simd): Likewise.
4665 (c_parser_omp_target_update): Likewise.
4666 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4667 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4669 (c_finish_omp_cancellation_point): Likewise.
4670 * gimple-parser.c: Do not include omp-low.h
4672 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4673 James Norris <jnorris@codesourcery.com>
4675 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4676 EXIT_DATA,WAIT} are not used in compound statements.
4677 (c_parser_oacc_enter_exit_data): Update diagnostics.
4679 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4682 * c-decl.c (diagnose_mismatched_decls): Use
4683 OPT_Wbuiltin_declaration_mismatch here too.
4685 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
4686 Alan Hayward <alan.hayward@arm.com>
4687 David Sherwood <david.sherwood@arm.com>
4689 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4690 (make_label, finish_struct): Likewise.
4692 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
4693 Richard Biener <rguenther@suse.de>
4695 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4696 * config-lang.in (gtfiles): Add c/c-parser.h.
4697 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4698 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4699 * c-parser.c (enum c_id_kind, struct c_token,
4700 c_parser_next_token_is, c_parser_next_token_is_not,
4701 c_parser_next_token_is_keyword,
4702 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4704 * c-parser.h: ... new header.
4705 * c-parser.c: Include c-parser.h and gimple-parser.h.
4706 (c_parser_peek_token, c_parser_peek_2nd_token,
4707 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4708 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4709 c_parser_error, c_parser_require, c_parser_skip_until_found,
4710 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4711 c_parser_type_name): Export.
4712 (c_parser_tokens_buf): New function.
4713 (c_parser_error): Likewise.
4714 (c_parser_set_error): Likewise.
4715 (c_parser_declspecs): Handle RID_GIMPLE.
4716 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4717 via c_parser_parse_gimple_body.
4718 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4719 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4720 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4721 c_parser_error, c_parser_require, c_parser_skip_until_found,
4722 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4723 c_parser_type_name): Declare.
4724 (struct c_parser): Declare forward.
4725 (c_parser_tokens_buf): Declare.
4726 (c_parser_error): Likewise.
4727 (c_parser_set_error): Likewise.
4728 * gimple-parser.c: New file.
4729 * gimple-parser.h: Likewise.
4731 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4734 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4737 2016-09-11 Le-Chun Wu <lcwu@google.com>
4738 Mark Wielaard <mjw@redhat.com>
4740 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4741 to the given -Wshadow= variant.
4743 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4745 * c-typeck.c: Include memmodel.h.
4747 2016-10-13 Jakub Jelinek <jakub@redhat.com>
4750 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4751 instead of lhd_return_null_tree_v.
4753 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4756 * c-decl.c (smallest_type_quals_location): New static function.
4757 (grokdeclarator): Try to find the correct location for an ignored
4760 2016-09-26 Marek Polacek <polacek@redhat.com>
4763 * c-decl.c (pop_scope): Add gcc_fallthrough.
4765 2016-09-26 Marek Polacek <polacek@redhat.com>
4768 * c-parser.c (struct c_token): Add flags field.
4769 (c_lex_one_token): Pass it to c_lex_with_flags.
4770 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4771 into IFN_FALLTHROUGH.
4772 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4773 attribute fallthrough after a case label or default label.
4774 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4776 2016-09-24 Marek Polacek <polacek@redhat.com>
4779 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4780 have boolean value. Warn about ++/-- on booleans.
4782 2016-09-23 Jakub Jelinek <jakub@redhat.com>
4784 * c-parser.c (incomplete_record_decls): Remove unnecessary
4785 = vNULL initialization of file scope vec.
4787 2016-09-16 Marek Polacek <polacek@redhat.com>
4789 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4791 2016-09-14 Marek Polacek <polacek@redhat.com>
4793 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4794 (fix_array_notation_expr): Likewise.
4795 * c-decl.c (finish_decl): Likewise.
4796 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4797 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4798 (function_to_pointer_conversion): Use false instead of 0.
4799 (convert_lvalue_to_rvalue): Likewise.
4800 (parser_build_unary_op): Likewise.
4801 (build_atomic_assign): Likewise.
4802 (build_unary_op): Change nonconvert parameter type to bool, use
4803 true/false instead of 1/0.
4804 (build_binary_op): Use true instead of 1.
4806 2016-09-13 David Malcolm <dmalcolm@redhat.com>
4808 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4809 of add_fixit_insert to add_fixit_insert_before.
4811 2016-09-13 Marek Polacek <polacek@redhat.com>
4813 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4816 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4819 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4820 COMPOUND_EXPR to warn_for_omitted_condop.
4822 2016-09-07 David Malcolm <dmalcolm@redhat.com>
4824 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4825 c_get_substring_location for this new langhook.
4827 2016-09-02 Jakub Jelinek <jakub@redhat.com>
4830 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4832 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4833 instead of mark_exp_read on low_bound/length expression.
4834 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4835 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4836 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4837 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4838 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4839 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4840 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4841 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4842 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4843 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4844 instead of mark_expr_read.
4845 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4846 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4847 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4848 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4849 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4850 array section bases outside of depend clause, for depend clause
4851 use convert_lvalue_to_rvalue on the base.
4852 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4853 linear, aligned, map, to and from clauses.
4854 (c_omp_clause_copy_ctor): New function.
4856 2016-09-01 Marek Polacek <polacek@redhat.com>
4859 * c-typeck.c (composite_type): Add FALLTHRU comment.
4861 2016-08-31 David Malcolm <dmalcolm@redhat.com>
4863 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4864 to the insertion fixits for "struct", "union", and "enum".
4866 2016-08-30 David Malcolm <dmalcolm@redhat.com>
4868 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4869 rather than add_fixit_misspelled_id.
4870 (undeclared_variable): Likewise.
4871 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4872 now-redundant "here" params from add_fixit_insert method calls.
4873 (c_parser_parameter_declaration): Likewise.
4874 * c-typeck.c (build_component_ref): Remove now-redundant range
4875 param from add_fixit_replace method calls.
4877 2016-08-25 Marek Polacek <polacek@redhat.com>
4879 * c-typeck.c (parser_build_binary_op): Pass LHS to
4880 warn_logical_not_parentheses.
4882 2016-08-25 Marek Polacek <polacek@redhat.com>
4885 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4886 or _FloatN or _FloatNx is not supported.
4887 (finish_declspecs): Set type to integer_type_node when _FloatN or
4888 _FloatNx is not supported.
4890 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4893 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4894 (struct c_declspecs): Add field floatn_nx_idx.
4895 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4896 and _FloatNx type specifiers.
4897 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4898 (c_parser_declspecs, c_parser_attribute_any_word)
4899 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4900 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4901 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4902 narrower than double.
4904 2016-08-12 Jakub Jelinek <jakub@redhat.com>
4905 Martin Liska <mliska@suse.cz>
4908 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4909 % to determine val element to change. Assert that
4910 wchar_bytes * charwidth fits into val array.
4912 2016-08-12 Marek Polacek <polacek@redhat.com>
4915 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4916 (c_parser_postfix_expression): Likewise.
4917 * c-typeck.c (build_unary_op): Adjust fall through comment.
4918 (c_mark_addressable): Likewise.
4920 2016-08-11 Jakub Jelinek <jakub@redhat.com>
4923 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4924 array member through typedef, for orig_qual_indirect == 0 clear
4927 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4930 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4931 this up to selftest::run_c_tests.
4932 (selftest::run_c_tests): New function.
4934 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4936 * c-parser.c (struct oacc_routine_data): Add error_seen and
4937 fndecl_seen members.
4938 (c_finish_oacc_routine): Use these.
4939 (c_parser_declaration_or_fndef): Adjust.
4940 (c_parser_oacc_routine): Likewise. Support more C language
4941 constructs, and improve diagnostics. Move pragma context
4943 (c_parser_pragma): ... here.
4945 * c-parser.c (struct oacc_routine_data): New.
4946 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4948 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4949 declare target" attribute.
4951 2016-08-01 Jan Beulich <jbeulich@suse.com>
4953 * c-fold.c (c_fully_fold_internal): Also emit shift count
4954 warnings for vector types.
4955 * c-typeck.c (build_binary_op): Likewise.
4957 2016-07-29 Marek Polacek <polacek@redhat.com>
4960 * c-decl.c (finish_struct): Rephrase an error message.
4963 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4964 to error node for invalid code.
4967 * c-decl.c (implicitly_declare): Return decl early not only for
4968 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4970 2016-07-29 Jakub Jelinek <jakub@redhat.com>
4973 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4974 on GNU extern inline functions.
4976 2016-07-29 Marek Polacek <polacek@redhat.com>
4979 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4982 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
4984 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4986 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4988 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4990 (best_macro_match): Likewise, converting from a typedef to a
4992 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4993 (lookup_name_fuzzy): Update for change of best_macro_match to a
4994 subclass with a ctor that calls cpp_forall_identifiers.
4996 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4998 * c-decl.c (implicit_decl_warning): Update for conversion of
4999 return type of lookup_name_fuzzy to const char *.
5000 (undeclared_variable): Likewise.
5001 (lookup_name_fuzzy): Convert return type from tree to
5003 * c-parser.c (c_parser_declaration_or_fndef): Update for
5004 conversion of return type of lookup_name_fuzzy to const char *.
5005 (c_parser_parameter_declaration): Likewise.
5007 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
5009 * c-parser.c (c_parser_oacc_declare): Don't scan for
5011 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
5012 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
5013 zero-length subarrays.
5015 2016-07-15 Jakub Jelinek <jakub@redhat.com>
5018 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
5019 instead of FUZZY_LOOKUP_NAME.
5020 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
5021 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
5023 2016-07-14 Jakub Jelinek <jakub@redhat.com>
5026 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
5028 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5030 * c-parser.c (c_parser_generic_selection): Make type of variable
5032 (c_parser_omp_declare_simd): Likewise.
5034 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5036 * c-decl.c (struct c_struct_parse_info): Change member types
5037 from vec to auto_vec.
5038 (start_struct): Adjust.
5039 (finish_struct): Likewise.
5041 2016-07-02 Jakub Jelinek <jakub@redhat.com>
5044 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
5046 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5048 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
5049 Move pragma context checking into...
5050 (c_parser_omp_cancellation_point): ... here, and improve
5051 diagnostic messages.
5052 * c-typeck.c (c_finish_omp_cancel)
5053 (c_finish_omp_cancellation_point): Improve diagnostic messages.
5055 2016-06-29 Jakub Jelinek <jakub@redhat.com>
5058 * c-typeck.c (c_build_qualified_type): Don't clear
5059 C_TYPE_INCOMPLETE_VARS for the main variant.
5061 2016-06-28 Martin Sebor <msebor@redhat.com>
5064 * c-typeck.c (output_init_element): Diagnose incompatible types
5065 before non-constant initializers.
5067 2016-06-28 Jakub Jelinek <jakub@redhat.com>
5069 * Make-lang.in: Don't cat ../stage_current if it does not exist.
5071 2016-06-23 Andi Kleen <ak@linux.intel.com>
5073 * Make-lang.in: Add support for autofdo.
5075 2016-06-22 David Malcolm <dmalcolm@redhat.com>
5078 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
5079 (implicit_decl_warning): When issuing warnings for implicit
5080 declarations, attempt to provide a suggestion via
5082 (undeclared_variable): Likewise when issuing errors.
5083 (lookup_name_in_scope): Likewise.
5084 (struct edit_distance_traits<cpp_hashnode *>): New struct.
5085 (best_macro_match): New typedef.
5086 (find_closest_macro_cpp_cb): New function.
5087 (lookup_name_fuzzy): New function.
5088 * c-parser.c: Include gcc-rich-location.h.
5089 (c_token_starts_typename): Split out case CPP_KEYWORD into...
5090 (c_keyword_starts_typename): ...this new function.
5091 (c_parser_declaration_or_fndef): When issuing errors about
5092 missing "struct" etc, add a fixit. For other kinds of errors,
5093 attempt to provide a suggestion via lookup_name_fuzzy.
5094 (c_parser_parms_declarator): When looking ahead to detect typos in
5095 type names, also reject CPP_KEYWORD.
5096 (c_parser_parameter_declaration): When issuing errors about
5097 unknown type names, attempt to provide a suggestion via
5099 * c-tree.h (c_keyword_starts_typename): New prototype.
5101 2016-06-20 Joseph Myers <joseph@codesourcery.com>
5104 * c-typeck.c (build_conditional_expr): Return error_mark_node if
5105 c_common_type returns error_mark_node.
5107 2016-06-19 Martin Sebor <msebor@redhat.com>
5110 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
5111 __alignof__ (expression).
5113 2016-06-14 David Malcolm <dmalcolm@redhat.com>
5115 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
5117 2016-06-14 David Malcolm <dmalcolm@redhat.com>
5119 * c-typeck.c (build_component_ref): Simplify fixit code by
5120 using gcc_rich_location::add_fixit_misspelled_id.
5121 (set_init_label): Likewise.
5123 2016-06-13 David Malcolm <dmalcolm@redhat.com>
5125 * c-parser.c (c_parser_initelt): Provide location of name for new
5126 location_t param of set_init_label.
5127 * c-tree.h (set_init_label): Add location_t param.
5128 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
5129 param and use it when issuing error messages about unrecognized
5130 field names. Attempt to provide a fixit hint if appropriate,
5131 otherwise update the error message to provide the type name.
5133 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
5136 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
5139 2016-06-08 Martin Sebor <msebor@redhat.com>
5140 Jakub Jelinek <jakub@redhat.com>
5144 * c-typeck.c (convert_arguments): Don't promote last argument
5145 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5147 2016-06-08 Marek Polacek <polacek@redhat.com>
5150 * c-decl.c (grokdeclarator): Check TYPE_P.
5153 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
5156 2016-06-07 David Malcolm <dmalcolm@redhat.com>
5158 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
5159 and structure element reference, capture the location of the
5160 element name token and pass it to build_component_ref.
5161 (c_parser_postfix_expression_after_primary): Likewise for
5162 structure element dereference.
5163 (c_parser_omp_variable_list): Likewise for
5164 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
5165 * c-tree.h (build_component_ref): Add location_t param.
5166 * c-typeck.c (build_component_ref): Add location_t param
5167 COMPONENT_LOC. Use it, if available, when issuing hints about
5168 mispelled member names to provide a fixit replacement hint.
5170 2016-06-06 Marek Polacek <polacek@redhat.com>
5173 * c-parser.c (c_parser_direct_declarator): Set location.
5175 2016-06-06 Marek Polacek <polacek@redhat.com>
5177 * c-typeck.c (comptypes_internal): Handle comparisons of
5178 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
5179 TYPE_REF_CAN_ALIAS_ALL.
5181 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
5183 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
5184 arguments as addressable when async clause exists.
5186 2016-05-30 Jakub Jelinek <jakub@redhat.com>
5189 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
5190 when combined with target construct.
5192 2016-05-26 Jakub Jelinek <jakub@redhat.com>
5194 * c-parser.c (c_parser_omp_clause_schedule): Warn if
5195 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
5197 2016-05-25 Marek Polacek <polacek@redhat.com>
5200 * c-decl.c (c_make_fname_decl): Don't check seen_error.
5203 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
5205 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
5207 * c-parser.c (c_parser_oacc_declare): Add support for
5208 GOMP_MAP_FIRSTPRIVATE_POINTER.
5209 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
5210 argument with enum c_omp_region_type ort.
5211 (handle_omp_array_sections): Likewise. Update call to
5212 handle_omp_array_sections_1.
5213 (c_finish_omp_clauses): Add specific errors and warning messages for
5214 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
5215 call to handle_omp_array_sections.
5217 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
5219 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
5221 2016-05-24 Richard Biener <rguenther@suse.de>
5225 * c-typeck.c (build_array_ref): Do not complain about indexing
5226 non-lvalue vectors. Adjust for function name change.
5228 2016-05-20 Martin Sebor <msebor@redhat.com>
5231 * c-typeck.c (error_init): Use
5232 expansion_point_location_if_in_system_header.
5233 (warning_init): Same.
5235 2016-05-19 David Malcolm <dmalcolm@redhat.com>
5238 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5240 (c_parser_postfix_expression): Likewise.
5241 * c-tree.h (c_expr::set_error): New method.
5242 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
5243 that result's range is initialized.
5245 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5247 * c-typeck.c (parser_build_unary_op): Fix formatting.
5249 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5251 * c-decl.c (grokdeclarator): Remove errmsg and use of
5252 targetm.invalid_return_type.
5253 (grokparms): Remove errmsg and use of
5254 targetm.invalid_parameter_type.
5256 2016-05-13 Joseph Myers <joseph@codesourcery.com>
5258 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5259 function return type.
5261 2016-05-12 Marek Polacek <polacek@redhat.com>
5264 * c-decl.c (build_compound_literal): Pass LOC down to
5265 c_incomplete_type_error.
5266 * c-tree.h (require_complete_type): Adjust declaration.
5267 (c_incomplete_type_error): Likewise.
5268 * c-typeck.c (require_complete_type): Add location parameter, pass it
5269 down to c_incomplete_type_error.
5270 (c_incomplete_type_error): Add location parameter, pass it down to
5272 (build_component_ref): Pass location down to c_incomplete_type_error.
5273 (default_conversion): Pass location down to require_complete_type.
5274 (build_array_ref): Likewise.
5275 (build_function_call_vec): Likewise.
5276 (convert_arguments): Likewise.
5277 (build_unary_op): Likewise.
5278 (build_c_cast): Likewise.
5279 (build_modify_expr): Likewise.
5280 (convert_for_assignment): Likewise.
5281 (c_finish_omp_clauses): Likewise.
5283 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5286 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
5288 * c-errors.c (pedwarn_c90): Return true if warned.
5289 * c-tree.h (pedwarn_c90): Change return type to bool.
5290 (enum c_declspec_word): Add new enumerator cdw_atomic.
5292 2016-05-11 Marek Polacek <polacek@redhat.com>
5295 * c-decl.c (diagnose_mismatched_decls): Factor out code to
5296 diagnose_mismatched_attributes and call it.
5298 2016-05-10 Marek Polacek <polacek@redhat.com>
5301 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5302 on a declaration following the definition.
5304 2016-05-05 Jakub Jelinek <jakub@redhat.com>
5306 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
5307 parse it through to c_parser_c99_block_statement.
5308 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
5311 2016-05-04 Marek Polacek <polacek@redhat.com>
5313 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
5316 2016-05-04 Marek Polacek <polacek@redhat.com>
5319 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
5320 for macro expansions.
5322 2016-05-03 Marek Polacek <polacek@redhat.com>
5325 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
5326 check_builtin_function_arguments.
5328 2016-05-03 Richard Biener <rguenther@suse.de>
5330 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5331 the checksum from the previous stage.
5333 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5335 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5336 c_finish_omp_clauses.
5337 (c_parser_omp_all_clauses): Likewise.
5338 (c_parser_oacc_cache): Likewise.
5339 (c_parser_oacc_loop): Likewise.
5340 (omp_split_clauses): Likewise.
5341 (c_parser_omp_declare_target): Likewise.
5342 (c_parser_cilk_all_clauses): Likewise.
5343 (c_parser_cilk_for): Likewise.
5344 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5345 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5347 2016-05-02 Marek Polacek <polacek@redhat.com>
5350 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5353 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5356 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5357 OACC_LOOP_CLAUSE_MASK.
5358 (c_parser_oacc_kernels_parallel): Update call to
5359 c_oacc_split_loop_clauses.
5361 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
5363 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5364 argument to build_modify_expr in two cases.
5366 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5368 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5369 warn_for_memset instead of warning directly here.
5371 2016-04-26 Marek Polacek <polacek@redhat.com>
5374 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5376 (c_parser_for_statement): ... here.
5377 (c_parser_if_statement): Use it.
5378 (c_parser_switch_statement): Use it.
5379 (c_parser_while_statement): Use it.
5382 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5384 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5387 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5388 instead of c_finish_cilk_clauses.
5389 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5390 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5391 floating-point variables in the linear clause for Cilk Plus.
5393 2016-04-18 Michael Matz <matz@suse.de>
5395 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5396 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5398 2016-04-15 Marek Polacek <polacek@redhat.com>
5401 * c-typeck.c (build_unary_op): Pass location down to error and
5404 2016-04-15 Jakub Jelinek <jakub@redhat.com>
5407 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5409 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5410 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5411 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5412 Adjust c_parser_pragma callers.
5413 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5415 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5417 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5418 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5419 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5420 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5421 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5422 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5423 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5424 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5426 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5427 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5430 2016-04-13 Marek Polacek <polacek@redhat.com>
5433 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5435 (c_parser_statement): Likewise.
5436 (c_parser_c99_block_statement): Likewise.
5437 (c_parser_while_statement): Likewise.
5438 (c_parser_for_statement): Likewise.
5439 (c_parser_if_body): Don't set IF_P here.
5440 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5441 about dangling else here.
5442 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5443 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5444 warn about dangling else here.
5446 2016-04-04 Marek Polacek <polacek@redhat.com>
5449 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5451 2016-03-31 Marek Polacek <polacek@redhat.com>
5454 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5456 2016-03-18 David Malcolm <dmalcolm@redhat.com>
5459 * c-parser.c (c_parser_postfix_expression): Set the source range
5460 for uses of "__builtin_types_compatible_p".
5462 2016-03-17 Jakub Jelinek <jakub@redhat.com>
5465 * c-typeck.c (composite_type): Don't count void_list_node
5466 into len, if the list is terminated by void_list_node, start
5467 with void_list_node instead of NULL for newargs. Stop
5470 2016-03-16 Marek Polacek <polacek@redhat.com>
5473 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5474 nested functions returning VM types.
5476 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5478 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5479 when calling c_finish_omp_clauses.
5481 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5484 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5487 2016-03-04 Marek Polacek <polacek@redhat.com>
5490 * c-parser.c (c_parser_postfix_expression): Call
5491 c_parser_cast_expression rather than c_parser_postfix_expression.
5493 2016-03-01 Jakub Jelinek <jakub@redhat.com>
5497 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5498 of incomplete decls to error_mark_node.
5500 2016-02-24 Marek Polacek <polacek@redhat.com>
5503 * c-decl.c (finish_decl): Don't update the copy of the type of a
5504 different decl type.
5506 2016-02-23 Jakub Jelinek <jakub@redhat.com>
5509 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5510 in id_kind reclassification.
5512 2016-02-16 Jakub Jelinek <jakub@redhat.com>
5515 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5517 2016-02-16 James Norris <jnorris@codesourcery.com>
5520 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5522 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5524 * c-decl.c (build_null_declspecs): Zero the entire struct.
5527 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5528 callers changed. If nested_p is true, use it to call
5529 finish_implicit_inits.
5530 * c-tree.h (finish_implicit_inits): Declare.
5531 * c-typeck.c (finish_implicit_inits): New function. Move code
5533 (push_init_level): ... here.
5534 (set_designator, process_init_element): Call finish_implicit_inits.
5536 2016-02-11 Jakub Jelinek <jakub@redhat.com>
5539 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5540 arguments for -Waddress warning.
5542 2016-02-04 Jakub Jelinek <jakub@redhat.com>
5545 * c-decl.c (finish_enum): When honoring mode attribute,
5546 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5548 2016-01-29 Jakub Jelinek <jakub@redhat.com>
5551 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5552 all type variants, not just TYPE_MAIN_VARIANT.
5554 2016-01-27 Jakub Jelinek <jakub@redhat.com>
5557 * c-decl.c (c_write_global_declarations_1): Warn with
5558 warn_unused_function if static prototype without definition
5561 2016-01-27 Marek Polacek <polacek@redhat.com>
5564 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5565 to unsigned, if needed. Add -Wsign-compare warning.
5567 2016-01-26 Jakub Jelinek <jakub@redhat.com>
5569 PR tree-optimization/69483
5570 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5572 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5575 * c-tree.h (incomplete_record_decls): Declare.
5576 * c-parser.c (incomplete_record_decls): Define.
5577 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5578 report error if any decl has zero size.
5579 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5580 or enum type to incomplete_record_decls.
5582 2016-01-14 Tom de Vries <tom@codesourcery.com>
5584 PR tree-optimization/68773
5585 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5588 2016-01-14 Marek Polacek <polacek@redhat.com>
5591 * c-decl.c (grokdeclarator): Provide more information for invalid
5594 2016-01-06 David Malcolm <dmalcolm@redhat.com>
5596 * c-parser.c (c_parser_unary_expression): For dereferences, build
5597 a combined location before calling build_indirect_ref, so that
5598 error reports cover the full range, manually updating the c_expr
5601 2016-01-06 Marek Polacek <polacek@redhat.com>
5604 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5605 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5608 2016-01-04 Jakub Jelinek <jakub@redhat.com>
5610 Update copyright years.
5612 2016-01-04 Marek Polacek <polacek@redhat.com>
5615 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5616 optimization to use __atomic_fetch_* built-in if possible.
5618 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5620 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5622 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5625 2015-12-22 Marek Polacek <polacek@redhat.com>
5628 * c-typeck.c (build_component_ref): Warn when acessing elements of
5629 atomic structures or unions.
5631 2015-12-21 David Malcolm <dmalcolm@redhat.com>
5633 * c-typeck.c: Include "gcc-rich-location.h".
5634 (build_binary_op): In the two places that call binary_op_error,
5635 create a gcc_rich_location and populate it with the location of
5636 the binary op and its two operands.
5638 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5640 * c-parser.c (c_parser_statement_after_labels): When calling
5641 c_finish_return, Use the return expression's location if it has
5642 one, falling back to the location of the first token within it.
5643 * c-typeck.c (c_finish_return): When issuing warnings about
5644 the incorrect presence/absence of a return value, issue a note
5645 showing the declaration of the function.
5647 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5649 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5651 (c_parser_peek_nth_token): New function.
5652 (c_parser_peek_conflict_marker): New function.
5653 (c_parser_error): Detect conflict markers and report them as such.
5655 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5657 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5658 to preserve range information for the primary expression
5659 in the call to c_parser_postfix_expression_after_primary.
5661 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5663 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5664 expression location, falling back on the first token location,
5665 rather than always using the latter.
5667 2015-12-16 Marek Polacek <polacek@redhat.com>
5670 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5673 2015-12-15 Marek Polacek <polacek@redhat.com>
5676 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5679 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5681 * c-parser.c (c_parser_alignof_expression): Capture location of
5682 closing parenthesis (if any), or of end of unary expression, and
5683 use it to build a src_range for the expression.
5685 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5688 * c-parser.c (c_parser_get_builtin_args): Add
5689 "out_close_paren_loc" param, and write back to it.
5690 (c_parser_postfix_expression): Capture the closing
5691 parenthesis location for RID_CHOOSE_EXPR,
5692 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5693 RID_BUILTIN_SHUFFLE and use it to set the source range
5694 for such expressions; within RID_BUILTIN_COMPLEX set
5695 the underlying location.
5697 2015-12-07 Marek Polacek <polacek@redhat.com>
5700 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5701 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5703 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5705 * c-tree.h (c_build_va_arg): Adjust prototype.
5706 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5707 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5708 parameter, adjust throughout and issue an error if EXPR is a component
5709 with reverse storage order.
5711 2015-12-02 Jason Merrill <jason@redhat.com>
5713 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5714 (c_fully_fold_internal, decl_constant_value_for_optimization):
5715 Move from c-common.c.
5716 * c-tree.h: Declare decl_constant_value_for_optimization.
5717 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5719 2015-12-02 Joseph Myers <joseph@codesourcery.com>
5722 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5723 following link from declarator to next declarator. Track original
5724 qualified type and pass it to c_build_qualified_type.
5725 * c-typeck.c (c_build_qualified_type): Add arguments
5726 orig_qual_type and orig_qual_indirect.
5728 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5730 * c-parser.c (c_parser_omp_clause_name)
5731 (c_parser_oacc_all_clauses): Alphabetical sorting.
5733 2015-12-02 Jakub Jelinek <jakub@redhat.com>
5736 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5739 2015-12-01 Julian Brown <julian@codesourcery.com>
5740 Cesar Philippidis <cesar@codesourcery.com>
5741 James Norris <James_Norris@mentor.com>
5743 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5744 (c_parser_oacc_clause_use_device): New function.
5745 (c_parser_oacc_all_clauses): Add use_device support.
5746 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5747 (c_parser_oacc_host_data): New function.
5748 (c_parser_omp_construct): Add host_data support.
5749 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5750 * c-typeck.c (c_finish_oacc_host_data): New function.
5751 (c_finish_omp_clauses): Add use_device support.
5753 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
5756 * c-decl.c: Set TYPE_PACKED in variants.
5758 2015-11-27 Martin Liska <mliska@suse.cz>
5761 * c-array-notation.c (fix_builtin_array_notation_fn):
5762 Use release_vec_vec instead of vec::release.
5763 (build_array_notation_expr): Likewise.
5764 (fix_conditional_array_notations_1): Likewise.
5765 (fix_array_notation_expr): Likewise.
5766 (fix_array_notation_call_expr): Likewise.
5768 2015-11-27 Jakub Jelinek <jakub@redhat.com>
5771 * c-parser.c (c_parser_compound_statement_nostart): If
5772 last_label is true, use pragma_stmt instead of pragma_compound
5773 as second c_parser_pragma argument.
5774 (c_parser_omp_ordered, c_parser_omp_target_update,
5775 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5776 false as second argument to c_parser_skip_to_pragma_eol after
5777 diagnosing standalone directives used in pragma_stmt context.
5779 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5781 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5782 with "if (ENABLE_OFFLOADING)".
5784 2015-11-23 David Malcolm <dmalcolm@redhat.com>
5787 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5788 for various Objective-C constructs: Class.name syntax,
5789 @selector(), @protocol(), @encode(), and [] message syntax.
5791 2015-11-20 David Malcolm <dmalcolm@redhat.com>
5794 * c-typeck.c (should_suggest_deref_p): New function.
5795 (build_component_ref): Special-case POINTER_TYPE when
5796 generating a "not a structure of union" error message, and
5797 suggest a "->" rather than a ".", providing a fix-it hint.
5799 2015-11-19 David Malcolm <dmalcolm@redhat.com>
5801 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5802 candidate into a new function, find_closest_identifier.
5804 2015-11-19 Marek Polacek <polacek@redhat.com>
5807 * c-typeck.c (parser_build_binary_op): Properly handle
5808 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5810 2015-11-17 David Malcolm <dmalcolm@redhat.com>
5812 * c-parser.c (set_c_expr_source_range): Bulletproof both
5813 overloaded implementations against NULL expr->value.
5814 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5816 (c_parser_unary_expression): Likewise when handling addresses of
5818 (c_parser_postfix_expression): Likewise for statement expressions,
5819 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5820 __builtin_va_arg, and for __builtin_offset_of.
5821 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5822 src_range using the range of the braced initializer.
5823 (c_parser_transaction_expression): Set src_range for "ret" to a
5824 sane pair of values.
5826 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5828 * c-parser.c (c_finish_omp_declare_simd): Look for
5829 "simd" attribute as well. Update error message.
5831 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5833 * c-parser.c (c_parser_omp_declare_target): Adjust.
5835 2015-11-14 Jakub Jelinek <jakub@redhat.com>
5837 * c-typeck.c (c_finish_omp_clauses): Don't mark
5838 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5840 2015-11-14 Marek Polacek <polacek@redhat.com>
5842 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5843 * c-typeck.c: Likewise.
5845 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5847 * c-decl.c (warn_defaults_to): Pass line_table to
5849 * c-errors.c (pedwarn_c99): Likewise.
5850 (pedwarn_c90): Likewise.
5851 * c-parser.c (set_c_expr_source_range): New functions.
5852 (c_token::get_range): New method.
5853 (c_token::get_finish): New method.
5854 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5855 based on the range from the start of the LHS to the end of the
5857 (c_parser_conditional_expression): Likewise, based on the range
5858 from the start of the cond.value to the end of exp2.value.
5859 (c_parser_binary_expression): Call set_c_expr_source_range on
5860 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5861 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5862 based on the cast_loc through to the end of the expr.
5863 (c_parser_unary_expression): Likewise, based on the
5864 op_loc through to the end of op.
5865 (c_parser_sizeof_expression) Likewise, based on the start of the
5866 sizeof token through to either the closing paren or the end of
5868 (c_parser_postfix_expression): Likewise, using the token range,
5869 or from the open paren through to the close paren for
5870 parenthesized expressions.
5871 (c_parser_postfix_expression_after_primary): Likewise, for
5872 various kinds of expression.
5873 * c-tree.h (struct c_expr): Add field "src_range".
5874 (c_expr::get_start): New method.
5875 (c_expr::get_finish): New method.
5876 (set_c_expr_source_range): New decls.
5877 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5878 on ret for prefix unary ops.
5879 (parser_build_binary_op): Likewise, running from the start of
5880 arg1.value through to the end of arg2.value.
5882 2015-11-13 Marek Polacek <polacek@redhat.com>
5885 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5887 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5889 * c-typeck.c: Include spellcheck.h.
5890 (lookup_field_fuzzy_find_candidates): New function.
5891 (lookup_field_fuzzy): New function.
5892 (build_component_ref): If the field was not found, try using
5893 lookup_field_fuzzy and potentially offer a suggestion.
5895 2015-11-12 James Norris <jnorris@codesourcery.com>
5896 Joseph Myers <joseph@codesourcery.com>
5898 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5899 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5900 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5901 and PRAGMA_OMP_CLAUSE_LINK.
5902 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5903 and PRAGMA_OACC_CLAUSE_LINK.
5904 (OACC_DECLARE_CLAUSE_MASK): New definition.
5905 (c_parser_oacc_declare): New function.
5907 2015-11-12 Marek Polacek <polacek@redhat.com>
5910 * c-parser.c (c_parser_for_statement): Reclassify the token in
5913 2015-11-11 Marek Polacek <polacek@redhat.com>
5917 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5918 checking the size of an array.
5920 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
5922 * c-array-notation.c: Remove unused header files.
5923 * c-aux-info.c: Likewise.
5924 * c-convert.c: Likewise.
5925 * c-decl.c: Likewise.
5926 * c-errors.c: Likewise.
5927 * c-lang.c: Likewise.
5928 * c-objc-common.c: Likewise.
5929 * c-parser.c: Likewise.
5930 * c-typeck.c: Likewise.
5931 * gccspec.c: Likewise.
5933 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5934 Cesar Philippidis <cesar@codesourcery.com>
5935 James Norris <jnorris@codesourcery.com>
5936 Julian Brown <julian@codesourcery.com>
5937 Nathan Sidwell <nathan@codesourcery.com>
5939 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5941 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5942 (c_parser_pragma): Parse 'acc routine'.
5943 (OACC_ROUTINE_CLAUSE_MARK): Define.
5944 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5946 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5949 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5950 location of the backward-goto to the start of the loop body.
5952 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5955 * c-parser.c (c_parser_while_statement): Finish the loop before
5956 parsing ahead for misleading indentation.
5957 (c_parser_for_statement): Likewise.
5959 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5961 * c-decl.c (finish_struct): If the structure has reverse storage
5962 order, rewrite the type of array fields with scalar component. Call
5963 maybe_apply_pragma_scalar_storage_order on entry.
5964 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5965 errors on bit-fields and reverse SSO here and not...
5966 (c_mark_addressable): ...here.
5967 (output_init_element): Adjust call to initializer_constant_valid_p.
5968 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5970 2015-11-06 David Malcolm <dmalcolm@redhat.com>
5972 * c-decl.c (warn_defaults_to): Update for change in signature
5973 of diagnostic_set_info.
5974 * c-errors.c (pedwarn_c99): Likewise.
5975 (pedwarn_c90): Likewise.
5976 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5977 for textinfo::set_location.
5979 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5980 Thomas Schwinge <thomas@codesourcery.com>
5981 James Norris <jnorris@codesourcery.com>
5983 * c-parser.c (c_parser_omp_clause_name): Add support for
5984 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5985 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5986 default(none) in OpenACC.
5987 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5989 (c_parser_oacc_clause_tile): New function.
5990 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5991 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5992 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5994 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5995 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5997 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5998 (c_parser_oacc_update): Update the error message for missing clauses.
5999 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
6000 and OMP_CLAUSE_INDEPENDENT.
6002 2015-11-05 Marek Polacek <polacek@redhat.com>
6005 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
6006 deal with pre-evaluation on invalid types.
6008 2015-11-05 Jakub Jelinek <jakub@redhat.com>
6009 Ilya Verbin <ilya.verbin@intel.com>
6011 * c-parser.c: Include context.h and gimple-expr.h.
6012 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
6013 monotonic together with nonmonotonic.
6014 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
6015 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
6016 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
6017 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
6018 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
6019 expressions on combined target teams before the target.
6020 (c_parser_omp_declare_target): If decl has "omp declare target" or
6021 "omp declare target link" attribute, and cgraph or varpool node already
6022 exists, then set corresponding flags. Call c_finish_omp_clauses
6023 in the parenthesized extended-list syntax case.
6024 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
6026 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
6027 on OMP_CLAUSE_REDUCTION array sections.
6028 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
6029 into the constant offset, or for variable low-bound using
6030 POINTER_PLUS_EXPR. For structure element based array sections use
6031 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
6032 (c_finish_omp_clauses): Drop generic_field_head, structure
6033 elements are now always mapped even as array section bases,
6034 diagnose same var in data sharing and mapping clauses. Diagnose if
6035 linear step on declare simd is neither a constant nor a uniform
6036 parameter. Look through POINTER_PLUS_EXPR for array section
6037 reductions. Diagnose the same var or function appearing multiple
6038 times on the same directive. Fix up wording for the to clause if t
6039 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
6040 modifier on kinds other than dynamic or guided or nonmonotonic
6041 modifier together with ordered clause.
6043 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6044 Chung-Lin Tang <cltang@codesourcery.com>
6046 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
6048 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
6050 * c-array-notation.c: Reorder #include's and remove duplicates.
6051 * c-aux-info.c: Likewise.
6052 * c-convert.c: Likewise.
6053 * c-decl.c: Likewise.
6054 * c-errors.c: Likewise.
6055 * c-lang.c: Likewise.
6056 * c-objc-common.c: Likewise.
6057 * c-parser.c: Likewise.
6058 * c-typeck.c: Likewise.
6060 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
6063 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
6064 after calling build_qualified_type.
6066 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
6067 Thomas Schwinge <thomas@codesourcery.com>
6068 James Norris <jnorris@codesourcery.com>
6069 Joseph Myers <joseph@codesourcery.com>
6070 Julian Brown <julian@codesourcery.com>
6071 Bernd Schmidt <bschmidt@redhat.com>
6073 * c-parser.c (c_parser_oacc_shape_clause): New.
6074 (c_parser_oacc_simple_clause): New.
6075 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
6076 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
6078 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6079 James Norris <jnorris@codesourcery.com>
6080 Cesar Philippidis <cesar@codesourcery.com>
6084 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
6085 parameters, and handle these. Adjust all users.
6086 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
6088 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
6090 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
6092 (c_finish_omp_construct): Declare function.
6093 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
6094 Merge functions into...
6095 (c_finish_omp_construct): ... this new function.
6097 2015-10-22 Richard Biener <rguenther@suse.de>
6099 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
6100 before folding a MINUS_EXPR.
6102 2015-10-21 Marek Polacek <polacek@redhat.com>
6105 * c-decl.c (start_function): Warn about vararg functions without
6108 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
6110 * c-typeck.c (build_conditional_expr): Use boolean vector
6111 type for vector comparison.
6112 (build_vec_cmp): New.
6113 (build_binary_op): Use build_vec_cmp for comparison.
6115 2015-10-20 Marek Polacek <polacek@redhat.com>
6117 * c-parser.c (is_cilkplus_vector_p): Don't define here.
6119 2015-10-20 Marek Polacek <polacek@redhat.com>
6122 * c-parser.c (c_parser_attributes): Break out of the loop if the
6123 token after an attribute isn't a comma.
6125 2015-10-13 Jakub Jelinek <jakub@redhat.com>
6126 Aldy Hernandez <aldyh@redhat.com>
6128 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
6129 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
6130 (c_parser_omp_variable_list): Handle structure elements for
6131 map, to and from clauses. Handle array sections in reduction
6132 clause. Formatting fixes.
6133 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
6134 if clause modifiers.
6135 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6136 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6137 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
6138 c_parser_omp_clause_is_device_ptr): New functions.
6139 (c_parser_omp_clause_ordered): Parse optional parameter.
6140 (c_parser_omp_clause_reduction): Handle array reductions.
6141 (c_parser_omp_clause_schedule): Parse optional simd modifier.
6142 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
6144 (c_parser_omp_clause_linear): Parse linear clause modifiers.
6145 (c_parser_omp_clause_depend_sink): New function.
6146 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
6147 (c_parser_omp_clause_map): Parse release/delete map kinds and
6148 optional always modifier.
6149 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
6150 and c_finish_omp_clauses callers.
6151 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
6152 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
6153 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
6154 (OMP_CRITICAL_CLAUSE_MASK): Define.
6155 (c_parser_omp_critical): Parse critical clauses.
6156 (c_parser_omp_for_loop): Handle doacross loops, adjust
6157 c_finish_omp_for and c_finish_omp_clauses callers.
6158 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
6159 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
6160 (OMP_FOR_CLAUSE_MASK): Add linear clause.
6161 (c_parser_omp_for): Disallow ordered clause when combined with
6162 distribute. Disallow linear clause when combined with distribute
6163 and not combined with simd.
6164 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
6165 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
6166 parse clauses and if depend clause is found, don't parse a body.
6167 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
6168 Allow target parallel without for after it.
6169 (OMP_TASK_CLAUSE_MASK): Add priority clause.
6170 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
6171 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
6173 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
6174 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
6175 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
6176 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
6178 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
6179 defaultmap and is_device_ptr clauses.
6180 (c_parser_omp_target): Parse target parallel and target simd. Set
6181 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
6182 and target exit data. Diagnose invalid map kinds.
6183 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
6184 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
6186 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
6188 (OMP_TASKLOOP_CLAUSE_MASK): Define.
6189 (c_parser_omp_taskloop): New function.
6190 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
6191 handle PRAGMA_OMP_TASKLOOP.
6192 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
6193 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
6194 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
6195 Add IS_OMP argument, handle structure element bases, diagnose
6196 bitfields, pass IS_OMP recursively, diagnose known zero length
6197 array sections in depend clauses, handle array sections in reduction
6198 clause, diagnose negative length even for pointers.
6199 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
6200 types, pass IS_OMP down to handle_omp_array_sections_1, handle
6201 array sections in reduction clause, set
6202 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
6203 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
6204 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
6205 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
6207 2015-10-06 Marek Polacek <polacek@redhat.com>
6209 * c-parser.c (c_parser_statement_after_labels): Use
6210 protected_set_expr_location.
6211 (c_parser_omp_clause_num_gangs): Likewise.
6212 (c_parser_omp_clause_num_threads): Likewise.
6213 (c_parser_omp_clause_num_workers): Likewise.
6214 (c_parser_omp_clause_vector_length): Likewise.
6215 (c_parser_omp_clause_num_teams): Likewise.
6216 (c_parser_omp_clause_thread_limit): Likewise.
6217 * c-typeck.c (build_c_cast): Likewise.
6218 (c_cast_expr): Likewise.
6220 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6222 * c-typeck.c (c_tree_equal): Use real_equal instead of
6225 2015-10-04 Jason Merrill <jason@redhat.com>
6227 * c-parser.c (c_lex_one_token): Handle @synchronized.
6228 * c-decl.c (match_builtin_function_types): A declaration of a built-in
6229 can change whether the function is transaction_safe.
6231 2015-10-02 Marek Polacek <polacek@redhat.com>
6234 * c-typeck.c (convert_for_assignment): Use the expansion point
6235 location throughout.
6237 2015-10-02 Marek Polacek <polacek@redhat.com>
6240 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
6241 and pass it down to c_parser_if_statement.
6242 (c_parser_else_body): Add CHAIN parameter and pass it down to
6243 c_parser_statement_after_labels.
6244 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
6245 duplicated if-else-if conditions.
6247 2015-10-01 Marek Polacek <polacek@redhat.com>
6249 * c-typeck.c (convert_for_assignment): Improve commentary.
6251 2015-09-30 Marek Polacek <polacek@redhat.com>
6254 * c-typeck.c (c_finish_return): Use the expansion point location for
6255 certain "return with value" warnings.
6257 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6259 * c-parser.c (pragma_lex): Add loc argument.
6261 2015-09-15 Marek Polacek <polacek@redhat.com>
6264 * c-decl.c (tag_exists_p): New function.
6265 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6266 struct/union/enum keywords are missing.
6267 * c-tree.h (tag_exists_p): Declare.
6269 2015-09-15 Marek Polacek <polacek@redhat.com>
6271 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6272 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6273 Return NULL_TREE instead of 0.
6274 (lookup_name): Return NULL_TREE instead of 0.
6275 (lookup_name_in_scope): Likewise.
6276 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6277 (parser_xref_tag): Use false instead of 0.
6278 (start_struct): Use true instead of 1.
6279 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6281 2015-09-14 Marek Polacek <polacek@redhat.com>
6283 * c-typeck.c (set_nonincremental_init_from_string): Use
6284 HOST_WIDE_INT_M1U when shifting a negative value.
6286 2015-09-09 Mark Wielaard <mjw@redhat.com>
6288 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
6291 2015-09-10 Jakub Jelinek <jakub@redhat.com>
6294 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
6295 into OMP_FOR_PRE_BODY rather than before the loop.
6297 2015-09-09 Jakub Jelinek <jakub@redhat.com>
6300 * c-parser.c (c_parser_oacc_all_clauses,
6301 c_parser_omp_all_clauses): Remove invalid clause from
6302 list of clauses even if parser->error is set.
6305 * c-parser.c (c_parser_omp_clause_aligned,
6306 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
6308 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
6312 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
6313 instead of c_parser_unary_expression. If the result is !lvalue_p,
6314 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
6316 2015-09-04 Marek Polacek <polacek@redhat.com>
6319 * c-typeck.c (build_binary_op): Don't instrument static initializers.
6321 2015-09-03 Martin Sebor <msebor@redhat.com>
6324 * c-typeck.c (convert_arguments, parser_build_unary_op,
6325 build_conditional_expr, c_cast_expr, convert_for_assignment,
6326 build_binary_op, _objc_common_truthvalue_conversion): Call
6328 (c_decl_implicit): Define.
6330 2015-09-02 Marek Polacek <polacek@redhat.com>
6333 * c-parser.c (c_parser_enum_specifier): Give a better error for
6336 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6338 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6340 2015-08-12 Marek Polacek <polacek@redhat.com>
6342 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6345 2015-08-03 Marek Polacek <polacek@redhat.com>
6348 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6350 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6352 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6354 * c-parser.c (c_parser_if_body): Take token_indent_info
6355 argument. Call warn_for_misleading_indentation even when the
6356 body is a semicolon. Extract token_indent_infos corresponding
6357 to the guard, body and next tokens. Adjust call to
6358 warn_for_misleading_indentation accordingly.
6359 (c_parser_else_body): Likewise.
6360 (c_parser_if_statement): Likewise.
6361 (c_parser_while_statement): Likewise.
6362 (c_parser_for_statement): Likewise.
6364 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6365 Manuel López-Ibáñez <manu@gcc.gnu.org>
6367 * c-decl.c (get_parm_info): Remove static var. Update warning
6370 2015-07-27 Marek Polacek <polacek@redhat.com>
6374 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6376 2015-07-20 Marek Polacek <polacek@redhat.com>
6379 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6380 (build_binary_op): Warn about left shift overflows.
6382 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
6384 * c-array-notation.c: Adjust includes for flags.h changes.
6385 * c-objc-common.c: Likewise.
6387 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
6389 * c-array-notation.c: Adjust includes.
6390 * c-aux-info.c: Likewise.
6391 * c-convert.c: Likewise.
6392 * c-decl.c: Likewise.
6393 * c-errors.c: Likewise.
6394 * c-lang.c: Likewise.
6395 * c-objc-common.c: Likewise.
6396 * c-parser.c: Likewise.
6397 * c-typeck.c: Likewise.
6399 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6402 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6404 2015-06-29 Marek Polacek <polacek@redhat.com>
6407 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6408 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6409 about -Wswitch-bool here.
6410 (do_case): Update c_add_case_label call.
6411 (c_finish_case): Update c_do_switch_warnings call.
6413 2015-06-27 Marek Polacek <polacek@redhat.com>
6415 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6417 2015-06-26 Marek Polacek <polacek@redhat.com>
6419 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6421 * c-typeck.c (array_to_pointer_conversion): Likewise.
6422 (build_unary_op): Likewise.
6423 (c_finish_return): Likewise.
6425 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
6427 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6428 * c-parser.c: Likewise.
6430 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6432 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6433 instead of pointer_hash.
6434 (detect_field_duplicates): Likewise.
6436 2015-06-25 Marek Polacek <polacek@redhat.com>
6438 * c-array-notation.c: Use VAR_P throughout.
6439 * c-decl.c: Likewise.
6440 * c-objc-common.c: Likewise.
6441 * c-parser.c: Likewise.
6442 * c-typeck.c: Likewise.
6444 2015-06-25 Marek Polacek <polacek@redhat.com>
6446 * c-decl.c: Use is_global_var throughout.
6447 * c-parser.c: Likewise.
6448 * c-typeck.c: Likewise.
6450 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
6452 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6453 * c-aux-info.c: Likewise.
6454 * c-convert.c: Likewise.
6455 * c-decl.c: Likewise.
6456 * c-errors.c: Likewise.
6457 * c-lang.c: Likewise.
6458 * c-objc-common.c: Likewise.
6459 * c-parser.c: Likewise.
6460 * c-typeck.c: Likewise.
6462 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
6465 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6468 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6470 * c-decl.c (pop_scope): Register the main translation unit
6471 through the new debug hook.
6473 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
6475 * c-array-notation.c : Adjust include files.
6476 * c-aux-info.c : Likewise.
6477 * c-convert.c : Likewise.
6478 * c-decl.c : Likewise.
6479 * c-errors.c : Likewise.
6480 * c-lang.c : Likewise.
6481 * c-lang.h : Likewise.
6482 * c-objc-common.c : Likewise.
6483 * c-parser.c : Likewise.
6484 * c-typeck.c : Likewise.
6486 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
6488 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6489 immediately clobber it.
6490 (c_write_global_declarations_1): Remove call to
6491 check_global_declaration_1.
6492 (c_write_global_declarations_2): Remove.
6493 (c_write_final_cleanups): Rename from c_write_global_declarations.
6494 Remove call to finalize_compilation_unit.
6495 Remove calls to debugging hooks.
6496 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6497 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6498 * c-tree.h: Remove c_write_global_declarations.
6500 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
6502 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6503 * c-aux-info.c: Likewise.
6504 * c-convert.c: Likewise.
6505 * c-decl.c: Likewise.
6506 * c-errors.c: Likewise.
6507 * c-lang.c: Likewise.
6508 * c-objc-common.c: Likewise.
6509 * c-parser.c: Likewise.
6510 * c-typeck.c: Likewise.
6512 2015-06-04 Marek Polacek <polacek@redhat.com>
6515 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6518 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6520 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6521 Warn for empty struct.
6522 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6524 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6526 * c-decl.c (start_function): Call plugin before parsing.
6527 (finish_function): Call plugin after parsing.
6529 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6532 * c-decl.c (merge_decls): Merge DECL_COMMON.
6534 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
6536 * Make-lang.in (check_gcc_pallelize): Define.
6538 2015-05-22 Marek Polacek <polacek@redhat.com>
6541 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6544 2015-05-21 Marek Polacek <polacek@redhat.com>
6546 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6549 2015-05-20 Marek Polacek <polacek@redhat.com>
6551 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6552 * c-typeck.c: Likewise.
6554 2015-05-19 Marek Polacek <polacek@redhat.com>
6556 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6558 2015-05-19 Jakub Jelinek <jakub@redhat.com>
6561 * c-parser.c (c_parser_omp_for_loop): Don't add
6562 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6563 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6564 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6567 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6569 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
6572 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6575 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6578 2015-05-14 Marek Polacek <polacek@redhat.com>
6582 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6585 2015-05-12 David Malcolm <dmalcolm@redhat.com>
6587 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6588 to add a call to warn_for_misleading_indentation.
6589 (c_parser_else_body): Likewise, adding param "else_loc".
6590 (c_parser_if_statement): Check for misleading indentation.
6591 (c_parser_while_statement): Likewise.
6592 (c_parser_for_statement): Likewise.
6594 2015-05-08 Marek Polacek <polacek@redhat.com>
6597 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6598 (output_init_element): Likewise.
6600 2015-05-07 Marek Polacek <polacek@redhat.com>
6603 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6606 2015-04-30 Marek Polacek <polacek@redhat.com>
6608 * c-typeck.c (set_init_label): Call error_at instead of error and
6611 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6614 * c-typeck.c (c_build_va_arg): Clarify the error message.
6616 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6618 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6619 OMP_STANDALONE_CLAUSES.
6621 2015-04-28 Marek Polacek <polacek@redhat.com>
6623 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6625 2015-04-28 Marek Polacek <polacek@redhat.com>
6628 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6630 2015-04-25 Marek Polacek <polacek@redhat.com>
6633 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6636 2015-04-23 Marek Polacek <polacek@redhat.com>
6639 * c-decl.c (set_labels_context_r): New function.
6640 (store_parm_decls): Call it via walk_tree_without_duplicates.
6641 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6642 instead of create_tmp_var. Build TARGET_EXPR instead of
6644 (build_atomic_assign): Use create_tmp_var_raw instead of
6645 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6647 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6649 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6650 (c_parser_omp_target_update): Add missed %> to error_at ().
6652 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6655 * c-decl.c (c_default_pointer_mode): Remove definition.
6656 * c-tree.h (c_default_pointer_mode): Remove declaration.
6658 2015-03-27 Tobias Burnus <burnus@net-b.de>
6661 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6663 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6664 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6665 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6667 2015-03-19 Jakub Jelinek <jakub@redhat.com>
6669 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6670 attribute for DECL_EXTERNAL VAR_DECLs.
6672 2015-03-11 Jakub Jelinek <jakub@redhat.com>
6674 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6677 2015-03-10 Jakub Jelinek <jakub@redhat.com>
6680 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6681 before preparing arguments to warn_logical_not_parentheses.
6683 2015-03-09 Jakub Jelinek <jakub@redhat.com>
6686 * c-typeck.c (parser_build_binary_op): Don't warn for
6687 !!x == y or !b == y where b is _Bool.
6689 2015-03-09 Marek Polacek <polacek@redhat.com>
6691 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6692 * c-decl.c (grokdeclarator): Likewise.
6693 * c-typeck.c (build_binary_op): Likewise.
6695 2015-02-27 Marek Polacek <polacek@redhat.com>
6698 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6700 2015-02-14 Marek Polacek <polacek@redhat.com>
6703 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6704 declared through a typedef name.
6706 2015-02-13 Marek Polacek <polacek@redhat.com>
6709 * c-decl.c (grokdeclarator): Print also the type when giving
6710 the error message about array's incomplete element type.
6712 2015-02-11 Jakub Jelinek <jakub@redhat.com>
6715 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6716 check in the POP macro.
6718 2015-02-09 Marek Polacek <polacek@redhat.com>
6721 * c-typeck.c (process_init_element): Don't always wrap
6722 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6723 initializing a range of elements.
6725 2015-02-04 Jakub Jelinek <jakub@redhat.com>
6729 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6731 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
6733 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6734 processing enum declaration.
6736 2015-01-29 Marek Polacek <polacek@redhat.com>
6739 * c-typeck.c (pop_init_level): If constructor_elements has
6740 exactly one element with integer_zerop value, set constructor_zeroinit
6741 to 1. Remove braces around warning_init call.
6743 2015-01-27 Jakub Jelinek <jakub@redhat.com>
6746 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6747 of FUNCTION_DECLs with error_mark_node.
6749 2015-01-26 Jakub Jelinek <jakub@redhat.com>
6752 * c-typeck.c (convert_arguments): Return -1 if there are
6753 error_args, even if we've diagnosed too many arguments.
6755 2015-01-21 Richard Biener <rguenther@suse.de>
6758 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6759 for builtins the user declared correctly.
6761 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6762 Bernd Schmidt <bernds@codesourcery.com>
6763 Cesar Philippidis <cesar@codesourcery.com>
6764 James Norris <jnorris@codesourcery.com>
6765 Jakub Jelinek <jakub@redhat.com>
6766 Ilmir Usmanov <i.usmanov@samsung.com>
6768 * c-parser.c: Include "gomp-constants.h".
6769 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6770 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6771 Use OMP_CLAUSE_SET_MAP_KIND.
6772 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6773 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6774 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6775 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6776 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6777 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6778 "copyout", "create", "delete", "deviceptr", "gang", "host",
6779 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6780 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6781 "present_or_create", "pcreate", "seq", "self", "vector",
6782 "vector_length", "wait", "worker".
6783 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6784 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6785 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6786 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6787 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6788 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6789 (c_parser_oacc_data_clause_deviceptr)
6790 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6791 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6792 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6793 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6794 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6795 (c_parser_oacc_parallel, c_parser_oacc_update)
6796 (c_parser_oacc_wait): New functions.
6797 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6798 (c_finish_oacc_data): New prototypes.
6799 * c-typeck.c: Include "gomp-constants.h".
6800 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6801 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6802 OMP_CLAUSE_SET_MAP_KIND.
6803 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6804 (c_finish_oacc_data): New functions.
6805 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6806 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6807 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6808 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6809 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6810 GOMP_MAP_FORCE_DEVICEPTR.
6812 2015-01-09 Michael Collison <michael.collison@linaro.org>
6814 * c-array-notation.c: Include hash-set.h, machmode.h,
6815 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6816 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6817 * c-aux-info.c: Ditto.
6818 * c-convert.c: Ditto.
6820 * c-errors.c: Ditto.
6821 * c-lang.c: Dittoxs.
6822 * c-objc-common.c: Ditto.
6823 * c-parser.c: Ditto.
6824 * c-typeck.c: Include hash-set.h, machmode.h,
6825 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6826 fold-const.h, wide-int.h, inchash.h, real.h and
6827 fixed-value.h due to flattening of tree.h.
6829 2015-01-07 Marek Polacek <polacek@redhat.com>
6832 * c-typeck.c (process_init_element): Disallow initialization of
6833 a flexible array member with a string constant if the structure
6836 2015-01-05 Jakub Jelinek <jakub@redhat.com>
6839 * c-typeck.c (convert_for_assignment, c_finish_return): For
6840 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6841 types also set in_late_binary_op around convert call.
6842 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6843 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6844 result on expr as last argument to ubsan_instrument_float_cast,
6845 if in_late_binary_op, don't use c_save_expr but save_expr.
6847 Update copyright years.
6849 2015-01-05 Marek Polacek <polacek@redhat.com>
6852 * c-typeck.c (build_array_ref): Pass loc down to
6853 warn_array_subscript_with_type_char.
6855 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
6857 * c-typeck.c: New behavious for pointers to arrays with qualifiers
6858 (common-pointer-type): For pointers to arrays take qualifiers from
6860 (build_conditional_expr): Add warnings for lost qualifiers.
6861 (comp-target-types): Allow pointers to arrays with different qualifiers.
6862 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
6863 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
6864 to PEDWARN_FOR_QUALIFIERS.
6866 2014-12-17 Jakub Jelinek <jakub@redhat.com>
6869 * c-convert.c: Include ubsan.h.
6870 (convert): For real -> integral casts and
6871 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6872 instead instrument the float cast directly.
6874 2014-11-29 Jakub Jelinek <jakub@redhat.com>
6876 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6877 c_finish_stmt_expr): Remove NULL last argument from
6878 create_tmp_var_raw and create_tmp_var calls.
6879 * c-array-notation.c (fix_builtin_array_notation_fn,
6880 build_array_notation_expr, fix_conditional_array_notations_1,
6881 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6883 2014-11-28 Marek Polacek <polacek@redhat.com>
6886 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6887 convert the right operand to integer type.
6889 2014-11-25 Marek Polacek <polacek@redhat.com>
6892 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6893 for inline functions.
6895 2014-11-21 Jakub Jelinek <jakub@redhat.com>
6898 * c-typeck.c (build_array_ref): Adjust
6899 convert_vector_to_pointer_for_subscript caller. If it returns true,
6900 call non_lvalue_loc on the result.
6902 2014-11-11 Richard Biener <rguenther@suse.de>
6904 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6907 2014-11-10 Andi Kleen <ak@linux.intel.com>
6910 * c-parser.c (c_parser_statement_after_labels): Call
6912 (c_parser_if_statement): Dito.
6913 (c_parser_switch_statement): Dito.
6914 (c_parser_while_statement): Dito.
6915 (c_parser_do_statement): Dito.
6916 (c_parser_for_statement): Dito.
6917 * c-typeck.c (c_finish_loop): Dito.
6919 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6921 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6922 OPT_Wshift_count_overflow in the warnings.
6924 2014-10-30 Marek Polacek <polacek@redhat.com>
6926 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6927 print the stripped version as well, if they're not the same.
6929 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6931 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6934 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
6936 * c-decl.c: Adjust include files.
6937 * c-parser.c: Ditto.
6939 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6940 Tom Tromey <tromey@redhat.com>
6942 * c-tree.h (enum c_oracle_request): New.
6943 (c_binding_oracle_function): New typedef.
6944 (c_binding_oracle, c_pushtag, c_bind): Declare.
6945 * c-decl.c (c_binding_oracle): New global.
6946 (I_SYMBOL_CHECKED): New macro.
6947 (i_symbol_binding): New function.
6948 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6949 (I_TAG_CHECKED): New macro.
6950 (i_tag_binding): New function.
6951 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6952 (I_LABEL_CHECKED): New macro.
6953 (i_label_binding): New function.
6954 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6955 (c_print_identifier): Save and restore c_binding_oracle.
6956 (c_pushtag, c_bind): New functions.
6958 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
6960 * c-typeck.c: Adjust include files.
6962 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6965 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6966 initialization here...
6967 (c_initialize_diagnostics): ... but here. Set defaults after
6968 building pretty-printer.
6970 2014-10-23 Marek Polacek <polacek@redhat.com>
6973 * c-decl.c (pop_scope): Don't print warning in external_scope.
6975 2014-10-19 Marek Polacek <polacek@redhat.com>
6978 * c-typeck.c (output_init_element): Allow initializing objects with
6979 static storage duration with compound literals even in C99 and add
6982 2014-10-17 Marek Polacek <polacek@redhat.com>
6985 * c-typeck.c (digest_init): Allow initializing objects with static
6986 storage duration with compound literals even in C99 and add pedwarn
6989 2014-10-17 Marek Polacek <polacek@redhat.com>
6992 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6993 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6994 error multiple times. Print the type.
6996 2014-10-17 Marek Polacek <polacek@redhat.com>
6999 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
7002 2014-10-17 Marek Polacek <polacek@redhat.com>
7004 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
7005 (start_function): Use OPT_Wimplicit_int instead of 0.
7006 (store_parm_decls_oldstyle): Likewise.
7008 2014-10-17 Alan Modra <amodra@gmail.com>
7011 * c-decl.c (merge_decls): Don't merge section name or tls model
7012 to newdecl symtab node, instead merge to olddecl. Override
7013 existing olddecl section name. Set tls_model for all thread-local
7014 vars, not just OMP thread-private ones. Remove incorrect comment.
7016 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
7018 * c-decl.c: Adjust include files.
7020 2014-10-14 DJ Delorie <dj@redhat.com>
7022 * c-parser.c (c_parse_init): Add RID entries for each __intN.
7023 (c_token_starts_typename): Check all __intN, not just __int128.
7024 (c_token_starts_declspecs): Likewise.
7025 (c_parser_declspecs): Likewise.
7026 (c_parser_attribute_any_word): Likewise.
7027 (c_parser_objc_selector): Likewise.
7028 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
7029 (struct c_declspecs): Add int_n_idx field to record *which* __intN
7031 * c-decl.c (declspecs_add_type): Check for all __intN, not just
7033 (finish_declspecs): Likewise.
7035 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
7037 * c-parser.c (c_parser_all_labels): New function to replace
7039 (c_parser_statement): Call the new function.
7041 2014-10-09 Marek Polacek <polacek@redhat.com>
7044 * c-typeck.c (pop_init_level): Don't warn about initializing
7047 2014-10-07 Marek Polacek <polacek@redhat.com>
7050 * c-decl.c (header_for_builtin_fn): New function.
7051 (implicitly_declare): Suggest which header to include.
7053 2014-10-07 Marek Polacek <polacek@redhat.com>
7055 * c-convert.c (convert): Use error_operand_p.
7056 * c-typeck.c (require_complete_type): Likewise.
7057 (really_atomic_lvalue): Likewise.
7058 (digest_init): Likewise.
7059 (handle_omp_array_sections_1): Likewise.
7061 2014-10-03 Marek Polacek <polacek@redhat.com>
7064 * c-decl.c (pop_scope): Don't warn about "inline function declared
7065 but never defined" for functions marked with gnu_inline attribute.
7067 2014-09-25 Jakub Jelinek <jakub@redhat.com>
7070 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
7071 on low_bound and length.
7073 2014-09-24 Marek Polacek <polacek@redhat.com>
7077 * c-parser.c: Don't define CPP_KEYWORD.
7078 (c_parser_switch_statement): Pass original type to c_finish_case.
7079 * c-tree.h (c_finish_case): Update declaration.
7080 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
7081 conditionally to c_do_switch_warnings.
7083 2014-09-03 Marek Polacek <polacek@redhat.com>
7086 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
7089 2014-09-02 Jakub Jelinek <jakub@redhat.com>
7090 Balaji V. Iyer <balaji.v.iyer@intel.com>
7091 Igor Zamyatin <igor.zamyatin@intel.com>
7093 * c-parser.c (c_parser_cilk_for): New function.
7094 (c_parser_cilk_grainsize): Likewise.
7095 (c_get_temp_regvar): Likewise.
7096 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
7097 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
7098 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
7099 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
7102 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
7104 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
7105 with using HOST_WIDE_INT without truncation to 'int'
7107 2014-08-22 Marek Polacek <polacek@redhat.com>
7110 * c-typeck.c (parser_build_binary_op): Adjust call to
7111 warn_logical_not_parentheses.
7113 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
7116 * c-parser.c (c_parser_array_notation): Check for correct
7117 type of an array added.
7119 2014-08-19 Marek Polacek <polacek@redhat.com>
7122 * c-typeck.c (build_binary_op): If either operand of a comparison
7123 is a boolean expression, call maybe_warn_bool_compare.
7125 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
7128 * c-typeck.c (build_c_cast): Do a conversion even when the
7129 TYPE_MAIN_VARIANTs are the same.
7131 2014-08-19 Marek Polacek <polacek@redhat.com>
7133 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
7134 pedwarn_c99 instead of pedwarn.
7135 (grokfield): Likewise.
7136 (warn_defaults_to): New function.
7137 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
7138 Unconditionally call pedwarn_c99 instead of pedwarn.
7139 (start_function): Call warn_defaults_to instead of pedwarn_c99.
7140 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
7141 check flag_isoc11 before.
7142 * c-errors.c (pedwarn_c99): Change the return type to bool.
7143 Handle -Wc99-c11-compat.
7144 * c-parser.c (disable_extension_diagnostics): Handle
7145 warn_c99_c11_compat.
7146 (restore_extension_diagnostics): Likewise.
7147 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
7148 instead of pedwarn, don't check flag_isoc11 before.
7149 (c_parser_declspecs): Likewise.
7150 (c_parser_alignas_specifier): Likewise.
7151 (c_parser_alignof_expression): Likewise.
7152 (c_parser_generic_selection): Likewise.
7153 * c-tree.h (pedwarn_c99): Update declaration.
7154 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
7157 2014-08-19 Marek Polacek <polacek@redhat.com>
7159 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
7161 * c-errors.c: Include "opts.h".
7162 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
7163 * c-parser.c (disable_extension_diagnostics): Handle negative value
7164 of warn_c90_c99_compat, too.
7165 (restore_extension_diagnostics): Likewise.
7166 (c_parser_compound_statement_nostart): Pass
7167 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
7169 2014-08-12 Marek Polacek <polacek@redhat.com>
7171 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
7173 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
7175 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
7177 2014-08-10 Marek Polacek <polacek@redhat.com>
7180 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
7181 Call pedwarn_c90 instead of pedwarn.
7182 (check_bitfield_type_and_width): Likewise.
7183 (declspecs_add_qual): Likewise.
7184 (declspecs_add_type): Likewise.
7185 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
7186 Adjust to only call pedwarn_c90.
7187 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
7188 pedwarn_c90 instead of pedwarn.
7189 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
7190 * c-parser.c (disable_extension_diagnostics): Handle
7191 warn_c90_c99_compat.
7192 (restore_extension_diagnostics): Likewise.
7193 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
7194 pedwarn_c90 instead of pedwarn.
7195 (c_parser_initelt): Likewise.
7196 (c_parser_postfix_expression): Likewise.
7197 (c_parser_postfix_expression_after_paren_type): Likewise.
7198 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
7199 * c-tree.h: Fix formatting.
7200 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
7201 pedwarn_c90 instead of pedwarn.
7203 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7205 * c-typeck.c: Remove include of pointer-set.h.
7207 2014-08-07 Marek Polacek <polacek@redhat.com>
7209 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
7211 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7213 * c-typeck.c: Use hash_map instead of pointer_map.
7215 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7217 * c-decl.c: Use hash_set instead of pointer_set.
7219 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7222 * c-array-notation.c (expand_array_notations): Handling
7225 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
7228 * c-typeck.c (c_finish_return): Return 0 instead of the address of
7231 2014-07-30 Tom Tromey <tromey@redhat.com>
7233 * c-typeck.c (struct constructor_stack) <designator_depth>: New
7235 (really_start_incremental_init, push_init_level): Initialize
7237 (pop_init_level): Set global designator_depth.
7238 (process_init_element): Check for designated_init attribute.
7240 2014-07-20 Marek Polacek <polacek@redhat.com>
7243 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
7244 (implicitly_declare): Pass location to implicit_decl_warning.
7246 2014-07-14 Jakub Jelinek <jakub@redhat.com>
7249 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7250 If non-NULL, call c_parser_check_literal_zero.
7251 (c_parser_check_literal_zero): New function.
7252 (c_parser_postfix_expression_after_primary): Adjust
7253 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7255 2014-07-06 Marek Polacek <polacek@redhat.com>
7258 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7259 * c-tree.h (C_ARRAY_PARAMETER): Define.
7260 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7263 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
7264 Chen Gang <gang.chen.5i5j@gmail.com>
7266 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7269 2014-07-01 Marek Polacek <polacek@redhat.com>
7271 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7272 instead of 0 to WARN_FOR_ASSIGNMENT.
7274 2014-07-01 Marek Polacek <polacek@redhat.com>
7277 * c-typeck.c (convert_for_assignment): Pass
7278 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7280 2014-06-30 Marek Polacek <polacek@redhat.com>
7282 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7283 has no_sanitize_undefined attribute.
7285 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7288 * c-array-notation.c (fix_builtin_array_notation_fn):
7289 Check for 0 arguments in builtin call. Check that bultin argument is
7291 * c-parser.c (c_parser_array_notation): Check for incorrect initial
7294 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
7296 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
7297 qualifiers in __auto_type for atomic types.
7298 (c_parser_typeof_specifier): Discard all type qualifiers in
7299 __typeof__ for atomic types.
7301 2014-06-25 Marek Polacek <polacek@redhat.com>
7304 * c-parser.c (c_parser_statement_after_labels): Pass the location of
7305 the return expression to c_finish_return.
7307 2014-06-25 Jakub Jelinek <jakub@redhat.com>
7309 * c-typeck.c (c_finish_omp_clauses): Make sure
7310 OMP_CLAUSE_LINEAR_STEP has correct type.
7312 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
7316 2014-06-24 Jakub Jelinek <jakub@redhat.com>
7318 * c-parser.c (c_parser_omp_for_loop): For
7319 #pragma omp parallel for simd move lastprivate clause from parallel
7320 to for rather than simd.
7322 2014-06-23 Marek Polacek <polacek@redhat.com>
7324 * c-typeck.c (parser_build_binary_op): Don't call
7325 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
7327 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
7329 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7330 * c-decl.c (merge_decls): Likewise.
7332 2014-06-09 Marek Polacek <polacek@redhat.com>
7335 * c-typeck.c (error_init): Call inform instead of error_at.
7336 (pedwarn_init): Call inform instead of pedwarn.
7337 (warning_init): Call inform instead of warning_at.
7339 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
7341 * c-decl.c (merge_decls): Use set_decl_section_name.
7342 (duplicate_decls): Remove node if it exists.
7344 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7347 * c-typeck.c (push_init_level, process_init_element,
7348 pop_init_level): Correct check for zero initialization, move
7349 missing brace warning to respect zero initialization.
7351 2014-06-05 Marek Polacek <polacek@redhat.com>
7354 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7356 2014-06-05 Marek Polacek <polacek@redhat.com>
7359 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
7360 on the left hand side operand of a comparison.
7362 2014-06-05 Marek Polacek <polacek@redhat.com>
7365 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7366 Print note only if the warning was printed.
7368 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7371 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7374 2014-06-03 Marek Polacek <polacek@redhat.com>
7377 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7379 * c-tree.h (c_start_case): Update.
7380 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7381 switch condition has boolean value.
7383 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
7385 * c-decl.c: Include builtins.h.
7386 * c-parser.c: Likewise.
7388 2014-05-27 Marek Polacek <polacek@redhat.com>
7391 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7392 error and warning calls to error_at and warning_at. Pass location of
7393 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7394 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7395 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7397 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7400 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7401 function parameters.
7403 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
7405 * c-decl.c (merge_decls): Preserve symtab node pointers.
7406 (duplicate_decls): Free new decl.
7408 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7410 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7413 * c-parser.c (c_parser_omp_target): Return bool values.
7415 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7417 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7418 num_teams_loc variable to num_thread_limit_loc.
7420 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7422 * c-array-notation.c (expand_array_notations): Use void_node
7423 instead of void_zero_node.
7425 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7427 * c-decl.c (finish_struct): Adjust.
7428 (finish_enum): Likewise.
7430 (record_inline_static): Likewise.
7431 (push_scope): Likewise.
7432 (make_label): Likewise.
7433 (lookup_label_for_goto): Likewise.
7434 (finish_struct): Likewise.
7435 (finish_enum): Likewise.
7436 (store_parm_decls): Likewise.
7437 (c_push_function_context): Likewise.
7438 * c-lang.h: Remove usage of variable_size gty attribute.
7439 * c-parser.c (c_parse_init): Adjust.
7440 (c_parse_file): Likewise.
7442 2014-05-13 Marek Polacek <polacek@redhat.com>
7445 * c-typeck.c (convert_for_assignment): Pass location to
7446 WARN_FOR_ASSIGNMENT instead of input_location.
7448 2014-05-10 Marek Polacek <polacek@redhat.com>
7450 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7451 maybe_warn_string_init.
7452 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7453 maybe_warn_string_init.
7454 * c-tree.h (maybe_warn_string_init): Update declaration.
7455 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7456 Call pedwarn_init with loc instead of with input_location.
7457 (digest_init): Pass init_loc to maybe_warn_string_init.
7458 (pop_init_level): Call pedwarn_init with loc instead of with
7460 (set_init_index): Likewise.
7461 (process_init_element): Likewise.
7463 2014-05-09 Marek Polacek <polacek@redhat.com>
7466 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7467 (c_parser_initelt): Pass location to set_init_label. Pass array index
7468 location to set_init_index.
7469 * c-tree.h (push_init_level): Update declaration.
7470 (pop_init_level): Likewise.
7471 (set_init_index): Likewise.
7472 (set_init_label): Likewise.
7473 * c-typeck.c (error_init): Add location parameter. Call error_at
7475 (digest_init): Pass init_loc to error_init.
7476 (really_start_incremental_init):
7477 (push_init_level): Add location parameter. Pass loc to pop_init_level
7479 (pop_init_level): Likewise.
7480 (set_designator): Add location parameter. Pass loc to pop_init_level,
7481 push_init_level, and error_init.
7482 (set_init_index): Add location parameter. Pass loc to error_init and
7484 (set_init_label): Likewise.
7485 (output_init_element): Pass loc to error_init.
7486 (process_init_element): Pass loc to error_init, pop_init_level,
7487 pedwarn_init, and push_init_level.
7489 2014-05-09 Marek Polacek <polacek@redhat.com>
7492 * c-parser.c (c_parser_attributes): Parse the arguments as an
7493 expression-list if the attribute takes identifier.
7495 2014-05-08 Marek Polacek <polacek@redhat.com>
7498 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7501 2014-05-08 Marek Polacek <polacek@redhat.com>
7504 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7507 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7508 Mike Stump <mikestump@comcast.net>
7509 Richard Sandiford <rdsandiford@googlemail.com>
7511 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7512 (finish_enum): Use wide-int interfaces.
7513 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7514 * c-typeck.c (build_c_cast): Likewise.
7515 (set_nonincremental_init_from_string): Likewise.
7516 (c_tree_equal): Likewise.
7518 2014-05-02 Marek Polacek <polacek@redhat.com>
7521 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7522 Return size_one_node when the type is not complete.
7523 (pointer_diff): Remove comment.
7524 (build_unary_op): Improve error messages.
7526 2014-05-02 Marek Polacek <polacek@redhat.com>
7528 * c-typeck.c (c_finish_return): Separate warning_at calls.
7530 2014-05-02 Marek Polacek <polacek@redhat.com>
7532 * c-tree.h (error_init): Remove declaration.
7533 (pedwarn_init): Likewise.
7534 * c-typeck.c (error_init): Make static and move above.
7535 (pedwarn_init): Likewise.
7536 (warning_init): Move above.
7537 (maybe_warn_string_init): Likewise.
7539 2014-05-01 Jeff Law <law@redhat.com>
7543 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7544 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7547 2014-05-02 Marek Polacek <polacek@redhat.com>
7550 * c-typeck.c (push_init_level): Set constructor_designated to
7551 p->designated for structures.
7553 2014-05-01 Marek Polacek <polacek@redhat.com>
7556 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7557 function-definition has an attribute after the declarator.
7559 2014-05-01 Marek Polacek <polacek@redhat.com>
7562 * c-typeck.c (warning_init): Add location_t parameter. Call
7563 warning_at instead of warning.
7564 (push_init_level): Pass input_location to warning_init.
7565 (add_pending_init): Add location_t parameter. Pass loc to
7567 (set_nonincremental_init): Pass input_location to add_pending_init.
7568 (set_nonincremental_init_from_string): Likewise.
7569 (output_init_element): Pass loc to warning_init and to
7572 2014-05-01 Marek Polacek <polacek@redhat.com>
7575 * c-typeck.c (c_finish_return): Distinguish between label and variable
7576 when warning about returning local address.
7578 2014-05-01 Marek Polacek <polacek@redhat.com>
7581 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7584 2014-05-01 Marek Polacek <polacek@redhat.com>
7587 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7588 instead of 0 to WARN_FOR_QUALIFIERS.
7590 2014-05-01 Marek Polacek <polacek@redhat.com>
7593 * c-typeck.c (default_conversion): Use better location for
7596 2014-04-30 Marek Polacek <polacek@redhat.com>
7598 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7599 also when SANITIZE_FLOAT_DIVIDE is on.
7601 2014-04-30 Marek Polacek <polacek@redhat.com>
7604 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7605 and pedwarn_init. Use loc insted of input_location.
7607 2014-04-30 Marek Polacek <polacek@redhat.com>
7610 * c-typeck.c (build_binary_op): Use location when warning about
7613 2014-04-25 Marek Polacek <polacek@redhat.com>
7616 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7617 always_inline/noinline and hot/cold attributes.
7619 2014-04-25 Marek Polacek <polacek@redhat.com>
7622 * c-parser.c (c_parser_initelt): Pass input_location to
7623 process_init_element.
7624 (c_parser_initval): Pass loc to process_init_element.
7625 * c-tree.h (process_init_element): Adjust declaration.
7626 * c-typeck.c (push_init_level): Pass input_location to
7627 process_init_element.
7628 (pop_init_level): Likewise.
7629 (set_designator): Likewise.
7630 (output_init_element): Add location_t parameter. Pass loc to
7632 (output_pending_init_elements): Pass input_location to
7633 output_init_element.
7634 (process_init_element): Add location_t parameter. Pass loc to
7635 output_init_element.
7637 2014-04-24 Jakub Jelinek <jakub@redhat.com>
7639 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7640 atomic-clause, allow comma in between atomic-clause and
7643 2014-04-22 Jakub Jelinek <jakub@redhat.com>
7646 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7647 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7649 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7652 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7653 create_tmp_var instead build_decl for creating temps.
7654 (build_array_notation_expr): Likewise.
7655 (fix_conditional_array_notations_1): Likewise.
7656 (fix_array_notation_expr): Likewise.
7657 (fix_array_notation_call_expr): Likewise.
7659 2014-03-28 Jakub Jelinek <jakub@redhat.com>
7662 * c-tree.h (c_build_function_call_vec): New prototype.
7663 * c-typeck.c (build_function_call_vec): Don't call
7664 resolve_overloaded_builtin here.
7665 (c_build_function_call_vec): New wrapper function around
7666 build_function_call_vec. Call resolve_overloaded_builtin here.
7667 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7668 Call c_build_function_call_vec instead of build_function_call_vec.
7669 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7670 * c-decl.c (finish_decl): Likewise.
7672 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7675 * c-typeck.c: Use correct format string in cast-qual warning
7677 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7679 * c-decl.c (c_decl_attributes): Use
7680 lang_hooks.types.omp_mappable_type.
7681 * c-typeck.c (c_finish_omp_clauses): Likewise.
7683 2014-03-06 Marek Polacek <polacek@redhat.com>
7686 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7687 of checking tree code.
7689 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7691 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7692 (c_parser_parameter_declaration): Likewise.
7694 2014-02-19 Marek Polacek <polacek@redhat.com>
7697 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7698 Call mark_exp_read on exp.value.
7699 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7700 TREE_ADDRESSABLE on old instead of val.
7701 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7703 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7705 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7706 C_EXPR_APPEND by vec_safe_push.
7707 * c-tree.h (C_EXPR_APPEND): Remove.
7709 2014-01-31 Marek Polacek <polacek@redhat.com>
7712 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7713 build_function_call_vec.
7714 (build_function_call): Likewise.
7715 (build_atomic_assign): Likewise.
7716 (build_function_call_vec): Add arg_loc parameter. Use it.
7717 (convert_arguments): Likewise.
7718 (convert_for_assignment): Rename rhs_loc to expr_loc.
7719 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7720 (c_parser_objc_keywordexpr): Likewise.
7721 (c_parser_postfix_expression_after_primary): Call
7722 build_function_call_vec with expr_loc rather than op_loc.
7723 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7724 build_function_call_vec.
7725 (c_parser_expr_list): Add locations parameter. Fill it with locations
7726 of function arguments.
7727 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7729 2014-01-30 Marek Polacek <polacek@redhat.com>
7732 * c-typeck.c (build_function_call_vec): Use loc parameter.
7733 (convert_arguments): Add location parameter. Use it.
7734 (ep_convert_and_check): Likewise.
7735 (build_atomic_assign): Adjust convert_for_assignment call.
7736 (build_modify_expr): Likewise.
7737 (digest_init): Likewise.
7738 (c_finish_return): Likewise.
7739 (build_conditional_expr): Adjust ep_convert_and_check calls.
7740 (convert_for_assignment): Add rhs_loc parameter. Use it.
7741 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7744 2014-01-30 Richard Biener <rguenther@suse.de>
7747 * c-typeck.c (build_function_call_vec): Do not replace calls
7748 to a function via an incompatible type with a runtime abort.
7750 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7752 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7753 flag_enable_cilkplus with flag_cilkplus.
7754 (c_parser_direct_declarator_inner): Likewise.
7755 (c_parser_attribute_any_word): Likewise.
7756 (c_parser_attributes): Likewise.
7757 (c_parser_compound_statement): Likewise.
7758 (c_parser_statement_after_labels): Likewise.
7759 (c_parser_if_statement): Likewise.
7760 (c_parser_switch_statement): Likewise.
7761 (c_parser_do_statement): Likewise.
7762 (c_parser_for_statement): Likewise.
7763 (c_parser_unary_expression): Likewise.
7764 (c_parser_postfix_expression): Likewise.
7765 (c_parser_postfix_expression_after_primary): Likewise.
7766 (c_parser_postfix_expression_after_primary): Likewise.
7767 (c_parser_omp_clause_name): Likewise.
7768 (c_finish_omp_declare_simd): Likewise.
7769 (c_parser_cilk_verify_simd): Likewise.
7770 * c-typeck.c (build_array_ref): Likewise.
7771 (build_function_call_vec): Likewise.
7772 (convert_arguments): Likewise.
7773 (build_compound_expr): Likewise.
7774 (c_finish_return): Likewise.
7775 (c_finish_if_stmt): Likewise.
7776 (c_finish_loop): Likewise.
7777 (build_binary_op): Likewise.
7779 2014-01-23 Marek Polacek <polacek@redhat.com>
7782 * c-typeck.c (parser_build_binary_op): Use location instead of
7784 (build_binary_op): Pass location to shorten_compare.
7786 2014-01-23 Marek Polacek <polacek@redhat.com>
7789 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7792 2014-01-23 Marek Polacek <polacek@redhat.com>
7795 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7796 of a comma expression.
7797 (emit_side_effect_warnings): Likewise.
7799 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7802 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7803 function to use walk_tree and moved a lot of its functionality to
7804 expand_array_notations.
7805 (expand_array_notations): New function.
7807 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7809 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7810 attribute an attribute without value.
7812 2014-01-23 Jakub Jelinek <jakub@redhat.com>
7815 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7816 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7818 2014-01-22 Marek Polacek <polacek@redhat.com>
7821 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7822 of remove_c_maybe_const_expr on op1 and op2.
7824 2014-01-15 Jakub Jelinek <jakub@redhat.com>
7827 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7828 effects, preevaluate rhs using SAVE_EXPR first.
7830 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7833 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7834 statements with if-elseif statements.
7836 2014-01-06 Marek Polacek <polacek@redhat.com>
7839 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7840 defined bit-field types only in ISO C.
7842 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7844 Update copyright years
7846 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7848 * c-array-notation.c: Use the standard form for the copyright notice.
7850 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7852 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7853 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7854 field in parser is not empty. If not-empty, call the function
7855 c_parser_finish_omp_declare_simd.
7856 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7857 between SIMD-enabled functions and #pragma simd. Added new parameter.
7858 (c_parser_cilk_all_clauses): Modified the usage of the function
7859 c_parser_cilk_clause_vectorlength as mentioned above.
7860 (c_parser_cilk_simd_fn_vector_attrs): New function.
7861 (c_finish_cilk_simd_fn_tokens): Likewise.
7862 (is_cilkplus_vector_p): Likewise.
7863 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7864 "nomask," and "mask" strings in clause name.
7865 (c_parser_omp_all_clauses): Added 3 new case statements:
7866 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7867 PRAGMA_CILK_CLAUSE_NOMASK.
7868 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7869 check for vector attribute and if so call the function
7870 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7871 called the function c_finish_cilk_simd_fn_tokens.
7872 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7873 parser field is non-empty. If so, parse them as you would parse
7874 the omp declare simd pragma.
7875 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7876 Added a check when step is a parameter and flag it as error.
7877 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7878 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7881 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7883 * c-parser.c (c_parser_omp_parallel): Fix description.
7885 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7887 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7888 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7889 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7890 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7892 2013-12-04 Joseph Myers <joseph@codesourcery.com>
7895 * c-parser.c (c_parser_alignas_specifier): Use
7896 c_sizeof_or_alignof_type instead of c_alignof.
7897 (c_parser_alignof_expression): Likewise, with min_alignof
7898 parameter depending on alignof spelling used.
7900 2013-12-04 Marek Polacek <polacek@redhat.com>
7903 * c-decl.c (start_function): Don't warn for missing prototype for
7906 2013-12-03 Marek Polacek <polacek@redhat.com>
7909 * c-decl.c (build_compound_literal): Allow compound literals with
7910 empty initial value.
7912 2013-12-02 Joseph Myers <joseph@codesourcery.com>
7915 * c-typeck.c (build_modify_expr): Diagnose assignment to
7916 expression with array type.
7918 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7921 * c-typeck.c (process_init_element): Do not treat a string as
7922 initializing a whole array when used with a designator for an
7925 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7928 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7929 an inline function following a static declaration.
7931 2013-11-28 Jakub Jelinek <jakub@redhat.com>
7934 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7935 to p_name before calling c_parser_omp_teams instead of after.
7936 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7937 argument. Remove unused p_name variable.
7939 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
7940 Jakub Jelinek <jakub@redhat.com>
7942 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7943 external_scope is NULL.
7945 2013-11-27 Tom de Vries <tom@codesourcery.com>
7946 Marc Glisse <marc.glisse@inria.fr>
7949 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7951 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
7953 * c-typeck.c: Add required include files from gimple.h.
7955 2013-11-22 David Malcolm <dmalcolm@redhat.com>
7957 * c-decl.c (define_label, shadow_tag_warned)
7958 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7959 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7960 (declspecs_add_type): Remove use of in_system_header macro.
7961 * c-parser.c (c_parser_unary_expression): Likewise.
7962 * c-typeck.c (store_init_value, process_init_element)
7963 (c_start_case): Likewise.
7965 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7968 * c-parser.c (c_parser_set_source_position_from_token): Remove
7969 reference to in_system_header from comment.
7971 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7973 * c-decl.c (grokdeclarator): Update comment to refer to
7974 tree_to_[su]hwi rather than tree_low_cst.
7976 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7978 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7979 tree_to_uhwi throughout.
7981 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7983 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7986 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7988 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7991 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
7993 * c-parser.c (c_parser_cilk_simd): New.
7994 (c_parser_cilk_verify_simd): New.
7995 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7996 (c_parser_omp_for_loop): Add case for NE_EXPR.
7997 Set c_break_label for CILK_SIMD.
7998 (c_parser_cilk_clause_vectorlength): New.
7999 (c_parser_cilk_clause_linear): New.
8000 (c_parser_cilk_clause_name): New.
8001 (c_parser_cilk_all_clauses): New.
8002 * c-typeck.c (build_unary_op): Pass location argument to
8004 (build_modify_expr): Same.
8005 (build_asm_expr): Same.
8006 (c_finish_bc_stmt): Error on break/continue in loops.
8008 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
8010 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
8012 2013-11-14 Diego Novillo <dnovillo@google.com>
8014 * c-decl.c: Include print-tree.h.
8015 Include stor-layout.h.
8018 Include stringpool.h.
8019 * c-lang.c: Include fold-const.h.
8020 * c-parser.c: Include stringpool.h.
8022 Include stor-layout.h.
8024 Include trans-mem.h.
8025 * c-typeck.c: Include stor-layout.h.
8026 Include trans-mem.h.
8030 2013-11-13 Joseph Myers <joseph@codesourcery.com>
8032 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
8033 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
8035 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
8036 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
8038 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
8039 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
8040 (c_parser_declarator, c_parser_direct_declarator_inner)
8041 (c_parser_parameter_declaration, c_parser_type_name): All callers
8043 (c_parser_declaration_or_fndef): Handle declarations with type
8044 determined from the initializer.
8046 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
8048 * c-typeck.c: Include gimplify.h.
8050 2013-11-12 Joseph Myers <joseph@codesourcery.com>
8052 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
8053 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
8055 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
8056 or _Thread_local as appropriate in diagnostics.
8057 (build_null_declspecs): Initialize ret->thread_gnu_p.
8058 (declspecs_add_scspec): Handle either __thread or _Thread_local
8059 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
8060 pedantic. Do not disallow _Thread_local extern and _Thread_local
8063 2013-11-07 Joseph Myers <joseph@codesourcery.com>
8064 Andrew MacLeod <amacleod@redhat.com>
8066 * c-aux-info.c (gen_type): Handle atomic qualifier.
8067 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
8068 qualifiers when compating types.
8069 (shadow_tag_warned): Handle atomic_p in declspecs.
8070 (quals_from_declspecs): Likewise.
8071 (start_decl): Use c_type_promotes_to when promoting argument
8073 (grokdeclarator): Handle _Atomic.
8074 (get_parm_info): Diagnose any qualifier on "void" as only
8076 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
8077 comparing types. Use c_type_promotes_to when promoting argument
8079 (finish_function): Use c_type_promotes_to when promoting argument
8081 (build_null_declspecs): Handle atomic_p in declspecs.
8082 (declspecs_add_qual): Handle RID_ATOMIC.
8083 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
8084 (c_token_starts_declspecs): Handle RID_ATOMIC.
8085 (c_parser_declspecs): Handle atomic type specifiers and
8087 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
8088 from types of expressions with atomic type.
8089 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
8090 (c_parser_attribute_any_word): Handle RID_ATOMIC.
8091 (c_parser_initializer, c_parser_initelt, c_parser_initval)
8092 (c_parser_statement_after_labels, c_parser_switch_statement)
8093 (c_parser_for_statement, c_parser_expr_no_commas)
8094 (c_parser_conditional_expression, c_parser_binary_expression)
8095 (c_parser_cast_expression, c_parser_unary_expression)
8096 (c_parser_postfix_expression)
8097 (c_parser_postfix_expression_after_primary, c_parser_expression):
8098 Use convert_lvalue_to_rvalue.
8099 (c_parser_expression_conv, c_parser_expr_list): Document
8100 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
8101 (c_parser_objc_synchronized_statement): Use
8102 convert_lvalue_to_rvalue.
8103 (c_parser_objc_selector): Handle RID_ATOMIC.
8104 (c_parser_objc_receiver, c_parser_array_notation): Use
8105 convert_lvalue_to_rvalue.
8106 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
8107 _Atomic (type-name).
8108 (struct c_declspecs): Add atomic_p field.
8109 (convert_lvalue_to_rvalue): Declare.
8110 * c-typeck.c (c_type_promotes_to): Promote atomic types to
8111 corresponding atomic types.
8112 (qualify_type): Don't add _Atomic qualifiers from second argument.
8113 (comp_target_types): Do not allow _Atomic mismatches.
8114 (type_lists_compatible_p): Do not remove atomic qualifiers when
8116 (really_atomic_lvalue, convert_lvalue_to_rvalue)
8117 (build_atomic_assign): New functions.
8118 (build_unary_op): Use build_atomic_assign for atomic increment and
8120 (build_conditional_expr): Do not treat _Atomic void as a qualified
8122 (build_modify_expr): Use build_atomic_assign for atomic LHS.
8123 (find_anonymous_field_with_type, convert_to_anonymous_field)
8124 (convert_for_assignment): Do not remove atomic qualifiers when
8126 (digest_init): Do not accept initialization of arrays of atomic
8127 elements by string constants.
8128 (build_asm_expr): Use convert_lvalue_to_rvalue.
8129 (build_binary_op): Do not treat _Atomic void as a qualified
8132 2013-11-06 DJ Delorie <dj@redhat.com>
8134 * c-decl.c (locate_old_decl): If a previous conflicting decl is
8135 both explicit and builtin, print the location of the explicit one.
8137 2013-11-05 Tobias Burnus <burnus@net-b.de>
8139 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
8140 c_parser_omp_distribute, c_parser_omp_teams,
8141 c_parser_omp_target, c_parser_omp_declare): Handle
8144 2013-11-03 Marek Polacek <polacek@redhat.com>
8146 * c-decl.c (grokdeclarator): Add VLA instrumentation.
8148 2013-11-01 Jakub Jelinek <jakub@redhat.com>
8150 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
8151 check_dup_generic at the end, unless remove is true.
8152 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
8154 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
8156 2013-10-31 Jakub Jelinek <jakub@redhat.com>
8158 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
8159 with decl that is not pointer nor array.
8161 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8163 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
8164 a spawning function is found.
8165 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
8166 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
8167 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8168 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
8170 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
8171 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
8173 (c_finish_return): Added a check to reject _Cilk_spawn in return
8175 (build_cilk_spawn): New function.
8176 (build_cilk_sync): Likewise.
8177 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
8179 2013-10-27 Tobias Burnus <burnus@net-b.de>
8182 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
8183 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
8184 (c_parser_statement_after_labels): Update calls.
8186 2013-10-24 Tobias Burnus <burnus@net-b.de>
8189 * c-parser.c (c_parser_pragma, c_parser_for_statement):
8190 Handle PRAGMA_IVDEP.
8191 (c_parser_statement_after_labels): Update call.
8193 2013-10-24 Marek Polacek <polacek@redhat.com>
8195 * c-parser.c (c_parser_struct_declaration): Add a comment.
8196 (c_parser_declarator): Don't allow _Alignas here.
8198 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
8200 * c-parser.c: Include omp-low.h.
8201 * c-typeck.c: Likewise.
8203 2013-10-17 Marek Polacek <polacek@redhat.com>
8206 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
8207 Document syntax of the array-declarator.
8208 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
8210 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
8211 (c_parser_struct_declaration): Likewise.
8212 (c_parser_declarator): Likewise.
8213 (c_parser_direct_declarator_inner): Likewise.
8214 (c_parser_parameter_declaration): Likewise.
8215 (c_parser_type_name): Likewise.
8217 2013-10-11 Jakub Jelinek <jakub@redhat.com>
8219 * c-lang.h (current_omp_declare_target_attribute): New extern
8221 * c-parser.c: Include c-lang.h.
8222 (struct c_parser): Change tokens to c_token *.
8223 Add tokens_buf field. Change tokens_avail type to unsigned int.
8224 (c_parser_consume_token): If parser->tokens isn't
8225 &parser->tokens_buf[0], increment parser->tokens.
8226 (c_parser_consume_pragma): Likewise.
8227 (enum pragma_context): Add pragma_struct and pragma_param.
8228 (c_parser_external_declaration): Adjust
8229 c_parser_declaration_or_fndef caller.
8230 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
8231 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
8232 Adjust recursive call.
8233 (c_parser_struct_or_union_specifier): Use pragma_struct instead
8235 (c_parser_parameter_declaration): Use pragma_param instead of
8237 (c_parser_compound_statement_nostart, c_parser_label,
8238 c_parser_for_statement): Adjust
8239 c_parser_declaration_or_fndef callers.
8240 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
8241 it through to c_parser_conditional_expression.
8242 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
8243 pass it through to c_parser_binary_expression. Adjust recursive
8245 (c_parser_binary_expression): Remove prec argument, add
8246 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8247 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8248 binop matches it, use build2 instead of parser_build_binary_op.
8249 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8250 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8251 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8252 Handle pragma_struct and pragma_param the same as pragma_external.
8253 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8254 (c_parser_omp_variable_list): Parse array sections for
8255 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8256 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8257 (c_parser_omp_clause_reduction): Handle user defined reductions.
8258 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8259 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8260 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8261 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8262 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8263 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8264 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8265 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8266 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8267 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8268 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8269 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8270 (c_parser_omp_for_loop): Add CODE argument, pass it through
8271 to c_finish_omp_for. Change last argument to cclauses,
8272 and adjust uses to grab parallel clauses from the array of all
8273 the split clauses. Adjust c_parser_binary_expression,
8274 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8275 (omp_split_clauses): New function.
8276 (c_parser_omp_simd): New function.
8277 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8278 Allow the function to be called also when parsing combined constructs,
8279 and call c_parser_omp_simd when parsing for simd.
8280 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8281 #pragma omp section, require exactly one structured-block instead of
8282 sequence of statements.
8283 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8284 Allow the function to be called also when parsing combined constructs.
8285 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
8286 Allow the function to be called also when parsing combined
8288 (c_parser_omp_taskgroup, c_parser_omp_cancel,
8289 c_parser_omp_cancellation_point, c_parser_omp_distribute,
8290 c_parser_omp_teams, c_parser_omp_target_data,
8291 c_parser_omp_target_update, c_parser_omp_target,
8292 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
8293 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
8294 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
8295 (c_parser_omp_construct): Add p_name and mask vars. Handle
8296 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
8297 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
8298 and c_parser_omp_sections callers.
8299 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
8300 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
8301 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
8302 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
8303 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
8305 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
8306 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
8307 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
8308 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
8309 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
8310 * c-typeck.c: Include tree-inline.h.
8311 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
8312 handle_omp_array_sections_1, handle_omp_array_sections,
8313 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
8314 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
8315 user defined reductions.
8316 (c_tree_equal): New function.
8317 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
8318 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
8319 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
8320 c_check_omp_declare_reduction_r): New prototypes.
8321 * c-decl.c (current_omp_declare_target_attribute): New variable.
8322 (c_decl_attributes): New function.
8323 (start_decl, start_function): Use it instead of decl_attributes.
8324 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
8325 c_omp_reduction_decl, c_omp_reduction_lookup,
8326 c_check_omp_declare_reduction_r): New functions.
8328 2013-09-25 Tom Tromey <tromey@redhat.com>
8330 * Make-lang.in (c/gccspec.o): Remove.
8331 (CFLAGS-c/gccspec.o): New variable.
8332 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8333 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8334 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8336 2013-09-25 Tom Tromey <tromey@redhat.com>
8338 * Make-lang.in (c/gccspec.o): Don't use subshell.
8340 2013-09-18 Marek Polacek <polacek@redhat.com>
8343 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8344 Remove unnecessary check.
8346 2013-09-18 Marek Polacek <polacek@redhat.com>
8349 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8350 no_sanitize_undefined attribute.
8352 2013-09-13 Kai Tietz <ktietz@redhat.com>
8355 * c-decl.c (c_builtin_function_ext_scope): Remove
8356 wrong assumption that it is never called on prexisting
8359 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8361 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8363 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8365 * c-objc-common.c (c_tree_printer): Tidy.
8367 2013-08-30 Marek Polacek <polacek@redhat.com>
8369 * c-typeck.c (build_binary_op): Add division by zero and shift
8372 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
8373 Joseph Myers <joseph@codesourcery.com>
8376 * c-typeck.c (c_common_type): Prefer double_type_node over
8377 other REAL_TYPE types with the same precision.
8378 (convert_arguments): Likewise.
8380 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8382 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8383 (c_initialize_diagnostics): Call a destructor for the early printer.
8385 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8387 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8388 printer initialization.
8390 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
8393 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8394 check for truth values.
8395 (expand_array_notation_exprs): Added truth values case. Removed an
8396 unwanted else. Added for-loop to walk through subtrees in default
8399 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8401 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8403 2013-07-23 Joseph Myers <joseph@codesourcery.com>
8405 * c-parser.c (struct c_generic_association): Fix typo.
8407 2013-07-23 Tom Tromey <tromey@redhat.com>
8408 Joseph Myers <joseph@codesourcery.com>
8410 * c-parser.c (struct c_generic_association): New.
8411 (c_generic_association_d): New typedef.
8412 (c_parser_generic_selection): New function.
8413 (c_parser_postfix_expression): Handle RID_GENERIC.
8415 2013-07-13 Jason Merrill <jason@redhat.com>
8418 * c-decl.c (finish_struct): Check for too-large class.
8420 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
8423 * c-typeck.c (set_init_index): When folding, check for index overflow.
8425 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8427 * c-parser.c (c_parser_array_notation): Removed rejection of array
8428 notations in an array of function pointers.
8430 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8432 * c-array-notation.c (make_triplet_val_inv): New function.
8433 (create_cmp_incr): Likewise.
8434 (create_array_refs): Likewise.
8435 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8436 Also modularized common parts between functions and called the function.
8437 (build_array_notation_expr): Likewise.
8438 (fix_conditional_array_notations_1): Likewise.
8439 (fix_array_notation_expr): Likewise.
8440 (fix_array_notation_call_expr): Likewise.
8442 2013-06-18 Marek Polacek <polacek@redhat.com>
8445 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8447 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8449 * c-array-notation.c (build_array_notation_expr): Reject array notation
8450 mismatch between LHS and RHS even inside a call_expr. Also, removed
8451 a couple while statements that were dead code.
8453 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8455 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8456 excessive precision expressions in function parameters. Also removed
8457 couple unwanted while statements.
8459 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8461 * c-array-notation.c (expand_array_notation_exprs): Added
8462 ARRAY_NOTATION_REF case.
8464 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8466 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8467 function to c-family/array-notation-common.c.
8468 (is_cilkplus_reduce_builtin): Likewise.
8469 (find_rank): Likewise.
8470 (extract_array_notation_exprs): Likewise.
8471 (replace_array_notations): Likewise.
8472 (find_inv_trees): Likewise.
8473 (replace_inv_trees): Likewise.
8474 (contains_array_notation_expr): Likewise.
8475 (find_correct_array_notation_type): Likewise.
8476 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8477 (struct inv_list): Moved this to c-family/array-notation-common.c.
8478 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
8480 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8482 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8483 reduction functions outside the for-loop. Added a check if the fundecl
8484 is non-NULL. Finally, removed an unwanted if-statement, and made the
8487 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8489 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8490 condition of the if-statement matches the rank of else-block and then-
8491 block when array notations are used.
8492 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8493 expression after the entire function body is parsed.
8494 (c_parser_expr_no_commas): Delayed creating array notation expressions
8495 to the end of function parsing.
8496 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8497 whole if-statement instead of just the condition.
8498 (expand_array_notation_exprs): Added MODIFY_EXPR case.
8500 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8503 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8504 array to NULL_TREE if they are unused. Also added a check for the
8505 field to be NULL before its fields are used in future.
8507 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8510 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8511 (build_array_notation_expr): Likewise.
8513 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8515 * c-typeck.c (build_array_ref): Added a check to see if array's
8516 index is greater than one. If true, then emit an error.
8517 (build_function_call_vec): Exclude error reporting and checking
8518 for builtin array-notation functions.
8519 (convert_arguments): Likewise.
8520 (c_finish_return): Added a check for array notations as a return
8521 expression. If true, then emit an error.
8522 (c_finish_loop): Added a check for array notations in a loop
8523 condition. If true then emit an error.
8524 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8525 (build_binary_op): Added a check for array notation expr inside
8526 op1 and op0. If present, we call another function to find correct
8528 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8529 * c-parser.c (c_parser_compound_statement): Check if array
8530 notation code is used in tree, if so, then transform them into
8532 (c_parser_expr_no_commas): Check if array notation is used in LHS
8533 or RHS, if so, then build array notation expression instead of
8535 (c_parser_postfix_expression_after_primary): Added a check for
8536 colon(s) after square braces, if so then handle it like an array
8537 notation. Also, break up array notations in unary op if found.
8538 (c_parser_direct_declarator_inner): Added a check for array
8540 (c_parser_compound_statement): Added a check for array notation in
8541 a stmt. If one is present, then expand array notation expr.
8542 (c_parser_if_statement): Likewise.
8543 (c_parser_switch_statement): Added a check for array notations in
8544 a switch statement's condition. If true, then output an error.
8545 (c_parser_while_statement): Similarly, but for a while.
8546 (c_parser_do_statement): Similarly, but for a do-while.
8547 (c_parser_for_statement): Similarly, but for a for-loop.
8548 (c_parser_unary_expression): Check if array notation is used in a
8549 pre-increment or pre-decrement expression. If true, then expand
8551 (c_parser_array_notation): New function.
8552 * c-array-notation.c: New file.
8553 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
8555 2013-05-23 Mike Stump <mikestump@comcast.net>
8557 * c-typeck.c (convert_for_assignment): Handle references to memory
8560 2013-05-16 Jason Merrill <jason@redhat.com>
8562 * Make-lang.in (cc1$(exeext)): Use link mutex.
8564 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8566 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8567 to simply use OPT_Wpointer_arith.
8568 (build_unary_op): Likewise.
8570 2013-04-03 Jakub Jelinek <jakub@redhat.com>
8573 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8574 argument. If set, or it temporarily for parsing of the first
8575 argument into force_folding_builtin_constant_p.
8576 (c_parser_postfix_expression): Adjust callers.
8578 2013-03-21 Richard Biener <rguenther@suse.de>
8580 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8581 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8583 2013-02-12 Marek Polacek <polacek@redhat.com>
8586 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8589 2013-01-24 Jakub Jelinek <jakub@redhat.com>
8592 * c-typeck.c (set_nonincremental_init_from_string): If
8593 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8595 (process_init_element): Likewise.
8597 2012-12-20 Jakub Jelinek <jakub@redhat.com>
8600 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8601 argument, don't call default_function_array_conversion
8602 nor c_fully_fold here.
8603 (c_parser_asm_statement): Adjust callers.
8604 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8605 and outputs here, and call default_function_array_conversion
8606 on inputs that don't need to be addressable.
8608 2012-12-18 Jakub Jelinek <jakub@redhat.com>
8611 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8612 warning require that both c_common_unsigned_type as well as
8613 c_common_signed_type is the same for both mvl and mvr types.
8615 2012-11-16 Diego Novillo <dnovillo@google.com>
8617 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8619 * c-common.c: Use new vec API in vec.h.
8620 * c-common.h: Likewise.
8621 * c-gimplify.c: Likewise.
8622 * c-pragma.c: Likewise.
8623 * c-pretty-print.c: Likewise.
8624 * c-pretty-print.h: Likewise.
8625 * c-semantics.c: Likewise.
8626 * c-decl.c: Likewise.
8627 * c-parser.c: Likewise.
8628 * c-tree.h: Likewise.
8629 * c-typeck.c: Likewise.
8631 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8634 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8636 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8639 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8640 shadows a function, unless the variable is a function or a
8641 pointer-to-function.
8643 2012-10-12 Jakub Jelinek <jakub@redhat.com>
8646 * c-parser.c (struct c_tree_loc_pair): Removed.
8647 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8648 add location_t * and tree * arguments, fill in array of 3
8649 sizeof_arg trees and corresponding locs.
8650 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8651 c_parser_expr_list callers.
8652 (c_parser_postfix_expression_after_primary): Likewise. Pass
8653 array of 3 sizeof_arg trees and locs (corresponding to first
8654 3 arguments) to sizeof_pointer_memaccess_warning.
8656 2012-10-09 Lawrence Crowl <crowl@google.com>
8658 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8659 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8662 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8665 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8668 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
8671 * c-typeck.c: Include c-common.h.
8672 (enum stv_conv): Moved to c-common.h.
8673 (scalar_to_vector): Moved to c-common.c.
8674 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8675 * Make-lang.in: c-typeck.c depends on c-common.h.
8677 2012-10-04 Arnaud Charlet <charlet@adacore.com>
8679 * c-decl.c (c_write_global_declarations): Fix handling of
8682 2012-09-30 Sharad Singhai <singhai@google.com>
8684 * c-decl.c (c_write_global_declarations): Use a different method
8685 to determine if the dump has ben initialized.
8687 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8690 * c-typeck.c (c_cast_expr): When casting to a type requiring
8691 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8694 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8697 * c-typeck.c (build_unary_op): Pass original argument of
8698 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8699 any C_MAYBE_CONST_EXPR, if it has integer operands.
8700 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8701 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8702 to c_objc_common_truthvalue_conversion, then remove any
8703 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8704 c_objc_common_truthvalue_conversion not
8705 c_common_truthvalue_conversion.
8706 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8707 call note_integer_operands for arguments with integer operands
8708 that are not integer constants.
8710 2012-09-13 Jakub Jelinek <jakub@redhat.com>
8713 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8714 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8716 2012-08-31 Jakub Jelinek <jakub@redhat.com>
8719 * c-convert.c (convert): Don't call fold_convert_loc if
8720 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8721 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8722 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8724 2012-08-24 Jakub Jelinek <jakub@redhat.com>
8727 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8728 for nested and empty_ok arguments in the call to
8729 c_parser_declaration_or_fndef.
8731 2012-08-17 Jakub Jelinek <jakub@redhat.com>
8733 * c-tree.h (c_last_sizeof_arg): Declare.
8734 * c-parser.c (struct c_tree_loc_pair): New type.
8735 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8737 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8738 (c_parser_postfix_expression_after_primary): Likewise. Call
8739 sizeof_pointer_memaccess_warning if needed.
8740 (sizeof_ptr_memacc_comptypes): New function.
8741 * c-typeck.c (c_last_sizeof_arg): New global variable.
8742 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8744 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
8746 * c-lang.h (lang_decl): Add variable_size GTY option.
8748 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8750 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8751 * Make-lang.in: Fix dependencies.
8753 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8755 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8756 and add language Makefile hooks.
8757 * config-lang.in: New file.
8758 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8759 add the required "normal" config-lang.in rules.
8760 * c-lang.h: Moved from gcc/ to here.
8761 * c-tree.h: Likewise.
8762 * c-objc-common.c: Likewise.
8763 * c-objc-common.h: Likewise.
8764 * c-typeck.c: Likewise.
8765 * c-convert.c: Likewise.
8766 * c-lang.c: Likewise.
8767 * c-aux-info.c: Likewise.
8768 * c-errors.c: Likewise.
8769 * gccspec.c: Likewise.
8770 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8771 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8773 Copyright (C) 2012-2022 Free Software Foundation, Inc.
8775 Copying and distribution of this file, with or without modification,
8776 are permitted in any medium without royalty provided the copyright
8777 notice and this notice are preserved.