1 2016-08-25 Marek Polacek <polacek@redhat.com>
4 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
5 or _FloatN or _FloatNx is not supported.
6 (finish_declspecs): Set type to integer_type_node when _FloatN or
7 _FloatNx is not supported.
9 2016-08-19 Joseph Myers <joseph@codesourcery.com>
12 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
13 (struct c_declspecs): Add field floatn_nx_idx.
14 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
15 and _FloatNx type specifiers.
16 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
17 (c_parser_declspecs, c_parser_attribute_any_word)
18 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
19 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
20 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
23 2016-08-12 Jakub Jelinek <jakub@redhat.com>
24 Martin Liska <mliska@suse.cz>
27 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
28 % to determine val element to change. Assert that
29 wchar_bytes * charwidth fits into val array.
31 2016-08-12 Marek Polacek <polacek@redhat.com>
34 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
35 (c_parser_postfix_expression): Likewise.
36 * c-typeck.c (build_unary_op): Adjust fall through comment.
37 (c_mark_addressable): Likewise.
39 2016-08-11 Jakub Jelinek <jakub@redhat.com>
42 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
43 array member through typedef, for orig_qual_indirect == 0 clear
46 2016-08-08 David Malcolm <dmalcolm@redhat.com>
49 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
50 this up to selftest::run_c_tests.
51 (selftest::run_c_tests): New function.
53 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
55 * c-parser.c (struct oacc_routine_data): Add error_seen and
57 (c_finish_oacc_routine): Use these.
58 (c_parser_declaration_or_fndef): Adjust.
59 (c_parser_oacc_routine): Likewise. Support more C language
60 constructs, and improve diagnostics. Move pragma context
62 (c_parser_pragma): ... here.
64 * c-parser.c (struct oacc_routine_data): New.
65 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
67 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
68 declare target" attribute.
70 2016-08-01 Jan Beulich <jbeulich@suse.com>
72 * c-fold.c (c_fully_fold_internal): Also emit shift count
73 warnings for vector types.
74 * c-typeck.c (build_binary_op): Likewise.
76 2016-07-29 Marek Polacek <polacek@redhat.com>
79 * c-decl.c (finish_struct): Rephrase an error message.
82 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
83 to error node for invalid code.
86 * c-decl.c (implicitly_declare): Return decl early not only for
87 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
89 2016-07-29 Jakub Jelinek <jakub@redhat.com>
92 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
93 on GNU extern inline functions.
95 2016-07-29 Marek Polacek <polacek@redhat.com>
98 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
101 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
103 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
105 2016-07-20 David Malcolm <dmalcolm@redhat.com>
107 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
109 (best_macro_match): Likewise, converting from a typedef to a
111 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
112 (lookup_name_fuzzy): Update for change of best_macro_match to a
113 subclass with a ctor that calls cpp_forall_identifiers.
115 2016-07-20 David Malcolm <dmalcolm@redhat.com>
117 * c-decl.c (implicit_decl_warning): Update for conversion of
118 return type of lookup_name_fuzzy to const char *.
119 (undeclared_variable): Likewise.
120 (lookup_name_fuzzy): Convert return type from tree to
122 * c-parser.c (c_parser_declaration_or_fndef): Update for
123 conversion of return type of lookup_name_fuzzy to const char *.
124 (c_parser_parameter_declaration): Likewise.
126 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
128 * c-parser.c (c_parser_oacc_declare): Don't scan for
130 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
131 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
132 zero-length subarrays.
134 2016-07-15 Jakub Jelinek <jakub@redhat.com>
137 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
138 instead of FUZZY_LOOKUP_NAME.
139 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
140 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
142 2016-07-14 Jakub Jelinek <jakub@redhat.com>
145 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
147 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
149 * c-parser.c (c_parser_generic_selection): Make type of variable
151 (c_parser_omp_declare_simd): Likewise.
153 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
155 * c-decl.c (struct c_struct_parse_info): Change member types
156 from vec to auto_vec.
157 (start_struct): Adjust.
158 (finish_struct): Likewise.
160 2016-07-02 Jakub Jelinek <jakub@redhat.com>
163 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
165 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
167 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
168 Move pragma context checking into...
169 (c_parser_omp_cancellation_point): ... here, and improve
171 * c-typeck.c (c_finish_omp_cancel)
172 (c_finish_omp_cancellation_point): Improve diagnostic messages.
174 2016-06-29 Jakub Jelinek <jakub@redhat.com>
177 * c-typeck.c (c_build_qualified_type): Don't clear
178 C_TYPE_INCOMPLETE_VARS for the main variant.
180 2016-06-28 Martin Sebor <msebor@redhat.com>
183 * c-typeck.c (output_init_element): Diagnose incompatible types
184 before non-constant initializers.
186 2016-06-28 Jakub Jelinek <jakub@redhat.com>
188 * Make-lang.in: Don't cat ../stage_current if it does not exist.
190 2016-06-23 Andi Kleen <ak@linux.intel.com>
192 * Make-lang.in: Add support for autofdo.
194 2016-06-22 David Malcolm <dmalcolm@redhat.com>
197 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
198 (implicit_decl_warning): When issuing warnings for implicit
199 declarations, attempt to provide a suggestion via
201 (undeclared_variable): Likewise when issuing errors.
202 (lookup_name_in_scope): Likewise.
203 (struct edit_distance_traits<cpp_hashnode *>): New struct.
204 (best_macro_match): New typedef.
205 (find_closest_macro_cpp_cb): New function.
206 (lookup_name_fuzzy): New function.
207 * c-parser.c: Include gcc-rich-location.h.
208 (c_token_starts_typename): Split out case CPP_KEYWORD into...
209 (c_keyword_starts_typename): ...this new function.
210 (c_parser_declaration_or_fndef): When issuing errors about
211 missing "struct" etc, add a fixit. For other kinds of errors,
212 attempt to provide a suggestion via lookup_name_fuzzy.
213 (c_parser_parms_declarator): When looking ahead to detect typos in
214 type names, also reject CPP_KEYWORD.
215 (c_parser_parameter_declaration): When issuing errors about
216 unknown type names, attempt to provide a suggestion via
218 * c-tree.h (c_keyword_starts_typename): New prototype.
220 2016-06-20 Joseph Myers <joseph@codesourcery.com>
223 * c-typeck.c (build_conditional_expr): Return error_mark_node if
224 c_common_type returns error_mark_node.
226 2016-06-19 Martin Sebor <msebor@redhat.com>
229 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
230 __alignof__ (expression).
232 2016-06-14 David Malcolm <dmalcolm@redhat.com>
234 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
236 2016-06-14 David Malcolm <dmalcolm@redhat.com>
238 * c-typeck.c (build_component_ref): Simplify fixit code by
239 using gcc_rich_location::add_fixit_misspelled_id.
240 (set_init_label): Likewise.
242 2016-06-13 David Malcolm <dmalcolm@redhat.com>
244 * c-parser.c (c_parser_initelt): Provide location of name for new
245 location_t param of set_init_label.
246 * c-tree.h (set_init_label): Add location_t param.
247 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
248 param and use it when issuing error messages about unrecognized
249 field names. Attempt to provide a fixit hint if appropriate,
250 otherwise update the error message to provide the type name.
252 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
255 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
258 2016-06-08 Martin Sebor <msebor@redhat.com>
259 Jakub Jelinek <jakub@redhat.com>
263 * c-typeck.c (convert_arguments): Don't promote last argument
264 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
266 2016-06-08 Marek Polacek <polacek@redhat.com>
269 * c-decl.c (grokdeclarator): Check TYPE_P.
272 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
275 2016-06-07 David Malcolm <dmalcolm@redhat.com>
277 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
278 and structure element reference, capture the location of the
279 element name token and pass it to build_component_ref.
280 (c_parser_postfix_expression_after_primary): Likewise for
281 structure element dereference.
282 (c_parser_omp_variable_list): Likewise for
283 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
284 * c-tree.h (build_component_ref): Add location_t param.
285 * c-typeck.c (build_component_ref): Add location_t param
286 COMPONENT_LOC. Use it, if available, when issuing hints about
287 mispelled member names to provide a fixit replacement hint.
289 2016-06-06 Marek Polacek <polacek@redhat.com>
292 * c-parser.c (c_parser_direct_declarator): Set location.
294 2016-06-06 Marek Polacek <polacek@redhat.com>
296 * c-typeck.c (comptypes_internal): Handle comparisons of
297 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
298 TYPE_REF_CAN_ALIAS_ALL.
300 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
302 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
303 arguments as addressable when async clause exists.
305 2016-05-30 Jakub Jelinek <jakub@redhat.com>
308 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
309 when combined with target construct.
311 2016-05-26 Jakub Jelinek <jakub@redhat.com>
313 * c-parser.c (c_parser_omp_clause_schedule): Warn if
314 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
316 2016-05-25 Marek Polacek <polacek@redhat.com>
319 * c-decl.c (c_make_fname_decl): Don't check seen_error.
322 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
324 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
326 * c-parser.c (c_parser_oacc_declare): Add support for
327 GOMP_MAP_FIRSTPRIVATE_POINTER.
328 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
329 argument with enum c_omp_region_type ort.
330 (handle_omp_array_sections): Likewise. Update call to
331 handle_omp_array_sections_1.
332 (c_finish_omp_clauses): Add specific errors and warning messages for
333 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
334 call to handle_omp_array_sections.
336 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
338 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
340 2016-05-24 Richard Biener <rguenther@suse.de>
344 * c-typeck.c (build_array_ref): Do not complain about indexing
345 non-lvalue vectors. Adjust for function name change.
347 2016-05-20 Martin Sebor <msebor@redhat.com>
350 * c-typeck.c (error_init): Use
351 expansion_point_location_if_in_system_header.
352 (warning_init): Same.
354 2016-05-19 David Malcolm <dmalcolm@redhat.com>
357 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
359 (c_parser_postfix_expression): Likewise.
360 * c-tree.h (c_expr::set_error): New method.
361 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
362 that result's range is initialized.
364 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
366 * c-typeck.c (parser_build_unary_op): Fix formatting.
368 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
370 * c-decl.c (grokdeclarator): Remove errmsg and use of
371 targetm.invalid_return_type.
372 (grokparms): Remove errmsg and use of
373 targetm.invalid_parameter_type.
375 2016-05-13 Joseph Myers <joseph@codesourcery.com>
377 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
378 function return type.
380 2016-05-12 Marek Polacek <polacek@redhat.com>
383 * c-decl.c (build_compound_literal): Pass LOC down to
384 c_incomplete_type_error.
385 * c-tree.h (require_complete_type): Adjust declaration.
386 (c_incomplete_type_error): Likewise.
387 * c-typeck.c (require_complete_type): Add location parameter, pass it
388 down to c_incomplete_type_error.
389 (c_incomplete_type_error): Add location parameter, pass it down to
391 (build_component_ref): Pass location down to c_incomplete_type_error.
392 (default_conversion): Pass location down to require_complete_type.
393 (build_array_ref): Likewise.
394 (build_function_call_vec): Likewise.
395 (convert_arguments): Likewise.
396 (build_unary_op): Likewise.
397 (build_c_cast): Likewise.
398 (build_modify_expr): Likewise.
399 (convert_for_assignment): Likewise.
400 (c_finish_omp_clauses): Likewise.
402 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
405 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
407 * c-errors.c (pedwarn_c90): Return true if warned.
408 * c-tree.h (pedwarn_c90): Change return type to bool.
409 (enum c_declspec_word): Add new enumerator cdw_atomic.
411 2016-05-11 Marek Polacek <polacek@redhat.com>
414 * c-decl.c (diagnose_mismatched_decls): Factor out code to
415 diagnose_mismatched_attributes and call it.
417 2016-05-10 Marek Polacek <polacek@redhat.com>
420 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
421 on a declaration following the definition.
423 2016-05-05 Jakub Jelinek <jakub@redhat.com>
425 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
426 parse it through to c_parser_c99_block_statement.
427 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
430 2016-05-04 Marek Polacek <polacek@redhat.com>
432 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
435 2016-05-04 Marek Polacek <polacek@redhat.com>
438 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
439 for macro expansions.
441 2016-05-03 Marek Polacek <polacek@redhat.com>
444 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
445 check_builtin_function_arguments.
447 2016-05-03 Richard Biener <rguenther@suse.de>
449 * Make-lang.in (cc1-checksum.c): For stage-final re-use
450 the checksum from the previous stage.
452 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
454 * c-parser.c (c_parser_oacc_all_clauses): Update call to
455 c_finish_omp_clauses.
456 (c_parser_omp_all_clauses): Likewise.
457 (c_parser_oacc_cache): Likewise.
458 (c_parser_oacc_loop): Likewise.
459 (omp_split_clauses): Likewise.
460 (c_parser_omp_declare_target): Likewise.
461 (c_parser_cilk_all_clauses): Likewise.
462 (c_parser_cilk_for): Likewise.
463 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
464 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
466 2016-05-02 Marek Polacek <polacek@redhat.com>
469 * c-decl.c (grokdeclarator): Diagnose when array's size has an
472 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
475 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
476 OACC_LOOP_CLAUSE_MASK.
477 (c_parser_oacc_kernels_parallel): Update call to
478 c_oacc_split_loop_clauses.
480 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
482 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
483 argument to build_modify_expr in two cases.
485 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
487 * c-parser.c (c_parser_postfix_expression_after_primary): Call
488 warn_for_memset instead of warning directly here.
490 2016-04-26 Marek Polacek <polacek@redhat.com>
493 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
495 (c_parser_for_statement): ... here.
496 (c_parser_if_statement): Use it.
497 (c_parser_switch_statement): Use it.
498 (c_parser_while_statement): Use it.
501 * c-decl.c (pushdecl): Pass LOCUS down to warning.
503 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
506 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
507 instead of c_finish_cilk_clauses.
508 * c-tree.h (c_finish_omp_clauses): Add new default argument.
509 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
510 floating-point variables in the linear clause for Cilk Plus.
512 2016-04-18 Michael Matz <matz@suse.de>
514 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
515 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
517 2016-04-15 Marek Polacek <polacek@redhat.com>
520 * c-typeck.c (build_unary_op): Pass location down to error and
523 2016-04-15 Jakub Jelinek <jakub@redhat.com>
526 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
528 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
529 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
530 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
531 Adjust c_parser_pragma callers.
532 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
534 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
536 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
537 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
538 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
539 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
540 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
541 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
542 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
543 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
545 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
546 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
549 2016-04-13 Marek Polacek <polacek@redhat.com>
552 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
554 (c_parser_statement): Likewise.
555 (c_parser_c99_block_statement): Likewise.
556 (c_parser_while_statement): Likewise.
557 (c_parser_for_statement): Likewise.
558 (c_parser_if_body): Don't set IF_P here.
559 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
560 about dangling else here.
561 * c-tree.h (c_finish_if_stmt): Adjust declaration.
562 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
563 warn about dangling else here.
565 2016-04-04 Marek Polacek <polacek@redhat.com>
568 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
570 2016-03-31 Marek Polacek <polacek@redhat.com>
573 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
575 2016-03-18 David Malcolm <dmalcolm@redhat.com>
578 * c-parser.c (c_parser_postfix_expression): Set the source range
579 for uses of "__builtin_types_compatible_p".
581 2016-03-17 Jakub Jelinek <jakub@redhat.com>
584 * c-typeck.c (composite_type): Don't count void_list_node
585 into len, if the list is terminated by void_list_node, start
586 with void_list_node instead of NULL for newargs. Stop
589 2016-03-16 Marek Polacek <polacek@redhat.com>
592 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
593 nested functions returning VM types.
595 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
597 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
598 when calling c_finish_omp_clauses.
600 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
603 * c-decl.c (get_parm_info): Don't queue implicit function declarations
606 2016-03-04 Marek Polacek <polacek@redhat.com>
609 * c-parser.c (c_parser_postfix_expression): Call
610 c_parser_cast_expression rather than c_parser_postfix_expression.
612 2016-03-01 Jakub Jelinek <jakub@redhat.com>
616 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
617 of incomplete decls to error_mark_node.
619 2016-02-24 Marek Polacek <polacek@redhat.com>
622 * c-decl.c (finish_decl): Don't update the copy of the type of a
625 2016-02-23 Jakub Jelinek <jakub@redhat.com>
628 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
629 in id_kind reclassification.
631 2016-02-16 Jakub Jelinek <jakub@redhat.com>
634 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
636 2016-02-16 James Norris <jnorris@codesourcery.com>
639 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
641 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
643 * c-decl.c (build_null_declspecs): Zero the entire struct.
646 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
647 callers changed. If nested_p is true, use it to call
648 finish_implicit_inits.
649 * c-tree.h (finish_implicit_inits): Declare.
650 * c-typeck.c (finish_implicit_inits): New function. Move code
652 (push_init_level): ... here.
653 (set_designator, process_init_element): Call finish_implicit_inits.
655 2016-02-11 Jakub Jelinek <jakub@redhat.com>
658 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
659 arguments for -Waddress warning.
661 2016-02-04 Jakub Jelinek <jakub@redhat.com>
664 * c-decl.c (finish_enum): When honoring mode attribute,
665 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
667 2016-01-29 Jakub Jelinek <jakub@redhat.com>
670 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
671 all type variants, not just TYPE_MAIN_VARIANT.
673 2016-01-27 Jakub Jelinek <jakub@redhat.com>
676 * c-decl.c (c_write_global_declarations_1): Warn with
677 warn_unused_function if static prototype without definition
680 2016-01-27 Marek Polacek <polacek@redhat.com>
683 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
684 to unsigned, if needed. Add -Wsign-compare warning.
686 2016-01-26 Jakub Jelinek <jakub@redhat.com>
688 PR tree-optimization/69483
689 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
691 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
694 * c-tree.h (incomplete_record_decls): Declare.
695 * c-parser.c (incomplete_record_decls): Define.
696 (c_parser_translation_unit): Iterate through incomplete_record_decls and
697 report error if any decl has zero size.
698 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
699 or enum type to incomplete_record_decls.
701 2016-01-14 Tom de Vries <tom@codesourcery.com>
703 PR tree-optimization/68773
704 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
707 2016-01-14 Marek Polacek <polacek@redhat.com>
710 * c-decl.c (grokdeclarator): Provide more information for invalid
713 2016-01-06 David Malcolm <dmalcolm@redhat.com>
715 * c-parser.c (c_parser_unary_expression): For dereferences, build
716 a combined location before calling build_indirect_ref, so that
717 error reports cover the full range, manually updating the c_expr
720 2016-01-06 Marek Polacek <polacek@redhat.com>
723 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
724 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
727 2016-01-04 Jakub Jelinek <jakub@redhat.com>
729 Update copyright years.
731 2016-01-04 Marek Polacek <polacek@redhat.com>
734 * c-typeck.c (build_atomic_assign): Improve commentary. Add
735 optimization to use __atomic_fetch_* built-in if possible.
737 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
739 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
741 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
744 2015-12-22 Marek Polacek <polacek@redhat.com>
747 * c-typeck.c (build_component_ref): Warn when acessing elements of
748 atomic structures or unions.
750 2015-12-21 David Malcolm <dmalcolm@redhat.com>
752 * c-typeck.c: Include "gcc-rich-location.h".
753 (build_binary_op): In the two places that call binary_op_error,
754 create a gcc_rich_location and populate it with the location of
755 the binary op and its two operands.
757 2015-12-16 David Malcolm <dmalcolm@redhat.com>
759 * c-parser.c (c_parser_statement_after_labels): When calling
760 c_finish_return, Use the return expression's location if it has
761 one, falling back to the location of the first token within it.
762 * c-typeck.c (c_finish_return): When issuing warnings about
763 the incorrect presence/absence of a return value, issue a note
764 showing the declaration of the function.
766 2015-12-16 David Malcolm <dmalcolm@redhat.com>
768 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
770 (c_parser_peek_nth_token): New function.
771 (c_parser_peek_conflict_marker): New function.
772 (c_parser_error): Detect conflict markers and report them as such.
774 2015-12-16 David Malcolm <dmalcolm@redhat.com>
776 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
777 to preserve range information for the primary expression
778 in the call to c_parser_postfix_expression_after_primary.
780 2015-12-16 David Malcolm <dmalcolm@redhat.com>
782 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
783 expression location, falling back on the first token location,
784 rather than always using the latter.
786 2015-12-16 Marek Polacek <polacek@redhat.com>
789 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
792 2015-12-15 Marek Polacek <polacek@redhat.com>
795 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
798 2015-12-08 David Malcolm <dmalcolm@redhat.com>
800 * c-parser.c (c_parser_alignof_expression): Capture location of
801 closing parenthesis (if any), or of end of unary expression, and
802 use it to build a src_range for the expression.
804 2015-12-08 David Malcolm <dmalcolm@redhat.com>
807 * c-parser.c (c_parser_get_builtin_args): Add
808 "out_close_paren_loc" param, and write back to it.
809 (c_parser_postfix_expression): Capture the closing
810 parenthesis location for RID_CHOOSE_EXPR,
811 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
812 RID_BUILTIN_SHUFFLE and use it to set the source range
813 for such expressions; within RID_BUILTIN_COMPLEX set
814 the underlying location.
816 2015-12-07 Marek Polacek <polacek@redhat.com>
819 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
820 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
822 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
824 * c-tree.h (c_build_va_arg): Adjust prototype.
825 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
826 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
827 parameter, adjust throughout and issue an error if EXPR is a component
828 with reverse storage order.
830 2015-12-02 Jason Merrill <jason@redhat.com>
832 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
833 (c_fully_fold_internal, decl_constant_value_for_optimization):
834 Move from c-common.c.
835 * c-tree.h: Declare decl_constant_value_for_optimization.
836 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
838 2015-12-02 Joseph Myers <joseph@codesourcery.com>
841 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
842 following link from declarator to next declarator. Track original
843 qualified type and pass it to c_build_qualified_type.
844 * c-typeck.c (c_build_qualified_type): Add arguments
845 orig_qual_type and orig_qual_indirect.
847 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
849 * c-parser.c (c_parser_omp_clause_name)
850 (c_parser_oacc_all_clauses): Alphabetical sorting.
852 2015-12-02 Jakub Jelinek <jakub@redhat.com>
855 * c-decl.c (get_parm_info): Use b->locus instead of input_location
858 2015-12-01 Julian Brown <julian@codesourcery.com>
859 Cesar Philippidis <cesar@codesourcery.com>
860 James Norris <James_Norris@mentor.com>
862 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
863 (c_parser_oacc_clause_use_device): New function.
864 (c_parser_oacc_all_clauses): Add use_device support.
865 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
866 (c_parser_oacc_host_data): New function.
867 (c_parser_omp_construct): Add host_data support.
868 * c-tree.h (c_finish_oacc_host_data): Add prototype.
869 * c-typeck.c (c_finish_oacc_host_data): New function.
870 (c_finish_omp_clauses): Add use_device support.
872 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
875 * c-decl.c: Set TYPE_PACKED in variants.
877 2015-11-27 Martin Liska <mliska@suse.cz>
880 * c-array-notation.c (fix_builtin_array_notation_fn):
881 Use release_vec_vec instead of vec::release.
882 (build_array_notation_expr): Likewise.
883 (fix_conditional_array_notations_1): Likewise.
884 (fix_array_notation_expr): Likewise.
885 (fix_array_notation_call_expr): Likewise.
887 2015-11-27 Jakub Jelinek <jakub@redhat.com>
890 * c-parser.c (c_parser_compound_statement_nostart): If
891 last_label is true, use pragma_stmt instead of pragma_compound
892 as second c_parser_pragma argument.
893 (c_parser_omp_ordered, c_parser_omp_target_update,
894 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
895 false as second argument to c_parser_skip_to_pragma_eol after
896 diagnosing standalone directives used in pragma_stmt context.
898 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
900 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
901 with "if (ENABLE_OFFLOADING)".
903 2015-11-23 David Malcolm <dmalcolm@redhat.com>
906 * c-parser.c (c_parser_postfix_expression): Set up source ranges
907 for various Objective-C constructs: Class.name syntax,
908 @selector(), @protocol(), @encode(), and [] message syntax.
910 2015-11-20 David Malcolm <dmalcolm@redhat.com>
913 * c-typeck.c (should_suggest_deref_p): New function.
914 (build_component_ref): Special-case POINTER_TYPE when
915 generating a "not a structure of union" error message, and
916 suggest a "->" rather than a ".", providing a fix-it hint.
918 2015-11-19 David Malcolm <dmalcolm@redhat.com>
920 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
921 candidate into a new function, find_closest_identifier.
923 2015-11-19 Marek Polacek <polacek@redhat.com>
926 * c-typeck.c (parser_build_binary_op): Properly handle
927 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
929 2015-11-17 David Malcolm <dmalcolm@redhat.com>
931 * c-parser.c (set_c_expr_source_range): Bulletproof both
932 overloaded implementations against NULL expr->value.
933 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
935 (c_parser_unary_expression): Likewise when handling addresses of
937 (c_parser_postfix_expression): Likewise for statement expressions,
938 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
939 __builtin_va_arg, and for __builtin_offset_of.
940 (c_parser_postfix_expression_after_paren_type): Initialize expr's
941 src_range using the range of the braced initializer.
942 (c_parser_transaction_expression): Set src_range for "ret" to a
945 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
947 * c-parser.c (c_finish_omp_declare_simd): Look for
948 "simd" attribute as well. Update error message.
950 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
952 * c-parser.c (c_parser_omp_declare_target): Adjust.
954 2015-11-14 Jakub Jelinek <jakub@redhat.com>
956 * c-typeck.c (c_finish_omp_clauses): Don't mark
957 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
959 2015-11-14 Marek Polacek <polacek@redhat.com>
961 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
962 * c-typeck.c: Likewise.
964 2015-11-13 David Malcolm <dmalcolm@redhat.com>
966 * c-decl.c (warn_defaults_to): Pass line_table to
968 * c-errors.c (pedwarn_c99): Likewise.
969 (pedwarn_c90): Likewise.
970 * c-parser.c (set_c_expr_source_range): New functions.
971 (c_token::get_range): New method.
972 (c_token::get_finish): New method.
973 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
974 based on the range from the start of the LHS to the end of the
976 (c_parser_conditional_expression): Likewise, based on the range
977 from the start of the cond.value to the end of exp2.value.
978 (c_parser_binary_expression): Call set_c_expr_source_range on
979 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
980 (c_parser_cast_expression): Call set_c_expr_source_range on ret
981 based on the cast_loc through to the end of the expr.
982 (c_parser_unary_expression): Likewise, based on the
983 op_loc through to the end of op.
984 (c_parser_sizeof_expression) Likewise, based on the start of the
985 sizeof token through to either the closing paren or the end of
987 (c_parser_postfix_expression): Likewise, using the token range,
988 or from the open paren through to the close paren for
989 parenthesized expressions.
990 (c_parser_postfix_expression_after_primary): Likewise, for
991 various kinds of expression.
992 * c-tree.h (struct c_expr): Add field "src_range".
993 (c_expr::get_start): New method.
994 (c_expr::get_finish): New method.
995 (set_c_expr_source_range): New decls.
996 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
997 on ret for prefix unary ops.
998 (parser_build_binary_op): Likewise, running from the start of
999 arg1.value through to the end of arg2.value.
1001 2015-11-13 Marek Polacek <polacek@redhat.com>
1004 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1006 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1008 * c-typeck.c: Include spellcheck.h.
1009 (lookup_field_fuzzy_find_candidates): New function.
1010 (lookup_field_fuzzy): New function.
1011 (build_component_ref): If the field was not found, try using
1012 lookup_field_fuzzy and potentially offer a suggestion.
1014 2015-11-12 James Norris <jnorris@codesourcery.com>
1015 Joseph Myers <joseph@codesourcery.com>
1017 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1018 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1019 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1020 and PRAGMA_OMP_CLAUSE_LINK.
1021 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1022 and PRAGMA_OACC_CLAUSE_LINK.
1023 (OACC_DECLARE_CLAUSE_MASK): New definition.
1024 (c_parser_oacc_declare): New function.
1026 2015-11-12 Marek Polacek <polacek@redhat.com>
1029 * c-parser.c (c_parser_for_statement): Reclassify the token in
1032 2015-11-11 Marek Polacek <polacek@redhat.com>
1036 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1037 checking the size of an array.
1039 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
1041 * c-array-notation.c: Remove unused header files.
1042 * c-aux-info.c: Likewise.
1043 * c-convert.c: Likewise.
1044 * c-decl.c: Likewise.
1045 * c-errors.c: Likewise.
1046 * c-lang.c: Likewise.
1047 * c-objc-common.c: Likewise.
1048 * c-parser.c: Likewise.
1049 * c-typeck.c: Likewise.
1050 * gccspec.c: Likewise.
1052 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1053 Cesar Philippidis <cesar@codesourcery.com>
1054 James Norris <jnorris@codesourcery.com>
1055 Julian Brown <julian@codesourcery.com>
1056 Nathan Sidwell <nathan@codesourcery.com>
1059 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1061 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1062 (c_parser_pragma): Parse 'acc routine'.
1063 (OACC_ROUTINE_CLAUSE_MARK): Define.
1064 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1066 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1069 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1070 location of the backward-goto to the start of the loop body.
1072 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1075 * c-parser.c (c_parser_while_statement): Finish the loop before
1076 parsing ahead for misleading indentation.
1077 (c_parser_for_statement): Likewise.
1079 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1081 * c-decl.c (finish_struct): If the structure has reverse storage
1082 order, rewrite the type of array fields with scalar component. Call
1083 maybe_apply_pragma_scalar_storage_order on entry.
1084 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1085 errors on bit-fields and reverse SSO here and not...
1086 (c_mark_addressable): ...here.
1087 (output_init_element): Adjust call to initializer_constant_valid_p.
1088 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1090 2015-11-06 David Malcolm <dmalcolm@redhat.com>
1092 * c-decl.c (warn_defaults_to): Update for change in signature
1093 of diagnostic_set_info.
1094 * c-errors.c (pedwarn_c99): Likewise.
1095 (pedwarn_c90): Likewise.
1096 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1097 for textinfo::set_location.
1099 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1100 Thomas Schwinge <thomas@codesourcery.com>
1101 James Norris <jnorris@codesourcery.com>
1103 * c-parser.c (c_parser_omp_clause_name): Add support for
1104 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1105 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1106 default(none) in OpenACC.
1107 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1109 (c_parser_oacc_clause_tile): New function.
1110 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1111 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1112 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1114 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1115 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1117 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1118 (c_parser_oacc_update): Update the error message for missing clauses.
1119 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1120 and OMP_CLAUSE_INDEPENDENT.
1122 2015-11-05 Marek Polacek <polacek@redhat.com>
1125 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1126 deal with pre-evaluation on invalid types.
1128 2015-11-05 Jakub Jelinek <jakub@redhat.com>
1129 Ilya Verbin <ilya.verbin@intel.com>
1131 * c-parser.c: Include context.h and gimple-expr.h.
1132 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1133 monotonic together with nonmonotonic.
1134 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1135 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1136 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1137 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1138 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1139 expressions on combined target teams before the target.
1140 (c_parser_omp_declare_target): If decl has "omp declare target" or
1141 "omp declare target link" attribute, and cgraph or varpool node already
1142 exists, then set corresponding flags. Call c_finish_omp_clauses
1143 in the parenthesized extended-list syntax case.
1144 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1146 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1147 on OMP_CLAUSE_REDUCTION array sections.
1148 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1149 into the constant offset, or for variable low-bound using
1150 POINTER_PLUS_EXPR. For structure element based array sections use
1151 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1152 (c_finish_omp_clauses): Drop generic_field_head, structure
1153 elements are now always mapped even as array section bases,
1154 diagnose same var in data sharing and mapping clauses. Diagnose if
1155 linear step on declare simd is neither a constant nor a uniform
1156 parameter. Look through POINTER_PLUS_EXPR for array section
1157 reductions. Diagnose the same var or function appearing multiple
1158 times on the same directive. Fix up wording for the to clause if t
1159 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1160 modifier on kinds other than dynamic or guided or nonmonotonic
1161 modifier together with ordered clause.
1163 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1164 Chung-Lin Tang <cltang@codesourcery.com>
1166 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1168 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
1170 * c-array-notation.c: Reorder #include's and remove duplicates.
1171 * c-aux-info.c: Likewise.
1172 * c-convert.c: Likewise.
1173 * c-decl.c: Likewise.
1174 * c-errors.c: Likewise.
1175 * c-lang.c: Likewise.
1176 * c-objc-common.c: Likewise.
1177 * c-parser.c: Likewise.
1178 * c-typeck.c: Likewise.
1180 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
1183 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1184 after calling build_qualified_type.
1186 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1187 Thomas Schwinge <thomas@codesourcery.com>
1188 James Norris <jnorris@codesourcery.com>
1189 Joseph Myers <joseph@codesourcery.com>
1190 Julian Brown <julian@codesourcery.com>
1191 Bernd Schmidt <bschmidt@redhat.com>
1193 * c-parser.c (c_parser_oacc_shape_clause): New.
1194 (c_parser_oacc_simple_clause): New.
1195 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1196 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1198 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1199 James Norris <jnorris@codesourcery.com>
1200 Cesar Philippidis <cesar@codesourcery.com>
1204 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1205 parameters, and handle these. Adjust all users.
1206 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1208 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1210 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1212 (c_finish_omp_construct): Declare function.
1213 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1214 Merge functions into...
1215 (c_finish_omp_construct): ... this new function.
1217 2015-10-22 Richard Biener <rguenther@suse.de>
1219 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1220 before folding a MINUS_EXPR.
1222 2015-10-21 Marek Polacek <polacek@redhat.com>
1225 * c-decl.c (start_function): Warn about vararg functions without
1228 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1230 * c-typeck.c (build_conditional_expr): Use boolean vector
1231 type for vector comparison.
1232 (build_vec_cmp): New.
1233 (build_binary_op): Use build_vec_cmp for comparison.
1235 2015-10-20 Marek Polacek <polacek@redhat.com>
1237 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1239 2015-10-20 Marek Polacek <polacek@redhat.com>
1242 * c-parser.c (c_parser_attributes): Break out of the loop if the
1243 token after an attribute isn't a comma.
1245 2015-10-13 Jakub Jelinek <jakub@redhat.com>
1246 Aldy Hernandez <aldyh@redhat.com>
1248 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1249 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1250 (c_parser_omp_variable_list): Handle structure elements for
1251 map, to and from clauses. Handle array sections in reduction
1252 clause. Formatting fixes.
1253 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1254 if clause modifiers.
1255 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1256 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1257 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1258 c_parser_omp_clause_is_device_ptr): New functions.
1259 (c_parser_omp_clause_ordered): Parse optional parameter.
1260 (c_parser_omp_clause_reduction): Handle array reductions.
1261 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1262 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1264 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1265 (c_parser_omp_clause_depend_sink): New function.
1266 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1267 (c_parser_omp_clause_map): Parse release/delete map kinds and
1268 optional always modifier.
1269 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1270 and c_finish_omp_clauses callers.
1271 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1272 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1273 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1274 (OMP_CRITICAL_CLAUSE_MASK): Define.
1275 (c_parser_omp_critical): Parse critical clauses.
1276 (c_parser_omp_for_loop): Handle doacross loops, adjust
1277 c_finish_omp_for and c_finish_omp_clauses callers.
1278 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1279 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1280 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1281 (c_parser_omp_for): Disallow ordered clause when combined with
1282 distribute. Disallow linear clause when combined with distribute
1283 and not combined with simd.
1284 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1285 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1286 parse clauses and if depend clause is found, don't parse a body.
1287 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1288 Allow target parallel without for after it.
1289 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1290 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1291 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1293 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1294 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1295 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1296 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1298 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1299 defaultmap and is_device_ptr clauses.
1300 (c_parser_omp_target): Parse target parallel and target simd. Set
1301 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1302 and target exit data. Diagnose invalid map kinds.
1303 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1304 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1306 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1308 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1309 (c_parser_omp_taskloop): New function.
1310 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1311 handle PRAGMA_OMP_TASKLOOP.
1312 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1313 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1314 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1315 Add IS_OMP argument, handle structure element bases, diagnose
1316 bitfields, pass IS_OMP recursively, diagnose known zero length
1317 array sections in depend clauses, handle array sections in reduction
1318 clause, diagnose negative length even for pointers.
1319 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1320 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1321 array sections in reduction clause, set
1322 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1323 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1324 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1325 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1327 2015-10-06 Marek Polacek <polacek@redhat.com>
1329 * c-parser.c (c_parser_statement_after_labels): Use
1330 protected_set_expr_location.
1331 (c_parser_omp_clause_num_gangs): Likewise.
1332 (c_parser_omp_clause_num_threads): Likewise.
1333 (c_parser_omp_clause_num_workers): Likewise.
1334 (c_parser_omp_clause_vector_length): Likewise.
1335 (c_parser_omp_clause_num_teams): Likewise.
1336 (c_parser_omp_clause_thread_limit): Likewise.
1337 * c-typeck.c (build_c_cast): Likewise.
1338 (c_cast_expr): Likewise.
1340 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1342 * c-typeck.c (c_tree_equal): Use real_equal instead of
1345 2015-10-04 Jason Merrill <jason@redhat.com>
1347 * c-parser.c (c_lex_one_token): Handle @synchronized.
1348 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1349 can change whether the function is transaction_safe.
1351 2015-10-02 Marek Polacek <polacek@redhat.com>
1354 * c-typeck.c (convert_for_assignment): Use the expansion point
1355 location throughout.
1357 2015-10-02 Marek Polacek <polacek@redhat.com>
1360 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1361 and pass it down to c_parser_if_statement.
1362 (c_parser_else_body): Add CHAIN parameter and pass it down to
1363 c_parser_statement_after_labels.
1364 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1365 duplicated if-else-if conditions.
1367 2015-10-01 Marek Polacek <polacek@redhat.com>
1369 * c-typeck.c (convert_for_assignment): Improve commentary.
1371 2015-09-30 Marek Polacek <polacek@redhat.com>
1374 * c-typeck.c (c_finish_return): Use the expansion point location for
1375 certain "return with value" warnings.
1377 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1379 * c-parser.c (pragma_lex): Add loc argument.
1381 2015-09-15 Marek Polacek <polacek@redhat.com>
1384 * c-decl.c (tag_exists_p): New function.
1385 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1386 struct/union/enum keywords are missing.
1387 * c-tree.h (tag_exists_p): Declare.
1389 2015-09-15 Marek Polacek <polacek@redhat.com>
1391 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1392 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1393 Return NULL_TREE instead of 0.
1394 (lookup_name): Return NULL_TREE instead of 0.
1395 (lookup_name_in_scope): Likewise.
1396 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1397 (parser_xref_tag): Use false instead of 0.
1398 (start_struct): Use true instead of 1.
1399 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1401 2015-09-14 Marek Polacek <polacek@redhat.com>
1403 * c-typeck.c (set_nonincremental_init_from_string): Use
1404 HOST_WIDE_INT_M1U when shifting a negative value.
1406 2015-09-09 Mark Wielaard <mjw@redhat.com>
1408 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1411 2015-09-10 Jakub Jelinek <jakub@redhat.com>
1414 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1415 into OMP_FOR_PRE_BODY rather than before the loop.
1417 2015-09-09 Jakub Jelinek <jakub@redhat.com>
1420 * c-parser.c (c_parser_oacc_all_clauses,
1421 c_parser_omp_all_clauses): Remove invalid clause from
1422 list of clauses even if parser->error is set.
1425 * c-parser.c (c_parser_omp_clause_aligned,
1426 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1428 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1432 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1433 instead of c_parser_unary_expression. If the result is !lvalue_p,
1434 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1436 2015-09-04 Marek Polacek <polacek@redhat.com>
1439 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1441 2015-09-03 Martin Sebor <msebor@redhat.com>
1444 * c-typeck.c (convert_arguments, parser_build_unary_op,
1445 build_conditional_expr, c_cast_expr, convert_for_assignment,
1446 build_binary_op, _objc_common_truthvalue_conversion): Call
1448 (c_decl_implicit): Define.
1450 2015-09-02 Marek Polacek <polacek@redhat.com>
1453 * c-parser.c (c_parser_enum_specifier): Give a better error for
1456 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1458 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1460 2015-08-12 Marek Polacek <polacek@redhat.com>
1462 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1465 2015-08-03 Marek Polacek <polacek@redhat.com>
1468 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1470 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1472 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1474 * c-parser.c (c_parser_if_body): Take token_indent_info
1475 argument. Call warn_for_misleading_indentation even when the
1476 body is a semicolon. Extract token_indent_infos corresponding
1477 to the guard, body and next tokens. Adjust call to
1478 warn_for_misleading_indentation accordingly.
1479 (c_parser_else_body): Likewise.
1480 (c_parser_if_statement): Likewise.
1481 (c_parser_while_statement): Likewise.
1482 (c_parser_for_statement): Likewise.
1484 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1485 Manuel López-Ibáñez <manu@gcc.gnu.org>
1487 * c-decl.c (get_parm_info): Remove static var. Update warning
1490 2015-07-27 Marek Polacek <polacek@redhat.com>
1494 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1496 2015-07-20 Marek Polacek <polacek@redhat.com>
1499 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1500 (build_binary_op): Warn about left shift overflows.
1502 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1504 * c-array-notation.c: Adjust includes for flags.h changes.
1505 * c-objc-common.c: Likewise.
1507 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1509 * c-array-notation.c: Adjust includes.
1510 * c-aux-info.c: Likewise.
1511 * c-convert.c: Likewise.
1512 * c-decl.c: Likewise.
1513 * c-errors.c: Likewise.
1514 * c-lang.c: Likewise.
1515 * c-objc-common.c: Likewise.
1516 * c-parser.c: Likewise.
1517 * c-typeck.c: Likewise.
1519 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1522 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1524 2015-06-29 Marek Polacek <polacek@redhat.com>
1527 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1528 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1529 about -Wswitch-bool here.
1530 (do_case): Update c_add_case_label call.
1531 (c_finish_case): Update c_do_switch_warnings call.
1533 2015-06-27 Marek Polacek <polacek@redhat.com>
1535 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1537 2015-06-26 Marek Polacek <polacek@redhat.com>
1539 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1541 * c-typeck.c (array_to_pointer_conversion): Likewise.
1542 (build_unary_op): Likewise.
1543 (c_finish_return): Likewise.
1545 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1547 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1548 * c-parser.c: Likewise.
1550 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1552 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1553 instead of pointer_hash.
1554 (detect_field_duplicates): Likewise.
1556 2015-06-25 Marek Polacek <polacek@redhat.com>
1558 * c-array-notation.c: Use VAR_P throughout.
1559 * c-decl.c: Likewise.
1560 * c-objc-common.c: Likewise.
1561 * c-parser.c: Likewise.
1562 * c-typeck.c: Likewise.
1564 2015-06-25 Marek Polacek <polacek@redhat.com>
1566 * c-decl.c: Use is_global_var throughout.
1567 * c-parser.c: Likewise.
1568 * c-typeck.c: Likewise.
1570 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1572 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1573 * c-aux-info.c: Likewise.
1574 * c-convert.c: Likewise.
1575 * c-decl.c: Likewise.
1576 * c-errors.c: Likewise.
1577 * c-lang.c: Likewise.
1578 * c-objc-common.c: Likewise.
1579 * c-parser.c: Likewise.
1580 * c-typeck.c: Likewise.
1582 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
1585 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1588 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1590 * c-decl.c (pop_scope): Register the main translation unit
1591 through the new debug hook.
1593 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1595 * c-array-notation.c : Adjust include files.
1596 * c-aux-info.c : Likewise.
1597 * c-convert.c : Likewise.
1598 * c-decl.c : Likewise.
1599 * c-errors.c : Likewise.
1600 * c-lang.c : Likewise.
1601 * c-lang.h : Likewise.
1602 * c-objc-common.c : Likewise.
1603 * c-parser.c : Likewise.
1604 * c-typeck.c : Likewise.
1606 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1608 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1609 immediately clobber it.
1610 (c_write_global_declarations_1): Remove call to
1611 check_global_declaration_1.
1612 (c_write_global_declarations_2): Remove.
1613 (c_write_final_cleanups): Rename from c_write_global_declarations.
1614 Remove call to finalize_compilation_unit.
1615 Remove calls to debugging hooks.
1616 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1617 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1618 * c-tree.h: Remove c_write_global_declarations.
1620 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1622 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1623 * c-aux-info.c: Likewise.
1624 * c-convert.c: Likewise.
1625 * c-decl.c: Likewise.
1626 * c-errors.c: Likewise.
1627 * c-lang.c: Likewise.
1628 * c-objc-common.c: Likewise.
1629 * c-parser.c: Likewise.
1630 * c-typeck.c: Likewise.
1632 2015-06-04 Marek Polacek <polacek@redhat.com>
1635 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1638 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1640 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1641 Warn for empty struct.
1642 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1644 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1646 * c-decl.c (start_function): Call plugin before parsing.
1647 (finish_function): Call plugin after parsing.
1649 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1652 * c-decl.c (merge_decls): Merge DECL_COMMON.
1654 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1656 * Make-lang.in (check_gcc_pallelize): Define.
1658 2015-05-22 Marek Polacek <polacek@redhat.com>
1661 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1664 2015-05-21 Marek Polacek <polacek@redhat.com>
1666 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1669 2015-05-20 Marek Polacek <polacek@redhat.com>
1671 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1672 * c-typeck.c: Likewise.
1674 2015-05-19 Marek Polacek <polacek@redhat.com>
1676 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1678 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1681 * c-parser.c (c_parser_omp_for_loop): Don't add
1682 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1683 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1684 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1687 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1689 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
1692 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1695 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1698 2015-05-14 Marek Polacek <polacek@redhat.com>
1702 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1705 2015-05-12 David Malcolm <dmalcolm@redhat.com>
1707 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1708 to add a call to warn_for_misleading_indentation.
1709 (c_parser_else_body): Likewise, adding param "else_loc".
1710 (c_parser_if_statement): Check for misleading indentation.
1711 (c_parser_while_statement): Likewise.
1712 (c_parser_for_statement): Likewise.
1714 2015-05-08 Marek Polacek <polacek@redhat.com>
1717 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1718 (output_init_element): Likewise.
1720 2015-05-07 Marek Polacek <polacek@redhat.com>
1723 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1726 2015-04-30 Marek Polacek <polacek@redhat.com>
1728 * c-typeck.c (set_init_label): Call error_at instead of error and
1731 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1734 * c-typeck.c (c_build_va_arg): Clarify the error message.
1736 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1738 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1739 OMP_STANDALONE_CLAUSES.
1741 2015-04-28 Marek Polacek <polacek@redhat.com>
1743 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1745 2015-04-28 Marek Polacek <polacek@redhat.com>
1748 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1750 2015-04-25 Marek Polacek <polacek@redhat.com>
1753 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1756 2015-04-23 Marek Polacek <polacek@redhat.com>
1759 * c-decl.c (set_labels_context_r): New function.
1760 (store_parm_decls): Call it via walk_tree_without_duplicates.
1761 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1762 instead of create_tmp_var. Build TARGET_EXPR instead of
1764 (build_atomic_assign): Use create_tmp_var_raw instead of
1765 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1767 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1769 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1770 (c_parser_omp_target_update): Add missed %> to error_at ().
1772 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1775 * c-decl.c (c_default_pointer_mode): Remove definition.
1776 * c-tree.h (c_default_pointer_mode): Remove declaration.
1778 2015-03-27 Tobias Burnus <burnus@net-b.de>
1781 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1783 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1784 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1785 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1787 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1789 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1790 attribute for DECL_EXTERNAL VAR_DECLs.
1792 2015-03-11 Jakub Jelinek <jakub@redhat.com>
1794 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1797 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1800 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1801 before preparing arguments to warn_logical_not_parentheses.
1803 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1806 * c-typeck.c (parser_build_binary_op): Don't warn for
1807 !!x == y or !b == y where b is _Bool.
1809 2015-03-09 Marek Polacek <polacek@redhat.com>
1811 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1812 * c-decl.c (grokdeclarator): Likewise.
1813 * c-typeck.c (build_binary_op): Likewise.
1815 2015-02-27 Marek Polacek <polacek@redhat.com>
1818 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1820 2015-02-14 Marek Polacek <polacek@redhat.com>
1823 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1824 declared through a typedef name.
1826 2015-02-13 Marek Polacek <polacek@redhat.com>
1829 * c-decl.c (grokdeclarator): Print also the type when giving
1830 the error message about array's incomplete element type.
1832 2015-02-11 Jakub Jelinek <jakub@redhat.com>
1835 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1836 check in the POP macro.
1838 2015-02-09 Marek Polacek <polacek@redhat.com>
1841 * c-typeck.c (process_init_element): Don't always wrap
1842 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1843 initializing a range of elements.
1845 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1849 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1851 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
1853 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1854 processing enum declaration.
1856 2015-01-29 Marek Polacek <polacek@redhat.com>
1859 * c-typeck.c (pop_init_level): If constructor_elements has
1860 exactly one element with integer_zerop value, set constructor_zeroinit
1861 to 1. Remove braces around warning_init call.
1863 2015-01-27 Jakub Jelinek <jakub@redhat.com>
1866 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1867 of FUNCTION_DECLs with error_mark_node.
1869 2015-01-26 Jakub Jelinek <jakub@redhat.com>
1872 * c-typeck.c (convert_arguments): Return -1 if there are
1873 error_args, even if we've diagnosed too many arguments.
1875 2015-01-21 Richard Biener <rguenther@suse.de>
1878 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1879 for builtins the user declared correctly.
1881 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1882 Bernd Schmidt <bernds@codesourcery.com>
1883 Cesar Philippidis <cesar@codesourcery.com>
1884 James Norris <jnorris@codesourcery.com>
1885 Jakub Jelinek <jakub@redhat.com>
1886 Ilmir Usmanov <i.usmanov@samsung.com>
1888 * c-parser.c: Include "gomp-constants.h".
1889 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1890 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1891 Use OMP_CLAUSE_SET_MAP_KIND.
1892 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1893 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1894 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1895 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1896 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1897 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1898 "copyout", "create", "delete", "deviceptr", "gang", "host",
1899 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1900 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1901 "present_or_create", "pcreate", "seq", "self", "vector",
1902 "vector_length", "wait", "worker".
1903 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1904 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1905 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1906 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1907 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1908 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1909 (c_parser_oacc_data_clause_deviceptr)
1910 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1911 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1912 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1913 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1914 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1915 (c_parser_oacc_parallel, c_parser_oacc_update)
1916 (c_parser_oacc_wait): New functions.
1917 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1918 (c_finish_oacc_data): New prototypes.
1919 * c-typeck.c: Include "gomp-constants.h".
1920 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1921 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1922 OMP_CLAUSE_SET_MAP_KIND.
1923 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1924 (c_finish_oacc_data): New functions.
1925 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1926 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1927 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1928 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1929 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1930 GOMP_MAP_FORCE_DEVICEPTR.
1932 2015-01-09 Michael Collison <michael.collison@linaro.org>
1934 * c-array-notation.c: Include hash-set.h, machmode.h,
1935 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1936 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1937 * c-aux-info.c: Ditto.
1938 * c-convert.c: Ditto.
1940 * c-errors.c: Ditto.
1941 * c-lang.c: Dittoxs.
1942 * c-objc-common.c: Ditto.
1943 * c-parser.c: Ditto.
1944 * c-typeck.c: Include hash-set.h, machmode.h,
1945 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1946 fold-const.h, wide-int.h, inchash.h, real.h and
1947 fixed-value.h due to flattening of tree.h.
1949 2015-01-07 Marek Polacek <polacek@redhat.com>
1952 * c-typeck.c (process_init_element): Disallow initialization of
1953 a flexible array member with a string constant if the structure
1956 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1959 * c-typeck.c (convert_for_assignment, c_finish_return): For
1960 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1961 types also set in_late_binary_op around convert call.
1962 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1963 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1964 result on expr as last argument to ubsan_instrument_float_cast,
1965 if in_late_binary_op, don't use c_save_expr but save_expr.
1967 Update copyright years.
1969 2015-01-05 Marek Polacek <polacek@redhat.com>
1972 * c-typeck.c (build_array_ref): Pass loc down to
1973 warn_array_subscript_with_type_char.
1975 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1977 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1978 (common-pointer-type): For pointers to arrays take qualifiers from
1980 (build_conditional_expr): Add warnings for lost qualifiers.
1981 (comp-target-types): Allow pointers to arrays with different qualifiers.
1982 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1983 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1984 to PEDWARN_FOR_QUALIFIERS.
1986 2014-12-17 Jakub Jelinek <jakub@redhat.com>
1989 * c-convert.c: Include ubsan.h.
1990 (convert): For real -> integral casts and
1991 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1992 instead instrument the float cast directly.
1994 2014-11-29 Jakub Jelinek <jakub@redhat.com>
1996 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1997 c_finish_stmt_expr): Remove NULL last argument from
1998 create_tmp_var_raw and create_tmp_var calls.
1999 * c-array-notation.c (fix_builtin_array_notation_fn,
2000 build_array_notation_expr, fix_conditional_array_notations_1,
2001 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2003 2014-11-28 Marek Polacek <polacek@redhat.com>
2006 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2007 convert the right operand to integer type.
2009 2014-11-25 Marek Polacek <polacek@redhat.com>
2012 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2013 for inline functions.
2015 2014-11-21 Jakub Jelinek <jakub@redhat.com>
2018 * c-typeck.c (build_array_ref): Adjust
2019 convert_vector_to_pointer_for_subscript caller. If it returns true,
2020 call non_lvalue_loc on the result.
2022 2014-11-11 Richard Biener <rguenther@suse.de>
2024 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2027 2014-11-10 Andi Kleen <ak@linux.intel.com>
2030 * c-parser.c (c_parser_statement_after_labels): Call
2032 (c_parser_if_statement): Dito.
2033 (c_parser_switch_statement): Dito.
2034 (c_parser_while_statement): Dito.
2035 (c_parser_do_statement): Dito.
2036 (c_parser_for_statement): Dito.
2037 * c-typeck.c (c_finish_loop): Dito.
2039 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2041 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2042 OPT_Wshift_count_overflow in the warnings.
2044 2014-10-30 Marek Polacek <polacek@redhat.com>
2046 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2047 print the stripped version as well, if they're not the same.
2049 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2051 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2054 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
2056 * c-decl.c: Adjust include files.
2057 * c-parser.c: Ditto.
2059 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2060 Tom Tromey <tromey@redhat.com>
2062 * c-tree.h (enum c_oracle_request): New.
2063 (c_binding_oracle_function): New typedef.
2064 (c_binding_oracle, c_pushtag, c_bind): Declare.
2065 * c-decl.c (c_binding_oracle): New global.
2066 (I_SYMBOL_CHECKED): New macro.
2067 (i_symbol_binding): New function.
2068 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2069 (I_TAG_CHECKED): New macro.
2070 (i_tag_binding): New function.
2071 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2072 (I_LABEL_CHECKED): New macro.
2073 (i_label_binding): New function.
2074 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2075 (c_print_identifier): Save and restore c_binding_oracle.
2076 (c_pushtag, c_bind): New functions.
2078 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
2080 * c-typeck.c: Adjust include files.
2082 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2085 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2086 initialization here...
2087 (c_initialize_diagnostics): ... but here. Set defaults after
2088 building pretty-printer.
2090 2014-10-23 Marek Polacek <polacek@redhat.com>
2093 * c-decl.c (pop_scope): Don't print warning in external_scope.
2095 2014-10-19 Marek Polacek <polacek@redhat.com>
2098 * c-typeck.c (output_init_element): Allow initializing objects with
2099 static storage duration with compound literals even in C99 and add
2102 2014-10-17 Marek Polacek <polacek@redhat.com>
2105 * c-typeck.c (digest_init): Allow initializing objects with static
2106 storage duration with compound literals even in C99 and add pedwarn
2109 2014-10-17 Marek Polacek <polacek@redhat.com>
2112 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2113 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2114 error multiple times. Print the type.
2116 2014-10-17 Marek Polacek <polacek@redhat.com>
2119 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2122 2014-10-17 Marek Polacek <polacek@redhat.com>
2124 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2125 (start_function): Use OPT_Wimplicit_int instead of 0.
2126 (store_parm_decls_oldstyle): Likewise.
2128 2014-10-17 Alan Modra <amodra@gmail.com>
2131 * c-decl.c (merge_decls): Don't merge section name or tls model
2132 to newdecl symtab node, instead merge to olddecl. Override
2133 existing olddecl section name. Set tls_model for all thread-local
2134 vars, not just OMP thread-private ones. Remove incorrect comment.
2136 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
2138 * c-decl.c: Adjust include files.
2140 2014-10-14 DJ Delorie <dj@redhat.com>
2142 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2143 (c_token_starts_typename): Check all __intN, not just __int128.
2144 (c_token_starts_declspecs): Likewise.
2145 (c_parser_declspecs): Likewise.
2146 (c_parser_attribute_any_word): Likewise.
2147 (c_parser_objc_selector): Likewise.
2148 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2149 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2151 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2153 (finish_declspecs): Likewise.
2155 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2157 * c-parser.c (c_parser_all_labels): New function to replace
2159 (c_parser_statement): Call the new function.
2161 2014-10-09 Marek Polacek <polacek@redhat.com>
2164 * c-typeck.c (pop_init_level): Don't warn about initializing
2167 2014-10-07 Marek Polacek <polacek@redhat.com>
2170 * c-decl.c (header_for_builtin_fn): New function.
2171 (implicitly_declare): Suggest which header to include.
2173 2014-10-07 Marek Polacek <polacek@redhat.com>
2175 * c-convert.c (convert): Use error_operand_p.
2176 * c-typeck.c (require_complete_type): Likewise.
2177 (really_atomic_lvalue): Likewise.
2178 (digest_init): Likewise.
2179 (handle_omp_array_sections_1): Likewise.
2181 2014-10-03 Marek Polacek <polacek@redhat.com>
2184 * c-decl.c (pop_scope): Don't warn about "inline function declared
2185 but never defined" for functions marked with gnu_inline attribute.
2187 2014-09-25 Jakub Jelinek <jakub@redhat.com>
2190 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2191 on low_bound and length.
2193 2014-09-24 Marek Polacek <polacek@redhat.com>
2197 * c-parser.c: Don't define CPP_KEYWORD.
2198 (c_parser_switch_statement): Pass original type to c_finish_case.
2199 * c-tree.h (c_finish_case): Update declaration.
2200 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2201 conditionally to c_do_switch_warnings.
2203 2014-09-03 Marek Polacek <polacek@redhat.com>
2206 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2209 2014-09-02 Jakub Jelinek <jakub@redhat.com>
2210 Balaji V. Iyer <balaji.v.iyer@intel.com>
2211 Igor Zamyatin <igor.zamyatin@intel.com>
2213 * c-parser.c (c_parser_cilk_for): New function.
2214 (c_parser_cilk_grainsize): Likewise.
2215 (c_get_temp_regvar): Likewise.
2216 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2217 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2218 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2219 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2222 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2224 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2225 with using HOST_WIDE_INT without truncation to 'int'
2227 2014-08-22 Marek Polacek <polacek@redhat.com>
2230 * c-typeck.c (parser_build_binary_op): Adjust call to
2231 warn_logical_not_parentheses.
2233 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2236 * c-parser.c (c_parser_array_notation): Check for correct
2237 type of an array added.
2239 2014-08-19 Marek Polacek <polacek@redhat.com>
2242 * c-typeck.c (build_binary_op): If either operand of a comparison
2243 is a boolean expression, call maybe_warn_bool_compare.
2245 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2248 * c-typeck.c (build_c_cast): Do a conversion even when the
2249 TYPE_MAIN_VARIANTs are the same.
2251 2014-08-19 Marek Polacek <polacek@redhat.com>
2253 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2254 pedwarn_c99 instead of pedwarn.
2255 (grokfield): Likewise.
2256 (warn_defaults_to): New function.
2257 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2258 Unconditionally call pedwarn_c99 instead of pedwarn.
2259 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2260 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2261 check flag_isoc11 before.
2262 * c-errors.c (pedwarn_c99): Change the return type to bool.
2263 Handle -Wc99-c11-compat.
2264 * c-parser.c (disable_extension_diagnostics): Handle
2265 warn_c99_c11_compat.
2266 (restore_extension_diagnostics): Likewise.
2267 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2268 instead of pedwarn, don't check flag_isoc11 before.
2269 (c_parser_declspecs): Likewise.
2270 (c_parser_alignas_specifier): Likewise.
2271 (c_parser_alignof_expression): Likewise.
2272 (c_parser_generic_selection): Likewise.
2273 * c-tree.h (pedwarn_c99): Update declaration.
2274 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2277 2014-08-19 Marek Polacek <polacek@redhat.com>
2279 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2281 * c-errors.c: Include "opts.h".
2282 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2283 * c-parser.c (disable_extension_diagnostics): Handle negative value
2284 of warn_c90_c99_compat, too.
2285 (restore_extension_diagnostics): Likewise.
2286 (c_parser_compound_statement_nostart): Pass
2287 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2289 2014-08-12 Marek Polacek <polacek@redhat.com>
2291 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2293 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2295 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2297 2014-08-10 Marek Polacek <polacek@redhat.com>
2300 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2301 Call pedwarn_c90 instead of pedwarn.
2302 (check_bitfield_type_and_width): Likewise.
2303 (declspecs_add_qual): Likewise.
2304 (declspecs_add_type): Likewise.
2305 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2306 Adjust to only call pedwarn_c90.
2307 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2308 pedwarn_c90 instead of pedwarn.
2309 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2310 * c-parser.c (disable_extension_diagnostics): Handle
2311 warn_c90_c99_compat.
2312 (restore_extension_diagnostics): Likewise.
2313 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2314 pedwarn_c90 instead of pedwarn.
2315 (c_parser_initelt): Likewise.
2316 (c_parser_postfix_expression): Likewise.
2317 (c_parser_postfix_expression_after_paren_type): Likewise.
2318 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2319 * c-tree.h: Fix formatting.
2320 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2321 pedwarn_c90 instead of pedwarn.
2323 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2325 * c-typeck.c: Remove include of pointer-set.h.
2327 2014-08-07 Marek Polacek <polacek@redhat.com>
2329 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2331 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2333 * c-typeck.c: Use hash_map instead of pointer_map.
2335 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2337 * c-decl.c: Use hash_set instead of pointer_set.
2339 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2342 * c-array-notation.c (expand_array_notations): Handling
2345 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
2348 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2351 2014-07-30 Tom Tromey <tromey@redhat.com>
2353 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2355 (really_start_incremental_init, push_init_level): Initialize
2357 (pop_init_level): Set global designator_depth.
2358 (process_init_element): Check for designated_init attribute.
2360 2014-07-20 Marek Polacek <polacek@redhat.com>
2363 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2364 (implicitly_declare): Pass location to implicit_decl_warning.
2366 2014-07-14 Jakub Jelinek <jakub@redhat.com>
2369 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2370 If non-NULL, call c_parser_check_literal_zero.
2371 (c_parser_check_literal_zero): New function.
2372 (c_parser_postfix_expression_after_primary): Adjust
2373 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2375 2014-07-06 Marek Polacek <polacek@redhat.com>
2378 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2379 * c-tree.h (C_ARRAY_PARAMETER): Define.
2380 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2383 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
2384 Chen Gang <gang.chen.5i5j@gmail.com>
2386 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2389 2014-07-01 Marek Polacek <polacek@redhat.com>
2391 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2392 instead of 0 to WARN_FOR_ASSIGNMENT.
2394 2014-07-01 Marek Polacek <polacek@redhat.com>
2397 * c-typeck.c (convert_for_assignment): Pass
2398 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2400 2014-06-30 Marek Polacek <polacek@redhat.com>
2402 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2403 has no_sanitize_undefined attribute.
2405 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2408 * c-array-notation.c (fix_builtin_array_notation_fn):
2409 Check for 0 arguments in builtin call. Check that bultin argument is
2411 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2414 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2416 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2417 qualifiers in __auto_type for atomic types.
2418 (c_parser_typeof_specifier): Discard all type qualifiers in
2419 __typeof__ for atomic types.
2421 2014-06-25 Marek Polacek <polacek@redhat.com>
2424 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2425 the return expression to c_finish_return.
2427 2014-06-25 Jakub Jelinek <jakub@redhat.com>
2429 * c-typeck.c (c_finish_omp_clauses): Make sure
2430 OMP_CLAUSE_LINEAR_STEP has correct type.
2432 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2436 2014-06-24 Jakub Jelinek <jakub@redhat.com>
2438 * c-parser.c (c_parser_omp_for_loop): For
2439 #pragma omp parallel for simd move lastprivate clause from parallel
2440 to for rather than simd.
2442 2014-06-23 Marek Polacek <polacek@redhat.com>
2444 * c-typeck.c (parser_build_binary_op): Don't call
2445 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2447 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2449 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2450 * c-decl.c (merge_decls): Likewise.
2452 2014-06-09 Marek Polacek <polacek@redhat.com>
2455 * c-typeck.c (error_init): Call inform instead of error_at.
2456 (pedwarn_init): Call inform instead of pedwarn.
2457 (warning_init): Call inform instead of warning_at.
2459 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2461 * c-decl.c (merge_decls): Use set_decl_section_name.
2462 (duplicate_decls): Remove node if it exists.
2464 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2467 * c-typeck.c (push_init_level, process_init_element,
2468 pop_init_level): Correct check for zero initialization, move
2469 missing brace warning to respect zero initialization.
2471 2014-06-05 Marek Polacek <polacek@redhat.com>
2474 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2476 2014-06-05 Marek Polacek <polacek@redhat.com>
2479 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2480 on the left hand side operand of a comparison.
2482 2014-06-05 Marek Polacek <polacek@redhat.com>
2485 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2486 Print note only if the warning was printed.
2488 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2491 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2494 2014-06-03 Marek Polacek <polacek@redhat.com>
2497 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2499 * c-tree.h (c_start_case): Update.
2500 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2501 switch condition has boolean value.
2503 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2505 * c-decl.c: Include builtins.h.
2506 * c-parser.c: Likewise.
2508 2014-05-27 Marek Polacek <polacek@redhat.com>
2511 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2512 error and warning calls to error_at and warning_at. Pass location of
2513 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2514 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2515 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2517 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2520 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2521 function parameters.
2523 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2525 * c-decl.c (merge_decls): Preserve symtab node pointers.
2526 (duplicate_decls): Free new decl.
2528 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2530 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2533 * c-parser.c (c_parser_omp_target): Return bool values.
2535 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2537 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2538 num_teams_loc variable to num_thread_limit_loc.
2540 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2542 * c-array-notation.c (expand_array_notations): Use void_node
2543 instead of void_zero_node.
2545 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2547 * c-decl.c (finish_struct): Adjust.
2548 (finish_enum): Likewise.
2550 (record_inline_static): Likewise.
2551 (push_scope): Likewise.
2552 (make_label): Likewise.
2553 (lookup_label_for_goto): Likewise.
2554 (finish_struct): Likewise.
2555 (finish_enum): Likewise.
2556 (store_parm_decls): Likewise.
2557 (c_push_function_context): Likewise.
2558 * c-lang.h: Remove usage of variable_size gty attribute.
2559 * c-parser.c (c_parse_init): Adjust.
2560 (c_parse_file): Likewise.
2562 2014-05-13 Marek Polacek <polacek@redhat.com>
2565 * c-typeck.c (convert_for_assignment): Pass location to
2566 WARN_FOR_ASSIGNMENT instead of input_location.
2568 2014-05-10 Marek Polacek <polacek@redhat.com>
2570 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2571 maybe_warn_string_init.
2572 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2573 maybe_warn_string_init.
2574 * c-tree.h (maybe_warn_string_init): Update declaration.
2575 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2576 Call pedwarn_init with loc instead of with input_location.
2577 (digest_init): Pass init_loc to maybe_warn_string_init.
2578 (pop_init_level): Call pedwarn_init with loc instead of with
2580 (set_init_index): Likewise.
2581 (process_init_element): Likewise.
2583 2014-05-09 Marek Polacek <polacek@redhat.com>
2586 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2587 (c_parser_initelt): Pass location to set_init_label. Pass array index
2588 location to set_init_index.
2589 * c-tree.h (push_init_level): Update declaration.
2590 (pop_init_level): Likewise.
2591 (set_init_index): Likewise.
2592 (set_init_label): Likewise.
2593 * c-typeck.c (error_init): Add location parameter. Call error_at
2595 (digest_init): Pass init_loc to error_init.
2596 (really_start_incremental_init):
2597 (push_init_level): Add location parameter. Pass loc to pop_init_level
2599 (pop_init_level): Likewise.
2600 (set_designator): Add location parameter. Pass loc to pop_init_level,
2601 push_init_level, and error_init.
2602 (set_init_index): Add location parameter. Pass loc to error_init and
2604 (set_init_label): Likewise.
2605 (output_init_element): Pass loc to error_init.
2606 (process_init_element): Pass loc to error_init, pop_init_level,
2607 pedwarn_init, and push_init_level.
2609 2014-05-09 Marek Polacek <polacek@redhat.com>
2612 * c-parser.c (c_parser_attributes): Parse the arguments as an
2613 expression-list if the attribute takes identifier.
2615 2014-05-08 Marek Polacek <polacek@redhat.com>
2618 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2621 2014-05-08 Marek Polacek <polacek@redhat.com>
2624 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2627 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2628 Mike Stump <mikestump@comcast.net>
2629 Richard Sandiford <rdsandiford@googlemail.com>
2631 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2632 (finish_enum): Use wide-int interfaces.
2633 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2634 * c-typeck.c (build_c_cast): Likewise.
2635 (set_nonincremental_init_from_string): Likewise.
2636 (c_tree_equal): Likewise.
2638 2014-05-02 Marek Polacek <polacek@redhat.com>
2641 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2642 Return size_one_node when the type is not complete.
2643 (pointer_diff): Remove comment.
2644 (build_unary_op): Improve error messages.
2646 2014-05-02 Marek Polacek <polacek@redhat.com>
2648 * c-typeck.c (c_finish_return): Separate warning_at calls.
2650 2014-05-02 Marek Polacek <polacek@redhat.com>
2652 * c-tree.h (error_init): Remove declaration.
2653 (pedwarn_init): Likewise.
2654 * c-typeck.c (error_init): Make static and move above.
2655 (pedwarn_init): Likewise.
2656 (warning_init): Move above.
2657 (maybe_warn_string_init): Likewise.
2659 2014-05-01 Jeff Law <law@redhat.com>
2663 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2664 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2667 2014-05-02 Marek Polacek <polacek@redhat.com>
2670 * c-typeck.c (push_init_level): Set constructor_designated to
2671 p->designated for structures.
2673 2014-05-01 Marek Polacek <polacek@redhat.com>
2676 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2677 function-definition has an attribute after the declarator.
2679 2014-05-01 Marek Polacek <polacek@redhat.com>
2682 * c-typeck.c (warning_init): Add location_t parameter. Call
2683 warning_at instead of warning.
2684 (push_init_level): Pass input_location to warning_init.
2685 (add_pending_init): Add location_t parameter. Pass loc to
2687 (set_nonincremental_init): Pass input_location to add_pending_init.
2688 (set_nonincremental_init_from_string): Likewise.
2689 (output_init_element): Pass loc to warning_init and to
2692 2014-05-01 Marek Polacek <polacek@redhat.com>
2695 * c-typeck.c (c_finish_return): Distinguish between label and variable
2696 when warning about returning local address.
2698 2014-05-01 Marek Polacek <polacek@redhat.com>
2701 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2704 2014-05-01 Marek Polacek <polacek@redhat.com>
2707 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2708 instead of 0 to WARN_FOR_QUALIFIERS.
2710 2014-05-01 Marek Polacek <polacek@redhat.com>
2713 * c-typeck.c (default_conversion): Use better location for
2716 2014-04-30 Marek Polacek <polacek@redhat.com>
2718 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2719 also when SANITIZE_FLOAT_DIVIDE is on.
2721 2014-04-30 Marek Polacek <polacek@redhat.com>
2724 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2725 and pedwarn_init. Use loc insted of input_location.
2727 2014-04-30 Marek Polacek <polacek@redhat.com>
2730 * c-typeck.c (build_binary_op): Use location when warning about
2733 2014-04-25 Marek Polacek <polacek@redhat.com>
2736 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2737 always_inline/noinline and hot/cold attributes.
2739 2014-04-25 Marek Polacek <polacek@redhat.com>
2742 * c-parser.c (c_parser_initelt): Pass input_location to
2743 process_init_element.
2744 (c_parser_initval): Pass loc to process_init_element.
2745 * c-tree.h (process_init_element): Adjust declaration.
2746 * c-typeck.c (push_init_level): Pass input_location to
2747 process_init_element.
2748 (pop_init_level): Likewise.
2749 (set_designator): Likewise.
2750 (output_init_element): Add location_t parameter. Pass loc to
2752 (output_pending_init_elements): Pass input_location to
2753 output_init_element.
2754 (process_init_element): Add location_t parameter. Pass loc to
2755 output_init_element.
2757 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2759 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2760 atomic-clause, allow comma in between atomic-clause and
2763 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2766 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2767 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2769 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2772 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2773 create_tmp_var instead build_decl for creating temps.
2774 (build_array_notation_expr): Likewise.
2775 (fix_conditional_array_notations_1): Likewise.
2776 (fix_array_notation_expr): Likewise.
2777 (fix_array_notation_call_expr): Likewise.
2779 2014-03-28 Jakub Jelinek <jakub@redhat.com>
2782 * c-tree.h (c_build_function_call_vec): New prototype.
2783 * c-typeck.c (build_function_call_vec): Don't call
2784 resolve_overloaded_builtin here.
2785 (c_build_function_call_vec): New wrapper function around
2786 build_function_call_vec. Call resolve_overloaded_builtin here.
2787 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2788 Call c_build_function_call_vec instead of build_function_call_vec.
2789 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2790 * c-decl.c (finish_decl): Likewise.
2792 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2795 * c-typeck.c: Use correct format string in cast-qual warning
2797 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2799 * c-decl.c (c_decl_attributes): Use
2800 lang_hooks.types.omp_mappable_type.
2801 * c-typeck.c (c_finish_omp_clauses): Likewise.
2803 2014-03-06 Marek Polacek <polacek@redhat.com>
2806 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2807 of checking tree code.
2809 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2811 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2812 (c_parser_parameter_declaration): Likewise.
2814 2014-02-19 Marek Polacek <polacek@redhat.com>
2817 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2818 Call mark_exp_read on exp.value.
2819 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2820 TREE_ADDRESSABLE on old instead of val.
2821 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2823 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2825 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2826 C_EXPR_APPEND by vec_safe_push.
2827 * c-tree.h (C_EXPR_APPEND): Remove.
2829 2014-01-31 Marek Polacek <polacek@redhat.com>
2832 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2833 build_function_call_vec.
2834 (build_function_call): Likewise.
2835 (build_atomic_assign): Likewise.
2836 (build_function_call_vec): Add arg_loc parameter. Use it.
2837 (convert_arguments): Likewise.
2838 (convert_for_assignment): Rename rhs_loc to expr_loc.
2839 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2840 (c_parser_objc_keywordexpr): Likewise.
2841 (c_parser_postfix_expression_after_primary): Call
2842 build_function_call_vec with expr_loc rather than op_loc.
2843 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2844 build_function_call_vec.
2845 (c_parser_expr_list): Add locations parameter. Fill it with locations
2846 of function arguments.
2847 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2849 2014-01-30 Marek Polacek <polacek@redhat.com>
2852 * c-typeck.c (build_function_call_vec): Use loc parameter.
2853 (convert_arguments): Add location parameter. Use it.
2854 (ep_convert_and_check): Likewise.
2855 (build_atomic_assign): Adjust convert_for_assignment call.
2856 (build_modify_expr): Likewise.
2857 (digest_init): Likewise.
2858 (c_finish_return): Likewise.
2859 (build_conditional_expr): Adjust ep_convert_and_check calls.
2860 (convert_for_assignment): Add rhs_loc parameter. Use it.
2861 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2864 2014-01-30 Richard Biener <rguenther@suse.de>
2867 * c-typeck.c (build_function_call_vec): Do not replace calls
2868 to a function via an incompatible type with a runtime abort.
2870 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2872 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2873 flag_enable_cilkplus with flag_cilkplus.
2874 (c_parser_direct_declarator_inner): Likewise.
2875 (c_parser_attribute_any_word): Likewise.
2876 (c_parser_attributes): Likewise.
2877 (c_parser_compound_statement): Likewise.
2878 (c_parser_statement_after_labels): Likewise.
2879 (c_parser_if_statement): Likewise.
2880 (c_parser_switch_statement): Likewise.
2881 (c_parser_do_statement): Likewise.
2882 (c_parser_for_statement): Likewise.
2883 (c_parser_unary_expression): Likewise.
2884 (c_parser_postfix_expression): Likewise.
2885 (c_parser_postfix_expression_after_primary): Likewise.
2886 (c_parser_postfix_expression_after_primary): Likewise.
2887 (c_parser_omp_clause_name): Likewise.
2888 (c_finish_omp_declare_simd): Likewise.
2889 (c_parser_cilk_verify_simd): Likewise.
2890 * c-typeck.c (build_array_ref): Likewise.
2891 (build_function_call_vec): Likewise.
2892 (convert_arguments): Likewise.
2893 (build_compound_expr): Likewise.
2894 (c_finish_return): Likewise.
2895 (c_finish_if_stmt): Likewise.
2896 (c_finish_loop): Likewise.
2897 (build_binary_op): Likewise.
2899 2014-01-23 Marek Polacek <polacek@redhat.com>
2902 * c-typeck.c (parser_build_binary_op): Use location instead of
2904 (build_binary_op): Pass location to shorten_compare.
2906 2014-01-23 Marek Polacek <polacek@redhat.com>
2909 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2912 2014-01-23 Marek Polacek <polacek@redhat.com>
2915 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2916 of a comma expression.
2917 (emit_side_effect_warnings): Likewise.
2919 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2922 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2923 function to use walk_tree and moved a lot of its functionality to
2924 expand_array_notations.
2925 (expand_array_notations): New function.
2927 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2929 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2930 attribute an attribute without value.
2932 2014-01-23 Jakub Jelinek <jakub@redhat.com>
2935 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2936 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2938 2014-01-22 Marek Polacek <polacek@redhat.com>
2941 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2942 of remove_c_maybe_const_expr on op1 and op2.
2944 2014-01-15 Jakub Jelinek <jakub@redhat.com>
2947 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2948 effects, preevaluate rhs using SAVE_EXPR first.
2950 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2953 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2954 statements with if-elseif statements.
2956 2014-01-06 Marek Polacek <polacek@redhat.com>
2959 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2960 defined bit-field types only in ISO C.
2962 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2964 Update copyright years
2966 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2968 * c-array-notation.c: Use the standard form for the copyright notice.
2970 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2972 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2973 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2974 field in parser is not empty. If not-empty, call the function
2975 c_parser_finish_omp_declare_simd.
2976 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2977 between SIMD-enabled functions and #pragma simd. Added new parameter.
2978 (c_parser_cilk_all_clauses): Modified the usage of the function
2979 c_parser_cilk_clause_vectorlength as mentioned above.
2980 (c_parser_cilk_simd_fn_vector_attrs): New function.
2981 (c_finish_cilk_simd_fn_tokens): Likewise.
2982 (is_cilkplus_vector_p): Likewise.
2983 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2984 "nomask," and "mask" strings in clause name.
2985 (c_parser_omp_all_clauses): Added 3 new case statements:
2986 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2987 PRAGMA_CILK_CLAUSE_NOMASK.
2988 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2989 check for vector attribute and if so call the function
2990 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2991 called the function c_finish_cilk_simd_fn_tokens.
2992 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2993 parser field is non-empty. If so, parse them as you would parse
2994 the omp declare simd pragma.
2995 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2996 Added a check when step is a parameter and flag it as error.
2997 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2998 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3001 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3003 * c-parser.c (c_parser_omp_parallel): Fix description.
3005 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3007 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3008 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3009 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3010 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3012 2013-12-04 Joseph Myers <joseph@codesourcery.com>
3015 * c-parser.c (c_parser_alignas_specifier): Use
3016 c_sizeof_or_alignof_type instead of c_alignof.
3017 (c_parser_alignof_expression): Likewise, with min_alignof
3018 parameter depending on alignof spelling used.
3020 2013-12-04 Marek Polacek <polacek@redhat.com>
3023 * c-decl.c (start_function): Don't warn for missing prototype for
3026 2013-12-03 Marek Polacek <polacek@redhat.com>
3029 * c-decl.c (build_compound_literal): Allow compound literals with
3030 empty initial value.
3032 2013-12-02 Joseph Myers <joseph@codesourcery.com>
3035 * c-typeck.c (build_modify_expr): Diagnose assignment to
3036 expression with array type.
3038 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3041 * c-typeck.c (process_init_element): Do not treat a string as
3042 initializing a whole array when used with a designator for an
3045 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3048 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3049 an inline function following a static declaration.
3051 2013-11-28 Jakub Jelinek <jakub@redhat.com>
3054 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3055 to p_name before calling c_parser_omp_teams instead of after.
3056 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3057 argument. Remove unused p_name variable.
3059 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
3060 Jakub Jelinek <jakub@redhat.com>
3062 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3063 external_scope is NULL.
3065 2013-11-27 Tom de Vries <tom@codesourcery.com>
3066 Marc Glisse <marc.glisse@inria.fr>
3069 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3071 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
3073 * c-typeck.c: Add required include files from gimple.h.
3075 2013-11-22 David Malcolm <dmalcolm@redhat.com>
3077 * c-decl.c (define_label, shadow_tag_warned)
3078 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3079 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3080 (declspecs_add_type): Remove use of in_system_header macro.
3081 * c-parser.c (c_parser_unary_expression): Likewise.
3082 * c-typeck.c (store_init_value, process_init_element)
3083 (c_start_case): Likewise.
3085 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3088 * c-parser.c (c_parser_set_source_position_from_token): Remove
3089 reference to in_system_header from comment.
3091 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3093 * c-decl.c (grokdeclarator): Update comment to refer to
3094 tree_to_[su]hwi rather than tree_low_cst.
3096 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3098 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3099 tree_to_uhwi throughout.
3101 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3103 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3106 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3108 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3111 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
3113 * c-parser.c (c_parser_cilk_simd): New.
3114 (c_parser_cilk_verify_simd): New.
3115 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3116 (c_parser_omp_for_loop): Add case for NE_EXPR.
3117 Set c_break_label for CILK_SIMD.
3118 (c_parser_cilk_clause_vectorlength): New.
3119 (c_parser_cilk_clause_linear): New.
3120 (c_parser_cilk_clause_name): New.
3121 (c_parser_cilk_all_clauses): New.
3122 * c-typeck.c (build_unary_op): Pass location argument to
3124 (build_modify_expr): Same.
3125 (build_asm_expr): Same.
3126 (c_finish_bc_stmt): Error on break/continue in loops.
3128 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
3130 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3132 2013-11-14 Diego Novillo <dnovillo@google.com>
3134 * c-decl.c: Include print-tree.h.
3135 Include stor-layout.h.
3138 Include stringpool.h.
3139 * c-lang.c: Include fold-const.h.
3140 * c-parser.c: Include stringpool.h.
3142 Include stor-layout.h.
3144 Include trans-mem.h.
3145 * c-typeck.c: Include stor-layout.h.
3146 Include trans-mem.h.
3150 2013-11-13 Joseph Myers <joseph@codesourcery.com>
3152 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3153 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3155 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3156 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3158 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3159 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3160 (c_parser_declarator, c_parser_direct_declarator_inner)
3161 (c_parser_parameter_declaration, c_parser_type_name): All callers
3163 (c_parser_declaration_or_fndef): Handle declarations with type
3164 determined from the initializer.
3166 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
3168 * c-typeck.c: Include gimplify.h.
3170 2013-11-12 Joseph Myers <joseph@codesourcery.com>
3172 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3173 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3175 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3176 or _Thread_local as appropriate in diagnostics.
3177 (build_null_declspecs): Initialize ret->thread_gnu_p.
3178 (declspecs_add_scspec): Handle either __thread or _Thread_local
3179 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3180 pedantic. Do not disallow _Thread_local extern and _Thread_local
3183 2013-11-07 Joseph Myers <joseph@codesourcery.com>
3184 Andrew MacLeod <amacleod@redhat.com>
3186 * c-aux-info.c (gen_type): Handle atomic qualifier.
3187 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3188 qualifiers when compating types.
3189 (shadow_tag_warned): Handle atomic_p in declspecs.
3190 (quals_from_declspecs): Likewise.
3191 (start_decl): Use c_type_promotes_to when promoting argument
3193 (grokdeclarator): Handle _Atomic.
3194 (get_parm_info): Diagnose any qualifier on "void" as only
3196 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3197 comparing types. Use c_type_promotes_to when promoting argument
3199 (finish_function): Use c_type_promotes_to when promoting argument
3201 (build_null_declspecs): Handle atomic_p in declspecs.
3202 (declspecs_add_qual): Handle RID_ATOMIC.
3203 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3204 (c_token_starts_declspecs): Handle RID_ATOMIC.
3205 (c_parser_declspecs): Handle atomic type specifiers and
3207 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3208 from types of expressions with atomic type.
3209 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3210 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3211 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3212 (c_parser_statement_after_labels, c_parser_switch_statement)
3213 (c_parser_for_statement, c_parser_expr_no_commas)
3214 (c_parser_conditional_expression, c_parser_binary_expression)
3215 (c_parser_cast_expression, c_parser_unary_expression)
3216 (c_parser_postfix_expression)
3217 (c_parser_postfix_expression_after_primary, c_parser_expression):
3218 Use convert_lvalue_to_rvalue.
3219 (c_parser_expression_conv, c_parser_expr_list): Document
3220 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3221 (c_parser_objc_synchronized_statement): Use
3222 convert_lvalue_to_rvalue.
3223 (c_parser_objc_selector): Handle RID_ATOMIC.
3224 (c_parser_objc_receiver, c_parser_array_notation): Use
3225 convert_lvalue_to_rvalue.
3226 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3227 _Atomic (type-name).
3228 (struct c_declspecs): Add atomic_p field.
3229 (convert_lvalue_to_rvalue): Declare.
3230 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3231 corresponding atomic types.
3232 (qualify_type): Don't add _Atomic qualifiers from second argument.
3233 (comp_target_types): Do not allow _Atomic mismatches.
3234 (type_lists_compatible_p): Do not remove atomic qualifiers when
3236 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3237 (build_atomic_assign): New functions.
3238 (build_unary_op): Use build_atomic_assign for atomic increment and
3240 (build_conditional_expr): Do not treat _Atomic void as a qualified
3242 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3243 (find_anonymous_field_with_type, convert_to_anonymous_field)
3244 (convert_for_assignment): Do not remove atomic qualifiers when
3246 (digest_init): Do not accept initialization of arrays of atomic
3247 elements by string constants.
3248 (build_asm_expr): Use convert_lvalue_to_rvalue.
3249 (build_binary_op): Do not treat _Atomic void as a qualified
3252 2013-11-06 DJ Delorie <dj@redhat.com>
3254 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3255 both explicit and builtin, print the location of the explicit one.
3257 2013-11-05 Tobias Burnus <burnus@net-b.de>
3259 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3260 c_parser_omp_distribute, c_parser_omp_teams,
3261 c_parser_omp_target, c_parser_omp_declare): Handle
3264 2013-11-03 Marek Polacek <polacek@redhat.com>
3266 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3268 2013-11-01 Jakub Jelinek <jakub@redhat.com>
3270 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3271 check_dup_generic at the end, unless remove is true.
3272 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3274 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3276 2013-10-31 Jakub Jelinek <jakub@redhat.com>
3278 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3279 with decl that is not pointer nor array.
3281 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3283 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3284 a spawning function is found.
3285 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3286 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3287 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3288 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3290 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3291 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3293 (c_finish_return): Added a check to reject _Cilk_spawn in return
3295 (build_cilk_spawn): New function.
3296 (build_cilk_sync): Likewise.
3297 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3299 2013-10-27 Tobias Burnus <burnus@net-b.de>
3302 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3303 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3304 (c_parser_statement_after_labels): Update calls.
3306 2013-10-24 Tobias Burnus <burnus@net-b.de>
3309 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3310 Handle PRAGMA_IVDEP.
3311 (c_parser_statement_after_labels): Update call.
3313 2013-10-24 Marek Polacek <polacek@redhat.com>
3315 * c-parser.c (c_parser_struct_declaration): Add a comment.
3316 (c_parser_declarator): Don't allow _Alignas here.
3318 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
3320 * c-parser.c: Include omp-low.h.
3321 * c-typeck.c: Likewise.
3323 2013-10-17 Marek Polacek <polacek@redhat.com>
3326 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3327 Document syntax of the array-declarator.
3328 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3330 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3331 (c_parser_struct_declaration): Likewise.
3332 (c_parser_declarator): Likewise.
3333 (c_parser_direct_declarator_inner): Likewise.
3334 (c_parser_parameter_declaration): Likewise.
3335 (c_parser_type_name): Likewise.
3337 2013-10-11 Jakub Jelinek <jakub@redhat.com>
3339 * c-lang.h (current_omp_declare_target_attribute): New extern
3341 * c-parser.c: Include c-lang.h.
3342 (struct c_parser): Change tokens to c_token *.
3343 Add tokens_buf field. Change tokens_avail type to unsigned int.
3344 (c_parser_consume_token): If parser->tokens isn't
3345 &parser->tokens_buf[0], increment parser->tokens.
3346 (c_parser_consume_pragma): Likewise.
3347 (enum pragma_context): Add pragma_struct and pragma_param.
3348 (c_parser_external_declaration): Adjust
3349 c_parser_declaration_or_fndef caller.
3350 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3351 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3352 Adjust recursive call.
3353 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3355 (c_parser_parameter_declaration): Use pragma_param instead of
3357 (c_parser_compound_statement_nostart, c_parser_label,
3358 c_parser_for_statement): Adjust
3359 c_parser_declaration_or_fndef callers.
3360 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3361 it through to c_parser_conditional_expression.
3362 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3363 pass it through to c_parser_binary_expression. Adjust recursive
3365 (c_parser_binary_expression): Remove prec argument, add
3366 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3367 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3368 binop matches it, use build2 instead of parser_build_binary_op.
3369 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3370 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3371 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3372 Handle pragma_struct and pragma_param the same as pragma_external.
3373 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3374 (c_parser_omp_variable_list): Parse array sections for
3375 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3376 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3377 (c_parser_omp_clause_reduction): Handle user defined reductions.
3378 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3379 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3380 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3381 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3382 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3383 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3384 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3385 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3386 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3387 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3388 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3389 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3390 (c_parser_omp_for_loop): Add CODE argument, pass it through
3391 to c_finish_omp_for. Change last argument to cclauses,
3392 and adjust uses to grab parallel clauses from the array of all
3393 the split clauses. Adjust c_parser_binary_expression,
3394 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3395 (omp_split_clauses): New function.
3396 (c_parser_omp_simd): New function.
3397 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3398 Allow the function to be called also when parsing combined constructs,
3399 and call c_parser_omp_simd when parsing for simd.
3400 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3401 #pragma omp section, require exactly one structured-block instead of
3402 sequence of statements.
3403 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3404 Allow the function to be called also when parsing combined constructs.
3405 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3406 Allow the function to be called also when parsing combined
3408 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3409 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3410 c_parser_omp_teams, c_parser_omp_target_data,
3411 c_parser_omp_target_update, c_parser_omp_target,
3412 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3413 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3414 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3415 (c_parser_omp_construct): Add p_name and mask vars. Handle
3416 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3417 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3418 and c_parser_omp_sections callers.
3419 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3420 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3421 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3422 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3423 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3425 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3426 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3427 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3428 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3429 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3430 * c-typeck.c: Include tree-inline.h.
3431 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3432 handle_omp_array_sections_1, handle_omp_array_sections,
3433 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3434 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3435 user defined reductions.
3436 (c_tree_equal): New function.
3437 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3438 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3439 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3440 c_check_omp_declare_reduction_r): New prototypes.
3441 * c-decl.c (current_omp_declare_target_attribute): New variable.
3442 (c_decl_attributes): New function.
3443 (start_decl, start_function): Use it instead of decl_attributes.
3444 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3445 c_omp_reduction_decl, c_omp_reduction_lookup,
3446 c_check_omp_declare_reduction_r): New functions.
3448 2013-09-25 Tom Tromey <tromey@redhat.com>
3450 * Make-lang.in (c/gccspec.o): Remove.
3451 (CFLAGS-c/gccspec.o): New variable.
3452 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3453 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3454 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3456 2013-09-25 Tom Tromey <tromey@redhat.com>
3458 * Make-lang.in (c/gccspec.o): Don't use subshell.
3460 2013-09-18 Marek Polacek <polacek@redhat.com>
3463 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3464 Remove unnecessary check.
3466 2013-09-18 Marek Polacek <polacek@redhat.com>
3469 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3470 no_sanitize_undefined attribute.
3472 2013-09-13 Kai Tietz <ktietz@redhat.com>
3475 * c-decl.c (c_builtin_function_ext_scope): Remove
3476 wrong assumption that it is never called on prexisting
3479 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3481 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3483 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3485 * c-objc-common.c (c_tree_printer): Tidy.
3487 2013-08-30 Marek Polacek <polacek@redhat.com>
3489 * c-typeck.c (build_binary_op): Add division by zero and shift
3492 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
3493 Joseph Myers <joseph@codesourcery.com>
3496 * c-typeck.c (c_common_type): Prefer double_type_node over
3497 other REAL_TYPE types with the same precision.
3498 (convert_arguments): Likewise.
3500 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3502 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3503 (c_initialize_diagnostics): Call a destructor for the early printer.
3505 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3507 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3508 printer initialization.
3510 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
3513 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3514 check for truth values.
3515 (expand_array_notation_exprs): Added truth values case. Removed an
3516 unwanted else. Added for-loop to walk through subtrees in default
3519 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3521 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3523 2013-07-23 Joseph Myers <joseph@codesourcery.com>
3525 * c-parser.c (struct c_generic_association): Fix typo.
3527 2013-07-23 Tom Tromey <tromey@redhat.com>
3528 Joseph Myers <joseph@codesourcery.com>
3530 * c-parser.c (struct c_generic_association): New.
3531 (c_generic_association_d): New typedef.
3532 (c_parser_generic_selection): New function.
3533 (c_parser_postfix_expression): Handle RID_GENERIC.
3535 2013-07-13 Jason Merrill <jason@redhat.com>
3538 * c-decl.c (finish_struct): Check for too-large class.
3540 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
3543 * c-typeck.c (set_init_index): When folding, check for index overflow.
3545 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3547 * c-parser.c (c_parser_array_notation): Removed rejection of array
3548 notations in an array of function pointers.
3550 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3552 * c-array-notation.c (make_triplet_val_inv): New function.
3553 (create_cmp_incr): Likewise.
3554 (create_array_refs): Likewise.
3555 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3556 Also modularized common parts between functions and called the function.
3557 (build_array_notation_expr): Likewise.
3558 (fix_conditional_array_notations_1): Likewise.
3559 (fix_array_notation_expr): Likewise.
3560 (fix_array_notation_call_expr): Likewise.
3562 2013-06-18 Marek Polacek <polacek@redhat.com>
3565 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3567 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3569 * c-array-notation.c (build_array_notation_expr): Reject array notation
3570 mismatch between LHS and RHS even inside a call_expr. Also, removed
3571 a couple while statements that were dead code.
3573 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3575 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3576 excessive precision expressions in function parameters. Also removed
3577 couple unwanted while statements.
3579 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3581 * c-array-notation.c (expand_array_notation_exprs): Added
3582 ARRAY_NOTATION_REF case.
3584 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3586 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3587 function to c-family/array-notation-common.c.
3588 (is_cilkplus_reduce_builtin): Likewise.
3589 (find_rank): Likewise.
3590 (extract_array_notation_exprs): Likewise.
3591 (replace_array_notations): Likewise.
3592 (find_inv_trees): Likewise.
3593 (replace_inv_trees): Likewise.
3594 (contains_array_notation_expr): Likewise.
3595 (find_correct_array_notation_type): Likewise.
3596 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3597 (struct inv_list): Moved this to c-family/array-notation-common.c.
3598 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3600 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3602 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3603 reduction functions outside the for-loop. Added a check if the fundecl
3604 is non-NULL. Finally, removed an unwanted if-statement, and made the
3607 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3609 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3610 condition of the if-statement matches the rank of else-block and then-
3611 block when array notations are used.
3612 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3613 expression after the entire function body is parsed.
3614 (c_parser_expr_no_commas): Delayed creating array notation expressions
3615 to the end of function parsing.
3616 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3617 whole if-statement instead of just the condition.
3618 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3620 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3623 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3624 array to NULL_TREE if they are unused. Also added a check for the
3625 field to be NULL before its fields are used in future.
3627 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3630 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3631 (build_array_notation_expr): Likewise.
3633 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3635 * c-typeck.c (build_array_ref): Added a check to see if array's
3636 index is greater than one. If true, then emit an error.
3637 (build_function_call_vec): Exclude error reporting and checking
3638 for builtin array-notation functions.
3639 (convert_arguments): Likewise.
3640 (c_finish_return): Added a check for array notations as a return
3641 expression. If true, then emit an error.
3642 (c_finish_loop): Added a check for array notations in a loop
3643 condition. If true then emit an error.
3644 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3645 (build_binary_op): Added a check for array notation expr inside
3646 op1 and op0. If present, we call another function to find correct
3648 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3649 * c-parser.c (c_parser_compound_statement): Check if array
3650 notation code is used in tree, if so, then transform them into
3652 (c_parser_expr_no_commas): Check if array notation is used in LHS
3653 or RHS, if so, then build array notation expression instead of
3655 (c_parser_postfix_expression_after_primary): Added a check for
3656 colon(s) after square braces, if so then handle it like an array
3657 notation. Also, break up array notations in unary op if found.
3658 (c_parser_direct_declarator_inner): Added a check for array
3660 (c_parser_compound_statement): Added a check for array notation in
3661 a stmt. If one is present, then expand array notation expr.
3662 (c_parser_if_statement): Likewise.
3663 (c_parser_switch_statement): Added a check for array notations in
3664 a switch statement's condition. If true, then output an error.
3665 (c_parser_while_statement): Similarly, but for a while.
3666 (c_parser_do_statement): Similarly, but for a do-while.
3667 (c_parser_for_statement): Similarly, but for a for-loop.
3668 (c_parser_unary_expression): Check if array notation is used in a
3669 pre-increment or pre-decrement expression. If true, then expand
3671 (c_parser_array_notation): New function.
3672 * c-array-notation.c: New file.
3673 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3675 2013-05-23 Mike Stump <mikestump@comcast.net>
3677 * c-typeck.c (convert_for_assignment): Handle references to memory
3680 2013-05-16 Jason Merrill <jason@redhat.com>
3682 * Make-lang.in (cc1$(exeext)): Use link mutex.
3684 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3686 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3687 to simply use OPT_Wpointer_arith.
3688 (build_unary_op): Likewise.
3690 2013-04-03 Jakub Jelinek <jakub@redhat.com>
3693 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3694 argument. If set, or it temporarily for parsing of the first
3695 argument into force_folding_builtin_constant_p.
3696 (c_parser_postfix_expression): Adjust callers.
3698 2013-03-21 Richard Biener <rguenther@suse.de>
3700 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3701 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3703 2013-02-12 Marek Polacek <polacek@redhat.com>
3706 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3709 2013-01-24 Jakub Jelinek <jakub@redhat.com>
3712 * c-typeck.c (set_nonincremental_init_from_string): If
3713 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3715 (process_init_element): Likewise.
3717 2012-12-20 Jakub Jelinek <jakub@redhat.com>
3720 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3721 argument, don't call default_function_array_conversion
3722 nor c_fully_fold here.
3723 (c_parser_asm_statement): Adjust callers.
3724 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3725 and outputs here, and call default_function_array_conversion
3726 on inputs that don't need to be addressable.
3728 2012-12-18 Jakub Jelinek <jakub@redhat.com>
3731 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3732 warning require that both c_common_unsigned_type as well as
3733 c_common_signed_type is the same for both mvl and mvr types.
3735 2012-11-16 Diego Novillo <dnovillo@google.com>
3737 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3739 * c-common.c: Use new vec API in vec.h.
3740 * c-common.h: Likewise.
3741 * c-gimplify.c: Likewise.
3742 * c-pragma.c: Likewise.
3743 * c-pretty-print.c: Likewise.
3744 * c-pretty-print.h: Likewise.
3745 * c-semantics.c: Likewise.
3746 * c-decl.c: Likewise.
3747 * c-parser.c: Likewise.
3748 * c-tree.h: Likewise.
3749 * c-typeck.c: Likewise.
3751 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3754 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3756 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3759 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3760 shadows a function, unless the variable is a function or a
3761 pointer-to-function.
3763 2012-10-12 Jakub Jelinek <jakub@redhat.com>
3766 * c-parser.c (struct c_tree_loc_pair): Removed.
3767 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3768 add location_t * and tree * arguments, fill in array of 3
3769 sizeof_arg trees and corresponding locs.
3770 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3771 c_parser_expr_list callers.
3772 (c_parser_postfix_expression_after_primary): Likewise. Pass
3773 array of 3 sizeof_arg trees and locs (corresponding to first
3774 3 arguments) to sizeof_pointer_memaccess_warning.
3776 2012-10-09 Lawrence Crowl <crowl@google.com>
3778 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3779 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3782 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3785 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3788 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
3791 * c-typeck.c: Include c-common.h.
3792 (enum stv_conv): Moved to c-common.h.
3793 (scalar_to_vector): Moved to c-common.c.
3794 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3795 * Make-lang.in: c-typeck.c depends on c-common.h.
3797 2012-10-04 Arnaud Charlet <charlet@adacore.com>
3799 * c-decl.c (c_write_global_declarations): Fix handling of
3802 2012-09-30 Sharad Singhai <singhai@google.com>
3804 * c-decl.c (c_write_global_declarations): Use a different method
3805 to determine if the dump has ben initialized.
3807 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3810 * c-typeck.c (c_cast_expr): When casting to a type requiring
3811 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3814 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3817 * c-typeck.c (build_unary_op): Pass original argument of
3818 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3819 any C_MAYBE_CONST_EXPR, if it has integer operands.
3820 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3821 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3822 to c_objc_common_truthvalue_conversion, then remove any
3823 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3824 c_objc_common_truthvalue_conversion not
3825 c_common_truthvalue_conversion.
3826 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3827 call note_integer_operands for arguments with integer operands
3828 that are not integer constants.
3830 2012-09-13 Jakub Jelinek <jakub@redhat.com>
3833 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3834 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3836 2012-08-31 Jakub Jelinek <jakub@redhat.com>
3839 * c-convert.c (convert): Don't call fold_convert_loc if
3840 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3841 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3842 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3844 2012-08-24 Jakub Jelinek <jakub@redhat.com>
3847 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3848 for nested and empty_ok arguments in the call to
3849 c_parser_declaration_or_fndef.
3851 2012-08-17 Jakub Jelinek <jakub@redhat.com>
3853 * c-tree.h (c_last_sizeof_arg): Declare.
3854 * c-parser.c (struct c_tree_loc_pair): New type.
3855 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3857 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3858 (c_parser_postfix_expression_after_primary): Likewise. Call
3859 sizeof_pointer_memaccess_warning if needed.
3860 (sizeof_ptr_memacc_comptypes): New function.
3861 * c-typeck.c (c_last_sizeof_arg): New global variable.
3862 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3864 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
3866 * c-lang.h (lang_decl): Add variable_size GTY option.
3868 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3870 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3871 * Make-lang.in: Fix dependencies.
3873 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3875 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3876 and add language Makefile hooks.
3877 * config-lang.in: New file.
3878 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3879 add the required "normal" config-lang.in rules.
3880 * c-lang.h: Moved from gcc/ to here.
3881 * c-tree.h: Likewise.
3882 * c-objc-common.c: Likewise.
3883 * c-objc-common.h: Likewise.
3884 * c-typeck.c: Likewise.
3885 * c-convert.c: Likewise.
3886 * c-lang.c: Likewise.
3887 * c-aux-info.c: Likewise.
3888 * c-errors.c: Likewise.
3889 * gccspec.c: Likewise.
3890 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3891 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3893 Copyright (C) 2012-2016 Free Software Foundation, Inc.
3895 Copying and distribution of this file, with or without modification,
3896 are permitted in any medium without royalty provided the copyright
3897 notice and this notice are preserved.