1 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
5 (struct c_declspecs): Add field floatn_nx_idx.
6 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
7 and _FloatNx type specifiers.
8 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
9 (c_parser_declspecs, c_parser_attribute_any_word)
10 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
11 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
12 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
15 2016-08-12 Jakub Jelinek <jakub@redhat.com>
16 Martin Liska <mliska@suse.cz>
19 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
20 % to determine val element to change. Assert that
21 wchar_bytes * charwidth fits into val array.
23 2016-08-12 Marek Polacek <polacek@redhat.com>
26 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
27 (c_parser_postfix_expression): Likewise.
28 * c-typeck.c (build_unary_op): Adjust fall through comment.
29 (c_mark_addressable): Likewise.
31 2016-08-11 Jakub Jelinek <jakub@redhat.com>
34 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
35 array member through typedef, for orig_qual_indirect == 0 clear
38 2016-08-08 David Malcolm <dmalcolm@redhat.com>
41 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
42 this up to selftest::run_c_tests.
43 (selftest::run_c_tests): New function.
45 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
47 * c-parser.c (struct oacc_routine_data): Add error_seen and
49 (c_finish_oacc_routine): Use these.
50 (c_parser_declaration_or_fndef): Adjust.
51 (c_parser_oacc_routine): Likewise. Support more C language
52 constructs, and improve diagnostics. Move pragma context
54 (c_parser_pragma): ... here.
56 * c-parser.c (struct oacc_routine_data): New.
57 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
59 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
60 declare target" attribute.
62 2016-08-01 Jan Beulich <jbeulich@suse.com>
64 * c-fold.c (c_fully_fold_internal): Also emit shift count
65 warnings for vector types.
66 * c-typeck.c (build_binary_op): Likewise.
68 2016-07-29 Marek Polacek <polacek@redhat.com>
71 * c-decl.c (finish_struct): Rephrase an error message.
74 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
75 to error node for invalid code.
78 * c-decl.c (implicitly_declare): Return decl early not only for
79 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
81 2016-07-29 Jakub Jelinek <jakub@redhat.com>
84 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
85 on GNU extern inline functions.
87 2016-07-29 Marek Polacek <polacek@redhat.com>
90 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
93 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
95 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
97 2016-07-20 David Malcolm <dmalcolm@redhat.com>
99 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
101 (best_macro_match): Likewise, converting from a typedef to a
103 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
104 (lookup_name_fuzzy): Update for change of best_macro_match to a
105 subclass with a ctor that calls cpp_forall_identifiers.
107 2016-07-20 David Malcolm <dmalcolm@redhat.com>
109 * c-decl.c (implicit_decl_warning): Update for conversion of
110 return type of lookup_name_fuzzy to const char *.
111 (undeclared_variable): Likewise.
112 (lookup_name_fuzzy): Convert return type from tree to
114 * c-parser.c (c_parser_declaration_or_fndef): Update for
115 conversion of return type of lookup_name_fuzzy to const char *.
116 (c_parser_parameter_declaration): Likewise.
118 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
120 * c-parser.c (c_parser_oacc_declare): Don't scan for
122 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
123 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
124 zero-length subarrays.
126 2016-07-15 Jakub Jelinek <jakub@redhat.com>
129 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
130 instead of FUZZY_LOOKUP_NAME.
131 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
132 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
134 2016-07-14 Jakub Jelinek <jakub@redhat.com>
137 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
139 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
141 * c-parser.c (c_parser_generic_selection): Make type of variable
143 (c_parser_omp_declare_simd): Likewise.
145 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
147 * c-decl.c (struct c_struct_parse_info): Change member types
148 from vec to auto_vec.
149 (start_struct): Adjust.
150 (finish_struct): Likewise.
152 2016-07-02 Jakub Jelinek <jakub@redhat.com>
155 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
157 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
159 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
160 Move pragma context checking into...
161 (c_parser_omp_cancellation_point): ... here, and improve
163 * c-typeck.c (c_finish_omp_cancel)
164 (c_finish_omp_cancellation_point): Improve diagnostic messages.
166 2016-06-29 Jakub Jelinek <jakub@redhat.com>
169 * c-typeck.c (c_build_qualified_type): Don't clear
170 C_TYPE_INCOMPLETE_VARS for the main variant.
172 2016-06-28 Martin Sebor <msebor@redhat.com>
175 * c-typeck.c (output_init_element): Diagnose incompatible types
176 before non-constant initializers.
178 2016-06-28 Jakub Jelinek <jakub@redhat.com>
180 * Make-lang.in: Don't cat ../stage_current if it does not exist.
182 2016-06-23 Andi Kleen <ak@linux.intel.com>
184 * Make-lang.in: Add support for autofdo.
186 2016-06-22 David Malcolm <dmalcolm@redhat.com>
189 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
190 (implicit_decl_warning): When issuing warnings for implicit
191 declarations, attempt to provide a suggestion via
193 (undeclared_variable): Likewise when issuing errors.
194 (lookup_name_in_scope): Likewise.
195 (struct edit_distance_traits<cpp_hashnode *>): New struct.
196 (best_macro_match): New typedef.
197 (find_closest_macro_cpp_cb): New function.
198 (lookup_name_fuzzy): New function.
199 * c-parser.c: Include gcc-rich-location.h.
200 (c_token_starts_typename): Split out case CPP_KEYWORD into...
201 (c_keyword_starts_typename): ...this new function.
202 (c_parser_declaration_or_fndef): When issuing errors about
203 missing "struct" etc, add a fixit. For other kinds of errors,
204 attempt to provide a suggestion via lookup_name_fuzzy.
205 (c_parser_parms_declarator): When looking ahead to detect typos in
206 type names, also reject CPP_KEYWORD.
207 (c_parser_parameter_declaration): When issuing errors about
208 unknown type names, attempt to provide a suggestion via
210 * c-tree.h (c_keyword_starts_typename): New prototype.
212 2016-06-20 Joseph Myers <joseph@codesourcery.com>
215 * c-typeck.c (build_conditional_expr): Return error_mark_node if
216 c_common_type returns error_mark_node.
218 2016-06-19 Martin Sebor <msebor@redhat.com>
221 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
222 __alignof__ (expression).
224 2016-06-14 David Malcolm <dmalcolm@redhat.com>
226 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
228 2016-06-14 David Malcolm <dmalcolm@redhat.com>
230 * c-typeck.c (build_component_ref): Simplify fixit code by
231 using gcc_rich_location::add_fixit_misspelled_id.
232 (set_init_label): Likewise.
234 2016-06-13 David Malcolm <dmalcolm@redhat.com>
236 * c-parser.c (c_parser_initelt): Provide location of name for new
237 location_t param of set_init_label.
238 * c-tree.h (set_init_label): Add location_t param.
239 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
240 param and use it when issuing error messages about unrecognized
241 field names. Attempt to provide a fixit hint if appropriate,
242 otherwise update the error message to provide the type name.
244 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
247 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
250 2016-06-08 Martin Sebor <msebor@redhat.com>
251 Jakub Jelinek <jakub@redhat.com>
255 * c-typeck.c (convert_arguments): Don't promote last argument
256 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
258 2016-06-08 Marek Polacek <polacek@redhat.com>
261 * c-decl.c (grokdeclarator): Check TYPE_P.
264 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
267 2016-06-07 David Malcolm <dmalcolm@redhat.com>
269 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
270 and structure element reference, capture the location of the
271 element name token and pass it to build_component_ref.
272 (c_parser_postfix_expression_after_primary): Likewise for
273 structure element dereference.
274 (c_parser_omp_variable_list): Likewise for
275 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
276 * c-tree.h (build_component_ref): Add location_t param.
277 * c-typeck.c (build_component_ref): Add location_t param
278 COMPONENT_LOC. Use it, if available, when issuing hints about
279 mispelled member names to provide a fixit replacement hint.
281 2016-06-06 Marek Polacek <polacek@redhat.com>
284 * c-parser.c (c_parser_direct_declarator): Set location.
286 2016-06-06 Marek Polacek <polacek@redhat.com>
288 * c-typeck.c (comptypes_internal): Handle comparisons of
289 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
290 TYPE_REF_CAN_ALIAS_ALL.
292 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
294 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
295 arguments as addressable when async clause exists.
297 2016-05-30 Jakub Jelinek <jakub@redhat.com>
300 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
301 when combined with target construct.
303 2016-05-26 Jakub Jelinek <jakub@redhat.com>
305 * c-parser.c (c_parser_omp_clause_schedule): Warn if
306 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
308 2016-05-25 Marek Polacek <polacek@redhat.com>
311 * c-decl.c (c_make_fname_decl): Don't check seen_error.
314 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
316 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
318 * c-parser.c (c_parser_oacc_declare): Add support for
319 GOMP_MAP_FIRSTPRIVATE_POINTER.
320 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
321 argument with enum c_omp_region_type ort.
322 (handle_omp_array_sections): Likewise. Update call to
323 handle_omp_array_sections_1.
324 (c_finish_omp_clauses): Add specific errors and warning messages for
325 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
326 call to handle_omp_array_sections.
328 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
330 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
332 2016-05-24 Richard Biener <rguenther@suse.de>
336 * c-typeck.c (build_array_ref): Do not complain about indexing
337 non-lvalue vectors. Adjust for function name change.
339 2016-05-20 Martin Sebor <msebor@redhat.com>
342 * c-typeck.c (error_init): Use
343 expansion_point_location_if_in_system_header.
344 (warning_init): Same.
346 2016-05-19 David Malcolm <dmalcolm@redhat.com>
349 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
351 (c_parser_postfix_expression): Likewise.
352 * c-tree.h (c_expr::set_error): New method.
353 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
354 that result's range is initialized.
356 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
358 * c-typeck.c (parser_build_unary_op): Fix formatting.
360 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
362 * c-decl.c (grokdeclarator): Remove errmsg and use of
363 targetm.invalid_return_type.
364 (grokparms): Remove errmsg and use of
365 targetm.invalid_parameter_type.
367 2016-05-13 Joseph Myers <joseph@codesourcery.com>
369 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
370 function return type.
372 2016-05-12 Marek Polacek <polacek@redhat.com>
375 * c-decl.c (build_compound_literal): Pass LOC down to
376 c_incomplete_type_error.
377 * c-tree.h (require_complete_type): Adjust declaration.
378 (c_incomplete_type_error): Likewise.
379 * c-typeck.c (require_complete_type): Add location parameter, pass it
380 down to c_incomplete_type_error.
381 (c_incomplete_type_error): Add location parameter, pass it down to
383 (build_component_ref): Pass location down to c_incomplete_type_error.
384 (default_conversion): Pass location down to require_complete_type.
385 (build_array_ref): Likewise.
386 (build_function_call_vec): Likewise.
387 (convert_arguments): Likewise.
388 (build_unary_op): Likewise.
389 (build_c_cast): Likewise.
390 (build_modify_expr): Likewise.
391 (convert_for_assignment): Likewise.
392 (c_finish_omp_clauses): Likewise.
394 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
397 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
399 * c-errors.c (pedwarn_c90): Return true if warned.
400 * c-tree.h (pedwarn_c90): Change return type to bool.
401 (enum c_declspec_word): Add new enumerator cdw_atomic.
403 2016-05-11 Marek Polacek <polacek@redhat.com>
406 * c-decl.c (diagnose_mismatched_decls): Factor out code to
407 diagnose_mismatched_attributes and call it.
409 2016-05-10 Marek Polacek <polacek@redhat.com>
412 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
413 on a declaration following the definition.
415 2016-05-05 Jakub Jelinek <jakub@redhat.com>
417 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
418 parse it through to c_parser_c99_block_statement.
419 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
422 2016-05-04 Marek Polacek <polacek@redhat.com>
424 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
427 2016-05-04 Marek Polacek <polacek@redhat.com>
430 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
431 for macro expansions.
433 2016-05-03 Marek Polacek <polacek@redhat.com>
436 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
437 check_builtin_function_arguments.
439 2016-05-03 Richard Biener <rguenther@suse.de>
441 * Make-lang.in (cc1-checksum.c): For stage-final re-use
442 the checksum from the previous stage.
444 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
446 * c-parser.c (c_parser_oacc_all_clauses): Update call to
447 c_finish_omp_clauses.
448 (c_parser_omp_all_clauses): Likewise.
449 (c_parser_oacc_cache): Likewise.
450 (c_parser_oacc_loop): Likewise.
451 (omp_split_clauses): Likewise.
452 (c_parser_omp_declare_target): Likewise.
453 (c_parser_cilk_all_clauses): Likewise.
454 (c_parser_cilk_for): Likewise.
455 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
456 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
458 2016-05-02 Marek Polacek <polacek@redhat.com>
461 * c-decl.c (grokdeclarator): Diagnose when array's size has an
464 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
467 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
468 OACC_LOOP_CLAUSE_MASK.
469 (c_parser_oacc_kernels_parallel): Update call to
470 c_oacc_split_loop_clauses.
472 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
474 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
475 argument to build_modify_expr in two cases.
477 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
479 * c-parser.c (c_parser_postfix_expression_after_primary): Call
480 warn_for_memset instead of warning directly here.
482 2016-04-26 Marek Polacek <polacek@redhat.com>
485 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
487 (c_parser_for_statement): ... here.
488 (c_parser_if_statement): Use it.
489 (c_parser_switch_statement): Use it.
490 (c_parser_while_statement): Use it.
493 * c-decl.c (pushdecl): Pass LOCUS down to warning.
495 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
498 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
499 instead of c_finish_cilk_clauses.
500 * c-tree.h (c_finish_omp_clauses): Add new default argument.
501 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
502 floating-point variables in the linear clause for Cilk Plus.
504 2016-04-18 Michael Matz <matz@suse.de>
506 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
507 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
509 2016-04-15 Marek Polacek <polacek@redhat.com>
512 * c-typeck.c (build_unary_op): Pass location down to error and
515 2016-04-15 Jakub Jelinek <jakub@redhat.com>
518 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
520 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
521 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
522 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
523 Adjust c_parser_pragma callers.
524 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
526 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
528 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
529 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
530 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
531 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
532 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
533 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
534 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
535 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
537 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
538 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
541 2016-04-13 Marek Polacek <polacek@redhat.com>
544 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
546 (c_parser_statement): Likewise.
547 (c_parser_c99_block_statement): Likewise.
548 (c_parser_while_statement): Likewise.
549 (c_parser_for_statement): Likewise.
550 (c_parser_if_body): Don't set IF_P here.
551 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
552 about dangling else here.
553 * c-tree.h (c_finish_if_stmt): Adjust declaration.
554 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
555 warn about dangling else here.
557 2016-04-04 Marek Polacek <polacek@redhat.com>
560 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
562 2016-03-31 Marek Polacek <polacek@redhat.com>
565 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
567 2016-03-18 David Malcolm <dmalcolm@redhat.com>
570 * c-parser.c (c_parser_postfix_expression): Set the source range
571 for uses of "__builtin_types_compatible_p".
573 2016-03-17 Jakub Jelinek <jakub@redhat.com>
576 * c-typeck.c (composite_type): Don't count void_list_node
577 into len, if the list is terminated by void_list_node, start
578 with void_list_node instead of NULL for newargs. Stop
581 2016-03-16 Marek Polacek <polacek@redhat.com>
584 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
585 nested functions returning VM types.
587 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
589 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
590 when calling c_finish_omp_clauses.
592 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
595 * c-decl.c (get_parm_info): Don't queue implicit function declarations
598 2016-03-04 Marek Polacek <polacek@redhat.com>
601 * c-parser.c (c_parser_postfix_expression): Call
602 c_parser_cast_expression rather than c_parser_postfix_expression.
604 2016-03-01 Jakub Jelinek <jakub@redhat.com>
608 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
609 of incomplete decls to error_mark_node.
611 2016-02-24 Marek Polacek <polacek@redhat.com>
614 * c-decl.c (finish_decl): Don't update the copy of the type of a
617 2016-02-23 Jakub Jelinek <jakub@redhat.com>
620 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
621 in id_kind reclassification.
623 2016-02-16 Jakub Jelinek <jakub@redhat.com>
626 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
628 2016-02-16 James Norris <jnorris@codesourcery.com>
631 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
633 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
635 * c-decl.c (build_null_declspecs): Zero the entire struct.
638 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
639 callers changed. If nested_p is true, use it to call
640 finish_implicit_inits.
641 * c-tree.h (finish_implicit_inits): Declare.
642 * c-typeck.c (finish_implicit_inits): New function. Move code
644 (push_init_level): ... here.
645 (set_designator, process_init_element): Call finish_implicit_inits.
647 2016-02-11 Jakub Jelinek <jakub@redhat.com>
650 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
651 arguments for -Waddress warning.
653 2016-02-04 Jakub Jelinek <jakub@redhat.com>
656 * c-decl.c (finish_enum): When honoring mode attribute,
657 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
659 2016-01-29 Jakub Jelinek <jakub@redhat.com>
662 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
663 all type variants, not just TYPE_MAIN_VARIANT.
665 2016-01-27 Jakub Jelinek <jakub@redhat.com>
668 * c-decl.c (c_write_global_declarations_1): Warn with
669 warn_unused_function if static prototype without definition
672 2016-01-27 Marek Polacek <polacek@redhat.com>
675 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
676 to unsigned, if needed. Add -Wsign-compare warning.
678 2016-01-26 Jakub Jelinek <jakub@redhat.com>
680 PR tree-optimization/69483
681 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
683 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
686 * c-tree.h (incomplete_record_decls): Declare.
687 * c-parser.c (incomplete_record_decls): Define.
688 (c_parser_translation_unit): Iterate through incomplete_record_decls and
689 report error if any decl has zero size.
690 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
691 or enum type to incomplete_record_decls.
693 2016-01-14 Tom de Vries <tom@codesourcery.com>
695 PR tree-optimization/68773
696 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
699 2016-01-14 Marek Polacek <polacek@redhat.com>
702 * c-decl.c (grokdeclarator): Provide more information for invalid
705 2016-01-06 David Malcolm <dmalcolm@redhat.com>
707 * c-parser.c (c_parser_unary_expression): For dereferences, build
708 a combined location before calling build_indirect_ref, so that
709 error reports cover the full range, manually updating the c_expr
712 2016-01-06 Marek Polacek <polacek@redhat.com>
715 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
716 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
719 2016-01-04 Jakub Jelinek <jakub@redhat.com>
721 Update copyright years.
723 2016-01-04 Marek Polacek <polacek@redhat.com>
726 * c-typeck.c (build_atomic_assign): Improve commentary. Add
727 optimization to use __atomic_fetch_* built-in if possible.
729 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
731 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
733 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
736 2015-12-22 Marek Polacek <polacek@redhat.com>
739 * c-typeck.c (build_component_ref): Warn when acessing elements of
740 atomic structures or unions.
742 2015-12-21 David Malcolm <dmalcolm@redhat.com>
744 * c-typeck.c: Include "gcc-rich-location.h".
745 (build_binary_op): In the two places that call binary_op_error,
746 create a gcc_rich_location and populate it with the location of
747 the binary op and its two operands.
749 2015-12-16 David Malcolm <dmalcolm@redhat.com>
751 * c-parser.c (c_parser_statement_after_labels): When calling
752 c_finish_return, Use the return expression's location if it has
753 one, falling back to the location of the first token within it.
754 * c-typeck.c (c_finish_return): When issuing warnings about
755 the incorrect presence/absence of a return value, issue a note
756 showing the declaration of the function.
758 2015-12-16 David Malcolm <dmalcolm@redhat.com>
760 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
762 (c_parser_peek_nth_token): New function.
763 (c_parser_peek_conflict_marker): New function.
764 (c_parser_error): Detect conflict markers and report them as such.
766 2015-12-16 David Malcolm <dmalcolm@redhat.com>
768 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
769 to preserve range information for the primary expression
770 in the call to c_parser_postfix_expression_after_primary.
772 2015-12-16 David Malcolm <dmalcolm@redhat.com>
774 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
775 expression location, falling back on the first token location,
776 rather than always using the latter.
778 2015-12-16 Marek Polacek <polacek@redhat.com>
781 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
784 2015-12-15 Marek Polacek <polacek@redhat.com>
787 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
790 2015-12-08 David Malcolm <dmalcolm@redhat.com>
792 * c-parser.c (c_parser_alignof_expression): Capture location of
793 closing parenthesis (if any), or of end of unary expression, and
794 use it to build a src_range for the expression.
796 2015-12-08 David Malcolm <dmalcolm@redhat.com>
799 * c-parser.c (c_parser_get_builtin_args): Add
800 "out_close_paren_loc" param, and write back to it.
801 (c_parser_postfix_expression): Capture the closing
802 parenthesis location for RID_CHOOSE_EXPR,
803 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
804 RID_BUILTIN_SHUFFLE and use it to set the source range
805 for such expressions; within RID_BUILTIN_COMPLEX set
806 the underlying location.
808 2015-12-07 Marek Polacek <polacek@redhat.com>
811 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
812 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
814 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
816 * c-tree.h (c_build_va_arg): Adjust prototype.
817 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
818 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
819 parameter, adjust throughout and issue an error if EXPR is a component
820 with reverse storage order.
822 2015-12-02 Jason Merrill <jason@redhat.com>
824 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
825 (c_fully_fold_internal, decl_constant_value_for_optimization):
826 Move from c-common.c.
827 * c-tree.h: Declare decl_constant_value_for_optimization.
828 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
830 2015-12-02 Joseph Myers <joseph@codesourcery.com>
833 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
834 following link from declarator to next declarator. Track original
835 qualified type and pass it to c_build_qualified_type.
836 * c-typeck.c (c_build_qualified_type): Add arguments
837 orig_qual_type and orig_qual_indirect.
839 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
841 * c-parser.c (c_parser_omp_clause_name)
842 (c_parser_oacc_all_clauses): Alphabetical sorting.
844 2015-12-02 Jakub Jelinek <jakub@redhat.com>
847 * c-decl.c (get_parm_info): Use b->locus instead of input_location
850 2015-12-01 Julian Brown <julian@codesourcery.com>
851 Cesar Philippidis <cesar@codesourcery.com>
852 James Norris <James_Norris@mentor.com>
854 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
855 (c_parser_oacc_clause_use_device): New function.
856 (c_parser_oacc_all_clauses): Add use_device support.
857 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
858 (c_parser_oacc_host_data): New function.
859 (c_parser_omp_construct): Add host_data support.
860 * c-tree.h (c_finish_oacc_host_data): Add prototype.
861 * c-typeck.c (c_finish_oacc_host_data): New function.
862 (c_finish_omp_clauses): Add use_device support.
864 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
867 * c-decl.c: Set TYPE_PACKED in variants.
869 2015-11-27 Martin Liska <mliska@suse.cz>
872 * c-array-notation.c (fix_builtin_array_notation_fn):
873 Use release_vec_vec instead of vec::release.
874 (build_array_notation_expr): Likewise.
875 (fix_conditional_array_notations_1): Likewise.
876 (fix_array_notation_expr): Likewise.
877 (fix_array_notation_call_expr): Likewise.
879 2015-11-27 Jakub Jelinek <jakub@redhat.com>
882 * c-parser.c (c_parser_compound_statement_nostart): If
883 last_label is true, use pragma_stmt instead of pragma_compound
884 as second c_parser_pragma argument.
885 (c_parser_omp_ordered, c_parser_omp_target_update,
886 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
887 false as second argument to c_parser_skip_to_pragma_eol after
888 diagnosing standalone directives used in pragma_stmt context.
890 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
892 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
893 with "if (ENABLE_OFFLOADING)".
895 2015-11-23 David Malcolm <dmalcolm@redhat.com>
898 * c-parser.c (c_parser_postfix_expression): Set up source ranges
899 for various Objective-C constructs: Class.name syntax,
900 @selector(), @protocol(), @encode(), and [] message syntax.
902 2015-11-20 David Malcolm <dmalcolm@redhat.com>
905 * c-typeck.c (should_suggest_deref_p): New function.
906 (build_component_ref): Special-case POINTER_TYPE when
907 generating a "not a structure of union" error message, and
908 suggest a "->" rather than a ".", providing a fix-it hint.
910 2015-11-19 David Malcolm <dmalcolm@redhat.com>
912 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
913 candidate into a new function, find_closest_identifier.
915 2015-11-19 Marek Polacek <polacek@redhat.com>
918 * c-typeck.c (parser_build_binary_op): Properly handle
919 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
921 2015-11-17 David Malcolm <dmalcolm@redhat.com>
923 * c-parser.c (set_c_expr_source_range): Bulletproof both
924 overloaded implementations against NULL expr->value.
925 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
927 (c_parser_unary_expression): Likewise when handling addresses of
929 (c_parser_postfix_expression): Likewise for statement expressions,
930 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
931 __builtin_va_arg, and for __builtin_offset_of.
932 (c_parser_postfix_expression_after_paren_type): Initialize expr's
933 src_range using the range of the braced initializer.
934 (c_parser_transaction_expression): Set src_range for "ret" to a
937 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
939 * c-parser.c (c_finish_omp_declare_simd): Look for
940 "simd" attribute as well. Update error message.
942 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
944 * c-parser.c (c_parser_omp_declare_target): Adjust.
946 2015-11-14 Jakub Jelinek <jakub@redhat.com>
948 * c-typeck.c (c_finish_omp_clauses): Don't mark
949 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
951 2015-11-14 Marek Polacek <polacek@redhat.com>
953 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
954 * c-typeck.c: Likewise.
956 2015-11-13 David Malcolm <dmalcolm@redhat.com>
958 * c-decl.c (warn_defaults_to): Pass line_table to
960 * c-errors.c (pedwarn_c99): Likewise.
961 (pedwarn_c90): Likewise.
962 * c-parser.c (set_c_expr_source_range): New functions.
963 (c_token::get_range): New method.
964 (c_token::get_finish): New method.
965 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
966 based on the range from the start of the LHS to the end of the
968 (c_parser_conditional_expression): Likewise, based on the range
969 from the start of the cond.value to the end of exp2.value.
970 (c_parser_binary_expression): Call set_c_expr_source_range on
971 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
972 (c_parser_cast_expression): Call set_c_expr_source_range on ret
973 based on the cast_loc through to the end of the expr.
974 (c_parser_unary_expression): Likewise, based on the
975 op_loc through to the end of op.
976 (c_parser_sizeof_expression) Likewise, based on the start of the
977 sizeof token through to either the closing paren or the end of
979 (c_parser_postfix_expression): Likewise, using the token range,
980 or from the open paren through to the close paren for
981 parenthesized expressions.
982 (c_parser_postfix_expression_after_primary): Likewise, for
983 various kinds of expression.
984 * c-tree.h (struct c_expr): Add field "src_range".
985 (c_expr::get_start): New method.
986 (c_expr::get_finish): New method.
987 (set_c_expr_source_range): New decls.
988 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
989 on ret for prefix unary ops.
990 (parser_build_binary_op): Likewise, running from the start of
991 arg1.value through to the end of arg2.value.
993 2015-11-13 Marek Polacek <polacek@redhat.com>
996 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
998 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1000 * c-typeck.c: Include spellcheck.h.
1001 (lookup_field_fuzzy_find_candidates): New function.
1002 (lookup_field_fuzzy): New function.
1003 (build_component_ref): If the field was not found, try using
1004 lookup_field_fuzzy and potentially offer a suggestion.
1006 2015-11-12 James Norris <jnorris@codesourcery.com>
1007 Joseph Myers <joseph@codesourcery.com>
1009 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1010 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1011 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1012 and PRAGMA_OMP_CLAUSE_LINK.
1013 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1014 and PRAGMA_OACC_CLAUSE_LINK.
1015 (OACC_DECLARE_CLAUSE_MASK): New definition.
1016 (c_parser_oacc_declare): New function.
1018 2015-11-12 Marek Polacek <polacek@redhat.com>
1021 * c-parser.c (c_parser_for_statement): Reclassify the token in
1024 2015-11-11 Marek Polacek <polacek@redhat.com>
1028 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1029 checking the size of an array.
1031 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
1033 * c-array-notation.c: Remove unused header files.
1034 * c-aux-info.c: Likewise.
1035 * c-convert.c: Likewise.
1036 * c-decl.c: Likewise.
1037 * c-errors.c: Likewise.
1038 * c-lang.c: Likewise.
1039 * c-objc-common.c: Likewise.
1040 * c-parser.c: Likewise.
1041 * c-typeck.c: Likewise.
1042 * gccspec.c: Likewise.
1044 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1045 Cesar Philippidis <cesar@codesourcery.com>
1046 James Norris <jnorris@codesourcery.com>
1047 Julian Brown <julian@codesourcery.com>
1048 Nathan Sidwell <nathan@codesourcery.com>
1051 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1053 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1054 (c_parser_pragma): Parse 'acc routine'.
1055 (OACC_ROUTINE_CLAUSE_MARK): Define.
1056 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1058 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1061 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1062 location of the backward-goto to the start of the loop body.
1064 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1067 * c-parser.c (c_parser_while_statement): Finish the loop before
1068 parsing ahead for misleading indentation.
1069 (c_parser_for_statement): Likewise.
1071 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1073 * c-decl.c (finish_struct): If the structure has reverse storage
1074 order, rewrite the type of array fields with scalar component. Call
1075 maybe_apply_pragma_scalar_storage_order on entry.
1076 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1077 errors on bit-fields and reverse SSO here and not...
1078 (c_mark_addressable): ...here.
1079 (output_init_element): Adjust call to initializer_constant_valid_p.
1080 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1082 2015-11-06 David Malcolm <dmalcolm@redhat.com>
1084 * c-decl.c (warn_defaults_to): Update for change in signature
1085 of diagnostic_set_info.
1086 * c-errors.c (pedwarn_c99): Likewise.
1087 (pedwarn_c90): Likewise.
1088 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1089 for textinfo::set_location.
1091 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1092 Thomas Schwinge <thomas@codesourcery.com>
1093 James Norris <jnorris@codesourcery.com>
1095 * c-parser.c (c_parser_omp_clause_name): Add support for
1096 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1097 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1098 default(none) in OpenACC.
1099 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1101 (c_parser_oacc_clause_tile): New function.
1102 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1103 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1104 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1106 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1107 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1109 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1110 (c_parser_oacc_update): Update the error message for missing clauses.
1111 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1112 and OMP_CLAUSE_INDEPENDENT.
1114 2015-11-05 Marek Polacek <polacek@redhat.com>
1117 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1118 deal with pre-evaluation on invalid types.
1120 2015-11-05 Jakub Jelinek <jakub@redhat.com>
1121 Ilya Verbin <ilya.verbin@intel.com>
1123 * c-parser.c: Include context.h and gimple-expr.h.
1124 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1125 monotonic together with nonmonotonic.
1126 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1127 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1128 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1129 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1130 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1131 expressions on combined target teams before the target.
1132 (c_parser_omp_declare_target): If decl has "omp declare target" or
1133 "omp declare target link" attribute, and cgraph or varpool node already
1134 exists, then set corresponding flags. Call c_finish_omp_clauses
1135 in the parenthesized extended-list syntax case.
1136 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1138 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1139 on OMP_CLAUSE_REDUCTION array sections.
1140 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1141 into the constant offset, or for variable low-bound using
1142 POINTER_PLUS_EXPR. For structure element based array sections use
1143 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1144 (c_finish_omp_clauses): Drop generic_field_head, structure
1145 elements are now always mapped even as array section bases,
1146 diagnose same var in data sharing and mapping clauses. Diagnose if
1147 linear step on declare simd is neither a constant nor a uniform
1148 parameter. Look through POINTER_PLUS_EXPR for array section
1149 reductions. Diagnose the same var or function appearing multiple
1150 times on the same directive. Fix up wording for the to clause if t
1151 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1152 modifier on kinds other than dynamic or guided or nonmonotonic
1153 modifier together with ordered clause.
1155 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1156 Chung-Lin Tang <cltang@codesourcery.com>
1158 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1160 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
1162 * c-array-notation.c: Reorder #include's and remove duplicates.
1163 * c-aux-info.c: Likewise.
1164 * c-convert.c: Likewise.
1165 * c-decl.c: Likewise.
1166 * c-errors.c: Likewise.
1167 * c-lang.c: Likewise.
1168 * c-objc-common.c: Likewise.
1169 * c-parser.c: Likewise.
1170 * c-typeck.c: Likewise.
1172 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
1175 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1176 after calling build_qualified_type.
1178 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1179 Thomas Schwinge <thomas@codesourcery.com>
1180 James Norris <jnorris@codesourcery.com>
1181 Joseph Myers <joseph@codesourcery.com>
1182 Julian Brown <julian@codesourcery.com>
1183 Bernd Schmidt <bschmidt@redhat.com>
1185 * c-parser.c (c_parser_oacc_shape_clause): New.
1186 (c_parser_oacc_simple_clause): New.
1187 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1188 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1190 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1191 James Norris <jnorris@codesourcery.com>
1192 Cesar Philippidis <cesar@codesourcery.com>
1196 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1197 parameters, and handle these. Adjust all users.
1198 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1200 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1202 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1204 (c_finish_omp_construct): Declare function.
1205 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1206 Merge functions into...
1207 (c_finish_omp_construct): ... this new function.
1209 2015-10-22 Richard Biener <rguenther@suse.de>
1211 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1212 before folding a MINUS_EXPR.
1214 2015-10-21 Marek Polacek <polacek@redhat.com>
1217 * c-decl.c (start_function): Warn about vararg functions without
1220 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1222 * c-typeck.c (build_conditional_expr): Use boolean vector
1223 type for vector comparison.
1224 (build_vec_cmp): New.
1225 (build_binary_op): Use build_vec_cmp for comparison.
1227 2015-10-20 Marek Polacek <polacek@redhat.com>
1229 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1231 2015-10-20 Marek Polacek <polacek@redhat.com>
1234 * c-parser.c (c_parser_attributes): Break out of the loop if the
1235 token after an attribute isn't a comma.
1237 2015-10-13 Jakub Jelinek <jakub@redhat.com>
1238 Aldy Hernandez <aldyh@redhat.com>
1240 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1241 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1242 (c_parser_omp_variable_list): Handle structure elements for
1243 map, to and from clauses. Handle array sections in reduction
1244 clause. Formatting fixes.
1245 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1246 if clause modifiers.
1247 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1248 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1249 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1250 c_parser_omp_clause_is_device_ptr): New functions.
1251 (c_parser_omp_clause_ordered): Parse optional parameter.
1252 (c_parser_omp_clause_reduction): Handle array reductions.
1253 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1254 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1256 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1257 (c_parser_omp_clause_depend_sink): New function.
1258 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1259 (c_parser_omp_clause_map): Parse release/delete map kinds and
1260 optional always modifier.
1261 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1262 and c_finish_omp_clauses callers.
1263 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1264 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1265 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1266 (OMP_CRITICAL_CLAUSE_MASK): Define.
1267 (c_parser_omp_critical): Parse critical clauses.
1268 (c_parser_omp_for_loop): Handle doacross loops, adjust
1269 c_finish_omp_for and c_finish_omp_clauses callers.
1270 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1271 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1272 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1273 (c_parser_omp_for): Disallow ordered clause when combined with
1274 distribute. Disallow linear clause when combined with distribute
1275 and not combined with simd.
1276 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1277 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1278 parse clauses and if depend clause is found, don't parse a body.
1279 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1280 Allow target parallel without for after it.
1281 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1282 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1283 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1285 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1286 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1287 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1288 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1290 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1291 defaultmap and is_device_ptr clauses.
1292 (c_parser_omp_target): Parse target parallel and target simd. Set
1293 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1294 and target exit data. Diagnose invalid map kinds.
1295 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1296 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1298 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1300 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1301 (c_parser_omp_taskloop): New function.
1302 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1303 handle PRAGMA_OMP_TASKLOOP.
1304 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1305 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1306 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1307 Add IS_OMP argument, handle structure element bases, diagnose
1308 bitfields, pass IS_OMP recursively, diagnose known zero length
1309 array sections in depend clauses, handle array sections in reduction
1310 clause, diagnose negative length even for pointers.
1311 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1312 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1313 array sections in reduction clause, set
1314 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1315 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1316 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1317 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1319 2015-10-06 Marek Polacek <polacek@redhat.com>
1321 * c-parser.c (c_parser_statement_after_labels): Use
1322 protected_set_expr_location.
1323 (c_parser_omp_clause_num_gangs): Likewise.
1324 (c_parser_omp_clause_num_threads): Likewise.
1325 (c_parser_omp_clause_num_workers): Likewise.
1326 (c_parser_omp_clause_vector_length): Likewise.
1327 (c_parser_omp_clause_num_teams): Likewise.
1328 (c_parser_omp_clause_thread_limit): Likewise.
1329 * c-typeck.c (build_c_cast): Likewise.
1330 (c_cast_expr): Likewise.
1332 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1334 * c-typeck.c (c_tree_equal): Use real_equal instead of
1337 2015-10-04 Jason Merrill <jason@redhat.com>
1339 * c-parser.c (c_lex_one_token): Handle @synchronized.
1340 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1341 can change whether the function is transaction_safe.
1343 2015-10-02 Marek Polacek <polacek@redhat.com>
1346 * c-typeck.c (convert_for_assignment): Use the expansion point
1347 location throughout.
1349 2015-10-02 Marek Polacek <polacek@redhat.com>
1352 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1353 and pass it down to c_parser_if_statement.
1354 (c_parser_else_body): Add CHAIN parameter and pass it down to
1355 c_parser_statement_after_labels.
1356 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1357 duplicated if-else-if conditions.
1359 2015-10-01 Marek Polacek <polacek@redhat.com>
1361 * c-typeck.c (convert_for_assignment): Improve commentary.
1363 2015-09-30 Marek Polacek <polacek@redhat.com>
1366 * c-typeck.c (c_finish_return): Use the expansion point location for
1367 certain "return with value" warnings.
1369 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1371 * c-parser.c (pragma_lex): Add loc argument.
1373 2015-09-15 Marek Polacek <polacek@redhat.com>
1376 * c-decl.c (tag_exists_p): New function.
1377 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1378 struct/union/enum keywords are missing.
1379 * c-tree.h (tag_exists_p): Declare.
1381 2015-09-15 Marek Polacek <polacek@redhat.com>
1383 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1384 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1385 Return NULL_TREE instead of 0.
1386 (lookup_name): Return NULL_TREE instead of 0.
1387 (lookup_name_in_scope): Likewise.
1388 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1389 (parser_xref_tag): Use false instead of 0.
1390 (start_struct): Use true instead of 1.
1391 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1393 2015-09-14 Marek Polacek <polacek@redhat.com>
1395 * c-typeck.c (set_nonincremental_init_from_string): Use
1396 HOST_WIDE_INT_M1U when shifting a negative value.
1398 2015-09-09 Mark Wielaard <mjw@redhat.com>
1400 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1403 2015-09-10 Jakub Jelinek <jakub@redhat.com>
1406 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1407 into OMP_FOR_PRE_BODY rather than before the loop.
1409 2015-09-09 Jakub Jelinek <jakub@redhat.com>
1412 * c-parser.c (c_parser_oacc_all_clauses,
1413 c_parser_omp_all_clauses): Remove invalid clause from
1414 list of clauses even if parser->error is set.
1417 * c-parser.c (c_parser_omp_clause_aligned,
1418 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1420 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1424 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1425 instead of c_parser_unary_expression. If the result is !lvalue_p,
1426 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1428 2015-09-04 Marek Polacek <polacek@redhat.com>
1431 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1433 2015-09-03 Martin Sebor <msebor@redhat.com>
1436 * c-typeck.c (convert_arguments, parser_build_unary_op,
1437 build_conditional_expr, c_cast_expr, convert_for_assignment,
1438 build_binary_op, _objc_common_truthvalue_conversion): Call
1440 (c_decl_implicit): Define.
1442 2015-09-02 Marek Polacek <polacek@redhat.com>
1445 * c-parser.c (c_parser_enum_specifier): Give a better error for
1448 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1450 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1452 2015-08-12 Marek Polacek <polacek@redhat.com>
1454 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1457 2015-08-03 Marek Polacek <polacek@redhat.com>
1460 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1462 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1464 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1466 * c-parser.c (c_parser_if_body): Take token_indent_info
1467 argument. Call warn_for_misleading_indentation even when the
1468 body is a semicolon. Extract token_indent_infos corresponding
1469 to the guard, body and next tokens. Adjust call to
1470 warn_for_misleading_indentation accordingly.
1471 (c_parser_else_body): Likewise.
1472 (c_parser_if_statement): Likewise.
1473 (c_parser_while_statement): Likewise.
1474 (c_parser_for_statement): Likewise.
1476 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1477 Manuel López-Ibáñez <manu@gcc.gnu.org>
1479 * c-decl.c (get_parm_info): Remove static var. Update warning
1482 2015-07-27 Marek Polacek <polacek@redhat.com>
1486 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1488 2015-07-20 Marek Polacek <polacek@redhat.com>
1491 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1492 (build_binary_op): Warn about left shift overflows.
1494 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1496 * c-array-notation.c: Adjust includes for flags.h changes.
1497 * c-objc-common.c: Likewise.
1499 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1501 * c-array-notation.c: Adjust includes.
1502 * c-aux-info.c: Likewise.
1503 * c-convert.c: Likewise.
1504 * c-decl.c: Likewise.
1505 * c-errors.c: Likewise.
1506 * c-lang.c: Likewise.
1507 * c-objc-common.c: Likewise.
1508 * c-parser.c: Likewise.
1509 * c-typeck.c: Likewise.
1511 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1514 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1516 2015-06-29 Marek Polacek <polacek@redhat.com>
1519 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1520 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1521 about -Wswitch-bool here.
1522 (do_case): Update c_add_case_label call.
1523 (c_finish_case): Update c_do_switch_warnings call.
1525 2015-06-27 Marek Polacek <polacek@redhat.com>
1527 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1529 2015-06-26 Marek Polacek <polacek@redhat.com>
1531 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1533 * c-typeck.c (array_to_pointer_conversion): Likewise.
1534 (build_unary_op): Likewise.
1535 (c_finish_return): Likewise.
1537 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1539 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1540 * c-parser.c: Likewise.
1542 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1544 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1545 instead of pointer_hash.
1546 (detect_field_duplicates): Likewise.
1548 2015-06-25 Marek Polacek <polacek@redhat.com>
1550 * c-array-notation.c: Use VAR_P throughout.
1551 * c-decl.c: Likewise.
1552 * c-objc-common.c: Likewise.
1553 * c-parser.c: Likewise.
1554 * c-typeck.c: Likewise.
1556 2015-06-25 Marek Polacek <polacek@redhat.com>
1558 * c-decl.c: Use is_global_var throughout.
1559 * c-parser.c: Likewise.
1560 * c-typeck.c: Likewise.
1562 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1564 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1565 * c-aux-info.c: Likewise.
1566 * c-convert.c: Likewise.
1567 * c-decl.c: Likewise.
1568 * c-errors.c: Likewise.
1569 * c-lang.c: Likewise.
1570 * c-objc-common.c: Likewise.
1571 * c-parser.c: Likewise.
1572 * c-typeck.c: Likewise.
1574 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
1577 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1580 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1582 * c-decl.c (pop_scope): Register the main translation unit
1583 through the new debug hook.
1585 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1587 * c-array-notation.c : Adjust include files.
1588 * c-aux-info.c : Likewise.
1589 * c-convert.c : Likewise.
1590 * c-decl.c : Likewise.
1591 * c-errors.c : Likewise.
1592 * c-lang.c : Likewise.
1593 * c-lang.h : Likewise.
1594 * c-objc-common.c : Likewise.
1595 * c-parser.c : Likewise.
1596 * c-typeck.c : Likewise.
1598 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1600 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1601 immediately clobber it.
1602 (c_write_global_declarations_1): Remove call to
1603 check_global_declaration_1.
1604 (c_write_global_declarations_2): Remove.
1605 (c_write_final_cleanups): Rename from c_write_global_declarations.
1606 Remove call to finalize_compilation_unit.
1607 Remove calls to debugging hooks.
1608 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1609 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1610 * c-tree.h: Remove c_write_global_declarations.
1612 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1614 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1615 * c-aux-info.c: Likewise.
1616 * c-convert.c: Likewise.
1617 * c-decl.c: Likewise.
1618 * c-errors.c: Likewise.
1619 * c-lang.c: Likewise.
1620 * c-objc-common.c: Likewise.
1621 * c-parser.c: Likewise.
1622 * c-typeck.c: Likewise.
1624 2015-06-04 Marek Polacek <polacek@redhat.com>
1627 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1630 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1632 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1633 Warn for empty struct.
1634 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1636 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1638 * c-decl.c (start_function): Call plugin before parsing.
1639 (finish_function): Call plugin after parsing.
1641 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1644 * c-decl.c (merge_decls): Merge DECL_COMMON.
1646 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1648 * Make-lang.in (check_gcc_pallelize): Define.
1650 2015-05-22 Marek Polacek <polacek@redhat.com>
1653 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1656 2015-05-21 Marek Polacek <polacek@redhat.com>
1658 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1661 2015-05-20 Marek Polacek <polacek@redhat.com>
1663 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1664 * c-typeck.c: Likewise.
1666 2015-05-19 Marek Polacek <polacek@redhat.com>
1668 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1670 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1673 * c-parser.c (c_parser_omp_for_loop): Don't add
1674 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1675 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1676 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1679 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1681 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
1684 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1687 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1690 2015-05-14 Marek Polacek <polacek@redhat.com>
1694 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1697 2015-05-12 David Malcolm <dmalcolm@redhat.com>
1699 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1700 to add a call to warn_for_misleading_indentation.
1701 (c_parser_else_body): Likewise, adding param "else_loc".
1702 (c_parser_if_statement): Check for misleading indentation.
1703 (c_parser_while_statement): Likewise.
1704 (c_parser_for_statement): Likewise.
1706 2015-05-08 Marek Polacek <polacek@redhat.com>
1709 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1710 (output_init_element): Likewise.
1712 2015-05-07 Marek Polacek <polacek@redhat.com>
1715 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1718 2015-04-30 Marek Polacek <polacek@redhat.com>
1720 * c-typeck.c (set_init_label): Call error_at instead of error and
1723 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1726 * c-typeck.c (c_build_va_arg): Clarify the error message.
1728 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1730 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1731 OMP_STANDALONE_CLAUSES.
1733 2015-04-28 Marek Polacek <polacek@redhat.com>
1735 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1737 2015-04-28 Marek Polacek <polacek@redhat.com>
1740 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1742 2015-04-25 Marek Polacek <polacek@redhat.com>
1745 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1748 2015-04-23 Marek Polacek <polacek@redhat.com>
1751 * c-decl.c (set_labels_context_r): New function.
1752 (store_parm_decls): Call it via walk_tree_without_duplicates.
1753 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1754 instead of create_tmp_var. Build TARGET_EXPR instead of
1756 (build_atomic_assign): Use create_tmp_var_raw instead of
1757 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1759 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1761 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1762 (c_parser_omp_target_update): Add missed %> to error_at ().
1764 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1767 * c-decl.c (c_default_pointer_mode): Remove definition.
1768 * c-tree.h (c_default_pointer_mode): Remove declaration.
1770 2015-03-27 Tobias Burnus <burnus@net-b.de>
1773 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1775 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1776 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1777 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1779 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1781 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1782 attribute for DECL_EXTERNAL VAR_DECLs.
1784 2015-03-11 Jakub Jelinek <jakub@redhat.com>
1786 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1789 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1792 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1793 before preparing arguments to warn_logical_not_parentheses.
1795 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1798 * c-typeck.c (parser_build_binary_op): Don't warn for
1799 !!x == y or !b == y where b is _Bool.
1801 2015-03-09 Marek Polacek <polacek@redhat.com>
1803 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1804 * c-decl.c (grokdeclarator): Likewise.
1805 * c-typeck.c (build_binary_op): Likewise.
1807 2015-02-27 Marek Polacek <polacek@redhat.com>
1810 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1812 2015-02-14 Marek Polacek <polacek@redhat.com>
1815 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1816 declared through a typedef name.
1818 2015-02-13 Marek Polacek <polacek@redhat.com>
1821 * c-decl.c (grokdeclarator): Print also the type when giving
1822 the error message about array's incomplete element type.
1824 2015-02-11 Jakub Jelinek <jakub@redhat.com>
1827 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1828 check in the POP macro.
1830 2015-02-09 Marek Polacek <polacek@redhat.com>
1833 * c-typeck.c (process_init_element): Don't always wrap
1834 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1835 initializing a range of elements.
1837 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1841 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1843 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
1845 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1846 processing enum declaration.
1848 2015-01-29 Marek Polacek <polacek@redhat.com>
1851 * c-typeck.c (pop_init_level): If constructor_elements has
1852 exactly one element with integer_zerop value, set constructor_zeroinit
1853 to 1. Remove braces around warning_init call.
1855 2015-01-27 Jakub Jelinek <jakub@redhat.com>
1858 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1859 of FUNCTION_DECLs with error_mark_node.
1861 2015-01-26 Jakub Jelinek <jakub@redhat.com>
1864 * c-typeck.c (convert_arguments): Return -1 if there are
1865 error_args, even if we've diagnosed too many arguments.
1867 2015-01-21 Richard Biener <rguenther@suse.de>
1870 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1871 for builtins the user declared correctly.
1873 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1874 Bernd Schmidt <bernds@codesourcery.com>
1875 Cesar Philippidis <cesar@codesourcery.com>
1876 James Norris <jnorris@codesourcery.com>
1877 Jakub Jelinek <jakub@redhat.com>
1878 Ilmir Usmanov <i.usmanov@samsung.com>
1880 * c-parser.c: Include "gomp-constants.h".
1881 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1882 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1883 Use OMP_CLAUSE_SET_MAP_KIND.
1884 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1885 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1886 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1887 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1888 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1889 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1890 "copyout", "create", "delete", "deviceptr", "gang", "host",
1891 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1892 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1893 "present_or_create", "pcreate", "seq", "self", "vector",
1894 "vector_length", "wait", "worker".
1895 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1896 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1897 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1898 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1899 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1900 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1901 (c_parser_oacc_data_clause_deviceptr)
1902 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1903 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1904 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1905 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1906 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1907 (c_parser_oacc_parallel, c_parser_oacc_update)
1908 (c_parser_oacc_wait): New functions.
1909 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1910 (c_finish_oacc_data): New prototypes.
1911 * c-typeck.c: Include "gomp-constants.h".
1912 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1913 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1914 OMP_CLAUSE_SET_MAP_KIND.
1915 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1916 (c_finish_oacc_data): New functions.
1917 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1918 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1919 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1920 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1921 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1922 GOMP_MAP_FORCE_DEVICEPTR.
1924 2015-01-09 Michael Collison <michael.collison@linaro.org>
1926 * c-array-notation.c: Include hash-set.h, machmode.h,
1927 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1928 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1929 * c-aux-info.c: Ditto.
1930 * c-convert.c: Ditto.
1932 * c-errors.c: Ditto.
1933 * c-lang.c: Dittoxs.
1934 * c-objc-common.c: Ditto.
1935 * c-parser.c: Ditto.
1936 * c-typeck.c: Include hash-set.h, machmode.h,
1937 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1938 fold-const.h, wide-int.h, inchash.h, real.h and
1939 fixed-value.h due to flattening of tree.h.
1941 2015-01-07 Marek Polacek <polacek@redhat.com>
1944 * c-typeck.c (process_init_element): Disallow initialization of
1945 a flexible array member with a string constant if the structure
1948 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1951 * c-typeck.c (convert_for_assignment, c_finish_return): For
1952 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1953 types also set in_late_binary_op around convert call.
1954 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1955 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1956 result on expr as last argument to ubsan_instrument_float_cast,
1957 if in_late_binary_op, don't use c_save_expr but save_expr.
1959 Update copyright years.
1961 2015-01-05 Marek Polacek <polacek@redhat.com>
1964 * c-typeck.c (build_array_ref): Pass loc down to
1965 warn_array_subscript_with_type_char.
1967 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1969 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1970 (common-pointer-type): For pointers to arrays take qualifiers from
1972 (build_conditional_expr): Add warnings for lost qualifiers.
1973 (comp-target-types): Allow pointers to arrays with different qualifiers.
1974 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1975 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1976 to PEDWARN_FOR_QUALIFIERS.
1978 2014-12-17 Jakub Jelinek <jakub@redhat.com>
1981 * c-convert.c: Include ubsan.h.
1982 (convert): For real -> integral casts and
1983 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1984 instead instrument the float cast directly.
1986 2014-11-29 Jakub Jelinek <jakub@redhat.com>
1988 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1989 c_finish_stmt_expr): Remove NULL last argument from
1990 create_tmp_var_raw and create_tmp_var calls.
1991 * c-array-notation.c (fix_builtin_array_notation_fn,
1992 build_array_notation_expr, fix_conditional_array_notations_1,
1993 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1995 2014-11-28 Marek Polacek <polacek@redhat.com>
1998 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1999 convert the right operand to integer type.
2001 2014-11-25 Marek Polacek <polacek@redhat.com>
2004 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2005 for inline functions.
2007 2014-11-21 Jakub Jelinek <jakub@redhat.com>
2010 * c-typeck.c (build_array_ref): Adjust
2011 convert_vector_to_pointer_for_subscript caller. If it returns true,
2012 call non_lvalue_loc on the result.
2014 2014-11-11 Richard Biener <rguenther@suse.de>
2016 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2019 2014-11-10 Andi Kleen <ak@linux.intel.com>
2022 * c-parser.c (c_parser_statement_after_labels): Call
2024 (c_parser_if_statement): Dito.
2025 (c_parser_switch_statement): Dito.
2026 (c_parser_while_statement): Dito.
2027 (c_parser_do_statement): Dito.
2028 (c_parser_for_statement): Dito.
2029 * c-typeck.c (c_finish_loop): Dito.
2031 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2033 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2034 OPT_Wshift_count_overflow in the warnings.
2036 2014-10-30 Marek Polacek <polacek@redhat.com>
2038 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2039 print the stripped version as well, if they're not the same.
2041 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2043 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2046 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
2048 * c-decl.c: Adjust include files.
2049 * c-parser.c: Ditto.
2051 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2052 Tom Tromey <tromey@redhat.com>
2054 * c-tree.h (enum c_oracle_request): New.
2055 (c_binding_oracle_function): New typedef.
2056 (c_binding_oracle, c_pushtag, c_bind): Declare.
2057 * c-decl.c (c_binding_oracle): New global.
2058 (I_SYMBOL_CHECKED): New macro.
2059 (i_symbol_binding): New function.
2060 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2061 (I_TAG_CHECKED): New macro.
2062 (i_tag_binding): New function.
2063 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2064 (I_LABEL_CHECKED): New macro.
2065 (i_label_binding): New function.
2066 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2067 (c_print_identifier): Save and restore c_binding_oracle.
2068 (c_pushtag, c_bind): New functions.
2070 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
2072 * c-typeck.c: Adjust include files.
2074 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2077 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2078 initialization here...
2079 (c_initialize_diagnostics): ... but here. Set defaults after
2080 building pretty-printer.
2082 2014-10-23 Marek Polacek <polacek@redhat.com>
2085 * c-decl.c (pop_scope): Don't print warning in external_scope.
2087 2014-10-19 Marek Polacek <polacek@redhat.com>
2090 * c-typeck.c (output_init_element): Allow initializing objects with
2091 static storage duration with compound literals even in C99 and add
2094 2014-10-17 Marek Polacek <polacek@redhat.com>
2097 * c-typeck.c (digest_init): Allow initializing objects with static
2098 storage duration with compound literals even in C99 and add pedwarn
2101 2014-10-17 Marek Polacek <polacek@redhat.com>
2104 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2105 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2106 error multiple times. Print the type.
2108 2014-10-17 Marek Polacek <polacek@redhat.com>
2111 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2114 2014-10-17 Marek Polacek <polacek@redhat.com>
2116 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2117 (start_function): Use OPT_Wimplicit_int instead of 0.
2118 (store_parm_decls_oldstyle): Likewise.
2120 2014-10-17 Alan Modra <amodra@gmail.com>
2123 * c-decl.c (merge_decls): Don't merge section name or tls model
2124 to newdecl symtab node, instead merge to olddecl. Override
2125 existing olddecl section name. Set tls_model for all thread-local
2126 vars, not just OMP thread-private ones. Remove incorrect comment.
2128 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
2130 * c-decl.c: Adjust include files.
2132 2014-10-14 DJ Delorie <dj@redhat.com>
2134 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2135 (c_token_starts_typename): Check all __intN, not just __int128.
2136 (c_token_starts_declspecs): Likewise.
2137 (c_parser_declspecs): Likewise.
2138 (c_parser_attribute_any_word): Likewise.
2139 (c_parser_objc_selector): Likewise.
2140 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2141 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2143 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2145 (finish_declspecs): Likewise.
2147 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2149 * c-parser.c (c_parser_all_labels): New function to replace
2151 (c_parser_statement): Call the new function.
2153 2014-10-09 Marek Polacek <polacek@redhat.com>
2156 * c-typeck.c (pop_init_level): Don't warn about initializing
2159 2014-10-07 Marek Polacek <polacek@redhat.com>
2162 * c-decl.c (header_for_builtin_fn): New function.
2163 (implicitly_declare): Suggest which header to include.
2165 2014-10-07 Marek Polacek <polacek@redhat.com>
2167 * c-convert.c (convert): Use error_operand_p.
2168 * c-typeck.c (require_complete_type): Likewise.
2169 (really_atomic_lvalue): Likewise.
2170 (digest_init): Likewise.
2171 (handle_omp_array_sections_1): Likewise.
2173 2014-10-03 Marek Polacek <polacek@redhat.com>
2176 * c-decl.c (pop_scope): Don't warn about "inline function declared
2177 but never defined" for functions marked with gnu_inline attribute.
2179 2014-09-25 Jakub Jelinek <jakub@redhat.com>
2182 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2183 on low_bound and length.
2185 2014-09-24 Marek Polacek <polacek@redhat.com>
2189 * c-parser.c: Don't define CPP_KEYWORD.
2190 (c_parser_switch_statement): Pass original type to c_finish_case.
2191 * c-tree.h (c_finish_case): Update declaration.
2192 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2193 conditionally to c_do_switch_warnings.
2195 2014-09-03 Marek Polacek <polacek@redhat.com>
2198 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2201 2014-09-02 Jakub Jelinek <jakub@redhat.com>
2202 Balaji V. Iyer <balaji.v.iyer@intel.com>
2203 Igor Zamyatin <igor.zamyatin@intel.com>
2205 * c-parser.c (c_parser_cilk_for): New function.
2206 (c_parser_cilk_grainsize): Likewise.
2207 (c_get_temp_regvar): Likewise.
2208 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2209 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2210 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2211 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2214 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2216 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2217 with using HOST_WIDE_INT without truncation to 'int'
2219 2014-08-22 Marek Polacek <polacek@redhat.com>
2222 * c-typeck.c (parser_build_binary_op): Adjust call to
2223 warn_logical_not_parentheses.
2225 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2228 * c-parser.c (c_parser_array_notation): Check for correct
2229 type of an array added.
2231 2014-08-19 Marek Polacek <polacek@redhat.com>
2234 * c-typeck.c (build_binary_op): If either operand of a comparison
2235 is a boolean expression, call maybe_warn_bool_compare.
2237 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2240 * c-typeck.c (build_c_cast): Do a conversion even when the
2241 TYPE_MAIN_VARIANTs are the same.
2243 2014-08-19 Marek Polacek <polacek@redhat.com>
2245 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2246 pedwarn_c99 instead of pedwarn.
2247 (grokfield): Likewise.
2248 (warn_defaults_to): New function.
2249 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2250 Unconditionally call pedwarn_c99 instead of pedwarn.
2251 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2252 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2253 check flag_isoc11 before.
2254 * c-errors.c (pedwarn_c99): Change the return type to bool.
2255 Handle -Wc99-c11-compat.
2256 * c-parser.c (disable_extension_diagnostics): Handle
2257 warn_c99_c11_compat.
2258 (restore_extension_diagnostics): Likewise.
2259 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2260 instead of pedwarn, don't check flag_isoc11 before.
2261 (c_parser_declspecs): Likewise.
2262 (c_parser_alignas_specifier): Likewise.
2263 (c_parser_alignof_expression): Likewise.
2264 (c_parser_generic_selection): Likewise.
2265 * c-tree.h (pedwarn_c99): Update declaration.
2266 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2269 2014-08-19 Marek Polacek <polacek@redhat.com>
2271 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2273 * c-errors.c: Include "opts.h".
2274 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2275 * c-parser.c (disable_extension_diagnostics): Handle negative value
2276 of warn_c90_c99_compat, too.
2277 (restore_extension_diagnostics): Likewise.
2278 (c_parser_compound_statement_nostart): Pass
2279 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2281 2014-08-12 Marek Polacek <polacek@redhat.com>
2283 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2285 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2287 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2289 2014-08-10 Marek Polacek <polacek@redhat.com>
2292 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2293 Call pedwarn_c90 instead of pedwarn.
2294 (check_bitfield_type_and_width): Likewise.
2295 (declspecs_add_qual): Likewise.
2296 (declspecs_add_type): Likewise.
2297 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2298 Adjust to only call pedwarn_c90.
2299 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2300 pedwarn_c90 instead of pedwarn.
2301 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2302 * c-parser.c (disable_extension_diagnostics): Handle
2303 warn_c90_c99_compat.
2304 (restore_extension_diagnostics): Likewise.
2305 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2306 pedwarn_c90 instead of pedwarn.
2307 (c_parser_initelt): Likewise.
2308 (c_parser_postfix_expression): Likewise.
2309 (c_parser_postfix_expression_after_paren_type): Likewise.
2310 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2311 * c-tree.h: Fix formatting.
2312 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2313 pedwarn_c90 instead of pedwarn.
2315 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2317 * c-typeck.c: Remove include of pointer-set.h.
2319 2014-08-07 Marek Polacek <polacek@redhat.com>
2321 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2323 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2325 * c-typeck.c: Use hash_map instead of pointer_map.
2327 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2329 * c-decl.c: Use hash_set instead of pointer_set.
2331 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2334 * c-array-notation.c (expand_array_notations): Handling
2337 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
2340 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2343 2014-07-30 Tom Tromey <tromey@redhat.com>
2345 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2347 (really_start_incremental_init, push_init_level): Initialize
2349 (pop_init_level): Set global designator_depth.
2350 (process_init_element): Check for designated_init attribute.
2352 2014-07-20 Marek Polacek <polacek@redhat.com>
2355 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2356 (implicitly_declare): Pass location to implicit_decl_warning.
2358 2014-07-14 Jakub Jelinek <jakub@redhat.com>
2361 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2362 If non-NULL, call c_parser_check_literal_zero.
2363 (c_parser_check_literal_zero): New function.
2364 (c_parser_postfix_expression_after_primary): Adjust
2365 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2367 2014-07-06 Marek Polacek <polacek@redhat.com>
2370 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2371 * c-tree.h (C_ARRAY_PARAMETER): Define.
2372 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2375 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
2376 Chen Gang <gang.chen.5i5j@gmail.com>
2378 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2381 2014-07-01 Marek Polacek <polacek@redhat.com>
2383 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2384 instead of 0 to WARN_FOR_ASSIGNMENT.
2386 2014-07-01 Marek Polacek <polacek@redhat.com>
2389 * c-typeck.c (convert_for_assignment): Pass
2390 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2392 2014-06-30 Marek Polacek <polacek@redhat.com>
2394 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2395 has no_sanitize_undefined attribute.
2397 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2400 * c-array-notation.c (fix_builtin_array_notation_fn):
2401 Check for 0 arguments in builtin call. Check that bultin argument is
2403 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2406 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2408 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2409 qualifiers in __auto_type for atomic types.
2410 (c_parser_typeof_specifier): Discard all type qualifiers in
2411 __typeof__ for atomic types.
2413 2014-06-25 Marek Polacek <polacek@redhat.com>
2416 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2417 the return expression to c_finish_return.
2419 2014-06-25 Jakub Jelinek <jakub@redhat.com>
2421 * c-typeck.c (c_finish_omp_clauses): Make sure
2422 OMP_CLAUSE_LINEAR_STEP has correct type.
2424 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2428 2014-06-24 Jakub Jelinek <jakub@redhat.com>
2430 * c-parser.c (c_parser_omp_for_loop): For
2431 #pragma omp parallel for simd move lastprivate clause from parallel
2432 to for rather than simd.
2434 2014-06-23 Marek Polacek <polacek@redhat.com>
2436 * c-typeck.c (parser_build_binary_op): Don't call
2437 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2439 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2441 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2442 * c-decl.c (merge_decls): Likewise.
2444 2014-06-09 Marek Polacek <polacek@redhat.com>
2447 * c-typeck.c (error_init): Call inform instead of error_at.
2448 (pedwarn_init): Call inform instead of pedwarn.
2449 (warning_init): Call inform instead of warning_at.
2451 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2453 * c-decl.c (merge_decls): Use set_decl_section_name.
2454 (duplicate_decls): Remove node if it exists.
2456 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2459 * c-typeck.c (push_init_level, process_init_element,
2460 pop_init_level): Correct check for zero initialization, move
2461 missing brace warning to respect zero initialization.
2463 2014-06-05 Marek Polacek <polacek@redhat.com>
2466 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2468 2014-06-05 Marek Polacek <polacek@redhat.com>
2471 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2472 on the left hand side operand of a comparison.
2474 2014-06-05 Marek Polacek <polacek@redhat.com>
2477 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2478 Print note only if the warning was printed.
2480 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2483 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2486 2014-06-03 Marek Polacek <polacek@redhat.com>
2489 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2491 * c-tree.h (c_start_case): Update.
2492 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2493 switch condition has boolean value.
2495 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2497 * c-decl.c: Include builtins.h.
2498 * c-parser.c: Likewise.
2500 2014-05-27 Marek Polacek <polacek@redhat.com>
2503 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2504 error and warning calls to error_at and warning_at. Pass location of
2505 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2506 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2507 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2509 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2512 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2513 function parameters.
2515 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2517 * c-decl.c (merge_decls): Preserve symtab node pointers.
2518 (duplicate_decls): Free new decl.
2520 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2522 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2525 * c-parser.c (c_parser_omp_target): Return bool values.
2527 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2529 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2530 num_teams_loc variable to num_thread_limit_loc.
2532 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2534 * c-array-notation.c (expand_array_notations): Use void_node
2535 instead of void_zero_node.
2537 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2539 * c-decl.c (finish_struct): Adjust.
2540 (finish_enum): Likewise.
2542 (record_inline_static): Likewise.
2543 (push_scope): Likewise.
2544 (make_label): Likewise.
2545 (lookup_label_for_goto): Likewise.
2546 (finish_struct): Likewise.
2547 (finish_enum): Likewise.
2548 (store_parm_decls): Likewise.
2549 (c_push_function_context): Likewise.
2550 * c-lang.h: Remove usage of variable_size gty attribute.
2551 * c-parser.c (c_parse_init): Adjust.
2552 (c_parse_file): Likewise.
2554 2014-05-13 Marek Polacek <polacek@redhat.com>
2557 * c-typeck.c (convert_for_assignment): Pass location to
2558 WARN_FOR_ASSIGNMENT instead of input_location.
2560 2014-05-10 Marek Polacek <polacek@redhat.com>
2562 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2563 maybe_warn_string_init.
2564 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2565 maybe_warn_string_init.
2566 * c-tree.h (maybe_warn_string_init): Update declaration.
2567 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2568 Call pedwarn_init with loc instead of with input_location.
2569 (digest_init): Pass init_loc to maybe_warn_string_init.
2570 (pop_init_level): Call pedwarn_init with loc instead of with
2572 (set_init_index): Likewise.
2573 (process_init_element): Likewise.
2575 2014-05-09 Marek Polacek <polacek@redhat.com>
2578 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2579 (c_parser_initelt): Pass location to set_init_label. Pass array index
2580 location to set_init_index.
2581 * c-tree.h (push_init_level): Update declaration.
2582 (pop_init_level): Likewise.
2583 (set_init_index): Likewise.
2584 (set_init_label): Likewise.
2585 * c-typeck.c (error_init): Add location parameter. Call error_at
2587 (digest_init): Pass init_loc to error_init.
2588 (really_start_incremental_init):
2589 (push_init_level): Add location parameter. Pass loc to pop_init_level
2591 (pop_init_level): Likewise.
2592 (set_designator): Add location parameter. Pass loc to pop_init_level,
2593 push_init_level, and error_init.
2594 (set_init_index): Add location parameter. Pass loc to error_init and
2596 (set_init_label): Likewise.
2597 (output_init_element): Pass loc to error_init.
2598 (process_init_element): Pass loc to error_init, pop_init_level,
2599 pedwarn_init, and push_init_level.
2601 2014-05-09 Marek Polacek <polacek@redhat.com>
2604 * c-parser.c (c_parser_attributes): Parse the arguments as an
2605 expression-list if the attribute takes identifier.
2607 2014-05-08 Marek Polacek <polacek@redhat.com>
2610 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2613 2014-05-08 Marek Polacek <polacek@redhat.com>
2616 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2619 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2620 Mike Stump <mikestump@comcast.net>
2621 Richard Sandiford <rdsandiford@googlemail.com>
2623 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2624 (finish_enum): Use wide-int interfaces.
2625 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2626 * c-typeck.c (build_c_cast): Likewise.
2627 (set_nonincremental_init_from_string): Likewise.
2628 (c_tree_equal): Likewise.
2630 2014-05-02 Marek Polacek <polacek@redhat.com>
2633 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2634 Return size_one_node when the type is not complete.
2635 (pointer_diff): Remove comment.
2636 (build_unary_op): Improve error messages.
2638 2014-05-02 Marek Polacek <polacek@redhat.com>
2640 * c-typeck.c (c_finish_return): Separate warning_at calls.
2642 2014-05-02 Marek Polacek <polacek@redhat.com>
2644 * c-tree.h (error_init): Remove declaration.
2645 (pedwarn_init): Likewise.
2646 * c-typeck.c (error_init): Make static and move above.
2647 (pedwarn_init): Likewise.
2648 (warning_init): Move above.
2649 (maybe_warn_string_init): Likewise.
2651 2014-05-01 Jeff Law <law@redhat.com>
2655 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2656 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2659 2014-05-02 Marek Polacek <polacek@redhat.com>
2662 * c-typeck.c (push_init_level): Set constructor_designated to
2663 p->designated for structures.
2665 2014-05-01 Marek Polacek <polacek@redhat.com>
2668 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2669 function-definition has an attribute after the declarator.
2671 2014-05-01 Marek Polacek <polacek@redhat.com>
2674 * c-typeck.c (warning_init): Add location_t parameter. Call
2675 warning_at instead of warning.
2676 (push_init_level): Pass input_location to warning_init.
2677 (add_pending_init): Add location_t parameter. Pass loc to
2679 (set_nonincremental_init): Pass input_location to add_pending_init.
2680 (set_nonincremental_init_from_string): Likewise.
2681 (output_init_element): Pass loc to warning_init and to
2684 2014-05-01 Marek Polacek <polacek@redhat.com>
2687 * c-typeck.c (c_finish_return): Distinguish between label and variable
2688 when warning about returning local address.
2690 2014-05-01 Marek Polacek <polacek@redhat.com>
2693 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2696 2014-05-01 Marek Polacek <polacek@redhat.com>
2699 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2700 instead of 0 to WARN_FOR_QUALIFIERS.
2702 2014-05-01 Marek Polacek <polacek@redhat.com>
2705 * c-typeck.c (default_conversion): Use better location for
2708 2014-04-30 Marek Polacek <polacek@redhat.com>
2710 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2711 also when SANITIZE_FLOAT_DIVIDE is on.
2713 2014-04-30 Marek Polacek <polacek@redhat.com>
2716 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2717 and pedwarn_init. Use loc insted of input_location.
2719 2014-04-30 Marek Polacek <polacek@redhat.com>
2722 * c-typeck.c (build_binary_op): Use location when warning about
2725 2014-04-25 Marek Polacek <polacek@redhat.com>
2728 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2729 always_inline/noinline and hot/cold attributes.
2731 2014-04-25 Marek Polacek <polacek@redhat.com>
2734 * c-parser.c (c_parser_initelt): Pass input_location to
2735 process_init_element.
2736 (c_parser_initval): Pass loc to process_init_element.
2737 * c-tree.h (process_init_element): Adjust declaration.
2738 * c-typeck.c (push_init_level): Pass input_location to
2739 process_init_element.
2740 (pop_init_level): Likewise.
2741 (set_designator): Likewise.
2742 (output_init_element): Add location_t parameter. Pass loc to
2744 (output_pending_init_elements): Pass input_location to
2745 output_init_element.
2746 (process_init_element): Add location_t parameter. Pass loc to
2747 output_init_element.
2749 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2751 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2752 atomic-clause, allow comma in between atomic-clause and
2755 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2758 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2759 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2761 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2764 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2765 create_tmp_var instead build_decl for creating temps.
2766 (build_array_notation_expr): Likewise.
2767 (fix_conditional_array_notations_1): Likewise.
2768 (fix_array_notation_expr): Likewise.
2769 (fix_array_notation_call_expr): Likewise.
2771 2014-03-28 Jakub Jelinek <jakub@redhat.com>
2774 * c-tree.h (c_build_function_call_vec): New prototype.
2775 * c-typeck.c (build_function_call_vec): Don't call
2776 resolve_overloaded_builtin here.
2777 (c_build_function_call_vec): New wrapper function around
2778 build_function_call_vec. Call resolve_overloaded_builtin here.
2779 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2780 Call c_build_function_call_vec instead of build_function_call_vec.
2781 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2782 * c-decl.c (finish_decl): Likewise.
2784 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2787 * c-typeck.c: Use correct format string in cast-qual warning
2789 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2791 * c-decl.c (c_decl_attributes): Use
2792 lang_hooks.types.omp_mappable_type.
2793 * c-typeck.c (c_finish_omp_clauses): Likewise.
2795 2014-03-06 Marek Polacek <polacek@redhat.com>
2798 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2799 of checking tree code.
2801 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2803 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2804 (c_parser_parameter_declaration): Likewise.
2806 2014-02-19 Marek Polacek <polacek@redhat.com>
2809 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2810 Call mark_exp_read on exp.value.
2811 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2812 TREE_ADDRESSABLE on old instead of val.
2813 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2815 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2817 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2818 C_EXPR_APPEND by vec_safe_push.
2819 * c-tree.h (C_EXPR_APPEND): Remove.
2821 2014-01-31 Marek Polacek <polacek@redhat.com>
2824 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2825 build_function_call_vec.
2826 (build_function_call): Likewise.
2827 (build_atomic_assign): Likewise.
2828 (build_function_call_vec): Add arg_loc parameter. Use it.
2829 (convert_arguments): Likewise.
2830 (convert_for_assignment): Rename rhs_loc to expr_loc.
2831 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2832 (c_parser_objc_keywordexpr): Likewise.
2833 (c_parser_postfix_expression_after_primary): Call
2834 build_function_call_vec with expr_loc rather than op_loc.
2835 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2836 build_function_call_vec.
2837 (c_parser_expr_list): Add locations parameter. Fill it with locations
2838 of function arguments.
2839 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2841 2014-01-30 Marek Polacek <polacek@redhat.com>
2844 * c-typeck.c (build_function_call_vec): Use loc parameter.
2845 (convert_arguments): Add location parameter. Use it.
2846 (ep_convert_and_check): Likewise.
2847 (build_atomic_assign): Adjust convert_for_assignment call.
2848 (build_modify_expr): Likewise.
2849 (digest_init): Likewise.
2850 (c_finish_return): Likewise.
2851 (build_conditional_expr): Adjust ep_convert_and_check calls.
2852 (convert_for_assignment): Add rhs_loc parameter. Use it.
2853 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2856 2014-01-30 Richard Biener <rguenther@suse.de>
2859 * c-typeck.c (build_function_call_vec): Do not replace calls
2860 to a function via an incompatible type with a runtime abort.
2862 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2864 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2865 flag_enable_cilkplus with flag_cilkplus.
2866 (c_parser_direct_declarator_inner): Likewise.
2867 (c_parser_attribute_any_word): Likewise.
2868 (c_parser_attributes): Likewise.
2869 (c_parser_compound_statement): Likewise.
2870 (c_parser_statement_after_labels): Likewise.
2871 (c_parser_if_statement): Likewise.
2872 (c_parser_switch_statement): Likewise.
2873 (c_parser_do_statement): Likewise.
2874 (c_parser_for_statement): Likewise.
2875 (c_parser_unary_expression): Likewise.
2876 (c_parser_postfix_expression): Likewise.
2877 (c_parser_postfix_expression_after_primary): Likewise.
2878 (c_parser_postfix_expression_after_primary): Likewise.
2879 (c_parser_omp_clause_name): Likewise.
2880 (c_finish_omp_declare_simd): Likewise.
2881 (c_parser_cilk_verify_simd): Likewise.
2882 * c-typeck.c (build_array_ref): Likewise.
2883 (build_function_call_vec): Likewise.
2884 (convert_arguments): Likewise.
2885 (build_compound_expr): Likewise.
2886 (c_finish_return): Likewise.
2887 (c_finish_if_stmt): Likewise.
2888 (c_finish_loop): Likewise.
2889 (build_binary_op): Likewise.
2891 2014-01-23 Marek Polacek <polacek@redhat.com>
2894 * c-typeck.c (parser_build_binary_op): Use location instead of
2896 (build_binary_op): Pass location to shorten_compare.
2898 2014-01-23 Marek Polacek <polacek@redhat.com>
2901 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2904 2014-01-23 Marek Polacek <polacek@redhat.com>
2907 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2908 of a comma expression.
2909 (emit_side_effect_warnings): Likewise.
2911 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2914 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2915 function to use walk_tree and moved a lot of its functionality to
2916 expand_array_notations.
2917 (expand_array_notations): New function.
2919 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2921 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2922 attribute an attribute without value.
2924 2014-01-23 Jakub Jelinek <jakub@redhat.com>
2927 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2928 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2930 2014-01-22 Marek Polacek <polacek@redhat.com>
2933 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2934 of remove_c_maybe_const_expr on op1 and op2.
2936 2014-01-15 Jakub Jelinek <jakub@redhat.com>
2939 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2940 effects, preevaluate rhs using SAVE_EXPR first.
2942 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2945 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2946 statements with if-elseif statements.
2948 2014-01-06 Marek Polacek <polacek@redhat.com>
2951 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2952 defined bit-field types only in ISO C.
2954 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2956 Update copyright years
2958 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2960 * c-array-notation.c: Use the standard form for the copyright notice.
2962 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2964 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2965 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2966 field in parser is not empty. If not-empty, call the function
2967 c_parser_finish_omp_declare_simd.
2968 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2969 between SIMD-enabled functions and #pragma simd. Added new parameter.
2970 (c_parser_cilk_all_clauses): Modified the usage of the function
2971 c_parser_cilk_clause_vectorlength as mentioned above.
2972 (c_parser_cilk_simd_fn_vector_attrs): New function.
2973 (c_finish_cilk_simd_fn_tokens): Likewise.
2974 (is_cilkplus_vector_p): Likewise.
2975 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2976 "nomask," and "mask" strings in clause name.
2977 (c_parser_omp_all_clauses): Added 3 new case statements:
2978 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2979 PRAGMA_CILK_CLAUSE_NOMASK.
2980 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2981 check for vector attribute and if so call the function
2982 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2983 called the function c_finish_cilk_simd_fn_tokens.
2984 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2985 parser field is non-empty. If so, parse them as you would parse
2986 the omp declare simd pragma.
2987 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2988 Added a check when step is a parameter and flag it as error.
2989 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2990 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2993 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2995 * c-parser.c (c_parser_omp_parallel): Fix description.
2997 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2999 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3000 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3001 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3002 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3004 2013-12-04 Joseph Myers <joseph@codesourcery.com>
3007 * c-parser.c (c_parser_alignas_specifier): Use
3008 c_sizeof_or_alignof_type instead of c_alignof.
3009 (c_parser_alignof_expression): Likewise, with min_alignof
3010 parameter depending on alignof spelling used.
3012 2013-12-04 Marek Polacek <polacek@redhat.com>
3015 * c-decl.c (start_function): Don't warn for missing prototype for
3018 2013-12-03 Marek Polacek <polacek@redhat.com>
3021 * c-decl.c (build_compound_literal): Allow compound literals with
3022 empty initial value.
3024 2013-12-02 Joseph Myers <joseph@codesourcery.com>
3027 * c-typeck.c (build_modify_expr): Diagnose assignment to
3028 expression with array type.
3030 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3033 * c-typeck.c (process_init_element): Do not treat a string as
3034 initializing a whole array when used with a designator for an
3037 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3040 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3041 an inline function following a static declaration.
3043 2013-11-28 Jakub Jelinek <jakub@redhat.com>
3046 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3047 to p_name before calling c_parser_omp_teams instead of after.
3048 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3049 argument. Remove unused p_name variable.
3051 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
3052 Jakub Jelinek <jakub@redhat.com>
3054 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3055 external_scope is NULL.
3057 2013-11-27 Tom de Vries <tom@codesourcery.com>
3058 Marc Glisse <marc.glisse@inria.fr>
3061 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3063 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
3065 * c-typeck.c: Add required include files from gimple.h.
3067 2013-11-22 David Malcolm <dmalcolm@redhat.com>
3069 * c-decl.c (define_label, shadow_tag_warned)
3070 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3071 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3072 (declspecs_add_type): Remove use of in_system_header macro.
3073 * c-parser.c (c_parser_unary_expression): Likewise.
3074 * c-typeck.c (store_init_value, process_init_element)
3075 (c_start_case): Likewise.
3077 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3080 * c-parser.c (c_parser_set_source_position_from_token): Remove
3081 reference to in_system_header from comment.
3083 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3085 * c-decl.c (grokdeclarator): Update comment to refer to
3086 tree_to_[su]hwi rather than tree_low_cst.
3088 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3090 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3091 tree_to_uhwi throughout.
3093 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3095 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3098 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3100 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3103 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
3105 * c-parser.c (c_parser_cilk_simd): New.
3106 (c_parser_cilk_verify_simd): New.
3107 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3108 (c_parser_omp_for_loop): Add case for NE_EXPR.
3109 Set c_break_label for CILK_SIMD.
3110 (c_parser_cilk_clause_vectorlength): New.
3111 (c_parser_cilk_clause_linear): New.
3112 (c_parser_cilk_clause_name): New.
3113 (c_parser_cilk_all_clauses): New.
3114 * c-typeck.c (build_unary_op): Pass location argument to
3116 (build_modify_expr): Same.
3117 (build_asm_expr): Same.
3118 (c_finish_bc_stmt): Error on break/continue in loops.
3120 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
3122 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3124 2013-11-14 Diego Novillo <dnovillo@google.com>
3126 * c-decl.c: Include print-tree.h.
3127 Include stor-layout.h.
3130 Include stringpool.h.
3131 * c-lang.c: Include fold-const.h.
3132 * c-parser.c: Include stringpool.h.
3134 Include stor-layout.h.
3136 Include trans-mem.h.
3137 * c-typeck.c: Include stor-layout.h.
3138 Include trans-mem.h.
3142 2013-11-13 Joseph Myers <joseph@codesourcery.com>
3144 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3145 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3147 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3148 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3150 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3151 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3152 (c_parser_declarator, c_parser_direct_declarator_inner)
3153 (c_parser_parameter_declaration, c_parser_type_name): All callers
3155 (c_parser_declaration_or_fndef): Handle declarations with type
3156 determined from the initializer.
3158 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
3160 * c-typeck.c: Include gimplify.h.
3162 2013-11-12 Joseph Myers <joseph@codesourcery.com>
3164 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3165 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3167 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3168 or _Thread_local as appropriate in diagnostics.
3169 (build_null_declspecs): Initialize ret->thread_gnu_p.
3170 (declspecs_add_scspec): Handle either __thread or _Thread_local
3171 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3172 pedantic. Do not disallow _Thread_local extern and _Thread_local
3175 2013-11-07 Joseph Myers <joseph@codesourcery.com>
3176 Andrew MacLeod <amacleod@redhat.com>
3178 * c-aux-info.c (gen_type): Handle atomic qualifier.
3179 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3180 qualifiers when compating types.
3181 (shadow_tag_warned): Handle atomic_p in declspecs.
3182 (quals_from_declspecs): Likewise.
3183 (start_decl): Use c_type_promotes_to when promoting argument
3185 (grokdeclarator): Handle _Atomic.
3186 (get_parm_info): Diagnose any qualifier on "void" as only
3188 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3189 comparing types. Use c_type_promotes_to when promoting argument
3191 (finish_function): Use c_type_promotes_to when promoting argument
3193 (build_null_declspecs): Handle atomic_p in declspecs.
3194 (declspecs_add_qual): Handle RID_ATOMIC.
3195 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3196 (c_token_starts_declspecs): Handle RID_ATOMIC.
3197 (c_parser_declspecs): Handle atomic type specifiers and
3199 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3200 from types of expressions with atomic type.
3201 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3202 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3203 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3204 (c_parser_statement_after_labels, c_parser_switch_statement)
3205 (c_parser_for_statement, c_parser_expr_no_commas)
3206 (c_parser_conditional_expression, c_parser_binary_expression)
3207 (c_parser_cast_expression, c_parser_unary_expression)
3208 (c_parser_postfix_expression)
3209 (c_parser_postfix_expression_after_primary, c_parser_expression):
3210 Use convert_lvalue_to_rvalue.
3211 (c_parser_expression_conv, c_parser_expr_list): Document
3212 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3213 (c_parser_objc_synchronized_statement): Use
3214 convert_lvalue_to_rvalue.
3215 (c_parser_objc_selector): Handle RID_ATOMIC.
3216 (c_parser_objc_receiver, c_parser_array_notation): Use
3217 convert_lvalue_to_rvalue.
3218 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3219 _Atomic (type-name).
3220 (struct c_declspecs): Add atomic_p field.
3221 (convert_lvalue_to_rvalue): Declare.
3222 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3223 corresponding atomic types.
3224 (qualify_type): Don't add _Atomic qualifiers from second argument.
3225 (comp_target_types): Do not allow _Atomic mismatches.
3226 (type_lists_compatible_p): Do not remove atomic qualifiers when
3228 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3229 (build_atomic_assign): New functions.
3230 (build_unary_op): Use build_atomic_assign for atomic increment and
3232 (build_conditional_expr): Do not treat _Atomic void as a qualified
3234 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3235 (find_anonymous_field_with_type, convert_to_anonymous_field)
3236 (convert_for_assignment): Do not remove atomic qualifiers when
3238 (digest_init): Do not accept initialization of arrays of atomic
3239 elements by string constants.
3240 (build_asm_expr): Use convert_lvalue_to_rvalue.
3241 (build_binary_op): Do not treat _Atomic void as a qualified
3244 2013-11-06 DJ Delorie <dj@redhat.com>
3246 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3247 both explicit and builtin, print the location of the explicit one.
3249 2013-11-05 Tobias Burnus <burnus@net-b.de>
3251 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3252 c_parser_omp_distribute, c_parser_omp_teams,
3253 c_parser_omp_target, c_parser_omp_declare): Handle
3256 2013-11-03 Marek Polacek <polacek@redhat.com>
3258 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3260 2013-11-01 Jakub Jelinek <jakub@redhat.com>
3262 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3263 check_dup_generic at the end, unless remove is true.
3264 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3266 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3268 2013-10-31 Jakub Jelinek <jakub@redhat.com>
3270 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3271 with decl that is not pointer nor array.
3273 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3275 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3276 a spawning function is found.
3277 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3278 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3279 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3280 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3282 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3283 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3285 (c_finish_return): Added a check to reject _Cilk_spawn in return
3287 (build_cilk_spawn): New function.
3288 (build_cilk_sync): Likewise.
3289 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3291 2013-10-27 Tobias Burnus <burnus@net-b.de>
3294 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3295 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3296 (c_parser_statement_after_labels): Update calls.
3298 2013-10-24 Tobias Burnus <burnus@net-b.de>
3301 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3302 Handle PRAGMA_IVDEP.
3303 (c_parser_statement_after_labels): Update call.
3305 2013-10-24 Marek Polacek <polacek@redhat.com>
3307 * c-parser.c (c_parser_struct_declaration): Add a comment.
3308 (c_parser_declarator): Don't allow _Alignas here.
3310 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
3312 * c-parser.c: Include omp-low.h.
3313 * c-typeck.c: Likewise.
3315 2013-10-17 Marek Polacek <polacek@redhat.com>
3318 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3319 Document syntax of the array-declarator.
3320 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3322 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3323 (c_parser_struct_declaration): Likewise.
3324 (c_parser_declarator): Likewise.
3325 (c_parser_direct_declarator_inner): Likewise.
3326 (c_parser_parameter_declaration): Likewise.
3327 (c_parser_type_name): Likewise.
3329 2013-10-11 Jakub Jelinek <jakub@redhat.com>
3331 * c-lang.h (current_omp_declare_target_attribute): New extern
3333 * c-parser.c: Include c-lang.h.
3334 (struct c_parser): Change tokens to c_token *.
3335 Add tokens_buf field. Change tokens_avail type to unsigned int.
3336 (c_parser_consume_token): If parser->tokens isn't
3337 &parser->tokens_buf[0], increment parser->tokens.
3338 (c_parser_consume_pragma): Likewise.
3339 (enum pragma_context): Add pragma_struct and pragma_param.
3340 (c_parser_external_declaration): Adjust
3341 c_parser_declaration_or_fndef caller.
3342 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3343 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3344 Adjust recursive call.
3345 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3347 (c_parser_parameter_declaration): Use pragma_param instead of
3349 (c_parser_compound_statement_nostart, c_parser_label,
3350 c_parser_for_statement): Adjust
3351 c_parser_declaration_or_fndef callers.
3352 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3353 it through to c_parser_conditional_expression.
3354 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3355 pass it through to c_parser_binary_expression. Adjust recursive
3357 (c_parser_binary_expression): Remove prec argument, add
3358 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3359 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3360 binop matches it, use build2 instead of parser_build_binary_op.
3361 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3362 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3363 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3364 Handle pragma_struct and pragma_param the same as pragma_external.
3365 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3366 (c_parser_omp_variable_list): Parse array sections for
3367 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3368 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3369 (c_parser_omp_clause_reduction): Handle user defined reductions.
3370 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3371 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3372 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3373 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3374 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3375 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3376 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3377 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3378 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3379 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3380 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3381 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3382 (c_parser_omp_for_loop): Add CODE argument, pass it through
3383 to c_finish_omp_for. Change last argument to cclauses,
3384 and adjust uses to grab parallel clauses from the array of all
3385 the split clauses. Adjust c_parser_binary_expression,
3386 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3387 (omp_split_clauses): New function.
3388 (c_parser_omp_simd): New function.
3389 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3390 Allow the function to be called also when parsing combined constructs,
3391 and call c_parser_omp_simd when parsing for simd.
3392 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3393 #pragma omp section, require exactly one structured-block instead of
3394 sequence of statements.
3395 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3396 Allow the function to be called also when parsing combined constructs.
3397 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3398 Allow the function to be called also when parsing combined
3400 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3401 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3402 c_parser_omp_teams, c_parser_omp_target_data,
3403 c_parser_omp_target_update, c_parser_omp_target,
3404 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3405 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3406 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3407 (c_parser_omp_construct): Add p_name and mask vars. Handle
3408 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3409 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3410 and c_parser_omp_sections callers.
3411 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3412 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3413 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3414 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3415 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3417 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3418 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3419 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3420 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3421 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3422 * c-typeck.c: Include tree-inline.h.
3423 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3424 handle_omp_array_sections_1, handle_omp_array_sections,
3425 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3426 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3427 user defined reductions.
3428 (c_tree_equal): New function.
3429 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3430 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3431 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3432 c_check_omp_declare_reduction_r): New prototypes.
3433 * c-decl.c (current_omp_declare_target_attribute): New variable.
3434 (c_decl_attributes): New function.
3435 (start_decl, start_function): Use it instead of decl_attributes.
3436 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3437 c_omp_reduction_decl, c_omp_reduction_lookup,
3438 c_check_omp_declare_reduction_r): New functions.
3440 2013-09-25 Tom Tromey <tromey@redhat.com>
3442 * Make-lang.in (c/gccspec.o): Remove.
3443 (CFLAGS-c/gccspec.o): New variable.
3444 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3445 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3446 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3448 2013-09-25 Tom Tromey <tromey@redhat.com>
3450 * Make-lang.in (c/gccspec.o): Don't use subshell.
3452 2013-09-18 Marek Polacek <polacek@redhat.com>
3455 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3456 Remove unnecessary check.
3458 2013-09-18 Marek Polacek <polacek@redhat.com>
3461 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3462 no_sanitize_undefined attribute.
3464 2013-09-13 Kai Tietz <ktietz@redhat.com>
3467 * c-decl.c (c_builtin_function_ext_scope): Remove
3468 wrong assumption that it is never called on prexisting
3471 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3473 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3475 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3477 * c-objc-common.c (c_tree_printer): Tidy.
3479 2013-08-30 Marek Polacek <polacek@redhat.com>
3481 * c-typeck.c (build_binary_op): Add division by zero and shift
3484 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
3485 Joseph Myers <joseph@codesourcery.com>
3488 * c-typeck.c (c_common_type): Prefer double_type_node over
3489 other REAL_TYPE types with the same precision.
3490 (convert_arguments): Likewise.
3492 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3494 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3495 (c_initialize_diagnostics): Call a destructor for the early printer.
3497 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3499 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3500 printer initialization.
3502 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
3505 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3506 check for truth values.
3507 (expand_array_notation_exprs): Added truth values case. Removed an
3508 unwanted else. Added for-loop to walk through subtrees in default
3511 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3513 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3515 2013-07-23 Joseph Myers <joseph@codesourcery.com>
3517 * c-parser.c (struct c_generic_association): Fix typo.
3519 2013-07-23 Tom Tromey <tromey@redhat.com>
3520 Joseph Myers <joseph@codesourcery.com>
3522 * c-parser.c (struct c_generic_association): New.
3523 (c_generic_association_d): New typedef.
3524 (c_parser_generic_selection): New function.
3525 (c_parser_postfix_expression): Handle RID_GENERIC.
3527 2013-07-13 Jason Merrill <jason@redhat.com>
3530 * c-decl.c (finish_struct): Check for too-large class.
3532 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
3535 * c-typeck.c (set_init_index): When folding, check for index overflow.
3537 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3539 * c-parser.c (c_parser_array_notation): Removed rejection of array
3540 notations in an array of function pointers.
3542 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3544 * c-array-notation.c (make_triplet_val_inv): New function.
3545 (create_cmp_incr): Likewise.
3546 (create_array_refs): Likewise.
3547 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3548 Also modularized common parts between functions and called the function.
3549 (build_array_notation_expr): Likewise.
3550 (fix_conditional_array_notations_1): Likewise.
3551 (fix_array_notation_expr): Likewise.
3552 (fix_array_notation_call_expr): Likewise.
3554 2013-06-18 Marek Polacek <polacek@redhat.com>
3557 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3559 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3561 * c-array-notation.c (build_array_notation_expr): Reject array notation
3562 mismatch between LHS and RHS even inside a call_expr. Also, removed
3563 a couple while statements that were dead code.
3565 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3567 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3568 excessive precision expressions in function parameters. Also removed
3569 couple unwanted while statements.
3571 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3573 * c-array-notation.c (expand_array_notation_exprs): Added
3574 ARRAY_NOTATION_REF case.
3576 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3578 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3579 function to c-family/array-notation-common.c.
3580 (is_cilkplus_reduce_builtin): Likewise.
3581 (find_rank): Likewise.
3582 (extract_array_notation_exprs): Likewise.
3583 (replace_array_notations): Likewise.
3584 (find_inv_trees): Likewise.
3585 (replace_inv_trees): Likewise.
3586 (contains_array_notation_expr): Likewise.
3587 (find_correct_array_notation_type): Likewise.
3588 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3589 (struct inv_list): Moved this to c-family/array-notation-common.c.
3590 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3592 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3594 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3595 reduction functions outside the for-loop. Added a check if the fundecl
3596 is non-NULL. Finally, removed an unwanted if-statement, and made the
3599 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3601 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3602 condition of the if-statement matches the rank of else-block and then-
3603 block when array notations are used.
3604 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3605 expression after the entire function body is parsed.
3606 (c_parser_expr_no_commas): Delayed creating array notation expressions
3607 to the end of function parsing.
3608 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3609 whole if-statement instead of just the condition.
3610 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3612 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3615 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3616 array to NULL_TREE if they are unused. Also added a check for the
3617 field to be NULL before its fields are used in future.
3619 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3622 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3623 (build_array_notation_expr): Likewise.
3625 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3627 * c-typeck.c (build_array_ref): Added a check to see if array's
3628 index is greater than one. If true, then emit an error.
3629 (build_function_call_vec): Exclude error reporting and checking
3630 for builtin array-notation functions.
3631 (convert_arguments): Likewise.
3632 (c_finish_return): Added a check for array notations as a return
3633 expression. If true, then emit an error.
3634 (c_finish_loop): Added a check for array notations in a loop
3635 condition. If true then emit an error.
3636 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3637 (build_binary_op): Added a check for array notation expr inside
3638 op1 and op0. If present, we call another function to find correct
3640 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3641 * c-parser.c (c_parser_compound_statement): Check if array
3642 notation code is used in tree, if so, then transform them into
3644 (c_parser_expr_no_commas): Check if array notation is used in LHS
3645 or RHS, if so, then build array notation expression instead of
3647 (c_parser_postfix_expression_after_primary): Added a check for
3648 colon(s) after square braces, if so then handle it like an array
3649 notation. Also, break up array notations in unary op if found.
3650 (c_parser_direct_declarator_inner): Added a check for array
3652 (c_parser_compound_statement): Added a check for array notation in
3653 a stmt. If one is present, then expand array notation expr.
3654 (c_parser_if_statement): Likewise.
3655 (c_parser_switch_statement): Added a check for array notations in
3656 a switch statement's condition. If true, then output an error.
3657 (c_parser_while_statement): Similarly, but for a while.
3658 (c_parser_do_statement): Similarly, but for a do-while.
3659 (c_parser_for_statement): Similarly, but for a for-loop.
3660 (c_parser_unary_expression): Check if array notation is used in a
3661 pre-increment or pre-decrement expression. If true, then expand
3663 (c_parser_array_notation): New function.
3664 * c-array-notation.c: New file.
3665 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3667 2013-05-23 Mike Stump <mikestump@comcast.net>
3669 * c-typeck.c (convert_for_assignment): Handle references to memory
3672 2013-05-16 Jason Merrill <jason@redhat.com>
3674 * Make-lang.in (cc1$(exeext)): Use link mutex.
3676 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3678 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3679 to simply use OPT_Wpointer_arith.
3680 (build_unary_op): Likewise.
3682 2013-04-03 Jakub Jelinek <jakub@redhat.com>
3685 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3686 argument. If set, or it temporarily for parsing of the first
3687 argument into force_folding_builtin_constant_p.
3688 (c_parser_postfix_expression): Adjust callers.
3690 2013-03-21 Richard Biener <rguenther@suse.de>
3692 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3693 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3695 2013-02-12 Marek Polacek <polacek@redhat.com>
3698 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3701 2013-01-24 Jakub Jelinek <jakub@redhat.com>
3704 * c-typeck.c (set_nonincremental_init_from_string): If
3705 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3707 (process_init_element): Likewise.
3709 2012-12-20 Jakub Jelinek <jakub@redhat.com>
3712 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3713 argument, don't call default_function_array_conversion
3714 nor c_fully_fold here.
3715 (c_parser_asm_statement): Adjust callers.
3716 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3717 and outputs here, and call default_function_array_conversion
3718 on inputs that don't need to be addressable.
3720 2012-12-18 Jakub Jelinek <jakub@redhat.com>
3723 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3724 warning require that both c_common_unsigned_type as well as
3725 c_common_signed_type is the same for both mvl and mvr types.
3727 2012-11-16 Diego Novillo <dnovillo@google.com>
3729 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3731 * c-common.c: Use new vec API in vec.h.
3732 * c-common.h: Likewise.
3733 * c-gimplify.c: Likewise.
3734 * c-pragma.c: Likewise.
3735 * c-pretty-print.c: Likewise.
3736 * c-pretty-print.h: Likewise.
3737 * c-semantics.c: Likewise.
3738 * c-decl.c: Likewise.
3739 * c-parser.c: Likewise.
3740 * c-tree.h: Likewise.
3741 * c-typeck.c: Likewise.
3743 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3746 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3748 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3751 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3752 shadows a function, unless the variable is a function or a
3753 pointer-to-function.
3755 2012-10-12 Jakub Jelinek <jakub@redhat.com>
3758 * c-parser.c (struct c_tree_loc_pair): Removed.
3759 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3760 add location_t * and tree * arguments, fill in array of 3
3761 sizeof_arg trees and corresponding locs.
3762 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3763 c_parser_expr_list callers.
3764 (c_parser_postfix_expression_after_primary): Likewise. Pass
3765 array of 3 sizeof_arg trees and locs (corresponding to first
3766 3 arguments) to sizeof_pointer_memaccess_warning.
3768 2012-10-09 Lawrence Crowl <crowl@google.com>
3770 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3771 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3774 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3777 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3780 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
3783 * c-typeck.c: Include c-common.h.
3784 (enum stv_conv): Moved to c-common.h.
3785 (scalar_to_vector): Moved to c-common.c.
3786 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3787 * Make-lang.in: c-typeck.c depends on c-common.h.
3789 2012-10-04 Arnaud Charlet <charlet@adacore.com>
3791 * c-decl.c (c_write_global_declarations): Fix handling of
3794 2012-09-30 Sharad Singhai <singhai@google.com>
3796 * c-decl.c (c_write_global_declarations): Use a different method
3797 to determine if the dump has ben initialized.
3799 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3802 * c-typeck.c (c_cast_expr): When casting to a type requiring
3803 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3806 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3809 * c-typeck.c (build_unary_op): Pass original argument of
3810 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3811 any C_MAYBE_CONST_EXPR, if it has integer operands.
3812 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3813 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3814 to c_objc_common_truthvalue_conversion, then remove any
3815 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3816 c_objc_common_truthvalue_conversion not
3817 c_common_truthvalue_conversion.
3818 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3819 call note_integer_operands for arguments with integer operands
3820 that are not integer constants.
3822 2012-09-13 Jakub Jelinek <jakub@redhat.com>
3825 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3826 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3828 2012-08-31 Jakub Jelinek <jakub@redhat.com>
3831 * c-convert.c (convert): Don't call fold_convert_loc if
3832 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3833 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3834 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3836 2012-08-24 Jakub Jelinek <jakub@redhat.com>
3839 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3840 for nested and empty_ok arguments in the call to
3841 c_parser_declaration_or_fndef.
3843 2012-08-17 Jakub Jelinek <jakub@redhat.com>
3845 * c-tree.h (c_last_sizeof_arg): Declare.
3846 * c-parser.c (struct c_tree_loc_pair): New type.
3847 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3849 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3850 (c_parser_postfix_expression_after_primary): Likewise. Call
3851 sizeof_pointer_memaccess_warning if needed.
3852 (sizeof_ptr_memacc_comptypes): New function.
3853 * c-typeck.c (c_last_sizeof_arg): New global variable.
3854 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3856 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
3858 * c-lang.h (lang_decl): Add variable_size GTY option.
3860 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3862 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3863 * Make-lang.in: Fix dependencies.
3865 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3867 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3868 and add language Makefile hooks.
3869 * config-lang.in: New file.
3870 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3871 add the required "normal" config-lang.in rules.
3872 * c-lang.h: Moved from gcc/ to here.
3873 * c-tree.h: Likewise.
3874 * c-objc-common.c: Likewise.
3875 * c-objc-common.h: Likewise.
3876 * c-typeck.c: Likewise.
3877 * c-convert.c: Likewise.
3878 * c-lang.c: Likewise.
3879 * c-aux-info.c: Likewise.
3880 * c-errors.c: Likewise.
3881 * gccspec.c: Likewise.
3882 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3883 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3885 Copyright (C) 2012-2016 Free Software Foundation, Inc.
3887 Copying and distribution of this file, with or without modification,
3888 are permitted in any medium without royalty provided the copyright
3889 notice and this notice are preserved.