re PR c/71266 (gcc ICE on x86_64-linux-gnu in "store_parm_decls_oldstyle")
[gcc.git] / gcc / c / ChangeLog
1 2016-05-25 Marek Polacek <polacek@redhat.com>
2
3 PR c/71265
4 * c-decl.c (c_make_fname_decl): Don't check seen_error.
5
6 PR c/71266
7 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
8
9 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
10
11 * c-parser.c (c_parser_oacc_declare): Add support for
12 GOMP_MAP_FIRSTPRIVATE_POINTER.
13 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
14 argument with enum c_omp_region_type ort.
15 (handle_omp_array_sections): Likewise. Update call to
16 handle_omp_array_sections_1.
17 (c_finish_omp_clauses): Add specific errors and warning messages for
18 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
19 call to handle_omp_array_sections.
20
21 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
22
23 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
24
25 2016-05-24 Richard Biener <rguenther@suse.de>
26
27 PR middle-end/70434
28 PR c/69504
29 * c-typeck.c (build_array_ref): Do not complain about indexing
30 non-lvalue vectors. Adjust for function name change.
31
32 2016-05-20 Martin Sebor <msebor@redhat.com>
33
34 PR c/71115
35 * c-typeck.c (error_init): Use
36 expansion_point_location_if_in_system_header.
37 (warning_init): Same.
38
39 2016-05-19 David Malcolm <dmalcolm@redhat.com>
40
41 PR c/71171
42 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
43 in error-handling.
44 (c_parser_postfix_expression): Likewise.
45 * c-tree.h (c_expr::set_error): New method.
46 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
47 that result's range is initialized.
48
49 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
50
51 * c-typeck.c (parser_build_unary_op): Fix formatting.
52
53 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
54
55 * c-decl.c (grokdeclarator): Remove errmsg and use of
56 targetm.invalid_return_type.
57 (grokparms): Remove errmsg and use of
58 targetm.invalid_parameter_type.
59
60 2016-05-13 Joseph Myers <joseph@codesourcery.com>
61
62 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
63 function return type.
64
65 2016-05-12 Marek Polacek <polacek@redhat.com>
66
67 PR c/70756
68 * c-decl.c (build_compound_literal): Pass LOC down to
69 c_incomplete_type_error.
70 * c-tree.h (require_complete_type): Adjust declaration.
71 (c_incomplete_type_error): Likewise.
72 * c-typeck.c (require_complete_type): Add location parameter, pass it
73 down to c_incomplete_type_error.
74 (c_incomplete_type_error): Add location parameter, pass it down to
75 error_at.
76 (build_component_ref): Pass location down to c_incomplete_type_error.
77 (default_conversion): Pass location down to require_complete_type.
78 (build_array_ref): Likewise.
79 (build_function_call_vec): Likewise.
80 (convert_arguments): Likewise.
81 (build_unary_op): Likewise.
82 (build_c_cast): Likewise.
83 (build_modify_expr): Likewise.
84 (convert_for_assignment): Likewise.
85 (c_finish_omp_clauses): Likewise.
86
87 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
88
89 PR c/43651
90 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
91 is enabled.
92 * c-errors.c (pedwarn_c90): Return true if warned.
93 * c-tree.h (pedwarn_c90): Change return type to bool.
94 (enum c_declspec_word): Add new enumerator cdw_atomic.
95
96 2016-05-11 Marek Polacek <polacek@redhat.com>
97
98 PR c++/71024
99 * c-decl.c (diagnose_mismatched_decls): Factor out code to
100 diagnose_mismatched_attributes and call it.
101
102 2016-05-10 Marek Polacek <polacek@redhat.com>
103
104 PR c/70255
105 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
106 on a declaration following the definition.
107
108 2016-05-05 Jakub Jelinek <jakub@redhat.com>
109
110 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
111 parse it through to c_parser_c99_block_statement.
112 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
113 caller.
114
115 2016-05-04 Marek Polacek <polacek@redhat.com>
116
117 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
118 OPT_Wdangling_else.
119
120 2016-05-04 Marek Polacek <polacek@redhat.com>
121
122 PR c/48778
123 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
124 for macro expansions.
125
126 2016-05-03 Marek Polacek <polacek@redhat.com>
127
128 PR c/70859
129 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
130 check_builtin_function_arguments.
131
132 2016-05-03 Richard Biener <rguenther@suse.de>
133
134 * Make-lang.in (cc1-checksum.c): For stage-final re-use
135 the checksum from the previous stage.
136
137 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
138
139 * c-parser.c (c_parser_oacc_all_clauses): Update call to
140 c_finish_omp_clauses.
141 (c_parser_omp_all_clauses): Likewise.
142 (c_parser_oacc_cache): Likewise.
143 (c_parser_oacc_loop): Likewise.
144 (omp_split_clauses): Likewise.
145 (c_parser_omp_declare_target): Likewise.
146 (c_parser_cilk_all_clauses): Likewise.
147 (c_parser_cilk_for): Likewise.
148 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
149 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
150
151 2016-05-02 Marek Polacek <polacek@redhat.com>
152
153 PR c/70851
154 * c-decl.c (grokdeclarator): Diagnose when array's size has an
155 incomplete type.
156
157 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
158
159 PR middle-end/70626
160 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
161 OACC_LOOP_CLAUSE_MASK.
162 (c_parser_oacc_kernels_parallel): Update call to
163 c_oacc_split_loop_clauses.
164
165 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
166
167 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
168 argument to build_modify_expr in two cases.
169
170 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
171
172 * c-parser.c (c_parser_postfix_expression_after_primary): Call
173 warn_for_memset instead of warning directly here.
174
175 2016-04-26 Marek Polacek <polacek@redhat.com>
176
177 PR c/67784
178 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
179 out of ...
180 (c_parser_for_statement): ... here.
181 (c_parser_if_statement): Use it.
182 (c_parser_switch_statement): Use it.
183 (c_parser_while_statement): Use it.
184
185 PR c/70791
186 * c-decl.c (pushdecl): Pass LOCUS down to warning.
187
188 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
189
190 PR c++/69363
191 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
192 instead of c_finish_cilk_clauses.
193 * c-tree.h (c_finish_omp_clauses): Add new default argument.
194 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
195 floating-point variables in the linear clause for Cilk Plus.
196
197 2016-04-18 Michael Matz <matz@suse.de>
198
199 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
200 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
201
202 2016-04-15 Marek Polacek <polacek@redhat.com>
203
204 PR c/70671
205 * c-typeck.c (build_unary_op): Pass location down to error and
206 warning call.
207
208 2016-04-15 Jakub Jelinek <jakub@redhat.com>
209
210 PR c/70436
211 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
212 where needed.
213 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
214 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
215 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
216 Adjust c_parser_pragma callers.
217 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
218 caller.
219 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
220 c_parser_statement.
221 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
222 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
223 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
224 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
225 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
226 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
227 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
228 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
229 down where needed.
230 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
231 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
232 calls.
233
234 2016-04-13 Marek Polacek <polacek@redhat.com>
235
236 PR c/70436
237 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
238 adjust callers.
239 (c_parser_statement): Likewise.
240 (c_parser_c99_block_statement): Likewise.
241 (c_parser_while_statement): Likewise.
242 (c_parser_for_statement): Likewise.
243 (c_parser_if_body): Don't set IF_P here.
244 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
245 about dangling else here.
246 * c-tree.h (c_finish_if_stmt): Adjust declaration.
247 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
248 warn about dangling else here.
249
250 2016-04-04 Marek Polacek <polacek@redhat.com>
251
252 PR c/70307
253 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
254
255 2016-03-31 Marek Polacek <polacek@redhat.com>
256
257 PR c/70297
258 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
259
260 2016-03-18 David Malcolm <dmalcolm@redhat.com>
261
262 PR c/70281
263 * c-parser.c (c_parser_postfix_expression): Set the source range
264 for uses of "__builtin_types_compatible_p".
265
266 2016-03-17 Jakub Jelinek <jakub@redhat.com>
267
268 PR c/70280
269 * c-typeck.c (composite_type): Don't count void_list_node
270 into len, if the list is terminated by void_list_node, start
271 with void_list_node instead of NULL for newargs. Stop
272 at void_list_node.
273
274 2016-03-16 Marek Polacek <polacek@redhat.com>
275
276 PR c/70093
277 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
278 nested functions returning VM types.
279
280 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
281
282 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
283 when calling c_finish_omp_clauses.
284
285 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
286
287 PR c/69824
288 * c-decl.c (get_parm_info): Don't queue implicit function declarations
289 for later.
290
291 2016-03-04 Marek Polacek <polacek@redhat.com>
292
293 PR c/69798
294 * c-parser.c (c_parser_postfix_expression): Call
295 c_parser_cast_expression rather than c_parser_postfix_expression.
296
297 2016-03-01 Jakub Jelinek <jakub@redhat.com>
298
299 PR c/69796
300 PR c/69974
301 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
302 of incomplete decls to error_mark_node.
303
304 2016-02-24 Marek Polacek <polacek@redhat.com>
305
306 PR c/69819
307 * c-decl.c (finish_decl): Don't update the copy of the type of a
308 different decl type.
309
310 2016-02-23 Jakub Jelinek <jakub@redhat.com>
311
312 PR objc/69844
313 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
314 in id_kind reclassification.
315
316 2016-02-16 Jakub Jelinek <jakub@redhat.com>
317
318 PR c/69835
319 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
320
321 2016-02-16 James Norris <jnorris@codesourcery.com>
322
323 PR c/64748
324 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
325
326 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
327
328 * c-decl.c (build_null_declspecs): Zero the entire struct.
329
330 PR c/69522
331 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
332 callers changed. If nested_p is true, use it to call
333 finish_implicit_inits.
334 * c-tree.h (finish_implicit_inits): Declare.
335 * c-typeck.c (finish_implicit_inits): New function. Move code
336 from ...
337 (push_init_level): ... here.
338 (set_designator, process_init_element): Call finish_implicit_inits.
339
340 2016-02-11 Jakub Jelinek <jakub@redhat.com>
341
342 PR c/69768
343 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
344 arguments for -Waddress warning.
345
346 2016-02-04 Jakub Jelinek <jakub@redhat.com>
347
348 PR c/69669
349 * c-decl.c (finish_enum): When honoring mode attribute,
350 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
351
352 2016-01-29 Jakub Jelinek <jakub@redhat.com>
353
354 PR debug/69518
355 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
356 all type variants, not just TYPE_MAIN_VARIANT.
357
358 2016-01-27 Jakub Jelinek <jakub@redhat.com>
359
360 PR debug/66869
361 * c-decl.c (c_write_global_declarations_1): Warn with
362 warn_unused_function if static prototype without definition
363 is not C_DECL_USED.
364
365 2016-01-27 Marek Polacek <polacek@redhat.com>
366
367 PR c/68062
368 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
369 to unsigned, if needed. Add -Wsign-compare warning.
370
371 2016-01-26 Jakub Jelinek <jakub@redhat.com>
372
373 PR tree-optimization/69483
374 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
375
376 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
377
378 PR c/24293
379 * c-tree.h (incomplete_record_decls): Declare.
380 * c-parser.c (incomplete_record_decls): Define.
381 (c_parser_translation_unit): Iterate through incomplete_record_decls and
382 report error if any decl has zero size.
383 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
384 or enum type to incomplete_record_decls.
385
386 2016-01-14 Tom de Vries <tom@codesourcery.com>
387
388 PR tree-optimization/68773
389 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
390 set force_output.
391
392 2016-01-14 Marek Polacek <polacek@redhat.com>
393
394 PR c/69262
395 * c-decl.c (grokdeclarator): Provide more information for invalid
396 array declarations.
397
398 2016-01-06 David Malcolm <dmalcolm@redhat.com>
399
400 * c-parser.c (c_parser_unary_expression): For dereferences, build
401 a combined location before calling build_indirect_ref, so that
402 error reports cover the full range, manually updating the c_expr
403 src_range.
404
405 2016-01-06 Marek Polacek <polacek@redhat.com>
406
407 PR sanitizer/69099
408 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
409 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
410 NULL.
411
412 2016-01-04 Jakub Jelinek <jakub@redhat.com>
413
414 Update copyright years.
415
416 2016-01-04 Marek Polacek <polacek@redhat.com>
417
418 PR c/68908
419 * c-typeck.c (build_atomic_assign): Improve commentary. Add
420 optimization to use __atomic_fetch_* built-in if possible.
421
422 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
423
424 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
425 into...
426 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
427 all users.
428
429 2015-12-22 Marek Polacek <polacek@redhat.com>
430
431 PR c/69002
432 * c-typeck.c (build_component_ref): Warn when acessing elements of
433 atomic structures or unions.
434
435 2015-12-21 David Malcolm <dmalcolm@redhat.com>
436
437 * c-typeck.c: Include "gcc-rich-location.h".
438 (build_binary_op): In the two places that call binary_op_error,
439 create a gcc_rich_location and populate it with the location of
440 the binary op and its two operands.
441
442 2015-12-16 David Malcolm <dmalcolm@redhat.com>
443
444 * c-parser.c (c_parser_statement_after_labels): When calling
445 c_finish_return, Use the return expression's location if it has
446 one, falling back to the location of the first token within it.
447 * c-typeck.c (c_finish_return): When issuing warnings about
448 the incorrect presence/absence of a return value, issue a note
449 showing the declaration of the function.
450
451 2015-12-16 David Malcolm <dmalcolm@redhat.com>
452
453 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
454 to 4.
455 (c_parser_peek_nth_token): New function.
456 (c_parser_peek_conflict_marker): New function.
457 (c_parser_error): Detect conflict markers and report them as such.
458
459 2015-12-16 David Malcolm <dmalcolm@redhat.com>
460
461 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
462 to preserve range information for the primary expression
463 in the call to c_parser_postfix_expression_after_primary.
464
465 2015-12-16 David Malcolm <dmalcolm@redhat.com>
466
467 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
468 expression location, falling back on the first token location,
469 rather than always using the latter.
470
471 2015-12-16 Marek Polacek <polacek@redhat.com>
472
473 PR c/64637
474 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
475 available.
476
477 2015-12-15 Marek Polacek <polacek@redhat.com>
478
479 PR c/68907
480 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
481 artificial decl.
482
483 2015-12-08 David Malcolm <dmalcolm@redhat.com>
484
485 * c-parser.c (c_parser_alignof_expression): Capture location of
486 closing parenthesis (if any), or of end of unary expression, and
487 use it to build a src_range for the expression.
488
489 2015-12-08 David Malcolm <dmalcolm@redhat.com>
490
491 PR c/68757
492 * c-parser.c (c_parser_get_builtin_args): Add
493 "out_close_paren_loc" param, and write back to it.
494 (c_parser_postfix_expression): Capture the closing
495 parenthesis location for RID_CHOOSE_EXPR,
496 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
497 RID_BUILTIN_SHUFFLE and use it to set the source range
498 for such expressions; within RID_BUILTIN_COMPLEX set
499 the underlying location.
500
501 2015-12-07 Marek Polacek <polacek@redhat.com>
502
503 PR c/68668
504 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
505 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
506
507 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
508
509 * c-tree.h (c_build_va_arg): Adjust prototype.
510 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
511 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
512 parameter, adjust throughout and issue an error if EXPR is a component
513 with reverse storage order.
514
515 2015-12-02 Jason Merrill <jason@redhat.com>
516
517 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
518 (c_fully_fold_internal, decl_constant_value_for_optimization):
519 Move from c-common.c.
520 * c-tree.h: Declare decl_constant_value_for_optimization.
521 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
522
523 2015-12-02 Joseph Myers <joseph@codesourcery.com>
524
525 PR c/68162
526 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
527 following link from declarator to next declarator. Track original
528 qualified type and pass it to c_build_qualified_type.
529 * c-typeck.c (c_build_qualified_type): Add arguments
530 orig_qual_type and orig_qual_indirect.
531
532 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
533
534 * c-parser.c (c_parser_omp_clause_name)
535 (c_parser_oacc_all_clauses): Alphabetical sorting.
536
537 2015-12-02 Jakub Jelinek <jakub@redhat.com>
538
539 PR c/68533
540 * c-decl.c (get_parm_info): Use b->locus instead of input_location
541 for diagnostics.
542
543 2015-12-01 Julian Brown <julian@codesourcery.com>
544 Cesar Philippidis <cesar@codesourcery.com>
545 James Norris <James_Norris@mentor.com>
546
547 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
548 (c_parser_oacc_clause_use_device): New function.
549 (c_parser_oacc_all_clauses): Add use_device support.
550 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
551 (c_parser_oacc_host_data): New function.
552 (c_parser_omp_construct): Add host_data support.
553 * c-tree.h (c_finish_oacc_host_data): Add prototype.
554 * c-typeck.c (c_finish_oacc_host_data): New function.
555 (c_finish_omp_clauses): Add use_device support.
556
557 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
558
559 PR c/67106
560 * c-decl.c: Set TYPE_PACKED in variants.
561
562 2015-11-27 Martin Liska <mliska@suse.cz>
563
564 PR c++/68312
565 * c-array-notation.c (fix_builtin_array_notation_fn):
566 Use release_vec_vec instead of vec::release.
567 (build_array_notation_expr): Likewise.
568 (fix_conditional_array_notations_1): Likewise.
569 (fix_array_notation_expr): Likewise.
570 (fix_array_notation_call_expr): Likewise.
571
572 2015-11-27 Jakub Jelinek <jakub@redhat.com>
573
574 PR c/63326
575 * c-parser.c (c_parser_compound_statement_nostart): If
576 last_label is true, use pragma_stmt instead of pragma_compound
577 as second c_parser_pragma argument.
578 (c_parser_omp_ordered, c_parser_omp_target_update,
579 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
580 false as second argument to c_parser_skip_to_pragma_eol after
581 diagnosing standalone directives used in pragma_stmt context.
582
583 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
584
585 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
586 with "if (ENABLE_OFFLOADING)".
587
588 2015-11-23 David Malcolm <dmalcolm@redhat.com>
589
590 PR objc/68438
591 * c-parser.c (c_parser_postfix_expression): Set up source ranges
592 for various Objective-C constructs: Class.name syntax,
593 @selector(), @protocol(), @encode(), and [] message syntax.
594
595 2015-11-20 David Malcolm <dmalcolm@redhat.com>
596
597 PR 62314
598 * c-typeck.c (should_suggest_deref_p): New function.
599 (build_component_ref): Special-case POINTER_TYPE when
600 generating a "not a structure of union" error message, and
601 suggest a "->" rather than a ".", providing a fix-it hint.
602
603 2015-11-19 David Malcolm <dmalcolm@redhat.com>
604
605 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
606 candidate into a new function, find_closest_identifier.
607
608 2015-11-19 Marek Polacek <polacek@redhat.com>
609
610 PR c/68412
611 * c-typeck.c (parser_build_binary_op): Properly handle
612 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
613
614 2015-11-17 David Malcolm <dmalcolm@redhat.com>
615
616 * c-parser.c (set_c_expr_source_range): Bulletproof both
617 overloaded implementations against NULL expr->value.
618 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
619 values.
620 (c_parser_unary_expression): Likewise when handling addresses of
621 labels.
622 (c_parser_postfix_expression): Likewise for statement expressions,
623 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
624 __builtin_va_arg, and for __builtin_offset_of.
625 (c_parser_postfix_expression_after_paren_type): Initialize expr's
626 src_range using the range of the braced initializer.
627 (c_parser_transaction_expression): Set src_range for "ret" to a
628 sane pair of values.
629
630 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
631
632 * c-parser.c (c_finish_omp_declare_simd): Look for
633 "simd" attribute as well. Update error message.
634
635 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
636
637 * c-parser.c (c_parser_omp_declare_target): Adjust.
638
639 2015-11-14 Jakub Jelinek <jakub@redhat.com>
640
641 * c-typeck.c (c_finish_omp_clauses): Don't mark
642 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
643
644 2015-11-14 Marek Polacek <polacek@redhat.com>
645
646 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
647 * c-typeck.c: Likewise.
648
649 2015-11-13 David Malcolm <dmalcolm@redhat.com>
650
651 * c-decl.c (warn_defaults_to): Pass line_table to
652 rich_location ctor.
653 * c-errors.c (pedwarn_c99): Likewise.
654 (pedwarn_c90): Likewise.
655 * c-parser.c (set_c_expr_source_range): New functions.
656 (c_token::get_range): New method.
657 (c_token::get_finish): New method.
658 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
659 based on the range from the start of the LHS to the end of the
660 RHS.
661 (c_parser_conditional_expression): Likewise, based on the range
662 from the start of the cond.value to the end of exp2.value.
663 (c_parser_binary_expression): Call set_c_expr_source_range on
664 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
665 (c_parser_cast_expression): Call set_c_expr_source_range on ret
666 based on the cast_loc through to the end of the expr.
667 (c_parser_unary_expression): Likewise, based on the
668 op_loc through to the end of op.
669 (c_parser_sizeof_expression) Likewise, based on the start of the
670 sizeof token through to either the closing paren or the end of
671 expr.
672 (c_parser_postfix_expression): Likewise, using the token range,
673 or from the open paren through to the close paren for
674 parenthesized expressions.
675 (c_parser_postfix_expression_after_primary): Likewise, for
676 various kinds of expression.
677 * c-tree.h (struct c_expr): Add field "src_range".
678 (c_expr::get_start): New method.
679 (c_expr::get_finish): New method.
680 (set_c_expr_source_range): New decls.
681 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
682 on ret for prefix unary ops.
683 (parser_build_binary_op): Likewise, running from the start of
684 arg1.value through to the end of arg2.value.
685
686 2015-11-13 Marek Polacek <polacek@redhat.com>
687
688 PR c/68320
689 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
690
691 2015-11-13 David Malcolm <dmalcolm@redhat.com>
692
693 * c-typeck.c: Include spellcheck.h.
694 (lookup_field_fuzzy_find_candidates): New function.
695 (lookup_field_fuzzy): New function.
696 (build_component_ref): If the field was not found, try using
697 lookup_field_fuzzy and potentially offer a suggestion.
698
699 2015-11-12 James Norris <jnorris@codesourcery.com>
700 Joseph Myers <joseph@codesourcery.com>
701
702 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
703 (c_parser_omp_clause_name): Handle 'device_resident' clause.
704 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
705 and PRAGMA_OMP_CLAUSE_LINK.
706 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
707 and PRAGMA_OACC_CLAUSE_LINK.
708 (OACC_DECLARE_CLAUSE_MASK): New definition.
709 (c_parser_oacc_declare): New function.
710
711 2015-11-12 Marek Polacek <polacek@redhat.com>
712
713 PR c/67784
714 * c-parser.c (c_parser_for_statement): Reclassify the token in
715 a correct scope.
716
717 2015-11-11 Marek Polacek <polacek@redhat.com>
718
719 PR c/68107
720 PR c++/68266
721 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
722 checking the size of an array.
723
724 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
725
726 * c-array-notation.c: Remove unused header files.
727 * c-aux-info.c: Likewise.
728 * c-convert.c: Likewise.
729 * c-decl.c: Likewise.
730 * c-errors.c: Likewise.
731 * c-lang.c: Likewise.
732 * c-objc-common.c: Likewise.
733 * c-parser.c: Likewise.
734 * c-typeck.c: Likewise.
735 * gccspec.c: Likewise.
736
737 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
738 Cesar Philippidis <cesar@codesourcery.com>
739 James Norris <jnorris@codesourcery.com>
740 Julian Brown <julian@codesourcery.com>
741 Nathan Sidwell <nathan@codesourcery.com>
742
743 c/
744 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
745 routine arg.
746 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
747 (c_parser_pragma): Parse 'acc routine'.
748 (OACC_ROUTINE_CLAUSE_MARK): Define.
749 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
750
751 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
752
753 PR debug/67192
754 * c-typeck.c (c_finish_loop): For unconditional loops, set the
755 location of the backward-goto to the start of the loop body.
756
757 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
758
759 PR debug/67192
760 * c-parser.c (c_parser_while_statement): Finish the loop before
761 parsing ahead for misleading indentation.
762 (c_parser_for_statement): Likewise.
763
764 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
765
766 * c-decl.c (finish_struct): If the structure has reverse storage
767 order, rewrite the type of array fields with scalar component. Call
768 maybe_apply_pragma_scalar_storage_order on entry.
769 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
770 errors on bit-fields and reverse SSO here and not...
771 (c_mark_addressable): ...here.
772 (output_init_element): Adjust call to initializer_constant_valid_p.
773 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
774
775 2015-11-06 David Malcolm <dmalcolm@redhat.com>
776
777 * c-decl.c (warn_defaults_to): Update for change in signature
778 of diagnostic_set_info.
779 * c-errors.c (pedwarn_c99): Likewise.
780 (pedwarn_c90): Likewise.
781 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
782 for textinfo::set_location.
783
784 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
785 Thomas Schwinge <thomas@codesourcery.com>
786 James Norris <jnorris@codesourcery.com>
787
788 * c-parser.c (c_parser_omp_clause_name): Add support for
789 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
790 (c_parser_omp_clause_default): Add is_oacc argument. Handle
791 default(none) in OpenACC.
792 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
793 arguments.
794 (c_parser_oacc_clause_tile): New function.
795 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
796 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
797 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
798 TILE}.
799 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
800 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
801 FIRSTPRIVATE}.
802 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
803 (c_parser_oacc_update): Update the error message for missing clauses.
804 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
805 and OMP_CLAUSE_INDEPENDENT.
806
807 2015-11-05 Marek Polacek <polacek@redhat.com>
808
809 PR c/68090
810 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
811 deal with pre-evaluation on invalid types.
812
813 2015-11-05 Jakub Jelinek <jakub@redhat.com>
814 Ilya Verbin <ilya.verbin@intel.com>
815
816 * c-parser.c: Include context.h and gimple-expr.h.
817 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
818 monotonic together with nonmonotonic.
819 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
820 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
821 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
822 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
823 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
824 expressions on combined target teams before the target.
825 (c_parser_omp_declare_target): If decl has "omp declare target" or
826 "omp declare target link" attribute, and cgraph or varpool node already
827 exists, then set corresponding flags. Call c_finish_omp_clauses
828 in the parenthesized extended-list syntax case.
829 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
830 declare target.
831 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
832 on OMP_CLAUSE_REDUCTION array sections.
833 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
834 into the constant offset, or for variable low-bound using
835 POINTER_PLUS_EXPR. For structure element based array sections use
836 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
837 (c_finish_omp_clauses): Drop generic_field_head, structure
838 elements are now always mapped even as array section bases,
839 diagnose same var in data sharing and mapping clauses. Diagnose if
840 linear step on declare simd is neither a constant nor a uniform
841 parameter. Look through POINTER_PLUS_EXPR for array section
842 reductions. Diagnose the same var or function appearing multiple
843 times on the same directive. Fix up wording for the to clause if t
844 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
845 modifier on kinds other than dynamic or guided or nonmonotonic
846 modifier together with ordered clause.
847
848 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
849 Chung-Lin Tang <cltang@codesourcery.com>
850
851 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
852
853 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
854
855 * c-array-notation.c: Reorder #include's and remove duplicates.
856 * c-aux-info.c: Likewise.
857 * c-convert.c: Likewise.
858 * c-decl.c: Likewise.
859 * c-errors.c: Likewise.
860 * c-lang.c: Likewise.
861 * c-objc-common.c: Likewise.
862 * c-parser.c: Likewise.
863 * c-typeck.c: Likewise.
864
865 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
866
867 PR debug/66068
868 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
869 after calling build_qualified_type.
870
871 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
872 Thomas Schwinge <thomas@codesourcery.com>
873 James Norris <jnorris@codesourcery.com>
874 Joseph Myers <joseph@codesourcery.com>
875 Julian Brown <julian@codesourcery.com>
876 Bernd Schmidt <bschmidt@redhat.com>
877
878 * c-parser.c (c_parser_oacc_shape_clause): New.
879 (c_parser_oacc_simple_clause): New.
880 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
881 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
882
883 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
884 James Norris <jnorris@codesourcery.com>
885 Cesar Philippidis <cesar@codesourcery.com>
886
887 PR c/64765
888 PR c/64880
889 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
890 parameters, and handle these. Adjust all users.
891 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
892 into...
893 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
894 all users.
895 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
896 declare functions.
897 (c_finish_omp_construct): Declare function.
898 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
899 Merge functions into...
900 (c_finish_omp_construct): ... this new function.
901
902 2015-10-22 Richard Biener <rguenther@suse.de>
903
904 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
905 before folding a MINUS_EXPR.
906
907 2015-10-21 Marek Polacek <polacek@redhat.com>
908
909 PR c/68024
910 * c-decl.c (start_function): Warn about vararg functions without
911 a prototype.
912
913 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
914
915 * c-typeck.c (build_conditional_expr): Use boolean vector
916 type for vector comparison.
917 (build_vec_cmp): New.
918 (build_binary_op): Use build_vec_cmp for comparison.
919
920 2015-10-20 Marek Polacek <polacek@redhat.com>
921
922 * c-parser.c (is_cilkplus_vector_p): Don't define here.
923
924 2015-10-20 Marek Polacek <polacek@redhat.com>
925
926 PR c/67964
927 * c-parser.c (c_parser_attributes): Break out of the loop if the
928 token after an attribute isn't a comma.
929
930 2015-10-13 Jakub Jelinek <jakub@redhat.com>
931 Aldy Hernandez <aldyh@redhat.com>
932
933 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
934 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
935 (c_parser_omp_variable_list): Handle structure elements for
936 map, to and from clauses. Handle array sections in reduction
937 clause. Formatting fixes.
938 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
939 if clause modifiers.
940 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
941 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
942 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
943 c_parser_omp_clause_is_device_ptr): New functions.
944 (c_parser_omp_clause_ordered): Parse optional parameter.
945 (c_parser_omp_clause_reduction): Handle array reductions.
946 (c_parser_omp_clause_schedule): Parse optional simd modifier.
947 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
948 functions.
949 (c_parser_omp_clause_linear): Parse linear clause modifiers.
950 (c_parser_omp_clause_depend_sink): New function.
951 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
952 (c_parser_omp_clause_map): Parse release/delete map kinds and
953 optional always modifier.
954 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
955 and c_finish_omp_clauses callers.
956 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
957 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
958 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
959 (OMP_CRITICAL_CLAUSE_MASK): Define.
960 (c_parser_omp_critical): Parse critical clauses.
961 (c_parser_omp_for_loop): Handle doacross loops, adjust
962 c_finish_omp_for and c_finish_omp_clauses callers.
963 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
964 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
965 (OMP_FOR_CLAUSE_MASK): Add linear clause.
966 (c_parser_omp_for): Disallow ordered clause when combined with
967 distribute. Disallow linear clause when combined with distribute
968 and not combined with simd.
969 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
970 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
971 parse clauses and if depend clause is found, don't parse a body.
972 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
973 Allow target parallel without for after it.
974 (OMP_TASK_CLAUSE_MASK): Add priority clause.
975 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
976 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
977 invalid kinds.
978 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
979 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
980 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
981 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
982 functions.
983 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
984 defaultmap and is_device_ptr clauses.
985 (c_parser_omp_target): Parse target parallel and target simd. Set
986 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
987 and target exit data. Diagnose invalid map kinds.
988 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
989 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
990 construct.
991 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
992 &omp_priv.
993 (OMP_TASKLOOP_CLAUSE_MASK): Define.
994 (c_parser_omp_taskloop): New function.
995 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
996 handle PRAGMA_OMP_TASKLOOP.
997 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
998 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
999 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1000 Add IS_OMP argument, handle structure element bases, diagnose
1001 bitfields, pass IS_OMP recursively, diagnose known zero length
1002 array sections in depend clauses, handle array sections in reduction
1003 clause, diagnose negative length even for pointers.
1004 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1005 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1006 array sections in reduction clause, set
1007 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1008 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1009 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1010 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1011
1012 2015-10-06 Marek Polacek <polacek@redhat.com>
1013
1014 * c-parser.c (c_parser_statement_after_labels): Use
1015 protected_set_expr_location.
1016 (c_parser_omp_clause_num_gangs): Likewise.
1017 (c_parser_omp_clause_num_threads): Likewise.
1018 (c_parser_omp_clause_num_workers): Likewise.
1019 (c_parser_omp_clause_vector_length): Likewise.
1020 (c_parser_omp_clause_num_teams): Likewise.
1021 (c_parser_omp_clause_thread_limit): Likewise.
1022 * c-typeck.c (build_c_cast): Likewise.
1023 (c_cast_expr): Likewise.
1024
1025 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1026
1027 * c-typeck.c (c_tree_equal): Use real_equal instead of
1028 REAL_VALUES_EQUAL.
1029
1030 2015-10-04 Jason Merrill <jason@redhat.com>
1031
1032 * c-parser.c (c_lex_one_token): Handle @synchronized.
1033 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1034 can change whether the function is transaction_safe.
1035
1036 2015-10-02 Marek Polacek <polacek@redhat.com>
1037
1038 PR c/67730
1039 * c-typeck.c (convert_for_assignment): Use the expansion point
1040 location throughout.
1041
1042 2015-10-02 Marek Polacek <polacek@redhat.com>
1043
1044 PR c/64249
1045 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1046 and pass it down to c_parser_if_statement.
1047 (c_parser_else_body): Add CHAIN parameter and pass it down to
1048 c_parser_statement_after_labels.
1049 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1050 duplicated if-else-if conditions.
1051
1052 2015-10-01 Marek Polacek <polacek@redhat.com>
1053
1054 * c-typeck.c (convert_for_assignment): Improve commentary.
1055
1056 2015-09-30 Marek Polacek <polacek@redhat.com>
1057
1058 PR c/67730
1059 * c-typeck.c (c_finish_return): Use the expansion point location for
1060 certain "return with value" warnings.
1061
1062 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1063
1064 * c-parser.c (pragma_lex): Add loc argument.
1065
1066 2015-09-15 Marek Polacek <polacek@redhat.com>
1067
1068 PR c/67580
1069 * c-decl.c (tag_exists_p): New function.
1070 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1071 struct/union/enum keywords are missing.
1072 * c-tree.h (tag_exists_p): Declare.
1073
1074 2015-09-15 Marek Polacek <polacek@redhat.com>
1075
1076 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1077 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1078 Return NULL_TREE instead of 0.
1079 (lookup_name): Return NULL_TREE instead of 0.
1080 (lookup_name_in_scope): Likewise.
1081 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1082 (parser_xref_tag): Use false instead of 0.
1083 (start_struct): Use true instead of 1.
1084 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1085
1086 2015-09-14 Marek Polacek <polacek@redhat.com>
1087
1088 * c-typeck.c (set_nonincremental_init_from_string): Use
1089 HOST_WIDE_INT_M1U when shifting a negative value.
1090
1091 2015-09-09 Mark Wielaard <mjw@redhat.com>
1092
1093 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1094 parm against NULL.
1095
1096 2015-09-10 Jakub Jelinek <jakub@redhat.com>
1097
1098 PR c/67502
1099 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1100 into OMP_FOR_PRE_BODY rather than before the loop.
1101
1102 2015-09-09 Jakub Jelinek <jakub@redhat.com>
1103
1104 PR c/67501
1105 * c-parser.c (c_parser_oacc_all_clauses,
1106 c_parser_omp_all_clauses): Remove invalid clause from
1107 list of clauses even if parser->error is set.
1108
1109 PR c/67500
1110 * c-parser.c (c_parser_omp_clause_aligned,
1111 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1112 test for errors.
1113 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1114 error_mark_node.
1115
1116 PR c/67495
1117 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1118 instead of c_parser_unary_expression. If the result is !lvalue_p,
1119 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1120
1121 2015-09-04 Marek Polacek <polacek@redhat.com>
1122
1123 PR sanitizer/67279
1124 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1125
1126 2015-09-03 Martin Sebor <msebor@redhat.com>
1127
1128 PR c/66516
1129 * c-typeck.c (convert_arguments, parser_build_unary_op,
1130 build_conditional_expr, c_cast_expr, convert_for_assignment,
1131 build_binary_op, _objc_common_truthvalue_conversion): Call
1132 reject_gcc_builtin.
1133 (c_decl_implicit): Define.
1134
1135 2015-09-02 Marek Polacek <polacek@redhat.com>
1136
1137 PR c/67432
1138 * c-parser.c (c_parser_enum_specifier): Give a better error for
1139 an empty enum.
1140
1141 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1142
1143 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1144
1145 2015-08-12 Marek Polacek <polacek@redhat.com>
1146
1147 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1148 LOC to it.
1149
1150 2015-08-03 Marek Polacek <polacek@redhat.com>
1151
1152 PR c/67088
1153 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1154 Use it.
1155 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1156
1157 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1158
1159 * c-parser.c (c_parser_if_body): Take token_indent_info
1160 argument. Call warn_for_misleading_indentation even when the
1161 body is a semicolon. Extract token_indent_infos corresponding
1162 to the guard, body and next tokens. Adjust call to
1163 warn_for_misleading_indentation accordingly.
1164 (c_parser_else_body): Likewise.
1165 (c_parser_if_statement): Likewise.
1166 (c_parser_while_statement): Likewise.
1167 (c_parser_for_statement): Likewise.
1168
1169 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1170 Manuel López-Ibáñez <manu@gcc.gnu.org>
1171
1172 * c-decl.c (get_parm_info): Remove static var. Update warning
1173 message.
1174
1175 2015-07-27 Marek Polacek <polacek@redhat.com>
1176
1177 PR c++/66555
1178 PR c/54979
1179 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1180
1181 2015-07-20 Marek Polacek <polacek@redhat.com>
1182
1183 PR c++/55095
1184 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1185 (build_binary_op): Warn about left shift overflows.
1186
1187 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1188
1189 * c-array-notation.c: Adjust includes for flags.h changes.
1190 * c-objc-common.c: Likewise.
1191
1192 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1193
1194 * c-array-notation.c: Adjust includes.
1195 * c-aux-info.c: Likewise.
1196 * c-convert.c: Likewise.
1197 * c-decl.c: Likewise.
1198 * c-errors.c: Likewise.
1199 * c-lang.c: Likewise.
1200 * c-objc-common.c: Likewise.
1201 * c-parser.c: Likewise.
1202 * c-typeck.c: Likewise.
1203
1204 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1205
1206 PR fortran/66605
1207 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1208
1209 2015-06-29 Marek Polacek <polacek@redhat.com>
1210
1211 PR c/66322
1212 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1213 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1214 about -Wswitch-bool here.
1215 (do_case): Update c_add_case_label call.
1216 (c_finish_case): Update c_do_switch_warnings call.
1217
1218 2015-06-27 Marek Polacek <polacek@redhat.com>
1219
1220 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1221
1222 2015-06-26 Marek Polacek <polacek@redhat.com>
1223
1224 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1225 INDIRECT_REF_P.
1226 * c-typeck.c (array_to_pointer_conversion): Likewise.
1227 (build_unary_op): Likewise.
1228 (c_finish_return): Likewise.
1229
1230 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1231
1232 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1233 * c-parser.c: Likewise.
1234
1235 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1236
1237 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1238 instead of pointer_hash.
1239 (detect_field_duplicates): Likewise.
1240
1241 2015-06-25 Marek Polacek <polacek@redhat.com>
1242
1243 * c-array-notation.c: Use VAR_P throughout.
1244 * c-decl.c: Likewise.
1245 * c-objc-common.c: Likewise.
1246 * c-parser.c: Likewise.
1247 * c-typeck.c: Likewise.
1248
1249 2015-06-25 Marek Polacek <polacek@redhat.com>
1250
1251 * c-decl.c: Use is_global_var throughout.
1252 * c-parser.c: Likewise.
1253 * c-typeck.c: Likewise.
1254
1255 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1256
1257 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1258 * c-aux-info.c: Likewise.
1259 * c-convert.c: Likewise.
1260 * c-decl.c: Likewise.
1261 * c-errors.c: Likewise.
1262 * c-lang.c: Likewise.
1263 * c-objc-common.c: Likewise.
1264 * c-parser.c: Likewise.
1265 * c-typeck.c: Likewise.
1266
1267 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
1268
1269 PR middle-end/66325
1270 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1271 variants.
1272
1273 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1274
1275 * c-decl.c (pop_scope): Register the main translation unit
1276 through the new debug hook.
1277
1278 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1279
1280 * c-array-notation.c : Adjust include files.
1281 * c-aux-info.c : Likewise.
1282 * c-convert.c : Likewise.
1283 * c-decl.c : Likewise.
1284 * c-errors.c : Likewise.
1285 * c-lang.c : Likewise.
1286 * c-lang.h : Likewise.
1287 * c-objc-common.c : Likewise.
1288 * c-parser.c : Likewise.
1289 * c-typeck.c : Likewise.
1290
1291 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1292
1293 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1294 immediately clobber it.
1295 (c_write_global_declarations_1): Remove call to
1296 check_global_declaration_1.
1297 (c_write_global_declarations_2): Remove.
1298 (c_write_final_cleanups): Rename from c_write_global_declarations.
1299 Remove call to finalize_compilation_unit.
1300 Remove calls to debugging hooks.
1301 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1302 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1303 * c-tree.h: Remove c_write_global_declarations.
1304
1305 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1306
1307 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1308 * c-aux-info.c: Likewise.
1309 * c-convert.c: Likewise.
1310 * c-decl.c: Likewise.
1311 * c-errors.c: Likewise.
1312 * c-lang.c: Likewise.
1313 * c-objc-common.c: Likewise.
1314 * c-parser.c: Likewise.
1315 * c-typeck.c: Likewise.
1316
1317 2015-06-04 Marek Polacek <polacek@redhat.com>
1318
1319 PR c/66341
1320 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1321 it is a lvalue.
1322
1323 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1324
1325 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1326 Warn for empty struct.
1327 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1328
1329 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1330
1331 * c-decl.c (start_function): Call plugin before parsing.
1332 (finish_function): Call plugin after parsing.
1333
1334 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1335
1336 PR c/49551
1337 * c-decl.c (merge_decls): Merge DECL_COMMON.
1338
1339 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1340
1341 * Make-lang.in (check_gcc_pallelize): Define.
1342
1343 2015-05-22 Marek Polacek <polacek@redhat.com>
1344
1345 PR c/47043
1346 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1347 attributes.
1348
1349 2015-05-21 Marek Polacek <polacek@redhat.com>
1350
1351 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1352 DECL_BUILT_IN.
1353
1354 2015-05-20 Marek Polacek <polacek@redhat.com>
1355
1356 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1357 * c-typeck.c: Likewise.
1358
1359 2015-05-19 Marek Polacek <polacek@redhat.com>
1360
1361 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1362
1363 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1364
1365 PR middle-end/66199
1366 * c-parser.c (c_parser_omp_for_loop): Don't add
1367 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1368 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1369 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1370 constructs.
1371
1372 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1373
1374 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
1375 swaps.
1376
1377 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1378
1379 PR fortran/44054
1380 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1381 accessor function.
1382
1383 2015-05-14 Marek Polacek <polacek@redhat.com>
1384
1385 PR c/66066
1386 PR c/66127
1387 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1388 rather than with 0.
1389
1390 2015-05-12 David Malcolm <dmalcolm@redhat.com>
1391
1392 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1393 to add a call to warn_for_misleading_indentation.
1394 (c_parser_else_body): Likewise, adding param "else_loc".
1395 (c_parser_if_statement): Check for misleading indentation.
1396 (c_parser_while_statement): Likewise.
1397 (c_parser_for_statement): Likewise.
1398
1399 2015-05-08 Marek Polacek <polacek@redhat.com>
1400
1401 PR c/64918
1402 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1403 (output_init_element): Likewise.
1404
1405 2015-05-07 Marek Polacek <polacek@redhat.com>
1406
1407 PR c/65179
1408 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1409 value.
1410
1411 2015-04-30 Marek Polacek <polacek@redhat.com>
1412
1413 * c-typeck.c (set_init_label): Call error_at instead of error and
1414 pass LOC to it.
1415
1416 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1417 the type of a decl.
1418
1419 * c-typeck.c (c_build_va_arg): Clarify the error message.
1420
1421 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1422
1423 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1424 OMP_STANDALONE_CLAUSES.
1425
1426 2015-04-28 Marek Polacek <polacek@redhat.com>
1427
1428 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1429
1430 2015-04-28 Marek Polacek <polacek@redhat.com>
1431
1432 PR c/65901
1433 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1434
1435 2015-04-25 Marek Polacek <polacek@redhat.com>
1436
1437 PR c/52085
1438 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1439 attribute.
1440
1441 2015-04-23 Marek Polacek <polacek@redhat.com>
1442
1443 PR c/65345
1444 * c-decl.c (set_labels_context_r): New function.
1445 (store_parm_decls): Call it via walk_tree_without_duplicates.
1446 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1447 instead of create_tmp_var. Build TARGET_EXPR instead of
1448 COMPOUND_EXPR.
1449 (build_atomic_assign): Use create_tmp_var_raw instead of
1450 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1451
1452 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1453
1454 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1455 (c_parser_omp_target_update): Add missed %> to error_at ().
1456
1457 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1458
1459 PR target/55143
1460 * c-decl.c (c_default_pointer_mode): Remove definition.
1461 * c-tree.h (c_default_pointer_mode): Remove declaration.
1462
1463 2015-03-27 Tobias Burnus <burnus@net-b.de>
1464
1465 PR c/65586
1466 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1467 error out.
1468 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1469 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1470 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1471
1472 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1473
1474 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1475 attribute for DECL_EXTERNAL VAR_DECLs.
1476
1477 2015-03-11 Jakub Jelinek <jakub@redhat.com>
1478
1479 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1480 argument.
1481
1482 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1483
1484 PR c/65120
1485 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1486 before preparing arguments to warn_logical_not_parentheses.
1487
1488 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1489
1490 PR c/65120
1491 * c-typeck.c (parser_build_binary_op): Don't warn for
1492 !!x == y or !b == y where b is _Bool.
1493
1494 2015-03-09 Marek Polacek <polacek@redhat.com>
1495
1496 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1497 * c-decl.c (grokdeclarator): Likewise.
1498 * c-typeck.c (build_binary_op): Likewise.
1499
1500 2015-02-27 Marek Polacek <polacek@redhat.com>
1501
1502 PR c/65228
1503 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1504
1505 2015-02-14 Marek Polacek <polacek@redhat.com>
1506
1507 PR c/64768
1508 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1509 declared through a typedef name.
1510
1511 2015-02-13 Marek Polacek <polacek@redhat.com>
1512
1513 PR c/65050
1514 * c-decl.c (grokdeclarator): Print also the type when giving
1515 the error message about array's incomplete element type.
1516
1517 2015-02-11 Jakub Jelinek <jakub@redhat.com>
1518
1519 PR c/64824
1520 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1521 check in the POP macro.
1522
1523 2015-02-09 Marek Polacek <polacek@redhat.com>
1524
1525 PR c/64856
1526 * c-typeck.c (process_init_element): Don't always wrap
1527 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1528 initializing a range of elements.
1529
1530 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1531
1532 PR c/64824
1533 PR c/64868
1534 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1535
1536 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
1537
1538 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1539 processing enum declaration.
1540
1541 2015-01-29 Marek Polacek <polacek@redhat.com>
1542
1543 PR c/64709
1544 * c-typeck.c (pop_init_level): If constructor_elements has
1545 exactly one element with integer_zerop value, set constructor_zeroinit
1546 to 1. Remove braces around warning_init call.
1547
1548 2015-01-27 Jakub Jelinek <jakub@redhat.com>
1549
1550 PR c/64766
1551 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1552 of FUNCTION_DECLs with error_mark_node.
1553
1554 2015-01-26 Jakub Jelinek <jakub@redhat.com>
1555
1556 PR c/64778
1557 * c-typeck.c (convert_arguments): Return -1 if there are
1558 error_args, even if we've diagnosed too many arguments.
1559
1560 2015-01-21 Richard Biener <rguenther@suse.de>
1561
1562 PR middle-end/64313
1563 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1564 for builtins the user declared correctly.
1565
1566 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1567 Bernd Schmidt <bernds@codesourcery.com>
1568 Cesar Philippidis <cesar@codesourcery.com>
1569 James Norris <jnorris@codesourcery.com>
1570 Jakub Jelinek <jakub@redhat.com>
1571 Ilmir Usmanov <i.usmanov@samsung.com>
1572
1573 * c-parser.c: Include "gomp-constants.h".
1574 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1575 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1576 Use OMP_CLAUSE_SET_MAP_KIND.
1577 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1578 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1579 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1580 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1581 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1582 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1583 "copyout", "create", "delete", "deviceptr", "gang", "host",
1584 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1585 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1586 "present_or_create", "pcreate", "seq", "self", "vector",
1587 "vector_length", "wait", "worker".
1588 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1589 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1590 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1591 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1592 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1593 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1594 (c_parser_oacc_data_clause_deviceptr)
1595 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1596 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1597 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1598 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1599 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1600 (c_parser_oacc_parallel, c_parser_oacc_update)
1601 (c_parser_oacc_wait): New functions.
1602 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1603 (c_finish_oacc_data): New prototypes.
1604 * c-typeck.c: Include "gomp-constants.h".
1605 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1606 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1607 OMP_CLAUSE_SET_MAP_KIND.
1608 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1609 (c_finish_oacc_data): New functions.
1610 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1611 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1612 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1613 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1614 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1615 GOMP_MAP_FORCE_DEVICEPTR.
1616
1617 2015-01-09 Michael Collison <michael.collison@linaro.org>
1618
1619 * c-array-notation.c: Include hash-set.h, machmode.h,
1620 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1621 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1622 * c-aux-info.c: Ditto.
1623 * c-convert.c: Ditto.
1624 * c-decl.c: Ditto.
1625 * c-errors.c: Ditto.
1626 * c-lang.c: Dittoxs.
1627 * c-objc-common.c: Ditto.
1628 * c-parser.c: Ditto.
1629 * c-typeck.c: Include hash-set.h, machmode.h,
1630 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1631 fold-const.h, wide-int.h, inchash.h, real.h and
1632 fixed-value.h due to flattening of tree.h.
1633
1634 2015-01-07 Marek Polacek <polacek@redhat.com>
1635
1636 PR c/64417
1637 * c-typeck.c (process_init_element): Disallow initialization of
1638 a flexible array member with a string constant if the structure
1639 is in an array.
1640
1641 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1642
1643 PR sanitizer/64344
1644 * c-typeck.c (convert_for_assignment, c_finish_return): For
1645 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1646 types also set in_late_binary_op around convert call.
1647 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1648 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1649 result on expr as last argument to ubsan_instrument_float_cast,
1650 if in_late_binary_op, don't use c_save_expr but save_expr.
1651
1652 Update copyright years.
1653
1654 2015-01-05 Marek Polacek <polacek@redhat.com>
1655
1656 PR c/64423
1657 * c-typeck.c (build_array_ref): Pass loc down to
1658 warn_array_subscript_with_type_char.
1659
1660 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1661
1662 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1663 (common-pointer-type): For pointers to arrays take qualifiers from
1664 element type.
1665 (build_conditional_expr): Add warnings for lost qualifiers.
1666 (comp-target-types): Allow pointers to arrays with different qualifiers.
1667 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1668 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1669 to PEDWARN_FOR_QUALIFIERS.
1670
1671 2014-12-17 Jakub Jelinek <jakub@redhat.com>
1672
1673 PR sanitizer/64289
1674 * c-convert.c: Include ubsan.h.
1675 (convert): For real -> integral casts and
1676 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1677 instead instrument the float cast directly.
1678
1679 2014-11-29 Jakub Jelinek <jakub@redhat.com>
1680
1681 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1682 c_finish_stmt_expr): Remove NULL last argument from
1683 create_tmp_var_raw and create_tmp_var calls.
1684 * c-array-notation.c (fix_builtin_array_notation_fn,
1685 build_array_notation_expr, fix_conditional_array_notations_1,
1686 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1687
1688 2014-11-28 Marek Polacek <polacek@redhat.com>
1689
1690 PR c/63862
1691 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1692 convert the right operand to integer type.
1693
1694 2014-11-25 Marek Polacek <polacek@redhat.com>
1695
1696 PR c/63877
1697 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1698 for inline functions.
1699
1700 2014-11-21 Jakub Jelinek <jakub@redhat.com>
1701
1702 PR target/63764
1703 * c-typeck.c (build_array_ref): Adjust
1704 convert_vector_to_pointer_for_subscript caller. If it returns true,
1705 call non_lvalue_loc on the result.
1706
1707 2014-11-11 Richard Biener <rguenther@suse.de>
1708
1709 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1710 to true.
1711
1712 2014-11-10 Andi Kleen <ak@linux.intel.com>
1713
1714 PR c/60804
1715 * c-parser.c (c_parser_statement_after_labels): Call
1716 check_no_cilk.
1717 (c_parser_if_statement): Dito.
1718 (c_parser_switch_statement): Dito.
1719 (c_parser_while_statement): Dito.
1720 (c_parser_do_statement): Dito.
1721 (c_parser_for_statement): Dito.
1722 * c-typeck.c (c_finish_loop): Dito.
1723
1724 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1725
1726 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1727 OPT_Wshift_count_overflow in the warnings.
1728
1729 2014-10-30 Marek Polacek <polacek@redhat.com>
1730
1731 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1732 print the stripped version as well, if they're not the same.
1733
1734 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1735
1736 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1737 machine_mode.
1738
1739 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
1740
1741 * c-decl.c: Adjust include files.
1742 * c-parser.c: Ditto.
1743
1744 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1745 Tom Tromey <tromey@redhat.com>
1746
1747 * c-tree.h (enum c_oracle_request): New.
1748 (c_binding_oracle_function): New typedef.
1749 (c_binding_oracle, c_pushtag, c_bind): Declare.
1750 * c-decl.c (c_binding_oracle): New global.
1751 (I_SYMBOL_CHECKED): New macro.
1752 (i_symbol_binding): New function.
1753 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1754 (I_TAG_CHECKED): New macro.
1755 (i_tag_binding): New function.
1756 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1757 (I_LABEL_CHECKED): New macro.
1758 (i_label_binding): New function.
1759 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1760 (c_print_identifier): Save and restore c_binding_oracle.
1761 (c_pushtag, c_bind): New functions.
1762
1763 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
1764
1765 * c-typeck.c: Adjust include files.
1766
1767 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1768
1769 PR c++/53061
1770 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1771 initialization here...
1772 (c_initialize_diagnostics): ... but here. Set defaults after
1773 building pretty-printer.
1774
1775 2014-10-23 Marek Polacek <polacek@redhat.com>
1776
1777 PR c/63626
1778 * c-decl.c (pop_scope): Don't print warning in external_scope.
1779
1780 2014-10-19 Marek Polacek <polacek@redhat.com>
1781
1782 PR c/63567
1783 * c-typeck.c (output_init_element): Allow initializing objects with
1784 static storage duration with compound literals even in C99 and add
1785 pedwarn for it.
1786
1787 2014-10-17 Marek Polacek <polacek@redhat.com>
1788
1789 PR c/63567
1790 * c-typeck.c (digest_init): Allow initializing objects with static
1791 storage duration with compound literals even in C99 and add pedwarn
1792 for it.
1793
1794 2014-10-17 Marek Polacek <polacek@redhat.com>
1795
1796 PR c/63543
1797 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1798 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1799 error multiple times. Print the type.
1800
1801 2014-10-17 Marek Polacek <polacek@redhat.com>
1802
1803 PR c/63549
1804 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1805 type.
1806
1807 2014-10-17 Marek Polacek <polacek@redhat.com>
1808
1809 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1810 (start_function): Use OPT_Wimplicit_int instead of 0.
1811 (store_parm_decls_oldstyle): Likewise.
1812
1813 2014-10-17 Alan Modra <amodra@gmail.com>
1814
1815 PR middle-end/61848
1816 * c-decl.c (merge_decls): Don't merge section name or tls model
1817 to newdecl symtab node, instead merge to olddecl. Override
1818 existing olddecl section name. Set tls_model for all thread-local
1819 vars, not just OMP thread-private ones. Remove incorrect comment.
1820
1821 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
1822
1823 * c-decl.c: Adjust include files.
1824
1825 2014-10-14 DJ Delorie <dj@redhat.com>
1826
1827 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1828 (c_token_starts_typename): Check all __intN, not just __int128.
1829 (c_token_starts_declspecs): Likewise.
1830 (c_parser_declspecs): Likewise.
1831 (c_parser_attribute_any_word): Likewise.
1832 (c_parser_objc_selector): Likewise.
1833 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1834 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1835 is specified.
1836 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1837 __int128.
1838 (finish_declspecs): Likewise.
1839
1840 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1841
1842 * c-parser.c (c_parser_all_labels): New function to replace
1843 the duplicate code.
1844 (c_parser_statement): Call the new function.
1845
1846 2014-10-09 Marek Polacek <polacek@redhat.com>
1847
1848 PR c/63480
1849 * c-typeck.c (pop_init_level): Don't warn about initializing
1850 with { }.
1851
1852 2014-10-07 Marek Polacek <polacek@redhat.com>
1853
1854 PR c/59717
1855 * c-decl.c (header_for_builtin_fn): New function.
1856 (implicitly_declare): Suggest which header to include.
1857
1858 2014-10-07 Marek Polacek <polacek@redhat.com>
1859
1860 * c-convert.c (convert): Use error_operand_p.
1861 * c-typeck.c (require_complete_type): Likewise.
1862 (really_atomic_lvalue): Likewise.
1863 (digest_init): Likewise.
1864 (handle_omp_array_sections_1): Likewise.
1865
1866 2014-10-03 Marek Polacek <polacek@redhat.com>
1867
1868 PR c/63453
1869 * c-decl.c (pop_scope): Don't warn about "inline function declared
1870 but never defined" for functions marked with gnu_inline attribute.
1871
1872 2014-09-25 Jakub Jelinek <jakub@redhat.com>
1873
1874 PR c++/63249
1875 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1876 on low_bound and length.
1877
1878 2014-09-24 Marek Polacek <polacek@redhat.com>
1879
1880 PR c/61405
1881 PR c/53874
1882 * c-parser.c: Don't define CPP_KEYWORD.
1883 (c_parser_switch_statement): Pass original type to c_finish_case.
1884 * c-tree.h (c_finish_case): Update declaration.
1885 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1886 conditionally to c_do_switch_warnings.
1887
1888 2014-09-03 Marek Polacek <polacek@redhat.com>
1889
1890 PR c/62024
1891 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1892 conversions.
1893
1894 2014-09-02 Jakub Jelinek <jakub@redhat.com>
1895 Balaji V. Iyer <balaji.v.iyer@intel.com>
1896 Igor Zamyatin <igor.zamyatin@intel.com>
1897
1898 * c-parser.c (c_parser_cilk_for): New function.
1899 (c_parser_cilk_grainsize): Likewise.
1900 (c_get_temp_regvar): Likewise.
1901 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1902 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1903 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1904 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1905 case.
1906
1907 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1908
1909 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1910 with using HOST_WIDE_INT without truncation to 'int'
1911
1912 2014-08-22 Marek Polacek <polacek@redhat.com>
1913
1914 PR c++/62199
1915 * c-typeck.c (parser_build_binary_op): Adjust call to
1916 warn_logical_not_parentheses.
1917
1918 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1919
1920 PR other/62008
1921 * c-parser.c (c_parser_array_notation): Check for correct
1922 type of an array added.
1923
1924 2014-08-19 Marek Polacek <polacek@redhat.com>
1925
1926 PR c++/62153
1927 * c-typeck.c (build_binary_op): If either operand of a comparison
1928 is a boolean expression, call maybe_warn_bool_compare.
1929
1930 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1931
1932 PR c/45584
1933 * c-typeck.c (build_c_cast): Do a conversion even when the
1934 TYPE_MAIN_VARIANTs are the same.
1935
1936 2014-08-19 Marek Polacek <polacek@redhat.com>
1937
1938 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1939 pedwarn_c99 instead of pedwarn.
1940 (grokfield): Likewise.
1941 (warn_defaults_to): New function.
1942 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1943 Unconditionally call pedwarn_c99 instead of pedwarn.
1944 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1945 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1946 check flag_isoc11 before.
1947 * c-errors.c (pedwarn_c99): Change the return type to bool.
1948 Handle -Wc99-c11-compat.
1949 * c-parser.c (disable_extension_diagnostics): Handle
1950 warn_c99_c11_compat.
1951 (restore_extension_diagnostics): Likewise.
1952 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1953 instead of pedwarn, don't check flag_isoc11 before.
1954 (c_parser_declspecs): Likewise.
1955 (c_parser_alignas_specifier): Likewise.
1956 (c_parser_alignof_expression): Likewise.
1957 (c_parser_generic_selection): Likewise.
1958 * c-tree.h (pedwarn_c99): Update declaration.
1959 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1960 of pedwarn_c99.
1961
1962 2014-08-19 Marek Polacek <polacek@redhat.com>
1963
1964 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1965 to pedwarn_c90.
1966 * c-errors.c: Include "opts.h".
1967 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1968 * c-parser.c (disable_extension_diagnostics): Handle negative value
1969 of warn_c90_c99_compat, too.
1970 (restore_extension_diagnostics): Likewise.
1971 (c_parser_compound_statement_nostart): Pass
1972 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1973
1974 2014-08-12 Marek Polacek <polacek@redhat.com>
1975
1976 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1977 Add pedwarn.
1978 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1979 Likewise.
1980 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1981
1982 2014-08-10 Marek Polacek <polacek@redhat.com>
1983
1984 PR c/51849
1985 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1986 Call pedwarn_c90 instead of pedwarn.
1987 (check_bitfield_type_and_width): Likewise.
1988 (declspecs_add_qual): Likewise.
1989 (declspecs_add_type): Likewise.
1990 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1991 Adjust to only call pedwarn_c90.
1992 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1993 pedwarn_c90 instead of pedwarn.
1994 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1995 * c-parser.c (disable_extension_diagnostics): Handle
1996 warn_c90_c99_compat.
1997 (restore_extension_diagnostics): Likewise.
1998 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1999 pedwarn_c90 instead of pedwarn.
2000 (c_parser_initelt): Likewise.
2001 (c_parser_postfix_expression): Likewise.
2002 (c_parser_postfix_expression_after_paren_type): Likewise.
2003 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2004 * c-tree.h: Fix formatting.
2005 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2006 pedwarn_c90 instead of pedwarn.
2007
2008 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2009
2010 * c-typeck.c: Remove include of pointer-set.h.
2011
2012 2014-08-07 Marek Polacek <polacek@redhat.com>
2013
2014 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2015
2016 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2017
2018 * c-typeck.c: Use hash_map instead of pointer_map.
2019
2020 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2021
2022 * c-decl.c: Use hash_set instead of pointer_set.
2023
2024 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2025
2026 PR middle-end/61455
2027 * c-array-notation.c (expand_array_notations): Handling
2028 of DECL_EXPR added.
2029
2030 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
2031
2032 PR c++/60517
2033 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2034 a local variable.
2035
2036 2014-07-30 Tom Tromey <tromey@redhat.com>
2037
2038 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2039 field.
2040 (really_start_incremental_init, push_init_level): Initialize
2041 designator_depth.
2042 (pop_init_level): Set global designator_depth.
2043 (process_init_element): Check for designated_init attribute.
2044
2045 2014-07-20 Marek Polacek <polacek@redhat.com>
2046
2047 PR c/61852
2048 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2049 (implicitly_declare): Pass location to implicit_decl_warning.
2050
2051 2014-07-14 Jakub Jelinek <jakub@redhat.com>
2052
2053 PR middle-end/61294
2054 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2055 If non-NULL, call c_parser_check_literal_zero.
2056 (c_parser_check_literal_zero): New function.
2057 (c_parser_postfix_expression_after_primary): Adjust
2058 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2059
2060 2014-07-06 Marek Polacek <polacek@redhat.com>
2061
2062 PR c/6940
2063 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2064 * c-tree.h (C_ARRAY_PARAMETER): Define.
2065 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2066 function parameter.
2067
2068 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
2069 Chen Gang <gang.chen.5i5j@gmail.com>
2070
2071 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2072 releasing symbol.
2073
2074 2014-07-01 Marek Polacek <polacek@redhat.com>
2075
2076 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2077 instead of 0 to WARN_FOR_ASSIGNMENT.
2078
2079 2014-07-01 Marek Polacek <polacek@redhat.com>
2080
2081 PR c/58286
2082 * c-typeck.c (convert_for_assignment): Pass
2083 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2084
2085 2014-06-30 Marek Polacek <polacek@redhat.com>
2086
2087 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2088 has no_sanitize_undefined attribute.
2089
2090 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2091
2092 PR middle-end/57541
2093 * c-array-notation.c (fix_builtin_array_notation_fn):
2094 Check for 0 arguments in builtin call. Check that bultin argument is
2095 correct.
2096 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2097 index.
2098
2099 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2100
2101 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2102 qualifiers in __auto_type for atomic types.
2103 (c_parser_typeof_specifier): Discard all type qualifiers in
2104 __typeof__ for atomic types.
2105
2106 2014-06-25 Marek Polacek <polacek@redhat.com>
2107
2108 PR c/61162
2109 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2110 the return expression to c_finish_return.
2111
2112 2014-06-25 Jakub Jelinek <jakub@redhat.com>
2113
2114 * c-typeck.c (c_finish_omp_clauses): Make sure
2115 OMP_CLAUSE_LINEAR_STEP has correct type.
2116
2117 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2118
2119 * c-decl.c: Adjust.
2120
2121 2014-06-24 Jakub Jelinek <jakub@redhat.com>
2122
2123 * c-parser.c (c_parser_omp_for_loop): For
2124 #pragma omp parallel for simd move lastprivate clause from parallel
2125 to for rather than simd.
2126
2127 2014-06-23 Marek Polacek <polacek@redhat.com>
2128
2129 * c-typeck.c (parser_build_binary_op): Don't call
2130 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2131
2132 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2133
2134 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2135 * c-decl.c (merge_decls): Likewise.
2136
2137 2014-06-09 Marek Polacek <polacek@redhat.com>
2138
2139 PR c/36446
2140 * c-typeck.c (error_init): Call inform instead of error_at.
2141 (pedwarn_init): Call inform instead of pedwarn.
2142 (warning_init): Call inform instead of warning_at.
2143
2144 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2145
2146 * c-decl.c (merge_decls): Use set_decl_section_name.
2147 (duplicate_decls): Remove node if it exists.
2148
2149 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2150
2151 PR c/53119
2152 * c-typeck.c (push_init_level, process_init_element,
2153 pop_init_level): Correct check for zero initialization, move
2154 missing brace warning to respect zero initialization.
2155
2156 2014-06-05 Marek Polacek <polacek@redhat.com>
2157
2158 PR c/56724
2159 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2160
2161 2014-06-05 Marek Polacek <polacek@redhat.com>
2162
2163 PR c/49706
2164 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2165 on the left hand side operand of a comparison.
2166
2167 2014-06-05 Marek Polacek <polacek@redhat.com>
2168
2169 PR c/48062
2170 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2171 Print note only if the warning was printed.
2172
2173 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2174
2175 PR c/58942
2176 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2177 with a pointer.
2178
2179 2014-06-03 Marek Polacek <polacek@redhat.com>
2180
2181 PR c/60439
2182 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2183 c_start_case.
2184 * c-tree.h (c_start_case): Update.
2185 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2186 switch condition has boolean value.
2187
2188 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2189
2190 * c-decl.c: Include builtins.h.
2191 * c-parser.c: Likewise.
2192
2193 2014-05-27 Marek Polacek <polacek@redhat.com>
2194
2195 PR c/56724
2196 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2197 error and warning calls to error_at and warning_at. Pass location of
2198 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2199 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2200 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2201
2202 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2203
2204 PR c/61191
2205 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2206 function parameters.
2207
2208 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2209
2210 * c-decl.c (merge_decls): Preserve symtab node pointers.
2211 (duplicate_decls): Free new decl.
2212
2213 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2214
2215 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2216 initialization.
2217
2218 * c-parser.c (c_parser_omp_target): Return bool values.
2219
2220 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2221
2222 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2223 num_teams_loc variable to num_thread_limit_loc.
2224
2225 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2226
2227 * c-array-notation.c (expand_array_notations): Use void_node
2228 instead of void_zero_node.
2229
2230 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2231
2232 * c-decl.c (finish_struct): Adjust.
2233 (finish_enum): Likewise.
2234 (bind): Adjust.
2235 (record_inline_static): Likewise.
2236 (push_scope): Likewise.
2237 (make_label): Likewise.
2238 (lookup_label_for_goto): Likewise.
2239 (finish_struct): Likewise.
2240 (finish_enum): Likewise.
2241 (store_parm_decls): Likewise.
2242 (c_push_function_context): Likewise.
2243 * c-lang.h: Remove usage of variable_size gty attribute.
2244 * c-parser.c (c_parse_init): Adjust.
2245 (c_parse_file): Likewise.
2246
2247 2014-05-13 Marek Polacek <polacek@redhat.com>
2248
2249 PR c/61162
2250 * c-typeck.c (convert_for_assignment): Pass location to
2251 WARN_FOR_ASSIGNMENT instead of input_location.
2252
2253 2014-05-10 Marek Polacek <polacek@redhat.com>
2254
2255 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2256 maybe_warn_string_init.
2257 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2258 maybe_warn_string_init.
2259 * c-tree.h (maybe_warn_string_init): Update declaration.
2260 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2261 Call pedwarn_init with loc instead of with input_location.
2262 (digest_init): Pass init_loc to maybe_warn_string_init.
2263 (pop_init_level): Call pedwarn_init with loc instead of with
2264 input_location.
2265 (set_init_index): Likewise.
2266 (process_init_element): Likewise.
2267
2268 2014-05-09 Marek Polacek <polacek@redhat.com>
2269
2270 PR c/61096
2271 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2272 (c_parser_initelt): Pass location to set_init_label. Pass array index
2273 location to set_init_index.
2274 * c-tree.h (push_init_level): Update declaration.
2275 (pop_init_level): Likewise.
2276 (set_init_index): Likewise.
2277 (set_init_label): Likewise.
2278 * c-typeck.c (error_init): Add location parameter. Call error_at
2279 instead of error.
2280 (digest_init): Pass init_loc to error_init.
2281 (really_start_incremental_init):
2282 (push_init_level): Add location parameter. Pass loc to pop_init_level
2283 and error_init.
2284 (pop_init_level): Likewise.
2285 (set_designator): Add location parameter. Pass loc to pop_init_level,
2286 push_init_level, and error_init.
2287 (set_init_index): Add location parameter. Pass loc to error_init and
2288 set_designator.
2289 (set_init_label): Likewise.
2290 (output_init_element): Pass loc to error_init.
2291 (process_init_element): Pass loc to error_init, pop_init_level,
2292 pedwarn_init, and push_init_level.
2293
2294 2014-05-09 Marek Polacek <polacek@redhat.com>
2295
2296 PR c/50459
2297 * c-parser.c (c_parser_attributes): Parse the arguments as an
2298 expression-list if the attribute takes identifier.
2299
2300 2014-05-08 Marek Polacek <polacek@redhat.com>
2301
2302 PR c/61053
2303 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2304 TYPE_ALIGN_UNIT.
2305
2306 2014-05-08 Marek Polacek <polacek@redhat.com>
2307
2308 PR c/61077
2309 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2310 of main.
2311
2312 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2313 Mike Stump <mikestump@comcast.net>
2314 Richard Sandiford <rdsandiford@googlemail.com>
2315
2316 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2317 (finish_enum): Use wide-int interfaces.
2318 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2319 * c-typeck.c (build_c_cast): Likewise.
2320 (set_nonincremental_init_from_string): Likewise.
2321 (c_tree_equal): Likewise.
2322
2323 2014-05-02 Marek Polacek <polacek@redhat.com>
2324
2325 PR c/25801
2326 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2327 Return size_one_node when the type is not complete.
2328 (pointer_diff): Remove comment.
2329 (build_unary_op): Improve error messages.
2330
2331 2014-05-02 Marek Polacek <polacek@redhat.com>
2332
2333 * c-typeck.c (c_finish_return): Separate warning_at calls.
2334
2335 2014-05-02 Marek Polacek <polacek@redhat.com>
2336
2337 * c-tree.h (error_init): Remove declaration.
2338 (pedwarn_init): Likewise.
2339 * c-typeck.c (error_init): Make static and move above.
2340 (pedwarn_init): Likewise.
2341 (warning_init): Move above.
2342 (maybe_warn_string_init): Likewise.
2343
2344 2014-05-01 Jeff Law <law@redhat.com>
2345
2346 Revert:
2347
2348 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2349 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2350 avoid goto.
2351
2352 2014-05-02 Marek Polacek <polacek@redhat.com>
2353
2354 PR c/60784
2355 * c-typeck.c (push_init_level): Set constructor_designated to
2356 p->designated for structures.
2357
2358 2014-05-01 Marek Polacek <polacek@redhat.com>
2359
2360 PR c/60915
2361 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2362 function-definition has an attribute after the declarator.
2363
2364 2014-05-01 Marek Polacek <polacek@redhat.com>
2365
2366 PR c/60257
2367 * c-typeck.c (warning_init): Add location_t parameter. Call
2368 warning_at instead of warning.
2369 (push_init_level): Pass input_location to warning_init.
2370 (add_pending_init): Add location_t parameter. Pass loc to
2371 warning_init.
2372 (set_nonincremental_init): Pass input_location to add_pending_init.
2373 (set_nonincremental_init_from_string): Likewise.
2374 (output_init_element): Pass loc to warning_init and to
2375 add_pending_init.
2376
2377 2014-05-01 Marek Polacek <polacek@redhat.com>
2378
2379 PR c/43395
2380 * c-typeck.c (c_finish_return): Distinguish between label and variable
2381 when warning about returning local address.
2382
2383 2014-05-01 Marek Polacek <polacek@redhat.com>
2384
2385 PR c/29467
2386 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2387 in C89 mode.
2388
2389 2014-05-01 Marek Polacek <polacek@redhat.com>
2390
2391 PR c/43245
2392 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2393 instead of 0 to WARN_FOR_QUALIFIERS.
2394
2395 2014-05-01 Marek Polacek <polacek@redhat.com>
2396
2397 PR c/56989
2398 * c-typeck.c (default_conversion): Use better location for
2399 error call.
2400
2401 2014-04-30 Marek Polacek <polacek@redhat.com>
2402
2403 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2404 also when SANITIZE_FLOAT_DIVIDE is on.
2405
2406 2014-04-30 Marek Polacek <polacek@redhat.com>
2407
2408 PR c/60139
2409 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2410 and pedwarn_init. Use loc insted of input_location.
2411
2412 2014-04-30 Marek Polacek <polacek@redhat.com>
2413
2414 PR c/60351
2415 * c-typeck.c (build_binary_op): Use location when warning about
2416 shift count.
2417
2418 2014-04-25 Marek Polacek <polacek@redhat.com>
2419
2420 PR c/18079
2421 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2422 always_inline/noinline and hot/cold attributes.
2423
2424 2014-04-25 Marek Polacek <polacek@redhat.com>
2425
2426 PR c/60114
2427 * c-parser.c (c_parser_initelt): Pass input_location to
2428 process_init_element.
2429 (c_parser_initval): Pass loc to process_init_element.
2430 * c-tree.h (process_init_element): Adjust declaration.
2431 * c-typeck.c (push_init_level): Pass input_location to
2432 process_init_element.
2433 (pop_init_level): Likewise.
2434 (set_designator): Likewise.
2435 (output_init_element): Add location_t parameter. Pass loc to
2436 digest_init.
2437 (output_pending_init_elements): Pass input_location to
2438 output_init_element.
2439 (process_init_element): Add location_t parameter. Pass loc to
2440 output_init_element.
2441
2442 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2443
2444 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2445 atomic-clause, allow comma in between atomic-clause and
2446 seq_cst.
2447
2448 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2449
2450 PR c/59073
2451 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2452 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2453
2454 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2455
2456 PR middle-end/60469
2457 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2458 create_tmp_var instead build_decl for creating temps.
2459 (build_array_notation_expr): Likewise.
2460 (fix_conditional_array_notations_1): Likewise.
2461 (fix_array_notation_expr): Likewise.
2462 (fix_array_notation_call_expr): Likewise.
2463
2464 2014-03-28 Jakub Jelinek <jakub@redhat.com>
2465
2466 PR c++/60689
2467 * c-tree.h (c_build_function_call_vec): New prototype.
2468 * c-typeck.c (build_function_call_vec): Don't call
2469 resolve_overloaded_builtin here.
2470 (c_build_function_call_vec): New wrapper function around
2471 build_function_call_vec. Call resolve_overloaded_builtin here.
2472 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2473 Call c_build_function_call_vec instead of build_function_call_vec.
2474 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2475 * c-decl.c (finish_decl): Likewise.
2476
2477 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2478
2479 PR c/55383
2480 * c-typeck.c: Use correct format string in cast-qual warning
2481
2482 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2483
2484 * c-decl.c (c_decl_attributes): Use
2485 lang_hooks.types.omp_mappable_type.
2486 * c-typeck.c (c_finish_omp_clauses): Likewise.
2487
2488 2014-03-06 Marek Polacek <polacek@redhat.com>
2489
2490 PR c/60197
2491 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2492 of checking tree code.
2493
2494 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2495
2496 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2497 (c_parser_parameter_declaration): Likewise.
2498
2499 2014-02-19 Marek Polacek <polacek@redhat.com>
2500
2501 PR c/60195
2502 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2503 Call mark_exp_read on exp.value.
2504 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2505 TREE_ADDRESSABLE on old instead of val.
2506 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2507
2508 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2509
2510 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2511 C_EXPR_APPEND by vec_safe_push.
2512 * c-tree.h (C_EXPR_APPEND): Remove.
2513
2514 2014-01-31 Marek Polacek <polacek@redhat.com>
2515
2516 PR c/59963
2517 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2518 build_function_call_vec.
2519 (build_function_call): Likewise.
2520 (build_atomic_assign): Likewise.
2521 (build_function_call_vec): Add arg_loc parameter. Use it.
2522 (convert_arguments): Likewise.
2523 (convert_for_assignment): Rename rhs_loc to expr_loc.
2524 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2525 (c_parser_objc_keywordexpr): Likewise.
2526 (c_parser_postfix_expression_after_primary): Call
2527 build_function_call_vec with expr_loc rather than op_loc.
2528 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2529 build_function_call_vec.
2530 (c_parser_expr_list): Add locations parameter. Fill it with locations
2531 of function arguments.
2532 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2533
2534 2014-01-30 Marek Polacek <polacek@redhat.com>
2535
2536 PR c/59940
2537 * c-typeck.c (build_function_call_vec): Use loc parameter.
2538 (convert_arguments): Add location parameter. Use it.
2539 (ep_convert_and_check): Likewise.
2540 (build_atomic_assign): Adjust convert_for_assignment call.
2541 (build_modify_expr): Likewise.
2542 (digest_init): Likewise.
2543 (c_finish_return): Likewise.
2544 (build_conditional_expr): Adjust ep_convert_and_check calls.
2545 (convert_for_assignment): Add rhs_loc parameter. Use it.
2546 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2547 calls.
2548
2549 2014-01-30 Richard Biener <rguenther@suse.de>
2550
2551 PR c/59905
2552 * c-typeck.c (build_function_call_vec): Do not replace calls
2553 to a function via an incompatible type with a runtime abort.
2554
2555 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2556
2557 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2558 flag_enable_cilkplus with flag_cilkplus.
2559 (c_parser_direct_declarator_inner): Likewise.
2560 (c_parser_attribute_any_word): Likewise.
2561 (c_parser_attributes): Likewise.
2562 (c_parser_compound_statement): Likewise.
2563 (c_parser_statement_after_labels): Likewise.
2564 (c_parser_if_statement): Likewise.
2565 (c_parser_switch_statement): Likewise.
2566 (c_parser_do_statement): Likewise.
2567 (c_parser_for_statement): Likewise.
2568 (c_parser_unary_expression): Likewise.
2569 (c_parser_postfix_expression): Likewise.
2570 (c_parser_postfix_expression_after_primary): Likewise.
2571 (c_parser_postfix_expression_after_primary): Likewise.
2572 (c_parser_omp_clause_name): Likewise.
2573 (c_finish_omp_declare_simd): Likewise.
2574 (c_parser_cilk_verify_simd): Likewise.
2575 * c-typeck.c (build_array_ref): Likewise.
2576 (build_function_call_vec): Likewise.
2577 (convert_arguments): Likewise.
2578 (build_compound_expr): Likewise.
2579 (c_finish_return): Likewise.
2580 (c_finish_if_stmt): Likewise.
2581 (c_finish_loop): Likewise.
2582 (build_binary_op): Likewise.
2583
2584 2014-01-23 Marek Polacek <polacek@redhat.com>
2585
2586 PR c/59846
2587 * c-typeck.c (parser_build_binary_op): Use location instead of
2588 input_location.
2589 (build_binary_op): Pass location to shorten_compare.
2590
2591 2014-01-23 Marek Polacek <polacek@redhat.com>
2592
2593 PR c/58346
2594 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2595 an empty aggregate.
2596
2597 2014-01-23 Marek Polacek <polacek@redhat.com>
2598
2599 PR c/59871
2600 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2601 of a comma expression.
2602 (emit_side_effect_warnings): Likewise.
2603
2604 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2605
2606 PR c/59825
2607 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2608 function to use walk_tree and moved a lot of its functionality to
2609 expand_array_notations.
2610 (expand_array_notations): New function.
2611
2612 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2613
2614 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2615 attribute an attribute without value.
2616
2617 2014-01-23 Jakub Jelinek <jakub@redhat.com>
2618
2619 PR middle-end/58809
2620 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2621 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2622
2623 2014-01-22 Marek Polacek <polacek@redhat.com>
2624
2625 PR c/59891
2626 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2627 of remove_c_maybe_const_expr on op1 and op2.
2628
2629 2014-01-15 Jakub Jelinek <jakub@redhat.com>
2630
2631 PR c/58943
2632 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2633 effects, preevaluate rhs using SAVE_EXPR first.
2634
2635 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2636
2637 PR c++/59631
2638 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2639 statements with if-elseif statements.
2640
2641 2014-01-06 Marek Polacek <polacek@redhat.com>
2642
2643 PR c/57773
2644 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2645 defined bit-field types only in ISO C.
2646
2647 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2648
2649 Update copyright years
2650
2651 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2652
2653 * c-array-notation.c: Use the standard form for the copyright notice.
2654
2655 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2656
2657 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2658 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2659 field in parser is not empty. If not-empty, call the function
2660 c_parser_finish_omp_declare_simd.
2661 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2662 between SIMD-enabled functions and #pragma simd. Added new parameter.
2663 (c_parser_cilk_all_clauses): Modified the usage of the function
2664 c_parser_cilk_clause_vectorlength as mentioned above.
2665 (c_parser_cilk_simd_fn_vector_attrs): New function.
2666 (c_finish_cilk_simd_fn_tokens): Likewise.
2667 (is_cilkplus_vector_p): Likewise.
2668 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2669 "nomask," and "mask" strings in clause name.
2670 (c_parser_omp_all_clauses): Added 3 new case statements:
2671 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2672 PRAGMA_CILK_CLAUSE_NOMASK.
2673 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2674 check for vector attribute and if so call the function
2675 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2676 called the function c_finish_cilk_simd_fn_tokens.
2677 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2678 parser field is non-empty. If so, parse them as you would parse
2679 the omp declare simd pragma.
2680 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2681 Added a check when step is a parameter and flag it as error.
2682 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2683 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2684 pragma_omp_clause.
2685
2686 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2687
2688 * c-parser.c (c_parser_omp_parallel): Fix description.
2689
2690 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2691
2692 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2693 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2694 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2695 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2696
2697 2013-12-04 Joseph Myers <joseph@codesourcery.com>
2698
2699 PR c/52023
2700 * c-parser.c (c_parser_alignas_specifier): Use
2701 c_sizeof_or_alignof_type instead of c_alignof.
2702 (c_parser_alignof_expression): Likewise, with min_alignof
2703 parameter depending on alignof spelling used.
2704
2705 2013-12-04 Marek Polacek <polacek@redhat.com>
2706
2707 PR c/54113
2708 * c-decl.c (start_function): Don't warn for missing prototype for
2709 inline functions.
2710
2711 2013-12-03 Marek Polacek <polacek@redhat.com>
2712
2713 PR c/59351
2714 * c-decl.c (build_compound_literal): Allow compound literals with
2715 empty initial value.
2716
2717 2013-12-02 Joseph Myers <joseph@codesourcery.com>
2718
2719 PR c/58235
2720 * c-typeck.c (build_modify_expr): Diagnose assignment to
2721 expression with array type.
2722
2723 2013-11-29 Joseph Myers <joseph@codesourcery.com>
2724
2725 PR c/42262
2726 * c-typeck.c (process_init_element): Do not treat a string as
2727 initializing a whole array when used with a designator for an
2728 individual element.
2729
2730 2013-11-29 Joseph Myers <joseph@codesourcery.com>
2731
2732 PR c/57574
2733 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2734 an inline function following a static declaration.
2735
2736 2013-11-28 Jakub Jelinek <jakub@redhat.com>
2737
2738 PR c/59310
2739 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2740 to p_name before calling c_parser_omp_teams instead of after.
2741 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2742 argument. Remove unused p_name variable.
2743
2744 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
2745 Jakub Jelinek <jakub@redhat.com>
2746
2747 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2748 external_scope is NULL.
2749
2750 2013-11-27 Tom de Vries <tom@codesourcery.com>
2751 Marc Glisse <marc.glisse@inria.fr>
2752
2753 PR c++/59032
2754 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2755
2756 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
2757
2758 * c-typeck.c: Add required include files from gimple.h.
2759
2760 2013-11-22 David Malcolm <dmalcolm@redhat.com>
2761
2762 * c-decl.c (define_label, shadow_tag_warned)
2763 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2764 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2765 (declspecs_add_type): Remove use of in_system_header macro.
2766 * c-parser.c (c_parser_unary_expression): Likewise.
2767 * c-typeck.c (store_init_value, process_init_element)
2768 (c_start_case): Likewise.
2769
2770 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2771 macro.
2772
2773 * c-parser.c (c_parser_set_source_position_from_token): Remove
2774 reference to in_system_header from comment.
2775
2776 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2777
2778 * c-decl.c (grokdeclarator): Update comment to refer to
2779 tree_to_[su]hwi rather than tree_low_cst.
2780
2781 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2782
2783 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2784 tree_to_uhwi throughout.
2785
2786 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2787
2788 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2789 throughout.
2790
2791 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2792
2793 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2794 throughout.
2795
2796 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
2797
2798 * c-parser.c (c_parser_cilk_simd): New.
2799 (c_parser_cilk_verify_simd): New.
2800 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2801 (c_parser_omp_for_loop): Add case for NE_EXPR.
2802 Set c_break_label for CILK_SIMD.
2803 (c_parser_cilk_clause_vectorlength): New.
2804 (c_parser_cilk_clause_linear): New.
2805 (c_parser_cilk_clause_name): New.
2806 (c_parser_cilk_all_clauses): New.
2807 * c-typeck.c (build_unary_op): Pass location argument to
2808 readonly_error.
2809 (build_modify_expr): Same.
2810 (build_asm_expr): Same.
2811 (c_finish_bc_stmt): Error on break/continue in loops.
2812
2813 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
2814
2815 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2816
2817 2013-11-14 Diego Novillo <dnovillo@google.com>
2818
2819 * c-decl.c: Include print-tree.h.
2820 Include stor-layout.h.
2821 Include varasm.h.
2822 Include attribs.h.
2823 Include stringpool.h.
2824 * c-lang.c: Include fold-const.h.
2825 * c-parser.c: Include stringpool.h.
2826 Include attribs.h.
2827 Include stor-layout.h.
2828 Include varasm.h.
2829 Include trans-mem.h.
2830 * c-typeck.c: Include stor-layout.h.
2831 Include trans-mem.h.
2832 Include varasm.h.
2833 Include stmt.h.
2834
2835 2013-11-13 Joseph Myers <joseph@codesourcery.com>
2836
2837 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2838 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2839 __auto_type.
2840 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2841 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2842 RID_AUTO_TYPE.
2843 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2844 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2845 (c_parser_declarator, c_parser_direct_declarator_inner)
2846 (c_parser_parameter_declaration, c_parser_type_name): All callers
2847 changed.
2848 (c_parser_declaration_or_fndef): Handle declarations with type
2849 determined from the initializer.
2850
2851 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
2852
2853 * c-typeck.c: Include gimplify.h.
2854
2855 2013-11-12 Joseph Myers <joseph@codesourcery.com>
2856
2857 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2858 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2859 comment.
2860 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2861 or _Thread_local as appropriate in diagnostics.
2862 (build_null_declspecs): Initialize ret->thread_gnu_p.
2863 (declspecs_add_scspec): Handle either __thread or _Thread_local
2864 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2865 pedantic. Do not disallow _Thread_local extern and _Thread_local
2866 static.
2867
2868 2013-11-07 Joseph Myers <joseph@codesourcery.com>
2869 Andrew MacLeod <amacleod@redhat.com>
2870
2871 * c-aux-info.c (gen_type): Handle atomic qualifier.
2872 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2873 qualifiers when compating types.
2874 (shadow_tag_warned): Handle atomic_p in declspecs.
2875 (quals_from_declspecs): Likewise.
2876 (start_decl): Use c_type_promotes_to when promoting argument
2877 types.
2878 (grokdeclarator): Handle _Atomic.
2879 (get_parm_info): Diagnose any qualifier on "void" as only
2880 parameter.
2881 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2882 comparing types. Use c_type_promotes_to when promoting argument
2883 types.
2884 (finish_function): Use c_type_promotes_to when promoting argument
2885 types.
2886 (build_null_declspecs): Handle atomic_p in declspecs.
2887 (declspecs_add_qual): Handle RID_ATOMIC.
2888 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2889 (c_token_starts_declspecs): Handle RID_ATOMIC.
2890 (c_parser_declspecs): Handle atomic type specifiers and
2891 qualifiers.
2892 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2893 from types of expressions with atomic type.
2894 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2895 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2896 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2897 (c_parser_statement_after_labels, c_parser_switch_statement)
2898 (c_parser_for_statement, c_parser_expr_no_commas)
2899 (c_parser_conditional_expression, c_parser_binary_expression)
2900 (c_parser_cast_expression, c_parser_unary_expression)
2901 (c_parser_postfix_expression)
2902 (c_parser_postfix_expression_after_primary, c_parser_expression):
2903 Use convert_lvalue_to_rvalue.
2904 (c_parser_expression_conv, c_parser_expr_list): Document
2905 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2906 (c_parser_objc_synchronized_statement): Use
2907 convert_lvalue_to_rvalue.
2908 (c_parser_objc_selector): Handle RID_ATOMIC.
2909 (c_parser_objc_receiver, c_parser_array_notation): Use
2910 convert_lvalue_to_rvalue.
2911 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2912 _Atomic (type-name).
2913 (struct c_declspecs): Add atomic_p field.
2914 (convert_lvalue_to_rvalue): Declare.
2915 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2916 corresponding atomic types.
2917 (qualify_type): Don't add _Atomic qualifiers from second argument.
2918 (comp_target_types): Do not allow _Atomic mismatches.
2919 (type_lists_compatible_p): Do not remove atomic qualifiers when
2920 comparing types.
2921 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2922 (build_atomic_assign): New functions.
2923 (build_unary_op): Use build_atomic_assign for atomic increment and
2924 decrement.
2925 (build_conditional_expr): Do not treat _Atomic void as a qualified
2926 version of void.
2927 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2928 (find_anonymous_field_with_type, convert_to_anonymous_field)
2929 (convert_for_assignment): Do not remove atomic qualifiers when
2930 comparing types.
2931 (digest_init): Do not accept initialization of arrays of atomic
2932 elements by string constants.
2933 (build_asm_expr): Use convert_lvalue_to_rvalue.
2934 (build_binary_op): Do not treat _Atomic void as a qualified
2935 version of void.
2936
2937 2013-11-06 DJ Delorie <dj@redhat.com>
2938
2939 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2940 both explicit and builtin, print the location of the explicit one.
2941
2942 2013-11-05 Tobias Burnus <burnus@net-b.de>
2943
2944 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2945 c_parser_omp_distribute, c_parser_omp_teams,
2946 c_parser_omp_target, c_parser_omp_declare): Handle
2947 -fopenmp-simd.
2948
2949 2013-11-03 Marek Polacek <polacek@redhat.com>
2950
2951 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2952
2953 2013-11-01 Jakub Jelinek <jakub@redhat.com>
2954
2955 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2956 check_dup_generic at the end, unless remove is true.
2957 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2958 remove = true;.
2959 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2960
2961 2013-10-31 Jakub Jelinek <jakub@redhat.com>
2962
2963 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2964 with decl that is not pointer nor array.
2965
2966 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2967
2968 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2969 a spawning function is found.
2970 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2971 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2972 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2973 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2974 case.
2975 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2976 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2977 expr.
2978 (c_finish_return): Added a check to reject _Cilk_spawn in return
2979 expression.
2980 (build_cilk_spawn): New function.
2981 (build_cilk_sync): Likewise.
2982 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2983
2984 2013-10-27 Tobias Burnus <burnus@net-b.de>
2985
2986 PR other/33426
2987 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2988 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2989 (c_parser_statement_after_labels): Update calls.
2990
2991 2013-10-24 Tobias Burnus <burnus@net-b.de>
2992
2993 PR other/33426
2994 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2995 Handle PRAGMA_IVDEP.
2996 (c_parser_statement_after_labels): Update call.
2997
2998 2013-10-24 Marek Polacek <polacek@redhat.com>
2999
3000 * c-parser.c (c_parser_struct_declaration): Add a comment.
3001 (c_parser_declarator): Don't allow _Alignas here.
3002
3003 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
3004
3005 * c-parser.c: Include omp-low.h.
3006 * c-typeck.c: Likewise.
3007
3008 2013-10-17 Marek Polacek <polacek@redhat.com>
3009
3010 PR c/58267
3011 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3012 Document syntax of the array-declarator.
3013 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3014 are not permitted.
3015 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3016 (c_parser_struct_declaration): Likewise.
3017 (c_parser_declarator): Likewise.
3018 (c_parser_direct_declarator_inner): Likewise.
3019 (c_parser_parameter_declaration): Likewise.
3020 (c_parser_type_name): Likewise.
3021
3022 2013-10-11 Jakub Jelinek <jakub@redhat.com>
3023
3024 * c-lang.h (current_omp_declare_target_attribute): New extern
3025 decl.
3026 * c-parser.c: Include c-lang.h.
3027 (struct c_parser): Change tokens to c_token *.
3028 Add tokens_buf field. Change tokens_avail type to unsigned int.
3029 (c_parser_consume_token): If parser->tokens isn't
3030 &parser->tokens_buf[0], increment parser->tokens.
3031 (c_parser_consume_pragma): Likewise.
3032 (enum pragma_context): Add pragma_struct and pragma_param.
3033 (c_parser_external_declaration): Adjust
3034 c_parser_declaration_or_fndef caller.
3035 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3036 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3037 Adjust recursive call.
3038 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3039 of pragma_external.
3040 (c_parser_parameter_declaration): Use pragma_param instead of
3041 pragma_external.
3042 (c_parser_compound_statement_nostart, c_parser_label,
3043 c_parser_for_statement): Adjust
3044 c_parser_declaration_or_fndef callers.
3045 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3046 it through to c_parser_conditional_expression.
3047 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3048 pass it through to c_parser_binary_expression. Adjust recursive
3049 call.
3050 (c_parser_binary_expression): Remove prec argument, add
3051 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3052 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3053 binop matches it, use build2 instead of parser_build_binary_op.
3054 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3055 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3056 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3057 Handle pragma_struct and pragma_param the same as pragma_external.
3058 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3059 (c_parser_omp_variable_list): Parse array sections for
3060 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3061 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3062 (c_parser_omp_clause_reduction): Handle user defined reductions.
3063 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3064 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3065 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3066 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3067 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3068 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3069 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3070 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3071 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3072 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3073 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3074 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3075 (c_parser_omp_for_loop): Add CODE argument, pass it through
3076 to c_finish_omp_for. Change last argument to cclauses,
3077 and adjust uses to grab parallel clauses from the array of all
3078 the split clauses. Adjust c_parser_binary_expression,
3079 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3080 (omp_split_clauses): New function.
3081 (c_parser_omp_simd): New function.
3082 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3083 Allow the function to be called also when parsing combined constructs,
3084 and call c_parser_omp_simd when parsing for simd.
3085 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3086 #pragma omp section, require exactly one structured-block instead of
3087 sequence of statements.
3088 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3089 Allow the function to be called also when parsing combined constructs.
3090 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3091 Allow the function to be called also when parsing combined
3092 constructs.
3093 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3094 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3095 c_parser_omp_teams, c_parser_omp_target_data,
3096 c_parser_omp_target_update, c_parser_omp_target,
3097 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3098 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3099 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3100 (c_parser_omp_construct): Add p_name and mask vars. Handle
3101 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3102 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3103 and c_parser_omp_sections callers.
3104 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3105 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3106 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3107 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3108 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3109 OMP_CLAUSE_DEPEND.
3110 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3111 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3112 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3113 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3114 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3115 * c-typeck.c: Include tree-inline.h.
3116 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3117 handle_omp_array_sections_1, handle_omp_array_sections,
3118 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3119 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3120 user defined reductions.
3121 (c_tree_equal): New function.
3122 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3123 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3124 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3125 c_check_omp_declare_reduction_r): New prototypes.
3126 * c-decl.c (current_omp_declare_target_attribute): New variable.
3127 (c_decl_attributes): New function.
3128 (start_decl, start_function): Use it instead of decl_attributes.
3129 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3130 c_omp_reduction_decl, c_omp_reduction_lookup,
3131 c_check_omp_declare_reduction_r): New functions.
3132
3133 2013-09-25 Tom Tromey <tromey@redhat.com>
3134
3135 * Make-lang.in (c/gccspec.o): Remove.
3136 (CFLAGS-c/gccspec.o): New variable.
3137 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3138 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3139 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3140
3141 2013-09-25 Tom Tromey <tromey@redhat.com>
3142
3143 * Make-lang.in (c/gccspec.o): Don't use subshell.
3144
3145 2013-09-18 Marek Polacek <polacek@redhat.com>
3146
3147 PR sanitize/58443
3148 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3149 Remove unnecessary check.
3150
3151 2013-09-18 Marek Polacek <polacek@redhat.com>
3152
3153 PR sanitizer/58411
3154 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3155 no_sanitize_undefined attribute.
3156
3157 2013-09-13 Kai Tietz <ktietz@redhat.com>
3158
3159 PR target/57848
3160 * c-decl.c (c_builtin_function_ext_scope): Remove
3161 wrong assumption that it is never called on prexisting
3162 symbol.
3163
3164 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3165
3166 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3167
3168 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3169
3170 * c-objc-common.c (c_tree_printer): Tidy.
3171
3172 2013-08-30 Marek Polacek <polacek@redhat.com>
3173
3174 * c-typeck.c (build_binary_op): Add division by zero and shift
3175 instrumentation.
3176
3177 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
3178 Joseph Myers <joseph@codesourcery.com>
3179
3180 PR c/35649
3181 * c-typeck.c (c_common_type): Prefer double_type_node over
3182 other REAL_TYPE types with the same precision.
3183 (convert_arguments): Likewise.
3184
3185 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3186
3187 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3188 (c_initialize_diagnostics): Call a destructor for the early printer.
3189
3190 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3191
3192 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3193 printer initialization.
3194
3195 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
3196
3197 PR c/57490
3198 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3199 check for truth values.
3200 (expand_array_notation_exprs): Added truth values case. Removed an
3201 unwanted else. Added for-loop to walk through subtrees in default
3202 case.
3203
3204 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3205
3206 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3207
3208 2013-07-23 Joseph Myers <joseph@codesourcery.com>
3209
3210 * c-parser.c (struct c_generic_association): Fix typo.
3211
3212 2013-07-23 Tom Tromey <tromey@redhat.com>
3213 Joseph Myers <joseph@codesourcery.com>
3214
3215 * c-parser.c (struct c_generic_association): New.
3216 (c_generic_association_d): New typedef.
3217 (c_parser_generic_selection): New function.
3218 (c_parser_postfix_expression): Handle RID_GENERIC.
3219
3220 2013-07-13 Jason Merrill <jason@redhat.com>
3221
3222 PR c++/57793
3223 * c-decl.c (finish_struct): Check for too-large class.
3224
3225 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
3226
3227 PR c/57821
3228 * c-typeck.c (set_init_index): When folding, check for index overflow.
3229
3230 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3231
3232 * c-parser.c (c_parser_array_notation): Removed rejection of array
3233 notations in an array of function pointers.
3234
3235 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3236
3237 * c-array-notation.c (make_triplet_val_inv): New function.
3238 (create_cmp_incr): Likewise.
3239 (create_array_refs): Likewise.
3240 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3241 Also modularized common parts between functions and called the function.
3242 (build_array_notation_expr): Likewise.
3243 (fix_conditional_array_notations_1): Likewise.
3244 (fix_array_notation_expr): Likewise.
3245 (fix_array_notation_call_expr): Likewise.
3246
3247 2013-06-18 Marek Polacek <polacek@redhat.com>
3248
3249 PR c/57630
3250 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3251
3252 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3253
3254 * c-array-notation.c (build_array_notation_expr): Reject array notation
3255 mismatch between LHS and RHS even inside a call_expr. Also, removed
3256 a couple while statements that were dead code.
3257
3258 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3259
3260 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3261 excessive precision expressions in function parameters. Also removed
3262 couple unwanted while statements.
3263
3264 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3265
3266 * c-array-notation.c (expand_array_notation_exprs): Added
3267 ARRAY_NOTATION_REF case.
3268
3269 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3270
3271 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3272 function to c-family/array-notation-common.c.
3273 (is_cilkplus_reduce_builtin): Likewise.
3274 (find_rank): Likewise.
3275 (extract_array_notation_exprs): Likewise.
3276 (replace_array_notations): Likewise.
3277 (find_inv_trees): Likewise.
3278 (replace_inv_trees): Likewise.
3279 (contains_array_notation_expr): Likewise.
3280 (find_correct_array_notation_type): Likewise.
3281 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3282 (struct inv_list): Moved this to c-family/array-notation-common.c.
3283 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3284
3285 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3286
3287 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3288 reduction functions outside the for-loop. Added a check if the fundecl
3289 is non-NULL. Finally, removed an unwanted if-statement, and made the
3290 body unconditional.
3291
3292 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3293
3294 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3295 condition of the if-statement matches the rank of else-block and then-
3296 block when array notations are used.
3297 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3298 expression after the entire function body is parsed.
3299 (c_parser_expr_no_commas): Delayed creating array notation expressions
3300 to the end of function parsing.
3301 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3302 whole if-statement instead of just the condition.
3303 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3304
3305 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3306
3307 PR c/57474
3308 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3309 array to NULL_TREE if they are unused. Also added a check for the
3310 field to be NULL before its fields are used in future.
3311
3312 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3313
3314 PR bootstrap/57450
3315 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3316 (build_array_notation_expr): Likewise.
3317
3318 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3319
3320 * c-typeck.c (build_array_ref): Added a check to see if array's
3321 index is greater than one. If true, then emit an error.
3322 (build_function_call_vec): Exclude error reporting and checking
3323 for builtin array-notation functions.
3324 (convert_arguments): Likewise.
3325 (c_finish_return): Added a check for array notations as a return
3326 expression. If true, then emit an error.
3327 (c_finish_loop): Added a check for array notations in a loop
3328 condition. If true then emit an error.
3329 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3330 (build_binary_op): Added a check for array notation expr inside
3331 op1 and op0. If present, we call another function to find correct
3332 type.
3333 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3334 * c-parser.c (c_parser_compound_statement): Check if array
3335 notation code is used in tree, if so, then transform them into
3336 appropriate C code.
3337 (c_parser_expr_no_commas): Check if array notation is used in LHS
3338 or RHS, if so, then build array notation expression instead of
3339 regular modify.
3340 (c_parser_postfix_expression_after_primary): Added a check for
3341 colon(s) after square braces, if so then handle it like an array
3342 notation. Also, break up array notations in unary op if found.
3343 (c_parser_direct_declarator_inner): Added a check for array
3344 notation.
3345 (c_parser_compound_statement): Added a check for array notation in
3346 a stmt. If one is present, then expand array notation expr.
3347 (c_parser_if_statement): Likewise.
3348 (c_parser_switch_statement): Added a check for array notations in
3349 a switch statement's condition. If true, then output an error.
3350 (c_parser_while_statement): Similarly, but for a while.
3351 (c_parser_do_statement): Similarly, but for a do-while.
3352 (c_parser_for_statement): Similarly, but for a for-loop.
3353 (c_parser_unary_expression): Check if array notation is used in a
3354 pre-increment or pre-decrement expression. If true, then expand
3355 them.
3356 (c_parser_array_notation): New function.
3357 * c-array-notation.c: New file.
3358 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3359
3360 2013-05-23 Mike Stump <mikestump@comcast.net>
3361
3362 * c-typeck.c (convert_for_assignment): Handle references to memory
3363 spaces better.
3364
3365 2013-05-16 Jason Merrill <jason@redhat.com>
3366
3367 * Make-lang.in (cc1$(exeext)): Use link mutex.
3368
3369 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3370
3371 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3372 to simply use OPT_Wpointer_arith.
3373 (build_unary_op): Likewise.
3374
3375 2013-04-03 Jakub Jelinek <jakub@redhat.com>
3376
3377 PR c/19449
3378 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3379 argument. If set, or it temporarily for parsing of the first
3380 argument into force_folding_builtin_constant_p.
3381 (c_parser_postfix_expression): Adjust callers.
3382
3383 2013-03-21 Richard Biener <rguenther@suse.de>
3384
3385 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3386 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3387
3388 2013-02-12 Marek Polacek <polacek@redhat.com>
3389
3390 PR c/44938
3391 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3392 origtypes to NULL.
3393
3394 2013-01-24 Jakub Jelinek <jakub@redhat.com>
3395
3396 PR c/56078
3397 * c-typeck.c (set_nonincremental_init_from_string): If
3398 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3399 returned false.
3400 (process_init_element): Likewise.
3401
3402 2012-12-20 Jakub Jelinek <jakub@redhat.com>
3403
3404 PR c++/55619
3405 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3406 argument, don't call default_function_array_conversion
3407 nor c_fully_fold here.
3408 (c_parser_asm_statement): Adjust callers.
3409 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3410 and outputs here, and call default_function_array_conversion
3411 on inputs that don't need to be addressable.
3412
3413 2012-12-18 Jakub Jelinek <jakub@redhat.com>
3414
3415 PR c/39464
3416 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3417 warning require that both c_common_unsigned_type as well as
3418 c_common_signed_type is the same for both mvl and mvr types.
3419
3420 2012-11-16 Diego Novillo <dnovillo@google.com>
3421
3422 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3423
3424 * c-common.c: Use new vec API in vec.h.
3425 * c-common.h: Likewise.
3426 * c-gimplify.c: Likewise.
3427 * c-pragma.c: Likewise.
3428 * c-pretty-print.c: Likewise.
3429 * c-pretty-print.h: Likewise.
3430 * c-semantics.c: Likewise.
3431 * c-decl.c: Likewise.
3432 * c-parser.c: Likewise.
3433 * c-tree.h: Likewise.
3434 * c-typeck.c: Likewise.
3435
3436 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3437
3438 PR c++/54930
3439 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3440
3441 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3442
3443 PR c/53066
3444 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3445 shadows a function, unless the variable is a function or a
3446 pointer-to-function.
3447
3448 2012-10-12 Jakub Jelinek <jakub@redhat.com>
3449
3450 PR c/54381
3451 * c-parser.c (struct c_tree_loc_pair): Removed.
3452 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3453 add location_t * and tree * arguments, fill in array of 3
3454 sizeof_arg trees and corresponding locs.
3455 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3456 c_parser_expr_list callers.
3457 (c_parser_postfix_expression_after_primary): Likewise. Pass
3458 array of 3 sizeof_arg trees and locs (corresponding to first
3459 3 arguments) to sizeof_pointer_memaccess_warning.
3460
3461 2012-10-09 Lawrence Crowl <crowl@google.com>
3462
3463 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3464 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3465 hash table.
3466
3467 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3468
3469 PR c++/54194
3470 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3471 call.
3472
3473 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
3474
3475 PR c++/54427
3476 * c-typeck.c: Include c-common.h.
3477 (enum stv_conv): Moved to c-common.h.
3478 (scalar_to_vector): Moved to c-common.c.
3479 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3480 * Make-lang.in: c-typeck.c depends on c-common.h.
3481
3482 2012-10-04 Arnaud Charlet <charlet@adacore.com>
3483
3484 * c-decl.c (c_write_global_declarations): Fix handling of
3485 -fdump-ada-spec*.
3486
3487 2012-09-30 Sharad Singhai <singhai@google.com>
3488
3489 * c-decl.c (c_write_global_declarations): Use a different method
3490 to determine if the dump has ben initialized.
3491
3492 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3493
3494 PR c/54552
3495 * c-typeck.c (c_cast_expr): When casting to a type requiring
3496 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3497 c_fully_fold first.
3498
3499 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3500
3501 PR c/54103
3502 * c-typeck.c (build_unary_op): Pass original argument of
3503 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3504 any C_MAYBE_CONST_EXPR, if it has integer operands.
3505 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3506 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3507 to c_objc_common_truthvalue_conversion, then remove any
3508 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3509 c_objc_common_truthvalue_conversion not
3510 c_common_truthvalue_conversion.
3511 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3512 call note_integer_operands for arguments with integer operands
3513 that are not integer constants.
3514
3515 2012-09-13 Jakub Jelinek <jakub@redhat.com>
3516
3517 PR c/54559
3518 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3519 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3520
3521 2012-08-31 Jakub Jelinek <jakub@redhat.com>
3522
3523 PR c/54428
3524 * c-convert.c (convert): Don't call fold_convert_loc if
3525 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3526 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3527 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3528
3529 2012-08-24 Jakub Jelinek <jakub@redhat.com>
3530
3531 PR c/54355
3532 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3533 for nested and empty_ok arguments in the call to
3534 c_parser_declaration_or_fndef.
3535
3536 2012-08-17 Jakub Jelinek <jakub@redhat.com>
3537
3538 * c-tree.h (c_last_sizeof_arg): Declare.
3539 * c-parser.c (struct c_tree_loc_pair): New type.
3540 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3541 non-NULL.
3542 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3543 (c_parser_postfix_expression_after_primary): Likewise. Call
3544 sizeof_pointer_memaccess_warning if needed.
3545 (sizeof_ptr_memacc_comptypes): New function.
3546 * c-typeck.c (c_last_sizeof_arg): New global variable.
3547 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3548
3549 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
3550
3551 * c-lang.h (lang_decl): Add variable_size GTY option.
3552
3553 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3554
3555 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3556 * Make-lang.in: Fix dependencies.
3557
3558 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3559
3560 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3561 and add language Makefile hooks.
3562 * config-lang.in: New file.
3563 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3564 add the required "normal" config-lang.in rules.
3565 * c-lang.h: Moved from gcc/ to here.
3566 * c-tree.h: Likewise.
3567 * c-objc-common.c: Likewise.
3568 * c-objc-common.h: Likewise.
3569 * c-typeck.c: Likewise.
3570 * c-convert.c: Likewise.
3571 * c-lang.c: Likewise.
3572 * c-aux-info.c: Likewise.
3573 * c-errors.c: Likewise.
3574 * gccspec.c: Likewise.
3575 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3576 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3577 \f
3578 Copyright (C) 2012-2016 Free Software Foundation, Inc.
3579
3580 Copying and distribution of this file, with or without modification,
3581 are permitted in any medium without royalty provided the copyright
3582 notice and this notice are preserved.