1 2015-12-04 Release Manager
5 2015-10-05 Marek Polacek <polacek@redhat.com>
8 2015-10-02 Marek Polacek <polacek@redhat.com>
11 * c-typeck.c (convert_for_assignment): Use the expansion point
14 2015-09-30 Marek Polacek <polacek@redhat.com>
16 Backport from mainline
17 2015-09-30 Marek Polacek <polacek@redhat.com>
20 * c-typeck.c (c_finish_return): Use the expansion point location for
21 certain "return with value" warnings.
23 2015-09-10 Jakub Jelinek <jakub@redhat.com>
26 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
27 into OMP_FOR_PRE_BODY rather than before the loop.
29 2015-09-09 Jakub Jelinek <jakub@redhat.com>
32 * c-parser.c (c_parser_oacc_all_clauses,
33 c_parser_omp_all_clauses): Remove invalid clause from
34 list of clauses even if parser->error is set.
37 * c-parser.c (c_parser_omp_clause_aligned,
38 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
40 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
44 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
45 instead of c_parser_unary_expression. If the result is !lvalue_p,
46 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
48 2015-07-16 Release Manager
52 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
54 * c-decl.c (pop_scope): Register the main translation unit
55 through the new debug hook.
57 2015-05-22 Jakub Jelinek <jakub@redhat.com>
59 Backported from mainline
60 2015-05-19 Jakub Jelinek <jakub@redhat.com>
63 * c-parser.c (c_parser_omp_for_loop): Don't add
64 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
65 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
66 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
69 2015-04-22 Release Manager
73 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
75 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
76 (c_parser_omp_target_update): Add missed %> to error_at ().
78 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
81 * c-decl.c (c_default_pointer_mode): Remove definition.
82 * c-tree.h (c_default_pointer_mode): Remove declaration.
84 2015-03-27 Tobias Burnus <burnus@net-b.de>
87 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
89 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
90 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
91 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
93 2015-03-19 Jakub Jelinek <jakub@redhat.com>
95 * c-decl.c (c_decl_attributes): Also add "omp declare target"
96 attribute for DECL_EXTERNAL VAR_DECLs.
98 2015-03-11 Jakub Jelinek <jakub@redhat.com>
100 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
103 2015-03-10 Jakub Jelinek <jakub@redhat.com>
106 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
107 before preparing arguments to warn_logical_not_parentheses.
109 2015-03-09 Jakub Jelinek <jakub@redhat.com>
112 * c-typeck.c (parser_build_binary_op): Don't warn for
113 !!x == y or !b == y where b is _Bool.
115 2015-03-09 Marek Polacek <polacek@redhat.com>
117 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
118 * c-decl.c (grokdeclarator): Likewise.
119 * c-typeck.c (build_binary_op): Likewise.
121 2015-02-27 Marek Polacek <polacek@redhat.com>
124 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
126 2015-02-14 Marek Polacek <polacek@redhat.com>
129 * c-decl.c (grokdeclarator): Set the range of a flexible array member
130 declared through a typedef name.
132 2015-02-13 Marek Polacek <polacek@redhat.com>
135 * c-decl.c (grokdeclarator): Print also the type when giving
136 the error message about array's incomplete element type.
138 2015-02-11 Jakub Jelinek <jakub@redhat.com>
141 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
142 check in the POP macro.
144 2015-02-09 Marek Polacek <polacek@redhat.com>
147 * c-typeck.c (process_init_element): Don't always wrap
148 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
149 initializing a range of elements.
151 2015-02-04 Jakub Jelinek <jakub@redhat.com>
155 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
157 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
159 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
160 processing enum declaration.
162 2015-01-29 Marek Polacek <polacek@redhat.com>
165 * c-typeck.c (pop_init_level): If constructor_elements has
166 exactly one element with integer_zerop value, set constructor_zeroinit
167 to 1. Remove braces around warning_init call.
169 2015-01-27 Jakub Jelinek <jakub@redhat.com>
172 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
173 of FUNCTION_DECLs with error_mark_node.
175 2015-01-26 Jakub Jelinek <jakub@redhat.com>
178 * c-typeck.c (convert_arguments): Return -1 if there are
179 error_args, even if we've diagnosed too many arguments.
181 2015-01-21 Richard Biener <rguenther@suse.de>
184 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
185 for builtins the user declared correctly.
187 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
188 Bernd Schmidt <bernds@codesourcery.com>
189 Cesar Philippidis <cesar@codesourcery.com>
190 James Norris <jnorris@codesourcery.com>
191 Jakub Jelinek <jakub@redhat.com>
192 Ilmir Usmanov <i.usmanov@samsung.com>
194 * c-parser.c: Include "gomp-constants.h".
195 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
196 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
197 Use OMP_CLAUSE_SET_MAP_KIND.
198 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
199 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
200 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
201 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
202 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
203 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
204 "copyout", "create", "delete", "deviceptr", "gang", "host",
205 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
206 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
207 "present_or_create", "pcreate", "seq", "self", "vector",
208 "vector_length", "wait", "worker".
209 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
210 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
211 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
212 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
213 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
214 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
215 (c_parser_oacc_data_clause_deviceptr)
216 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
217 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
218 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
219 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
220 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
221 (c_parser_oacc_parallel, c_parser_oacc_update)
222 (c_parser_oacc_wait): New functions.
223 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
224 (c_finish_oacc_data): New prototypes.
225 * c-typeck.c: Include "gomp-constants.h".
226 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
227 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
228 OMP_CLAUSE_SET_MAP_KIND.
229 (c_finish_oacc_parallel, c_finish_oacc_kernels)
230 (c_finish_oacc_data): New functions.
231 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
232 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
233 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
234 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
235 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
236 GOMP_MAP_FORCE_DEVICEPTR.
238 2015-01-09 Michael Collison <michael.collison@linaro.org>
240 * c-array-notation.c: Include hash-set.h, machmode.h,
241 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
242 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
243 * c-aux-info.c: Ditto.
244 * c-convert.c: Ditto.
248 * c-objc-common.c: Ditto.
250 * c-typeck.c: Include hash-set.h, machmode.h,
251 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
252 fold-const.h, wide-int.h, inchash.h, real.h and
253 fixed-value.h due to flattening of tree.h.
255 2015-01-07 Marek Polacek <polacek@redhat.com>
258 * c-typeck.c (process_init_element): Disallow initialization of
259 a flexible array member with a string constant if the structure
262 2015-01-05 Jakub Jelinek <jakub@redhat.com>
265 * c-typeck.c (convert_for_assignment, c_finish_return): For
266 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
267 types also set in_late_binary_op around convert call.
268 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
269 to integral type casts, if not in_late_binary_op, pass c_fully_fold
270 result on expr as last argument to ubsan_instrument_float_cast,
271 if in_late_binary_op, don't use c_save_expr but save_expr.
273 Update copyright years.
275 2015-01-05 Marek Polacek <polacek@redhat.com>
278 * c-typeck.c (build_array_ref): Pass loc down to
279 warn_array_subscript_with_type_char.
281 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
283 * c-typeck.c: New behavious for pointers to arrays with qualifiers
284 (common-pointer-type): For pointers to arrays take qualifiers from
286 (build_conditional_expr): Add warnings for lost qualifiers.
287 (comp-target-types): Allow pointers to arrays with different qualifiers.
288 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
289 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
290 to PEDWARN_FOR_QUALIFIERS.
292 2014-12-17 Jakub Jelinek <jakub@redhat.com>
295 * c-convert.c: Include ubsan.h.
296 (convert): For real -> integral casts and
297 -fsanitize=float-cast-overflow don't call convert_to_integer, but
298 instead instrument the float cast directly.
300 2014-11-29 Jakub Jelinek <jakub@redhat.com>
302 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
303 c_finish_stmt_expr): Remove NULL last argument from
304 create_tmp_var_raw and create_tmp_var calls.
305 * c-array-notation.c (fix_builtin_array_notation_fn,
306 build_array_notation_expr, fix_conditional_array_notations_1,
307 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
309 2014-11-28 Marek Polacek <polacek@redhat.com>
312 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
313 convert the right operand to integer type.
315 2014-11-25 Marek Polacek <polacek@redhat.com>
318 * c-decl.c (start_function): Disable -Wmissing-declarations warning
319 for inline functions.
321 2014-11-21 Jakub Jelinek <jakub@redhat.com>
324 * c-typeck.c (build_array_ref): Adjust
325 convert_vector_to_pointer_for_subscript caller. If it returns true,
326 call non_lvalue_loc on the result.
328 2014-11-11 Richard Biener <rguenther@suse.de>
330 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
333 2014-11-10 Andi Kleen <ak@linux.intel.com>
336 * c-parser.c (c_parser_statement_after_labels): Call
338 (c_parser_if_statement): Dito.
339 (c_parser_switch_statement): Dito.
340 (c_parser_while_statement): Dito.
341 (c_parser_do_statement): Dito.
342 (c_parser_for_statement): Dito.
343 * c-typeck.c (c_finish_loop): Dito.
345 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
347 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
348 OPT_Wshift_count_overflow in the warnings.
350 2014-10-30 Marek Polacek <polacek@redhat.com>
352 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
353 print the stripped version as well, if they're not the same.
355 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
357 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
360 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
362 * c-decl.c: Adjust include files.
365 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
366 Tom Tromey <tromey@redhat.com>
368 * c-tree.h (enum c_oracle_request): New.
369 (c_binding_oracle_function): New typedef.
370 (c_binding_oracle, c_pushtag, c_bind): Declare.
371 * c-decl.c (c_binding_oracle): New global.
372 (I_SYMBOL_CHECKED): New macro.
373 (i_symbol_binding): New function.
374 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
375 (I_TAG_CHECKED): New macro.
376 (i_tag_binding): New function.
377 (I_TAG_BINDING, I_TAG_DECL): Redefine.
378 (I_LABEL_CHECKED): New macro.
379 (i_label_binding): New function.
380 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
381 (c_print_identifier): Save and restore c_binding_oracle.
382 (c_pushtag, c_bind): New functions.
384 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
386 * c-typeck.c: Adjust include files.
388 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
391 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
392 initialization here...
393 (c_initialize_diagnostics): ... but here. Set defaults after
394 building pretty-printer.
396 2014-10-23 Marek Polacek <polacek@redhat.com>
399 * c-decl.c (pop_scope): Don't print warning in external_scope.
401 2014-10-19 Marek Polacek <polacek@redhat.com>
404 * c-typeck.c (output_init_element): Allow initializing objects with
405 static storage duration with compound literals even in C99 and add
408 2014-10-17 Marek Polacek <polacek@redhat.com>
411 * c-typeck.c (digest_init): Allow initializing objects with static
412 storage duration with compound literals even in C99 and add pedwarn
415 2014-10-17 Marek Polacek <polacek@redhat.com>
418 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
419 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
420 error multiple times. Print the type.
422 2014-10-17 Marek Polacek <polacek@redhat.com>
425 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
428 2014-10-17 Marek Polacek <polacek@redhat.com>
430 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
431 (start_function): Use OPT_Wimplicit_int instead of 0.
432 (store_parm_decls_oldstyle): Likewise.
434 2014-10-17 Alan Modra <amodra@gmail.com>
437 * c-decl.c (merge_decls): Don't merge section name or tls model
438 to newdecl symtab node, instead merge to olddecl. Override
439 existing olddecl section name. Set tls_model for all thread-local
440 vars, not just OMP thread-private ones. Remove incorrect comment.
442 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
444 * c-decl.c: Adjust include files.
446 2014-10-14 DJ Delorie <dj@redhat.com>
448 * c-parser.c (c_parse_init): Add RID entries for each __intN.
449 (c_token_starts_typename): Check all __intN, not just __int128.
450 (c_token_starts_declspecs): Likewise.
451 (c_parser_declspecs): Likewise.
452 (c_parser_attribute_any_word): Likewise.
453 (c_parser_objc_selector): Likewise.
454 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
455 (struct c_declspecs): Add int_n_idx field to record *which* __intN
457 * c-decl.c (declspecs_add_type): Check for all __intN, not just
459 (finish_declspecs): Likewise.
461 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
463 * c-parser.c (c_parser_all_labels): New function to replace
465 (c_parser_statement): Call the new function.
467 2014-10-09 Marek Polacek <polacek@redhat.com>
470 * c-typeck.c (pop_init_level): Don't warn about initializing
473 2014-10-07 Marek Polacek <polacek@redhat.com>
476 * c-decl.c (header_for_builtin_fn): New function.
477 (implicitly_declare): Suggest which header to include.
479 2014-10-07 Marek Polacek <polacek@redhat.com>
481 * c-convert.c (convert): Use error_operand_p.
482 * c-typeck.c (require_complete_type): Likewise.
483 (really_atomic_lvalue): Likewise.
484 (digest_init): Likewise.
485 (handle_omp_array_sections_1): Likewise.
487 2014-10-03 Marek Polacek <polacek@redhat.com>
490 * c-decl.c (pop_scope): Don't warn about "inline function declared
491 but never defined" for functions marked with gnu_inline attribute.
493 2014-09-25 Jakub Jelinek <jakub@redhat.com>
496 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
497 on low_bound and length.
499 2014-09-24 Marek Polacek <polacek@redhat.com>
503 * c-parser.c: Don't define CPP_KEYWORD.
504 (c_parser_switch_statement): Pass original type to c_finish_case.
505 * c-tree.h (c_finish_case): Update declaration.
506 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
507 conditionally to c_do_switch_warnings.
509 2014-09-03 Marek Polacek <polacek@redhat.com>
512 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
515 2014-09-02 Jakub Jelinek <jakub@redhat.com>
516 Balaji V. Iyer <balaji.v.iyer@intel.com>
517 Igor Zamyatin <igor.zamyatin@intel.com>
519 * c-parser.c (c_parser_cilk_for): New function.
520 (c_parser_cilk_grainsize): Likewise.
521 (c_get_temp_regvar): Likewise.
522 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
523 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
524 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
525 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
528 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
530 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
531 with using HOST_WIDE_INT without truncation to 'int'
533 2014-08-22 Marek Polacek <polacek@redhat.com>
536 * c-typeck.c (parser_build_binary_op): Adjust call to
537 warn_logical_not_parentheses.
539 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
542 * c-parser.c (c_parser_array_notation): Check for correct
543 type of an array added.
545 2014-08-19 Marek Polacek <polacek@redhat.com>
548 * c-typeck.c (build_binary_op): If either operand of a comparison
549 is a boolean expression, call maybe_warn_bool_compare.
551 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
554 * c-typeck.c (build_c_cast): Do a conversion even when the
555 TYPE_MAIN_VARIANTs are the same.
557 2014-08-19 Marek Polacek <polacek@redhat.com>
559 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
560 pedwarn_c99 instead of pedwarn.
561 (grokfield): Likewise.
562 (warn_defaults_to): New function.
563 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
564 Unconditionally call pedwarn_c99 instead of pedwarn.
565 (start_function): Call warn_defaults_to instead of pedwarn_c99.
566 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
567 check flag_isoc11 before.
568 * c-errors.c (pedwarn_c99): Change the return type to bool.
569 Handle -Wc99-c11-compat.
570 * c-parser.c (disable_extension_diagnostics): Handle
572 (restore_extension_diagnostics): Likewise.
573 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
574 instead of pedwarn, don't check flag_isoc11 before.
575 (c_parser_declspecs): Likewise.
576 (c_parser_alignas_specifier): Likewise.
577 (c_parser_alignof_expression): Likewise.
578 (c_parser_generic_selection): Likewise.
579 * c-tree.h (pedwarn_c99): Update declaration.
580 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
583 2014-08-19 Marek Polacek <polacek@redhat.com>
585 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
587 * c-errors.c: Include "opts.h".
588 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
589 * c-parser.c (disable_extension_diagnostics): Handle negative value
590 of warn_c90_c99_compat, too.
591 (restore_extension_diagnostics): Likewise.
592 (c_parser_compound_statement_nostart): Pass
593 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
595 2014-08-12 Marek Polacek <polacek@redhat.com>
597 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
599 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
601 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
603 2014-08-10 Marek Polacek <polacek@redhat.com>
606 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
607 Call pedwarn_c90 instead of pedwarn.
608 (check_bitfield_type_and_width): Likewise.
609 (declspecs_add_qual): Likewise.
610 (declspecs_add_type): Likewise.
611 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
612 Adjust to only call pedwarn_c90.
613 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
614 pedwarn_c90 instead of pedwarn.
615 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
616 * c-parser.c (disable_extension_diagnostics): Handle
618 (restore_extension_diagnostics): Likewise.
619 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
620 pedwarn_c90 instead of pedwarn.
621 (c_parser_initelt): Likewise.
622 (c_parser_postfix_expression): Likewise.
623 (c_parser_postfix_expression_after_paren_type): Likewise.
624 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
625 * c-tree.h: Fix formatting.
626 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
627 pedwarn_c90 instead of pedwarn.
629 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
631 * c-typeck.c: Remove include of pointer-set.h.
633 2014-08-07 Marek Polacek <polacek@redhat.com>
635 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
637 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
639 * c-typeck.c: Use hash_map instead of pointer_map.
641 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
643 * c-decl.c: Use hash_set instead of pointer_set.
645 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
648 * c-array-notation.c (expand_array_notations): Handling
651 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
654 * c-typeck.c (c_finish_return): Return 0 instead of the address of
657 2014-07-30 Tom Tromey <tromey@redhat.com>
659 * c-typeck.c (struct constructor_stack) <designator_depth>: New
661 (really_start_incremental_init, push_init_level): Initialize
663 (pop_init_level): Set global designator_depth.
664 (process_init_element): Check for designated_init attribute.
666 2014-07-20 Marek Polacek <polacek@redhat.com>
669 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
670 (implicitly_declare): Pass location to implicit_decl_warning.
672 2014-07-14 Jakub Jelinek <jakub@redhat.com>
675 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
676 If non-NULL, call c_parser_check_literal_zero.
677 (c_parser_check_literal_zero): New function.
678 (c_parser_postfix_expression_after_primary): Adjust
679 c_parser_expr_list caller, handle -Wmemset-transposed-args.
681 2014-07-06 Marek Polacek <polacek@redhat.com>
684 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
685 * c-tree.h (C_ARRAY_PARAMETER): Define.
686 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
689 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
690 Chen Gang <gang.chen.5i5j@gmail.com>
692 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
695 2014-07-01 Marek Polacek <polacek@redhat.com>
697 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
698 instead of 0 to WARN_FOR_ASSIGNMENT.
700 2014-07-01 Marek Polacek <polacek@redhat.com>
703 * c-typeck.c (convert_for_assignment): Pass
704 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
706 2014-06-30 Marek Polacek <polacek@redhat.com>
708 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
709 has no_sanitize_undefined attribute.
711 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
714 * c-array-notation.c (fix_builtin_array_notation_fn):
715 Check for 0 arguments in builtin call. Check that bultin argument is
717 * c-parser.c (c_parser_array_notation): Check for incorrect initial
720 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
722 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
723 qualifiers in __auto_type for atomic types.
724 (c_parser_typeof_specifier): Discard all type qualifiers in
725 __typeof__ for atomic types.
727 2014-06-25 Marek Polacek <polacek@redhat.com>
730 * c-parser.c (c_parser_statement_after_labels): Pass the location of
731 the return expression to c_finish_return.
733 2014-06-25 Jakub Jelinek <jakub@redhat.com>
735 * c-typeck.c (c_finish_omp_clauses): Make sure
736 OMP_CLAUSE_LINEAR_STEP has correct type.
738 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
742 2014-06-24 Jakub Jelinek <jakub@redhat.com>
744 * c-parser.c (c_parser_omp_for_loop): For
745 #pragma omp parallel for simd move lastprivate clause from parallel
746 to for rather than simd.
748 2014-06-23 Marek Polacek <polacek@redhat.com>
750 * c-typeck.c (parser_build_binary_op): Don't call
751 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
753 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
755 * c-parser.c (c_parser_omp_threadprivate): Likewise.
756 * c-decl.c (merge_decls): Likewise.
758 2014-06-09 Marek Polacek <polacek@redhat.com>
761 * c-typeck.c (error_init): Call inform instead of error_at.
762 (pedwarn_init): Call inform instead of pedwarn.
763 (warning_init): Call inform instead of warning_at.
765 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
767 * c-decl.c (merge_decls): Use set_decl_section_name.
768 (duplicate_decls): Remove node if it exists.
770 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
773 * c-typeck.c (push_init_level, process_init_element,
774 pop_init_level): Correct check for zero initialization, move
775 missing brace warning to respect zero initialization.
777 2014-06-05 Marek Polacek <polacek@redhat.com>
780 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
782 2014-06-05 Marek Polacek <polacek@redhat.com>
785 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
786 on the left hand side operand of a comparison.
788 2014-06-05 Marek Polacek <polacek@redhat.com>
791 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
792 Print note only if the warning was printed.
794 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
797 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
800 2014-06-03 Marek Polacek <polacek@redhat.com>
803 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
805 * c-tree.h (c_start_case): Update.
806 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
807 switch condition has boolean value.
809 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
811 * c-decl.c: Include builtins.h.
812 * c-parser.c: Likewise.
814 2014-05-27 Marek Polacek <polacek@redhat.com>
817 * c-typeck.c (convert_arguments): Get location of a parameter. Change
818 error and warning calls to error_at and warning_at. Pass location of
819 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
820 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
821 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
823 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
826 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
829 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
831 * c-decl.c (merge_decls): Preserve symtab node pointers.
832 (duplicate_decls): Free new decl.
834 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
836 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
839 * c-parser.c (c_parser_omp_target): Return bool values.
841 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
843 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
844 num_teams_loc variable to num_thread_limit_loc.
846 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
848 * c-array-notation.c (expand_array_notations): Use void_node
849 instead of void_zero_node.
851 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
853 * c-decl.c (finish_struct): Adjust.
854 (finish_enum): Likewise.
856 (record_inline_static): Likewise.
857 (push_scope): Likewise.
858 (make_label): Likewise.
859 (lookup_label_for_goto): Likewise.
860 (finish_struct): Likewise.
861 (finish_enum): Likewise.
862 (store_parm_decls): Likewise.
863 (c_push_function_context): Likewise.
864 * c-lang.h: Remove usage of variable_size gty attribute.
865 * c-parser.c (c_parse_init): Adjust.
866 (c_parse_file): Likewise.
868 2014-05-13 Marek Polacek <polacek@redhat.com>
871 * c-typeck.c (convert_for_assignment): Pass location to
872 WARN_FOR_ASSIGNMENT instead of input_location.
874 2014-05-10 Marek Polacek <polacek@redhat.com>
876 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
877 maybe_warn_string_init.
878 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
879 maybe_warn_string_init.
880 * c-tree.h (maybe_warn_string_init): Update declaration.
881 * c-typeck.c (maybe_warn_string_init): Add location parameter.
882 Call pedwarn_init with loc instead of with input_location.
883 (digest_init): Pass init_loc to maybe_warn_string_init.
884 (pop_init_level): Call pedwarn_init with loc instead of with
886 (set_init_index): Likewise.
887 (process_init_element): Likewise.
889 2014-05-09 Marek Polacek <polacek@redhat.com>
892 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
893 (c_parser_initelt): Pass location to set_init_label. Pass array index
894 location to set_init_index.
895 * c-tree.h (push_init_level): Update declaration.
896 (pop_init_level): Likewise.
897 (set_init_index): Likewise.
898 (set_init_label): Likewise.
899 * c-typeck.c (error_init): Add location parameter. Call error_at
901 (digest_init): Pass init_loc to error_init.
902 (really_start_incremental_init):
903 (push_init_level): Add location parameter. Pass loc to pop_init_level
905 (pop_init_level): Likewise.
906 (set_designator): Add location parameter. Pass loc to pop_init_level,
907 push_init_level, and error_init.
908 (set_init_index): Add location parameter. Pass loc to error_init and
910 (set_init_label): Likewise.
911 (output_init_element): Pass loc to error_init.
912 (process_init_element): Pass loc to error_init, pop_init_level,
913 pedwarn_init, and push_init_level.
915 2014-05-09 Marek Polacek <polacek@redhat.com>
918 * c-parser.c (c_parser_attributes): Parse the arguments as an
919 expression-list if the attribute takes identifier.
921 2014-05-08 Marek Polacek <polacek@redhat.com>
924 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
927 2014-05-08 Marek Polacek <polacek@redhat.com>
930 * c-decl.c (start_function): Warn for _Atomic-qualified return type
933 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
934 Mike Stump <mikestump@comcast.net>
935 Richard Sandiford <rdsandiford@googlemail.com>
937 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
938 (finish_enum): Use wide-int interfaces.
939 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
940 * c-typeck.c (build_c_cast): Likewise.
941 (set_nonincremental_init_from_string): Likewise.
942 (c_tree_equal): Likewise.
944 2014-05-02 Marek Polacek <polacek@redhat.com>
947 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
948 Return size_one_node when the type is not complete.
949 (pointer_diff): Remove comment.
950 (build_unary_op): Improve error messages.
952 2014-05-02 Marek Polacek <polacek@redhat.com>
954 * c-typeck.c (c_finish_return): Separate warning_at calls.
956 2014-05-02 Marek Polacek <polacek@redhat.com>
958 * c-tree.h (error_init): Remove declaration.
959 (pedwarn_init): Likewise.
960 * c-typeck.c (error_init): Make static and move above.
961 (pedwarn_init): Likewise.
962 (warning_init): Move above.
963 (maybe_warn_string_init): Likewise.
965 2014-05-01 Jeff Law <law@redhat.com>
969 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
970 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
973 2014-05-02 Marek Polacek <polacek@redhat.com>
976 * c-typeck.c (push_init_level): Set constructor_designated to
977 p->designated for structures.
979 2014-05-01 Marek Polacek <polacek@redhat.com>
982 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
983 function-definition has an attribute after the declarator.
985 2014-05-01 Marek Polacek <polacek@redhat.com>
988 * c-typeck.c (warning_init): Add location_t parameter. Call
989 warning_at instead of warning.
990 (push_init_level): Pass input_location to warning_init.
991 (add_pending_init): Add location_t parameter. Pass loc to
993 (set_nonincremental_init): Pass input_location to add_pending_init.
994 (set_nonincremental_init_from_string): Likewise.
995 (output_init_element): Pass loc to warning_init and to
998 2014-05-01 Marek Polacek <polacek@redhat.com>
1001 * c-typeck.c (c_finish_return): Distinguish between label and variable
1002 when warning about returning local address.
1004 2014-05-01 Marek Polacek <polacek@redhat.com>
1007 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1010 2014-05-01 Marek Polacek <polacek@redhat.com>
1013 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1014 instead of 0 to WARN_FOR_QUALIFIERS.
1016 2014-05-01 Marek Polacek <polacek@redhat.com>
1019 * c-typeck.c (default_conversion): Use better location for
1022 2014-04-30 Marek Polacek <polacek@redhat.com>
1024 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1025 also when SANITIZE_FLOAT_DIVIDE is on.
1027 2014-04-30 Marek Polacek <polacek@redhat.com>
1030 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1031 and pedwarn_init. Use loc insted of input_location.
1033 2014-04-30 Marek Polacek <polacek@redhat.com>
1036 * c-typeck.c (build_binary_op): Use location when warning about
1039 2014-04-25 Marek Polacek <polacek@redhat.com>
1042 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1043 always_inline/noinline and hot/cold attributes.
1045 2014-04-25 Marek Polacek <polacek@redhat.com>
1048 * c-parser.c (c_parser_initelt): Pass input_location to
1049 process_init_element.
1050 (c_parser_initval): Pass loc to process_init_element.
1051 * c-tree.h (process_init_element): Adjust declaration.
1052 * c-typeck.c (push_init_level): Pass input_location to
1053 process_init_element.
1054 (pop_init_level): Likewise.
1055 (set_designator): Likewise.
1056 (output_init_element): Add location_t parameter. Pass loc to
1058 (output_pending_init_elements): Pass input_location to
1059 output_init_element.
1060 (process_init_element): Add location_t parameter. Pass loc to
1061 output_init_element.
1063 2014-04-24 Jakub Jelinek <jakub@redhat.com>
1065 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1066 atomic-clause, allow comma in between atomic-clause and
1069 2014-04-22 Jakub Jelinek <jakub@redhat.com>
1072 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1073 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1075 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1078 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1079 create_tmp_var instead build_decl for creating temps.
1080 (build_array_notation_expr): Likewise.
1081 (fix_conditional_array_notations_1): Likewise.
1082 (fix_array_notation_expr): Likewise.
1083 (fix_array_notation_call_expr): Likewise.
1085 2014-03-28 Jakub Jelinek <jakub@redhat.com>
1088 * c-tree.h (c_build_function_call_vec): New prototype.
1089 * c-typeck.c (build_function_call_vec): Don't call
1090 resolve_overloaded_builtin here.
1091 (c_build_function_call_vec): New wrapper function around
1092 build_function_call_vec. Call resolve_overloaded_builtin here.
1093 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1094 Call c_build_function_call_vec instead of build_function_call_vec.
1095 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1096 * c-decl.c (finish_decl): Likewise.
1098 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1101 * c-typeck.c: Use correct format string in cast-qual warning
1103 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1105 * c-decl.c (c_decl_attributes): Use
1106 lang_hooks.types.omp_mappable_type.
1107 * c-typeck.c (c_finish_omp_clauses): Likewise.
1109 2014-03-06 Marek Polacek <polacek@redhat.com>
1112 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1113 of checking tree code.
1115 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1117 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1118 (c_parser_parameter_declaration): Likewise.
1120 2014-02-19 Marek Polacek <polacek@redhat.com>
1123 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1124 Call mark_exp_read on exp.value.
1125 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1126 TREE_ADDRESSABLE on old instead of val.
1127 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1129 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1131 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1132 C_EXPR_APPEND by vec_safe_push.
1133 * c-tree.h (C_EXPR_APPEND): Remove.
1135 2014-01-31 Marek Polacek <polacek@redhat.com>
1138 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1139 build_function_call_vec.
1140 (build_function_call): Likewise.
1141 (build_atomic_assign): Likewise.
1142 (build_function_call_vec): Add arg_loc parameter. Use it.
1143 (convert_arguments): Likewise.
1144 (convert_for_assignment): Rename rhs_loc to expr_loc.
1145 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1146 (c_parser_objc_keywordexpr): Likewise.
1147 (c_parser_postfix_expression_after_primary): Call
1148 build_function_call_vec with expr_loc rather than op_loc.
1149 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1150 build_function_call_vec.
1151 (c_parser_expr_list): Add locations parameter. Fill it with locations
1152 of function arguments.
1153 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1155 2014-01-30 Marek Polacek <polacek@redhat.com>
1158 * c-typeck.c (build_function_call_vec): Use loc parameter.
1159 (convert_arguments): Add location parameter. Use it.
1160 (ep_convert_and_check): Likewise.
1161 (build_atomic_assign): Adjust convert_for_assignment call.
1162 (build_modify_expr): Likewise.
1163 (digest_init): Likewise.
1164 (c_finish_return): Likewise.
1165 (build_conditional_expr): Adjust ep_convert_and_check calls.
1166 (convert_for_assignment): Add rhs_loc parameter. Use it.
1167 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1170 2014-01-30 Richard Biener <rguenther@suse.de>
1173 * c-typeck.c (build_function_call_vec): Do not replace calls
1174 to a function via an incompatible type with a runtime abort.
1176 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1178 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1179 flag_enable_cilkplus with flag_cilkplus.
1180 (c_parser_direct_declarator_inner): Likewise.
1181 (c_parser_attribute_any_word): Likewise.
1182 (c_parser_attributes): Likewise.
1183 (c_parser_compound_statement): Likewise.
1184 (c_parser_statement_after_labels): Likewise.
1185 (c_parser_if_statement): Likewise.
1186 (c_parser_switch_statement): Likewise.
1187 (c_parser_do_statement): Likewise.
1188 (c_parser_for_statement): Likewise.
1189 (c_parser_unary_expression): Likewise.
1190 (c_parser_postfix_expression): Likewise.
1191 (c_parser_postfix_expression_after_primary): Likewise.
1192 (c_parser_postfix_expression_after_primary): Likewise.
1193 (c_parser_omp_clause_name): Likewise.
1194 (c_finish_omp_declare_simd): Likewise.
1195 (c_parser_cilk_verify_simd): Likewise.
1196 * c-typeck.c (build_array_ref): Likewise.
1197 (build_function_call_vec): Likewise.
1198 (convert_arguments): Likewise.
1199 (build_compound_expr): Likewise.
1200 (c_finish_return): Likewise.
1201 (c_finish_if_stmt): Likewise.
1202 (c_finish_loop): Likewise.
1203 (build_binary_op): Likewise.
1205 2014-01-23 Marek Polacek <polacek@redhat.com>
1208 * c-typeck.c (parser_build_binary_op): Use location instead of
1210 (build_binary_op): Pass location to shorten_compare.
1212 2014-01-23 Marek Polacek <polacek@redhat.com>
1215 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1218 2014-01-23 Marek Polacek <polacek@redhat.com>
1221 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1222 of a comma expression.
1223 (emit_side_effect_warnings): Likewise.
1225 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1228 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1229 function to use walk_tree and moved a lot of its functionality to
1230 expand_array_notations.
1231 (expand_array_notations): New function.
1233 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1235 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1236 attribute an attribute without value.
1238 2014-01-23 Jakub Jelinek <jakub@redhat.com>
1241 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1242 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1244 2014-01-22 Marek Polacek <polacek@redhat.com>
1247 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1248 of remove_c_maybe_const_expr on op1 and op2.
1250 2014-01-15 Jakub Jelinek <jakub@redhat.com>
1253 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1254 effects, preevaluate rhs using SAVE_EXPR first.
1256 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1259 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1260 statements with if-elseif statements.
1262 2014-01-06 Marek Polacek <polacek@redhat.com>
1265 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1266 defined bit-field types only in ISO C.
1268 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1270 Update copyright years
1272 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1274 * c-array-notation.c: Use the standard form for the copyright notice.
1276 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1278 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1279 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1280 field in parser is not empty. If not-empty, call the function
1281 c_parser_finish_omp_declare_simd.
1282 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1283 between SIMD-enabled functions and #pragma simd. Added new parameter.
1284 (c_parser_cilk_all_clauses): Modified the usage of the function
1285 c_parser_cilk_clause_vectorlength as mentioned above.
1286 (c_parser_cilk_simd_fn_vector_attrs): New function.
1287 (c_finish_cilk_simd_fn_tokens): Likewise.
1288 (is_cilkplus_vector_p): Likewise.
1289 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1290 "nomask," and "mask" strings in clause name.
1291 (c_parser_omp_all_clauses): Added 3 new case statements:
1292 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1293 PRAGMA_CILK_CLAUSE_NOMASK.
1294 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1295 check for vector attribute and if so call the function
1296 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1297 called the function c_finish_cilk_simd_fn_tokens.
1298 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1299 parser field is non-empty. If so, parse them as you would parse
1300 the omp declare simd pragma.
1301 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1302 Added a check when step is a parameter and flag it as error.
1303 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1304 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1307 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1309 * c-parser.c (c_parser_omp_parallel): Fix description.
1311 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1313 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1314 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1315 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1316 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1318 2013-12-04 Joseph Myers <joseph@codesourcery.com>
1321 * c-parser.c (c_parser_alignas_specifier): Use
1322 c_sizeof_or_alignof_type instead of c_alignof.
1323 (c_parser_alignof_expression): Likewise, with min_alignof
1324 parameter depending on alignof spelling used.
1326 2013-12-04 Marek Polacek <polacek@redhat.com>
1329 * c-decl.c (start_function): Don't warn for missing prototype for
1332 2013-12-03 Marek Polacek <polacek@redhat.com>
1335 * c-decl.c (build_compound_literal): Allow compound literals with
1336 empty initial value.
1338 2013-12-02 Joseph Myers <joseph@codesourcery.com>
1341 * c-typeck.c (build_modify_expr): Diagnose assignment to
1342 expression with array type.
1344 2013-11-29 Joseph Myers <joseph@codesourcery.com>
1347 * c-typeck.c (process_init_element): Do not treat a string as
1348 initializing a whole array when used with a designator for an
1351 2013-11-29 Joseph Myers <joseph@codesourcery.com>
1354 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1355 an inline function following a static declaration.
1357 2013-11-28 Jakub Jelinek <jakub@redhat.com>
1360 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1361 to p_name before calling c_parser_omp_teams instead of after.
1362 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1363 argument. Remove unused p_name variable.
1365 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
1366 Jakub Jelinek <jakub@redhat.com>
1368 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1369 external_scope is NULL.
1371 2013-11-27 Tom de Vries <tom@codesourcery.com>
1372 Marc Glisse <marc.glisse@inria.fr>
1375 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1377 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
1379 * c-typeck.c: Add required include files from gimple.h.
1381 2013-11-22 David Malcolm <dmalcolm@redhat.com>
1383 * c-decl.c (define_label, shadow_tag_warned)
1384 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1385 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1386 (declspecs_add_type): Remove use of in_system_header macro.
1387 * c-parser.c (c_parser_unary_expression): Likewise.
1388 * c-typeck.c (store_init_value, process_init_element)
1389 (c_start_case): Likewise.
1391 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1394 * c-parser.c (c_parser_set_source_position_from_token): Remove
1395 reference to in_system_header from comment.
1397 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1399 * c-decl.c (grokdeclarator): Update comment to refer to
1400 tree_to_[su]hwi rather than tree_low_cst.
1402 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1404 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1405 tree_to_uhwi throughout.
1407 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1409 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1412 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1414 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1417 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
1419 * c-parser.c (c_parser_cilk_simd): New.
1420 (c_parser_cilk_verify_simd): New.
1421 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1422 (c_parser_omp_for_loop): Add case for NE_EXPR.
1423 Set c_break_label for CILK_SIMD.
1424 (c_parser_cilk_clause_vectorlength): New.
1425 (c_parser_cilk_clause_linear): New.
1426 (c_parser_cilk_clause_name): New.
1427 (c_parser_cilk_all_clauses): New.
1428 * c-typeck.c (build_unary_op): Pass location argument to
1430 (build_modify_expr): Same.
1431 (build_asm_expr): Same.
1432 (c_finish_bc_stmt): Error on break/continue in loops.
1434 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
1436 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1438 2013-11-14 Diego Novillo <dnovillo@google.com>
1440 * c-decl.c: Include print-tree.h.
1441 Include stor-layout.h.
1444 Include stringpool.h.
1445 * c-lang.c: Include fold-const.h.
1446 * c-parser.c: Include stringpool.h.
1448 Include stor-layout.h.
1450 Include trans-mem.h.
1451 * c-typeck.c: Include stor-layout.h.
1452 Include trans-mem.h.
1456 2013-11-13 Joseph Myers <joseph@codesourcery.com>
1458 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1459 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1461 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1462 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1464 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1465 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1466 (c_parser_declarator, c_parser_direct_declarator_inner)
1467 (c_parser_parameter_declaration, c_parser_type_name): All callers
1469 (c_parser_declaration_or_fndef): Handle declarations with type
1470 determined from the initializer.
1472 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
1474 * c-typeck.c: Include gimplify.h.
1476 2013-11-12 Joseph Myers <joseph@codesourcery.com>
1478 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1479 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1481 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1482 or _Thread_local as appropriate in diagnostics.
1483 (build_null_declspecs): Initialize ret->thread_gnu_p.
1484 (declspecs_add_scspec): Handle either __thread or _Thread_local
1485 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1486 pedantic. Do not disallow _Thread_local extern and _Thread_local
1489 2013-11-07 Joseph Myers <joseph@codesourcery.com>
1490 Andrew MacLeod <amacleod@redhat.com>
1492 * c-aux-info.c (gen_type): Handle atomic qualifier.
1493 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1494 qualifiers when compating types.
1495 (shadow_tag_warned): Handle atomic_p in declspecs.
1496 (quals_from_declspecs): Likewise.
1497 (start_decl): Use c_type_promotes_to when promoting argument
1499 (grokdeclarator): Handle _Atomic.
1500 (get_parm_info): Diagnose any qualifier on "void" as only
1502 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1503 comparing types. Use c_type_promotes_to when promoting argument
1505 (finish_function): Use c_type_promotes_to when promoting argument
1507 (build_null_declspecs): Handle atomic_p in declspecs.
1508 (declspecs_add_qual): Handle RID_ATOMIC.
1509 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1510 (c_token_starts_declspecs): Handle RID_ATOMIC.
1511 (c_parser_declspecs): Handle atomic type specifiers and
1513 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1514 from types of expressions with atomic type.
1515 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1516 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1517 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1518 (c_parser_statement_after_labels, c_parser_switch_statement)
1519 (c_parser_for_statement, c_parser_expr_no_commas)
1520 (c_parser_conditional_expression, c_parser_binary_expression)
1521 (c_parser_cast_expression, c_parser_unary_expression)
1522 (c_parser_postfix_expression)
1523 (c_parser_postfix_expression_after_primary, c_parser_expression):
1524 Use convert_lvalue_to_rvalue.
1525 (c_parser_expression_conv, c_parser_expr_list): Document
1526 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1527 (c_parser_objc_synchronized_statement): Use
1528 convert_lvalue_to_rvalue.
1529 (c_parser_objc_selector): Handle RID_ATOMIC.
1530 (c_parser_objc_receiver, c_parser_array_notation): Use
1531 convert_lvalue_to_rvalue.
1532 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1533 _Atomic (type-name).
1534 (struct c_declspecs): Add atomic_p field.
1535 (convert_lvalue_to_rvalue): Declare.
1536 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1537 corresponding atomic types.
1538 (qualify_type): Don't add _Atomic qualifiers from second argument.
1539 (comp_target_types): Do not allow _Atomic mismatches.
1540 (type_lists_compatible_p): Do not remove atomic qualifiers when
1542 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1543 (build_atomic_assign): New functions.
1544 (build_unary_op): Use build_atomic_assign for atomic increment and
1546 (build_conditional_expr): Do not treat _Atomic void as a qualified
1548 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1549 (find_anonymous_field_with_type, convert_to_anonymous_field)
1550 (convert_for_assignment): Do not remove atomic qualifiers when
1552 (digest_init): Do not accept initialization of arrays of atomic
1553 elements by string constants.
1554 (build_asm_expr): Use convert_lvalue_to_rvalue.
1555 (build_binary_op): Do not treat _Atomic void as a qualified
1558 2013-11-06 DJ Delorie <dj@redhat.com>
1560 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1561 both explicit and builtin, print the location of the explicit one.
1563 2013-11-05 Tobias Burnus <burnus@net-b.de>
1565 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1566 c_parser_omp_distribute, c_parser_omp_teams,
1567 c_parser_omp_target, c_parser_omp_declare): Handle
1570 2013-11-03 Marek Polacek <polacek@redhat.com>
1572 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1574 2013-11-01 Jakub Jelinek <jakub@redhat.com>
1576 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1577 check_dup_generic at the end, unless remove is true.
1578 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1580 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1582 2013-10-31 Jakub Jelinek <jakub@redhat.com>
1584 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1585 with decl that is not pointer nor array.
1587 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1589 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1590 a spawning function is found.
1591 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1592 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1593 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1594 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1596 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1597 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1599 (c_finish_return): Added a check to reject _Cilk_spawn in return
1601 (build_cilk_spawn): New function.
1602 (build_cilk_sync): Likewise.
1603 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1605 2013-10-27 Tobias Burnus <burnus@net-b.de>
1608 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1609 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1610 (c_parser_statement_after_labels): Update calls.
1612 2013-10-24 Tobias Burnus <burnus@net-b.de>
1615 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1616 Handle PRAGMA_IVDEP.
1617 (c_parser_statement_after_labels): Update call.
1619 2013-10-24 Marek Polacek <polacek@redhat.com>
1621 * c-parser.c (c_parser_struct_declaration): Add a comment.
1622 (c_parser_declarator): Don't allow _Alignas here.
1624 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
1626 * c-parser.c: Include omp-low.h.
1627 * c-typeck.c: Likewise.
1629 2013-10-17 Marek Polacek <polacek@redhat.com>
1632 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1633 Document syntax of the array-declarator.
1634 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1636 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1637 (c_parser_struct_declaration): Likewise.
1638 (c_parser_declarator): Likewise.
1639 (c_parser_direct_declarator_inner): Likewise.
1640 (c_parser_parameter_declaration): Likewise.
1641 (c_parser_type_name): Likewise.
1643 2013-10-11 Jakub Jelinek <jakub@redhat.com>
1645 * c-lang.h (current_omp_declare_target_attribute): New extern
1647 * c-parser.c: Include c-lang.h.
1648 (struct c_parser): Change tokens to c_token *.
1649 Add tokens_buf field. Change tokens_avail type to unsigned int.
1650 (c_parser_consume_token): If parser->tokens isn't
1651 &parser->tokens_buf[0], increment parser->tokens.
1652 (c_parser_consume_pragma): Likewise.
1653 (enum pragma_context): Add pragma_struct and pragma_param.
1654 (c_parser_external_declaration): Adjust
1655 c_parser_declaration_or_fndef caller.
1656 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1657 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1658 Adjust recursive call.
1659 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1661 (c_parser_parameter_declaration): Use pragma_param instead of
1663 (c_parser_compound_statement_nostart, c_parser_label,
1664 c_parser_for_statement): Adjust
1665 c_parser_declaration_or_fndef callers.
1666 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1667 it through to c_parser_conditional_expression.
1668 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1669 pass it through to c_parser_binary_expression. Adjust recursive
1671 (c_parser_binary_expression): Remove prec argument, add
1672 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1673 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1674 binop matches it, use build2 instead of parser_build_binary_op.
1675 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1676 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1677 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1678 Handle pragma_struct and pragma_param the same as pragma_external.
1679 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1680 (c_parser_omp_variable_list): Parse array sections for
1681 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1682 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1683 (c_parser_omp_clause_reduction): Handle user defined reductions.
1684 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1685 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1686 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1687 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1688 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1689 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1690 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1691 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1692 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1693 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1694 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1695 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1696 (c_parser_omp_for_loop): Add CODE argument, pass it through
1697 to c_finish_omp_for. Change last argument to cclauses,
1698 and adjust uses to grab parallel clauses from the array of all
1699 the split clauses. Adjust c_parser_binary_expression,
1700 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1701 (omp_split_clauses): New function.
1702 (c_parser_omp_simd): New function.
1703 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1704 Allow the function to be called also when parsing combined constructs,
1705 and call c_parser_omp_simd when parsing for simd.
1706 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1707 #pragma omp section, require exactly one structured-block instead of
1708 sequence of statements.
1709 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1710 Allow the function to be called also when parsing combined constructs.
1711 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1712 Allow the function to be called also when parsing combined
1714 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1715 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1716 c_parser_omp_teams, c_parser_omp_target_data,
1717 c_parser_omp_target_update, c_parser_omp_target,
1718 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1719 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1720 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1721 (c_parser_omp_construct): Add p_name and mask vars. Handle
1722 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1723 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1724 and c_parser_omp_sections callers.
1725 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1726 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1727 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1728 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1729 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1731 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1732 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1733 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1734 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1735 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1736 * c-typeck.c: Include tree-inline.h.
1737 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1738 handle_omp_array_sections_1, handle_omp_array_sections,
1739 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1740 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1741 user defined reductions.
1742 (c_tree_equal): New function.
1743 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1744 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1745 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1746 c_check_omp_declare_reduction_r): New prototypes.
1747 * c-decl.c (current_omp_declare_target_attribute): New variable.
1748 (c_decl_attributes): New function.
1749 (start_decl, start_function): Use it instead of decl_attributes.
1750 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1751 c_omp_reduction_decl, c_omp_reduction_lookup,
1752 c_check_omp_declare_reduction_r): New functions.
1754 2013-09-25 Tom Tromey <tromey@redhat.com>
1756 * Make-lang.in (c/gccspec.o): Remove.
1757 (CFLAGS-c/gccspec.o): New variable.
1758 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1759 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1760 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1762 2013-09-25 Tom Tromey <tromey@redhat.com>
1764 * Make-lang.in (c/gccspec.o): Don't use subshell.
1766 2013-09-18 Marek Polacek <polacek@redhat.com>
1769 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1770 Remove unnecessary check.
1772 2013-09-18 Marek Polacek <polacek@redhat.com>
1775 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1776 no_sanitize_undefined attribute.
1778 2013-09-13 Kai Tietz <ktietz@redhat.com>
1781 * c-decl.c (c_builtin_function_ext_scope): Remove
1782 wrong assumption that it is never called on prexisting
1785 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1787 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1789 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1791 * c-objc-common.c (c_tree_printer): Tidy.
1793 2013-08-30 Marek Polacek <polacek@redhat.com>
1795 * c-typeck.c (build_binary_op): Add division by zero and shift
1798 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
1799 Joseph Myers <joseph@codesourcery.com>
1802 * c-typeck.c (c_common_type): Prefer double_type_node over
1803 other REAL_TYPE types with the same precision.
1804 (convert_arguments): Likewise.
1806 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1808 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1809 (c_initialize_diagnostics): Call a destructor for the early printer.
1811 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1813 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1814 printer initialization.
1816 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
1819 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1820 check for truth values.
1821 (expand_array_notation_exprs): Added truth values case. Removed an
1822 unwanted else. Added for-loop to walk through subtrees in default
1825 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1827 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1829 2013-07-23 Joseph Myers <joseph@codesourcery.com>
1831 * c-parser.c (struct c_generic_association): Fix typo.
1833 2013-07-23 Tom Tromey <tromey@redhat.com>
1834 Joseph Myers <joseph@codesourcery.com>
1836 * c-parser.c (struct c_generic_association): New.
1837 (c_generic_association_d): New typedef.
1838 (c_parser_generic_selection): New function.
1839 (c_parser_postfix_expression): Handle RID_GENERIC.
1841 2013-07-13 Jason Merrill <jason@redhat.com>
1844 * c-decl.c (finish_struct): Check for too-large class.
1846 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
1849 * c-typeck.c (set_init_index): When folding, check for index overflow.
1851 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1853 * c-parser.c (c_parser_array_notation): Removed rejection of array
1854 notations in an array of function pointers.
1856 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1858 * c-array-notation.c (make_triplet_val_inv): New function.
1859 (create_cmp_incr): Likewise.
1860 (create_array_refs): Likewise.
1861 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1862 Also modularized common parts between functions and called the function.
1863 (build_array_notation_expr): Likewise.
1864 (fix_conditional_array_notations_1): Likewise.
1865 (fix_array_notation_expr): Likewise.
1866 (fix_array_notation_call_expr): Likewise.
1868 2013-06-18 Marek Polacek <polacek@redhat.com>
1871 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1873 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1875 * c-array-notation.c (build_array_notation_expr): Reject array notation
1876 mismatch between LHS and RHS even inside a call_expr. Also, removed
1877 a couple while statements that were dead code.
1879 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1881 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1882 excessive precision expressions in function parameters. Also removed
1883 couple unwanted while statements.
1885 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1887 * c-array-notation.c (expand_array_notation_exprs): Added
1888 ARRAY_NOTATION_REF case.
1890 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1892 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1893 function to c-family/array-notation-common.c.
1894 (is_cilkplus_reduce_builtin): Likewise.
1895 (find_rank): Likewise.
1896 (extract_array_notation_exprs): Likewise.
1897 (replace_array_notations): Likewise.
1898 (find_inv_trees): Likewise.
1899 (replace_inv_trees): Likewise.
1900 (contains_array_notation_expr): Likewise.
1901 (find_correct_array_notation_type): Likewise.
1902 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1903 (struct inv_list): Moved this to c-family/array-notation-common.c.
1904 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1906 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1908 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1909 reduction functions outside the for-loop. Added a check if the fundecl
1910 is non-NULL. Finally, removed an unwanted if-statement, and made the
1913 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1915 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1916 condition of the if-statement matches the rank of else-block and then-
1917 block when array notations are used.
1918 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1919 expression after the entire function body is parsed.
1920 (c_parser_expr_no_commas): Delayed creating array notation expressions
1921 to the end of function parsing.
1922 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1923 whole if-statement instead of just the condition.
1924 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1926 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1929 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1930 array to NULL_TREE if they are unused. Also added a check for the
1931 field to be NULL before its fields are used in future.
1933 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1936 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1937 (build_array_notation_expr): Likewise.
1939 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1941 * c-typeck.c (build_array_ref): Added a check to see if array's
1942 index is greater than one. If true, then emit an error.
1943 (build_function_call_vec): Exclude error reporting and checking
1944 for builtin array-notation functions.
1945 (convert_arguments): Likewise.
1946 (c_finish_return): Added a check for array notations as a return
1947 expression. If true, then emit an error.
1948 (c_finish_loop): Added a check for array notations in a loop
1949 condition. If true then emit an error.
1950 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1951 (build_binary_op): Added a check for array notation expr inside
1952 op1 and op0. If present, we call another function to find correct
1954 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1955 * c-parser.c (c_parser_compound_statement): Check if array
1956 notation code is used in tree, if so, then transform them into
1958 (c_parser_expr_no_commas): Check if array notation is used in LHS
1959 or RHS, if so, then build array notation expression instead of
1961 (c_parser_postfix_expression_after_primary): Added a check for
1962 colon(s) after square braces, if so then handle it like an array
1963 notation. Also, break up array notations in unary op if found.
1964 (c_parser_direct_declarator_inner): Added a check for array
1966 (c_parser_compound_statement): Added a check for array notation in
1967 a stmt. If one is present, then expand array notation expr.
1968 (c_parser_if_statement): Likewise.
1969 (c_parser_switch_statement): Added a check for array notations in
1970 a switch statement's condition. If true, then output an error.
1971 (c_parser_while_statement): Similarly, but for a while.
1972 (c_parser_do_statement): Similarly, but for a do-while.
1973 (c_parser_for_statement): Similarly, but for a for-loop.
1974 (c_parser_unary_expression): Check if array notation is used in a
1975 pre-increment or pre-decrement expression. If true, then expand
1977 (c_parser_array_notation): New function.
1978 * c-array-notation.c: New file.
1979 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1981 2013-05-23 Mike Stump <mikestump@comcast.net>
1983 * c-typeck.c (convert_for_assignment): Handle references to memory
1986 2013-05-16 Jason Merrill <jason@redhat.com>
1988 * Make-lang.in (cc1$(exeext)): Use link mutex.
1990 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1992 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1993 to simply use OPT_Wpointer_arith.
1994 (build_unary_op): Likewise.
1996 2013-04-03 Jakub Jelinek <jakub@redhat.com>
1999 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2000 argument. If set, or it temporarily for parsing of the first
2001 argument into force_folding_builtin_constant_p.
2002 (c_parser_postfix_expression): Adjust callers.
2004 2013-03-21 Richard Biener <rguenther@suse.de>
2006 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2007 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2009 2013-02-12 Marek Polacek <polacek@redhat.com>
2012 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2015 2013-01-24 Jakub Jelinek <jakub@redhat.com>
2018 * c-typeck.c (set_nonincremental_init_from_string): If
2019 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2021 (process_init_element): Likewise.
2023 2012-12-20 Jakub Jelinek <jakub@redhat.com>
2026 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2027 argument, don't call default_function_array_conversion
2028 nor c_fully_fold here.
2029 (c_parser_asm_statement): Adjust callers.
2030 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2031 and outputs here, and call default_function_array_conversion
2032 on inputs that don't need to be addressable.
2034 2012-12-18 Jakub Jelinek <jakub@redhat.com>
2037 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2038 warning require that both c_common_unsigned_type as well as
2039 c_common_signed_type is the same for both mvl and mvr types.
2041 2012-11-16 Diego Novillo <dnovillo@google.com>
2043 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2045 * c-common.c: Use new vec API in vec.h.
2046 * c-common.h: Likewise.
2047 * c-gimplify.c: Likewise.
2048 * c-pragma.c: Likewise.
2049 * c-pretty-print.c: Likewise.
2050 * c-pretty-print.h: Likewise.
2051 * c-semantics.c: Likewise.
2052 * c-decl.c: Likewise.
2053 * c-parser.c: Likewise.
2054 * c-tree.h: Likewise.
2055 * c-typeck.c: Likewise.
2057 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2060 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2062 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2065 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2066 shadows a function, unless the variable is a function or a
2067 pointer-to-function.
2069 2012-10-12 Jakub Jelinek <jakub@redhat.com>
2072 * c-parser.c (struct c_tree_loc_pair): Removed.
2073 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2074 add location_t * and tree * arguments, fill in array of 3
2075 sizeof_arg trees and corresponding locs.
2076 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2077 c_parser_expr_list callers.
2078 (c_parser_postfix_expression_after_primary): Likewise. Pass
2079 array of 3 sizeof_arg trees and locs (corresponding to first
2080 3 arguments) to sizeof_pointer_memaccess_warning.
2082 2012-10-09 Lawrence Crowl <crowl@google.com>
2084 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2085 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2088 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2091 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2094 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
2097 * c-typeck.c: Include c-common.h.
2098 (enum stv_conv): Moved to c-common.h.
2099 (scalar_to_vector): Moved to c-common.c.
2100 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2101 * Make-lang.in: c-typeck.c depends on c-common.h.
2103 2012-10-04 Arnaud Charlet <charlet@adacore.com>
2105 * c-decl.c (c_write_global_declarations): Fix handling of
2108 2012-09-30 Sharad Singhai <singhai@google.com>
2110 * c-decl.c (c_write_global_declarations): Use a different method
2111 to determine if the dump has ben initialized.
2113 2012-09-14 Joseph Myers <joseph@codesourcery.com>
2116 * c-typeck.c (c_cast_expr): When casting to a type requiring
2117 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2120 2012-09-14 Joseph Myers <joseph@codesourcery.com>
2123 * c-typeck.c (build_unary_op): Pass original argument of
2124 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2125 any C_MAYBE_CONST_EXPR, if it has integer operands.
2126 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2127 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2128 to c_objc_common_truthvalue_conversion, then remove any
2129 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2130 c_objc_common_truthvalue_conversion not
2131 c_common_truthvalue_conversion.
2132 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2133 call note_integer_operands for arguments with integer operands
2134 that are not integer constants.
2136 2012-09-13 Jakub Jelinek <jakub@redhat.com>
2139 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2140 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2142 2012-08-31 Jakub Jelinek <jakub@redhat.com>
2145 * c-convert.c (convert): Don't call fold_convert_loc if
2146 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2147 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2148 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2150 2012-08-24 Jakub Jelinek <jakub@redhat.com>
2153 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2154 for nested and empty_ok arguments in the call to
2155 c_parser_declaration_or_fndef.
2157 2012-08-17 Jakub Jelinek <jakub@redhat.com>
2159 * c-tree.h (c_last_sizeof_arg): Declare.
2160 * c-parser.c (struct c_tree_loc_pair): New type.
2161 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2163 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2164 (c_parser_postfix_expression_after_primary): Likewise. Call
2165 sizeof_pointer_memaccess_warning if needed.
2166 (sizeof_ptr_memacc_comptypes): New function.
2167 * c-typeck.c (c_last_sizeof_arg): New global variable.
2168 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2170 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
2172 * c-lang.h (lang_decl): Add variable_size GTY option.
2174 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2176 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2177 * Make-lang.in: Fix dependencies.
2179 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2181 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2182 and add language Makefile hooks.
2183 * config-lang.in: New file.
2184 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2185 add the required "normal" config-lang.in rules.
2186 * c-lang.h: Moved from gcc/ to here.
2187 * c-tree.h: Likewise.
2188 * c-objc-common.c: Likewise.
2189 * c-objc-common.h: Likewise.
2190 * c-typeck.c: Likewise.
2191 * c-convert.c: Likewise.
2192 * c-lang.c: Likewise.
2193 * c-aux-info.c: Likewise.
2194 * c-errors.c: Likewise.
2195 * gccspec.c: Likewise.
2196 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2197 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2199 Copyright (C) 2012-2015 Free Software Foundation, Inc.
2201 Copying and distribution of this file, with or without modification,
2202 are permitted in any medium without royalty provided the copyright
2203 notice and this notice are preserved.