1 2015-11-05 Jakub Jelinek <jakub@redhat.com>
2 Ilya Verbin <ilya.verbin@intel.com>
4 * c-parser.c: Include context.h and gimple-expr.h.
5 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
6 monotonic together with nonmonotonic.
7 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
8 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
9 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
10 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
11 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
12 expressions on combined target teams before the target.
13 (c_parser_omp_declare_target): If decl has "omp declare target" or
14 "omp declare target link" attribute, and cgraph or varpool node already
15 exists, then set corresponding flags. Call c_finish_omp_clauses
16 in the parenthesized extended-list syntax case.
17 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
19 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
20 on OMP_CLAUSE_REDUCTION array sections.
21 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
22 into the constant offset, or for variable low-bound using
23 POINTER_PLUS_EXPR. For structure element based array sections use
24 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
25 (c_finish_omp_clauses): Drop generic_field_head, structure
26 elements are now always mapped even as array section bases,
27 diagnose same var in data sharing and mapping clauses. Diagnose if
28 linear step on declare simd is neither a constant nor a uniform
29 parameter. Look through POINTER_PLUS_EXPR for array section
30 reductions. Diagnose the same var or function appearing multiple
31 times on the same directive. Fix up wording for the to clause if t
32 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
33 modifier on kinds other than dynamic or guided or nonmonotonic
34 modifier together with ordered clause.
36 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
37 Chung-Lin Tang <cltang@codesourcery.com>
39 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
41 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
43 * c-array-notation.c: Reorder #include's and remove duplicates.
44 * c-aux-info.c: Likewise.
45 * c-convert.c: Likewise.
47 * c-errors.c: Likewise.
49 * c-objc-common.c: Likewise.
50 * c-parser.c: Likewise.
51 * c-typeck.c: Likewise.
53 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
56 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
57 after calling build_qualified_type.
59 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
60 Thomas Schwinge <thomas@codesourcery.com>
61 James Norris <jnorris@codesourcery.com>
62 Joseph Myers <joseph@codesourcery.com>
63 Julian Brown <julian@codesourcery.com>
64 Bernd Schmidt <bschmidt@redhat.com>
66 * c-parser.c (c_parser_oacc_shape_clause): New.
67 (c_parser_oacc_simple_clause): New.
68 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
69 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
71 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
72 James Norris <jnorris@codesourcery.com>
73 Cesar Philippidis <cesar@codesourcery.com>
77 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
78 parameters, and handle these. Adjust all users.
79 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
81 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
83 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
85 (c_finish_omp_construct): Declare function.
86 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
87 Merge functions into...
88 (c_finish_omp_construct): ... this new function.
90 2015-10-22 Richard Biener <rguenther@suse.de>
92 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
93 before folding a MINUS_EXPR.
95 2015-10-21 Marek Polacek <polacek@redhat.com>
98 * c-decl.c (start_function): Warn about vararg functions without
101 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
103 * c-typeck.c (build_conditional_expr): Use boolean vector
104 type for vector comparison.
105 (build_vec_cmp): New.
106 (build_binary_op): Use build_vec_cmp for comparison.
108 2015-10-20 Marek Polacek <polacek@redhat.com>
110 * c-parser.c (is_cilkplus_vector_p): Don't define here.
112 2015-10-20 Marek Polacek <polacek@redhat.com>
115 * c-parser.c (c_parser_attributes): Break out of the loop if the
116 token after an attribute isn't a comma.
118 2015-10-13 Jakub Jelinek <jakub@redhat.com>
119 Aldy Hernandez <aldyh@redhat.com>
121 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
122 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
123 (c_parser_omp_variable_list): Handle structure elements for
124 map, to and from clauses. Handle array sections in reduction
125 clause. Formatting fixes.
126 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
128 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
129 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
130 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
131 c_parser_omp_clause_is_device_ptr): New functions.
132 (c_parser_omp_clause_ordered): Parse optional parameter.
133 (c_parser_omp_clause_reduction): Handle array reductions.
134 (c_parser_omp_clause_schedule): Parse optional simd modifier.
135 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
137 (c_parser_omp_clause_linear): Parse linear clause modifiers.
138 (c_parser_omp_clause_depend_sink): New function.
139 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
140 (c_parser_omp_clause_map): Parse release/delete map kinds and
141 optional always modifier.
142 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
143 and c_finish_omp_clauses callers.
144 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
145 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
146 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
147 (OMP_CRITICAL_CLAUSE_MASK): Define.
148 (c_parser_omp_critical): Parse critical clauses.
149 (c_parser_omp_for_loop): Handle doacross loops, adjust
150 c_finish_omp_for and c_finish_omp_clauses callers.
151 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
152 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
153 (OMP_FOR_CLAUSE_MASK): Add linear clause.
154 (c_parser_omp_for): Disallow ordered clause when combined with
155 distribute. Disallow linear clause when combined with distribute
156 and not combined with simd.
157 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
158 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
159 parse clauses and if depend clause is found, don't parse a body.
160 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
161 Allow target parallel without for after it.
162 (OMP_TASK_CLAUSE_MASK): Add priority clause.
163 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
164 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
166 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
167 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
168 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
169 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
171 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
172 defaultmap and is_device_ptr clauses.
173 (c_parser_omp_target): Parse target parallel and target simd. Set
174 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
175 and target exit data. Diagnose invalid map kinds.
176 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
177 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
179 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
181 (OMP_TASKLOOP_CLAUSE_MASK): Define.
182 (c_parser_omp_taskloop): New function.
183 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
184 handle PRAGMA_OMP_TASKLOOP.
185 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
186 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
187 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
188 Add IS_OMP argument, handle structure element bases, diagnose
189 bitfields, pass IS_OMP recursively, diagnose known zero length
190 array sections in depend clauses, handle array sections in reduction
191 clause, diagnose negative length even for pointers.
192 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
193 types, pass IS_OMP down to handle_omp_array_sections_1, handle
194 array sections in reduction clause, set
195 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
196 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
197 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
198 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
200 2015-10-06 Marek Polacek <polacek@redhat.com>
202 * c-parser.c (c_parser_statement_after_labels): Use
203 protected_set_expr_location.
204 (c_parser_omp_clause_num_gangs): Likewise.
205 (c_parser_omp_clause_num_threads): Likewise.
206 (c_parser_omp_clause_num_workers): Likewise.
207 (c_parser_omp_clause_vector_length): Likewise.
208 (c_parser_omp_clause_num_teams): Likewise.
209 (c_parser_omp_clause_thread_limit): Likewise.
210 * c-typeck.c (build_c_cast): Likewise.
211 (c_cast_expr): Likewise.
213 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
215 * c-typeck.c (c_tree_equal): Use real_equal instead of
218 2015-10-04 Jason Merrill <jason@redhat.com>
220 * c-parser.c (c_lex_one_token): Handle @synchronized.
221 * c-decl.c (match_builtin_function_types): A declaration of a built-in
222 can change whether the function is transaction_safe.
224 2015-10-02 Marek Polacek <polacek@redhat.com>
227 * c-typeck.c (convert_for_assignment): Use the expansion point
230 2015-10-02 Marek Polacek <polacek@redhat.com>
233 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
234 and pass it down to c_parser_if_statement.
235 (c_parser_else_body): Add CHAIN parameter and pass it down to
236 c_parser_statement_after_labels.
237 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
238 duplicated if-else-if conditions.
240 2015-10-01 Marek Polacek <polacek@redhat.com>
242 * c-typeck.c (convert_for_assignment): Improve commentary.
244 2015-09-30 Marek Polacek <polacek@redhat.com>
247 * c-typeck.c (c_finish_return): Use the expansion point location for
248 certain "return with value" warnings.
250 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
252 * c-parser.c (pragma_lex): Add loc argument.
254 2015-09-15 Marek Polacek <polacek@redhat.com>
257 * c-decl.c (tag_exists_p): New function.
258 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
259 struct/union/enum keywords are missing.
260 * c-tree.h (tag_exists_p): Declare.
262 2015-09-15 Marek Polacek <polacek@redhat.com>
264 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
265 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
266 Return NULL_TREE instead of 0.
267 (lookup_name): Return NULL_TREE instead of 0.
268 (lookup_name_in_scope): Likewise.
269 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
270 (parser_xref_tag): Use false instead of 0.
271 (start_struct): Use true instead of 1.
272 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
274 2015-09-14 Marek Polacek <polacek@redhat.com>
276 * c-typeck.c (set_nonincremental_init_from_string): Use
277 HOST_WIDE_INT_M1U when shifting a negative value.
279 2015-09-09 Mark Wielaard <mjw@redhat.com>
281 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
284 2015-09-10 Jakub Jelinek <jakub@redhat.com>
287 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
288 into OMP_FOR_PRE_BODY rather than before the loop.
290 2015-09-09 Jakub Jelinek <jakub@redhat.com>
293 * c-parser.c (c_parser_oacc_all_clauses,
294 c_parser_omp_all_clauses): Remove invalid clause from
295 list of clauses even if parser->error is set.
298 * c-parser.c (c_parser_omp_clause_aligned,
299 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
301 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
305 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
306 instead of c_parser_unary_expression. If the result is !lvalue_p,
307 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
309 2015-09-04 Marek Polacek <polacek@redhat.com>
312 * c-typeck.c (build_binary_op): Don't instrument static initializers.
314 2015-09-03 Martin Sebor <msebor@redhat.com>
317 * c-typeck.c (convert_arguments, parser_build_unary_op,
318 build_conditional_expr, c_cast_expr, convert_for_assignment,
319 build_binary_op, _objc_common_truthvalue_conversion): Call
321 (c_decl_implicit): Define.
323 2015-09-02 Marek Polacek <polacek@redhat.com>
326 * c-parser.c (c_parser_enum_specifier): Give a better error for
329 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
331 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
333 2015-08-12 Marek Polacek <polacek@redhat.com>
335 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
338 2015-08-03 Marek Polacek <polacek@redhat.com>
341 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
343 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
345 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
347 * c-parser.c (c_parser_if_body): Take token_indent_info
348 argument. Call warn_for_misleading_indentation even when the
349 body is a semicolon. Extract token_indent_infos corresponding
350 to the guard, body and next tokens. Adjust call to
351 warn_for_misleading_indentation accordingly.
352 (c_parser_else_body): Likewise.
353 (c_parser_if_statement): Likewise.
354 (c_parser_while_statement): Likewise.
355 (c_parser_for_statement): Likewise.
357 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
358 Manuel López-Ibáñez <manu@gcc.gnu.org>
360 * c-decl.c (get_parm_info): Remove static var. Update warning
363 2015-07-27 Marek Polacek <polacek@redhat.com>
367 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
369 2015-07-20 Marek Polacek <polacek@redhat.com>
372 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
373 (build_binary_op): Warn about left shift overflows.
375 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
377 * c-array-notation.c: Adjust includes for flags.h changes.
378 * c-objc-common.c: Likewise.
380 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
382 * c-array-notation.c: Adjust includes.
383 * c-aux-info.c: Likewise.
384 * c-convert.c: Likewise.
385 * c-decl.c: Likewise.
386 * c-errors.c: Likewise.
387 * c-lang.c: Likewise.
388 * c-objc-common.c: Likewise.
389 * c-parser.c: Likewise.
390 * c-typeck.c: Likewise.
392 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
395 * c-decl.c (finish_function): Call do_warn_unused_parameter.
397 2015-06-29 Marek Polacek <polacek@redhat.com>
400 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
401 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
402 about -Wswitch-bool here.
403 (do_case): Update c_add_case_label call.
404 (c_finish_case): Update c_do_switch_warnings call.
406 2015-06-27 Marek Polacek <polacek@redhat.com>
408 * c-typeck.c: Use VECTOR_TYPE_P throughout.
410 2015-06-26 Marek Polacek <polacek@redhat.com>
412 * c-array-notation.c (fix_builtin_array_notation_fn): Use
414 * c-typeck.c (array_to_pointer_conversion): Likewise.
415 (build_unary_op): Likewise.
416 (c_finish_return): Likewise.
418 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
420 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
421 * c-parser.c: Likewise.
423 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
425 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
426 instead of pointer_hash.
427 (detect_field_duplicates): Likewise.
429 2015-06-25 Marek Polacek <polacek@redhat.com>
431 * c-array-notation.c: Use VAR_P throughout.
432 * c-decl.c: Likewise.
433 * c-objc-common.c: Likewise.
434 * c-parser.c: Likewise.
435 * c-typeck.c: Likewise.
437 2015-06-25 Marek Polacek <polacek@redhat.com>
439 * c-decl.c: Use is_global_var throughout.
440 * c-parser.c: Likewise.
441 * c-typeck.c: Likewise.
443 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
445 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
446 * c-aux-info.c: Likewise.
447 * c-convert.c: Likewise.
448 * c-decl.c: Likewise.
449 * c-errors.c: Likewise.
450 * c-lang.c: Likewise.
451 * c-objc-common.c: Likewise.
452 * c-parser.c: Likewise.
453 * c-typeck.c: Likewise.
455 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
458 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
461 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
463 * c-decl.c (pop_scope): Register the main translation unit
464 through the new debug hook.
466 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
468 * c-array-notation.c : Adjust include files.
469 * c-aux-info.c : Likewise.
470 * c-convert.c : Likewise.
471 * c-decl.c : Likewise.
472 * c-errors.c : Likewise.
473 * c-lang.c : Likewise.
474 * c-lang.h : Likewise.
475 * c-objc-common.c : Likewise.
476 * c-parser.c : Likewise.
477 * c-typeck.c : Likewise.
479 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
481 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
482 immediately clobber it.
483 (c_write_global_declarations_1): Remove call to
484 check_global_declaration_1.
485 (c_write_global_declarations_2): Remove.
486 (c_write_final_cleanups): Rename from c_write_global_declarations.
487 Remove call to finalize_compilation_unit.
488 Remove calls to debugging hooks.
489 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
490 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
491 * c-tree.h: Remove c_write_global_declarations.
493 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
495 * c-array-notation.c: Adjust includes for restructured coretypes.h.
496 * c-aux-info.c: Likewise.
497 * c-convert.c: Likewise.
498 * c-decl.c: Likewise.
499 * c-errors.c: Likewise.
500 * c-lang.c: Likewise.
501 * c-objc-common.c: Likewise.
502 * c-parser.c: Likewise.
503 * c-typeck.c: Likewise.
505 2015-06-04 Marek Polacek <polacek@redhat.com>
508 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
511 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
513 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
514 Warn for empty struct.
515 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
517 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
519 * c-decl.c (start_function): Call plugin before parsing.
520 (finish_function): Call plugin after parsing.
522 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
525 * c-decl.c (merge_decls): Merge DECL_COMMON.
527 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
529 * Make-lang.in (check_gcc_pallelize): Define.
531 2015-05-22 Marek Polacek <polacek@redhat.com>
534 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
537 2015-05-21 Marek Polacek <polacek@redhat.com>
539 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
542 2015-05-20 Marek Polacek <polacek@redhat.com>
544 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
545 * c-typeck.c: Likewise.
547 2015-05-19 Marek Polacek <polacek@redhat.com>
549 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
551 2015-05-19 Jakub Jelinek <jakub@redhat.com>
554 * c-parser.c (c_parser_omp_for_loop): Don't add
555 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
556 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
557 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
560 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
562 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
565 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
568 * c-objc-common.c (c_tree_printer): Replace locus pointer with
571 2015-05-14 Marek Polacek <polacek@redhat.com>
575 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
578 2015-05-12 David Malcolm <dmalcolm@redhat.com>
580 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
581 to add a call to warn_for_misleading_indentation.
582 (c_parser_else_body): Likewise, adding param "else_loc".
583 (c_parser_if_statement): Check for misleading indentation.
584 (c_parser_while_statement): Likewise.
585 (c_parser_for_statement): Likewise.
587 2015-05-08 Marek Polacek <polacek@redhat.com>
590 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
591 (output_init_element): Likewise.
593 2015-05-07 Marek Polacek <polacek@redhat.com>
596 * c-typeck.c (build_binary_op): Warn when left shifting a negative
599 2015-04-30 Marek Polacek <polacek@redhat.com>
601 * c-typeck.c (set_init_label): Call error_at instead of error and
604 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
607 * c-typeck.c (c_build_va_arg): Clarify the error message.
609 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
611 * c-parser.c (c_parser_oacc_enter_exit_data): Use
612 OMP_STANDALONE_CLAUSES.
614 2015-04-28 Marek Polacek <polacek@redhat.com>
616 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
618 2015-04-28 Marek Polacek <polacek@redhat.com>
621 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
623 2015-04-25 Marek Polacek <polacek@redhat.com>
626 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
629 2015-04-23 Marek Polacek <polacek@redhat.com>
632 * c-decl.c (set_labels_context_r): New function.
633 (store_parm_decls): Call it via walk_tree_without_duplicates.
634 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
635 instead of create_tmp_var. Build TARGET_EXPR instead of
637 (build_atomic_assign): Use create_tmp_var_raw instead of
638 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
640 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
642 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
643 (c_parser_omp_target_update): Add missed %> to error_at ().
645 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
648 * c-decl.c (c_default_pointer_mode): Remove definition.
649 * c-tree.h (c_default_pointer_mode): Remove declaration.
651 2015-03-27 Tobias Burnus <burnus@net-b.de>
654 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
656 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
657 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
658 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
660 2015-03-19 Jakub Jelinek <jakub@redhat.com>
662 * c-decl.c (c_decl_attributes): Also add "omp declare target"
663 attribute for DECL_EXTERNAL VAR_DECLs.
665 2015-03-11 Jakub Jelinek <jakub@redhat.com>
667 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
670 2015-03-10 Jakub Jelinek <jakub@redhat.com>
673 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
674 before preparing arguments to warn_logical_not_parentheses.
676 2015-03-09 Jakub Jelinek <jakub@redhat.com>
679 * c-typeck.c (parser_build_binary_op): Don't warn for
680 !!x == y or !b == y where b is _Bool.
682 2015-03-09 Marek Polacek <polacek@redhat.com>
684 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
685 * c-decl.c (grokdeclarator): Likewise.
686 * c-typeck.c (build_binary_op): Likewise.
688 2015-02-27 Marek Polacek <polacek@redhat.com>
691 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
693 2015-02-14 Marek Polacek <polacek@redhat.com>
696 * c-decl.c (grokdeclarator): Set the range of a flexible array member
697 declared through a typedef name.
699 2015-02-13 Marek Polacek <polacek@redhat.com>
702 * c-decl.c (grokdeclarator): Print also the type when giving
703 the error message about array's incomplete element type.
705 2015-02-11 Jakub Jelinek <jakub@redhat.com>
708 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
709 check in the POP macro.
711 2015-02-09 Marek Polacek <polacek@redhat.com>
714 * c-typeck.c (process_init_element): Don't always wrap
715 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
716 initializing a range of elements.
718 2015-02-04 Jakub Jelinek <jakub@redhat.com>
722 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
724 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
726 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
727 processing enum declaration.
729 2015-01-29 Marek Polacek <polacek@redhat.com>
732 * c-typeck.c (pop_init_level): If constructor_elements has
733 exactly one element with integer_zerop value, set constructor_zeroinit
734 to 1. Remove braces around warning_init call.
736 2015-01-27 Jakub Jelinek <jakub@redhat.com>
739 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
740 of FUNCTION_DECLs with error_mark_node.
742 2015-01-26 Jakub Jelinek <jakub@redhat.com>
745 * c-typeck.c (convert_arguments): Return -1 if there are
746 error_args, even if we've diagnosed too many arguments.
748 2015-01-21 Richard Biener <rguenther@suse.de>
751 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
752 for builtins the user declared correctly.
754 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
755 Bernd Schmidt <bernds@codesourcery.com>
756 Cesar Philippidis <cesar@codesourcery.com>
757 James Norris <jnorris@codesourcery.com>
758 Jakub Jelinek <jakub@redhat.com>
759 Ilmir Usmanov <i.usmanov@samsung.com>
761 * c-parser.c: Include "gomp-constants.h".
762 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
763 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
764 Use OMP_CLAUSE_SET_MAP_KIND.
765 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
766 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
767 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
768 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
769 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
770 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
771 "copyout", "create", "delete", "deviceptr", "gang", "host",
772 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
773 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
774 "present_or_create", "pcreate", "seq", "self", "vector",
775 "vector_length", "wait", "worker".
776 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
777 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
778 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
779 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
780 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
781 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
782 (c_parser_oacc_data_clause_deviceptr)
783 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
784 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
785 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
786 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
787 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
788 (c_parser_oacc_parallel, c_parser_oacc_update)
789 (c_parser_oacc_wait): New functions.
790 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
791 (c_finish_oacc_data): New prototypes.
792 * c-typeck.c: Include "gomp-constants.h".
793 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
794 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
795 OMP_CLAUSE_SET_MAP_KIND.
796 (c_finish_oacc_parallel, c_finish_oacc_kernels)
797 (c_finish_oacc_data): New functions.
798 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
799 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
800 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
801 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
802 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
803 GOMP_MAP_FORCE_DEVICEPTR.
805 2015-01-09 Michael Collison <michael.collison@linaro.org>
807 * c-array-notation.c: Include hash-set.h, machmode.h,
808 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
809 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
810 * c-aux-info.c: Ditto.
811 * c-convert.c: Ditto.
815 * c-objc-common.c: Ditto.
817 * c-typeck.c: Include hash-set.h, machmode.h,
818 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
819 fold-const.h, wide-int.h, inchash.h, real.h and
820 fixed-value.h due to flattening of tree.h.
822 2015-01-07 Marek Polacek <polacek@redhat.com>
825 * c-typeck.c (process_init_element): Disallow initialization of
826 a flexible array member with a string constant if the structure
829 2015-01-05 Jakub Jelinek <jakub@redhat.com>
832 * c-typeck.c (convert_for_assignment, c_finish_return): For
833 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
834 types also set in_late_binary_op around convert call.
835 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
836 to integral type casts, if not in_late_binary_op, pass c_fully_fold
837 result on expr as last argument to ubsan_instrument_float_cast,
838 if in_late_binary_op, don't use c_save_expr but save_expr.
840 Update copyright years.
842 2015-01-05 Marek Polacek <polacek@redhat.com>
845 * c-typeck.c (build_array_ref): Pass loc down to
846 warn_array_subscript_with_type_char.
848 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
850 * c-typeck.c: New behavious for pointers to arrays with qualifiers
851 (common-pointer-type): For pointers to arrays take qualifiers from
853 (build_conditional_expr): Add warnings for lost qualifiers.
854 (comp-target-types): Allow pointers to arrays with different qualifiers.
855 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
856 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
857 to PEDWARN_FOR_QUALIFIERS.
859 2014-12-17 Jakub Jelinek <jakub@redhat.com>
862 * c-convert.c: Include ubsan.h.
863 (convert): For real -> integral casts and
864 -fsanitize=float-cast-overflow don't call convert_to_integer, but
865 instead instrument the float cast directly.
867 2014-11-29 Jakub Jelinek <jakub@redhat.com>
869 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
870 c_finish_stmt_expr): Remove NULL last argument from
871 create_tmp_var_raw and create_tmp_var calls.
872 * c-array-notation.c (fix_builtin_array_notation_fn,
873 build_array_notation_expr, fix_conditional_array_notations_1,
874 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
876 2014-11-28 Marek Polacek <polacek@redhat.com>
879 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
880 convert the right operand to integer type.
882 2014-11-25 Marek Polacek <polacek@redhat.com>
885 * c-decl.c (start_function): Disable -Wmissing-declarations warning
886 for inline functions.
888 2014-11-21 Jakub Jelinek <jakub@redhat.com>
891 * c-typeck.c (build_array_ref): Adjust
892 convert_vector_to_pointer_for_subscript caller. If it returns true,
893 call non_lvalue_loc on the result.
895 2014-11-11 Richard Biener <rguenther@suse.de>
897 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
900 2014-11-10 Andi Kleen <ak@linux.intel.com>
903 * c-parser.c (c_parser_statement_after_labels): Call
905 (c_parser_if_statement): Dito.
906 (c_parser_switch_statement): Dito.
907 (c_parser_while_statement): Dito.
908 (c_parser_do_statement): Dito.
909 (c_parser_for_statement): Dito.
910 * c-typeck.c (c_finish_loop): Dito.
912 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
914 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
915 OPT_Wshift_count_overflow in the warnings.
917 2014-10-30 Marek Polacek <polacek@redhat.com>
919 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
920 print the stripped version as well, if they're not the same.
922 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
924 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
927 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
929 * c-decl.c: Adjust include files.
932 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
933 Tom Tromey <tromey@redhat.com>
935 * c-tree.h (enum c_oracle_request): New.
936 (c_binding_oracle_function): New typedef.
937 (c_binding_oracle, c_pushtag, c_bind): Declare.
938 * c-decl.c (c_binding_oracle): New global.
939 (I_SYMBOL_CHECKED): New macro.
940 (i_symbol_binding): New function.
941 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
942 (I_TAG_CHECKED): New macro.
943 (i_tag_binding): New function.
944 (I_TAG_BINDING, I_TAG_DECL): Redefine.
945 (I_LABEL_CHECKED): New macro.
946 (i_label_binding): New function.
947 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
948 (c_print_identifier): Save and restore c_binding_oracle.
949 (c_pushtag, c_bind): New functions.
951 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
953 * c-typeck.c: Adjust include files.
955 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
958 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
959 initialization here...
960 (c_initialize_diagnostics): ... but here. Set defaults after
961 building pretty-printer.
963 2014-10-23 Marek Polacek <polacek@redhat.com>
966 * c-decl.c (pop_scope): Don't print warning in external_scope.
968 2014-10-19 Marek Polacek <polacek@redhat.com>
971 * c-typeck.c (output_init_element): Allow initializing objects with
972 static storage duration with compound literals even in C99 and add
975 2014-10-17 Marek Polacek <polacek@redhat.com>
978 * c-typeck.c (digest_init): Allow initializing objects with static
979 storage duration with compound literals even in C99 and add pedwarn
982 2014-10-17 Marek Polacek <polacek@redhat.com>
985 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
986 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
987 error multiple times. Print the type.
989 2014-10-17 Marek Polacek <polacek@redhat.com>
992 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
995 2014-10-17 Marek Polacek <polacek@redhat.com>
997 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
998 (start_function): Use OPT_Wimplicit_int instead of 0.
999 (store_parm_decls_oldstyle): Likewise.
1001 2014-10-17 Alan Modra <amodra@gmail.com>
1004 * c-decl.c (merge_decls): Don't merge section name or tls model
1005 to newdecl symtab node, instead merge to olddecl. Override
1006 existing olddecl section name. Set tls_model for all thread-local
1007 vars, not just OMP thread-private ones. Remove incorrect comment.
1009 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
1011 * c-decl.c: Adjust include files.
1013 2014-10-14 DJ Delorie <dj@redhat.com>
1015 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1016 (c_token_starts_typename): Check all __intN, not just __int128.
1017 (c_token_starts_declspecs): Likewise.
1018 (c_parser_declspecs): Likewise.
1019 (c_parser_attribute_any_word): Likewise.
1020 (c_parser_objc_selector): Likewise.
1021 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1022 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1024 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1026 (finish_declspecs): Likewise.
1028 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1030 * c-parser.c (c_parser_all_labels): New function to replace
1032 (c_parser_statement): Call the new function.
1034 2014-10-09 Marek Polacek <polacek@redhat.com>
1037 * c-typeck.c (pop_init_level): Don't warn about initializing
1040 2014-10-07 Marek Polacek <polacek@redhat.com>
1043 * c-decl.c (header_for_builtin_fn): New function.
1044 (implicitly_declare): Suggest which header to include.
1046 2014-10-07 Marek Polacek <polacek@redhat.com>
1048 * c-convert.c (convert): Use error_operand_p.
1049 * c-typeck.c (require_complete_type): Likewise.
1050 (really_atomic_lvalue): Likewise.
1051 (digest_init): Likewise.
1052 (handle_omp_array_sections_1): Likewise.
1054 2014-10-03 Marek Polacek <polacek@redhat.com>
1057 * c-decl.c (pop_scope): Don't warn about "inline function declared
1058 but never defined" for functions marked with gnu_inline attribute.
1060 2014-09-25 Jakub Jelinek <jakub@redhat.com>
1063 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1064 on low_bound and length.
1066 2014-09-24 Marek Polacek <polacek@redhat.com>
1070 * c-parser.c: Don't define CPP_KEYWORD.
1071 (c_parser_switch_statement): Pass original type to c_finish_case.
1072 * c-tree.h (c_finish_case): Update declaration.
1073 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1074 conditionally to c_do_switch_warnings.
1076 2014-09-03 Marek Polacek <polacek@redhat.com>
1079 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1082 2014-09-02 Jakub Jelinek <jakub@redhat.com>
1083 Balaji V. Iyer <balaji.v.iyer@intel.com>
1084 Igor Zamyatin <igor.zamyatin@intel.com>
1086 * c-parser.c (c_parser_cilk_for): New function.
1087 (c_parser_cilk_grainsize): Likewise.
1088 (c_get_temp_regvar): Likewise.
1089 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1090 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1091 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1092 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1095 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1097 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1098 with using HOST_WIDE_INT without truncation to 'int'
1100 2014-08-22 Marek Polacek <polacek@redhat.com>
1103 * c-typeck.c (parser_build_binary_op): Adjust call to
1104 warn_logical_not_parentheses.
1106 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1109 * c-parser.c (c_parser_array_notation): Check for correct
1110 type of an array added.
1112 2014-08-19 Marek Polacek <polacek@redhat.com>
1115 * c-typeck.c (build_binary_op): If either operand of a comparison
1116 is a boolean expression, call maybe_warn_bool_compare.
1118 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1121 * c-typeck.c (build_c_cast): Do a conversion even when the
1122 TYPE_MAIN_VARIANTs are the same.
1124 2014-08-19 Marek Polacek <polacek@redhat.com>
1126 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1127 pedwarn_c99 instead of pedwarn.
1128 (grokfield): Likewise.
1129 (warn_defaults_to): New function.
1130 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1131 Unconditionally call pedwarn_c99 instead of pedwarn.
1132 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1133 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1134 check flag_isoc11 before.
1135 * c-errors.c (pedwarn_c99): Change the return type to bool.
1136 Handle -Wc99-c11-compat.
1137 * c-parser.c (disable_extension_diagnostics): Handle
1138 warn_c99_c11_compat.
1139 (restore_extension_diagnostics): Likewise.
1140 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1141 instead of pedwarn, don't check flag_isoc11 before.
1142 (c_parser_declspecs): Likewise.
1143 (c_parser_alignas_specifier): Likewise.
1144 (c_parser_alignof_expression): Likewise.
1145 (c_parser_generic_selection): Likewise.
1146 * c-tree.h (pedwarn_c99): Update declaration.
1147 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1150 2014-08-19 Marek Polacek <polacek@redhat.com>
1152 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1154 * c-errors.c: Include "opts.h".
1155 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1156 * c-parser.c (disable_extension_diagnostics): Handle negative value
1157 of warn_c90_c99_compat, too.
1158 (restore_extension_diagnostics): Likewise.
1159 (c_parser_compound_statement_nostart): Pass
1160 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1162 2014-08-12 Marek Polacek <polacek@redhat.com>
1164 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1166 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1168 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1170 2014-08-10 Marek Polacek <polacek@redhat.com>
1173 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1174 Call pedwarn_c90 instead of pedwarn.
1175 (check_bitfield_type_and_width): Likewise.
1176 (declspecs_add_qual): Likewise.
1177 (declspecs_add_type): Likewise.
1178 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1179 Adjust to only call pedwarn_c90.
1180 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1181 pedwarn_c90 instead of pedwarn.
1182 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1183 * c-parser.c (disable_extension_diagnostics): Handle
1184 warn_c90_c99_compat.
1185 (restore_extension_diagnostics): Likewise.
1186 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1187 pedwarn_c90 instead of pedwarn.
1188 (c_parser_initelt): Likewise.
1189 (c_parser_postfix_expression): Likewise.
1190 (c_parser_postfix_expression_after_paren_type): Likewise.
1191 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1192 * c-tree.h: Fix formatting.
1193 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1194 pedwarn_c90 instead of pedwarn.
1196 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1198 * c-typeck.c: Remove include of pointer-set.h.
1200 2014-08-07 Marek Polacek <polacek@redhat.com>
1202 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1204 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1206 * c-typeck.c: Use hash_map instead of pointer_map.
1208 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1210 * c-decl.c: Use hash_set instead of pointer_set.
1212 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1215 * c-array-notation.c (expand_array_notations): Handling
1218 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
1221 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1224 2014-07-30 Tom Tromey <tromey@redhat.com>
1226 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1228 (really_start_incremental_init, push_init_level): Initialize
1230 (pop_init_level): Set global designator_depth.
1231 (process_init_element): Check for designated_init attribute.
1233 2014-07-20 Marek Polacek <polacek@redhat.com>
1236 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1237 (implicitly_declare): Pass location to implicit_decl_warning.
1239 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1242 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1243 If non-NULL, call c_parser_check_literal_zero.
1244 (c_parser_check_literal_zero): New function.
1245 (c_parser_postfix_expression_after_primary): Adjust
1246 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1248 2014-07-06 Marek Polacek <polacek@redhat.com>
1251 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1252 * c-tree.h (C_ARRAY_PARAMETER): Define.
1253 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1256 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
1257 Chen Gang <gang.chen.5i5j@gmail.com>
1259 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1262 2014-07-01 Marek Polacek <polacek@redhat.com>
1264 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1265 instead of 0 to WARN_FOR_ASSIGNMENT.
1267 2014-07-01 Marek Polacek <polacek@redhat.com>
1270 * c-typeck.c (convert_for_assignment): Pass
1271 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1273 2014-06-30 Marek Polacek <polacek@redhat.com>
1275 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1276 has no_sanitize_undefined attribute.
1278 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1281 * c-array-notation.c (fix_builtin_array_notation_fn):
1282 Check for 0 arguments in builtin call. Check that bultin argument is
1284 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1287 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1289 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1290 qualifiers in __auto_type for atomic types.
1291 (c_parser_typeof_specifier): Discard all type qualifiers in
1292 __typeof__ for atomic types.
1294 2014-06-25 Marek Polacek <polacek@redhat.com>
1297 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1298 the return expression to c_finish_return.
1300 2014-06-25 Jakub Jelinek <jakub@redhat.com>
1302 * c-typeck.c (c_finish_omp_clauses): Make sure
1303 OMP_CLAUSE_LINEAR_STEP has correct type.
1305 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1309 2014-06-24 Jakub Jelinek <jakub@redhat.com>
1311 * c-parser.c (c_parser_omp_for_loop): For
1312 #pragma omp parallel for simd move lastprivate clause from parallel
1313 to for rather than simd.
1315 2014-06-23 Marek Polacek <polacek@redhat.com>
1317 * c-typeck.c (parser_build_binary_op): Don't call
1318 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1320 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1322 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1323 * c-decl.c (merge_decls): Likewise.
1325 2014-06-09 Marek Polacek <polacek@redhat.com>
1328 * c-typeck.c (error_init): Call inform instead of error_at.
1329 (pedwarn_init): Call inform instead of pedwarn.
1330 (warning_init): Call inform instead of warning_at.
1332 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
1334 * c-decl.c (merge_decls): Use set_decl_section_name.
1335 (duplicate_decls): Remove node if it exists.
1337 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1340 * c-typeck.c (push_init_level, process_init_element,
1341 pop_init_level): Correct check for zero initialization, move
1342 missing brace warning to respect zero initialization.
1344 2014-06-05 Marek Polacek <polacek@redhat.com>
1347 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1349 2014-06-05 Marek Polacek <polacek@redhat.com>
1352 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1353 on the left hand side operand of a comparison.
1355 2014-06-05 Marek Polacek <polacek@redhat.com>
1358 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1359 Print note only if the warning was printed.
1361 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1364 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1367 2014-06-03 Marek Polacek <polacek@redhat.com>
1370 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1372 * c-tree.h (c_start_case): Update.
1373 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1374 switch condition has boolean value.
1376 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
1378 * c-decl.c: Include builtins.h.
1379 * c-parser.c: Likewise.
1381 2014-05-27 Marek Polacek <polacek@redhat.com>
1384 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1385 error and warning calls to error_at and warning_at. Pass location of
1386 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1387 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1388 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1390 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1393 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1394 function parameters.
1396 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1398 * c-decl.c (merge_decls): Preserve symtab node pointers.
1399 (duplicate_decls): Free new decl.
1401 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1403 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1406 * c-parser.c (c_parser_omp_target): Return bool values.
1408 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1410 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1411 num_teams_loc variable to num_thread_limit_loc.
1413 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1415 * c-array-notation.c (expand_array_notations): Use void_node
1416 instead of void_zero_node.
1418 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1420 * c-decl.c (finish_struct): Adjust.
1421 (finish_enum): Likewise.
1423 (record_inline_static): Likewise.
1424 (push_scope): Likewise.
1425 (make_label): Likewise.
1426 (lookup_label_for_goto): Likewise.
1427 (finish_struct): Likewise.
1428 (finish_enum): Likewise.
1429 (store_parm_decls): Likewise.
1430 (c_push_function_context): Likewise.
1431 * c-lang.h: Remove usage of variable_size gty attribute.
1432 * c-parser.c (c_parse_init): Adjust.
1433 (c_parse_file): Likewise.
1435 2014-05-13 Marek Polacek <polacek@redhat.com>
1438 * c-typeck.c (convert_for_assignment): Pass location to
1439 WARN_FOR_ASSIGNMENT instead of input_location.
1441 2014-05-10 Marek Polacek <polacek@redhat.com>
1443 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1444 maybe_warn_string_init.
1445 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1446 maybe_warn_string_init.
1447 * c-tree.h (maybe_warn_string_init): Update declaration.
1448 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1449 Call pedwarn_init with loc instead of with input_location.
1450 (digest_init): Pass init_loc to maybe_warn_string_init.
1451 (pop_init_level): Call pedwarn_init with loc instead of with
1453 (set_init_index): Likewise.
1454 (process_init_element): Likewise.
1456 2014-05-09 Marek Polacek <polacek@redhat.com>
1459 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1460 (c_parser_initelt): Pass location to set_init_label. Pass array index
1461 location to set_init_index.
1462 * c-tree.h (push_init_level): Update declaration.
1463 (pop_init_level): Likewise.
1464 (set_init_index): Likewise.
1465 (set_init_label): Likewise.
1466 * c-typeck.c (error_init): Add location parameter. Call error_at
1468 (digest_init): Pass init_loc to error_init.
1469 (really_start_incremental_init):
1470 (push_init_level): Add location parameter. Pass loc to pop_init_level
1472 (pop_init_level): Likewise.
1473 (set_designator): Add location parameter. Pass loc to pop_init_level,
1474 push_init_level, and error_init.
1475 (set_init_index): Add location parameter. Pass loc to error_init and
1477 (set_init_label): Likewise.
1478 (output_init_element): Pass loc to error_init.
1479 (process_init_element): Pass loc to error_init, pop_init_level,
1480 pedwarn_init, and push_init_level.
1482 2014-05-09 Marek Polacek <polacek@redhat.com>
1485 * c-parser.c (c_parser_attributes): Parse the arguments as an
1486 expression-list if the attribute takes identifier.
1488 2014-05-08 Marek Polacek <polacek@redhat.com>
1491 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1494 2014-05-08 Marek Polacek <polacek@redhat.com>
1497 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1500 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1501 Mike Stump <mikestump@comcast.net>
1502 Richard Sandiford <rdsandiford@googlemail.com>
1504 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1505 (finish_enum): Use wide-int interfaces.
1506 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1507 * c-typeck.c (build_c_cast): Likewise.
1508 (set_nonincremental_init_from_string): Likewise.
1509 (c_tree_equal): Likewise.
1511 2014-05-02 Marek Polacek <polacek@redhat.com>
1514 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1515 Return size_one_node when the type is not complete.
1516 (pointer_diff): Remove comment.
1517 (build_unary_op): Improve error messages.
1519 2014-05-02 Marek Polacek <polacek@redhat.com>
1521 * c-typeck.c (c_finish_return): Separate warning_at calls.
1523 2014-05-02 Marek Polacek <polacek@redhat.com>
1525 * c-tree.h (error_init): Remove declaration.
1526 (pedwarn_init): Likewise.
1527 * c-typeck.c (error_init): Make static and move above.
1528 (pedwarn_init): Likewise.
1529 (warning_init): Move above.
1530 (maybe_warn_string_init): Likewise.
1532 2014-05-01 Jeff Law <law@redhat.com>
1536 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1537 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1540 2014-05-02 Marek Polacek <polacek@redhat.com>
1543 * c-typeck.c (push_init_level): Set constructor_designated to
1544 p->designated for structures.
1546 2014-05-01 Marek Polacek <polacek@redhat.com>
1549 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1550 function-definition has an attribute after the declarator.
1552 2014-05-01 Marek Polacek <polacek@redhat.com>
1555 * c-typeck.c (warning_init): Add location_t parameter. Call
1556 warning_at instead of warning.
1557 (push_init_level): Pass input_location to warning_init.
1558 (add_pending_init): Add location_t parameter. Pass loc to
1560 (set_nonincremental_init): Pass input_location to add_pending_init.
1561 (set_nonincremental_init_from_string): Likewise.
1562 (output_init_element): Pass loc to warning_init and to
1565 2014-05-01 Marek Polacek <polacek@redhat.com>
1568 * c-typeck.c (c_finish_return): Distinguish between label and variable
1569 when warning about returning local address.
1571 2014-05-01 Marek Polacek <polacek@redhat.com>
1574 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1577 2014-05-01 Marek Polacek <polacek@redhat.com>
1580 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1581 instead of 0 to WARN_FOR_QUALIFIERS.
1583 2014-05-01 Marek Polacek <polacek@redhat.com>
1586 * c-typeck.c (default_conversion): Use better location for
1589 2014-04-30 Marek Polacek <polacek@redhat.com>
1591 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1592 also when SANITIZE_FLOAT_DIVIDE is on.
1594 2014-04-30 Marek Polacek <polacek@redhat.com>
1597 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1598 and pedwarn_init. Use loc insted of input_location.
1600 2014-04-30 Marek Polacek <polacek@redhat.com>
1603 * c-typeck.c (build_binary_op): Use location when warning about
1606 2014-04-25 Marek Polacek <polacek@redhat.com>
1609 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1610 always_inline/noinline and hot/cold attributes.
1612 2014-04-25 Marek Polacek <polacek@redhat.com>
1615 * c-parser.c (c_parser_initelt): Pass input_location to
1616 process_init_element.
1617 (c_parser_initval): Pass loc to process_init_element.
1618 * c-tree.h (process_init_element): Adjust declaration.
1619 * c-typeck.c (push_init_level): Pass input_location to
1620 process_init_element.
1621 (pop_init_level): Likewise.
1622 (set_designator): Likewise.
1623 (output_init_element): Add location_t parameter. Pass loc to
1625 (output_pending_init_elements): Pass input_location to
1626 output_init_element.
1627 (process_init_element): Add location_t parameter. Pass loc to
1628 output_init_element.
1630 2014-04-24 Jakub Jelinek <jakub@redhat.com>
1632 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1633 atomic-clause, allow comma in between atomic-clause and
1636 2014-04-22 Jakub Jelinek <jakub@redhat.com>
1639 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1640 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1642 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1645 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1646 create_tmp_var instead build_decl for creating temps.
1647 (build_array_notation_expr): Likewise.
1648 (fix_conditional_array_notations_1): Likewise.
1649 (fix_array_notation_expr): Likewise.
1650 (fix_array_notation_call_expr): Likewise.
1652 2014-03-28 Jakub Jelinek <jakub@redhat.com>
1655 * c-tree.h (c_build_function_call_vec): New prototype.
1656 * c-typeck.c (build_function_call_vec): Don't call
1657 resolve_overloaded_builtin here.
1658 (c_build_function_call_vec): New wrapper function around
1659 build_function_call_vec. Call resolve_overloaded_builtin here.
1660 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1661 Call c_build_function_call_vec instead of build_function_call_vec.
1662 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1663 * c-decl.c (finish_decl): Likewise.
1665 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1668 * c-typeck.c: Use correct format string in cast-qual warning
1670 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1672 * c-decl.c (c_decl_attributes): Use
1673 lang_hooks.types.omp_mappable_type.
1674 * c-typeck.c (c_finish_omp_clauses): Likewise.
1676 2014-03-06 Marek Polacek <polacek@redhat.com>
1679 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1680 of checking tree code.
1682 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1684 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1685 (c_parser_parameter_declaration): Likewise.
1687 2014-02-19 Marek Polacek <polacek@redhat.com>
1690 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1691 Call mark_exp_read on exp.value.
1692 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1693 TREE_ADDRESSABLE on old instead of val.
1694 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1696 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1698 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1699 C_EXPR_APPEND by vec_safe_push.
1700 * c-tree.h (C_EXPR_APPEND): Remove.
1702 2014-01-31 Marek Polacek <polacek@redhat.com>
1705 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1706 build_function_call_vec.
1707 (build_function_call): Likewise.
1708 (build_atomic_assign): Likewise.
1709 (build_function_call_vec): Add arg_loc parameter. Use it.
1710 (convert_arguments): Likewise.
1711 (convert_for_assignment): Rename rhs_loc to expr_loc.
1712 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1713 (c_parser_objc_keywordexpr): Likewise.
1714 (c_parser_postfix_expression_after_primary): Call
1715 build_function_call_vec with expr_loc rather than op_loc.
1716 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1717 build_function_call_vec.
1718 (c_parser_expr_list): Add locations parameter. Fill it with locations
1719 of function arguments.
1720 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1722 2014-01-30 Marek Polacek <polacek@redhat.com>
1725 * c-typeck.c (build_function_call_vec): Use loc parameter.
1726 (convert_arguments): Add location parameter. Use it.
1727 (ep_convert_and_check): Likewise.
1728 (build_atomic_assign): Adjust convert_for_assignment call.
1729 (build_modify_expr): Likewise.
1730 (digest_init): Likewise.
1731 (c_finish_return): Likewise.
1732 (build_conditional_expr): Adjust ep_convert_and_check calls.
1733 (convert_for_assignment): Add rhs_loc parameter. Use it.
1734 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1737 2014-01-30 Richard Biener <rguenther@suse.de>
1740 * c-typeck.c (build_function_call_vec): Do not replace calls
1741 to a function via an incompatible type with a runtime abort.
1743 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1745 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1746 flag_enable_cilkplus with flag_cilkplus.
1747 (c_parser_direct_declarator_inner): Likewise.
1748 (c_parser_attribute_any_word): Likewise.
1749 (c_parser_attributes): Likewise.
1750 (c_parser_compound_statement): Likewise.
1751 (c_parser_statement_after_labels): Likewise.
1752 (c_parser_if_statement): Likewise.
1753 (c_parser_switch_statement): Likewise.
1754 (c_parser_do_statement): Likewise.
1755 (c_parser_for_statement): Likewise.
1756 (c_parser_unary_expression): Likewise.
1757 (c_parser_postfix_expression): Likewise.
1758 (c_parser_postfix_expression_after_primary): Likewise.
1759 (c_parser_postfix_expression_after_primary): Likewise.
1760 (c_parser_omp_clause_name): Likewise.
1761 (c_finish_omp_declare_simd): Likewise.
1762 (c_parser_cilk_verify_simd): Likewise.
1763 * c-typeck.c (build_array_ref): Likewise.
1764 (build_function_call_vec): Likewise.
1765 (convert_arguments): Likewise.
1766 (build_compound_expr): Likewise.
1767 (c_finish_return): Likewise.
1768 (c_finish_if_stmt): Likewise.
1769 (c_finish_loop): Likewise.
1770 (build_binary_op): Likewise.
1772 2014-01-23 Marek Polacek <polacek@redhat.com>
1775 * c-typeck.c (parser_build_binary_op): Use location instead of
1777 (build_binary_op): Pass location to shorten_compare.
1779 2014-01-23 Marek Polacek <polacek@redhat.com>
1782 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1785 2014-01-23 Marek Polacek <polacek@redhat.com>
1788 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1789 of a comma expression.
1790 (emit_side_effect_warnings): Likewise.
1792 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1795 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1796 function to use walk_tree and moved a lot of its functionality to
1797 expand_array_notations.
1798 (expand_array_notations): New function.
1800 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1802 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1803 attribute an attribute without value.
1805 2014-01-23 Jakub Jelinek <jakub@redhat.com>
1808 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1809 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1811 2014-01-22 Marek Polacek <polacek@redhat.com>
1814 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1815 of remove_c_maybe_const_expr on op1 and op2.
1817 2014-01-15 Jakub Jelinek <jakub@redhat.com>
1820 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1821 effects, preevaluate rhs using SAVE_EXPR first.
1823 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1826 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1827 statements with if-elseif statements.
1829 2014-01-06 Marek Polacek <polacek@redhat.com>
1832 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1833 defined bit-field types only in ISO C.
1835 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1837 Update copyright years
1839 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1841 * c-array-notation.c: Use the standard form for the copyright notice.
1843 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1845 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1846 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1847 field in parser is not empty. If not-empty, call the function
1848 c_parser_finish_omp_declare_simd.
1849 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1850 between SIMD-enabled functions and #pragma simd. Added new parameter.
1851 (c_parser_cilk_all_clauses): Modified the usage of the function
1852 c_parser_cilk_clause_vectorlength as mentioned above.
1853 (c_parser_cilk_simd_fn_vector_attrs): New function.
1854 (c_finish_cilk_simd_fn_tokens): Likewise.
1855 (is_cilkplus_vector_p): Likewise.
1856 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1857 "nomask," and "mask" strings in clause name.
1858 (c_parser_omp_all_clauses): Added 3 new case statements:
1859 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1860 PRAGMA_CILK_CLAUSE_NOMASK.
1861 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1862 check for vector attribute and if so call the function
1863 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1864 called the function c_finish_cilk_simd_fn_tokens.
1865 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1866 parser field is non-empty. If so, parse them as you would parse
1867 the omp declare simd pragma.
1868 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1869 Added a check when step is a parameter and flag it as error.
1870 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1871 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1874 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1876 * c-parser.c (c_parser_omp_parallel): Fix description.
1878 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1880 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1881 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1882 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1883 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1885 2013-12-04 Joseph Myers <joseph@codesourcery.com>
1888 * c-parser.c (c_parser_alignas_specifier): Use
1889 c_sizeof_or_alignof_type instead of c_alignof.
1890 (c_parser_alignof_expression): Likewise, with min_alignof
1891 parameter depending on alignof spelling used.
1893 2013-12-04 Marek Polacek <polacek@redhat.com>
1896 * c-decl.c (start_function): Don't warn for missing prototype for
1899 2013-12-03 Marek Polacek <polacek@redhat.com>
1902 * c-decl.c (build_compound_literal): Allow compound literals with
1903 empty initial value.
1905 2013-12-02 Joseph Myers <joseph@codesourcery.com>
1908 * c-typeck.c (build_modify_expr): Diagnose assignment to
1909 expression with array type.
1911 2013-11-29 Joseph Myers <joseph@codesourcery.com>
1914 * c-typeck.c (process_init_element): Do not treat a string as
1915 initializing a whole array when used with a designator for an
1918 2013-11-29 Joseph Myers <joseph@codesourcery.com>
1921 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1922 an inline function following a static declaration.
1924 2013-11-28 Jakub Jelinek <jakub@redhat.com>
1927 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1928 to p_name before calling c_parser_omp_teams instead of after.
1929 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1930 argument. Remove unused p_name variable.
1932 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
1933 Jakub Jelinek <jakub@redhat.com>
1935 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1936 external_scope is NULL.
1938 2013-11-27 Tom de Vries <tom@codesourcery.com>
1939 Marc Glisse <marc.glisse@inria.fr>
1942 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1944 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
1946 * c-typeck.c: Add required include files from gimple.h.
1948 2013-11-22 David Malcolm <dmalcolm@redhat.com>
1950 * c-decl.c (define_label, shadow_tag_warned)
1951 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1952 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1953 (declspecs_add_type): Remove use of in_system_header macro.
1954 * c-parser.c (c_parser_unary_expression): Likewise.
1955 * c-typeck.c (store_init_value, process_init_element)
1956 (c_start_case): Likewise.
1958 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1961 * c-parser.c (c_parser_set_source_position_from_token): Remove
1962 reference to in_system_header from comment.
1964 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1966 * c-decl.c (grokdeclarator): Update comment to refer to
1967 tree_to_[su]hwi rather than tree_low_cst.
1969 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1971 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1972 tree_to_uhwi throughout.
1974 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1976 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1979 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1981 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1984 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
1986 * c-parser.c (c_parser_cilk_simd): New.
1987 (c_parser_cilk_verify_simd): New.
1988 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1989 (c_parser_omp_for_loop): Add case for NE_EXPR.
1990 Set c_break_label for CILK_SIMD.
1991 (c_parser_cilk_clause_vectorlength): New.
1992 (c_parser_cilk_clause_linear): New.
1993 (c_parser_cilk_clause_name): New.
1994 (c_parser_cilk_all_clauses): New.
1995 * c-typeck.c (build_unary_op): Pass location argument to
1997 (build_modify_expr): Same.
1998 (build_asm_expr): Same.
1999 (c_finish_bc_stmt): Error on break/continue in loops.
2001 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
2003 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2005 2013-11-14 Diego Novillo <dnovillo@google.com>
2007 * c-decl.c: Include print-tree.h.
2008 Include stor-layout.h.
2011 Include stringpool.h.
2012 * c-lang.c: Include fold-const.h.
2013 * c-parser.c: Include stringpool.h.
2015 Include stor-layout.h.
2017 Include trans-mem.h.
2018 * c-typeck.c: Include stor-layout.h.
2019 Include trans-mem.h.
2023 2013-11-13 Joseph Myers <joseph@codesourcery.com>
2025 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2026 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2028 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2029 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2031 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2032 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2033 (c_parser_declarator, c_parser_direct_declarator_inner)
2034 (c_parser_parameter_declaration, c_parser_type_name): All callers
2036 (c_parser_declaration_or_fndef): Handle declarations with type
2037 determined from the initializer.
2039 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
2041 * c-typeck.c: Include gimplify.h.
2043 2013-11-12 Joseph Myers <joseph@codesourcery.com>
2045 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2046 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2048 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2049 or _Thread_local as appropriate in diagnostics.
2050 (build_null_declspecs): Initialize ret->thread_gnu_p.
2051 (declspecs_add_scspec): Handle either __thread or _Thread_local
2052 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2053 pedantic. Do not disallow _Thread_local extern and _Thread_local
2056 2013-11-07 Joseph Myers <joseph@codesourcery.com>
2057 Andrew MacLeod <amacleod@redhat.com>
2059 * c-aux-info.c (gen_type): Handle atomic qualifier.
2060 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2061 qualifiers when compating types.
2062 (shadow_tag_warned): Handle atomic_p in declspecs.
2063 (quals_from_declspecs): Likewise.
2064 (start_decl): Use c_type_promotes_to when promoting argument
2066 (grokdeclarator): Handle _Atomic.
2067 (get_parm_info): Diagnose any qualifier on "void" as only
2069 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2070 comparing types. Use c_type_promotes_to when promoting argument
2072 (finish_function): Use c_type_promotes_to when promoting argument
2074 (build_null_declspecs): Handle atomic_p in declspecs.
2075 (declspecs_add_qual): Handle RID_ATOMIC.
2076 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2077 (c_token_starts_declspecs): Handle RID_ATOMIC.
2078 (c_parser_declspecs): Handle atomic type specifiers and
2080 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2081 from types of expressions with atomic type.
2082 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2083 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2084 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2085 (c_parser_statement_after_labels, c_parser_switch_statement)
2086 (c_parser_for_statement, c_parser_expr_no_commas)
2087 (c_parser_conditional_expression, c_parser_binary_expression)
2088 (c_parser_cast_expression, c_parser_unary_expression)
2089 (c_parser_postfix_expression)
2090 (c_parser_postfix_expression_after_primary, c_parser_expression):
2091 Use convert_lvalue_to_rvalue.
2092 (c_parser_expression_conv, c_parser_expr_list): Document
2093 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2094 (c_parser_objc_synchronized_statement): Use
2095 convert_lvalue_to_rvalue.
2096 (c_parser_objc_selector): Handle RID_ATOMIC.
2097 (c_parser_objc_receiver, c_parser_array_notation): Use
2098 convert_lvalue_to_rvalue.
2099 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2100 _Atomic (type-name).
2101 (struct c_declspecs): Add atomic_p field.
2102 (convert_lvalue_to_rvalue): Declare.
2103 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2104 corresponding atomic types.
2105 (qualify_type): Don't add _Atomic qualifiers from second argument.
2106 (comp_target_types): Do not allow _Atomic mismatches.
2107 (type_lists_compatible_p): Do not remove atomic qualifiers when
2109 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2110 (build_atomic_assign): New functions.
2111 (build_unary_op): Use build_atomic_assign for atomic increment and
2113 (build_conditional_expr): Do not treat _Atomic void as a qualified
2115 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2116 (find_anonymous_field_with_type, convert_to_anonymous_field)
2117 (convert_for_assignment): Do not remove atomic qualifiers when
2119 (digest_init): Do not accept initialization of arrays of atomic
2120 elements by string constants.
2121 (build_asm_expr): Use convert_lvalue_to_rvalue.
2122 (build_binary_op): Do not treat _Atomic void as a qualified
2125 2013-11-06 DJ Delorie <dj@redhat.com>
2127 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2128 both explicit and builtin, print the location of the explicit one.
2130 2013-11-05 Tobias Burnus <burnus@net-b.de>
2132 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2133 c_parser_omp_distribute, c_parser_omp_teams,
2134 c_parser_omp_target, c_parser_omp_declare): Handle
2137 2013-11-03 Marek Polacek <polacek@redhat.com>
2139 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2141 2013-11-01 Jakub Jelinek <jakub@redhat.com>
2143 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2144 check_dup_generic at the end, unless remove is true.
2145 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2147 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2149 2013-10-31 Jakub Jelinek <jakub@redhat.com>
2151 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2152 with decl that is not pointer nor array.
2154 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2156 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2157 a spawning function is found.
2158 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2159 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2160 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2161 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2163 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2164 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2166 (c_finish_return): Added a check to reject _Cilk_spawn in return
2168 (build_cilk_spawn): New function.
2169 (build_cilk_sync): Likewise.
2170 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2172 2013-10-27 Tobias Burnus <burnus@net-b.de>
2175 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2176 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2177 (c_parser_statement_after_labels): Update calls.
2179 2013-10-24 Tobias Burnus <burnus@net-b.de>
2182 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2183 Handle PRAGMA_IVDEP.
2184 (c_parser_statement_after_labels): Update call.
2186 2013-10-24 Marek Polacek <polacek@redhat.com>
2188 * c-parser.c (c_parser_struct_declaration): Add a comment.
2189 (c_parser_declarator): Don't allow _Alignas here.
2191 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
2193 * c-parser.c: Include omp-low.h.
2194 * c-typeck.c: Likewise.
2196 2013-10-17 Marek Polacek <polacek@redhat.com>
2199 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2200 Document syntax of the array-declarator.
2201 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2203 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2204 (c_parser_struct_declaration): Likewise.
2205 (c_parser_declarator): Likewise.
2206 (c_parser_direct_declarator_inner): Likewise.
2207 (c_parser_parameter_declaration): Likewise.
2208 (c_parser_type_name): Likewise.
2210 2013-10-11 Jakub Jelinek <jakub@redhat.com>
2212 * c-lang.h (current_omp_declare_target_attribute): New extern
2214 * c-parser.c: Include c-lang.h.
2215 (struct c_parser): Change tokens to c_token *.
2216 Add tokens_buf field. Change tokens_avail type to unsigned int.
2217 (c_parser_consume_token): If parser->tokens isn't
2218 &parser->tokens_buf[0], increment parser->tokens.
2219 (c_parser_consume_pragma): Likewise.
2220 (enum pragma_context): Add pragma_struct and pragma_param.
2221 (c_parser_external_declaration): Adjust
2222 c_parser_declaration_or_fndef caller.
2223 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2224 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2225 Adjust recursive call.
2226 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2228 (c_parser_parameter_declaration): Use pragma_param instead of
2230 (c_parser_compound_statement_nostart, c_parser_label,
2231 c_parser_for_statement): Adjust
2232 c_parser_declaration_or_fndef callers.
2233 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2234 it through to c_parser_conditional_expression.
2235 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2236 pass it through to c_parser_binary_expression. Adjust recursive
2238 (c_parser_binary_expression): Remove prec argument, add
2239 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2240 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2241 binop matches it, use build2 instead of parser_build_binary_op.
2242 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2243 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2244 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2245 Handle pragma_struct and pragma_param the same as pragma_external.
2246 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2247 (c_parser_omp_variable_list): Parse array sections for
2248 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2249 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2250 (c_parser_omp_clause_reduction): Handle user defined reductions.
2251 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2252 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2253 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2254 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2255 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2256 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2257 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2258 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2259 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2260 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2261 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2262 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2263 (c_parser_omp_for_loop): Add CODE argument, pass it through
2264 to c_finish_omp_for. Change last argument to cclauses,
2265 and adjust uses to grab parallel clauses from the array of all
2266 the split clauses. Adjust c_parser_binary_expression,
2267 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2268 (omp_split_clauses): New function.
2269 (c_parser_omp_simd): New function.
2270 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2271 Allow the function to be called also when parsing combined constructs,
2272 and call c_parser_omp_simd when parsing for simd.
2273 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2274 #pragma omp section, require exactly one structured-block instead of
2275 sequence of statements.
2276 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2277 Allow the function to be called also when parsing combined constructs.
2278 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2279 Allow the function to be called also when parsing combined
2281 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2282 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2283 c_parser_omp_teams, c_parser_omp_target_data,
2284 c_parser_omp_target_update, c_parser_omp_target,
2285 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2286 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2287 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2288 (c_parser_omp_construct): Add p_name and mask vars. Handle
2289 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2290 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2291 and c_parser_omp_sections callers.
2292 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2293 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2294 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2295 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2296 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2298 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2299 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2300 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2301 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2302 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2303 * c-typeck.c: Include tree-inline.h.
2304 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2305 handle_omp_array_sections_1, handle_omp_array_sections,
2306 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2307 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2308 user defined reductions.
2309 (c_tree_equal): New function.
2310 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2311 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2312 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2313 c_check_omp_declare_reduction_r): New prototypes.
2314 * c-decl.c (current_omp_declare_target_attribute): New variable.
2315 (c_decl_attributes): New function.
2316 (start_decl, start_function): Use it instead of decl_attributes.
2317 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2318 c_omp_reduction_decl, c_omp_reduction_lookup,
2319 c_check_omp_declare_reduction_r): New functions.
2321 2013-09-25 Tom Tromey <tromey@redhat.com>
2323 * Make-lang.in (c/gccspec.o): Remove.
2324 (CFLAGS-c/gccspec.o): New variable.
2325 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2326 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2327 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2329 2013-09-25 Tom Tromey <tromey@redhat.com>
2331 * Make-lang.in (c/gccspec.o): Don't use subshell.
2333 2013-09-18 Marek Polacek <polacek@redhat.com>
2336 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2337 Remove unnecessary check.
2339 2013-09-18 Marek Polacek <polacek@redhat.com>
2342 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2343 no_sanitize_undefined attribute.
2345 2013-09-13 Kai Tietz <ktietz@redhat.com>
2348 * c-decl.c (c_builtin_function_ext_scope): Remove
2349 wrong assumption that it is never called on prexisting
2352 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2354 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2356 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2358 * c-objc-common.c (c_tree_printer): Tidy.
2360 2013-08-30 Marek Polacek <polacek@redhat.com>
2362 * c-typeck.c (build_binary_op): Add division by zero and shift
2365 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
2366 Joseph Myers <joseph@codesourcery.com>
2369 * c-typeck.c (c_common_type): Prefer double_type_node over
2370 other REAL_TYPE types with the same precision.
2371 (convert_arguments): Likewise.
2373 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2375 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2376 (c_initialize_diagnostics): Call a destructor for the early printer.
2378 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2380 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2381 printer initialization.
2383 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
2386 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2387 check for truth values.
2388 (expand_array_notation_exprs): Added truth values case. Removed an
2389 unwanted else. Added for-loop to walk through subtrees in default
2392 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2394 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2396 2013-07-23 Joseph Myers <joseph@codesourcery.com>
2398 * c-parser.c (struct c_generic_association): Fix typo.
2400 2013-07-23 Tom Tromey <tromey@redhat.com>
2401 Joseph Myers <joseph@codesourcery.com>
2403 * c-parser.c (struct c_generic_association): New.
2404 (c_generic_association_d): New typedef.
2405 (c_parser_generic_selection): New function.
2406 (c_parser_postfix_expression): Handle RID_GENERIC.
2408 2013-07-13 Jason Merrill <jason@redhat.com>
2411 * c-decl.c (finish_struct): Check for too-large class.
2413 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
2416 * c-typeck.c (set_init_index): When folding, check for index overflow.
2418 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2420 * c-parser.c (c_parser_array_notation): Removed rejection of array
2421 notations in an array of function pointers.
2423 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2425 * c-array-notation.c (make_triplet_val_inv): New function.
2426 (create_cmp_incr): Likewise.
2427 (create_array_refs): Likewise.
2428 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2429 Also modularized common parts between functions and called the function.
2430 (build_array_notation_expr): Likewise.
2431 (fix_conditional_array_notations_1): Likewise.
2432 (fix_array_notation_expr): Likewise.
2433 (fix_array_notation_call_expr): Likewise.
2435 2013-06-18 Marek Polacek <polacek@redhat.com>
2438 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2440 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2442 * c-array-notation.c (build_array_notation_expr): Reject array notation
2443 mismatch between LHS and RHS even inside a call_expr. Also, removed
2444 a couple while statements that were dead code.
2446 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2448 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2449 excessive precision expressions in function parameters. Also removed
2450 couple unwanted while statements.
2452 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2454 * c-array-notation.c (expand_array_notation_exprs): Added
2455 ARRAY_NOTATION_REF case.
2457 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2459 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2460 function to c-family/array-notation-common.c.
2461 (is_cilkplus_reduce_builtin): Likewise.
2462 (find_rank): Likewise.
2463 (extract_array_notation_exprs): Likewise.
2464 (replace_array_notations): Likewise.
2465 (find_inv_trees): Likewise.
2466 (replace_inv_trees): Likewise.
2467 (contains_array_notation_expr): Likewise.
2468 (find_correct_array_notation_type): Likewise.
2469 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2470 (struct inv_list): Moved this to c-family/array-notation-common.c.
2471 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2473 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2475 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2476 reduction functions outside the for-loop. Added a check if the fundecl
2477 is non-NULL. Finally, removed an unwanted if-statement, and made the
2480 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2482 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2483 condition of the if-statement matches the rank of else-block and then-
2484 block when array notations are used.
2485 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2486 expression after the entire function body is parsed.
2487 (c_parser_expr_no_commas): Delayed creating array notation expressions
2488 to the end of function parsing.
2489 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2490 whole if-statement instead of just the condition.
2491 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2493 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2496 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2497 array to NULL_TREE if they are unused. Also added a check for the
2498 field to be NULL before its fields are used in future.
2500 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2503 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2504 (build_array_notation_expr): Likewise.
2506 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2508 * c-typeck.c (build_array_ref): Added a check to see if array's
2509 index is greater than one. If true, then emit an error.
2510 (build_function_call_vec): Exclude error reporting and checking
2511 for builtin array-notation functions.
2512 (convert_arguments): Likewise.
2513 (c_finish_return): Added a check for array notations as a return
2514 expression. If true, then emit an error.
2515 (c_finish_loop): Added a check for array notations in a loop
2516 condition. If true then emit an error.
2517 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2518 (build_binary_op): Added a check for array notation expr inside
2519 op1 and op0. If present, we call another function to find correct
2521 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2522 * c-parser.c (c_parser_compound_statement): Check if array
2523 notation code is used in tree, if so, then transform them into
2525 (c_parser_expr_no_commas): Check if array notation is used in LHS
2526 or RHS, if so, then build array notation expression instead of
2528 (c_parser_postfix_expression_after_primary): Added a check for
2529 colon(s) after square braces, if so then handle it like an array
2530 notation. Also, break up array notations in unary op if found.
2531 (c_parser_direct_declarator_inner): Added a check for array
2533 (c_parser_compound_statement): Added a check for array notation in
2534 a stmt. If one is present, then expand array notation expr.
2535 (c_parser_if_statement): Likewise.
2536 (c_parser_switch_statement): Added a check for array notations in
2537 a switch statement's condition. If true, then output an error.
2538 (c_parser_while_statement): Similarly, but for a while.
2539 (c_parser_do_statement): Similarly, but for a do-while.
2540 (c_parser_for_statement): Similarly, but for a for-loop.
2541 (c_parser_unary_expression): Check if array notation is used in a
2542 pre-increment or pre-decrement expression. If true, then expand
2544 (c_parser_array_notation): New function.
2545 * c-array-notation.c: New file.
2546 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2548 2013-05-23 Mike Stump <mikestump@comcast.net>
2550 * c-typeck.c (convert_for_assignment): Handle references to memory
2553 2013-05-16 Jason Merrill <jason@redhat.com>
2555 * Make-lang.in (cc1$(exeext)): Use link mutex.
2557 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2559 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2560 to simply use OPT_Wpointer_arith.
2561 (build_unary_op): Likewise.
2563 2013-04-03 Jakub Jelinek <jakub@redhat.com>
2566 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2567 argument. If set, or it temporarily for parsing of the first
2568 argument into force_folding_builtin_constant_p.
2569 (c_parser_postfix_expression): Adjust callers.
2571 2013-03-21 Richard Biener <rguenther@suse.de>
2573 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2574 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2576 2013-02-12 Marek Polacek <polacek@redhat.com>
2579 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2582 2013-01-24 Jakub Jelinek <jakub@redhat.com>
2585 * c-typeck.c (set_nonincremental_init_from_string): If
2586 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2588 (process_init_element): Likewise.
2590 2012-12-20 Jakub Jelinek <jakub@redhat.com>
2593 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2594 argument, don't call default_function_array_conversion
2595 nor c_fully_fold here.
2596 (c_parser_asm_statement): Adjust callers.
2597 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2598 and outputs here, and call default_function_array_conversion
2599 on inputs that don't need to be addressable.
2601 2012-12-18 Jakub Jelinek <jakub@redhat.com>
2604 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2605 warning require that both c_common_unsigned_type as well as
2606 c_common_signed_type is the same for both mvl and mvr types.
2608 2012-11-16 Diego Novillo <dnovillo@google.com>
2610 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2612 * c-common.c: Use new vec API in vec.h.
2613 * c-common.h: Likewise.
2614 * c-gimplify.c: Likewise.
2615 * c-pragma.c: Likewise.
2616 * c-pretty-print.c: Likewise.
2617 * c-pretty-print.h: Likewise.
2618 * c-semantics.c: Likewise.
2619 * c-decl.c: Likewise.
2620 * c-parser.c: Likewise.
2621 * c-tree.h: Likewise.
2622 * c-typeck.c: Likewise.
2624 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2627 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2629 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2632 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2633 shadows a function, unless the variable is a function or a
2634 pointer-to-function.
2636 2012-10-12 Jakub Jelinek <jakub@redhat.com>
2639 * c-parser.c (struct c_tree_loc_pair): Removed.
2640 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2641 add location_t * and tree * arguments, fill in array of 3
2642 sizeof_arg trees and corresponding locs.
2643 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2644 c_parser_expr_list callers.
2645 (c_parser_postfix_expression_after_primary): Likewise. Pass
2646 array of 3 sizeof_arg trees and locs (corresponding to first
2647 3 arguments) to sizeof_pointer_memaccess_warning.
2649 2012-10-09 Lawrence Crowl <crowl@google.com>
2651 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2652 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2655 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2658 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2661 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
2664 * c-typeck.c: Include c-common.h.
2665 (enum stv_conv): Moved to c-common.h.
2666 (scalar_to_vector): Moved to c-common.c.
2667 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2668 * Make-lang.in: c-typeck.c depends on c-common.h.
2670 2012-10-04 Arnaud Charlet <charlet@adacore.com>
2672 * c-decl.c (c_write_global_declarations): Fix handling of
2675 2012-09-30 Sharad Singhai <singhai@google.com>
2677 * c-decl.c (c_write_global_declarations): Use a different method
2678 to determine if the dump has ben initialized.
2680 2012-09-14 Joseph Myers <joseph@codesourcery.com>
2683 * c-typeck.c (c_cast_expr): When casting to a type requiring
2684 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2687 2012-09-14 Joseph Myers <joseph@codesourcery.com>
2690 * c-typeck.c (build_unary_op): Pass original argument of
2691 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2692 any C_MAYBE_CONST_EXPR, if it has integer operands.
2693 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2694 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2695 to c_objc_common_truthvalue_conversion, then remove any
2696 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2697 c_objc_common_truthvalue_conversion not
2698 c_common_truthvalue_conversion.
2699 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2700 call note_integer_operands for arguments with integer operands
2701 that are not integer constants.
2703 2012-09-13 Jakub Jelinek <jakub@redhat.com>
2706 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2707 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2709 2012-08-31 Jakub Jelinek <jakub@redhat.com>
2712 * c-convert.c (convert): Don't call fold_convert_loc if
2713 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2714 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2715 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2717 2012-08-24 Jakub Jelinek <jakub@redhat.com>
2720 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2721 for nested and empty_ok arguments in the call to
2722 c_parser_declaration_or_fndef.
2724 2012-08-17 Jakub Jelinek <jakub@redhat.com>
2726 * c-tree.h (c_last_sizeof_arg): Declare.
2727 * c-parser.c (struct c_tree_loc_pair): New type.
2728 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2730 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2731 (c_parser_postfix_expression_after_primary): Likewise. Call
2732 sizeof_pointer_memaccess_warning if needed.
2733 (sizeof_ptr_memacc_comptypes): New function.
2734 * c-typeck.c (c_last_sizeof_arg): New global variable.
2735 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2737 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
2739 * c-lang.h (lang_decl): Add variable_size GTY option.
2741 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2743 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2744 * Make-lang.in: Fix dependencies.
2746 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2748 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2749 and add language Makefile hooks.
2750 * config-lang.in: New file.
2751 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2752 add the required "normal" config-lang.in rules.
2753 * c-lang.h: Moved from gcc/ to here.
2754 * c-tree.h: Likewise.
2755 * c-objc-common.c: Likewise.
2756 * c-objc-common.h: Likewise.
2757 * c-typeck.c: Likewise.
2758 * c-convert.c: Likewise.
2759 * c-lang.c: Likewise.
2760 * c-aux-info.c: Likewise.
2761 * c-errors.c: Likewise.
2762 * gccspec.c: Likewise.
2763 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2764 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2766 Copyright (C) 2012-2015 Free Software Foundation, Inc.
2768 Copying and distribution of this file, with or without modification,
2769 are permitted in any medium without royalty provided the copyright
2770 notice and this notice are preserved.