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