1 2015-10-02 Marek Polacek <polacek@redhat.com>
4 * c-typeck.c (convert_for_assignment): Use the expansion point
7 2015-10-02 Marek Polacek <polacek@redhat.com>
10 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
11 and pass it down to c_parser_if_statement.
12 (c_parser_else_body): Add CHAIN parameter and pass it down to
13 c_parser_statement_after_labels.
14 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
15 duplicated if-else-if conditions.
17 2015-10-01 Marek Polacek <polacek@redhat.com>
19 * c-typeck.c (convert_for_assignment): Improve commentary.
21 2015-09-30 Marek Polacek <polacek@redhat.com>
24 * c-typeck.c (c_finish_return): Use the expansion point location for
25 certain "return with value" warnings.
27 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
29 * c-parser.c (pragma_lex): Add loc argument.
31 2015-09-15 Marek Polacek <polacek@redhat.com>
34 * c-decl.c (tag_exists_p): New function.
35 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
36 struct/union/enum keywords are missing.
37 * c-tree.h (tag_exists_p): Declare.
39 2015-09-15 Marek Polacek <polacek@redhat.com>
41 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
42 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
43 Return NULL_TREE instead of 0.
44 (lookup_name): Return NULL_TREE instead of 0.
45 (lookup_name_in_scope): Likewise.
46 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
47 (parser_xref_tag): Use false instead of 0.
48 (start_struct): Use true instead of 1.
49 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
51 2015-09-14 Marek Polacek <polacek@redhat.com>
53 * c-typeck.c (set_nonincremental_init_from_string): Use
54 HOST_WIDE_INT_M1U when shifting a negative value.
56 2015-09-09 Mark Wielaard <mjw@redhat.com>
58 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
61 2015-09-10 Jakub Jelinek <jakub@redhat.com>
64 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
65 into OMP_FOR_PRE_BODY rather than before the loop.
67 2015-09-09 Jakub Jelinek <jakub@redhat.com>
70 * c-parser.c (c_parser_oacc_all_clauses,
71 c_parser_omp_all_clauses): Remove invalid clause from
72 list of clauses even if parser->error is set.
75 * c-parser.c (c_parser_omp_clause_aligned,
76 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
78 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
82 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
83 instead of c_parser_unary_expression. If the result is !lvalue_p,
84 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
86 2015-09-04 Marek Polacek <polacek@redhat.com>
89 * c-typeck.c (build_binary_op): Don't instrument static initializers.
91 2015-09-03 Martin Sebor <msebor@redhat.com>
94 * c-typeck.c (convert_arguments, parser_build_unary_op,
95 build_conditional_expr, c_cast_expr, convert_for_assignment,
96 build_binary_op, _objc_common_truthvalue_conversion): Call
98 (c_decl_implicit): Define.
100 2015-09-02 Marek Polacek <polacek@redhat.com>
103 * c-parser.c (c_parser_enum_specifier): Give a better error for
106 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
108 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
110 2015-08-12 Marek Polacek <polacek@redhat.com>
112 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
115 2015-08-03 Marek Polacek <polacek@redhat.com>
118 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
120 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
122 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
124 * c-parser.c (c_parser_if_body): Take token_indent_info
125 argument. Call warn_for_misleading_indentation even when the
126 body is a semicolon. Extract token_indent_infos corresponding
127 to the guard, body and next tokens. Adjust call to
128 warn_for_misleading_indentation accordingly.
129 (c_parser_else_body): Likewise.
130 (c_parser_if_statement): Likewise.
131 (c_parser_while_statement): Likewise.
132 (c_parser_for_statement): Likewise.
134 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
135 Manuel López-Ibáñez <manu@gcc.gnu.org>
137 * c-decl.c (get_parm_info): Remove static var. Update warning
140 2015-07-27 Marek Polacek <polacek@redhat.com>
144 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
146 2015-07-20 Marek Polacek <polacek@redhat.com>
149 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
150 (build_binary_op): Warn about left shift overflows.
152 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
154 * c-array-notation.c: Adjust includes for flags.h changes.
155 * c-objc-common.c: Likewise.
157 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
159 * c-array-notation.c: Adjust includes.
160 * c-aux-info.c: Likewise.
161 * c-convert.c: Likewise.
162 * c-decl.c: Likewise.
163 * c-errors.c: Likewise.
164 * c-lang.c: Likewise.
165 * c-objc-common.c: Likewise.
166 * c-parser.c: Likewise.
167 * c-typeck.c: Likewise.
169 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
172 * c-decl.c (finish_function): Call do_warn_unused_parameter.
174 2015-06-29 Marek Polacek <polacek@redhat.com>
177 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
178 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
179 about -Wswitch-bool here.
180 (do_case): Update c_add_case_label call.
181 (c_finish_case): Update c_do_switch_warnings call.
183 2015-06-27 Marek Polacek <polacek@redhat.com>
185 * c-typeck.c: Use VECTOR_TYPE_P throughout.
187 2015-06-26 Marek Polacek <polacek@redhat.com>
189 * c-array-notation.c (fix_builtin_array_notation_fn): Use
191 * c-typeck.c (array_to_pointer_conversion): Likewise.
192 (build_unary_op): Likewise.
193 (c_finish_return): Likewise.
195 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
197 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
198 * c-parser.c: Likewise.
200 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
202 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
203 instead of pointer_hash.
204 (detect_field_duplicates): Likewise.
206 2015-06-25 Marek Polacek <polacek@redhat.com>
208 * c-array-notation.c: Use VAR_P throughout.
209 * c-decl.c: Likewise.
210 * c-objc-common.c: Likewise.
211 * c-parser.c: Likewise.
212 * c-typeck.c: Likewise.
214 2015-06-25 Marek Polacek <polacek@redhat.com>
216 * c-decl.c: Use is_global_var throughout.
217 * c-parser.c: Likewise.
218 * c-typeck.c: Likewise.
220 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
222 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
223 * c-aux-info.c: Likewise.
224 * c-convert.c: Likewise.
225 * c-decl.c: Likewise.
226 * c-errors.c: Likewise.
227 * c-lang.c: Likewise.
228 * c-objc-common.c: Likewise.
229 * c-parser.c: Likewise.
230 * c-typeck.c: Likewise.
232 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
235 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
238 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
240 * c-decl.c (pop_scope): Register the main translation unit
241 through the new debug hook.
243 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
245 * c-array-notation.c : Adjust include files.
246 * c-aux-info.c : Likewise.
247 * c-convert.c : Likewise.
248 * c-decl.c : Likewise.
249 * c-errors.c : Likewise.
250 * c-lang.c : Likewise.
251 * c-lang.h : Likewise.
252 * c-objc-common.c : Likewise.
253 * c-parser.c : Likewise.
254 * c-typeck.c : Likewise.
256 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
258 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
259 immediately clobber it.
260 (c_write_global_declarations_1): Remove call to
261 check_global_declaration_1.
262 (c_write_global_declarations_2): Remove.
263 (c_write_final_cleanups): Rename from c_write_global_declarations.
264 Remove call to finalize_compilation_unit.
265 Remove calls to debugging hooks.
266 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
267 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
268 * c-tree.h: Remove c_write_global_declarations.
270 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
272 * c-array-notation.c: Adjust includes for restructured coretypes.h.
273 * c-aux-info.c: Likewise.
274 * c-convert.c: Likewise.
275 * c-decl.c: Likewise.
276 * c-errors.c: Likewise.
277 * c-lang.c: Likewise.
278 * c-objc-common.c: Likewise.
279 * c-parser.c: Likewise.
280 * c-typeck.c: Likewise.
282 2015-06-04 Marek Polacek <polacek@redhat.com>
285 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
288 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
290 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
291 Warn for empty struct.
292 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
294 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
296 * c-decl.c (start_function): Call plugin before parsing.
297 (finish_function): Call plugin after parsing.
299 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
302 * c-decl.c (merge_decls): Merge DECL_COMMON.
304 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
306 * Make-lang.in (check_gcc_pallelize): Define.
308 2015-05-22 Marek Polacek <polacek@redhat.com>
311 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
314 2015-05-21 Marek Polacek <polacek@redhat.com>
316 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
319 2015-05-20 Marek Polacek <polacek@redhat.com>
321 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
322 * c-typeck.c: Likewise.
324 2015-05-19 Marek Polacek <polacek@redhat.com>
326 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
328 2015-05-19 Jakub Jelinek <jakub@redhat.com>
331 * c-parser.c (c_parser_omp_for_loop): Don't add
332 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
333 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
334 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
337 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
339 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
342 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
345 * c-objc-common.c (c_tree_printer): Replace locus pointer with
348 2015-05-14 Marek Polacek <polacek@redhat.com>
352 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
355 2015-05-12 David Malcolm <dmalcolm@redhat.com>
357 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
358 to add a call to warn_for_misleading_indentation.
359 (c_parser_else_body): Likewise, adding param "else_loc".
360 (c_parser_if_statement): Check for misleading indentation.
361 (c_parser_while_statement): Likewise.
362 (c_parser_for_statement): Likewise.
364 2015-05-08 Marek Polacek <polacek@redhat.com>
367 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
368 (output_init_element): Likewise.
370 2015-05-07 Marek Polacek <polacek@redhat.com>
373 * c-typeck.c (build_binary_op): Warn when left shifting a negative
376 2015-04-30 Marek Polacek <polacek@redhat.com>
378 * c-typeck.c (set_init_label): Call error_at instead of error and
381 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
384 * c-typeck.c (c_build_va_arg): Clarify the error message.
386 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
388 * c-parser.c (c_parser_oacc_enter_exit_data): Use
389 OMP_STANDALONE_CLAUSES.
391 2015-04-28 Marek Polacek <polacek@redhat.com>
393 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
395 2015-04-28 Marek Polacek <polacek@redhat.com>
398 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
400 2015-04-25 Marek Polacek <polacek@redhat.com>
403 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
406 2015-04-23 Marek Polacek <polacek@redhat.com>
409 * c-decl.c (set_labels_context_r): New function.
410 (store_parm_decls): Call it via walk_tree_without_duplicates.
411 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
412 instead of create_tmp_var. Build TARGET_EXPR instead of
414 (build_atomic_assign): Use create_tmp_var_raw instead of
415 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
417 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
419 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
420 (c_parser_omp_target_update): Add missed %> to error_at ().
422 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
425 * c-decl.c (c_default_pointer_mode): Remove definition.
426 * c-tree.h (c_default_pointer_mode): Remove declaration.
428 2015-03-27 Tobias Burnus <burnus@net-b.de>
431 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
433 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
434 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
435 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
437 2015-03-19 Jakub Jelinek <jakub@redhat.com>
439 * c-decl.c (c_decl_attributes): Also add "omp declare target"
440 attribute for DECL_EXTERNAL VAR_DECLs.
442 2015-03-11 Jakub Jelinek <jakub@redhat.com>
444 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
447 2015-03-10 Jakub Jelinek <jakub@redhat.com>
450 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
451 before preparing arguments to warn_logical_not_parentheses.
453 2015-03-09 Jakub Jelinek <jakub@redhat.com>
456 * c-typeck.c (parser_build_binary_op): Don't warn for
457 !!x == y or !b == y where b is _Bool.
459 2015-03-09 Marek Polacek <polacek@redhat.com>
461 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
462 * c-decl.c (grokdeclarator): Likewise.
463 * c-typeck.c (build_binary_op): Likewise.
465 2015-02-27 Marek Polacek <polacek@redhat.com>
468 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
470 2015-02-14 Marek Polacek <polacek@redhat.com>
473 * c-decl.c (grokdeclarator): Set the range of a flexible array member
474 declared through a typedef name.
476 2015-02-13 Marek Polacek <polacek@redhat.com>
479 * c-decl.c (grokdeclarator): Print also the type when giving
480 the error message about array's incomplete element type.
482 2015-02-11 Jakub Jelinek <jakub@redhat.com>
485 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
486 check in the POP macro.
488 2015-02-09 Marek Polacek <polacek@redhat.com>
491 * c-typeck.c (process_init_element): Don't always wrap
492 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
493 initializing a range of elements.
495 2015-02-04 Jakub Jelinek <jakub@redhat.com>
499 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
501 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
503 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
504 processing enum declaration.
506 2015-01-29 Marek Polacek <polacek@redhat.com>
509 * c-typeck.c (pop_init_level): If constructor_elements has
510 exactly one element with integer_zerop value, set constructor_zeroinit
511 to 1. Remove braces around warning_init call.
513 2015-01-27 Jakub Jelinek <jakub@redhat.com>
516 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
517 of FUNCTION_DECLs with error_mark_node.
519 2015-01-26 Jakub Jelinek <jakub@redhat.com>
522 * c-typeck.c (convert_arguments): Return -1 if there are
523 error_args, even if we've diagnosed too many arguments.
525 2015-01-21 Richard Biener <rguenther@suse.de>
528 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
529 for builtins the user declared correctly.
531 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
532 Bernd Schmidt <bernds@codesourcery.com>
533 Cesar Philippidis <cesar@codesourcery.com>
534 James Norris <jnorris@codesourcery.com>
535 Jakub Jelinek <jakub@redhat.com>
536 Ilmir Usmanov <i.usmanov@samsung.com>
538 * c-parser.c: Include "gomp-constants.h".
539 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
540 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
541 Use OMP_CLAUSE_SET_MAP_KIND.
542 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
543 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
544 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
545 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
546 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
547 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
548 "copyout", "create", "delete", "deviceptr", "gang", "host",
549 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
550 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
551 "present_or_create", "pcreate", "seq", "self", "vector",
552 "vector_length", "wait", "worker".
553 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
554 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
555 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
556 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
557 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
558 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
559 (c_parser_oacc_data_clause_deviceptr)
560 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
561 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
562 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
563 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
564 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
565 (c_parser_oacc_parallel, c_parser_oacc_update)
566 (c_parser_oacc_wait): New functions.
567 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
568 (c_finish_oacc_data): New prototypes.
569 * c-typeck.c: Include "gomp-constants.h".
570 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
571 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
572 OMP_CLAUSE_SET_MAP_KIND.
573 (c_finish_oacc_parallel, c_finish_oacc_kernels)
574 (c_finish_oacc_data): New functions.
575 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
576 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
577 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
578 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
579 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
580 GOMP_MAP_FORCE_DEVICEPTR.
582 2015-01-09 Michael Collison <michael.collison@linaro.org>
584 * c-array-notation.c: Include hash-set.h, machmode.h,
585 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
586 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
587 * c-aux-info.c: Ditto.
588 * c-convert.c: Ditto.
592 * c-objc-common.c: Ditto.
594 * c-typeck.c: Include hash-set.h, machmode.h,
595 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
596 fold-const.h, wide-int.h, inchash.h, real.h and
597 fixed-value.h due to flattening of tree.h.
599 2015-01-07 Marek Polacek <polacek@redhat.com>
602 * c-typeck.c (process_init_element): Disallow initialization of
603 a flexible array member with a string constant if the structure
606 2015-01-05 Jakub Jelinek <jakub@redhat.com>
609 * c-typeck.c (convert_for_assignment, c_finish_return): For
610 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
611 types also set in_late_binary_op around convert call.
612 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
613 to integral type casts, if not in_late_binary_op, pass c_fully_fold
614 result on expr as last argument to ubsan_instrument_float_cast,
615 if in_late_binary_op, don't use c_save_expr but save_expr.
617 Update copyright years.
619 2015-01-05 Marek Polacek <polacek@redhat.com>
622 * c-typeck.c (build_array_ref): Pass loc down to
623 warn_array_subscript_with_type_char.
625 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
627 * c-typeck.c: New behavious for pointers to arrays with qualifiers
628 (common-pointer-type): For pointers to arrays take qualifiers from
630 (build_conditional_expr): Add warnings for lost qualifiers.
631 (comp-target-types): Allow pointers to arrays with different qualifiers.
632 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
633 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
634 to PEDWARN_FOR_QUALIFIERS.
636 2014-12-17 Jakub Jelinek <jakub@redhat.com>
639 * c-convert.c: Include ubsan.h.
640 (convert): For real -> integral casts and
641 -fsanitize=float-cast-overflow don't call convert_to_integer, but
642 instead instrument the float cast directly.
644 2014-11-29 Jakub Jelinek <jakub@redhat.com>
646 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
647 c_finish_stmt_expr): Remove NULL last argument from
648 create_tmp_var_raw and create_tmp_var calls.
649 * c-array-notation.c (fix_builtin_array_notation_fn,
650 build_array_notation_expr, fix_conditional_array_notations_1,
651 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
653 2014-11-28 Marek Polacek <polacek@redhat.com>
656 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
657 convert the right operand to integer type.
659 2014-11-25 Marek Polacek <polacek@redhat.com>
662 * c-decl.c (start_function): Disable -Wmissing-declarations warning
663 for inline functions.
665 2014-11-21 Jakub Jelinek <jakub@redhat.com>
668 * c-typeck.c (build_array_ref): Adjust
669 convert_vector_to_pointer_for_subscript caller. If it returns true,
670 call non_lvalue_loc on the result.
672 2014-11-11 Richard Biener <rguenther@suse.de>
674 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
677 2014-11-10 Andi Kleen <ak@linux.intel.com>
680 * c-parser.c (c_parser_statement_after_labels): Call
682 (c_parser_if_statement): Dito.
683 (c_parser_switch_statement): Dito.
684 (c_parser_while_statement): Dito.
685 (c_parser_do_statement): Dito.
686 (c_parser_for_statement): Dito.
687 * c-typeck.c (c_finish_loop): Dito.
689 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
691 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
692 OPT_Wshift_count_overflow in the warnings.
694 2014-10-30 Marek Polacek <polacek@redhat.com>
696 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
697 print the stripped version as well, if they're not the same.
699 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
701 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
704 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
706 * c-decl.c: Adjust include files.
709 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
710 Tom Tromey <tromey@redhat.com>
712 * c-tree.h (enum c_oracle_request): New.
713 (c_binding_oracle_function): New typedef.
714 (c_binding_oracle, c_pushtag, c_bind): Declare.
715 * c-decl.c (c_binding_oracle): New global.
716 (I_SYMBOL_CHECKED): New macro.
717 (i_symbol_binding): New function.
718 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
719 (I_TAG_CHECKED): New macro.
720 (i_tag_binding): New function.
721 (I_TAG_BINDING, I_TAG_DECL): Redefine.
722 (I_LABEL_CHECKED): New macro.
723 (i_label_binding): New function.
724 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
725 (c_print_identifier): Save and restore c_binding_oracle.
726 (c_pushtag, c_bind): New functions.
728 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
730 * c-typeck.c: Adjust include files.
732 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
735 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
736 initialization here...
737 (c_initialize_diagnostics): ... but here. Set defaults after
738 building pretty-printer.
740 2014-10-23 Marek Polacek <polacek@redhat.com>
743 * c-decl.c (pop_scope): Don't print warning in external_scope.
745 2014-10-19 Marek Polacek <polacek@redhat.com>
748 * c-typeck.c (output_init_element): Allow initializing objects with
749 static storage duration with compound literals even in C99 and add
752 2014-10-17 Marek Polacek <polacek@redhat.com>
755 * c-typeck.c (digest_init): Allow initializing objects with static
756 storage duration with compound literals even in C99 and add pedwarn
759 2014-10-17 Marek Polacek <polacek@redhat.com>
762 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
763 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
764 error multiple times. Print the type.
766 2014-10-17 Marek Polacek <polacek@redhat.com>
769 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
772 2014-10-17 Marek Polacek <polacek@redhat.com>
774 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
775 (start_function): Use OPT_Wimplicit_int instead of 0.
776 (store_parm_decls_oldstyle): Likewise.
778 2014-10-17 Alan Modra <amodra@gmail.com>
781 * c-decl.c (merge_decls): Don't merge section name or tls model
782 to newdecl symtab node, instead merge to olddecl. Override
783 existing olddecl section name. Set tls_model for all thread-local
784 vars, not just OMP thread-private ones. Remove incorrect comment.
786 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
788 * c-decl.c: Adjust include files.
790 2014-10-14 DJ Delorie <dj@redhat.com>
792 * c-parser.c (c_parse_init): Add RID entries for each __intN.
793 (c_token_starts_typename): Check all __intN, not just __int128.
794 (c_token_starts_declspecs): Likewise.
795 (c_parser_declspecs): Likewise.
796 (c_parser_attribute_any_word): Likewise.
797 (c_parser_objc_selector): Likewise.
798 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
799 (struct c_declspecs): Add int_n_idx field to record *which* __intN
801 * c-decl.c (declspecs_add_type): Check for all __intN, not just
803 (finish_declspecs): Likewise.
805 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
807 * c-parser.c (c_parser_all_labels): New function to replace
809 (c_parser_statement): Call the new function.
811 2014-10-09 Marek Polacek <polacek@redhat.com>
814 * c-typeck.c (pop_init_level): Don't warn about initializing
817 2014-10-07 Marek Polacek <polacek@redhat.com>
820 * c-decl.c (header_for_builtin_fn): New function.
821 (implicitly_declare): Suggest which header to include.
823 2014-10-07 Marek Polacek <polacek@redhat.com>
825 * c-convert.c (convert): Use error_operand_p.
826 * c-typeck.c (require_complete_type): Likewise.
827 (really_atomic_lvalue): Likewise.
828 (digest_init): Likewise.
829 (handle_omp_array_sections_1): Likewise.
831 2014-10-03 Marek Polacek <polacek@redhat.com>
834 * c-decl.c (pop_scope): Don't warn about "inline function declared
835 but never defined" for functions marked with gnu_inline attribute.
837 2014-09-25 Jakub Jelinek <jakub@redhat.com>
840 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
841 on low_bound and length.
843 2014-09-24 Marek Polacek <polacek@redhat.com>
847 * c-parser.c: Don't define CPP_KEYWORD.
848 (c_parser_switch_statement): Pass original type to c_finish_case.
849 * c-tree.h (c_finish_case): Update declaration.
850 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
851 conditionally to c_do_switch_warnings.
853 2014-09-03 Marek Polacek <polacek@redhat.com>
856 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
859 2014-09-02 Jakub Jelinek <jakub@redhat.com>
860 Balaji V. Iyer <balaji.v.iyer@intel.com>
861 Igor Zamyatin <igor.zamyatin@intel.com>
863 * c-parser.c (c_parser_cilk_for): New function.
864 (c_parser_cilk_grainsize): Likewise.
865 (c_get_temp_regvar): Likewise.
866 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
867 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
868 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
869 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
872 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
874 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
875 with using HOST_WIDE_INT without truncation to 'int'
877 2014-08-22 Marek Polacek <polacek@redhat.com>
880 * c-typeck.c (parser_build_binary_op): Adjust call to
881 warn_logical_not_parentheses.
883 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
886 * c-parser.c (c_parser_array_notation): Check for correct
887 type of an array added.
889 2014-08-19 Marek Polacek <polacek@redhat.com>
892 * c-typeck.c (build_binary_op): If either operand of a comparison
893 is a boolean expression, call maybe_warn_bool_compare.
895 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
898 * c-typeck.c (build_c_cast): Do a conversion even when the
899 TYPE_MAIN_VARIANTs are the same.
901 2014-08-19 Marek Polacek <polacek@redhat.com>
903 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
904 pedwarn_c99 instead of pedwarn.
905 (grokfield): Likewise.
906 (warn_defaults_to): New function.
907 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
908 Unconditionally call pedwarn_c99 instead of pedwarn.
909 (start_function): Call warn_defaults_to instead of pedwarn_c99.
910 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
911 check flag_isoc11 before.
912 * c-errors.c (pedwarn_c99): Change the return type to bool.
913 Handle -Wc99-c11-compat.
914 * c-parser.c (disable_extension_diagnostics): Handle
916 (restore_extension_diagnostics): Likewise.
917 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
918 instead of pedwarn, don't check flag_isoc11 before.
919 (c_parser_declspecs): Likewise.
920 (c_parser_alignas_specifier): Likewise.
921 (c_parser_alignof_expression): Likewise.
922 (c_parser_generic_selection): Likewise.
923 * c-tree.h (pedwarn_c99): Update declaration.
924 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
927 2014-08-19 Marek Polacek <polacek@redhat.com>
929 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
931 * c-errors.c: Include "opts.h".
932 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
933 * c-parser.c (disable_extension_diagnostics): Handle negative value
934 of warn_c90_c99_compat, too.
935 (restore_extension_diagnostics): Likewise.
936 (c_parser_compound_statement_nostart): Pass
937 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
939 2014-08-12 Marek Polacek <polacek@redhat.com>
941 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
943 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
945 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
947 2014-08-10 Marek Polacek <polacek@redhat.com>
950 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
951 Call pedwarn_c90 instead of pedwarn.
952 (check_bitfield_type_and_width): Likewise.
953 (declspecs_add_qual): Likewise.
954 (declspecs_add_type): Likewise.
955 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
956 Adjust to only call pedwarn_c90.
957 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
958 pedwarn_c90 instead of pedwarn.
959 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
960 * c-parser.c (disable_extension_diagnostics): Handle
962 (restore_extension_diagnostics): Likewise.
963 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
964 pedwarn_c90 instead of pedwarn.
965 (c_parser_initelt): Likewise.
966 (c_parser_postfix_expression): Likewise.
967 (c_parser_postfix_expression_after_paren_type): Likewise.
968 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
969 * c-tree.h: Fix formatting.
970 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
971 pedwarn_c90 instead of pedwarn.
973 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
975 * c-typeck.c: Remove include of pointer-set.h.
977 2014-08-07 Marek Polacek <polacek@redhat.com>
979 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
981 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
983 * c-typeck.c: Use hash_map instead of pointer_map.
985 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
987 * c-decl.c: Use hash_set instead of pointer_set.
989 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
992 * c-array-notation.c (expand_array_notations): Handling
995 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
998 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1001 2014-07-30 Tom Tromey <tromey@redhat.com>
1003 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1005 (really_start_incremental_init, push_init_level): Initialize
1007 (pop_init_level): Set global designator_depth.
1008 (process_init_element): Check for designated_init attribute.
1010 2014-07-20 Marek Polacek <polacek@redhat.com>
1013 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1014 (implicitly_declare): Pass location to implicit_decl_warning.
1016 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1019 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1020 If non-NULL, call c_parser_check_literal_zero.
1021 (c_parser_check_literal_zero): New function.
1022 (c_parser_postfix_expression_after_primary): Adjust
1023 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1025 2014-07-06 Marek Polacek <polacek@redhat.com>
1028 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1029 * c-tree.h (C_ARRAY_PARAMETER): Define.
1030 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1033 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
1034 Chen Gang <gang.chen.5i5j@gmail.com>
1036 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1039 2014-07-01 Marek Polacek <polacek@redhat.com>
1041 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1042 instead of 0 to WARN_FOR_ASSIGNMENT.
1044 2014-07-01 Marek Polacek <polacek@redhat.com>
1047 * c-typeck.c (convert_for_assignment): Pass
1048 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1050 2014-06-30 Marek Polacek <polacek@redhat.com>
1052 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1053 has no_sanitize_undefined attribute.
1055 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1058 * c-array-notation.c (fix_builtin_array_notation_fn):
1059 Check for 0 arguments in builtin call. Check that bultin argument is
1061 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1064 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1066 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1067 qualifiers in __auto_type for atomic types.
1068 (c_parser_typeof_specifier): Discard all type qualifiers in
1069 __typeof__ for atomic types.
1071 2014-06-25 Marek Polacek <polacek@redhat.com>
1074 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1075 the return expression to c_finish_return.
1077 2014-06-25 Jakub Jelinek <jakub@redhat.com>
1079 * c-typeck.c (c_finish_omp_clauses): Make sure
1080 OMP_CLAUSE_LINEAR_STEP has correct type.
1082 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1086 2014-06-24 Jakub Jelinek <jakub@redhat.com>
1088 * c-parser.c (c_parser_omp_for_loop): For
1089 #pragma omp parallel for simd move lastprivate clause from parallel
1090 to for rather than simd.
1092 2014-06-23 Marek Polacek <polacek@redhat.com>
1094 * c-typeck.c (parser_build_binary_op): Don't call
1095 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1097 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1099 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1100 * c-decl.c (merge_decls): Likewise.
1102 2014-06-09 Marek Polacek <polacek@redhat.com>
1105 * c-typeck.c (error_init): Call inform instead of error_at.
1106 (pedwarn_init): Call inform instead of pedwarn.
1107 (warning_init): Call inform instead of warning_at.
1109 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
1111 * c-decl.c (merge_decls): Use set_decl_section_name.
1112 (duplicate_decls): Remove node if it exists.
1114 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1117 * c-typeck.c (push_init_level, process_init_element,
1118 pop_init_level): Correct check for zero initialization, move
1119 missing brace warning to respect zero initialization.
1121 2014-06-05 Marek Polacek <polacek@redhat.com>
1124 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1126 2014-06-05 Marek Polacek <polacek@redhat.com>
1129 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1130 on the left hand side operand of a comparison.
1132 2014-06-05 Marek Polacek <polacek@redhat.com>
1135 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1136 Print note only if the warning was printed.
1138 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1141 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1144 2014-06-03 Marek Polacek <polacek@redhat.com>
1147 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1149 * c-tree.h (c_start_case): Update.
1150 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1151 switch condition has boolean value.
1153 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
1155 * c-decl.c: Include builtins.h.
1156 * c-parser.c: Likewise.
1158 2014-05-27 Marek Polacek <polacek@redhat.com>
1161 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1162 error and warning calls to error_at and warning_at. Pass location of
1163 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1164 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1165 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1167 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1170 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1171 function parameters.
1173 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1175 * c-decl.c (merge_decls): Preserve symtab node pointers.
1176 (duplicate_decls): Free new decl.
1178 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1180 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1183 * c-parser.c (c_parser_omp_target): Return bool values.
1185 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1187 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1188 num_teams_loc variable to num_thread_limit_loc.
1190 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1192 * c-array-notation.c (expand_array_notations): Use void_node
1193 instead of void_zero_node.
1195 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1197 * c-decl.c (finish_struct): Adjust.
1198 (finish_enum): Likewise.
1200 (record_inline_static): Likewise.
1201 (push_scope): Likewise.
1202 (make_label): Likewise.
1203 (lookup_label_for_goto): Likewise.
1204 (finish_struct): Likewise.
1205 (finish_enum): Likewise.
1206 (store_parm_decls): Likewise.
1207 (c_push_function_context): Likewise.
1208 * c-lang.h: Remove usage of variable_size gty attribute.
1209 * c-parser.c (c_parse_init): Adjust.
1210 (c_parse_file): Likewise.
1212 2014-05-13 Marek Polacek <polacek@redhat.com>
1215 * c-typeck.c (convert_for_assignment): Pass location to
1216 WARN_FOR_ASSIGNMENT instead of input_location.
1218 2014-05-10 Marek Polacek <polacek@redhat.com>
1220 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1221 maybe_warn_string_init.
1222 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1223 maybe_warn_string_init.
1224 * c-tree.h (maybe_warn_string_init): Update declaration.
1225 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1226 Call pedwarn_init with loc instead of with input_location.
1227 (digest_init): Pass init_loc to maybe_warn_string_init.
1228 (pop_init_level): Call pedwarn_init with loc instead of with
1230 (set_init_index): Likewise.
1231 (process_init_element): Likewise.
1233 2014-05-09 Marek Polacek <polacek@redhat.com>
1236 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1237 (c_parser_initelt): Pass location to set_init_label. Pass array index
1238 location to set_init_index.
1239 * c-tree.h (push_init_level): Update declaration.
1240 (pop_init_level): Likewise.
1241 (set_init_index): Likewise.
1242 (set_init_label): Likewise.
1243 * c-typeck.c (error_init): Add location parameter. Call error_at
1245 (digest_init): Pass init_loc to error_init.
1246 (really_start_incremental_init):
1247 (push_init_level): Add location parameter. Pass loc to pop_init_level
1249 (pop_init_level): Likewise.
1250 (set_designator): Add location parameter. Pass loc to pop_init_level,
1251 push_init_level, and error_init.
1252 (set_init_index): Add location parameter. Pass loc to error_init and
1254 (set_init_label): Likewise.
1255 (output_init_element): Pass loc to error_init.
1256 (process_init_element): Pass loc to error_init, pop_init_level,
1257 pedwarn_init, and push_init_level.
1259 2014-05-09 Marek Polacek <polacek@redhat.com>
1262 * c-parser.c (c_parser_attributes): Parse the arguments as an
1263 expression-list if the attribute takes identifier.
1265 2014-05-08 Marek Polacek <polacek@redhat.com>
1268 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1271 2014-05-08 Marek Polacek <polacek@redhat.com>
1274 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1277 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1278 Mike Stump <mikestump@comcast.net>
1279 Richard Sandiford <rdsandiford@googlemail.com>
1281 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1282 (finish_enum): Use wide-int interfaces.
1283 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1284 * c-typeck.c (build_c_cast): Likewise.
1285 (set_nonincremental_init_from_string): Likewise.
1286 (c_tree_equal): Likewise.
1288 2014-05-02 Marek Polacek <polacek@redhat.com>
1291 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1292 Return size_one_node when the type is not complete.
1293 (pointer_diff): Remove comment.
1294 (build_unary_op): Improve error messages.
1296 2014-05-02 Marek Polacek <polacek@redhat.com>
1298 * c-typeck.c (c_finish_return): Separate warning_at calls.
1300 2014-05-02 Marek Polacek <polacek@redhat.com>
1302 * c-tree.h (error_init): Remove declaration.
1303 (pedwarn_init): Likewise.
1304 * c-typeck.c (error_init): Make static and move above.
1305 (pedwarn_init): Likewise.
1306 (warning_init): Move above.
1307 (maybe_warn_string_init): Likewise.
1309 2014-05-01 Jeff Law <law@redhat.com>
1313 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1314 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1317 2014-05-02 Marek Polacek <polacek@redhat.com>
1320 * c-typeck.c (push_init_level): Set constructor_designated to
1321 p->designated for structures.
1323 2014-05-01 Marek Polacek <polacek@redhat.com>
1326 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1327 function-definition has an attribute after the declarator.
1329 2014-05-01 Marek Polacek <polacek@redhat.com>
1332 * c-typeck.c (warning_init): Add location_t parameter. Call
1333 warning_at instead of warning.
1334 (push_init_level): Pass input_location to warning_init.
1335 (add_pending_init): Add location_t parameter. Pass loc to
1337 (set_nonincremental_init): Pass input_location to add_pending_init.
1338 (set_nonincremental_init_from_string): Likewise.
1339 (output_init_element): Pass loc to warning_init and to
1342 2014-05-01 Marek Polacek <polacek@redhat.com>
1345 * c-typeck.c (c_finish_return): Distinguish between label and variable
1346 when warning about returning local address.
1348 2014-05-01 Marek Polacek <polacek@redhat.com>
1351 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1354 2014-05-01 Marek Polacek <polacek@redhat.com>
1357 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1358 instead of 0 to WARN_FOR_QUALIFIERS.
1360 2014-05-01 Marek Polacek <polacek@redhat.com>
1363 * c-typeck.c (default_conversion): Use better location for
1366 2014-04-30 Marek Polacek <polacek@redhat.com>
1368 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1369 also when SANITIZE_FLOAT_DIVIDE is on.
1371 2014-04-30 Marek Polacek <polacek@redhat.com>
1374 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1375 and pedwarn_init. Use loc insted of input_location.
1377 2014-04-30 Marek Polacek <polacek@redhat.com>
1380 * c-typeck.c (build_binary_op): Use location when warning about
1383 2014-04-25 Marek Polacek <polacek@redhat.com>
1386 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1387 always_inline/noinline and hot/cold attributes.
1389 2014-04-25 Marek Polacek <polacek@redhat.com>
1392 * c-parser.c (c_parser_initelt): Pass input_location to
1393 process_init_element.
1394 (c_parser_initval): Pass loc to process_init_element.
1395 * c-tree.h (process_init_element): Adjust declaration.
1396 * c-typeck.c (push_init_level): Pass input_location to
1397 process_init_element.
1398 (pop_init_level): Likewise.
1399 (set_designator): Likewise.
1400 (output_init_element): Add location_t parameter. Pass loc to
1402 (output_pending_init_elements): Pass input_location to
1403 output_init_element.
1404 (process_init_element): Add location_t parameter. Pass loc to
1405 output_init_element.
1407 2014-04-24 Jakub Jelinek <jakub@redhat.com>
1409 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1410 atomic-clause, allow comma in between atomic-clause and
1413 2014-04-22 Jakub Jelinek <jakub@redhat.com>
1416 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1417 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1419 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1422 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1423 create_tmp_var instead build_decl for creating temps.
1424 (build_array_notation_expr): Likewise.
1425 (fix_conditional_array_notations_1): Likewise.
1426 (fix_array_notation_expr): Likewise.
1427 (fix_array_notation_call_expr): Likewise.
1429 2014-03-28 Jakub Jelinek <jakub@redhat.com>
1432 * c-tree.h (c_build_function_call_vec): New prototype.
1433 * c-typeck.c (build_function_call_vec): Don't call
1434 resolve_overloaded_builtin here.
1435 (c_build_function_call_vec): New wrapper function around
1436 build_function_call_vec. Call resolve_overloaded_builtin here.
1437 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1438 Call c_build_function_call_vec instead of build_function_call_vec.
1439 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1440 * c-decl.c (finish_decl): Likewise.
1442 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1445 * c-typeck.c: Use correct format string in cast-qual warning
1447 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1449 * c-decl.c (c_decl_attributes): Use
1450 lang_hooks.types.omp_mappable_type.
1451 * c-typeck.c (c_finish_omp_clauses): Likewise.
1453 2014-03-06 Marek Polacek <polacek@redhat.com>
1456 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1457 of checking tree code.
1459 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1461 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1462 (c_parser_parameter_declaration): Likewise.
1464 2014-02-19 Marek Polacek <polacek@redhat.com>
1467 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1468 Call mark_exp_read on exp.value.
1469 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1470 TREE_ADDRESSABLE on old instead of val.
1471 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1473 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1475 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1476 C_EXPR_APPEND by vec_safe_push.
1477 * c-tree.h (C_EXPR_APPEND): Remove.
1479 2014-01-31 Marek Polacek <polacek@redhat.com>
1482 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1483 build_function_call_vec.
1484 (build_function_call): Likewise.
1485 (build_atomic_assign): Likewise.
1486 (build_function_call_vec): Add arg_loc parameter. Use it.
1487 (convert_arguments): Likewise.
1488 (convert_for_assignment): Rename rhs_loc to expr_loc.
1489 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1490 (c_parser_objc_keywordexpr): Likewise.
1491 (c_parser_postfix_expression_after_primary): Call
1492 build_function_call_vec with expr_loc rather than op_loc.
1493 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1494 build_function_call_vec.
1495 (c_parser_expr_list): Add locations parameter. Fill it with locations
1496 of function arguments.
1497 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1499 2014-01-30 Marek Polacek <polacek@redhat.com>
1502 * c-typeck.c (build_function_call_vec): Use loc parameter.
1503 (convert_arguments): Add location parameter. Use it.
1504 (ep_convert_and_check): Likewise.
1505 (build_atomic_assign): Adjust convert_for_assignment call.
1506 (build_modify_expr): Likewise.
1507 (digest_init): Likewise.
1508 (c_finish_return): Likewise.
1509 (build_conditional_expr): Adjust ep_convert_and_check calls.
1510 (convert_for_assignment): Add rhs_loc parameter. Use it.
1511 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1514 2014-01-30 Richard Biener <rguenther@suse.de>
1517 * c-typeck.c (build_function_call_vec): Do not replace calls
1518 to a function via an incompatible type with a runtime abort.
1520 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1522 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1523 flag_enable_cilkplus with flag_cilkplus.
1524 (c_parser_direct_declarator_inner): Likewise.
1525 (c_parser_attribute_any_word): Likewise.
1526 (c_parser_attributes): Likewise.
1527 (c_parser_compound_statement): Likewise.
1528 (c_parser_statement_after_labels): Likewise.
1529 (c_parser_if_statement): Likewise.
1530 (c_parser_switch_statement): Likewise.
1531 (c_parser_do_statement): Likewise.
1532 (c_parser_for_statement): Likewise.
1533 (c_parser_unary_expression): Likewise.
1534 (c_parser_postfix_expression): Likewise.
1535 (c_parser_postfix_expression_after_primary): Likewise.
1536 (c_parser_postfix_expression_after_primary): Likewise.
1537 (c_parser_omp_clause_name): Likewise.
1538 (c_finish_omp_declare_simd): Likewise.
1539 (c_parser_cilk_verify_simd): Likewise.
1540 * c-typeck.c (build_array_ref): Likewise.
1541 (build_function_call_vec): Likewise.
1542 (convert_arguments): Likewise.
1543 (build_compound_expr): Likewise.
1544 (c_finish_return): Likewise.
1545 (c_finish_if_stmt): Likewise.
1546 (c_finish_loop): Likewise.
1547 (build_binary_op): Likewise.
1549 2014-01-23 Marek Polacek <polacek@redhat.com>
1552 * c-typeck.c (parser_build_binary_op): Use location instead of
1554 (build_binary_op): Pass location to shorten_compare.
1556 2014-01-23 Marek Polacek <polacek@redhat.com>
1559 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1562 2014-01-23 Marek Polacek <polacek@redhat.com>
1565 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1566 of a comma expression.
1567 (emit_side_effect_warnings): Likewise.
1569 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1572 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1573 function to use walk_tree and moved a lot of its functionality to
1574 expand_array_notations.
1575 (expand_array_notations): New function.
1577 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1579 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1580 attribute an attribute without value.
1582 2014-01-23 Jakub Jelinek <jakub@redhat.com>
1585 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1586 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1588 2014-01-22 Marek Polacek <polacek@redhat.com>
1591 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1592 of remove_c_maybe_const_expr on op1 and op2.
1594 2014-01-15 Jakub Jelinek <jakub@redhat.com>
1597 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1598 effects, preevaluate rhs using SAVE_EXPR first.
1600 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1603 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1604 statements with if-elseif statements.
1606 2014-01-06 Marek Polacek <polacek@redhat.com>
1609 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1610 defined bit-field types only in ISO C.
1612 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1614 Update copyright years
1616 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1618 * c-array-notation.c: Use the standard form for the copyright notice.
1620 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1622 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1623 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1624 field in parser is not empty. If not-empty, call the function
1625 c_parser_finish_omp_declare_simd.
1626 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1627 between SIMD-enabled functions and #pragma simd. Added new parameter.
1628 (c_parser_cilk_all_clauses): Modified the usage of the function
1629 c_parser_cilk_clause_vectorlength as mentioned above.
1630 (c_parser_cilk_simd_fn_vector_attrs): New function.
1631 (c_finish_cilk_simd_fn_tokens): Likewise.
1632 (is_cilkplus_vector_p): Likewise.
1633 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1634 "nomask," and "mask" strings in clause name.
1635 (c_parser_omp_all_clauses): Added 3 new case statements:
1636 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1637 PRAGMA_CILK_CLAUSE_NOMASK.
1638 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1639 check for vector attribute and if so call the function
1640 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1641 called the function c_finish_cilk_simd_fn_tokens.
1642 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1643 parser field is non-empty. If so, parse them as you would parse
1644 the omp declare simd pragma.
1645 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1646 Added a check when step is a parameter and flag it as error.
1647 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1648 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1651 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1653 * c-parser.c (c_parser_omp_parallel): Fix description.
1655 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1657 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1658 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1659 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1660 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1662 2013-12-04 Joseph Myers <joseph@codesourcery.com>
1665 * c-parser.c (c_parser_alignas_specifier): Use
1666 c_sizeof_or_alignof_type instead of c_alignof.
1667 (c_parser_alignof_expression): Likewise, with min_alignof
1668 parameter depending on alignof spelling used.
1670 2013-12-04 Marek Polacek <polacek@redhat.com>
1673 * c-decl.c (start_function): Don't warn for missing prototype for
1676 2013-12-03 Marek Polacek <polacek@redhat.com>
1679 * c-decl.c (build_compound_literal): Allow compound literals with
1680 empty initial value.
1682 2013-12-02 Joseph Myers <joseph@codesourcery.com>
1685 * c-typeck.c (build_modify_expr): Diagnose assignment to
1686 expression with array type.
1688 2013-11-29 Joseph Myers <joseph@codesourcery.com>
1691 * c-typeck.c (process_init_element): Do not treat a string as
1692 initializing a whole array when used with a designator for an
1695 2013-11-29 Joseph Myers <joseph@codesourcery.com>
1698 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1699 an inline function following a static declaration.
1701 2013-11-28 Jakub Jelinek <jakub@redhat.com>
1704 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1705 to p_name before calling c_parser_omp_teams instead of after.
1706 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1707 argument. Remove unused p_name variable.
1709 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
1710 Jakub Jelinek <jakub@redhat.com>
1712 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1713 external_scope is NULL.
1715 2013-11-27 Tom de Vries <tom@codesourcery.com>
1716 Marc Glisse <marc.glisse@inria.fr>
1719 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1721 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
1723 * c-typeck.c: Add required include files from gimple.h.
1725 2013-11-22 David Malcolm <dmalcolm@redhat.com>
1727 * c-decl.c (define_label, shadow_tag_warned)
1728 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1729 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1730 (declspecs_add_type): Remove use of in_system_header macro.
1731 * c-parser.c (c_parser_unary_expression): Likewise.
1732 * c-typeck.c (store_init_value, process_init_element)
1733 (c_start_case): Likewise.
1735 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1738 * c-parser.c (c_parser_set_source_position_from_token): Remove
1739 reference to in_system_header from comment.
1741 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1743 * c-decl.c (grokdeclarator): Update comment to refer to
1744 tree_to_[su]hwi rather than tree_low_cst.
1746 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1748 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1749 tree_to_uhwi throughout.
1751 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1753 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1756 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1758 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1761 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
1763 * c-parser.c (c_parser_cilk_simd): New.
1764 (c_parser_cilk_verify_simd): New.
1765 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1766 (c_parser_omp_for_loop): Add case for NE_EXPR.
1767 Set c_break_label for CILK_SIMD.
1768 (c_parser_cilk_clause_vectorlength): New.
1769 (c_parser_cilk_clause_linear): New.
1770 (c_parser_cilk_clause_name): New.
1771 (c_parser_cilk_all_clauses): New.
1772 * c-typeck.c (build_unary_op): Pass location argument to
1774 (build_modify_expr): Same.
1775 (build_asm_expr): Same.
1776 (c_finish_bc_stmt): Error on break/continue in loops.
1778 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
1780 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1782 2013-11-14 Diego Novillo <dnovillo@google.com>
1784 * c-decl.c: Include print-tree.h.
1785 Include stor-layout.h.
1788 Include stringpool.h.
1789 * c-lang.c: Include fold-const.h.
1790 * c-parser.c: Include stringpool.h.
1792 Include stor-layout.h.
1794 Include trans-mem.h.
1795 * c-typeck.c: Include stor-layout.h.
1796 Include trans-mem.h.
1800 2013-11-13 Joseph Myers <joseph@codesourcery.com>
1802 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1803 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1805 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1806 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1808 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1809 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1810 (c_parser_declarator, c_parser_direct_declarator_inner)
1811 (c_parser_parameter_declaration, c_parser_type_name): All callers
1813 (c_parser_declaration_or_fndef): Handle declarations with type
1814 determined from the initializer.
1816 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
1818 * c-typeck.c: Include gimplify.h.
1820 2013-11-12 Joseph Myers <joseph@codesourcery.com>
1822 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1823 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1825 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1826 or _Thread_local as appropriate in diagnostics.
1827 (build_null_declspecs): Initialize ret->thread_gnu_p.
1828 (declspecs_add_scspec): Handle either __thread or _Thread_local
1829 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1830 pedantic. Do not disallow _Thread_local extern and _Thread_local
1833 2013-11-07 Joseph Myers <joseph@codesourcery.com>
1834 Andrew MacLeod <amacleod@redhat.com>
1836 * c-aux-info.c (gen_type): Handle atomic qualifier.
1837 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1838 qualifiers when compating types.
1839 (shadow_tag_warned): Handle atomic_p in declspecs.
1840 (quals_from_declspecs): Likewise.
1841 (start_decl): Use c_type_promotes_to when promoting argument
1843 (grokdeclarator): Handle _Atomic.
1844 (get_parm_info): Diagnose any qualifier on "void" as only
1846 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1847 comparing types. Use c_type_promotes_to when promoting argument
1849 (finish_function): Use c_type_promotes_to when promoting argument
1851 (build_null_declspecs): Handle atomic_p in declspecs.
1852 (declspecs_add_qual): Handle RID_ATOMIC.
1853 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1854 (c_token_starts_declspecs): Handle RID_ATOMIC.
1855 (c_parser_declspecs): Handle atomic type specifiers and
1857 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1858 from types of expressions with atomic type.
1859 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1860 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1861 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1862 (c_parser_statement_after_labels, c_parser_switch_statement)
1863 (c_parser_for_statement, c_parser_expr_no_commas)
1864 (c_parser_conditional_expression, c_parser_binary_expression)
1865 (c_parser_cast_expression, c_parser_unary_expression)
1866 (c_parser_postfix_expression)
1867 (c_parser_postfix_expression_after_primary, c_parser_expression):
1868 Use convert_lvalue_to_rvalue.
1869 (c_parser_expression_conv, c_parser_expr_list): Document
1870 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1871 (c_parser_objc_synchronized_statement): Use
1872 convert_lvalue_to_rvalue.
1873 (c_parser_objc_selector): Handle RID_ATOMIC.
1874 (c_parser_objc_receiver, c_parser_array_notation): Use
1875 convert_lvalue_to_rvalue.
1876 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1877 _Atomic (type-name).
1878 (struct c_declspecs): Add atomic_p field.
1879 (convert_lvalue_to_rvalue): Declare.
1880 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1881 corresponding atomic types.
1882 (qualify_type): Don't add _Atomic qualifiers from second argument.
1883 (comp_target_types): Do not allow _Atomic mismatches.
1884 (type_lists_compatible_p): Do not remove atomic qualifiers when
1886 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1887 (build_atomic_assign): New functions.
1888 (build_unary_op): Use build_atomic_assign for atomic increment and
1890 (build_conditional_expr): Do not treat _Atomic void as a qualified
1892 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1893 (find_anonymous_field_with_type, convert_to_anonymous_field)
1894 (convert_for_assignment): Do not remove atomic qualifiers when
1896 (digest_init): Do not accept initialization of arrays of atomic
1897 elements by string constants.
1898 (build_asm_expr): Use convert_lvalue_to_rvalue.
1899 (build_binary_op): Do not treat _Atomic void as a qualified
1902 2013-11-06 DJ Delorie <dj@redhat.com>
1904 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1905 both explicit and builtin, print the location of the explicit one.
1907 2013-11-05 Tobias Burnus <burnus@net-b.de>
1909 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1910 c_parser_omp_distribute, c_parser_omp_teams,
1911 c_parser_omp_target, c_parser_omp_declare): Handle
1914 2013-11-03 Marek Polacek <polacek@redhat.com>
1916 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1918 2013-11-01 Jakub Jelinek <jakub@redhat.com>
1920 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1921 check_dup_generic at the end, unless remove is true.
1922 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1924 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1926 2013-10-31 Jakub Jelinek <jakub@redhat.com>
1928 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1929 with decl that is not pointer nor array.
1931 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1933 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1934 a spawning function is found.
1935 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1936 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1937 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1938 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1940 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1941 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1943 (c_finish_return): Added a check to reject _Cilk_spawn in return
1945 (build_cilk_spawn): New function.
1946 (build_cilk_sync): Likewise.
1947 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1949 2013-10-27 Tobias Burnus <burnus@net-b.de>
1952 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1953 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1954 (c_parser_statement_after_labels): Update calls.
1956 2013-10-24 Tobias Burnus <burnus@net-b.de>
1959 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1960 Handle PRAGMA_IVDEP.
1961 (c_parser_statement_after_labels): Update call.
1963 2013-10-24 Marek Polacek <polacek@redhat.com>
1965 * c-parser.c (c_parser_struct_declaration): Add a comment.
1966 (c_parser_declarator): Don't allow _Alignas here.
1968 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
1970 * c-parser.c: Include omp-low.h.
1971 * c-typeck.c: Likewise.
1973 2013-10-17 Marek Polacek <polacek@redhat.com>
1976 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1977 Document syntax of the array-declarator.
1978 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1980 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1981 (c_parser_struct_declaration): Likewise.
1982 (c_parser_declarator): Likewise.
1983 (c_parser_direct_declarator_inner): Likewise.
1984 (c_parser_parameter_declaration): Likewise.
1985 (c_parser_type_name): Likewise.
1987 2013-10-11 Jakub Jelinek <jakub@redhat.com>
1989 * c-lang.h (current_omp_declare_target_attribute): New extern
1991 * c-parser.c: Include c-lang.h.
1992 (struct c_parser): Change tokens to c_token *.
1993 Add tokens_buf field. Change tokens_avail type to unsigned int.
1994 (c_parser_consume_token): If parser->tokens isn't
1995 &parser->tokens_buf[0], increment parser->tokens.
1996 (c_parser_consume_pragma): Likewise.
1997 (enum pragma_context): Add pragma_struct and pragma_param.
1998 (c_parser_external_declaration): Adjust
1999 c_parser_declaration_or_fndef caller.
2000 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2001 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2002 Adjust recursive call.
2003 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2005 (c_parser_parameter_declaration): Use pragma_param instead of
2007 (c_parser_compound_statement_nostart, c_parser_label,
2008 c_parser_for_statement): Adjust
2009 c_parser_declaration_or_fndef callers.
2010 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2011 it through to c_parser_conditional_expression.
2012 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2013 pass it through to c_parser_binary_expression. Adjust recursive
2015 (c_parser_binary_expression): Remove prec argument, add
2016 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2017 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2018 binop matches it, use build2 instead of parser_build_binary_op.
2019 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2020 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2021 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2022 Handle pragma_struct and pragma_param the same as pragma_external.
2023 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2024 (c_parser_omp_variable_list): Parse array sections for
2025 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2026 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2027 (c_parser_omp_clause_reduction): Handle user defined reductions.
2028 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2029 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2030 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2031 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2032 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2033 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2034 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2035 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2036 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2037 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2038 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2039 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2040 (c_parser_omp_for_loop): Add CODE argument, pass it through
2041 to c_finish_omp_for. Change last argument to cclauses,
2042 and adjust uses to grab parallel clauses from the array of all
2043 the split clauses. Adjust c_parser_binary_expression,
2044 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2045 (omp_split_clauses): New function.
2046 (c_parser_omp_simd): New function.
2047 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2048 Allow the function to be called also when parsing combined constructs,
2049 and call c_parser_omp_simd when parsing for simd.
2050 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2051 #pragma omp section, require exactly one structured-block instead of
2052 sequence of statements.
2053 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2054 Allow the function to be called also when parsing combined constructs.
2055 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2056 Allow the function to be called also when parsing combined
2058 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2059 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2060 c_parser_omp_teams, c_parser_omp_target_data,
2061 c_parser_omp_target_update, c_parser_omp_target,
2062 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2063 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2064 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2065 (c_parser_omp_construct): Add p_name and mask vars. Handle
2066 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2067 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2068 and c_parser_omp_sections callers.
2069 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2070 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2071 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2072 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2073 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2075 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2076 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2077 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2078 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2079 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2080 * c-typeck.c: Include tree-inline.h.
2081 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2082 handle_omp_array_sections_1, handle_omp_array_sections,
2083 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2084 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2085 user defined reductions.
2086 (c_tree_equal): New function.
2087 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2088 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2089 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2090 c_check_omp_declare_reduction_r): New prototypes.
2091 * c-decl.c (current_omp_declare_target_attribute): New variable.
2092 (c_decl_attributes): New function.
2093 (start_decl, start_function): Use it instead of decl_attributes.
2094 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2095 c_omp_reduction_decl, c_omp_reduction_lookup,
2096 c_check_omp_declare_reduction_r): New functions.
2098 2013-09-25 Tom Tromey <tromey@redhat.com>
2100 * Make-lang.in (c/gccspec.o): Remove.
2101 (CFLAGS-c/gccspec.o): New variable.
2102 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2103 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2104 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2106 2013-09-25 Tom Tromey <tromey@redhat.com>
2108 * Make-lang.in (c/gccspec.o): Don't use subshell.
2110 2013-09-18 Marek Polacek <polacek@redhat.com>
2113 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2114 Remove unnecessary check.
2116 2013-09-18 Marek Polacek <polacek@redhat.com>
2119 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2120 no_sanitize_undefined attribute.
2122 2013-09-13 Kai Tietz <ktietz@redhat.com>
2125 * c-decl.c (c_builtin_function_ext_scope): Remove
2126 wrong assumption that it is never called on prexisting
2129 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2131 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2133 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2135 * c-objc-common.c (c_tree_printer): Tidy.
2137 2013-08-30 Marek Polacek <polacek@redhat.com>
2139 * c-typeck.c (build_binary_op): Add division by zero and shift
2142 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
2143 Joseph Myers <joseph@codesourcery.com>
2146 * c-typeck.c (c_common_type): Prefer double_type_node over
2147 other REAL_TYPE types with the same precision.
2148 (convert_arguments): Likewise.
2150 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2152 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2153 (c_initialize_diagnostics): Call a destructor for the early printer.
2155 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2157 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2158 printer initialization.
2160 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
2163 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2164 check for truth values.
2165 (expand_array_notation_exprs): Added truth values case. Removed an
2166 unwanted else. Added for-loop to walk through subtrees in default
2169 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2171 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2173 2013-07-23 Joseph Myers <joseph@codesourcery.com>
2175 * c-parser.c (struct c_generic_association): Fix typo.
2177 2013-07-23 Tom Tromey <tromey@redhat.com>
2178 Joseph Myers <joseph@codesourcery.com>
2180 * c-parser.c (struct c_generic_association): New.
2181 (c_generic_association_d): New typedef.
2182 (c_parser_generic_selection): New function.
2183 (c_parser_postfix_expression): Handle RID_GENERIC.
2185 2013-07-13 Jason Merrill <jason@redhat.com>
2188 * c-decl.c (finish_struct): Check for too-large class.
2190 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
2193 * c-typeck.c (set_init_index): When folding, check for index overflow.
2195 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2197 * c-parser.c (c_parser_array_notation): Removed rejection of array
2198 notations in an array of function pointers.
2200 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2202 * c-array-notation.c (make_triplet_val_inv): New function.
2203 (create_cmp_incr): Likewise.
2204 (create_array_refs): Likewise.
2205 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2206 Also modularized common parts between functions and called the function.
2207 (build_array_notation_expr): Likewise.
2208 (fix_conditional_array_notations_1): Likewise.
2209 (fix_array_notation_expr): Likewise.
2210 (fix_array_notation_call_expr): Likewise.
2212 2013-06-18 Marek Polacek <polacek@redhat.com>
2215 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2217 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2219 * c-array-notation.c (build_array_notation_expr): Reject array notation
2220 mismatch between LHS and RHS even inside a call_expr. Also, removed
2221 a couple while statements that were dead code.
2223 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2225 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2226 excessive precision expressions in function parameters. Also removed
2227 couple unwanted while statements.
2229 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2231 * c-array-notation.c (expand_array_notation_exprs): Added
2232 ARRAY_NOTATION_REF case.
2234 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2236 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2237 function to c-family/array-notation-common.c.
2238 (is_cilkplus_reduce_builtin): Likewise.
2239 (find_rank): Likewise.
2240 (extract_array_notation_exprs): Likewise.
2241 (replace_array_notations): Likewise.
2242 (find_inv_trees): Likewise.
2243 (replace_inv_trees): Likewise.
2244 (contains_array_notation_expr): Likewise.
2245 (find_correct_array_notation_type): Likewise.
2246 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2247 (struct inv_list): Moved this to c-family/array-notation-common.c.
2248 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2250 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2252 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2253 reduction functions outside the for-loop. Added a check if the fundecl
2254 is non-NULL. Finally, removed an unwanted if-statement, and made the
2257 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2259 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2260 condition of the if-statement matches the rank of else-block and then-
2261 block when array notations are used.
2262 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2263 expression after the entire function body is parsed.
2264 (c_parser_expr_no_commas): Delayed creating array notation expressions
2265 to the end of function parsing.
2266 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2267 whole if-statement instead of just the condition.
2268 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2270 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2273 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2274 array to NULL_TREE if they are unused. Also added a check for the
2275 field to be NULL before its fields are used in future.
2277 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2280 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2281 (build_array_notation_expr): Likewise.
2283 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2285 * c-typeck.c (build_array_ref): Added a check to see if array's
2286 index is greater than one. If true, then emit an error.
2287 (build_function_call_vec): Exclude error reporting and checking
2288 for builtin array-notation functions.
2289 (convert_arguments): Likewise.
2290 (c_finish_return): Added a check for array notations as a return
2291 expression. If true, then emit an error.
2292 (c_finish_loop): Added a check for array notations in a loop
2293 condition. If true then emit an error.
2294 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2295 (build_binary_op): Added a check for array notation expr inside
2296 op1 and op0. If present, we call another function to find correct
2298 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2299 * c-parser.c (c_parser_compound_statement): Check if array
2300 notation code is used in tree, if so, then transform them into
2302 (c_parser_expr_no_commas): Check if array notation is used in LHS
2303 or RHS, if so, then build array notation expression instead of
2305 (c_parser_postfix_expression_after_primary): Added a check for
2306 colon(s) after square braces, if so then handle it like an array
2307 notation. Also, break up array notations in unary op if found.
2308 (c_parser_direct_declarator_inner): Added a check for array
2310 (c_parser_compound_statement): Added a check for array notation in
2311 a stmt. If one is present, then expand array notation expr.
2312 (c_parser_if_statement): Likewise.
2313 (c_parser_switch_statement): Added a check for array notations in
2314 a switch statement's condition. If true, then output an error.
2315 (c_parser_while_statement): Similarly, but for a while.
2316 (c_parser_do_statement): Similarly, but for a do-while.
2317 (c_parser_for_statement): Similarly, but for a for-loop.
2318 (c_parser_unary_expression): Check if array notation is used in a
2319 pre-increment or pre-decrement expression. If true, then expand
2321 (c_parser_array_notation): New function.
2322 * c-array-notation.c: New file.
2323 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2325 2013-05-23 Mike Stump <mikestump@comcast.net>
2327 * c-typeck.c (convert_for_assignment): Handle references to memory
2330 2013-05-16 Jason Merrill <jason@redhat.com>
2332 * Make-lang.in (cc1$(exeext)): Use link mutex.
2334 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2336 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2337 to simply use OPT_Wpointer_arith.
2338 (build_unary_op): Likewise.
2340 2013-04-03 Jakub Jelinek <jakub@redhat.com>
2343 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2344 argument. If set, or it temporarily for parsing of the first
2345 argument into force_folding_builtin_constant_p.
2346 (c_parser_postfix_expression): Adjust callers.
2348 2013-03-21 Richard Biener <rguenther@suse.de>
2350 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2351 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2353 2013-02-12 Marek Polacek <polacek@redhat.com>
2356 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2359 2013-01-24 Jakub Jelinek <jakub@redhat.com>
2362 * c-typeck.c (set_nonincremental_init_from_string): If
2363 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2365 (process_init_element): Likewise.
2367 2012-12-20 Jakub Jelinek <jakub@redhat.com>
2370 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2371 argument, don't call default_function_array_conversion
2372 nor c_fully_fold here.
2373 (c_parser_asm_statement): Adjust callers.
2374 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2375 and outputs here, and call default_function_array_conversion
2376 on inputs that don't need to be addressable.
2378 2012-12-18 Jakub Jelinek <jakub@redhat.com>
2381 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2382 warning require that both c_common_unsigned_type as well as
2383 c_common_signed_type is the same for both mvl and mvr types.
2385 2012-11-16 Diego Novillo <dnovillo@google.com>
2387 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2389 * c-common.c: Use new vec API in vec.h.
2390 * c-common.h: Likewise.
2391 * c-gimplify.c: Likewise.
2392 * c-pragma.c: Likewise.
2393 * c-pretty-print.c: Likewise.
2394 * c-pretty-print.h: Likewise.
2395 * c-semantics.c: Likewise.
2396 * c-decl.c: Likewise.
2397 * c-parser.c: Likewise.
2398 * c-tree.h: Likewise.
2399 * c-typeck.c: Likewise.
2401 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2404 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2406 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2409 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2410 shadows a function, unless the variable is a function or a
2411 pointer-to-function.
2413 2012-10-12 Jakub Jelinek <jakub@redhat.com>
2416 * c-parser.c (struct c_tree_loc_pair): Removed.
2417 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2418 add location_t * and tree * arguments, fill in array of 3
2419 sizeof_arg trees and corresponding locs.
2420 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2421 c_parser_expr_list callers.
2422 (c_parser_postfix_expression_after_primary): Likewise. Pass
2423 array of 3 sizeof_arg trees and locs (corresponding to first
2424 3 arguments) to sizeof_pointer_memaccess_warning.
2426 2012-10-09 Lawrence Crowl <crowl@google.com>
2428 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2429 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2432 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2435 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2438 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
2441 * c-typeck.c: Include c-common.h.
2442 (enum stv_conv): Moved to c-common.h.
2443 (scalar_to_vector): Moved to c-common.c.
2444 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2445 * Make-lang.in: c-typeck.c depends on c-common.h.
2447 2012-10-04 Arnaud Charlet <charlet@adacore.com>
2449 * c-decl.c (c_write_global_declarations): Fix handling of
2452 2012-09-30 Sharad Singhai <singhai@google.com>
2454 * c-decl.c (c_write_global_declarations): Use a different method
2455 to determine if the dump has ben initialized.
2457 2012-09-14 Joseph Myers <joseph@codesourcery.com>
2460 * c-typeck.c (c_cast_expr): When casting to a type requiring
2461 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2464 2012-09-14 Joseph Myers <joseph@codesourcery.com>
2467 * c-typeck.c (build_unary_op): Pass original argument of
2468 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2469 any C_MAYBE_CONST_EXPR, if it has integer operands.
2470 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2471 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2472 to c_objc_common_truthvalue_conversion, then remove any
2473 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2474 c_objc_common_truthvalue_conversion not
2475 c_common_truthvalue_conversion.
2476 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2477 call note_integer_operands for arguments with integer operands
2478 that are not integer constants.
2480 2012-09-13 Jakub Jelinek <jakub@redhat.com>
2483 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2484 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2486 2012-08-31 Jakub Jelinek <jakub@redhat.com>
2489 * c-convert.c (convert): Don't call fold_convert_loc if
2490 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2491 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2492 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2494 2012-08-24 Jakub Jelinek <jakub@redhat.com>
2497 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2498 for nested and empty_ok arguments in the call to
2499 c_parser_declaration_or_fndef.
2501 2012-08-17 Jakub Jelinek <jakub@redhat.com>
2503 * c-tree.h (c_last_sizeof_arg): Declare.
2504 * c-parser.c (struct c_tree_loc_pair): New type.
2505 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2507 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2508 (c_parser_postfix_expression_after_primary): Likewise. Call
2509 sizeof_pointer_memaccess_warning if needed.
2510 (sizeof_ptr_memacc_comptypes): New function.
2511 * c-typeck.c (c_last_sizeof_arg): New global variable.
2512 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2514 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
2516 * c-lang.h (lang_decl): Add variable_size GTY option.
2518 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2520 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2521 * Make-lang.in: Fix dependencies.
2523 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2525 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2526 and add language Makefile hooks.
2527 * config-lang.in: New file.
2528 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2529 add the required "normal" config-lang.in rules.
2530 * c-lang.h: Moved from gcc/ to here.
2531 * c-tree.h: Likewise.
2532 * c-objc-common.c: Likewise.
2533 * c-objc-common.h: Likewise.
2534 * c-typeck.c: Likewise.
2535 * c-convert.c: Likewise.
2536 * c-lang.c: Likewise.
2537 * c-aux-info.c: Likewise.
2538 * c-errors.c: Likewise.
2539 * gccspec.c: Likewise.
2540 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2541 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2543 Copyright (C) 2012-2015 Free Software Foundation, Inc.
2545 Copying and distribution of this file, with or without modification,
2546 are permitted in any medium without royalty provided the copyright
2547 notice and this notice are preserved.