1 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
2 Richard Biener <rguenther@suse.de>
4 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
5 building IL when arguments are error_mark_node.
6 (c_parser_gimple_unary_expression): Likewise.
7 (c_parser_gimple_if_stmt): Likewise.
8 (c_parser_gimple_switch_stmt): Likewise.
9 (c_parser_gimple_return_stmt): Likewise.
10 (c_parser_parse_ssa_name): When name lookup fails do not build
11 an SSA name. Use undeclared rather than not declared in error
14 2017-02-09 Marek Polacek <polacek@redhat.com>
17 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
18 instead of c_parser_skip_until_found.
20 2017-02-09 Jakub Jelinek <jakub@redhat.com>
23 * c-parser.c (c_parser_omp_declare_target): Don't invoke
24 symtab_node::get on automatic variables.
26 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
27 Chung-Lin Tang <cltang@codesourcery.com>
29 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
30 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
32 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
34 2017-02-07 Richard Biener <rguenther@suse.de>
36 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
37 (c_parser_gimple_postfix_expression_after_primary):
38 Do not use c_build_function_call_vec to avoid folding and promotion.
41 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
44 * c-decl.c (pop_scope): Pass main_input_filename to
45 build_translation_unit_decl.
47 2017-01-24 David Malcolm <dmalcolm@redhat.com>
49 * c-parser.c: Include "read-rtl-function.h" and
51 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
52 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
53 production. Update for renaming of field "gimple_pass" to
54 "gimple_or_rtl_pass". If __RTL was seen, call
55 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
56 to an auto_timevar, to cope with early exit.
57 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
58 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
59 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
61 (c_parser_parse_rtl_body): New function.
62 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
63 (struct c_declspecs): Rename field "gimple_pass" to
64 "gimple_or_rtl_pass". Add field "rtl_p".
65 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
66 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
67 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
68 (c_parser_gimple_or_rtl_pass_list): ...this.
70 2017-01-20 Marek Polacek <polacek@redhat.com>
73 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
75 2017-01-13 Richard Biener <rguenther@suse.de>
77 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
80 2017-01-13 Richard Biener <rguenther@suse.de>
82 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
83 _Literal ( type-name ) number.
85 2017-01-12 Richard Biener <rguenther@suse.de>
87 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
90 2017-01-11 Jakub Jelinek <jakub@redhat.com>
93 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
96 2017-01-11 Richard Biener <rguenther@suse.de>
99 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
100 returns on parse errors.
102 2017-01-04 Marek Polacek <polacek@redhat.com>
105 * c-parser.c (c_parser_postfix_expression): Mark zero character
106 constants by setting original_type in c_expr.
107 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
108 with a zero character constant.
109 (char_type_p): New function.
111 2017-01-04 David Malcolm <dmalcolm@redhat.com>
113 * c-parser.c (c_parser_declaration_or_fndef): Create a
114 rich_location at init_loc and parse it to start_init.
115 (last_init_list_comma): New global.
116 (c_parser_braced_init): Update last_init_list_comma when parsing
117 commas. Pass it to pop_init_level. Pass location of closing
118 brace to pop_init_level.
119 (c_parser_postfix_expression_after_paren_type): Create a
120 rich_location at type_loc and parse it to start_init.
121 (c_parser_omp_declare_reduction): Likewise for loc.
122 * c-tree.h (start_init): Add rich_location * param.
123 (pop_init_level): Add location_t param.
124 * c-typeck.c (struct initializer_stack): Add field
125 "missing_brace_richloc".
126 (start_init): Add richloc param, use it to initialize
127 the stack node's missing_brace_richloc.
128 (last_init_list_comma): New decl.
129 (finish_implicit_inits): Pass last_init_list_comma to
131 (push_init_level): When finding missing open braces, add fix-it
132 hints to the richloc.
133 (pop_init_level): Add "insert_before" param and pass it
134 when calling pop_init_level. Add fixits about missing
135 close braces to any richloc. Use the richloc for the
136 -Wmissing-braces warning.
137 (set_designator): Pass last_init_list_comma to pop_init_level.
138 (process_init_element): Likewise.
140 2017-01-01 Jakub Jelinek <jakub@redhat.com>
142 Update copyright years.
144 2016-12-21 Jakub Jelinek <jakub@redhat.com>
147 * c-typeck.c (build_function_call_vec): If check_function_arguments
148 returns true, set TREE_NO_WARNING on CALL_EXPR.
151 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
152 to *expr instead of overwriting it.
154 2016-12-20 Richard Biener <rguenther@suse.de>
156 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
158 (c_parser_gimple_statement): Only build assigns for non-error
160 (c_parser_gimple_postfix_expression_after): Improve error recovery.
162 2016-12-14 Martin Jambor <mjambor@suse.cz>
164 * c-parser.c: Include omp-general.h and omp-offload.h instead of
166 (c_finish_oacc_routine): Adjusted call to
167 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
168 to use their new names.
169 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
171 (c_parser_oacc_update): Likewise.
172 (c_parser_omp_simd): Likewise.
173 (c_parser_omp_target_update): Likewise.
174 * c-typeck.c: Include omp-general.h instead of omp-low.h.
175 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
177 (c_finish_omp_cancellation_point): Likewise.
178 * gimple-parser.c: Do not include omp-low.h
180 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
181 James Norris <jnorris@codesourcery.com>
183 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
184 EXIT_DATA,WAIT} are not used in compound statements.
185 (c_parser_oacc_enter_exit_data): Update diagnostics.
187 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
190 * c-decl.c (diagnose_mismatched_decls): Use
191 OPT_Wbuiltin_declaration_mismatch here too.
193 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
194 Alan Hayward <alan.hayward@arm.com>
195 David Sherwood <david.sherwood@arm.com>
197 * c-decl.c (merge_decls): Use SET_DECL_MODE.
198 (make_label, finish_struct): Likewise.
200 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
201 Richard Biener <rguenther@suse.de>
203 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
204 * config-lang.in (gtfiles): Add c/c-parser.h.
205 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
206 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
207 * c-parser.c (enum c_id_kind, struct c_token,
208 c_parser_next_token_is, c_parser_next_token_is_not,
209 c_parser_next_token_is_keyword,
210 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
212 * c-parser.h: ... new header.
213 * c-parser.c: Include c-parser.h and gimple-parser.h.
214 (c_parser_peek_token, c_parser_peek_2nd_token,
215 c_token_starts_typename, c_parser_next_token_starts_declspecs,
216 c_parser_next_tokens_start_declaration, c_parser_consume_token,
217 c_parser_error, c_parser_require, c_parser_skip_until_found,
218 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
219 c_parser_type_name): Export.
220 (c_parser_tokens_buf): New function.
221 (c_parser_error): Likewise.
222 (c_parser_set_error): Likewise.
223 (c_parser_declspecs): Handle RID_GIMPLE.
224 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
225 via c_parser_parse_gimple_body.
226 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
227 c_token_starts_typename, c_parser_next_token_starts_declspecs,
228 c_parser_next_tokens_start_declaration, c_parser_consume_token,
229 c_parser_error, c_parser_require, c_parser_skip_until_found,
230 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
231 c_parser_type_name): Declare.
232 (struct c_parser): Declare forward.
233 (c_parser_tokens_buf): Declare.
234 (c_parser_error): Likewise.
235 (c_parser_set_error): Likewise.
236 * gimple-parser.c: New file.
237 * gimple-parser.h: Likewise.
239 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
242 * c-parser.c (c_parser_postfix_expression_after_primary): Call
245 2016-09-11 Le-Chun Wu <lcwu@google.com>
246 Mark Wielaard <mjw@redhat.com>
248 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
249 to the given -Wshadow= variant.
251 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
253 * c-typeck.c: Include memmodel.h.
255 2016-10-13 Jakub Jelinek <jakub@redhat.com>
258 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
259 instead of lhd_return_null_tree_v.
261 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
264 * c-decl.c (smallest_type_quals_location): New static function.
265 (grokdeclarator): Try to find the correct location for an ignored
268 2016-09-26 Marek Polacek <polacek@redhat.com>
271 * c-decl.c (pop_scope): Add gcc_fallthrough.
273 2016-09-26 Marek Polacek <polacek@redhat.com>
276 * c-parser.c (struct c_token): Add flags field.
277 (c_lex_one_token): Pass it to c_lex_with_flags.
278 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
279 into IFN_FALLTHROUGH.
280 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
281 attribute fallthrough after a case label or default label.
282 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
284 2016-09-24 Marek Polacek <polacek@redhat.com>
287 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
288 have boolean value. Warn about ++/-- on booleans.
290 2016-09-23 Jakub Jelinek <jakub@redhat.com>
292 * c-parser.c (incomplete_record_decls): Remove unnecessary
293 = vNULL initialization of file scope vec.
295 2016-09-16 Marek Polacek <polacek@redhat.com>
297 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
299 2016-09-14 Marek Polacek <polacek@redhat.com>
301 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
302 (fix_array_notation_expr): Likewise.
303 * c-decl.c (finish_decl): Likewise.
304 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
305 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
306 (function_to_pointer_conversion): Use false instead of 0.
307 (convert_lvalue_to_rvalue): Likewise.
308 (parser_build_unary_op): Likewise.
309 (build_atomic_assign): Likewise.
310 (build_unary_op): Change nonconvert parameter type to bool, use
311 true/false instead of 1/0.
312 (build_binary_op): Use true instead of 1.
314 2016-09-13 David Malcolm <dmalcolm@redhat.com>
316 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
317 of add_fixit_insert to add_fixit_insert_before.
319 2016-09-13 Marek Polacek <polacek@redhat.com>
321 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
324 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
327 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
328 COMPOUND_EXPR to warn_for_omitted_condop.
330 2016-09-07 David Malcolm <dmalcolm@redhat.com>
332 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
333 c_get_substring_location for this new langhook.
335 2016-09-02 Jakub Jelinek <jakub@redhat.com>
338 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
340 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
341 instead of mark_exp_read on low_bound/length expression.
342 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
343 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
344 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
345 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
346 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
347 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
348 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
349 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
350 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
351 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
352 instead of mark_expr_read.
353 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
354 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
355 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
356 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
357 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
358 array section bases outside of depend clause, for depend clause
359 use convert_lvalue_to_rvalue on the base.
360 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
361 linear, aligned, map, to and from clauses.
362 (c_omp_clause_copy_ctor): New function.
364 2016-09-01 Marek Polacek <polacek@redhat.com>
367 * c-typeck.c (composite_type): Add FALLTHRU comment.
369 2016-08-31 David Malcolm <dmalcolm@redhat.com>
371 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
372 to the insertion fixits for "struct", "union", and "enum".
374 2016-08-30 David Malcolm <dmalcolm@redhat.com>
376 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
377 rather than add_fixit_misspelled_id.
378 (undeclared_variable): Likewise.
379 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
380 now-redundant "here" params from add_fixit_insert method calls.
381 (c_parser_parameter_declaration): Likewise.
382 * c-typeck.c (build_component_ref): Remove now-redundant range
383 param from add_fixit_replace method calls.
385 2016-08-25 Marek Polacek <polacek@redhat.com>
387 * c-typeck.c (parser_build_binary_op): Pass LHS to
388 warn_logical_not_parentheses.
390 2016-08-25 Marek Polacek <polacek@redhat.com>
393 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
394 or _FloatN or _FloatNx is not supported.
395 (finish_declspecs): Set type to integer_type_node when _FloatN or
396 _FloatNx is not supported.
398 2016-08-19 Joseph Myers <joseph@codesourcery.com>
401 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
402 (struct c_declspecs): Add field floatn_nx_idx.
403 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
404 and _FloatNx type specifiers.
405 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
406 (c_parser_declspecs, c_parser_attribute_any_word)
407 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
408 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
409 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
410 narrower than double.
412 2016-08-12 Jakub Jelinek <jakub@redhat.com>
413 Martin Liska <mliska@suse.cz>
416 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
417 % to determine val element to change. Assert that
418 wchar_bytes * charwidth fits into val array.
420 2016-08-12 Marek Polacek <polacek@redhat.com>
423 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
424 (c_parser_postfix_expression): Likewise.
425 * c-typeck.c (build_unary_op): Adjust fall through comment.
426 (c_mark_addressable): Likewise.
428 2016-08-11 Jakub Jelinek <jakub@redhat.com>
431 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
432 array member through typedef, for orig_qual_indirect == 0 clear
435 2016-08-08 David Malcolm <dmalcolm@redhat.com>
438 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
439 this up to selftest::run_c_tests.
440 (selftest::run_c_tests): New function.
442 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
444 * c-parser.c (struct oacc_routine_data): Add error_seen and
446 (c_finish_oacc_routine): Use these.
447 (c_parser_declaration_or_fndef): Adjust.
448 (c_parser_oacc_routine): Likewise. Support more C language
449 constructs, and improve diagnostics. Move pragma context
451 (c_parser_pragma): ... here.
453 * c-parser.c (struct oacc_routine_data): New.
454 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
456 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
457 declare target" attribute.
459 2016-08-01 Jan Beulich <jbeulich@suse.com>
461 * c-fold.c (c_fully_fold_internal): Also emit shift count
462 warnings for vector types.
463 * c-typeck.c (build_binary_op): Likewise.
465 2016-07-29 Marek Polacek <polacek@redhat.com>
468 * c-decl.c (finish_struct): Rephrase an error message.
471 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
472 to error node for invalid code.
475 * c-decl.c (implicitly_declare): Return decl early not only for
476 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
478 2016-07-29 Jakub Jelinek <jakub@redhat.com>
481 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
482 on GNU extern inline functions.
484 2016-07-29 Marek Polacek <polacek@redhat.com>
487 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
490 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
492 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
494 2016-07-20 David Malcolm <dmalcolm@redhat.com>
496 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
498 (best_macro_match): Likewise, converting from a typedef to a
500 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
501 (lookup_name_fuzzy): Update for change of best_macro_match to a
502 subclass with a ctor that calls cpp_forall_identifiers.
504 2016-07-20 David Malcolm <dmalcolm@redhat.com>
506 * c-decl.c (implicit_decl_warning): Update for conversion of
507 return type of lookup_name_fuzzy to const char *.
508 (undeclared_variable): Likewise.
509 (lookup_name_fuzzy): Convert return type from tree to
511 * c-parser.c (c_parser_declaration_or_fndef): Update for
512 conversion of return type of lookup_name_fuzzy to const char *.
513 (c_parser_parameter_declaration): Likewise.
515 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
517 * c-parser.c (c_parser_oacc_declare): Don't scan for
519 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
520 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
521 zero-length subarrays.
523 2016-07-15 Jakub Jelinek <jakub@redhat.com>
526 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
527 instead of FUZZY_LOOKUP_NAME.
528 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
529 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
531 2016-07-14 Jakub Jelinek <jakub@redhat.com>
534 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
536 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
538 * c-parser.c (c_parser_generic_selection): Make type of variable
540 (c_parser_omp_declare_simd): Likewise.
542 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
544 * c-decl.c (struct c_struct_parse_info): Change member types
545 from vec to auto_vec.
546 (start_struct): Adjust.
547 (finish_struct): Likewise.
549 2016-07-02 Jakub Jelinek <jakub@redhat.com>
552 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
554 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
556 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
557 Move pragma context checking into...
558 (c_parser_omp_cancellation_point): ... here, and improve
560 * c-typeck.c (c_finish_omp_cancel)
561 (c_finish_omp_cancellation_point): Improve diagnostic messages.
563 2016-06-29 Jakub Jelinek <jakub@redhat.com>
566 * c-typeck.c (c_build_qualified_type): Don't clear
567 C_TYPE_INCOMPLETE_VARS for the main variant.
569 2016-06-28 Martin Sebor <msebor@redhat.com>
572 * c-typeck.c (output_init_element): Diagnose incompatible types
573 before non-constant initializers.
575 2016-06-28 Jakub Jelinek <jakub@redhat.com>
577 * Make-lang.in: Don't cat ../stage_current if it does not exist.
579 2016-06-23 Andi Kleen <ak@linux.intel.com>
581 * Make-lang.in: Add support for autofdo.
583 2016-06-22 David Malcolm <dmalcolm@redhat.com>
586 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
587 (implicit_decl_warning): When issuing warnings for implicit
588 declarations, attempt to provide a suggestion via
590 (undeclared_variable): Likewise when issuing errors.
591 (lookup_name_in_scope): Likewise.
592 (struct edit_distance_traits<cpp_hashnode *>): New struct.
593 (best_macro_match): New typedef.
594 (find_closest_macro_cpp_cb): New function.
595 (lookup_name_fuzzy): New function.
596 * c-parser.c: Include gcc-rich-location.h.
597 (c_token_starts_typename): Split out case CPP_KEYWORD into...
598 (c_keyword_starts_typename): ...this new function.
599 (c_parser_declaration_or_fndef): When issuing errors about
600 missing "struct" etc, add a fixit. For other kinds of errors,
601 attempt to provide a suggestion via lookup_name_fuzzy.
602 (c_parser_parms_declarator): When looking ahead to detect typos in
603 type names, also reject CPP_KEYWORD.
604 (c_parser_parameter_declaration): When issuing errors about
605 unknown type names, attempt to provide a suggestion via
607 * c-tree.h (c_keyword_starts_typename): New prototype.
609 2016-06-20 Joseph Myers <joseph@codesourcery.com>
612 * c-typeck.c (build_conditional_expr): Return error_mark_node if
613 c_common_type returns error_mark_node.
615 2016-06-19 Martin Sebor <msebor@redhat.com>
618 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
619 __alignof__ (expression).
621 2016-06-14 David Malcolm <dmalcolm@redhat.com>
623 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
625 2016-06-14 David Malcolm <dmalcolm@redhat.com>
627 * c-typeck.c (build_component_ref): Simplify fixit code by
628 using gcc_rich_location::add_fixit_misspelled_id.
629 (set_init_label): Likewise.
631 2016-06-13 David Malcolm <dmalcolm@redhat.com>
633 * c-parser.c (c_parser_initelt): Provide location of name for new
634 location_t param of set_init_label.
635 * c-tree.h (set_init_label): Add location_t param.
636 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
637 param and use it when issuing error messages about unrecognized
638 field names. Attempt to provide a fixit hint if appropriate,
639 otherwise update the error message to provide the type name.
641 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
644 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
647 2016-06-08 Martin Sebor <msebor@redhat.com>
648 Jakub Jelinek <jakub@redhat.com>
652 * c-typeck.c (convert_arguments): Don't promote last argument
653 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
655 2016-06-08 Marek Polacek <polacek@redhat.com>
658 * c-decl.c (grokdeclarator): Check TYPE_P.
661 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
664 2016-06-07 David Malcolm <dmalcolm@redhat.com>
666 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
667 and structure element reference, capture the location of the
668 element name token and pass it to build_component_ref.
669 (c_parser_postfix_expression_after_primary): Likewise for
670 structure element dereference.
671 (c_parser_omp_variable_list): Likewise for
672 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
673 * c-tree.h (build_component_ref): Add location_t param.
674 * c-typeck.c (build_component_ref): Add location_t param
675 COMPONENT_LOC. Use it, if available, when issuing hints about
676 mispelled member names to provide a fixit replacement hint.
678 2016-06-06 Marek Polacek <polacek@redhat.com>
681 * c-parser.c (c_parser_direct_declarator): Set location.
683 2016-06-06 Marek Polacek <polacek@redhat.com>
685 * c-typeck.c (comptypes_internal): Handle comparisons of
686 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
687 TYPE_REF_CAN_ALIAS_ALL.
689 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
691 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
692 arguments as addressable when async clause exists.
694 2016-05-30 Jakub Jelinek <jakub@redhat.com>
697 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
698 when combined with target construct.
700 2016-05-26 Jakub Jelinek <jakub@redhat.com>
702 * c-parser.c (c_parser_omp_clause_schedule): Warn if
703 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
705 2016-05-25 Marek Polacek <polacek@redhat.com>
708 * c-decl.c (c_make_fname_decl): Don't check seen_error.
711 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
713 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
715 * c-parser.c (c_parser_oacc_declare): Add support for
716 GOMP_MAP_FIRSTPRIVATE_POINTER.
717 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
718 argument with enum c_omp_region_type ort.
719 (handle_omp_array_sections): Likewise. Update call to
720 handle_omp_array_sections_1.
721 (c_finish_omp_clauses): Add specific errors and warning messages for
722 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
723 call to handle_omp_array_sections.
725 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
727 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
729 2016-05-24 Richard Biener <rguenther@suse.de>
733 * c-typeck.c (build_array_ref): Do not complain about indexing
734 non-lvalue vectors. Adjust for function name change.
736 2016-05-20 Martin Sebor <msebor@redhat.com>
739 * c-typeck.c (error_init): Use
740 expansion_point_location_if_in_system_header.
741 (warning_init): Same.
743 2016-05-19 David Malcolm <dmalcolm@redhat.com>
746 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
748 (c_parser_postfix_expression): Likewise.
749 * c-tree.h (c_expr::set_error): New method.
750 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
751 that result's range is initialized.
753 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
755 * c-typeck.c (parser_build_unary_op): Fix formatting.
757 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
759 * c-decl.c (grokdeclarator): Remove errmsg and use of
760 targetm.invalid_return_type.
761 (grokparms): Remove errmsg and use of
762 targetm.invalid_parameter_type.
764 2016-05-13 Joseph Myers <joseph@codesourcery.com>
766 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
767 function return type.
769 2016-05-12 Marek Polacek <polacek@redhat.com>
772 * c-decl.c (build_compound_literal): Pass LOC down to
773 c_incomplete_type_error.
774 * c-tree.h (require_complete_type): Adjust declaration.
775 (c_incomplete_type_error): Likewise.
776 * c-typeck.c (require_complete_type): Add location parameter, pass it
777 down to c_incomplete_type_error.
778 (c_incomplete_type_error): Add location parameter, pass it down to
780 (build_component_ref): Pass location down to c_incomplete_type_error.
781 (default_conversion): Pass location down to require_complete_type.
782 (build_array_ref): Likewise.
783 (build_function_call_vec): Likewise.
784 (convert_arguments): Likewise.
785 (build_unary_op): Likewise.
786 (build_c_cast): Likewise.
787 (build_modify_expr): Likewise.
788 (convert_for_assignment): Likewise.
789 (c_finish_omp_clauses): Likewise.
791 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
794 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
796 * c-errors.c (pedwarn_c90): Return true if warned.
797 * c-tree.h (pedwarn_c90): Change return type to bool.
798 (enum c_declspec_word): Add new enumerator cdw_atomic.
800 2016-05-11 Marek Polacek <polacek@redhat.com>
803 * c-decl.c (diagnose_mismatched_decls): Factor out code to
804 diagnose_mismatched_attributes and call it.
806 2016-05-10 Marek Polacek <polacek@redhat.com>
809 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
810 on a declaration following the definition.
812 2016-05-05 Jakub Jelinek <jakub@redhat.com>
814 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
815 parse it through to c_parser_c99_block_statement.
816 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
819 2016-05-04 Marek Polacek <polacek@redhat.com>
821 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
824 2016-05-04 Marek Polacek <polacek@redhat.com>
827 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
828 for macro expansions.
830 2016-05-03 Marek Polacek <polacek@redhat.com>
833 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
834 check_builtin_function_arguments.
836 2016-05-03 Richard Biener <rguenther@suse.de>
838 * Make-lang.in (cc1-checksum.c): For stage-final re-use
839 the checksum from the previous stage.
841 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
843 * c-parser.c (c_parser_oacc_all_clauses): Update call to
844 c_finish_omp_clauses.
845 (c_parser_omp_all_clauses): Likewise.
846 (c_parser_oacc_cache): Likewise.
847 (c_parser_oacc_loop): Likewise.
848 (omp_split_clauses): Likewise.
849 (c_parser_omp_declare_target): Likewise.
850 (c_parser_cilk_all_clauses): Likewise.
851 (c_parser_cilk_for): Likewise.
852 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
853 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
855 2016-05-02 Marek Polacek <polacek@redhat.com>
858 * c-decl.c (grokdeclarator): Diagnose when array's size has an
861 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
864 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
865 OACC_LOOP_CLAUSE_MASK.
866 (c_parser_oacc_kernels_parallel): Update call to
867 c_oacc_split_loop_clauses.
869 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
871 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
872 argument to build_modify_expr in two cases.
874 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
876 * c-parser.c (c_parser_postfix_expression_after_primary): Call
877 warn_for_memset instead of warning directly here.
879 2016-04-26 Marek Polacek <polacek@redhat.com>
882 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
884 (c_parser_for_statement): ... here.
885 (c_parser_if_statement): Use it.
886 (c_parser_switch_statement): Use it.
887 (c_parser_while_statement): Use it.
890 * c-decl.c (pushdecl): Pass LOCUS down to warning.
892 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
895 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
896 instead of c_finish_cilk_clauses.
897 * c-tree.h (c_finish_omp_clauses): Add new default argument.
898 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
899 floating-point variables in the linear clause for Cilk Plus.
901 2016-04-18 Michael Matz <matz@suse.de>
903 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
904 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
906 2016-04-15 Marek Polacek <polacek@redhat.com>
909 * c-typeck.c (build_unary_op): Pass location down to error and
912 2016-04-15 Jakub Jelinek <jakub@redhat.com>
915 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
917 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
918 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
919 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
920 Adjust c_parser_pragma callers.
921 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
923 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
925 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
926 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
927 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
928 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
929 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
930 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
931 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
932 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
934 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
935 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
938 2016-04-13 Marek Polacek <polacek@redhat.com>
941 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
943 (c_parser_statement): Likewise.
944 (c_parser_c99_block_statement): Likewise.
945 (c_parser_while_statement): Likewise.
946 (c_parser_for_statement): Likewise.
947 (c_parser_if_body): Don't set IF_P here.
948 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
949 about dangling else here.
950 * c-tree.h (c_finish_if_stmt): Adjust declaration.
951 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
952 warn about dangling else here.
954 2016-04-04 Marek Polacek <polacek@redhat.com>
957 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
959 2016-03-31 Marek Polacek <polacek@redhat.com>
962 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
964 2016-03-18 David Malcolm <dmalcolm@redhat.com>
967 * c-parser.c (c_parser_postfix_expression): Set the source range
968 for uses of "__builtin_types_compatible_p".
970 2016-03-17 Jakub Jelinek <jakub@redhat.com>
973 * c-typeck.c (composite_type): Don't count void_list_node
974 into len, if the list is terminated by void_list_node, start
975 with void_list_node instead of NULL for newargs. Stop
978 2016-03-16 Marek Polacek <polacek@redhat.com>
981 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
982 nested functions returning VM types.
984 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
986 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
987 when calling c_finish_omp_clauses.
989 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
992 * c-decl.c (get_parm_info): Don't queue implicit function declarations
995 2016-03-04 Marek Polacek <polacek@redhat.com>
998 * c-parser.c (c_parser_postfix_expression): Call
999 c_parser_cast_expression rather than c_parser_postfix_expression.
1001 2016-03-01 Jakub Jelinek <jakub@redhat.com>
1005 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1006 of incomplete decls to error_mark_node.
1008 2016-02-24 Marek Polacek <polacek@redhat.com>
1011 * c-decl.c (finish_decl): Don't update the copy of the type of a
1012 different decl type.
1014 2016-02-23 Jakub Jelinek <jakub@redhat.com>
1017 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1018 in id_kind reclassification.
1020 2016-02-16 Jakub Jelinek <jakub@redhat.com>
1023 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1025 2016-02-16 James Norris <jnorris@codesourcery.com>
1028 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1030 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1032 * c-decl.c (build_null_declspecs): Zero the entire struct.
1035 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1036 callers changed. If nested_p is true, use it to call
1037 finish_implicit_inits.
1038 * c-tree.h (finish_implicit_inits): Declare.
1039 * c-typeck.c (finish_implicit_inits): New function. Move code
1041 (push_init_level): ... here.
1042 (set_designator, process_init_element): Call finish_implicit_inits.
1044 2016-02-11 Jakub Jelinek <jakub@redhat.com>
1047 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1048 arguments for -Waddress warning.
1050 2016-02-04 Jakub Jelinek <jakub@redhat.com>
1053 * c-decl.c (finish_enum): When honoring mode attribute,
1054 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1056 2016-01-29 Jakub Jelinek <jakub@redhat.com>
1059 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1060 all type variants, not just TYPE_MAIN_VARIANT.
1062 2016-01-27 Jakub Jelinek <jakub@redhat.com>
1065 * c-decl.c (c_write_global_declarations_1): Warn with
1066 warn_unused_function if static prototype without definition
1069 2016-01-27 Marek Polacek <polacek@redhat.com>
1072 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1073 to unsigned, if needed. Add -Wsign-compare warning.
1075 2016-01-26 Jakub Jelinek <jakub@redhat.com>
1077 PR tree-optimization/69483
1078 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1080 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1083 * c-tree.h (incomplete_record_decls): Declare.
1084 * c-parser.c (incomplete_record_decls): Define.
1085 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1086 report error if any decl has zero size.
1087 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1088 or enum type to incomplete_record_decls.
1090 2016-01-14 Tom de Vries <tom@codesourcery.com>
1092 PR tree-optimization/68773
1093 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1096 2016-01-14 Marek Polacek <polacek@redhat.com>
1099 * c-decl.c (grokdeclarator): Provide more information for invalid
1102 2016-01-06 David Malcolm <dmalcolm@redhat.com>
1104 * c-parser.c (c_parser_unary_expression): For dereferences, build
1105 a combined location before calling build_indirect_ref, so that
1106 error reports cover the full range, manually updating the c_expr
1109 2016-01-06 Marek Polacek <polacek@redhat.com>
1112 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1113 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1116 2016-01-04 Jakub Jelinek <jakub@redhat.com>
1118 Update copyright years.
1120 2016-01-04 Marek Polacek <polacek@redhat.com>
1123 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1124 optimization to use __atomic_fetch_* built-in if possible.
1126 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1128 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1130 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1133 2015-12-22 Marek Polacek <polacek@redhat.com>
1136 * c-typeck.c (build_component_ref): Warn when acessing elements of
1137 atomic structures or unions.
1139 2015-12-21 David Malcolm <dmalcolm@redhat.com>
1141 * c-typeck.c: Include "gcc-rich-location.h".
1142 (build_binary_op): In the two places that call binary_op_error,
1143 create a gcc_rich_location and populate it with the location of
1144 the binary op and its two operands.
1146 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1148 * c-parser.c (c_parser_statement_after_labels): When calling
1149 c_finish_return, Use the return expression's location if it has
1150 one, falling back to the location of the first token within it.
1151 * c-typeck.c (c_finish_return): When issuing warnings about
1152 the incorrect presence/absence of a return value, issue a note
1153 showing the declaration of the function.
1155 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1157 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1159 (c_parser_peek_nth_token): New function.
1160 (c_parser_peek_conflict_marker): New function.
1161 (c_parser_error): Detect conflict markers and report them as such.
1163 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1165 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1166 to preserve range information for the primary expression
1167 in the call to c_parser_postfix_expression_after_primary.
1169 2015-12-16 David Malcolm <dmalcolm@redhat.com>
1171 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1172 expression location, falling back on the first token location,
1173 rather than always using the latter.
1175 2015-12-16 Marek Polacek <polacek@redhat.com>
1178 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1181 2015-12-15 Marek Polacek <polacek@redhat.com>
1184 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1187 2015-12-08 David Malcolm <dmalcolm@redhat.com>
1189 * c-parser.c (c_parser_alignof_expression): Capture location of
1190 closing parenthesis (if any), or of end of unary expression, and
1191 use it to build a src_range for the expression.
1193 2015-12-08 David Malcolm <dmalcolm@redhat.com>
1196 * c-parser.c (c_parser_get_builtin_args): Add
1197 "out_close_paren_loc" param, and write back to it.
1198 (c_parser_postfix_expression): Capture the closing
1199 parenthesis location for RID_CHOOSE_EXPR,
1200 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1201 RID_BUILTIN_SHUFFLE and use it to set the source range
1202 for such expressions; within RID_BUILTIN_COMPLEX set
1203 the underlying location.
1205 2015-12-07 Marek Polacek <polacek@redhat.com>
1208 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1209 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1211 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1213 * c-tree.h (c_build_va_arg): Adjust prototype.
1214 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1215 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1216 parameter, adjust throughout and issue an error if EXPR is a component
1217 with reverse storage order.
1219 2015-12-02 Jason Merrill <jason@redhat.com>
1221 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1222 (c_fully_fold_internal, decl_constant_value_for_optimization):
1223 Move from c-common.c.
1224 * c-tree.h: Declare decl_constant_value_for_optimization.
1225 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1227 2015-12-02 Joseph Myers <joseph@codesourcery.com>
1230 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1231 following link from declarator to next declarator. Track original
1232 qualified type and pass it to c_build_qualified_type.
1233 * c-typeck.c (c_build_qualified_type): Add arguments
1234 orig_qual_type and orig_qual_indirect.
1236 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1238 * c-parser.c (c_parser_omp_clause_name)
1239 (c_parser_oacc_all_clauses): Alphabetical sorting.
1241 2015-12-02 Jakub Jelinek <jakub@redhat.com>
1244 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1247 2015-12-01 Julian Brown <julian@codesourcery.com>
1248 Cesar Philippidis <cesar@codesourcery.com>
1249 James Norris <James_Norris@mentor.com>
1251 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1252 (c_parser_oacc_clause_use_device): New function.
1253 (c_parser_oacc_all_clauses): Add use_device support.
1254 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1255 (c_parser_oacc_host_data): New function.
1256 (c_parser_omp_construct): Add host_data support.
1257 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1258 * c-typeck.c (c_finish_oacc_host_data): New function.
1259 (c_finish_omp_clauses): Add use_device support.
1261 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
1264 * c-decl.c: Set TYPE_PACKED in variants.
1266 2015-11-27 Martin Liska <mliska@suse.cz>
1269 * c-array-notation.c (fix_builtin_array_notation_fn):
1270 Use release_vec_vec instead of vec::release.
1271 (build_array_notation_expr): Likewise.
1272 (fix_conditional_array_notations_1): Likewise.
1273 (fix_array_notation_expr): Likewise.
1274 (fix_array_notation_call_expr): Likewise.
1276 2015-11-27 Jakub Jelinek <jakub@redhat.com>
1279 * c-parser.c (c_parser_compound_statement_nostart): If
1280 last_label is true, use pragma_stmt instead of pragma_compound
1281 as second c_parser_pragma argument.
1282 (c_parser_omp_ordered, c_parser_omp_target_update,
1283 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1284 false as second argument to c_parser_skip_to_pragma_eol after
1285 diagnosing standalone directives used in pragma_stmt context.
1287 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1289 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1290 with "if (ENABLE_OFFLOADING)".
1292 2015-11-23 David Malcolm <dmalcolm@redhat.com>
1295 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1296 for various Objective-C constructs: Class.name syntax,
1297 @selector(), @protocol(), @encode(), and [] message syntax.
1299 2015-11-20 David Malcolm <dmalcolm@redhat.com>
1302 * c-typeck.c (should_suggest_deref_p): New function.
1303 (build_component_ref): Special-case POINTER_TYPE when
1304 generating a "not a structure of union" error message, and
1305 suggest a "->" rather than a ".", providing a fix-it hint.
1307 2015-11-19 David Malcolm <dmalcolm@redhat.com>
1309 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1310 candidate into a new function, find_closest_identifier.
1312 2015-11-19 Marek Polacek <polacek@redhat.com>
1315 * c-typeck.c (parser_build_binary_op): Properly handle
1316 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1318 2015-11-17 David Malcolm <dmalcolm@redhat.com>
1320 * c-parser.c (set_c_expr_source_range): Bulletproof both
1321 overloaded implementations against NULL expr->value.
1322 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1324 (c_parser_unary_expression): Likewise when handling addresses of
1326 (c_parser_postfix_expression): Likewise for statement expressions,
1327 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1328 __builtin_va_arg, and for __builtin_offset_of.
1329 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1330 src_range using the range of the braced initializer.
1331 (c_parser_transaction_expression): Set src_range for "ret" to a
1332 sane pair of values.
1334 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1336 * c-parser.c (c_finish_omp_declare_simd): Look for
1337 "simd" attribute as well. Update error message.
1339 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1341 * c-parser.c (c_parser_omp_declare_target): Adjust.
1343 2015-11-14 Jakub Jelinek <jakub@redhat.com>
1345 * c-typeck.c (c_finish_omp_clauses): Don't mark
1346 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1348 2015-11-14 Marek Polacek <polacek@redhat.com>
1350 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1351 * c-typeck.c: Likewise.
1353 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1355 * c-decl.c (warn_defaults_to): Pass line_table to
1357 * c-errors.c (pedwarn_c99): Likewise.
1358 (pedwarn_c90): Likewise.
1359 * c-parser.c (set_c_expr_source_range): New functions.
1360 (c_token::get_range): New method.
1361 (c_token::get_finish): New method.
1362 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1363 based on the range from the start of the LHS to the end of the
1365 (c_parser_conditional_expression): Likewise, based on the range
1366 from the start of the cond.value to the end of exp2.value.
1367 (c_parser_binary_expression): Call set_c_expr_source_range on
1368 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1369 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1370 based on the cast_loc through to the end of the expr.
1371 (c_parser_unary_expression): Likewise, based on the
1372 op_loc through to the end of op.
1373 (c_parser_sizeof_expression) Likewise, based on the start of the
1374 sizeof token through to either the closing paren or the end of
1376 (c_parser_postfix_expression): Likewise, using the token range,
1377 or from the open paren through to the close paren for
1378 parenthesized expressions.
1379 (c_parser_postfix_expression_after_primary): Likewise, for
1380 various kinds of expression.
1381 * c-tree.h (struct c_expr): Add field "src_range".
1382 (c_expr::get_start): New method.
1383 (c_expr::get_finish): New method.
1384 (set_c_expr_source_range): New decls.
1385 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1386 on ret for prefix unary ops.
1387 (parser_build_binary_op): Likewise, running from the start of
1388 arg1.value through to the end of arg2.value.
1390 2015-11-13 Marek Polacek <polacek@redhat.com>
1393 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1395 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1397 * c-typeck.c: Include spellcheck.h.
1398 (lookup_field_fuzzy_find_candidates): New function.
1399 (lookup_field_fuzzy): New function.
1400 (build_component_ref): If the field was not found, try using
1401 lookup_field_fuzzy and potentially offer a suggestion.
1403 2015-11-12 James Norris <jnorris@codesourcery.com>
1404 Joseph Myers <joseph@codesourcery.com>
1406 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1407 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1408 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1409 and PRAGMA_OMP_CLAUSE_LINK.
1410 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1411 and PRAGMA_OACC_CLAUSE_LINK.
1412 (OACC_DECLARE_CLAUSE_MASK): New definition.
1413 (c_parser_oacc_declare): New function.
1415 2015-11-12 Marek Polacek <polacek@redhat.com>
1418 * c-parser.c (c_parser_for_statement): Reclassify the token in
1421 2015-11-11 Marek Polacek <polacek@redhat.com>
1425 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1426 checking the size of an array.
1428 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
1430 * c-array-notation.c: Remove unused header files.
1431 * c-aux-info.c: Likewise.
1432 * c-convert.c: Likewise.
1433 * c-decl.c: Likewise.
1434 * c-errors.c: Likewise.
1435 * c-lang.c: Likewise.
1436 * c-objc-common.c: Likewise.
1437 * c-parser.c: Likewise.
1438 * c-typeck.c: Likewise.
1439 * gccspec.c: Likewise.
1441 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1442 Cesar Philippidis <cesar@codesourcery.com>
1443 James Norris <jnorris@codesourcery.com>
1444 Julian Brown <julian@codesourcery.com>
1445 Nathan Sidwell <nathan@codesourcery.com>
1448 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1450 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1451 (c_parser_pragma): Parse 'acc routine'.
1452 (OACC_ROUTINE_CLAUSE_MARK): Define.
1453 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1455 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1458 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1459 location of the backward-goto to the start of the loop body.
1461 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1464 * c-parser.c (c_parser_while_statement): Finish the loop before
1465 parsing ahead for misleading indentation.
1466 (c_parser_for_statement): Likewise.
1468 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1470 * c-decl.c (finish_struct): If the structure has reverse storage
1471 order, rewrite the type of array fields with scalar component. Call
1472 maybe_apply_pragma_scalar_storage_order on entry.
1473 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1474 errors on bit-fields and reverse SSO here and not...
1475 (c_mark_addressable): ...here.
1476 (output_init_element): Adjust call to initializer_constant_valid_p.
1477 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1479 2015-11-06 David Malcolm <dmalcolm@redhat.com>
1481 * c-decl.c (warn_defaults_to): Update for change in signature
1482 of diagnostic_set_info.
1483 * c-errors.c (pedwarn_c99): Likewise.
1484 (pedwarn_c90): Likewise.
1485 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1486 for textinfo::set_location.
1488 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1489 Thomas Schwinge <thomas@codesourcery.com>
1490 James Norris <jnorris@codesourcery.com>
1492 * c-parser.c (c_parser_omp_clause_name): Add support for
1493 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1494 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1495 default(none) in OpenACC.
1496 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1498 (c_parser_oacc_clause_tile): New function.
1499 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1500 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1501 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1503 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1504 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1506 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1507 (c_parser_oacc_update): Update the error message for missing clauses.
1508 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1509 and OMP_CLAUSE_INDEPENDENT.
1511 2015-11-05 Marek Polacek <polacek@redhat.com>
1514 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1515 deal with pre-evaluation on invalid types.
1517 2015-11-05 Jakub Jelinek <jakub@redhat.com>
1518 Ilya Verbin <ilya.verbin@intel.com>
1520 * c-parser.c: Include context.h and gimple-expr.h.
1521 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1522 monotonic together with nonmonotonic.
1523 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1524 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1525 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1526 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1527 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1528 expressions on combined target teams before the target.
1529 (c_parser_omp_declare_target): If decl has "omp declare target" or
1530 "omp declare target link" attribute, and cgraph or varpool node already
1531 exists, then set corresponding flags. Call c_finish_omp_clauses
1532 in the parenthesized extended-list syntax case.
1533 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1535 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1536 on OMP_CLAUSE_REDUCTION array sections.
1537 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1538 into the constant offset, or for variable low-bound using
1539 POINTER_PLUS_EXPR. For structure element based array sections use
1540 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1541 (c_finish_omp_clauses): Drop generic_field_head, structure
1542 elements are now always mapped even as array section bases,
1543 diagnose same var in data sharing and mapping clauses. Diagnose if
1544 linear step on declare simd is neither a constant nor a uniform
1545 parameter. Look through POINTER_PLUS_EXPR for array section
1546 reductions. Diagnose the same var or function appearing multiple
1547 times on the same directive. Fix up wording for the to clause if t
1548 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1549 modifier on kinds other than dynamic or guided or nonmonotonic
1550 modifier together with ordered clause.
1552 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1553 Chung-Lin Tang <cltang@codesourcery.com>
1555 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1557 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
1559 * c-array-notation.c: Reorder #include's and remove duplicates.
1560 * c-aux-info.c: Likewise.
1561 * c-convert.c: Likewise.
1562 * c-decl.c: Likewise.
1563 * c-errors.c: Likewise.
1564 * c-lang.c: Likewise.
1565 * c-objc-common.c: Likewise.
1566 * c-parser.c: Likewise.
1567 * c-typeck.c: Likewise.
1569 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
1572 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1573 after calling build_qualified_type.
1575 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1576 Thomas Schwinge <thomas@codesourcery.com>
1577 James Norris <jnorris@codesourcery.com>
1578 Joseph Myers <joseph@codesourcery.com>
1579 Julian Brown <julian@codesourcery.com>
1580 Bernd Schmidt <bschmidt@redhat.com>
1582 * c-parser.c (c_parser_oacc_shape_clause): New.
1583 (c_parser_oacc_simple_clause): New.
1584 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1585 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1587 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1588 James Norris <jnorris@codesourcery.com>
1589 Cesar Philippidis <cesar@codesourcery.com>
1593 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1594 parameters, and handle these. Adjust all users.
1595 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1597 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1599 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1601 (c_finish_omp_construct): Declare function.
1602 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1603 Merge functions into...
1604 (c_finish_omp_construct): ... this new function.
1606 2015-10-22 Richard Biener <rguenther@suse.de>
1608 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1609 before folding a MINUS_EXPR.
1611 2015-10-21 Marek Polacek <polacek@redhat.com>
1614 * c-decl.c (start_function): Warn about vararg functions without
1617 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1619 * c-typeck.c (build_conditional_expr): Use boolean vector
1620 type for vector comparison.
1621 (build_vec_cmp): New.
1622 (build_binary_op): Use build_vec_cmp for comparison.
1624 2015-10-20 Marek Polacek <polacek@redhat.com>
1626 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1628 2015-10-20 Marek Polacek <polacek@redhat.com>
1631 * c-parser.c (c_parser_attributes): Break out of the loop if the
1632 token after an attribute isn't a comma.
1634 2015-10-13 Jakub Jelinek <jakub@redhat.com>
1635 Aldy Hernandez <aldyh@redhat.com>
1637 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1638 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1639 (c_parser_omp_variable_list): Handle structure elements for
1640 map, to and from clauses. Handle array sections in reduction
1641 clause. Formatting fixes.
1642 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1643 if clause modifiers.
1644 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1645 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1646 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1647 c_parser_omp_clause_is_device_ptr): New functions.
1648 (c_parser_omp_clause_ordered): Parse optional parameter.
1649 (c_parser_omp_clause_reduction): Handle array reductions.
1650 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1651 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1653 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1654 (c_parser_omp_clause_depend_sink): New function.
1655 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1656 (c_parser_omp_clause_map): Parse release/delete map kinds and
1657 optional always modifier.
1658 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1659 and c_finish_omp_clauses callers.
1660 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1661 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1662 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1663 (OMP_CRITICAL_CLAUSE_MASK): Define.
1664 (c_parser_omp_critical): Parse critical clauses.
1665 (c_parser_omp_for_loop): Handle doacross loops, adjust
1666 c_finish_omp_for and c_finish_omp_clauses callers.
1667 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1668 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1669 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1670 (c_parser_omp_for): Disallow ordered clause when combined with
1671 distribute. Disallow linear clause when combined with distribute
1672 and not combined with simd.
1673 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1674 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1675 parse clauses and if depend clause is found, don't parse a body.
1676 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1677 Allow target parallel without for after it.
1678 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1679 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1680 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1682 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1683 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1684 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1685 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1687 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1688 defaultmap and is_device_ptr clauses.
1689 (c_parser_omp_target): Parse target parallel and target simd. Set
1690 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1691 and target exit data. Diagnose invalid map kinds.
1692 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1693 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1695 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1697 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1698 (c_parser_omp_taskloop): New function.
1699 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1700 handle PRAGMA_OMP_TASKLOOP.
1701 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1702 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1703 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1704 Add IS_OMP argument, handle structure element bases, diagnose
1705 bitfields, pass IS_OMP recursively, diagnose known zero length
1706 array sections in depend clauses, handle array sections in reduction
1707 clause, diagnose negative length even for pointers.
1708 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1709 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1710 array sections in reduction clause, set
1711 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1712 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1713 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1714 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1716 2015-10-06 Marek Polacek <polacek@redhat.com>
1718 * c-parser.c (c_parser_statement_after_labels): Use
1719 protected_set_expr_location.
1720 (c_parser_omp_clause_num_gangs): Likewise.
1721 (c_parser_omp_clause_num_threads): Likewise.
1722 (c_parser_omp_clause_num_workers): Likewise.
1723 (c_parser_omp_clause_vector_length): Likewise.
1724 (c_parser_omp_clause_num_teams): Likewise.
1725 (c_parser_omp_clause_thread_limit): Likewise.
1726 * c-typeck.c (build_c_cast): Likewise.
1727 (c_cast_expr): Likewise.
1729 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1731 * c-typeck.c (c_tree_equal): Use real_equal instead of
1734 2015-10-04 Jason Merrill <jason@redhat.com>
1736 * c-parser.c (c_lex_one_token): Handle @synchronized.
1737 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1738 can change whether the function is transaction_safe.
1740 2015-10-02 Marek Polacek <polacek@redhat.com>
1743 * c-typeck.c (convert_for_assignment): Use the expansion point
1744 location throughout.
1746 2015-10-02 Marek Polacek <polacek@redhat.com>
1749 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1750 and pass it down to c_parser_if_statement.
1751 (c_parser_else_body): Add CHAIN parameter and pass it down to
1752 c_parser_statement_after_labels.
1753 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1754 duplicated if-else-if conditions.
1756 2015-10-01 Marek Polacek <polacek@redhat.com>
1758 * c-typeck.c (convert_for_assignment): Improve commentary.
1760 2015-09-30 Marek Polacek <polacek@redhat.com>
1763 * c-typeck.c (c_finish_return): Use the expansion point location for
1764 certain "return with value" warnings.
1766 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1768 * c-parser.c (pragma_lex): Add loc argument.
1770 2015-09-15 Marek Polacek <polacek@redhat.com>
1773 * c-decl.c (tag_exists_p): New function.
1774 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1775 struct/union/enum keywords are missing.
1776 * c-tree.h (tag_exists_p): Declare.
1778 2015-09-15 Marek Polacek <polacek@redhat.com>
1780 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1781 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1782 Return NULL_TREE instead of 0.
1783 (lookup_name): Return NULL_TREE instead of 0.
1784 (lookup_name_in_scope): Likewise.
1785 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1786 (parser_xref_tag): Use false instead of 0.
1787 (start_struct): Use true instead of 1.
1788 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1790 2015-09-14 Marek Polacek <polacek@redhat.com>
1792 * c-typeck.c (set_nonincremental_init_from_string): Use
1793 HOST_WIDE_INT_M1U when shifting a negative value.
1795 2015-09-09 Mark Wielaard <mjw@redhat.com>
1797 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1800 2015-09-10 Jakub Jelinek <jakub@redhat.com>
1803 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1804 into OMP_FOR_PRE_BODY rather than before the loop.
1806 2015-09-09 Jakub Jelinek <jakub@redhat.com>
1809 * c-parser.c (c_parser_oacc_all_clauses,
1810 c_parser_omp_all_clauses): Remove invalid clause from
1811 list of clauses even if parser->error is set.
1814 * c-parser.c (c_parser_omp_clause_aligned,
1815 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1817 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1821 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1822 instead of c_parser_unary_expression. If the result is !lvalue_p,
1823 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1825 2015-09-04 Marek Polacek <polacek@redhat.com>
1828 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1830 2015-09-03 Martin Sebor <msebor@redhat.com>
1833 * c-typeck.c (convert_arguments, parser_build_unary_op,
1834 build_conditional_expr, c_cast_expr, convert_for_assignment,
1835 build_binary_op, _objc_common_truthvalue_conversion): Call
1837 (c_decl_implicit): Define.
1839 2015-09-02 Marek Polacek <polacek@redhat.com>
1842 * c-parser.c (c_parser_enum_specifier): Give a better error for
1845 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1847 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1849 2015-08-12 Marek Polacek <polacek@redhat.com>
1851 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1854 2015-08-03 Marek Polacek <polacek@redhat.com>
1857 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1859 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1861 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1863 * c-parser.c (c_parser_if_body): Take token_indent_info
1864 argument. Call warn_for_misleading_indentation even when the
1865 body is a semicolon. Extract token_indent_infos corresponding
1866 to the guard, body and next tokens. Adjust call to
1867 warn_for_misleading_indentation accordingly.
1868 (c_parser_else_body): Likewise.
1869 (c_parser_if_statement): Likewise.
1870 (c_parser_while_statement): Likewise.
1871 (c_parser_for_statement): Likewise.
1873 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1874 Manuel López-Ibáñez <manu@gcc.gnu.org>
1876 * c-decl.c (get_parm_info): Remove static var. Update warning
1879 2015-07-27 Marek Polacek <polacek@redhat.com>
1883 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1885 2015-07-20 Marek Polacek <polacek@redhat.com>
1888 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1889 (build_binary_op): Warn about left shift overflows.
1891 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1893 * c-array-notation.c: Adjust includes for flags.h changes.
1894 * c-objc-common.c: Likewise.
1896 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1898 * c-array-notation.c: Adjust includes.
1899 * c-aux-info.c: Likewise.
1900 * c-convert.c: Likewise.
1901 * c-decl.c: Likewise.
1902 * c-errors.c: Likewise.
1903 * c-lang.c: Likewise.
1904 * c-objc-common.c: Likewise.
1905 * c-parser.c: Likewise.
1906 * c-typeck.c: Likewise.
1908 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1911 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1913 2015-06-29 Marek Polacek <polacek@redhat.com>
1916 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1917 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1918 about -Wswitch-bool here.
1919 (do_case): Update c_add_case_label call.
1920 (c_finish_case): Update c_do_switch_warnings call.
1922 2015-06-27 Marek Polacek <polacek@redhat.com>
1924 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1926 2015-06-26 Marek Polacek <polacek@redhat.com>
1928 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1930 * c-typeck.c (array_to_pointer_conversion): Likewise.
1931 (build_unary_op): Likewise.
1932 (c_finish_return): Likewise.
1934 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1936 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1937 * c-parser.c: Likewise.
1939 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1941 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1942 instead of pointer_hash.
1943 (detect_field_duplicates): Likewise.
1945 2015-06-25 Marek Polacek <polacek@redhat.com>
1947 * c-array-notation.c: Use VAR_P throughout.
1948 * c-decl.c: Likewise.
1949 * c-objc-common.c: Likewise.
1950 * c-parser.c: Likewise.
1951 * c-typeck.c: Likewise.
1953 2015-06-25 Marek Polacek <polacek@redhat.com>
1955 * c-decl.c: Use is_global_var throughout.
1956 * c-parser.c: Likewise.
1957 * c-typeck.c: Likewise.
1959 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1961 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1962 * c-aux-info.c: Likewise.
1963 * c-convert.c: Likewise.
1964 * c-decl.c: Likewise.
1965 * c-errors.c: Likewise.
1966 * c-lang.c: Likewise.
1967 * c-objc-common.c: Likewise.
1968 * c-parser.c: Likewise.
1969 * c-typeck.c: Likewise.
1971 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
1974 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1977 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1979 * c-decl.c (pop_scope): Register the main translation unit
1980 through the new debug hook.
1982 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1984 * c-array-notation.c : Adjust include files.
1985 * c-aux-info.c : Likewise.
1986 * c-convert.c : Likewise.
1987 * c-decl.c : Likewise.
1988 * c-errors.c : Likewise.
1989 * c-lang.c : Likewise.
1990 * c-lang.h : Likewise.
1991 * c-objc-common.c : Likewise.
1992 * c-parser.c : Likewise.
1993 * c-typeck.c : Likewise.
1995 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1997 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1998 immediately clobber it.
1999 (c_write_global_declarations_1): Remove call to
2000 check_global_declaration_1.
2001 (c_write_global_declarations_2): Remove.
2002 (c_write_final_cleanups): Rename from c_write_global_declarations.
2003 Remove call to finalize_compilation_unit.
2004 Remove calls to debugging hooks.
2005 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2006 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2007 * c-tree.h: Remove c_write_global_declarations.
2009 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
2011 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2012 * c-aux-info.c: Likewise.
2013 * c-convert.c: Likewise.
2014 * c-decl.c: Likewise.
2015 * c-errors.c: Likewise.
2016 * c-lang.c: Likewise.
2017 * c-objc-common.c: Likewise.
2018 * c-parser.c: Likewise.
2019 * c-typeck.c: Likewise.
2021 2015-06-04 Marek Polacek <polacek@redhat.com>
2024 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2027 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2029 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2030 Warn for empty struct.
2031 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2033 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2035 * c-decl.c (start_function): Call plugin before parsing.
2036 (finish_function): Call plugin after parsing.
2038 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2041 * c-decl.c (merge_decls): Merge DECL_COMMON.
2043 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
2045 * Make-lang.in (check_gcc_pallelize): Define.
2047 2015-05-22 Marek Polacek <polacek@redhat.com>
2050 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2053 2015-05-21 Marek Polacek <polacek@redhat.com>
2055 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2058 2015-05-20 Marek Polacek <polacek@redhat.com>
2060 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2061 * c-typeck.c: Likewise.
2063 2015-05-19 Marek Polacek <polacek@redhat.com>
2065 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2067 2015-05-19 Jakub Jelinek <jakub@redhat.com>
2070 * c-parser.c (c_parser_omp_for_loop): Don't add
2071 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2072 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2073 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2076 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2078 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
2081 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2084 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2087 2015-05-14 Marek Polacek <polacek@redhat.com>
2091 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2094 2015-05-12 David Malcolm <dmalcolm@redhat.com>
2096 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2097 to add a call to warn_for_misleading_indentation.
2098 (c_parser_else_body): Likewise, adding param "else_loc".
2099 (c_parser_if_statement): Check for misleading indentation.
2100 (c_parser_while_statement): Likewise.
2101 (c_parser_for_statement): Likewise.
2103 2015-05-08 Marek Polacek <polacek@redhat.com>
2106 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2107 (output_init_element): Likewise.
2109 2015-05-07 Marek Polacek <polacek@redhat.com>
2112 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2115 2015-04-30 Marek Polacek <polacek@redhat.com>
2117 * c-typeck.c (set_init_label): Call error_at instead of error and
2120 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2123 * c-typeck.c (c_build_va_arg): Clarify the error message.
2125 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2127 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2128 OMP_STANDALONE_CLAUSES.
2130 2015-04-28 Marek Polacek <polacek@redhat.com>
2132 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2134 2015-04-28 Marek Polacek <polacek@redhat.com>
2137 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2139 2015-04-25 Marek Polacek <polacek@redhat.com>
2142 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2145 2015-04-23 Marek Polacek <polacek@redhat.com>
2148 * c-decl.c (set_labels_context_r): New function.
2149 (store_parm_decls): Call it via walk_tree_without_duplicates.
2150 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2151 instead of create_tmp_var. Build TARGET_EXPR instead of
2153 (build_atomic_assign): Use create_tmp_var_raw instead of
2154 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2156 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2158 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2159 (c_parser_omp_target_update): Add missed %> to error_at ().
2161 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2164 * c-decl.c (c_default_pointer_mode): Remove definition.
2165 * c-tree.h (c_default_pointer_mode): Remove declaration.
2167 2015-03-27 Tobias Burnus <burnus@net-b.de>
2170 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2172 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2173 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2174 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2176 2015-03-19 Jakub Jelinek <jakub@redhat.com>
2178 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2179 attribute for DECL_EXTERNAL VAR_DECLs.
2181 2015-03-11 Jakub Jelinek <jakub@redhat.com>
2183 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2186 2015-03-10 Jakub Jelinek <jakub@redhat.com>
2189 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2190 before preparing arguments to warn_logical_not_parentheses.
2192 2015-03-09 Jakub Jelinek <jakub@redhat.com>
2195 * c-typeck.c (parser_build_binary_op): Don't warn for
2196 !!x == y or !b == y where b is _Bool.
2198 2015-03-09 Marek Polacek <polacek@redhat.com>
2200 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2201 * c-decl.c (grokdeclarator): Likewise.
2202 * c-typeck.c (build_binary_op): Likewise.
2204 2015-02-27 Marek Polacek <polacek@redhat.com>
2207 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2209 2015-02-14 Marek Polacek <polacek@redhat.com>
2212 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2213 declared through a typedef name.
2215 2015-02-13 Marek Polacek <polacek@redhat.com>
2218 * c-decl.c (grokdeclarator): Print also the type when giving
2219 the error message about array's incomplete element type.
2221 2015-02-11 Jakub Jelinek <jakub@redhat.com>
2224 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2225 check in the POP macro.
2227 2015-02-09 Marek Polacek <polacek@redhat.com>
2230 * c-typeck.c (process_init_element): Don't always wrap
2231 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2232 initializing a range of elements.
2234 2015-02-04 Jakub Jelinek <jakub@redhat.com>
2238 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2240 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
2242 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2243 processing enum declaration.
2245 2015-01-29 Marek Polacek <polacek@redhat.com>
2248 * c-typeck.c (pop_init_level): If constructor_elements has
2249 exactly one element with integer_zerop value, set constructor_zeroinit
2250 to 1. Remove braces around warning_init call.
2252 2015-01-27 Jakub Jelinek <jakub@redhat.com>
2255 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2256 of FUNCTION_DECLs with error_mark_node.
2258 2015-01-26 Jakub Jelinek <jakub@redhat.com>
2261 * c-typeck.c (convert_arguments): Return -1 if there are
2262 error_args, even if we've diagnosed too many arguments.
2264 2015-01-21 Richard Biener <rguenther@suse.de>
2267 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2268 for builtins the user declared correctly.
2270 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2271 Bernd Schmidt <bernds@codesourcery.com>
2272 Cesar Philippidis <cesar@codesourcery.com>
2273 James Norris <jnorris@codesourcery.com>
2274 Jakub Jelinek <jakub@redhat.com>
2275 Ilmir Usmanov <i.usmanov@samsung.com>
2277 * c-parser.c: Include "gomp-constants.h".
2278 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2279 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2280 Use OMP_CLAUSE_SET_MAP_KIND.
2281 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2282 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2283 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2284 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2285 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2286 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2287 "copyout", "create", "delete", "deviceptr", "gang", "host",
2288 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2289 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2290 "present_or_create", "pcreate", "seq", "self", "vector",
2291 "vector_length", "wait", "worker".
2292 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2293 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2294 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2295 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2296 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2297 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2298 (c_parser_oacc_data_clause_deviceptr)
2299 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2300 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2301 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2302 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2303 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2304 (c_parser_oacc_parallel, c_parser_oacc_update)
2305 (c_parser_oacc_wait): New functions.
2306 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2307 (c_finish_oacc_data): New prototypes.
2308 * c-typeck.c: Include "gomp-constants.h".
2309 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2310 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2311 OMP_CLAUSE_SET_MAP_KIND.
2312 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2313 (c_finish_oacc_data): New functions.
2314 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2315 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2316 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2317 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2318 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2319 GOMP_MAP_FORCE_DEVICEPTR.
2321 2015-01-09 Michael Collison <michael.collison@linaro.org>
2323 * c-array-notation.c: Include hash-set.h, machmode.h,
2324 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2325 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2326 * c-aux-info.c: Ditto.
2327 * c-convert.c: Ditto.
2329 * c-errors.c: Ditto.
2330 * c-lang.c: Dittoxs.
2331 * c-objc-common.c: Ditto.
2332 * c-parser.c: Ditto.
2333 * c-typeck.c: Include hash-set.h, machmode.h,
2334 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2335 fold-const.h, wide-int.h, inchash.h, real.h and
2336 fixed-value.h due to flattening of tree.h.
2338 2015-01-07 Marek Polacek <polacek@redhat.com>
2341 * c-typeck.c (process_init_element): Disallow initialization of
2342 a flexible array member with a string constant if the structure
2345 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2348 * c-typeck.c (convert_for_assignment, c_finish_return): For
2349 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2350 types also set in_late_binary_op around convert call.
2351 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2352 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2353 result on expr as last argument to ubsan_instrument_float_cast,
2354 if in_late_binary_op, don't use c_save_expr but save_expr.
2356 Update copyright years.
2358 2015-01-05 Marek Polacek <polacek@redhat.com>
2361 * c-typeck.c (build_array_ref): Pass loc down to
2362 warn_array_subscript_with_type_char.
2364 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
2366 * c-typeck.c: New behavious for pointers to arrays with qualifiers
2367 (common-pointer-type): For pointers to arrays take qualifiers from
2369 (build_conditional_expr): Add warnings for lost qualifiers.
2370 (comp-target-types): Allow pointers to arrays with different qualifiers.
2371 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
2372 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
2373 to PEDWARN_FOR_QUALIFIERS.
2375 2014-12-17 Jakub Jelinek <jakub@redhat.com>
2378 * c-convert.c: Include ubsan.h.
2379 (convert): For real -> integral casts and
2380 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2381 instead instrument the float cast directly.
2383 2014-11-29 Jakub Jelinek <jakub@redhat.com>
2385 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2386 c_finish_stmt_expr): Remove NULL last argument from
2387 create_tmp_var_raw and create_tmp_var calls.
2388 * c-array-notation.c (fix_builtin_array_notation_fn,
2389 build_array_notation_expr, fix_conditional_array_notations_1,
2390 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2392 2014-11-28 Marek Polacek <polacek@redhat.com>
2395 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2396 convert the right operand to integer type.
2398 2014-11-25 Marek Polacek <polacek@redhat.com>
2401 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2402 for inline functions.
2404 2014-11-21 Jakub Jelinek <jakub@redhat.com>
2407 * c-typeck.c (build_array_ref): Adjust
2408 convert_vector_to_pointer_for_subscript caller. If it returns true,
2409 call non_lvalue_loc on the result.
2411 2014-11-11 Richard Biener <rguenther@suse.de>
2413 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2416 2014-11-10 Andi Kleen <ak@linux.intel.com>
2419 * c-parser.c (c_parser_statement_after_labels): Call
2421 (c_parser_if_statement): Dito.
2422 (c_parser_switch_statement): Dito.
2423 (c_parser_while_statement): Dito.
2424 (c_parser_do_statement): Dito.
2425 (c_parser_for_statement): Dito.
2426 * c-typeck.c (c_finish_loop): Dito.
2428 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2430 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2431 OPT_Wshift_count_overflow in the warnings.
2433 2014-10-30 Marek Polacek <polacek@redhat.com>
2435 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2436 print the stripped version as well, if they're not the same.
2438 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2440 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2443 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
2445 * c-decl.c: Adjust include files.
2446 * c-parser.c: Ditto.
2448 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2449 Tom Tromey <tromey@redhat.com>
2451 * c-tree.h (enum c_oracle_request): New.
2452 (c_binding_oracle_function): New typedef.
2453 (c_binding_oracle, c_pushtag, c_bind): Declare.
2454 * c-decl.c (c_binding_oracle): New global.
2455 (I_SYMBOL_CHECKED): New macro.
2456 (i_symbol_binding): New function.
2457 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2458 (I_TAG_CHECKED): New macro.
2459 (i_tag_binding): New function.
2460 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2461 (I_LABEL_CHECKED): New macro.
2462 (i_label_binding): New function.
2463 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2464 (c_print_identifier): Save and restore c_binding_oracle.
2465 (c_pushtag, c_bind): New functions.
2467 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
2469 * c-typeck.c: Adjust include files.
2471 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2474 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2475 initialization here...
2476 (c_initialize_diagnostics): ... but here. Set defaults after
2477 building pretty-printer.
2479 2014-10-23 Marek Polacek <polacek@redhat.com>
2482 * c-decl.c (pop_scope): Don't print warning in external_scope.
2484 2014-10-19 Marek Polacek <polacek@redhat.com>
2487 * c-typeck.c (output_init_element): Allow initializing objects with
2488 static storage duration with compound literals even in C99 and add
2491 2014-10-17 Marek Polacek <polacek@redhat.com>
2494 * c-typeck.c (digest_init): Allow initializing objects with static
2495 storage duration with compound literals even in C99 and add pedwarn
2498 2014-10-17 Marek Polacek <polacek@redhat.com>
2501 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2502 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2503 error multiple times. Print the type.
2505 2014-10-17 Marek Polacek <polacek@redhat.com>
2508 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2511 2014-10-17 Marek Polacek <polacek@redhat.com>
2513 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2514 (start_function): Use OPT_Wimplicit_int instead of 0.
2515 (store_parm_decls_oldstyle): Likewise.
2517 2014-10-17 Alan Modra <amodra@gmail.com>
2520 * c-decl.c (merge_decls): Don't merge section name or tls model
2521 to newdecl symtab node, instead merge to olddecl. Override
2522 existing olddecl section name. Set tls_model for all thread-local
2523 vars, not just OMP thread-private ones. Remove incorrect comment.
2525 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
2527 * c-decl.c: Adjust include files.
2529 2014-10-14 DJ Delorie <dj@redhat.com>
2531 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2532 (c_token_starts_typename): Check all __intN, not just __int128.
2533 (c_token_starts_declspecs): Likewise.
2534 (c_parser_declspecs): Likewise.
2535 (c_parser_attribute_any_word): Likewise.
2536 (c_parser_objc_selector): Likewise.
2537 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2538 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2540 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2542 (finish_declspecs): Likewise.
2544 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2546 * c-parser.c (c_parser_all_labels): New function to replace
2548 (c_parser_statement): Call the new function.
2550 2014-10-09 Marek Polacek <polacek@redhat.com>
2553 * c-typeck.c (pop_init_level): Don't warn about initializing
2556 2014-10-07 Marek Polacek <polacek@redhat.com>
2559 * c-decl.c (header_for_builtin_fn): New function.
2560 (implicitly_declare): Suggest which header to include.
2562 2014-10-07 Marek Polacek <polacek@redhat.com>
2564 * c-convert.c (convert): Use error_operand_p.
2565 * c-typeck.c (require_complete_type): Likewise.
2566 (really_atomic_lvalue): Likewise.
2567 (digest_init): Likewise.
2568 (handle_omp_array_sections_1): Likewise.
2570 2014-10-03 Marek Polacek <polacek@redhat.com>
2573 * c-decl.c (pop_scope): Don't warn about "inline function declared
2574 but never defined" for functions marked with gnu_inline attribute.
2576 2014-09-25 Jakub Jelinek <jakub@redhat.com>
2579 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2580 on low_bound and length.
2582 2014-09-24 Marek Polacek <polacek@redhat.com>
2586 * c-parser.c: Don't define CPP_KEYWORD.
2587 (c_parser_switch_statement): Pass original type to c_finish_case.
2588 * c-tree.h (c_finish_case): Update declaration.
2589 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2590 conditionally to c_do_switch_warnings.
2592 2014-09-03 Marek Polacek <polacek@redhat.com>
2595 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2598 2014-09-02 Jakub Jelinek <jakub@redhat.com>
2599 Balaji V. Iyer <balaji.v.iyer@intel.com>
2600 Igor Zamyatin <igor.zamyatin@intel.com>
2602 * c-parser.c (c_parser_cilk_for): New function.
2603 (c_parser_cilk_grainsize): Likewise.
2604 (c_get_temp_regvar): Likewise.
2605 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2606 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2607 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2608 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2611 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2613 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2614 with using HOST_WIDE_INT without truncation to 'int'
2616 2014-08-22 Marek Polacek <polacek@redhat.com>
2619 * c-typeck.c (parser_build_binary_op): Adjust call to
2620 warn_logical_not_parentheses.
2622 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2625 * c-parser.c (c_parser_array_notation): Check for correct
2626 type of an array added.
2628 2014-08-19 Marek Polacek <polacek@redhat.com>
2631 * c-typeck.c (build_binary_op): If either operand of a comparison
2632 is a boolean expression, call maybe_warn_bool_compare.
2634 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2637 * c-typeck.c (build_c_cast): Do a conversion even when the
2638 TYPE_MAIN_VARIANTs are the same.
2640 2014-08-19 Marek Polacek <polacek@redhat.com>
2642 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2643 pedwarn_c99 instead of pedwarn.
2644 (grokfield): Likewise.
2645 (warn_defaults_to): New function.
2646 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2647 Unconditionally call pedwarn_c99 instead of pedwarn.
2648 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2649 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2650 check flag_isoc11 before.
2651 * c-errors.c (pedwarn_c99): Change the return type to bool.
2652 Handle -Wc99-c11-compat.
2653 * c-parser.c (disable_extension_diagnostics): Handle
2654 warn_c99_c11_compat.
2655 (restore_extension_diagnostics): Likewise.
2656 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2657 instead of pedwarn, don't check flag_isoc11 before.
2658 (c_parser_declspecs): Likewise.
2659 (c_parser_alignas_specifier): Likewise.
2660 (c_parser_alignof_expression): Likewise.
2661 (c_parser_generic_selection): Likewise.
2662 * c-tree.h (pedwarn_c99): Update declaration.
2663 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2666 2014-08-19 Marek Polacek <polacek@redhat.com>
2668 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2670 * c-errors.c: Include "opts.h".
2671 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2672 * c-parser.c (disable_extension_diagnostics): Handle negative value
2673 of warn_c90_c99_compat, too.
2674 (restore_extension_diagnostics): Likewise.
2675 (c_parser_compound_statement_nostart): Pass
2676 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2678 2014-08-12 Marek Polacek <polacek@redhat.com>
2680 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2682 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2684 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2686 2014-08-10 Marek Polacek <polacek@redhat.com>
2689 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2690 Call pedwarn_c90 instead of pedwarn.
2691 (check_bitfield_type_and_width): Likewise.
2692 (declspecs_add_qual): Likewise.
2693 (declspecs_add_type): Likewise.
2694 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2695 Adjust to only call pedwarn_c90.
2696 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2697 pedwarn_c90 instead of pedwarn.
2698 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2699 * c-parser.c (disable_extension_diagnostics): Handle
2700 warn_c90_c99_compat.
2701 (restore_extension_diagnostics): Likewise.
2702 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2703 pedwarn_c90 instead of pedwarn.
2704 (c_parser_initelt): Likewise.
2705 (c_parser_postfix_expression): Likewise.
2706 (c_parser_postfix_expression_after_paren_type): Likewise.
2707 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2708 * c-tree.h: Fix formatting.
2709 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2710 pedwarn_c90 instead of pedwarn.
2712 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2714 * c-typeck.c: Remove include of pointer-set.h.
2716 2014-08-07 Marek Polacek <polacek@redhat.com>
2718 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2720 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2722 * c-typeck.c: Use hash_map instead of pointer_map.
2724 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2726 * c-decl.c: Use hash_set instead of pointer_set.
2728 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2731 * c-array-notation.c (expand_array_notations): Handling
2734 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
2737 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2740 2014-07-30 Tom Tromey <tromey@redhat.com>
2742 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2744 (really_start_incremental_init, push_init_level): Initialize
2746 (pop_init_level): Set global designator_depth.
2747 (process_init_element): Check for designated_init attribute.
2749 2014-07-20 Marek Polacek <polacek@redhat.com>
2752 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2753 (implicitly_declare): Pass location to implicit_decl_warning.
2755 2014-07-14 Jakub Jelinek <jakub@redhat.com>
2758 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2759 If non-NULL, call c_parser_check_literal_zero.
2760 (c_parser_check_literal_zero): New function.
2761 (c_parser_postfix_expression_after_primary): Adjust
2762 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2764 2014-07-06 Marek Polacek <polacek@redhat.com>
2767 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2768 * c-tree.h (C_ARRAY_PARAMETER): Define.
2769 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2772 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
2773 Chen Gang <gang.chen.5i5j@gmail.com>
2775 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2778 2014-07-01 Marek Polacek <polacek@redhat.com>
2780 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2781 instead of 0 to WARN_FOR_ASSIGNMENT.
2783 2014-07-01 Marek Polacek <polacek@redhat.com>
2786 * c-typeck.c (convert_for_assignment): Pass
2787 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2789 2014-06-30 Marek Polacek <polacek@redhat.com>
2791 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2792 has no_sanitize_undefined attribute.
2794 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2797 * c-array-notation.c (fix_builtin_array_notation_fn):
2798 Check for 0 arguments in builtin call. Check that bultin argument is
2800 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2803 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2805 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2806 qualifiers in __auto_type for atomic types.
2807 (c_parser_typeof_specifier): Discard all type qualifiers in
2808 __typeof__ for atomic types.
2810 2014-06-25 Marek Polacek <polacek@redhat.com>
2813 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2814 the return expression to c_finish_return.
2816 2014-06-25 Jakub Jelinek <jakub@redhat.com>
2818 * c-typeck.c (c_finish_omp_clauses): Make sure
2819 OMP_CLAUSE_LINEAR_STEP has correct type.
2821 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2825 2014-06-24 Jakub Jelinek <jakub@redhat.com>
2827 * c-parser.c (c_parser_omp_for_loop): For
2828 #pragma omp parallel for simd move lastprivate clause from parallel
2829 to for rather than simd.
2831 2014-06-23 Marek Polacek <polacek@redhat.com>
2833 * c-typeck.c (parser_build_binary_op): Don't call
2834 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2836 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2838 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2839 * c-decl.c (merge_decls): Likewise.
2841 2014-06-09 Marek Polacek <polacek@redhat.com>
2844 * c-typeck.c (error_init): Call inform instead of error_at.
2845 (pedwarn_init): Call inform instead of pedwarn.
2846 (warning_init): Call inform instead of warning_at.
2848 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2850 * c-decl.c (merge_decls): Use set_decl_section_name.
2851 (duplicate_decls): Remove node if it exists.
2853 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2856 * c-typeck.c (push_init_level, process_init_element,
2857 pop_init_level): Correct check for zero initialization, move
2858 missing brace warning to respect zero initialization.
2860 2014-06-05 Marek Polacek <polacek@redhat.com>
2863 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2865 2014-06-05 Marek Polacek <polacek@redhat.com>
2868 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2869 on the left hand side operand of a comparison.
2871 2014-06-05 Marek Polacek <polacek@redhat.com>
2874 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2875 Print note only if the warning was printed.
2877 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2880 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2883 2014-06-03 Marek Polacek <polacek@redhat.com>
2886 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2888 * c-tree.h (c_start_case): Update.
2889 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2890 switch condition has boolean value.
2892 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2894 * c-decl.c: Include builtins.h.
2895 * c-parser.c: Likewise.
2897 2014-05-27 Marek Polacek <polacek@redhat.com>
2900 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2901 error and warning calls to error_at and warning_at. Pass location of
2902 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2903 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2904 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2906 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2909 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2910 function parameters.
2912 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2914 * c-decl.c (merge_decls): Preserve symtab node pointers.
2915 (duplicate_decls): Free new decl.
2917 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2919 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2922 * c-parser.c (c_parser_omp_target): Return bool values.
2924 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2926 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2927 num_teams_loc variable to num_thread_limit_loc.
2929 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2931 * c-array-notation.c (expand_array_notations): Use void_node
2932 instead of void_zero_node.
2934 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2936 * c-decl.c (finish_struct): Adjust.
2937 (finish_enum): Likewise.
2939 (record_inline_static): Likewise.
2940 (push_scope): Likewise.
2941 (make_label): Likewise.
2942 (lookup_label_for_goto): Likewise.
2943 (finish_struct): Likewise.
2944 (finish_enum): Likewise.
2945 (store_parm_decls): Likewise.
2946 (c_push_function_context): Likewise.
2947 * c-lang.h: Remove usage of variable_size gty attribute.
2948 * c-parser.c (c_parse_init): Adjust.
2949 (c_parse_file): Likewise.
2951 2014-05-13 Marek Polacek <polacek@redhat.com>
2954 * c-typeck.c (convert_for_assignment): Pass location to
2955 WARN_FOR_ASSIGNMENT instead of input_location.
2957 2014-05-10 Marek Polacek <polacek@redhat.com>
2959 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2960 maybe_warn_string_init.
2961 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2962 maybe_warn_string_init.
2963 * c-tree.h (maybe_warn_string_init): Update declaration.
2964 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2965 Call pedwarn_init with loc instead of with input_location.
2966 (digest_init): Pass init_loc to maybe_warn_string_init.
2967 (pop_init_level): Call pedwarn_init with loc instead of with
2969 (set_init_index): Likewise.
2970 (process_init_element): Likewise.
2972 2014-05-09 Marek Polacek <polacek@redhat.com>
2975 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2976 (c_parser_initelt): Pass location to set_init_label. Pass array index
2977 location to set_init_index.
2978 * c-tree.h (push_init_level): Update declaration.
2979 (pop_init_level): Likewise.
2980 (set_init_index): Likewise.
2981 (set_init_label): Likewise.
2982 * c-typeck.c (error_init): Add location parameter. Call error_at
2984 (digest_init): Pass init_loc to error_init.
2985 (really_start_incremental_init):
2986 (push_init_level): Add location parameter. Pass loc to pop_init_level
2988 (pop_init_level): Likewise.
2989 (set_designator): Add location parameter. Pass loc to pop_init_level,
2990 push_init_level, and error_init.
2991 (set_init_index): Add location parameter. Pass loc to error_init and
2993 (set_init_label): Likewise.
2994 (output_init_element): Pass loc to error_init.
2995 (process_init_element): Pass loc to error_init, pop_init_level,
2996 pedwarn_init, and push_init_level.
2998 2014-05-09 Marek Polacek <polacek@redhat.com>
3001 * c-parser.c (c_parser_attributes): Parse the arguments as an
3002 expression-list if the attribute takes identifier.
3004 2014-05-08 Marek Polacek <polacek@redhat.com>
3007 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3010 2014-05-08 Marek Polacek <polacek@redhat.com>
3013 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3016 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3017 Mike Stump <mikestump@comcast.net>
3018 Richard Sandiford <rdsandiford@googlemail.com>
3020 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3021 (finish_enum): Use wide-int interfaces.
3022 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3023 * c-typeck.c (build_c_cast): Likewise.
3024 (set_nonincremental_init_from_string): Likewise.
3025 (c_tree_equal): Likewise.
3027 2014-05-02 Marek Polacek <polacek@redhat.com>
3030 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3031 Return size_one_node when the type is not complete.
3032 (pointer_diff): Remove comment.
3033 (build_unary_op): Improve error messages.
3035 2014-05-02 Marek Polacek <polacek@redhat.com>
3037 * c-typeck.c (c_finish_return): Separate warning_at calls.
3039 2014-05-02 Marek Polacek <polacek@redhat.com>
3041 * c-tree.h (error_init): Remove declaration.
3042 (pedwarn_init): Likewise.
3043 * c-typeck.c (error_init): Make static and move above.
3044 (pedwarn_init): Likewise.
3045 (warning_init): Move above.
3046 (maybe_warn_string_init): Likewise.
3048 2014-05-01 Jeff Law <law@redhat.com>
3052 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3053 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3056 2014-05-02 Marek Polacek <polacek@redhat.com>
3059 * c-typeck.c (push_init_level): Set constructor_designated to
3060 p->designated for structures.
3062 2014-05-01 Marek Polacek <polacek@redhat.com>
3065 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3066 function-definition has an attribute after the declarator.
3068 2014-05-01 Marek Polacek <polacek@redhat.com>
3071 * c-typeck.c (warning_init): Add location_t parameter. Call
3072 warning_at instead of warning.
3073 (push_init_level): Pass input_location to warning_init.
3074 (add_pending_init): Add location_t parameter. Pass loc to
3076 (set_nonincremental_init): Pass input_location to add_pending_init.
3077 (set_nonincremental_init_from_string): Likewise.
3078 (output_init_element): Pass loc to warning_init and to
3081 2014-05-01 Marek Polacek <polacek@redhat.com>
3084 * c-typeck.c (c_finish_return): Distinguish between label and variable
3085 when warning about returning local address.
3087 2014-05-01 Marek Polacek <polacek@redhat.com>
3090 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3093 2014-05-01 Marek Polacek <polacek@redhat.com>
3096 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3097 instead of 0 to WARN_FOR_QUALIFIERS.
3099 2014-05-01 Marek Polacek <polacek@redhat.com>
3102 * c-typeck.c (default_conversion): Use better location for
3105 2014-04-30 Marek Polacek <polacek@redhat.com>
3107 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3108 also when SANITIZE_FLOAT_DIVIDE is on.
3110 2014-04-30 Marek Polacek <polacek@redhat.com>
3113 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3114 and pedwarn_init. Use loc insted of input_location.
3116 2014-04-30 Marek Polacek <polacek@redhat.com>
3119 * c-typeck.c (build_binary_op): Use location when warning about
3122 2014-04-25 Marek Polacek <polacek@redhat.com>
3125 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3126 always_inline/noinline and hot/cold attributes.
3128 2014-04-25 Marek Polacek <polacek@redhat.com>
3131 * c-parser.c (c_parser_initelt): Pass input_location to
3132 process_init_element.
3133 (c_parser_initval): Pass loc to process_init_element.
3134 * c-tree.h (process_init_element): Adjust declaration.
3135 * c-typeck.c (push_init_level): Pass input_location to
3136 process_init_element.
3137 (pop_init_level): Likewise.
3138 (set_designator): Likewise.
3139 (output_init_element): Add location_t parameter. Pass loc to
3141 (output_pending_init_elements): Pass input_location to
3142 output_init_element.
3143 (process_init_element): Add location_t parameter. Pass loc to
3144 output_init_element.
3146 2014-04-24 Jakub Jelinek <jakub@redhat.com>
3148 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3149 atomic-clause, allow comma in between atomic-clause and
3152 2014-04-22 Jakub Jelinek <jakub@redhat.com>
3155 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3156 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3158 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3161 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3162 create_tmp_var instead build_decl for creating temps.
3163 (build_array_notation_expr): Likewise.
3164 (fix_conditional_array_notations_1): Likewise.
3165 (fix_array_notation_expr): Likewise.
3166 (fix_array_notation_call_expr): Likewise.
3168 2014-03-28 Jakub Jelinek <jakub@redhat.com>
3171 * c-tree.h (c_build_function_call_vec): New prototype.
3172 * c-typeck.c (build_function_call_vec): Don't call
3173 resolve_overloaded_builtin here.
3174 (c_build_function_call_vec): New wrapper function around
3175 build_function_call_vec. Call resolve_overloaded_builtin here.
3176 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3177 Call c_build_function_call_vec instead of build_function_call_vec.
3178 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3179 * c-decl.c (finish_decl): Likewise.
3181 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3184 * c-typeck.c: Use correct format string in cast-qual warning
3186 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3188 * c-decl.c (c_decl_attributes): Use
3189 lang_hooks.types.omp_mappable_type.
3190 * c-typeck.c (c_finish_omp_clauses): Likewise.
3192 2014-03-06 Marek Polacek <polacek@redhat.com>
3195 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3196 of checking tree code.
3198 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3200 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3201 (c_parser_parameter_declaration): Likewise.
3203 2014-02-19 Marek Polacek <polacek@redhat.com>
3206 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3207 Call mark_exp_read on exp.value.
3208 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3209 TREE_ADDRESSABLE on old instead of val.
3210 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3212 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3214 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3215 C_EXPR_APPEND by vec_safe_push.
3216 * c-tree.h (C_EXPR_APPEND): Remove.
3218 2014-01-31 Marek Polacek <polacek@redhat.com>
3221 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3222 build_function_call_vec.
3223 (build_function_call): Likewise.
3224 (build_atomic_assign): Likewise.
3225 (build_function_call_vec): Add arg_loc parameter. Use it.
3226 (convert_arguments): Likewise.
3227 (convert_for_assignment): Rename rhs_loc to expr_loc.
3228 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3229 (c_parser_objc_keywordexpr): Likewise.
3230 (c_parser_postfix_expression_after_primary): Call
3231 build_function_call_vec with expr_loc rather than op_loc.
3232 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3233 build_function_call_vec.
3234 (c_parser_expr_list): Add locations parameter. Fill it with locations
3235 of function arguments.
3236 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3238 2014-01-30 Marek Polacek <polacek@redhat.com>
3241 * c-typeck.c (build_function_call_vec): Use loc parameter.
3242 (convert_arguments): Add location parameter. Use it.
3243 (ep_convert_and_check): Likewise.
3244 (build_atomic_assign): Adjust convert_for_assignment call.
3245 (build_modify_expr): Likewise.
3246 (digest_init): Likewise.
3247 (c_finish_return): Likewise.
3248 (build_conditional_expr): Adjust ep_convert_and_check calls.
3249 (convert_for_assignment): Add rhs_loc parameter. Use it.
3250 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3253 2014-01-30 Richard Biener <rguenther@suse.de>
3256 * c-typeck.c (build_function_call_vec): Do not replace calls
3257 to a function via an incompatible type with a runtime abort.
3259 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3261 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3262 flag_enable_cilkplus with flag_cilkplus.
3263 (c_parser_direct_declarator_inner): Likewise.
3264 (c_parser_attribute_any_word): Likewise.
3265 (c_parser_attributes): Likewise.
3266 (c_parser_compound_statement): Likewise.
3267 (c_parser_statement_after_labels): Likewise.
3268 (c_parser_if_statement): Likewise.
3269 (c_parser_switch_statement): Likewise.
3270 (c_parser_do_statement): Likewise.
3271 (c_parser_for_statement): Likewise.
3272 (c_parser_unary_expression): Likewise.
3273 (c_parser_postfix_expression): Likewise.
3274 (c_parser_postfix_expression_after_primary): Likewise.
3275 (c_parser_postfix_expression_after_primary): Likewise.
3276 (c_parser_omp_clause_name): Likewise.
3277 (c_finish_omp_declare_simd): Likewise.
3278 (c_parser_cilk_verify_simd): Likewise.
3279 * c-typeck.c (build_array_ref): Likewise.
3280 (build_function_call_vec): Likewise.
3281 (convert_arguments): Likewise.
3282 (build_compound_expr): Likewise.
3283 (c_finish_return): Likewise.
3284 (c_finish_if_stmt): Likewise.
3285 (c_finish_loop): Likewise.
3286 (build_binary_op): Likewise.
3288 2014-01-23 Marek Polacek <polacek@redhat.com>
3291 * c-typeck.c (parser_build_binary_op): Use location instead of
3293 (build_binary_op): Pass location to shorten_compare.
3295 2014-01-23 Marek Polacek <polacek@redhat.com>
3298 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3301 2014-01-23 Marek Polacek <polacek@redhat.com>
3304 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3305 of a comma expression.
3306 (emit_side_effect_warnings): Likewise.
3308 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3311 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3312 function to use walk_tree and moved a lot of its functionality to
3313 expand_array_notations.
3314 (expand_array_notations): New function.
3316 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3318 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3319 attribute an attribute without value.
3321 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3324 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3325 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3327 2014-01-22 Marek Polacek <polacek@redhat.com>
3330 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3331 of remove_c_maybe_const_expr on op1 and op2.
3333 2014-01-15 Jakub Jelinek <jakub@redhat.com>
3336 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3337 effects, preevaluate rhs using SAVE_EXPR first.
3339 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3342 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3343 statements with if-elseif statements.
3345 2014-01-06 Marek Polacek <polacek@redhat.com>
3348 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3349 defined bit-field types only in ISO C.
3351 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3353 Update copyright years
3355 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3357 * c-array-notation.c: Use the standard form for the copyright notice.
3359 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3361 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3362 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3363 field in parser is not empty. If not-empty, call the function
3364 c_parser_finish_omp_declare_simd.
3365 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3366 between SIMD-enabled functions and #pragma simd. Added new parameter.
3367 (c_parser_cilk_all_clauses): Modified the usage of the function
3368 c_parser_cilk_clause_vectorlength as mentioned above.
3369 (c_parser_cilk_simd_fn_vector_attrs): New function.
3370 (c_finish_cilk_simd_fn_tokens): Likewise.
3371 (is_cilkplus_vector_p): Likewise.
3372 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3373 "nomask," and "mask" strings in clause name.
3374 (c_parser_omp_all_clauses): Added 3 new case statements:
3375 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3376 PRAGMA_CILK_CLAUSE_NOMASK.
3377 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3378 check for vector attribute and if so call the function
3379 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3380 called the function c_finish_cilk_simd_fn_tokens.
3381 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3382 parser field is non-empty. If so, parse them as you would parse
3383 the omp declare simd pragma.
3384 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3385 Added a check when step is a parameter and flag it as error.
3386 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3387 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3390 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3392 * c-parser.c (c_parser_omp_parallel): Fix description.
3394 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3396 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3397 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3398 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3399 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3401 2013-12-04 Joseph Myers <joseph@codesourcery.com>
3404 * c-parser.c (c_parser_alignas_specifier): Use
3405 c_sizeof_or_alignof_type instead of c_alignof.
3406 (c_parser_alignof_expression): Likewise, with min_alignof
3407 parameter depending on alignof spelling used.
3409 2013-12-04 Marek Polacek <polacek@redhat.com>
3412 * c-decl.c (start_function): Don't warn for missing prototype for
3415 2013-12-03 Marek Polacek <polacek@redhat.com>
3418 * c-decl.c (build_compound_literal): Allow compound literals with
3419 empty initial value.
3421 2013-12-02 Joseph Myers <joseph@codesourcery.com>
3424 * c-typeck.c (build_modify_expr): Diagnose assignment to
3425 expression with array type.
3427 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3430 * c-typeck.c (process_init_element): Do not treat a string as
3431 initializing a whole array when used with a designator for an
3434 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3437 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3438 an inline function following a static declaration.
3440 2013-11-28 Jakub Jelinek <jakub@redhat.com>
3443 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3444 to p_name before calling c_parser_omp_teams instead of after.
3445 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3446 argument. Remove unused p_name variable.
3448 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
3449 Jakub Jelinek <jakub@redhat.com>
3451 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3452 external_scope is NULL.
3454 2013-11-27 Tom de Vries <tom@codesourcery.com>
3455 Marc Glisse <marc.glisse@inria.fr>
3458 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3460 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
3462 * c-typeck.c: Add required include files from gimple.h.
3464 2013-11-22 David Malcolm <dmalcolm@redhat.com>
3466 * c-decl.c (define_label, shadow_tag_warned)
3467 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3468 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3469 (declspecs_add_type): Remove use of in_system_header macro.
3470 * c-parser.c (c_parser_unary_expression): Likewise.
3471 * c-typeck.c (store_init_value, process_init_element)
3472 (c_start_case): Likewise.
3474 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3477 * c-parser.c (c_parser_set_source_position_from_token): Remove
3478 reference to in_system_header from comment.
3480 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3482 * c-decl.c (grokdeclarator): Update comment to refer to
3483 tree_to_[su]hwi rather than tree_low_cst.
3485 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3487 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3488 tree_to_uhwi throughout.
3490 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3492 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3495 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3497 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3500 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
3502 * c-parser.c (c_parser_cilk_simd): New.
3503 (c_parser_cilk_verify_simd): New.
3504 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3505 (c_parser_omp_for_loop): Add case for NE_EXPR.
3506 Set c_break_label for CILK_SIMD.
3507 (c_parser_cilk_clause_vectorlength): New.
3508 (c_parser_cilk_clause_linear): New.
3509 (c_parser_cilk_clause_name): New.
3510 (c_parser_cilk_all_clauses): New.
3511 * c-typeck.c (build_unary_op): Pass location argument to
3513 (build_modify_expr): Same.
3514 (build_asm_expr): Same.
3515 (c_finish_bc_stmt): Error on break/continue in loops.
3517 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
3519 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3521 2013-11-14 Diego Novillo <dnovillo@google.com>
3523 * c-decl.c: Include print-tree.h.
3524 Include stor-layout.h.
3527 Include stringpool.h.
3528 * c-lang.c: Include fold-const.h.
3529 * c-parser.c: Include stringpool.h.
3531 Include stor-layout.h.
3533 Include trans-mem.h.
3534 * c-typeck.c: Include stor-layout.h.
3535 Include trans-mem.h.
3539 2013-11-13 Joseph Myers <joseph@codesourcery.com>
3541 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3542 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3544 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3545 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3547 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3548 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3549 (c_parser_declarator, c_parser_direct_declarator_inner)
3550 (c_parser_parameter_declaration, c_parser_type_name): All callers
3552 (c_parser_declaration_or_fndef): Handle declarations with type
3553 determined from the initializer.
3555 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
3557 * c-typeck.c: Include gimplify.h.
3559 2013-11-12 Joseph Myers <joseph@codesourcery.com>
3561 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3562 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3564 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3565 or _Thread_local as appropriate in diagnostics.
3566 (build_null_declspecs): Initialize ret->thread_gnu_p.
3567 (declspecs_add_scspec): Handle either __thread or _Thread_local
3568 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3569 pedantic. Do not disallow _Thread_local extern and _Thread_local
3572 2013-11-07 Joseph Myers <joseph@codesourcery.com>
3573 Andrew MacLeod <amacleod@redhat.com>
3575 * c-aux-info.c (gen_type): Handle atomic qualifier.
3576 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3577 qualifiers when compating types.
3578 (shadow_tag_warned): Handle atomic_p in declspecs.
3579 (quals_from_declspecs): Likewise.
3580 (start_decl): Use c_type_promotes_to when promoting argument
3582 (grokdeclarator): Handle _Atomic.
3583 (get_parm_info): Diagnose any qualifier on "void" as only
3585 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3586 comparing types. Use c_type_promotes_to when promoting argument
3588 (finish_function): Use c_type_promotes_to when promoting argument
3590 (build_null_declspecs): Handle atomic_p in declspecs.
3591 (declspecs_add_qual): Handle RID_ATOMIC.
3592 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3593 (c_token_starts_declspecs): Handle RID_ATOMIC.
3594 (c_parser_declspecs): Handle atomic type specifiers and
3596 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3597 from types of expressions with atomic type.
3598 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3599 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3600 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3601 (c_parser_statement_after_labels, c_parser_switch_statement)
3602 (c_parser_for_statement, c_parser_expr_no_commas)
3603 (c_parser_conditional_expression, c_parser_binary_expression)
3604 (c_parser_cast_expression, c_parser_unary_expression)
3605 (c_parser_postfix_expression)
3606 (c_parser_postfix_expression_after_primary, c_parser_expression):
3607 Use convert_lvalue_to_rvalue.
3608 (c_parser_expression_conv, c_parser_expr_list): Document
3609 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3610 (c_parser_objc_synchronized_statement): Use
3611 convert_lvalue_to_rvalue.
3612 (c_parser_objc_selector): Handle RID_ATOMIC.
3613 (c_parser_objc_receiver, c_parser_array_notation): Use
3614 convert_lvalue_to_rvalue.
3615 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3616 _Atomic (type-name).
3617 (struct c_declspecs): Add atomic_p field.
3618 (convert_lvalue_to_rvalue): Declare.
3619 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3620 corresponding atomic types.
3621 (qualify_type): Don't add _Atomic qualifiers from second argument.
3622 (comp_target_types): Do not allow _Atomic mismatches.
3623 (type_lists_compatible_p): Do not remove atomic qualifiers when
3625 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3626 (build_atomic_assign): New functions.
3627 (build_unary_op): Use build_atomic_assign for atomic increment and
3629 (build_conditional_expr): Do not treat _Atomic void as a qualified
3631 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3632 (find_anonymous_field_with_type, convert_to_anonymous_field)
3633 (convert_for_assignment): Do not remove atomic qualifiers when
3635 (digest_init): Do not accept initialization of arrays of atomic
3636 elements by string constants.
3637 (build_asm_expr): Use convert_lvalue_to_rvalue.
3638 (build_binary_op): Do not treat _Atomic void as a qualified
3641 2013-11-06 DJ Delorie <dj@redhat.com>
3643 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3644 both explicit and builtin, print the location of the explicit one.
3646 2013-11-05 Tobias Burnus <burnus@net-b.de>
3648 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3649 c_parser_omp_distribute, c_parser_omp_teams,
3650 c_parser_omp_target, c_parser_omp_declare): Handle
3653 2013-11-03 Marek Polacek <polacek@redhat.com>
3655 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3657 2013-11-01 Jakub Jelinek <jakub@redhat.com>
3659 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3660 check_dup_generic at the end, unless remove is true.
3661 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3663 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3665 2013-10-31 Jakub Jelinek <jakub@redhat.com>
3667 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3668 with decl that is not pointer nor array.
3670 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3672 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3673 a spawning function is found.
3674 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3675 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3676 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3677 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3679 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3680 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3682 (c_finish_return): Added a check to reject _Cilk_spawn in return
3684 (build_cilk_spawn): New function.
3685 (build_cilk_sync): Likewise.
3686 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3688 2013-10-27 Tobias Burnus <burnus@net-b.de>
3691 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3692 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3693 (c_parser_statement_after_labels): Update calls.
3695 2013-10-24 Tobias Burnus <burnus@net-b.de>
3698 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3699 Handle PRAGMA_IVDEP.
3700 (c_parser_statement_after_labels): Update call.
3702 2013-10-24 Marek Polacek <polacek@redhat.com>
3704 * c-parser.c (c_parser_struct_declaration): Add a comment.
3705 (c_parser_declarator): Don't allow _Alignas here.
3707 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
3709 * c-parser.c: Include omp-low.h.
3710 * c-typeck.c: Likewise.
3712 2013-10-17 Marek Polacek <polacek@redhat.com>
3715 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3716 Document syntax of the array-declarator.
3717 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3719 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3720 (c_parser_struct_declaration): Likewise.
3721 (c_parser_declarator): Likewise.
3722 (c_parser_direct_declarator_inner): Likewise.
3723 (c_parser_parameter_declaration): Likewise.
3724 (c_parser_type_name): Likewise.
3726 2013-10-11 Jakub Jelinek <jakub@redhat.com>
3728 * c-lang.h (current_omp_declare_target_attribute): New extern
3730 * c-parser.c: Include c-lang.h.
3731 (struct c_parser): Change tokens to c_token *.
3732 Add tokens_buf field. Change tokens_avail type to unsigned int.
3733 (c_parser_consume_token): If parser->tokens isn't
3734 &parser->tokens_buf[0], increment parser->tokens.
3735 (c_parser_consume_pragma): Likewise.
3736 (enum pragma_context): Add pragma_struct and pragma_param.
3737 (c_parser_external_declaration): Adjust
3738 c_parser_declaration_or_fndef caller.
3739 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3740 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3741 Adjust recursive call.
3742 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3744 (c_parser_parameter_declaration): Use pragma_param instead of
3746 (c_parser_compound_statement_nostart, c_parser_label,
3747 c_parser_for_statement): Adjust
3748 c_parser_declaration_or_fndef callers.
3749 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3750 it through to c_parser_conditional_expression.
3751 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3752 pass it through to c_parser_binary_expression. Adjust recursive
3754 (c_parser_binary_expression): Remove prec argument, add
3755 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3756 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3757 binop matches it, use build2 instead of parser_build_binary_op.
3758 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3759 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3760 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3761 Handle pragma_struct and pragma_param the same as pragma_external.
3762 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3763 (c_parser_omp_variable_list): Parse array sections for
3764 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3765 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3766 (c_parser_omp_clause_reduction): Handle user defined reductions.
3767 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3768 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3769 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3770 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3771 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3772 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3773 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3774 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3775 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3776 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3777 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3778 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3779 (c_parser_omp_for_loop): Add CODE argument, pass it through
3780 to c_finish_omp_for. Change last argument to cclauses,
3781 and adjust uses to grab parallel clauses from the array of all
3782 the split clauses. Adjust c_parser_binary_expression,
3783 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3784 (omp_split_clauses): New function.
3785 (c_parser_omp_simd): New function.
3786 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3787 Allow the function to be called also when parsing combined constructs,
3788 and call c_parser_omp_simd when parsing for simd.
3789 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3790 #pragma omp section, require exactly one structured-block instead of
3791 sequence of statements.
3792 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3793 Allow the function to be called also when parsing combined constructs.
3794 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3795 Allow the function to be called also when parsing combined
3797 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3798 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3799 c_parser_omp_teams, c_parser_omp_target_data,
3800 c_parser_omp_target_update, c_parser_omp_target,
3801 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3802 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3803 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3804 (c_parser_omp_construct): Add p_name and mask vars. Handle
3805 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3806 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3807 and c_parser_omp_sections callers.
3808 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3809 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3810 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3811 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3812 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3814 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3815 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3816 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3817 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3818 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3819 * c-typeck.c: Include tree-inline.h.
3820 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3821 handle_omp_array_sections_1, handle_omp_array_sections,
3822 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3823 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3824 user defined reductions.
3825 (c_tree_equal): New function.
3826 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3827 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3828 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3829 c_check_omp_declare_reduction_r): New prototypes.
3830 * c-decl.c (current_omp_declare_target_attribute): New variable.
3831 (c_decl_attributes): New function.
3832 (start_decl, start_function): Use it instead of decl_attributes.
3833 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3834 c_omp_reduction_decl, c_omp_reduction_lookup,
3835 c_check_omp_declare_reduction_r): New functions.
3837 2013-09-25 Tom Tromey <tromey@redhat.com>
3839 * Make-lang.in (c/gccspec.o): Remove.
3840 (CFLAGS-c/gccspec.o): New variable.
3841 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3842 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3843 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3845 2013-09-25 Tom Tromey <tromey@redhat.com>
3847 * Make-lang.in (c/gccspec.o): Don't use subshell.
3849 2013-09-18 Marek Polacek <polacek@redhat.com>
3852 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3853 Remove unnecessary check.
3855 2013-09-18 Marek Polacek <polacek@redhat.com>
3858 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3859 no_sanitize_undefined attribute.
3861 2013-09-13 Kai Tietz <ktietz@redhat.com>
3864 * c-decl.c (c_builtin_function_ext_scope): Remove
3865 wrong assumption that it is never called on prexisting
3868 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3870 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3872 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3874 * c-objc-common.c (c_tree_printer): Tidy.
3876 2013-08-30 Marek Polacek <polacek@redhat.com>
3878 * c-typeck.c (build_binary_op): Add division by zero and shift
3881 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
3882 Joseph Myers <joseph@codesourcery.com>
3885 * c-typeck.c (c_common_type): Prefer double_type_node over
3886 other REAL_TYPE types with the same precision.
3887 (convert_arguments): Likewise.
3889 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3891 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3892 (c_initialize_diagnostics): Call a destructor for the early printer.
3894 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3896 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3897 printer initialization.
3899 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
3902 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3903 check for truth values.
3904 (expand_array_notation_exprs): Added truth values case. Removed an
3905 unwanted else. Added for-loop to walk through subtrees in default
3908 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3910 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3912 2013-07-23 Joseph Myers <joseph@codesourcery.com>
3914 * c-parser.c (struct c_generic_association): Fix typo.
3916 2013-07-23 Tom Tromey <tromey@redhat.com>
3917 Joseph Myers <joseph@codesourcery.com>
3919 * c-parser.c (struct c_generic_association): New.
3920 (c_generic_association_d): New typedef.
3921 (c_parser_generic_selection): New function.
3922 (c_parser_postfix_expression): Handle RID_GENERIC.
3924 2013-07-13 Jason Merrill <jason@redhat.com>
3927 * c-decl.c (finish_struct): Check for too-large class.
3929 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
3932 * c-typeck.c (set_init_index): When folding, check for index overflow.
3934 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3936 * c-parser.c (c_parser_array_notation): Removed rejection of array
3937 notations in an array of function pointers.
3939 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3941 * c-array-notation.c (make_triplet_val_inv): New function.
3942 (create_cmp_incr): Likewise.
3943 (create_array_refs): Likewise.
3944 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3945 Also modularized common parts between functions and called the function.
3946 (build_array_notation_expr): Likewise.
3947 (fix_conditional_array_notations_1): Likewise.
3948 (fix_array_notation_expr): Likewise.
3949 (fix_array_notation_call_expr): Likewise.
3951 2013-06-18 Marek Polacek <polacek@redhat.com>
3954 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3956 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3958 * c-array-notation.c (build_array_notation_expr): Reject array notation
3959 mismatch between LHS and RHS even inside a call_expr. Also, removed
3960 a couple while statements that were dead code.
3962 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3964 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3965 excessive precision expressions in function parameters. Also removed
3966 couple unwanted while statements.
3968 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3970 * c-array-notation.c (expand_array_notation_exprs): Added
3971 ARRAY_NOTATION_REF case.
3973 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3975 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3976 function to c-family/array-notation-common.c.
3977 (is_cilkplus_reduce_builtin): Likewise.
3978 (find_rank): Likewise.
3979 (extract_array_notation_exprs): Likewise.
3980 (replace_array_notations): Likewise.
3981 (find_inv_trees): Likewise.
3982 (replace_inv_trees): Likewise.
3983 (contains_array_notation_expr): Likewise.
3984 (find_correct_array_notation_type): Likewise.
3985 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3986 (struct inv_list): Moved this to c-family/array-notation-common.c.
3987 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3989 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3991 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3992 reduction functions outside the for-loop. Added a check if the fundecl
3993 is non-NULL. Finally, removed an unwanted if-statement, and made the
3996 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3998 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3999 condition of the if-statement matches the rank of else-block and then-
4000 block when array notations are used.
4001 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4002 expression after the entire function body is parsed.
4003 (c_parser_expr_no_commas): Delayed creating array notation expressions
4004 to the end of function parsing.
4005 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4006 whole if-statement instead of just the condition.
4007 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4009 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4012 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4013 array to NULL_TREE if they are unused. Also added a check for the
4014 field to be NULL before its fields are used in future.
4016 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4019 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4020 (build_array_notation_expr): Likewise.
4022 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4024 * c-typeck.c (build_array_ref): Added a check to see if array's
4025 index is greater than one. If true, then emit an error.
4026 (build_function_call_vec): Exclude error reporting and checking
4027 for builtin array-notation functions.
4028 (convert_arguments): Likewise.
4029 (c_finish_return): Added a check for array notations as a return
4030 expression. If true, then emit an error.
4031 (c_finish_loop): Added a check for array notations in a loop
4032 condition. If true then emit an error.
4033 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4034 (build_binary_op): Added a check for array notation expr inside
4035 op1 and op0. If present, we call another function to find correct
4037 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4038 * c-parser.c (c_parser_compound_statement): Check if array
4039 notation code is used in tree, if so, then transform them into
4041 (c_parser_expr_no_commas): Check if array notation is used in LHS
4042 or RHS, if so, then build array notation expression instead of
4044 (c_parser_postfix_expression_after_primary): Added a check for
4045 colon(s) after square braces, if so then handle it like an array
4046 notation. Also, break up array notations in unary op if found.
4047 (c_parser_direct_declarator_inner): Added a check for array
4049 (c_parser_compound_statement): Added a check for array notation in
4050 a stmt. If one is present, then expand array notation expr.
4051 (c_parser_if_statement): Likewise.
4052 (c_parser_switch_statement): Added a check for array notations in
4053 a switch statement's condition. If true, then output an error.
4054 (c_parser_while_statement): Similarly, but for a while.
4055 (c_parser_do_statement): Similarly, but for a do-while.
4056 (c_parser_for_statement): Similarly, but for a for-loop.
4057 (c_parser_unary_expression): Check if array notation is used in a
4058 pre-increment or pre-decrement expression. If true, then expand
4060 (c_parser_array_notation): New function.
4061 * c-array-notation.c: New file.
4062 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4064 2013-05-23 Mike Stump <mikestump@comcast.net>
4066 * c-typeck.c (convert_for_assignment): Handle references to memory
4069 2013-05-16 Jason Merrill <jason@redhat.com>
4071 * Make-lang.in (cc1$(exeext)): Use link mutex.
4073 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4075 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4076 to simply use OPT_Wpointer_arith.
4077 (build_unary_op): Likewise.
4079 2013-04-03 Jakub Jelinek <jakub@redhat.com>
4082 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4083 argument. If set, or it temporarily for parsing of the first
4084 argument into force_folding_builtin_constant_p.
4085 (c_parser_postfix_expression): Adjust callers.
4087 2013-03-21 Richard Biener <rguenther@suse.de>
4089 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4090 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4092 2013-02-12 Marek Polacek <polacek@redhat.com>
4095 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4098 2013-01-24 Jakub Jelinek <jakub@redhat.com>
4101 * c-typeck.c (set_nonincremental_init_from_string): If
4102 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4104 (process_init_element): Likewise.
4106 2012-12-20 Jakub Jelinek <jakub@redhat.com>
4109 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4110 argument, don't call default_function_array_conversion
4111 nor c_fully_fold here.
4112 (c_parser_asm_statement): Adjust callers.
4113 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4114 and outputs here, and call default_function_array_conversion
4115 on inputs that don't need to be addressable.
4117 2012-12-18 Jakub Jelinek <jakub@redhat.com>
4120 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4121 warning require that both c_common_unsigned_type as well as
4122 c_common_signed_type is the same for both mvl and mvr types.
4124 2012-11-16 Diego Novillo <dnovillo@google.com>
4126 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4128 * c-common.c: Use new vec API in vec.h.
4129 * c-common.h: Likewise.
4130 * c-gimplify.c: Likewise.
4131 * c-pragma.c: Likewise.
4132 * c-pretty-print.c: Likewise.
4133 * c-pretty-print.h: Likewise.
4134 * c-semantics.c: Likewise.
4135 * c-decl.c: Likewise.
4136 * c-parser.c: Likewise.
4137 * c-tree.h: Likewise.
4138 * c-typeck.c: Likewise.
4140 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4143 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4145 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4148 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4149 shadows a function, unless the variable is a function or a
4150 pointer-to-function.
4152 2012-10-12 Jakub Jelinek <jakub@redhat.com>
4155 * c-parser.c (struct c_tree_loc_pair): Removed.
4156 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4157 add location_t * and tree * arguments, fill in array of 3
4158 sizeof_arg trees and corresponding locs.
4159 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4160 c_parser_expr_list callers.
4161 (c_parser_postfix_expression_after_primary): Likewise. Pass
4162 array of 3 sizeof_arg trees and locs (corresponding to first
4163 3 arguments) to sizeof_pointer_memaccess_warning.
4165 2012-10-09 Lawrence Crowl <crowl@google.com>
4167 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4168 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4171 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4174 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4177 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
4180 * c-typeck.c: Include c-common.h.
4181 (enum stv_conv): Moved to c-common.h.
4182 (scalar_to_vector): Moved to c-common.c.
4183 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4184 * Make-lang.in: c-typeck.c depends on c-common.h.
4186 2012-10-04 Arnaud Charlet <charlet@adacore.com>
4188 * c-decl.c (c_write_global_declarations): Fix handling of
4191 2012-09-30 Sharad Singhai <singhai@google.com>
4193 * c-decl.c (c_write_global_declarations): Use a different method
4194 to determine if the dump has ben initialized.
4196 2012-09-14 Joseph Myers <joseph@codesourcery.com>
4199 * c-typeck.c (c_cast_expr): When casting to a type requiring
4200 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4203 2012-09-14 Joseph Myers <joseph@codesourcery.com>
4206 * c-typeck.c (build_unary_op): Pass original argument of
4207 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4208 any C_MAYBE_CONST_EXPR, if it has integer operands.
4209 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4210 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4211 to c_objc_common_truthvalue_conversion, then remove any
4212 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4213 c_objc_common_truthvalue_conversion not
4214 c_common_truthvalue_conversion.
4215 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4216 call note_integer_operands for arguments with integer operands
4217 that are not integer constants.
4219 2012-09-13 Jakub Jelinek <jakub@redhat.com>
4222 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4223 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4225 2012-08-31 Jakub Jelinek <jakub@redhat.com>
4228 * c-convert.c (convert): Don't call fold_convert_loc if
4229 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4230 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4231 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4233 2012-08-24 Jakub Jelinek <jakub@redhat.com>
4236 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4237 for nested and empty_ok arguments in the call to
4238 c_parser_declaration_or_fndef.
4240 2012-08-17 Jakub Jelinek <jakub@redhat.com>
4242 * c-tree.h (c_last_sizeof_arg): Declare.
4243 * c-parser.c (struct c_tree_loc_pair): New type.
4244 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4246 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4247 (c_parser_postfix_expression_after_primary): Likewise. Call
4248 sizeof_pointer_memaccess_warning if needed.
4249 (sizeof_ptr_memacc_comptypes): New function.
4250 * c-typeck.c (c_last_sizeof_arg): New global variable.
4251 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4253 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
4255 * c-lang.h (lang_decl): Add variable_size GTY option.
4257 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4259 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4260 * Make-lang.in: Fix dependencies.
4262 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4264 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4265 and add language Makefile hooks.
4266 * config-lang.in: New file.
4267 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4268 add the required "normal" config-lang.in rules.
4269 * c-lang.h: Moved from gcc/ to here.
4270 * c-tree.h: Likewise.
4271 * c-objc-common.c: Likewise.
4272 * c-objc-common.h: Likewise.
4273 * c-typeck.c: Likewise.
4274 * c-convert.c: Likewise.
4275 * c-lang.c: Likewise.
4276 * c-aux-info.c: Likewise.
4277 * c-errors.c: Likewise.
4278 * gccspec.c: Likewise.
4279 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4280 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4282 Copyright (C) 2012-2017 Free Software Foundation, Inc.
4284 Copying and distribution of this file, with or without modification,
4285 are permitted in any medium without royalty provided the copyright
4286 notice and this notice are preserved.