]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
config/nvptx/nvptx.opt (moptimize): Add a period at end of help text.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
b4ba8358 12016-04-15 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/70436
4 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5 where needed.
6 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
7 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
8 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
9 Adjust c_parser_pragma callers.
10 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
11 caller.
12 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
13 c_parser_statement.
14 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
15 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
16 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
17 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
18 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
19 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
20 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
21 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
22 down where needed.
23 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
24 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
25 calls.
26
0241e4dc 272016-04-13 Marek Polacek <polacek@redhat.com>
28
29 PR c/70436
30 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
31 adjust callers.
32 (c_parser_statement): Likewise.
33 (c_parser_c99_block_statement): Likewise.
34 (c_parser_while_statement): Likewise.
35 (c_parser_for_statement): Likewise.
36 (c_parser_if_body): Don't set IF_P here.
37 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
38 about dangling else here.
39 * c-tree.h (c_finish_if_stmt): Adjust declaration.
40 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
41 warn about dangling else here.
42
c4f5465d 432016-04-04 Marek Polacek <polacek@redhat.com>
44
45 PR c/70307
46 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
47
7952b661 482016-03-31 Marek Polacek <polacek@redhat.com>
49
50 PR c/70297
51 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
52
5539bc70 532016-03-18 David Malcolm <dmalcolm@redhat.com>
54
55 PR c/70281
56 * c-parser.c (c_parser_postfix_expression): Set the source range
57 for uses of "__builtin_types_compatible_p".
58
29a514fa 592016-03-17 Jakub Jelinek <jakub@redhat.com>
60
61 PR c/70280
62 * c-typeck.c (composite_type): Don't count void_list_node
63 into len, if the list is terminated by void_list_node, start
64 with void_list_node instead of NULL for newargs. Stop
65 at void_list_node.
66
462ca422 672016-03-16 Marek Polacek <polacek@redhat.com>
68
69 PR c/70093
70 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
71 nested functions returning VM types.
72
27dcb7a8 732016-03-09 Cesar Philippidis <cesar@codesourcery.com>
74
75 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
76 when calling c_finish_omp_clauses.
77
2d1d2e55 782016-03-04 Bernd Schmidt <bschmidt@redhat.com>
79
80 PR c/69824
81 * c-decl.c (get_parm_info): Don't queue implicit function declarations
82 for later.
83
6560d1ad 842016-03-04 Marek Polacek <polacek@redhat.com>
85
86 PR c/69798
87 * c-parser.c (c_parser_postfix_expression): Call
88 c_parser_cast_expression rather than c_parser_postfix_expression.
89
40e9ce2d 902016-03-01 Jakub Jelinek <jakub@redhat.com>
91
92 PR c/69796
93 PR c/69974
94 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
95 of incomplete decls to error_mark_node.
96
f0ea75d1 972016-02-24 Marek Polacek <polacek@redhat.com>
98
99 PR c/69819
100 * c-decl.c (finish_decl): Don't update the copy of the type of a
101 different decl type.
102
d41ab738 1032016-02-23 Jakub Jelinek <jakub@redhat.com>
104
105 PR objc/69844
106 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
107 in id_kind reclassification.
108
7675e968 1092016-02-16 Jakub Jelinek <jakub@redhat.com>
110
111 PR c/69835
112 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
113
28072426 1142016-02-16 James Norris <jnorris@codesourcery.com>
115
116 PR c/64748
117 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
118
74a4140f 1192016-02-12 Bernd Schmidt <bschmidt@redhat.com>
120
7c25ed5c 121 * c-decl.c (build_null_declspecs): Zero the entire struct.
122
74a4140f 123 PR c/69522
124 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
125 callers changed. If nested_p is true, use it to call
126 finish_implicit_inits.
127 * c-tree.h (finish_implicit_inits): Declare.
128 * c-typeck.c (finish_implicit_inits): New function. Move code
129 from ...
130 (push_init_level): ... here.
131 (set_designator, process_init_element): Call finish_implicit_inits.
132
40b38ace 1332016-02-11 Jakub Jelinek <jakub@redhat.com>
134
135 PR c/69768
136 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
137 arguments for -Waddress warning.
138
6b098e91 1392016-02-04 Jakub Jelinek <jakub@redhat.com>
140
141 PR c/69669
142 * c-decl.c (finish_enum): When honoring mode attribute,
143 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
144
ff5e28e9 1452016-01-29 Jakub Jelinek <jakub@redhat.com>
146
147 PR debug/69518
148 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
149 all type variants, not just TYPE_MAIN_VARIANT.
150
78e516eb 1512016-01-27 Jakub Jelinek <jakub@redhat.com>
152
153 PR debug/66869
154 * c-decl.c (c_write_global_declarations_1): Warn with
155 warn_unused_function if static prototype without definition
156 is not C_DECL_USED.
157
fee5e491 1582016-01-27 Marek Polacek <polacek@redhat.com>
159
160 PR c/68062
161 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
162 to unsigned, if needed. Add -Wsign-compare warning.
163
9bbfd060 1642016-01-26 Jakub Jelinek <jakub@redhat.com>
165
166 PR tree-optimization/69483
167 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
168
6ebc6587 1692016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16d4186f 170
171 PR c/24293
172 * c-tree.h (incomplete_record_decls): Declare.
173 * c-parser.c (incomplete_record_decls): Define.
174 (c_parser_translation_unit): Iterate through incomplete_record_decls and
175 report error if any decl has zero size.
176 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
177 or enum type to incomplete_record_decls.
178
4c39e3a5 1792016-01-14 Tom de Vries <tom@codesourcery.com>
180
181 PR tree-optimization/68773
182 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
183 set force_output.
184
77f35cec 1852016-01-14 Marek Polacek <polacek@redhat.com>
186
187 PR c/69262
188 * c-decl.c (grokdeclarator): Provide more information for invalid
189 array declarations.
190
d74214f3 1912016-01-06 David Malcolm <dmalcolm@redhat.com>
192
193 * c-parser.c (c_parser_unary_expression): For dereferences, build
194 a combined location before calling build_indirect_ref, so that
195 error reports cover the full range, manually updating the c_expr
196 src_range.
197
be3c9981 1982016-01-06 Marek Polacek <polacek@redhat.com>
199
200 PR sanitizer/69099
201 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
202 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
203 NULL.
204
f1717362 2052016-01-04 Jakub Jelinek <jakub@redhat.com>
206
207 Update copyright years.
208
d7d6a3ab 2092016-01-04 Marek Polacek <polacek@redhat.com>
210
211 PR c/68908
212 * c-typeck.c (build_atomic_assign): Improve commentary. Add
213 optimization to use __atomic_fetch_* built-in if possible.
214
9d5fd7c6 2152015-12-23 Thomas Schwinge <thomas@codesourcery.com>
216
217 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
218 into...
219 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
220 all users.
221
37e2d32f 2222015-12-22 Marek Polacek <polacek@redhat.com>
223
224 PR c/69002
225 * c-typeck.c (build_component_ref): Warn when acessing elements of
226 atomic structures or unions.
227
c0bf500c 2282015-12-21 David Malcolm <dmalcolm@redhat.com>
229
230 * c-typeck.c: Include "gcc-rich-location.h".
231 (build_binary_op): In the two places that call binary_op_error,
232 create a gcc_rich_location and populate it with the location of
233 the binary op and its two operands.
234
b9f9586a 2352015-12-16 David Malcolm <dmalcolm@redhat.com>
236
237 * c-parser.c (c_parser_statement_after_labels): When calling
238 c_finish_return, Use the return expression's location if it has
239 one, falling back to the location of the first token within it.
240 * c-typeck.c (c_finish_return): When issuing warnings about
241 the incorrect presence/absence of a return value, issue a note
242 showing the declaration of the function.
243
dbd79382 2442015-12-16 David Malcolm <dmalcolm@redhat.com>
245
246 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
247 to 4.
248 (c_parser_peek_nth_token): New function.
249 (c_parser_peek_conflict_marker): New function.
250 (c_parser_error): Detect conflict markers and report them as such.
251
e2093e02 2522015-12-16 David Malcolm <dmalcolm@redhat.com>
253
254 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
255 to preserve range information for the primary expression
256 in the call to c_parser_postfix_expression_after_primary.
257
b49f1fbb 2582015-12-16 David Malcolm <dmalcolm@redhat.com>
259
260 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
261 expression location, falling back on the first token location,
262 rather than always using the latter.
263
1d65bac2 2642015-12-16 Marek Polacek <polacek@redhat.com>
265
266 PR c/64637
267 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
268 available.
269
75e722a6 2702015-12-15 Marek Polacek <polacek@redhat.com>
271
272 PR c/68907
273 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
274 artificial decl.
275
7063d45b 2762015-12-08 David Malcolm <dmalcolm@redhat.com>
277
278 * c-parser.c (c_parser_alignof_expression): Capture location of
279 closing parenthesis (if any), or of end of unary expression, and
280 use it to build a src_range for the expression.
281
f73b4782 2822015-12-08 David Malcolm <dmalcolm@redhat.com>
283
284 PR c/68757
285 * c-parser.c (c_parser_get_builtin_args): Add
286 "out_close_paren_loc" param, and write back to it.
287 (c_parser_postfix_expression): Capture the closing
288 parenthesis location for RID_CHOOSE_EXPR,
289 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
290 RID_BUILTIN_SHUFFLE and use it to set the source range
291 for such expressions; within RID_BUILTIN_COMPLEX set
292 the underlying location.
293
1b062945 2942015-12-07 Marek Polacek <polacek@redhat.com>
295
296 PR c/68668
297 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
298 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
299
a4ab54ac 3002015-12-04 Eric Botcazou <ebotcazou@adacore.com>
301
302 * c-tree.h (c_build_va_arg): Adjust prototype.
303 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
304 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
305 parameter, adjust throughout and issue an error if EXPR is a component
306 with reverse storage order.
307
da562e32 3082015-12-02 Jason Merrill <jason@redhat.com>
309
310 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
311 (c_fully_fold_internal, decl_constant_value_for_optimization):
312 Move from c-common.c.
313 * c-tree.h: Declare decl_constant_value_for_optimization.
314 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
315
89f16034 3162015-12-02 Joseph Myers <joseph@codesourcery.com>
317
318 PR c/68162
319 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
320 following link from declarator to next declarator. Track original
321 qualified type and pass it to c_build_qualified_type.
322 * c-typeck.c (c_build_qualified_type): Add arguments
323 orig_qual_type and orig_qual_indirect.
324
2a7545d5 3252015-12-02 Thomas Schwinge <thomas@codesourcery.com>
326
327 * c-parser.c (c_parser_omp_clause_name)
328 (c_parser_oacc_all_clauses): Alphabetical sorting.
329
ad80582d 3302015-12-02 Jakub Jelinek <jakub@redhat.com>
331
332 PR c/68533
333 * c-decl.c (get_parm_info): Use b->locus instead of input_location
334 for diagnostics.
335
571b3486 3362015-12-01 Julian Brown <julian@codesourcery.com>
337 Cesar Philippidis <cesar@codesourcery.com>
338 James Norris <James_Norris@mentor.com>
339
340 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
341 (c_parser_oacc_clause_use_device): New function.
342 (c_parser_oacc_all_clauses): Add use_device support.
343 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
344 (c_parser_oacc_host_data): New function.
345 (c_parser_omp_construct): Add host_data support.
346 * c-tree.h (c_finish_oacc_host_data): Add prototype.
347 * c-typeck.c (c_finish_oacc_host_data): New function.
348 (c_finish_omp_clauses): Add use_device support.
349
c4848393 3502015-11-29 Jan Hubicka <hubicka@ucw.cz>
351
352 PR c/67106
353 * c-decl.c: Set TYPE_PACKED in variants.
354
d4e328e9 3552015-11-27 Martin Liska <mliska@suse.cz>
356
357 PR c++/68312
358 * c-array-notation.c (fix_builtin_array_notation_fn):
359 Use release_vec_vec instead of vec::release.
360 (build_array_notation_expr): Likewise.
361 (fix_conditional_array_notations_1): Likewise.
362 (fix_array_notation_expr): Likewise.
363 (fix_array_notation_call_expr): Likewise.
364
c5e4f591 3652015-11-27 Jakub Jelinek <jakub@redhat.com>
366
367 PR c/63326
368 * c-parser.c (c_parser_compound_statement_nostart): If
369 last_label is true, use pragma_stmt instead of pragma_compound
370 as second c_parser_pragma argument.
371 (c_parser_omp_ordered, c_parser_omp_target_update,
372 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
373 false as second argument to c_parser_skip_to_pragma_eol after
374 diagnosing standalone directives used in pragma_stmt context.
375
c954a5bd 3762015-11-24 Ilya Verbin <ilya.verbin@intel.com>
377
378 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
379 with "if (ENABLE_OFFLOADING)".
380
daebf4f3 3812015-11-23 David Malcolm <dmalcolm@redhat.com>
382
383 PR objc/68438
384 * c-parser.c (c_parser_postfix_expression): Set up source ranges
385 for various Objective-C constructs: Class.name syntax,
386 @selector(), @protocol(), @encode(), and [] message syntax.
387
734caf84 3882015-11-20 David Malcolm <dmalcolm@redhat.com>
389
390 PR 62314
391 * c-typeck.c (should_suggest_deref_p): New function.
392 (build_component_ref): Special-case POINTER_TYPE when
393 generating a "not a structure of union" error message, and
394 suggest a "->" rather than a ".", providing a fix-it hint.
395
11d8dd6f 3962015-11-19 David Malcolm <dmalcolm@redhat.com>
397
398 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
399 candidate into a new function, find_closest_identifier.
400
62efaf6b 4012015-11-19 Marek Polacek <polacek@redhat.com>
402
403 PR c/68412
404 * c-typeck.c (parser_build_binary_op): Properly handle
405 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
406
9dfffd6d 4072015-11-17 David Malcolm <dmalcolm@redhat.com>
408
409 * c-parser.c (set_c_expr_source_range): Bulletproof both
410 overloaded implementations against NULL expr->value.
411 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
412 values.
413 (c_parser_unary_expression): Likewise when handling addresses of
414 labels.
415 (c_parser_postfix_expression): Likewise for statement expressions,
416 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
417 __builtin_va_arg, and for __builtin_offset_of.
418 (c_parser_postfix_expression_after_paren_type): Initialize expr's
419 src_range using the range of the braced initializer.
420 (c_parser_transaction_expression): Set src_range for "ret" to a
421 sane pair of values.
422
c58a4cfd 4232015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
424
425 * c-parser.c (c_finish_omp_declare_simd): Look for
426 "simd" attribute as well. Update error message.
427
5f3001a9 4282015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
429
430 * c-parser.c (c_parser_omp_declare_target): Adjust.
431
a9833286 4322015-11-14 Jakub Jelinek <jakub@redhat.com>
433
434 * c-typeck.c (c_finish_omp_clauses): Don't mark
435 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
436
ef61516b 4372015-11-14 Marek Polacek <polacek@redhat.com>
438
439 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
440 * c-typeck.c: Likewise.
441
a96cefb2 4422015-11-13 David Malcolm <dmalcolm@redhat.com>
443
444 * c-decl.c (warn_defaults_to): Pass line_table to
445 rich_location ctor.
446 * c-errors.c (pedwarn_c99): Likewise.
447 (pedwarn_c90): Likewise.
448 * c-parser.c (set_c_expr_source_range): New functions.
449 (c_token::get_range): New method.
450 (c_token::get_finish): New method.
451 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
452 based on the range from the start of the LHS to the end of the
453 RHS.
454 (c_parser_conditional_expression): Likewise, based on the range
455 from the start of the cond.value to the end of exp2.value.
456 (c_parser_binary_expression): Call set_c_expr_source_range on
457 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
458 (c_parser_cast_expression): Call set_c_expr_source_range on ret
459 based on the cast_loc through to the end of the expr.
460 (c_parser_unary_expression): Likewise, based on the
461 op_loc through to the end of op.
462 (c_parser_sizeof_expression) Likewise, based on the start of the
463 sizeof token through to either the closing paren or the end of
464 expr.
465 (c_parser_postfix_expression): Likewise, using the token range,
466 or from the open paren through to the close paren for
467 parenthesized expressions.
468 (c_parser_postfix_expression_after_primary): Likewise, for
469 various kinds of expression.
470 * c-tree.h (struct c_expr): Add field "src_range".
471 (c_expr::get_start): New method.
472 (c_expr::get_finish): New method.
473 (set_c_expr_source_range): New decls.
474 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
475 on ret for prefix unary ops.
476 (parser_build_binary_op): Likewise, running from the start of
477 arg1.value through to the end of arg2.value.
478
7a810b2f 4792015-11-13 Marek Polacek <polacek@redhat.com>
480
481 PR c/68320
482 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
483
b67f0560 4842015-11-13 David Malcolm <dmalcolm@redhat.com>
485
486 * c-typeck.c: Include spellcheck.h.
487 (lookup_field_fuzzy_find_candidates): New function.
488 (lookup_field_fuzzy): New function.
489 (build_component_ref): If the field was not found, try using
490 lookup_field_fuzzy and potentially offer a suggestion.
491
2fc5e987 4922015-11-12 James Norris <jnorris@codesourcery.com>
493 Joseph Myers <joseph@codesourcery.com>
494
495 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
496 (c_parser_omp_clause_name): Handle 'device_resident' clause.
497 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
498 and PRAGMA_OMP_CLAUSE_LINK.
499 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
500 and PRAGMA_OACC_CLAUSE_LINK.
501 (OACC_DECLARE_CLAUSE_MASK): New definition.
502 (c_parser_oacc_declare): New function.
503
28a70e29 5042015-11-12 Marek Polacek <polacek@redhat.com>
505
506 PR c/67784
507 * c-parser.c (c_parser_for_statement): Reclassify the token in
508 a correct scope.
509
81b1b2a8 5102015-11-11 Marek Polacek <polacek@redhat.com>
511
512 PR c/68107
513 PR c++/68266
514 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
515 checking the size of an array.
516
6e803544 5172015-11-11 Andrew MacLeod <amacleod@redhat.com>
518
519 * c-array-notation.c: Remove unused header files.
520 * c-aux-info.c: Likewise.
521 * c-convert.c: Likewise.
522 * c-decl.c: Likewise.
523 * c-errors.c: Likewise.
524 * c-lang.c: Likewise.
525 * c-objc-common.c: Likewise.
526 * c-parser.c: Likewise.
527 * c-typeck.c: Likewise.
528 * gccspec.c: Likewise.
529
a1b7fe4b 5302015-11-09 Thomas Schwinge <thomas@codesourcery.com>
531 Cesar Philippidis <cesar@codesourcery.com>
532 James Norris <jnorris@codesourcery.com>
533 Julian Brown <julian@codesourcery.com>
534 Nathan Sidwell <nathan@codesourcery.com>
535
536 c/
537 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
538 routine arg.
539 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
540 (c_parser_pragma): Parse 'acc routine'.
541 (OACC_ROUTINE_CLAUSE_MARK): Define.
542 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
543
7758d608 5442015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
545
546 PR debug/67192
547 * c-typeck.c (c_finish_loop): For unconditional loops, set the
548 location of the backward-goto to the start of the loop body.
549
c2bf2fb2 5502015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
551
552 PR debug/67192
553 * c-parser.c (c_parser_while_statement): Finish the loop before
554 parsing ahead for misleading indentation.
555 (c_parser_for_statement): Likewise.
556
292237f3 5572015-11-08 Eric Botcazou <ebotcazou@adacore.com>
558
559 * c-decl.c (finish_struct): If the structure has reverse storage
560 order, rewrite the type of array fields with scalar component. Call
561 maybe_apply_pragma_scalar_storage_order on entry.
562 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
563 errors on bit-fields and reverse SSO here and not...
564 (c_mark_addressable): ...here.
565 (output_init_element): Adjust call to initializer_constant_valid_p.
566 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
567
f0479000 5682015-11-06 David Malcolm <dmalcolm@redhat.com>
569
570 * c-decl.c (warn_defaults_to): Update for change in signature
571 of diagnostic_set_info.
572 * c-errors.c (pedwarn_c99): Likewise.
573 (pedwarn_c90): Likewise.
574 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
575 for textinfo::set_location.
576
ef014f95 5772015-11-05 Cesar Philippidis <cesar@codesourcery.com>
578 Thomas Schwinge <thomas@codesourcery.com>
579 James Norris <jnorris@codesourcery.com>
580
581 * c-parser.c (c_parser_omp_clause_name): Add support for
582 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
583 (c_parser_omp_clause_default): Add is_oacc argument. Handle
584 default(none) in OpenACC.
585 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
586 arguments.
587 (c_parser_oacc_clause_tile): New function.
588 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
589 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
590 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
591 TILE}.
592 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
593 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
594 FIRSTPRIVATE}.
595 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
596 (c_parser_oacc_update): Update the error message for missing clauses.
597 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
598 and OMP_CLAUSE_INDEPENDENT.
599
f480ca9a 6002015-11-05 Marek Polacek <polacek@redhat.com>
601
602 PR c/68090
603 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
604 deal with pre-evaluation on invalid types.
605
9561765e 6062015-11-05 Jakub Jelinek <jakub@redhat.com>
607 Ilya Verbin <ilya.verbin@intel.com>
608
609 * c-parser.c: Include context.h and gimple-expr.h.
610 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
611 monotonic together with nonmonotonic.
612 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
613 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
614 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
615 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
616 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
617 expressions on combined target teams before the target.
618 (c_parser_omp_declare_target): If decl has "omp declare target" or
619 "omp declare target link" attribute, and cgraph or varpool node already
620 exists, then set corresponding flags. Call c_finish_omp_clauses
621 in the parenthesized extended-list syntax case.
622 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
623 declare target.
624 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
625 on OMP_CLAUSE_REDUCTION array sections.
626 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
627 into the constant offset, or for variable low-bound using
628 POINTER_PLUS_EXPR. For structure element based array sections use
629 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
630 (c_finish_omp_clauses): Drop generic_field_head, structure
631 elements are now always mapped even as array section bases,
632 diagnose same var in data sharing and mapping clauses. Diagnose if
633 linear step on declare simd is neither a constant nor a uniform
634 parameter. Look through POINTER_PLUS_EXPR for array section
635 reductions. Diagnose the same var or function appearing multiple
636 times on the same directive. Fix up wording for the to clause if t
637 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
638 modifier on kinds other than dynamic or guided or nonmonotonic
639 modifier together with ordered clause.
640
9e10bfb7 6412015-11-03 Thomas Schwinge <thomas@codesourcery.com>
642 Chung-Lin Tang <cltang@codesourcery.com>
643
644 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
645
4cba6f60 6462015-10-29 Andrew MacLeod <amacleod@redhat.com>
647
648 * c-array-notation.c: Reorder #include's and remove duplicates.
649 * c-aux-info.c: Likewise.
650 * c-convert.c: Likewise.
651 * c-decl.c: Likewise.
652 * c-errors.c: Likewise.
653 * c-lang.c: Likewise.
654 * c-objc-common.c: Likewise.
655 * c-parser.c: Likewise.
656 * c-typeck.c: Likewise.
657
7b15d957 6582015-10-26 Jim Wilson <jim.wilson@linaro.org>
659
660 PR debug/66068
661 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
662 after calling build_qualified_type.
663
62c48328 6642015-10-27 Cesar Philippidis <cesar@codesourcery.com>
665 Thomas Schwinge <thomas@codesourcery.com>
666 James Norris <jnorris@codesourcery.com>
667 Joseph Myers <joseph@codesourcery.com>
668 Julian Brown <julian@codesourcery.com>
669 Bernd Schmidt <bschmidt@redhat.com>
670
671 * c-parser.c (c_parser_oacc_shape_clause): New.
672 (c_parser_oacc_simple_clause): New.
673 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
674 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
675
2c4c8725 6762015-10-27 Thomas Schwinge <thomas@codesourcery.com>
677 James Norris <jnorris@codesourcery.com>
678 Cesar Philippidis <cesar@codesourcery.com>
679
680 PR c/64765
681 PR c/64880
682 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
683 parameters, and handle these. Adjust all users.
684 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
685 into...
686 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
687 all users.
688 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
689 declare functions.
690 (c_finish_omp_construct): Declare function.
691 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
692 Merge functions into...
693 (c_finish_omp_construct): ... this new function.
694
844cece0 6952015-10-22 Richard Biener <rguenther@suse.de>
696
697 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
698 before folding a MINUS_EXPR.
699
5ce1b137 7002015-10-21 Marek Polacek <polacek@redhat.com>
701
702 PR c/68024
703 * c-decl.c (start_function): Warn about vararg functions without
704 a prototype.
705
1f137e6d 7062015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
707
708 * c-typeck.c (build_conditional_expr): Use boolean vector
709 type for vector comparison.
710 (build_vec_cmp): New.
711 (build_binary_op): Use build_vec_cmp for comparison.
712
8523243e 7132015-10-20 Marek Polacek <polacek@redhat.com>
714
715 * c-parser.c (is_cilkplus_vector_p): Don't define here.
716
3f73be3e 7172015-10-20 Marek Polacek <polacek@redhat.com>
718
719 PR c/67964
720 * c-parser.c (c_parser_attributes): Break out of the loop if the
721 token after an attribute isn't a comma.
722
43895be5 7232015-10-13 Jakub Jelinek <jakub@redhat.com>
724 Aldy Hernandez <aldyh@redhat.com>
725
726 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
727 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
728 (c_parser_omp_variable_list): Handle structure elements for
729 map, to and from clauses. Handle array sections in reduction
730 clause. Formatting fixes.
731 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
732 if clause modifiers.
733 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
734 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
735 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
736 c_parser_omp_clause_is_device_ptr): New functions.
737 (c_parser_omp_clause_ordered): Parse optional parameter.
738 (c_parser_omp_clause_reduction): Handle array reductions.
739 (c_parser_omp_clause_schedule): Parse optional simd modifier.
740 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
741 functions.
742 (c_parser_omp_clause_linear): Parse linear clause modifiers.
743 (c_parser_omp_clause_depend_sink): New function.
744 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
745 (c_parser_omp_clause_map): Parse release/delete map kinds and
746 optional always modifier.
747 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
748 and c_finish_omp_clauses callers.
749 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
750 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
751 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
752 (OMP_CRITICAL_CLAUSE_MASK): Define.
753 (c_parser_omp_critical): Parse critical clauses.
754 (c_parser_omp_for_loop): Handle doacross loops, adjust
755 c_finish_omp_for and c_finish_omp_clauses callers.
756 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
757 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
758 (OMP_FOR_CLAUSE_MASK): Add linear clause.
759 (c_parser_omp_for): Disallow ordered clause when combined with
760 distribute. Disallow linear clause when combined with distribute
761 and not combined with simd.
762 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
763 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
764 parse clauses and if depend clause is found, don't parse a body.
765 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
766 Allow target parallel without for after it.
767 (OMP_TASK_CLAUSE_MASK): Add priority clause.
768 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
769 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
770 invalid kinds.
771 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
772 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
773 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
774 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
775 functions.
776 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
777 defaultmap and is_device_ptr clauses.
778 (c_parser_omp_target): Parse target parallel and target simd. Set
779 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
780 and target exit data. Diagnose invalid map kinds.
781 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
782 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
783 construct.
784 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
785 &omp_priv.
786 (OMP_TASKLOOP_CLAUSE_MASK): Define.
787 (c_parser_omp_taskloop): New function.
788 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
789 handle PRAGMA_OMP_TASKLOOP.
790 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
791 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
792 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
793 Add IS_OMP argument, handle structure element bases, diagnose
794 bitfields, pass IS_OMP recursively, diagnose known zero length
795 array sections in depend clauses, handle array sections in reduction
796 clause, diagnose negative length even for pointers.
797 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
798 types, pass IS_OMP down to handle_omp_array_sections_1, handle
799 array sections in reduction clause, set
800 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
801 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
802 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
803 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
804
789fbb51 8052015-10-06 Marek Polacek <polacek@redhat.com>
806
807 * c-parser.c (c_parser_statement_after_labels): Use
808 protected_set_expr_location.
809 (c_parser_omp_clause_num_gangs): Likewise.
810 (c_parser_omp_clause_num_threads): Likewise.
811 (c_parser_omp_clause_num_workers): Likewise.
812 (c_parser_omp_clause_vector_length): Likewise.
813 (c_parser_omp_clause_num_teams): Likewise.
814 (c_parser_omp_clause_thread_limit): Likewise.
815 * c-typeck.c (build_c_cast): Likewise.
816 (c_cast_expr): Likewise.
817
20cb53c9 8182015-10-05 Richard Sandiford <richard.sandiford@arm.com>
819
820 * c-typeck.c (c_tree_equal): Use real_equal instead of
821 REAL_VALUES_EQUAL.
822
6d02e6b2 8232015-10-04 Jason Merrill <jason@redhat.com>
824
825 * c-parser.c (c_lex_one_token): Handle @synchronized.
826 * c-decl.c (match_builtin_function_types): A declaration of a built-in
827 can change whether the function is transaction_safe.
828
802c32cd 8292015-10-02 Marek Polacek <polacek@redhat.com>
830
831 PR c/67730
832 * c-typeck.c (convert_for_assignment): Use the expansion point
833 location throughout.
834
ef17a71a 8352015-10-02 Marek Polacek <polacek@redhat.com>
836
837 PR c/64249
838 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
839 and pass it down to c_parser_if_statement.
840 (c_parser_else_body): Add CHAIN parameter and pass it down to
841 c_parser_statement_after_labels.
842 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
843 duplicated if-else-if conditions.
844
7e93eb1a 8452015-10-01 Marek Polacek <polacek@redhat.com>
846
847 * c-typeck.c (convert_for_assignment): Improve commentary.
848
ab4c803c 8492015-09-30 Marek Polacek <polacek@redhat.com>
850
851 PR c/67730
852 * c-typeck.c (c_finish_return): Use the expansion point location for
853 certain "return with value" warnings.
854
ed536208 8552015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
856
857 * c-parser.c (pragma_lex): Add loc argument.
858
03e8b174 8592015-09-15 Marek Polacek <polacek@redhat.com>
860
861 PR c/67580
862 * c-decl.c (tag_exists_p): New function.
863 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
864 struct/union/enum keywords are missing.
865 * c-tree.h (tag_exists_p): Declare.
866
a39b4dc0 8672015-09-15 Marek Polacek <polacek@redhat.com>
868
869 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
870 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
871 Return NULL_TREE instead of 0.
872 (lookup_name): Return NULL_TREE instead of 0.
873 (lookup_name_in_scope): Likewise.
874 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
875 (parser_xref_tag): Use false instead of 0.
876 (start_struct): Use true instead of 1.
877 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
878
85f5e2ee 8792015-09-14 Marek Polacek <polacek@redhat.com>
880
881 * c-typeck.c (set_nonincremental_init_from_string): Use
882 HOST_WIDE_INT_M1U when shifting a negative value.
883
739237d5 8842015-09-09 Mark Wielaard <mjw@redhat.com>
885
886 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
887 parm against NULL.
888
d2b2788c 8892015-09-10 Jakub Jelinek <jakub@redhat.com>
890
891 PR c/67502
892 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
893 into OMP_FOR_PRE_BODY rather than before the loop.
894
deef87db 8952015-09-09 Jakub Jelinek <jakub@redhat.com>
896
c43f93d7 897 PR c/67501
898 * c-parser.c (c_parser_oacc_all_clauses,
899 c_parser_omp_all_clauses): Remove invalid clause from
900 list of clauses even if parser->error is set.
901
0fdcfb93 902 PR c/67500
903 * c-parser.c (c_parser_omp_clause_aligned,
904 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
905 test for errors.
906 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
907 error_mark_node.
908
deef87db 909 PR c/67495
910 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
911 instead of c_parser_unary_expression. If the result is !lvalue_p,
912 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
913
e96292e9 9142015-09-04 Marek Polacek <polacek@redhat.com>
915
916 PR sanitizer/67279
917 * c-typeck.c (build_binary_op): Don't instrument static initializers.
918
547c6b1f 9192015-09-03 Martin Sebor <msebor@redhat.com>
920
921 PR c/66516
6ccd7236 922 * c-typeck.c (convert_arguments, parser_build_unary_op,
923 build_conditional_expr, c_cast_expr, convert_for_assignment,
924 build_binary_op, _objc_common_truthvalue_conversion): Call
547c6b1f 925 reject_gcc_builtin.
926 (c_decl_implicit): Define.
927
bd66724c 9282015-09-02 Marek Polacek <polacek@redhat.com>
929
930 PR c/67432
931 * c-parser.c (c_parser_enum_specifier): Give a better error for
932 an empty enum.
933
6dc50383 9342015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
935
936 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
937
7ad1d78d 9382015-08-12 Marek Polacek <polacek@redhat.com>
939
940 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
941 LOC to it.
942
c9099388 9432015-08-03 Marek Polacek <polacek@redhat.com>
944
945 PR c/67088
946 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
947 Use it.
948 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
949
9255be07 9502015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
951
952 * c-parser.c (c_parser_if_body): Take token_indent_info
953 argument. Call warn_for_misleading_indentation even when the
954 body is a semicolon. Extract token_indent_infos corresponding
955 to the guard, body and next tokens. Adjust call to
956 warn_for_misleading_indentation accordingly.
957 (c_parser_else_body): Likewise.
958 (c_parser_if_statement): Likewise.
959 (c_parser_while_statement): Likewise.
960 (c_parser_for_statement): Likewise.
961
dbbd4c6d 9622015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
963 Manuel López-Ibáñez <manu@gcc.gnu.org>
964
965 * c-decl.c (get_parm_info): Remove static var. Update warning
966 message.
967
6784a472 9682015-07-27 Marek Polacek <polacek@redhat.com>
969
970 PR c++/66555
971 PR c/54979
972 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
973
8d669e79 9742015-07-20 Marek Polacek <polacek@redhat.com>
975
976 PR c++/55095
977 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
978 (build_binary_op): Warn about left shift overflows.
979
1eacc14a 9802015-07-09 Andrew MacLeod <amacleod@redhat.com>
981
982 * c-array-notation.c: Adjust includes for flags.h changes.
983 * c-objc-common.c: Likewise.
984
9ef16211 9852015-07-07 Andrew MacLeod <amacleod@redhat.com>
986
987 * c-array-notation.c: Adjust includes.
988 * c-aux-info.c: Likewise.
989 * c-convert.c: Likewise.
990 * c-decl.c: Likewise.
991 * c-errors.c: Likewise.
992 * c-lang.c: Likewise.
993 * c-objc-common.c: Likewise.
994 * c-parser.c: Likewise.
995 * c-typeck.c: Likewise.
996
0949f227 9972015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
998
999 PR fortran/66605
1000 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1001
be23b16f 10022015-06-29 Marek Polacek <polacek@redhat.com>
1003
1004 PR c/66322
1005 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1006 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1007 about -Wswitch-bool here.
1008 (do_case): Update c_add_case_label call.
1009 (c_finish_case): Update c_do_switch_warnings call.
1010
6290f0db 10112015-06-27 Marek Polacek <polacek@redhat.com>
1012
1013 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1014
aa3e402e 10152015-06-26 Marek Polacek <polacek@redhat.com>
1016
1017 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1018 INDIRECT_REF_P.
1019 * c-typeck.c (array_to_pointer_conversion): Likewise.
1020 (build_unary_op): Likewise.
1021 (c_finish_return): Likewise.
1022
ec2e0095 10232015-06-25 Andrew MacLeod <amacleod@redhat.com>
1024
1025 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1026 * c-parser.c: Likewise.
1027
770ff93b 10282015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1029
1030 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1031 instead of pointer_hash.
1032 (detect_field_duplicates): Likewise.
1033
f48c7f4a 10342015-06-25 Marek Polacek <polacek@redhat.com>
1035
1036 * c-array-notation.c: Use VAR_P throughout.
1037 * c-decl.c: Likewise.
1038 * c-objc-common.c: Likewise.
1039 * c-parser.c: Likewise.
1040 * c-typeck.c: Likewise.
1041
ce41e81a 10422015-06-25 Marek Polacek <polacek@redhat.com>
1043
1044 * c-decl.c: Use is_global_var throughout.
1045 * c-parser.c: Likewise.
1046 * c-typeck.c: Likewise.
1047
f2ab3bac 10482015-06-17 Andrew MacLeod <amacleod@redhat.com>
1049
1050 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1051 * c-aux-info.c: Likewise.
1052 * c-convert.c: Likewise.
1053 * c-decl.c: Likewise.
1054 * c-errors.c: Likewise.
1055 * c-lang.c: Likewise.
1056 * c-objc-common.c: Likewise.
1057 * c-parser.c: Likewise.
1058 * c-typeck.c: Likewise.
1059
647730ab 10602015-06-11 Jan Hubicka <hubicka@ucw.cz>
1061
1062 PR middle-end/66325
1063 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1064 variants.
1065
dd4b0a0d 10662015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1067
1068 * c-decl.c (pop_scope): Register the main translation unit
1069 through the new debug hook.
1070
64486212 10712015-06-08 Andrew MacLeod <amacleod@redhat.com>
1072
1073 * c-array-notation.c : Adjust include files.
1074 * c-aux-info.c : Likewise.
1075 * c-convert.c : Likewise.
1076 * c-decl.c : Likewise.
1077 * c-errors.c : Likewise.
1078 * c-lang.c : Likewise.
1079 * c-lang.h : Likewise.
1080 * c-objc-common.c : Likewise.
1081 * c-parser.c : Likewise.
1082 * c-typeck.c : Likewise.
1083
3a1c9df2 10842015-06-05 Aldy Hernandez <aldyh@redhat.com>
1085
1086 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1087 immediately clobber it.
1088 (c_write_global_declarations_1): Remove call to
1089 check_global_declaration_1.
1090 (c_write_global_declarations_2): Remove.
1091 (c_write_final_cleanups): Rename from c_write_global_declarations.
1092 Remove call to finalize_compilation_unit.
1093 Remove calls to debugging hooks.
1094 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1095 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1096 * c-tree.h: Remove c_write_global_declarations.
1097
f77c0292 10982015-06-04 Andrew MacLeod <amacleod@redhat.com>
1099
1100 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1101 * c-aux-info.c: Likewise.
1102 * c-convert.c: Likewise.
1103 * c-decl.c: Likewise.
1104 * c-errors.c: Likewise.
1105 * c-lang.c: Likewise.
1106 * c-objc-common.c: Likewise.
1107 * c-parser.c: Likewise.
1108 * c-typeck.c: Likewise.
1109
b44134dc 11102015-06-04 Marek Polacek <polacek@redhat.com>
1111
1112 PR c/66341
1113 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1114 it is a lvalue.
1115
d1df0bfc 11162015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1117
1118 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1119 Warn for empty struct.
1120 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1121
f8363c5d 11222015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1123
1124 * c-decl.c (start_function): Call plugin before parsing.
1125 (finish_function): Call plugin after parsing.
1126
5b9761f5 11272015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1128
1129 PR c/49551
1130 * c-decl.c (merge_decls): Merge DECL_COMMON.
1131
eeec71b4 11322015-05-22 Jim Wilson <jim.wilson@linaro.org>
1133
1134 * Make-lang.in (check_gcc_pallelize): Define.
1135
5a4c69dd 11362015-05-22 Marek Polacek <polacek@redhat.com>
1137
1138 PR c/47043
1139 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1140 attributes.
1141
5650b4ff 11422015-05-21 Marek Polacek <polacek@redhat.com>
1143
1144 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1145 DECL_BUILT_IN.
1146
b443c459 11472015-05-20 Marek Polacek <polacek@redhat.com>
1148
1149 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1150 * c-typeck.c: Likewise.
1151
9e73638f 11522015-05-19 Marek Polacek <polacek@redhat.com>
1153
1154 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1155
d7729e26 11562015-05-19 Jakub Jelinek <jakub@redhat.com>
1157
1158 PR middle-end/66199
1159 * c-parser.c (c_parser_omp_for_loop): Don't add
1160 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1161 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1162 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1163 constructs.
1164
dfcf26a5 11652015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1166
1167 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
9e73638f 1168 swaps.
dfcf26a5 1169
09172322 11702015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1171
1172 PR fortran/44054
1173 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1174 accessor function.
1175
aac24642 11762015-05-14 Marek Polacek <polacek@redhat.com>
1177
1178 PR c/66066
1179 PR c/66127
1180 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1181 rather than with 0.
1182
e5f01cba 11832015-05-12 David Malcolm <dmalcolm@redhat.com>
1184
1185 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1186 to add a call to warn_for_misleading_indentation.
1187 (c_parser_else_body): Likewise, adding param "else_loc".
1188 (c_parser_if_statement): Check for misleading indentation.
1189 (c_parser_while_statement): Likewise.
1190 (c_parser_for_statement): Likewise.
1191
dc5945dc 11922015-05-08 Marek Polacek <polacek@redhat.com>
1193
1194 PR c/64918
1195 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1196 (output_init_element): Likewise.
1197
cdc64059 11982015-05-07 Marek Polacek <polacek@redhat.com>
1199
1200 PR c/65179
1201 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1202 value.
1203
6fa7118e 12042015-04-30 Marek Polacek <polacek@redhat.com>
1205
1206 * c-typeck.c (set_init_label): Call error_at instead of error and
1207 pass LOC to it.
1208
98f44804 1209 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1210 the type of a decl.
1211
2cd7caae 1212 * c-typeck.c (c_build_va_arg): Clarify the error message.
1213
95cfd391 12142015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1215
1216 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1217 OMP_STANDALONE_CLAUSES.
1218
e65e39f8 12192015-04-28 Marek Polacek <polacek@redhat.com>
1220
1221 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1222
5580bf42 12232015-04-28 Marek Polacek <polacek@redhat.com>
1224
1225 PR c/65901
1226 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1227
c3468fc2 12282015-04-25 Marek Polacek <polacek@redhat.com>
1229
1230 PR c/52085
1231 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1232 attribute.
1233
0cd6b1b4 12342015-04-23 Marek Polacek <polacek@redhat.com>
1235
1236 PR c/65345
1237 * c-decl.c (set_labels_context_r): New function.
1238 (store_parm_decls): Call it via walk_tree_without_duplicates.
1239 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1240 instead of create_tmp_var. Build TARGET_EXPR instead of
1241 COMPOUND_EXPR.
1242 (build_atomic_assign): Use create_tmp_var_raw instead of
1243 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1244
05a827ce 12452015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1246
1247 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1248 (c_parser_omp_target_update): Add missed %> to error_at ().
1249
de801c28 12502015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1251
1252 PR target/55143
1253 * c-decl.c (c_default_pointer_mode): Remove definition.
1254 * c-tree.h (c_default_pointer_mode): Remove declaration.
1255
c3b1dca4 12562015-03-27 Tobias Burnus <burnus@net-b.de>
1257
1258 PR c/65586
1259 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1260 error out.
1261 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1262 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1263 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1264
1443772f 12652015-03-19 Jakub Jelinek <jakub@redhat.com>
1266
1267 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1268 attribute for DECL_EXTERNAL VAR_DECLs.
1269
76738f56 12702015-03-11 Jakub Jelinek <jakub@redhat.com>
1271
1272 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1273 argument.
1274
16f958b3 12752015-03-10 Jakub Jelinek <jakub@redhat.com>
1276
1277 PR c/65120
1278 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1279 before preparing arguments to warn_logical_not_parentheses.
1280
6054103a 12812015-03-09 Jakub Jelinek <jakub@redhat.com>
1282
1283 PR c/65120
1284 * c-typeck.c (parser_build_binary_op): Don't warn for
1285 !!x == y or !b == y where b is _Bool.
1286
de3a1e03 12872015-03-09 Marek Polacek <polacek@redhat.com>
1288
1289 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1290 * c-decl.c (grokdeclarator): Likewise.
1291 * c-typeck.c (build_binary_op): Likewise.
1292
084e6bf0 12932015-02-27 Marek Polacek <polacek@redhat.com>
1294
1295 PR c/65228
1296 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1297
4d7c4134 12982015-02-14 Marek Polacek <polacek@redhat.com>
1299
1300 PR c/64768
1301 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1302 declared through a typedef name.
1303
b1380826 13042015-02-13 Marek Polacek <polacek@redhat.com>
1305
1306 PR c/65050
1307 * c-decl.c (grokdeclarator): Print also the type when giving
1308 the error message about array's incomplete element type.
1309
35ff54b5 13102015-02-11 Jakub Jelinek <jakub@redhat.com>
1311
1312 PR c/64824
1313 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1314 check in the POP macro.
1315
46861609 13162015-02-09 Marek Polacek <polacek@redhat.com>
1317
1318 PR c/64856
1319 * c-typeck.c (process_init_element): Don't always wrap
1320 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1321 initializing a range of elements.
1322
bbf8fbec 13232015-02-04 Jakub Jelinek <jakub@redhat.com>
1324
1325 PR c/64824
1326 PR c/64868
1327 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1328
46861609 13292015-02-02 Bruno Loff <bruno.loff@gmail.com>
1f0ce3ac 1330
1331 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1332 processing enum declaration.
1333
70279be9 13342015-01-29 Marek Polacek <polacek@redhat.com>
1335
1336 PR c/64709
1337 * c-typeck.c (pop_init_level): If constructor_elements has
1338 exactly one element with integer_zerop value, set constructor_zeroinit
1339 to 1. Remove braces around warning_init call.
1340
591970b4 13412015-01-27 Jakub Jelinek <jakub@redhat.com>
1342
1343 PR c/64766
1344 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1345 of FUNCTION_DECLs with error_mark_node.
1346
87778dc4 13472015-01-26 Jakub Jelinek <jakub@redhat.com>
1348
1349 PR c/64778
1350 * c-typeck.c (convert_arguments): Return -1 if there are
1351 error_args, even if we've diagnosed too many arguments.
1352
cffdfb3d 13532015-01-21 Richard Biener <rguenther@suse.de>
1354
1355 PR middle-end/64313
1356 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1357 for builtins the user declared correctly.
1358
ca4c3545 13592015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1360 Bernd Schmidt <bernds@codesourcery.com>
1361 Cesar Philippidis <cesar@codesourcery.com>
1362 James Norris <jnorris@codesourcery.com>
1363 Jakub Jelinek <jakub@redhat.com>
1364 Ilmir Usmanov <i.usmanov@samsung.com>
1365
1366 * c-parser.c: Include "gomp-constants.h".
1367 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1368 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1369 Use OMP_CLAUSE_SET_MAP_KIND.
1370 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1371 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1372 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1373 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1374 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1375 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1376 "copyout", "create", "delete", "deviceptr", "gang", "host",
1377 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1378 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1379 "present_or_create", "pcreate", "seq", "self", "vector",
1380 "vector_length", "wait", "worker".
1381 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1382 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1383 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1384 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1385 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1386 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1387 (c_parser_oacc_data_clause_deviceptr)
1388 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1389 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1390 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1391 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1392 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1393 (c_parser_oacc_parallel, c_parser_oacc_update)
1394 (c_parser_oacc_wait): New functions.
1395 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1396 (c_finish_oacc_data): New prototypes.
1397 * c-typeck.c: Include "gomp-constants.h".
1398 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1399 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1400 OMP_CLAUSE_SET_MAP_KIND.
1401 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1402 (c_finish_oacc_data): New functions.
1403 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1404 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1405 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1406 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1407 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1408 GOMP_MAP_FORCE_DEVICEPTR.
1409
1f78217c 14102015-01-09 Michael Collison <michael.collison@linaro.org>
1411
1412 * c-array-notation.c: Include hash-set.h, machmode.h,
1413 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1414 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1415 * c-aux-info.c: Ditto.
1416 * c-convert.c: Ditto.
1417 * c-decl.c: Ditto.
1418 * c-errors.c: Ditto.
1419 * c-lang.c: Dittoxs.
1420 * c-objc-common.c: Ditto.
1421 * c-parser.c: Ditto.
1422 * c-typeck.c: Include hash-set.h, machmode.h,
1423 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1424 fold-const.h, wide-int.h, inchash.h, real.h and
1425 fixed-value.h due to flattening of tree.h.
1426
15e18a8c 14272015-01-07 Marek Polacek <polacek@redhat.com>
1428
1429 PR c/64417
1430 * c-typeck.c (process_init_element): Disallow initialization of
1431 a flexible array member with a string constant if the structure
1432 is in an array.
1433
d353bf18 14342015-01-05 Jakub Jelinek <jakub@redhat.com>
1435
823a9dd4 1436 PR sanitizer/64344
1437 * c-typeck.c (convert_for_assignment, c_finish_return): For
1438 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1439 types also set in_late_binary_op around convert call.
1440 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1441 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1442 result on expr as last argument to ubsan_instrument_float_cast,
1443 if in_late_binary_op, don't use c_save_expr but save_expr.
1444
d353bf18 1445 Update copyright years.
1446
92b63884 14472015-01-05 Marek Polacek <polacek@redhat.com>
1448
1449 PR c/64423
1450 * c-typeck.c (build_array_ref): Pass loc down to
1451 warn_array_subscript_with_type_char.
1452
8a8211df 14532014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1454
1455 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1456 (common-pointer-type): For pointers to arrays take qualifiers from
1457 element type.
1458 (build_conditional_expr): Add warnings for lost qualifiers.
1459 (comp-target-types): Allow pointers to arrays with different qualifiers.
1460 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1461 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1462 to PEDWARN_FOR_QUALIFIERS.
1463
35ea0139 14642014-12-17 Jakub Jelinek <jakub@redhat.com>
1465
1466 PR sanitizer/64289
1467 * c-convert.c: Include ubsan.h.
1468 (convert): For real -> integral casts and
1469 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1470 instead instrument the float cast directly.
1471
f9e245b2 14722014-11-29 Jakub Jelinek <jakub@redhat.com>
1473
1474 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1475 c_finish_stmt_expr): Remove NULL last argument from
1476 create_tmp_var_raw and create_tmp_var calls.
1477 * c-array-notation.c (fix_builtin_array_notation_fn,
1478 build_array_notation_expr, fix_conditional_array_notations_1,
1479 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1480
fce2dbd1 14812014-11-28 Marek Polacek <polacek@redhat.com>
1482
1483 PR c/63862
1484 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1485 convert the right operand to integer type.
1486
396c36b7 14872014-11-25 Marek Polacek <polacek@redhat.com>
1488
1489 PR c/63877
1490 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1491 for inline functions.
1492
c61ef207 14932014-11-21 Jakub Jelinek <jakub@redhat.com>
1494
1495 PR target/63764
1496 * c-typeck.c (build_array_ref): Adjust
1497 convert_vector_to_pointer_for_subscript caller. If it returns true,
1498 call non_lvalue_loc on the result.
1499
565353e8 15002014-11-11 Richard Biener <rguenther@suse.de>
1501
1502 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1503 to true.
1504
fdd735a7 15052014-11-10 Andi Kleen <ak@linux.intel.com>
1506
1507 PR c/60804
1508 * c-parser.c (c_parser_statement_after_labels): Call
1509 check_no_cilk.
1510 (c_parser_if_statement): Dito.
1511 (c_parser_switch_statement): Dito.
1512 (c_parser_while_statement): Dito.
1513 (c_parser_do_statement): Dito.
1514 (c_parser_for_statement): Dito.
1515 * c-typeck.c (c_finish_loop): Dito.
1516
0feb4de1 15172014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1518
1519 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1520 OPT_Wshift_count_overflow in the warnings.
1521
a3fec48a 15222014-10-30 Marek Polacek <polacek@redhat.com>
1523
1524 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1525 print the stripped version as well, if they're not the same.
1526
3754d046 15272014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1528
1529 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1530 machine_mode.
1531
1140c305 15322014-10-28 Andrew MacLeod <amacleod@redhat.com>
1533
1534 * c-decl.c: Adjust include files.
1535 * c-parser.c: Ditto.
1536
ab103e33 15372014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1538 Tom Tromey <tromey@redhat.com>
1539
1540 * c-tree.h (enum c_oracle_request): New.
1541 (c_binding_oracle_function): New typedef.
1542 (c_binding_oracle, c_pushtag, c_bind): Declare.
1543 * c-decl.c (c_binding_oracle): New global.
1544 (I_SYMBOL_CHECKED): New macro.
1545 (i_symbol_binding): New function.
1546 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1547 (I_TAG_CHECKED): New macro.
1548 (i_tag_binding): New function.
1549 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1550 (I_LABEL_CHECKED): New macro.
1551 (i_label_binding): New function.
1552 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1553 (c_print_identifier): Save and restore c_binding_oracle.
1554 (c_pushtag, c_bind): New functions.
1555
94ea8568 15562014-10-27 Andrew MacLeod <amacleod@redhat.com>
1557
1558 * c-typeck.c: Adjust include files.
1559
32ecf960 15602014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1561
1562 PR c++/53061
1563 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1564 initialization here...
1565 (c_initialize_diagnostics): ... but here. Set defaults after
1566 building pretty-printer.
1567
2981340f 15682014-10-23 Marek Polacek <polacek@redhat.com>
1569
1570 PR c/63626
1571 * c-decl.c (pop_scope): Don't print warning in external_scope.
1572
d303aeaf 15732014-10-19 Marek Polacek <polacek@redhat.com>
1574
1575 PR c/63567
1576 * c-typeck.c (output_init_element): Allow initializing objects with
1577 static storage duration with compound literals even in C99 and add
1578 pedwarn for it.
1579
bccf97da 15802014-10-17 Marek Polacek <polacek@redhat.com>
1581
1582 PR c/63567
1583 * c-typeck.c (digest_init): Allow initializing objects with static
1584 storage duration with compound literals even in C99 and add pedwarn
1585 for it.
1586
d9c77450 15872014-10-17 Marek Polacek <polacek@redhat.com>
1588
1589 PR c/63543
1590 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1591 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1592 error multiple times. Print the type.
1593
a2bbd0a7 15942014-10-17 Marek Polacek <polacek@redhat.com>
1595
1596 PR c/63549
1597 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1598 type.
1599
e610d2b2 16002014-10-17 Marek Polacek <polacek@redhat.com>
1601
1602 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1603 (start_function): Use OPT_Wimplicit_int instead of 0.
1604 (store_parm_decls_oldstyle): Likewise.
1605
6b6e56b6 16062014-10-17 Alan Modra <amodra@gmail.com>
1607
1608 PR middle-end/61848
1609 * c-decl.c (merge_decls): Don't merge section name or tls model
1610 to newdecl symtab node, instead merge to olddecl. Override
1611 existing olddecl section name. Set tls_model for all thread-local
1612 vars, not just OMP thread-private ones. Remove incorrect comment.
1613
a3020f2f 16142014-10-16 Andrew MacLeod <amacleod@redhat.com>
1615
1616 * c-decl.c: Adjust include files.
1617
9f75f026 16182014-10-14 DJ Delorie <dj@redhat.com>
1619
1620 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1621 (c_token_starts_typename): Check all __intN, not just __int128.
1622 (c_token_starts_declspecs): Likewise.
1623 (c_parser_declspecs): Likewise.
1624 (c_parser_attribute_any_word): Likewise.
1625 (c_parser_objc_selector): Likewise.
1626 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1627 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1628 is specified.
1629 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1630 __int128.
1631 (finish_declspecs): Likewise.
1632
4f284d4a 16332014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1634
1635 * c-parser.c (c_parser_all_labels): New function to replace
1636 the duplicate code.
1637 (c_parser_statement): Call the new function.
1638
61a892dc 16392014-10-09 Marek Polacek <polacek@redhat.com>
1640
1641 PR c/63480
1642 * c-typeck.c (pop_init_level): Don't warn about initializing
1643 with { }.
1644
4e888fd9 16452014-10-07 Marek Polacek <polacek@redhat.com>
1646
1647 PR c/59717
1648 * c-decl.c (header_for_builtin_fn): New function.
1649 (implicitly_declare): Suggest which header to include.
1650
224bdd51 16512014-10-07 Marek Polacek <polacek@redhat.com>
1652
1653 * c-convert.c (convert): Use error_operand_p.
1654 * c-typeck.c (require_complete_type): Likewise.
1655 (really_atomic_lvalue): Likewise.
1656 (digest_init): Likewise.
1657 (handle_omp_array_sections_1): Likewise.
1658
a2bc79db 16592014-10-03 Marek Polacek <polacek@redhat.com>
1660
1661 PR c/63453
1662 * c-decl.c (pop_scope): Don't warn about "inline function declared
1663 but never defined" for functions marked with gnu_inline attribute.
1664
4fc4088b 16652014-09-25 Jakub Jelinek <jakub@redhat.com>
1666
1667 PR c++/63249
1668 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1669 on low_bound and length.
1670
5213d6c9 16712014-09-24 Marek Polacek <polacek@redhat.com>
1672
1673 PR c/61405
1674 PR c/53874
1675 * c-parser.c: Don't define CPP_KEYWORD.
1676 (c_parser_switch_statement): Pass original type to c_finish_case.
1677 * c-tree.h (c_finish_case): Update declaration.
1678 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1679 conditionally to c_do_switch_warnings.
1680
6ea2b1bc 16812014-09-03 Marek Polacek <polacek@redhat.com>
1682
1683 PR c/62024
1684 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1685 conversions.
1686
40750995 16872014-09-02 Jakub Jelinek <jakub@redhat.com>
1688 Balaji V. Iyer <balaji.v.iyer@intel.com>
1689 Igor Zamyatin <igor.zamyatin@intel.com>
1690
1691 * c-parser.c (c_parser_cilk_for): New function.
1692 (c_parser_cilk_grainsize): Likewise.
1693 (c_get_temp_regvar): Likewise.
1694 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1695 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1696 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1697 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1698 case.
1699
8c583613 17002014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1701
1702 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1703 with using HOST_WIDE_INT without truncation to 'int'
1704
dc6229e8 17052014-08-22 Marek Polacek <polacek@redhat.com>
1706
1707 PR c++/62199
1708 * c-typeck.c (parser_build_binary_op): Adjust call to
1709 warn_logical_not_parentheses.
1710
5fdda74b 17112014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1712
1713 PR other/62008
1714 * c-parser.c (c_parser_array_notation): Check for correct
1715 type of an array added.
1716
78bf4156 17172014-08-19 Marek Polacek <polacek@redhat.com>
1718
1719 PR c++/62153
1720 * c-typeck.c (build_binary_op): If either operand of a comparison
1721 is a boolean expression, call maybe_warn_bool_compare.
1722
005b8fe7 17232014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1724
1725 PR c/45584
1726 * c-typeck.c (build_c_cast): Do a conversion even when the
1727 TYPE_MAIN_VARIANTs are the same.
1728
508ea33a 17292014-08-19 Marek Polacek <polacek@redhat.com>
1730
1731 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1732 pedwarn_c99 instead of pedwarn.
1733 (grokfield): Likewise.
1734 (warn_defaults_to): New function.
1735 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1736 Unconditionally call pedwarn_c99 instead of pedwarn.
1737 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1738 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1739 check flag_isoc11 before.
1740 * c-errors.c (pedwarn_c99): Change the return type to bool.
1741 Handle -Wc99-c11-compat.
1742 * c-parser.c (disable_extension_diagnostics): Handle
1743 warn_c99_c11_compat.
1744 (restore_extension_diagnostics): Likewise.
1745 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1746 instead of pedwarn, don't check flag_isoc11 before.
1747 (c_parser_declspecs): Likewise.
1748 (c_parser_alignas_specifier): Likewise.
1749 (c_parser_alignof_expression): Likewise.
1750 (c_parser_generic_selection): Likewise.
1751 * c-tree.h (pedwarn_c99): Update declaration.
1752 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1753 of pedwarn_c99.
1754
806fe15e 17552014-08-19 Marek Polacek <polacek@redhat.com>
1756
1757 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1758 to pedwarn_c90.
1759 * c-errors.c: Include "opts.h".
1760 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1761 * c-parser.c (disable_extension_diagnostics): Handle negative value
1762 of warn_c90_c99_compat, too.
1763 (restore_extension_diagnostics): Likewise.
1764 (c_parser_compound_statement_nostart): Pass
1765 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1766
89868e45 17672014-08-12 Marek Polacek <polacek@redhat.com>
1768
1769 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1770 Add pedwarn.
1771 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1772 Likewise.
1773 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1774
890c2e2f 17752014-08-10 Marek Polacek <polacek@redhat.com>
1776
1777 PR c/51849
1778 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1779 Call pedwarn_c90 instead of pedwarn.
1780 (check_bitfield_type_and_width): Likewise.
1781 (declspecs_add_qual): Likewise.
1782 (declspecs_add_type): Likewise.
1783 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1784 Adjust to only call pedwarn_c90.
1785 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1786 pedwarn_c90 instead of pedwarn.
1787 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1788 * c-parser.c (disable_extension_diagnostics): Handle
1789 warn_c90_c99_compat.
1790 (restore_extension_diagnostics): Likewise.
1791 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1792 pedwarn_c90 instead of pedwarn.
1793 (c_parser_initelt): Likewise.
1794 (c_parser_postfix_expression): Likewise.
1795 (c_parser_postfix_expression_after_paren_type): Likewise.
1796 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1797 * c-tree.h: Fix formatting.
1798 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1799 pedwarn_c90 instead of pedwarn.
1800
7149db5f 18012014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1802
1803 * c-typeck.c: Remove include of pointer-set.h.
1804
1c75251e 18052014-08-07 Marek Polacek <polacek@redhat.com>
1806
1807 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1808
06ecf488 18092014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1810
1811 * c-typeck.c: Use hash_map instead of pointer_map.
1812
431205b7 18132014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1814
1815 * c-decl.c: Use hash_set instead of pointer_set.
1816
3394c80c 18172014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1818
1819 PR middle-end/61455
1820 * c-array-notation.c (expand_array_notations): Handling
1821 of DECL_EXPR added.
1822
f22a2cb7 18232014-07-31 Marc Glisse <marc.glisse@inria.fr>
1824
1825 PR c++/60517
1826 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1827 a local variable.
1828
74691f46 18292014-07-30 Tom Tromey <tromey@redhat.com>
1830
1831 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1832 field.
1833 (really_start_incremental_init, push_init_level): Initialize
1834 designator_depth.
1835 (pop_init_level): Set global designator_depth.
1836 (process_init_element): Check for designated_init attribute.
1837
f9767fb6 18382014-07-20 Marek Polacek <polacek@redhat.com>
1839
1840 PR c/61852
1841 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1842 (implicitly_declare): Pass location to implicit_decl_warning.
1843
305d96bc 18442014-07-14 Jakub Jelinek <jakub@redhat.com>
1845
1846 PR middle-end/61294
1847 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1848 If non-NULL, call c_parser_check_literal_zero.
1849 (c_parser_check_literal_zero): New function.
1850 (c_parser_postfix_expression_after_primary): Adjust
1851 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1852
87d59e72 18532014-07-06 Marek Polacek <polacek@redhat.com>
1854
1855 PR c/6940
1856 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1857 * c-tree.h (C_ARRAY_PARAMETER): Define.
1858 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1859 function parameter.
1860
752098c8 18612014-07-02 Jan Hubicka <hubicka@ucw.cz>
1862 Chen Gang <gang.chen.5i5j@gmail.com>
1863
1864 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1865 releasing symbol.
1866
1207866e 18672014-07-01 Marek Polacek <polacek@redhat.com>
1868
1869 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1870 instead of 0 to WARN_FOR_ASSIGNMENT.
1871
7a6bbb76 18722014-07-01 Marek Polacek <polacek@redhat.com>
1873
1874 PR c/58286
1875 * c-typeck.c (convert_for_assignment): Pass
1876 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1877
70575064 18782014-06-30 Marek Polacek <polacek@redhat.com>
1879
1880 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1881 has no_sanitize_undefined attribute.
1882
4879e4cf 18832014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1884
1885 PR middle-end/57541
1886 * c-array-notation.c (fix_builtin_array_notation_fn):
1887 Check for 0 arguments in builtin call. Check that bultin argument is
1888 correct.
1889 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1890 index.
1891
45c5b823 18922014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1893
1894 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1895 qualifiers in __auto_type for atomic types.
1896 (c_parser_typeof_specifier): Discard all type qualifiers in
1897 __typeof__ for atomic types.
1898
430b73ee 18992014-06-25 Marek Polacek <polacek@redhat.com>
1900
1901 PR c/61162
1902 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1903 the return expression to c_finish_return.
1904
9580cb79 19052014-06-25 Jakub Jelinek <jakub@redhat.com>
1906
1907 * c-typeck.c (c_finish_omp_clauses): Make sure
1908 OMP_CLAUSE_LINEAR_STEP has correct type.
1909
c1f445d2 19102014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1911
1912 * c-decl.c: Adjust.
1913
e471cc6f 19142014-06-24 Jakub Jelinek <jakub@redhat.com>
1915
1916 * c-parser.c (c_parser_omp_for_loop): For
1917 #pragma omp parallel for simd move lastprivate clause from parallel
1918 to for rather than simd.
1919
499b7390 19202014-06-23 Marek Polacek <polacek@redhat.com>
1921
1922 * c-typeck.c (parser_build_binary_op): Don't call
1923 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1924
5e68df57 19252014-06-15 Jan Hubicka <hubicka@ucw.cz>
1926
1927 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1928 * c-decl.c (merge_decls): Likewise.
1929
064b0d02 19302014-06-09 Marek Polacek <polacek@redhat.com>
1931
1932 PR c/36446
1933 * c-typeck.c (error_init): Call inform instead of error_at.
1934 (pedwarn_init): Call inform instead of pedwarn.
1935 (warning_init): Call inform instead of warning_at.
1936
71e19e54 19372014-06-07 Jan Hubicka <hubicka@ucw.cz>
1938
1939 * c-decl.c (merge_decls): Use set_decl_section_name.
1940 (duplicate_decls): Remove node if it exists.
1941
95cdf3fd 19422014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1943
1944 PR c/53119
1945 * c-typeck.c (push_init_level, process_init_element,
1946 pop_init_level): Correct check for zero initialization, move
1947 missing brace warning to respect zero initialization.
1948
a07f86a6 19492014-06-05 Marek Polacek <polacek@redhat.com>
1950
1951 PR c/56724
1952 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1953
32dc1512 19542014-06-05 Marek Polacek <polacek@redhat.com>
1955
1956 PR c/49706
1957 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1958 on the left hand side operand of a comparison.
1959
64cf1262 19602014-06-05 Marek Polacek <polacek@redhat.com>
1961
1962 PR c/48062
1963 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1964 Print note only if the warning was printed.
1965
071f6d39 19662014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1967
1968 PR c/58942
1969 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1970 with a pointer.
1971
c69ec07d 19722014-06-03 Marek Polacek <polacek@redhat.com>
1973
1974 PR c/60439
1975 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1976 c_start_case.
1977 * c-tree.h (c_start_case): Update.
1978 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1979 switch condition has boolean value.
1980
f7715905 19812014-06-02 Andrew MacLeod <amacleod@redhat.com>
1982
1983 * c-decl.c: Include builtins.h.
1984 * c-parser.c: Likewise.
1985
dcfff6f9 19862014-05-27 Marek Polacek <polacek@redhat.com>
1987
1988 PR c/56724
1989 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1990 error and warning calls to error_at and warning_at. Pass location of
1991 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1992 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1993 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1994
c048c42c 19952014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1996
1997 PR c/61191
1998 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1999 function parameters.
2000
8c016392 20012014-05-23 Jan Hubicka <hubicka@ucw.cz>
2002
2003 * c-decl.c (merge_decls): Preserve symtab node pointers.
2004 (duplicate_decls): Free new decl.
2005
184a718f 20062014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2007
6ce915ef 2008 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2009 initialization.
2010
184a718f 2011 * c-parser.c (c_parser_omp_target): Return bool values.
2012
22ac3f78 20132014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2014
2015 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2016 num_teams_loc variable to num_thread_limit_loc.
2017
3ab4693e 20182014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2019
2020 * c-array-notation.c (expand_array_notations): Use void_node
2021 instead of void_zero_node.
2022
25a27413 20232014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2024
2025 * c-decl.c (finish_struct): Adjust.
2026 (finish_enum): Likewise.
2027 (bind): Adjust.
2028 (record_inline_static): Likewise.
2029 (push_scope): Likewise.
2030 (make_label): Likewise.
2031 (lookup_label_for_goto): Likewise.
2032 (finish_struct): Likewise.
2033 (finish_enum): Likewise.
2034 (store_parm_decls): Likewise.
2035 (c_push_function_context): Likewise.
2036 * c-lang.h: Remove usage of variable_size gty attribute.
2037 * c-parser.c (c_parse_init): Adjust.
2038 (c_parse_file): Likewise.
2039
172b8440 20402014-05-13 Marek Polacek <polacek@redhat.com>
2041
2042 PR c/61162
2043 * c-typeck.c (convert_for_assignment): Pass location to
2044 WARN_FOR_ASSIGNMENT instead of input_location.
2045
c9e51d25 20462014-05-10 Marek Polacek <polacek@redhat.com>
2047
2048 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2049 maybe_warn_string_init.
2050 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2051 maybe_warn_string_init.
2052 * c-tree.h (maybe_warn_string_init): Update declaration.
2053 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2054 Call pedwarn_init with loc instead of with input_location.
2055 (digest_init): Pass init_loc to maybe_warn_string_init.
2056 (pop_init_level): Call pedwarn_init with loc instead of with
2057 input_location.
2058 (set_init_index): Likewise.
2059 (process_init_element): Likewise.
2060
53de1631 20612014-05-09 Marek Polacek <polacek@redhat.com>
2062
2063 PR c/61096
2064 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2065 (c_parser_initelt): Pass location to set_init_label. Pass array index
2066 location to set_init_index.
2067 * c-tree.h (push_init_level): Update declaration.
2068 (pop_init_level): Likewise.
2069 (set_init_index): Likewise.
2070 (set_init_label): Likewise.
2071 * c-typeck.c (error_init): Add location parameter. Call error_at
2072 instead of error.
2073 (digest_init): Pass init_loc to error_init.
2074 (really_start_incremental_init):
2075 (push_init_level): Add location parameter. Pass loc to pop_init_level
2076 and error_init.
2077 (pop_init_level): Likewise.
2078 (set_designator): Add location parameter. Pass loc to pop_init_level,
2079 push_init_level, and error_init.
2080 (set_init_index): Add location parameter. Pass loc to error_init and
2081 set_designator.
2082 (set_init_label): Likewise.
2083 (output_init_element): Pass loc to error_init.
2084 (process_init_element): Pass loc to error_init, pop_init_level,
2085 pedwarn_init, and push_init_level.
2086
3e5a8b00 20872014-05-09 Marek Polacek <polacek@redhat.com>
2088
2089 PR c/50459
2090 * c-parser.c (c_parser_attributes): Parse the arguments as an
2091 expression-list if the attribute takes identifier.
2092
c2c4ae8d 20932014-05-08 Marek Polacek <polacek@redhat.com>
2094
2095 PR c/61053
2096 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2097 TYPE_ALIGN_UNIT.
2098
2026249a 20992014-05-08 Marek Polacek <polacek@redhat.com>
2100
2101 PR c/61077
2102 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2103 of main.
2104
960d5a55 21052014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2106 Mike Stump <mikestump@comcast.net>
2107 Richard Sandiford <rdsandiford@googlemail.com>
2108
2109 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2110 (finish_enum): Use wide-int interfaces.
2111 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2112 * c-typeck.c (build_c_cast): Likewise.
2113 (set_nonincremental_init_from_string): Likewise.
2114 (c_tree_equal): Likewise.
2115
e0e14cbd 21162014-05-02 Marek Polacek <polacek@redhat.com>
2117
2118 PR c/25801
2119 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2120 Return size_one_node when the type is not complete.
2121 (pointer_diff): Remove comment.
2122 (build_unary_op): Improve error messages.
2123
27ff10cb 21242014-05-02 Marek Polacek <polacek@redhat.com>
2125
2126 * c-typeck.c (c_finish_return): Separate warning_at calls.
2127
68410ce9 21282014-05-02 Marek Polacek <polacek@redhat.com>
2129
2130 * c-tree.h (error_init): Remove declaration.
2131 (pedwarn_init): Likewise.
2132 * c-typeck.c (error_init): Make static and move above.
2133 (pedwarn_init): Likewise.
2134 (warning_init): Move above.
2135 (maybe_warn_string_init): Likewise.
2136
e8e27117 21372014-05-01 Jeff Law <law@redhat.com>
2138
2139 Revert:
2140
2141 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2142 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2143 avoid goto.
2144
971df357 21452014-05-02 Marek Polacek <polacek@redhat.com>
2146
2147 PR c/60784
2148 * c-typeck.c (push_init_level): Set constructor_designated to
2149 p->designated for structures.
2150
de548fe5 21512014-05-01 Marek Polacek <polacek@redhat.com>
2152
2153 PR c/60915
2154 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2155 function-definition has an attribute after the declarator.
2156
053a0ded 21572014-05-01 Marek Polacek <polacek@redhat.com>
2158
2159 PR c/60257
2160 * c-typeck.c (warning_init): Add location_t parameter. Call
2161 warning_at instead of warning.
2162 (push_init_level): Pass input_location to warning_init.
2163 (add_pending_init): Add location_t parameter. Pass loc to
2164 warning_init.
2165 (set_nonincremental_init): Pass input_location to add_pending_init.
2166 (set_nonincremental_init_from_string): Likewise.
2167 (output_init_element): Pass loc to warning_init and to
2168 add_pending_init.
2169
694296f2 21702014-05-01 Marek Polacek <polacek@redhat.com>
2171
2172 PR c/43395
2173 * c-typeck.c (c_finish_return): Distinguish between label and variable
2174 when warning about returning local address.
2175
86bbd7f9 21762014-05-01 Marek Polacek <polacek@redhat.com>
2177
2178 PR c/29467
2179 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2180 in C89 mode.
2181
e4ab2ef3 21822014-05-01 Marek Polacek <polacek@redhat.com>
2183
2184 PR c/43245
2185 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2186 instead of 0 to WARN_FOR_QUALIFIERS.
2187
ca3999cb 21882014-05-01 Marek Polacek <polacek@redhat.com>
2189
2190 PR c/56989
2191 * c-typeck.c (default_conversion): Use better location for
2192 error call.
2193
52cc0072 21942014-04-30 Marek Polacek <polacek@redhat.com>
2195
2196 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2197 also when SANITIZE_FLOAT_DIVIDE is on.
2198
af379dd3 21992014-04-30 Marek Polacek <polacek@redhat.com>
2200
2201 PR c/60139
2202 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2203 and pedwarn_init. Use loc insted of input_location.
2204
b069c2a0 22052014-04-30 Marek Polacek <polacek@redhat.com>
2206
2207 PR c/60351
2208 * c-typeck.c (build_binary_op): Use location when warning about
2209 shift count.
2210
4a026b48 22112014-04-25 Marek Polacek <polacek@redhat.com>
2212
2213 PR c/18079
2214 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2215 always_inline/noinline and hot/cold attributes.
2216
adc93f31 22172014-04-25 Marek Polacek <polacek@redhat.com>
2218
2219 PR c/60114
2220 * c-parser.c (c_parser_initelt): Pass input_location to
2221 process_init_element.
2222 (c_parser_initval): Pass loc to process_init_element.
2223 * c-tree.h (process_init_element): Adjust declaration.
2224 * c-typeck.c (push_init_level): Pass input_location to
2225 process_init_element.
2226 (pop_init_level): Likewise.
2227 (set_designator): Likewise.
2228 (output_init_element): Add location_t parameter. Pass loc to
2229 digest_init.
2230 (output_pending_init_elements): Pass input_location to
2231 output_init_element.
2232 (process_init_element): Add location_t parameter. Pass loc to
2233 output_init_element.
2234
e1029911 22352014-04-24 Jakub Jelinek <jakub@redhat.com>
2236
2237 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2238 atomic-clause, allow comma in between atomic-clause and
2239 seq_cst.
2240
9f0a7bc6 22412014-04-22 Jakub Jelinek <jakub@redhat.com>
2242
2243 PR c/59073
2244 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2245 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2246
094da06d 22472014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2248
2249 PR middle-end/60469
2250 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2251 create_tmp_var instead build_decl for creating temps.
2252 (build_array_notation_expr): Likewise.
2253 (fix_conditional_array_notations_1): Likewise.
2254 (fix_array_notation_expr): Likewise.
2255 (fix_array_notation_call_expr): Likewise.
2256
5a672e62 22572014-03-28 Jakub Jelinek <jakub@redhat.com>
2258
2259 PR c++/60689
2260 * c-tree.h (c_build_function_call_vec): New prototype.
2261 * c-typeck.c (build_function_call_vec): Don't call
2262 resolve_overloaded_builtin here.
2263 (c_build_function_call_vec): New wrapper function around
2264 build_function_call_vec. Call resolve_overloaded_builtin here.
2265 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2266 Call c_build_function_call_vec instead of build_function_call_vec.
2267 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2268 * c-decl.c (finish_decl): Likewise.
2269
f40f5e0e 22702014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2271
2272 PR c/55383
2273 * c-typeck.c: Use correct format string in cast-qual warning
2274
9ec099a3 22752014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2276
2277 * c-decl.c (c_decl_attributes): Use
2278 lang_hooks.types.omp_mappable_type.
2279 * c-typeck.c (c_finish_omp_clauses): Likewise.
2280
3bfdc94f 22812014-03-06 Marek Polacek <polacek@redhat.com>
2282
2283 PR c/60197
2284 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2285 of checking tree code.
2286
8f1128f8 22872014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2288
2289 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2290 (c_parser_parameter_declaration): Likewise.
2291
977b1853 22922014-02-19 Marek Polacek <polacek@redhat.com>
2293
2294 PR c/60195
2295 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2296 Call mark_exp_read on exp.value.
2297 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2298 TREE_ADDRESSABLE on old instead of val.
2299 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2300
825cd6ef 23012014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2302
2303 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2304 C_EXPR_APPEND by vec_safe_push.
2305 * c-tree.h (C_EXPR_APPEND): Remove.
2306
ec761d5a 23072014-01-31 Marek Polacek <polacek@redhat.com>
2308
2309 PR c/59963
2310 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2311 build_function_call_vec.
2312 (build_function_call): Likewise.
2313 (build_atomic_assign): Likewise.
2314 (build_function_call_vec): Add arg_loc parameter. Use it.
2315 (convert_arguments): Likewise.
2316 (convert_for_assignment): Rename rhs_loc to expr_loc.
2317 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2318 (c_parser_objc_keywordexpr): Likewise.
2319 (c_parser_postfix_expression_after_primary): Call
2320 build_function_call_vec with expr_loc rather than op_loc.
2321 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2322 build_function_call_vec.
2323 (c_parser_expr_list): Add locations parameter. Fill it with locations
2324 of function arguments.
2325 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2326
22a75734 23272014-01-30 Marek Polacek <polacek@redhat.com>
2328
2329 PR c/59940
2330 * c-typeck.c (build_function_call_vec): Use loc parameter.
2331 (convert_arguments): Add location parameter. Use it.
2332 (ep_convert_and_check): Likewise.
2333 (build_atomic_assign): Adjust convert_for_assignment call.
2334 (build_modify_expr): Likewise.
2335 (digest_init): Likewise.
2336 (c_finish_return): Likewise.
2337 (build_conditional_expr): Adjust ep_convert_and_check calls.
2338 (convert_for_assignment): Add rhs_loc parameter. Use it.
2339 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2340 calls.
2341
29f580ac 23422014-01-30 Richard Biener <rguenther@suse.de>
2343
2344 PR c/59905
2345 * c-typeck.c (build_function_call_vec): Do not replace calls
2346 to a function via an incompatible type with a runtime abort.
2347
a89e6c15 23482014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2349
2350 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2351 flag_enable_cilkplus with flag_cilkplus.
2352 (c_parser_direct_declarator_inner): Likewise.
2353 (c_parser_attribute_any_word): Likewise.
2354 (c_parser_attributes): Likewise.
2355 (c_parser_compound_statement): Likewise.
2356 (c_parser_statement_after_labels): Likewise.
2357 (c_parser_if_statement): Likewise.
2358 (c_parser_switch_statement): Likewise.
2359 (c_parser_do_statement): Likewise.
2360 (c_parser_for_statement): Likewise.
2361 (c_parser_unary_expression): Likewise.
2362 (c_parser_postfix_expression): Likewise.
2363 (c_parser_postfix_expression_after_primary): Likewise.
2364 (c_parser_postfix_expression_after_primary): Likewise.
2365 (c_parser_omp_clause_name): Likewise.
2366 (c_finish_omp_declare_simd): Likewise.
2367 (c_parser_cilk_verify_simd): Likewise.
2368 * c-typeck.c (build_array_ref): Likewise.
2369 (build_function_call_vec): Likewise.
2370 (convert_arguments): Likewise.
2371 (build_compound_expr): Likewise.
2372 (c_finish_return): Likewise.
2373 (c_finish_if_stmt): Likewise.
2374 (c_finish_loop): Likewise.
2375 (build_binary_op): Likewise.
2376
2623625f 23772014-01-23 Marek Polacek <polacek@redhat.com>
2378
2379 PR c/59846
2380 * c-typeck.c (parser_build_binary_op): Use location instead of
2381 input_location.
2382 (build_binary_op): Pass location to shorten_compare.
2383
46da3601 23842014-01-23 Marek Polacek <polacek@redhat.com>
2385
2386 PR c/58346
2387 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2388 an empty aggregate.
2389
9a9db3c1 23902014-01-23 Marek Polacek <polacek@redhat.com>
2391
2392 PR c/59871
2393 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2394 of a comma expression.
2395 (emit_side_effect_warnings): Likewise.
2396
69c9b607 23972014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2398
2399 PR c/59825
2400 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2401 function to use walk_tree and moved a lot of its functionality to
2402 expand_array_notations.
2403 (expand_array_notations): New function.
2404
7e005ab5 24052014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2406
2407 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2408 attribute an attribute without value.
2409
d6779b5f 24102014-01-23 Jakub Jelinek <jakub@redhat.com>
2411
2412 PR middle-end/58809
2413 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2414 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2415
ec431042 24162014-01-22 Marek Polacek <polacek@redhat.com>
2417
2418 PR c/59891
2419 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2420 of remove_c_maybe_const_expr on op1 and op2.
2421
1248c663 24222014-01-15 Jakub Jelinek <jakub@redhat.com>
2423
2424 PR c/58943
2425 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2426 effects, preevaluate rhs using SAVE_EXPR first.
2427
0bc789fc 24282014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2429
2430 PR c++/59631
2431 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2432 statements with if-elseif statements.
2433
6685d11c 24342014-01-06 Marek Polacek <polacek@redhat.com>
2435
2436 PR c/57773
2437 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2438 defined bit-field types only in ISO C.
2439
3aea1f79 24402014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2441
2442 Update copyright years
2443
e4f22041 24442014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2445
2446 * c-array-notation.c: Use the standard form for the copyright notice.
2447
74acc703 24482013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2449
2450 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2451 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2452 field in parser is not empty. If not-empty, call the function
2453 c_parser_finish_omp_declare_simd.
2454 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2455 between SIMD-enabled functions and #pragma simd. Added new parameter.
2456 (c_parser_cilk_all_clauses): Modified the usage of the function
2457 c_parser_cilk_clause_vectorlength as mentioned above.
2458 (c_parser_cilk_simd_fn_vector_attrs): New function.
2459 (c_finish_cilk_simd_fn_tokens): Likewise.
2460 (is_cilkplus_vector_p): Likewise.
2461 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2462 "nomask," and "mask" strings in clause name.
2463 (c_parser_omp_all_clauses): Added 3 new case statements:
2464 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2465 PRAGMA_CILK_CLAUSE_NOMASK.
2466 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2467 check for vector attribute and if so call the function
2468 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2469 called the function c_finish_cilk_simd_fn_tokens.
2470 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2471 parser field is non-empty. If so, parse them as you would parse
2472 the omp declare simd pragma.
2473 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2474 Added a check when step is a parameter and flag it as error.
2475 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2476 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2477 pragma_omp_clause.
2478
395dc01c 24792013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2480
2481 * c-parser.c (c_parser_omp_parallel): Fix description.
2482
433e804e 24832013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2484
2485 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2486 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2487 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2488 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2489
a179a7dc 24902013-12-04 Joseph Myers <joseph@codesourcery.com>
2491
2492 PR c/52023
2493 * c-parser.c (c_parser_alignas_specifier): Use
2494 c_sizeof_or_alignof_type instead of c_alignof.
2495 (c_parser_alignof_expression): Likewise, with min_alignof
2496 parameter depending on alignof spelling used.
2497
bdf1e3c7 24982013-12-04 Marek Polacek <polacek@redhat.com>
2499
2500 PR c/54113
2501 * c-decl.c (start_function): Don't warn for missing prototype for
2502 inline functions.
2503
05e8f674 25042013-12-03 Marek Polacek <polacek@redhat.com>
2505
2506 PR c/59351
2507 * c-decl.c (build_compound_literal): Allow compound literals with
2508 empty initial value.
2509
39f74d66 25102013-12-02 Joseph Myers <joseph@codesourcery.com>
2511
2512 PR c/58235
2513 * c-typeck.c (build_modify_expr): Diagnose assignment to
2514 expression with array type.
2515
f221adca 25162013-11-29 Joseph Myers <joseph@codesourcery.com>
2517
2518 PR c/42262
2519 * c-typeck.c (process_init_element): Do not treat a string as
2520 initializing a whole array when used with a designator for an
2521 individual element.
2522
75bce827 25232013-11-29 Joseph Myers <joseph@codesourcery.com>
2524
2525 PR c/57574
2526 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2527 an inline function following a static declaration.
2528
dc133326 25292013-11-28 Jakub Jelinek <jakub@redhat.com>
2530
2531 PR c/59310
2532 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2533 to p_name before calling c_parser_omp_teams instead of after.
2534 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2535 argument. Remove unused p_name variable.
2536
d09768a4 25372013-11-27 Aldy Hernandez <aldyh@redhat.com>
2538 Jakub Jelinek <jakub@redhat.com>
2539
2540 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2541 external_scope is NULL.
2542
73fd9cbe 25432013-11-27 Tom de Vries <tom@codesourcery.com>
2544 Marc Glisse <marc.glisse@inria.fr>
2545
2546 PR c++/59032
2547 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2548
bc61cadb 25492013-11-22 Andrew MacLeod <amacleod@redhat.com>
2550
2551 * c-typeck.c: Add required include files from gimple.h.
2552
3df42822 25532013-11-22 David Malcolm <dmalcolm@redhat.com>
2554
2555 * c-decl.c (define_label, shadow_tag_warned)
2556 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2557 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2558 (declspecs_add_type): Remove use of in_system_header macro.
2559 * c-parser.c (c_parser_unary_expression): Likewise.
2560 * c-typeck.c (store_init_value, process_init_element)
2561 (c_start_case): Likewise.
2562
2563 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2564 macro.
2565
2566 * c-parser.c (c_parser_set_source_position_from_token): Remove
2567 reference to in_system_header from comment.
2568
08f817b3 25692013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2570
2571 * c-decl.c (grokdeclarator): Update comment to refer to
2572 tree_to_[su]hwi rather than tree_low_cst.
2573
6a0712d4 25742013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2575
2576 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2577 tree_to_uhwi throughout.
2578
fcb97e84 25792013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2580
2581 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2582 throughout.
2583
35ec552a 25842013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2585
2586 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2587 throughout.
2588
f2697631 25892013-11-15 Aldy Hernandez <aldyh@redhat.com>
2590
2591 * c-parser.c (c_parser_cilk_simd): New.
2592 (c_parser_cilk_verify_simd): New.
2593 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2594 (c_parser_omp_for_loop): Add case for NE_EXPR.
2595 Set c_break_label for CILK_SIMD.
2596 (c_parser_cilk_clause_vectorlength): New.
2597 (c_parser_cilk_clause_linear): New.
2598 (c_parser_cilk_clause_name): New.
2599 (c_parser_cilk_all_clauses): New.
2600 * c-typeck.c (build_unary_op): Pass location argument to
2601 readonly_error.
2602 (build_modify_expr): Same.
2603 (build_asm_expr): Same.
2604 (c_finish_bc_stmt): Error on break/continue in loops.
2605
e795d6e1 26062013-11-14 Andrew MacLeod <amacleod@redhat.com>
2607
2608 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2609
9ed99284 26102013-11-14 Diego Novillo <dnovillo@google.com>
2611
2612 * c-decl.c: Include print-tree.h.
2613 Include stor-layout.h.
2614 Include varasm.h.
2615 Include attribs.h.
2616 Include stringpool.h.
2617 * c-lang.c: Include fold-const.h.
2618 * c-parser.c: Include stringpool.h.
2619 Include attribs.h.
2620 Include stor-layout.h.
2621 Include varasm.h.
2622 Include trans-mem.h.
2623 * c-typeck.c: Include stor-layout.h.
2624 Include trans-mem.h.
2625 Include varasm.h.
2626 Include stmt.h.
2627
4fba5eb9 26282013-11-13 Joseph Myers <joseph@codesourcery.com>
2629
2630 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2631 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2632 __auto_type.
2633 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2634 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2635 RID_AUTO_TYPE.
2636 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2637 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2638 (c_parser_declarator, c_parser_direct_declarator_inner)
2639 (c_parser_parameter_declaration, c_parser_type_name): All callers
2640 changed.
2641 (c_parser_declaration_or_fndef): Handle declarations with type
2642 determined from the initializer.
2643
a8783bee 26442013-11-12 Andrew MacLeod <amacleod@redhat.com>
2645
e795d6e1 2646 * c-typeck.c: Include gimplify.h.
a8783bee 2647
d184e0c0 26482013-11-12 Joseph Myers <joseph@codesourcery.com>
2649
2650 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2651 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2652 comment.
2653 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2654 or _Thread_local as appropriate in diagnostics.
2655 (build_null_declspecs): Initialize ret->thread_gnu_p.
2656 (declspecs_add_scspec): Handle either __thread or _Thread_local
2657 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2658 pedantic. Do not disallow _Thread_local extern and _Thread_local
2659 static.
2660
b560fabd 26612013-11-07 Joseph Myers <joseph@codesourcery.com>
2662 Andrew MacLeod <amacleod@redhat.com>
2663
2664 * c-aux-info.c (gen_type): Handle atomic qualifier.
2665 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2666 qualifiers when compating types.
2667 (shadow_tag_warned): Handle atomic_p in declspecs.
2668 (quals_from_declspecs): Likewise.
2669 (start_decl): Use c_type_promotes_to when promoting argument
2670 types.
2671 (grokdeclarator): Handle _Atomic.
2672 (get_parm_info): Diagnose any qualifier on "void" as only
2673 parameter.
2674 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2675 comparing types. Use c_type_promotes_to when promoting argument
2676 types.
2677 (finish_function): Use c_type_promotes_to when promoting argument
2678 types.
2679 (build_null_declspecs): Handle atomic_p in declspecs.
2680 (declspecs_add_qual): Handle RID_ATOMIC.
2681 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2682 (c_token_starts_declspecs): Handle RID_ATOMIC.
2683 (c_parser_declspecs): Handle atomic type specifiers and
2684 qualifiers.
2685 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2686 from types of expressions with atomic type.
2687 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2688 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2689 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2690 (c_parser_statement_after_labels, c_parser_switch_statement)
2691 (c_parser_for_statement, c_parser_expr_no_commas)
2692 (c_parser_conditional_expression, c_parser_binary_expression)
2693 (c_parser_cast_expression, c_parser_unary_expression)
2694 (c_parser_postfix_expression)
2695 (c_parser_postfix_expression_after_primary, c_parser_expression):
2696 Use convert_lvalue_to_rvalue.
2697 (c_parser_expression_conv, c_parser_expr_list): Document
2698 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2699 (c_parser_objc_synchronized_statement): Use
2700 convert_lvalue_to_rvalue.
2701 (c_parser_objc_selector): Handle RID_ATOMIC.
2702 (c_parser_objc_receiver, c_parser_array_notation): Use
2703 convert_lvalue_to_rvalue.
2704 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2705 _Atomic (type-name).
2706 (struct c_declspecs): Add atomic_p field.
2707 (convert_lvalue_to_rvalue): Declare.
2708 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2709 corresponding atomic types.
2710 (qualify_type): Don't add _Atomic qualifiers from second argument.
2711 (comp_target_types): Do not allow _Atomic mismatches.
2712 (type_lists_compatible_p): Do not remove atomic qualifiers when
2713 comparing types.
2714 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2715 (build_atomic_assign): New functions.
2716 (build_unary_op): Use build_atomic_assign for atomic increment and
2717 decrement.
2718 (build_conditional_expr): Do not treat _Atomic void as a qualified
2719 version of void.
2720 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2721 (find_anonymous_field_with_type, convert_to_anonymous_field)
2722 (convert_for_assignment): Do not remove atomic qualifiers when
2723 comparing types.
2724 (digest_init): Do not accept initialization of arrays of atomic
2725 elements by string constants.
2726 (build_asm_expr): Use convert_lvalue_to_rvalue.
2727 (build_binary_op): Do not treat _Atomic void as a qualified
2728 version of void.
2729
8b023e7c 27302013-11-06 DJ Delorie <dj@redhat.com>
2731
2732 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2733 both explicit and builtin, print the location of the explicit one.
2734
c630ef93 27352013-11-05 Tobias Burnus <burnus@net-b.de>
2736
2737 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2738 c_parser_omp_distribute, c_parser_omp_teams,
2739 c_parser_omp_target, c_parser_omp_declare): Handle
2740 -fopenmp-simd.
2741
2c4c3477 27422013-11-03 Marek Polacek <polacek@redhat.com>
2743
2744 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2745
df205251 27462013-11-01 Jakub Jelinek <jakub@redhat.com>
2747
2748 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2749 check_dup_generic at the end, unless remove is true.
2750 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2751 remove = true;.
2752 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2753
23871d0c 27542013-10-31 Jakub Jelinek <jakub@redhat.com>
2755
2756 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2757 with decl that is not pointer nor array.
2758
d037099f 27592013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2760
2761 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2762 a spawning function is found.
2763 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2764 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2765 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2766 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2767 case.
2768 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2769 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2770 expr.
2771 (c_finish_return): Added a check to reject _Cilk_spawn in return
2772 expression.
2773 (build_cilk_spawn): New function.
2774 (build_cilk_sync): Likewise.
2775 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2776
4c90c04c 27772013-10-27 Tobias Burnus <burnus@net-b.de>
2778
2779 PR other/33426
2780 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2781 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2782 (c_parser_statement_after_labels): Update calls.
2783
48a972c8 27842013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 2785
2786 PR other/33426
2787 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2788 Handle PRAGMA_IVDEP.
2789 (c_parser_statement_after_labels): Update call.
2790
12f86df0 27912013-10-24 Marek Polacek <polacek@redhat.com>
2792
2793 * c-parser.c (c_parser_struct_declaration): Add a comment.
2794 (c_parser_declarator): Don't allow _Alignas here.
2795
7740abd8 27962013-10-17 Andrew MacLeod <amacleod@redhat.com>
2797
2798 * c-parser.c: Include omp-low.h.
2799 * c-typeck.c: Likewise.
2800
43d03c23 28012013-10-17 Marek Polacek <polacek@redhat.com>
2802
2803 PR c/58267
2804 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2805 Document syntax of the array-declarator.
2806 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2807 are not permitted.
2808 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2809 (c_parser_struct_declaration): Likewise.
2810 (c_parser_declarator): Likewise.
2811 (c_parser_direct_declarator_inner): Likewise.
2812 (c_parser_parameter_declaration): Likewise.
2813 (c_parser_type_name): Likewise.
2814
bc7bff74 28152013-10-11 Jakub Jelinek <jakub@redhat.com>
2816
2817 * c-lang.h (current_omp_declare_target_attribute): New extern
2818 decl.
2819 * c-parser.c: Include c-lang.h.
2820 (struct c_parser): Change tokens to c_token *.
2821 Add tokens_buf field. Change tokens_avail type to unsigned int.
2822 (c_parser_consume_token): If parser->tokens isn't
2823 &parser->tokens_buf[0], increment parser->tokens.
2824 (c_parser_consume_pragma): Likewise.
2825 (enum pragma_context): Add pragma_struct and pragma_param.
2826 (c_parser_external_declaration): Adjust
2827 c_parser_declaration_or_fndef caller.
2828 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2829 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2830 Adjust recursive call.
2831 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2832 of pragma_external.
2833 (c_parser_parameter_declaration): Use pragma_param instead of
2834 pragma_external.
2835 (c_parser_compound_statement_nostart, c_parser_label,
2836 c_parser_for_statement): Adjust
2837 c_parser_declaration_or_fndef callers.
2838 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2839 it through to c_parser_conditional_expression.
2840 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2841 pass it through to c_parser_binary_expression. Adjust recursive
2842 call.
2843 (c_parser_binary_expression): Remove prec argument, add
2844 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2845 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2846 binop matches it, use build2 instead of parser_build_binary_op.
2847 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2848 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2849 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2850 Handle pragma_struct and pragma_param the same as pragma_external.
2851 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2852 (c_parser_omp_variable_list): Parse array sections for
2853 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2854 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2855 (c_parser_omp_clause_reduction): Handle user defined reductions.
2856 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2857 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2858 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2859 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2860 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2861 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2862 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2863 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2864 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2865 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2866 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2867 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2868 (c_parser_omp_for_loop): Add CODE argument, pass it through
2869 to c_finish_omp_for. Change last argument to cclauses,
2870 and adjust uses to grab parallel clauses from the array of all
2871 the split clauses. Adjust c_parser_binary_expression,
2872 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2873 (omp_split_clauses): New function.
2874 (c_parser_omp_simd): New function.
2875 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2876 Allow the function to be called also when parsing combined constructs,
2877 and call c_parser_omp_simd when parsing for simd.
2878 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2879 #pragma omp section, require exactly one structured-block instead of
2880 sequence of statements.
2881 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2882 Allow the function to be called also when parsing combined constructs.
2883 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2884 Allow the function to be called also when parsing combined
2885 constructs.
2886 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2887 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2888 c_parser_omp_teams, c_parser_omp_target_data,
2889 c_parser_omp_target_update, c_parser_omp_target,
2890 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2891 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2892 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2893 (c_parser_omp_construct): Add p_name and mask vars. Handle
2894 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2895 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2896 and c_parser_omp_sections callers.
2897 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2898 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2899 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2900 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2901 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2902 OMP_CLAUSE_DEPEND.
2903 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2904 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2905 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2906 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2907 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2908 * c-typeck.c: Include tree-inline.h.
2909 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2910 handle_omp_array_sections_1, handle_omp_array_sections,
2911 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2912 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2913 user defined reductions.
2914 (c_tree_equal): New function.
2915 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2916 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2917 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2918 c_check_omp_declare_reduction_r): New prototypes.
2919 * c-decl.c (current_omp_declare_target_attribute): New variable.
2920 (c_decl_attributes): New function.
2921 (start_decl, start_function): Use it instead of decl_attributes.
2922 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2923 c_omp_reduction_decl, c_omp_reduction_lookup,
2924 c_check_omp_declare_reduction_r): New functions.
2925
3ce7d1bd 29262013-09-25 Tom Tromey <tromey@redhat.com>
2927
2928 * Make-lang.in (c/gccspec.o): Remove.
2929 (CFLAGS-c/gccspec.o): New variable.
2930 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2931 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2932 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2933
96da1c1d 29342013-09-25 Tom Tromey <tromey@redhat.com>
2935
2936 * Make-lang.in (c/gccspec.o): Don't use subshell.
2937
1b309377 29382013-09-18 Marek Polacek <polacek@redhat.com>
2939
2940 PR sanitize/58443
2941 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2942 Remove unnecessary check.
2943
05f893e1 29442013-09-18 Marek Polacek <polacek@redhat.com>
2945
2946 PR sanitizer/58411
2947 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2948 no_sanitize_undefined attribute.
2949
bda0b9d2 29502013-09-13 Kai Tietz <ktietz@redhat.com>
2951
2952 PR target/57848
2953 * c-decl.c (c_builtin_function_ext_scope): Remove
2954 wrong assumption that it is never called on prexisting
2955 symbol.
2956
73437615 29572013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2958
2959 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2960
eaab24b9 29612013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2962
2963 * c-objc-common.c (c_tree_printer): Tidy.
2964
9e46467d 29652013-08-30 Marek Polacek <polacek@redhat.com>
2966
2967 * c-typeck.c (build_binary_op): Add division by zero and shift
2968 instrumentation.
2969
f8234178 29702013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
f9086116 2971 Joseph Myers <joseph@codesourcery.com>
f8234178 2972
c90a7d10 2973 PR c/35649
f8234178 2974 * c-typeck.c (c_common_type): Prefer double_type_node over
2975 other REAL_TYPE types with the same precision.
2976 (convert_arguments): Likewise.
2977
6f07f480 29782013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2979
2980 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2981 (c_initialize_diagnostics): Call a destructor for the early printer.
2982
eed6bc21 29832013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2984
2985 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2986 printer initialization.
2987
57717943 29882013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
eed6bc21 2989
57717943 2990 PR c/57490
2991 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2992 check for truth values.
2993 (expand_array_notation_exprs): Added truth values case. Removed an
2994 unwanted else. Added for-loop to walk through subtrees in default
2995 case.
2996
a94db6b0 29972013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2998
2999 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3000
e76163a9 30012013-07-23 Joseph Myers <joseph@codesourcery.com>
3002
3003 * c-parser.c (struct c_generic_association): Fix typo.
3004
7aa04c8d 30052013-07-23 Tom Tromey <tromey@redhat.com>
3006 Joseph Myers <joseph@codesourcery.com>
3007
3008 * c-parser.c (struct c_generic_association): New.
3009 (c_generic_association_d): New typedef.
3010 (c_parser_generic_selection): New function.
3011 (c_parser_postfix_expression): Handle RID_GENERIC.
3012
76bbe4ca 30132013-07-13 Jason Merrill <jason@redhat.com>
3014
3015 PR c++/57793
3016 * c-decl.c (finish_struct): Check for too-large class.
3017
21ebaa24 30182013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 3019
3020 PR c/57821
3021 * c-typeck.c (set_init_index): When folding, check for index overflow.
3022
936c3081 30232013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3024
3025 * c-parser.c (c_parser_array_notation): Removed rejection of array
3026 notations in an array of function pointers.
3027
50acebe0 30282013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3029
3030 * c-array-notation.c (make_triplet_val_inv): New function.
3031 (create_cmp_incr): Likewise.
3032 (create_array_refs): Likewise.
3033 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3034 Also modularized common parts between functions and called the function.
3035 (build_array_notation_expr): Likewise.
3036 (fix_conditional_array_notations_1): Likewise.
3037 (fix_array_notation_expr): Likewise.
3038 (fix_array_notation_call_expr): Likewise.
3039
01e6cdb4 30402013-06-18 Marek Polacek <polacek@redhat.com>
3041
3042 PR c/57630
3043 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3044
6a3adac6 30452013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3046
3047 * c-array-notation.c (build_array_notation_expr): Reject array notation
3048 mismatch between LHS and RHS even inside a call_expr. Also, removed
3049 a couple while statements that were dead code.
3050
62aab3f3 30512013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3052
3053 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3054 excessive precision expressions in function parameters. Also removed
3055 couple unwanted while statements.
3056
bfc83720 30572013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3058
3059 * c-array-notation.c (expand_array_notation_exprs): Added
3060 ARRAY_NOTATION_REF case.
3061
09970d67 30622013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3063
3064 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3065 function to c-family/array-notation-common.c.
3066 (is_cilkplus_reduce_builtin): Likewise.
3067 (find_rank): Likewise.
3068 (extract_array_notation_exprs): Likewise.
3069 (replace_array_notations): Likewise.
3070 (find_inv_trees): Likewise.
3071 (replace_inv_trees): Likewise.
3072 (contains_array_notation_expr): Likewise.
3073 (find_correct_array_notation_type): Likewise.
3074 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3075 (struct inv_list): Moved this to c-family/array-notation-common.c.
3076 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3077
6e13bc01 30782013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3079
3080 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3081 reduction functions outside the for-loop. Added a check if the fundecl
3082 is non-NULL. Finally, removed an unwanted if-statement, and made the
3083 body unconditional.
3084
cc92dddc 30852013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3086
3087 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3088 condition of the if-statement matches the rank of else-block and then-
3089 block when array notations are used.
3090 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3091 expression after the entire function body is parsed.
3092 (c_parser_expr_no_commas): Delayed creating array notation expressions
3093 to the end of function parsing.
3094 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3095 whole if-statement instead of just the condition.
3096 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3097
eddc63fd 30982013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3099
3100 PR c/57474
3101 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3102 array to NULL_TREE if they are unused. Also added a check for the
3103 field to be NULL before its fields are used in future.
3104
a2115a4a 31052013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3106
3107 PR bootstrap/57450
3108 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3109 (build_array_notation_expr): Likewise.
3110
3c6d4197 31112013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3112
3113 * c-typeck.c (build_array_ref): Added a check to see if array's
3114 index is greater than one. If true, then emit an error.
3115 (build_function_call_vec): Exclude error reporting and checking
3116 for builtin array-notation functions.
3117 (convert_arguments): Likewise.
3118 (c_finish_return): Added a check for array notations as a return
3119 expression. If true, then emit an error.
3120 (c_finish_loop): Added a check for array notations in a loop
3121 condition. If true then emit an error.
3122 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3123 (build_binary_op): Added a check for array notation expr inside
3124 op1 and op0. If present, we call another function to find correct
3125 type.
3126 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3127 * c-parser.c (c_parser_compound_statement): Check if array
3128 notation code is used in tree, if so, then transform them into
3129 appropriate C code.
3130 (c_parser_expr_no_commas): Check if array notation is used in LHS
3131 or RHS, if so, then build array notation expression instead of
3132 regular modify.
3133 (c_parser_postfix_expression_after_primary): Added a check for
3134 colon(s) after square braces, if so then handle it like an array
3135 notation. Also, break up array notations in unary op if found.
3136 (c_parser_direct_declarator_inner): Added a check for array
3137 notation.
3138 (c_parser_compound_statement): Added a check for array notation in
3139 a stmt. If one is present, then expand array notation expr.
3140 (c_parser_if_statement): Likewise.
3141 (c_parser_switch_statement): Added a check for array notations in
3142 a switch statement's condition. If true, then output an error.
3143 (c_parser_while_statement): Similarly, but for a while.
3144 (c_parser_do_statement): Similarly, but for a do-while.
3145 (c_parser_for_statement): Similarly, but for a for-loop.
3146 (c_parser_unary_expression): Check if array notation is used in a
3147 pre-increment or pre-decrement expression. If true, then expand
3148 them.
3149 (c_parser_array_notation): New function.
3150 * c-array-notation.c: New file.
3151 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3152
2c1c8a2c 31532013-05-23 Mike Stump <mikestump@comcast.net>
3154
3155 * c-typeck.c (convert_for_assignment): Handle references to memory
3156 spaces better.
3157
be5f9e46 31582013-05-16 Jason Merrill <jason@redhat.com>
3159
3160 * Make-lang.in (cc1$(exeext)): Use link mutex.
3161
9205a6cc 31622013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3163
3164 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3165 to simply use OPT_Wpointer_arith.
3166 (build_unary_op): Likewise.
3167
0b049e15 31682013-04-03 Jakub Jelinek <jakub@redhat.com>
3169
3170 PR c/19449
3171 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3172 argument. If set, or it temporarily for parsing of the first
3173 argument into force_folding_builtin_constant_p.
3174 (c_parser_postfix_expression): Adjust callers.
3175
8e966116 31762013-03-21 Richard Biener <rguenther@suse.de>
3177
3178 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3179 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3180
b862f263 31812013-02-12 Marek Polacek <polacek@redhat.com>
3182
3183 PR c/44938
3184 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3185 origtypes to NULL.
3186
54550ecb 31872013-01-24 Jakub Jelinek <jakub@redhat.com>
3188
3189 PR c/56078
3190 * c-typeck.c (set_nonincremental_init_from_string): If
3191 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3192 returned false.
3193 (process_init_element): Likewise.
3194
035b65e2 31952012-12-20 Jakub Jelinek <jakub@redhat.com>
3196
3197 PR c++/55619
3198 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3199 argument, don't call default_function_array_conversion
3200 nor c_fully_fold here.
3201 (c_parser_asm_statement): Adjust callers.
3202 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3203 and outputs here, and call default_function_array_conversion
3204 on inputs that don't need to be addressable.
3205
7cbb7f1a 32062012-12-18 Jakub Jelinek <jakub@redhat.com>
3207
3208 PR c/39464
3209 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3210 warning require that both c_common_unsigned_type as well as
3211 c_common_signed_type is the same for both mvl and mvr types.
3212
f1f41a6c 32132012-11-16 Diego Novillo <dnovillo@google.com>
3214
3215 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3216
3217 * c-common.c: Use new vec API in vec.h.
3218 * c-common.h: Likewise.
3219 * c-gimplify.c: Likewise.
3220 * c-pragma.c: Likewise.
3221 * c-pretty-print.c: Likewise.
3222 * c-pretty-print.h: Likewise.
3223 * c-semantics.c: Likewise.
3224 * c-decl.c: Likewise.
3225 * c-parser.c: Likewise.
3226 * c-tree.h: Likewise.
3227 * c-typeck.c: Likewise.
3228
8b447d3f 32292012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3230
3231 PR c++/54930
3232 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3233
08fc5390 32342012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3235
3236 PR c/53066
3237 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3238 shadows a function, unless the variable is a function or a
3239 pointer-to-function.
3240
57f872a2 32412012-10-12 Jakub Jelinek <jakub@redhat.com>
3242
3243 PR c/54381
3244 * c-parser.c (struct c_tree_loc_pair): Removed.
3245 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3246 add location_t * and tree * arguments, fill in array of 3
3247 sizeof_arg trees and corresponding locs.
3248 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3249 c_parser_expr_list callers.
3250 (c_parser_postfix_expression_after_primary): Likewise. Pass
3251 array of 3 sizeof_arg trees and locs (corresponding to first
3252 3 arguments) to sizeof_pointer_memaccess_warning.
3253
d1455aa3 32542012-10-09 Lawrence Crowl <crowl@google.com>
3255
3256 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3257 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3258 hash table.
3259
b0e7825e 32602012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3261
3262 PR c++/54194
3263 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3264 call.
3265
41ed701a 32662012-10-09 Marc Glisse <marc.glisse@inria.fr>
3267
3268 PR c++/54427
3269 * c-typeck.c: Include c-common.h.
3270 (enum stv_conv): Moved to c-common.h.
3271 (scalar_to_vector): Moved to c-common.c.
3272 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3273 * Make-lang.in: c-typeck.c depends on c-common.h.
3274
ef34afc1 32752012-10-04 Arnaud Charlet <charlet@adacore.com>
3276
3277 * c-decl.c (c_write_global_declarations): Fix handling of
3278 -fdump-ada-spec*.
3279
7bd765d4 32802012-09-30 Sharad Singhai <singhai@google.com>
3281
3282 * c-decl.c (c_write_global_declarations): Use a different method
3283 to determine if the dump has ben initialized.
3284
c4b1a13a 32852012-09-14 Joseph Myers <joseph@codesourcery.com>
3286
3287 PR c/54552
3288 * c-typeck.c (c_cast_expr): When casting to a type requiring
3289 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3290 c_fully_fold first.
3291
bb554051 32922012-09-14 Joseph Myers <joseph@codesourcery.com>
3293
3294 PR c/54103
3295 * c-typeck.c (build_unary_op): Pass original argument of
3296 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3297 any C_MAYBE_CONST_EXPR, if it has integer operands.
3298 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3299 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3300 to c_objc_common_truthvalue_conversion, then remove any
3301 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3302 c_objc_common_truthvalue_conversion not
3303 c_common_truthvalue_conversion.
3304 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3305 call note_integer_operands for arguments with integer operands
3306 that are not integer constants.
3307
c708c6ef 33082012-09-13 Jakub Jelinek <jakub@redhat.com>
3309
3310 PR c/54559
3311 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3312 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3313
cce20430 33142012-08-31 Jakub Jelinek <jakub@redhat.com>
3315
3316 PR c/54428
3317 * c-convert.c (convert): Don't call fold_convert_loc if
3318 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3319 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3320 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3321
a90d57ed 33222012-08-24 Jakub Jelinek <jakub@redhat.com>
3323
3324 PR c/54355
3325 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3326 for nested and empty_ok arguments in the call to
3327 c_parser_declaration_or_fndef.
3328
f003f5dc 33292012-08-17 Jakub Jelinek <jakub@redhat.com>
3330
3331 * c-tree.h (c_last_sizeof_arg): Declare.
3332 * c-parser.c (struct c_tree_loc_pair): New type.
3333 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3334 non-NULL.
3335 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3336 (c_parser_postfix_expression_after_primary): Likewise. Call
3337 sizeof_pointer_memaccess_warning if needed.
3338 (sizeof_ptr_memacc_comptypes): New function.
3339 * c-typeck.c (c_last_sizeof_arg): New global variable.
3340 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3341
a5656b73 33422012-07-24 Uros Bizjak <ubizjak@gmail.com>
3343
3344 * c-lang.h (lang_decl): Add variable_size GTY option.
3345
b9ed1410 33462012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3347
3348 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3349 * Make-lang.in: Fix dependencies.
3350
e53d55e7 33512012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3352
3353 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3354 and add language Makefile hooks.
3355 * config-lang.in: New file.
3356 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3357 add the required "normal" config-lang.in rules.
3358 * c-lang.h: Moved from gcc/ to here.
3359 * c-tree.h: Likewise.
3360 * c-objc-common.c: Likewise.
3361 * c-objc-common.h: Likewise.
3362 * c-typeck.c: Likewise.
3363 * c-convert.c: Likewise.
3364 * c-lang.c: Likewise.
3365 * c-aux-info.c: Likewise.
3366 * c-errors.c: Likewise.
3367 * gccspec.c: Likewise.
3368 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3369 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3370\f
f1717362 3371Copyright (C) 2012-2016 Free Software Foundation, Inc.
e53d55e7 3372
3373Copying and distribution of this file, with or without modification,
3374are permitted in any medium without royalty provided the copyright
3375notice and this notice are preserved.