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