1 2016-03-04 Marek Polacek <polacek@redhat.com>
4 * c-parser.c (c_parser_postfix_expression): Call
5 c_parser_cast_expression rather than c_parser_postfix_expression.
7 2016-03-01 Jakub Jelinek <jakub@redhat.com>
11 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
12 of incomplete decls to error_mark_node.
14 2016-02-24 Marek Polacek <polacek@redhat.com>
17 * c-decl.c (finish_decl): Don't update the copy of the type of a
20 2016-02-23 Jakub Jelinek <jakub@redhat.com>
23 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
24 in id_kind reclassification.
26 2016-02-16 Jakub Jelinek <jakub@redhat.com>
29 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
31 2016-02-16 James Norris <jnorris@codesourcery.com>
34 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
36 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
38 * c-decl.c (build_null_declspecs): Zero the entire struct.
41 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
42 callers changed. If nested_p is true, use it to call
43 finish_implicit_inits.
44 * c-tree.h (finish_implicit_inits): Declare.
45 * c-typeck.c (finish_implicit_inits): New function. Move code
47 (push_init_level): ... here.
48 (set_designator, process_init_element): Call finish_implicit_inits.
50 2016-02-11 Jakub Jelinek <jakub@redhat.com>
53 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
54 arguments for -Waddress warning.
56 2016-02-04 Jakub Jelinek <jakub@redhat.com>
59 * c-decl.c (finish_enum): When honoring mode attribute,
60 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
62 2016-01-29 Jakub Jelinek <jakub@redhat.com>
65 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
66 all type variants, not just TYPE_MAIN_VARIANT.
68 2016-01-27 Jakub Jelinek <jakub@redhat.com>
71 * c-decl.c (c_write_global_declarations_1): Warn with
72 warn_unused_function if static prototype without definition
75 2016-01-27 Marek Polacek <polacek@redhat.com>
78 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
79 to unsigned, if needed. Add -Wsign-compare warning.
81 2016-01-26 Jakub Jelinek <jakub@redhat.com>
83 PR tree-optimization/69483
84 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
86 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
89 * c-tree.h (incomplete_record_decls): Declare.
90 * c-parser.c (incomplete_record_decls): Define.
91 (c_parser_translation_unit): Iterate through incomplete_record_decls and
92 report error if any decl has zero size.
93 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
94 or enum type to incomplete_record_decls.
96 2016-01-14 Tom de Vries <tom@codesourcery.com>
98 PR tree-optimization/68773
99 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
102 2016-01-14 Marek Polacek <polacek@redhat.com>
105 * c-decl.c (grokdeclarator): Provide more information for invalid
108 2016-01-06 David Malcolm <dmalcolm@redhat.com>
110 * c-parser.c (c_parser_unary_expression): For dereferences, build
111 a combined location before calling build_indirect_ref, so that
112 error reports cover the full range, manually updating the c_expr
115 2016-01-06 Marek Polacek <polacek@redhat.com>
118 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
119 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
122 2016-01-04 Jakub Jelinek <jakub@redhat.com>
124 Update copyright years.
126 2016-01-04 Marek Polacek <polacek@redhat.com>
129 * c-typeck.c (build_atomic_assign): Improve commentary. Add
130 optimization to use __atomic_fetch_* built-in if possible.
132 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
134 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
136 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
139 2015-12-22 Marek Polacek <polacek@redhat.com>
142 * c-typeck.c (build_component_ref): Warn when acessing elements of
143 atomic structures or unions.
145 2015-12-21 David Malcolm <dmalcolm@redhat.com>
147 * c-typeck.c: Include "gcc-rich-location.h".
148 (build_binary_op): In the two places that call binary_op_error,
149 create a gcc_rich_location and populate it with the location of
150 the binary op and its two operands.
152 2015-12-16 David Malcolm <dmalcolm@redhat.com>
154 * c-parser.c (c_parser_statement_after_labels): When calling
155 c_finish_return, Use the return expression's location if it has
156 one, falling back to the location of the first token within it.
157 * c-typeck.c (c_finish_return): When issuing warnings about
158 the incorrect presence/absence of a return value, issue a note
159 showing the declaration of the function.
161 2015-12-16 David Malcolm <dmalcolm@redhat.com>
163 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
165 (c_parser_peek_nth_token): New function.
166 (c_parser_peek_conflict_marker): New function.
167 (c_parser_error): Detect conflict markers and report them as such.
169 2015-12-16 David Malcolm <dmalcolm@redhat.com>
171 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
172 to preserve range information for the primary expression
173 in the call to c_parser_postfix_expression_after_primary.
175 2015-12-16 David Malcolm <dmalcolm@redhat.com>
177 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
178 expression location, falling back on the first token location,
179 rather than always using the latter.
181 2015-12-16 Marek Polacek <polacek@redhat.com>
184 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
187 2015-12-15 Marek Polacek <polacek@redhat.com>
190 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
193 2015-12-08 David Malcolm <dmalcolm@redhat.com>
195 * c-parser.c (c_parser_alignof_expression): Capture location of
196 closing parenthesis (if any), or of end of unary expression, and
197 use it to build a src_range for the expression.
199 2015-12-08 David Malcolm <dmalcolm@redhat.com>
202 * c-parser.c (c_parser_get_builtin_args): Add
203 "out_close_paren_loc" param, and write back to it.
204 (c_parser_postfix_expression): Capture the closing
205 parenthesis location for RID_CHOOSE_EXPR,
206 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
207 RID_BUILTIN_SHUFFLE and use it to set the source range
208 for such expressions; within RID_BUILTIN_COMPLEX set
209 the underlying location.
211 2015-12-07 Marek Polacek <polacek@redhat.com>
214 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
215 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
217 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
219 * c-tree.h (c_build_va_arg): Adjust prototype.
220 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
221 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
222 parameter, adjust throughout and issue an error if EXPR is a component
223 with reverse storage order.
225 2015-12-02 Jason Merrill <jason@redhat.com>
227 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
228 (c_fully_fold_internal, decl_constant_value_for_optimization):
229 Move from c-common.c.
230 * c-tree.h: Declare decl_constant_value_for_optimization.
231 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
233 2015-12-02 Joseph Myers <joseph@codesourcery.com>
236 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
237 following link from declarator to next declarator. Track original
238 qualified type and pass it to c_build_qualified_type.
239 * c-typeck.c (c_build_qualified_type): Add arguments
240 orig_qual_type and orig_qual_indirect.
242 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
244 * c-parser.c (c_parser_omp_clause_name)
245 (c_parser_oacc_all_clauses): Alphabetical sorting.
247 2015-12-02 Jakub Jelinek <jakub@redhat.com>
250 * c-decl.c (get_parm_info): Use b->locus instead of input_location
253 2015-12-01 Julian Brown <julian@codesourcery.com>
254 Cesar Philippidis <cesar@codesourcery.com>
255 James Norris <James_Norris@mentor.com>
257 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
258 (c_parser_oacc_clause_use_device): New function.
259 (c_parser_oacc_all_clauses): Add use_device support.
260 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
261 (c_parser_oacc_host_data): New function.
262 (c_parser_omp_construct): Add host_data support.
263 * c-tree.h (c_finish_oacc_host_data): Add prototype.
264 * c-typeck.c (c_finish_oacc_host_data): New function.
265 (c_finish_omp_clauses): Add use_device support.
267 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
270 * c-decl.c: Set TYPE_PACKED in variants.
272 2015-11-27 Martin Liska <mliska@suse.cz>
275 * c-array-notation.c (fix_builtin_array_notation_fn):
276 Use release_vec_vec instead of vec::release.
277 (build_array_notation_expr): Likewise.
278 (fix_conditional_array_notations_1): Likewise.
279 (fix_array_notation_expr): Likewise.
280 (fix_array_notation_call_expr): Likewise.
282 2015-11-27 Jakub Jelinek <jakub@redhat.com>
285 * c-parser.c (c_parser_compound_statement_nostart): If
286 last_label is true, use pragma_stmt instead of pragma_compound
287 as second c_parser_pragma argument.
288 (c_parser_omp_ordered, c_parser_omp_target_update,
289 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
290 false as second argument to c_parser_skip_to_pragma_eol after
291 diagnosing standalone directives used in pragma_stmt context.
293 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
295 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
296 with "if (ENABLE_OFFLOADING)".
298 2015-11-23 David Malcolm <dmalcolm@redhat.com>
301 * c-parser.c (c_parser_postfix_expression): Set up source ranges
302 for various Objective-C constructs: Class.name syntax,
303 @selector(), @protocol(), @encode(), and [] message syntax.
305 2015-11-20 David Malcolm <dmalcolm@redhat.com>
308 * c-typeck.c (should_suggest_deref_p): New function.
309 (build_component_ref): Special-case POINTER_TYPE when
310 generating a "not a structure of union" error message, and
311 suggest a "->" rather than a ".", providing a fix-it hint.
313 2015-11-19 David Malcolm <dmalcolm@redhat.com>
315 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
316 candidate into a new function, find_closest_identifier.
318 2015-11-19 Marek Polacek <polacek@redhat.com>
321 * c-typeck.c (parser_build_binary_op): Properly handle
322 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
324 2015-11-17 David Malcolm <dmalcolm@redhat.com>
326 * c-parser.c (set_c_expr_source_range): Bulletproof both
327 overloaded implementations against NULL expr->value.
328 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
330 (c_parser_unary_expression): Likewise when handling addresses of
332 (c_parser_postfix_expression): Likewise for statement expressions,
333 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
334 __builtin_va_arg, and for __builtin_offset_of.
335 (c_parser_postfix_expression_after_paren_type): Initialize expr's
336 src_range using the range of the braced initializer.
337 (c_parser_transaction_expression): Set src_range for "ret" to a
340 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
342 * c-parser.c (c_finish_omp_declare_simd): Look for
343 "simd" attribute as well. Update error message.
345 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
347 * c-parser.c (c_parser_omp_declare_target): Adjust.
349 2015-11-14 Jakub Jelinek <jakub@redhat.com>
351 * c-typeck.c (c_finish_omp_clauses): Don't mark
352 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
354 2015-11-14 Marek Polacek <polacek@redhat.com>
356 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
357 * c-typeck.c: Likewise.
359 2015-11-13 David Malcolm <dmalcolm@redhat.com>
361 * c-decl.c (warn_defaults_to): Pass line_table to
363 * c-errors.c (pedwarn_c99): Likewise.
364 (pedwarn_c90): Likewise.
365 * c-parser.c (set_c_expr_source_range): New functions.
366 (c_token::get_range): New method.
367 (c_token::get_finish): New method.
368 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
369 based on the range from the start of the LHS to the end of the
371 (c_parser_conditional_expression): Likewise, based on the range
372 from the start of the cond.value to the end of exp2.value.
373 (c_parser_binary_expression): Call set_c_expr_source_range on
374 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
375 (c_parser_cast_expression): Call set_c_expr_source_range on ret
376 based on the cast_loc through to the end of the expr.
377 (c_parser_unary_expression): Likewise, based on the
378 op_loc through to the end of op.
379 (c_parser_sizeof_expression) Likewise, based on the start of the
380 sizeof token through to either the closing paren or the end of
382 (c_parser_postfix_expression): Likewise, using the token range,
383 or from the open paren through to the close paren for
384 parenthesized expressions.
385 (c_parser_postfix_expression_after_primary): Likewise, for
386 various kinds of expression.
387 * c-tree.h (struct c_expr): Add field "src_range".
388 (c_expr::get_start): New method.
389 (c_expr::get_finish): New method.
390 (set_c_expr_source_range): New decls.
391 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
392 on ret for prefix unary ops.
393 (parser_build_binary_op): Likewise, running from the start of
394 arg1.value through to the end of arg2.value.
396 2015-11-13 Marek Polacek <polacek@redhat.com>
399 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
401 2015-11-13 David Malcolm <dmalcolm@redhat.com>
403 * c-typeck.c: Include spellcheck.h.
404 (lookup_field_fuzzy_find_candidates): New function.
405 (lookup_field_fuzzy): New function.
406 (build_component_ref): If the field was not found, try using
407 lookup_field_fuzzy and potentially offer a suggestion.
409 2015-11-12 James Norris <jnorris@codesourcery.com>
410 Joseph Myers <joseph@codesourcery.com>
412 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
413 (c_parser_omp_clause_name): Handle 'device_resident' clause.
414 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
415 and PRAGMA_OMP_CLAUSE_LINK.
416 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
417 and PRAGMA_OACC_CLAUSE_LINK.
418 (OACC_DECLARE_CLAUSE_MASK): New definition.
419 (c_parser_oacc_declare): New function.
421 2015-11-12 Marek Polacek <polacek@redhat.com>
424 * c-parser.c (c_parser_for_statement): Reclassify the token in
427 2015-11-11 Marek Polacek <polacek@redhat.com>
431 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
432 checking the size of an array.
434 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
436 * c-array-notation.c: Remove unused header files.
437 * c-aux-info.c: Likewise.
438 * c-convert.c: Likewise.
439 * c-decl.c: Likewise.
440 * c-errors.c: Likewise.
441 * c-lang.c: Likewise.
442 * c-objc-common.c: Likewise.
443 * c-parser.c: Likewise.
444 * c-typeck.c: Likewise.
445 * gccspec.c: Likewise.
447 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
448 Cesar Philippidis <cesar@codesourcery.com>
449 James Norris <jnorris@codesourcery.com>
450 Julian Brown <julian@codesourcery.com>
451 Nathan Sidwell <nathan@codesourcery.com>
454 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
456 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
457 (c_parser_pragma): Parse 'acc routine'.
458 (OACC_ROUTINE_CLAUSE_MARK): Define.
459 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
461 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
464 * c-typeck.c (c_finish_loop): For unconditional loops, set the
465 location of the backward-goto to the start of the loop body.
467 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
470 * c-parser.c (c_parser_while_statement): Finish the loop before
471 parsing ahead for misleading indentation.
472 (c_parser_for_statement): Likewise.
474 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
476 * c-decl.c (finish_struct): If the structure has reverse storage
477 order, rewrite the type of array fields with scalar component. Call
478 maybe_apply_pragma_scalar_storage_order on entry.
479 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
480 errors on bit-fields and reverse SSO here and not...
481 (c_mark_addressable): ...here.
482 (output_init_element): Adjust call to initializer_constant_valid_p.
483 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
485 2015-11-06 David Malcolm <dmalcolm@redhat.com>
487 * c-decl.c (warn_defaults_to): Update for change in signature
488 of diagnostic_set_info.
489 * c-errors.c (pedwarn_c99): Likewise.
490 (pedwarn_c90): Likewise.
491 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
492 for textinfo::set_location.
494 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
495 Thomas Schwinge <thomas@codesourcery.com>
496 James Norris <jnorris@codesourcery.com>
498 * c-parser.c (c_parser_omp_clause_name): Add support for
499 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
500 (c_parser_omp_clause_default): Add is_oacc argument. Handle
501 default(none) in OpenACC.
502 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
504 (c_parser_oacc_clause_tile): New function.
505 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
506 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
507 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
509 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
510 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
512 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
513 (c_parser_oacc_update): Update the error message for missing clauses.
514 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
515 and OMP_CLAUSE_INDEPENDENT.
517 2015-11-05 Marek Polacek <polacek@redhat.com>
520 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
521 deal with pre-evaluation on invalid types.
523 2015-11-05 Jakub Jelinek <jakub@redhat.com>
524 Ilya Verbin <ilya.verbin@intel.com>
526 * c-parser.c: Include context.h and gimple-expr.h.
527 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
528 monotonic together with nonmonotonic.
529 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
530 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
531 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
532 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
533 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
534 expressions on combined target teams before the target.
535 (c_parser_omp_declare_target): If decl has "omp declare target" or
536 "omp declare target link" attribute, and cgraph or varpool node already
537 exists, then set corresponding flags. Call c_finish_omp_clauses
538 in the parenthesized extended-list syntax case.
539 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
541 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
542 on OMP_CLAUSE_REDUCTION array sections.
543 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
544 into the constant offset, or for variable low-bound using
545 POINTER_PLUS_EXPR. For structure element based array sections use
546 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
547 (c_finish_omp_clauses): Drop generic_field_head, structure
548 elements are now always mapped even as array section bases,
549 diagnose same var in data sharing and mapping clauses. Diagnose if
550 linear step on declare simd is neither a constant nor a uniform
551 parameter. Look through POINTER_PLUS_EXPR for array section
552 reductions. Diagnose the same var or function appearing multiple
553 times on the same directive. Fix up wording for the to clause if t
554 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
555 modifier on kinds other than dynamic or guided or nonmonotonic
556 modifier together with ordered clause.
558 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
559 Chung-Lin Tang <cltang@codesourcery.com>
561 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
563 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
565 * c-array-notation.c: Reorder #include's and remove duplicates.
566 * c-aux-info.c: Likewise.
567 * c-convert.c: Likewise.
568 * c-decl.c: Likewise.
569 * c-errors.c: Likewise.
570 * c-lang.c: Likewise.
571 * c-objc-common.c: Likewise.
572 * c-parser.c: Likewise.
573 * c-typeck.c: Likewise.
575 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
578 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
579 after calling build_qualified_type.
581 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
582 Thomas Schwinge <thomas@codesourcery.com>
583 James Norris <jnorris@codesourcery.com>
584 Joseph Myers <joseph@codesourcery.com>
585 Julian Brown <julian@codesourcery.com>
586 Bernd Schmidt <bschmidt@redhat.com>
588 * c-parser.c (c_parser_oacc_shape_clause): New.
589 (c_parser_oacc_simple_clause): New.
590 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
591 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
593 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
594 James Norris <jnorris@codesourcery.com>
595 Cesar Philippidis <cesar@codesourcery.com>
599 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
600 parameters, and handle these. Adjust all users.
601 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
603 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
605 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
607 (c_finish_omp_construct): Declare function.
608 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
609 Merge functions into...
610 (c_finish_omp_construct): ... this new function.
612 2015-10-22 Richard Biener <rguenther@suse.de>
614 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
615 before folding a MINUS_EXPR.
617 2015-10-21 Marek Polacek <polacek@redhat.com>
620 * c-decl.c (start_function): Warn about vararg functions without
623 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
625 * c-typeck.c (build_conditional_expr): Use boolean vector
626 type for vector comparison.
627 (build_vec_cmp): New.
628 (build_binary_op): Use build_vec_cmp for comparison.
630 2015-10-20 Marek Polacek <polacek@redhat.com>
632 * c-parser.c (is_cilkplus_vector_p): Don't define here.
634 2015-10-20 Marek Polacek <polacek@redhat.com>
637 * c-parser.c (c_parser_attributes): Break out of the loop if the
638 token after an attribute isn't a comma.
640 2015-10-13 Jakub Jelinek <jakub@redhat.com>
641 Aldy Hernandez <aldyh@redhat.com>
643 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
644 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
645 (c_parser_omp_variable_list): Handle structure elements for
646 map, to and from clauses. Handle array sections in reduction
647 clause. Formatting fixes.
648 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
650 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
651 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
652 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
653 c_parser_omp_clause_is_device_ptr): New functions.
654 (c_parser_omp_clause_ordered): Parse optional parameter.
655 (c_parser_omp_clause_reduction): Handle array reductions.
656 (c_parser_omp_clause_schedule): Parse optional simd modifier.
657 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
659 (c_parser_omp_clause_linear): Parse linear clause modifiers.
660 (c_parser_omp_clause_depend_sink): New function.
661 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
662 (c_parser_omp_clause_map): Parse release/delete map kinds and
663 optional always modifier.
664 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
665 and c_finish_omp_clauses callers.
666 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
667 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
668 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
669 (OMP_CRITICAL_CLAUSE_MASK): Define.
670 (c_parser_omp_critical): Parse critical clauses.
671 (c_parser_omp_for_loop): Handle doacross loops, adjust
672 c_finish_omp_for and c_finish_omp_clauses callers.
673 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
674 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
675 (OMP_FOR_CLAUSE_MASK): Add linear clause.
676 (c_parser_omp_for): Disallow ordered clause when combined with
677 distribute. Disallow linear clause when combined with distribute
678 and not combined with simd.
679 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
680 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
681 parse clauses and if depend clause is found, don't parse a body.
682 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
683 Allow target parallel without for after it.
684 (OMP_TASK_CLAUSE_MASK): Add priority clause.
685 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
686 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
688 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
689 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
690 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
691 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
693 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
694 defaultmap and is_device_ptr clauses.
695 (c_parser_omp_target): Parse target parallel and target simd. Set
696 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
697 and target exit data. Diagnose invalid map kinds.
698 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
699 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
701 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
703 (OMP_TASKLOOP_CLAUSE_MASK): Define.
704 (c_parser_omp_taskloop): New function.
705 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
706 handle PRAGMA_OMP_TASKLOOP.
707 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
708 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
709 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
710 Add IS_OMP argument, handle structure element bases, diagnose
711 bitfields, pass IS_OMP recursively, diagnose known zero length
712 array sections in depend clauses, handle array sections in reduction
713 clause, diagnose negative length even for pointers.
714 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
715 types, pass IS_OMP down to handle_omp_array_sections_1, handle
716 array sections in reduction clause, set
717 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
718 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
719 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
720 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
722 2015-10-06 Marek Polacek <polacek@redhat.com>
724 * c-parser.c (c_parser_statement_after_labels): Use
725 protected_set_expr_location.
726 (c_parser_omp_clause_num_gangs): Likewise.
727 (c_parser_omp_clause_num_threads): Likewise.
728 (c_parser_omp_clause_num_workers): Likewise.
729 (c_parser_omp_clause_vector_length): Likewise.
730 (c_parser_omp_clause_num_teams): Likewise.
731 (c_parser_omp_clause_thread_limit): Likewise.
732 * c-typeck.c (build_c_cast): Likewise.
733 (c_cast_expr): Likewise.
735 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
737 * c-typeck.c (c_tree_equal): Use real_equal instead of
740 2015-10-04 Jason Merrill <jason@redhat.com>
742 * c-parser.c (c_lex_one_token): Handle @synchronized.
743 * c-decl.c (match_builtin_function_types): A declaration of a built-in
744 can change whether the function is transaction_safe.
746 2015-10-02 Marek Polacek <polacek@redhat.com>
749 * c-typeck.c (convert_for_assignment): Use the expansion point
752 2015-10-02 Marek Polacek <polacek@redhat.com>
755 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
756 and pass it down to c_parser_if_statement.
757 (c_parser_else_body): Add CHAIN parameter and pass it down to
758 c_parser_statement_after_labels.
759 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
760 duplicated if-else-if conditions.
762 2015-10-01 Marek Polacek <polacek@redhat.com>
764 * c-typeck.c (convert_for_assignment): Improve commentary.
766 2015-09-30 Marek Polacek <polacek@redhat.com>
769 * c-typeck.c (c_finish_return): Use the expansion point location for
770 certain "return with value" warnings.
772 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
774 * c-parser.c (pragma_lex): Add loc argument.
776 2015-09-15 Marek Polacek <polacek@redhat.com>
779 * c-decl.c (tag_exists_p): New function.
780 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
781 struct/union/enum keywords are missing.
782 * c-tree.h (tag_exists_p): Declare.
784 2015-09-15 Marek Polacek <polacek@redhat.com>
786 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
787 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
788 Return NULL_TREE instead of 0.
789 (lookup_name): Return NULL_TREE instead of 0.
790 (lookup_name_in_scope): Likewise.
791 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
792 (parser_xref_tag): Use false instead of 0.
793 (start_struct): Use true instead of 1.
794 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
796 2015-09-14 Marek Polacek <polacek@redhat.com>
798 * c-typeck.c (set_nonincremental_init_from_string): Use
799 HOST_WIDE_INT_M1U when shifting a negative value.
801 2015-09-09 Mark Wielaard <mjw@redhat.com>
803 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
806 2015-09-10 Jakub Jelinek <jakub@redhat.com>
809 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
810 into OMP_FOR_PRE_BODY rather than before the loop.
812 2015-09-09 Jakub Jelinek <jakub@redhat.com>
815 * c-parser.c (c_parser_oacc_all_clauses,
816 c_parser_omp_all_clauses): Remove invalid clause from
817 list of clauses even if parser->error is set.
820 * c-parser.c (c_parser_omp_clause_aligned,
821 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
823 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
827 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
828 instead of c_parser_unary_expression. If the result is !lvalue_p,
829 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
831 2015-09-04 Marek Polacek <polacek@redhat.com>
834 * c-typeck.c (build_binary_op): Don't instrument static initializers.
836 2015-09-03 Martin Sebor <msebor@redhat.com>
839 * c-typeck.c (convert_arguments, parser_build_unary_op,
840 build_conditional_expr, c_cast_expr, convert_for_assignment,
841 build_binary_op, _objc_common_truthvalue_conversion): Call
843 (c_decl_implicit): Define.
845 2015-09-02 Marek Polacek <polacek@redhat.com>
848 * c-parser.c (c_parser_enum_specifier): Give a better error for
851 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
853 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
855 2015-08-12 Marek Polacek <polacek@redhat.com>
857 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
860 2015-08-03 Marek Polacek <polacek@redhat.com>
863 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
865 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
867 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
869 * c-parser.c (c_parser_if_body): Take token_indent_info
870 argument. Call warn_for_misleading_indentation even when the
871 body is a semicolon. Extract token_indent_infos corresponding
872 to the guard, body and next tokens. Adjust call to
873 warn_for_misleading_indentation accordingly.
874 (c_parser_else_body): Likewise.
875 (c_parser_if_statement): Likewise.
876 (c_parser_while_statement): Likewise.
877 (c_parser_for_statement): Likewise.
879 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
880 Manuel López-Ibáñez <manu@gcc.gnu.org>
882 * c-decl.c (get_parm_info): Remove static var. Update warning
885 2015-07-27 Marek Polacek <polacek@redhat.com>
889 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
891 2015-07-20 Marek Polacek <polacek@redhat.com>
894 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
895 (build_binary_op): Warn about left shift overflows.
897 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
899 * c-array-notation.c: Adjust includes for flags.h changes.
900 * c-objc-common.c: Likewise.
902 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
904 * c-array-notation.c: Adjust includes.
905 * c-aux-info.c: Likewise.
906 * c-convert.c: Likewise.
907 * c-decl.c: Likewise.
908 * c-errors.c: Likewise.
909 * c-lang.c: Likewise.
910 * c-objc-common.c: Likewise.
911 * c-parser.c: Likewise.
912 * c-typeck.c: Likewise.
914 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
917 * c-decl.c (finish_function): Call do_warn_unused_parameter.
919 2015-06-29 Marek Polacek <polacek@redhat.com>
922 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
923 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
924 about -Wswitch-bool here.
925 (do_case): Update c_add_case_label call.
926 (c_finish_case): Update c_do_switch_warnings call.
928 2015-06-27 Marek Polacek <polacek@redhat.com>
930 * c-typeck.c: Use VECTOR_TYPE_P throughout.
932 2015-06-26 Marek Polacek <polacek@redhat.com>
934 * c-array-notation.c (fix_builtin_array_notation_fn): Use
936 * c-typeck.c (array_to_pointer_conversion): Likewise.
937 (build_unary_op): Likewise.
938 (c_finish_return): Likewise.
940 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
942 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
943 * c-parser.c: Likewise.
945 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
947 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
948 instead of pointer_hash.
949 (detect_field_duplicates): Likewise.
951 2015-06-25 Marek Polacek <polacek@redhat.com>
953 * c-array-notation.c: Use VAR_P throughout.
954 * c-decl.c: Likewise.
955 * c-objc-common.c: Likewise.
956 * c-parser.c: Likewise.
957 * c-typeck.c: Likewise.
959 2015-06-25 Marek Polacek <polacek@redhat.com>
961 * c-decl.c: Use is_global_var throughout.
962 * c-parser.c: Likewise.
963 * c-typeck.c: Likewise.
965 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
967 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
968 * c-aux-info.c: Likewise.
969 * c-convert.c: Likewise.
970 * c-decl.c: Likewise.
971 * c-errors.c: Likewise.
972 * c-lang.c: Likewise.
973 * c-objc-common.c: Likewise.
974 * c-parser.c: Likewise.
975 * c-typeck.c: Likewise.
977 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
980 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
983 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
985 * c-decl.c (pop_scope): Register the main translation unit
986 through the new debug hook.
988 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
990 * c-array-notation.c : Adjust include files.
991 * c-aux-info.c : Likewise.
992 * c-convert.c : Likewise.
993 * c-decl.c : Likewise.
994 * c-errors.c : Likewise.
995 * c-lang.c : Likewise.
996 * c-lang.h : Likewise.
997 * c-objc-common.c : Likewise.
998 * c-parser.c : Likewise.
999 * c-typeck.c : Likewise.
1001 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1003 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1004 immediately clobber it.
1005 (c_write_global_declarations_1): Remove call to
1006 check_global_declaration_1.
1007 (c_write_global_declarations_2): Remove.
1008 (c_write_final_cleanups): Rename from c_write_global_declarations.
1009 Remove call to finalize_compilation_unit.
1010 Remove calls to debugging hooks.
1011 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1012 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1013 * c-tree.h: Remove c_write_global_declarations.
1015 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1017 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1018 * c-aux-info.c: Likewise.
1019 * c-convert.c: Likewise.
1020 * c-decl.c: Likewise.
1021 * c-errors.c: Likewise.
1022 * c-lang.c: Likewise.
1023 * c-objc-common.c: Likewise.
1024 * c-parser.c: Likewise.
1025 * c-typeck.c: Likewise.
1027 2015-06-04 Marek Polacek <polacek@redhat.com>
1030 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1033 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1035 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1036 Warn for empty struct.
1037 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1039 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1041 * c-decl.c (start_function): Call plugin before parsing.
1042 (finish_function): Call plugin after parsing.
1044 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1047 * c-decl.c (merge_decls): Merge DECL_COMMON.
1049 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1051 * Make-lang.in (check_gcc_pallelize): Define.
1053 2015-05-22 Marek Polacek <polacek@redhat.com>
1056 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1059 2015-05-21 Marek Polacek <polacek@redhat.com>
1061 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1064 2015-05-20 Marek Polacek <polacek@redhat.com>
1066 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1067 * c-typeck.c: Likewise.
1069 2015-05-19 Marek Polacek <polacek@redhat.com>
1071 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1073 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1076 * c-parser.c (c_parser_omp_for_loop): Don't add
1077 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1078 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1079 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1082 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1084 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
1087 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1090 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1093 2015-05-14 Marek Polacek <polacek@redhat.com>
1097 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1100 2015-05-12 David Malcolm <dmalcolm@redhat.com>
1102 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1103 to add a call to warn_for_misleading_indentation.
1104 (c_parser_else_body): Likewise, adding param "else_loc".
1105 (c_parser_if_statement): Check for misleading indentation.
1106 (c_parser_while_statement): Likewise.
1107 (c_parser_for_statement): Likewise.
1109 2015-05-08 Marek Polacek <polacek@redhat.com>
1112 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1113 (output_init_element): Likewise.
1115 2015-05-07 Marek Polacek <polacek@redhat.com>
1118 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1121 2015-04-30 Marek Polacek <polacek@redhat.com>
1123 * c-typeck.c (set_init_label): Call error_at instead of error and
1126 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1129 * c-typeck.c (c_build_va_arg): Clarify the error message.
1131 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1133 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1134 OMP_STANDALONE_CLAUSES.
1136 2015-04-28 Marek Polacek <polacek@redhat.com>
1138 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1140 2015-04-28 Marek Polacek <polacek@redhat.com>
1143 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1145 2015-04-25 Marek Polacek <polacek@redhat.com>
1148 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1151 2015-04-23 Marek Polacek <polacek@redhat.com>
1154 * c-decl.c (set_labels_context_r): New function.
1155 (store_parm_decls): Call it via walk_tree_without_duplicates.
1156 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1157 instead of create_tmp_var. Build TARGET_EXPR instead of
1159 (build_atomic_assign): Use create_tmp_var_raw instead of
1160 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1162 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1164 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1165 (c_parser_omp_target_update): Add missed %> to error_at ().
1167 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1170 * c-decl.c (c_default_pointer_mode): Remove definition.
1171 * c-tree.h (c_default_pointer_mode): Remove declaration.
1173 2015-03-27 Tobias Burnus <burnus@net-b.de>
1176 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1178 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1179 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1180 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1182 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1184 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1185 attribute for DECL_EXTERNAL VAR_DECLs.
1187 2015-03-11 Jakub Jelinek <jakub@redhat.com>
1189 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1192 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1195 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1196 before preparing arguments to warn_logical_not_parentheses.
1198 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1201 * c-typeck.c (parser_build_binary_op): Don't warn for
1202 !!x == y or !b == y where b is _Bool.
1204 2015-03-09 Marek Polacek <polacek@redhat.com>
1206 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1207 * c-decl.c (grokdeclarator): Likewise.
1208 * c-typeck.c (build_binary_op): Likewise.
1210 2015-02-27 Marek Polacek <polacek@redhat.com>
1213 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1215 2015-02-14 Marek Polacek <polacek@redhat.com>
1218 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1219 declared through a typedef name.
1221 2015-02-13 Marek Polacek <polacek@redhat.com>
1224 * c-decl.c (grokdeclarator): Print also the type when giving
1225 the error message about array's incomplete element type.
1227 2015-02-11 Jakub Jelinek <jakub@redhat.com>
1230 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1231 check in the POP macro.
1233 2015-02-09 Marek Polacek <polacek@redhat.com>
1236 * c-typeck.c (process_init_element): Don't always wrap
1237 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1238 initializing a range of elements.
1240 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1244 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1246 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
1248 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1249 processing enum declaration.
1251 2015-01-29 Marek Polacek <polacek@redhat.com>
1254 * c-typeck.c (pop_init_level): If constructor_elements has
1255 exactly one element with integer_zerop value, set constructor_zeroinit
1256 to 1. Remove braces around warning_init call.
1258 2015-01-27 Jakub Jelinek <jakub@redhat.com>
1261 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1262 of FUNCTION_DECLs with error_mark_node.
1264 2015-01-26 Jakub Jelinek <jakub@redhat.com>
1267 * c-typeck.c (convert_arguments): Return -1 if there are
1268 error_args, even if we've diagnosed too many arguments.
1270 2015-01-21 Richard Biener <rguenther@suse.de>
1273 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1274 for builtins the user declared correctly.
1276 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1277 Bernd Schmidt <bernds@codesourcery.com>
1278 Cesar Philippidis <cesar@codesourcery.com>
1279 James Norris <jnorris@codesourcery.com>
1280 Jakub Jelinek <jakub@redhat.com>
1281 Ilmir Usmanov <i.usmanov@samsung.com>
1283 * c-parser.c: Include "gomp-constants.h".
1284 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1285 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1286 Use OMP_CLAUSE_SET_MAP_KIND.
1287 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1288 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1289 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1290 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1291 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1292 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1293 "copyout", "create", "delete", "deviceptr", "gang", "host",
1294 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1295 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1296 "present_or_create", "pcreate", "seq", "self", "vector",
1297 "vector_length", "wait", "worker".
1298 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1299 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1300 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1301 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1302 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1303 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1304 (c_parser_oacc_data_clause_deviceptr)
1305 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1306 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1307 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1308 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1309 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1310 (c_parser_oacc_parallel, c_parser_oacc_update)
1311 (c_parser_oacc_wait): New functions.
1312 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1313 (c_finish_oacc_data): New prototypes.
1314 * c-typeck.c: Include "gomp-constants.h".
1315 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1316 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1317 OMP_CLAUSE_SET_MAP_KIND.
1318 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1319 (c_finish_oacc_data): New functions.
1320 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1321 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1322 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1323 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1324 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1325 GOMP_MAP_FORCE_DEVICEPTR.
1327 2015-01-09 Michael Collison <michael.collison@linaro.org>
1329 * c-array-notation.c: Include hash-set.h, machmode.h,
1330 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1331 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1332 * c-aux-info.c: Ditto.
1333 * c-convert.c: Ditto.
1335 * c-errors.c: Ditto.
1336 * c-lang.c: Dittoxs.
1337 * c-objc-common.c: Ditto.
1338 * c-parser.c: Ditto.
1339 * c-typeck.c: Include hash-set.h, machmode.h,
1340 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1341 fold-const.h, wide-int.h, inchash.h, real.h and
1342 fixed-value.h due to flattening of tree.h.
1344 2015-01-07 Marek Polacek <polacek@redhat.com>
1347 * c-typeck.c (process_init_element): Disallow initialization of
1348 a flexible array member with a string constant if the structure
1351 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1354 * c-typeck.c (convert_for_assignment, c_finish_return): For
1355 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1356 types also set in_late_binary_op around convert call.
1357 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1358 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1359 result on expr as last argument to ubsan_instrument_float_cast,
1360 if in_late_binary_op, don't use c_save_expr but save_expr.
1362 Update copyright years.
1364 2015-01-05 Marek Polacek <polacek@redhat.com>
1367 * c-typeck.c (build_array_ref): Pass loc down to
1368 warn_array_subscript_with_type_char.
1370 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1372 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1373 (common-pointer-type): For pointers to arrays take qualifiers from
1375 (build_conditional_expr): Add warnings for lost qualifiers.
1376 (comp-target-types): Allow pointers to arrays with different qualifiers.
1377 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1378 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1379 to PEDWARN_FOR_QUALIFIERS.
1381 2014-12-17 Jakub Jelinek <jakub@redhat.com>
1384 * c-convert.c: Include ubsan.h.
1385 (convert): For real -> integral casts and
1386 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1387 instead instrument the float cast directly.
1389 2014-11-29 Jakub Jelinek <jakub@redhat.com>
1391 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1392 c_finish_stmt_expr): Remove NULL last argument from
1393 create_tmp_var_raw and create_tmp_var calls.
1394 * c-array-notation.c (fix_builtin_array_notation_fn,
1395 build_array_notation_expr, fix_conditional_array_notations_1,
1396 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1398 2014-11-28 Marek Polacek <polacek@redhat.com>
1401 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1402 convert the right operand to integer type.
1404 2014-11-25 Marek Polacek <polacek@redhat.com>
1407 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1408 for inline functions.
1410 2014-11-21 Jakub Jelinek <jakub@redhat.com>
1413 * c-typeck.c (build_array_ref): Adjust
1414 convert_vector_to_pointer_for_subscript caller. If it returns true,
1415 call non_lvalue_loc on the result.
1417 2014-11-11 Richard Biener <rguenther@suse.de>
1419 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1422 2014-11-10 Andi Kleen <ak@linux.intel.com>
1425 * c-parser.c (c_parser_statement_after_labels): Call
1427 (c_parser_if_statement): Dito.
1428 (c_parser_switch_statement): Dito.
1429 (c_parser_while_statement): Dito.
1430 (c_parser_do_statement): Dito.
1431 (c_parser_for_statement): Dito.
1432 * c-typeck.c (c_finish_loop): Dito.
1434 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1436 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1437 OPT_Wshift_count_overflow in the warnings.
1439 2014-10-30 Marek Polacek <polacek@redhat.com>
1441 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1442 print the stripped version as well, if they're not the same.
1444 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1446 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1449 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
1451 * c-decl.c: Adjust include files.
1452 * c-parser.c: Ditto.
1454 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1455 Tom Tromey <tromey@redhat.com>
1457 * c-tree.h (enum c_oracle_request): New.
1458 (c_binding_oracle_function): New typedef.
1459 (c_binding_oracle, c_pushtag, c_bind): Declare.
1460 * c-decl.c (c_binding_oracle): New global.
1461 (I_SYMBOL_CHECKED): New macro.
1462 (i_symbol_binding): New function.
1463 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1464 (I_TAG_CHECKED): New macro.
1465 (i_tag_binding): New function.
1466 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1467 (I_LABEL_CHECKED): New macro.
1468 (i_label_binding): New function.
1469 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1470 (c_print_identifier): Save and restore c_binding_oracle.
1471 (c_pushtag, c_bind): New functions.
1473 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
1475 * c-typeck.c: Adjust include files.
1477 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1480 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1481 initialization here...
1482 (c_initialize_diagnostics): ... but here. Set defaults after
1483 building pretty-printer.
1485 2014-10-23 Marek Polacek <polacek@redhat.com>
1488 * c-decl.c (pop_scope): Don't print warning in external_scope.
1490 2014-10-19 Marek Polacek <polacek@redhat.com>
1493 * c-typeck.c (output_init_element): Allow initializing objects with
1494 static storage duration with compound literals even in C99 and add
1497 2014-10-17 Marek Polacek <polacek@redhat.com>
1500 * c-typeck.c (digest_init): Allow initializing objects with static
1501 storage duration with compound literals even in C99 and add pedwarn
1504 2014-10-17 Marek Polacek <polacek@redhat.com>
1507 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1508 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1509 error multiple times. Print the type.
1511 2014-10-17 Marek Polacek <polacek@redhat.com>
1514 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1517 2014-10-17 Marek Polacek <polacek@redhat.com>
1519 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1520 (start_function): Use OPT_Wimplicit_int instead of 0.
1521 (store_parm_decls_oldstyle): Likewise.
1523 2014-10-17 Alan Modra <amodra@gmail.com>
1526 * c-decl.c (merge_decls): Don't merge section name or tls model
1527 to newdecl symtab node, instead merge to olddecl. Override
1528 existing olddecl section name. Set tls_model for all thread-local
1529 vars, not just OMP thread-private ones. Remove incorrect comment.
1531 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
1533 * c-decl.c: Adjust include files.
1535 2014-10-14 DJ Delorie <dj@redhat.com>
1537 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1538 (c_token_starts_typename): Check all __intN, not just __int128.
1539 (c_token_starts_declspecs): Likewise.
1540 (c_parser_declspecs): Likewise.
1541 (c_parser_attribute_any_word): Likewise.
1542 (c_parser_objc_selector): Likewise.
1543 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1544 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1546 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1548 (finish_declspecs): Likewise.
1550 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1552 * c-parser.c (c_parser_all_labels): New function to replace
1554 (c_parser_statement): Call the new function.
1556 2014-10-09 Marek Polacek <polacek@redhat.com>
1559 * c-typeck.c (pop_init_level): Don't warn about initializing
1562 2014-10-07 Marek Polacek <polacek@redhat.com>
1565 * c-decl.c (header_for_builtin_fn): New function.
1566 (implicitly_declare): Suggest which header to include.
1568 2014-10-07 Marek Polacek <polacek@redhat.com>
1570 * c-convert.c (convert): Use error_operand_p.
1571 * c-typeck.c (require_complete_type): Likewise.
1572 (really_atomic_lvalue): Likewise.
1573 (digest_init): Likewise.
1574 (handle_omp_array_sections_1): Likewise.
1576 2014-10-03 Marek Polacek <polacek@redhat.com>
1579 * c-decl.c (pop_scope): Don't warn about "inline function declared
1580 but never defined" for functions marked with gnu_inline attribute.
1582 2014-09-25 Jakub Jelinek <jakub@redhat.com>
1585 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1586 on low_bound and length.
1588 2014-09-24 Marek Polacek <polacek@redhat.com>
1592 * c-parser.c: Don't define CPP_KEYWORD.
1593 (c_parser_switch_statement): Pass original type to c_finish_case.
1594 * c-tree.h (c_finish_case): Update declaration.
1595 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1596 conditionally to c_do_switch_warnings.
1598 2014-09-03 Marek Polacek <polacek@redhat.com>
1601 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1604 2014-09-02 Jakub Jelinek <jakub@redhat.com>
1605 Balaji V. Iyer <balaji.v.iyer@intel.com>
1606 Igor Zamyatin <igor.zamyatin@intel.com>
1608 * c-parser.c (c_parser_cilk_for): New function.
1609 (c_parser_cilk_grainsize): Likewise.
1610 (c_get_temp_regvar): Likewise.
1611 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1612 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1613 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1614 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1617 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1619 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1620 with using HOST_WIDE_INT without truncation to 'int'
1622 2014-08-22 Marek Polacek <polacek@redhat.com>
1625 * c-typeck.c (parser_build_binary_op): Adjust call to
1626 warn_logical_not_parentheses.
1628 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1631 * c-parser.c (c_parser_array_notation): Check for correct
1632 type of an array added.
1634 2014-08-19 Marek Polacek <polacek@redhat.com>
1637 * c-typeck.c (build_binary_op): If either operand of a comparison
1638 is a boolean expression, call maybe_warn_bool_compare.
1640 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1643 * c-typeck.c (build_c_cast): Do a conversion even when the
1644 TYPE_MAIN_VARIANTs are the same.
1646 2014-08-19 Marek Polacek <polacek@redhat.com>
1648 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1649 pedwarn_c99 instead of pedwarn.
1650 (grokfield): Likewise.
1651 (warn_defaults_to): New function.
1652 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1653 Unconditionally call pedwarn_c99 instead of pedwarn.
1654 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1655 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1656 check flag_isoc11 before.
1657 * c-errors.c (pedwarn_c99): Change the return type to bool.
1658 Handle -Wc99-c11-compat.
1659 * c-parser.c (disable_extension_diagnostics): Handle
1660 warn_c99_c11_compat.
1661 (restore_extension_diagnostics): Likewise.
1662 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1663 instead of pedwarn, don't check flag_isoc11 before.
1664 (c_parser_declspecs): Likewise.
1665 (c_parser_alignas_specifier): Likewise.
1666 (c_parser_alignof_expression): Likewise.
1667 (c_parser_generic_selection): Likewise.
1668 * c-tree.h (pedwarn_c99): Update declaration.
1669 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1672 2014-08-19 Marek Polacek <polacek@redhat.com>
1674 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1676 * c-errors.c: Include "opts.h".
1677 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1678 * c-parser.c (disable_extension_diagnostics): Handle negative value
1679 of warn_c90_c99_compat, too.
1680 (restore_extension_diagnostics): Likewise.
1681 (c_parser_compound_statement_nostart): Pass
1682 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1684 2014-08-12 Marek Polacek <polacek@redhat.com>
1686 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1688 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1690 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1692 2014-08-10 Marek Polacek <polacek@redhat.com>
1695 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1696 Call pedwarn_c90 instead of pedwarn.
1697 (check_bitfield_type_and_width): Likewise.
1698 (declspecs_add_qual): Likewise.
1699 (declspecs_add_type): Likewise.
1700 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1701 Adjust to only call pedwarn_c90.
1702 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1703 pedwarn_c90 instead of pedwarn.
1704 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1705 * c-parser.c (disable_extension_diagnostics): Handle
1706 warn_c90_c99_compat.
1707 (restore_extension_diagnostics): Likewise.
1708 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1709 pedwarn_c90 instead of pedwarn.
1710 (c_parser_initelt): Likewise.
1711 (c_parser_postfix_expression): Likewise.
1712 (c_parser_postfix_expression_after_paren_type): Likewise.
1713 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1714 * c-tree.h: Fix formatting.
1715 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1716 pedwarn_c90 instead of pedwarn.
1718 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1720 * c-typeck.c: Remove include of pointer-set.h.
1722 2014-08-07 Marek Polacek <polacek@redhat.com>
1724 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1726 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1728 * c-typeck.c: Use hash_map instead of pointer_map.
1730 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1732 * c-decl.c: Use hash_set instead of pointer_set.
1734 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1737 * c-array-notation.c (expand_array_notations): Handling
1740 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
1743 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1746 2014-07-30 Tom Tromey <tromey@redhat.com>
1748 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1750 (really_start_incremental_init, push_init_level): Initialize
1752 (pop_init_level): Set global designator_depth.
1753 (process_init_element): Check for designated_init attribute.
1755 2014-07-20 Marek Polacek <polacek@redhat.com>
1758 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1759 (implicitly_declare): Pass location to implicit_decl_warning.
1761 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1764 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1765 If non-NULL, call c_parser_check_literal_zero.
1766 (c_parser_check_literal_zero): New function.
1767 (c_parser_postfix_expression_after_primary): Adjust
1768 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1770 2014-07-06 Marek Polacek <polacek@redhat.com>
1773 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1774 * c-tree.h (C_ARRAY_PARAMETER): Define.
1775 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1778 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
1779 Chen Gang <gang.chen.5i5j@gmail.com>
1781 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1784 2014-07-01 Marek Polacek <polacek@redhat.com>
1786 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1787 instead of 0 to WARN_FOR_ASSIGNMENT.
1789 2014-07-01 Marek Polacek <polacek@redhat.com>
1792 * c-typeck.c (convert_for_assignment): Pass
1793 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1795 2014-06-30 Marek Polacek <polacek@redhat.com>
1797 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1798 has no_sanitize_undefined attribute.
1800 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1803 * c-array-notation.c (fix_builtin_array_notation_fn):
1804 Check for 0 arguments in builtin call. Check that bultin argument is
1806 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1809 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1811 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1812 qualifiers in __auto_type for atomic types.
1813 (c_parser_typeof_specifier): Discard all type qualifiers in
1814 __typeof__ for atomic types.
1816 2014-06-25 Marek Polacek <polacek@redhat.com>
1819 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1820 the return expression to c_finish_return.
1822 2014-06-25 Jakub Jelinek <jakub@redhat.com>
1824 * c-typeck.c (c_finish_omp_clauses): Make sure
1825 OMP_CLAUSE_LINEAR_STEP has correct type.
1827 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1831 2014-06-24 Jakub Jelinek <jakub@redhat.com>
1833 * c-parser.c (c_parser_omp_for_loop): For
1834 #pragma omp parallel for simd move lastprivate clause from parallel
1835 to for rather than simd.
1837 2014-06-23 Marek Polacek <polacek@redhat.com>
1839 * c-typeck.c (parser_build_binary_op): Don't call
1840 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1842 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1844 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1845 * c-decl.c (merge_decls): Likewise.
1847 2014-06-09 Marek Polacek <polacek@redhat.com>
1850 * c-typeck.c (error_init): Call inform instead of error_at.
1851 (pedwarn_init): Call inform instead of pedwarn.
1852 (warning_init): Call inform instead of warning_at.
1854 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
1856 * c-decl.c (merge_decls): Use set_decl_section_name.
1857 (duplicate_decls): Remove node if it exists.
1859 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1862 * c-typeck.c (push_init_level, process_init_element,
1863 pop_init_level): Correct check for zero initialization, move
1864 missing brace warning to respect zero initialization.
1866 2014-06-05 Marek Polacek <polacek@redhat.com>
1869 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1871 2014-06-05 Marek Polacek <polacek@redhat.com>
1874 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1875 on the left hand side operand of a comparison.
1877 2014-06-05 Marek Polacek <polacek@redhat.com>
1880 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1881 Print note only if the warning was printed.
1883 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1886 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1889 2014-06-03 Marek Polacek <polacek@redhat.com>
1892 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1894 * c-tree.h (c_start_case): Update.
1895 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1896 switch condition has boolean value.
1898 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
1900 * c-decl.c: Include builtins.h.
1901 * c-parser.c: Likewise.
1903 2014-05-27 Marek Polacek <polacek@redhat.com>
1906 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1907 error and warning calls to error_at and warning_at. Pass location of
1908 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1909 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1910 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1912 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1915 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1916 function parameters.
1918 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1920 * c-decl.c (merge_decls): Preserve symtab node pointers.
1921 (duplicate_decls): Free new decl.
1923 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1925 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1928 * c-parser.c (c_parser_omp_target): Return bool values.
1930 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1932 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1933 num_teams_loc variable to num_thread_limit_loc.
1935 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1937 * c-array-notation.c (expand_array_notations): Use void_node
1938 instead of void_zero_node.
1940 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1942 * c-decl.c (finish_struct): Adjust.
1943 (finish_enum): Likewise.
1945 (record_inline_static): Likewise.
1946 (push_scope): Likewise.
1947 (make_label): Likewise.
1948 (lookup_label_for_goto): Likewise.
1949 (finish_struct): Likewise.
1950 (finish_enum): Likewise.
1951 (store_parm_decls): Likewise.
1952 (c_push_function_context): Likewise.
1953 * c-lang.h: Remove usage of variable_size gty attribute.
1954 * c-parser.c (c_parse_init): Adjust.
1955 (c_parse_file): Likewise.
1957 2014-05-13 Marek Polacek <polacek@redhat.com>
1960 * c-typeck.c (convert_for_assignment): Pass location to
1961 WARN_FOR_ASSIGNMENT instead of input_location.
1963 2014-05-10 Marek Polacek <polacek@redhat.com>
1965 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1966 maybe_warn_string_init.
1967 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1968 maybe_warn_string_init.
1969 * c-tree.h (maybe_warn_string_init): Update declaration.
1970 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1971 Call pedwarn_init with loc instead of with input_location.
1972 (digest_init): Pass init_loc to maybe_warn_string_init.
1973 (pop_init_level): Call pedwarn_init with loc instead of with
1975 (set_init_index): Likewise.
1976 (process_init_element): Likewise.
1978 2014-05-09 Marek Polacek <polacek@redhat.com>
1981 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1982 (c_parser_initelt): Pass location to set_init_label. Pass array index
1983 location to set_init_index.
1984 * c-tree.h (push_init_level): Update declaration.
1985 (pop_init_level): Likewise.
1986 (set_init_index): Likewise.
1987 (set_init_label): Likewise.
1988 * c-typeck.c (error_init): Add location parameter. Call error_at
1990 (digest_init): Pass init_loc to error_init.
1991 (really_start_incremental_init):
1992 (push_init_level): Add location parameter. Pass loc to pop_init_level
1994 (pop_init_level): Likewise.
1995 (set_designator): Add location parameter. Pass loc to pop_init_level,
1996 push_init_level, and error_init.
1997 (set_init_index): Add location parameter. Pass loc to error_init and
1999 (set_init_label): Likewise.
2000 (output_init_element): Pass loc to error_init.
2001 (process_init_element): Pass loc to error_init, pop_init_level,
2002 pedwarn_init, and push_init_level.
2004 2014-05-09 Marek Polacek <polacek@redhat.com>
2007 * c-parser.c (c_parser_attributes): Parse the arguments as an
2008 expression-list if the attribute takes identifier.
2010 2014-05-08 Marek Polacek <polacek@redhat.com>
2013 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2016 2014-05-08 Marek Polacek <polacek@redhat.com>
2019 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2022 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2023 Mike Stump <mikestump@comcast.net>
2024 Richard Sandiford <rdsandiford@googlemail.com>
2026 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2027 (finish_enum): Use wide-int interfaces.
2028 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2029 * c-typeck.c (build_c_cast): Likewise.
2030 (set_nonincremental_init_from_string): Likewise.
2031 (c_tree_equal): Likewise.
2033 2014-05-02 Marek Polacek <polacek@redhat.com>
2036 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2037 Return size_one_node when the type is not complete.
2038 (pointer_diff): Remove comment.
2039 (build_unary_op): Improve error messages.
2041 2014-05-02 Marek Polacek <polacek@redhat.com>
2043 * c-typeck.c (c_finish_return): Separate warning_at calls.
2045 2014-05-02 Marek Polacek <polacek@redhat.com>
2047 * c-tree.h (error_init): Remove declaration.
2048 (pedwarn_init): Likewise.
2049 * c-typeck.c (error_init): Make static and move above.
2050 (pedwarn_init): Likewise.
2051 (warning_init): Move above.
2052 (maybe_warn_string_init): Likewise.
2054 2014-05-01 Jeff Law <law@redhat.com>
2058 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2059 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2062 2014-05-02 Marek Polacek <polacek@redhat.com>
2065 * c-typeck.c (push_init_level): Set constructor_designated to
2066 p->designated for structures.
2068 2014-05-01 Marek Polacek <polacek@redhat.com>
2071 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2072 function-definition has an attribute after the declarator.
2074 2014-05-01 Marek Polacek <polacek@redhat.com>
2077 * c-typeck.c (warning_init): Add location_t parameter. Call
2078 warning_at instead of warning.
2079 (push_init_level): Pass input_location to warning_init.
2080 (add_pending_init): Add location_t parameter. Pass loc to
2082 (set_nonincremental_init): Pass input_location to add_pending_init.
2083 (set_nonincremental_init_from_string): Likewise.
2084 (output_init_element): Pass loc to warning_init and to
2087 2014-05-01 Marek Polacek <polacek@redhat.com>
2090 * c-typeck.c (c_finish_return): Distinguish between label and variable
2091 when warning about returning local address.
2093 2014-05-01 Marek Polacek <polacek@redhat.com>
2096 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2099 2014-05-01 Marek Polacek <polacek@redhat.com>
2102 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2103 instead of 0 to WARN_FOR_QUALIFIERS.
2105 2014-05-01 Marek Polacek <polacek@redhat.com>
2108 * c-typeck.c (default_conversion): Use better location for
2111 2014-04-30 Marek Polacek <polacek@redhat.com>
2113 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2114 also when SANITIZE_FLOAT_DIVIDE is on.
2116 2014-04-30 Marek Polacek <polacek@redhat.com>
2119 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2120 and pedwarn_init. Use loc insted of input_location.
2122 2014-04-30 Marek Polacek <polacek@redhat.com>
2125 * c-typeck.c (build_binary_op): Use location when warning about
2128 2014-04-25 Marek Polacek <polacek@redhat.com>
2131 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2132 always_inline/noinline and hot/cold attributes.
2134 2014-04-25 Marek Polacek <polacek@redhat.com>
2137 * c-parser.c (c_parser_initelt): Pass input_location to
2138 process_init_element.
2139 (c_parser_initval): Pass loc to process_init_element.
2140 * c-tree.h (process_init_element): Adjust declaration.
2141 * c-typeck.c (push_init_level): Pass input_location to
2142 process_init_element.
2143 (pop_init_level): Likewise.
2144 (set_designator): Likewise.
2145 (output_init_element): Add location_t parameter. Pass loc to
2147 (output_pending_init_elements): Pass input_location to
2148 output_init_element.
2149 (process_init_element): Add location_t parameter. Pass loc to
2150 output_init_element.
2152 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2154 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2155 atomic-clause, allow comma in between atomic-clause and
2158 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2161 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2162 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2164 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2167 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2168 create_tmp_var instead build_decl for creating temps.
2169 (build_array_notation_expr): Likewise.
2170 (fix_conditional_array_notations_1): Likewise.
2171 (fix_array_notation_expr): Likewise.
2172 (fix_array_notation_call_expr): Likewise.
2174 2014-03-28 Jakub Jelinek <jakub@redhat.com>
2177 * c-tree.h (c_build_function_call_vec): New prototype.
2178 * c-typeck.c (build_function_call_vec): Don't call
2179 resolve_overloaded_builtin here.
2180 (c_build_function_call_vec): New wrapper function around
2181 build_function_call_vec. Call resolve_overloaded_builtin here.
2182 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2183 Call c_build_function_call_vec instead of build_function_call_vec.
2184 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2185 * c-decl.c (finish_decl): Likewise.
2187 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2190 * c-typeck.c: Use correct format string in cast-qual warning
2192 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2194 * c-decl.c (c_decl_attributes): Use
2195 lang_hooks.types.omp_mappable_type.
2196 * c-typeck.c (c_finish_omp_clauses): Likewise.
2198 2014-03-06 Marek Polacek <polacek@redhat.com>
2201 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2202 of checking tree code.
2204 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2206 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2207 (c_parser_parameter_declaration): Likewise.
2209 2014-02-19 Marek Polacek <polacek@redhat.com>
2212 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2213 Call mark_exp_read on exp.value.
2214 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2215 TREE_ADDRESSABLE on old instead of val.
2216 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2218 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2220 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2221 C_EXPR_APPEND by vec_safe_push.
2222 * c-tree.h (C_EXPR_APPEND): Remove.
2224 2014-01-31 Marek Polacek <polacek@redhat.com>
2227 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2228 build_function_call_vec.
2229 (build_function_call): Likewise.
2230 (build_atomic_assign): Likewise.
2231 (build_function_call_vec): Add arg_loc parameter. Use it.
2232 (convert_arguments): Likewise.
2233 (convert_for_assignment): Rename rhs_loc to expr_loc.
2234 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2235 (c_parser_objc_keywordexpr): Likewise.
2236 (c_parser_postfix_expression_after_primary): Call
2237 build_function_call_vec with expr_loc rather than op_loc.
2238 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2239 build_function_call_vec.
2240 (c_parser_expr_list): Add locations parameter. Fill it with locations
2241 of function arguments.
2242 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2244 2014-01-30 Marek Polacek <polacek@redhat.com>
2247 * c-typeck.c (build_function_call_vec): Use loc parameter.
2248 (convert_arguments): Add location parameter. Use it.
2249 (ep_convert_and_check): Likewise.
2250 (build_atomic_assign): Adjust convert_for_assignment call.
2251 (build_modify_expr): Likewise.
2252 (digest_init): Likewise.
2253 (c_finish_return): Likewise.
2254 (build_conditional_expr): Adjust ep_convert_and_check calls.
2255 (convert_for_assignment): Add rhs_loc parameter. Use it.
2256 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2259 2014-01-30 Richard Biener <rguenther@suse.de>
2262 * c-typeck.c (build_function_call_vec): Do not replace calls
2263 to a function via an incompatible type with a runtime abort.
2265 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2267 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2268 flag_enable_cilkplus with flag_cilkplus.
2269 (c_parser_direct_declarator_inner): Likewise.
2270 (c_parser_attribute_any_word): Likewise.
2271 (c_parser_attributes): Likewise.
2272 (c_parser_compound_statement): Likewise.
2273 (c_parser_statement_after_labels): Likewise.
2274 (c_parser_if_statement): Likewise.
2275 (c_parser_switch_statement): Likewise.
2276 (c_parser_do_statement): Likewise.
2277 (c_parser_for_statement): Likewise.
2278 (c_parser_unary_expression): Likewise.
2279 (c_parser_postfix_expression): Likewise.
2280 (c_parser_postfix_expression_after_primary): Likewise.
2281 (c_parser_postfix_expression_after_primary): Likewise.
2282 (c_parser_omp_clause_name): Likewise.
2283 (c_finish_omp_declare_simd): Likewise.
2284 (c_parser_cilk_verify_simd): Likewise.
2285 * c-typeck.c (build_array_ref): Likewise.
2286 (build_function_call_vec): Likewise.
2287 (convert_arguments): Likewise.
2288 (build_compound_expr): Likewise.
2289 (c_finish_return): Likewise.
2290 (c_finish_if_stmt): Likewise.
2291 (c_finish_loop): Likewise.
2292 (build_binary_op): Likewise.
2294 2014-01-23 Marek Polacek <polacek@redhat.com>
2297 * c-typeck.c (parser_build_binary_op): Use location instead of
2299 (build_binary_op): Pass location to shorten_compare.
2301 2014-01-23 Marek Polacek <polacek@redhat.com>
2304 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2307 2014-01-23 Marek Polacek <polacek@redhat.com>
2310 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2311 of a comma expression.
2312 (emit_side_effect_warnings): Likewise.
2314 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2317 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2318 function to use walk_tree and moved a lot of its functionality to
2319 expand_array_notations.
2320 (expand_array_notations): New function.
2322 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2324 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2325 attribute an attribute without value.
2327 2014-01-23 Jakub Jelinek <jakub@redhat.com>
2330 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2331 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2333 2014-01-22 Marek Polacek <polacek@redhat.com>
2336 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2337 of remove_c_maybe_const_expr on op1 and op2.
2339 2014-01-15 Jakub Jelinek <jakub@redhat.com>
2342 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2343 effects, preevaluate rhs using SAVE_EXPR first.
2345 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2348 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2349 statements with if-elseif statements.
2351 2014-01-06 Marek Polacek <polacek@redhat.com>
2354 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2355 defined bit-field types only in ISO C.
2357 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2359 Update copyright years
2361 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2363 * c-array-notation.c: Use the standard form for the copyright notice.
2365 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2367 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2368 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2369 field in parser is not empty. If not-empty, call the function
2370 c_parser_finish_omp_declare_simd.
2371 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2372 between SIMD-enabled functions and #pragma simd. Added new parameter.
2373 (c_parser_cilk_all_clauses): Modified the usage of the function
2374 c_parser_cilk_clause_vectorlength as mentioned above.
2375 (c_parser_cilk_simd_fn_vector_attrs): New function.
2376 (c_finish_cilk_simd_fn_tokens): Likewise.
2377 (is_cilkplus_vector_p): Likewise.
2378 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2379 "nomask," and "mask" strings in clause name.
2380 (c_parser_omp_all_clauses): Added 3 new case statements:
2381 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2382 PRAGMA_CILK_CLAUSE_NOMASK.
2383 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2384 check for vector attribute and if so call the function
2385 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2386 called the function c_finish_cilk_simd_fn_tokens.
2387 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2388 parser field is non-empty. If so, parse them as you would parse
2389 the omp declare simd pragma.
2390 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2391 Added a check when step is a parameter and flag it as error.
2392 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2393 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2396 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2398 * c-parser.c (c_parser_omp_parallel): Fix description.
2400 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2402 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2403 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2404 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2405 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2407 2013-12-04 Joseph Myers <joseph@codesourcery.com>
2410 * c-parser.c (c_parser_alignas_specifier): Use
2411 c_sizeof_or_alignof_type instead of c_alignof.
2412 (c_parser_alignof_expression): Likewise, with min_alignof
2413 parameter depending on alignof spelling used.
2415 2013-12-04 Marek Polacek <polacek@redhat.com>
2418 * c-decl.c (start_function): Don't warn for missing prototype for
2421 2013-12-03 Marek Polacek <polacek@redhat.com>
2424 * c-decl.c (build_compound_literal): Allow compound literals with
2425 empty initial value.
2427 2013-12-02 Joseph Myers <joseph@codesourcery.com>
2430 * c-typeck.c (build_modify_expr): Diagnose assignment to
2431 expression with array type.
2433 2013-11-29 Joseph Myers <joseph@codesourcery.com>
2436 * c-typeck.c (process_init_element): Do not treat a string as
2437 initializing a whole array when used with a designator for an
2440 2013-11-29 Joseph Myers <joseph@codesourcery.com>
2443 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2444 an inline function following a static declaration.
2446 2013-11-28 Jakub Jelinek <jakub@redhat.com>
2449 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2450 to p_name before calling c_parser_omp_teams instead of after.
2451 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2452 argument. Remove unused p_name variable.
2454 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
2455 Jakub Jelinek <jakub@redhat.com>
2457 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2458 external_scope is NULL.
2460 2013-11-27 Tom de Vries <tom@codesourcery.com>
2461 Marc Glisse <marc.glisse@inria.fr>
2464 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2466 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
2468 * c-typeck.c: Add required include files from gimple.h.
2470 2013-11-22 David Malcolm <dmalcolm@redhat.com>
2472 * c-decl.c (define_label, shadow_tag_warned)
2473 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2474 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2475 (declspecs_add_type): Remove use of in_system_header macro.
2476 * c-parser.c (c_parser_unary_expression): Likewise.
2477 * c-typeck.c (store_init_value, process_init_element)
2478 (c_start_case): Likewise.
2480 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2483 * c-parser.c (c_parser_set_source_position_from_token): Remove
2484 reference to in_system_header from comment.
2486 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2488 * c-decl.c (grokdeclarator): Update comment to refer to
2489 tree_to_[su]hwi rather than tree_low_cst.
2491 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2493 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2494 tree_to_uhwi throughout.
2496 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2498 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2501 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2503 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2506 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
2508 * c-parser.c (c_parser_cilk_simd): New.
2509 (c_parser_cilk_verify_simd): New.
2510 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2511 (c_parser_omp_for_loop): Add case for NE_EXPR.
2512 Set c_break_label for CILK_SIMD.
2513 (c_parser_cilk_clause_vectorlength): New.
2514 (c_parser_cilk_clause_linear): New.
2515 (c_parser_cilk_clause_name): New.
2516 (c_parser_cilk_all_clauses): New.
2517 * c-typeck.c (build_unary_op): Pass location argument to
2519 (build_modify_expr): Same.
2520 (build_asm_expr): Same.
2521 (c_finish_bc_stmt): Error on break/continue in loops.
2523 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
2525 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2527 2013-11-14 Diego Novillo <dnovillo@google.com>
2529 * c-decl.c: Include print-tree.h.
2530 Include stor-layout.h.
2533 Include stringpool.h.
2534 * c-lang.c: Include fold-const.h.
2535 * c-parser.c: Include stringpool.h.
2537 Include stor-layout.h.
2539 Include trans-mem.h.
2540 * c-typeck.c: Include stor-layout.h.
2541 Include trans-mem.h.
2545 2013-11-13 Joseph Myers <joseph@codesourcery.com>
2547 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2548 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2550 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2551 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2553 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2554 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2555 (c_parser_declarator, c_parser_direct_declarator_inner)
2556 (c_parser_parameter_declaration, c_parser_type_name): All callers
2558 (c_parser_declaration_or_fndef): Handle declarations with type
2559 determined from the initializer.
2561 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
2563 * c-typeck.c: Include gimplify.h.
2565 2013-11-12 Joseph Myers <joseph@codesourcery.com>
2567 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2568 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2570 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2571 or _Thread_local as appropriate in diagnostics.
2572 (build_null_declspecs): Initialize ret->thread_gnu_p.
2573 (declspecs_add_scspec): Handle either __thread or _Thread_local
2574 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2575 pedantic. Do not disallow _Thread_local extern and _Thread_local
2578 2013-11-07 Joseph Myers <joseph@codesourcery.com>
2579 Andrew MacLeod <amacleod@redhat.com>
2581 * c-aux-info.c (gen_type): Handle atomic qualifier.
2582 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2583 qualifiers when compating types.
2584 (shadow_tag_warned): Handle atomic_p in declspecs.
2585 (quals_from_declspecs): Likewise.
2586 (start_decl): Use c_type_promotes_to when promoting argument
2588 (grokdeclarator): Handle _Atomic.
2589 (get_parm_info): Diagnose any qualifier on "void" as only
2591 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2592 comparing types. Use c_type_promotes_to when promoting argument
2594 (finish_function): Use c_type_promotes_to when promoting argument
2596 (build_null_declspecs): Handle atomic_p in declspecs.
2597 (declspecs_add_qual): Handle RID_ATOMIC.
2598 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2599 (c_token_starts_declspecs): Handle RID_ATOMIC.
2600 (c_parser_declspecs): Handle atomic type specifiers and
2602 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2603 from types of expressions with atomic type.
2604 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2605 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2606 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2607 (c_parser_statement_after_labels, c_parser_switch_statement)
2608 (c_parser_for_statement, c_parser_expr_no_commas)
2609 (c_parser_conditional_expression, c_parser_binary_expression)
2610 (c_parser_cast_expression, c_parser_unary_expression)
2611 (c_parser_postfix_expression)
2612 (c_parser_postfix_expression_after_primary, c_parser_expression):
2613 Use convert_lvalue_to_rvalue.
2614 (c_parser_expression_conv, c_parser_expr_list): Document
2615 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2616 (c_parser_objc_synchronized_statement): Use
2617 convert_lvalue_to_rvalue.
2618 (c_parser_objc_selector): Handle RID_ATOMIC.
2619 (c_parser_objc_receiver, c_parser_array_notation): Use
2620 convert_lvalue_to_rvalue.
2621 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2622 _Atomic (type-name).
2623 (struct c_declspecs): Add atomic_p field.
2624 (convert_lvalue_to_rvalue): Declare.
2625 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2626 corresponding atomic types.
2627 (qualify_type): Don't add _Atomic qualifiers from second argument.
2628 (comp_target_types): Do not allow _Atomic mismatches.
2629 (type_lists_compatible_p): Do not remove atomic qualifiers when
2631 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2632 (build_atomic_assign): New functions.
2633 (build_unary_op): Use build_atomic_assign for atomic increment and
2635 (build_conditional_expr): Do not treat _Atomic void as a qualified
2637 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2638 (find_anonymous_field_with_type, convert_to_anonymous_field)
2639 (convert_for_assignment): Do not remove atomic qualifiers when
2641 (digest_init): Do not accept initialization of arrays of atomic
2642 elements by string constants.
2643 (build_asm_expr): Use convert_lvalue_to_rvalue.
2644 (build_binary_op): Do not treat _Atomic void as a qualified
2647 2013-11-06 DJ Delorie <dj@redhat.com>
2649 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2650 both explicit and builtin, print the location of the explicit one.
2652 2013-11-05 Tobias Burnus <burnus@net-b.de>
2654 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2655 c_parser_omp_distribute, c_parser_omp_teams,
2656 c_parser_omp_target, c_parser_omp_declare): Handle
2659 2013-11-03 Marek Polacek <polacek@redhat.com>
2661 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2663 2013-11-01 Jakub Jelinek <jakub@redhat.com>
2665 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2666 check_dup_generic at the end, unless remove is true.
2667 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2669 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2671 2013-10-31 Jakub Jelinek <jakub@redhat.com>
2673 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2674 with decl that is not pointer nor array.
2676 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2678 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2679 a spawning function is found.
2680 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2681 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2682 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2683 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2685 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2686 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2688 (c_finish_return): Added a check to reject _Cilk_spawn in return
2690 (build_cilk_spawn): New function.
2691 (build_cilk_sync): Likewise.
2692 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2694 2013-10-27 Tobias Burnus <burnus@net-b.de>
2697 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2698 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2699 (c_parser_statement_after_labels): Update calls.
2701 2013-10-24 Tobias Burnus <burnus@net-b.de>
2704 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2705 Handle PRAGMA_IVDEP.
2706 (c_parser_statement_after_labels): Update call.
2708 2013-10-24 Marek Polacek <polacek@redhat.com>
2710 * c-parser.c (c_parser_struct_declaration): Add a comment.
2711 (c_parser_declarator): Don't allow _Alignas here.
2713 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
2715 * c-parser.c: Include omp-low.h.
2716 * c-typeck.c: Likewise.
2718 2013-10-17 Marek Polacek <polacek@redhat.com>
2721 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2722 Document syntax of the array-declarator.
2723 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2725 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2726 (c_parser_struct_declaration): Likewise.
2727 (c_parser_declarator): Likewise.
2728 (c_parser_direct_declarator_inner): Likewise.
2729 (c_parser_parameter_declaration): Likewise.
2730 (c_parser_type_name): Likewise.
2732 2013-10-11 Jakub Jelinek <jakub@redhat.com>
2734 * c-lang.h (current_omp_declare_target_attribute): New extern
2736 * c-parser.c: Include c-lang.h.
2737 (struct c_parser): Change tokens to c_token *.
2738 Add tokens_buf field. Change tokens_avail type to unsigned int.
2739 (c_parser_consume_token): If parser->tokens isn't
2740 &parser->tokens_buf[0], increment parser->tokens.
2741 (c_parser_consume_pragma): Likewise.
2742 (enum pragma_context): Add pragma_struct and pragma_param.
2743 (c_parser_external_declaration): Adjust
2744 c_parser_declaration_or_fndef caller.
2745 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2746 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2747 Adjust recursive call.
2748 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2750 (c_parser_parameter_declaration): Use pragma_param instead of
2752 (c_parser_compound_statement_nostart, c_parser_label,
2753 c_parser_for_statement): Adjust
2754 c_parser_declaration_or_fndef callers.
2755 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2756 it through to c_parser_conditional_expression.
2757 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2758 pass it through to c_parser_binary_expression. Adjust recursive
2760 (c_parser_binary_expression): Remove prec argument, add
2761 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2762 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2763 binop matches it, use build2 instead of parser_build_binary_op.
2764 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2765 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2766 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2767 Handle pragma_struct and pragma_param the same as pragma_external.
2768 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2769 (c_parser_omp_variable_list): Parse array sections for
2770 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2771 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2772 (c_parser_omp_clause_reduction): Handle user defined reductions.
2773 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2774 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2775 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2776 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2777 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2778 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2779 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2780 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2781 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2782 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2783 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2784 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2785 (c_parser_omp_for_loop): Add CODE argument, pass it through
2786 to c_finish_omp_for. Change last argument to cclauses,
2787 and adjust uses to grab parallel clauses from the array of all
2788 the split clauses. Adjust c_parser_binary_expression,
2789 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2790 (omp_split_clauses): New function.
2791 (c_parser_omp_simd): New function.
2792 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2793 Allow the function to be called also when parsing combined constructs,
2794 and call c_parser_omp_simd when parsing for simd.
2795 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2796 #pragma omp section, require exactly one structured-block instead of
2797 sequence of statements.
2798 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2799 Allow the function to be called also when parsing combined constructs.
2800 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2801 Allow the function to be called also when parsing combined
2803 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2804 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2805 c_parser_omp_teams, c_parser_omp_target_data,
2806 c_parser_omp_target_update, c_parser_omp_target,
2807 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2808 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2809 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2810 (c_parser_omp_construct): Add p_name and mask vars. Handle
2811 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2812 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2813 and c_parser_omp_sections callers.
2814 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2815 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2816 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2817 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2818 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2820 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2821 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2822 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2823 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2824 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2825 * c-typeck.c: Include tree-inline.h.
2826 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2827 handle_omp_array_sections_1, handle_omp_array_sections,
2828 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2829 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2830 user defined reductions.
2831 (c_tree_equal): New function.
2832 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2833 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2834 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2835 c_check_omp_declare_reduction_r): New prototypes.
2836 * c-decl.c (current_omp_declare_target_attribute): New variable.
2837 (c_decl_attributes): New function.
2838 (start_decl, start_function): Use it instead of decl_attributes.
2839 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2840 c_omp_reduction_decl, c_omp_reduction_lookup,
2841 c_check_omp_declare_reduction_r): New functions.
2843 2013-09-25 Tom Tromey <tromey@redhat.com>
2845 * Make-lang.in (c/gccspec.o): Remove.
2846 (CFLAGS-c/gccspec.o): New variable.
2847 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2848 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2849 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2851 2013-09-25 Tom Tromey <tromey@redhat.com>
2853 * Make-lang.in (c/gccspec.o): Don't use subshell.
2855 2013-09-18 Marek Polacek <polacek@redhat.com>
2858 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2859 Remove unnecessary check.
2861 2013-09-18 Marek Polacek <polacek@redhat.com>
2864 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2865 no_sanitize_undefined attribute.
2867 2013-09-13 Kai Tietz <ktietz@redhat.com>
2870 * c-decl.c (c_builtin_function_ext_scope): Remove
2871 wrong assumption that it is never called on prexisting
2874 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2876 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2878 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2880 * c-objc-common.c (c_tree_printer): Tidy.
2882 2013-08-30 Marek Polacek <polacek@redhat.com>
2884 * c-typeck.c (build_binary_op): Add division by zero and shift
2887 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
2888 Joseph Myers <joseph@codesourcery.com>
2891 * c-typeck.c (c_common_type): Prefer double_type_node over
2892 other REAL_TYPE types with the same precision.
2893 (convert_arguments): Likewise.
2895 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2897 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2898 (c_initialize_diagnostics): Call a destructor for the early printer.
2900 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2902 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2903 printer initialization.
2905 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
2908 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2909 check for truth values.
2910 (expand_array_notation_exprs): Added truth values case. Removed an
2911 unwanted else. Added for-loop to walk through subtrees in default
2914 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2916 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2918 2013-07-23 Joseph Myers <joseph@codesourcery.com>
2920 * c-parser.c (struct c_generic_association): Fix typo.
2922 2013-07-23 Tom Tromey <tromey@redhat.com>
2923 Joseph Myers <joseph@codesourcery.com>
2925 * c-parser.c (struct c_generic_association): New.
2926 (c_generic_association_d): New typedef.
2927 (c_parser_generic_selection): New function.
2928 (c_parser_postfix_expression): Handle RID_GENERIC.
2930 2013-07-13 Jason Merrill <jason@redhat.com>
2933 * c-decl.c (finish_struct): Check for too-large class.
2935 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
2938 * c-typeck.c (set_init_index): When folding, check for index overflow.
2940 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2942 * c-parser.c (c_parser_array_notation): Removed rejection of array
2943 notations in an array of function pointers.
2945 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2947 * c-array-notation.c (make_triplet_val_inv): New function.
2948 (create_cmp_incr): Likewise.
2949 (create_array_refs): Likewise.
2950 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2951 Also modularized common parts between functions and called the function.
2952 (build_array_notation_expr): Likewise.
2953 (fix_conditional_array_notations_1): Likewise.
2954 (fix_array_notation_expr): Likewise.
2955 (fix_array_notation_call_expr): Likewise.
2957 2013-06-18 Marek Polacek <polacek@redhat.com>
2960 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2962 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2964 * c-array-notation.c (build_array_notation_expr): Reject array notation
2965 mismatch between LHS and RHS even inside a call_expr. Also, removed
2966 a couple while statements that were dead code.
2968 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2970 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2971 excessive precision expressions in function parameters. Also removed
2972 couple unwanted while statements.
2974 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2976 * c-array-notation.c (expand_array_notation_exprs): Added
2977 ARRAY_NOTATION_REF case.
2979 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2981 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2982 function to c-family/array-notation-common.c.
2983 (is_cilkplus_reduce_builtin): Likewise.
2984 (find_rank): Likewise.
2985 (extract_array_notation_exprs): Likewise.
2986 (replace_array_notations): Likewise.
2987 (find_inv_trees): Likewise.
2988 (replace_inv_trees): Likewise.
2989 (contains_array_notation_expr): Likewise.
2990 (find_correct_array_notation_type): Likewise.
2991 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2992 (struct inv_list): Moved this to c-family/array-notation-common.c.
2993 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2995 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2997 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2998 reduction functions outside the for-loop. Added a check if the fundecl
2999 is non-NULL. Finally, removed an unwanted if-statement, and made the
3002 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3004 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3005 condition of the if-statement matches the rank of else-block and then-
3006 block when array notations are used.
3007 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3008 expression after the entire function body is parsed.
3009 (c_parser_expr_no_commas): Delayed creating array notation expressions
3010 to the end of function parsing.
3011 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3012 whole if-statement instead of just the condition.
3013 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3015 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3018 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3019 array to NULL_TREE if they are unused. Also added a check for the
3020 field to be NULL before its fields are used in future.
3022 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3025 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3026 (build_array_notation_expr): Likewise.
3028 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3030 * c-typeck.c (build_array_ref): Added a check to see if array's
3031 index is greater than one. If true, then emit an error.
3032 (build_function_call_vec): Exclude error reporting and checking
3033 for builtin array-notation functions.
3034 (convert_arguments): Likewise.
3035 (c_finish_return): Added a check for array notations as a return
3036 expression. If true, then emit an error.
3037 (c_finish_loop): Added a check for array notations in a loop
3038 condition. If true then emit an error.
3039 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3040 (build_binary_op): Added a check for array notation expr inside
3041 op1 and op0. If present, we call another function to find correct
3043 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3044 * c-parser.c (c_parser_compound_statement): Check if array
3045 notation code is used in tree, if so, then transform them into
3047 (c_parser_expr_no_commas): Check if array notation is used in LHS
3048 or RHS, if so, then build array notation expression instead of
3050 (c_parser_postfix_expression_after_primary): Added a check for
3051 colon(s) after square braces, if so then handle it like an array
3052 notation. Also, break up array notations in unary op if found.
3053 (c_parser_direct_declarator_inner): Added a check for array
3055 (c_parser_compound_statement): Added a check for array notation in
3056 a stmt. If one is present, then expand array notation expr.
3057 (c_parser_if_statement): Likewise.
3058 (c_parser_switch_statement): Added a check for array notations in
3059 a switch statement's condition. If true, then output an error.
3060 (c_parser_while_statement): Similarly, but for a while.
3061 (c_parser_do_statement): Similarly, but for a do-while.
3062 (c_parser_for_statement): Similarly, but for a for-loop.
3063 (c_parser_unary_expression): Check if array notation is used in a
3064 pre-increment or pre-decrement expression. If true, then expand
3066 (c_parser_array_notation): New function.
3067 * c-array-notation.c: New file.
3068 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3070 2013-05-23 Mike Stump <mikestump@comcast.net>
3072 * c-typeck.c (convert_for_assignment): Handle references to memory
3075 2013-05-16 Jason Merrill <jason@redhat.com>
3077 * Make-lang.in (cc1$(exeext)): Use link mutex.
3079 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3081 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3082 to simply use OPT_Wpointer_arith.
3083 (build_unary_op): Likewise.
3085 2013-04-03 Jakub Jelinek <jakub@redhat.com>
3088 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3089 argument. If set, or it temporarily for parsing of the first
3090 argument into force_folding_builtin_constant_p.
3091 (c_parser_postfix_expression): Adjust callers.
3093 2013-03-21 Richard Biener <rguenther@suse.de>
3095 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3096 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3098 2013-02-12 Marek Polacek <polacek@redhat.com>
3101 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3104 2013-01-24 Jakub Jelinek <jakub@redhat.com>
3107 * c-typeck.c (set_nonincremental_init_from_string): If
3108 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3110 (process_init_element): Likewise.
3112 2012-12-20 Jakub Jelinek <jakub@redhat.com>
3115 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3116 argument, don't call default_function_array_conversion
3117 nor c_fully_fold here.
3118 (c_parser_asm_statement): Adjust callers.
3119 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3120 and outputs here, and call default_function_array_conversion
3121 on inputs that don't need to be addressable.
3123 2012-12-18 Jakub Jelinek <jakub@redhat.com>
3126 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3127 warning require that both c_common_unsigned_type as well as
3128 c_common_signed_type is the same for both mvl and mvr types.
3130 2012-11-16 Diego Novillo <dnovillo@google.com>
3132 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3134 * c-common.c: Use new vec API in vec.h.
3135 * c-common.h: Likewise.
3136 * c-gimplify.c: Likewise.
3137 * c-pragma.c: Likewise.
3138 * c-pretty-print.c: Likewise.
3139 * c-pretty-print.h: Likewise.
3140 * c-semantics.c: Likewise.
3141 * c-decl.c: Likewise.
3142 * c-parser.c: Likewise.
3143 * c-tree.h: Likewise.
3144 * c-typeck.c: Likewise.
3146 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3149 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3151 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3154 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3155 shadows a function, unless the variable is a function or a
3156 pointer-to-function.
3158 2012-10-12 Jakub Jelinek <jakub@redhat.com>
3161 * c-parser.c (struct c_tree_loc_pair): Removed.
3162 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3163 add location_t * and tree * arguments, fill in array of 3
3164 sizeof_arg trees and corresponding locs.
3165 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3166 c_parser_expr_list callers.
3167 (c_parser_postfix_expression_after_primary): Likewise. Pass
3168 array of 3 sizeof_arg trees and locs (corresponding to first
3169 3 arguments) to sizeof_pointer_memaccess_warning.
3171 2012-10-09 Lawrence Crowl <crowl@google.com>
3173 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3174 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3177 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3180 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3183 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
3186 * c-typeck.c: Include c-common.h.
3187 (enum stv_conv): Moved to c-common.h.
3188 (scalar_to_vector): Moved to c-common.c.
3189 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3190 * Make-lang.in: c-typeck.c depends on c-common.h.
3192 2012-10-04 Arnaud Charlet <charlet@adacore.com>
3194 * c-decl.c (c_write_global_declarations): Fix handling of
3197 2012-09-30 Sharad Singhai <singhai@google.com>
3199 * c-decl.c (c_write_global_declarations): Use a different method
3200 to determine if the dump has ben initialized.
3202 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3205 * c-typeck.c (c_cast_expr): When casting to a type requiring
3206 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3209 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3212 * c-typeck.c (build_unary_op): Pass original argument of
3213 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3214 any C_MAYBE_CONST_EXPR, if it has integer operands.
3215 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3216 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3217 to c_objc_common_truthvalue_conversion, then remove any
3218 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3219 c_objc_common_truthvalue_conversion not
3220 c_common_truthvalue_conversion.
3221 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3222 call note_integer_operands for arguments with integer operands
3223 that are not integer constants.
3225 2012-09-13 Jakub Jelinek <jakub@redhat.com>
3228 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3229 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3231 2012-08-31 Jakub Jelinek <jakub@redhat.com>
3234 * c-convert.c (convert): Don't call fold_convert_loc if
3235 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3236 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3237 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3239 2012-08-24 Jakub Jelinek <jakub@redhat.com>
3242 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3243 for nested and empty_ok arguments in the call to
3244 c_parser_declaration_or_fndef.
3246 2012-08-17 Jakub Jelinek <jakub@redhat.com>
3248 * c-tree.h (c_last_sizeof_arg): Declare.
3249 * c-parser.c (struct c_tree_loc_pair): New type.
3250 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3252 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3253 (c_parser_postfix_expression_after_primary): Likewise. Call
3254 sizeof_pointer_memaccess_warning if needed.
3255 (sizeof_ptr_memacc_comptypes): New function.
3256 * c-typeck.c (c_last_sizeof_arg): New global variable.
3257 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3259 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
3261 * c-lang.h (lang_decl): Add variable_size GTY option.
3263 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3265 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3266 * Make-lang.in: Fix dependencies.
3268 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3270 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3271 and add language Makefile hooks.
3272 * config-lang.in: New file.
3273 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3274 add the required "normal" config-lang.in rules.
3275 * c-lang.h: Moved from gcc/ to here.
3276 * c-tree.h: Likewise.
3277 * c-objc-common.c: Likewise.
3278 * c-objc-common.h: Likewise.
3279 * c-typeck.c: Likewise.
3280 * c-convert.c: Likewise.
3281 * c-lang.c: Likewise.
3282 * c-aux-info.c: Likewise.
3283 * c-errors.c: Likewise.
3284 * gccspec.c: Likewise.
3285 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3286 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3288 Copyright (C) 2012-2016 Free Software Foundation, Inc.
3290 Copying and distribution of this file, with or without modification,
3291 are permitted in any medium without royalty provided the copyright
3292 notice and this notice are preserved.