1 2016-09-24 Marek Polacek <polacek@redhat.com>
4 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
5 have boolean value. Warn about ++/-- on booleans.
7 2016-09-23 Jakub Jelinek <jakub@redhat.com>
9 * c-parser.c (incomplete_record_decls): Remove unnecessary
10 = vNULL initialization of file scope vec.
12 2016-09-16 Marek Polacek <polacek@redhat.com>
14 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
16 2016-09-14 Marek Polacek <polacek@redhat.com>
18 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
19 (fix_array_notation_expr): Likewise.
20 * c-decl.c (finish_decl): Likewise.
21 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
22 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
23 (function_to_pointer_conversion): Use false instead of 0.
24 (convert_lvalue_to_rvalue): Likewise.
25 (parser_build_unary_op): Likewise.
26 (build_atomic_assign): Likewise.
27 (build_unary_op): Change nonconvert parameter type to bool, use
28 true/false instead of 1/0.
29 (build_binary_op): Use true instead of 1.
31 2016-09-13 David Malcolm <dmalcolm@redhat.com>
33 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
34 of add_fixit_insert to add_fixit_insert_before.
36 2016-09-13 Marek Polacek <polacek@redhat.com>
38 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
41 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
44 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
45 COMPOUND_EXPR to warn_for_omitted_condop.
47 2016-09-07 David Malcolm <dmalcolm@redhat.com>
49 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
50 c_get_substring_location for this new langhook.
52 2016-09-02 Jakub Jelinek <jakub@redhat.com>
55 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
57 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
58 instead of mark_exp_read on low_bound/length expression.
59 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
60 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
61 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
62 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
63 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
64 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
65 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
66 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
67 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
68 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
69 instead of mark_expr_read.
70 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
71 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
72 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
73 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
74 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
75 array section bases outside of depend clause, for depend clause
76 use convert_lvalue_to_rvalue on the base.
77 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
78 linear, aligned, map, to and from clauses.
79 (c_omp_clause_copy_ctor): New function.
81 2016-09-01 Marek Polacek <polacek@redhat.com>
84 * c-typeck.c (composite_type): Add FALLTHRU comment.
86 2016-08-31 David Malcolm <dmalcolm@redhat.com>
88 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
89 to the insertion fixits for "struct", "union", and "enum".
91 2016-08-30 David Malcolm <dmalcolm@redhat.com>
93 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
94 rather than add_fixit_misspelled_id.
95 (undeclared_variable): Likewise.
96 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
97 now-redundant "here" params from add_fixit_insert method calls.
98 (c_parser_parameter_declaration): Likewise.
99 * c-typeck.c (build_component_ref): Remove now-redundant range
100 param from add_fixit_replace method calls.
102 2016-08-25 Marek Polacek <polacek@redhat.com>
104 * c-typeck.c (parser_build_binary_op): Pass LHS to
105 warn_logical_not_parentheses.
107 2016-08-25 Marek Polacek <polacek@redhat.com>
110 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
111 or _FloatN or _FloatNx is not supported.
112 (finish_declspecs): Set type to integer_type_node when _FloatN or
113 _FloatNx is not supported.
115 2016-08-19 Joseph Myers <joseph@codesourcery.com>
118 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
119 (struct c_declspecs): Add field floatn_nx_idx.
120 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
121 and _FloatNx type specifiers.
122 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
123 (c_parser_declspecs, c_parser_attribute_any_word)
124 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
125 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
126 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
127 narrower than double.
129 2016-08-12 Jakub Jelinek <jakub@redhat.com>
130 Martin Liska <mliska@suse.cz>
133 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
134 % to determine val element to change. Assert that
135 wchar_bytes * charwidth fits into val array.
137 2016-08-12 Marek Polacek <polacek@redhat.com>
140 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
141 (c_parser_postfix_expression): Likewise.
142 * c-typeck.c (build_unary_op): Adjust fall through comment.
143 (c_mark_addressable): Likewise.
145 2016-08-11 Jakub Jelinek <jakub@redhat.com>
148 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
149 array member through typedef, for orig_qual_indirect == 0 clear
152 2016-08-08 David Malcolm <dmalcolm@redhat.com>
155 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
156 this up to selftest::run_c_tests.
157 (selftest::run_c_tests): New function.
159 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
161 * c-parser.c (struct oacc_routine_data): Add error_seen and
163 (c_finish_oacc_routine): Use these.
164 (c_parser_declaration_or_fndef): Adjust.
165 (c_parser_oacc_routine): Likewise. Support more C language
166 constructs, and improve diagnostics. Move pragma context
168 (c_parser_pragma): ... here.
170 * c-parser.c (struct oacc_routine_data): New.
171 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
173 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
174 declare target" attribute.
176 2016-08-01 Jan Beulich <jbeulich@suse.com>
178 * c-fold.c (c_fully_fold_internal): Also emit shift count
179 warnings for vector types.
180 * c-typeck.c (build_binary_op): Likewise.
182 2016-07-29 Marek Polacek <polacek@redhat.com>
185 * c-decl.c (finish_struct): Rephrase an error message.
188 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
189 to error node for invalid code.
192 * c-decl.c (implicitly_declare): Return decl early not only for
193 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
195 2016-07-29 Jakub Jelinek <jakub@redhat.com>
198 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
199 on GNU extern inline functions.
201 2016-07-29 Marek Polacek <polacek@redhat.com>
204 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
207 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
209 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
211 2016-07-20 David Malcolm <dmalcolm@redhat.com>
213 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
215 (best_macro_match): Likewise, converting from a typedef to a
217 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
218 (lookup_name_fuzzy): Update for change of best_macro_match to a
219 subclass with a ctor that calls cpp_forall_identifiers.
221 2016-07-20 David Malcolm <dmalcolm@redhat.com>
223 * c-decl.c (implicit_decl_warning): Update for conversion of
224 return type of lookup_name_fuzzy to const char *.
225 (undeclared_variable): Likewise.
226 (lookup_name_fuzzy): Convert return type from tree to
228 * c-parser.c (c_parser_declaration_or_fndef): Update for
229 conversion of return type of lookup_name_fuzzy to const char *.
230 (c_parser_parameter_declaration): Likewise.
232 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
234 * c-parser.c (c_parser_oacc_declare): Don't scan for
236 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
237 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
238 zero-length subarrays.
240 2016-07-15 Jakub Jelinek <jakub@redhat.com>
243 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
244 instead of FUZZY_LOOKUP_NAME.
245 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
246 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
248 2016-07-14 Jakub Jelinek <jakub@redhat.com>
251 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
253 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
255 * c-parser.c (c_parser_generic_selection): Make type of variable
257 (c_parser_omp_declare_simd): Likewise.
259 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
261 * c-decl.c (struct c_struct_parse_info): Change member types
262 from vec to auto_vec.
263 (start_struct): Adjust.
264 (finish_struct): Likewise.
266 2016-07-02 Jakub Jelinek <jakub@redhat.com>
269 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
271 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
273 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
274 Move pragma context checking into...
275 (c_parser_omp_cancellation_point): ... here, and improve
277 * c-typeck.c (c_finish_omp_cancel)
278 (c_finish_omp_cancellation_point): Improve diagnostic messages.
280 2016-06-29 Jakub Jelinek <jakub@redhat.com>
283 * c-typeck.c (c_build_qualified_type): Don't clear
284 C_TYPE_INCOMPLETE_VARS for the main variant.
286 2016-06-28 Martin Sebor <msebor@redhat.com>
289 * c-typeck.c (output_init_element): Diagnose incompatible types
290 before non-constant initializers.
292 2016-06-28 Jakub Jelinek <jakub@redhat.com>
294 * Make-lang.in: Don't cat ../stage_current if it does not exist.
296 2016-06-23 Andi Kleen <ak@linux.intel.com>
298 * Make-lang.in: Add support for autofdo.
300 2016-06-22 David Malcolm <dmalcolm@redhat.com>
303 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
304 (implicit_decl_warning): When issuing warnings for implicit
305 declarations, attempt to provide a suggestion via
307 (undeclared_variable): Likewise when issuing errors.
308 (lookup_name_in_scope): Likewise.
309 (struct edit_distance_traits<cpp_hashnode *>): New struct.
310 (best_macro_match): New typedef.
311 (find_closest_macro_cpp_cb): New function.
312 (lookup_name_fuzzy): New function.
313 * c-parser.c: Include gcc-rich-location.h.
314 (c_token_starts_typename): Split out case CPP_KEYWORD into...
315 (c_keyword_starts_typename): ...this new function.
316 (c_parser_declaration_or_fndef): When issuing errors about
317 missing "struct" etc, add a fixit. For other kinds of errors,
318 attempt to provide a suggestion via lookup_name_fuzzy.
319 (c_parser_parms_declarator): When looking ahead to detect typos in
320 type names, also reject CPP_KEYWORD.
321 (c_parser_parameter_declaration): When issuing errors about
322 unknown type names, attempt to provide a suggestion via
324 * c-tree.h (c_keyword_starts_typename): New prototype.
326 2016-06-20 Joseph Myers <joseph@codesourcery.com>
329 * c-typeck.c (build_conditional_expr): Return error_mark_node if
330 c_common_type returns error_mark_node.
332 2016-06-19 Martin Sebor <msebor@redhat.com>
335 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
336 __alignof__ (expression).
338 2016-06-14 David Malcolm <dmalcolm@redhat.com>
340 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
342 2016-06-14 David Malcolm <dmalcolm@redhat.com>
344 * c-typeck.c (build_component_ref): Simplify fixit code by
345 using gcc_rich_location::add_fixit_misspelled_id.
346 (set_init_label): Likewise.
348 2016-06-13 David Malcolm <dmalcolm@redhat.com>
350 * c-parser.c (c_parser_initelt): Provide location of name for new
351 location_t param of set_init_label.
352 * c-tree.h (set_init_label): Add location_t param.
353 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
354 param and use it when issuing error messages about unrecognized
355 field names. Attempt to provide a fixit hint if appropriate,
356 otherwise update the error message to provide the type name.
358 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
361 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
364 2016-06-08 Martin Sebor <msebor@redhat.com>
365 Jakub Jelinek <jakub@redhat.com>
369 * c-typeck.c (convert_arguments): Don't promote last argument
370 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
372 2016-06-08 Marek Polacek <polacek@redhat.com>
375 * c-decl.c (grokdeclarator): Check TYPE_P.
378 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
381 2016-06-07 David Malcolm <dmalcolm@redhat.com>
383 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
384 and structure element reference, capture the location of the
385 element name token and pass it to build_component_ref.
386 (c_parser_postfix_expression_after_primary): Likewise for
387 structure element dereference.
388 (c_parser_omp_variable_list): Likewise for
389 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
390 * c-tree.h (build_component_ref): Add location_t param.
391 * c-typeck.c (build_component_ref): Add location_t param
392 COMPONENT_LOC. Use it, if available, when issuing hints about
393 mispelled member names to provide a fixit replacement hint.
395 2016-06-06 Marek Polacek <polacek@redhat.com>
398 * c-parser.c (c_parser_direct_declarator): Set location.
400 2016-06-06 Marek Polacek <polacek@redhat.com>
402 * c-typeck.c (comptypes_internal): Handle comparisons of
403 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
404 TYPE_REF_CAN_ALIAS_ALL.
406 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
408 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
409 arguments as addressable when async clause exists.
411 2016-05-30 Jakub Jelinek <jakub@redhat.com>
414 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
415 when combined with target construct.
417 2016-05-26 Jakub Jelinek <jakub@redhat.com>
419 * c-parser.c (c_parser_omp_clause_schedule): Warn if
420 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
422 2016-05-25 Marek Polacek <polacek@redhat.com>
425 * c-decl.c (c_make_fname_decl): Don't check seen_error.
428 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
430 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
432 * c-parser.c (c_parser_oacc_declare): Add support for
433 GOMP_MAP_FIRSTPRIVATE_POINTER.
434 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
435 argument with enum c_omp_region_type ort.
436 (handle_omp_array_sections): Likewise. Update call to
437 handle_omp_array_sections_1.
438 (c_finish_omp_clauses): Add specific errors and warning messages for
439 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
440 call to handle_omp_array_sections.
442 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
444 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
446 2016-05-24 Richard Biener <rguenther@suse.de>
450 * c-typeck.c (build_array_ref): Do not complain about indexing
451 non-lvalue vectors. Adjust for function name change.
453 2016-05-20 Martin Sebor <msebor@redhat.com>
456 * c-typeck.c (error_init): Use
457 expansion_point_location_if_in_system_header.
458 (warning_init): Same.
460 2016-05-19 David Malcolm <dmalcolm@redhat.com>
463 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
465 (c_parser_postfix_expression): Likewise.
466 * c-tree.h (c_expr::set_error): New method.
467 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
468 that result's range is initialized.
470 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
472 * c-typeck.c (parser_build_unary_op): Fix formatting.
474 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
476 * c-decl.c (grokdeclarator): Remove errmsg and use of
477 targetm.invalid_return_type.
478 (grokparms): Remove errmsg and use of
479 targetm.invalid_parameter_type.
481 2016-05-13 Joseph Myers <joseph@codesourcery.com>
483 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
484 function return type.
486 2016-05-12 Marek Polacek <polacek@redhat.com>
489 * c-decl.c (build_compound_literal): Pass LOC down to
490 c_incomplete_type_error.
491 * c-tree.h (require_complete_type): Adjust declaration.
492 (c_incomplete_type_error): Likewise.
493 * c-typeck.c (require_complete_type): Add location parameter, pass it
494 down to c_incomplete_type_error.
495 (c_incomplete_type_error): Add location parameter, pass it down to
497 (build_component_ref): Pass location down to c_incomplete_type_error.
498 (default_conversion): Pass location down to require_complete_type.
499 (build_array_ref): Likewise.
500 (build_function_call_vec): Likewise.
501 (convert_arguments): Likewise.
502 (build_unary_op): Likewise.
503 (build_c_cast): Likewise.
504 (build_modify_expr): Likewise.
505 (convert_for_assignment): Likewise.
506 (c_finish_omp_clauses): Likewise.
508 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
511 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
513 * c-errors.c (pedwarn_c90): Return true if warned.
514 * c-tree.h (pedwarn_c90): Change return type to bool.
515 (enum c_declspec_word): Add new enumerator cdw_atomic.
517 2016-05-11 Marek Polacek <polacek@redhat.com>
520 * c-decl.c (diagnose_mismatched_decls): Factor out code to
521 diagnose_mismatched_attributes and call it.
523 2016-05-10 Marek Polacek <polacek@redhat.com>
526 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
527 on a declaration following the definition.
529 2016-05-05 Jakub Jelinek <jakub@redhat.com>
531 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
532 parse it through to c_parser_c99_block_statement.
533 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
536 2016-05-04 Marek Polacek <polacek@redhat.com>
538 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
541 2016-05-04 Marek Polacek <polacek@redhat.com>
544 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
545 for macro expansions.
547 2016-05-03 Marek Polacek <polacek@redhat.com>
550 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
551 check_builtin_function_arguments.
553 2016-05-03 Richard Biener <rguenther@suse.de>
555 * Make-lang.in (cc1-checksum.c): For stage-final re-use
556 the checksum from the previous stage.
558 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
560 * c-parser.c (c_parser_oacc_all_clauses): Update call to
561 c_finish_omp_clauses.
562 (c_parser_omp_all_clauses): Likewise.
563 (c_parser_oacc_cache): Likewise.
564 (c_parser_oacc_loop): Likewise.
565 (omp_split_clauses): Likewise.
566 (c_parser_omp_declare_target): Likewise.
567 (c_parser_cilk_all_clauses): Likewise.
568 (c_parser_cilk_for): Likewise.
569 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
570 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
572 2016-05-02 Marek Polacek <polacek@redhat.com>
575 * c-decl.c (grokdeclarator): Diagnose when array's size has an
578 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
581 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
582 OACC_LOOP_CLAUSE_MASK.
583 (c_parser_oacc_kernels_parallel): Update call to
584 c_oacc_split_loop_clauses.
586 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
588 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
589 argument to build_modify_expr in two cases.
591 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
593 * c-parser.c (c_parser_postfix_expression_after_primary): Call
594 warn_for_memset instead of warning directly here.
596 2016-04-26 Marek Polacek <polacek@redhat.com>
599 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
601 (c_parser_for_statement): ... here.
602 (c_parser_if_statement): Use it.
603 (c_parser_switch_statement): Use it.
604 (c_parser_while_statement): Use it.
607 * c-decl.c (pushdecl): Pass LOCUS down to warning.
609 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
612 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
613 instead of c_finish_cilk_clauses.
614 * c-tree.h (c_finish_omp_clauses): Add new default argument.
615 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
616 floating-point variables in the linear clause for Cilk Plus.
618 2016-04-18 Michael Matz <matz@suse.de>
620 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
621 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
623 2016-04-15 Marek Polacek <polacek@redhat.com>
626 * c-typeck.c (build_unary_op): Pass location down to error and
629 2016-04-15 Jakub Jelinek <jakub@redhat.com>
632 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
634 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
635 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
636 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
637 Adjust c_parser_pragma callers.
638 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
640 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
642 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
643 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
644 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
645 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
646 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
647 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
648 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
649 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
651 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
652 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
655 2016-04-13 Marek Polacek <polacek@redhat.com>
658 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
660 (c_parser_statement): Likewise.
661 (c_parser_c99_block_statement): Likewise.
662 (c_parser_while_statement): Likewise.
663 (c_parser_for_statement): Likewise.
664 (c_parser_if_body): Don't set IF_P here.
665 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
666 about dangling else here.
667 * c-tree.h (c_finish_if_stmt): Adjust declaration.
668 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
669 warn about dangling else here.
671 2016-04-04 Marek Polacek <polacek@redhat.com>
674 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
676 2016-03-31 Marek Polacek <polacek@redhat.com>
679 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
681 2016-03-18 David Malcolm <dmalcolm@redhat.com>
684 * c-parser.c (c_parser_postfix_expression): Set the source range
685 for uses of "__builtin_types_compatible_p".
687 2016-03-17 Jakub Jelinek <jakub@redhat.com>
690 * c-typeck.c (composite_type): Don't count void_list_node
691 into len, if the list is terminated by void_list_node, start
692 with void_list_node instead of NULL for newargs. Stop
695 2016-03-16 Marek Polacek <polacek@redhat.com>
698 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
699 nested functions returning VM types.
701 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
703 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
704 when calling c_finish_omp_clauses.
706 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
709 * c-decl.c (get_parm_info): Don't queue implicit function declarations
712 2016-03-04 Marek Polacek <polacek@redhat.com>
715 * c-parser.c (c_parser_postfix_expression): Call
716 c_parser_cast_expression rather than c_parser_postfix_expression.
718 2016-03-01 Jakub Jelinek <jakub@redhat.com>
722 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
723 of incomplete decls to error_mark_node.
725 2016-02-24 Marek Polacek <polacek@redhat.com>
728 * c-decl.c (finish_decl): Don't update the copy of the type of a
731 2016-02-23 Jakub Jelinek <jakub@redhat.com>
734 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
735 in id_kind reclassification.
737 2016-02-16 Jakub Jelinek <jakub@redhat.com>
740 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
742 2016-02-16 James Norris <jnorris@codesourcery.com>
745 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
747 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
749 * c-decl.c (build_null_declspecs): Zero the entire struct.
752 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
753 callers changed. If nested_p is true, use it to call
754 finish_implicit_inits.
755 * c-tree.h (finish_implicit_inits): Declare.
756 * c-typeck.c (finish_implicit_inits): New function. Move code
758 (push_init_level): ... here.
759 (set_designator, process_init_element): Call finish_implicit_inits.
761 2016-02-11 Jakub Jelinek <jakub@redhat.com>
764 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
765 arguments for -Waddress warning.
767 2016-02-04 Jakub Jelinek <jakub@redhat.com>
770 * c-decl.c (finish_enum): When honoring mode attribute,
771 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
773 2016-01-29 Jakub Jelinek <jakub@redhat.com>
776 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
777 all type variants, not just TYPE_MAIN_VARIANT.
779 2016-01-27 Jakub Jelinek <jakub@redhat.com>
782 * c-decl.c (c_write_global_declarations_1): Warn with
783 warn_unused_function if static prototype without definition
786 2016-01-27 Marek Polacek <polacek@redhat.com>
789 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
790 to unsigned, if needed. Add -Wsign-compare warning.
792 2016-01-26 Jakub Jelinek <jakub@redhat.com>
794 PR tree-optimization/69483
795 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
797 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
800 * c-tree.h (incomplete_record_decls): Declare.
801 * c-parser.c (incomplete_record_decls): Define.
802 (c_parser_translation_unit): Iterate through incomplete_record_decls and
803 report error if any decl has zero size.
804 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
805 or enum type to incomplete_record_decls.
807 2016-01-14 Tom de Vries <tom@codesourcery.com>
809 PR tree-optimization/68773
810 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
813 2016-01-14 Marek Polacek <polacek@redhat.com>
816 * c-decl.c (grokdeclarator): Provide more information for invalid
819 2016-01-06 David Malcolm <dmalcolm@redhat.com>
821 * c-parser.c (c_parser_unary_expression): For dereferences, build
822 a combined location before calling build_indirect_ref, so that
823 error reports cover the full range, manually updating the c_expr
826 2016-01-06 Marek Polacek <polacek@redhat.com>
829 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
830 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
833 2016-01-04 Jakub Jelinek <jakub@redhat.com>
835 Update copyright years.
837 2016-01-04 Marek Polacek <polacek@redhat.com>
840 * c-typeck.c (build_atomic_assign): Improve commentary. Add
841 optimization to use __atomic_fetch_* built-in if possible.
843 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
845 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
847 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
850 2015-12-22 Marek Polacek <polacek@redhat.com>
853 * c-typeck.c (build_component_ref): Warn when acessing elements of
854 atomic structures or unions.
856 2015-12-21 David Malcolm <dmalcolm@redhat.com>
858 * c-typeck.c: Include "gcc-rich-location.h".
859 (build_binary_op): In the two places that call binary_op_error,
860 create a gcc_rich_location and populate it with the location of
861 the binary op and its two operands.
863 2015-12-16 David Malcolm <dmalcolm@redhat.com>
865 * c-parser.c (c_parser_statement_after_labels): When calling
866 c_finish_return, Use the return expression's location if it has
867 one, falling back to the location of the first token within it.
868 * c-typeck.c (c_finish_return): When issuing warnings about
869 the incorrect presence/absence of a return value, issue a note
870 showing the declaration of the function.
872 2015-12-16 David Malcolm <dmalcolm@redhat.com>
874 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
876 (c_parser_peek_nth_token): New function.
877 (c_parser_peek_conflict_marker): New function.
878 (c_parser_error): Detect conflict markers and report them as such.
880 2015-12-16 David Malcolm <dmalcolm@redhat.com>
882 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
883 to preserve range information for the primary expression
884 in the call to c_parser_postfix_expression_after_primary.
886 2015-12-16 David Malcolm <dmalcolm@redhat.com>
888 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
889 expression location, falling back on the first token location,
890 rather than always using the latter.
892 2015-12-16 Marek Polacek <polacek@redhat.com>
895 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
898 2015-12-15 Marek Polacek <polacek@redhat.com>
901 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
904 2015-12-08 David Malcolm <dmalcolm@redhat.com>
906 * c-parser.c (c_parser_alignof_expression): Capture location of
907 closing parenthesis (if any), or of end of unary expression, and
908 use it to build a src_range for the expression.
910 2015-12-08 David Malcolm <dmalcolm@redhat.com>
913 * c-parser.c (c_parser_get_builtin_args): Add
914 "out_close_paren_loc" param, and write back to it.
915 (c_parser_postfix_expression): Capture the closing
916 parenthesis location for RID_CHOOSE_EXPR,
917 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
918 RID_BUILTIN_SHUFFLE and use it to set the source range
919 for such expressions; within RID_BUILTIN_COMPLEX set
920 the underlying location.
922 2015-12-07 Marek Polacek <polacek@redhat.com>
925 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
926 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
928 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
930 * c-tree.h (c_build_va_arg): Adjust prototype.
931 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
932 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
933 parameter, adjust throughout and issue an error if EXPR is a component
934 with reverse storage order.
936 2015-12-02 Jason Merrill <jason@redhat.com>
938 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
939 (c_fully_fold_internal, decl_constant_value_for_optimization):
940 Move from c-common.c.
941 * c-tree.h: Declare decl_constant_value_for_optimization.
942 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
944 2015-12-02 Joseph Myers <joseph@codesourcery.com>
947 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
948 following link from declarator to next declarator. Track original
949 qualified type and pass it to c_build_qualified_type.
950 * c-typeck.c (c_build_qualified_type): Add arguments
951 orig_qual_type and orig_qual_indirect.
953 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
955 * c-parser.c (c_parser_omp_clause_name)
956 (c_parser_oacc_all_clauses): Alphabetical sorting.
958 2015-12-02 Jakub Jelinek <jakub@redhat.com>
961 * c-decl.c (get_parm_info): Use b->locus instead of input_location
964 2015-12-01 Julian Brown <julian@codesourcery.com>
965 Cesar Philippidis <cesar@codesourcery.com>
966 James Norris <James_Norris@mentor.com>
968 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
969 (c_parser_oacc_clause_use_device): New function.
970 (c_parser_oacc_all_clauses): Add use_device support.
971 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
972 (c_parser_oacc_host_data): New function.
973 (c_parser_omp_construct): Add host_data support.
974 * c-tree.h (c_finish_oacc_host_data): Add prototype.
975 * c-typeck.c (c_finish_oacc_host_data): New function.
976 (c_finish_omp_clauses): Add use_device support.
978 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
981 * c-decl.c: Set TYPE_PACKED in variants.
983 2015-11-27 Martin Liska <mliska@suse.cz>
986 * c-array-notation.c (fix_builtin_array_notation_fn):
987 Use release_vec_vec instead of vec::release.
988 (build_array_notation_expr): Likewise.
989 (fix_conditional_array_notations_1): Likewise.
990 (fix_array_notation_expr): Likewise.
991 (fix_array_notation_call_expr): Likewise.
993 2015-11-27 Jakub Jelinek <jakub@redhat.com>
996 * c-parser.c (c_parser_compound_statement_nostart): If
997 last_label is true, use pragma_stmt instead of pragma_compound
998 as second c_parser_pragma argument.
999 (c_parser_omp_ordered, c_parser_omp_target_update,
1000 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1001 false as second argument to c_parser_skip_to_pragma_eol after
1002 diagnosing standalone directives used in pragma_stmt context.
1004 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1006 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1007 with "if (ENABLE_OFFLOADING)".
1009 2015-11-23 David Malcolm <dmalcolm@redhat.com>
1012 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1013 for various Objective-C constructs: Class.name syntax,
1014 @selector(), @protocol(), @encode(), and [] message syntax.
1016 2015-11-20 David Malcolm <dmalcolm@redhat.com>
1019 * c-typeck.c (should_suggest_deref_p): New function.
1020 (build_component_ref): Special-case POINTER_TYPE when
1021 generating a "not a structure of union" error message, and
1022 suggest a "->" rather than a ".", providing a fix-it hint.
1024 2015-11-19 David Malcolm <dmalcolm@redhat.com>
1026 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1027 candidate into a new function, find_closest_identifier.
1029 2015-11-19 Marek Polacek <polacek@redhat.com>
1032 * c-typeck.c (parser_build_binary_op): Properly handle
1033 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1035 2015-11-17 David Malcolm <dmalcolm@redhat.com>
1037 * c-parser.c (set_c_expr_source_range): Bulletproof both
1038 overloaded implementations against NULL expr->value.
1039 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1041 (c_parser_unary_expression): Likewise when handling addresses of
1043 (c_parser_postfix_expression): Likewise for statement expressions,
1044 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1045 __builtin_va_arg, and for __builtin_offset_of.
1046 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1047 src_range using the range of the braced initializer.
1048 (c_parser_transaction_expression): Set src_range for "ret" to a
1049 sane pair of values.
1051 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1053 * c-parser.c (c_finish_omp_declare_simd): Look for
1054 "simd" attribute as well. Update error message.
1056 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1058 * c-parser.c (c_parser_omp_declare_target): Adjust.
1060 2015-11-14 Jakub Jelinek <jakub@redhat.com>
1062 * c-typeck.c (c_finish_omp_clauses): Don't mark
1063 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1065 2015-11-14 Marek Polacek <polacek@redhat.com>
1067 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1068 * c-typeck.c: Likewise.
1070 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1072 * c-decl.c (warn_defaults_to): Pass line_table to
1074 * c-errors.c (pedwarn_c99): Likewise.
1075 (pedwarn_c90): Likewise.
1076 * c-parser.c (set_c_expr_source_range): New functions.
1077 (c_token::get_range): New method.
1078 (c_token::get_finish): New method.
1079 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1080 based on the range from the start of the LHS to the end of the
1082 (c_parser_conditional_expression): Likewise, based on the range
1083 from the start of the cond.value to the end of exp2.value.
1084 (c_parser_binary_expression): Call set_c_expr_source_range on
1085 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1086 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1087 based on the cast_loc through to the end of the expr.
1088 (c_parser_unary_expression): Likewise, based on the
1089 op_loc through to the end of op.
1090 (c_parser_sizeof_expression) Likewise, based on the start of the
1091 sizeof token through to either the closing paren or the end of
1093 (c_parser_postfix_expression): Likewise, using the token range,
1094 or from the open paren through to the close paren for
1095 parenthesized expressions.
1096 (c_parser_postfix_expression_after_primary): Likewise, for
1097 various kinds of expression.
1098 * c-tree.h (struct c_expr): Add field "src_range".
1099 (c_expr::get_start): New method.
1100 (c_expr::get_finish): New method.
1101 (set_c_expr_source_range): New decls.
1102 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1103 on ret for prefix unary ops.
1104 (parser_build_binary_op): Likewise, running from the start of
1105 arg1.value through to the end of arg2.value.
1107 2015-11-13 Marek Polacek <polacek@redhat.com>
1110 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1112 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1114 * c-typeck.c: Include spellcheck.h.
1115 (lookup_field_fuzzy_find_candidates): New function.
1116 (lookup_field_fuzzy): New function.
1117 (build_component_ref): If the field was not found, try using
1118 lookup_field_fuzzy and potentially offer a suggestion.
1120 2015-11-12 James Norris <jnorris@codesourcery.com>
1121 Joseph Myers <joseph@codesourcery.com>
1123 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1124 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1125 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1126 and PRAGMA_OMP_CLAUSE_LINK.
1127 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1128 and PRAGMA_OACC_CLAUSE_LINK.
1129 (OACC_DECLARE_CLAUSE_MASK): New definition.
1130 (c_parser_oacc_declare): New function.
1132 2015-11-12 Marek Polacek <polacek@redhat.com>
1135 * c-parser.c (c_parser_for_statement): Reclassify the token in
1138 2015-11-11 Marek Polacek <polacek@redhat.com>
1142 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1143 checking the size of an array.
1145 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
1147 * c-array-notation.c: Remove unused header files.
1148 * c-aux-info.c: Likewise.
1149 * c-convert.c: Likewise.
1150 * c-decl.c: Likewise.
1151 * c-errors.c: Likewise.
1152 * c-lang.c: Likewise.
1153 * c-objc-common.c: Likewise.
1154 * c-parser.c: Likewise.
1155 * c-typeck.c: Likewise.
1156 * gccspec.c: Likewise.
1158 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1159 Cesar Philippidis <cesar@codesourcery.com>
1160 James Norris <jnorris@codesourcery.com>
1161 Julian Brown <julian@codesourcery.com>
1162 Nathan Sidwell <nathan@codesourcery.com>
1165 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1167 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1168 (c_parser_pragma): Parse 'acc routine'.
1169 (OACC_ROUTINE_CLAUSE_MARK): Define.
1170 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1172 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1175 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1176 location of the backward-goto to the start of the loop body.
1178 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1181 * c-parser.c (c_parser_while_statement): Finish the loop before
1182 parsing ahead for misleading indentation.
1183 (c_parser_for_statement): Likewise.
1185 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1187 * c-decl.c (finish_struct): If the structure has reverse storage
1188 order, rewrite the type of array fields with scalar component. Call
1189 maybe_apply_pragma_scalar_storage_order on entry.
1190 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1191 errors on bit-fields and reverse SSO here and not...
1192 (c_mark_addressable): ...here.
1193 (output_init_element): Adjust call to initializer_constant_valid_p.
1194 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1196 2015-11-06 David Malcolm <dmalcolm@redhat.com>
1198 * c-decl.c (warn_defaults_to): Update for change in signature
1199 of diagnostic_set_info.
1200 * c-errors.c (pedwarn_c99): Likewise.
1201 (pedwarn_c90): Likewise.
1202 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1203 for textinfo::set_location.
1205 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1206 Thomas Schwinge <thomas@codesourcery.com>
1207 James Norris <jnorris@codesourcery.com>
1209 * c-parser.c (c_parser_omp_clause_name): Add support for
1210 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1211 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1212 default(none) in OpenACC.
1213 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1215 (c_parser_oacc_clause_tile): New function.
1216 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1217 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1218 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1220 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1221 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1223 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1224 (c_parser_oacc_update): Update the error message for missing clauses.
1225 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1226 and OMP_CLAUSE_INDEPENDENT.
1228 2015-11-05 Marek Polacek <polacek@redhat.com>
1231 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1232 deal with pre-evaluation on invalid types.
1234 2015-11-05 Jakub Jelinek <jakub@redhat.com>
1235 Ilya Verbin <ilya.verbin@intel.com>
1237 * c-parser.c: Include context.h and gimple-expr.h.
1238 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1239 monotonic together with nonmonotonic.
1240 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1241 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1242 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1243 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1244 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1245 expressions on combined target teams before the target.
1246 (c_parser_omp_declare_target): If decl has "omp declare target" or
1247 "omp declare target link" attribute, and cgraph or varpool node already
1248 exists, then set corresponding flags. Call c_finish_omp_clauses
1249 in the parenthesized extended-list syntax case.
1250 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1252 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1253 on OMP_CLAUSE_REDUCTION array sections.
1254 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1255 into the constant offset, or for variable low-bound using
1256 POINTER_PLUS_EXPR. For structure element based array sections use
1257 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1258 (c_finish_omp_clauses): Drop generic_field_head, structure
1259 elements are now always mapped even as array section bases,
1260 diagnose same var in data sharing and mapping clauses. Diagnose if
1261 linear step on declare simd is neither a constant nor a uniform
1262 parameter. Look through POINTER_PLUS_EXPR for array section
1263 reductions. Diagnose the same var or function appearing multiple
1264 times on the same directive. Fix up wording for the to clause if t
1265 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1266 modifier on kinds other than dynamic or guided or nonmonotonic
1267 modifier together with ordered clause.
1269 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1270 Chung-Lin Tang <cltang@codesourcery.com>
1272 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1274 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
1276 * c-array-notation.c: Reorder #include's and remove duplicates.
1277 * c-aux-info.c: Likewise.
1278 * c-convert.c: Likewise.
1279 * c-decl.c: Likewise.
1280 * c-errors.c: Likewise.
1281 * c-lang.c: Likewise.
1282 * c-objc-common.c: Likewise.
1283 * c-parser.c: Likewise.
1284 * c-typeck.c: Likewise.
1286 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
1289 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1290 after calling build_qualified_type.
1292 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1293 Thomas Schwinge <thomas@codesourcery.com>
1294 James Norris <jnorris@codesourcery.com>
1295 Joseph Myers <joseph@codesourcery.com>
1296 Julian Brown <julian@codesourcery.com>
1297 Bernd Schmidt <bschmidt@redhat.com>
1299 * c-parser.c (c_parser_oacc_shape_clause): New.
1300 (c_parser_oacc_simple_clause): New.
1301 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1302 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1304 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1305 James Norris <jnorris@codesourcery.com>
1306 Cesar Philippidis <cesar@codesourcery.com>
1310 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1311 parameters, and handle these. Adjust all users.
1312 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1314 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1316 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1318 (c_finish_omp_construct): Declare function.
1319 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1320 Merge functions into...
1321 (c_finish_omp_construct): ... this new function.
1323 2015-10-22 Richard Biener <rguenther@suse.de>
1325 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1326 before folding a MINUS_EXPR.
1328 2015-10-21 Marek Polacek <polacek@redhat.com>
1331 * c-decl.c (start_function): Warn about vararg functions without
1334 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1336 * c-typeck.c (build_conditional_expr): Use boolean vector
1337 type for vector comparison.
1338 (build_vec_cmp): New.
1339 (build_binary_op): Use build_vec_cmp for comparison.
1341 2015-10-20 Marek Polacek <polacek@redhat.com>
1343 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1345 2015-10-20 Marek Polacek <polacek@redhat.com>
1348 * c-parser.c (c_parser_attributes): Break out of the loop if the
1349 token after an attribute isn't a comma.
1351 2015-10-13 Jakub Jelinek <jakub@redhat.com>
1352 Aldy Hernandez <aldyh@redhat.com>
1354 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1355 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1356 (c_parser_omp_variable_list): Handle structure elements for
1357 map, to and from clauses. Handle array sections in reduction
1358 clause. Formatting fixes.
1359 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1360 if clause modifiers.
1361 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1362 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1363 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1364 c_parser_omp_clause_is_device_ptr): New functions.
1365 (c_parser_omp_clause_ordered): Parse optional parameter.
1366 (c_parser_omp_clause_reduction): Handle array reductions.
1367 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1368 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1370 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1371 (c_parser_omp_clause_depend_sink): New function.
1372 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1373 (c_parser_omp_clause_map): Parse release/delete map kinds and
1374 optional always modifier.
1375 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1376 and c_finish_omp_clauses callers.
1377 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1378 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1379 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1380 (OMP_CRITICAL_CLAUSE_MASK): Define.
1381 (c_parser_omp_critical): Parse critical clauses.
1382 (c_parser_omp_for_loop): Handle doacross loops, adjust
1383 c_finish_omp_for and c_finish_omp_clauses callers.
1384 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1385 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1386 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1387 (c_parser_omp_for): Disallow ordered clause when combined with
1388 distribute. Disallow linear clause when combined with distribute
1389 and not combined with simd.
1390 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1391 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1392 parse clauses and if depend clause is found, don't parse a body.
1393 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1394 Allow target parallel without for after it.
1395 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1396 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1397 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1399 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1400 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1401 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1402 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1404 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1405 defaultmap and is_device_ptr clauses.
1406 (c_parser_omp_target): Parse target parallel and target simd. Set
1407 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1408 and target exit data. Diagnose invalid map kinds.
1409 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1410 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1412 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1414 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1415 (c_parser_omp_taskloop): New function.
1416 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1417 handle PRAGMA_OMP_TASKLOOP.
1418 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1419 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1420 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1421 Add IS_OMP argument, handle structure element bases, diagnose
1422 bitfields, pass IS_OMP recursively, diagnose known zero length
1423 array sections in depend clauses, handle array sections in reduction
1424 clause, diagnose negative length even for pointers.
1425 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1426 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1427 array sections in reduction clause, set
1428 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1429 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1430 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1431 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1433 2015-10-06 Marek Polacek <polacek@redhat.com>
1435 * c-parser.c (c_parser_statement_after_labels): Use
1436 protected_set_expr_location.
1437 (c_parser_omp_clause_num_gangs): Likewise.
1438 (c_parser_omp_clause_num_threads): Likewise.
1439 (c_parser_omp_clause_num_workers): Likewise.
1440 (c_parser_omp_clause_vector_length): Likewise.
1441 (c_parser_omp_clause_num_teams): Likewise.
1442 (c_parser_omp_clause_thread_limit): Likewise.
1443 * c-typeck.c (build_c_cast): Likewise.
1444 (c_cast_expr): Likewise.
1446 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1448 * c-typeck.c (c_tree_equal): Use real_equal instead of
1451 2015-10-04 Jason Merrill <jason@redhat.com>
1453 * c-parser.c (c_lex_one_token): Handle @synchronized.
1454 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1455 can change whether the function is transaction_safe.
1457 2015-10-02 Marek Polacek <polacek@redhat.com>
1460 * c-typeck.c (convert_for_assignment): Use the expansion point
1461 location throughout.
1463 2015-10-02 Marek Polacek <polacek@redhat.com>
1466 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1467 and pass it down to c_parser_if_statement.
1468 (c_parser_else_body): Add CHAIN parameter and pass it down to
1469 c_parser_statement_after_labels.
1470 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1471 duplicated if-else-if conditions.
1473 2015-10-01 Marek Polacek <polacek@redhat.com>
1475 * c-typeck.c (convert_for_assignment): Improve commentary.
1477 2015-09-30 Marek Polacek <polacek@redhat.com>
1480 * c-typeck.c (c_finish_return): Use the expansion point location for
1481 certain "return with value" warnings.
1483 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1485 * c-parser.c (pragma_lex): Add loc argument.
1487 2015-09-15 Marek Polacek <polacek@redhat.com>
1490 * c-decl.c (tag_exists_p): New function.
1491 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1492 struct/union/enum keywords are missing.
1493 * c-tree.h (tag_exists_p): Declare.
1495 2015-09-15 Marek Polacek <polacek@redhat.com>
1497 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1498 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1499 Return NULL_TREE instead of 0.
1500 (lookup_name): Return NULL_TREE instead of 0.
1501 (lookup_name_in_scope): Likewise.
1502 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1503 (parser_xref_tag): Use false instead of 0.
1504 (start_struct): Use true instead of 1.
1505 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1507 2015-09-14 Marek Polacek <polacek@redhat.com>
1509 * c-typeck.c (set_nonincremental_init_from_string): Use
1510 HOST_WIDE_INT_M1U when shifting a negative value.
1512 2015-09-09 Mark Wielaard <mjw@redhat.com>
1514 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1517 2015-09-10 Jakub Jelinek <jakub@redhat.com>
1520 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1521 into OMP_FOR_PRE_BODY rather than before the loop.
1523 2015-09-09 Jakub Jelinek <jakub@redhat.com>
1526 * c-parser.c (c_parser_oacc_all_clauses,
1527 c_parser_omp_all_clauses): Remove invalid clause from
1528 list of clauses even if parser->error is set.
1531 * c-parser.c (c_parser_omp_clause_aligned,
1532 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1534 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1538 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1539 instead of c_parser_unary_expression. If the result is !lvalue_p,
1540 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1542 2015-09-04 Marek Polacek <polacek@redhat.com>
1545 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1547 2015-09-03 Martin Sebor <msebor@redhat.com>
1550 * c-typeck.c (convert_arguments, parser_build_unary_op,
1551 build_conditional_expr, c_cast_expr, convert_for_assignment,
1552 build_binary_op, _objc_common_truthvalue_conversion): Call
1554 (c_decl_implicit): Define.
1556 2015-09-02 Marek Polacek <polacek@redhat.com>
1559 * c-parser.c (c_parser_enum_specifier): Give a better error for
1562 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1564 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1566 2015-08-12 Marek Polacek <polacek@redhat.com>
1568 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1571 2015-08-03 Marek Polacek <polacek@redhat.com>
1574 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1576 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1578 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1580 * c-parser.c (c_parser_if_body): Take token_indent_info
1581 argument. Call warn_for_misleading_indentation even when the
1582 body is a semicolon. Extract token_indent_infos corresponding
1583 to the guard, body and next tokens. Adjust call to
1584 warn_for_misleading_indentation accordingly.
1585 (c_parser_else_body): Likewise.
1586 (c_parser_if_statement): Likewise.
1587 (c_parser_while_statement): Likewise.
1588 (c_parser_for_statement): Likewise.
1590 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1591 Manuel López-Ibáñez <manu@gcc.gnu.org>
1593 * c-decl.c (get_parm_info): Remove static var. Update warning
1596 2015-07-27 Marek Polacek <polacek@redhat.com>
1600 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1602 2015-07-20 Marek Polacek <polacek@redhat.com>
1605 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1606 (build_binary_op): Warn about left shift overflows.
1608 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1610 * c-array-notation.c: Adjust includes for flags.h changes.
1611 * c-objc-common.c: Likewise.
1613 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1615 * c-array-notation.c: Adjust includes.
1616 * c-aux-info.c: Likewise.
1617 * c-convert.c: Likewise.
1618 * c-decl.c: Likewise.
1619 * c-errors.c: Likewise.
1620 * c-lang.c: Likewise.
1621 * c-objc-common.c: Likewise.
1622 * c-parser.c: Likewise.
1623 * c-typeck.c: Likewise.
1625 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1628 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1630 2015-06-29 Marek Polacek <polacek@redhat.com>
1633 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1634 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1635 about -Wswitch-bool here.
1636 (do_case): Update c_add_case_label call.
1637 (c_finish_case): Update c_do_switch_warnings call.
1639 2015-06-27 Marek Polacek <polacek@redhat.com>
1641 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1643 2015-06-26 Marek Polacek <polacek@redhat.com>
1645 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1647 * c-typeck.c (array_to_pointer_conversion): Likewise.
1648 (build_unary_op): Likewise.
1649 (c_finish_return): Likewise.
1651 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1653 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1654 * c-parser.c: Likewise.
1656 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1658 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1659 instead of pointer_hash.
1660 (detect_field_duplicates): Likewise.
1662 2015-06-25 Marek Polacek <polacek@redhat.com>
1664 * c-array-notation.c: Use VAR_P throughout.
1665 * c-decl.c: Likewise.
1666 * c-objc-common.c: Likewise.
1667 * c-parser.c: Likewise.
1668 * c-typeck.c: Likewise.
1670 2015-06-25 Marek Polacek <polacek@redhat.com>
1672 * c-decl.c: Use is_global_var throughout.
1673 * c-parser.c: Likewise.
1674 * c-typeck.c: Likewise.
1676 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1678 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1679 * c-aux-info.c: Likewise.
1680 * c-convert.c: Likewise.
1681 * c-decl.c: Likewise.
1682 * c-errors.c: Likewise.
1683 * c-lang.c: Likewise.
1684 * c-objc-common.c: Likewise.
1685 * c-parser.c: Likewise.
1686 * c-typeck.c: Likewise.
1688 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
1691 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1694 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1696 * c-decl.c (pop_scope): Register the main translation unit
1697 through the new debug hook.
1699 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1701 * c-array-notation.c : Adjust include files.
1702 * c-aux-info.c : Likewise.
1703 * c-convert.c : Likewise.
1704 * c-decl.c : Likewise.
1705 * c-errors.c : Likewise.
1706 * c-lang.c : Likewise.
1707 * c-lang.h : Likewise.
1708 * c-objc-common.c : Likewise.
1709 * c-parser.c : Likewise.
1710 * c-typeck.c : Likewise.
1712 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1714 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1715 immediately clobber it.
1716 (c_write_global_declarations_1): Remove call to
1717 check_global_declaration_1.
1718 (c_write_global_declarations_2): Remove.
1719 (c_write_final_cleanups): Rename from c_write_global_declarations.
1720 Remove call to finalize_compilation_unit.
1721 Remove calls to debugging hooks.
1722 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1723 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1724 * c-tree.h: Remove c_write_global_declarations.
1726 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1728 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1729 * c-aux-info.c: Likewise.
1730 * c-convert.c: Likewise.
1731 * c-decl.c: Likewise.
1732 * c-errors.c: Likewise.
1733 * c-lang.c: Likewise.
1734 * c-objc-common.c: Likewise.
1735 * c-parser.c: Likewise.
1736 * c-typeck.c: Likewise.
1738 2015-06-04 Marek Polacek <polacek@redhat.com>
1741 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1744 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1746 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1747 Warn for empty struct.
1748 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1750 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1752 * c-decl.c (start_function): Call plugin before parsing.
1753 (finish_function): Call plugin after parsing.
1755 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1758 * c-decl.c (merge_decls): Merge DECL_COMMON.
1760 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1762 * Make-lang.in (check_gcc_pallelize): Define.
1764 2015-05-22 Marek Polacek <polacek@redhat.com>
1767 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1770 2015-05-21 Marek Polacek <polacek@redhat.com>
1772 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1775 2015-05-20 Marek Polacek <polacek@redhat.com>
1777 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1778 * c-typeck.c: Likewise.
1780 2015-05-19 Marek Polacek <polacek@redhat.com>
1782 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1784 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1787 * c-parser.c (c_parser_omp_for_loop): Don't add
1788 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1789 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1790 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1793 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1795 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
1798 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1801 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1804 2015-05-14 Marek Polacek <polacek@redhat.com>
1808 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1811 2015-05-12 David Malcolm <dmalcolm@redhat.com>
1813 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1814 to add a call to warn_for_misleading_indentation.
1815 (c_parser_else_body): Likewise, adding param "else_loc".
1816 (c_parser_if_statement): Check for misleading indentation.
1817 (c_parser_while_statement): Likewise.
1818 (c_parser_for_statement): Likewise.
1820 2015-05-08 Marek Polacek <polacek@redhat.com>
1823 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1824 (output_init_element): Likewise.
1826 2015-05-07 Marek Polacek <polacek@redhat.com>
1829 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1832 2015-04-30 Marek Polacek <polacek@redhat.com>
1834 * c-typeck.c (set_init_label): Call error_at instead of error and
1837 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1840 * c-typeck.c (c_build_va_arg): Clarify the error message.
1842 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1844 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1845 OMP_STANDALONE_CLAUSES.
1847 2015-04-28 Marek Polacek <polacek@redhat.com>
1849 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1851 2015-04-28 Marek Polacek <polacek@redhat.com>
1854 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1856 2015-04-25 Marek Polacek <polacek@redhat.com>
1859 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1862 2015-04-23 Marek Polacek <polacek@redhat.com>
1865 * c-decl.c (set_labels_context_r): New function.
1866 (store_parm_decls): Call it via walk_tree_without_duplicates.
1867 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1868 instead of create_tmp_var. Build TARGET_EXPR instead of
1870 (build_atomic_assign): Use create_tmp_var_raw instead of
1871 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1873 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1875 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1876 (c_parser_omp_target_update): Add missed %> to error_at ().
1878 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1881 * c-decl.c (c_default_pointer_mode): Remove definition.
1882 * c-tree.h (c_default_pointer_mode): Remove declaration.
1884 2015-03-27 Tobias Burnus <burnus@net-b.de>
1887 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1889 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1890 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1891 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1893 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1895 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1896 attribute for DECL_EXTERNAL VAR_DECLs.
1898 2015-03-11 Jakub Jelinek <jakub@redhat.com>
1900 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1903 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1906 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1907 before preparing arguments to warn_logical_not_parentheses.
1909 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1912 * c-typeck.c (parser_build_binary_op): Don't warn for
1913 !!x == y or !b == y where b is _Bool.
1915 2015-03-09 Marek Polacek <polacek@redhat.com>
1917 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1918 * c-decl.c (grokdeclarator): Likewise.
1919 * c-typeck.c (build_binary_op): Likewise.
1921 2015-02-27 Marek Polacek <polacek@redhat.com>
1924 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1926 2015-02-14 Marek Polacek <polacek@redhat.com>
1929 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1930 declared through a typedef name.
1932 2015-02-13 Marek Polacek <polacek@redhat.com>
1935 * c-decl.c (grokdeclarator): Print also the type when giving
1936 the error message about array's incomplete element type.
1938 2015-02-11 Jakub Jelinek <jakub@redhat.com>
1941 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1942 check in the POP macro.
1944 2015-02-09 Marek Polacek <polacek@redhat.com>
1947 * c-typeck.c (process_init_element): Don't always wrap
1948 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1949 initializing a range of elements.
1951 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1955 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1957 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
1959 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1960 processing enum declaration.
1962 2015-01-29 Marek Polacek <polacek@redhat.com>
1965 * c-typeck.c (pop_init_level): If constructor_elements has
1966 exactly one element with integer_zerop value, set constructor_zeroinit
1967 to 1. Remove braces around warning_init call.
1969 2015-01-27 Jakub Jelinek <jakub@redhat.com>
1972 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1973 of FUNCTION_DECLs with error_mark_node.
1975 2015-01-26 Jakub Jelinek <jakub@redhat.com>
1978 * c-typeck.c (convert_arguments): Return -1 if there are
1979 error_args, even if we've diagnosed too many arguments.
1981 2015-01-21 Richard Biener <rguenther@suse.de>
1984 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1985 for builtins the user declared correctly.
1987 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1988 Bernd Schmidt <bernds@codesourcery.com>
1989 Cesar Philippidis <cesar@codesourcery.com>
1990 James Norris <jnorris@codesourcery.com>
1991 Jakub Jelinek <jakub@redhat.com>
1992 Ilmir Usmanov <i.usmanov@samsung.com>
1994 * c-parser.c: Include "gomp-constants.h".
1995 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1996 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1997 Use OMP_CLAUSE_SET_MAP_KIND.
1998 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1999 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2000 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2001 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2002 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2003 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2004 "copyout", "create", "delete", "deviceptr", "gang", "host",
2005 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2006 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2007 "present_or_create", "pcreate", "seq", "self", "vector",
2008 "vector_length", "wait", "worker".
2009 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2010 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2011 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2012 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2013 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2014 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2015 (c_parser_oacc_data_clause_deviceptr)
2016 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2017 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2018 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2019 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2020 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2021 (c_parser_oacc_parallel, c_parser_oacc_update)
2022 (c_parser_oacc_wait): New functions.
2023 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2024 (c_finish_oacc_data): New prototypes.
2025 * c-typeck.c: Include "gomp-constants.h".
2026 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2027 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2028 OMP_CLAUSE_SET_MAP_KIND.
2029 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2030 (c_finish_oacc_data): New functions.
2031 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2032 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2033 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2034 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2035 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2036 GOMP_MAP_FORCE_DEVICEPTR.
2038 2015-01-09 Michael Collison <michael.collison@linaro.org>
2040 * c-array-notation.c: Include hash-set.h, machmode.h,
2041 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2042 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2043 * c-aux-info.c: Ditto.
2044 * c-convert.c: Ditto.
2046 * c-errors.c: Ditto.
2047 * c-lang.c: Dittoxs.
2048 * c-objc-common.c: Ditto.
2049 * c-parser.c: Ditto.
2050 * c-typeck.c: Include hash-set.h, machmode.h,
2051 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2052 fold-const.h, wide-int.h, inchash.h, real.h and
2053 fixed-value.h due to flattening of tree.h.
2055 2015-01-07 Marek Polacek <polacek@redhat.com>
2058 * c-typeck.c (process_init_element): Disallow initialization of
2059 a flexible array member with a string constant if the structure
2062 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2065 * c-typeck.c (convert_for_assignment, c_finish_return): For
2066 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2067 types also set in_late_binary_op around convert call.
2068 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2069 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2070 result on expr as last argument to ubsan_instrument_float_cast,
2071 if in_late_binary_op, don't use c_save_expr but save_expr.
2073 Update copyright years.
2075 2015-01-05 Marek Polacek <polacek@redhat.com>
2078 * c-typeck.c (build_array_ref): Pass loc down to
2079 warn_array_subscript_with_type_char.
2081 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
2083 * c-typeck.c: New behavious for pointers to arrays with qualifiers
2084 (common-pointer-type): For pointers to arrays take qualifiers from
2086 (build_conditional_expr): Add warnings for lost qualifiers.
2087 (comp-target-types): Allow pointers to arrays with different qualifiers.
2088 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
2089 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
2090 to PEDWARN_FOR_QUALIFIERS.
2092 2014-12-17 Jakub Jelinek <jakub@redhat.com>
2095 * c-convert.c: Include ubsan.h.
2096 (convert): For real -> integral casts and
2097 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2098 instead instrument the float cast directly.
2100 2014-11-29 Jakub Jelinek <jakub@redhat.com>
2102 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2103 c_finish_stmt_expr): Remove NULL last argument from
2104 create_tmp_var_raw and create_tmp_var calls.
2105 * c-array-notation.c (fix_builtin_array_notation_fn,
2106 build_array_notation_expr, fix_conditional_array_notations_1,
2107 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2109 2014-11-28 Marek Polacek <polacek@redhat.com>
2112 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2113 convert the right operand to integer type.
2115 2014-11-25 Marek Polacek <polacek@redhat.com>
2118 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2119 for inline functions.
2121 2014-11-21 Jakub Jelinek <jakub@redhat.com>
2124 * c-typeck.c (build_array_ref): Adjust
2125 convert_vector_to_pointer_for_subscript caller. If it returns true,
2126 call non_lvalue_loc on the result.
2128 2014-11-11 Richard Biener <rguenther@suse.de>
2130 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2133 2014-11-10 Andi Kleen <ak@linux.intel.com>
2136 * c-parser.c (c_parser_statement_after_labels): Call
2138 (c_parser_if_statement): Dito.
2139 (c_parser_switch_statement): Dito.
2140 (c_parser_while_statement): Dito.
2141 (c_parser_do_statement): Dito.
2142 (c_parser_for_statement): Dito.
2143 * c-typeck.c (c_finish_loop): Dito.
2145 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2147 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2148 OPT_Wshift_count_overflow in the warnings.
2150 2014-10-30 Marek Polacek <polacek@redhat.com>
2152 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2153 print the stripped version as well, if they're not the same.
2155 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2157 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2160 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
2162 * c-decl.c: Adjust include files.
2163 * c-parser.c: Ditto.
2165 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2166 Tom Tromey <tromey@redhat.com>
2168 * c-tree.h (enum c_oracle_request): New.
2169 (c_binding_oracle_function): New typedef.
2170 (c_binding_oracle, c_pushtag, c_bind): Declare.
2171 * c-decl.c (c_binding_oracle): New global.
2172 (I_SYMBOL_CHECKED): New macro.
2173 (i_symbol_binding): New function.
2174 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2175 (I_TAG_CHECKED): New macro.
2176 (i_tag_binding): New function.
2177 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2178 (I_LABEL_CHECKED): New macro.
2179 (i_label_binding): New function.
2180 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2181 (c_print_identifier): Save and restore c_binding_oracle.
2182 (c_pushtag, c_bind): New functions.
2184 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
2186 * c-typeck.c: Adjust include files.
2188 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2191 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2192 initialization here...
2193 (c_initialize_diagnostics): ... but here. Set defaults after
2194 building pretty-printer.
2196 2014-10-23 Marek Polacek <polacek@redhat.com>
2199 * c-decl.c (pop_scope): Don't print warning in external_scope.
2201 2014-10-19 Marek Polacek <polacek@redhat.com>
2204 * c-typeck.c (output_init_element): Allow initializing objects with
2205 static storage duration with compound literals even in C99 and add
2208 2014-10-17 Marek Polacek <polacek@redhat.com>
2211 * c-typeck.c (digest_init): Allow initializing objects with static
2212 storage duration with compound literals even in C99 and add pedwarn
2215 2014-10-17 Marek Polacek <polacek@redhat.com>
2218 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2219 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2220 error multiple times. Print the type.
2222 2014-10-17 Marek Polacek <polacek@redhat.com>
2225 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2228 2014-10-17 Marek Polacek <polacek@redhat.com>
2230 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2231 (start_function): Use OPT_Wimplicit_int instead of 0.
2232 (store_parm_decls_oldstyle): Likewise.
2234 2014-10-17 Alan Modra <amodra@gmail.com>
2237 * c-decl.c (merge_decls): Don't merge section name or tls model
2238 to newdecl symtab node, instead merge to olddecl. Override
2239 existing olddecl section name. Set tls_model for all thread-local
2240 vars, not just OMP thread-private ones. Remove incorrect comment.
2242 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
2244 * c-decl.c: Adjust include files.
2246 2014-10-14 DJ Delorie <dj@redhat.com>
2248 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2249 (c_token_starts_typename): Check all __intN, not just __int128.
2250 (c_token_starts_declspecs): Likewise.
2251 (c_parser_declspecs): Likewise.
2252 (c_parser_attribute_any_word): Likewise.
2253 (c_parser_objc_selector): Likewise.
2254 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2255 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2257 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2259 (finish_declspecs): Likewise.
2261 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2263 * c-parser.c (c_parser_all_labels): New function to replace
2265 (c_parser_statement): Call the new function.
2267 2014-10-09 Marek Polacek <polacek@redhat.com>
2270 * c-typeck.c (pop_init_level): Don't warn about initializing
2273 2014-10-07 Marek Polacek <polacek@redhat.com>
2276 * c-decl.c (header_for_builtin_fn): New function.
2277 (implicitly_declare): Suggest which header to include.
2279 2014-10-07 Marek Polacek <polacek@redhat.com>
2281 * c-convert.c (convert): Use error_operand_p.
2282 * c-typeck.c (require_complete_type): Likewise.
2283 (really_atomic_lvalue): Likewise.
2284 (digest_init): Likewise.
2285 (handle_omp_array_sections_1): Likewise.
2287 2014-10-03 Marek Polacek <polacek@redhat.com>
2290 * c-decl.c (pop_scope): Don't warn about "inline function declared
2291 but never defined" for functions marked with gnu_inline attribute.
2293 2014-09-25 Jakub Jelinek <jakub@redhat.com>
2296 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2297 on low_bound and length.
2299 2014-09-24 Marek Polacek <polacek@redhat.com>
2303 * c-parser.c: Don't define CPP_KEYWORD.
2304 (c_parser_switch_statement): Pass original type to c_finish_case.
2305 * c-tree.h (c_finish_case): Update declaration.
2306 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2307 conditionally to c_do_switch_warnings.
2309 2014-09-03 Marek Polacek <polacek@redhat.com>
2312 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2315 2014-09-02 Jakub Jelinek <jakub@redhat.com>
2316 Balaji V. Iyer <balaji.v.iyer@intel.com>
2317 Igor Zamyatin <igor.zamyatin@intel.com>
2319 * c-parser.c (c_parser_cilk_for): New function.
2320 (c_parser_cilk_grainsize): Likewise.
2321 (c_get_temp_regvar): Likewise.
2322 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2323 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2324 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2325 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2328 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2330 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2331 with using HOST_WIDE_INT without truncation to 'int'
2333 2014-08-22 Marek Polacek <polacek@redhat.com>
2336 * c-typeck.c (parser_build_binary_op): Adjust call to
2337 warn_logical_not_parentheses.
2339 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2342 * c-parser.c (c_parser_array_notation): Check for correct
2343 type of an array added.
2345 2014-08-19 Marek Polacek <polacek@redhat.com>
2348 * c-typeck.c (build_binary_op): If either operand of a comparison
2349 is a boolean expression, call maybe_warn_bool_compare.
2351 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2354 * c-typeck.c (build_c_cast): Do a conversion even when the
2355 TYPE_MAIN_VARIANTs are the same.
2357 2014-08-19 Marek Polacek <polacek@redhat.com>
2359 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2360 pedwarn_c99 instead of pedwarn.
2361 (grokfield): Likewise.
2362 (warn_defaults_to): New function.
2363 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2364 Unconditionally call pedwarn_c99 instead of pedwarn.
2365 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2366 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2367 check flag_isoc11 before.
2368 * c-errors.c (pedwarn_c99): Change the return type to bool.
2369 Handle -Wc99-c11-compat.
2370 * c-parser.c (disable_extension_diagnostics): Handle
2371 warn_c99_c11_compat.
2372 (restore_extension_diagnostics): Likewise.
2373 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2374 instead of pedwarn, don't check flag_isoc11 before.
2375 (c_parser_declspecs): Likewise.
2376 (c_parser_alignas_specifier): Likewise.
2377 (c_parser_alignof_expression): Likewise.
2378 (c_parser_generic_selection): Likewise.
2379 * c-tree.h (pedwarn_c99): Update declaration.
2380 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2383 2014-08-19 Marek Polacek <polacek@redhat.com>
2385 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2387 * c-errors.c: Include "opts.h".
2388 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2389 * c-parser.c (disable_extension_diagnostics): Handle negative value
2390 of warn_c90_c99_compat, too.
2391 (restore_extension_diagnostics): Likewise.
2392 (c_parser_compound_statement_nostart): Pass
2393 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2395 2014-08-12 Marek Polacek <polacek@redhat.com>
2397 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2399 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2401 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2403 2014-08-10 Marek Polacek <polacek@redhat.com>
2406 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2407 Call pedwarn_c90 instead of pedwarn.
2408 (check_bitfield_type_and_width): Likewise.
2409 (declspecs_add_qual): Likewise.
2410 (declspecs_add_type): Likewise.
2411 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2412 Adjust to only call pedwarn_c90.
2413 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2414 pedwarn_c90 instead of pedwarn.
2415 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2416 * c-parser.c (disable_extension_diagnostics): Handle
2417 warn_c90_c99_compat.
2418 (restore_extension_diagnostics): Likewise.
2419 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2420 pedwarn_c90 instead of pedwarn.
2421 (c_parser_initelt): Likewise.
2422 (c_parser_postfix_expression): Likewise.
2423 (c_parser_postfix_expression_after_paren_type): Likewise.
2424 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2425 * c-tree.h: Fix formatting.
2426 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2427 pedwarn_c90 instead of pedwarn.
2429 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2431 * c-typeck.c: Remove include of pointer-set.h.
2433 2014-08-07 Marek Polacek <polacek@redhat.com>
2435 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2437 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2439 * c-typeck.c: Use hash_map instead of pointer_map.
2441 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2443 * c-decl.c: Use hash_set instead of pointer_set.
2445 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2448 * c-array-notation.c (expand_array_notations): Handling
2451 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
2454 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2457 2014-07-30 Tom Tromey <tromey@redhat.com>
2459 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2461 (really_start_incremental_init, push_init_level): Initialize
2463 (pop_init_level): Set global designator_depth.
2464 (process_init_element): Check for designated_init attribute.
2466 2014-07-20 Marek Polacek <polacek@redhat.com>
2469 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2470 (implicitly_declare): Pass location to implicit_decl_warning.
2472 2014-07-14 Jakub Jelinek <jakub@redhat.com>
2475 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2476 If non-NULL, call c_parser_check_literal_zero.
2477 (c_parser_check_literal_zero): New function.
2478 (c_parser_postfix_expression_after_primary): Adjust
2479 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2481 2014-07-06 Marek Polacek <polacek@redhat.com>
2484 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2485 * c-tree.h (C_ARRAY_PARAMETER): Define.
2486 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2489 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
2490 Chen Gang <gang.chen.5i5j@gmail.com>
2492 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2495 2014-07-01 Marek Polacek <polacek@redhat.com>
2497 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2498 instead of 0 to WARN_FOR_ASSIGNMENT.
2500 2014-07-01 Marek Polacek <polacek@redhat.com>
2503 * c-typeck.c (convert_for_assignment): Pass
2504 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2506 2014-06-30 Marek Polacek <polacek@redhat.com>
2508 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2509 has no_sanitize_undefined attribute.
2511 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2514 * c-array-notation.c (fix_builtin_array_notation_fn):
2515 Check for 0 arguments in builtin call. Check that bultin argument is
2517 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2520 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2522 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2523 qualifiers in __auto_type for atomic types.
2524 (c_parser_typeof_specifier): Discard all type qualifiers in
2525 __typeof__ for atomic types.
2527 2014-06-25 Marek Polacek <polacek@redhat.com>
2530 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2531 the return expression to c_finish_return.
2533 2014-06-25 Jakub Jelinek <jakub@redhat.com>
2535 * c-typeck.c (c_finish_omp_clauses): Make sure
2536 OMP_CLAUSE_LINEAR_STEP has correct type.
2538 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2542 2014-06-24 Jakub Jelinek <jakub@redhat.com>
2544 * c-parser.c (c_parser_omp_for_loop): For
2545 #pragma omp parallel for simd move lastprivate clause from parallel
2546 to for rather than simd.
2548 2014-06-23 Marek Polacek <polacek@redhat.com>
2550 * c-typeck.c (parser_build_binary_op): Don't call
2551 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2553 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2555 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2556 * c-decl.c (merge_decls): Likewise.
2558 2014-06-09 Marek Polacek <polacek@redhat.com>
2561 * c-typeck.c (error_init): Call inform instead of error_at.
2562 (pedwarn_init): Call inform instead of pedwarn.
2563 (warning_init): Call inform instead of warning_at.
2565 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2567 * c-decl.c (merge_decls): Use set_decl_section_name.
2568 (duplicate_decls): Remove node if it exists.
2570 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2573 * c-typeck.c (push_init_level, process_init_element,
2574 pop_init_level): Correct check for zero initialization, move
2575 missing brace warning to respect zero initialization.
2577 2014-06-05 Marek Polacek <polacek@redhat.com>
2580 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2582 2014-06-05 Marek Polacek <polacek@redhat.com>
2585 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2586 on the left hand side operand of a comparison.
2588 2014-06-05 Marek Polacek <polacek@redhat.com>
2591 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2592 Print note only if the warning was printed.
2594 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2597 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2600 2014-06-03 Marek Polacek <polacek@redhat.com>
2603 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2605 * c-tree.h (c_start_case): Update.
2606 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2607 switch condition has boolean value.
2609 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2611 * c-decl.c: Include builtins.h.
2612 * c-parser.c: Likewise.
2614 2014-05-27 Marek Polacek <polacek@redhat.com>
2617 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2618 error and warning calls to error_at and warning_at. Pass location of
2619 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2620 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2621 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2623 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2626 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2627 function parameters.
2629 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2631 * c-decl.c (merge_decls): Preserve symtab node pointers.
2632 (duplicate_decls): Free new decl.
2634 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2636 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2639 * c-parser.c (c_parser_omp_target): Return bool values.
2641 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2643 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2644 num_teams_loc variable to num_thread_limit_loc.
2646 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2648 * c-array-notation.c (expand_array_notations): Use void_node
2649 instead of void_zero_node.
2651 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2653 * c-decl.c (finish_struct): Adjust.
2654 (finish_enum): Likewise.
2656 (record_inline_static): Likewise.
2657 (push_scope): Likewise.
2658 (make_label): Likewise.
2659 (lookup_label_for_goto): Likewise.
2660 (finish_struct): Likewise.
2661 (finish_enum): Likewise.
2662 (store_parm_decls): Likewise.
2663 (c_push_function_context): Likewise.
2664 * c-lang.h: Remove usage of variable_size gty attribute.
2665 * c-parser.c (c_parse_init): Adjust.
2666 (c_parse_file): Likewise.
2668 2014-05-13 Marek Polacek <polacek@redhat.com>
2671 * c-typeck.c (convert_for_assignment): Pass location to
2672 WARN_FOR_ASSIGNMENT instead of input_location.
2674 2014-05-10 Marek Polacek <polacek@redhat.com>
2676 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2677 maybe_warn_string_init.
2678 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2679 maybe_warn_string_init.
2680 * c-tree.h (maybe_warn_string_init): Update declaration.
2681 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2682 Call pedwarn_init with loc instead of with input_location.
2683 (digest_init): Pass init_loc to maybe_warn_string_init.
2684 (pop_init_level): Call pedwarn_init with loc instead of with
2686 (set_init_index): Likewise.
2687 (process_init_element): Likewise.
2689 2014-05-09 Marek Polacek <polacek@redhat.com>
2692 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2693 (c_parser_initelt): Pass location to set_init_label. Pass array index
2694 location to set_init_index.
2695 * c-tree.h (push_init_level): Update declaration.
2696 (pop_init_level): Likewise.
2697 (set_init_index): Likewise.
2698 (set_init_label): Likewise.
2699 * c-typeck.c (error_init): Add location parameter. Call error_at
2701 (digest_init): Pass init_loc to error_init.
2702 (really_start_incremental_init):
2703 (push_init_level): Add location parameter. Pass loc to pop_init_level
2705 (pop_init_level): Likewise.
2706 (set_designator): Add location parameter. Pass loc to pop_init_level,
2707 push_init_level, and error_init.
2708 (set_init_index): Add location parameter. Pass loc to error_init and
2710 (set_init_label): Likewise.
2711 (output_init_element): Pass loc to error_init.
2712 (process_init_element): Pass loc to error_init, pop_init_level,
2713 pedwarn_init, and push_init_level.
2715 2014-05-09 Marek Polacek <polacek@redhat.com>
2718 * c-parser.c (c_parser_attributes): Parse the arguments as an
2719 expression-list if the attribute takes identifier.
2721 2014-05-08 Marek Polacek <polacek@redhat.com>
2724 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2727 2014-05-08 Marek Polacek <polacek@redhat.com>
2730 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2733 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2734 Mike Stump <mikestump@comcast.net>
2735 Richard Sandiford <rdsandiford@googlemail.com>
2737 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2738 (finish_enum): Use wide-int interfaces.
2739 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2740 * c-typeck.c (build_c_cast): Likewise.
2741 (set_nonincremental_init_from_string): Likewise.
2742 (c_tree_equal): Likewise.
2744 2014-05-02 Marek Polacek <polacek@redhat.com>
2747 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2748 Return size_one_node when the type is not complete.
2749 (pointer_diff): Remove comment.
2750 (build_unary_op): Improve error messages.
2752 2014-05-02 Marek Polacek <polacek@redhat.com>
2754 * c-typeck.c (c_finish_return): Separate warning_at calls.
2756 2014-05-02 Marek Polacek <polacek@redhat.com>
2758 * c-tree.h (error_init): Remove declaration.
2759 (pedwarn_init): Likewise.
2760 * c-typeck.c (error_init): Make static and move above.
2761 (pedwarn_init): Likewise.
2762 (warning_init): Move above.
2763 (maybe_warn_string_init): Likewise.
2765 2014-05-01 Jeff Law <law@redhat.com>
2769 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2770 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2773 2014-05-02 Marek Polacek <polacek@redhat.com>
2776 * c-typeck.c (push_init_level): Set constructor_designated to
2777 p->designated for structures.
2779 2014-05-01 Marek Polacek <polacek@redhat.com>
2782 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2783 function-definition has an attribute after the declarator.
2785 2014-05-01 Marek Polacek <polacek@redhat.com>
2788 * c-typeck.c (warning_init): Add location_t parameter. Call
2789 warning_at instead of warning.
2790 (push_init_level): Pass input_location to warning_init.
2791 (add_pending_init): Add location_t parameter. Pass loc to
2793 (set_nonincremental_init): Pass input_location to add_pending_init.
2794 (set_nonincremental_init_from_string): Likewise.
2795 (output_init_element): Pass loc to warning_init and to
2798 2014-05-01 Marek Polacek <polacek@redhat.com>
2801 * c-typeck.c (c_finish_return): Distinguish between label and variable
2802 when warning about returning local address.
2804 2014-05-01 Marek Polacek <polacek@redhat.com>
2807 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2810 2014-05-01 Marek Polacek <polacek@redhat.com>
2813 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2814 instead of 0 to WARN_FOR_QUALIFIERS.
2816 2014-05-01 Marek Polacek <polacek@redhat.com>
2819 * c-typeck.c (default_conversion): Use better location for
2822 2014-04-30 Marek Polacek <polacek@redhat.com>
2824 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2825 also when SANITIZE_FLOAT_DIVIDE is on.
2827 2014-04-30 Marek Polacek <polacek@redhat.com>
2830 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2831 and pedwarn_init. Use loc insted of input_location.
2833 2014-04-30 Marek Polacek <polacek@redhat.com>
2836 * c-typeck.c (build_binary_op): Use location when warning about
2839 2014-04-25 Marek Polacek <polacek@redhat.com>
2842 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2843 always_inline/noinline and hot/cold attributes.
2845 2014-04-25 Marek Polacek <polacek@redhat.com>
2848 * c-parser.c (c_parser_initelt): Pass input_location to
2849 process_init_element.
2850 (c_parser_initval): Pass loc to process_init_element.
2851 * c-tree.h (process_init_element): Adjust declaration.
2852 * c-typeck.c (push_init_level): Pass input_location to
2853 process_init_element.
2854 (pop_init_level): Likewise.
2855 (set_designator): Likewise.
2856 (output_init_element): Add location_t parameter. Pass loc to
2858 (output_pending_init_elements): Pass input_location to
2859 output_init_element.
2860 (process_init_element): Add location_t parameter. Pass loc to
2861 output_init_element.
2863 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2865 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2866 atomic-clause, allow comma in between atomic-clause and
2869 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2872 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2873 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2875 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2878 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2879 create_tmp_var instead build_decl for creating temps.
2880 (build_array_notation_expr): Likewise.
2881 (fix_conditional_array_notations_1): Likewise.
2882 (fix_array_notation_expr): Likewise.
2883 (fix_array_notation_call_expr): Likewise.
2885 2014-03-28 Jakub Jelinek <jakub@redhat.com>
2888 * c-tree.h (c_build_function_call_vec): New prototype.
2889 * c-typeck.c (build_function_call_vec): Don't call
2890 resolve_overloaded_builtin here.
2891 (c_build_function_call_vec): New wrapper function around
2892 build_function_call_vec. Call resolve_overloaded_builtin here.
2893 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2894 Call c_build_function_call_vec instead of build_function_call_vec.
2895 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2896 * c-decl.c (finish_decl): Likewise.
2898 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2901 * c-typeck.c: Use correct format string in cast-qual warning
2903 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2905 * c-decl.c (c_decl_attributes): Use
2906 lang_hooks.types.omp_mappable_type.
2907 * c-typeck.c (c_finish_omp_clauses): Likewise.
2909 2014-03-06 Marek Polacek <polacek@redhat.com>
2912 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2913 of checking tree code.
2915 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2917 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2918 (c_parser_parameter_declaration): Likewise.
2920 2014-02-19 Marek Polacek <polacek@redhat.com>
2923 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2924 Call mark_exp_read on exp.value.
2925 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2926 TREE_ADDRESSABLE on old instead of val.
2927 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2929 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2931 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2932 C_EXPR_APPEND by vec_safe_push.
2933 * c-tree.h (C_EXPR_APPEND): Remove.
2935 2014-01-31 Marek Polacek <polacek@redhat.com>
2938 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2939 build_function_call_vec.
2940 (build_function_call): Likewise.
2941 (build_atomic_assign): Likewise.
2942 (build_function_call_vec): Add arg_loc parameter. Use it.
2943 (convert_arguments): Likewise.
2944 (convert_for_assignment): Rename rhs_loc to expr_loc.
2945 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2946 (c_parser_objc_keywordexpr): Likewise.
2947 (c_parser_postfix_expression_after_primary): Call
2948 build_function_call_vec with expr_loc rather than op_loc.
2949 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2950 build_function_call_vec.
2951 (c_parser_expr_list): Add locations parameter. Fill it with locations
2952 of function arguments.
2953 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2955 2014-01-30 Marek Polacek <polacek@redhat.com>
2958 * c-typeck.c (build_function_call_vec): Use loc parameter.
2959 (convert_arguments): Add location parameter. Use it.
2960 (ep_convert_and_check): Likewise.
2961 (build_atomic_assign): Adjust convert_for_assignment call.
2962 (build_modify_expr): Likewise.
2963 (digest_init): Likewise.
2964 (c_finish_return): Likewise.
2965 (build_conditional_expr): Adjust ep_convert_and_check calls.
2966 (convert_for_assignment): Add rhs_loc parameter. Use it.
2967 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2970 2014-01-30 Richard Biener <rguenther@suse.de>
2973 * c-typeck.c (build_function_call_vec): Do not replace calls
2974 to a function via an incompatible type with a runtime abort.
2976 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2978 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2979 flag_enable_cilkplus with flag_cilkplus.
2980 (c_parser_direct_declarator_inner): Likewise.
2981 (c_parser_attribute_any_word): Likewise.
2982 (c_parser_attributes): Likewise.
2983 (c_parser_compound_statement): Likewise.
2984 (c_parser_statement_after_labels): Likewise.
2985 (c_parser_if_statement): Likewise.
2986 (c_parser_switch_statement): Likewise.
2987 (c_parser_do_statement): Likewise.
2988 (c_parser_for_statement): Likewise.
2989 (c_parser_unary_expression): Likewise.
2990 (c_parser_postfix_expression): Likewise.
2991 (c_parser_postfix_expression_after_primary): Likewise.
2992 (c_parser_postfix_expression_after_primary): Likewise.
2993 (c_parser_omp_clause_name): Likewise.
2994 (c_finish_omp_declare_simd): Likewise.
2995 (c_parser_cilk_verify_simd): Likewise.
2996 * c-typeck.c (build_array_ref): Likewise.
2997 (build_function_call_vec): Likewise.
2998 (convert_arguments): Likewise.
2999 (build_compound_expr): Likewise.
3000 (c_finish_return): Likewise.
3001 (c_finish_if_stmt): Likewise.
3002 (c_finish_loop): Likewise.
3003 (build_binary_op): Likewise.
3005 2014-01-23 Marek Polacek <polacek@redhat.com>
3008 * c-typeck.c (parser_build_binary_op): Use location instead of
3010 (build_binary_op): Pass location to shorten_compare.
3012 2014-01-23 Marek Polacek <polacek@redhat.com>
3015 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3018 2014-01-23 Marek Polacek <polacek@redhat.com>
3021 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3022 of a comma expression.
3023 (emit_side_effect_warnings): Likewise.
3025 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3028 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3029 function to use walk_tree and moved a lot of its functionality to
3030 expand_array_notations.
3031 (expand_array_notations): New function.
3033 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3035 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3036 attribute an attribute without value.
3038 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3041 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3042 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3044 2014-01-22 Marek Polacek <polacek@redhat.com>
3047 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3048 of remove_c_maybe_const_expr on op1 and op2.
3050 2014-01-15 Jakub Jelinek <jakub@redhat.com>
3053 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3054 effects, preevaluate rhs using SAVE_EXPR first.
3056 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3059 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3060 statements with if-elseif statements.
3062 2014-01-06 Marek Polacek <polacek@redhat.com>
3065 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3066 defined bit-field types only in ISO C.
3068 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3070 Update copyright years
3072 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3074 * c-array-notation.c: Use the standard form for the copyright notice.
3076 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3078 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3079 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3080 field in parser is not empty. If not-empty, call the function
3081 c_parser_finish_omp_declare_simd.
3082 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3083 between SIMD-enabled functions and #pragma simd. Added new parameter.
3084 (c_parser_cilk_all_clauses): Modified the usage of the function
3085 c_parser_cilk_clause_vectorlength as mentioned above.
3086 (c_parser_cilk_simd_fn_vector_attrs): New function.
3087 (c_finish_cilk_simd_fn_tokens): Likewise.
3088 (is_cilkplus_vector_p): Likewise.
3089 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3090 "nomask," and "mask" strings in clause name.
3091 (c_parser_omp_all_clauses): Added 3 new case statements:
3092 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3093 PRAGMA_CILK_CLAUSE_NOMASK.
3094 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3095 check for vector attribute and if so call the function
3096 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3097 called the function c_finish_cilk_simd_fn_tokens.
3098 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3099 parser field is non-empty. If so, parse them as you would parse
3100 the omp declare simd pragma.
3101 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3102 Added a check when step is a parameter and flag it as error.
3103 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3104 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3107 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3109 * c-parser.c (c_parser_omp_parallel): Fix description.
3111 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3113 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3114 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3115 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3116 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3118 2013-12-04 Joseph Myers <joseph@codesourcery.com>
3121 * c-parser.c (c_parser_alignas_specifier): Use
3122 c_sizeof_or_alignof_type instead of c_alignof.
3123 (c_parser_alignof_expression): Likewise, with min_alignof
3124 parameter depending on alignof spelling used.
3126 2013-12-04 Marek Polacek <polacek@redhat.com>
3129 * c-decl.c (start_function): Don't warn for missing prototype for
3132 2013-12-03 Marek Polacek <polacek@redhat.com>
3135 * c-decl.c (build_compound_literal): Allow compound literals with
3136 empty initial value.
3138 2013-12-02 Joseph Myers <joseph@codesourcery.com>
3141 * c-typeck.c (build_modify_expr): Diagnose assignment to
3142 expression with array type.
3144 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3147 * c-typeck.c (process_init_element): Do not treat a string as
3148 initializing a whole array when used with a designator for an
3151 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3154 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3155 an inline function following a static declaration.
3157 2013-11-28 Jakub Jelinek <jakub@redhat.com>
3160 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3161 to p_name before calling c_parser_omp_teams instead of after.
3162 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3163 argument. Remove unused p_name variable.
3165 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
3166 Jakub Jelinek <jakub@redhat.com>
3168 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3169 external_scope is NULL.
3171 2013-11-27 Tom de Vries <tom@codesourcery.com>
3172 Marc Glisse <marc.glisse@inria.fr>
3175 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3177 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
3179 * c-typeck.c: Add required include files from gimple.h.
3181 2013-11-22 David Malcolm <dmalcolm@redhat.com>
3183 * c-decl.c (define_label, shadow_tag_warned)
3184 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3185 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3186 (declspecs_add_type): Remove use of in_system_header macro.
3187 * c-parser.c (c_parser_unary_expression): Likewise.
3188 * c-typeck.c (store_init_value, process_init_element)
3189 (c_start_case): Likewise.
3191 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3194 * c-parser.c (c_parser_set_source_position_from_token): Remove
3195 reference to in_system_header from comment.
3197 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3199 * c-decl.c (grokdeclarator): Update comment to refer to
3200 tree_to_[su]hwi rather than tree_low_cst.
3202 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3204 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3205 tree_to_uhwi throughout.
3207 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3209 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3212 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3214 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3217 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
3219 * c-parser.c (c_parser_cilk_simd): New.
3220 (c_parser_cilk_verify_simd): New.
3221 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3222 (c_parser_omp_for_loop): Add case for NE_EXPR.
3223 Set c_break_label for CILK_SIMD.
3224 (c_parser_cilk_clause_vectorlength): New.
3225 (c_parser_cilk_clause_linear): New.
3226 (c_parser_cilk_clause_name): New.
3227 (c_parser_cilk_all_clauses): New.
3228 * c-typeck.c (build_unary_op): Pass location argument to
3230 (build_modify_expr): Same.
3231 (build_asm_expr): Same.
3232 (c_finish_bc_stmt): Error on break/continue in loops.
3234 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
3236 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3238 2013-11-14 Diego Novillo <dnovillo@google.com>
3240 * c-decl.c: Include print-tree.h.
3241 Include stor-layout.h.
3244 Include stringpool.h.
3245 * c-lang.c: Include fold-const.h.
3246 * c-parser.c: Include stringpool.h.
3248 Include stor-layout.h.
3250 Include trans-mem.h.
3251 * c-typeck.c: Include stor-layout.h.
3252 Include trans-mem.h.
3256 2013-11-13 Joseph Myers <joseph@codesourcery.com>
3258 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3259 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3261 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3262 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3264 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3265 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3266 (c_parser_declarator, c_parser_direct_declarator_inner)
3267 (c_parser_parameter_declaration, c_parser_type_name): All callers
3269 (c_parser_declaration_or_fndef): Handle declarations with type
3270 determined from the initializer.
3272 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
3274 * c-typeck.c: Include gimplify.h.
3276 2013-11-12 Joseph Myers <joseph@codesourcery.com>
3278 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3279 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3281 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3282 or _Thread_local as appropriate in diagnostics.
3283 (build_null_declspecs): Initialize ret->thread_gnu_p.
3284 (declspecs_add_scspec): Handle either __thread or _Thread_local
3285 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3286 pedantic. Do not disallow _Thread_local extern and _Thread_local
3289 2013-11-07 Joseph Myers <joseph@codesourcery.com>
3290 Andrew MacLeod <amacleod@redhat.com>
3292 * c-aux-info.c (gen_type): Handle atomic qualifier.
3293 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3294 qualifiers when compating types.
3295 (shadow_tag_warned): Handle atomic_p in declspecs.
3296 (quals_from_declspecs): Likewise.
3297 (start_decl): Use c_type_promotes_to when promoting argument
3299 (grokdeclarator): Handle _Atomic.
3300 (get_parm_info): Diagnose any qualifier on "void" as only
3302 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3303 comparing types. Use c_type_promotes_to when promoting argument
3305 (finish_function): Use c_type_promotes_to when promoting argument
3307 (build_null_declspecs): Handle atomic_p in declspecs.
3308 (declspecs_add_qual): Handle RID_ATOMIC.
3309 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3310 (c_token_starts_declspecs): Handle RID_ATOMIC.
3311 (c_parser_declspecs): Handle atomic type specifiers and
3313 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3314 from types of expressions with atomic type.
3315 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3316 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3317 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3318 (c_parser_statement_after_labels, c_parser_switch_statement)
3319 (c_parser_for_statement, c_parser_expr_no_commas)
3320 (c_parser_conditional_expression, c_parser_binary_expression)
3321 (c_parser_cast_expression, c_parser_unary_expression)
3322 (c_parser_postfix_expression)
3323 (c_parser_postfix_expression_after_primary, c_parser_expression):
3324 Use convert_lvalue_to_rvalue.
3325 (c_parser_expression_conv, c_parser_expr_list): Document
3326 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3327 (c_parser_objc_synchronized_statement): Use
3328 convert_lvalue_to_rvalue.
3329 (c_parser_objc_selector): Handle RID_ATOMIC.
3330 (c_parser_objc_receiver, c_parser_array_notation): Use
3331 convert_lvalue_to_rvalue.
3332 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3333 _Atomic (type-name).
3334 (struct c_declspecs): Add atomic_p field.
3335 (convert_lvalue_to_rvalue): Declare.
3336 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3337 corresponding atomic types.
3338 (qualify_type): Don't add _Atomic qualifiers from second argument.
3339 (comp_target_types): Do not allow _Atomic mismatches.
3340 (type_lists_compatible_p): Do not remove atomic qualifiers when
3342 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3343 (build_atomic_assign): New functions.
3344 (build_unary_op): Use build_atomic_assign for atomic increment and
3346 (build_conditional_expr): Do not treat _Atomic void as a qualified
3348 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3349 (find_anonymous_field_with_type, convert_to_anonymous_field)
3350 (convert_for_assignment): Do not remove atomic qualifiers when
3352 (digest_init): Do not accept initialization of arrays of atomic
3353 elements by string constants.
3354 (build_asm_expr): Use convert_lvalue_to_rvalue.
3355 (build_binary_op): Do not treat _Atomic void as a qualified
3358 2013-11-06 DJ Delorie <dj@redhat.com>
3360 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3361 both explicit and builtin, print the location of the explicit one.
3363 2013-11-05 Tobias Burnus <burnus@net-b.de>
3365 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3366 c_parser_omp_distribute, c_parser_omp_teams,
3367 c_parser_omp_target, c_parser_omp_declare): Handle
3370 2013-11-03 Marek Polacek <polacek@redhat.com>
3372 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3374 2013-11-01 Jakub Jelinek <jakub@redhat.com>
3376 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3377 check_dup_generic at the end, unless remove is true.
3378 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3380 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3382 2013-10-31 Jakub Jelinek <jakub@redhat.com>
3384 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3385 with decl that is not pointer nor array.
3387 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3389 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3390 a spawning function is found.
3391 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3392 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3393 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3394 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3396 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3397 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3399 (c_finish_return): Added a check to reject _Cilk_spawn in return
3401 (build_cilk_spawn): New function.
3402 (build_cilk_sync): Likewise.
3403 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3405 2013-10-27 Tobias Burnus <burnus@net-b.de>
3408 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3409 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3410 (c_parser_statement_after_labels): Update calls.
3412 2013-10-24 Tobias Burnus <burnus@net-b.de>
3415 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3416 Handle PRAGMA_IVDEP.
3417 (c_parser_statement_after_labels): Update call.
3419 2013-10-24 Marek Polacek <polacek@redhat.com>
3421 * c-parser.c (c_parser_struct_declaration): Add a comment.
3422 (c_parser_declarator): Don't allow _Alignas here.
3424 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
3426 * c-parser.c: Include omp-low.h.
3427 * c-typeck.c: Likewise.
3429 2013-10-17 Marek Polacek <polacek@redhat.com>
3432 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3433 Document syntax of the array-declarator.
3434 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3436 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3437 (c_parser_struct_declaration): Likewise.
3438 (c_parser_declarator): Likewise.
3439 (c_parser_direct_declarator_inner): Likewise.
3440 (c_parser_parameter_declaration): Likewise.
3441 (c_parser_type_name): Likewise.
3443 2013-10-11 Jakub Jelinek <jakub@redhat.com>
3445 * c-lang.h (current_omp_declare_target_attribute): New extern
3447 * c-parser.c: Include c-lang.h.
3448 (struct c_parser): Change tokens to c_token *.
3449 Add tokens_buf field. Change tokens_avail type to unsigned int.
3450 (c_parser_consume_token): If parser->tokens isn't
3451 &parser->tokens_buf[0], increment parser->tokens.
3452 (c_parser_consume_pragma): Likewise.
3453 (enum pragma_context): Add pragma_struct and pragma_param.
3454 (c_parser_external_declaration): Adjust
3455 c_parser_declaration_or_fndef caller.
3456 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3457 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3458 Adjust recursive call.
3459 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3461 (c_parser_parameter_declaration): Use pragma_param instead of
3463 (c_parser_compound_statement_nostart, c_parser_label,
3464 c_parser_for_statement): Adjust
3465 c_parser_declaration_or_fndef callers.
3466 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3467 it through to c_parser_conditional_expression.
3468 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3469 pass it through to c_parser_binary_expression. Adjust recursive
3471 (c_parser_binary_expression): Remove prec argument, add
3472 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3473 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3474 binop matches it, use build2 instead of parser_build_binary_op.
3475 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3476 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3477 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3478 Handle pragma_struct and pragma_param the same as pragma_external.
3479 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3480 (c_parser_omp_variable_list): Parse array sections for
3481 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3482 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3483 (c_parser_omp_clause_reduction): Handle user defined reductions.
3484 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3485 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3486 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3487 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3488 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3489 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3490 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3491 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3492 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3493 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3494 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3495 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3496 (c_parser_omp_for_loop): Add CODE argument, pass it through
3497 to c_finish_omp_for. Change last argument to cclauses,
3498 and adjust uses to grab parallel clauses from the array of all
3499 the split clauses. Adjust c_parser_binary_expression,
3500 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3501 (omp_split_clauses): New function.
3502 (c_parser_omp_simd): New function.
3503 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3504 Allow the function to be called also when parsing combined constructs,
3505 and call c_parser_omp_simd when parsing for simd.
3506 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3507 #pragma omp section, require exactly one structured-block instead of
3508 sequence of statements.
3509 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3510 Allow the function to be called also when parsing combined constructs.
3511 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3512 Allow the function to be called also when parsing combined
3514 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3515 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3516 c_parser_omp_teams, c_parser_omp_target_data,
3517 c_parser_omp_target_update, c_parser_omp_target,
3518 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3519 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3520 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3521 (c_parser_omp_construct): Add p_name and mask vars. Handle
3522 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3523 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3524 and c_parser_omp_sections callers.
3525 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3526 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3527 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3528 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3529 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3531 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3532 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3533 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3534 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3535 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3536 * c-typeck.c: Include tree-inline.h.
3537 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3538 handle_omp_array_sections_1, handle_omp_array_sections,
3539 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3540 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3541 user defined reductions.
3542 (c_tree_equal): New function.
3543 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3544 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3545 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3546 c_check_omp_declare_reduction_r): New prototypes.
3547 * c-decl.c (current_omp_declare_target_attribute): New variable.
3548 (c_decl_attributes): New function.
3549 (start_decl, start_function): Use it instead of decl_attributes.
3550 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3551 c_omp_reduction_decl, c_omp_reduction_lookup,
3552 c_check_omp_declare_reduction_r): New functions.
3554 2013-09-25 Tom Tromey <tromey@redhat.com>
3556 * Make-lang.in (c/gccspec.o): Remove.
3557 (CFLAGS-c/gccspec.o): New variable.
3558 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3559 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3560 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3562 2013-09-25 Tom Tromey <tromey@redhat.com>
3564 * Make-lang.in (c/gccspec.o): Don't use subshell.
3566 2013-09-18 Marek Polacek <polacek@redhat.com>
3569 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3570 Remove unnecessary check.
3572 2013-09-18 Marek Polacek <polacek@redhat.com>
3575 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3576 no_sanitize_undefined attribute.
3578 2013-09-13 Kai Tietz <ktietz@redhat.com>
3581 * c-decl.c (c_builtin_function_ext_scope): Remove
3582 wrong assumption that it is never called on prexisting
3585 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3587 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3589 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3591 * c-objc-common.c (c_tree_printer): Tidy.
3593 2013-08-30 Marek Polacek <polacek@redhat.com>
3595 * c-typeck.c (build_binary_op): Add division by zero and shift
3598 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
3599 Joseph Myers <joseph@codesourcery.com>
3602 * c-typeck.c (c_common_type): Prefer double_type_node over
3603 other REAL_TYPE types with the same precision.
3604 (convert_arguments): Likewise.
3606 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3608 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3609 (c_initialize_diagnostics): Call a destructor for the early printer.
3611 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3613 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3614 printer initialization.
3616 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
3619 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3620 check for truth values.
3621 (expand_array_notation_exprs): Added truth values case. Removed an
3622 unwanted else. Added for-loop to walk through subtrees in default
3625 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3627 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3629 2013-07-23 Joseph Myers <joseph@codesourcery.com>
3631 * c-parser.c (struct c_generic_association): Fix typo.
3633 2013-07-23 Tom Tromey <tromey@redhat.com>
3634 Joseph Myers <joseph@codesourcery.com>
3636 * c-parser.c (struct c_generic_association): New.
3637 (c_generic_association_d): New typedef.
3638 (c_parser_generic_selection): New function.
3639 (c_parser_postfix_expression): Handle RID_GENERIC.
3641 2013-07-13 Jason Merrill <jason@redhat.com>
3644 * c-decl.c (finish_struct): Check for too-large class.
3646 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
3649 * c-typeck.c (set_init_index): When folding, check for index overflow.
3651 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3653 * c-parser.c (c_parser_array_notation): Removed rejection of array
3654 notations in an array of function pointers.
3656 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3658 * c-array-notation.c (make_triplet_val_inv): New function.
3659 (create_cmp_incr): Likewise.
3660 (create_array_refs): Likewise.
3661 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3662 Also modularized common parts between functions and called the function.
3663 (build_array_notation_expr): Likewise.
3664 (fix_conditional_array_notations_1): Likewise.
3665 (fix_array_notation_expr): Likewise.
3666 (fix_array_notation_call_expr): Likewise.
3668 2013-06-18 Marek Polacek <polacek@redhat.com>
3671 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3673 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3675 * c-array-notation.c (build_array_notation_expr): Reject array notation
3676 mismatch between LHS and RHS even inside a call_expr. Also, removed
3677 a couple while statements that were dead code.
3679 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3681 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3682 excessive precision expressions in function parameters. Also removed
3683 couple unwanted while statements.
3685 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3687 * c-array-notation.c (expand_array_notation_exprs): Added
3688 ARRAY_NOTATION_REF case.
3690 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3692 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3693 function to c-family/array-notation-common.c.
3694 (is_cilkplus_reduce_builtin): Likewise.
3695 (find_rank): Likewise.
3696 (extract_array_notation_exprs): Likewise.
3697 (replace_array_notations): Likewise.
3698 (find_inv_trees): Likewise.
3699 (replace_inv_trees): Likewise.
3700 (contains_array_notation_expr): Likewise.
3701 (find_correct_array_notation_type): Likewise.
3702 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3703 (struct inv_list): Moved this to c-family/array-notation-common.c.
3704 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3706 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3708 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3709 reduction functions outside the for-loop. Added a check if the fundecl
3710 is non-NULL. Finally, removed an unwanted if-statement, and made the
3713 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3715 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3716 condition of the if-statement matches the rank of else-block and then-
3717 block when array notations are used.
3718 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3719 expression after the entire function body is parsed.
3720 (c_parser_expr_no_commas): Delayed creating array notation expressions
3721 to the end of function parsing.
3722 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3723 whole if-statement instead of just the condition.
3724 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3726 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3729 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3730 array to NULL_TREE if they are unused. Also added a check for the
3731 field to be NULL before its fields are used in future.
3733 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3736 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3737 (build_array_notation_expr): Likewise.
3739 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3741 * c-typeck.c (build_array_ref): Added a check to see if array's
3742 index is greater than one. If true, then emit an error.
3743 (build_function_call_vec): Exclude error reporting and checking
3744 for builtin array-notation functions.
3745 (convert_arguments): Likewise.
3746 (c_finish_return): Added a check for array notations as a return
3747 expression. If true, then emit an error.
3748 (c_finish_loop): Added a check for array notations in a loop
3749 condition. If true then emit an error.
3750 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3751 (build_binary_op): Added a check for array notation expr inside
3752 op1 and op0. If present, we call another function to find correct
3754 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3755 * c-parser.c (c_parser_compound_statement): Check if array
3756 notation code is used in tree, if so, then transform them into
3758 (c_parser_expr_no_commas): Check if array notation is used in LHS
3759 or RHS, if so, then build array notation expression instead of
3761 (c_parser_postfix_expression_after_primary): Added a check for
3762 colon(s) after square braces, if so then handle it like an array
3763 notation. Also, break up array notations in unary op if found.
3764 (c_parser_direct_declarator_inner): Added a check for array
3766 (c_parser_compound_statement): Added a check for array notation in
3767 a stmt. If one is present, then expand array notation expr.
3768 (c_parser_if_statement): Likewise.
3769 (c_parser_switch_statement): Added a check for array notations in
3770 a switch statement's condition. If true, then output an error.
3771 (c_parser_while_statement): Similarly, but for a while.
3772 (c_parser_do_statement): Similarly, but for a do-while.
3773 (c_parser_for_statement): Similarly, but for a for-loop.
3774 (c_parser_unary_expression): Check if array notation is used in a
3775 pre-increment or pre-decrement expression. If true, then expand
3777 (c_parser_array_notation): New function.
3778 * c-array-notation.c: New file.
3779 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3781 2013-05-23 Mike Stump <mikestump@comcast.net>
3783 * c-typeck.c (convert_for_assignment): Handle references to memory
3786 2013-05-16 Jason Merrill <jason@redhat.com>
3788 * Make-lang.in (cc1$(exeext)): Use link mutex.
3790 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3792 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3793 to simply use OPT_Wpointer_arith.
3794 (build_unary_op): Likewise.
3796 2013-04-03 Jakub Jelinek <jakub@redhat.com>
3799 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3800 argument. If set, or it temporarily for parsing of the first
3801 argument into force_folding_builtin_constant_p.
3802 (c_parser_postfix_expression): Adjust callers.
3804 2013-03-21 Richard Biener <rguenther@suse.de>
3806 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3807 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3809 2013-02-12 Marek Polacek <polacek@redhat.com>
3812 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3815 2013-01-24 Jakub Jelinek <jakub@redhat.com>
3818 * c-typeck.c (set_nonincremental_init_from_string): If
3819 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3821 (process_init_element): Likewise.
3823 2012-12-20 Jakub Jelinek <jakub@redhat.com>
3826 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3827 argument, don't call default_function_array_conversion
3828 nor c_fully_fold here.
3829 (c_parser_asm_statement): Adjust callers.
3830 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3831 and outputs here, and call default_function_array_conversion
3832 on inputs that don't need to be addressable.
3834 2012-12-18 Jakub Jelinek <jakub@redhat.com>
3837 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3838 warning require that both c_common_unsigned_type as well as
3839 c_common_signed_type is the same for both mvl and mvr types.
3841 2012-11-16 Diego Novillo <dnovillo@google.com>
3843 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3845 * c-common.c: Use new vec API in vec.h.
3846 * c-common.h: Likewise.
3847 * c-gimplify.c: Likewise.
3848 * c-pragma.c: Likewise.
3849 * c-pretty-print.c: Likewise.
3850 * c-pretty-print.h: Likewise.
3851 * c-semantics.c: Likewise.
3852 * c-decl.c: Likewise.
3853 * c-parser.c: Likewise.
3854 * c-tree.h: Likewise.
3855 * c-typeck.c: Likewise.
3857 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3860 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3862 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3865 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3866 shadows a function, unless the variable is a function or a
3867 pointer-to-function.
3869 2012-10-12 Jakub Jelinek <jakub@redhat.com>
3872 * c-parser.c (struct c_tree_loc_pair): Removed.
3873 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3874 add location_t * and tree * arguments, fill in array of 3
3875 sizeof_arg trees and corresponding locs.
3876 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3877 c_parser_expr_list callers.
3878 (c_parser_postfix_expression_after_primary): Likewise. Pass
3879 array of 3 sizeof_arg trees and locs (corresponding to first
3880 3 arguments) to sizeof_pointer_memaccess_warning.
3882 2012-10-09 Lawrence Crowl <crowl@google.com>
3884 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3885 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3888 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3891 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3894 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
3897 * c-typeck.c: Include c-common.h.
3898 (enum stv_conv): Moved to c-common.h.
3899 (scalar_to_vector): Moved to c-common.c.
3900 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3901 * Make-lang.in: c-typeck.c depends on c-common.h.
3903 2012-10-04 Arnaud Charlet <charlet@adacore.com>
3905 * c-decl.c (c_write_global_declarations): Fix handling of
3908 2012-09-30 Sharad Singhai <singhai@google.com>
3910 * c-decl.c (c_write_global_declarations): Use a different method
3911 to determine if the dump has ben initialized.
3913 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3916 * c-typeck.c (c_cast_expr): When casting to a type requiring
3917 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3920 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3923 * c-typeck.c (build_unary_op): Pass original argument of
3924 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3925 any C_MAYBE_CONST_EXPR, if it has integer operands.
3926 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3927 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3928 to c_objc_common_truthvalue_conversion, then remove any
3929 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3930 c_objc_common_truthvalue_conversion not
3931 c_common_truthvalue_conversion.
3932 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3933 call note_integer_operands for arguments with integer operands
3934 that are not integer constants.
3936 2012-09-13 Jakub Jelinek <jakub@redhat.com>
3939 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3940 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3942 2012-08-31 Jakub Jelinek <jakub@redhat.com>
3945 * c-convert.c (convert): Don't call fold_convert_loc if
3946 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3947 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3948 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3950 2012-08-24 Jakub Jelinek <jakub@redhat.com>
3953 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3954 for nested and empty_ok arguments in the call to
3955 c_parser_declaration_or_fndef.
3957 2012-08-17 Jakub Jelinek <jakub@redhat.com>
3959 * c-tree.h (c_last_sizeof_arg): Declare.
3960 * c-parser.c (struct c_tree_loc_pair): New type.
3961 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3963 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3964 (c_parser_postfix_expression_after_primary): Likewise. Call
3965 sizeof_pointer_memaccess_warning if needed.
3966 (sizeof_ptr_memacc_comptypes): New function.
3967 * c-typeck.c (c_last_sizeof_arg): New global variable.
3968 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3970 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
3972 * c-lang.h (lang_decl): Add variable_size GTY option.
3974 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3976 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3977 * Make-lang.in: Fix dependencies.
3979 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3981 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3982 and add language Makefile hooks.
3983 * config-lang.in: New file.
3984 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3985 add the required "normal" config-lang.in rules.
3986 * c-lang.h: Moved from gcc/ to here.
3987 * c-tree.h: Likewise.
3988 * c-objc-common.c: Likewise.
3989 * c-objc-common.h: Likewise.
3990 * c-typeck.c: Likewise.
3991 * c-convert.c: Likewise.
3992 * c-lang.c: Likewise.
3993 * c-aux-info.c: Likewise.
3994 * c-errors.c: Likewise.
3995 * gccspec.c: Likewise.
3996 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3997 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3999 Copyright (C) 2012-2016 Free Software Foundation, Inc.
4001 Copying and distribution of this file, with or without modification,
4002 are permitted in any medium without royalty provided the copyright
4003 notice and this notice are preserved.