1 2016-09-07 David Malcolm <dmalcolm@redhat.com>
3 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4 c_get_substring_location for this new langhook.
6 2016-09-02 Jakub Jelinek <jakub@redhat.com>
9 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
11 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
12 instead of mark_exp_read on low_bound/length expression.
13 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
14 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
15 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
16 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
17 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
18 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
19 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
20 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
21 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
22 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
23 instead of mark_expr_read.
24 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
25 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
26 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
27 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
28 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
29 array section bases outside of depend clause, for depend clause
30 use convert_lvalue_to_rvalue on the base.
31 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
32 linear, aligned, map, to and from clauses.
33 (c_omp_clause_copy_ctor): New function.
35 2016-09-01 Marek Polacek <polacek@redhat.com>
38 * c-typeck.c (composite_type): Add FALLTHRU comment.
40 2016-08-31 David Malcolm <dmalcolm@redhat.com>
42 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
43 to the insertion fixits for "struct", "union", and "enum".
45 2016-08-30 David Malcolm <dmalcolm@redhat.com>
47 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
48 rather than add_fixit_misspelled_id.
49 (undeclared_variable): Likewise.
50 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
51 now-redundant "here" params from add_fixit_insert method calls.
52 (c_parser_parameter_declaration): Likewise.
53 * c-typeck.c (build_component_ref): Remove now-redundant range
54 param from add_fixit_replace method calls.
56 2016-08-25 Marek Polacek <polacek@redhat.com>
58 * c-typeck.c (parser_build_binary_op): Pass LHS to
59 warn_logical_not_parentheses.
61 2016-08-25 Marek Polacek <polacek@redhat.com>
64 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
65 or _FloatN or _FloatNx is not supported.
66 (finish_declspecs): Set type to integer_type_node when _FloatN or
67 _FloatNx is not supported.
69 2016-08-19 Joseph Myers <joseph@codesourcery.com>
72 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
73 (struct c_declspecs): Add field floatn_nx_idx.
74 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
75 and _FloatNx type specifiers.
76 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
77 (c_parser_declspecs, c_parser_attribute_any_word)
78 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
79 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
80 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
83 2016-08-12 Jakub Jelinek <jakub@redhat.com>
84 Martin Liska <mliska@suse.cz>
87 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
88 % to determine val element to change. Assert that
89 wchar_bytes * charwidth fits into val array.
91 2016-08-12 Marek Polacek <polacek@redhat.com>
94 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
95 (c_parser_postfix_expression): Likewise.
96 * c-typeck.c (build_unary_op): Adjust fall through comment.
97 (c_mark_addressable): Likewise.
99 2016-08-11 Jakub Jelinek <jakub@redhat.com>
102 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
103 array member through typedef, for orig_qual_indirect == 0 clear
106 2016-08-08 David Malcolm <dmalcolm@redhat.com>
109 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
110 this up to selftest::run_c_tests.
111 (selftest::run_c_tests): New function.
113 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
115 * c-parser.c (struct oacc_routine_data): Add error_seen and
117 (c_finish_oacc_routine): Use these.
118 (c_parser_declaration_or_fndef): Adjust.
119 (c_parser_oacc_routine): Likewise. Support more C language
120 constructs, and improve diagnostics. Move pragma context
122 (c_parser_pragma): ... here.
124 * c-parser.c (struct oacc_routine_data): New.
125 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
127 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
128 declare target" attribute.
130 2016-08-01 Jan Beulich <jbeulich@suse.com>
132 * c-fold.c (c_fully_fold_internal): Also emit shift count
133 warnings for vector types.
134 * c-typeck.c (build_binary_op): Likewise.
136 2016-07-29 Marek Polacek <polacek@redhat.com>
139 * c-decl.c (finish_struct): Rephrase an error message.
142 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
143 to error node for invalid code.
146 * c-decl.c (implicitly_declare): Return decl early not only for
147 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
149 2016-07-29 Jakub Jelinek <jakub@redhat.com>
152 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
153 on GNU extern inline functions.
155 2016-07-29 Marek Polacek <polacek@redhat.com>
158 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
161 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
163 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
165 2016-07-20 David Malcolm <dmalcolm@redhat.com>
167 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
169 (best_macro_match): Likewise, converting from a typedef to a
171 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
172 (lookup_name_fuzzy): Update for change of best_macro_match to a
173 subclass with a ctor that calls cpp_forall_identifiers.
175 2016-07-20 David Malcolm <dmalcolm@redhat.com>
177 * c-decl.c (implicit_decl_warning): Update for conversion of
178 return type of lookup_name_fuzzy to const char *.
179 (undeclared_variable): Likewise.
180 (lookup_name_fuzzy): Convert return type from tree to
182 * c-parser.c (c_parser_declaration_or_fndef): Update for
183 conversion of return type of lookup_name_fuzzy to const char *.
184 (c_parser_parameter_declaration): Likewise.
186 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
188 * c-parser.c (c_parser_oacc_declare): Don't scan for
190 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
191 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
192 zero-length subarrays.
194 2016-07-15 Jakub Jelinek <jakub@redhat.com>
197 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
198 instead of FUZZY_LOOKUP_NAME.
199 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
200 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
202 2016-07-14 Jakub Jelinek <jakub@redhat.com>
205 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
207 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
209 * c-parser.c (c_parser_generic_selection): Make type of variable
211 (c_parser_omp_declare_simd): Likewise.
213 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
215 * c-decl.c (struct c_struct_parse_info): Change member types
216 from vec to auto_vec.
217 (start_struct): Adjust.
218 (finish_struct): Likewise.
220 2016-07-02 Jakub Jelinek <jakub@redhat.com>
223 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
225 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
227 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
228 Move pragma context checking into...
229 (c_parser_omp_cancellation_point): ... here, and improve
231 * c-typeck.c (c_finish_omp_cancel)
232 (c_finish_omp_cancellation_point): Improve diagnostic messages.
234 2016-06-29 Jakub Jelinek <jakub@redhat.com>
237 * c-typeck.c (c_build_qualified_type): Don't clear
238 C_TYPE_INCOMPLETE_VARS for the main variant.
240 2016-06-28 Martin Sebor <msebor@redhat.com>
243 * c-typeck.c (output_init_element): Diagnose incompatible types
244 before non-constant initializers.
246 2016-06-28 Jakub Jelinek <jakub@redhat.com>
248 * Make-lang.in: Don't cat ../stage_current if it does not exist.
250 2016-06-23 Andi Kleen <ak@linux.intel.com>
252 * Make-lang.in: Add support for autofdo.
254 2016-06-22 David Malcolm <dmalcolm@redhat.com>
257 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
258 (implicit_decl_warning): When issuing warnings for implicit
259 declarations, attempt to provide a suggestion via
261 (undeclared_variable): Likewise when issuing errors.
262 (lookup_name_in_scope): Likewise.
263 (struct edit_distance_traits<cpp_hashnode *>): New struct.
264 (best_macro_match): New typedef.
265 (find_closest_macro_cpp_cb): New function.
266 (lookup_name_fuzzy): New function.
267 * c-parser.c: Include gcc-rich-location.h.
268 (c_token_starts_typename): Split out case CPP_KEYWORD into...
269 (c_keyword_starts_typename): ...this new function.
270 (c_parser_declaration_or_fndef): When issuing errors about
271 missing "struct" etc, add a fixit. For other kinds of errors,
272 attempt to provide a suggestion via lookup_name_fuzzy.
273 (c_parser_parms_declarator): When looking ahead to detect typos in
274 type names, also reject CPP_KEYWORD.
275 (c_parser_parameter_declaration): When issuing errors about
276 unknown type names, attempt to provide a suggestion via
278 * c-tree.h (c_keyword_starts_typename): New prototype.
280 2016-06-20 Joseph Myers <joseph@codesourcery.com>
283 * c-typeck.c (build_conditional_expr): Return error_mark_node if
284 c_common_type returns error_mark_node.
286 2016-06-19 Martin Sebor <msebor@redhat.com>
289 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
290 __alignof__ (expression).
292 2016-06-14 David Malcolm <dmalcolm@redhat.com>
294 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
296 2016-06-14 David Malcolm <dmalcolm@redhat.com>
298 * c-typeck.c (build_component_ref): Simplify fixit code by
299 using gcc_rich_location::add_fixit_misspelled_id.
300 (set_init_label): Likewise.
302 2016-06-13 David Malcolm <dmalcolm@redhat.com>
304 * c-parser.c (c_parser_initelt): Provide location of name for new
305 location_t param of set_init_label.
306 * c-tree.h (set_init_label): Add location_t param.
307 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
308 param and use it when issuing error messages about unrecognized
309 field names. Attempt to provide a fixit hint if appropriate,
310 otherwise update the error message to provide the type name.
312 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
315 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
318 2016-06-08 Martin Sebor <msebor@redhat.com>
319 Jakub Jelinek <jakub@redhat.com>
323 * c-typeck.c (convert_arguments): Don't promote last argument
324 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
326 2016-06-08 Marek Polacek <polacek@redhat.com>
329 * c-decl.c (grokdeclarator): Check TYPE_P.
332 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
335 2016-06-07 David Malcolm <dmalcolm@redhat.com>
337 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
338 and structure element reference, capture the location of the
339 element name token and pass it to build_component_ref.
340 (c_parser_postfix_expression_after_primary): Likewise for
341 structure element dereference.
342 (c_parser_omp_variable_list): Likewise for
343 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
344 * c-tree.h (build_component_ref): Add location_t param.
345 * c-typeck.c (build_component_ref): Add location_t param
346 COMPONENT_LOC. Use it, if available, when issuing hints about
347 mispelled member names to provide a fixit replacement hint.
349 2016-06-06 Marek Polacek <polacek@redhat.com>
352 * c-parser.c (c_parser_direct_declarator): Set location.
354 2016-06-06 Marek Polacek <polacek@redhat.com>
356 * c-typeck.c (comptypes_internal): Handle comparisons of
357 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
358 TYPE_REF_CAN_ALIAS_ALL.
360 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
362 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
363 arguments as addressable when async clause exists.
365 2016-05-30 Jakub Jelinek <jakub@redhat.com>
368 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
369 when combined with target construct.
371 2016-05-26 Jakub Jelinek <jakub@redhat.com>
373 * c-parser.c (c_parser_omp_clause_schedule): Warn if
374 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
376 2016-05-25 Marek Polacek <polacek@redhat.com>
379 * c-decl.c (c_make_fname_decl): Don't check seen_error.
382 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
384 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
386 * c-parser.c (c_parser_oacc_declare): Add support for
387 GOMP_MAP_FIRSTPRIVATE_POINTER.
388 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
389 argument with enum c_omp_region_type ort.
390 (handle_omp_array_sections): Likewise. Update call to
391 handle_omp_array_sections_1.
392 (c_finish_omp_clauses): Add specific errors and warning messages for
393 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
394 call to handle_omp_array_sections.
396 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
398 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
400 2016-05-24 Richard Biener <rguenther@suse.de>
404 * c-typeck.c (build_array_ref): Do not complain about indexing
405 non-lvalue vectors. Adjust for function name change.
407 2016-05-20 Martin Sebor <msebor@redhat.com>
410 * c-typeck.c (error_init): Use
411 expansion_point_location_if_in_system_header.
412 (warning_init): Same.
414 2016-05-19 David Malcolm <dmalcolm@redhat.com>
417 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
419 (c_parser_postfix_expression): Likewise.
420 * c-tree.h (c_expr::set_error): New method.
421 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
422 that result's range is initialized.
424 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
426 * c-typeck.c (parser_build_unary_op): Fix formatting.
428 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
430 * c-decl.c (grokdeclarator): Remove errmsg and use of
431 targetm.invalid_return_type.
432 (grokparms): Remove errmsg and use of
433 targetm.invalid_parameter_type.
435 2016-05-13 Joseph Myers <joseph@codesourcery.com>
437 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
438 function return type.
440 2016-05-12 Marek Polacek <polacek@redhat.com>
443 * c-decl.c (build_compound_literal): Pass LOC down to
444 c_incomplete_type_error.
445 * c-tree.h (require_complete_type): Adjust declaration.
446 (c_incomplete_type_error): Likewise.
447 * c-typeck.c (require_complete_type): Add location parameter, pass it
448 down to c_incomplete_type_error.
449 (c_incomplete_type_error): Add location parameter, pass it down to
451 (build_component_ref): Pass location down to c_incomplete_type_error.
452 (default_conversion): Pass location down to require_complete_type.
453 (build_array_ref): Likewise.
454 (build_function_call_vec): Likewise.
455 (convert_arguments): Likewise.
456 (build_unary_op): Likewise.
457 (build_c_cast): Likewise.
458 (build_modify_expr): Likewise.
459 (convert_for_assignment): Likewise.
460 (c_finish_omp_clauses): Likewise.
462 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
465 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
467 * c-errors.c (pedwarn_c90): Return true if warned.
468 * c-tree.h (pedwarn_c90): Change return type to bool.
469 (enum c_declspec_word): Add new enumerator cdw_atomic.
471 2016-05-11 Marek Polacek <polacek@redhat.com>
474 * c-decl.c (diagnose_mismatched_decls): Factor out code to
475 diagnose_mismatched_attributes and call it.
477 2016-05-10 Marek Polacek <polacek@redhat.com>
480 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
481 on a declaration following the definition.
483 2016-05-05 Jakub Jelinek <jakub@redhat.com>
485 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
486 parse it through to c_parser_c99_block_statement.
487 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
490 2016-05-04 Marek Polacek <polacek@redhat.com>
492 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
495 2016-05-04 Marek Polacek <polacek@redhat.com>
498 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
499 for macro expansions.
501 2016-05-03 Marek Polacek <polacek@redhat.com>
504 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
505 check_builtin_function_arguments.
507 2016-05-03 Richard Biener <rguenther@suse.de>
509 * Make-lang.in (cc1-checksum.c): For stage-final re-use
510 the checksum from the previous stage.
512 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
514 * c-parser.c (c_parser_oacc_all_clauses): Update call to
515 c_finish_omp_clauses.
516 (c_parser_omp_all_clauses): Likewise.
517 (c_parser_oacc_cache): Likewise.
518 (c_parser_oacc_loop): Likewise.
519 (omp_split_clauses): Likewise.
520 (c_parser_omp_declare_target): Likewise.
521 (c_parser_cilk_all_clauses): Likewise.
522 (c_parser_cilk_for): Likewise.
523 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
524 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
526 2016-05-02 Marek Polacek <polacek@redhat.com>
529 * c-decl.c (grokdeclarator): Diagnose when array's size has an
532 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
535 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
536 OACC_LOOP_CLAUSE_MASK.
537 (c_parser_oacc_kernels_parallel): Update call to
538 c_oacc_split_loop_clauses.
540 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
542 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
543 argument to build_modify_expr in two cases.
545 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
547 * c-parser.c (c_parser_postfix_expression_after_primary): Call
548 warn_for_memset instead of warning directly here.
550 2016-04-26 Marek Polacek <polacek@redhat.com>
553 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
555 (c_parser_for_statement): ... here.
556 (c_parser_if_statement): Use it.
557 (c_parser_switch_statement): Use it.
558 (c_parser_while_statement): Use it.
561 * c-decl.c (pushdecl): Pass LOCUS down to warning.
563 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
566 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
567 instead of c_finish_cilk_clauses.
568 * c-tree.h (c_finish_omp_clauses): Add new default argument.
569 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
570 floating-point variables in the linear clause for Cilk Plus.
572 2016-04-18 Michael Matz <matz@suse.de>
574 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
575 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
577 2016-04-15 Marek Polacek <polacek@redhat.com>
580 * c-typeck.c (build_unary_op): Pass location down to error and
583 2016-04-15 Jakub Jelinek <jakub@redhat.com>
586 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
588 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
589 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
590 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
591 Adjust c_parser_pragma callers.
592 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
594 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
596 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
597 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
598 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
599 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
600 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
601 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
602 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
603 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
605 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
606 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
609 2016-04-13 Marek Polacek <polacek@redhat.com>
612 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
614 (c_parser_statement): Likewise.
615 (c_parser_c99_block_statement): Likewise.
616 (c_parser_while_statement): Likewise.
617 (c_parser_for_statement): Likewise.
618 (c_parser_if_body): Don't set IF_P here.
619 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
620 about dangling else here.
621 * c-tree.h (c_finish_if_stmt): Adjust declaration.
622 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
623 warn about dangling else here.
625 2016-04-04 Marek Polacek <polacek@redhat.com>
628 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
630 2016-03-31 Marek Polacek <polacek@redhat.com>
633 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
635 2016-03-18 David Malcolm <dmalcolm@redhat.com>
638 * c-parser.c (c_parser_postfix_expression): Set the source range
639 for uses of "__builtin_types_compatible_p".
641 2016-03-17 Jakub Jelinek <jakub@redhat.com>
644 * c-typeck.c (composite_type): Don't count void_list_node
645 into len, if the list is terminated by void_list_node, start
646 with void_list_node instead of NULL for newargs. Stop
649 2016-03-16 Marek Polacek <polacek@redhat.com>
652 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
653 nested functions returning VM types.
655 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
657 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
658 when calling c_finish_omp_clauses.
660 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
663 * c-decl.c (get_parm_info): Don't queue implicit function declarations
666 2016-03-04 Marek Polacek <polacek@redhat.com>
669 * c-parser.c (c_parser_postfix_expression): Call
670 c_parser_cast_expression rather than c_parser_postfix_expression.
672 2016-03-01 Jakub Jelinek <jakub@redhat.com>
676 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
677 of incomplete decls to error_mark_node.
679 2016-02-24 Marek Polacek <polacek@redhat.com>
682 * c-decl.c (finish_decl): Don't update the copy of the type of a
685 2016-02-23 Jakub Jelinek <jakub@redhat.com>
688 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
689 in id_kind reclassification.
691 2016-02-16 Jakub Jelinek <jakub@redhat.com>
694 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
696 2016-02-16 James Norris <jnorris@codesourcery.com>
699 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
701 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
703 * c-decl.c (build_null_declspecs): Zero the entire struct.
706 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
707 callers changed. If nested_p is true, use it to call
708 finish_implicit_inits.
709 * c-tree.h (finish_implicit_inits): Declare.
710 * c-typeck.c (finish_implicit_inits): New function. Move code
712 (push_init_level): ... here.
713 (set_designator, process_init_element): Call finish_implicit_inits.
715 2016-02-11 Jakub Jelinek <jakub@redhat.com>
718 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
719 arguments for -Waddress warning.
721 2016-02-04 Jakub Jelinek <jakub@redhat.com>
724 * c-decl.c (finish_enum): When honoring mode attribute,
725 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
727 2016-01-29 Jakub Jelinek <jakub@redhat.com>
730 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
731 all type variants, not just TYPE_MAIN_VARIANT.
733 2016-01-27 Jakub Jelinek <jakub@redhat.com>
736 * c-decl.c (c_write_global_declarations_1): Warn with
737 warn_unused_function if static prototype without definition
740 2016-01-27 Marek Polacek <polacek@redhat.com>
743 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
744 to unsigned, if needed. Add -Wsign-compare warning.
746 2016-01-26 Jakub Jelinek <jakub@redhat.com>
748 PR tree-optimization/69483
749 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
751 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
754 * c-tree.h (incomplete_record_decls): Declare.
755 * c-parser.c (incomplete_record_decls): Define.
756 (c_parser_translation_unit): Iterate through incomplete_record_decls and
757 report error if any decl has zero size.
758 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
759 or enum type to incomplete_record_decls.
761 2016-01-14 Tom de Vries <tom@codesourcery.com>
763 PR tree-optimization/68773
764 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
767 2016-01-14 Marek Polacek <polacek@redhat.com>
770 * c-decl.c (grokdeclarator): Provide more information for invalid
773 2016-01-06 David Malcolm <dmalcolm@redhat.com>
775 * c-parser.c (c_parser_unary_expression): For dereferences, build
776 a combined location before calling build_indirect_ref, so that
777 error reports cover the full range, manually updating the c_expr
780 2016-01-06 Marek Polacek <polacek@redhat.com>
783 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
784 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
787 2016-01-04 Jakub Jelinek <jakub@redhat.com>
789 Update copyright years.
791 2016-01-04 Marek Polacek <polacek@redhat.com>
794 * c-typeck.c (build_atomic_assign): Improve commentary. Add
795 optimization to use __atomic_fetch_* built-in if possible.
797 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
799 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
801 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
804 2015-12-22 Marek Polacek <polacek@redhat.com>
807 * c-typeck.c (build_component_ref): Warn when acessing elements of
808 atomic structures or unions.
810 2015-12-21 David Malcolm <dmalcolm@redhat.com>
812 * c-typeck.c: Include "gcc-rich-location.h".
813 (build_binary_op): In the two places that call binary_op_error,
814 create a gcc_rich_location and populate it with the location of
815 the binary op and its two operands.
817 2015-12-16 David Malcolm <dmalcolm@redhat.com>
819 * c-parser.c (c_parser_statement_after_labels): When calling
820 c_finish_return, Use the return expression's location if it has
821 one, falling back to the location of the first token within it.
822 * c-typeck.c (c_finish_return): When issuing warnings about
823 the incorrect presence/absence of a return value, issue a note
824 showing the declaration of the function.
826 2015-12-16 David Malcolm <dmalcolm@redhat.com>
828 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
830 (c_parser_peek_nth_token): New function.
831 (c_parser_peek_conflict_marker): New function.
832 (c_parser_error): Detect conflict markers and report them as such.
834 2015-12-16 David Malcolm <dmalcolm@redhat.com>
836 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
837 to preserve range information for the primary expression
838 in the call to c_parser_postfix_expression_after_primary.
840 2015-12-16 David Malcolm <dmalcolm@redhat.com>
842 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
843 expression location, falling back on the first token location,
844 rather than always using the latter.
846 2015-12-16 Marek Polacek <polacek@redhat.com>
849 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
852 2015-12-15 Marek Polacek <polacek@redhat.com>
855 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
858 2015-12-08 David Malcolm <dmalcolm@redhat.com>
860 * c-parser.c (c_parser_alignof_expression): Capture location of
861 closing parenthesis (if any), or of end of unary expression, and
862 use it to build a src_range for the expression.
864 2015-12-08 David Malcolm <dmalcolm@redhat.com>
867 * c-parser.c (c_parser_get_builtin_args): Add
868 "out_close_paren_loc" param, and write back to it.
869 (c_parser_postfix_expression): Capture the closing
870 parenthesis location for RID_CHOOSE_EXPR,
871 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
872 RID_BUILTIN_SHUFFLE and use it to set the source range
873 for such expressions; within RID_BUILTIN_COMPLEX set
874 the underlying location.
876 2015-12-07 Marek Polacek <polacek@redhat.com>
879 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
880 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
882 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
884 * c-tree.h (c_build_va_arg): Adjust prototype.
885 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
886 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
887 parameter, adjust throughout and issue an error if EXPR is a component
888 with reverse storage order.
890 2015-12-02 Jason Merrill <jason@redhat.com>
892 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
893 (c_fully_fold_internal, decl_constant_value_for_optimization):
894 Move from c-common.c.
895 * c-tree.h: Declare decl_constant_value_for_optimization.
896 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
898 2015-12-02 Joseph Myers <joseph@codesourcery.com>
901 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
902 following link from declarator to next declarator. Track original
903 qualified type and pass it to c_build_qualified_type.
904 * c-typeck.c (c_build_qualified_type): Add arguments
905 orig_qual_type and orig_qual_indirect.
907 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
909 * c-parser.c (c_parser_omp_clause_name)
910 (c_parser_oacc_all_clauses): Alphabetical sorting.
912 2015-12-02 Jakub Jelinek <jakub@redhat.com>
915 * c-decl.c (get_parm_info): Use b->locus instead of input_location
918 2015-12-01 Julian Brown <julian@codesourcery.com>
919 Cesar Philippidis <cesar@codesourcery.com>
920 James Norris <James_Norris@mentor.com>
922 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
923 (c_parser_oacc_clause_use_device): New function.
924 (c_parser_oacc_all_clauses): Add use_device support.
925 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
926 (c_parser_oacc_host_data): New function.
927 (c_parser_omp_construct): Add host_data support.
928 * c-tree.h (c_finish_oacc_host_data): Add prototype.
929 * c-typeck.c (c_finish_oacc_host_data): New function.
930 (c_finish_omp_clauses): Add use_device support.
932 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
935 * c-decl.c: Set TYPE_PACKED in variants.
937 2015-11-27 Martin Liska <mliska@suse.cz>
940 * c-array-notation.c (fix_builtin_array_notation_fn):
941 Use release_vec_vec instead of vec::release.
942 (build_array_notation_expr): Likewise.
943 (fix_conditional_array_notations_1): Likewise.
944 (fix_array_notation_expr): Likewise.
945 (fix_array_notation_call_expr): Likewise.
947 2015-11-27 Jakub Jelinek <jakub@redhat.com>
950 * c-parser.c (c_parser_compound_statement_nostart): If
951 last_label is true, use pragma_stmt instead of pragma_compound
952 as second c_parser_pragma argument.
953 (c_parser_omp_ordered, c_parser_omp_target_update,
954 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
955 false as second argument to c_parser_skip_to_pragma_eol after
956 diagnosing standalone directives used in pragma_stmt context.
958 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
960 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
961 with "if (ENABLE_OFFLOADING)".
963 2015-11-23 David Malcolm <dmalcolm@redhat.com>
966 * c-parser.c (c_parser_postfix_expression): Set up source ranges
967 for various Objective-C constructs: Class.name syntax,
968 @selector(), @protocol(), @encode(), and [] message syntax.
970 2015-11-20 David Malcolm <dmalcolm@redhat.com>
973 * c-typeck.c (should_suggest_deref_p): New function.
974 (build_component_ref): Special-case POINTER_TYPE when
975 generating a "not a structure of union" error message, and
976 suggest a "->" rather than a ".", providing a fix-it hint.
978 2015-11-19 David Malcolm <dmalcolm@redhat.com>
980 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
981 candidate into a new function, find_closest_identifier.
983 2015-11-19 Marek Polacek <polacek@redhat.com>
986 * c-typeck.c (parser_build_binary_op): Properly handle
987 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
989 2015-11-17 David Malcolm <dmalcolm@redhat.com>
991 * c-parser.c (set_c_expr_source_range): Bulletproof both
992 overloaded implementations against NULL expr->value.
993 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
995 (c_parser_unary_expression): Likewise when handling addresses of
997 (c_parser_postfix_expression): Likewise for statement expressions,
998 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
999 __builtin_va_arg, and for __builtin_offset_of.
1000 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1001 src_range using the range of the braced initializer.
1002 (c_parser_transaction_expression): Set src_range for "ret" to a
1003 sane pair of values.
1005 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1007 * c-parser.c (c_finish_omp_declare_simd): Look for
1008 "simd" attribute as well. Update error message.
1010 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1012 * c-parser.c (c_parser_omp_declare_target): Adjust.
1014 2015-11-14 Jakub Jelinek <jakub@redhat.com>
1016 * c-typeck.c (c_finish_omp_clauses): Don't mark
1017 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1019 2015-11-14 Marek Polacek <polacek@redhat.com>
1021 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1022 * c-typeck.c: Likewise.
1024 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1026 * c-decl.c (warn_defaults_to): Pass line_table to
1028 * c-errors.c (pedwarn_c99): Likewise.
1029 (pedwarn_c90): Likewise.
1030 * c-parser.c (set_c_expr_source_range): New functions.
1031 (c_token::get_range): New method.
1032 (c_token::get_finish): New method.
1033 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1034 based on the range from the start of the LHS to the end of the
1036 (c_parser_conditional_expression): Likewise, based on the range
1037 from the start of the cond.value to the end of exp2.value.
1038 (c_parser_binary_expression): Call set_c_expr_source_range on
1039 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1040 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1041 based on the cast_loc through to the end of the expr.
1042 (c_parser_unary_expression): Likewise, based on the
1043 op_loc through to the end of op.
1044 (c_parser_sizeof_expression) Likewise, based on the start of the
1045 sizeof token through to either the closing paren or the end of
1047 (c_parser_postfix_expression): Likewise, using the token range,
1048 or from the open paren through to the close paren for
1049 parenthesized expressions.
1050 (c_parser_postfix_expression_after_primary): Likewise, for
1051 various kinds of expression.
1052 * c-tree.h (struct c_expr): Add field "src_range".
1053 (c_expr::get_start): New method.
1054 (c_expr::get_finish): New method.
1055 (set_c_expr_source_range): New decls.
1056 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1057 on ret for prefix unary ops.
1058 (parser_build_binary_op): Likewise, running from the start of
1059 arg1.value through to the end of arg2.value.
1061 2015-11-13 Marek Polacek <polacek@redhat.com>
1064 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1066 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1068 * c-typeck.c: Include spellcheck.h.
1069 (lookup_field_fuzzy_find_candidates): New function.
1070 (lookup_field_fuzzy): New function.
1071 (build_component_ref): If the field was not found, try using
1072 lookup_field_fuzzy and potentially offer a suggestion.
1074 2015-11-12 James Norris <jnorris@codesourcery.com>
1075 Joseph Myers <joseph@codesourcery.com>
1077 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1078 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1079 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1080 and PRAGMA_OMP_CLAUSE_LINK.
1081 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1082 and PRAGMA_OACC_CLAUSE_LINK.
1083 (OACC_DECLARE_CLAUSE_MASK): New definition.
1084 (c_parser_oacc_declare): New function.
1086 2015-11-12 Marek Polacek <polacek@redhat.com>
1089 * c-parser.c (c_parser_for_statement): Reclassify the token in
1092 2015-11-11 Marek Polacek <polacek@redhat.com>
1096 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1097 checking the size of an array.
1099 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
1101 * c-array-notation.c: Remove unused header files.
1102 * c-aux-info.c: Likewise.
1103 * c-convert.c: Likewise.
1104 * c-decl.c: Likewise.
1105 * c-errors.c: Likewise.
1106 * c-lang.c: Likewise.
1107 * c-objc-common.c: Likewise.
1108 * c-parser.c: Likewise.
1109 * c-typeck.c: Likewise.
1110 * gccspec.c: Likewise.
1112 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1113 Cesar Philippidis <cesar@codesourcery.com>
1114 James Norris <jnorris@codesourcery.com>
1115 Julian Brown <julian@codesourcery.com>
1116 Nathan Sidwell <nathan@codesourcery.com>
1119 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1121 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1122 (c_parser_pragma): Parse 'acc routine'.
1123 (OACC_ROUTINE_CLAUSE_MARK): Define.
1124 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1126 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1129 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1130 location of the backward-goto to the start of the loop body.
1132 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1135 * c-parser.c (c_parser_while_statement): Finish the loop before
1136 parsing ahead for misleading indentation.
1137 (c_parser_for_statement): Likewise.
1139 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1141 * c-decl.c (finish_struct): If the structure has reverse storage
1142 order, rewrite the type of array fields with scalar component. Call
1143 maybe_apply_pragma_scalar_storage_order on entry.
1144 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1145 errors on bit-fields and reverse SSO here and not...
1146 (c_mark_addressable): ...here.
1147 (output_init_element): Adjust call to initializer_constant_valid_p.
1148 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1150 2015-11-06 David Malcolm <dmalcolm@redhat.com>
1152 * c-decl.c (warn_defaults_to): Update for change in signature
1153 of diagnostic_set_info.
1154 * c-errors.c (pedwarn_c99): Likewise.
1155 (pedwarn_c90): Likewise.
1156 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1157 for textinfo::set_location.
1159 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1160 Thomas Schwinge <thomas@codesourcery.com>
1161 James Norris <jnorris@codesourcery.com>
1163 * c-parser.c (c_parser_omp_clause_name): Add support for
1164 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1165 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1166 default(none) in OpenACC.
1167 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1169 (c_parser_oacc_clause_tile): New function.
1170 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1171 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1172 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1174 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1175 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1177 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1178 (c_parser_oacc_update): Update the error message for missing clauses.
1179 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1180 and OMP_CLAUSE_INDEPENDENT.
1182 2015-11-05 Marek Polacek <polacek@redhat.com>
1185 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1186 deal with pre-evaluation on invalid types.
1188 2015-11-05 Jakub Jelinek <jakub@redhat.com>
1189 Ilya Verbin <ilya.verbin@intel.com>
1191 * c-parser.c: Include context.h and gimple-expr.h.
1192 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1193 monotonic together with nonmonotonic.
1194 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1195 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1196 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1197 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1198 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1199 expressions on combined target teams before the target.
1200 (c_parser_omp_declare_target): If decl has "omp declare target" or
1201 "omp declare target link" attribute, and cgraph or varpool node already
1202 exists, then set corresponding flags. Call c_finish_omp_clauses
1203 in the parenthesized extended-list syntax case.
1204 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1206 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1207 on OMP_CLAUSE_REDUCTION array sections.
1208 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1209 into the constant offset, or for variable low-bound using
1210 POINTER_PLUS_EXPR. For structure element based array sections use
1211 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1212 (c_finish_omp_clauses): Drop generic_field_head, structure
1213 elements are now always mapped even as array section bases,
1214 diagnose same var in data sharing and mapping clauses. Diagnose if
1215 linear step on declare simd is neither a constant nor a uniform
1216 parameter. Look through POINTER_PLUS_EXPR for array section
1217 reductions. Diagnose the same var or function appearing multiple
1218 times on the same directive. Fix up wording for the to clause if t
1219 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1220 modifier on kinds other than dynamic or guided or nonmonotonic
1221 modifier together with ordered clause.
1223 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1224 Chung-Lin Tang <cltang@codesourcery.com>
1226 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1228 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
1230 * c-array-notation.c: Reorder #include's and remove duplicates.
1231 * c-aux-info.c: Likewise.
1232 * c-convert.c: Likewise.
1233 * c-decl.c: Likewise.
1234 * c-errors.c: Likewise.
1235 * c-lang.c: Likewise.
1236 * c-objc-common.c: Likewise.
1237 * c-parser.c: Likewise.
1238 * c-typeck.c: Likewise.
1240 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
1243 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1244 after calling build_qualified_type.
1246 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1247 Thomas Schwinge <thomas@codesourcery.com>
1248 James Norris <jnorris@codesourcery.com>
1249 Joseph Myers <joseph@codesourcery.com>
1250 Julian Brown <julian@codesourcery.com>
1251 Bernd Schmidt <bschmidt@redhat.com>
1253 * c-parser.c (c_parser_oacc_shape_clause): New.
1254 (c_parser_oacc_simple_clause): New.
1255 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1256 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1258 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1259 James Norris <jnorris@codesourcery.com>
1260 Cesar Philippidis <cesar@codesourcery.com>
1264 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1265 parameters, and handle these. Adjust all users.
1266 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1268 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1270 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1272 (c_finish_omp_construct): Declare function.
1273 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1274 Merge functions into...
1275 (c_finish_omp_construct): ... this new function.
1277 2015-10-22 Richard Biener <rguenther@suse.de>
1279 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1280 before folding a MINUS_EXPR.
1282 2015-10-21 Marek Polacek <polacek@redhat.com>
1285 * c-decl.c (start_function): Warn about vararg functions without
1288 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1290 * c-typeck.c (build_conditional_expr): Use boolean vector
1291 type for vector comparison.
1292 (build_vec_cmp): New.
1293 (build_binary_op): Use build_vec_cmp for comparison.
1295 2015-10-20 Marek Polacek <polacek@redhat.com>
1297 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1299 2015-10-20 Marek Polacek <polacek@redhat.com>
1302 * c-parser.c (c_parser_attributes): Break out of the loop if the
1303 token after an attribute isn't a comma.
1305 2015-10-13 Jakub Jelinek <jakub@redhat.com>
1306 Aldy Hernandez <aldyh@redhat.com>
1308 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1309 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1310 (c_parser_omp_variable_list): Handle structure elements for
1311 map, to and from clauses. Handle array sections in reduction
1312 clause. Formatting fixes.
1313 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1314 if clause modifiers.
1315 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1316 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1317 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1318 c_parser_omp_clause_is_device_ptr): New functions.
1319 (c_parser_omp_clause_ordered): Parse optional parameter.
1320 (c_parser_omp_clause_reduction): Handle array reductions.
1321 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1322 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1324 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1325 (c_parser_omp_clause_depend_sink): New function.
1326 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1327 (c_parser_omp_clause_map): Parse release/delete map kinds and
1328 optional always modifier.
1329 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1330 and c_finish_omp_clauses callers.
1331 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1332 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1333 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1334 (OMP_CRITICAL_CLAUSE_MASK): Define.
1335 (c_parser_omp_critical): Parse critical clauses.
1336 (c_parser_omp_for_loop): Handle doacross loops, adjust
1337 c_finish_omp_for and c_finish_omp_clauses callers.
1338 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1339 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1340 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1341 (c_parser_omp_for): Disallow ordered clause when combined with
1342 distribute. Disallow linear clause when combined with distribute
1343 and not combined with simd.
1344 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1345 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1346 parse clauses and if depend clause is found, don't parse a body.
1347 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1348 Allow target parallel without for after it.
1349 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1350 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1351 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1353 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1354 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1355 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1356 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1358 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1359 defaultmap and is_device_ptr clauses.
1360 (c_parser_omp_target): Parse target parallel and target simd. Set
1361 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1362 and target exit data. Diagnose invalid map kinds.
1363 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1364 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1366 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1368 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1369 (c_parser_omp_taskloop): New function.
1370 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1371 handle PRAGMA_OMP_TASKLOOP.
1372 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1373 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1374 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1375 Add IS_OMP argument, handle structure element bases, diagnose
1376 bitfields, pass IS_OMP recursively, diagnose known zero length
1377 array sections in depend clauses, handle array sections in reduction
1378 clause, diagnose negative length even for pointers.
1379 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1380 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1381 array sections in reduction clause, set
1382 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1383 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1384 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1385 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1387 2015-10-06 Marek Polacek <polacek@redhat.com>
1389 * c-parser.c (c_parser_statement_after_labels): Use
1390 protected_set_expr_location.
1391 (c_parser_omp_clause_num_gangs): Likewise.
1392 (c_parser_omp_clause_num_threads): Likewise.
1393 (c_parser_omp_clause_num_workers): Likewise.
1394 (c_parser_omp_clause_vector_length): Likewise.
1395 (c_parser_omp_clause_num_teams): Likewise.
1396 (c_parser_omp_clause_thread_limit): Likewise.
1397 * c-typeck.c (build_c_cast): Likewise.
1398 (c_cast_expr): Likewise.
1400 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1402 * c-typeck.c (c_tree_equal): Use real_equal instead of
1405 2015-10-04 Jason Merrill <jason@redhat.com>
1407 * c-parser.c (c_lex_one_token): Handle @synchronized.
1408 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1409 can change whether the function is transaction_safe.
1411 2015-10-02 Marek Polacek <polacek@redhat.com>
1414 * c-typeck.c (convert_for_assignment): Use the expansion point
1415 location throughout.
1417 2015-10-02 Marek Polacek <polacek@redhat.com>
1420 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1421 and pass it down to c_parser_if_statement.
1422 (c_parser_else_body): Add CHAIN parameter and pass it down to
1423 c_parser_statement_after_labels.
1424 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1425 duplicated if-else-if conditions.
1427 2015-10-01 Marek Polacek <polacek@redhat.com>
1429 * c-typeck.c (convert_for_assignment): Improve commentary.
1431 2015-09-30 Marek Polacek <polacek@redhat.com>
1434 * c-typeck.c (c_finish_return): Use the expansion point location for
1435 certain "return with value" warnings.
1437 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1439 * c-parser.c (pragma_lex): Add loc argument.
1441 2015-09-15 Marek Polacek <polacek@redhat.com>
1444 * c-decl.c (tag_exists_p): New function.
1445 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1446 struct/union/enum keywords are missing.
1447 * c-tree.h (tag_exists_p): Declare.
1449 2015-09-15 Marek Polacek <polacek@redhat.com>
1451 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1452 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1453 Return NULL_TREE instead of 0.
1454 (lookup_name): Return NULL_TREE instead of 0.
1455 (lookup_name_in_scope): Likewise.
1456 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1457 (parser_xref_tag): Use false instead of 0.
1458 (start_struct): Use true instead of 1.
1459 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1461 2015-09-14 Marek Polacek <polacek@redhat.com>
1463 * c-typeck.c (set_nonincremental_init_from_string): Use
1464 HOST_WIDE_INT_M1U when shifting a negative value.
1466 2015-09-09 Mark Wielaard <mjw@redhat.com>
1468 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1471 2015-09-10 Jakub Jelinek <jakub@redhat.com>
1474 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1475 into OMP_FOR_PRE_BODY rather than before the loop.
1477 2015-09-09 Jakub Jelinek <jakub@redhat.com>
1480 * c-parser.c (c_parser_oacc_all_clauses,
1481 c_parser_omp_all_clauses): Remove invalid clause from
1482 list of clauses even if parser->error is set.
1485 * c-parser.c (c_parser_omp_clause_aligned,
1486 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1488 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1492 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1493 instead of c_parser_unary_expression. If the result is !lvalue_p,
1494 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1496 2015-09-04 Marek Polacek <polacek@redhat.com>
1499 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1501 2015-09-03 Martin Sebor <msebor@redhat.com>
1504 * c-typeck.c (convert_arguments, parser_build_unary_op,
1505 build_conditional_expr, c_cast_expr, convert_for_assignment,
1506 build_binary_op, _objc_common_truthvalue_conversion): Call
1508 (c_decl_implicit): Define.
1510 2015-09-02 Marek Polacek <polacek@redhat.com>
1513 * c-parser.c (c_parser_enum_specifier): Give a better error for
1516 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1518 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1520 2015-08-12 Marek Polacek <polacek@redhat.com>
1522 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1525 2015-08-03 Marek Polacek <polacek@redhat.com>
1528 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1530 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1532 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1534 * c-parser.c (c_parser_if_body): Take token_indent_info
1535 argument. Call warn_for_misleading_indentation even when the
1536 body is a semicolon. Extract token_indent_infos corresponding
1537 to the guard, body and next tokens. Adjust call to
1538 warn_for_misleading_indentation accordingly.
1539 (c_parser_else_body): Likewise.
1540 (c_parser_if_statement): Likewise.
1541 (c_parser_while_statement): Likewise.
1542 (c_parser_for_statement): Likewise.
1544 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1545 Manuel López-Ibáñez <manu@gcc.gnu.org>
1547 * c-decl.c (get_parm_info): Remove static var. Update warning
1550 2015-07-27 Marek Polacek <polacek@redhat.com>
1554 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1556 2015-07-20 Marek Polacek <polacek@redhat.com>
1559 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1560 (build_binary_op): Warn about left shift overflows.
1562 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1564 * c-array-notation.c: Adjust includes for flags.h changes.
1565 * c-objc-common.c: Likewise.
1567 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1569 * c-array-notation.c: Adjust includes.
1570 * c-aux-info.c: Likewise.
1571 * c-convert.c: Likewise.
1572 * c-decl.c: Likewise.
1573 * c-errors.c: Likewise.
1574 * c-lang.c: Likewise.
1575 * c-objc-common.c: Likewise.
1576 * c-parser.c: Likewise.
1577 * c-typeck.c: Likewise.
1579 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1582 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1584 2015-06-29 Marek Polacek <polacek@redhat.com>
1587 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1588 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1589 about -Wswitch-bool here.
1590 (do_case): Update c_add_case_label call.
1591 (c_finish_case): Update c_do_switch_warnings call.
1593 2015-06-27 Marek Polacek <polacek@redhat.com>
1595 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1597 2015-06-26 Marek Polacek <polacek@redhat.com>
1599 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1601 * c-typeck.c (array_to_pointer_conversion): Likewise.
1602 (build_unary_op): Likewise.
1603 (c_finish_return): Likewise.
1605 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1607 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1608 * c-parser.c: Likewise.
1610 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1612 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1613 instead of pointer_hash.
1614 (detect_field_duplicates): Likewise.
1616 2015-06-25 Marek Polacek <polacek@redhat.com>
1618 * c-array-notation.c: Use VAR_P throughout.
1619 * c-decl.c: Likewise.
1620 * c-objc-common.c: Likewise.
1621 * c-parser.c: Likewise.
1622 * c-typeck.c: Likewise.
1624 2015-06-25 Marek Polacek <polacek@redhat.com>
1626 * c-decl.c: Use is_global_var throughout.
1627 * c-parser.c: Likewise.
1628 * c-typeck.c: Likewise.
1630 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1632 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1633 * c-aux-info.c: Likewise.
1634 * c-convert.c: Likewise.
1635 * c-decl.c: Likewise.
1636 * c-errors.c: Likewise.
1637 * c-lang.c: Likewise.
1638 * c-objc-common.c: Likewise.
1639 * c-parser.c: Likewise.
1640 * c-typeck.c: Likewise.
1642 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
1645 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1648 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1650 * c-decl.c (pop_scope): Register the main translation unit
1651 through the new debug hook.
1653 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1655 * c-array-notation.c : Adjust include files.
1656 * c-aux-info.c : Likewise.
1657 * c-convert.c : Likewise.
1658 * c-decl.c : Likewise.
1659 * c-errors.c : Likewise.
1660 * c-lang.c : Likewise.
1661 * c-lang.h : Likewise.
1662 * c-objc-common.c : Likewise.
1663 * c-parser.c : Likewise.
1664 * c-typeck.c : Likewise.
1666 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1668 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1669 immediately clobber it.
1670 (c_write_global_declarations_1): Remove call to
1671 check_global_declaration_1.
1672 (c_write_global_declarations_2): Remove.
1673 (c_write_final_cleanups): Rename from c_write_global_declarations.
1674 Remove call to finalize_compilation_unit.
1675 Remove calls to debugging hooks.
1676 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1677 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1678 * c-tree.h: Remove c_write_global_declarations.
1680 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1682 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1683 * c-aux-info.c: Likewise.
1684 * c-convert.c: Likewise.
1685 * c-decl.c: Likewise.
1686 * c-errors.c: Likewise.
1687 * c-lang.c: Likewise.
1688 * c-objc-common.c: Likewise.
1689 * c-parser.c: Likewise.
1690 * c-typeck.c: Likewise.
1692 2015-06-04 Marek Polacek <polacek@redhat.com>
1695 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1698 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1700 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1701 Warn for empty struct.
1702 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1704 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1706 * c-decl.c (start_function): Call plugin before parsing.
1707 (finish_function): Call plugin after parsing.
1709 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1712 * c-decl.c (merge_decls): Merge DECL_COMMON.
1714 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1716 * Make-lang.in (check_gcc_pallelize): Define.
1718 2015-05-22 Marek Polacek <polacek@redhat.com>
1721 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1724 2015-05-21 Marek Polacek <polacek@redhat.com>
1726 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1729 2015-05-20 Marek Polacek <polacek@redhat.com>
1731 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1732 * c-typeck.c: Likewise.
1734 2015-05-19 Marek Polacek <polacek@redhat.com>
1736 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1738 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1741 * c-parser.c (c_parser_omp_for_loop): Don't add
1742 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1743 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1744 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1747 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1749 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
1752 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1755 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1758 2015-05-14 Marek Polacek <polacek@redhat.com>
1762 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1765 2015-05-12 David Malcolm <dmalcolm@redhat.com>
1767 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1768 to add a call to warn_for_misleading_indentation.
1769 (c_parser_else_body): Likewise, adding param "else_loc".
1770 (c_parser_if_statement): Check for misleading indentation.
1771 (c_parser_while_statement): Likewise.
1772 (c_parser_for_statement): Likewise.
1774 2015-05-08 Marek Polacek <polacek@redhat.com>
1777 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1778 (output_init_element): Likewise.
1780 2015-05-07 Marek Polacek <polacek@redhat.com>
1783 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1786 2015-04-30 Marek Polacek <polacek@redhat.com>
1788 * c-typeck.c (set_init_label): Call error_at instead of error and
1791 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1794 * c-typeck.c (c_build_va_arg): Clarify the error message.
1796 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1798 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1799 OMP_STANDALONE_CLAUSES.
1801 2015-04-28 Marek Polacek <polacek@redhat.com>
1803 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1805 2015-04-28 Marek Polacek <polacek@redhat.com>
1808 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1810 2015-04-25 Marek Polacek <polacek@redhat.com>
1813 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1816 2015-04-23 Marek Polacek <polacek@redhat.com>
1819 * c-decl.c (set_labels_context_r): New function.
1820 (store_parm_decls): Call it via walk_tree_without_duplicates.
1821 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1822 instead of create_tmp_var. Build TARGET_EXPR instead of
1824 (build_atomic_assign): Use create_tmp_var_raw instead of
1825 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1827 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1829 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1830 (c_parser_omp_target_update): Add missed %> to error_at ().
1832 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1835 * c-decl.c (c_default_pointer_mode): Remove definition.
1836 * c-tree.h (c_default_pointer_mode): Remove declaration.
1838 2015-03-27 Tobias Burnus <burnus@net-b.de>
1841 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1843 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1844 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1845 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1847 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1849 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1850 attribute for DECL_EXTERNAL VAR_DECLs.
1852 2015-03-11 Jakub Jelinek <jakub@redhat.com>
1854 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1857 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1860 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1861 before preparing arguments to warn_logical_not_parentheses.
1863 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1866 * c-typeck.c (parser_build_binary_op): Don't warn for
1867 !!x == y or !b == y where b is _Bool.
1869 2015-03-09 Marek Polacek <polacek@redhat.com>
1871 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1872 * c-decl.c (grokdeclarator): Likewise.
1873 * c-typeck.c (build_binary_op): Likewise.
1875 2015-02-27 Marek Polacek <polacek@redhat.com>
1878 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1880 2015-02-14 Marek Polacek <polacek@redhat.com>
1883 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1884 declared through a typedef name.
1886 2015-02-13 Marek Polacek <polacek@redhat.com>
1889 * c-decl.c (grokdeclarator): Print also the type when giving
1890 the error message about array's incomplete element type.
1892 2015-02-11 Jakub Jelinek <jakub@redhat.com>
1895 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1896 check in the POP macro.
1898 2015-02-09 Marek Polacek <polacek@redhat.com>
1901 * c-typeck.c (process_init_element): Don't always wrap
1902 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1903 initializing a range of elements.
1905 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1909 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1911 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
1913 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1914 processing enum declaration.
1916 2015-01-29 Marek Polacek <polacek@redhat.com>
1919 * c-typeck.c (pop_init_level): If constructor_elements has
1920 exactly one element with integer_zerop value, set constructor_zeroinit
1921 to 1. Remove braces around warning_init call.
1923 2015-01-27 Jakub Jelinek <jakub@redhat.com>
1926 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1927 of FUNCTION_DECLs with error_mark_node.
1929 2015-01-26 Jakub Jelinek <jakub@redhat.com>
1932 * c-typeck.c (convert_arguments): Return -1 if there are
1933 error_args, even if we've diagnosed too many arguments.
1935 2015-01-21 Richard Biener <rguenther@suse.de>
1938 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1939 for builtins the user declared correctly.
1941 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1942 Bernd Schmidt <bernds@codesourcery.com>
1943 Cesar Philippidis <cesar@codesourcery.com>
1944 James Norris <jnorris@codesourcery.com>
1945 Jakub Jelinek <jakub@redhat.com>
1946 Ilmir Usmanov <i.usmanov@samsung.com>
1948 * c-parser.c: Include "gomp-constants.h".
1949 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1950 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1951 Use OMP_CLAUSE_SET_MAP_KIND.
1952 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1953 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1954 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1955 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1956 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1957 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1958 "copyout", "create", "delete", "deviceptr", "gang", "host",
1959 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1960 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1961 "present_or_create", "pcreate", "seq", "self", "vector",
1962 "vector_length", "wait", "worker".
1963 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1964 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1965 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1966 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1967 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1968 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1969 (c_parser_oacc_data_clause_deviceptr)
1970 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1971 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1972 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1973 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1974 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1975 (c_parser_oacc_parallel, c_parser_oacc_update)
1976 (c_parser_oacc_wait): New functions.
1977 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1978 (c_finish_oacc_data): New prototypes.
1979 * c-typeck.c: Include "gomp-constants.h".
1980 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1981 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1982 OMP_CLAUSE_SET_MAP_KIND.
1983 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1984 (c_finish_oacc_data): New functions.
1985 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1986 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1987 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1988 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1989 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1990 GOMP_MAP_FORCE_DEVICEPTR.
1992 2015-01-09 Michael Collison <michael.collison@linaro.org>
1994 * c-array-notation.c: Include hash-set.h, machmode.h,
1995 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1996 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1997 * c-aux-info.c: Ditto.
1998 * c-convert.c: Ditto.
2000 * c-errors.c: Ditto.
2001 * c-lang.c: Dittoxs.
2002 * c-objc-common.c: Ditto.
2003 * c-parser.c: Ditto.
2004 * c-typeck.c: Include hash-set.h, machmode.h,
2005 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2006 fold-const.h, wide-int.h, inchash.h, real.h and
2007 fixed-value.h due to flattening of tree.h.
2009 2015-01-07 Marek Polacek <polacek@redhat.com>
2012 * c-typeck.c (process_init_element): Disallow initialization of
2013 a flexible array member with a string constant if the structure
2016 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2019 * c-typeck.c (convert_for_assignment, c_finish_return): For
2020 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2021 types also set in_late_binary_op around convert call.
2022 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2023 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2024 result on expr as last argument to ubsan_instrument_float_cast,
2025 if in_late_binary_op, don't use c_save_expr but save_expr.
2027 Update copyright years.
2029 2015-01-05 Marek Polacek <polacek@redhat.com>
2032 * c-typeck.c (build_array_ref): Pass loc down to
2033 warn_array_subscript_with_type_char.
2035 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
2037 * c-typeck.c: New behavious for pointers to arrays with qualifiers
2038 (common-pointer-type): For pointers to arrays take qualifiers from
2040 (build_conditional_expr): Add warnings for lost qualifiers.
2041 (comp-target-types): Allow pointers to arrays with different qualifiers.
2042 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
2043 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
2044 to PEDWARN_FOR_QUALIFIERS.
2046 2014-12-17 Jakub Jelinek <jakub@redhat.com>
2049 * c-convert.c: Include ubsan.h.
2050 (convert): For real -> integral casts and
2051 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2052 instead instrument the float cast directly.
2054 2014-11-29 Jakub Jelinek <jakub@redhat.com>
2056 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2057 c_finish_stmt_expr): Remove NULL last argument from
2058 create_tmp_var_raw and create_tmp_var calls.
2059 * c-array-notation.c (fix_builtin_array_notation_fn,
2060 build_array_notation_expr, fix_conditional_array_notations_1,
2061 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2063 2014-11-28 Marek Polacek <polacek@redhat.com>
2066 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2067 convert the right operand to integer type.
2069 2014-11-25 Marek Polacek <polacek@redhat.com>
2072 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2073 for inline functions.
2075 2014-11-21 Jakub Jelinek <jakub@redhat.com>
2078 * c-typeck.c (build_array_ref): Adjust
2079 convert_vector_to_pointer_for_subscript caller. If it returns true,
2080 call non_lvalue_loc on the result.
2082 2014-11-11 Richard Biener <rguenther@suse.de>
2084 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2087 2014-11-10 Andi Kleen <ak@linux.intel.com>
2090 * c-parser.c (c_parser_statement_after_labels): Call
2092 (c_parser_if_statement): Dito.
2093 (c_parser_switch_statement): Dito.
2094 (c_parser_while_statement): Dito.
2095 (c_parser_do_statement): Dito.
2096 (c_parser_for_statement): Dito.
2097 * c-typeck.c (c_finish_loop): Dito.
2099 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2101 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2102 OPT_Wshift_count_overflow in the warnings.
2104 2014-10-30 Marek Polacek <polacek@redhat.com>
2106 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2107 print the stripped version as well, if they're not the same.
2109 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2111 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2114 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
2116 * c-decl.c: Adjust include files.
2117 * c-parser.c: Ditto.
2119 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2120 Tom Tromey <tromey@redhat.com>
2122 * c-tree.h (enum c_oracle_request): New.
2123 (c_binding_oracle_function): New typedef.
2124 (c_binding_oracle, c_pushtag, c_bind): Declare.
2125 * c-decl.c (c_binding_oracle): New global.
2126 (I_SYMBOL_CHECKED): New macro.
2127 (i_symbol_binding): New function.
2128 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2129 (I_TAG_CHECKED): New macro.
2130 (i_tag_binding): New function.
2131 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2132 (I_LABEL_CHECKED): New macro.
2133 (i_label_binding): New function.
2134 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2135 (c_print_identifier): Save and restore c_binding_oracle.
2136 (c_pushtag, c_bind): New functions.
2138 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
2140 * c-typeck.c: Adjust include files.
2142 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2145 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2146 initialization here...
2147 (c_initialize_diagnostics): ... but here. Set defaults after
2148 building pretty-printer.
2150 2014-10-23 Marek Polacek <polacek@redhat.com>
2153 * c-decl.c (pop_scope): Don't print warning in external_scope.
2155 2014-10-19 Marek Polacek <polacek@redhat.com>
2158 * c-typeck.c (output_init_element): Allow initializing objects with
2159 static storage duration with compound literals even in C99 and add
2162 2014-10-17 Marek Polacek <polacek@redhat.com>
2165 * c-typeck.c (digest_init): Allow initializing objects with static
2166 storage duration with compound literals even in C99 and add pedwarn
2169 2014-10-17 Marek Polacek <polacek@redhat.com>
2172 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2173 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2174 error multiple times. Print the type.
2176 2014-10-17 Marek Polacek <polacek@redhat.com>
2179 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2182 2014-10-17 Marek Polacek <polacek@redhat.com>
2184 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2185 (start_function): Use OPT_Wimplicit_int instead of 0.
2186 (store_parm_decls_oldstyle): Likewise.
2188 2014-10-17 Alan Modra <amodra@gmail.com>
2191 * c-decl.c (merge_decls): Don't merge section name or tls model
2192 to newdecl symtab node, instead merge to olddecl. Override
2193 existing olddecl section name. Set tls_model for all thread-local
2194 vars, not just OMP thread-private ones. Remove incorrect comment.
2196 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
2198 * c-decl.c: Adjust include files.
2200 2014-10-14 DJ Delorie <dj@redhat.com>
2202 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2203 (c_token_starts_typename): Check all __intN, not just __int128.
2204 (c_token_starts_declspecs): Likewise.
2205 (c_parser_declspecs): Likewise.
2206 (c_parser_attribute_any_word): Likewise.
2207 (c_parser_objc_selector): Likewise.
2208 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2209 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2211 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2213 (finish_declspecs): Likewise.
2215 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2217 * c-parser.c (c_parser_all_labels): New function to replace
2219 (c_parser_statement): Call the new function.
2221 2014-10-09 Marek Polacek <polacek@redhat.com>
2224 * c-typeck.c (pop_init_level): Don't warn about initializing
2227 2014-10-07 Marek Polacek <polacek@redhat.com>
2230 * c-decl.c (header_for_builtin_fn): New function.
2231 (implicitly_declare): Suggest which header to include.
2233 2014-10-07 Marek Polacek <polacek@redhat.com>
2235 * c-convert.c (convert): Use error_operand_p.
2236 * c-typeck.c (require_complete_type): Likewise.
2237 (really_atomic_lvalue): Likewise.
2238 (digest_init): Likewise.
2239 (handle_omp_array_sections_1): Likewise.
2241 2014-10-03 Marek Polacek <polacek@redhat.com>
2244 * c-decl.c (pop_scope): Don't warn about "inline function declared
2245 but never defined" for functions marked with gnu_inline attribute.
2247 2014-09-25 Jakub Jelinek <jakub@redhat.com>
2250 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2251 on low_bound and length.
2253 2014-09-24 Marek Polacek <polacek@redhat.com>
2257 * c-parser.c: Don't define CPP_KEYWORD.
2258 (c_parser_switch_statement): Pass original type to c_finish_case.
2259 * c-tree.h (c_finish_case): Update declaration.
2260 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2261 conditionally to c_do_switch_warnings.
2263 2014-09-03 Marek Polacek <polacek@redhat.com>
2266 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2269 2014-09-02 Jakub Jelinek <jakub@redhat.com>
2270 Balaji V. Iyer <balaji.v.iyer@intel.com>
2271 Igor Zamyatin <igor.zamyatin@intel.com>
2273 * c-parser.c (c_parser_cilk_for): New function.
2274 (c_parser_cilk_grainsize): Likewise.
2275 (c_get_temp_regvar): Likewise.
2276 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2277 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2278 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2279 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2282 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2284 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2285 with using HOST_WIDE_INT without truncation to 'int'
2287 2014-08-22 Marek Polacek <polacek@redhat.com>
2290 * c-typeck.c (parser_build_binary_op): Adjust call to
2291 warn_logical_not_parentheses.
2293 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2296 * c-parser.c (c_parser_array_notation): Check for correct
2297 type of an array added.
2299 2014-08-19 Marek Polacek <polacek@redhat.com>
2302 * c-typeck.c (build_binary_op): If either operand of a comparison
2303 is a boolean expression, call maybe_warn_bool_compare.
2305 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2308 * c-typeck.c (build_c_cast): Do a conversion even when the
2309 TYPE_MAIN_VARIANTs are the same.
2311 2014-08-19 Marek Polacek <polacek@redhat.com>
2313 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2314 pedwarn_c99 instead of pedwarn.
2315 (grokfield): Likewise.
2316 (warn_defaults_to): New function.
2317 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2318 Unconditionally call pedwarn_c99 instead of pedwarn.
2319 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2320 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2321 check flag_isoc11 before.
2322 * c-errors.c (pedwarn_c99): Change the return type to bool.
2323 Handle -Wc99-c11-compat.
2324 * c-parser.c (disable_extension_diagnostics): Handle
2325 warn_c99_c11_compat.
2326 (restore_extension_diagnostics): Likewise.
2327 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2328 instead of pedwarn, don't check flag_isoc11 before.
2329 (c_parser_declspecs): Likewise.
2330 (c_parser_alignas_specifier): Likewise.
2331 (c_parser_alignof_expression): Likewise.
2332 (c_parser_generic_selection): Likewise.
2333 * c-tree.h (pedwarn_c99): Update declaration.
2334 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2337 2014-08-19 Marek Polacek <polacek@redhat.com>
2339 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2341 * c-errors.c: Include "opts.h".
2342 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2343 * c-parser.c (disable_extension_diagnostics): Handle negative value
2344 of warn_c90_c99_compat, too.
2345 (restore_extension_diagnostics): Likewise.
2346 (c_parser_compound_statement_nostart): Pass
2347 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2349 2014-08-12 Marek Polacek <polacek@redhat.com>
2351 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2353 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2355 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2357 2014-08-10 Marek Polacek <polacek@redhat.com>
2360 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2361 Call pedwarn_c90 instead of pedwarn.
2362 (check_bitfield_type_and_width): Likewise.
2363 (declspecs_add_qual): Likewise.
2364 (declspecs_add_type): Likewise.
2365 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2366 Adjust to only call pedwarn_c90.
2367 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2368 pedwarn_c90 instead of pedwarn.
2369 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2370 * c-parser.c (disable_extension_diagnostics): Handle
2371 warn_c90_c99_compat.
2372 (restore_extension_diagnostics): Likewise.
2373 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2374 pedwarn_c90 instead of pedwarn.
2375 (c_parser_initelt): Likewise.
2376 (c_parser_postfix_expression): Likewise.
2377 (c_parser_postfix_expression_after_paren_type): Likewise.
2378 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2379 * c-tree.h: Fix formatting.
2380 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2381 pedwarn_c90 instead of pedwarn.
2383 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2385 * c-typeck.c: Remove include of pointer-set.h.
2387 2014-08-07 Marek Polacek <polacek@redhat.com>
2389 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2391 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2393 * c-typeck.c: Use hash_map instead of pointer_map.
2395 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2397 * c-decl.c: Use hash_set instead of pointer_set.
2399 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2402 * c-array-notation.c (expand_array_notations): Handling
2405 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
2408 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2411 2014-07-30 Tom Tromey <tromey@redhat.com>
2413 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2415 (really_start_incremental_init, push_init_level): Initialize
2417 (pop_init_level): Set global designator_depth.
2418 (process_init_element): Check for designated_init attribute.
2420 2014-07-20 Marek Polacek <polacek@redhat.com>
2423 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2424 (implicitly_declare): Pass location to implicit_decl_warning.
2426 2014-07-14 Jakub Jelinek <jakub@redhat.com>
2429 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2430 If non-NULL, call c_parser_check_literal_zero.
2431 (c_parser_check_literal_zero): New function.
2432 (c_parser_postfix_expression_after_primary): Adjust
2433 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2435 2014-07-06 Marek Polacek <polacek@redhat.com>
2438 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2439 * c-tree.h (C_ARRAY_PARAMETER): Define.
2440 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2443 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
2444 Chen Gang <gang.chen.5i5j@gmail.com>
2446 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2449 2014-07-01 Marek Polacek <polacek@redhat.com>
2451 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2452 instead of 0 to WARN_FOR_ASSIGNMENT.
2454 2014-07-01 Marek Polacek <polacek@redhat.com>
2457 * c-typeck.c (convert_for_assignment): Pass
2458 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2460 2014-06-30 Marek Polacek <polacek@redhat.com>
2462 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2463 has no_sanitize_undefined attribute.
2465 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2468 * c-array-notation.c (fix_builtin_array_notation_fn):
2469 Check for 0 arguments in builtin call. Check that bultin argument is
2471 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2474 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2476 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2477 qualifiers in __auto_type for atomic types.
2478 (c_parser_typeof_specifier): Discard all type qualifiers in
2479 __typeof__ for atomic types.
2481 2014-06-25 Marek Polacek <polacek@redhat.com>
2484 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2485 the return expression to c_finish_return.
2487 2014-06-25 Jakub Jelinek <jakub@redhat.com>
2489 * c-typeck.c (c_finish_omp_clauses): Make sure
2490 OMP_CLAUSE_LINEAR_STEP has correct type.
2492 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2496 2014-06-24 Jakub Jelinek <jakub@redhat.com>
2498 * c-parser.c (c_parser_omp_for_loop): For
2499 #pragma omp parallel for simd move lastprivate clause from parallel
2500 to for rather than simd.
2502 2014-06-23 Marek Polacek <polacek@redhat.com>
2504 * c-typeck.c (parser_build_binary_op): Don't call
2505 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2507 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2509 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2510 * c-decl.c (merge_decls): Likewise.
2512 2014-06-09 Marek Polacek <polacek@redhat.com>
2515 * c-typeck.c (error_init): Call inform instead of error_at.
2516 (pedwarn_init): Call inform instead of pedwarn.
2517 (warning_init): Call inform instead of warning_at.
2519 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2521 * c-decl.c (merge_decls): Use set_decl_section_name.
2522 (duplicate_decls): Remove node if it exists.
2524 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2527 * c-typeck.c (push_init_level, process_init_element,
2528 pop_init_level): Correct check for zero initialization, move
2529 missing brace warning to respect zero initialization.
2531 2014-06-05 Marek Polacek <polacek@redhat.com>
2534 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2536 2014-06-05 Marek Polacek <polacek@redhat.com>
2539 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2540 on the left hand side operand of a comparison.
2542 2014-06-05 Marek Polacek <polacek@redhat.com>
2545 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2546 Print note only if the warning was printed.
2548 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2551 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2554 2014-06-03 Marek Polacek <polacek@redhat.com>
2557 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2559 * c-tree.h (c_start_case): Update.
2560 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2561 switch condition has boolean value.
2563 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2565 * c-decl.c: Include builtins.h.
2566 * c-parser.c: Likewise.
2568 2014-05-27 Marek Polacek <polacek@redhat.com>
2571 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2572 error and warning calls to error_at and warning_at. Pass location of
2573 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2574 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2575 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2577 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2580 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2581 function parameters.
2583 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2585 * c-decl.c (merge_decls): Preserve symtab node pointers.
2586 (duplicate_decls): Free new decl.
2588 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2590 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2593 * c-parser.c (c_parser_omp_target): Return bool values.
2595 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2597 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2598 num_teams_loc variable to num_thread_limit_loc.
2600 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2602 * c-array-notation.c (expand_array_notations): Use void_node
2603 instead of void_zero_node.
2605 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2607 * c-decl.c (finish_struct): Adjust.
2608 (finish_enum): Likewise.
2610 (record_inline_static): Likewise.
2611 (push_scope): Likewise.
2612 (make_label): Likewise.
2613 (lookup_label_for_goto): Likewise.
2614 (finish_struct): Likewise.
2615 (finish_enum): Likewise.
2616 (store_parm_decls): Likewise.
2617 (c_push_function_context): Likewise.
2618 * c-lang.h: Remove usage of variable_size gty attribute.
2619 * c-parser.c (c_parse_init): Adjust.
2620 (c_parse_file): Likewise.
2622 2014-05-13 Marek Polacek <polacek@redhat.com>
2625 * c-typeck.c (convert_for_assignment): Pass location to
2626 WARN_FOR_ASSIGNMENT instead of input_location.
2628 2014-05-10 Marek Polacek <polacek@redhat.com>
2630 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2631 maybe_warn_string_init.
2632 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2633 maybe_warn_string_init.
2634 * c-tree.h (maybe_warn_string_init): Update declaration.
2635 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2636 Call pedwarn_init with loc instead of with input_location.
2637 (digest_init): Pass init_loc to maybe_warn_string_init.
2638 (pop_init_level): Call pedwarn_init with loc instead of with
2640 (set_init_index): Likewise.
2641 (process_init_element): Likewise.
2643 2014-05-09 Marek Polacek <polacek@redhat.com>
2646 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2647 (c_parser_initelt): Pass location to set_init_label. Pass array index
2648 location to set_init_index.
2649 * c-tree.h (push_init_level): Update declaration.
2650 (pop_init_level): Likewise.
2651 (set_init_index): Likewise.
2652 (set_init_label): Likewise.
2653 * c-typeck.c (error_init): Add location parameter. Call error_at
2655 (digest_init): Pass init_loc to error_init.
2656 (really_start_incremental_init):
2657 (push_init_level): Add location parameter. Pass loc to pop_init_level
2659 (pop_init_level): Likewise.
2660 (set_designator): Add location parameter. Pass loc to pop_init_level,
2661 push_init_level, and error_init.
2662 (set_init_index): Add location parameter. Pass loc to error_init and
2664 (set_init_label): Likewise.
2665 (output_init_element): Pass loc to error_init.
2666 (process_init_element): Pass loc to error_init, pop_init_level,
2667 pedwarn_init, and push_init_level.
2669 2014-05-09 Marek Polacek <polacek@redhat.com>
2672 * c-parser.c (c_parser_attributes): Parse the arguments as an
2673 expression-list if the attribute takes identifier.
2675 2014-05-08 Marek Polacek <polacek@redhat.com>
2678 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2681 2014-05-08 Marek Polacek <polacek@redhat.com>
2684 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2687 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2688 Mike Stump <mikestump@comcast.net>
2689 Richard Sandiford <rdsandiford@googlemail.com>
2691 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2692 (finish_enum): Use wide-int interfaces.
2693 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2694 * c-typeck.c (build_c_cast): Likewise.
2695 (set_nonincremental_init_from_string): Likewise.
2696 (c_tree_equal): Likewise.
2698 2014-05-02 Marek Polacek <polacek@redhat.com>
2701 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2702 Return size_one_node when the type is not complete.
2703 (pointer_diff): Remove comment.
2704 (build_unary_op): Improve error messages.
2706 2014-05-02 Marek Polacek <polacek@redhat.com>
2708 * c-typeck.c (c_finish_return): Separate warning_at calls.
2710 2014-05-02 Marek Polacek <polacek@redhat.com>
2712 * c-tree.h (error_init): Remove declaration.
2713 (pedwarn_init): Likewise.
2714 * c-typeck.c (error_init): Make static and move above.
2715 (pedwarn_init): Likewise.
2716 (warning_init): Move above.
2717 (maybe_warn_string_init): Likewise.
2719 2014-05-01 Jeff Law <law@redhat.com>
2723 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2724 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2727 2014-05-02 Marek Polacek <polacek@redhat.com>
2730 * c-typeck.c (push_init_level): Set constructor_designated to
2731 p->designated for structures.
2733 2014-05-01 Marek Polacek <polacek@redhat.com>
2736 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2737 function-definition has an attribute after the declarator.
2739 2014-05-01 Marek Polacek <polacek@redhat.com>
2742 * c-typeck.c (warning_init): Add location_t parameter. Call
2743 warning_at instead of warning.
2744 (push_init_level): Pass input_location to warning_init.
2745 (add_pending_init): Add location_t parameter. Pass loc to
2747 (set_nonincremental_init): Pass input_location to add_pending_init.
2748 (set_nonincremental_init_from_string): Likewise.
2749 (output_init_element): Pass loc to warning_init and to
2752 2014-05-01 Marek Polacek <polacek@redhat.com>
2755 * c-typeck.c (c_finish_return): Distinguish between label and variable
2756 when warning about returning local address.
2758 2014-05-01 Marek Polacek <polacek@redhat.com>
2761 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2764 2014-05-01 Marek Polacek <polacek@redhat.com>
2767 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2768 instead of 0 to WARN_FOR_QUALIFIERS.
2770 2014-05-01 Marek Polacek <polacek@redhat.com>
2773 * c-typeck.c (default_conversion): Use better location for
2776 2014-04-30 Marek Polacek <polacek@redhat.com>
2778 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2779 also when SANITIZE_FLOAT_DIVIDE is on.
2781 2014-04-30 Marek Polacek <polacek@redhat.com>
2784 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2785 and pedwarn_init. Use loc insted of input_location.
2787 2014-04-30 Marek Polacek <polacek@redhat.com>
2790 * c-typeck.c (build_binary_op): Use location when warning about
2793 2014-04-25 Marek Polacek <polacek@redhat.com>
2796 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2797 always_inline/noinline and hot/cold attributes.
2799 2014-04-25 Marek Polacek <polacek@redhat.com>
2802 * c-parser.c (c_parser_initelt): Pass input_location to
2803 process_init_element.
2804 (c_parser_initval): Pass loc to process_init_element.
2805 * c-tree.h (process_init_element): Adjust declaration.
2806 * c-typeck.c (push_init_level): Pass input_location to
2807 process_init_element.
2808 (pop_init_level): Likewise.
2809 (set_designator): Likewise.
2810 (output_init_element): Add location_t parameter. Pass loc to
2812 (output_pending_init_elements): Pass input_location to
2813 output_init_element.
2814 (process_init_element): Add location_t parameter. Pass loc to
2815 output_init_element.
2817 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2819 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2820 atomic-clause, allow comma in between atomic-clause and
2823 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2826 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2827 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2829 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2832 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2833 create_tmp_var instead build_decl for creating temps.
2834 (build_array_notation_expr): Likewise.
2835 (fix_conditional_array_notations_1): Likewise.
2836 (fix_array_notation_expr): Likewise.
2837 (fix_array_notation_call_expr): Likewise.
2839 2014-03-28 Jakub Jelinek <jakub@redhat.com>
2842 * c-tree.h (c_build_function_call_vec): New prototype.
2843 * c-typeck.c (build_function_call_vec): Don't call
2844 resolve_overloaded_builtin here.
2845 (c_build_function_call_vec): New wrapper function around
2846 build_function_call_vec. Call resolve_overloaded_builtin here.
2847 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2848 Call c_build_function_call_vec instead of build_function_call_vec.
2849 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2850 * c-decl.c (finish_decl): Likewise.
2852 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2855 * c-typeck.c: Use correct format string in cast-qual warning
2857 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2859 * c-decl.c (c_decl_attributes): Use
2860 lang_hooks.types.omp_mappable_type.
2861 * c-typeck.c (c_finish_omp_clauses): Likewise.
2863 2014-03-06 Marek Polacek <polacek@redhat.com>
2866 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2867 of checking tree code.
2869 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2871 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2872 (c_parser_parameter_declaration): Likewise.
2874 2014-02-19 Marek Polacek <polacek@redhat.com>
2877 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2878 Call mark_exp_read on exp.value.
2879 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2880 TREE_ADDRESSABLE on old instead of val.
2881 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2883 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2885 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2886 C_EXPR_APPEND by vec_safe_push.
2887 * c-tree.h (C_EXPR_APPEND): Remove.
2889 2014-01-31 Marek Polacek <polacek@redhat.com>
2892 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2893 build_function_call_vec.
2894 (build_function_call): Likewise.
2895 (build_atomic_assign): Likewise.
2896 (build_function_call_vec): Add arg_loc parameter. Use it.
2897 (convert_arguments): Likewise.
2898 (convert_for_assignment): Rename rhs_loc to expr_loc.
2899 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2900 (c_parser_objc_keywordexpr): Likewise.
2901 (c_parser_postfix_expression_after_primary): Call
2902 build_function_call_vec with expr_loc rather than op_loc.
2903 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2904 build_function_call_vec.
2905 (c_parser_expr_list): Add locations parameter. Fill it with locations
2906 of function arguments.
2907 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2909 2014-01-30 Marek Polacek <polacek@redhat.com>
2912 * c-typeck.c (build_function_call_vec): Use loc parameter.
2913 (convert_arguments): Add location parameter. Use it.
2914 (ep_convert_and_check): Likewise.
2915 (build_atomic_assign): Adjust convert_for_assignment call.
2916 (build_modify_expr): Likewise.
2917 (digest_init): Likewise.
2918 (c_finish_return): Likewise.
2919 (build_conditional_expr): Adjust ep_convert_and_check calls.
2920 (convert_for_assignment): Add rhs_loc parameter. Use it.
2921 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2924 2014-01-30 Richard Biener <rguenther@suse.de>
2927 * c-typeck.c (build_function_call_vec): Do not replace calls
2928 to a function via an incompatible type with a runtime abort.
2930 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2932 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2933 flag_enable_cilkplus with flag_cilkplus.
2934 (c_parser_direct_declarator_inner): Likewise.
2935 (c_parser_attribute_any_word): Likewise.
2936 (c_parser_attributes): Likewise.
2937 (c_parser_compound_statement): Likewise.
2938 (c_parser_statement_after_labels): Likewise.
2939 (c_parser_if_statement): Likewise.
2940 (c_parser_switch_statement): Likewise.
2941 (c_parser_do_statement): Likewise.
2942 (c_parser_for_statement): Likewise.
2943 (c_parser_unary_expression): Likewise.
2944 (c_parser_postfix_expression): Likewise.
2945 (c_parser_postfix_expression_after_primary): Likewise.
2946 (c_parser_postfix_expression_after_primary): Likewise.
2947 (c_parser_omp_clause_name): Likewise.
2948 (c_finish_omp_declare_simd): Likewise.
2949 (c_parser_cilk_verify_simd): Likewise.
2950 * c-typeck.c (build_array_ref): Likewise.
2951 (build_function_call_vec): Likewise.
2952 (convert_arguments): Likewise.
2953 (build_compound_expr): Likewise.
2954 (c_finish_return): Likewise.
2955 (c_finish_if_stmt): Likewise.
2956 (c_finish_loop): Likewise.
2957 (build_binary_op): Likewise.
2959 2014-01-23 Marek Polacek <polacek@redhat.com>
2962 * c-typeck.c (parser_build_binary_op): Use location instead of
2964 (build_binary_op): Pass location to shorten_compare.
2966 2014-01-23 Marek Polacek <polacek@redhat.com>
2969 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2972 2014-01-23 Marek Polacek <polacek@redhat.com>
2975 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2976 of a comma expression.
2977 (emit_side_effect_warnings): Likewise.
2979 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2982 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2983 function to use walk_tree and moved a lot of its functionality to
2984 expand_array_notations.
2985 (expand_array_notations): New function.
2987 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2989 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2990 attribute an attribute without value.
2992 2014-01-23 Jakub Jelinek <jakub@redhat.com>
2995 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2996 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2998 2014-01-22 Marek Polacek <polacek@redhat.com>
3001 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3002 of remove_c_maybe_const_expr on op1 and op2.
3004 2014-01-15 Jakub Jelinek <jakub@redhat.com>
3007 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3008 effects, preevaluate rhs using SAVE_EXPR first.
3010 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3013 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3014 statements with if-elseif statements.
3016 2014-01-06 Marek Polacek <polacek@redhat.com>
3019 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3020 defined bit-field types only in ISO C.
3022 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3024 Update copyright years
3026 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3028 * c-array-notation.c: Use the standard form for the copyright notice.
3030 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3032 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3033 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3034 field in parser is not empty. If not-empty, call the function
3035 c_parser_finish_omp_declare_simd.
3036 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3037 between SIMD-enabled functions and #pragma simd. Added new parameter.
3038 (c_parser_cilk_all_clauses): Modified the usage of the function
3039 c_parser_cilk_clause_vectorlength as mentioned above.
3040 (c_parser_cilk_simd_fn_vector_attrs): New function.
3041 (c_finish_cilk_simd_fn_tokens): Likewise.
3042 (is_cilkplus_vector_p): Likewise.
3043 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3044 "nomask," and "mask" strings in clause name.
3045 (c_parser_omp_all_clauses): Added 3 new case statements:
3046 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3047 PRAGMA_CILK_CLAUSE_NOMASK.
3048 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3049 check for vector attribute and if so call the function
3050 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3051 called the function c_finish_cilk_simd_fn_tokens.
3052 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3053 parser field is non-empty. If so, parse them as you would parse
3054 the omp declare simd pragma.
3055 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3056 Added a check when step is a parameter and flag it as error.
3057 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3058 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3061 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3063 * c-parser.c (c_parser_omp_parallel): Fix description.
3065 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3067 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3068 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3069 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3070 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3072 2013-12-04 Joseph Myers <joseph@codesourcery.com>
3075 * c-parser.c (c_parser_alignas_specifier): Use
3076 c_sizeof_or_alignof_type instead of c_alignof.
3077 (c_parser_alignof_expression): Likewise, with min_alignof
3078 parameter depending on alignof spelling used.
3080 2013-12-04 Marek Polacek <polacek@redhat.com>
3083 * c-decl.c (start_function): Don't warn for missing prototype for
3086 2013-12-03 Marek Polacek <polacek@redhat.com>
3089 * c-decl.c (build_compound_literal): Allow compound literals with
3090 empty initial value.
3092 2013-12-02 Joseph Myers <joseph@codesourcery.com>
3095 * c-typeck.c (build_modify_expr): Diagnose assignment to
3096 expression with array type.
3098 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3101 * c-typeck.c (process_init_element): Do not treat a string as
3102 initializing a whole array when used with a designator for an
3105 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3108 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3109 an inline function following a static declaration.
3111 2013-11-28 Jakub Jelinek <jakub@redhat.com>
3114 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3115 to p_name before calling c_parser_omp_teams instead of after.
3116 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3117 argument. Remove unused p_name variable.
3119 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
3120 Jakub Jelinek <jakub@redhat.com>
3122 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3123 external_scope is NULL.
3125 2013-11-27 Tom de Vries <tom@codesourcery.com>
3126 Marc Glisse <marc.glisse@inria.fr>
3129 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3131 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
3133 * c-typeck.c: Add required include files from gimple.h.
3135 2013-11-22 David Malcolm <dmalcolm@redhat.com>
3137 * c-decl.c (define_label, shadow_tag_warned)
3138 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3139 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3140 (declspecs_add_type): Remove use of in_system_header macro.
3141 * c-parser.c (c_parser_unary_expression): Likewise.
3142 * c-typeck.c (store_init_value, process_init_element)
3143 (c_start_case): Likewise.
3145 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3148 * c-parser.c (c_parser_set_source_position_from_token): Remove
3149 reference to in_system_header from comment.
3151 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3153 * c-decl.c (grokdeclarator): Update comment to refer to
3154 tree_to_[su]hwi rather than tree_low_cst.
3156 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3158 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3159 tree_to_uhwi throughout.
3161 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3163 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3166 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3168 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3171 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
3173 * c-parser.c (c_parser_cilk_simd): New.
3174 (c_parser_cilk_verify_simd): New.
3175 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3176 (c_parser_omp_for_loop): Add case for NE_EXPR.
3177 Set c_break_label for CILK_SIMD.
3178 (c_parser_cilk_clause_vectorlength): New.
3179 (c_parser_cilk_clause_linear): New.
3180 (c_parser_cilk_clause_name): New.
3181 (c_parser_cilk_all_clauses): New.
3182 * c-typeck.c (build_unary_op): Pass location argument to
3184 (build_modify_expr): Same.
3185 (build_asm_expr): Same.
3186 (c_finish_bc_stmt): Error on break/continue in loops.
3188 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
3190 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3192 2013-11-14 Diego Novillo <dnovillo@google.com>
3194 * c-decl.c: Include print-tree.h.
3195 Include stor-layout.h.
3198 Include stringpool.h.
3199 * c-lang.c: Include fold-const.h.
3200 * c-parser.c: Include stringpool.h.
3202 Include stor-layout.h.
3204 Include trans-mem.h.
3205 * c-typeck.c: Include stor-layout.h.
3206 Include trans-mem.h.
3210 2013-11-13 Joseph Myers <joseph@codesourcery.com>
3212 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3213 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3215 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3216 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3218 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3219 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3220 (c_parser_declarator, c_parser_direct_declarator_inner)
3221 (c_parser_parameter_declaration, c_parser_type_name): All callers
3223 (c_parser_declaration_or_fndef): Handle declarations with type
3224 determined from the initializer.
3226 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
3228 * c-typeck.c: Include gimplify.h.
3230 2013-11-12 Joseph Myers <joseph@codesourcery.com>
3232 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3233 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3235 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3236 or _Thread_local as appropriate in diagnostics.
3237 (build_null_declspecs): Initialize ret->thread_gnu_p.
3238 (declspecs_add_scspec): Handle either __thread or _Thread_local
3239 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3240 pedantic. Do not disallow _Thread_local extern and _Thread_local
3243 2013-11-07 Joseph Myers <joseph@codesourcery.com>
3244 Andrew MacLeod <amacleod@redhat.com>
3246 * c-aux-info.c (gen_type): Handle atomic qualifier.
3247 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3248 qualifiers when compating types.
3249 (shadow_tag_warned): Handle atomic_p in declspecs.
3250 (quals_from_declspecs): Likewise.
3251 (start_decl): Use c_type_promotes_to when promoting argument
3253 (grokdeclarator): Handle _Atomic.
3254 (get_parm_info): Diagnose any qualifier on "void" as only
3256 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3257 comparing types. Use c_type_promotes_to when promoting argument
3259 (finish_function): Use c_type_promotes_to when promoting argument
3261 (build_null_declspecs): Handle atomic_p in declspecs.
3262 (declspecs_add_qual): Handle RID_ATOMIC.
3263 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3264 (c_token_starts_declspecs): Handle RID_ATOMIC.
3265 (c_parser_declspecs): Handle atomic type specifiers and
3267 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3268 from types of expressions with atomic type.
3269 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3270 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3271 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3272 (c_parser_statement_after_labels, c_parser_switch_statement)
3273 (c_parser_for_statement, c_parser_expr_no_commas)
3274 (c_parser_conditional_expression, c_parser_binary_expression)
3275 (c_parser_cast_expression, c_parser_unary_expression)
3276 (c_parser_postfix_expression)
3277 (c_parser_postfix_expression_after_primary, c_parser_expression):
3278 Use convert_lvalue_to_rvalue.
3279 (c_parser_expression_conv, c_parser_expr_list): Document
3280 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3281 (c_parser_objc_synchronized_statement): Use
3282 convert_lvalue_to_rvalue.
3283 (c_parser_objc_selector): Handle RID_ATOMIC.
3284 (c_parser_objc_receiver, c_parser_array_notation): Use
3285 convert_lvalue_to_rvalue.
3286 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3287 _Atomic (type-name).
3288 (struct c_declspecs): Add atomic_p field.
3289 (convert_lvalue_to_rvalue): Declare.
3290 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3291 corresponding atomic types.
3292 (qualify_type): Don't add _Atomic qualifiers from second argument.
3293 (comp_target_types): Do not allow _Atomic mismatches.
3294 (type_lists_compatible_p): Do not remove atomic qualifiers when
3296 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3297 (build_atomic_assign): New functions.
3298 (build_unary_op): Use build_atomic_assign for atomic increment and
3300 (build_conditional_expr): Do not treat _Atomic void as a qualified
3302 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3303 (find_anonymous_field_with_type, convert_to_anonymous_field)
3304 (convert_for_assignment): Do not remove atomic qualifiers when
3306 (digest_init): Do not accept initialization of arrays of atomic
3307 elements by string constants.
3308 (build_asm_expr): Use convert_lvalue_to_rvalue.
3309 (build_binary_op): Do not treat _Atomic void as a qualified
3312 2013-11-06 DJ Delorie <dj@redhat.com>
3314 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3315 both explicit and builtin, print the location of the explicit one.
3317 2013-11-05 Tobias Burnus <burnus@net-b.de>
3319 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3320 c_parser_omp_distribute, c_parser_omp_teams,
3321 c_parser_omp_target, c_parser_omp_declare): Handle
3324 2013-11-03 Marek Polacek <polacek@redhat.com>
3326 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3328 2013-11-01 Jakub Jelinek <jakub@redhat.com>
3330 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3331 check_dup_generic at the end, unless remove is true.
3332 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3334 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3336 2013-10-31 Jakub Jelinek <jakub@redhat.com>
3338 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3339 with decl that is not pointer nor array.
3341 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3343 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3344 a spawning function is found.
3345 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3346 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3347 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3348 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3350 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3351 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3353 (c_finish_return): Added a check to reject _Cilk_spawn in return
3355 (build_cilk_spawn): New function.
3356 (build_cilk_sync): Likewise.
3357 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3359 2013-10-27 Tobias Burnus <burnus@net-b.de>
3362 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3363 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3364 (c_parser_statement_after_labels): Update calls.
3366 2013-10-24 Tobias Burnus <burnus@net-b.de>
3369 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3370 Handle PRAGMA_IVDEP.
3371 (c_parser_statement_after_labels): Update call.
3373 2013-10-24 Marek Polacek <polacek@redhat.com>
3375 * c-parser.c (c_parser_struct_declaration): Add a comment.
3376 (c_parser_declarator): Don't allow _Alignas here.
3378 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
3380 * c-parser.c: Include omp-low.h.
3381 * c-typeck.c: Likewise.
3383 2013-10-17 Marek Polacek <polacek@redhat.com>
3386 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3387 Document syntax of the array-declarator.
3388 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3390 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3391 (c_parser_struct_declaration): Likewise.
3392 (c_parser_declarator): Likewise.
3393 (c_parser_direct_declarator_inner): Likewise.
3394 (c_parser_parameter_declaration): Likewise.
3395 (c_parser_type_name): Likewise.
3397 2013-10-11 Jakub Jelinek <jakub@redhat.com>
3399 * c-lang.h (current_omp_declare_target_attribute): New extern
3401 * c-parser.c: Include c-lang.h.
3402 (struct c_parser): Change tokens to c_token *.
3403 Add tokens_buf field. Change tokens_avail type to unsigned int.
3404 (c_parser_consume_token): If parser->tokens isn't
3405 &parser->tokens_buf[0], increment parser->tokens.
3406 (c_parser_consume_pragma): Likewise.
3407 (enum pragma_context): Add pragma_struct and pragma_param.
3408 (c_parser_external_declaration): Adjust
3409 c_parser_declaration_or_fndef caller.
3410 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3411 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3412 Adjust recursive call.
3413 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3415 (c_parser_parameter_declaration): Use pragma_param instead of
3417 (c_parser_compound_statement_nostart, c_parser_label,
3418 c_parser_for_statement): Adjust
3419 c_parser_declaration_or_fndef callers.
3420 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3421 it through to c_parser_conditional_expression.
3422 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3423 pass it through to c_parser_binary_expression. Adjust recursive
3425 (c_parser_binary_expression): Remove prec argument, add
3426 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3427 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3428 binop matches it, use build2 instead of parser_build_binary_op.
3429 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3430 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3431 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3432 Handle pragma_struct and pragma_param the same as pragma_external.
3433 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3434 (c_parser_omp_variable_list): Parse array sections for
3435 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3436 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3437 (c_parser_omp_clause_reduction): Handle user defined reductions.
3438 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3439 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3440 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3441 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3442 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3443 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3444 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3445 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3446 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3447 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3448 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3449 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3450 (c_parser_omp_for_loop): Add CODE argument, pass it through
3451 to c_finish_omp_for. Change last argument to cclauses,
3452 and adjust uses to grab parallel clauses from the array of all
3453 the split clauses. Adjust c_parser_binary_expression,
3454 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3455 (omp_split_clauses): New function.
3456 (c_parser_omp_simd): New function.
3457 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3458 Allow the function to be called also when parsing combined constructs,
3459 and call c_parser_omp_simd when parsing for simd.
3460 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3461 #pragma omp section, require exactly one structured-block instead of
3462 sequence of statements.
3463 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3464 Allow the function to be called also when parsing combined constructs.
3465 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3466 Allow the function to be called also when parsing combined
3468 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3469 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3470 c_parser_omp_teams, c_parser_omp_target_data,
3471 c_parser_omp_target_update, c_parser_omp_target,
3472 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3473 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3474 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3475 (c_parser_omp_construct): Add p_name and mask vars. Handle
3476 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3477 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3478 and c_parser_omp_sections callers.
3479 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3480 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3481 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3482 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3483 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3485 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3486 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3487 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3488 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3489 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3490 * c-typeck.c: Include tree-inline.h.
3491 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3492 handle_omp_array_sections_1, handle_omp_array_sections,
3493 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3494 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3495 user defined reductions.
3496 (c_tree_equal): New function.
3497 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3498 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3499 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3500 c_check_omp_declare_reduction_r): New prototypes.
3501 * c-decl.c (current_omp_declare_target_attribute): New variable.
3502 (c_decl_attributes): New function.
3503 (start_decl, start_function): Use it instead of decl_attributes.
3504 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3505 c_omp_reduction_decl, c_omp_reduction_lookup,
3506 c_check_omp_declare_reduction_r): New functions.
3508 2013-09-25 Tom Tromey <tromey@redhat.com>
3510 * Make-lang.in (c/gccspec.o): Remove.
3511 (CFLAGS-c/gccspec.o): New variable.
3512 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3513 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3514 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3516 2013-09-25 Tom Tromey <tromey@redhat.com>
3518 * Make-lang.in (c/gccspec.o): Don't use subshell.
3520 2013-09-18 Marek Polacek <polacek@redhat.com>
3523 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3524 Remove unnecessary check.
3526 2013-09-18 Marek Polacek <polacek@redhat.com>
3529 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3530 no_sanitize_undefined attribute.
3532 2013-09-13 Kai Tietz <ktietz@redhat.com>
3535 * c-decl.c (c_builtin_function_ext_scope): Remove
3536 wrong assumption that it is never called on prexisting
3539 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3541 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3543 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3545 * c-objc-common.c (c_tree_printer): Tidy.
3547 2013-08-30 Marek Polacek <polacek@redhat.com>
3549 * c-typeck.c (build_binary_op): Add division by zero and shift
3552 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
3553 Joseph Myers <joseph@codesourcery.com>
3556 * c-typeck.c (c_common_type): Prefer double_type_node over
3557 other REAL_TYPE types with the same precision.
3558 (convert_arguments): Likewise.
3560 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3562 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3563 (c_initialize_diagnostics): Call a destructor for the early printer.
3565 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3567 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3568 printer initialization.
3570 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
3573 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3574 check for truth values.
3575 (expand_array_notation_exprs): Added truth values case. Removed an
3576 unwanted else. Added for-loop to walk through subtrees in default
3579 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3581 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3583 2013-07-23 Joseph Myers <joseph@codesourcery.com>
3585 * c-parser.c (struct c_generic_association): Fix typo.
3587 2013-07-23 Tom Tromey <tromey@redhat.com>
3588 Joseph Myers <joseph@codesourcery.com>
3590 * c-parser.c (struct c_generic_association): New.
3591 (c_generic_association_d): New typedef.
3592 (c_parser_generic_selection): New function.
3593 (c_parser_postfix_expression): Handle RID_GENERIC.
3595 2013-07-13 Jason Merrill <jason@redhat.com>
3598 * c-decl.c (finish_struct): Check for too-large class.
3600 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
3603 * c-typeck.c (set_init_index): When folding, check for index overflow.
3605 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3607 * c-parser.c (c_parser_array_notation): Removed rejection of array
3608 notations in an array of function pointers.
3610 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3612 * c-array-notation.c (make_triplet_val_inv): New function.
3613 (create_cmp_incr): Likewise.
3614 (create_array_refs): Likewise.
3615 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3616 Also modularized common parts between functions and called the function.
3617 (build_array_notation_expr): Likewise.
3618 (fix_conditional_array_notations_1): Likewise.
3619 (fix_array_notation_expr): Likewise.
3620 (fix_array_notation_call_expr): Likewise.
3622 2013-06-18 Marek Polacek <polacek@redhat.com>
3625 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3627 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3629 * c-array-notation.c (build_array_notation_expr): Reject array notation
3630 mismatch between LHS and RHS even inside a call_expr. Also, removed
3631 a couple while statements that were dead code.
3633 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3635 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3636 excessive precision expressions in function parameters. Also removed
3637 couple unwanted while statements.
3639 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3641 * c-array-notation.c (expand_array_notation_exprs): Added
3642 ARRAY_NOTATION_REF case.
3644 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3646 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3647 function to c-family/array-notation-common.c.
3648 (is_cilkplus_reduce_builtin): Likewise.
3649 (find_rank): Likewise.
3650 (extract_array_notation_exprs): Likewise.
3651 (replace_array_notations): Likewise.
3652 (find_inv_trees): Likewise.
3653 (replace_inv_trees): Likewise.
3654 (contains_array_notation_expr): Likewise.
3655 (find_correct_array_notation_type): Likewise.
3656 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3657 (struct inv_list): Moved this to c-family/array-notation-common.c.
3658 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3660 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3662 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3663 reduction functions outside the for-loop. Added a check if the fundecl
3664 is non-NULL. Finally, removed an unwanted if-statement, and made the
3667 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3669 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3670 condition of the if-statement matches the rank of else-block and then-
3671 block when array notations are used.
3672 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3673 expression after the entire function body is parsed.
3674 (c_parser_expr_no_commas): Delayed creating array notation expressions
3675 to the end of function parsing.
3676 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3677 whole if-statement instead of just the condition.
3678 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3680 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3683 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3684 array to NULL_TREE if they are unused. Also added a check for the
3685 field to be NULL before its fields are used in future.
3687 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3690 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3691 (build_array_notation_expr): Likewise.
3693 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3695 * c-typeck.c (build_array_ref): Added a check to see if array's
3696 index is greater than one. If true, then emit an error.
3697 (build_function_call_vec): Exclude error reporting and checking
3698 for builtin array-notation functions.
3699 (convert_arguments): Likewise.
3700 (c_finish_return): Added a check for array notations as a return
3701 expression. If true, then emit an error.
3702 (c_finish_loop): Added a check for array notations in a loop
3703 condition. If true then emit an error.
3704 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3705 (build_binary_op): Added a check for array notation expr inside
3706 op1 and op0. If present, we call another function to find correct
3708 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3709 * c-parser.c (c_parser_compound_statement): Check if array
3710 notation code is used in tree, if so, then transform them into
3712 (c_parser_expr_no_commas): Check if array notation is used in LHS
3713 or RHS, if so, then build array notation expression instead of
3715 (c_parser_postfix_expression_after_primary): Added a check for
3716 colon(s) after square braces, if so then handle it like an array
3717 notation. Also, break up array notations in unary op if found.
3718 (c_parser_direct_declarator_inner): Added a check for array
3720 (c_parser_compound_statement): Added a check for array notation in
3721 a stmt. If one is present, then expand array notation expr.
3722 (c_parser_if_statement): Likewise.
3723 (c_parser_switch_statement): Added a check for array notations in
3724 a switch statement's condition. If true, then output an error.
3725 (c_parser_while_statement): Similarly, but for a while.
3726 (c_parser_do_statement): Similarly, but for a do-while.
3727 (c_parser_for_statement): Similarly, but for a for-loop.
3728 (c_parser_unary_expression): Check if array notation is used in a
3729 pre-increment or pre-decrement expression. If true, then expand
3731 (c_parser_array_notation): New function.
3732 * c-array-notation.c: New file.
3733 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3735 2013-05-23 Mike Stump <mikestump@comcast.net>
3737 * c-typeck.c (convert_for_assignment): Handle references to memory
3740 2013-05-16 Jason Merrill <jason@redhat.com>
3742 * Make-lang.in (cc1$(exeext)): Use link mutex.
3744 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3746 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3747 to simply use OPT_Wpointer_arith.
3748 (build_unary_op): Likewise.
3750 2013-04-03 Jakub Jelinek <jakub@redhat.com>
3753 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3754 argument. If set, or it temporarily for parsing of the first
3755 argument into force_folding_builtin_constant_p.
3756 (c_parser_postfix_expression): Adjust callers.
3758 2013-03-21 Richard Biener <rguenther@suse.de>
3760 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3761 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3763 2013-02-12 Marek Polacek <polacek@redhat.com>
3766 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3769 2013-01-24 Jakub Jelinek <jakub@redhat.com>
3772 * c-typeck.c (set_nonincremental_init_from_string): If
3773 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3775 (process_init_element): Likewise.
3777 2012-12-20 Jakub Jelinek <jakub@redhat.com>
3780 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3781 argument, don't call default_function_array_conversion
3782 nor c_fully_fold here.
3783 (c_parser_asm_statement): Adjust callers.
3784 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3785 and outputs here, and call default_function_array_conversion
3786 on inputs that don't need to be addressable.
3788 2012-12-18 Jakub Jelinek <jakub@redhat.com>
3791 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3792 warning require that both c_common_unsigned_type as well as
3793 c_common_signed_type is the same for both mvl and mvr types.
3795 2012-11-16 Diego Novillo <dnovillo@google.com>
3797 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3799 * c-common.c: Use new vec API in vec.h.
3800 * c-common.h: Likewise.
3801 * c-gimplify.c: Likewise.
3802 * c-pragma.c: Likewise.
3803 * c-pretty-print.c: Likewise.
3804 * c-pretty-print.h: Likewise.
3805 * c-semantics.c: Likewise.
3806 * c-decl.c: Likewise.
3807 * c-parser.c: Likewise.
3808 * c-tree.h: Likewise.
3809 * c-typeck.c: Likewise.
3811 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3814 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3816 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3819 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3820 shadows a function, unless the variable is a function or a
3821 pointer-to-function.
3823 2012-10-12 Jakub Jelinek <jakub@redhat.com>
3826 * c-parser.c (struct c_tree_loc_pair): Removed.
3827 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3828 add location_t * and tree * arguments, fill in array of 3
3829 sizeof_arg trees and corresponding locs.
3830 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3831 c_parser_expr_list callers.
3832 (c_parser_postfix_expression_after_primary): Likewise. Pass
3833 array of 3 sizeof_arg trees and locs (corresponding to first
3834 3 arguments) to sizeof_pointer_memaccess_warning.
3836 2012-10-09 Lawrence Crowl <crowl@google.com>
3838 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3839 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3842 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3845 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3848 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
3851 * c-typeck.c: Include c-common.h.
3852 (enum stv_conv): Moved to c-common.h.
3853 (scalar_to_vector): Moved to c-common.c.
3854 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3855 * Make-lang.in: c-typeck.c depends on c-common.h.
3857 2012-10-04 Arnaud Charlet <charlet@adacore.com>
3859 * c-decl.c (c_write_global_declarations): Fix handling of
3862 2012-09-30 Sharad Singhai <singhai@google.com>
3864 * c-decl.c (c_write_global_declarations): Use a different method
3865 to determine if the dump has ben initialized.
3867 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3870 * c-typeck.c (c_cast_expr): When casting to a type requiring
3871 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3874 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3877 * c-typeck.c (build_unary_op): Pass original argument of
3878 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3879 any C_MAYBE_CONST_EXPR, if it has integer operands.
3880 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3881 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3882 to c_objc_common_truthvalue_conversion, then remove any
3883 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3884 c_objc_common_truthvalue_conversion not
3885 c_common_truthvalue_conversion.
3886 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3887 call note_integer_operands for arguments with integer operands
3888 that are not integer constants.
3890 2012-09-13 Jakub Jelinek <jakub@redhat.com>
3893 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3894 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3896 2012-08-31 Jakub Jelinek <jakub@redhat.com>
3899 * c-convert.c (convert): Don't call fold_convert_loc if
3900 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3901 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3902 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3904 2012-08-24 Jakub Jelinek <jakub@redhat.com>
3907 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3908 for nested and empty_ok arguments in the call to
3909 c_parser_declaration_or_fndef.
3911 2012-08-17 Jakub Jelinek <jakub@redhat.com>
3913 * c-tree.h (c_last_sizeof_arg): Declare.
3914 * c-parser.c (struct c_tree_loc_pair): New type.
3915 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3917 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3918 (c_parser_postfix_expression_after_primary): Likewise. Call
3919 sizeof_pointer_memaccess_warning if needed.
3920 (sizeof_ptr_memacc_comptypes): New function.
3921 * c-typeck.c (c_last_sizeof_arg): New global variable.
3922 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3924 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
3926 * c-lang.h (lang_decl): Add variable_size GTY option.
3928 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3930 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3931 * Make-lang.in: Fix dependencies.
3933 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3935 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3936 and add language Makefile hooks.
3937 * config-lang.in: New file.
3938 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3939 add the required "normal" config-lang.in rules.
3940 * c-lang.h: Moved from gcc/ to here.
3941 * c-tree.h: Likewise.
3942 * c-objc-common.c: Likewise.
3943 * c-objc-common.h: Likewise.
3944 * c-typeck.c: Likewise.
3945 * c-convert.c: Likewise.
3946 * c-lang.c: Likewise.
3947 * c-aux-info.c: Likewise.
3948 * c-errors.c: Likewise.
3949 * gccspec.c: Likewise.
3950 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3951 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3953 Copyright (C) 2012-2016 Free Software Foundation, Inc.
3955 Copying and distribution of this file, with or without modification,
3956 are permitted in any medium without royalty provided the copyright
3957 notice and this notice are preserved.