1 2015-05-19 Jakub Jelinek <jakub@redhat.com>
4 * c-parser.c (c_parser_omp_for_loop): Don't add
5 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
7 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
10 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
12 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
15 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
18 * c-objc-common.c (c_tree_printer): Replace locus pointer with
21 2015-05-14 Marek Polacek <polacek@redhat.com>
25 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
28 2015-05-12 David Malcolm <dmalcolm@redhat.com>
30 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
31 to add a call to warn_for_misleading_indentation.
32 (c_parser_else_body): Likewise, adding param "else_loc".
33 (c_parser_if_statement): Check for misleading indentation.
34 (c_parser_while_statement): Likewise.
35 (c_parser_for_statement): Likewise.
37 2015-05-08 Marek Polacek <polacek@redhat.com>
40 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
41 (output_init_element): Likewise.
43 2015-05-07 Marek Polacek <polacek@redhat.com>
46 * c-typeck.c (build_binary_op): Warn when left shifting a negative
49 2015-04-30 Marek Polacek <polacek@redhat.com>
51 * c-typeck.c (set_init_label): Call error_at instead of error and
54 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
57 * c-typeck.c (c_build_va_arg): Clarify the error message.
59 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
61 * c-parser.c (c_parser_oacc_enter_exit_data): Use
62 OMP_STANDALONE_CLAUSES.
64 2015-04-28 Marek Polacek <polacek@redhat.com>
66 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
68 2015-04-28 Marek Polacek <polacek@redhat.com>
71 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
73 2015-04-25 Marek Polacek <polacek@redhat.com>
76 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
79 2015-04-23 Marek Polacek <polacek@redhat.com>
82 * c-decl.c (set_labels_context_r): New function.
83 (store_parm_decls): Call it via walk_tree_without_duplicates.
84 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
85 instead of create_tmp_var. Build TARGET_EXPR instead of
87 (build_atomic_assign): Use create_tmp_var_raw instead of
88 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
90 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
92 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
93 (c_parser_omp_target_update): Add missed %> to error_at ().
95 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
98 * c-decl.c (c_default_pointer_mode): Remove definition.
99 * c-tree.h (c_default_pointer_mode): Remove declaration.
101 2015-03-27 Tobias Burnus <burnus@net-b.de>
104 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
106 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
107 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
108 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
110 2015-03-19 Jakub Jelinek <jakub@redhat.com>
112 * c-decl.c (c_decl_attributes): Also add "omp declare target"
113 attribute for DECL_EXTERNAL VAR_DECLs.
115 2015-03-11 Jakub Jelinek <jakub@redhat.com>
117 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
120 2015-03-10 Jakub Jelinek <jakub@redhat.com>
123 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
124 before preparing arguments to warn_logical_not_parentheses.
126 2015-03-09 Jakub Jelinek <jakub@redhat.com>
129 * c-typeck.c (parser_build_binary_op): Don't warn for
130 !!x == y or !b == y where b is _Bool.
132 2015-03-09 Marek Polacek <polacek@redhat.com>
134 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
135 * c-decl.c (grokdeclarator): Likewise.
136 * c-typeck.c (build_binary_op): Likewise.
138 2015-02-27 Marek Polacek <polacek@redhat.com>
141 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
143 2015-02-14 Marek Polacek <polacek@redhat.com>
146 * c-decl.c (grokdeclarator): Set the range of a flexible array member
147 declared through a typedef name.
149 2015-02-13 Marek Polacek <polacek@redhat.com>
152 * c-decl.c (grokdeclarator): Print also the type when giving
153 the error message about array's incomplete element type.
155 2015-02-11 Jakub Jelinek <jakub@redhat.com>
158 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
159 check in the POP macro.
161 2015-02-09 Marek Polacek <polacek@redhat.com>
164 * c-typeck.c (process_init_element): Don't always wrap
165 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
166 initializing a range of elements.
168 2015-02-04 Jakub Jelinek <jakub@redhat.com>
172 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
174 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
176 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
177 processing enum declaration.
179 2015-01-29 Marek Polacek <polacek@redhat.com>
182 * c-typeck.c (pop_init_level): If constructor_elements has
183 exactly one element with integer_zerop value, set constructor_zeroinit
184 to 1. Remove braces around warning_init call.
186 2015-01-27 Jakub Jelinek <jakub@redhat.com>
189 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
190 of FUNCTION_DECLs with error_mark_node.
192 2015-01-26 Jakub Jelinek <jakub@redhat.com>
195 * c-typeck.c (convert_arguments): Return -1 if there are
196 error_args, even if we've diagnosed too many arguments.
198 2015-01-21 Richard Biener <rguenther@suse.de>
201 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
202 for builtins the user declared correctly.
204 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
205 Bernd Schmidt <bernds@codesourcery.com>
206 Cesar Philippidis <cesar@codesourcery.com>
207 James Norris <jnorris@codesourcery.com>
208 Jakub Jelinek <jakub@redhat.com>
209 Ilmir Usmanov <i.usmanov@samsung.com>
211 * c-parser.c: Include "gomp-constants.h".
212 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
213 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
214 Use OMP_CLAUSE_SET_MAP_KIND.
215 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
216 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
217 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
218 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
219 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
220 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
221 "copyout", "create", "delete", "deviceptr", "gang", "host",
222 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
223 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
224 "present_or_create", "pcreate", "seq", "self", "vector",
225 "vector_length", "wait", "worker".
226 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
227 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
228 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
229 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
230 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
231 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
232 (c_parser_oacc_data_clause_deviceptr)
233 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
234 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
235 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
236 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
237 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
238 (c_parser_oacc_parallel, c_parser_oacc_update)
239 (c_parser_oacc_wait): New functions.
240 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
241 (c_finish_oacc_data): New prototypes.
242 * c-typeck.c: Include "gomp-constants.h".
243 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
244 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
245 OMP_CLAUSE_SET_MAP_KIND.
246 (c_finish_oacc_parallel, c_finish_oacc_kernels)
247 (c_finish_oacc_data): New functions.
248 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
249 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
250 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
251 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
252 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
253 GOMP_MAP_FORCE_DEVICEPTR.
255 2015-01-09 Michael Collison <michael.collison@linaro.org>
257 * c-array-notation.c: Include hash-set.h, machmode.h,
258 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
259 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
260 * c-aux-info.c: Ditto.
261 * c-convert.c: Ditto.
265 * c-objc-common.c: Ditto.
267 * c-typeck.c: Include hash-set.h, machmode.h,
268 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
269 fold-const.h, wide-int.h, inchash.h, real.h and
270 fixed-value.h due to flattening of tree.h.
272 2015-01-07 Marek Polacek <polacek@redhat.com>
275 * c-typeck.c (process_init_element): Disallow initialization of
276 a flexible array member with a string constant if the structure
279 2015-01-05 Jakub Jelinek <jakub@redhat.com>
282 * c-typeck.c (convert_for_assignment, c_finish_return): For
283 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
284 types also set in_late_binary_op around convert call.
285 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
286 to integral type casts, if not in_late_binary_op, pass c_fully_fold
287 result on expr as last argument to ubsan_instrument_float_cast,
288 if in_late_binary_op, don't use c_save_expr but save_expr.
290 Update copyright years.
292 2015-01-05 Marek Polacek <polacek@redhat.com>
295 * c-typeck.c (build_array_ref): Pass loc down to
296 warn_array_subscript_with_type_char.
298 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
300 * c-typeck.c: New behavious for pointers to arrays with qualifiers
301 (common-pointer-type): For pointers to arrays take qualifiers from
303 (build_conditional_expr): Add warnings for lost qualifiers.
304 (comp-target-types): Allow pointers to arrays with different qualifiers.
305 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
306 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
307 to PEDWARN_FOR_QUALIFIERS.
309 2014-12-17 Jakub Jelinek <jakub@redhat.com>
312 * c-convert.c: Include ubsan.h.
313 (convert): For real -> integral casts and
314 -fsanitize=float-cast-overflow don't call convert_to_integer, but
315 instead instrument the float cast directly.
317 2014-11-29 Jakub Jelinek <jakub@redhat.com>
319 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
320 c_finish_stmt_expr): Remove NULL last argument from
321 create_tmp_var_raw and create_tmp_var calls.
322 * c-array-notation.c (fix_builtin_array_notation_fn,
323 build_array_notation_expr, fix_conditional_array_notations_1,
324 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
326 2014-11-28 Marek Polacek <polacek@redhat.com>
329 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
330 convert the right operand to integer type.
332 2014-11-25 Marek Polacek <polacek@redhat.com>
335 * c-decl.c (start_function): Disable -Wmissing-declarations warning
336 for inline functions.
338 2014-11-21 Jakub Jelinek <jakub@redhat.com>
341 * c-typeck.c (build_array_ref): Adjust
342 convert_vector_to_pointer_for_subscript caller. If it returns true,
343 call non_lvalue_loc on the result.
345 2014-11-11 Richard Biener <rguenther@suse.de>
347 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
350 2014-11-10 Andi Kleen <ak@linux.intel.com>
353 * c-parser.c (c_parser_statement_after_labels): Call
355 (c_parser_if_statement): Dito.
356 (c_parser_switch_statement): Dito.
357 (c_parser_while_statement): Dito.
358 (c_parser_do_statement): Dito.
359 (c_parser_for_statement): Dito.
360 * c-typeck.c (c_finish_loop): Dito.
362 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
364 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
365 OPT_Wshift_count_overflow in the warnings.
367 2014-10-30 Marek Polacek <polacek@redhat.com>
369 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
370 print the stripped version as well, if they're not the same.
372 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
374 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
377 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
379 * c-decl.c: Adjust include files.
382 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
383 Tom Tromey <tromey@redhat.com>
385 * c-tree.h (enum c_oracle_request): New.
386 (c_binding_oracle_function): New typedef.
387 (c_binding_oracle, c_pushtag, c_bind): Declare.
388 * c-decl.c (c_binding_oracle): New global.
389 (I_SYMBOL_CHECKED): New macro.
390 (i_symbol_binding): New function.
391 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
392 (I_TAG_CHECKED): New macro.
393 (i_tag_binding): New function.
394 (I_TAG_BINDING, I_TAG_DECL): Redefine.
395 (I_LABEL_CHECKED): New macro.
396 (i_label_binding): New function.
397 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
398 (c_print_identifier): Save and restore c_binding_oracle.
399 (c_pushtag, c_bind): New functions.
401 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
403 * c-typeck.c: Adjust include files.
405 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
408 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
409 initialization here...
410 (c_initialize_diagnostics): ... but here. Set defaults after
411 building pretty-printer.
413 2014-10-23 Marek Polacek <polacek@redhat.com>
416 * c-decl.c (pop_scope): Don't print warning in external_scope.
418 2014-10-19 Marek Polacek <polacek@redhat.com>
421 * c-typeck.c (output_init_element): Allow initializing objects with
422 static storage duration with compound literals even in C99 and add
425 2014-10-17 Marek Polacek <polacek@redhat.com>
428 * c-typeck.c (digest_init): Allow initializing objects with static
429 storage duration with compound literals even in C99 and add pedwarn
432 2014-10-17 Marek Polacek <polacek@redhat.com>
435 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
436 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
437 error multiple times. Print the type.
439 2014-10-17 Marek Polacek <polacek@redhat.com>
442 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
445 2014-10-17 Marek Polacek <polacek@redhat.com>
447 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
448 (start_function): Use OPT_Wimplicit_int instead of 0.
449 (store_parm_decls_oldstyle): Likewise.
451 2014-10-17 Alan Modra <amodra@gmail.com>
454 * c-decl.c (merge_decls): Don't merge section name or tls model
455 to newdecl symtab node, instead merge to olddecl. Override
456 existing olddecl section name. Set tls_model for all thread-local
457 vars, not just OMP thread-private ones. Remove incorrect comment.
459 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
461 * c-decl.c: Adjust include files.
463 2014-10-14 DJ Delorie <dj@redhat.com>
465 * c-parser.c (c_parse_init): Add RID entries for each __intN.
466 (c_token_starts_typename): Check all __intN, not just __int128.
467 (c_token_starts_declspecs): Likewise.
468 (c_parser_declspecs): Likewise.
469 (c_parser_attribute_any_word): Likewise.
470 (c_parser_objc_selector): Likewise.
471 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
472 (struct c_declspecs): Add int_n_idx field to record *which* __intN
474 * c-decl.c (declspecs_add_type): Check for all __intN, not just
476 (finish_declspecs): Likewise.
478 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
480 * c-parser.c (c_parser_all_labels): New function to replace
482 (c_parser_statement): Call the new function.
484 2014-10-09 Marek Polacek <polacek@redhat.com>
487 * c-typeck.c (pop_init_level): Don't warn about initializing
490 2014-10-07 Marek Polacek <polacek@redhat.com>
493 * c-decl.c (header_for_builtin_fn): New function.
494 (implicitly_declare): Suggest which header to include.
496 2014-10-07 Marek Polacek <polacek@redhat.com>
498 * c-convert.c (convert): Use error_operand_p.
499 * c-typeck.c (require_complete_type): Likewise.
500 (really_atomic_lvalue): Likewise.
501 (digest_init): Likewise.
502 (handle_omp_array_sections_1): Likewise.
504 2014-10-03 Marek Polacek <polacek@redhat.com>
507 * c-decl.c (pop_scope): Don't warn about "inline function declared
508 but never defined" for functions marked with gnu_inline attribute.
510 2014-09-25 Jakub Jelinek <jakub@redhat.com>
513 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
514 on low_bound and length.
516 2014-09-24 Marek Polacek <polacek@redhat.com>
520 * c-parser.c: Don't define CPP_KEYWORD.
521 (c_parser_switch_statement): Pass original type to c_finish_case.
522 * c-tree.h (c_finish_case): Update declaration.
523 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
524 conditionally to c_do_switch_warnings.
526 2014-09-03 Marek Polacek <polacek@redhat.com>
529 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
532 2014-09-02 Jakub Jelinek <jakub@redhat.com>
533 Balaji V. Iyer <balaji.v.iyer@intel.com>
534 Igor Zamyatin <igor.zamyatin@intel.com>
536 * c-parser.c (c_parser_cilk_for): New function.
537 (c_parser_cilk_grainsize): Likewise.
538 (c_get_temp_regvar): Likewise.
539 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
540 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
541 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
542 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
545 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
547 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
548 with using HOST_WIDE_INT without truncation to 'int'
550 2014-08-22 Marek Polacek <polacek@redhat.com>
553 * c-typeck.c (parser_build_binary_op): Adjust call to
554 warn_logical_not_parentheses.
556 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
559 * c-parser.c (c_parser_array_notation): Check for correct
560 type of an array added.
562 2014-08-19 Marek Polacek <polacek@redhat.com>
565 * c-typeck.c (build_binary_op): If either operand of a comparison
566 is a boolean expression, call maybe_warn_bool_compare.
568 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
571 * c-typeck.c (build_c_cast): Do a conversion even when the
572 TYPE_MAIN_VARIANTs are the same.
574 2014-08-19 Marek Polacek <polacek@redhat.com>
576 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
577 pedwarn_c99 instead of pedwarn.
578 (grokfield): Likewise.
579 (warn_defaults_to): New function.
580 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
581 Unconditionally call pedwarn_c99 instead of pedwarn.
582 (start_function): Call warn_defaults_to instead of pedwarn_c99.
583 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
584 check flag_isoc11 before.
585 * c-errors.c (pedwarn_c99): Change the return type to bool.
586 Handle -Wc99-c11-compat.
587 * c-parser.c (disable_extension_diagnostics): Handle
589 (restore_extension_diagnostics): Likewise.
590 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
591 instead of pedwarn, don't check flag_isoc11 before.
592 (c_parser_declspecs): Likewise.
593 (c_parser_alignas_specifier): Likewise.
594 (c_parser_alignof_expression): Likewise.
595 (c_parser_generic_selection): Likewise.
596 * c-tree.h (pedwarn_c99): Update declaration.
597 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
600 2014-08-19 Marek Polacek <polacek@redhat.com>
602 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
604 * c-errors.c: Include "opts.h".
605 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
606 * c-parser.c (disable_extension_diagnostics): Handle negative value
607 of warn_c90_c99_compat, too.
608 (restore_extension_diagnostics): Likewise.
609 (c_parser_compound_statement_nostart): Pass
610 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
612 2014-08-12 Marek Polacek <polacek@redhat.com>
614 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
616 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
618 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
620 2014-08-10 Marek Polacek <polacek@redhat.com>
623 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
624 Call pedwarn_c90 instead of pedwarn.
625 (check_bitfield_type_and_width): Likewise.
626 (declspecs_add_qual): Likewise.
627 (declspecs_add_type): Likewise.
628 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
629 Adjust to only call pedwarn_c90.
630 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
631 pedwarn_c90 instead of pedwarn.
632 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
633 * c-parser.c (disable_extension_diagnostics): Handle
635 (restore_extension_diagnostics): Likewise.
636 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
637 pedwarn_c90 instead of pedwarn.
638 (c_parser_initelt): Likewise.
639 (c_parser_postfix_expression): Likewise.
640 (c_parser_postfix_expression_after_paren_type): Likewise.
641 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
642 * c-tree.h: Fix formatting.
643 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
644 pedwarn_c90 instead of pedwarn.
646 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
648 * c-typeck.c: Remove include of pointer-set.h.
650 2014-08-07 Marek Polacek <polacek@redhat.com>
652 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
654 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
656 * c-typeck.c: Use hash_map instead of pointer_map.
658 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
660 * c-decl.c: Use hash_set instead of pointer_set.
662 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
665 * c-array-notation.c (expand_array_notations): Handling
668 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
671 * c-typeck.c (c_finish_return): Return 0 instead of the address of
674 2014-07-30 Tom Tromey <tromey@redhat.com>
676 * c-typeck.c (struct constructor_stack) <designator_depth>: New
678 (really_start_incremental_init, push_init_level): Initialize
680 (pop_init_level): Set global designator_depth.
681 (process_init_element): Check for designated_init attribute.
683 2014-07-20 Marek Polacek <polacek@redhat.com>
686 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
687 (implicitly_declare): Pass location to implicit_decl_warning.
689 2014-07-14 Jakub Jelinek <jakub@redhat.com>
692 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
693 If non-NULL, call c_parser_check_literal_zero.
694 (c_parser_check_literal_zero): New function.
695 (c_parser_postfix_expression_after_primary): Adjust
696 c_parser_expr_list caller, handle -Wmemset-transposed-args.
698 2014-07-06 Marek Polacek <polacek@redhat.com>
701 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
702 * c-tree.h (C_ARRAY_PARAMETER): Define.
703 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
706 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
707 Chen Gang <gang.chen.5i5j@gmail.com>
709 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
712 2014-07-01 Marek Polacek <polacek@redhat.com>
714 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
715 instead of 0 to WARN_FOR_ASSIGNMENT.
717 2014-07-01 Marek Polacek <polacek@redhat.com>
720 * c-typeck.c (convert_for_assignment): Pass
721 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
723 2014-06-30 Marek Polacek <polacek@redhat.com>
725 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
726 has no_sanitize_undefined attribute.
728 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
731 * c-array-notation.c (fix_builtin_array_notation_fn):
732 Check for 0 arguments in builtin call. Check that bultin argument is
734 * c-parser.c (c_parser_array_notation): Check for incorrect initial
737 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
739 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
740 qualifiers in __auto_type for atomic types.
741 (c_parser_typeof_specifier): Discard all type qualifiers in
742 __typeof__ for atomic types.
744 2014-06-25 Marek Polacek <polacek@redhat.com>
747 * c-parser.c (c_parser_statement_after_labels): Pass the location of
748 the return expression to c_finish_return.
750 2014-06-25 Jakub Jelinek <jakub@redhat.com>
752 * c-typeck.c (c_finish_omp_clauses): Make sure
753 OMP_CLAUSE_LINEAR_STEP has correct type.
755 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
759 2014-06-24 Jakub Jelinek <jakub@redhat.com>
761 * c-parser.c (c_parser_omp_for_loop): For
762 #pragma omp parallel for simd move lastprivate clause from parallel
763 to for rather than simd.
765 2014-06-23 Marek Polacek <polacek@redhat.com>
767 * c-typeck.c (parser_build_binary_op): Don't call
768 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
770 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
772 * c-parser.c (c_parser_omp_threadprivate): Likewise.
773 * c-decl.c (merge_decls): Likewise.
775 2014-06-09 Marek Polacek <polacek@redhat.com>
778 * c-typeck.c (error_init): Call inform instead of error_at.
779 (pedwarn_init): Call inform instead of pedwarn.
780 (warning_init): Call inform instead of warning_at.
782 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
784 * c-decl.c (merge_decls): Use set_decl_section_name.
785 (duplicate_decls): Remove node if it exists.
787 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
790 * c-typeck.c (push_init_level, process_init_element,
791 pop_init_level): Correct check for zero initialization, move
792 missing brace warning to respect zero initialization.
794 2014-06-05 Marek Polacek <polacek@redhat.com>
797 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
799 2014-06-05 Marek Polacek <polacek@redhat.com>
802 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
803 on the left hand side operand of a comparison.
805 2014-06-05 Marek Polacek <polacek@redhat.com>
808 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
809 Print note only if the warning was printed.
811 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
814 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
817 2014-06-03 Marek Polacek <polacek@redhat.com>
820 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
822 * c-tree.h (c_start_case): Update.
823 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
824 switch condition has boolean value.
826 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
828 * c-decl.c: Include builtins.h.
829 * c-parser.c: Likewise.
831 2014-05-27 Marek Polacek <polacek@redhat.com>
834 * c-typeck.c (convert_arguments): Get location of a parameter. Change
835 error and warning calls to error_at and warning_at. Pass location of
836 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
837 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
838 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
840 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
843 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
846 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
848 * c-decl.c (merge_decls): Preserve symtab node pointers.
849 (duplicate_decls): Free new decl.
851 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
853 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
856 * c-parser.c (c_parser_omp_target): Return bool values.
858 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
860 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
861 num_teams_loc variable to num_thread_limit_loc.
863 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
865 * c-array-notation.c (expand_array_notations): Use void_node
866 instead of void_zero_node.
868 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
870 * c-decl.c (finish_struct): Adjust.
871 (finish_enum): Likewise.
873 (record_inline_static): Likewise.
874 (push_scope): Likewise.
875 (make_label): Likewise.
876 (lookup_label_for_goto): Likewise.
877 (finish_struct): Likewise.
878 (finish_enum): Likewise.
879 (store_parm_decls): Likewise.
880 (c_push_function_context): Likewise.
881 * c-lang.h: Remove usage of variable_size gty attribute.
882 * c-parser.c (c_parse_init): Adjust.
883 (c_parse_file): Likewise.
885 2014-05-13 Marek Polacek <polacek@redhat.com>
888 * c-typeck.c (convert_for_assignment): Pass location to
889 WARN_FOR_ASSIGNMENT instead of input_location.
891 2014-05-10 Marek Polacek <polacek@redhat.com>
893 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
894 maybe_warn_string_init.
895 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
896 maybe_warn_string_init.
897 * c-tree.h (maybe_warn_string_init): Update declaration.
898 * c-typeck.c (maybe_warn_string_init): Add location parameter.
899 Call pedwarn_init with loc instead of with input_location.
900 (digest_init): Pass init_loc to maybe_warn_string_init.
901 (pop_init_level): Call pedwarn_init with loc instead of with
903 (set_init_index): Likewise.
904 (process_init_element): Likewise.
906 2014-05-09 Marek Polacek <polacek@redhat.com>
909 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
910 (c_parser_initelt): Pass location to set_init_label. Pass array index
911 location to set_init_index.
912 * c-tree.h (push_init_level): Update declaration.
913 (pop_init_level): Likewise.
914 (set_init_index): Likewise.
915 (set_init_label): Likewise.
916 * c-typeck.c (error_init): Add location parameter. Call error_at
918 (digest_init): Pass init_loc to error_init.
919 (really_start_incremental_init):
920 (push_init_level): Add location parameter. Pass loc to pop_init_level
922 (pop_init_level): Likewise.
923 (set_designator): Add location parameter. Pass loc to pop_init_level,
924 push_init_level, and error_init.
925 (set_init_index): Add location parameter. Pass loc to error_init and
927 (set_init_label): Likewise.
928 (output_init_element): Pass loc to error_init.
929 (process_init_element): Pass loc to error_init, pop_init_level,
930 pedwarn_init, and push_init_level.
932 2014-05-09 Marek Polacek <polacek@redhat.com>
935 * c-parser.c (c_parser_attributes): Parse the arguments as an
936 expression-list if the attribute takes identifier.
938 2014-05-08 Marek Polacek <polacek@redhat.com>
941 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
944 2014-05-08 Marek Polacek <polacek@redhat.com>
947 * c-decl.c (start_function): Warn for _Atomic-qualified return type
950 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
951 Mike Stump <mikestump@comcast.net>
952 Richard Sandiford <rdsandiford@googlemail.com>
954 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
955 (finish_enum): Use wide-int interfaces.
956 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
957 * c-typeck.c (build_c_cast): Likewise.
958 (set_nonincremental_init_from_string): Likewise.
959 (c_tree_equal): Likewise.
961 2014-05-02 Marek Polacek <polacek@redhat.com>
964 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
965 Return size_one_node when the type is not complete.
966 (pointer_diff): Remove comment.
967 (build_unary_op): Improve error messages.
969 2014-05-02 Marek Polacek <polacek@redhat.com>
971 * c-typeck.c (c_finish_return): Separate warning_at calls.
973 2014-05-02 Marek Polacek <polacek@redhat.com>
975 * c-tree.h (error_init): Remove declaration.
976 (pedwarn_init): Likewise.
977 * c-typeck.c (error_init): Make static and move above.
978 (pedwarn_init): Likewise.
979 (warning_init): Move above.
980 (maybe_warn_string_init): Likewise.
982 2014-05-01 Jeff Law <law@redhat.com>
986 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
987 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
990 2014-05-02 Marek Polacek <polacek@redhat.com>
993 * c-typeck.c (push_init_level): Set constructor_designated to
994 p->designated for structures.
996 2014-05-01 Marek Polacek <polacek@redhat.com>
999 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1000 function-definition has an attribute after the declarator.
1002 2014-05-01 Marek Polacek <polacek@redhat.com>
1005 * c-typeck.c (warning_init): Add location_t parameter. Call
1006 warning_at instead of warning.
1007 (push_init_level): Pass input_location to warning_init.
1008 (add_pending_init): Add location_t parameter. Pass loc to
1010 (set_nonincremental_init): Pass input_location to add_pending_init.
1011 (set_nonincremental_init_from_string): Likewise.
1012 (output_init_element): Pass loc to warning_init and to
1015 2014-05-01 Marek Polacek <polacek@redhat.com>
1018 * c-typeck.c (c_finish_return): Distinguish between label and variable
1019 when warning about returning local address.
1021 2014-05-01 Marek Polacek <polacek@redhat.com>
1024 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1027 2014-05-01 Marek Polacek <polacek@redhat.com>
1030 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1031 instead of 0 to WARN_FOR_QUALIFIERS.
1033 2014-05-01 Marek Polacek <polacek@redhat.com>
1036 * c-typeck.c (default_conversion): Use better location for
1039 2014-04-30 Marek Polacek <polacek@redhat.com>
1041 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1042 also when SANITIZE_FLOAT_DIVIDE is on.
1044 2014-04-30 Marek Polacek <polacek@redhat.com>
1047 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1048 and pedwarn_init. Use loc insted of input_location.
1050 2014-04-30 Marek Polacek <polacek@redhat.com>
1053 * c-typeck.c (build_binary_op): Use location when warning about
1056 2014-04-25 Marek Polacek <polacek@redhat.com>
1059 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1060 always_inline/noinline and hot/cold attributes.
1062 2014-04-25 Marek Polacek <polacek@redhat.com>
1065 * c-parser.c (c_parser_initelt): Pass input_location to
1066 process_init_element.
1067 (c_parser_initval): Pass loc to process_init_element.
1068 * c-tree.h (process_init_element): Adjust declaration.
1069 * c-typeck.c (push_init_level): Pass input_location to
1070 process_init_element.
1071 (pop_init_level): Likewise.
1072 (set_designator): Likewise.
1073 (output_init_element): Add location_t parameter. Pass loc to
1075 (output_pending_init_elements): Pass input_location to
1076 output_init_element.
1077 (process_init_element): Add location_t parameter. Pass loc to
1078 output_init_element.
1080 2014-04-24 Jakub Jelinek <jakub@redhat.com>
1082 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1083 atomic-clause, allow comma in between atomic-clause and
1086 2014-04-22 Jakub Jelinek <jakub@redhat.com>
1089 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1090 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1092 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1095 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1096 create_tmp_var instead build_decl for creating temps.
1097 (build_array_notation_expr): Likewise.
1098 (fix_conditional_array_notations_1): Likewise.
1099 (fix_array_notation_expr): Likewise.
1100 (fix_array_notation_call_expr): Likewise.
1102 2014-03-28 Jakub Jelinek <jakub@redhat.com>
1105 * c-tree.h (c_build_function_call_vec): New prototype.
1106 * c-typeck.c (build_function_call_vec): Don't call
1107 resolve_overloaded_builtin here.
1108 (c_build_function_call_vec): New wrapper function around
1109 build_function_call_vec. Call resolve_overloaded_builtin here.
1110 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1111 Call c_build_function_call_vec instead of build_function_call_vec.
1112 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1113 * c-decl.c (finish_decl): Likewise.
1115 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1118 * c-typeck.c: Use correct format string in cast-qual warning
1120 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1122 * c-decl.c (c_decl_attributes): Use
1123 lang_hooks.types.omp_mappable_type.
1124 * c-typeck.c (c_finish_omp_clauses): Likewise.
1126 2014-03-06 Marek Polacek <polacek@redhat.com>
1129 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1130 of checking tree code.
1132 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1134 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1135 (c_parser_parameter_declaration): Likewise.
1137 2014-02-19 Marek Polacek <polacek@redhat.com>
1140 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1141 Call mark_exp_read on exp.value.
1142 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1143 TREE_ADDRESSABLE on old instead of val.
1144 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1146 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1148 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1149 C_EXPR_APPEND by vec_safe_push.
1150 * c-tree.h (C_EXPR_APPEND): Remove.
1152 2014-01-31 Marek Polacek <polacek@redhat.com>
1155 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1156 build_function_call_vec.
1157 (build_function_call): Likewise.
1158 (build_atomic_assign): Likewise.
1159 (build_function_call_vec): Add arg_loc parameter. Use it.
1160 (convert_arguments): Likewise.
1161 (convert_for_assignment): Rename rhs_loc to expr_loc.
1162 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1163 (c_parser_objc_keywordexpr): Likewise.
1164 (c_parser_postfix_expression_after_primary): Call
1165 build_function_call_vec with expr_loc rather than op_loc.
1166 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1167 build_function_call_vec.
1168 (c_parser_expr_list): Add locations parameter. Fill it with locations
1169 of function arguments.
1170 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1172 2014-01-30 Marek Polacek <polacek@redhat.com>
1175 * c-typeck.c (build_function_call_vec): Use loc parameter.
1176 (convert_arguments): Add location parameter. Use it.
1177 (ep_convert_and_check): Likewise.
1178 (build_atomic_assign): Adjust convert_for_assignment call.
1179 (build_modify_expr): Likewise.
1180 (digest_init): Likewise.
1181 (c_finish_return): Likewise.
1182 (build_conditional_expr): Adjust ep_convert_and_check calls.
1183 (convert_for_assignment): Add rhs_loc parameter. Use it.
1184 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1187 2014-01-30 Richard Biener <rguenther@suse.de>
1190 * c-typeck.c (build_function_call_vec): Do not replace calls
1191 to a function via an incompatible type with a runtime abort.
1193 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1195 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1196 flag_enable_cilkplus with flag_cilkplus.
1197 (c_parser_direct_declarator_inner): Likewise.
1198 (c_parser_attribute_any_word): Likewise.
1199 (c_parser_attributes): Likewise.
1200 (c_parser_compound_statement): Likewise.
1201 (c_parser_statement_after_labels): Likewise.
1202 (c_parser_if_statement): Likewise.
1203 (c_parser_switch_statement): Likewise.
1204 (c_parser_do_statement): Likewise.
1205 (c_parser_for_statement): Likewise.
1206 (c_parser_unary_expression): Likewise.
1207 (c_parser_postfix_expression): Likewise.
1208 (c_parser_postfix_expression_after_primary): Likewise.
1209 (c_parser_postfix_expression_after_primary): Likewise.
1210 (c_parser_omp_clause_name): Likewise.
1211 (c_finish_omp_declare_simd): Likewise.
1212 (c_parser_cilk_verify_simd): Likewise.
1213 * c-typeck.c (build_array_ref): Likewise.
1214 (build_function_call_vec): Likewise.
1215 (convert_arguments): Likewise.
1216 (build_compound_expr): Likewise.
1217 (c_finish_return): Likewise.
1218 (c_finish_if_stmt): Likewise.
1219 (c_finish_loop): Likewise.
1220 (build_binary_op): Likewise.
1222 2014-01-23 Marek Polacek <polacek@redhat.com>
1225 * c-typeck.c (parser_build_binary_op): Use location instead of
1227 (build_binary_op): Pass location to shorten_compare.
1229 2014-01-23 Marek Polacek <polacek@redhat.com>
1232 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1235 2014-01-23 Marek Polacek <polacek@redhat.com>
1238 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1239 of a comma expression.
1240 (emit_side_effect_warnings): Likewise.
1242 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1245 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1246 function to use walk_tree and moved a lot of its functionality to
1247 expand_array_notations.
1248 (expand_array_notations): New function.
1250 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1252 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1253 attribute an attribute without value.
1255 2014-01-23 Jakub Jelinek <jakub@redhat.com>
1258 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1259 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1261 2014-01-22 Marek Polacek <polacek@redhat.com>
1264 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1265 of remove_c_maybe_const_expr on op1 and op2.
1267 2014-01-15 Jakub Jelinek <jakub@redhat.com>
1270 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1271 effects, preevaluate rhs using SAVE_EXPR first.
1273 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1276 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1277 statements with if-elseif statements.
1279 2014-01-06 Marek Polacek <polacek@redhat.com>
1282 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1283 defined bit-field types only in ISO C.
1285 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1287 Update copyright years
1289 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1291 * c-array-notation.c: Use the standard form for the copyright notice.
1293 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1295 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1296 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1297 field in parser is not empty. If not-empty, call the function
1298 c_parser_finish_omp_declare_simd.
1299 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1300 between SIMD-enabled functions and #pragma simd. Added new parameter.
1301 (c_parser_cilk_all_clauses): Modified the usage of the function
1302 c_parser_cilk_clause_vectorlength as mentioned above.
1303 (c_parser_cilk_simd_fn_vector_attrs): New function.
1304 (c_finish_cilk_simd_fn_tokens): Likewise.
1305 (is_cilkplus_vector_p): Likewise.
1306 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1307 "nomask," and "mask" strings in clause name.
1308 (c_parser_omp_all_clauses): Added 3 new case statements:
1309 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1310 PRAGMA_CILK_CLAUSE_NOMASK.
1311 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1312 check for vector attribute and if so call the function
1313 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1314 called the function c_finish_cilk_simd_fn_tokens.
1315 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1316 parser field is non-empty. If so, parse them as you would parse
1317 the omp declare simd pragma.
1318 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1319 Added a check when step is a parameter and flag it as error.
1320 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1321 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1324 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1326 * c-parser.c (c_parser_omp_parallel): Fix description.
1328 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1330 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1331 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1332 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1333 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1335 2013-12-04 Joseph Myers <joseph@codesourcery.com>
1338 * c-parser.c (c_parser_alignas_specifier): Use
1339 c_sizeof_or_alignof_type instead of c_alignof.
1340 (c_parser_alignof_expression): Likewise, with min_alignof
1341 parameter depending on alignof spelling used.
1343 2013-12-04 Marek Polacek <polacek@redhat.com>
1346 * c-decl.c (start_function): Don't warn for missing prototype for
1349 2013-12-03 Marek Polacek <polacek@redhat.com>
1352 * c-decl.c (build_compound_literal): Allow compound literals with
1353 empty initial value.
1355 2013-12-02 Joseph Myers <joseph@codesourcery.com>
1358 * c-typeck.c (build_modify_expr): Diagnose assignment to
1359 expression with array type.
1361 2013-11-29 Joseph Myers <joseph@codesourcery.com>
1364 * c-typeck.c (process_init_element): Do not treat a string as
1365 initializing a whole array when used with a designator for an
1368 2013-11-29 Joseph Myers <joseph@codesourcery.com>
1371 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1372 an inline function following a static declaration.
1374 2013-11-28 Jakub Jelinek <jakub@redhat.com>
1377 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1378 to p_name before calling c_parser_omp_teams instead of after.
1379 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1380 argument. Remove unused p_name variable.
1382 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
1383 Jakub Jelinek <jakub@redhat.com>
1385 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1386 external_scope is NULL.
1388 2013-11-27 Tom de Vries <tom@codesourcery.com>
1389 Marc Glisse <marc.glisse@inria.fr>
1392 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1394 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
1396 * c-typeck.c: Add required include files from gimple.h.
1398 2013-11-22 David Malcolm <dmalcolm@redhat.com>
1400 * c-decl.c (define_label, shadow_tag_warned)
1401 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1402 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1403 (declspecs_add_type): Remove use of in_system_header macro.
1404 * c-parser.c (c_parser_unary_expression): Likewise.
1405 * c-typeck.c (store_init_value, process_init_element)
1406 (c_start_case): Likewise.
1408 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1411 * c-parser.c (c_parser_set_source_position_from_token): Remove
1412 reference to in_system_header from comment.
1414 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1416 * c-decl.c (grokdeclarator): Update comment to refer to
1417 tree_to_[su]hwi rather than tree_low_cst.
1419 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1421 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1422 tree_to_uhwi throughout.
1424 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1426 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1429 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1431 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1434 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
1436 * c-parser.c (c_parser_cilk_simd): New.
1437 (c_parser_cilk_verify_simd): New.
1438 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1439 (c_parser_omp_for_loop): Add case for NE_EXPR.
1440 Set c_break_label for CILK_SIMD.
1441 (c_parser_cilk_clause_vectorlength): New.
1442 (c_parser_cilk_clause_linear): New.
1443 (c_parser_cilk_clause_name): New.
1444 (c_parser_cilk_all_clauses): New.
1445 * c-typeck.c (build_unary_op): Pass location argument to
1447 (build_modify_expr): Same.
1448 (build_asm_expr): Same.
1449 (c_finish_bc_stmt): Error on break/continue in loops.
1451 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
1453 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1455 2013-11-14 Diego Novillo <dnovillo@google.com>
1457 * c-decl.c: Include print-tree.h.
1458 Include stor-layout.h.
1461 Include stringpool.h.
1462 * c-lang.c: Include fold-const.h.
1463 * c-parser.c: Include stringpool.h.
1465 Include stor-layout.h.
1467 Include trans-mem.h.
1468 * c-typeck.c: Include stor-layout.h.
1469 Include trans-mem.h.
1473 2013-11-13 Joseph Myers <joseph@codesourcery.com>
1475 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1476 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1478 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1479 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1481 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1482 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1483 (c_parser_declarator, c_parser_direct_declarator_inner)
1484 (c_parser_parameter_declaration, c_parser_type_name): All callers
1486 (c_parser_declaration_or_fndef): Handle declarations with type
1487 determined from the initializer.
1489 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
1491 * c-typeck.c: Include gimplify.h.
1493 2013-11-12 Joseph Myers <joseph@codesourcery.com>
1495 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1496 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1498 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1499 or _Thread_local as appropriate in diagnostics.
1500 (build_null_declspecs): Initialize ret->thread_gnu_p.
1501 (declspecs_add_scspec): Handle either __thread or _Thread_local
1502 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1503 pedantic. Do not disallow _Thread_local extern and _Thread_local
1506 2013-11-07 Joseph Myers <joseph@codesourcery.com>
1507 Andrew MacLeod <amacleod@redhat.com>
1509 * c-aux-info.c (gen_type): Handle atomic qualifier.
1510 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1511 qualifiers when compating types.
1512 (shadow_tag_warned): Handle atomic_p in declspecs.
1513 (quals_from_declspecs): Likewise.
1514 (start_decl): Use c_type_promotes_to when promoting argument
1516 (grokdeclarator): Handle _Atomic.
1517 (get_parm_info): Diagnose any qualifier on "void" as only
1519 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1520 comparing types. Use c_type_promotes_to when promoting argument
1522 (finish_function): Use c_type_promotes_to when promoting argument
1524 (build_null_declspecs): Handle atomic_p in declspecs.
1525 (declspecs_add_qual): Handle RID_ATOMIC.
1526 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1527 (c_token_starts_declspecs): Handle RID_ATOMIC.
1528 (c_parser_declspecs): Handle atomic type specifiers and
1530 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1531 from types of expressions with atomic type.
1532 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1533 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1534 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1535 (c_parser_statement_after_labels, c_parser_switch_statement)
1536 (c_parser_for_statement, c_parser_expr_no_commas)
1537 (c_parser_conditional_expression, c_parser_binary_expression)
1538 (c_parser_cast_expression, c_parser_unary_expression)
1539 (c_parser_postfix_expression)
1540 (c_parser_postfix_expression_after_primary, c_parser_expression):
1541 Use convert_lvalue_to_rvalue.
1542 (c_parser_expression_conv, c_parser_expr_list): Document
1543 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1544 (c_parser_objc_synchronized_statement): Use
1545 convert_lvalue_to_rvalue.
1546 (c_parser_objc_selector): Handle RID_ATOMIC.
1547 (c_parser_objc_receiver, c_parser_array_notation): Use
1548 convert_lvalue_to_rvalue.
1549 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1550 _Atomic (type-name).
1551 (struct c_declspecs): Add atomic_p field.
1552 (convert_lvalue_to_rvalue): Declare.
1553 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1554 corresponding atomic types.
1555 (qualify_type): Don't add _Atomic qualifiers from second argument.
1556 (comp_target_types): Do not allow _Atomic mismatches.
1557 (type_lists_compatible_p): Do not remove atomic qualifiers when
1559 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1560 (build_atomic_assign): New functions.
1561 (build_unary_op): Use build_atomic_assign for atomic increment and
1563 (build_conditional_expr): Do not treat _Atomic void as a qualified
1565 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1566 (find_anonymous_field_with_type, convert_to_anonymous_field)
1567 (convert_for_assignment): Do not remove atomic qualifiers when
1569 (digest_init): Do not accept initialization of arrays of atomic
1570 elements by string constants.
1571 (build_asm_expr): Use convert_lvalue_to_rvalue.
1572 (build_binary_op): Do not treat _Atomic void as a qualified
1575 2013-11-06 DJ Delorie <dj@redhat.com>
1577 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1578 both explicit and builtin, print the location of the explicit one.
1580 2013-11-05 Tobias Burnus <burnus@net-b.de>
1582 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1583 c_parser_omp_distribute, c_parser_omp_teams,
1584 c_parser_omp_target, c_parser_omp_declare): Handle
1587 2013-11-03 Marek Polacek <polacek@redhat.com>
1589 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1591 2013-11-01 Jakub Jelinek <jakub@redhat.com>
1593 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1594 check_dup_generic at the end, unless remove is true.
1595 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1597 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1599 2013-10-31 Jakub Jelinek <jakub@redhat.com>
1601 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1602 with decl that is not pointer nor array.
1604 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1606 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1607 a spawning function is found.
1608 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1609 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1610 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1611 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1613 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1614 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1616 (c_finish_return): Added a check to reject _Cilk_spawn in return
1618 (build_cilk_spawn): New function.
1619 (build_cilk_sync): Likewise.
1620 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1622 2013-10-27 Tobias Burnus <burnus@net-b.de>
1625 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1626 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1627 (c_parser_statement_after_labels): Update calls.
1629 2013-10-24 Tobias Burnus <burnus@net-b.de>
1632 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1633 Handle PRAGMA_IVDEP.
1634 (c_parser_statement_after_labels): Update call.
1636 2013-10-24 Marek Polacek <polacek@redhat.com>
1638 * c-parser.c (c_parser_struct_declaration): Add a comment.
1639 (c_parser_declarator): Don't allow _Alignas here.
1641 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
1643 * c-parser.c: Include omp-low.h.
1644 * c-typeck.c: Likewise.
1646 2013-10-17 Marek Polacek <polacek@redhat.com>
1649 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1650 Document syntax of the array-declarator.
1651 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1653 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1654 (c_parser_struct_declaration): Likewise.
1655 (c_parser_declarator): Likewise.
1656 (c_parser_direct_declarator_inner): Likewise.
1657 (c_parser_parameter_declaration): Likewise.
1658 (c_parser_type_name): Likewise.
1660 2013-10-11 Jakub Jelinek <jakub@redhat.com>
1662 * c-lang.h (current_omp_declare_target_attribute): New extern
1664 * c-parser.c: Include c-lang.h.
1665 (struct c_parser): Change tokens to c_token *.
1666 Add tokens_buf field. Change tokens_avail type to unsigned int.
1667 (c_parser_consume_token): If parser->tokens isn't
1668 &parser->tokens_buf[0], increment parser->tokens.
1669 (c_parser_consume_pragma): Likewise.
1670 (enum pragma_context): Add pragma_struct and pragma_param.
1671 (c_parser_external_declaration): Adjust
1672 c_parser_declaration_or_fndef caller.
1673 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1674 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1675 Adjust recursive call.
1676 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1678 (c_parser_parameter_declaration): Use pragma_param instead of
1680 (c_parser_compound_statement_nostart, c_parser_label,
1681 c_parser_for_statement): Adjust
1682 c_parser_declaration_or_fndef callers.
1683 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1684 it through to c_parser_conditional_expression.
1685 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1686 pass it through to c_parser_binary_expression. Adjust recursive
1688 (c_parser_binary_expression): Remove prec argument, add
1689 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1690 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1691 binop matches it, use build2 instead of parser_build_binary_op.
1692 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1693 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1694 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1695 Handle pragma_struct and pragma_param the same as pragma_external.
1696 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1697 (c_parser_omp_variable_list): Parse array sections for
1698 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1699 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1700 (c_parser_omp_clause_reduction): Handle user defined reductions.
1701 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1702 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1703 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1704 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1705 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1706 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1707 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1708 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1709 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1710 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1711 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1712 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1713 (c_parser_omp_for_loop): Add CODE argument, pass it through
1714 to c_finish_omp_for. Change last argument to cclauses,
1715 and adjust uses to grab parallel clauses from the array of all
1716 the split clauses. Adjust c_parser_binary_expression,
1717 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1718 (omp_split_clauses): New function.
1719 (c_parser_omp_simd): New function.
1720 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1721 Allow the function to be called also when parsing combined constructs,
1722 and call c_parser_omp_simd when parsing for simd.
1723 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1724 #pragma omp section, require exactly one structured-block instead of
1725 sequence of statements.
1726 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1727 Allow the function to be called also when parsing combined constructs.
1728 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1729 Allow the function to be called also when parsing combined
1731 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1732 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1733 c_parser_omp_teams, c_parser_omp_target_data,
1734 c_parser_omp_target_update, c_parser_omp_target,
1735 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1736 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1737 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1738 (c_parser_omp_construct): Add p_name and mask vars. Handle
1739 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1740 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1741 and c_parser_omp_sections callers.
1742 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1743 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1744 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1745 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1746 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1748 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1749 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1750 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1751 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1752 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1753 * c-typeck.c: Include tree-inline.h.
1754 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1755 handle_omp_array_sections_1, handle_omp_array_sections,
1756 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1757 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1758 user defined reductions.
1759 (c_tree_equal): New function.
1760 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1761 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1762 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1763 c_check_omp_declare_reduction_r): New prototypes.
1764 * c-decl.c (current_omp_declare_target_attribute): New variable.
1765 (c_decl_attributes): New function.
1766 (start_decl, start_function): Use it instead of decl_attributes.
1767 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1768 c_omp_reduction_decl, c_omp_reduction_lookup,
1769 c_check_omp_declare_reduction_r): New functions.
1771 2013-09-25 Tom Tromey <tromey@redhat.com>
1773 * Make-lang.in (c/gccspec.o): Remove.
1774 (CFLAGS-c/gccspec.o): New variable.
1775 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1776 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1777 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1779 2013-09-25 Tom Tromey <tromey@redhat.com>
1781 * Make-lang.in (c/gccspec.o): Don't use subshell.
1783 2013-09-18 Marek Polacek <polacek@redhat.com>
1786 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1787 Remove unnecessary check.
1789 2013-09-18 Marek Polacek <polacek@redhat.com>
1792 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1793 no_sanitize_undefined attribute.
1795 2013-09-13 Kai Tietz <ktietz@redhat.com>
1798 * c-decl.c (c_builtin_function_ext_scope): Remove
1799 wrong assumption that it is never called on prexisting
1802 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1804 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1806 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1808 * c-objc-common.c (c_tree_printer): Tidy.
1810 2013-08-30 Marek Polacek <polacek@redhat.com>
1812 * c-typeck.c (build_binary_op): Add division by zero and shift
1815 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
1816 Joseph Myers <joseph@codesourcery.com>
1819 * c-typeck.c (c_common_type): Prefer double_type_node over
1820 other REAL_TYPE types with the same precision.
1821 (convert_arguments): Likewise.
1823 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1825 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1826 (c_initialize_diagnostics): Call a destructor for the early printer.
1828 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1830 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1831 printer initialization.
1833 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
1836 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1837 check for truth values.
1838 (expand_array_notation_exprs): Added truth values case. Removed an
1839 unwanted else. Added for-loop to walk through subtrees in default
1842 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1844 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1846 2013-07-23 Joseph Myers <joseph@codesourcery.com>
1848 * c-parser.c (struct c_generic_association): Fix typo.
1850 2013-07-23 Tom Tromey <tromey@redhat.com>
1851 Joseph Myers <joseph@codesourcery.com>
1853 * c-parser.c (struct c_generic_association): New.
1854 (c_generic_association_d): New typedef.
1855 (c_parser_generic_selection): New function.
1856 (c_parser_postfix_expression): Handle RID_GENERIC.
1858 2013-07-13 Jason Merrill <jason@redhat.com>
1861 * c-decl.c (finish_struct): Check for too-large class.
1863 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
1866 * c-typeck.c (set_init_index): When folding, check for index overflow.
1868 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1870 * c-parser.c (c_parser_array_notation): Removed rejection of array
1871 notations in an array of function pointers.
1873 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1875 * c-array-notation.c (make_triplet_val_inv): New function.
1876 (create_cmp_incr): Likewise.
1877 (create_array_refs): Likewise.
1878 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1879 Also modularized common parts between functions and called the function.
1880 (build_array_notation_expr): Likewise.
1881 (fix_conditional_array_notations_1): Likewise.
1882 (fix_array_notation_expr): Likewise.
1883 (fix_array_notation_call_expr): Likewise.
1885 2013-06-18 Marek Polacek <polacek@redhat.com>
1888 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1890 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1892 * c-array-notation.c (build_array_notation_expr): Reject array notation
1893 mismatch between LHS and RHS even inside a call_expr. Also, removed
1894 a couple while statements that were dead code.
1896 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1898 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1899 excessive precision expressions in function parameters. Also removed
1900 couple unwanted while statements.
1902 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1904 * c-array-notation.c (expand_array_notation_exprs): Added
1905 ARRAY_NOTATION_REF case.
1907 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1909 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1910 function to c-family/array-notation-common.c.
1911 (is_cilkplus_reduce_builtin): Likewise.
1912 (find_rank): Likewise.
1913 (extract_array_notation_exprs): Likewise.
1914 (replace_array_notations): Likewise.
1915 (find_inv_trees): Likewise.
1916 (replace_inv_trees): Likewise.
1917 (contains_array_notation_expr): Likewise.
1918 (find_correct_array_notation_type): Likewise.
1919 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1920 (struct inv_list): Moved this to c-family/array-notation-common.c.
1921 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1923 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1925 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1926 reduction functions outside the for-loop. Added a check if the fundecl
1927 is non-NULL. Finally, removed an unwanted if-statement, and made the
1930 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1932 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1933 condition of the if-statement matches the rank of else-block and then-
1934 block when array notations are used.
1935 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1936 expression after the entire function body is parsed.
1937 (c_parser_expr_no_commas): Delayed creating array notation expressions
1938 to the end of function parsing.
1939 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1940 whole if-statement instead of just the condition.
1941 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1943 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1946 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1947 array to NULL_TREE if they are unused. Also added a check for the
1948 field to be NULL before its fields are used in future.
1950 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1953 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1954 (build_array_notation_expr): Likewise.
1956 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1958 * c-typeck.c (build_array_ref): Added a check to see if array's
1959 index is greater than one. If true, then emit an error.
1960 (build_function_call_vec): Exclude error reporting and checking
1961 for builtin array-notation functions.
1962 (convert_arguments): Likewise.
1963 (c_finish_return): Added a check for array notations as a return
1964 expression. If true, then emit an error.
1965 (c_finish_loop): Added a check for array notations in a loop
1966 condition. If true then emit an error.
1967 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1968 (build_binary_op): Added a check for array notation expr inside
1969 op1 and op0. If present, we call another function to find correct
1971 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1972 * c-parser.c (c_parser_compound_statement): Check if array
1973 notation code is used in tree, if so, then transform them into
1975 (c_parser_expr_no_commas): Check if array notation is used in LHS
1976 or RHS, if so, then build array notation expression instead of
1978 (c_parser_postfix_expression_after_primary): Added a check for
1979 colon(s) after square braces, if so then handle it like an array
1980 notation. Also, break up array notations in unary op if found.
1981 (c_parser_direct_declarator_inner): Added a check for array
1983 (c_parser_compound_statement): Added a check for array notation in
1984 a stmt. If one is present, then expand array notation expr.
1985 (c_parser_if_statement): Likewise.
1986 (c_parser_switch_statement): Added a check for array notations in
1987 a switch statement's condition. If true, then output an error.
1988 (c_parser_while_statement): Similarly, but for a while.
1989 (c_parser_do_statement): Similarly, but for a do-while.
1990 (c_parser_for_statement): Similarly, but for a for-loop.
1991 (c_parser_unary_expression): Check if array notation is used in a
1992 pre-increment or pre-decrement expression. If true, then expand
1994 (c_parser_array_notation): New function.
1995 * c-array-notation.c: New file.
1996 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1998 2013-05-23 Mike Stump <mikestump@comcast.net>
2000 * c-typeck.c (convert_for_assignment): Handle references to memory
2003 2013-05-16 Jason Merrill <jason@redhat.com>
2005 * Make-lang.in (cc1$(exeext)): Use link mutex.
2007 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2009 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2010 to simply use OPT_Wpointer_arith.
2011 (build_unary_op): Likewise.
2013 2013-04-03 Jakub Jelinek <jakub@redhat.com>
2016 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2017 argument. If set, or it temporarily for parsing of the first
2018 argument into force_folding_builtin_constant_p.
2019 (c_parser_postfix_expression): Adjust callers.
2021 2013-03-21 Richard Biener <rguenther@suse.de>
2023 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2024 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2026 2013-02-12 Marek Polacek <polacek@redhat.com>
2029 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2032 2013-01-24 Jakub Jelinek <jakub@redhat.com>
2035 * c-typeck.c (set_nonincremental_init_from_string): If
2036 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2038 (process_init_element): Likewise.
2040 2012-12-20 Jakub Jelinek <jakub@redhat.com>
2043 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2044 argument, don't call default_function_array_conversion
2045 nor c_fully_fold here.
2046 (c_parser_asm_statement): Adjust callers.
2047 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2048 and outputs here, and call default_function_array_conversion
2049 on inputs that don't need to be addressable.
2051 2012-12-18 Jakub Jelinek <jakub@redhat.com>
2054 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2055 warning require that both c_common_unsigned_type as well as
2056 c_common_signed_type is the same for both mvl and mvr types.
2058 2012-11-16 Diego Novillo <dnovillo@google.com>
2060 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2062 * c-common.c: Use new vec API in vec.h.
2063 * c-common.h: Likewise.
2064 * c-gimplify.c: Likewise.
2065 * c-pragma.c: Likewise.
2066 * c-pretty-print.c: Likewise.
2067 * c-pretty-print.h: Likewise.
2068 * c-semantics.c: Likewise.
2069 * c-decl.c: Likewise.
2070 * c-parser.c: Likewise.
2071 * c-tree.h: Likewise.
2072 * c-typeck.c: Likewise.
2074 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2077 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2079 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2082 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2083 shadows a function, unless the variable is a function or a
2084 pointer-to-function.
2086 2012-10-12 Jakub Jelinek <jakub@redhat.com>
2089 * c-parser.c (struct c_tree_loc_pair): Removed.
2090 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2091 add location_t * and tree * arguments, fill in array of 3
2092 sizeof_arg trees and corresponding locs.
2093 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2094 c_parser_expr_list callers.
2095 (c_parser_postfix_expression_after_primary): Likewise. Pass
2096 array of 3 sizeof_arg trees and locs (corresponding to first
2097 3 arguments) to sizeof_pointer_memaccess_warning.
2099 2012-10-09 Lawrence Crowl <crowl@google.com>
2101 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2102 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2105 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2108 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2111 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
2114 * c-typeck.c: Include c-common.h.
2115 (enum stv_conv): Moved to c-common.h.
2116 (scalar_to_vector): Moved to c-common.c.
2117 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2118 * Make-lang.in: c-typeck.c depends on c-common.h.
2120 2012-10-04 Arnaud Charlet <charlet@adacore.com>
2122 * c-decl.c (c_write_global_declarations): Fix handling of
2125 2012-09-30 Sharad Singhai <singhai@google.com>
2127 * c-decl.c (c_write_global_declarations): Use a different method
2128 to determine if the dump has ben initialized.
2130 2012-09-14 Joseph Myers <joseph@codesourcery.com>
2133 * c-typeck.c (c_cast_expr): When casting to a type requiring
2134 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2137 2012-09-14 Joseph Myers <joseph@codesourcery.com>
2140 * c-typeck.c (build_unary_op): Pass original argument of
2141 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2142 any C_MAYBE_CONST_EXPR, if it has integer operands.
2143 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2144 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2145 to c_objc_common_truthvalue_conversion, then remove any
2146 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2147 c_objc_common_truthvalue_conversion not
2148 c_common_truthvalue_conversion.
2149 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2150 call note_integer_operands for arguments with integer operands
2151 that are not integer constants.
2153 2012-09-13 Jakub Jelinek <jakub@redhat.com>
2156 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2157 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2159 2012-08-31 Jakub Jelinek <jakub@redhat.com>
2162 * c-convert.c (convert): Don't call fold_convert_loc if
2163 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2164 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2165 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2167 2012-08-24 Jakub Jelinek <jakub@redhat.com>
2170 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2171 for nested and empty_ok arguments in the call to
2172 c_parser_declaration_or_fndef.
2174 2012-08-17 Jakub Jelinek <jakub@redhat.com>
2176 * c-tree.h (c_last_sizeof_arg): Declare.
2177 * c-parser.c (struct c_tree_loc_pair): New type.
2178 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2180 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2181 (c_parser_postfix_expression_after_primary): Likewise. Call
2182 sizeof_pointer_memaccess_warning if needed.
2183 (sizeof_ptr_memacc_comptypes): New function.
2184 * c-typeck.c (c_last_sizeof_arg): New global variable.
2185 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2187 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
2189 * c-lang.h (lang_decl): Add variable_size GTY option.
2191 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2193 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2194 * Make-lang.in: Fix dependencies.
2196 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2198 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2199 and add language Makefile hooks.
2200 * config-lang.in: New file.
2201 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2202 add the required "normal" config-lang.in rules.
2203 * c-lang.h: Moved from gcc/ to here.
2204 * c-tree.h: Likewise.
2205 * c-objc-common.c: Likewise.
2206 * c-objc-common.h: Likewise.
2207 * c-typeck.c: Likewise.
2208 * c-convert.c: Likewise.
2209 * c-lang.c: Likewise.
2210 * c-aux-info.c: Likewise.
2211 * c-errors.c: Likewise.
2212 * gccspec.c: Likewise.
2213 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2214 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2216 Copyright (C) 2012-2015 Free Software Foundation, Inc.
2218 Copying and distribution of this file, with or without modification,
2219 are permitted in any medium without royalty provided the copyright
2220 notice and this notice are preserved.