1 2015-12-22 Marek Polacek <polacek@redhat.com>
4 * c-typeck.c (build_component_ref): Warn when acessing elements of
5 atomic structures or unions.
7 2015-12-21 David Malcolm <dmalcolm@redhat.com>
9 * c-typeck.c: Include "gcc-rich-location.h".
10 (build_binary_op): In the two places that call binary_op_error,
11 create a gcc_rich_location and populate it with the location of
12 the binary op and its two operands.
14 2015-12-16 David Malcolm <dmalcolm@redhat.com>
16 * c-parser.c (c_parser_statement_after_labels): When calling
17 c_finish_return, Use the return expression's location if it has
18 one, falling back to the location of the first token within it.
19 * c-typeck.c (c_finish_return): When issuing warnings about
20 the incorrect presence/absence of a return value, issue a note
21 showing the declaration of the function.
23 2015-12-16 David Malcolm <dmalcolm@redhat.com>
25 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
27 (c_parser_peek_nth_token): New function.
28 (c_parser_peek_conflict_marker): New function.
29 (c_parser_error): Detect conflict markers and report them as such.
31 2015-12-16 David Malcolm <dmalcolm@redhat.com>
33 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
34 to preserve range information for the primary expression
35 in the call to c_parser_postfix_expression_after_primary.
37 2015-12-16 David Malcolm <dmalcolm@redhat.com>
39 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
40 expression location, falling back on the first token location,
41 rather than always using the latter.
43 2015-12-16 Marek Polacek <polacek@redhat.com>
46 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
49 2015-12-15 Marek Polacek <polacek@redhat.com>
52 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
55 2015-12-08 David Malcolm <dmalcolm@redhat.com>
57 * c-parser.c (c_parser_alignof_expression): Capture location of
58 closing parenthesis (if any), or of end of unary expression, and
59 use it to build a src_range for the expression.
61 2015-12-08 David Malcolm <dmalcolm@redhat.com>
64 * c-parser.c (c_parser_get_builtin_args): Add
65 "out_close_paren_loc" param, and write back to it.
66 (c_parser_postfix_expression): Capture the closing
67 parenthesis location for RID_CHOOSE_EXPR,
68 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
69 RID_BUILTIN_SHUFFLE and use it to set the source range
70 for such expressions; within RID_BUILTIN_COMPLEX set
71 the underlying location.
73 2015-12-07 Marek Polacek <polacek@redhat.com>
76 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
77 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
79 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
81 * c-tree.h (c_build_va_arg): Adjust prototype.
82 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
83 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
84 parameter, adjust throughout and issue an error if EXPR is a component
85 with reverse storage order.
87 2015-12-02 Jason Merrill <jason@redhat.com>
89 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
90 (c_fully_fold_internal, decl_constant_value_for_optimization):
92 * c-tree.h: Declare decl_constant_value_for_optimization.
93 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
95 2015-12-02 Joseph Myers <joseph@codesourcery.com>
98 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
99 following link from declarator to next declarator. Track original
100 qualified type and pass it to c_build_qualified_type.
101 * c-typeck.c (c_build_qualified_type): Add arguments
102 orig_qual_type and orig_qual_indirect.
104 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
106 * c-parser.c (c_parser_omp_clause_name)
107 (c_parser_oacc_all_clauses): Alphabetical sorting.
109 2015-12-02 Jakub Jelinek <jakub@redhat.com>
112 * c-decl.c (get_parm_info): Use b->locus instead of input_location
115 2015-12-01 Julian Brown <julian@codesourcery.com>
116 Cesar Philippidis <cesar@codesourcery.com>
117 James Norris <James_Norris@mentor.com>
119 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
120 (c_parser_oacc_clause_use_device): New function.
121 (c_parser_oacc_all_clauses): Add use_device support.
122 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
123 (c_parser_oacc_host_data): New function.
124 (c_parser_omp_construct): Add host_data support.
125 * c-tree.h (c_finish_oacc_host_data): Add prototype.
126 * c-typeck.c (c_finish_oacc_host_data): New function.
127 (c_finish_omp_clauses): Add use_device support.
129 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
132 * c-decl.c: Set TYPE_PACKED in variants.
134 2015-11-27 Martin Liska <mliska@suse.cz>
137 * c-array-notation.c (fix_builtin_array_notation_fn):
138 Use release_vec_vec instead of vec::release.
139 (build_array_notation_expr): Likewise.
140 (fix_conditional_array_notations_1): Likewise.
141 (fix_array_notation_expr): Likewise.
142 (fix_array_notation_call_expr): Likewise.
144 2015-11-27 Jakub Jelinek <jakub@redhat.com>
147 * c-parser.c (c_parser_compound_statement_nostart): If
148 last_label is true, use pragma_stmt instead of pragma_compound
149 as second c_parser_pragma argument.
150 (c_parser_omp_ordered, c_parser_omp_target_update,
151 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
152 false as second argument to c_parser_skip_to_pragma_eol after
153 diagnosing standalone directives used in pragma_stmt context.
155 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
157 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
158 with "if (ENABLE_OFFLOADING)".
160 2015-11-23 David Malcolm <dmalcolm@redhat.com>
163 * c-parser.c (c_parser_postfix_expression): Set up source ranges
164 for various Objective-C constructs: Class.name syntax,
165 @selector(), @protocol(), @encode(), and [] message syntax.
167 2015-11-20 David Malcolm <dmalcolm@redhat.com>
170 * c-typeck.c (should_suggest_deref_p): New function.
171 (build_component_ref): Special-case POINTER_TYPE when
172 generating a "not a structure of union" error message, and
173 suggest a "->" rather than a ".", providing a fix-it hint.
175 2015-11-19 David Malcolm <dmalcolm@redhat.com>
177 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
178 candidate into a new function, find_closest_identifier.
180 2015-11-19 Marek Polacek <polacek@redhat.com>
183 * c-typeck.c (parser_build_binary_op): Properly handle
184 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
186 2015-11-17 David Malcolm <dmalcolm@redhat.com>
188 * c-parser.c (set_c_expr_source_range): Bulletproof both
189 overloaded implementations against NULL expr->value.
190 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
192 (c_parser_unary_expression): Likewise when handling addresses of
194 (c_parser_postfix_expression): Likewise for statement expressions,
195 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
196 __builtin_va_arg, and for __builtin_offset_of.
197 (c_parser_postfix_expression_after_paren_type): Initialize expr's
198 src_range using the range of the braced initializer.
199 (c_parser_transaction_expression): Set src_range for "ret" to a
202 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
204 * c-parser.c (c_finish_omp_declare_simd): Look for
205 "simd" attribute as well. Update error message.
207 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
209 * c-parser.c (c_parser_omp_declare_target): Adjust.
211 2015-11-14 Jakub Jelinek <jakub@redhat.com>
213 * c-typeck.c (c_finish_omp_clauses): Don't mark
214 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
216 2015-11-14 Marek Polacek <polacek@redhat.com>
218 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
219 * c-typeck.c: Likewise.
221 2015-11-13 David Malcolm <dmalcolm@redhat.com>
223 * c-decl.c (warn_defaults_to): Pass line_table to
225 * c-errors.c (pedwarn_c99): Likewise.
226 (pedwarn_c90): Likewise.
227 * c-parser.c (set_c_expr_source_range): New functions.
228 (c_token::get_range): New method.
229 (c_token::get_finish): New method.
230 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
231 based on the range from the start of the LHS to the end of the
233 (c_parser_conditional_expression): Likewise, based on the range
234 from the start of the cond.value to the end of exp2.value.
235 (c_parser_binary_expression): Call set_c_expr_source_range on
236 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
237 (c_parser_cast_expression): Call set_c_expr_source_range on ret
238 based on the cast_loc through to the end of the expr.
239 (c_parser_unary_expression): Likewise, based on the
240 op_loc through to the end of op.
241 (c_parser_sizeof_expression) Likewise, based on the start of the
242 sizeof token through to either the closing paren or the end of
244 (c_parser_postfix_expression): Likewise, using the token range,
245 or from the open paren through to the close paren for
246 parenthesized expressions.
247 (c_parser_postfix_expression_after_primary): Likewise, for
248 various kinds of expression.
249 * c-tree.h (struct c_expr): Add field "src_range".
250 (c_expr::get_start): New method.
251 (c_expr::get_finish): New method.
252 (set_c_expr_source_range): New decls.
253 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
254 on ret for prefix unary ops.
255 (parser_build_binary_op): Likewise, running from the start of
256 arg1.value through to the end of arg2.value.
258 2015-11-13 Marek Polacek <polacek@redhat.com>
261 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
263 2015-11-13 David Malcolm <dmalcolm@redhat.com>
265 * c-typeck.c: Include spellcheck.h.
266 (lookup_field_fuzzy_find_candidates): New function.
267 (lookup_field_fuzzy): New function.
268 (build_component_ref): If the field was not found, try using
269 lookup_field_fuzzy and potentially offer a suggestion.
271 2015-11-12 James Norris <jnorris@codesourcery.com>
272 Joseph Myers <joseph@codesourcery.com>
274 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
275 (c_parser_omp_clause_name): Handle 'device_resident' clause.
276 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
277 and PRAGMA_OMP_CLAUSE_LINK.
278 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
279 and PRAGMA_OACC_CLAUSE_LINK.
280 (OACC_DECLARE_CLAUSE_MASK): New definition.
281 (c_parser_oacc_declare): New function.
283 2015-11-12 Marek Polacek <polacek@redhat.com>
286 * c-parser.c (c_parser_for_statement): Reclassify the token in
289 2015-11-11 Marek Polacek <polacek@redhat.com>
293 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
294 checking the size of an array.
296 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
298 * c-array-notation.c: Remove unused header files.
299 * c-aux-info.c: Likewise.
300 * c-convert.c: Likewise.
301 * c-decl.c: Likewise.
302 * c-errors.c: Likewise.
303 * c-lang.c: Likewise.
304 * c-objc-common.c: Likewise.
305 * c-parser.c: Likewise.
306 * c-typeck.c: Likewise.
307 * gccspec.c: Likewise.
309 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
310 Cesar Philippidis <cesar@codesourcery.com>
311 James Norris <jnorris@codesourcery.com>
312 Julian Brown <julian@codesourcery.com>
313 Nathan Sidwell <nathan@codesourcery.com>
316 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
318 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
319 (c_parser_pragma): Parse 'acc routine'.
320 (OACC_ROUTINE_CLAUSE_MARK): Define.
321 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
323 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
326 * c-typeck.c (c_finish_loop): For unconditional loops, set the
327 location of the backward-goto to the start of the loop body.
329 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
332 * c-parser.c (c_parser_while_statement): Finish the loop before
333 parsing ahead for misleading indentation.
334 (c_parser_for_statement): Likewise.
336 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
338 * c-decl.c (finish_struct): If the structure has reverse storage
339 order, rewrite the type of array fields with scalar component. Call
340 maybe_apply_pragma_scalar_storage_order on entry.
341 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
342 errors on bit-fields and reverse SSO here and not...
343 (c_mark_addressable): ...here.
344 (output_init_element): Adjust call to initializer_constant_valid_p.
345 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
347 2015-11-06 David Malcolm <dmalcolm@redhat.com>
349 * c-decl.c (warn_defaults_to): Update for change in signature
350 of diagnostic_set_info.
351 * c-errors.c (pedwarn_c99): Likewise.
352 (pedwarn_c90): Likewise.
353 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
354 for textinfo::set_location.
356 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
357 Thomas Schwinge <thomas@codesourcery.com>
358 James Norris <jnorris@codesourcery.com>
360 * c-parser.c (c_parser_omp_clause_name): Add support for
361 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
362 (c_parser_omp_clause_default): Add is_oacc argument. Handle
363 default(none) in OpenACC.
364 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
366 (c_parser_oacc_clause_tile): New function.
367 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
368 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
369 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
371 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
372 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
374 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
375 (c_parser_oacc_update): Update the error message for missing clauses.
376 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
377 and OMP_CLAUSE_INDEPENDENT.
379 2015-11-05 Marek Polacek <polacek@redhat.com>
382 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
383 deal with pre-evaluation on invalid types.
385 2015-11-05 Jakub Jelinek <jakub@redhat.com>
386 Ilya Verbin <ilya.verbin@intel.com>
388 * c-parser.c: Include context.h and gimple-expr.h.
389 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
390 monotonic together with nonmonotonic.
391 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
392 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
393 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
394 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
395 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
396 expressions on combined target teams before the target.
397 (c_parser_omp_declare_target): If decl has "omp declare target" or
398 "omp declare target link" attribute, and cgraph or varpool node already
399 exists, then set corresponding flags. Call c_finish_omp_clauses
400 in the parenthesized extended-list syntax case.
401 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
403 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
404 on OMP_CLAUSE_REDUCTION array sections.
405 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
406 into the constant offset, or for variable low-bound using
407 POINTER_PLUS_EXPR. For structure element based array sections use
408 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
409 (c_finish_omp_clauses): Drop generic_field_head, structure
410 elements are now always mapped even as array section bases,
411 diagnose same var in data sharing and mapping clauses. Diagnose if
412 linear step on declare simd is neither a constant nor a uniform
413 parameter. Look through POINTER_PLUS_EXPR for array section
414 reductions. Diagnose the same var or function appearing multiple
415 times on the same directive. Fix up wording for the to clause if t
416 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
417 modifier on kinds other than dynamic or guided or nonmonotonic
418 modifier together with ordered clause.
420 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
421 Chung-Lin Tang <cltang@codesourcery.com>
423 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
425 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
427 * c-array-notation.c: Reorder #include's and remove duplicates.
428 * c-aux-info.c: Likewise.
429 * c-convert.c: Likewise.
430 * c-decl.c: Likewise.
431 * c-errors.c: Likewise.
432 * c-lang.c: Likewise.
433 * c-objc-common.c: Likewise.
434 * c-parser.c: Likewise.
435 * c-typeck.c: Likewise.
437 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
440 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
441 after calling build_qualified_type.
443 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
444 Thomas Schwinge <thomas@codesourcery.com>
445 James Norris <jnorris@codesourcery.com>
446 Joseph Myers <joseph@codesourcery.com>
447 Julian Brown <julian@codesourcery.com>
448 Bernd Schmidt <bschmidt@redhat.com>
450 * c-parser.c (c_parser_oacc_shape_clause): New.
451 (c_parser_oacc_simple_clause): New.
452 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
453 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
455 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
456 James Norris <jnorris@codesourcery.com>
457 Cesar Philippidis <cesar@codesourcery.com>
461 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
462 parameters, and handle these. Adjust all users.
463 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
465 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
467 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
469 (c_finish_omp_construct): Declare function.
470 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
471 Merge functions into...
472 (c_finish_omp_construct): ... this new function.
474 2015-10-22 Richard Biener <rguenther@suse.de>
476 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
477 before folding a MINUS_EXPR.
479 2015-10-21 Marek Polacek <polacek@redhat.com>
482 * c-decl.c (start_function): Warn about vararg functions without
485 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
487 * c-typeck.c (build_conditional_expr): Use boolean vector
488 type for vector comparison.
489 (build_vec_cmp): New.
490 (build_binary_op): Use build_vec_cmp for comparison.
492 2015-10-20 Marek Polacek <polacek@redhat.com>
494 * c-parser.c (is_cilkplus_vector_p): Don't define here.
496 2015-10-20 Marek Polacek <polacek@redhat.com>
499 * c-parser.c (c_parser_attributes): Break out of the loop if the
500 token after an attribute isn't a comma.
502 2015-10-13 Jakub Jelinek <jakub@redhat.com>
503 Aldy Hernandez <aldyh@redhat.com>
505 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
506 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
507 (c_parser_omp_variable_list): Handle structure elements for
508 map, to and from clauses. Handle array sections in reduction
509 clause. Formatting fixes.
510 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
512 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
513 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
514 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
515 c_parser_omp_clause_is_device_ptr): New functions.
516 (c_parser_omp_clause_ordered): Parse optional parameter.
517 (c_parser_omp_clause_reduction): Handle array reductions.
518 (c_parser_omp_clause_schedule): Parse optional simd modifier.
519 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
521 (c_parser_omp_clause_linear): Parse linear clause modifiers.
522 (c_parser_omp_clause_depend_sink): New function.
523 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
524 (c_parser_omp_clause_map): Parse release/delete map kinds and
525 optional always modifier.
526 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
527 and c_finish_omp_clauses callers.
528 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
529 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
530 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
531 (OMP_CRITICAL_CLAUSE_MASK): Define.
532 (c_parser_omp_critical): Parse critical clauses.
533 (c_parser_omp_for_loop): Handle doacross loops, adjust
534 c_finish_omp_for and c_finish_omp_clauses callers.
535 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
536 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
537 (OMP_FOR_CLAUSE_MASK): Add linear clause.
538 (c_parser_omp_for): Disallow ordered clause when combined with
539 distribute. Disallow linear clause when combined with distribute
540 and not combined with simd.
541 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
542 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
543 parse clauses and if depend clause is found, don't parse a body.
544 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
545 Allow target parallel without for after it.
546 (OMP_TASK_CLAUSE_MASK): Add priority clause.
547 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
548 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
550 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
551 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
552 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
553 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
555 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
556 defaultmap and is_device_ptr clauses.
557 (c_parser_omp_target): Parse target parallel and target simd. Set
558 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
559 and target exit data. Diagnose invalid map kinds.
560 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
561 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
563 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
565 (OMP_TASKLOOP_CLAUSE_MASK): Define.
566 (c_parser_omp_taskloop): New function.
567 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
568 handle PRAGMA_OMP_TASKLOOP.
569 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
570 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
571 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
572 Add IS_OMP argument, handle structure element bases, diagnose
573 bitfields, pass IS_OMP recursively, diagnose known zero length
574 array sections in depend clauses, handle array sections in reduction
575 clause, diagnose negative length even for pointers.
576 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
577 types, pass IS_OMP down to handle_omp_array_sections_1, handle
578 array sections in reduction clause, set
579 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
580 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
581 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
582 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
584 2015-10-06 Marek Polacek <polacek@redhat.com>
586 * c-parser.c (c_parser_statement_after_labels): Use
587 protected_set_expr_location.
588 (c_parser_omp_clause_num_gangs): Likewise.
589 (c_parser_omp_clause_num_threads): Likewise.
590 (c_parser_omp_clause_num_workers): Likewise.
591 (c_parser_omp_clause_vector_length): Likewise.
592 (c_parser_omp_clause_num_teams): Likewise.
593 (c_parser_omp_clause_thread_limit): Likewise.
594 * c-typeck.c (build_c_cast): Likewise.
595 (c_cast_expr): Likewise.
597 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
599 * c-typeck.c (c_tree_equal): Use real_equal instead of
602 2015-10-04 Jason Merrill <jason@redhat.com>
604 * c-parser.c (c_lex_one_token): Handle @synchronized.
605 * c-decl.c (match_builtin_function_types): A declaration of a built-in
606 can change whether the function is transaction_safe.
608 2015-10-02 Marek Polacek <polacek@redhat.com>
611 * c-typeck.c (convert_for_assignment): Use the expansion point
614 2015-10-02 Marek Polacek <polacek@redhat.com>
617 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
618 and pass it down to c_parser_if_statement.
619 (c_parser_else_body): Add CHAIN parameter and pass it down to
620 c_parser_statement_after_labels.
621 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
622 duplicated if-else-if conditions.
624 2015-10-01 Marek Polacek <polacek@redhat.com>
626 * c-typeck.c (convert_for_assignment): Improve commentary.
628 2015-09-30 Marek Polacek <polacek@redhat.com>
631 * c-typeck.c (c_finish_return): Use the expansion point location for
632 certain "return with value" warnings.
634 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
636 * c-parser.c (pragma_lex): Add loc argument.
638 2015-09-15 Marek Polacek <polacek@redhat.com>
641 * c-decl.c (tag_exists_p): New function.
642 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
643 struct/union/enum keywords are missing.
644 * c-tree.h (tag_exists_p): Declare.
646 2015-09-15 Marek Polacek <polacek@redhat.com>
648 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
649 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
650 Return NULL_TREE instead of 0.
651 (lookup_name): Return NULL_TREE instead of 0.
652 (lookup_name_in_scope): Likewise.
653 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
654 (parser_xref_tag): Use false instead of 0.
655 (start_struct): Use true instead of 1.
656 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
658 2015-09-14 Marek Polacek <polacek@redhat.com>
660 * c-typeck.c (set_nonincremental_init_from_string): Use
661 HOST_WIDE_INT_M1U when shifting a negative value.
663 2015-09-09 Mark Wielaard <mjw@redhat.com>
665 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
668 2015-09-10 Jakub Jelinek <jakub@redhat.com>
671 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
672 into OMP_FOR_PRE_BODY rather than before the loop.
674 2015-09-09 Jakub Jelinek <jakub@redhat.com>
677 * c-parser.c (c_parser_oacc_all_clauses,
678 c_parser_omp_all_clauses): Remove invalid clause from
679 list of clauses even if parser->error is set.
682 * c-parser.c (c_parser_omp_clause_aligned,
683 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
685 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
689 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
690 instead of c_parser_unary_expression. If the result is !lvalue_p,
691 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
693 2015-09-04 Marek Polacek <polacek@redhat.com>
696 * c-typeck.c (build_binary_op): Don't instrument static initializers.
698 2015-09-03 Martin Sebor <msebor@redhat.com>
701 * c-typeck.c (convert_arguments, parser_build_unary_op,
702 build_conditional_expr, c_cast_expr, convert_for_assignment,
703 build_binary_op, _objc_common_truthvalue_conversion): Call
705 (c_decl_implicit): Define.
707 2015-09-02 Marek Polacek <polacek@redhat.com>
710 * c-parser.c (c_parser_enum_specifier): Give a better error for
713 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
715 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
717 2015-08-12 Marek Polacek <polacek@redhat.com>
719 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
722 2015-08-03 Marek Polacek <polacek@redhat.com>
725 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
727 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
729 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
731 * c-parser.c (c_parser_if_body): Take token_indent_info
732 argument. Call warn_for_misleading_indentation even when the
733 body is a semicolon. Extract token_indent_infos corresponding
734 to the guard, body and next tokens. Adjust call to
735 warn_for_misleading_indentation accordingly.
736 (c_parser_else_body): Likewise.
737 (c_parser_if_statement): Likewise.
738 (c_parser_while_statement): Likewise.
739 (c_parser_for_statement): Likewise.
741 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
742 Manuel López-Ibáñez <manu@gcc.gnu.org>
744 * c-decl.c (get_parm_info): Remove static var. Update warning
747 2015-07-27 Marek Polacek <polacek@redhat.com>
751 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
753 2015-07-20 Marek Polacek <polacek@redhat.com>
756 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
757 (build_binary_op): Warn about left shift overflows.
759 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
761 * c-array-notation.c: Adjust includes for flags.h changes.
762 * c-objc-common.c: Likewise.
764 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
766 * c-array-notation.c: Adjust includes.
767 * c-aux-info.c: Likewise.
768 * c-convert.c: Likewise.
769 * c-decl.c: Likewise.
770 * c-errors.c: Likewise.
771 * c-lang.c: Likewise.
772 * c-objc-common.c: Likewise.
773 * c-parser.c: Likewise.
774 * c-typeck.c: Likewise.
776 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
779 * c-decl.c (finish_function): Call do_warn_unused_parameter.
781 2015-06-29 Marek Polacek <polacek@redhat.com>
784 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
785 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
786 about -Wswitch-bool here.
787 (do_case): Update c_add_case_label call.
788 (c_finish_case): Update c_do_switch_warnings call.
790 2015-06-27 Marek Polacek <polacek@redhat.com>
792 * c-typeck.c: Use VECTOR_TYPE_P throughout.
794 2015-06-26 Marek Polacek <polacek@redhat.com>
796 * c-array-notation.c (fix_builtin_array_notation_fn): Use
798 * c-typeck.c (array_to_pointer_conversion): Likewise.
799 (build_unary_op): Likewise.
800 (c_finish_return): Likewise.
802 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
804 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
805 * c-parser.c: Likewise.
807 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
809 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
810 instead of pointer_hash.
811 (detect_field_duplicates): Likewise.
813 2015-06-25 Marek Polacek <polacek@redhat.com>
815 * c-array-notation.c: Use VAR_P throughout.
816 * c-decl.c: Likewise.
817 * c-objc-common.c: Likewise.
818 * c-parser.c: Likewise.
819 * c-typeck.c: Likewise.
821 2015-06-25 Marek Polacek <polacek@redhat.com>
823 * c-decl.c: Use is_global_var throughout.
824 * c-parser.c: Likewise.
825 * c-typeck.c: Likewise.
827 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
829 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
830 * c-aux-info.c: Likewise.
831 * c-convert.c: Likewise.
832 * c-decl.c: Likewise.
833 * c-errors.c: Likewise.
834 * c-lang.c: Likewise.
835 * c-objc-common.c: Likewise.
836 * c-parser.c: Likewise.
837 * c-typeck.c: Likewise.
839 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
842 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
845 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
847 * c-decl.c (pop_scope): Register the main translation unit
848 through the new debug hook.
850 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
852 * c-array-notation.c : Adjust include files.
853 * c-aux-info.c : Likewise.
854 * c-convert.c : Likewise.
855 * c-decl.c : Likewise.
856 * c-errors.c : Likewise.
857 * c-lang.c : Likewise.
858 * c-lang.h : Likewise.
859 * c-objc-common.c : Likewise.
860 * c-parser.c : Likewise.
861 * c-typeck.c : Likewise.
863 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
865 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
866 immediately clobber it.
867 (c_write_global_declarations_1): Remove call to
868 check_global_declaration_1.
869 (c_write_global_declarations_2): Remove.
870 (c_write_final_cleanups): Rename from c_write_global_declarations.
871 Remove call to finalize_compilation_unit.
872 Remove calls to debugging hooks.
873 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
874 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
875 * c-tree.h: Remove c_write_global_declarations.
877 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
879 * c-array-notation.c: Adjust includes for restructured coretypes.h.
880 * c-aux-info.c: Likewise.
881 * c-convert.c: Likewise.
882 * c-decl.c: Likewise.
883 * c-errors.c: Likewise.
884 * c-lang.c: Likewise.
885 * c-objc-common.c: Likewise.
886 * c-parser.c: Likewise.
887 * c-typeck.c: Likewise.
889 2015-06-04 Marek Polacek <polacek@redhat.com>
892 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
895 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
897 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
898 Warn for empty struct.
899 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
901 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
903 * c-decl.c (start_function): Call plugin before parsing.
904 (finish_function): Call plugin after parsing.
906 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
909 * c-decl.c (merge_decls): Merge DECL_COMMON.
911 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
913 * Make-lang.in (check_gcc_pallelize): Define.
915 2015-05-22 Marek Polacek <polacek@redhat.com>
918 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
921 2015-05-21 Marek Polacek <polacek@redhat.com>
923 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
926 2015-05-20 Marek Polacek <polacek@redhat.com>
928 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
929 * c-typeck.c: Likewise.
931 2015-05-19 Marek Polacek <polacek@redhat.com>
933 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
935 2015-05-19 Jakub Jelinek <jakub@redhat.com>
938 * c-parser.c (c_parser_omp_for_loop): Don't add
939 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
940 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
941 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
944 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
946 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
949 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
952 * c-objc-common.c (c_tree_printer): Replace locus pointer with
955 2015-05-14 Marek Polacek <polacek@redhat.com>
959 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
962 2015-05-12 David Malcolm <dmalcolm@redhat.com>
964 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
965 to add a call to warn_for_misleading_indentation.
966 (c_parser_else_body): Likewise, adding param "else_loc".
967 (c_parser_if_statement): Check for misleading indentation.
968 (c_parser_while_statement): Likewise.
969 (c_parser_for_statement): Likewise.
971 2015-05-08 Marek Polacek <polacek@redhat.com>
974 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
975 (output_init_element): Likewise.
977 2015-05-07 Marek Polacek <polacek@redhat.com>
980 * c-typeck.c (build_binary_op): Warn when left shifting a negative
983 2015-04-30 Marek Polacek <polacek@redhat.com>
985 * c-typeck.c (set_init_label): Call error_at instead of error and
988 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
991 * c-typeck.c (c_build_va_arg): Clarify the error message.
993 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
995 * c-parser.c (c_parser_oacc_enter_exit_data): Use
996 OMP_STANDALONE_CLAUSES.
998 2015-04-28 Marek Polacek <polacek@redhat.com>
1000 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1002 2015-04-28 Marek Polacek <polacek@redhat.com>
1005 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1007 2015-04-25 Marek Polacek <polacek@redhat.com>
1010 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1013 2015-04-23 Marek Polacek <polacek@redhat.com>
1016 * c-decl.c (set_labels_context_r): New function.
1017 (store_parm_decls): Call it via walk_tree_without_duplicates.
1018 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1019 instead of create_tmp_var. Build TARGET_EXPR instead of
1021 (build_atomic_assign): Use create_tmp_var_raw instead of
1022 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1024 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1026 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1027 (c_parser_omp_target_update): Add missed %> to error_at ().
1029 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1032 * c-decl.c (c_default_pointer_mode): Remove definition.
1033 * c-tree.h (c_default_pointer_mode): Remove declaration.
1035 2015-03-27 Tobias Burnus <burnus@net-b.de>
1038 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1040 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1041 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1042 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1044 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1046 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1047 attribute for DECL_EXTERNAL VAR_DECLs.
1049 2015-03-11 Jakub Jelinek <jakub@redhat.com>
1051 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1054 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1057 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1058 before preparing arguments to warn_logical_not_parentheses.
1060 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1063 * c-typeck.c (parser_build_binary_op): Don't warn for
1064 !!x == y or !b == y where b is _Bool.
1066 2015-03-09 Marek Polacek <polacek@redhat.com>
1068 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1069 * c-decl.c (grokdeclarator): Likewise.
1070 * c-typeck.c (build_binary_op): Likewise.
1072 2015-02-27 Marek Polacek <polacek@redhat.com>
1075 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1077 2015-02-14 Marek Polacek <polacek@redhat.com>
1080 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1081 declared through a typedef name.
1083 2015-02-13 Marek Polacek <polacek@redhat.com>
1086 * c-decl.c (grokdeclarator): Print also the type when giving
1087 the error message about array's incomplete element type.
1089 2015-02-11 Jakub Jelinek <jakub@redhat.com>
1092 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1093 check in the POP macro.
1095 2015-02-09 Marek Polacek <polacek@redhat.com>
1098 * c-typeck.c (process_init_element): Don't always wrap
1099 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1100 initializing a range of elements.
1102 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1106 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1108 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
1110 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1111 processing enum declaration.
1113 2015-01-29 Marek Polacek <polacek@redhat.com>
1116 * c-typeck.c (pop_init_level): If constructor_elements has
1117 exactly one element with integer_zerop value, set constructor_zeroinit
1118 to 1. Remove braces around warning_init call.
1120 2015-01-27 Jakub Jelinek <jakub@redhat.com>
1123 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1124 of FUNCTION_DECLs with error_mark_node.
1126 2015-01-26 Jakub Jelinek <jakub@redhat.com>
1129 * c-typeck.c (convert_arguments): Return -1 if there are
1130 error_args, even if we've diagnosed too many arguments.
1132 2015-01-21 Richard Biener <rguenther@suse.de>
1135 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1136 for builtins the user declared correctly.
1138 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1139 Bernd Schmidt <bernds@codesourcery.com>
1140 Cesar Philippidis <cesar@codesourcery.com>
1141 James Norris <jnorris@codesourcery.com>
1142 Jakub Jelinek <jakub@redhat.com>
1143 Ilmir Usmanov <i.usmanov@samsung.com>
1145 * c-parser.c: Include "gomp-constants.h".
1146 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1147 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1148 Use OMP_CLAUSE_SET_MAP_KIND.
1149 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1150 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1151 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1152 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1153 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1154 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1155 "copyout", "create", "delete", "deviceptr", "gang", "host",
1156 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1157 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1158 "present_or_create", "pcreate", "seq", "self", "vector",
1159 "vector_length", "wait", "worker".
1160 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1161 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1162 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1163 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1164 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1165 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1166 (c_parser_oacc_data_clause_deviceptr)
1167 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1168 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1169 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1170 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1171 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1172 (c_parser_oacc_parallel, c_parser_oacc_update)
1173 (c_parser_oacc_wait): New functions.
1174 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1175 (c_finish_oacc_data): New prototypes.
1176 * c-typeck.c: Include "gomp-constants.h".
1177 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1178 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1179 OMP_CLAUSE_SET_MAP_KIND.
1180 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1181 (c_finish_oacc_data): New functions.
1182 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1183 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1184 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1185 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1186 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1187 GOMP_MAP_FORCE_DEVICEPTR.
1189 2015-01-09 Michael Collison <michael.collison@linaro.org>
1191 * c-array-notation.c: Include hash-set.h, machmode.h,
1192 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1193 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1194 * c-aux-info.c: Ditto.
1195 * c-convert.c: Ditto.
1197 * c-errors.c: Ditto.
1198 * c-lang.c: Dittoxs.
1199 * c-objc-common.c: Ditto.
1200 * c-parser.c: Ditto.
1201 * c-typeck.c: Include hash-set.h, machmode.h,
1202 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1203 fold-const.h, wide-int.h, inchash.h, real.h and
1204 fixed-value.h due to flattening of tree.h.
1206 2015-01-07 Marek Polacek <polacek@redhat.com>
1209 * c-typeck.c (process_init_element): Disallow initialization of
1210 a flexible array member with a string constant if the structure
1213 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1216 * c-typeck.c (convert_for_assignment, c_finish_return): For
1217 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1218 types also set in_late_binary_op around convert call.
1219 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1220 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1221 result on expr as last argument to ubsan_instrument_float_cast,
1222 if in_late_binary_op, don't use c_save_expr but save_expr.
1224 Update copyright years.
1226 2015-01-05 Marek Polacek <polacek@redhat.com>
1229 * c-typeck.c (build_array_ref): Pass loc down to
1230 warn_array_subscript_with_type_char.
1232 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1234 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1235 (common-pointer-type): For pointers to arrays take qualifiers from
1237 (build_conditional_expr): Add warnings for lost qualifiers.
1238 (comp-target-types): Allow pointers to arrays with different qualifiers.
1239 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1240 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1241 to PEDWARN_FOR_QUALIFIERS.
1243 2014-12-17 Jakub Jelinek <jakub@redhat.com>
1246 * c-convert.c: Include ubsan.h.
1247 (convert): For real -> integral casts and
1248 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1249 instead instrument the float cast directly.
1251 2014-11-29 Jakub Jelinek <jakub@redhat.com>
1253 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1254 c_finish_stmt_expr): Remove NULL last argument from
1255 create_tmp_var_raw and create_tmp_var calls.
1256 * c-array-notation.c (fix_builtin_array_notation_fn,
1257 build_array_notation_expr, fix_conditional_array_notations_1,
1258 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1260 2014-11-28 Marek Polacek <polacek@redhat.com>
1263 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1264 convert the right operand to integer type.
1266 2014-11-25 Marek Polacek <polacek@redhat.com>
1269 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1270 for inline functions.
1272 2014-11-21 Jakub Jelinek <jakub@redhat.com>
1275 * c-typeck.c (build_array_ref): Adjust
1276 convert_vector_to_pointer_for_subscript caller. If it returns true,
1277 call non_lvalue_loc on the result.
1279 2014-11-11 Richard Biener <rguenther@suse.de>
1281 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1284 2014-11-10 Andi Kleen <ak@linux.intel.com>
1287 * c-parser.c (c_parser_statement_after_labels): Call
1289 (c_parser_if_statement): Dito.
1290 (c_parser_switch_statement): Dito.
1291 (c_parser_while_statement): Dito.
1292 (c_parser_do_statement): Dito.
1293 (c_parser_for_statement): Dito.
1294 * c-typeck.c (c_finish_loop): Dito.
1296 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1298 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1299 OPT_Wshift_count_overflow in the warnings.
1301 2014-10-30 Marek Polacek <polacek@redhat.com>
1303 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1304 print the stripped version as well, if they're not the same.
1306 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1308 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1311 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
1313 * c-decl.c: Adjust include files.
1314 * c-parser.c: Ditto.
1316 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1317 Tom Tromey <tromey@redhat.com>
1319 * c-tree.h (enum c_oracle_request): New.
1320 (c_binding_oracle_function): New typedef.
1321 (c_binding_oracle, c_pushtag, c_bind): Declare.
1322 * c-decl.c (c_binding_oracle): New global.
1323 (I_SYMBOL_CHECKED): New macro.
1324 (i_symbol_binding): New function.
1325 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1326 (I_TAG_CHECKED): New macro.
1327 (i_tag_binding): New function.
1328 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1329 (I_LABEL_CHECKED): New macro.
1330 (i_label_binding): New function.
1331 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1332 (c_print_identifier): Save and restore c_binding_oracle.
1333 (c_pushtag, c_bind): New functions.
1335 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
1337 * c-typeck.c: Adjust include files.
1339 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1342 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1343 initialization here...
1344 (c_initialize_diagnostics): ... but here. Set defaults after
1345 building pretty-printer.
1347 2014-10-23 Marek Polacek <polacek@redhat.com>
1350 * c-decl.c (pop_scope): Don't print warning in external_scope.
1352 2014-10-19 Marek Polacek <polacek@redhat.com>
1355 * c-typeck.c (output_init_element): Allow initializing objects with
1356 static storage duration with compound literals even in C99 and add
1359 2014-10-17 Marek Polacek <polacek@redhat.com>
1362 * c-typeck.c (digest_init): Allow initializing objects with static
1363 storage duration with compound literals even in C99 and add pedwarn
1366 2014-10-17 Marek Polacek <polacek@redhat.com>
1369 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1370 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1371 error multiple times. Print the type.
1373 2014-10-17 Marek Polacek <polacek@redhat.com>
1376 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1379 2014-10-17 Marek Polacek <polacek@redhat.com>
1381 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1382 (start_function): Use OPT_Wimplicit_int instead of 0.
1383 (store_parm_decls_oldstyle): Likewise.
1385 2014-10-17 Alan Modra <amodra@gmail.com>
1388 * c-decl.c (merge_decls): Don't merge section name or tls model
1389 to newdecl symtab node, instead merge to olddecl. Override
1390 existing olddecl section name. Set tls_model for all thread-local
1391 vars, not just OMP thread-private ones. Remove incorrect comment.
1393 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
1395 * c-decl.c: Adjust include files.
1397 2014-10-14 DJ Delorie <dj@redhat.com>
1399 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1400 (c_token_starts_typename): Check all __intN, not just __int128.
1401 (c_token_starts_declspecs): Likewise.
1402 (c_parser_declspecs): Likewise.
1403 (c_parser_attribute_any_word): Likewise.
1404 (c_parser_objc_selector): Likewise.
1405 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1406 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1408 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1410 (finish_declspecs): Likewise.
1412 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1414 * c-parser.c (c_parser_all_labels): New function to replace
1416 (c_parser_statement): Call the new function.
1418 2014-10-09 Marek Polacek <polacek@redhat.com>
1421 * c-typeck.c (pop_init_level): Don't warn about initializing
1424 2014-10-07 Marek Polacek <polacek@redhat.com>
1427 * c-decl.c (header_for_builtin_fn): New function.
1428 (implicitly_declare): Suggest which header to include.
1430 2014-10-07 Marek Polacek <polacek@redhat.com>
1432 * c-convert.c (convert): Use error_operand_p.
1433 * c-typeck.c (require_complete_type): Likewise.
1434 (really_atomic_lvalue): Likewise.
1435 (digest_init): Likewise.
1436 (handle_omp_array_sections_1): Likewise.
1438 2014-10-03 Marek Polacek <polacek@redhat.com>
1441 * c-decl.c (pop_scope): Don't warn about "inline function declared
1442 but never defined" for functions marked with gnu_inline attribute.
1444 2014-09-25 Jakub Jelinek <jakub@redhat.com>
1447 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1448 on low_bound and length.
1450 2014-09-24 Marek Polacek <polacek@redhat.com>
1454 * c-parser.c: Don't define CPP_KEYWORD.
1455 (c_parser_switch_statement): Pass original type to c_finish_case.
1456 * c-tree.h (c_finish_case): Update declaration.
1457 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1458 conditionally to c_do_switch_warnings.
1460 2014-09-03 Marek Polacek <polacek@redhat.com>
1463 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1466 2014-09-02 Jakub Jelinek <jakub@redhat.com>
1467 Balaji V. Iyer <balaji.v.iyer@intel.com>
1468 Igor Zamyatin <igor.zamyatin@intel.com>
1470 * c-parser.c (c_parser_cilk_for): New function.
1471 (c_parser_cilk_grainsize): Likewise.
1472 (c_get_temp_regvar): Likewise.
1473 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1474 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1475 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1476 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1479 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1481 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1482 with using HOST_WIDE_INT without truncation to 'int'
1484 2014-08-22 Marek Polacek <polacek@redhat.com>
1487 * c-typeck.c (parser_build_binary_op): Adjust call to
1488 warn_logical_not_parentheses.
1490 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1493 * c-parser.c (c_parser_array_notation): Check for correct
1494 type of an array added.
1496 2014-08-19 Marek Polacek <polacek@redhat.com>
1499 * c-typeck.c (build_binary_op): If either operand of a comparison
1500 is a boolean expression, call maybe_warn_bool_compare.
1502 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1505 * c-typeck.c (build_c_cast): Do a conversion even when the
1506 TYPE_MAIN_VARIANTs are the same.
1508 2014-08-19 Marek Polacek <polacek@redhat.com>
1510 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1511 pedwarn_c99 instead of pedwarn.
1512 (grokfield): Likewise.
1513 (warn_defaults_to): New function.
1514 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1515 Unconditionally call pedwarn_c99 instead of pedwarn.
1516 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1517 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1518 check flag_isoc11 before.
1519 * c-errors.c (pedwarn_c99): Change the return type to bool.
1520 Handle -Wc99-c11-compat.
1521 * c-parser.c (disable_extension_diagnostics): Handle
1522 warn_c99_c11_compat.
1523 (restore_extension_diagnostics): Likewise.
1524 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1525 instead of pedwarn, don't check flag_isoc11 before.
1526 (c_parser_declspecs): Likewise.
1527 (c_parser_alignas_specifier): Likewise.
1528 (c_parser_alignof_expression): Likewise.
1529 (c_parser_generic_selection): Likewise.
1530 * c-tree.h (pedwarn_c99): Update declaration.
1531 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1534 2014-08-19 Marek Polacek <polacek@redhat.com>
1536 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1538 * c-errors.c: Include "opts.h".
1539 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1540 * c-parser.c (disable_extension_diagnostics): Handle negative value
1541 of warn_c90_c99_compat, too.
1542 (restore_extension_diagnostics): Likewise.
1543 (c_parser_compound_statement_nostart): Pass
1544 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1546 2014-08-12 Marek Polacek <polacek@redhat.com>
1548 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1550 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1552 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1554 2014-08-10 Marek Polacek <polacek@redhat.com>
1557 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1558 Call pedwarn_c90 instead of pedwarn.
1559 (check_bitfield_type_and_width): Likewise.
1560 (declspecs_add_qual): Likewise.
1561 (declspecs_add_type): Likewise.
1562 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1563 Adjust to only call pedwarn_c90.
1564 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1565 pedwarn_c90 instead of pedwarn.
1566 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1567 * c-parser.c (disable_extension_diagnostics): Handle
1568 warn_c90_c99_compat.
1569 (restore_extension_diagnostics): Likewise.
1570 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1571 pedwarn_c90 instead of pedwarn.
1572 (c_parser_initelt): Likewise.
1573 (c_parser_postfix_expression): Likewise.
1574 (c_parser_postfix_expression_after_paren_type): Likewise.
1575 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1576 * c-tree.h: Fix formatting.
1577 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1578 pedwarn_c90 instead of pedwarn.
1580 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1582 * c-typeck.c: Remove include of pointer-set.h.
1584 2014-08-07 Marek Polacek <polacek@redhat.com>
1586 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1588 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1590 * c-typeck.c: Use hash_map instead of pointer_map.
1592 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1594 * c-decl.c: Use hash_set instead of pointer_set.
1596 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1599 * c-array-notation.c (expand_array_notations): Handling
1602 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
1605 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1608 2014-07-30 Tom Tromey <tromey@redhat.com>
1610 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1612 (really_start_incremental_init, push_init_level): Initialize
1614 (pop_init_level): Set global designator_depth.
1615 (process_init_element): Check for designated_init attribute.
1617 2014-07-20 Marek Polacek <polacek@redhat.com>
1620 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1621 (implicitly_declare): Pass location to implicit_decl_warning.
1623 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1626 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1627 If non-NULL, call c_parser_check_literal_zero.
1628 (c_parser_check_literal_zero): New function.
1629 (c_parser_postfix_expression_after_primary): Adjust
1630 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1632 2014-07-06 Marek Polacek <polacek@redhat.com>
1635 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1636 * c-tree.h (C_ARRAY_PARAMETER): Define.
1637 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1640 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
1641 Chen Gang <gang.chen.5i5j@gmail.com>
1643 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1646 2014-07-01 Marek Polacek <polacek@redhat.com>
1648 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1649 instead of 0 to WARN_FOR_ASSIGNMENT.
1651 2014-07-01 Marek Polacek <polacek@redhat.com>
1654 * c-typeck.c (convert_for_assignment): Pass
1655 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1657 2014-06-30 Marek Polacek <polacek@redhat.com>
1659 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1660 has no_sanitize_undefined attribute.
1662 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1665 * c-array-notation.c (fix_builtin_array_notation_fn):
1666 Check for 0 arguments in builtin call. Check that bultin argument is
1668 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1671 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1673 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1674 qualifiers in __auto_type for atomic types.
1675 (c_parser_typeof_specifier): Discard all type qualifiers in
1676 __typeof__ for atomic types.
1678 2014-06-25 Marek Polacek <polacek@redhat.com>
1681 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1682 the return expression to c_finish_return.
1684 2014-06-25 Jakub Jelinek <jakub@redhat.com>
1686 * c-typeck.c (c_finish_omp_clauses): Make sure
1687 OMP_CLAUSE_LINEAR_STEP has correct type.
1689 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1693 2014-06-24 Jakub Jelinek <jakub@redhat.com>
1695 * c-parser.c (c_parser_omp_for_loop): For
1696 #pragma omp parallel for simd move lastprivate clause from parallel
1697 to for rather than simd.
1699 2014-06-23 Marek Polacek <polacek@redhat.com>
1701 * c-typeck.c (parser_build_binary_op): Don't call
1702 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1704 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1706 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1707 * c-decl.c (merge_decls): Likewise.
1709 2014-06-09 Marek Polacek <polacek@redhat.com>
1712 * c-typeck.c (error_init): Call inform instead of error_at.
1713 (pedwarn_init): Call inform instead of pedwarn.
1714 (warning_init): Call inform instead of warning_at.
1716 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
1718 * c-decl.c (merge_decls): Use set_decl_section_name.
1719 (duplicate_decls): Remove node if it exists.
1721 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1724 * c-typeck.c (push_init_level, process_init_element,
1725 pop_init_level): Correct check for zero initialization, move
1726 missing brace warning to respect zero initialization.
1728 2014-06-05 Marek Polacek <polacek@redhat.com>
1731 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1733 2014-06-05 Marek Polacek <polacek@redhat.com>
1736 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1737 on the left hand side operand of a comparison.
1739 2014-06-05 Marek Polacek <polacek@redhat.com>
1742 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1743 Print note only if the warning was printed.
1745 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1748 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1751 2014-06-03 Marek Polacek <polacek@redhat.com>
1754 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1756 * c-tree.h (c_start_case): Update.
1757 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1758 switch condition has boolean value.
1760 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
1762 * c-decl.c: Include builtins.h.
1763 * c-parser.c: Likewise.
1765 2014-05-27 Marek Polacek <polacek@redhat.com>
1768 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1769 error and warning calls to error_at and warning_at. Pass location of
1770 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1771 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1772 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1774 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1777 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1778 function parameters.
1780 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1782 * c-decl.c (merge_decls): Preserve symtab node pointers.
1783 (duplicate_decls): Free new decl.
1785 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1787 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1790 * c-parser.c (c_parser_omp_target): Return bool values.
1792 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1794 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1795 num_teams_loc variable to num_thread_limit_loc.
1797 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1799 * c-array-notation.c (expand_array_notations): Use void_node
1800 instead of void_zero_node.
1802 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1804 * c-decl.c (finish_struct): Adjust.
1805 (finish_enum): Likewise.
1807 (record_inline_static): Likewise.
1808 (push_scope): Likewise.
1809 (make_label): Likewise.
1810 (lookup_label_for_goto): Likewise.
1811 (finish_struct): Likewise.
1812 (finish_enum): Likewise.
1813 (store_parm_decls): Likewise.
1814 (c_push_function_context): Likewise.
1815 * c-lang.h: Remove usage of variable_size gty attribute.
1816 * c-parser.c (c_parse_init): Adjust.
1817 (c_parse_file): Likewise.
1819 2014-05-13 Marek Polacek <polacek@redhat.com>
1822 * c-typeck.c (convert_for_assignment): Pass location to
1823 WARN_FOR_ASSIGNMENT instead of input_location.
1825 2014-05-10 Marek Polacek <polacek@redhat.com>
1827 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1828 maybe_warn_string_init.
1829 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1830 maybe_warn_string_init.
1831 * c-tree.h (maybe_warn_string_init): Update declaration.
1832 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1833 Call pedwarn_init with loc instead of with input_location.
1834 (digest_init): Pass init_loc to maybe_warn_string_init.
1835 (pop_init_level): Call pedwarn_init with loc instead of with
1837 (set_init_index): Likewise.
1838 (process_init_element): Likewise.
1840 2014-05-09 Marek Polacek <polacek@redhat.com>
1843 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1844 (c_parser_initelt): Pass location to set_init_label. Pass array index
1845 location to set_init_index.
1846 * c-tree.h (push_init_level): Update declaration.
1847 (pop_init_level): Likewise.
1848 (set_init_index): Likewise.
1849 (set_init_label): Likewise.
1850 * c-typeck.c (error_init): Add location parameter. Call error_at
1852 (digest_init): Pass init_loc to error_init.
1853 (really_start_incremental_init):
1854 (push_init_level): Add location parameter. Pass loc to pop_init_level
1856 (pop_init_level): Likewise.
1857 (set_designator): Add location parameter. Pass loc to pop_init_level,
1858 push_init_level, and error_init.
1859 (set_init_index): Add location parameter. Pass loc to error_init and
1861 (set_init_label): Likewise.
1862 (output_init_element): Pass loc to error_init.
1863 (process_init_element): Pass loc to error_init, pop_init_level,
1864 pedwarn_init, and push_init_level.
1866 2014-05-09 Marek Polacek <polacek@redhat.com>
1869 * c-parser.c (c_parser_attributes): Parse the arguments as an
1870 expression-list if the attribute takes identifier.
1872 2014-05-08 Marek Polacek <polacek@redhat.com>
1875 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1878 2014-05-08 Marek Polacek <polacek@redhat.com>
1881 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1884 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1885 Mike Stump <mikestump@comcast.net>
1886 Richard Sandiford <rdsandiford@googlemail.com>
1888 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1889 (finish_enum): Use wide-int interfaces.
1890 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1891 * c-typeck.c (build_c_cast): Likewise.
1892 (set_nonincremental_init_from_string): Likewise.
1893 (c_tree_equal): Likewise.
1895 2014-05-02 Marek Polacek <polacek@redhat.com>
1898 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1899 Return size_one_node when the type is not complete.
1900 (pointer_diff): Remove comment.
1901 (build_unary_op): Improve error messages.
1903 2014-05-02 Marek Polacek <polacek@redhat.com>
1905 * c-typeck.c (c_finish_return): Separate warning_at calls.
1907 2014-05-02 Marek Polacek <polacek@redhat.com>
1909 * c-tree.h (error_init): Remove declaration.
1910 (pedwarn_init): Likewise.
1911 * c-typeck.c (error_init): Make static and move above.
1912 (pedwarn_init): Likewise.
1913 (warning_init): Move above.
1914 (maybe_warn_string_init): Likewise.
1916 2014-05-01 Jeff Law <law@redhat.com>
1920 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1921 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1924 2014-05-02 Marek Polacek <polacek@redhat.com>
1927 * c-typeck.c (push_init_level): Set constructor_designated to
1928 p->designated for structures.
1930 2014-05-01 Marek Polacek <polacek@redhat.com>
1933 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1934 function-definition has an attribute after the declarator.
1936 2014-05-01 Marek Polacek <polacek@redhat.com>
1939 * c-typeck.c (warning_init): Add location_t parameter. Call
1940 warning_at instead of warning.
1941 (push_init_level): Pass input_location to warning_init.
1942 (add_pending_init): Add location_t parameter. Pass loc to
1944 (set_nonincremental_init): Pass input_location to add_pending_init.
1945 (set_nonincremental_init_from_string): Likewise.
1946 (output_init_element): Pass loc to warning_init and to
1949 2014-05-01 Marek Polacek <polacek@redhat.com>
1952 * c-typeck.c (c_finish_return): Distinguish between label and variable
1953 when warning about returning local address.
1955 2014-05-01 Marek Polacek <polacek@redhat.com>
1958 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1961 2014-05-01 Marek Polacek <polacek@redhat.com>
1964 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1965 instead of 0 to WARN_FOR_QUALIFIERS.
1967 2014-05-01 Marek Polacek <polacek@redhat.com>
1970 * c-typeck.c (default_conversion): Use better location for
1973 2014-04-30 Marek Polacek <polacek@redhat.com>
1975 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1976 also when SANITIZE_FLOAT_DIVIDE is on.
1978 2014-04-30 Marek Polacek <polacek@redhat.com>
1981 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1982 and pedwarn_init. Use loc insted of input_location.
1984 2014-04-30 Marek Polacek <polacek@redhat.com>
1987 * c-typeck.c (build_binary_op): Use location when warning about
1990 2014-04-25 Marek Polacek <polacek@redhat.com>
1993 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1994 always_inline/noinline and hot/cold attributes.
1996 2014-04-25 Marek Polacek <polacek@redhat.com>
1999 * c-parser.c (c_parser_initelt): Pass input_location to
2000 process_init_element.
2001 (c_parser_initval): Pass loc to process_init_element.
2002 * c-tree.h (process_init_element): Adjust declaration.
2003 * c-typeck.c (push_init_level): Pass input_location to
2004 process_init_element.
2005 (pop_init_level): Likewise.
2006 (set_designator): Likewise.
2007 (output_init_element): Add location_t parameter. Pass loc to
2009 (output_pending_init_elements): Pass input_location to
2010 output_init_element.
2011 (process_init_element): Add location_t parameter. Pass loc to
2012 output_init_element.
2014 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2016 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2017 atomic-clause, allow comma in between atomic-clause and
2020 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2023 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2024 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2026 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2029 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2030 create_tmp_var instead build_decl for creating temps.
2031 (build_array_notation_expr): Likewise.
2032 (fix_conditional_array_notations_1): Likewise.
2033 (fix_array_notation_expr): Likewise.
2034 (fix_array_notation_call_expr): Likewise.
2036 2014-03-28 Jakub Jelinek <jakub@redhat.com>
2039 * c-tree.h (c_build_function_call_vec): New prototype.
2040 * c-typeck.c (build_function_call_vec): Don't call
2041 resolve_overloaded_builtin here.
2042 (c_build_function_call_vec): New wrapper function around
2043 build_function_call_vec. Call resolve_overloaded_builtin here.
2044 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2045 Call c_build_function_call_vec instead of build_function_call_vec.
2046 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2047 * c-decl.c (finish_decl): Likewise.
2049 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2052 * c-typeck.c: Use correct format string in cast-qual warning
2054 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2056 * c-decl.c (c_decl_attributes): Use
2057 lang_hooks.types.omp_mappable_type.
2058 * c-typeck.c (c_finish_omp_clauses): Likewise.
2060 2014-03-06 Marek Polacek <polacek@redhat.com>
2063 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2064 of checking tree code.
2066 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2068 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2069 (c_parser_parameter_declaration): Likewise.
2071 2014-02-19 Marek Polacek <polacek@redhat.com>
2074 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2075 Call mark_exp_read on exp.value.
2076 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2077 TREE_ADDRESSABLE on old instead of val.
2078 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2080 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2082 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2083 C_EXPR_APPEND by vec_safe_push.
2084 * c-tree.h (C_EXPR_APPEND): Remove.
2086 2014-01-31 Marek Polacek <polacek@redhat.com>
2089 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2090 build_function_call_vec.
2091 (build_function_call): Likewise.
2092 (build_atomic_assign): Likewise.
2093 (build_function_call_vec): Add arg_loc parameter. Use it.
2094 (convert_arguments): Likewise.
2095 (convert_for_assignment): Rename rhs_loc to expr_loc.
2096 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2097 (c_parser_objc_keywordexpr): Likewise.
2098 (c_parser_postfix_expression_after_primary): Call
2099 build_function_call_vec with expr_loc rather than op_loc.
2100 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2101 build_function_call_vec.
2102 (c_parser_expr_list): Add locations parameter. Fill it with locations
2103 of function arguments.
2104 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2106 2014-01-30 Marek Polacek <polacek@redhat.com>
2109 * c-typeck.c (build_function_call_vec): Use loc parameter.
2110 (convert_arguments): Add location parameter. Use it.
2111 (ep_convert_and_check): Likewise.
2112 (build_atomic_assign): Adjust convert_for_assignment call.
2113 (build_modify_expr): Likewise.
2114 (digest_init): Likewise.
2115 (c_finish_return): Likewise.
2116 (build_conditional_expr): Adjust ep_convert_and_check calls.
2117 (convert_for_assignment): Add rhs_loc parameter. Use it.
2118 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2121 2014-01-30 Richard Biener <rguenther@suse.de>
2124 * c-typeck.c (build_function_call_vec): Do not replace calls
2125 to a function via an incompatible type with a runtime abort.
2127 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2129 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2130 flag_enable_cilkplus with flag_cilkplus.
2131 (c_parser_direct_declarator_inner): Likewise.
2132 (c_parser_attribute_any_word): Likewise.
2133 (c_parser_attributes): Likewise.
2134 (c_parser_compound_statement): Likewise.
2135 (c_parser_statement_after_labels): Likewise.
2136 (c_parser_if_statement): Likewise.
2137 (c_parser_switch_statement): Likewise.
2138 (c_parser_do_statement): Likewise.
2139 (c_parser_for_statement): Likewise.
2140 (c_parser_unary_expression): Likewise.
2141 (c_parser_postfix_expression): Likewise.
2142 (c_parser_postfix_expression_after_primary): Likewise.
2143 (c_parser_postfix_expression_after_primary): Likewise.
2144 (c_parser_omp_clause_name): Likewise.
2145 (c_finish_omp_declare_simd): Likewise.
2146 (c_parser_cilk_verify_simd): Likewise.
2147 * c-typeck.c (build_array_ref): Likewise.
2148 (build_function_call_vec): Likewise.
2149 (convert_arguments): Likewise.
2150 (build_compound_expr): Likewise.
2151 (c_finish_return): Likewise.
2152 (c_finish_if_stmt): Likewise.
2153 (c_finish_loop): Likewise.
2154 (build_binary_op): Likewise.
2156 2014-01-23 Marek Polacek <polacek@redhat.com>
2159 * c-typeck.c (parser_build_binary_op): Use location instead of
2161 (build_binary_op): Pass location to shorten_compare.
2163 2014-01-23 Marek Polacek <polacek@redhat.com>
2166 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2169 2014-01-23 Marek Polacek <polacek@redhat.com>
2172 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2173 of a comma expression.
2174 (emit_side_effect_warnings): Likewise.
2176 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2179 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2180 function to use walk_tree and moved a lot of its functionality to
2181 expand_array_notations.
2182 (expand_array_notations): New function.
2184 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2186 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2187 attribute an attribute without value.
2189 2014-01-23 Jakub Jelinek <jakub@redhat.com>
2192 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2193 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2195 2014-01-22 Marek Polacek <polacek@redhat.com>
2198 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2199 of remove_c_maybe_const_expr on op1 and op2.
2201 2014-01-15 Jakub Jelinek <jakub@redhat.com>
2204 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2205 effects, preevaluate rhs using SAVE_EXPR first.
2207 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2210 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2211 statements with if-elseif statements.
2213 2014-01-06 Marek Polacek <polacek@redhat.com>
2216 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2217 defined bit-field types only in ISO C.
2219 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2221 Update copyright years
2223 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2225 * c-array-notation.c: Use the standard form for the copyright notice.
2227 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2229 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2230 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2231 field in parser is not empty. If not-empty, call the function
2232 c_parser_finish_omp_declare_simd.
2233 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2234 between SIMD-enabled functions and #pragma simd. Added new parameter.
2235 (c_parser_cilk_all_clauses): Modified the usage of the function
2236 c_parser_cilk_clause_vectorlength as mentioned above.
2237 (c_parser_cilk_simd_fn_vector_attrs): New function.
2238 (c_finish_cilk_simd_fn_tokens): Likewise.
2239 (is_cilkplus_vector_p): Likewise.
2240 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2241 "nomask," and "mask" strings in clause name.
2242 (c_parser_omp_all_clauses): Added 3 new case statements:
2243 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2244 PRAGMA_CILK_CLAUSE_NOMASK.
2245 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2246 check for vector attribute and if so call the function
2247 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2248 called the function c_finish_cilk_simd_fn_tokens.
2249 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2250 parser field is non-empty. If so, parse them as you would parse
2251 the omp declare simd pragma.
2252 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2253 Added a check when step is a parameter and flag it as error.
2254 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2255 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2258 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2260 * c-parser.c (c_parser_omp_parallel): Fix description.
2262 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2264 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2265 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2266 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2267 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2269 2013-12-04 Joseph Myers <joseph@codesourcery.com>
2272 * c-parser.c (c_parser_alignas_specifier): Use
2273 c_sizeof_or_alignof_type instead of c_alignof.
2274 (c_parser_alignof_expression): Likewise, with min_alignof
2275 parameter depending on alignof spelling used.
2277 2013-12-04 Marek Polacek <polacek@redhat.com>
2280 * c-decl.c (start_function): Don't warn for missing prototype for
2283 2013-12-03 Marek Polacek <polacek@redhat.com>
2286 * c-decl.c (build_compound_literal): Allow compound literals with
2287 empty initial value.
2289 2013-12-02 Joseph Myers <joseph@codesourcery.com>
2292 * c-typeck.c (build_modify_expr): Diagnose assignment to
2293 expression with array type.
2295 2013-11-29 Joseph Myers <joseph@codesourcery.com>
2298 * c-typeck.c (process_init_element): Do not treat a string as
2299 initializing a whole array when used with a designator for an
2302 2013-11-29 Joseph Myers <joseph@codesourcery.com>
2305 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2306 an inline function following a static declaration.
2308 2013-11-28 Jakub Jelinek <jakub@redhat.com>
2311 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2312 to p_name before calling c_parser_omp_teams instead of after.
2313 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2314 argument. Remove unused p_name variable.
2316 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
2317 Jakub Jelinek <jakub@redhat.com>
2319 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2320 external_scope is NULL.
2322 2013-11-27 Tom de Vries <tom@codesourcery.com>
2323 Marc Glisse <marc.glisse@inria.fr>
2326 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2328 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
2330 * c-typeck.c: Add required include files from gimple.h.
2332 2013-11-22 David Malcolm <dmalcolm@redhat.com>
2334 * c-decl.c (define_label, shadow_tag_warned)
2335 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2336 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2337 (declspecs_add_type): Remove use of in_system_header macro.
2338 * c-parser.c (c_parser_unary_expression): Likewise.
2339 * c-typeck.c (store_init_value, process_init_element)
2340 (c_start_case): Likewise.
2342 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2345 * c-parser.c (c_parser_set_source_position_from_token): Remove
2346 reference to in_system_header from comment.
2348 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2350 * c-decl.c (grokdeclarator): Update comment to refer to
2351 tree_to_[su]hwi rather than tree_low_cst.
2353 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2355 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2356 tree_to_uhwi throughout.
2358 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2360 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2363 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2365 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2368 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
2370 * c-parser.c (c_parser_cilk_simd): New.
2371 (c_parser_cilk_verify_simd): New.
2372 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2373 (c_parser_omp_for_loop): Add case for NE_EXPR.
2374 Set c_break_label for CILK_SIMD.
2375 (c_parser_cilk_clause_vectorlength): New.
2376 (c_parser_cilk_clause_linear): New.
2377 (c_parser_cilk_clause_name): New.
2378 (c_parser_cilk_all_clauses): New.
2379 * c-typeck.c (build_unary_op): Pass location argument to
2381 (build_modify_expr): Same.
2382 (build_asm_expr): Same.
2383 (c_finish_bc_stmt): Error on break/continue in loops.
2385 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
2387 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2389 2013-11-14 Diego Novillo <dnovillo@google.com>
2391 * c-decl.c: Include print-tree.h.
2392 Include stor-layout.h.
2395 Include stringpool.h.
2396 * c-lang.c: Include fold-const.h.
2397 * c-parser.c: Include stringpool.h.
2399 Include stor-layout.h.
2401 Include trans-mem.h.
2402 * c-typeck.c: Include stor-layout.h.
2403 Include trans-mem.h.
2407 2013-11-13 Joseph Myers <joseph@codesourcery.com>
2409 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2410 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2412 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2413 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2415 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2416 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2417 (c_parser_declarator, c_parser_direct_declarator_inner)
2418 (c_parser_parameter_declaration, c_parser_type_name): All callers
2420 (c_parser_declaration_or_fndef): Handle declarations with type
2421 determined from the initializer.
2423 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
2425 * c-typeck.c: Include gimplify.h.
2427 2013-11-12 Joseph Myers <joseph@codesourcery.com>
2429 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2430 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2432 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2433 or _Thread_local as appropriate in diagnostics.
2434 (build_null_declspecs): Initialize ret->thread_gnu_p.
2435 (declspecs_add_scspec): Handle either __thread or _Thread_local
2436 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2437 pedantic. Do not disallow _Thread_local extern and _Thread_local
2440 2013-11-07 Joseph Myers <joseph@codesourcery.com>
2441 Andrew MacLeod <amacleod@redhat.com>
2443 * c-aux-info.c (gen_type): Handle atomic qualifier.
2444 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2445 qualifiers when compating types.
2446 (shadow_tag_warned): Handle atomic_p in declspecs.
2447 (quals_from_declspecs): Likewise.
2448 (start_decl): Use c_type_promotes_to when promoting argument
2450 (grokdeclarator): Handle _Atomic.
2451 (get_parm_info): Diagnose any qualifier on "void" as only
2453 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2454 comparing types. Use c_type_promotes_to when promoting argument
2456 (finish_function): Use c_type_promotes_to when promoting argument
2458 (build_null_declspecs): Handle atomic_p in declspecs.
2459 (declspecs_add_qual): Handle RID_ATOMIC.
2460 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2461 (c_token_starts_declspecs): Handle RID_ATOMIC.
2462 (c_parser_declspecs): Handle atomic type specifiers and
2464 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2465 from types of expressions with atomic type.
2466 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2467 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2468 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2469 (c_parser_statement_after_labels, c_parser_switch_statement)
2470 (c_parser_for_statement, c_parser_expr_no_commas)
2471 (c_parser_conditional_expression, c_parser_binary_expression)
2472 (c_parser_cast_expression, c_parser_unary_expression)
2473 (c_parser_postfix_expression)
2474 (c_parser_postfix_expression_after_primary, c_parser_expression):
2475 Use convert_lvalue_to_rvalue.
2476 (c_parser_expression_conv, c_parser_expr_list): Document
2477 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2478 (c_parser_objc_synchronized_statement): Use
2479 convert_lvalue_to_rvalue.
2480 (c_parser_objc_selector): Handle RID_ATOMIC.
2481 (c_parser_objc_receiver, c_parser_array_notation): Use
2482 convert_lvalue_to_rvalue.
2483 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2484 _Atomic (type-name).
2485 (struct c_declspecs): Add atomic_p field.
2486 (convert_lvalue_to_rvalue): Declare.
2487 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2488 corresponding atomic types.
2489 (qualify_type): Don't add _Atomic qualifiers from second argument.
2490 (comp_target_types): Do not allow _Atomic mismatches.
2491 (type_lists_compatible_p): Do not remove atomic qualifiers when
2493 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2494 (build_atomic_assign): New functions.
2495 (build_unary_op): Use build_atomic_assign for atomic increment and
2497 (build_conditional_expr): Do not treat _Atomic void as a qualified
2499 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2500 (find_anonymous_field_with_type, convert_to_anonymous_field)
2501 (convert_for_assignment): Do not remove atomic qualifiers when
2503 (digest_init): Do not accept initialization of arrays of atomic
2504 elements by string constants.
2505 (build_asm_expr): Use convert_lvalue_to_rvalue.
2506 (build_binary_op): Do not treat _Atomic void as a qualified
2509 2013-11-06 DJ Delorie <dj@redhat.com>
2511 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2512 both explicit and builtin, print the location of the explicit one.
2514 2013-11-05 Tobias Burnus <burnus@net-b.de>
2516 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2517 c_parser_omp_distribute, c_parser_omp_teams,
2518 c_parser_omp_target, c_parser_omp_declare): Handle
2521 2013-11-03 Marek Polacek <polacek@redhat.com>
2523 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2525 2013-11-01 Jakub Jelinek <jakub@redhat.com>
2527 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2528 check_dup_generic at the end, unless remove is true.
2529 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2531 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2533 2013-10-31 Jakub Jelinek <jakub@redhat.com>
2535 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2536 with decl that is not pointer nor array.
2538 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2540 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2541 a spawning function is found.
2542 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2543 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2544 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2545 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2547 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2548 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2550 (c_finish_return): Added a check to reject _Cilk_spawn in return
2552 (build_cilk_spawn): New function.
2553 (build_cilk_sync): Likewise.
2554 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2556 2013-10-27 Tobias Burnus <burnus@net-b.de>
2559 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2560 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2561 (c_parser_statement_after_labels): Update calls.
2563 2013-10-24 Tobias Burnus <burnus@net-b.de>
2566 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2567 Handle PRAGMA_IVDEP.
2568 (c_parser_statement_after_labels): Update call.
2570 2013-10-24 Marek Polacek <polacek@redhat.com>
2572 * c-parser.c (c_parser_struct_declaration): Add a comment.
2573 (c_parser_declarator): Don't allow _Alignas here.
2575 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
2577 * c-parser.c: Include omp-low.h.
2578 * c-typeck.c: Likewise.
2580 2013-10-17 Marek Polacek <polacek@redhat.com>
2583 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2584 Document syntax of the array-declarator.
2585 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2587 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2588 (c_parser_struct_declaration): Likewise.
2589 (c_parser_declarator): Likewise.
2590 (c_parser_direct_declarator_inner): Likewise.
2591 (c_parser_parameter_declaration): Likewise.
2592 (c_parser_type_name): Likewise.
2594 2013-10-11 Jakub Jelinek <jakub@redhat.com>
2596 * c-lang.h (current_omp_declare_target_attribute): New extern
2598 * c-parser.c: Include c-lang.h.
2599 (struct c_parser): Change tokens to c_token *.
2600 Add tokens_buf field. Change tokens_avail type to unsigned int.
2601 (c_parser_consume_token): If parser->tokens isn't
2602 &parser->tokens_buf[0], increment parser->tokens.
2603 (c_parser_consume_pragma): Likewise.
2604 (enum pragma_context): Add pragma_struct and pragma_param.
2605 (c_parser_external_declaration): Adjust
2606 c_parser_declaration_or_fndef caller.
2607 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2608 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2609 Adjust recursive call.
2610 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2612 (c_parser_parameter_declaration): Use pragma_param instead of
2614 (c_parser_compound_statement_nostart, c_parser_label,
2615 c_parser_for_statement): Adjust
2616 c_parser_declaration_or_fndef callers.
2617 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2618 it through to c_parser_conditional_expression.
2619 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2620 pass it through to c_parser_binary_expression. Adjust recursive
2622 (c_parser_binary_expression): Remove prec argument, add
2623 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2624 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2625 binop matches it, use build2 instead of parser_build_binary_op.
2626 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2627 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2628 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2629 Handle pragma_struct and pragma_param the same as pragma_external.
2630 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2631 (c_parser_omp_variable_list): Parse array sections for
2632 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2633 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2634 (c_parser_omp_clause_reduction): Handle user defined reductions.
2635 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2636 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2637 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2638 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2639 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2640 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2641 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2642 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2643 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2644 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2645 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2646 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2647 (c_parser_omp_for_loop): Add CODE argument, pass it through
2648 to c_finish_omp_for. Change last argument to cclauses,
2649 and adjust uses to grab parallel clauses from the array of all
2650 the split clauses. Adjust c_parser_binary_expression,
2651 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2652 (omp_split_clauses): New function.
2653 (c_parser_omp_simd): New function.
2654 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2655 Allow the function to be called also when parsing combined constructs,
2656 and call c_parser_omp_simd when parsing for simd.
2657 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2658 #pragma omp section, require exactly one structured-block instead of
2659 sequence of statements.
2660 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2661 Allow the function to be called also when parsing combined constructs.
2662 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2663 Allow the function to be called also when parsing combined
2665 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2666 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2667 c_parser_omp_teams, c_parser_omp_target_data,
2668 c_parser_omp_target_update, c_parser_omp_target,
2669 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2670 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2671 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2672 (c_parser_omp_construct): Add p_name and mask vars. Handle
2673 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2674 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2675 and c_parser_omp_sections callers.
2676 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2677 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2678 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2679 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2680 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2682 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2683 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2684 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2685 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2686 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2687 * c-typeck.c: Include tree-inline.h.
2688 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2689 handle_omp_array_sections_1, handle_omp_array_sections,
2690 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2691 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2692 user defined reductions.
2693 (c_tree_equal): New function.
2694 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2695 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2696 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2697 c_check_omp_declare_reduction_r): New prototypes.
2698 * c-decl.c (current_omp_declare_target_attribute): New variable.
2699 (c_decl_attributes): New function.
2700 (start_decl, start_function): Use it instead of decl_attributes.
2701 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2702 c_omp_reduction_decl, c_omp_reduction_lookup,
2703 c_check_omp_declare_reduction_r): New functions.
2705 2013-09-25 Tom Tromey <tromey@redhat.com>
2707 * Make-lang.in (c/gccspec.o): Remove.
2708 (CFLAGS-c/gccspec.o): New variable.
2709 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2710 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2711 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2713 2013-09-25 Tom Tromey <tromey@redhat.com>
2715 * Make-lang.in (c/gccspec.o): Don't use subshell.
2717 2013-09-18 Marek Polacek <polacek@redhat.com>
2720 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2721 Remove unnecessary check.
2723 2013-09-18 Marek Polacek <polacek@redhat.com>
2726 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2727 no_sanitize_undefined attribute.
2729 2013-09-13 Kai Tietz <ktietz@redhat.com>
2732 * c-decl.c (c_builtin_function_ext_scope): Remove
2733 wrong assumption that it is never called on prexisting
2736 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2738 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2740 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2742 * c-objc-common.c (c_tree_printer): Tidy.
2744 2013-08-30 Marek Polacek <polacek@redhat.com>
2746 * c-typeck.c (build_binary_op): Add division by zero and shift
2749 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
2750 Joseph Myers <joseph@codesourcery.com>
2753 * c-typeck.c (c_common_type): Prefer double_type_node over
2754 other REAL_TYPE types with the same precision.
2755 (convert_arguments): Likewise.
2757 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2759 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2760 (c_initialize_diagnostics): Call a destructor for the early printer.
2762 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2764 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2765 printer initialization.
2767 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
2770 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2771 check for truth values.
2772 (expand_array_notation_exprs): Added truth values case. Removed an
2773 unwanted else. Added for-loop to walk through subtrees in default
2776 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2778 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2780 2013-07-23 Joseph Myers <joseph@codesourcery.com>
2782 * c-parser.c (struct c_generic_association): Fix typo.
2784 2013-07-23 Tom Tromey <tromey@redhat.com>
2785 Joseph Myers <joseph@codesourcery.com>
2787 * c-parser.c (struct c_generic_association): New.
2788 (c_generic_association_d): New typedef.
2789 (c_parser_generic_selection): New function.
2790 (c_parser_postfix_expression): Handle RID_GENERIC.
2792 2013-07-13 Jason Merrill <jason@redhat.com>
2795 * c-decl.c (finish_struct): Check for too-large class.
2797 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
2800 * c-typeck.c (set_init_index): When folding, check for index overflow.
2802 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2804 * c-parser.c (c_parser_array_notation): Removed rejection of array
2805 notations in an array of function pointers.
2807 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2809 * c-array-notation.c (make_triplet_val_inv): New function.
2810 (create_cmp_incr): Likewise.
2811 (create_array_refs): Likewise.
2812 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2813 Also modularized common parts between functions and called the function.
2814 (build_array_notation_expr): Likewise.
2815 (fix_conditional_array_notations_1): Likewise.
2816 (fix_array_notation_expr): Likewise.
2817 (fix_array_notation_call_expr): Likewise.
2819 2013-06-18 Marek Polacek <polacek@redhat.com>
2822 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2824 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2826 * c-array-notation.c (build_array_notation_expr): Reject array notation
2827 mismatch between LHS and RHS even inside a call_expr. Also, removed
2828 a couple while statements that were dead code.
2830 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2832 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2833 excessive precision expressions in function parameters. Also removed
2834 couple unwanted while statements.
2836 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2838 * c-array-notation.c (expand_array_notation_exprs): Added
2839 ARRAY_NOTATION_REF case.
2841 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2843 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2844 function to c-family/array-notation-common.c.
2845 (is_cilkplus_reduce_builtin): Likewise.
2846 (find_rank): Likewise.
2847 (extract_array_notation_exprs): Likewise.
2848 (replace_array_notations): Likewise.
2849 (find_inv_trees): Likewise.
2850 (replace_inv_trees): Likewise.
2851 (contains_array_notation_expr): Likewise.
2852 (find_correct_array_notation_type): Likewise.
2853 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2854 (struct inv_list): Moved this to c-family/array-notation-common.c.
2855 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2857 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2859 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2860 reduction functions outside the for-loop. Added a check if the fundecl
2861 is non-NULL. Finally, removed an unwanted if-statement, and made the
2864 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2866 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2867 condition of the if-statement matches the rank of else-block and then-
2868 block when array notations are used.
2869 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2870 expression after the entire function body is parsed.
2871 (c_parser_expr_no_commas): Delayed creating array notation expressions
2872 to the end of function parsing.
2873 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2874 whole if-statement instead of just the condition.
2875 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2877 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2880 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2881 array to NULL_TREE if they are unused. Also added a check for the
2882 field to be NULL before its fields are used in future.
2884 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2887 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2888 (build_array_notation_expr): Likewise.
2890 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2892 * c-typeck.c (build_array_ref): Added a check to see if array's
2893 index is greater than one. If true, then emit an error.
2894 (build_function_call_vec): Exclude error reporting and checking
2895 for builtin array-notation functions.
2896 (convert_arguments): Likewise.
2897 (c_finish_return): Added a check for array notations as a return
2898 expression. If true, then emit an error.
2899 (c_finish_loop): Added a check for array notations in a loop
2900 condition. If true then emit an error.
2901 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2902 (build_binary_op): Added a check for array notation expr inside
2903 op1 and op0. If present, we call another function to find correct
2905 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2906 * c-parser.c (c_parser_compound_statement): Check if array
2907 notation code is used in tree, if so, then transform them into
2909 (c_parser_expr_no_commas): Check if array notation is used in LHS
2910 or RHS, if so, then build array notation expression instead of
2912 (c_parser_postfix_expression_after_primary): Added a check for
2913 colon(s) after square braces, if so then handle it like an array
2914 notation. Also, break up array notations in unary op if found.
2915 (c_parser_direct_declarator_inner): Added a check for array
2917 (c_parser_compound_statement): Added a check for array notation in
2918 a stmt. If one is present, then expand array notation expr.
2919 (c_parser_if_statement): Likewise.
2920 (c_parser_switch_statement): Added a check for array notations in
2921 a switch statement's condition. If true, then output an error.
2922 (c_parser_while_statement): Similarly, but for a while.
2923 (c_parser_do_statement): Similarly, but for a do-while.
2924 (c_parser_for_statement): Similarly, but for a for-loop.
2925 (c_parser_unary_expression): Check if array notation is used in a
2926 pre-increment or pre-decrement expression. If true, then expand
2928 (c_parser_array_notation): New function.
2929 * c-array-notation.c: New file.
2930 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2932 2013-05-23 Mike Stump <mikestump@comcast.net>
2934 * c-typeck.c (convert_for_assignment): Handle references to memory
2937 2013-05-16 Jason Merrill <jason@redhat.com>
2939 * Make-lang.in (cc1$(exeext)): Use link mutex.
2941 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2943 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2944 to simply use OPT_Wpointer_arith.
2945 (build_unary_op): Likewise.
2947 2013-04-03 Jakub Jelinek <jakub@redhat.com>
2950 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2951 argument. If set, or it temporarily for parsing of the first
2952 argument into force_folding_builtin_constant_p.
2953 (c_parser_postfix_expression): Adjust callers.
2955 2013-03-21 Richard Biener <rguenther@suse.de>
2957 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2958 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2960 2013-02-12 Marek Polacek <polacek@redhat.com>
2963 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2966 2013-01-24 Jakub Jelinek <jakub@redhat.com>
2969 * c-typeck.c (set_nonincremental_init_from_string): If
2970 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2972 (process_init_element): Likewise.
2974 2012-12-20 Jakub Jelinek <jakub@redhat.com>
2977 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2978 argument, don't call default_function_array_conversion
2979 nor c_fully_fold here.
2980 (c_parser_asm_statement): Adjust callers.
2981 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2982 and outputs here, and call default_function_array_conversion
2983 on inputs that don't need to be addressable.
2985 2012-12-18 Jakub Jelinek <jakub@redhat.com>
2988 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2989 warning require that both c_common_unsigned_type as well as
2990 c_common_signed_type is the same for both mvl and mvr types.
2992 2012-11-16 Diego Novillo <dnovillo@google.com>
2994 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2996 * c-common.c: Use new vec API in vec.h.
2997 * c-common.h: Likewise.
2998 * c-gimplify.c: Likewise.
2999 * c-pragma.c: Likewise.
3000 * c-pretty-print.c: Likewise.
3001 * c-pretty-print.h: Likewise.
3002 * c-semantics.c: Likewise.
3003 * c-decl.c: Likewise.
3004 * c-parser.c: Likewise.
3005 * c-tree.h: Likewise.
3006 * c-typeck.c: Likewise.
3008 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3011 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3013 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3016 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3017 shadows a function, unless the variable is a function or a
3018 pointer-to-function.
3020 2012-10-12 Jakub Jelinek <jakub@redhat.com>
3023 * c-parser.c (struct c_tree_loc_pair): Removed.
3024 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3025 add location_t * and tree * arguments, fill in array of 3
3026 sizeof_arg trees and corresponding locs.
3027 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3028 c_parser_expr_list callers.
3029 (c_parser_postfix_expression_after_primary): Likewise. Pass
3030 array of 3 sizeof_arg trees and locs (corresponding to first
3031 3 arguments) to sizeof_pointer_memaccess_warning.
3033 2012-10-09 Lawrence Crowl <crowl@google.com>
3035 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3036 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3039 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3042 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3045 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
3048 * c-typeck.c: Include c-common.h.
3049 (enum stv_conv): Moved to c-common.h.
3050 (scalar_to_vector): Moved to c-common.c.
3051 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3052 * Make-lang.in: c-typeck.c depends on c-common.h.
3054 2012-10-04 Arnaud Charlet <charlet@adacore.com>
3056 * c-decl.c (c_write_global_declarations): Fix handling of
3059 2012-09-30 Sharad Singhai <singhai@google.com>
3061 * c-decl.c (c_write_global_declarations): Use a different method
3062 to determine if the dump has ben initialized.
3064 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3067 * c-typeck.c (c_cast_expr): When casting to a type requiring
3068 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3071 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3074 * c-typeck.c (build_unary_op): Pass original argument of
3075 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3076 any C_MAYBE_CONST_EXPR, if it has integer operands.
3077 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3078 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3079 to c_objc_common_truthvalue_conversion, then remove any
3080 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3081 c_objc_common_truthvalue_conversion not
3082 c_common_truthvalue_conversion.
3083 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3084 call note_integer_operands for arguments with integer operands
3085 that are not integer constants.
3087 2012-09-13 Jakub Jelinek <jakub@redhat.com>
3090 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3091 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3093 2012-08-31 Jakub Jelinek <jakub@redhat.com>
3096 * c-convert.c (convert): Don't call fold_convert_loc if
3097 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3098 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3099 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3101 2012-08-24 Jakub Jelinek <jakub@redhat.com>
3104 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3105 for nested and empty_ok arguments in the call to
3106 c_parser_declaration_or_fndef.
3108 2012-08-17 Jakub Jelinek <jakub@redhat.com>
3110 * c-tree.h (c_last_sizeof_arg): Declare.
3111 * c-parser.c (struct c_tree_loc_pair): New type.
3112 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3114 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3115 (c_parser_postfix_expression_after_primary): Likewise. Call
3116 sizeof_pointer_memaccess_warning if needed.
3117 (sizeof_ptr_memacc_comptypes): New function.
3118 * c-typeck.c (c_last_sizeof_arg): New global variable.
3119 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3121 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
3123 * c-lang.h (lang_decl): Add variable_size GTY option.
3125 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3127 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3128 * Make-lang.in: Fix dependencies.
3130 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3132 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3133 and add language Makefile hooks.
3134 * config-lang.in: New file.
3135 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3136 add the required "normal" config-lang.in rules.
3137 * c-lang.h: Moved from gcc/ to here.
3138 * c-tree.h: Likewise.
3139 * c-objc-common.c: Likewise.
3140 * c-objc-common.h: Likewise.
3141 * c-typeck.c: Likewise.
3142 * c-convert.c: Likewise.
3143 * c-lang.c: Likewise.
3144 * c-aux-info.c: Likewise.
3145 * c-errors.c: Likewise.
3146 * gccspec.c: Likewise.
3147 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3148 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3150 Copyright (C) 2012-2015 Free Software Foundation, Inc.
3152 Copying and distribution of this file, with or without modification,
3153 are permitted in any medium without royalty provided the copyright
3154 notice and this notice are preserved.