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