re PR c++/85052 (Implement support for clang's __builtin_convertvector)
[gcc.git] / gcc / c / ChangeLog
1 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2
3 PR c++/85052
4 * c-parser.c (c_parser_postfix_expression): Parse
5 __builtin_convertvector.
6
7 2019-01-01 Jakub Jelinek <jakub@redhat.com>
8
9 Update copyright years.
10
11 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
12
13 PR c/51628
14 * c-typeck.c (convert_for_assignment): Call
15 warn_for_address_or_pointer_of_packed_member.
16
17 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
18
19 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
20 a more specific error message (instead of just falling through).
21
22 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
23
24 * c-parser.c (c_parser_asm_statement): Keep track of the location each
25 asm qualifier is first seen; use that to give nicer "duplicate asm
26 qualifier" messages. Delete 'quals" variable, instead pass the
27 "is_volatile_ flag to build_asm_stmt directly.
28 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
29 * c-typeck.c (build_asm_stmt): Ditto; adjust.
30
31 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
32
33 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
34 "done" boolean variable.
35
36 2018-12-19 David Malcolm <dmalcolm@redhat.com>
37
38 PR c++/87504
39 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
40 Move from here to gcc-rich-location.h and gcc-rich-location.c.
41 (build_binary_op): Use struct op_location_t and
42 class binary_op_rich_location.
43
44 2018-12-11 Jakub Jelinek <jakub@redhat.com>
45
46 PR sanitizer/88426
47 * c-convert.c (convert): Call c_fully_fold before calling
48 ubsan_instrument_float_cast.
49
50 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
51
52 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
53 setting "quals".
54
55 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
56
57 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
58 after asm. Pass a flag for it to build_asm_expr.
59 * c-tree.h (build_asm_expr): Update declaration.
60 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
61 set ASM_INLINE_P.
62
63 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
64
65 PR inline-asm/55681
66 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
67 combination of volatile and goto, in any order, without repetitions.
68
69 2018-12-04 James Norris <jnorris@codesourcery.com>
70 Cesar Philippidis <cesar@codesourcery.com>
71 Julian Brown <julian@codesourcery.com>
72
73 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
74 code.
75
76 2018-11-30 Richard Biener <rguenther@suse.de>
77
78 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
79 _Literal (type) { ... } as empty aggregate or vector constructor.
80
81 2018-11-29 Martin Sebor <msebor@redhat.com>
82
83 PR c/88091
84 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
85 (convert_arguments): Add comments. Pass additional argument to
86 the function above.
87
88 2018-11-29 Martin Sebor <msebor@redhat.com>
89
90 PR c/88172
91 PR testsuite/88208
92 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
93
94 2018-11-23 Martin Sebor <msebor@redhat.com>
95
96 PR testsuite/88098
97 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
98 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
99
100 2018-11-20 Martin Sebor <msebor@redhat.com>
101
102 * c-parser.c (c_parser_has_attribute_expression): New function.
103 (c_parser_attribute): New function.
104 (c_parser_attributes): Move code into c_parser_attribute.
105 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
106
107 2018-11-15 Martin Sebor <msebor@redhat.com>
108
109 PR c/83656
110 * c-decl.c (header_for_builtin_fn): Declare.
111 (diagnose_mismatched_decls): Diagnose declarations of built-in
112 functions without a prototype.
113 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
114 (convert_argument): Same.
115 (convert_arguments): Factor code out into convert_argument.
116 Detect mismatches between built-in formal arguments in calls
117 to built-in without prototype.
118 (build_conditional_expr): Same.
119 (type_or_builtin_type): New function.
120 (convert_for_assignment): Add argument. Conditionally issue
121 warnings instead of errors for mismatches.
122
123 2018-11-13 David Malcolm <dmalcolm@redhat.com>
124
125 * c-decl.c: Replace "source_location" with "location_t".
126 * c-tree.h: Likewise.
127 * c-typeck.c: Likewise.
128 * gimple-parser.c: Likewise.
129
130 2018-11-09 Jakub Jelinek <jakub@redhat.com>
131
132 * c-parser.c (c_parser_omp_clause_final): Use
133 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
134 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
135 parsing instead of c_parser_paren_condition.
136 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
137 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
138 c_fully_fold instead of c_parser_condition.
139 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
140 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
141 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
142 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
143 c_parser_expr_no_commas instead of c_parser_expression.
144
145 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
146 reduction clause with inscan modifier.
147
148 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
149 clauses other than atomic_default_mem_order.
150
151 2018-11-08 Jakub Jelinek <jakub@redhat.com>
152
153 * c-parser.c: Include memmode.h.
154 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
155 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
156 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
157 task_reduction clauses.
158 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
159 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
160 section, or lvalue assignment expression.
161 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
162 (c_parser_omp_clause_lastprivate): Parse optional
163 conditional: modifier.
164 (c_parser_omp_clause_hint): Require constant integer expression rather
165 than just integer expression.
166 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
167 clause.
168 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
169 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
170 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
171 functions.
172 (c_parser_omp_clause_depend): Parse iterator modifier and handle
173 iterators. Parse mutexinoutset and depobj kinds.
174 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
175 callers.
176 (c_parser_omp_all_clauses): Likewise. Handle
177 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
178 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
179 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
180 default memory order from requires directive if any. Adjust
181 c_finish_omp_atomic caller.
182 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
183 (c_parser_omp_flush): Parse flush with memory-order-clause.
184 (c_parser_omp_for_loop): Allow NE_EXPR even in
185 OpenMP loops, adjust c_finish_omp_for caller.
186 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
187 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
188 Allow to be called while parsing combined parallel master.
189 Parse combined master taskloop{, simd}.
190 (c_parser_omp_parallel): Parse combined
191 parallel master{, taskloop{, simd}} constructs.
192 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
193 (OMP_TASKGROUP_CLAUSE_MASK): Define.
194 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
195 (OMP_TASKWAIT_CLAUSE_MASK): Define.
196 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
197 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
198 around teams body. Use SET_EXPR_LOCATION.
199 (c_parser_omp_target_data): Allow target data
200 with only use_device_ptr clauses.
201 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
202 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
203 (c_parser_omp_requires): New function.
204 (c_finish_taskloop_clauses): New function.
205 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
206 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
207 declaration. Disallow in_reduction clause when combined with parallel
208 master.
209 (c_parser_omp_construct): Adjust c_parser_omp_master and
210 c_parser_omp_taskgroup callers.
211 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
212 other than cancel.
213 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
214 like OMP_CLAUSE_REDUCTION.
215 (handle_omp_array_sections): Likewise. Call save_expr on array
216 reductions before calling build_index_type. Handle depend clauses
217 with iterators.
218 (struct c_find_omp_var_s): New type.
219 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
220 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
221 with static, runtime or auto schedule kinds. Call save_expr for whole
222 array reduction sizes. Diagnose reductions with zero sized elements
223 or variable length structures. Diagnose nogroup clause used with
224 reduction clause(s). Handle depend clause with
225 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
226 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
227 some different type for other kinds. Use build_unary_op with
228 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
229 Handle depend clauses with iterators. Remove no longer needed special
230 case that predetermined const qualified vars may be specified in
231 firstprivate clause. Complain if const qualified vars are mentioned
232 in data-sharing clauses other than firstprivate or shared. Use
233 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
234 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
235 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
236 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
237
238 2018-10-29 David Malcolm <dmalcolm@redhat.com>
239
240 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
241 logic for change to name_hint::operator bool.
242 (undeclared_variable): Likewise.
243 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
244 (c_parser_parameter_declaration): Likewise.
245
246 2018-10-17 Joseph Myers <joseph@codesourcery.com>
247
248 * c-errors.c (pedwarn_c11): New function.
249 * c-parser.c (disable_extension_diagnostics): Save
250 warn_c11_c2x_compat and set it to 0.
251 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
252 (c_parser_static_assert_declaration_no_semi): Handle
253 _Static_assert without string constant.
254 * c-tree.h (pedwarn_c11): New prototype.
255
256 2018-10-17 David Malcolm <dmalcolm@redhat.com>
257
258 * Make-lang.in (selftest-c): New.
259 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
260 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
261 from gcc/Makefile.in.
262
263 2018-10-02 Richard Biener <rguenther@suse.de>
264
265 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
266
267 2018-09-26 Joseph Myers <joseph@codesourcery.com>
268
269 PR c/87390
270 * c-typeck.c (build_binary_op): Use excess precision for
271 comparisons of integers and floating-point for C11 and later.
272
273 2018-09-26 Martin Jambor <mjambor@suse.cz>
274
275 PR c/87347
276 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
277 comment.
278
279 2018-09-17 David Malcolm <dmalcolm@redhat.com>
280
281 * c-objc-common.c (range_label_for_type_mismatch::get_text):
282 Update for new param.
283 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
284 Likewise.
285
286 2018-09-17 Martin Jambor <mjambor@suse.cz>
287
288 PR c/63886
289 * c-parser.c: (warn_for_abs): New function.
290 (c_parser_postfix_expression_after_primary): Call it.
291
292 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
293
294 * c-typeck.c (digest_init): Shorten overlength strings.
295
296 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
297
298 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
299
300 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
301
302 * c-decl.c (finish_decl): Call braced_list_to_string here ...
303 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
304
305 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
306
307 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
308 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
309
310 2018-08-27 David Malcolm <dmalcolm@redhat.com>
311
312 PR 87091
313 * c-decl.c (implicitly_declare): Update call to
314 maybe_add_include_fixit to suggest overriding the location, as it
315 is for a note.
316 * c-objc-common.c (c_tree_printer): Update for conversion of
317 show_caret_p to a tri-state.
318
319 2018-08-27 Martin Liska <mliska@suse.cz>
320
321 * c-decl.c (locate_old_decl): Use new function
322 fndecl_built_in_p and remove check for FUNCTION_DECL if
323 possible.
324 (diagnose_mismatched_decls): Likewise.
325 (merge_decls): Likewise.
326 (warn_if_shadowing): Likewise.
327 (pushdecl): Likewise.
328 (implicitly_declare): Likewise.
329 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
330 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
331 * c-typeck.c (build_function_call_vec): Likewise.
332 (convert_arguments): Likewise.
333
334 2018-08-20 David Malcolm <dmalcolm@redhat.com>
335
336 PR other/84889
337 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
338 (diagnose_mismatched_decls): Likewise, in various places.
339 (warn_if_shadowing): Likewise.
340 (implicit_decl_warning): Likewise.
341 (implicitly_declare): Likewise.
342 (undeclared_variable): Likewise.
343 (declare_label): Likewise.
344 (grokdeclarator): Likewise.
345 (start_function): Likewise.
346 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
347 (c_parser_parameter_declaration): Likewise.
348 (c_parser_binary_expression): Likewise.
349 * c-typeck.c (c_expr_sizeof_expr): Likewise.
350 (parser_build_binary_op): Likewise.
351 (build_unary_op): Likewise.
352 (error_init): Likewise.
353 (pedwarn_init): Likewise.
354 (warning_init): Likewise.
355 (convert_for_assignment): Likewise.
356
357 2018-08-15 David Malcolm <dmalcolm@redhat.com>
358
359 * c-objc-common.c: Include "gcc-rich-location.h".
360 (c_tree_printer): Move implemenation of '%T' to...
361 (print_type): ...this new function.
362 (range_label_for_type_mismatch::get_text): New function.
363 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
364 range for the various ic_argpass cases.
365 (class maybe_range_label_for_tree_type_mismatch): New class.
366 (build_binary_op): Use it when calling binary_op_error.
367
368 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
369
370 * c-decl.c (start_decl): Do not warn if variables is named as main
371 and is a local variable.
372
373 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
374
375 PR c/19315
376 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
377 objects of unknown size.
378
379 2018-08-13 Martin Sebor <msebor@redhat.com>
380
381 PR tree-optimization/71625
382 * c-parser.c (c_parser_declaration_or_fndef): Call
383 braced_list_to_string.
384
385 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
386
387 PR c/86690
388 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
389 errors.
390
391 2018-08-01 Martin Sebor <msebor@redhat.com>
392
393 PR tree-optimization/86650
394 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
395 and TREE_BLOCK (t) from within percent_K_format to this callsite.
396
397 2018-08-01 Jakub Jelinek <jakub@redhat.com>
398
399 PR c/85704
400 * c-typeck.c (init_field_decl_cmp): New function.
401 (output_pending_init_elements): Use it for field comparisons
402 instead of pure bit_position comparisons.
403
404 2018-07-12 Jakub Jelinek <jakub@redhat.com>
405
406 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
407 type here, instead add "omp declare target implicit" attribute.
408 (finish_decl): Diagnose vars without mappable type here.
409
410 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
411 Thomas Schwinge <thomas@codesourcery.com>
412 Cesar Philippidis <cesar@codesourcery.com>
413
414 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
415 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
416 to their non-present_or_* counterparts. Make 'self' an alias to
417 PRAGMA_OACC_CLAUSE_HOST.
418 (c_parser_oacc_data_clause): Update GOMP mappings for
419 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
420 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
421 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
422 Remove support for present_or_* clauses.
423 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
424 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
425 (OACC_DECLARE_CLAUSE_MASK): Likewise.
426 (OACC_DATA_CLAUSE_MASK): Likewise.
427 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
428 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
429 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
430 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
431 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
432
433 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
434
435 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
436 * gimple-parser.c (c_parser_gimple_statement): Likewise.
437 (c_parser_gimple_unary_expression): Likewise.
438
439 2018-06-15 Jakub Jelinek <jakub@redhat.com>
440
441 PR c/86093
442 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
443 before doing POINTER_DIFF_EXPR.
444
445 2018-06-07 Marek Polacek <polacek@redhat.com>
446
447 PR c/85318
448 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
449 for loop initial declarations.
450
451 2018-05-30 David Pagan <dave.pagan@oracle.com>
452
453 PR c/55976
454 * c-decl.c (grokdeclarator): Update check for return type warnings.
455 (start_function): Likewise.
456 (finish_function): Likewise.
457 * c-typeck.c (c_finish_return): Update check for return type warnings.
458 Pass OPT_Wreturn_type to pedwarn when appropriate.
459
460 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
461
462 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
463 __FMA_EXPR handlng.
464
465 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
466
467 * gimple-parser.c: Include internal-fn.h.
468 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
469 (c_parser_gimple_call_internal): New function.
470 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
471 Fix typos in comment.
472
473 2018-05-10 Jakub Jelinek <jakub@redhat.com>
474
475 PR c++/85662
476 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
477 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
478 fold_convert_loc.
479 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
480 fold_offsetof_1, pass argtype as TYPE to it and drop the
481 fold_convert_loc.
482
483 2018-05-02 David Pagan <dave.pagan@oracle.com>
484
485 PR c/30552
486 * c-decl.c (old_style_parameter_scope): New function.
487 * c-parser.c (c_parser_postfix_expression): Check for statement
488 expressions in old-style function parameter list declarations.
489 * c-parser.h (old_style_parameter_scope): New extern declaration.
490
491 2018-04-25 Jakub Jelinek <jakub@redhat.com>
492
493 PR sanitizer/84307
494 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
495 it is not TREE_STATIC.
496 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
497 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
498 its COMPOUND_LITERAL_EXPR_DECL.
499
500 2018-03-21 Joseph Myers <joseph@codesourcery.com>
501
502 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
503 where all functions return the same _FloatN or _FloatNx type,
504 treat integer types as _Float64 instead of double.
505
506 2018-03-21 Jakub Jelinek <jakub@redhat.com>
507
508 PR c/84999
509 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
510 building vector comparison, diagnose it and return error_mark_node.
511
512 2018-03-15 Jakub Jelinek <jakub@redhat.com>
513
514 PR c/84853
515 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
516 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
517 INTEGER_TYPE element type.
518
519 2018-03-13 David Pagan <dave.pagan@oracle.com>
520
521 PR c/46921
522 * c-typeck.c (output_init_element): Ensure field initializer
523 expression is always evaluated if there are side effects.
524
525 2018-03-06 Jakub Jelinek <jakub@redhat.com>
526
527 PR c/84721
528 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
529 !building_stmt_list_p ().
530
531 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
532
533 PR c/84305
534 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
535 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
536 and include the BIND_EXPR in the list of things that need to be
537 pre-evaluated.
538
539 2018-02-09 Nathan Sidwell <nathan@acm.org>
540
541 PR c/84293
542 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
543 to strict_aliasing_warning.
544
545 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
546
547 * c-typeck.c (really_start_incremental_init, push_init_level,
548 set_nonincremental_init, output_init_element, process_init_element):
549 Use DECL_UNNAMED_BIT_FIELD.
550
551 2018-01-31 Marek Polacek <polacek@redhat.com>
552
553 PR c/81779
554 * c-parser.c (c_parser_compound_statement_nostart): Call
555 expansion_point_location_if_in_system_header.
556
557 2018-01-17 David Malcolm <dmalcolm@redhat.com>
558
559 PR c++/83814
560 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
561 the C part.
562
563 2018-01-13 Jakub Jelinek <jakub@redhat.com>
564
565 PR c/83801
566 * c-tree.h (decl_constant_value_1): Add a bool argument.
567 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
568 returning a CONSTRUCTOR if it is true. Use error_operand_p.
569 (decl_constant_value): Adjust caller.
570 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
571 decl_constant_value_1 as IN_INIT. Otherwise, punt if
572 decl_constant_value returns initializer that has BLKmode or
573 array type.
574 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
575
576 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
577 Alan Hayward <alan.hayward@arm.com>
578 David Sherwood <david.sherwood@arm.com>
579
580 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
581 TYPE_VECTOR_SUBPARTS.
582
583 2018-01-03 Jakub Jelinek <jakub@redhat.com>
584
585 Update copyright years.
586
587 2018-01-01 Jakub Jelinek <jakub@redhat.com>
588
589 PR c/83595
590 * c-parser.c (c_parser_braced_init, c_parser_initelt,
591 c_parser_conditional_expression, c_parser_cast_expression,
592 c_parser_sizeof_expression, c_parser_alignof_expression,
593 c_parser_postfix_expression, c_parser_omp_declare_reduction,
594 c_parser_transaction_expression): Use set_error () method instead
595 of setting value member to error_mark_node.
596
597 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
598
599 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
600 and _Float<N>X built-in functions.
601
602 2017-12-22 Jakub Jelinek <jakub@redhat.com>
603
604 PR debug/83550
605 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
606 TYPE_STUB_DECL and call rest_of_type_compilation before processing
607 incomplete vars rather than after it.
608
609 PR debug/83547
610 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
611 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
612 and consider empty ones if there are no other stmts. For
613 -Wunused-value walk all statements before the one only followed by
614 DEBUG_BEGIN_STMTs.
615
616 2017-12-22 Mike Stump <mikestump@comcast.net>
617 Eric Botcazou <ebotcazou@adacore.com>
618
619 * c-parser.c (c_parser_while_statement): Add unroll parameter and
620 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
621 (c_parser_do_statement): Likewise.
622 (c_parser_for_statement): Likewise.
623 (c_parser_statement_after_labels): Adjust calls to above.
624 (c_parse_pragma_ivdep): New static function.
625 (c_parser_pragma_unroll): Likewise.
626 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
627 <PRAGMA_UNROLL>: New case.
628
629 2017-12-19 Jakub Jelinek <jakub@redhat.com>
630
631 * c-typeck.c (comptypes_internal, function_types_compatible_p,
632 perform_integral_promotions, digest_init): Replace Yoda conditions
633 with typical order conditions.
634 * c-decl.c (check_bitfield_type_and_width): Likewise.
635
636 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
637
638 * c-typeck.c (c_safe_arg_type_equiv_p,
639 c_safe_function_type_cast_p): New function.
640 (build_c_cast): Implement -Wcast-function-type.
641
642 2017-12-14 Richard Biener <rguenther@suse.de>
643
644 PR c/83415
645 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
646 like REALPART_EXPR for the behavior of whether its operand
647 is an lvalue.
648
649 2017-12-12 Marek Polacek <polacek@redhat.com>
650
651 PR c/82679
652 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
653
654 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
655
656 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
657 * c-parser.c (add_debug_begin_stmt): New.
658 (c_parser_declaration_or_fndef): Call it.
659 (c_parser_compound_statement_nostart): Likewise.
660 (c_parser_statement_after_labels): Likewise.
661 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
662
663 2017-12-07 Joseph Myers <joseph@codesourcery.com>
664
665 * c-decl.c (build_compound_literal): Add parameter alignas_align
666 and set alignment of decl if nonzero.
667 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
668 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
669 qualifier.
670 (c_parser_struct_declaration): Update syntax comment.
671 (c_parser_type_name): Add alignas_ok argument and pass it to
672 c_parser_declspecs.
673 (c_parser_cast_expression): Pass true to c_parser_type_name and
674 give error if a cast used an _Alignas specifier.
675 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
676 give error if sizeof (type-name) used an _Alignas specifier.
677 (c_parser_alignof_expression): Pass true to c_parser_type_name and
678 give error if _Alignof (type-name) used an _Alignas specifier.
679 (c_parser_postfix_expression_after_paren_type): Check specified
680 alignment for a compound literal and pass it to
681 build_compound_literal.
682 * c-parser.h (c_parser_type_name): Update prototype.
683 * c-tree.h (build_compound_literal): Update prototype.
684
685 2017-12-07 Martin Sebor <msebor@redhat.com>
686
687 PR c/81544
688 * c-decl.c (c_decl_attributes): Look up existing declaration and
689 pass it to decl_attributes.
690
691 2017-12-06 David Malcolm <dmalcolm@redhat.com>
692
693 PR c/83236
694 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
695 reserved for use by the implementation.
696
697 2017-12-06 David Malcolm <dmalcolm@redhat.com>
698
699 * c-decl.c: Include "c-family/c-spellcheck.h".
700
701 2017-12-05 Martin Liska <mliska@suse.cz>
702 Jakub Jelinek <jakub@redhat.com>
703
704 * c-typeck.c (pointer_diff): Add new argument and instrument
705 pointer subtraction.
706 (build_binary_op): Similar for pointer comparison.
707
708 2017-12-01 Jakub Jelinek <jakub@redhat.com>
709
710 PR c/79153
711 * c-parser.c: Include tree-iterator.h.
712 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
713 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
714 on it.
715
716 PR c/83222
717 * c-tree.h (decl_constant_value_1): Declare.
718 * c-typeck.c (decl_constant_value_1): New function.
719 (decl_constant_value): Use it.
720 * c-fold.c (c_fully_fold_internal): If in_init, use
721 decl_constant_value_1 instead of decl_constant_value.
722
723 2017-11-30 Jakub Jelinek <jakub@redhat.com>
724
725 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
726
727 2017-11-28 Jakub Jelinek <jakub@redhat.com>
728
729 PR sanitizer/81275
730 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
731 c_switch_covers_all_cases_p returns true.
732
733 2017-11-28 Julia Koval <julia.koval@intel.com>
734 Sebastian Peryt <sebastian.peryt@intel.com>
735
736 * Make-lang.in (c/c-array-notation.o): Remove.
737 * c-array-notation.c: Delete.
738 * c-decl.c: Remove cilkplus condition.
739 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
740 c_parser_cilk_verify_simd, c_parser_array_notation,
741 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
742 c_parser_cilk_simd_fn_vector_attrs,
743 c_finish_cilk_simd_fn_tokens): Delete.
744 (c_parser_declaration_or_fndef): Remove cilkplus condition.
745 (c_parser_direct_declarator_inner): Ditto.
746 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
747 (c_parser_attributes, c_parser_compound_statement,
748 c_parser_statement_after_labels, c_parser_if_statement,
749 c_parser_switch_statement, c_parser_while_statement,
750 c_parser_do_statement, c_parser_for_statement,
751 c_parser_unary_expression, c_parser_postfix_expression,
752 c_parser_postfix_expression_after_primary,
753 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
754 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
755 support.
756 * c-typeck.c (build_array_ref, build_function_call_vec,
757 convert_arguments,
758 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
759 c_finish_loop, build_binary_op): Remove cilkplus support.
760
761 2017-11-28 Jakub Jelinek <jakub@redhat.com>
762
763 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
764 of build3.
765
766 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
767
768 * Make-lang.in (c.install-plugin): Install backend import library.
769
770 2017-11-23 Jakub Jelinek <jakub@redhat.com>
771
772 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
773 pragma_stmt context.
774
775 2017-11-23 Mike Stump <mikestump@comcast.net>
776 Eric Botcazou <ebotcazou@adacore.com>
777
778 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
779 ANNOTATE_EXPR.
780 (c_parser_do_statement): Likewise.
781 (c_parser_for_statement): Likewise.
782
783 2017-11-22 David Malcolm <dmalcolm@redhat.com>
784
785 PR c++/62170
786 * c-objc-common.c (c_tree_printer): Convert penultimate param from
787 bool to bool *. Within '%T' handling, if showing an "aka", use
788 "quoted" param to add appropriate quoting.
789
790 2017-11-22 Marek Polacek <polacek@redhat.com>
791
792 PR c++/60336
793 PR middle-end/67239
794 PR target/68355
795 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
796
797 2017-11-21 David Malcolm <dmalcolm@redhat.com>
798
799 PR c/83056
800 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
801 earlier failed lookups.
802
803 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
804
805 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
806 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
807
808 2017-11-20 David Malcolm <dmalcolm@redhat.com>
809
810 PR c/81404
811 * c-decl.c: Include "c-family/known-headers.h".
812 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
813 to known-headers.cc.
814 (class suggest_missing_header): Move to known-header.h.
815 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
816 than get_c_name_hint.
817
818 2017-11-20 David Malcolm <dmalcolm@redhat.com>
819
820 * c-decl.c (get_c_name_hint): New function.
821 (class suggest_missing_header): New class.
822 (lookup_name_fuzzy): Call get_c_name_hint and use it to
823 suggest missing headers to the user.
824
825 2017-11-20 David Malcolm <dmalcolm@redhat.com>
826
827 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
828 Include "c-family/name-hint.h"
829 (implicit_decl_warning): Convert "hint" from
830 const char * to name_hint. Pass location to
831 lookup_name_fuzzy. Suppress any deferred diagnostic if the
832 warning was not printed.
833 (undeclared_variable): Likewise for "guessed_id".
834 (lookup_name_fuzzy): Convert return type from const char *
835 to name_hint. Add location_t param.
836 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
837 Include "c-family/name-hint.h"
838 (c_parser_declaration_or_fndef): Convert "hint" from
839 const char * to name_hint. Pass location to lookup_name_fuzzy.
840 (c_parser_parameter_declaration): Likewise.
841
842 2017-11-19 Jakub Jelinek <jakub@redhat.com>
843
844 PR c/66618
845 PR c/69960
846 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
847 where needed.
848 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
849 handle_omp_array_sections): Likewise.
850 (digest_init): Don't call decl_constant_value_for_optimization.
851 * c-tree.h (decl_constant_value_for_optimization): Removed.
852 * c-fold.c (c_fold_array_ref): New function.
853 (c_fully_fold_internal): Add LVAL argument, propagate it through
854 recursive calls. For VAR_P call decl_constant_value and
855 unshare if not LVAL and either optimizing or IN_INIT. Remove
856 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
857 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
858 (c_fully_fold): Add LVAL argument, pass it through to
859 c_fully_fold_internal.
860 (decl_constant_value_for_optimization): Removed.
861
862 2017-11-15 Joseph Myers <joseph@codesourcery.com>
863
864 PR c/81156
865 * c-parser.c (check_tgmath_function): New function.
866 (enum tgmath_parm_kind): New enum.
867 (c_parser_postfix_expression): Handle __builtin_tgmath.
868
869 2017-10-31 David Malcolm <dmalcolm@redhat.com>
870
871 * c-decl.c (implicit_decl_warning): Update for renaming of
872 pedwarn_at_rich_loc and warning_at_rich_loc.
873 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
874 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
875 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
876 (c_parser_struct_or_union_specifier): Likewise for renaming of
877 pedwarn_at_rich_loc.
878 (c_parser_parameter_declaration): Likewise for renaming of
879 error_at_rich_loc.
880 * c-typeck.c (build_component_ref): Likewise.
881 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
882 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
883 (set_init_label): Likewise for renaming of error_at_rich_loc.
884
885 2017-10-30 Richard Biener <rguenther@suse.de>
886
887 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
888 stmts.
889
890 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
891
892 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
893 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
894
895 2017-10-25 David Malcolm <dmalcolm@redhat.com>
896
897 PR c/7356
898 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
899 semicolons.
900
901 2017-10-25 Jakub Jelinek <jakub@redhat.com>
902
903 PR libstdc++/81706
904 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
905 newdecl to corresponding __builtin_ if any.
906
907 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
908
909 PR c++/82466
910 * c-decl.c (diagnose_mismatched_decls): Use
911 OPT_Wbuiltin_declaration_mismatch.
912
913 2017-10-12 David Malcolm <dmalcolm@redhat.com>
914
915 * c-parser.c (c_parser_require): Add "type_is_unique" param and
916 use it to guard calls to maybe_suggest_missing_token_insertion.
917 (c_parser_parms_list_declarator): Override default value of new
918 "type_is_unique" param to c_parser_require.
919 (c_parser_asm_statement): Likewise.
920 * c-parser.h (c_parser_require): Add "type_is_unique" param,
921 defaulting to true.
922
923 2017-10-11 Nathan Sidwell <nathan@acm.org>
924
925 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
926
927 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
928
929 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
930 operating on trees as wide_ints.
931 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
932 (c_tree_equal): Likewise.
933
934 2017-10-04 David Malcolm <dmalcolm@redhat.com>
935
936 * c-decl.c (push_parm_decl): Store c_parm's location into the
937 PARAM_DECL.
938 (build_c_parm): Add "loc" param and store it within the c_parm.
939 * c-parser.c (struct c_parser): Add "last_token_location" field.
940 (c_parser_consume_token): Store location of the token into the
941 new field.
942 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
943 when handling a FUNCTION_DECL, if it doesn't already have them.
944 (c_parser_parameter_declaration): Generate a location for the
945 parameter, and pass it to the call to build_c_parm.
946 * c-tree.h (struct c_parm): Add field "loc".
947 (build_c_parm): Add location_t param.
948 * c-typeck.c (get_fndecl_argument_location): New function.
949 (inform_for_arg): New function.
950 (convert_for_assignment): Use inform_for_arg when dealing with
951 ic_argpass.
952
953 2017-09-29 Jakub Jelinek <jakub@redhat.com>
954
955 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
956 width is non-NULL.
957 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
958 don't SET_DECL_C_BIT_FIELD here.
959
960 PR c/82340
961 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
962 instead of trying to set just TREE_READONLY manually.
963
964 2017-09-16 Tom de Vries <tom@codesourcery.com>
965
966 PR c/81875
967 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
968 cond itself.
969
970 2017-09-15 Joseph Myers <joseph@codesourcery.com>
971
972 PR c/82071
973 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
974 for C11.
975 (build_conditional_expr): For C11, generate result with excess
976 precision when one argument is an integer and the other is of a
977 type using excess precision.
978
979 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
980
981 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
982
983 2017-09-13 Marek Polacek <polacek@redhat.com>
984
985 PR c/82167
986 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
987 than expr.original_type.
988
989 2017-09-12 Nathan Sidwell <nathan@acm.org>
990
991 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
992 resort_sorted_fields): Moved from c-family/c-common.c.
993 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
994
995 2017-09-01 Joseph Myers <joseph@codesourcery.com>
996
997 PR c/82071
998 * c-typeck.c (build_atomic_assign): Handle argument with excess
999 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1000 argument passed to build_binary_op and convert_for_assignment but
1001 not for call to c_fully_fold.
1002 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1003 Ensure build_binary_op is called with argument with original
1004 semantic type. Avoid calling c_fully_fold with an
1005 EXCESS_PRECISION_EXPR from build_binary_op.
1006
1007 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1008
1009 PR c/81887
1010 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1011
1012 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1013 Alan Hayward <alan.hayward@arm.com>
1014 David Sherwood <david.sherwood@arm.com>
1015
1016 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1017 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1018 m1 and m2 to the signed equivalent of a fixed-point
1019 SCALAR_TYPE_MODE.
1020
1021 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1022
1023 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1024 than CAN_HAVE_LOCATION_P when determining whether to use the
1025 location_t value within "value".
1026
1027 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1028
1029 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1030 rather than peeking the location of the first token.
1031 * c-tree.h (c_expr::get_location): New method.
1032
1033 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1034
1035 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1036 to check_function_arguments.
1037
1038 2017-08-18 Marek Polacek <polacek@redhat.com>
1039
1040 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1041 commentary.
1042
1043 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1044
1045 PR c/53037
1046 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1047 (check_bitfield_type_and_width): Don't allow bit-field with
1048 warn_if_not_aligned type.
1049
1050 2017-08-14 Martin Sebor <msebor@redhat.com>
1051
1052 PR c/81117
1053 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1054
1055 2017-08-11 Marek Polacek <polacek@redhat.com>
1056
1057 PR c/81795
1058 * c-decl.c (pushtag): Only print inform if the warning was printed.
1059 (grokdeclarator): Likewise.
1060
1061 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1062
1063 * c-parser.c (c_parser_error): Rename to...
1064 (c_parser_error_richloc): ...this, making static, and adding
1065 "richloc" parameter, passing it to the c_parse_error call,
1066 rather than calling c_parser_set_source_position_from_token.
1067 (c_parser_error): Reintroduce, reimplementing in terms of the
1068 above, converting return type from void to bool.
1069 (class token_pair): New class.
1070 (struct matching_paren_traits): New struct.
1071 (matching_parens): New typedef.
1072 (struct matching_brace_traits): New struct.
1073 (matching_braces): New typedef.
1074 (get_matching_symbol): New function.
1075 (c_parser_require): Add param MATCHING_LOCATION, using it to
1076 highlight matching "opening" tokens for missing "closing" tokens.
1077 (c_parser_skip_until_found): Likewise.
1078 (c_parser_static_assert_declaration_no_semi): Convert explicit
1079 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1080 class matching_parens, so that the pertinent open parenthesis is
1081 highlighted when there are problems locating the close
1082 parenthesis.
1083 (c_parser_struct_or_union_specifier): Likewise.
1084 (c_parser_typeof_specifier): Likewise.
1085 (c_parser_alignas_specifier): Likewise.
1086 (c_parser_simple_asm_expr): Likewise.
1087 (c_parser_braced_init): Likewise, for matching_braces.
1088 (c_parser_paren_condition): Likewise, for matching_parens.
1089 (c_parser_switch_statement): Likewise.
1090 (c_parser_for_statement): Likewise.
1091 (c_parser_asm_statement): Likewise.
1092 (c_parser_asm_operands): Likewise.
1093 (c_parser_cast_expression): Likewise.
1094 (c_parser_sizeof_expression): Likewise.
1095 (c_parser_alignof_expression): Likewise.
1096 (c_parser_generic_selection): Likewise.
1097 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1098 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1099 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1100 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1101 c_parser_skip_until_found call.
1102 (c_parser_objc_class_definition): Use class matching_parens as
1103 above.
1104 (c_parser_objc_method_decl): Likewise.
1105 (c_parser_objc_try_catch_finally_statement): Likewise.
1106 (c_parser_objc_synchronized_statement): Likewise.
1107 (c_parser_objc_at_property_declaration): Likewise.
1108 (c_parser_oacc_wait_list): Likewise.
1109 (c_parser_omp_var_list_parens): Likewise.
1110 (c_parser_omp_clause_collapse): Likewise.
1111 (c_parser_omp_clause_default): Likewise.
1112 (c_parser_omp_clause_if): Likewise.
1113 (c_parser_omp_clause_num_threads): Likewise.
1114 (c_parser_omp_clause_num_tasks): Likewise.
1115 (c_parser_omp_clause_grainsize): Likewise.
1116 (c_parser_omp_clause_priority): Likewise.
1117 (c_parser_omp_clause_hint): Likewise.
1118 (c_parser_omp_clause_defaultmap): Likewise.
1119 (c_parser_oacc_single_int_clause): Likewise.
1120 (c_parser_omp_clause_ordered): Likewise.
1121 (c_parser_omp_clause_reduction): Likewise.
1122 (c_parser_omp_clause_schedule): Likewise.
1123 (c_parser_omp_clause_num_teams): Likewise.
1124 (c_parser_omp_clause_thread_limit): Likewise.
1125 (c_parser_omp_clause_aligned): Likewise.
1126 (c_parser_omp_clause_linear): Likewise.
1127 (c_parser_omp_clause_safelen): Likewise.
1128 (c_parser_omp_clause_simdlen): Likewise.
1129 (c_parser_omp_clause_depend): Likewise.
1130 (c_parser_omp_clause_map): Likewise.
1131 (c_parser_omp_clause_device): Likewise.
1132 (c_parser_omp_clause_dist_schedule): Likewise.
1133 (c_parser_omp_clause_proc_bind): Likewise.
1134 (c_parser_omp_clause_uniform): Likewise.
1135 (c_parser_omp_for_loop): Likewise.
1136 (c_parser_cilk_clause_vectorlength): Likewise.
1137 (c_parser_cilk_clause_linear): Likewise.
1138 (c_parser_transaction_expression): Likewise.
1139 * c-parser.h (c_parser_require): Add param matching_location with
1140 default UNKNOWN_LOCATION.
1141 (c_parser_error): Convert return type from void to bool.
1142 (c_parser_skip_until_found): Add param matching_location with
1143 default UNKNOWN_LOCATION.
1144
1145 2017-08-09 Marek Polacek <polacek@redhat.com>
1146
1147 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1148 * c-tree.h (build_external_ref): Update declaration.
1149 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1150 (build_external_ref): Change the type of a parameter to bool.
1151 (parser_build_binary_op): Use true/false instead of 1/0.
1152 (pointer_diff): Likewise.
1153 (build_modify_expr): Likewise.
1154 (set_designator): Change the type of a parameter to bool.
1155 (set_init_index): Use true/false instead of 1/0.
1156 (set_init_label): Likewise.
1157 (output_init_element): Change the type of a parameter to bool.
1158 (output_pending_init_elements): Use true/false instead of 1/0.
1159 (process_init_element): Likewise.
1160 (build_binary_op): Change the type of a parameter to bool.
1161
1162 2017-08-09 Marek Polacek <polacek@redhat.com>
1163
1164 PR c/81233
1165 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1166 Call emit_diagnostic_valist instead of pedwarn.
1167 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1168 Print the relevant types in diagnostics.
1169
1170 2017-08-09 Marek Polacek <polacek@redhat.com>
1171
1172 PR c/81417
1173 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1174 build_conditional_expr.
1175 * c-parser.c (c_parser_conditional_expression): Create locations for
1176 EXP1 and EXP2 from their source ranges. Pass the locations down to
1177 build_conditional_expr.
1178 * c-tree.h (build_conditional_expr): Update declaration.
1179 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1180 For -Wsign-compare, also print the types.
1181
1182 2017-08-08 Martin Liska <mliska@suse.cz>
1183
1184 * c-convert.c: Include header files.
1185 * c-typeck.c: Likewise.
1186
1187 2017-08-07 Martin Liska <mliska@suse.cz>
1188
1189 * c-parser.c (c_parser_attributes): Canonicalize name of an
1190 attribute.
1191
1192 2017-08-02 Marek Polacek <polacek@redhat.com>
1193
1194 PR c/81289
1195 * c-parser.c (c_parser_unary_expression): Use set_error.
1196
1197 PR c/81448
1198 PR c/81306
1199 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1200 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1201
1202 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
1203 Martin Liska <mliska@suse.cz>
1204
1205 * c-typeck.c (c_finish_goto_label): Build gimple predict
1206 statement.
1207
1208 2017-07-31 Martin Liska <mliska@suse.cz>
1209
1210 PR sanitize/81530
1211 * c-convert.c (convert): Guard condition with flag_sanitize_p
1212 also with current_function_decl non-null equality.
1213 * c-decl.c (grokdeclarator): Likewise.
1214 * c-typeck.c (build_binary_op): Likewise.
1215
1216 2017-07-25 Marek Polacek <polacek@redhat.com>
1217
1218 * c-decl.c (grokfield): Remove local variable.
1219
1220 2017-07-25 Marek Polacek <polacek@redhat.com>
1221
1222 PR c/81364
1223 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1224 macro expansion if the body is in { }.
1225 (c_parser_while_statement): Likewise.
1226 (c_parser_for_statement): Likewise.
1227
1228 2017-07-18 Nathan Sidwell <nathan@acm.org>
1229
1230 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1231
1232 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1233
1234 * c-decl.c (implicitly_declare): When suggesting a missing
1235 #include, provide a fix-it hint.
1236
1237 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1238
1239 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1240 and call that instead.
1241 * c-tree.h (selftest::run_c_tests): New decl.
1242
1243 2017-06-26 Marek Polacek <polacek@redhat.com>
1244
1245 PR c/80116
1246 * c-parser.c (c_parser_if_body): Set the location of the
1247 body of the conditional after parsing all the labels. Call
1248 warn_for_multistatement_macros.
1249 (c_parser_else_body): Likewise.
1250 (c_parser_switch_statement): Likewise.
1251 (c_parser_while_statement): Likewise.
1252 (c_parser_for_statement): Likewise.
1253 (c_parser_statement): Add a default argument. Save the location
1254 after labels have been parsed.
1255 (c_parser_c99_block_statement): Likewise.
1256
1257 2017-06-19 Richard Biener <rguenther@suse.de>
1258
1259 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1260 negated _Literals to parse _Literal (int) -1.
1261
1262 2017-06-13 Martin Liska <mliska@suse.cz>
1263
1264 PR sanitize/78204
1265 * c-convert.c (convert): Use sanitize_flags_p.
1266 * c-decl.c (grokdeclarator): Likewise.
1267 * c-typeck.c (convert_for_assignment): Likewise.
1268 (c_finish_return): Likewise.
1269 (build_binary_op): Likewise.
1270
1271 2017-06-08 Jakub Jelinek <jakub@redhat.com>
1272
1273 PR c/81006
1274 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1275 to sizetype before size_binop.
1276
1277 2017-06-07 Jakub Jelinek <jakub@redhat.com>
1278
1279 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1280 of TDI_generic.
1281
1282 2017-06-06 Marek Polacek <polacek@redhat.com>
1283
1284 PR c/79983
1285 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1286 ref.
1287 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1288
1289 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1290
1291 * c-parser.c (c_parser_binary_expression): Implement the
1292 -Wsizeof_pointer_div warning.
1293 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1294 from a parenthesized expression.
1295 (c_parser_expr_list): Use c_last_sizeof_loc.
1296 * c-tree.h (c_last_sizeof_loc): New external.
1297 * c-typeck.c (c_last_sizeof_loc): New variable.
1298 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1299
1300 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1301
1302 PR testsuite/80580
1303 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1304
1305 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1306
1307 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1308 parameters.
1309
1310 2017-05-24 Martin Sebor <msebor@redhat.com>
1311
1312 PR c/80731
1313 * c-fold.c (c_fully_fold_internal): Adjust.
1314 * c-typeck.c (parser_build_unary_op): Adjust.
1315
1316 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1317
1318 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1319 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1320 "VECTOR_LENGTH".
1321
1322 2017-05-23 Marek Polacek <polacek@redhat.com>
1323
1324 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1325 quotes.
1326
1327 2017-05-22 Jakub Jelinek <jakub@redhat.com>
1328
1329 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1330 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1331 it returned invariant. Call tree_invariant_p unconditionally
1332 afterwards to decide whether to return expr or op0.
1333
1334 2017-05-22 Nathan Sidwell <nathan@acm.org>
1335
1336 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1337
1338 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1339
1340 * c-parser.c (c_parser_omp_clause_default): Handle
1341 "OMP_CLAUSE_DEFAULT_PRESENT".
1342
1343 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1344
1345 * config-lang.in (gtfiles): Add c-family/c-format.c.
1346
1347 2017-05-18 Nathan Sidwell <nathan@acm.org>
1348
1349 * c-decl.c (pushdecl_top_level): Delete unused function.
1350
1351 2017-05-18 Marek Polacek <polacek@redhat.com>
1352
1353 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1354 (check_earlier_gotos): Likewise.
1355 (define_label): Likewise.
1356 (pending_xref_error): Likewise.
1357 (smallest_type_quals_location): Likewise.
1358 (grokdeclarator): Likewise.
1359 (grokparms): Likewise.
1360 (identifier_global_value): Likewise.
1361 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1362 (find_init_member): Likewise.
1363
1364 2017-05-18 Marek Polacek <polacek@redhat.com>
1365
1366 * c-decl.c (start_decl): Use false/true instead of 0/1.
1367 (grokdeclarator): Likewise.
1368 (finish_struct): Likewise.
1369 (start_function): Change the return type to bool. Use false/true
1370 instead of 0/1.
1371 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1372 * c-tree.h (start_function): Update.
1373 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1374 (set_designator): Change the return type to bool. Use false/true
1375 instead of 0/1.
1376
1377 2017-05-17 Marek Polacek <polacek@redhat.com>
1378
1379 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1380 * c-typeck.c: Likewise.
1381
1382 2017-05-17 Marek Polacek <polacek@redhat.com>
1383
1384 PR sanitizer/80659
1385 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1386 DECL_IGNORED_P even for non-static compound literals.
1387
1388 2017-05-17 Martin Liska <mliska@suse.cz>
1389
1390 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1391 use it instead of int type.
1392
1393 2017-05-17 Marek Polacek <polacek@redhat.com>
1394
1395 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1396 call c_fully_fold.
1397 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1398 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1399 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1400 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1401 save_expr.
1402 (c_parser_conditional_expression): Likewise.
1403 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1404 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1405 (process_init_element): Likewise.
1406 (build_binary_op): Likewise.
1407 (handle_omp_array_sections_1): Likewise.
1408
1409 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1410
1411 * c-parser.c (c_parser_omp_clause_num_gangs)
1412 (c_parser_omp_clause_num_workers)
1413 (c_parser_omp_clause_vector_length): Merge functions into...
1414 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1415 all users.
1416
1417 2017-05-11 Nathan Sidwell <nathan@acm.org>
1418
1419 * gimple-parser.c: Don't #include tree-dump.h.
1420
1421 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1422
1423 PR testsuite/80580
1424 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1425
1426 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1427
1428 PR testsuite/80580
1429 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1430 incorrect __MEM syntax.
1431
1432 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1433
1434 PR testsuite/80580
1435 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1436 type of unary '*'.
1437
1438 2017-05-09 Nathan Sidwell <nathan@acm.org>
1439
1440 * c-tree.h (pushdecl): Declare.
1441
1442 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1443
1444 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1445 with diagnostic_report_diagnostic.
1446 * c-errors.c (pedwarn_c99): Likewise.
1447 (pedwarn_c90): Likewise.
1448
1449 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1450
1451 PR c++/80038
1452 * c-gimplify.c (c_gimplify_expr): Remove calls to
1453 cilk_gimplifY_call_params_in_spawned_fn.
1454
1455 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1456
1457 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1458 hint for removing extra semicolon.
1459
1460 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1461
1462 PR c/80468
1463 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1464 enabled, set specs->type to integer_type_node.
1465
1466 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1467
1468 * c-array-notation.c: Fix typo in comment.
1469
1470 2017-03-29 Marek Polacek <polacek@redhat.com>
1471
1472 PR c/79730
1473 * c-decl.c (finish_decl): Check VAR_P.
1474
1475 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1476
1477 PR middle-end/80162
1478 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1479 * c-typeck.c (c_mark_addressable): Likewise. Look through
1480 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1481 to ARRAY_TYPE.
1482 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1483
1484 2017-03-23 Marek Polacek <polacek@redhat.com>
1485
1486 * c-tree.h: Remove a C_RID_YYCODE reference.
1487
1488 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1489
1490 PR c/80097
1491 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1492 optional COMPOUND_EXPR with ubsan instrumentation.
1493
1494 2017-03-17 Marek Polacek <polacek@redhat.com>
1495
1496 * c-parser.c: Add C11 references.
1497
1498 2017-03-15 Marek Polacek <polacek@redhat.com>
1499
1500 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1501
1502 2017-03-11 Marek Polacek <polacek@redhat.com>
1503
1504 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1505
1506 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1507
1508 PR translation/79848
1509 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1510 "%qs".
1511 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1512
1513 2017-03-09 Marek Polacek <polacek@redhat.com>
1514
1515 PR sanitizer/79757
1516 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1517 parameter declarations with initializers.
1518
1519 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1520
1521 PR c/79969
1522 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1523 TYPE_STUB_DECL.
1524
1525 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1526
1527 PR c/79834
1528 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1529 for "may only be used in compound statements" diagnostics, change it
1530 such that the same translatable string is used for all pragmas. For
1531 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1532 diagnostics.
1533 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1534 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1535 "may only be used in compound statements" diagnostics, such that the
1536 same translatable string is used for all pragmas.
1537
1538 2017-03-04 Marek Polacek <polacek@redhat.com>
1539
1540 PR c/79847
1541 * c-decl.c (implicit_decl_warning): Add missing space.
1542
1543 2017-03-03 Marek Polacek <polacek@redhat.com>
1544
1545 PR c/79758
1546 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1547 current_function_prototype_arg_types is error_mark_node. Fix
1548 formatting. Use TREE_VALUE instead of TREE_TYPE.
1549
1550 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1551
1552 PR c/79837
1553 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1554 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1555 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1556 diagnostics.
1557
1558 PR c/79836
1559 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1560 instead of %<_Generic>.
1561 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1562 (c_parser_omp_target_exit_data): Use %<release%> instead of
1563 %<release>.
1564
1565 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1566
1567 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1568 instead of just cond ? "..." : "...".
1569 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1570 for "enter"/"exit" keyword.
1571 (c_finish_oacc_routine): Don't use %s to supply portions of the
1572 message.
1573
1574 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1575
1576 PR c++/79588
1577 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1578 handle -Wrestrict here.
1579 * c-typeck.c (build_function_call_vec): Adjust
1580 check_function_arguments caller.
1581
1582 2017-02-23 Richard Biener <rguenther@suse.de>
1583
1584 PR c/79684
1585 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1586 to initialize c_exprs to return.
1587 (c_parser_gimple_binary_expression): Likewise.
1588 (c_parser_gimple_unary_expression): Likewise.
1589 (c_parser_gimple_postfix_expression): Likewise.
1590
1591 2017-02-22 Marek Polacek <polacek@redhat.com>
1592
1593 PR c/79662
1594 * c-typeck.c (convert_arguments): Handle error_mark_node.
1595
1596 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1597
1598 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1599 value of c_parser_parse_ssa_name against error_mark_node and emit
1600 error if ssa name is anonymous and written as default definition.
1601
1602 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1603
1604 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1605 FMA_EXPR.
1606
1607 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1608
1609 PR c++/79512
1610 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1611 ignore #pragma omp target even when not followed by identifier.
1612
1613 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1614
1615 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1616 (c_parser_gimple_unary_expression): Likewise.
1617
1618 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1619
1620 * c-parser.c (c_parser_oacc_declare): Add missing space in
1621 diagnostics.
1622
1623 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1624
1625 PR c/79478
1626 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1627 set_c_expr_source_range when parsing ssa-name.
1628
1629 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1630 Richard Biener <rguenther@suse.de>
1631
1632 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1633 building IL when arguments are error_mark_node.
1634 (c_parser_gimple_unary_expression): Likewise.
1635 (c_parser_gimple_if_stmt): Likewise.
1636 (c_parser_gimple_switch_stmt): Likewise.
1637 (c_parser_gimple_return_stmt): Likewise.
1638 (c_parser_parse_ssa_name): When name lookup fails do not build
1639 an SSA name. Use undeclared rather than not declared in error
1640 reporting.
1641
1642 2017-02-09 Marek Polacek <polacek@redhat.com>
1643
1644 PR c/79428
1645 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1646 instead of c_parser_skip_until_found.
1647
1648 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1649
1650 PR c/79431
1651 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1652 symtab_node::get on automatic variables.
1653
1654 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1655 Chung-Lin Tang <cltang@codesourcery.com>
1656
1657 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1658 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1659 semantic checking.
1660 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1661
1662 2017-02-07 Richard Biener <rguenther@suse.de>
1663
1664 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1665 (c_parser_gimple_postfix_expression_after_primary):
1666 Do not use c_build_function_call_vec to avoid folding and promotion.
1667 Simplify.
1668
1669 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1670
1671 PR lto/79061
1672 * c-decl.c (pop_scope): Pass main_input_filename to
1673 build_translation_unit_decl.
1674
1675 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1676
1677 * c-parser.c: Include "read-rtl-function.h" and
1678 "run-rtl-passes.h".
1679 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1680 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1681 production. Update for renaming of field "gimple_pass" to
1682 "gimple_or_rtl_pass". If __RTL was seen, call
1683 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1684 to an auto_timevar, to cope with early exit.
1685 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1686 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1687 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1688 Handle RID_RTL.
1689 (c_parser_parse_rtl_body): New function.
1690 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1691 (struct c_declspecs): Rename field "gimple_pass" to
1692 "gimple_or_rtl_pass". Add field "rtl_p".
1693 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1694 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1695 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1696 (c_parser_gimple_or_rtl_pass_list): ...this.
1697
1698 2017-01-20 Marek Polacek <polacek@redhat.com>
1699
1700 PR c/64279
1701 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1702
1703 2017-01-13 Richard Biener <rguenther@suse.de>
1704
1705 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1706 nops.
1707
1708 2017-01-13 Richard Biener <rguenther@suse.de>
1709
1710 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1711 _Literal ( type-name ) number.
1712
1713 2017-01-12 Richard Biener <rguenther@suse.de>
1714
1715 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1716 __MEM.
1717
1718 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1719
1720 PR c++/72813
1721 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1722 PCH file.
1723
1724 2017-01-11 Richard Biener <rguenther@suse.de>
1725
1726 PR bootstrap/79052
1727 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1728 returns on parse errors.
1729
1730 2017-01-04 Marek Polacek <polacek@redhat.com>
1731
1732 PR c++/64767
1733 * c-parser.c (c_parser_postfix_expression): Mark zero character
1734 constants by setting original_type in c_expr.
1735 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1736 with a zero character constant.
1737 (char_type_p): New function.
1738
1739 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1740
1741 * c-parser.c (c_parser_declaration_or_fndef): Create a
1742 rich_location at init_loc and parse it to start_init.
1743 (last_init_list_comma): New global.
1744 (c_parser_braced_init): Update last_init_list_comma when parsing
1745 commas. Pass it to pop_init_level. Pass location of closing
1746 brace to pop_init_level.
1747 (c_parser_postfix_expression_after_paren_type): Create a
1748 rich_location at type_loc and parse it to start_init.
1749 (c_parser_omp_declare_reduction): Likewise for loc.
1750 * c-tree.h (start_init): Add rich_location * param.
1751 (pop_init_level): Add location_t param.
1752 * c-typeck.c (struct initializer_stack): Add field
1753 "missing_brace_richloc".
1754 (start_init): Add richloc param, use it to initialize
1755 the stack node's missing_brace_richloc.
1756 (last_init_list_comma): New decl.
1757 (finish_implicit_inits): Pass last_init_list_comma to
1758 pop_init_level.
1759 (push_init_level): When finding missing open braces, add fix-it
1760 hints to the richloc.
1761 (pop_init_level): Add "insert_before" param and pass it
1762 when calling pop_init_level. Add fixits about missing
1763 close braces to any richloc. Use the richloc for the
1764 -Wmissing-braces warning.
1765 (set_designator): Pass last_init_list_comma to pop_init_level.
1766 (process_init_element): Likewise.
1767
1768 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1769
1770 Update copyright years.
1771
1772 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1773
1774 PR bootstrap/78817
1775 * c-typeck.c (build_function_call_vec): If check_function_arguments
1776 returns true, set TREE_NO_WARNING on CALL_EXPR.
1777
1778 PR c/77767
1779 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1780 to *expr instead of overwriting it.
1781
1782 2016-12-20 Richard Biener <rguenther@suse.de>
1783
1784 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1785 error recovery.
1786 (c_parser_gimple_statement): Only build assigns for non-error
1787 stmts.
1788 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1789
1790 2016-12-14 Martin Jambor <mjambor@suse.cz>
1791
1792 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1793 omp-low.h.
1794 (c_finish_oacc_routine): Adjusted call to
1795 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1796 to use their new names.
1797 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1798 use its new name.
1799 (c_parser_oacc_update): Likewise.
1800 (c_parser_omp_simd): Likewise.
1801 (c_parser_omp_target_update): Likewise.
1802 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1803 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1804 name.
1805 (c_finish_omp_cancellation_point): Likewise.
1806 * gimple-parser.c: Do not include omp-low.h
1807
1808 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1809 James Norris <jnorris@codesourcery.com>
1810
1811 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1812 EXIT_DATA,WAIT} are not used in compound statements.
1813 (c_parser_oacc_enter_exit_data): Update diagnostics.
1814
1815 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1816
1817 PR c++/71973
1818 * c-decl.c (diagnose_mismatched_decls): Use
1819 OPT_Wbuiltin_declaration_mismatch here too.
1820
1821 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1822 Alan Hayward <alan.hayward@arm.com>
1823 David Sherwood <david.sherwood@arm.com>
1824
1825 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1826 (make_label, finish_struct): Likewise.
1827
1828 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1829 Richard Biener <rguenther@suse.de>
1830
1831 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1832 * config-lang.in (gtfiles): Add c/c-parser.h.
1833 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1834 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1835 * c-parser.c (enum c_id_kind, struct c_token,
1836 c_parser_next_token_is, c_parser_next_token_is_not,
1837 c_parser_next_token_is_keyword,
1838 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1839 Split out to ...
1840 * c-parser.h: ... new header.
1841 * c-parser.c: Include c-parser.h and gimple-parser.h.
1842 (c_parser_peek_token, c_parser_peek_2nd_token,
1843 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1844 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1845 c_parser_error, c_parser_require, c_parser_skip_until_found,
1846 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1847 c_parser_type_name): Export.
1848 (c_parser_tokens_buf): New function.
1849 (c_parser_error): Likewise.
1850 (c_parser_set_error): Likewise.
1851 (c_parser_declspecs): Handle RID_GIMPLE.
1852 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1853 via c_parser_parse_gimple_body.
1854 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1855 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1856 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1857 c_parser_error, c_parser_require, c_parser_skip_until_found,
1858 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1859 c_parser_type_name): Declare.
1860 (struct c_parser): Declare forward.
1861 (c_parser_tokens_buf): Declare.
1862 (c_parser_error): Likewise.
1863 (c_parser_set_error): Likewise.
1864 * gimple-parser.c: New file.
1865 * gimple-parser.h: Likewise.
1866
1867 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1868
1869 PR c/35503
1870 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1871 warn_for_restrict.
1872
1873 2016-09-11 Le-Chun Wu <lcwu@google.com>
1874 Mark Wielaard <mjw@redhat.com>
1875
1876 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1877 to the given -Wshadow= variant.
1878
1879 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1880
1881 * c-typeck.c: Include memmodel.h.
1882
1883 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1884
1885 PR target/77957
1886 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1887 instead of lhd_return_null_tree_v.
1888
1889 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1890
1891 PR c++/69733
1892 * c-decl.c (smallest_type_quals_location): New static function.
1893 (grokdeclarator): Try to find the correct location for an ignored
1894 qualifier.
1895
1896 2016-09-26 Marek Polacek <polacek@redhat.com>
1897
1898 PR c/7652
1899 * c-decl.c (pop_scope): Add gcc_fallthrough.
1900
1901 2016-09-26 Marek Polacek <polacek@redhat.com>
1902
1903 PR c/7652
1904 * c-parser.c (struct c_token): Add flags field.
1905 (c_lex_one_token): Pass it to c_lex_with_flags.
1906 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1907 into IFN_FALLTHROUGH.
1908 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1909 attribute fallthrough after a case label or default label.
1910 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1911
1912 2016-09-24 Marek Polacek <polacek@redhat.com>
1913
1914 PR c/77490
1915 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1916 have boolean value. Warn about ++/-- on booleans.
1917
1918 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1919
1920 * c-parser.c (incomplete_record_decls): Remove unnecessary
1921 = vNULL initialization of file scope vec.
1922
1923 2016-09-16 Marek Polacek <polacek@redhat.com>
1924
1925 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1926
1927 2016-09-14 Marek Polacek <polacek@redhat.com>
1928
1929 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1930 (fix_array_notation_expr): Likewise.
1931 * c-decl.c (finish_decl): Likewise.
1932 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1933 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1934 (function_to_pointer_conversion): Use false instead of 0.
1935 (convert_lvalue_to_rvalue): Likewise.
1936 (parser_build_unary_op): Likewise.
1937 (build_atomic_assign): Likewise.
1938 (build_unary_op): Change nonconvert parameter type to bool, use
1939 true/false instead of 1/0.
1940 (build_binary_op): Use true instead of 1.
1941
1942 2016-09-13 David Malcolm <dmalcolm@redhat.com>
1943
1944 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1945 of add_fixit_insert to add_fixit_insert_before.
1946
1947 2016-09-13 Marek Polacek <polacek@redhat.com>
1948
1949 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1950 it.
1951
1952 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1953
1954 PR c++/77496
1955 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1956 COMPOUND_EXPR to warn_for_omitted_condop.
1957
1958 2016-09-07 David Malcolm <dmalcolm@redhat.com>
1959
1960 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1961 c_get_substring_location for this new langhook.
1962
1963 2016-09-02 Jakub Jelinek <jakub@redhat.com>
1964
1965 PR c/65467
1966 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1967 flag_openmp.
1968 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1969 instead of mark_exp_read on low_bound/length expression.
1970 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1971 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1972 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1973 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1974 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1975 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1976 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1977 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1978 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1979 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1980 instead of mark_expr_read.
1981 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1982 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1983 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1984 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1985 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1986 array section bases outside of depend clause, for depend clause
1987 use convert_lvalue_to_rvalue on the base.
1988 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1989 linear, aligned, map, to and from clauses.
1990 (c_omp_clause_copy_ctor): New function.
1991
1992 2016-09-01 Marek Polacek <polacek@redhat.com>
1993
1994 PR c/7652
1995 * c-typeck.c (composite_type): Add FALLTHRU comment.
1996
1997 2016-08-31 David Malcolm <dmalcolm@redhat.com>
1998
1999 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2000 to the insertion fixits for "struct", "union", and "enum".
2001
2002 2016-08-30 David Malcolm <dmalcolm@redhat.com>
2003
2004 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2005 rather than add_fixit_misspelled_id.
2006 (undeclared_variable): Likewise.
2007 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2008 now-redundant "here" params from add_fixit_insert method calls.
2009 (c_parser_parameter_declaration): Likewise.
2010 * c-typeck.c (build_component_ref): Remove now-redundant range
2011 param from add_fixit_replace method calls.
2012
2013 2016-08-25 Marek Polacek <polacek@redhat.com>
2014
2015 * c-typeck.c (parser_build_binary_op): Pass LHS to
2016 warn_logical_not_parentheses.
2017
2018 2016-08-25 Marek Polacek <polacek@redhat.com>
2019
2020 PR c/77323
2021 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2022 or _FloatN or _FloatNx is not supported.
2023 (finish_declspecs): Set type to integer_type_node when _FloatN or
2024 _FloatNx is not supported.
2025
2026 2016-08-19 Joseph Myers <joseph@codesourcery.com>
2027
2028 PR c/32187
2029 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2030 (struct c_declspecs): Add field floatn_nx_idx.
2031 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2032 and _FloatNx type specifiers.
2033 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2034 (c_parser_declspecs, c_parser_attribute_any_word)
2035 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2036 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2037 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2038 narrower than double.
2039
2040 2016-08-12 Jakub Jelinek <jakub@redhat.com>
2041 Martin Liska <mliska@suse.cz>
2042
2043 PR c/67410
2044 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2045 % to determine val element to change. Assert that
2046 wchar_bytes * charwidth fits into val array.
2047
2048 2016-08-12 Marek Polacek <polacek@redhat.com>
2049
2050 PR c/7652
2051 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2052 (c_parser_postfix_expression): Likewise.
2053 * c-typeck.c (build_unary_op): Adjust fall through comment.
2054 (c_mark_addressable): Likewise.
2055
2056 2016-08-11 Jakub Jelinek <jakub@redhat.com>
2057
2058 PR c/72816
2059 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2060 array member through typedef, for orig_qual_indirect == 0 clear
2061 orig_qual_type.
2062
2063 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2064
2065 PR c/64955
2066 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2067 this up to selftest::run_c_tests.
2068 (selftest::run_c_tests): New function.
2069
2070 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2071
2072 * c-parser.c (struct oacc_routine_data): Add error_seen and
2073 fndecl_seen members.
2074 (c_finish_oacc_routine): Use these.
2075 (c_parser_declaration_or_fndef): Adjust.
2076 (c_parser_oacc_routine): Likewise. Support more C language
2077 constructs, and improve diagnostics. Move pragma context
2078 checking...
2079 (c_parser_pragma): ... here.
2080
2081 * c-parser.c (struct oacc_routine_data): New.
2082 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2083 Simplify code.
2084 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2085 declare target" attribute.
2086
2087 2016-08-01 Jan Beulich <jbeulich@suse.com>
2088
2089 * c-fold.c (c_fully_fold_internal): Also emit shift count
2090 warnings for vector types.
2091 * c-typeck.c (build_binary_op): Likewise.
2092
2093 2016-07-29 Marek Polacek <polacek@redhat.com>
2094
2095 PR c/71742
2096 * c-decl.c (finish_struct): Rephrase an error message.
2097
2098 PR c/71853
2099 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2100 to error node for invalid code.
2101
2102 PR c/71573
2103 * c-decl.c (implicitly_declare): Return decl early not only for
2104 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2105
2106 2016-07-29 Jakub Jelinek <jakub@redhat.com>
2107
2108 PR c/71969
2109 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2110 on GNU extern inline functions.
2111
2112 2016-07-29 Marek Polacek <polacek@redhat.com>
2113
2114 PR c/71583
2115 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2116 check expr.value.
2117
2118 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
2119
2120 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2121
2122 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2123
2124 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2125 spellcheck-tree.h
2126 (best_macro_match): Likewise, converting from a typedef to a
2127 subclass.
2128 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2129 (lookup_name_fuzzy): Update for change of best_macro_match to a
2130 subclass with a ctor that calls cpp_forall_identifiers.
2131
2132 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2133
2134 * c-decl.c (implicit_decl_warning): Update for conversion of
2135 return type of lookup_name_fuzzy to const char *.
2136 (undeclared_variable): Likewise.
2137 (lookup_name_fuzzy): Convert return type from tree to
2138 const char *.
2139 * c-parser.c (c_parser_declaration_or_fndef): Update for
2140 conversion of return type of lookup_name_fuzzy to const char *.
2141 (c_parser_parameter_declaration): Likewise.
2142
2143 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2144
2145 * c-parser.c (c_parser_oacc_declare): Don't scan for
2146 GOMP_MAP_POINTER.
2147 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2148 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2149 zero-length subarrays.
2150
2151 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2152
2153 PR c/71858
2154 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2155 instead of FUZZY_LOOKUP_NAME.
2156 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2157 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2158
2159 2016-07-14 Jakub Jelinek <jakub@redhat.com>
2160
2161 PR c/71858
2162 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2163
2164 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2165
2166 * c-parser.c (c_parser_generic_selection): Make type of variable
2167 auto_vec.
2168 (c_parser_omp_declare_simd): Likewise.
2169
2170 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2171
2172 * c-decl.c (struct c_struct_parse_info): Change member types
2173 from vec to auto_vec.
2174 (start_struct): Adjust.
2175 (finish_struct): Likewise.
2176
2177 2016-07-02 Jakub Jelinek <jakub@redhat.com>
2178
2179 PR c/71719
2180 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2181
2182 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2183
2184 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2185 Move pragma context checking into...
2186 (c_parser_omp_cancellation_point): ... here, and improve
2187 diagnostic messages.
2188 * c-typeck.c (c_finish_omp_cancel)
2189 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2190
2191 2016-06-29 Jakub Jelinek <jakub@redhat.com>
2192
2193 PR c/71685
2194 * c-typeck.c (c_build_qualified_type): Don't clear
2195 C_TYPE_INCOMPLETE_VARS for the main variant.
2196
2197 2016-06-28 Martin Sebor <msebor@redhat.com>
2198
2199 PR c/71552
2200 * c-typeck.c (output_init_element): Diagnose incompatible types
2201 before non-constant initializers.
2202
2203 2016-06-28 Jakub Jelinek <jakub@redhat.com>
2204
2205 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2206
2207 2016-06-23 Andi Kleen <ak@linux.intel.com>
2208
2209 * Make-lang.in: Add support for autofdo.
2210
2211 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2212
2213 PR c/70339
2214 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2215 (implicit_decl_warning): When issuing warnings for implicit
2216 declarations, attempt to provide a suggestion via
2217 lookup_name_fuzzy.
2218 (undeclared_variable): Likewise when issuing errors.
2219 (lookup_name_in_scope): Likewise.
2220 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2221 (best_macro_match): New typedef.
2222 (find_closest_macro_cpp_cb): New function.
2223 (lookup_name_fuzzy): New function.
2224 * c-parser.c: Include gcc-rich-location.h.
2225 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2226 (c_keyword_starts_typename): ...this new function.
2227 (c_parser_declaration_or_fndef): When issuing errors about
2228 missing "struct" etc, add a fixit. For other kinds of errors,
2229 attempt to provide a suggestion via lookup_name_fuzzy.
2230 (c_parser_parms_declarator): When looking ahead to detect typos in
2231 type names, also reject CPP_KEYWORD.
2232 (c_parser_parameter_declaration): When issuing errors about
2233 unknown type names, attempt to provide a suggestion via
2234 lookup_name_fuzzy.
2235 * c-tree.h (c_keyword_starts_typename): New prototype.
2236
2237 2016-06-20 Joseph Myers <joseph@codesourcery.com>
2238
2239 PR c/71601
2240 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2241 c_common_type returns error_mark_node.
2242
2243 2016-06-19 Martin Sebor <msebor@redhat.com>
2244
2245 PR c/69507
2246 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2247 __alignof__ (expression).
2248
2249 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2250
2251 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2252
2253 2016-06-14 David Malcolm <dmalcolm@redhat.com>
2254
2255 * c-typeck.c (build_component_ref): Simplify fixit code by
2256 using gcc_rich_location::add_fixit_misspelled_id.
2257 (set_init_label): Likewise.
2258
2259 2016-06-13 David Malcolm <dmalcolm@redhat.com>
2260
2261 * c-parser.c (c_parser_initelt): Provide location of name for new
2262 location_t param of set_init_label.
2263 * c-tree.h (set_init_label): Add location_t param.
2264 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2265 param and use it when issuing error messages about unrecognized
2266 field names. Attempt to provide a fixit hint if appropriate,
2267 otherwise update the error message to provide the type name.
2268
2269 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2270
2271 PR c/71381
2272 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2273 Loosen checking.
2274
2275 2016-06-08 Martin Sebor <msebor@redhat.com>
2276 Jakub Jelinek <jakub@redhat.com>
2277
2278 PR c++/70507
2279 PR c/68120
2280 * c-typeck.c (convert_arguments): Don't promote last argument
2281 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2282
2283 2016-06-08 Marek Polacek <polacek@redhat.com>
2284
2285 PR c/71418
2286 * c-decl.c (grokdeclarator): Check TYPE_P.
2287
2288 PR c/71426
2289 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2290 code.
2291
2292 2016-06-07 David Malcolm <dmalcolm@redhat.com>
2293
2294 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2295 and structure element reference, capture the location of the
2296 element name token and pass it to build_component_ref.
2297 (c_parser_postfix_expression_after_primary): Likewise for
2298 structure element dereference.
2299 (c_parser_omp_variable_list): Likewise for
2300 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2301 * c-tree.h (build_component_ref): Add location_t param.
2302 * c-typeck.c (build_component_ref): Add location_t param
2303 COMPONENT_LOC. Use it, if available, when issuing hints about
2304 mispelled member names to provide a fixit replacement hint.
2305
2306 2016-06-06 Marek Polacek <polacek@redhat.com>
2307
2308 PR c/71362
2309 * c-parser.c (c_parser_direct_declarator): Set location.
2310
2311 2016-06-06 Marek Polacek <polacek@redhat.com>
2312
2313 * c-typeck.c (comptypes_internal): Handle comparisons of
2314 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2315 TYPE_REF_CAN_ALIAS_ALL.
2316
2317 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2318
2319 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2320 arguments as addressable when async clause exists.
2321
2322 2016-05-30 Jakub Jelinek <jakub@redhat.com>
2323
2324 PR c++/71349
2325 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2326 when combined with target construct.
2327
2328 2016-05-26 Jakub Jelinek <jakub@redhat.com>
2329
2330 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2331 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2332
2333 2016-05-25 Marek Polacek <polacek@redhat.com>
2334
2335 PR c/71265
2336 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2337
2338 PR c/71266
2339 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2340
2341 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2342
2343 * c-parser.c (c_parser_oacc_declare): Add support for
2344 GOMP_MAP_FIRSTPRIVATE_POINTER.
2345 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2346 argument with enum c_omp_region_type ort.
2347 (handle_omp_array_sections): Likewise. Update call to
2348 handle_omp_array_sections_1.
2349 (c_finish_omp_clauses): Add specific errors and warning messages for
2350 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2351 call to handle_omp_array_sections.
2352
2353 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2354
2355 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2356
2357 2016-05-24 Richard Biener <rguenther@suse.de>
2358
2359 PR middle-end/70434
2360 PR c/69504
2361 * c-typeck.c (build_array_ref): Do not complain about indexing
2362 non-lvalue vectors. Adjust for function name change.
2363
2364 2016-05-20 Martin Sebor <msebor@redhat.com>
2365
2366 PR c/71115
2367 * c-typeck.c (error_init): Use
2368 expansion_point_location_if_in_system_header.
2369 (warning_init): Same.
2370
2371 2016-05-19 David Malcolm <dmalcolm@redhat.com>
2372
2373 PR c/71171
2374 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2375 in error-handling.
2376 (c_parser_postfix_expression): Likewise.
2377 * c-tree.h (c_expr::set_error): New method.
2378 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2379 that result's range is initialized.
2380
2381 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2382
2383 * c-typeck.c (parser_build_unary_op): Fix formatting.
2384
2385 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2386
2387 * c-decl.c (grokdeclarator): Remove errmsg and use of
2388 targetm.invalid_return_type.
2389 (grokparms): Remove errmsg and use of
2390 targetm.invalid_parameter_type.
2391
2392 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2393
2394 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2395 function return type.
2396
2397 2016-05-12 Marek Polacek <polacek@redhat.com>
2398
2399 PR c/70756
2400 * c-decl.c (build_compound_literal): Pass LOC down to
2401 c_incomplete_type_error.
2402 * c-tree.h (require_complete_type): Adjust declaration.
2403 (c_incomplete_type_error): Likewise.
2404 * c-typeck.c (require_complete_type): Add location parameter, pass it
2405 down to c_incomplete_type_error.
2406 (c_incomplete_type_error): Add location parameter, pass it down to
2407 error_at.
2408 (build_component_ref): Pass location down to c_incomplete_type_error.
2409 (default_conversion): Pass location down to require_complete_type.
2410 (build_array_ref): Likewise.
2411 (build_function_call_vec): Likewise.
2412 (convert_arguments): Likewise.
2413 (build_unary_op): Likewise.
2414 (build_c_cast): Likewise.
2415 (build_modify_expr): Likewise.
2416 (convert_for_assignment): Likewise.
2417 (c_finish_omp_clauses): Likewise.
2418
2419 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2420
2421 PR c/43651
2422 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2423 is enabled.
2424 * c-errors.c (pedwarn_c90): Return true if warned.
2425 * c-tree.h (pedwarn_c90): Change return type to bool.
2426 (enum c_declspec_word): Add new enumerator cdw_atomic.
2427
2428 2016-05-11 Marek Polacek <polacek@redhat.com>
2429
2430 PR c++/71024
2431 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2432 diagnose_mismatched_attributes and call it.
2433
2434 2016-05-10 Marek Polacek <polacek@redhat.com>
2435
2436 PR c/70255
2437 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2438 on a declaration following the definition.
2439
2440 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2441
2442 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2443 parse it through to c_parser_c99_block_statement.
2444 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2445 caller.
2446
2447 2016-05-04 Marek Polacek <polacek@redhat.com>
2448
2449 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2450 OPT_Wdangling_else.
2451
2452 2016-05-04 Marek Polacek <polacek@redhat.com>
2453
2454 PR c/48778
2455 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2456 for macro expansions.
2457
2458 2016-05-03 Marek Polacek <polacek@redhat.com>
2459
2460 PR c/70859
2461 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2462 check_builtin_function_arguments.
2463
2464 2016-05-03 Richard Biener <rguenther@suse.de>
2465
2466 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2467 the checksum from the previous stage.
2468
2469 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2470
2471 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2472 c_finish_omp_clauses.
2473 (c_parser_omp_all_clauses): Likewise.
2474 (c_parser_oacc_cache): Likewise.
2475 (c_parser_oacc_loop): Likewise.
2476 (omp_split_clauses): Likewise.
2477 (c_parser_omp_declare_target): Likewise.
2478 (c_parser_cilk_all_clauses): Likewise.
2479 (c_parser_cilk_for): Likewise.
2480 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2481 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2482
2483 2016-05-02 Marek Polacek <polacek@redhat.com>
2484
2485 PR c/70851
2486 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2487 incomplete type.
2488
2489 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2490
2491 PR middle-end/70626
2492 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2493 OACC_LOOP_CLAUSE_MASK.
2494 (c_parser_oacc_kernels_parallel): Update call to
2495 c_oacc_split_loop_clauses.
2496
2497 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2498
2499 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2500 argument to build_modify_expr in two cases.
2501
2502 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2503
2504 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2505 warn_for_memset instead of warning directly here.
2506
2507 2016-04-26 Marek Polacek <polacek@redhat.com>
2508
2509 PR c/67784
2510 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2511 out of ...
2512 (c_parser_for_statement): ... here.
2513 (c_parser_if_statement): Use it.
2514 (c_parser_switch_statement): Use it.
2515 (c_parser_while_statement): Use it.
2516
2517 PR c/70791
2518 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2519
2520 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2521
2522 PR c++/69363
2523 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2524 instead of c_finish_cilk_clauses.
2525 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2526 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2527 floating-point variables in the linear clause for Cilk Plus.
2528
2529 2016-04-18 Michael Matz <matz@suse.de>
2530
2531 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2532 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2533
2534 2016-04-15 Marek Polacek <polacek@redhat.com>
2535
2536 PR c/70671
2537 * c-typeck.c (build_unary_op): Pass location down to error and
2538 warning call.
2539
2540 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2541
2542 PR c/70436
2543 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2544 where needed.
2545 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2546 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2547 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2548 Adjust c_parser_pragma callers.
2549 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2550 caller.
2551 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2552 c_parser_statement.
2553 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2554 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2555 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2556 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2557 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2558 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2559 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2560 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2561 down where needed.
2562 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2563 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2564 calls.
2565
2566 2016-04-13 Marek Polacek <polacek@redhat.com>
2567
2568 PR c/70436
2569 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2570 adjust callers.
2571 (c_parser_statement): Likewise.
2572 (c_parser_c99_block_statement): Likewise.
2573 (c_parser_while_statement): Likewise.
2574 (c_parser_for_statement): Likewise.
2575 (c_parser_if_body): Don't set IF_P here.
2576 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2577 about dangling else here.
2578 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2579 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2580 warn about dangling else here.
2581
2582 2016-04-04 Marek Polacek <polacek@redhat.com>
2583
2584 PR c/70307
2585 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2586
2587 2016-03-31 Marek Polacek <polacek@redhat.com>
2588
2589 PR c/70297
2590 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2591
2592 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2593
2594 PR c/70281
2595 * c-parser.c (c_parser_postfix_expression): Set the source range
2596 for uses of "__builtin_types_compatible_p".
2597
2598 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2599
2600 PR c/70280
2601 * c-typeck.c (composite_type): Don't count void_list_node
2602 into len, if the list is terminated by void_list_node, start
2603 with void_list_node instead of NULL for newargs. Stop
2604 at void_list_node.
2605
2606 2016-03-16 Marek Polacek <polacek@redhat.com>
2607
2608 PR c/70093
2609 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2610 nested functions returning VM types.
2611
2612 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2613
2614 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2615 when calling c_finish_omp_clauses.
2616
2617 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2618
2619 PR c/69824
2620 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2621 for later.
2622
2623 2016-03-04 Marek Polacek <polacek@redhat.com>
2624
2625 PR c/69798
2626 * c-parser.c (c_parser_postfix_expression): Call
2627 c_parser_cast_expression rather than c_parser_postfix_expression.
2628
2629 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2630
2631 PR c/69796
2632 PR c/69974
2633 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2634 of incomplete decls to error_mark_node.
2635
2636 2016-02-24 Marek Polacek <polacek@redhat.com>
2637
2638 PR c/69819
2639 * c-decl.c (finish_decl): Don't update the copy of the type of a
2640 different decl type.
2641
2642 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2643
2644 PR objc/69844
2645 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2646 in id_kind reclassification.
2647
2648 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2649
2650 PR c/69835
2651 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2652
2653 2016-02-16 James Norris <jnorris@codesourcery.com>
2654
2655 PR c/64748
2656 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2657
2658 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2659
2660 * c-decl.c (build_null_declspecs): Zero the entire struct.
2661
2662 PR c/69522
2663 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2664 callers changed. If nested_p is true, use it to call
2665 finish_implicit_inits.
2666 * c-tree.h (finish_implicit_inits): Declare.
2667 * c-typeck.c (finish_implicit_inits): New function. Move code
2668 from ...
2669 (push_init_level): ... here.
2670 (set_designator, process_init_element): Call finish_implicit_inits.
2671
2672 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2673
2674 PR c/69768
2675 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2676 arguments for -Waddress warning.
2677
2678 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2679
2680 PR c/69669
2681 * c-decl.c (finish_enum): When honoring mode attribute,
2682 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2683
2684 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2685
2686 PR debug/69518
2687 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2688 all type variants, not just TYPE_MAIN_VARIANT.
2689
2690 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2691
2692 PR debug/66869
2693 * c-decl.c (c_write_global_declarations_1): Warn with
2694 warn_unused_function if static prototype without definition
2695 is not C_DECL_USED.
2696
2697 2016-01-27 Marek Polacek <polacek@redhat.com>
2698
2699 PR c/68062
2700 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2701 to unsigned, if needed. Add -Wsign-compare warning.
2702
2703 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2704
2705 PR tree-optimization/69483
2706 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2707
2708 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2709
2710 PR c/24293
2711 * c-tree.h (incomplete_record_decls): Declare.
2712 * c-parser.c (incomplete_record_decls): Define.
2713 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2714 report error if any decl has zero size.
2715 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2716 or enum type to incomplete_record_decls.
2717
2718 2016-01-14 Tom de Vries <tom@codesourcery.com>
2719
2720 PR tree-optimization/68773
2721 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2722 set force_output.
2723
2724 2016-01-14 Marek Polacek <polacek@redhat.com>
2725
2726 PR c/69262
2727 * c-decl.c (grokdeclarator): Provide more information for invalid
2728 array declarations.
2729
2730 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2731
2732 * c-parser.c (c_parser_unary_expression): For dereferences, build
2733 a combined location before calling build_indirect_ref, so that
2734 error reports cover the full range, manually updating the c_expr
2735 src_range.
2736
2737 2016-01-06 Marek Polacek <polacek@redhat.com>
2738
2739 PR sanitizer/69099
2740 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2741 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2742 NULL.
2743
2744 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2745
2746 Update copyright years.
2747
2748 2016-01-04 Marek Polacek <polacek@redhat.com>
2749
2750 PR c/68908
2751 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2752 optimization to use __atomic_fetch_* built-in if possible.
2753
2754 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2755
2756 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2757 into...
2758 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2759 all users.
2760
2761 2015-12-22 Marek Polacek <polacek@redhat.com>
2762
2763 PR c/69002
2764 * c-typeck.c (build_component_ref): Warn when acessing elements of
2765 atomic structures or unions.
2766
2767 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2768
2769 * c-typeck.c: Include "gcc-rich-location.h".
2770 (build_binary_op): In the two places that call binary_op_error,
2771 create a gcc_rich_location and populate it with the location of
2772 the binary op and its two operands.
2773
2774 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2775
2776 * c-parser.c (c_parser_statement_after_labels): When calling
2777 c_finish_return, Use the return expression's location if it has
2778 one, falling back to the location of the first token within it.
2779 * c-typeck.c (c_finish_return): When issuing warnings about
2780 the incorrect presence/absence of a return value, issue a note
2781 showing the declaration of the function.
2782
2783 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2784
2785 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2786 to 4.
2787 (c_parser_peek_nth_token): New function.
2788 (c_parser_peek_conflict_marker): New function.
2789 (c_parser_error): Detect conflict markers and report them as such.
2790
2791 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2792
2793 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2794 to preserve range information for the primary expression
2795 in the call to c_parser_postfix_expression_after_primary.
2796
2797 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2798
2799 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2800 expression location, falling back on the first token location,
2801 rather than always using the latter.
2802
2803 2015-12-16 Marek Polacek <polacek@redhat.com>
2804
2805 PR c/64637
2806 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2807 available.
2808
2809 2015-12-15 Marek Polacek <polacek@redhat.com>
2810
2811 PR c/68907
2812 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2813 artificial decl.
2814
2815 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2816
2817 * c-parser.c (c_parser_alignof_expression): Capture location of
2818 closing parenthesis (if any), or of end of unary expression, and
2819 use it to build a src_range for the expression.
2820
2821 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2822
2823 PR c/68757
2824 * c-parser.c (c_parser_get_builtin_args): Add
2825 "out_close_paren_loc" param, and write back to it.
2826 (c_parser_postfix_expression): Capture the closing
2827 parenthesis location for RID_CHOOSE_EXPR,
2828 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2829 RID_BUILTIN_SHUFFLE and use it to set the source range
2830 for such expressions; within RID_BUILTIN_COMPLEX set
2831 the underlying location.
2832
2833 2015-12-07 Marek Polacek <polacek@redhat.com>
2834
2835 PR c/68668
2836 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2837 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2838
2839 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2840
2841 * c-tree.h (c_build_va_arg): Adjust prototype.
2842 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2843 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2844 parameter, adjust throughout and issue an error if EXPR is a component
2845 with reverse storage order.
2846
2847 2015-12-02 Jason Merrill <jason@redhat.com>
2848
2849 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2850 (c_fully_fold_internal, decl_constant_value_for_optimization):
2851 Move from c-common.c.
2852 * c-tree.h: Declare decl_constant_value_for_optimization.
2853 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2854
2855 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2856
2857 PR c/68162
2858 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2859 following link from declarator to next declarator. Track original
2860 qualified type and pass it to c_build_qualified_type.
2861 * c-typeck.c (c_build_qualified_type): Add arguments
2862 orig_qual_type and orig_qual_indirect.
2863
2864 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2865
2866 * c-parser.c (c_parser_omp_clause_name)
2867 (c_parser_oacc_all_clauses): Alphabetical sorting.
2868
2869 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2870
2871 PR c/68533
2872 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2873 for diagnostics.
2874
2875 2015-12-01 Julian Brown <julian@codesourcery.com>
2876 Cesar Philippidis <cesar@codesourcery.com>
2877 James Norris <James_Norris@mentor.com>
2878
2879 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2880 (c_parser_oacc_clause_use_device): New function.
2881 (c_parser_oacc_all_clauses): Add use_device support.
2882 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2883 (c_parser_oacc_host_data): New function.
2884 (c_parser_omp_construct): Add host_data support.
2885 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2886 * c-typeck.c (c_finish_oacc_host_data): New function.
2887 (c_finish_omp_clauses): Add use_device support.
2888
2889 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2890
2891 PR c/67106
2892 * c-decl.c: Set TYPE_PACKED in variants.
2893
2894 2015-11-27 Martin Liska <mliska@suse.cz>
2895
2896 PR c++/68312
2897 * c-array-notation.c (fix_builtin_array_notation_fn):
2898 Use release_vec_vec instead of vec::release.
2899 (build_array_notation_expr): Likewise.
2900 (fix_conditional_array_notations_1): Likewise.
2901 (fix_array_notation_expr): Likewise.
2902 (fix_array_notation_call_expr): Likewise.
2903
2904 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2905
2906 PR c/63326
2907 * c-parser.c (c_parser_compound_statement_nostart): If
2908 last_label is true, use pragma_stmt instead of pragma_compound
2909 as second c_parser_pragma argument.
2910 (c_parser_omp_ordered, c_parser_omp_target_update,
2911 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2912 false as second argument to c_parser_skip_to_pragma_eol after
2913 diagnosing standalone directives used in pragma_stmt context.
2914
2915 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2916
2917 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2918 with "if (ENABLE_OFFLOADING)".
2919
2920 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2921
2922 PR objc/68438
2923 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2924 for various Objective-C constructs: Class.name syntax,
2925 @selector(), @protocol(), @encode(), and [] message syntax.
2926
2927 2015-11-20 David Malcolm <dmalcolm@redhat.com>
2928
2929 PR 62314
2930 * c-typeck.c (should_suggest_deref_p): New function.
2931 (build_component_ref): Special-case POINTER_TYPE when
2932 generating a "not a structure of union" error message, and
2933 suggest a "->" rather than a ".", providing a fix-it hint.
2934
2935 2015-11-19 David Malcolm <dmalcolm@redhat.com>
2936
2937 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2938 candidate into a new function, find_closest_identifier.
2939
2940 2015-11-19 Marek Polacek <polacek@redhat.com>
2941
2942 PR c/68412
2943 * c-typeck.c (parser_build_binary_op): Properly handle
2944 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2945
2946 2015-11-17 David Malcolm <dmalcolm@redhat.com>
2947
2948 * c-parser.c (set_c_expr_source_range): Bulletproof both
2949 overloaded implementations against NULL expr->value.
2950 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2951 values.
2952 (c_parser_unary_expression): Likewise when handling addresses of
2953 labels.
2954 (c_parser_postfix_expression): Likewise for statement expressions,
2955 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2956 __builtin_va_arg, and for __builtin_offset_of.
2957 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2958 src_range using the range of the braced initializer.
2959 (c_parser_transaction_expression): Set src_range for "ret" to a
2960 sane pair of values.
2961
2962 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2963
2964 * c-parser.c (c_finish_omp_declare_simd): Look for
2965 "simd" attribute as well. Update error message.
2966
2967 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2968
2969 * c-parser.c (c_parser_omp_declare_target): Adjust.
2970
2971 2015-11-14 Jakub Jelinek <jakub@redhat.com>
2972
2973 * c-typeck.c (c_finish_omp_clauses): Don't mark
2974 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2975
2976 2015-11-14 Marek Polacek <polacek@redhat.com>
2977
2978 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2979 * c-typeck.c: Likewise.
2980
2981 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2982
2983 * c-decl.c (warn_defaults_to): Pass line_table to
2984 rich_location ctor.
2985 * c-errors.c (pedwarn_c99): Likewise.
2986 (pedwarn_c90): Likewise.
2987 * c-parser.c (set_c_expr_source_range): New functions.
2988 (c_token::get_range): New method.
2989 (c_token::get_finish): New method.
2990 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2991 based on the range from the start of the LHS to the end of the
2992 RHS.
2993 (c_parser_conditional_expression): Likewise, based on the range
2994 from the start of the cond.value to the end of exp2.value.
2995 (c_parser_binary_expression): Call set_c_expr_source_range on
2996 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2997 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2998 based on the cast_loc through to the end of the expr.
2999 (c_parser_unary_expression): Likewise, based on the
3000 op_loc through to the end of op.
3001 (c_parser_sizeof_expression) Likewise, based on the start of the
3002 sizeof token through to either the closing paren or the end of
3003 expr.
3004 (c_parser_postfix_expression): Likewise, using the token range,
3005 or from the open paren through to the close paren for
3006 parenthesized expressions.
3007 (c_parser_postfix_expression_after_primary): Likewise, for
3008 various kinds of expression.
3009 * c-tree.h (struct c_expr): Add field "src_range".
3010 (c_expr::get_start): New method.
3011 (c_expr::get_finish): New method.
3012 (set_c_expr_source_range): New decls.
3013 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3014 on ret for prefix unary ops.
3015 (parser_build_binary_op): Likewise, running from the start of
3016 arg1.value through to the end of arg2.value.
3017
3018 2015-11-13 Marek Polacek <polacek@redhat.com>
3019
3020 PR c/68320
3021 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3022
3023 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3024
3025 * c-typeck.c: Include spellcheck.h.
3026 (lookup_field_fuzzy_find_candidates): New function.
3027 (lookup_field_fuzzy): New function.
3028 (build_component_ref): If the field was not found, try using
3029 lookup_field_fuzzy and potentially offer a suggestion.
3030
3031 2015-11-12 James Norris <jnorris@codesourcery.com>
3032 Joseph Myers <joseph@codesourcery.com>
3033
3034 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3035 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3036 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3037 and PRAGMA_OMP_CLAUSE_LINK.
3038 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3039 and PRAGMA_OACC_CLAUSE_LINK.
3040 (OACC_DECLARE_CLAUSE_MASK): New definition.
3041 (c_parser_oacc_declare): New function.
3042
3043 2015-11-12 Marek Polacek <polacek@redhat.com>
3044
3045 PR c/67784
3046 * c-parser.c (c_parser_for_statement): Reclassify the token in
3047 a correct scope.
3048
3049 2015-11-11 Marek Polacek <polacek@redhat.com>
3050
3051 PR c/68107
3052 PR c++/68266
3053 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3054 checking the size of an array.
3055
3056 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
3057
3058 * c-array-notation.c: Remove unused header files.
3059 * c-aux-info.c: Likewise.
3060 * c-convert.c: Likewise.
3061 * c-decl.c: Likewise.
3062 * c-errors.c: Likewise.
3063 * c-lang.c: Likewise.
3064 * c-objc-common.c: Likewise.
3065 * c-parser.c: Likewise.
3066 * c-typeck.c: Likewise.
3067 * gccspec.c: Likewise.
3068
3069 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3070 Cesar Philippidis <cesar@codesourcery.com>
3071 James Norris <jnorris@codesourcery.com>
3072 Julian Brown <julian@codesourcery.com>
3073 Nathan Sidwell <nathan@codesourcery.com>
3074
3075 c/
3076 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3077 routine arg.
3078 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3079 (c_parser_pragma): Parse 'acc routine'.
3080 (OACC_ROUTINE_CLAUSE_MARK): Define.
3081 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3082
3083 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3084
3085 PR debug/67192
3086 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3087 location of the backward-goto to the start of the loop body.
3088
3089 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3090
3091 PR debug/67192
3092 * c-parser.c (c_parser_while_statement): Finish the loop before
3093 parsing ahead for misleading indentation.
3094 (c_parser_for_statement): Likewise.
3095
3096 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3097
3098 * c-decl.c (finish_struct): If the structure has reverse storage
3099 order, rewrite the type of array fields with scalar component. Call
3100 maybe_apply_pragma_scalar_storage_order on entry.
3101 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3102 errors on bit-fields and reverse SSO here and not...
3103 (c_mark_addressable): ...here.
3104 (output_init_element): Adjust call to initializer_constant_valid_p.
3105 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3106
3107 2015-11-06 David Malcolm <dmalcolm@redhat.com>
3108
3109 * c-decl.c (warn_defaults_to): Update for change in signature
3110 of diagnostic_set_info.
3111 * c-errors.c (pedwarn_c99): Likewise.
3112 (pedwarn_c90): Likewise.
3113 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3114 for textinfo::set_location.
3115
3116 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3117 Thomas Schwinge <thomas@codesourcery.com>
3118 James Norris <jnorris@codesourcery.com>
3119
3120 * c-parser.c (c_parser_omp_clause_name): Add support for
3121 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3122 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3123 default(none) in OpenACC.
3124 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3125 arguments.
3126 (c_parser_oacc_clause_tile): New function.
3127 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3128 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3129 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3130 TILE}.
3131 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3132 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3133 FIRSTPRIVATE}.
3134 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3135 (c_parser_oacc_update): Update the error message for missing clauses.
3136 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3137 and OMP_CLAUSE_INDEPENDENT.
3138
3139 2015-11-05 Marek Polacek <polacek@redhat.com>
3140
3141 PR c/68090
3142 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3143 deal with pre-evaluation on invalid types.
3144
3145 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3146 Ilya Verbin <ilya.verbin@intel.com>
3147
3148 * c-parser.c: Include context.h and gimple-expr.h.
3149 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3150 monotonic together with nonmonotonic.
3151 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3152 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3153 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3154 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3155 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3156 expressions on combined target teams before the target.
3157 (c_parser_omp_declare_target): If decl has "omp declare target" or
3158 "omp declare target link" attribute, and cgraph or varpool node already
3159 exists, then set corresponding flags. Call c_finish_omp_clauses
3160 in the parenthesized extended-list syntax case.
3161 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3162 declare target.
3163 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3164 on OMP_CLAUSE_REDUCTION array sections.
3165 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3166 into the constant offset, or for variable low-bound using
3167 POINTER_PLUS_EXPR. For structure element based array sections use
3168 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3169 (c_finish_omp_clauses): Drop generic_field_head, structure
3170 elements are now always mapped even as array section bases,
3171 diagnose same var in data sharing and mapping clauses. Diagnose if
3172 linear step on declare simd is neither a constant nor a uniform
3173 parameter. Look through POINTER_PLUS_EXPR for array section
3174 reductions. Diagnose the same var or function appearing multiple
3175 times on the same directive. Fix up wording for the to clause if t
3176 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3177 modifier on kinds other than dynamic or guided or nonmonotonic
3178 modifier together with ordered clause.
3179
3180 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3181 Chung-Lin Tang <cltang@codesourcery.com>
3182
3183 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3184
3185 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3186
3187 * c-array-notation.c: Reorder #include's and remove duplicates.
3188 * c-aux-info.c: Likewise.
3189 * c-convert.c: Likewise.
3190 * c-decl.c: Likewise.
3191 * c-errors.c: Likewise.
3192 * c-lang.c: Likewise.
3193 * c-objc-common.c: Likewise.
3194 * c-parser.c: Likewise.
3195 * c-typeck.c: Likewise.
3196
3197 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
3198
3199 PR debug/66068
3200 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3201 after calling build_qualified_type.
3202
3203 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3204 Thomas Schwinge <thomas@codesourcery.com>
3205 James Norris <jnorris@codesourcery.com>
3206 Joseph Myers <joseph@codesourcery.com>
3207 Julian Brown <julian@codesourcery.com>
3208 Bernd Schmidt <bschmidt@redhat.com>
3209
3210 * c-parser.c (c_parser_oacc_shape_clause): New.
3211 (c_parser_oacc_simple_clause): New.
3212 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3213 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3214
3215 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3216 James Norris <jnorris@codesourcery.com>
3217 Cesar Philippidis <cesar@codesourcery.com>
3218
3219 PR c/64765
3220 PR c/64880
3221 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3222 parameters, and handle these. Adjust all users.
3223 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3224 into...
3225 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3226 all users.
3227 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3228 declare functions.
3229 (c_finish_omp_construct): Declare function.
3230 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3231 Merge functions into...
3232 (c_finish_omp_construct): ... this new function.
3233
3234 2015-10-22 Richard Biener <rguenther@suse.de>
3235
3236 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3237 before folding a MINUS_EXPR.
3238
3239 2015-10-21 Marek Polacek <polacek@redhat.com>
3240
3241 PR c/68024
3242 * c-decl.c (start_function): Warn about vararg functions without
3243 a prototype.
3244
3245 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3246
3247 * c-typeck.c (build_conditional_expr): Use boolean vector
3248 type for vector comparison.
3249 (build_vec_cmp): New.
3250 (build_binary_op): Use build_vec_cmp for comparison.
3251
3252 2015-10-20 Marek Polacek <polacek@redhat.com>
3253
3254 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3255
3256 2015-10-20 Marek Polacek <polacek@redhat.com>
3257
3258 PR c/67964
3259 * c-parser.c (c_parser_attributes): Break out of the loop if the
3260 token after an attribute isn't a comma.
3261
3262 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3263 Aldy Hernandez <aldyh@redhat.com>
3264
3265 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3266 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3267 (c_parser_omp_variable_list): Handle structure elements for
3268 map, to and from clauses. Handle array sections in reduction
3269 clause. Formatting fixes.
3270 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3271 if clause modifiers.
3272 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3273 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3274 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3275 c_parser_omp_clause_is_device_ptr): New functions.
3276 (c_parser_omp_clause_ordered): Parse optional parameter.
3277 (c_parser_omp_clause_reduction): Handle array reductions.
3278 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3279 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3280 functions.
3281 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3282 (c_parser_omp_clause_depend_sink): New function.
3283 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3284 (c_parser_omp_clause_map): Parse release/delete map kinds and
3285 optional always modifier.
3286 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3287 and c_finish_omp_clauses callers.
3288 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3289 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3290 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3291 (OMP_CRITICAL_CLAUSE_MASK): Define.
3292 (c_parser_omp_critical): Parse critical clauses.
3293 (c_parser_omp_for_loop): Handle doacross loops, adjust
3294 c_finish_omp_for and c_finish_omp_clauses callers.
3295 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3296 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3297 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3298 (c_parser_omp_for): Disallow ordered clause when combined with
3299 distribute. Disallow linear clause when combined with distribute
3300 and not combined with simd.
3301 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3302 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3303 parse clauses and if depend clause is found, don't parse a body.
3304 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3305 Allow target parallel without for after it.
3306 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3307 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3308 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3309 invalid kinds.
3310 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3311 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3312 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3313 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3314 functions.
3315 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3316 defaultmap and is_device_ptr clauses.
3317 (c_parser_omp_target): Parse target parallel and target simd. Set
3318 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3319 and target exit data. Diagnose invalid map kinds.
3320 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3321 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3322 construct.
3323 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3324 &omp_priv.
3325 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3326 (c_parser_omp_taskloop): New function.
3327 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3328 handle PRAGMA_OMP_TASKLOOP.
3329 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3330 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3331 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3332 Add IS_OMP argument, handle structure element bases, diagnose
3333 bitfields, pass IS_OMP recursively, diagnose known zero length
3334 array sections in depend clauses, handle array sections in reduction
3335 clause, diagnose negative length even for pointers.
3336 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3337 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3338 array sections in reduction clause, set
3339 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3340 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3341 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3342 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3343
3344 2015-10-06 Marek Polacek <polacek@redhat.com>
3345
3346 * c-parser.c (c_parser_statement_after_labels): Use
3347 protected_set_expr_location.
3348 (c_parser_omp_clause_num_gangs): Likewise.
3349 (c_parser_omp_clause_num_threads): Likewise.
3350 (c_parser_omp_clause_num_workers): Likewise.
3351 (c_parser_omp_clause_vector_length): Likewise.
3352 (c_parser_omp_clause_num_teams): Likewise.
3353 (c_parser_omp_clause_thread_limit): Likewise.
3354 * c-typeck.c (build_c_cast): Likewise.
3355 (c_cast_expr): Likewise.
3356
3357 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3358
3359 * c-typeck.c (c_tree_equal): Use real_equal instead of
3360 REAL_VALUES_EQUAL.
3361
3362 2015-10-04 Jason Merrill <jason@redhat.com>
3363
3364 * c-parser.c (c_lex_one_token): Handle @synchronized.
3365 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3366 can change whether the function is transaction_safe.
3367
3368 2015-10-02 Marek Polacek <polacek@redhat.com>
3369
3370 PR c/67730
3371 * c-typeck.c (convert_for_assignment): Use the expansion point
3372 location throughout.
3373
3374 2015-10-02 Marek Polacek <polacek@redhat.com>
3375
3376 PR c/64249
3377 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3378 and pass it down to c_parser_if_statement.
3379 (c_parser_else_body): Add CHAIN parameter and pass it down to
3380 c_parser_statement_after_labels.
3381 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3382 duplicated if-else-if conditions.
3383
3384 2015-10-01 Marek Polacek <polacek@redhat.com>
3385
3386 * c-typeck.c (convert_for_assignment): Improve commentary.
3387
3388 2015-09-30 Marek Polacek <polacek@redhat.com>
3389
3390 PR c/67730
3391 * c-typeck.c (c_finish_return): Use the expansion point location for
3392 certain "return with value" warnings.
3393
3394 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3395
3396 * c-parser.c (pragma_lex): Add loc argument.
3397
3398 2015-09-15 Marek Polacek <polacek@redhat.com>
3399
3400 PR c/67580
3401 * c-decl.c (tag_exists_p): New function.
3402 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3403 struct/union/enum keywords are missing.
3404 * c-tree.h (tag_exists_p): Declare.
3405
3406 2015-09-15 Marek Polacek <polacek@redhat.com>
3407
3408 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3409 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3410 Return NULL_TREE instead of 0.
3411 (lookup_name): Return NULL_TREE instead of 0.
3412 (lookup_name_in_scope): Likewise.
3413 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3414 (parser_xref_tag): Use false instead of 0.
3415 (start_struct): Use true instead of 1.
3416 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3417
3418 2015-09-14 Marek Polacek <polacek@redhat.com>
3419
3420 * c-typeck.c (set_nonincremental_init_from_string): Use
3421 HOST_WIDE_INT_M1U when shifting a negative value.
3422
3423 2015-09-09 Mark Wielaard <mjw@redhat.com>
3424
3425 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3426 parm against NULL.
3427
3428 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3429
3430 PR c/67502
3431 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3432 into OMP_FOR_PRE_BODY rather than before the loop.
3433
3434 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3435
3436 PR c/67501
3437 * c-parser.c (c_parser_oacc_all_clauses,
3438 c_parser_omp_all_clauses): Remove invalid clause from
3439 list of clauses even if parser->error is set.
3440
3441 PR c/67500
3442 * c-parser.c (c_parser_omp_clause_aligned,
3443 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3444 test for errors.
3445 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3446 error_mark_node.
3447
3448 PR c/67495
3449 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3450 instead of c_parser_unary_expression. If the result is !lvalue_p,
3451 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3452
3453 2015-09-04 Marek Polacek <polacek@redhat.com>
3454
3455 PR sanitizer/67279
3456 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3457
3458 2015-09-03 Martin Sebor <msebor@redhat.com>
3459
3460 PR c/66516
3461 * c-typeck.c (convert_arguments, parser_build_unary_op,
3462 build_conditional_expr, c_cast_expr, convert_for_assignment,
3463 build_binary_op, _objc_common_truthvalue_conversion): Call
3464 reject_gcc_builtin.
3465 (c_decl_implicit): Define.
3466
3467 2015-09-02 Marek Polacek <polacek@redhat.com>
3468
3469 PR c/67432
3470 * c-parser.c (c_parser_enum_specifier): Give a better error for
3471 an empty enum.
3472
3473 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3474
3475 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3476
3477 2015-08-12 Marek Polacek <polacek@redhat.com>
3478
3479 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3480 LOC to it.
3481
3482 2015-08-03 Marek Polacek <polacek@redhat.com>
3483
3484 PR c/67088
3485 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3486 Use it.
3487 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3488
3489 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3490
3491 * c-parser.c (c_parser_if_body): Take token_indent_info
3492 argument. Call warn_for_misleading_indentation even when the
3493 body is a semicolon. Extract token_indent_infos corresponding
3494 to the guard, body and next tokens. Adjust call to
3495 warn_for_misleading_indentation accordingly.
3496 (c_parser_else_body): Likewise.
3497 (c_parser_if_statement): Likewise.
3498 (c_parser_while_statement): Likewise.
3499 (c_parser_for_statement): Likewise.
3500
3501 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3502 Manuel López-Ibáñez <manu@gcc.gnu.org>
3503
3504 * c-decl.c (get_parm_info): Remove static var. Update warning
3505 message.
3506
3507 2015-07-27 Marek Polacek <polacek@redhat.com>
3508
3509 PR c++/66555
3510 PR c/54979
3511 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3512
3513 2015-07-20 Marek Polacek <polacek@redhat.com>
3514
3515 PR c++/55095
3516 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3517 (build_binary_op): Warn about left shift overflows.
3518
3519 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3520
3521 * c-array-notation.c: Adjust includes for flags.h changes.
3522 * c-objc-common.c: Likewise.
3523
3524 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3525
3526 * c-array-notation.c: Adjust includes.
3527 * c-aux-info.c: Likewise.
3528 * c-convert.c: Likewise.
3529 * c-decl.c: Likewise.
3530 * c-errors.c: Likewise.
3531 * c-lang.c: Likewise.
3532 * c-objc-common.c: Likewise.
3533 * c-parser.c: Likewise.
3534 * c-typeck.c: Likewise.
3535
3536 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3537
3538 PR fortran/66605
3539 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3540
3541 2015-06-29 Marek Polacek <polacek@redhat.com>
3542
3543 PR c/66322
3544 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3545 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3546 about -Wswitch-bool here.
3547 (do_case): Update c_add_case_label call.
3548 (c_finish_case): Update c_do_switch_warnings call.
3549
3550 2015-06-27 Marek Polacek <polacek@redhat.com>
3551
3552 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3553
3554 2015-06-26 Marek Polacek <polacek@redhat.com>
3555
3556 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3557 INDIRECT_REF_P.
3558 * c-typeck.c (array_to_pointer_conversion): Likewise.
3559 (build_unary_op): Likewise.
3560 (c_finish_return): Likewise.
3561
3562 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3563
3564 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3565 * c-parser.c: Likewise.
3566
3567 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3568
3569 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3570 instead of pointer_hash.
3571 (detect_field_duplicates): Likewise.
3572
3573 2015-06-25 Marek Polacek <polacek@redhat.com>
3574
3575 * c-array-notation.c: Use VAR_P throughout.
3576 * c-decl.c: Likewise.
3577 * c-objc-common.c: Likewise.
3578 * c-parser.c: Likewise.
3579 * c-typeck.c: Likewise.
3580
3581 2015-06-25 Marek Polacek <polacek@redhat.com>
3582
3583 * c-decl.c: Use is_global_var throughout.
3584 * c-parser.c: Likewise.
3585 * c-typeck.c: Likewise.
3586
3587 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3588
3589 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3590 * c-aux-info.c: Likewise.
3591 * c-convert.c: Likewise.
3592 * c-decl.c: Likewise.
3593 * c-errors.c: Likewise.
3594 * c-lang.c: Likewise.
3595 * c-objc-common.c: Likewise.
3596 * c-parser.c: Likewise.
3597 * c-typeck.c: Likewise.
3598
3599 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3600
3601 PR middle-end/66325
3602 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3603 variants.
3604
3605 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3606
3607 * c-decl.c (pop_scope): Register the main translation unit
3608 through the new debug hook.
3609
3610 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3611
3612 * c-array-notation.c : Adjust include files.
3613 * c-aux-info.c : Likewise.
3614 * c-convert.c : Likewise.
3615 * c-decl.c : Likewise.
3616 * c-errors.c : Likewise.
3617 * c-lang.c : Likewise.
3618 * c-lang.h : Likewise.
3619 * c-objc-common.c : Likewise.
3620 * c-parser.c : Likewise.
3621 * c-typeck.c : Likewise.
3622
3623 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3624
3625 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3626 immediately clobber it.
3627 (c_write_global_declarations_1): Remove call to
3628 check_global_declaration_1.
3629 (c_write_global_declarations_2): Remove.
3630 (c_write_final_cleanups): Rename from c_write_global_declarations.
3631 Remove call to finalize_compilation_unit.
3632 Remove calls to debugging hooks.
3633 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3634 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3635 * c-tree.h: Remove c_write_global_declarations.
3636
3637 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3638
3639 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3640 * c-aux-info.c: Likewise.
3641 * c-convert.c: Likewise.
3642 * c-decl.c: Likewise.
3643 * c-errors.c: Likewise.
3644 * c-lang.c: Likewise.
3645 * c-objc-common.c: Likewise.
3646 * c-parser.c: Likewise.
3647 * c-typeck.c: Likewise.
3648
3649 2015-06-04 Marek Polacek <polacek@redhat.com>
3650
3651 PR c/66341
3652 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3653 it is a lvalue.
3654
3655 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3656
3657 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3658 Warn for empty struct.
3659 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3660
3661 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3662
3663 * c-decl.c (start_function): Call plugin before parsing.
3664 (finish_function): Call plugin after parsing.
3665
3666 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3667
3668 PR c/49551
3669 * c-decl.c (merge_decls): Merge DECL_COMMON.
3670
3671 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3672
3673 * Make-lang.in (check_gcc_pallelize): Define.
3674
3675 2015-05-22 Marek Polacek <polacek@redhat.com>
3676
3677 PR c/47043
3678 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3679 attributes.
3680
3681 2015-05-21 Marek Polacek <polacek@redhat.com>
3682
3683 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3684 DECL_BUILT_IN.
3685
3686 2015-05-20 Marek Polacek <polacek@redhat.com>
3687
3688 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3689 * c-typeck.c: Likewise.
3690
3691 2015-05-19 Marek Polacek <polacek@redhat.com>
3692
3693 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3694
3695 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3696
3697 PR middle-end/66199
3698 * c-parser.c (c_parser_omp_for_loop): Don't add
3699 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3700 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3701 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3702 constructs.
3703
3704 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3705
3706 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3707 swaps.
3708
3709 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3710
3711 PR fortran/44054
3712 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3713 accessor function.
3714
3715 2015-05-14 Marek Polacek <polacek@redhat.com>
3716
3717 PR c/66066
3718 PR c/66127
3719 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3720 rather than with 0.
3721
3722 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3723
3724 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3725 to add a call to warn_for_misleading_indentation.
3726 (c_parser_else_body): Likewise, adding param "else_loc".
3727 (c_parser_if_statement): Check for misleading indentation.
3728 (c_parser_while_statement): Likewise.
3729 (c_parser_for_statement): Likewise.
3730
3731 2015-05-08 Marek Polacek <polacek@redhat.com>
3732
3733 PR c/64918
3734 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3735 (output_init_element): Likewise.
3736
3737 2015-05-07 Marek Polacek <polacek@redhat.com>
3738
3739 PR c/65179
3740 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3741 value.
3742
3743 2015-04-30 Marek Polacek <polacek@redhat.com>
3744
3745 * c-typeck.c (set_init_label): Call error_at instead of error and
3746 pass LOC to it.
3747
3748 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3749 the type of a decl.
3750
3751 * c-typeck.c (c_build_va_arg): Clarify the error message.
3752
3753 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3754
3755 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3756 OMP_STANDALONE_CLAUSES.
3757
3758 2015-04-28 Marek Polacek <polacek@redhat.com>
3759
3760 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3761
3762 2015-04-28 Marek Polacek <polacek@redhat.com>
3763
3764 PR c/65901
3765 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3766
3767 2015-04-25 Marek Polacek <polacek@redhat.com>
3768
3769 PR c/52085
3770 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3771 attribute.
3772
3773 2015-04-23 Marek Polacek <polacek@redhat.com>
3774
3775 PR c/65345
3776 * c-decl.c (set_labels_context_r): New function.
3777 (store_parm_decls): Call it via walk_tree_without_duplicates.
3778 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3779 instead of create_tmp_var. Build TARGET_EXPR instead of
3780 COMPOUND_EXPR.
3781 (build_atomic_assign): Use create_tmp_var_raw instead of
3782 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3783
3784 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3785
3786 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3787 (c_parser_omp_target_update): Add missed %> to error_at ().
3788
3789 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3790
3791 PR target/55143
3792 * c-decl.c (c_default_pointer_mode): Remove definition.
3793 * c-tree.h (c_default_pointer_mode): Remove declaration.
3794
3795 2015-03-27 Tobias Burnus <burnus@net-b.de>
3796
3797 PR c/65586
3798 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3799 error out.
3800 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3801 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3802 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3803
3804 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3805
3806 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3807 attribute for DECL_EXTERNAL VAR_DECLs.
3808
3809 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3810
3811 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3812 argument.
3813
3814 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3815
3816 PR c/65120
3817 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3818 before preparing arguments to warn_logical_not_parentheses.
3819
3820 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3821
3822 PR c/65120
3823 * c-typeck.c (parser_build_binary_op): Don't warn for
3824 !!x == y or !b == y where b is _Bool.
3825
3826 2015-03-09 Marek Polacek <polacek@redhat.com>
3827
3828 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3829 * c-decl.c (grokdeclarator): Likewise.
3830 * c-typeck.c (build_binary_op): Likewise.
3831
3832 2015-02-27 Marek Polacek <polacek@redhat.com>
3833
3834 PR c/65228
3835 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3836
3837 2015-02-14 Marek Polacek <polacek@redhat.com>
3838
3839 PR c/64768
3840 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3841 declared through a typedef name.
3842
3843 2015-02-13 Marek Polacek <polacek@redhat.com>
3844
3845 PR c/65050
3846 * c-decl.c (grokdeclarator): Print also the type when giving
3847 the error message about array's incomplete element type.
3848
3849 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3850
3851 PR c/64824
3852 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3853 check in the POP macro.
3854
3855 2015-02-09 Marek Polacek <polacek@redhat.com>
3856
3857 PR c/64856
3858 * c-typeck.c (process_init_element): Don't always wrap
3859 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3860 initializing a range of elements.
3861
3862 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3863
3864 PR c/64824
3865 PR c/64868
3866 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3867
3868 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3869
3870 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3871 processing enum declaration.
3872
3873 2015-01-29 Marek Polacek <polacek@redhat.com>
3874
3875 PR c/64709
3876 * c-typeck.c (pop_init_level): If constructor_elements has
3877 exactly one element with integer_zerop value, set constructor_zeroinit
3878 to 1. Remove braces around warning_init call.
3879
3880 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3881
3882 PR c/64766
3883 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3884 of FUNCTION_DECLs with error_mark_node.
3885
3886 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3887
3888 PR c/64778
3889 * c-typeck.c (convert_arguments): Return -1 if there are
3890 error_args, even if we've diagnosed too many arguments.
3891
3892 2015-01-21 Richard Biener <rguenther@suse.de>
3893
3894 PR middle-end/64313
3895 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3896 for builtins the user declared correctly.
3897
3898 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3899 Bernd Schmidt <bernds@codesourcery.com>
3900 Cesar Philippidis <cesar@codesourcery.com>
3901 James Norris <jnorris@codesourcery.com>
3902 Jakub Jelinek <jakub@redhat.com>
3903 Ilmir Usmanov <i.usmanov@samsung.com>
3904
3905 * c-parser.c: Include "gomp-constants.h".
3906 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3907 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3908 Use OMP_CLAUSE_SET_MAP_KIND.
3909 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3910 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3911 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3912 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3913 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3914 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3915 "copyout", "create", "delete", "deviceptr", "gang", "host",
3916 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3917 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3918 "present_or_create", "pcreate", "seq", "self", "vector",
3919 "vector_length", "wait", "worker".
3920 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3921 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3922 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3923 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3924 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3925 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3926 (c_parser_oacc_data_clause_deviceptr)
3927 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3928 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3929 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3930 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3931 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3932 (c_parser_oacc_parallel, c_parser_oacc_update)
3933 (c_parser_oacc_wait): New functions.
3934 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3935 (c_finish_oacc_data): New prototypes.
3936 * c-typeck.c: Include "gomp-constants.h".
3937 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3938 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3939 OMP_CLAUSE_SET_MAP_KIND.
3940 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3941 (c_finish_oacc_data): New functions.
3942 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3943 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3944 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3945 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3946 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3947 GOMP_MAP_FORCE_DEVICEPTR.
3948
3949 2015-01-09 Michael Collison <michael.collison@linaro.org>
3950
3951 * c-array-notation.c: Include hash-set.h, machmode.h,
3952 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3953 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3954 * c-aux-info.c: Ditto.
3955 * c-convert.c: Ditto.
3956 * c-decl.c: Ditto.
3957 * c-errors.c: Ditto.
3958 * c-lang.c: Dittoxs.
3959 * c-objc-common.c: Ditto.
3960 * c-parser.c: Ditto.
3961 * c-typeck.c: Include hash-set.h, machmode.h,
3962 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3963 fold-const.h, wide-int.h, inchash.h, real.h and
3964 fixed-value.h due to flattening of tree.h.
3965
3966 2015-01-07 Marek Polacek <polacek@redhat.com>
3967
3968 PR c/64417
3969 * c-typeck.c (process_init_element): Disallow initialization of
3970 a flexible array member with a string constant if the structure
3971 is in an array.
3972
3973 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3974
3975 PR sanitizer/64344
3976 * c-typeck.c (convert_for_assignment, c_finish_return): For
3977 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3978 types also set in_late_binary_op around convert call.
3979 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3980 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3981 result on expr as last argument to ubsan_instrument_float_cast,
3982 if in_late_binary_op, don't use c_save_expr but save_expr.
3983
3984 Update copyright years.
3985
3986 2015-01-05 Marek Polacek <polacek@redhat.com>
3987
3988 PR c/64423
3989 * c-typeck.c (build_array_ref): Pass loc down to
3990 warn_array_subscript_with_type_char.
3991
3992 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
3993
3994 * c-typeck.c: New behavious for pointers to arrays with qualifiers
3995 (common-pointer-type): For pointers to arrays take qualifiers from
3996 element type.
3997 (build_conditional_expr): Add warnings for lost qualifiers.
3998 (comp-target-types): Allow pointers to arrays with different qualifiers.
3999 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
4000 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
4001 to PEDWARN_FOR_QUALIFIERS.
4002
4003 2014-12-17 Jakub Jelinek <jakub@redhat.com>
4004
4005 PR sanitizer/64289
4006 * c-convert.c: Include ubsan.h.
4007 (convert): For real -> integral casts and
4008 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4009 instead instrument the float cast directly.
4010
4011 2014-11-29 Jakub Jelinek <jakub@redhat.com>
4012
4013 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4014 c_finish_stmt_expr): Remove NULL last argument from
4015 create_tmp_var_raw and create_tmp_var calls.
4016 * c-array-notation.c (fix_builtin_array_notation_fn,
4017 build_array_notation_expr, fix_conditional_array_notations_1,
4018 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4019
4020 2014-11-28 Marek Polacek <polacek@redhat.com>
4021
4022 PR c/63862
4023 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4024 convert the right operand to integer type.
4025
4026 2014-11-25 Marek Polacek <polacek@redhat.com>
4027
4028 PR c/63877
4029 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4030 for inline functions.
4031
4032 2014-11-21 Jakub Jelinek <jakub@redhat.com>
4033
4034 PR target/63764
4035 * c-typeck.c (build_array_ref): Adjust
4036 convert_vector_to_pointer_for_subscript caller. If it returns true,
4037 call non_lvalue_loc on the result.
4038
4039 2014-11-11 Richard Biener <rguenther@suse.de>
4040
4041 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4042 to true.
4043
4044 2014-11-10 Andi Kleen <ak@linux.intel.com>
4045
4046 PR c/60804
4047 * c-parser.c (c_parser_statement_after_labels): Call
4048 check_no_cilk.
4049 (c_parser_if_statement): Dito.
4050 (c_parser_switch_statement): Dito.
4051 (c_parser_while_statement): Dito.
4052 (c_parser_do_statement): Dito.
4053 (c_parser_for_statement): Dito.
4054 * c-typeck.c (c_finish_loop): Dito.
4055
4056 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4057
4058 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4059 OPT_Wshift_count_overflow in the warnings.
4060
4061 2014-10-30 Marek Polacek <polacek@redhat.com>
4062
4063 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4064 print the stripped version as well, if they're not the same.
4065
4066 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4067
4068 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4069 machine_mode.
4070
4071 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
4072
4073 * c-decl.c: Adjust include files.
4074 * c-parser.c: Ditto.
4075
4076 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4077 Tom Tromey <tromey@redhat.com>
4078
4079 * c-tree.h (enum c_oracle_request): New.
4080 (c_binding_oracle_function): New typedef.
4081 (c_binding_oracle, c_pushtag, c_bind): Declare.
4082 * c-decl.c (c_binding_oracle): New global.
4083 (I_SYMBOL_CHECKED): New macro.
4084 (i_symbol_binding): New function.
4085 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4086 (I_TAG_CHECKED): New macro.
4087 (i_tag_binding): New function.
4088 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4089 (I_LABEL_CHECKED): New macro.
4090 (i_label_binding): New function.
4091 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4092 (c_print_identifier): Save and restore c_binding_oracle.
4093 (c_pushtag, c_bind): New functions.
4094
4095 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
4096
4097 * c-typeck.c: Adjust include files.
4098
4099 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4100
4101 PR c++/53061
4102 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4103 initialization here...
4104 (c_initialize_diagnostics): ... but here. Set defaults after
4105 building pretty-printer.
4106
4107 2014-10-23 Marek Polacek <polacek@redhat.com>
4108
4109 PR c/63626
4110 * c-decl.c (pop_scope): Don't print warning in external_scope.
4111
4112 2014-10-19 Marek Polacek <polacek@redhat.com>
4113
4114 PR c/63567
4115 * c-typeck.c (output_init_element): Allow initializing objects with
4116 static storage duration with compound literals even in C99 and add
4117 pedwarn for it.
4118
4119 2014-10-17 Marek Polacek <polacek@redhat.com>
4120
4121 PR c/63567
4122 * c-typeck.c (digest_init): Allow initializing objects with static
4123 storage duration with compound literals even in C99 and add pedwarn
4124 for it.
4125
4126 2014-10-17 Marek Polacek <polacek@redhat.com>
4127
4128 PR c/63543
4129 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4130 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4131 error multiple times. Print the type.
4132
4133 2014-10-17 Marek Polacek <polacek@redhat.com>
4134
4135 PR c/63549
4136 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4137 type.
4138
4139 2014-10-17 Marek Polacek <polacek@redhat.com>
4140
4141 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4142 (start_function): Use OPT_Wimplicit_int instead of 0.
4143 (store_parm_decls_oldstyle): Likewise.
4144
4145 2014-10-17 Alan Modra <amodra@gmail.com>
4146
4147 PR middle-end/61848
4148 * c-decl.c (merge_decls): Don't merge section name or tls model
4149 to newdecl symtab node, instead merge to olddecl. Override
4150 existing olddecl section name. Set tls_model for all thread-local
4151 vars, not just OMP thread-private ones. Remove incorrect comment.
4152
4153 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
4154
4155 * c-decl.c: Adjust include files.
4156
4157 2014-10-14 DJ Delorie <dj@redhat.com>
4158
4159 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4160 (c_token_starts_typename): Check all __intN, not just __int128.
4161 (c_token_starts_declspecs): Likewise.
4162 (c_parser_declspecs): Likewise.
4163 (c_parser_attribute_any_word): Likewise.
4164 (c_parser_objc_selector): Likewise.
4165 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4166 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4167 is specified.
4168 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4169 __int128.
4170 (finish_declspecs): Likewise.
4171
4172 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4173
4174 * c-parser.c (c_parser_all_labels): New function to replace
4175 the duplicate code.
4176 (c_parser_statement): Call the new function.
4177
4178 2014-10-09 Marek Polacek <polacek@redhat.com>
4179
4180 PR c/63480
4181 * c-typeck.c (pop_init_level): Don't warn about initializing
4182 with { }.
4183
4184 2014-10-07 Marek Polacek <polacek@redhat.com>
4185
4186 PR c/59717
4187 * c-decl.c (header_for_builtin_fn): New function.
4188 (implicitly_declare): Suggest which header to include.
4189
4190 2014-10-07 Marek Polacek <polacek@redhat.com>
4191
4192 * c-convert.c (convert): Use error_operand_p.
4193 * c-typeck.c (require_complete_type): Likewise.
4194 (really_atomic_lvalue): Likewise.
4195 (digest_init): Likewise.
4196 (handle_omp_array_sections_1): Likewise.
4197
4198 2014-10-03 Marek Polacek <polacek@redhat.com>
4199
4200 PR c/63453
4201 * c-decl.c (pop_scope): Don't warn about "inline function declared
4202 but never defined" for functions marked with gnu_inline attribute.
4203
4204 2014-09-25 Jakub Jelinek <jakub@redhat.com>
4205
4206 PR c++/63249
4207 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4208 on low_bound and length.
4209
4210 2014-09-24 Marek Polacek <polacek@redhat.com>
4211
4212 PR c/61405
4213 PR c/53874
4214 * c-parser.c: Don't define CPP_KEYWORD.
4215 (c_parser_switch_statement): Pass original type to c_finish_case.
4216 * c-tree.h (c_finish_case): Update declaration.
4217 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4218 conditionally to c_do_switch_warnings.
4219
4220 2014-09-03 Marek Polacek <polacek@redhat.com>
4221
4222 PR c/62024
4223 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4224 conversions.
4225
4226 2014-09-02 Jakub Jelinek <jakub@redhat.com>
4227 Balaji V. Iyer <balaji.v.iyer@intel.com>
4228 Igor Zamyatin <igor.zamyatin@intel.com>
4229
4230 * c-parser.c (c_parser_cilk_for): New function.
4231 (c_parser_cilk_grainsize): Likewise.
4232 (c_get_temp_regvar): Likewise.
4233 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4234 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4235 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4236 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4237 case.
4238
4239 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4240
4241 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4242 with using HOST_WIDE_INT without truncation to 'int'
4243
4244 2014-08-22 Marek Polacek <polacek@redhat.com>
4245
4246 PR c++/62199
4247 * c-typeck.c (parser_build_binary_op): Adjust call to
4248 warn_logical_not_parentheses.
4249
4250 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4251
4252 PR other/62008
4253 * c-parser.c (c_parser_array_notation): Check for correct
4254 type of an array added.
4255
4256 2014-08-19 Marek Polacek <polacek@redhat.com>
4257
4258 PR c++/62153
4259 * c-typeck.c (build_binary_op): If either operand of a comparison
4260 is a boolean expression, call maybe_warn_bool_compare.
4261
4262 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4263
4264 PR c/45584
4265 * c-typeck.c (build_c_cast): Do a conversion even when the
4266 TYPE_MAIN_VARIANTs are the same.
4267
4268 2014-08-19 Marek Polacek <polacek@redhat.com>
4269
4270 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4271 pedwarn_c99 instead of pedwarn.
4272 (grokfield): Likewise.
4273 (warn_defaults_to): New function.
4274 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4275 Unconditionally call pedwarn_c99 instead of pedwarn.
4276 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4277 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4278 check flag_isoc11 before.
4279 * c-errors.c (pedwarn_c99): Change the return type to bool.
4280 Handle -Wc99-c11-compat.
4281 * c-parser.c (disable_extension_diagnostics): Handle
4282 warn_c99_c11_compat.
4283 (restore_extension_diagnostics): Likewise.
4284 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4285 instead of pedwarn, don't check flag_isoc11 before.
4286 (c_parser_declspecs): Likewise.
4287 (c_parser_alignas_specifier): Likewise.
4288 (c_parser_alignof_expression): Likewise.
4289 (c_parser_generic_selection): Likewise.
4290 * c-tree.h (pedwarn_c99): Update declaration.
4291 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4292 of pedwarn_c99.
4293
4294 2014-08-19 Marek Polacek <polacek@redhat.com>
4295
4296 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4297 to pedwarn_c90.
4298 * c-errors.c: Include "opts.h".
4299 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4300 * c-parser.c (disable_extension_diagnostics): Handle negative value
4301 of warn_c90_c99_compat, too.
4302 (restore_extension_diagnostics): Likewise.
4303 (c_parser_compound_statement_nostart): Pass
4304 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4305
4306 2014-08-12 Marek Polacek <polacek@redhat.com>
4307
4308 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4309 Add pedwarn.
4310 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4311 Likewise.
4312 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4313
4314 2014-08-10 Marek Polacek <polacek@redhat.com>
4315
4316 PR c/51849
4317 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4318 Call pedwarn_c90 instead of pedwarn.
4319 (check_bitfield_type_and_width): Likewise.
4320 (declspecs_add_qual): Likewise.
4321 (declspecs_add_type): Likewise.
4322 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4323 Adjust to only call pedwarn_c90.
4324 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4325 pedwarn_c90 instead of pedwarn.
4326 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4327 * c-parser.c (disable_extension_diagnostics): Handle
4328 warn_c90_c99_compat.
4329 (restore_extension_diagnostics): Likewise.
4330 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4331 pedwarn_c90 instead of pedwarn.
4332 (c_parser_initelt): Likewise.
4333 (c_parser_postfix_expression): Likewise.
4334 (c_parser_postfix_expression_after_paren_type): Likewise.
4335 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4336 * c-tree.h: Fix formatting.
4337 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4338 pedwarn_c90 instead of pedwarn.
4339
4340 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4341
4342 * c-typeck.c: Remove include of pointer-set.h.
4343
4344 2014-08-07 Marek Polacek <polacek@redhat.com>
4345
4346 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4347
4348 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4349
4350 * c-typeck.c: Use hash_map instead of pointer_map.
4351
4352 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4353
4354 * c-decl.c: Use hash_set instead of pointer_set.
4355
4356 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4357
4358 PR middle-end/61455
4359 * c-array-notation.c (expand_array_notations): Handling
4360 of DECL_EXPR added.
4361
4362 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
4363
4364 PR c++/60517
4365 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4366 a local variable.
4367
4368 2014-07-30 Tom Tromey <tromey@redhat.com>
4369
4370 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4371 field.
4372 (really_start_incremental_init, push_init_level): Initialize
4373 designator_depth.
4374 (pop_init_level): Set global designator_depth.
4375 (process_init_element): Check for designated_init attribute.
4376
4377 2014-07-20 Marek Polacek <polacek@redhat.com>
4378
4379 PR c/61852
4380 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4381 (implicitly_declare): Pass location to implicit_decl_warning.
4382
4383 2014-07-14 Jakub Jelinek <jakub@redhat.com>
4384
4385 PR middle-end/61294
4386 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4387 If non-NULL, call c_parser_check_literal_zero.
4388 (c_parser_check_literal_zero): New function.
4389 (c_parser_postfix_expression_after_primary): Adjust
4390 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4391
4392 2014-07-06 Marek Polacek <polacek@redhat.com>
4393
4394 PR c/6940
4395 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4396 * c-tree.h (C_ARRAY_PARAMETER): Define.
4397 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4398 function parameter.
4399
4400 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4401 Chen Gang <gang.chen.5i5j@gmail.com>
4402
4403 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4404 releasing symbol.
4405
4406 2014-07-01 Marek Polacek <polacek@redhat.com>
4407
4408 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4409 instead of 0 to WARN_FOR_ASSIGNMENT.
4410
4411 2014-07-01 Marek Polacek <polacek@redhat.com>
4412
4413 PR c/58286
4414 * c-typeck.c (convert_for_assignment): Pass
4415 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4416
4417 2014-06-30 Marek Polacek <polacek@redhat.com>
4418
4419 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4420 has no_sanitize_undefined attribute.
4421
4422 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4423
4424 PR middle-end/57541
4425 * c-array-notation.c (fix_builtin_array_notation_fn):
4426 Check for 0 arguments in builtin call. Check that bultin argument is
4427 correct.
4428 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4429 index.
4430
4431 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4432
4433 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4434 qualifiers in __auto_type for atomic types.
4435 (c_parser_typeof_specifier): Discard all type qualifiers in
4436 __typeof__ for atomic types.
4437
4438 2014-06-25 Marek Polacek <polacek@redhat.com>
4439
4440 PR c/61162
4441 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4442 the return expression to c_finish_return.
4443
4444 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4445
4446 * c-typeck.c (c_finish_omp_clauses): Make sure
4447 OMP_CLAUSE_LINEAR_STEP has correct type.
4448
4449 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4450
4451 * c-decl.c: Adjust.
4452
4453 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4454
4455 * c-parser.c (c_parser_omp_for_loop): For
4456 #pragma omp parallel for simd move lastprivate clause from parallel
4457 to for rather than simd.
4458
4459 2014-06-23 Marek Polacek <polacek@redhat.com>
4460
4461 * c-typeck.c (parser_build_binary_op): Don't call
4462 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4463
4464 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4465
4466 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4467 * c-decl.c (merge_decls): Likewise.
4468
4469 2014-06-09 Marek Polacek <polacek@redhat.com>
4470
4471 PR c/36446
4472 * c-typeck.c (error_init): Call inform instead of error_at.
4473 (pedwarn_init): Call inform instead of pedwarn.
4474 (warning_init): Call inform instead of warning_at.
4475
4476 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4477
4478 * c-decl.c (merge_decls): Use set_decl_section_name.
4479 (duplicate_decls): Remove node if it exists.
4480
4481 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4482
4483 PR c/53119
4484 * c-typeck.c (push_init_level, process_init_element,
4485 pop_init_level): Correct check for zero initialization, move
4486 missing brace warning to respect zero initialization.
4487
4488 2014-06-05 Marek Polacek <polacek@redhat.com>
4489
4490 PR c/56724
4491 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4492
4493 2014-06-05 Marek Polacek <polacek@redhat.com>
4494
4495 PR c/49706
4496 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4497 on the left hand side operand of a comparison.
4498
4499 2014-06-05 Marek Polacek <polacek@redhat.com>
4500
4501 PR c/48062
4502 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4503 Print note only if the warning was printed.
4504
4505 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4506
4507 PR c/58942
4508 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4509 with a pointer.
4510
4511 2014-06-03 Marek Polacek <polacek@redhat.com>
4512
4513 PR c/60439
4514 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4515 c_start_case.
4516 * c-tree.h (c_start_case): Update.
4517 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4518 switch condition has boolean value.
4519
4520 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4521
4522 * c-decl.c: Include builtins.h.
4523 * c-parser.c: Likewise.
4524
4525 2014-05-27 Marek Polacek <polacek@redhat.com>
4526
4527 PR c/56724
4528 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4529 error and warning calls to error_at and warning_at. Pass location of
4530 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4531 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4532 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4533
4534 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4535
4536 PR c/61191
4537 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4538 function parameters.
4539
4540 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4541
4542 * c-decl.c (merge_decls): Preserve symtab node pointers.
4543 (duplicate_decls): Free new decl.
4544
4545 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4546
4547 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4548 initialization.
4549
4550 * c-parser.c (c_parser_omp_target): Return bool values.
4551
4552 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4553
4554 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4555 num_teams_loc variable to num_thread_limit_loc.
4556
4557 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4558
4559 * c-array-notation.c (expand_array_notations): Use void_node
4560 instead of void_zero_node.
4561
4562 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4563
4564 * c-decl.c (finish_struct): Adjust.
4565 (finish_enum): Likewise.
4566 (bind): Adjust.
4567 (record_inline_static): Likewise.
4568 (push_scope): Likewise.
4569 (make_label): Likewise.
4570 (lookup_label_for_goto): Likewise.
4571 (finish_struct): Likewise.
4572 (finish_enum): Likewise.
4573 (store_parm_decls): Likewise.
4574 (c_push_function_context): Likewise.
4575 * c-lang.h: Remove usage of variable_size gty attribute.
4576 * c-parser.c (c_parse_init): Adjust.
4577 (c_parse_file): Likewise.
4578
4579 2014-05-13 Marek Polacek <polacek@redhat.com>
4580
4581 PR c/61162
4582 * c-typeck.c (convert_for_assignment): Pass location to
4583 WARN_FOR_ASSIGNMENT instead of input_location.
4584
4585 2014-05-10 Marek Polacek <polacek@redhat.com>
4586
4587 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4588 maybe_warn_string_init.
4589 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4590 maybe_warn_string_init.
4591 * c-tree.h (maybe_warn_string_init): Update declaration.
4592 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4593 Call pedwarn_init with loc instead of with input_location.
4594 (digest_init): Pass init_loc to maybe_warn_string_init.
4595 (pop_init_level): Call pedwarn_init with loc instead of with
4596 input_location.
4597 (set_init_index): Likewise.
4598 (process_init_element): Likewise.
4599
4600 2014-05-09 Marek Polacek <polacek@redhat.com>
4601
4602 PR c/61096
4603 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4604 (c_parser_initelt): Pass location to set_init_label. Pass array index
4605 location to set_init_index.
4606 * c-tree.h (push_init_level): Update declaration.
4607 (pop_init_level): Likewise.
4608 (set_init_index): Likewise.
4609 (set_init_label): Likewise.
4610 * c-typeck.c (error_init): Add location parameter. Call error_at
4611 instead of error.
4612 (digest_init): Pass init_loc to error_init.
4613 (really_start_incremental_init):
4614 (push_init_level): Add location parameter. Pass loc to pop_init_level
4615 and error_init.
4616 (pop_init_level): Likewise.
4617 (set_designator): Add location parameter. Pass loc to pop_init_level,
4618 push_init_level, and error_init.
4619 (set_init_index): Add location parameter. Pass loc to error_init and
4620 set_designator.
4621 (set_init_label): Likewise.
4622 (output_init_element): Pass loc to error_init.
4623 (process_init_element): Pass loc to error_init, pop_init_level,
4624 pedwarn_init, and push_init_level.
4625
4626 2014-05-09 Marek Polacek <polacek@redhat.com>
4627
4628 PR c/50459
4629 * c-parser.c (c_parser_attributes): Parse the arguments as an
4630 expression-list if the attribute takes identifier.
4631
4632 2014-05-08 Marek Polacek <polacek@redhat.com>
4633
4634 PR c/61053
4635 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4636 TYPE_ALIGN_UNIT.
4637
4638 2014-05-08 Marek Polacek <polacek@redhat.com>
4639
4640 PR c/61077
4641 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4642 of main.
4643
4644 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4645 Mike Stump <mikestump@comcast.net>
4646 Richard Sandiford <rdsandiford@googlemail.com>
4647
4648 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4649 (finish_enum): Use wide-int interfaces.
4650 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4651 * c-typeck.c (build_c_cast): Likewise.
4652 (set_nonincremental_init_from_string): Likewise.
4653 (c_tree_equal): Likewise.
4654
4655 2014-05-02 Marek Polacek <polacek@redhat.com>
4656
4657 PR c/25801
4658 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4659 Return size_one_node when the type is not complete.
4660 (pointer_diff): Remove comment.
4661 (build_unary_op): Improve error messages.
4662
4663 2014-05-02 Marek Polacek <polacek@redhat.com>
4664
4665 * c-typeck.c (c_finish_return): Separate warning_at calls.
4666
4667 2014-05-02 Marek Polacek <polacek@redhat.com>
4668
4669 * c-tree.h (error_init): Remove declaration.
4670 (pedwarn_init): Likewise.
4671 * c-typeck.c (error_init): Make static and move above.
4672 (pedwarn_init): Likewise.
4673 (warning_init): Move above.
4674 (maybe_warn_string_init): Likewise.
4675
4676 2014-05-01 Jeff Law <law@redhat.com>
4677
4678 Revert:
4679
4680 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4681 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4682 avoid goto.
4683
4684 2014-05-02 Marek Polacek <polacek@redhat.com>
4685
4686 PR c/60784
4687 * c-typeck.c (push_init_level): Set constructor_designated to
4688 p->designated for structures.
4689
4690 2014-05-01 Marek Polacek <polacek@redhat.com>
4691
4692 PR c/60915
4693 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4694 function-definition has an attribute after the declarator.
4695
4696 2014-05-01 Marek Polacek <polacek@redhat.com>
4697
4698 PR c/60257
4699 * c-typeck.c (warning_init): Add location_t parameter. Call
4700 warning_at instead of warning.
4701 (push_init_level): Pass input_location to warning_init.
4702 (add_pending_init): Add location_t parameter. Pass loc to
4703 warning_init.
4704 (set_nonincremental_init): Pass input_location to add_pending_init.
4705 (set_nonincremental_init_from_string): Likewise.
4706 (output_init_element): Pass loc to warning_init and to
4707 add_pending_init.
4708
4709 2014-05-01 Marek Polacek <polacek@redhat.com>
4710
4711 PR c/43395
4712 * c-typeck.c (c_finish_return): Distinguish between label and variable
4713 when warning about returning local address.
4714
4715 2014-05-01 Marek Polacek <polacek@redhat.com>
4716
4717 PR c/29467
4718 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4719 in C89 mode.
4720
4721 2014-05-01 Marek Polacek <polacek@redhat.com>
4722
4723 PR c/43245
4724 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4725 instead of 0 to WARN_FOR_QUALIFIERS.
4726
4727 2014-05-01 Marek Polacek <polacek@redhat.com>
4728
4729 PR c/56989
4730 * c-typeck.c (default_conversion): Use better location for
4731 error call.
4732
4733 2014-04-30 Marek Polacek <polacek@redhat.com>
4734
4735 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4736 also when SANITIZE_FLOAT_DIVIDE is on.
4737
4738 2014-04-30 Marek Polacek <polacek@redhat.com>
4739
4740 PR c/60139
4741 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4742 and pedwarn_init. Use loc insted of input_location.
4743
4744 2014-04-30 Marek Polacek <polacek@redhat.com>
4745
4746 PR c/60351
4747 * c-typeck.c (build_binary_op): Use location when warning about
4748 shift count.
4749
4750 2014-04-25 Marek Polacek <polacek@redhat.com>
4751
4752 PR c/18079
4753 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4754 always_inline/noinline and hot/cold attributes.
4755
4756 2014-04-25 Marek Polacek <polacek@redhat.com>
4757
4758 PR c/60114
4759 * c-parser.c (c_parser_initelt): Pass input_location to
4760 process_init_element.
4761 (c_parser_initval): Pass loc to process_init_element.
4762 * c-tree.h (process_init_element): Adjust declaration.
4763 * c-typeck.c (push_init_level): Pass input_location to
4764 process_init_element.
4765 (pop_init_level): Likewise.
4766 (set_designator): Likewise.
4767 (output_init_element): Add location_t parameter. Pass loc to
4768 digest_init.
4769 (output_pending_init_elements): Pass input_location to
4770 output_init_element.
4771 (process_init_element): Add location_t parameter. Pass loc to
4772 output_init_element.
4773
4774 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4775
4776 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4777 atomic-clause, allow comma in between atomic-clause and
4778 seq_cst.
4779
4780 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4781
4782 PR c/59073
4783 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4784 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4785
4786 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4787
4788 PR middle-end/60469
4789 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4790 create_tmp_var instead build_decl for creating temps.
4791 (build_array_notation_expr): Likewise.
4792 (fix_conditional_array_notations_1): Likewise.
4793 (fix_array_notation_expr): Likewise.
4794 (fix_array_notation_call_expr): Likewise.
4795
4796 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4797
4798 PR c++/60689
4799 * c-tree.h (c_build_function_call_vec): New prototype.
4800 * c-typeck.c (build_function_call_vec): Don't call
4801 resolve_overloaded_builtin here.
4802 (c_build_function_call_vec): New wrapper function around
4803 build_function_call_vec. Call resolve_overloaded_builtin here.
4804 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4805 Call c_build_function_call_vec instead of build_function_call_vec.
4806 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4807 * c-decl.c (finish_decl): Likewise.
4808
4809 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4810
4811 PR c/55383
4812 * c-typeck.c: Use correct format string in cast-qual warning
4813
4814 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4815
4816 * c-decl.c (c_decl_attributes): Use
4817 lang_hooks.types.omp_mappable_type.
4818 * c-typeck.c (c_finish_omp_clauses): Likewise.
4819
4820 2014-03-06 Marek Polacek <polacek@redhat.com>
4821
4822 PR c/60197
4823 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4824 of checking tree code.
4825
4826 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4827
4828 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4829 (c_parser_parameter_declaration): Likewise.
4830
4831 2014-02-19 Marek Polacek <polacek@redhat.com>
4832
4833 PR c/60195
4834 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4835 Call mark_exp_read on exp.value.
4836 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4837 TREE_ADDRESSABLE on old instead of val.
4838 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4839
4840 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4841
4842 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4843 C_EXPR_APPEND by vec_safe_push.
4844 * c-tree.h (C_EXPR_APPEND): Remove.
4845
4846 2014-01-31 Marek Polacek <polacek@redhat.com>
4847
4848 PR c/59963
4849 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4850 build_function_call_vec.
4851 (build_function_call): Likewise.
4852 (build_atomic_assign): Likewise.
4853 (build_function_call_vec): Add arg_loc parameter. Use it.
4854 (convert_arguments): Likewise.
4855 (convert_for_assignment): Rename rhs_loc to expr_loc.
4856 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4857 (c_parser_objc_keywordexpr): Likewise.
4858 (c_parser_postfix_expression_after_primary): Call
4859 build_function_call_vec with expr_loc rather than op_loc.
4860 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4861 build_function_call_vec.
4862 (c_parser_expr_list): Add locations parameter. Fill it with locations
4863 of function arguments.
4864 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4865
4866 2014-01-30 Marek Polacek <polacek@redhat.com>
4867
4868 PR c/59940
4869 * c-typeck.c (build_function_call_vec): Use loc parameter.
4870 (convert_arguments): Add location parameter. Use it.
4871 (ep_convert_and_check): Likewise.
4872 (build_atomic_assign): Adjust convert_for_assignment call.
4873 (build_modify_expr): Likewise.
4874 (digest_init): Likewise.
4875 (c_finish_return): Likewise.
4876 (build_conditional_expr): Adjust ep_convert_and_check calls.
4877 (convert_for_assignment): Add rhs_loc parameter. Use it.
4878 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4879 calls.
4880
4881 2014-01-30 Richard Biener <rguenther@suse.de>
4882
4883 PR c/59905
4884 * c-typeck.c (build_function_call_vec): Do not replace calls
4885 to a function via an incompatible type with a runtime abort.
4886
4887 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4888
4889 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4890 flag_enable_cilkplus with flag_cilkplus.
4891 (c_parser_direct_declarator_inner): Likewise.
4892 (c_parser_attribute_any_word): Likewise.
4893 (c_parser_attributes): Likewise.
4894 (c_parser_compound_statement): Likewise.
4895 (c_parser_statement_after_labels): Likewise.
4896 (c_parser_if_statement): Likewise.
4897 (c_parser_switch_statement): Likewise.
4898 (c_parser_do_statement): Likewise.
4899 (c_parser_for_statement): Likewise.
4900 (c_parser_unary_expression): Likewise.
4901 (c_parser_postfix_expression): Likewise.
4902 (c_parser_postfix_expression_after_primary): Likewise.
4903 (c_parser_postfix_expression_after_primary): Likewise.
4904 (c_parser_omp_clause_name): Likewise.
4905 (c_finish_omp_declare_simd): Likewise.
4906 (c_parser_cilk_verify_simd): Likewise.
4907 * c-typeck.c (build_array_ref): Likewise.
4908 (build_function_call_vec): Likewise.
4909 (convert_arguments): Likewise.
4910 (build_compound_expr): Likewise.
4911 (c_finish_return): Likewise.
4912 (c_finish_if_stmt): Likewise.
4913 (c_finish_loop): Likewise.
4914 (build_binary_op): Likewise.
4915
4916 2014-01-23 Marek Polacek <polacek@redhat.com>
4917
4918 PR c/59846
4919 * c-typeck.c (parser_build_binary_op): Use location instead of
4920 input_location.
4921 (build_binary_op): Pass location to shorten_compare.
4922
4923 2014-01-23 Marek Polacek <polacek@redhat.com>
4924
4925 PR c/58346
4926 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4927 an empty aggregate.
4928
4929 2014-01-23 Marek Polacek <polacek@redhat.com>
4930
4931 PR c/59871
4932 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4933 of a comma expression.
4934 (emit_side_effect_warnings): Likewise.
4935
4936 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4937
4938 PR c/59825
4939 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4940 function to use walk_tree and moved a lot of its functionality to
4941 expand_array_notations.
4942 (expand_array_notations): New function.
4943
4944 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4945
4946 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4947 attribute an attribute without value.
4948
4949 2014-01-23 Jakub Jelinek <jakub@redhat.com>
4950
4951 PR middle-end/58809
4952 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4953 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4954
4955 2014-01-22 Marek Polacek <polacek@redhat.com>
4956
4957 PR c/59891
4958 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4959 of remove_c_maybe_const_expr on op1 and op2.
4960
4961 2014-01-15 Jakub Jelinek <jakub@redhat.com>
4962
4963 PR c/58943
4964 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4965 effects, preevaluate rhs using SAVE_EXPR first.
4966
4967 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4968
4969 PR c++/59631
4970 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4971 statements with if-elseif statements.
4972
4973 2014-01-06 Marek Polacek <polacek@redhat.com>
4974
4975 PR c/57773
4976 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4977 defined bit-field types only in ISO C.
4978
4979 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4980
4981 Update copyright years
4982
4983 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4984
4985 * c-array-notation.c: Use the standard form for the copyright notice.
4986
4987 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4988
4989 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4990 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4991 field in parser is not empty. If not-empty, call the function
4992 c_parser_finish_omp_declare_simd.
4993 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4994 between SIMD-enabled functions and #pragma simd. Added new parameter.
4995 (c_parser_cilk_all_clauses): Modified the usage of the function
4996 c_parser_cilk_clause_vectorlength as mentioned above.
4997 (c_parser_cilk_simd_fn_vector_attrs): New function.
4998 (c_finish_cilk_simd_fn_tokens): Likewise.
4999 (is_cilkplus_vector_p): Likewise.
5000 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5001 "nomask," and "mask" strings in clause name.
5002 (c_parser_omp_all_clauses): Added 3 new case statements:
5003 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5004 PRAGMA_CILK_CLAUSE_NOMASK.
5005 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5006 check for vector attribute and if so call the function
5007 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5008 called the function c_finish_cilk_simd_fn_tokens.
5009 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5010 parser field is non-empty. If so, parse them as you would parse
5011 the omp declare simd pragma.
5012 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5013 Added a check when step is a parameter and flag it as error.
5014 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5015 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5016 pragma_omp_clause.
5017
5018 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5019
5020 * c-parser.c (c_parser_omp_parallel): Fix description.
5021
5022 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5023
5024 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5025 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5026 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5027 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5028
5029 2013-12-04 Joseph Myers <joseph@codesourcery.com>
5030
5031 PR c/52023
5032 * c-parser.c (c_parser_alignas_specifier): Use
5033 c_sizeof_or_alignof_type instead of c_alignof.
5034 (c_parser_alignof_expression): Likewise, with min_alignof
5035 parameter depending on alignof spelling used.
5036
5037 2013-12-04 Marek Polacek <polacek@redhat.com>
5038
5039 PR c/54113
5040 * c-decl.c (start_function): Don't warn for missing prototype for
5041 inline functions.
5042
5043 2013-12-03 Marek Polacek <polacek@redhat.com>
5044
5045 PR c/59351
5046 * c-decl.c (build_compound_literal): Allow compound literals with
5047 empty initial value.
5048
5049 2013-12-02 Joseph Myers <joseph@codesourcery.com>
5050
5051 PR c/58235
5052 * c-typeck.c (build_modify_expr): Diagnose assignment to
5053 expression with array type.
5054
5055 2013-11-29 Joseph Myers <joseph@codesourcery.com>
5056
5057 PR c/42262
5058 * c-typeck.c (process_init_element): Do not treat a string as
5059 initializing a whole array when used with a designator for an
5060 individual element.
5061
5062 2013-11-29 Joseph Myers <joseph@codesourcery.com>
5063
5064 PR c/57574
5065 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5066 an inline function following a static declaration.
5067
5068 2013-11-28 Jakub Jelinek <jakub@redhat.com>
5069
5070 PR c/59310
5071 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5072 to p_name before calling c_parser_omp_teams instead of after.
5073 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5074 argument. Remove unused p_name variable.
5075
5076 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
5077 Jakub Jelinek <jakub@redhat.com>
5078
5079 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5080 external_scope is NULL.
5081
5082 2013-11-27 Tom de Vries <tom@codesourcery.com>
5083 Marc Glisse <marc.glisse@inria.fr>
5084
5085 PR c++/59032
5086 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5087
5088 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
5089
5090 * c-typeck.c: Add required include files from gimple.h.
5091
5092 2013-11-22 David Malcolm <dmalcolm@redhat.com>
5093
5094 * c-decl.c (define_label, shadow_tag_warned)
5095 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5096 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5097 (declspecs_add_type): Remove use of in_system_header macro.
5098 * c-parser.c (c_parser_unary_expression): Likewise.
5099 * c-typeck.c (store_init_value, process_init_element)
5100 (c_start_case): Likewise.
5101
5102 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5103 macro.
5104
5105 * c-parser.c (c_parser_set_source_position_from_token): Remove
5106 reference to in_system_header from comment.
5107
5108 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5109
5110 * c-decl.c (grokdeclarator): Update comment to refer to
5111 tree_to_[su]hwi rather than tree_low_cst.
5112
5113 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5114
5115 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5116 tree_to_uhwi throughout.
5117
5118 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5119
5120 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5121 throughout.
5122
5123 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5124
5125 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5126 throughout.
5127
5128 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
5129
5130 * c-parser.c (c_parser_cilk_simd): New.
5131 (c_parser_cilk_verify_simd): New.
5132 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5133 (c_parser_omp_for_loop): Add case for NE_EXPR.
5134 Set c_break_label for CILK_SIMD.
5135 (c_parser_cilk_clause_vectorlength): New.
5136 (c_parser_cilk_clause_linear): New.
5137 (c_parser_cilk_clause_name): New.
5138 (c_parser_cilk_all_clauses): New.
5139 * c-typeck.c (build_unary_op): Pass location argument to
5140 readonly_error.
5141 (build_modify_expr): Same.
5142 (build_asm_expr): Same.
5143 (c_finish_bc_stmt): Error on break/continue in loops.
5144
5145 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
5146
5147 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5148
5149 2013-11-14 Diego Novillo <dnovillo@google.com>
5150
5151 * c-decl.c: Include print-tree.h.
5152 Include stor-layout.h.
5153 Include varasm.h.
5154 Include attribs.h.
5155 Include stringpool.h.
5156 * c-lang.c: Include fold-const.h.
5157 * c-parser.c: Include stringpool.h.
5158 Include attribs.h.
5159 Include stor-layout.h.
5160 Include varasm.h.
5161 Include trans-mem.h.
5162 * c-typeck.c: Include stor-layout.h.
5163 Include trans-mem.h.
5164 Include varasm.h.
5165 Include stmt.h.
5166
5167 2013-11-13 Joseph Myers <joseph@codesourcery.com>
5168
5169 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5170 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5171 __auto_type.
5172 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5173 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5174 RID_AUTO_TYPE.
5175 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5176 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5177 (c_parser_declarator, c_parser_direct_declarator_inner)
5178 (c_parser_parameter_declaration, c_parser_type_name): All callers
5179 changed.
5180 (c_parser_declaration_or_fndef): Handle declarations with type
5181 determined from the initializer.
5182
5183 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
5184
5185 * c-typeck.c: Include gimplify.h.
5186
5187 2013-11-12 Joseph Myers <joseph@codesourcery.com>
5188
5189 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5190 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5191 comment.
5192 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5193 or _Thread_local as appropriate in diagnostics.
5194 (build_null_declspecs): Initialize ret->thread_gnu_p.
5195 (declspecs_add_scspec): Handle either __thread or _Thread_local
5196 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5197 pedantic. Do not disallow _Thread_local extern and _Thread_local
5198 static.
5199
5200 2013-11-07 Joseph Myers <joseph@codesourcery.com>
5201 Andrew MacLeod <amacleod@redhat.com>
5202
5203 * c-aux-info.c (gen_type): Handle atomic qualifier.
5204 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5205 qualifiers when compating types.
5206 (shadow_tag_warned): Handle atomic_p in declspecs.
5207 (quals_from_declspecs): Likewise.
5208 (start_decl): Use c_type_promotes_to when promoting argument
5209 types.
5210 (grokdeclarator): Handle _Atomic.
5211 (get_parm_info): Diagnose any qualifier on "void" as only
5212 parameter.
5213 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5214 comparing types. Use c_type_promotes_to when promoting argument
5215 types.
5216 (finish_function): Use c_type_promotes_to when promoting argument
5217 types.
5218 (build_null_declspecs): Handle atomic_p in declspecs.
5219 (declspecs_add_qual): Handle RID_ATOMIC.
5220 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5221 (c_token_starts_declspecs): Handle RID_ATOMIC.
5222 (c_parser_declspecs): Handle atomic type specifiers and
5223 qualifiers.
5224 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5225 from types of expressions with atomic type.
5226 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5227 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5228 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5229 (c_parser_statement_after_labels, c_parser_switch_statement)
5230 (c_parser_for_statement, c_parser_expr_no_commas)
5231 (c_parser_conditional_expression, c_parser_binary_expression)
5232 (c_parser_cast_expression, c_parser_unary_expression)
5233 (c_parser_postfix_expression)
5234 (c_parser_postfix_expression_after_primary, c_parser_expression):
5235 Use convert_lvalue_to_rvalue.
5236 (c_parser_expression_conv, c_parser_expr_list): Document
5237 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5238 (c_parser_objc_synchronized_statement): Use
5239 convert_lvalue_to_rvalue.
5240 (c_parser_objc_selector): Handle RID_ATOMIC.
5241 (c_parser_objc_receiver, c_parser_array_notation): Use
5242 convert_lvalue_to_rvalue.
5243 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5244 _Atomic (type-name).
5245 (struct c_declspecs): Add atomic_p field.
5246 (convert_lvalue_to_rvalue): Declare.
5247 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5248 corresponding atomic types.
5249 (qualify_type): Don't add _Atomic qualifiers from second argument.
5250 (comp_target_types): Do not allow _Atomic mismatches.
5251 (type_lists_compatible_p): Do not remove atomic qualifiers when
5252 comparing types.
5253 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5254 (build_atomic_assign): New functions.
5255 (build_unary_op): Use build_atomic_assign for atomic increment and
5256 decrement.
5257 (build_conditional_expr): Do not treat _Atomic void as a qualified
5258 version of void.
5259 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5260 (find_anonymous_field_with_type, convert_to_anonymous_field)
5261 (convert_for_assignment): Do not remove atomic qualifiers when
5262 comparing types.
5263 (digest_init): Do not accept initialization of arrays of atomic
5264 elements by string constants.
5265 (build_asm_expr): Use convert_lvalue_to_rvalue.
5266 (build_binary_op): Do not treat _Atomic void as a qualified
5267 version of void.
5268
5269 2013-11-06 DJ Delorie <dj@redhat.com>
5270
5271 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5272 both explicit and builtin, print the location of the explicit one.
5273
5274 2013-11-05 Tobias Burnus <burnus@net-b.de>
5275
5276 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5277 c_parser_omp_distribute, c_parser_omp_teams,
5278 c_parser_omp_target, c_parser_omp_declare): Handle
5279 -fopenmp-simd.
5280
5281 2013-11-03 Marek Polacek <polacek@redhat.com>
5282
5283 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5284
5285 2013-11-01 Jakub Jelinek <jakub@redhat.com>
5286
5287 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5288 check_dup_generic at the end, unless remove is true.
5289 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5290 remove = true;.
5291 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5292
5293 2013-10-31 Jakub Jelinek <jakub@redhat.com>
5294
5295 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5296 with decl that is not pointer nor array.
5297
5298 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5299
5300 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5301 a spawning function is found.
5302 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5303 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5304 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5305 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5306 case.
5307 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5308 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5309 expr.
5310 (c_finish_return): Added a check to reject _Cilk_spawn in return
5311 expression.
5312 (build_cilk_spawn): New function.
5313 (build_cilk_sync): Likewise.
5314 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5315
5316 2013-10-27 Tobias Burnus <burnus@net-b.de>
5317
5318 PR other/33426
5319 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5320 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5321 (c_parser_statement_after_labels): Update calls.
5322
5323 2013-10-24 Tobias Burnus <burnus@net-b.de>
5324
5325 PR other/33426
5326 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5327 Handle PRAGMA_IVDEP.
5328 (c_parser_statement_after_labels): Update call.
5329
5330 2013-10-24 Marek Polacek <polacek@redhat.com>
5331
5332 * c-parser.c (c_parser_struct_declaration): Add a comment.
5333 (c_parser_declarator): Don't allow _Alignas here.
5334
5335 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
5336
5337 * c-parser.c: Include omp-low.h.
5338 * c-typeck.c: Likewise.
5339
5340 2013-10-17 Marek Polacek <polacek@redhat.com>
5341
5342 PR c/58267
5343 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5344 Document syntax of the array-declarator.
5345 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5346 are not permitted.
5347 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5348 (c_parser_struct_declaration): Likewise.
5349 (c_parser_declarator): Likewise.
5350 (c_parser_direct_declarator_inner): Likewise.
5351 (c_parser_parameter_declaration): Likewise.
5352 (c_parser_type_name): Likewise.
5353
5354 2013-10-11 Jakub Jelinek <jakub@redhat.com>
5355
5356 * c-lang.h (current_omp_declare_target_attribute): New extern
5357 decl.
5358 * c-parser.c: Include c-lang.h.
5359 (struct c_parser): Change tokens to c_token *.
5360 Add tokens_buf field. Change tokens_avail type to unsigned int.
5361 (c_parser_consume_token): If parser->tokens isn't
5362 &parser->tokens_buf[0], increment parser->tokens.
5363 (c_parser_consume_pragma): Likewise.
5364 (enum pragma_context): Add pragma_struct and pragma_param.
5365 (c_parser_external_declaration): Adjust
5366 c_parser_declaration_or_fndef caller.
5367 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5368 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5369 Adjust recursive call.
5370 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5371 of pragma_external.
5372 (c_parser_parameter_declaration): Use pragma_param instead of
5373 pragma_external.
5374 (c_parser_compound_statement_nostart, c_parser_label,
5375 c_parser_for_statement): Adjust
5376 c_parser_declaration_or_fndef callers.
5377 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5378 it through to c_parser_conditional_expression.
5379 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5380 pass it through to c_parser_binary_expression. Adjust recursive
5381 call.
5382 (c_parser_binary_expression): Remove prec argument, add
5383 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5384 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5385 binop matches it, use build2 instead of parser_build_binary_op.
5386 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5387 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5388 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5389 Handle pragma_struct and pragma_param the same as pragma_external.
5390 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5391 (c_parser_omp_variable_list): Parse array sections for
5392 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5393 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5394 (c_parser_omp_clause_reduction): Handle user defined reductions.
5395 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5396 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5397 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5398 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5399 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5400 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5401 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5402 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5403 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5404 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5405 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5406 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5407 (c_parser_omp_for_loop): Add CODE argument, pass it through
5408 to c_finish_omp_for. Change last argument to cclauses,
5409 and adjust uses to grab parallel clauses from the array of all
5410 the split clauses. Adjust c_parser_binary_expression,
5411 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5412 (omp_split_clauses): New function.
5413 (c_parser_omp_simd): New function.
5414 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5415 Allow the function to be called also when parsing combined constructs,
5416 and call c_parser_omp_simd when parsing for simd.
5417 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5418 #pragma omp section, require exactly one structured-block instead of
5419 sequence of statements.
5420 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5421 Allow the function to be called also when parsing combined constructs.
5422 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5423 Allow the function to be called also when parsing combined
5424 constructs.
5425 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5426 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5427 c_parser_omp_teams, c_parser_omp_target_data,
5428 c_parser_omp_target_update, c_parser_omp_target,
5429 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5430 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5431 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5432 (c_parser_omp_construct): Add p_name and mask vars. Handle
5433 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5434 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5435 and c_parser_omp_sections callers.
5436 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5437 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5438 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5439 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5440 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5441 OMP_CLAUSE_DEPEND.
5442 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5443 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5444 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5445 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5446 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5447 * c-typeck.c: Include tree-inline.h.
5448 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5449 handle_omp_array_sections_1, handle_omp_array_sections,
5450 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5451 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5452 user defined reductions.
5453 (c_tree_equal): New function.
5454 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5455 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5456 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5457 c_check_omp_declare_reduction_r): New prototypes.
5458 * c-decl.c (current_omp_declare_target_attribute): New variable.
5459 (c_decl_attributes): New function.
5460 (start_decl, start_function): Use it instead of decl_attributes.
5461 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5462 c_omp_reduction_decl, c_omp_reduction_lookup,
5463 c_check_omp_declare_reduction_r): New functions.
5464
5465 2013-09-25 Tom Tromey <tromey@redhat.com>
5466
5467 * Make-lang.in (c/gccspec.o): Remove.
5468 (CFLAGS-c/gccspec.o): New variable.
5469 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5470 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5471 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5472
5473 2013-09-25 Tom Tromey <tromey@redhat.com>
5474
5475 * Make-lang.in (c/gccspec.o): Don't use subshell.
5476
5477 2013-09-18 Marek Polacek <polacek@redhat.com>
5478
5479 PR sanitize/58443
5480 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5481 Remove unnecessary check.
5482
5483 2013-09-18 Marek Polacek <polacek@redhat.com>
5484
5485 PR sanitizer/58411
5486 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5487 no_sanitize_undefined attribute.
5488
5489 2013-09-13 Kai Tietz <ktietz@redhat.com>
5490
5491 PR target/57848
5492 * c-decl.c (c_builtin_function_ext_scope): Remove
5493 wrong assumption that it is never called on prexisting
5494 symbol.
5495
5496 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5497
5498 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5499
5500 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5501
5502 * c-objc-common.c (c_tree_printer): Tidy.
5503
5504 2013-08-30 Marek Polacek <polacek@redhat.com>
5505
5506 * c-typeck.c (build_binary_op): Add division by zero and shift
5507 instrumentation.
5508
5509 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5510 Joseph Myers <joseph@codesourcery.com>
5511
5512 PR c/35649
5513 * c-typeck.c (c_common_type): Prefer double_type_node over
5514 other REAL_TYPE types with the same precision.
5515 (convert_arguments): Likewise.
5516
5517 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5518
5519 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5520 (c_initialize_diagnostics): Call a destructor for the early printer.
5521
5522 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5523
5524 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5525 printer initialization.
5526
5527 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5528
5529 PR c/57490
5530 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5531 check for truth values.
5532 (expand_array_notation_exprs): Added truth values case. Removed an
5533 unwanted else. Added for-loop to walk through subtrees in default
5534 case.
5535
5536 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5537
5538 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5539
5540 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5541
5542 * c-parser.c (struct c_generic_association): Fix typo.
5543
5544 2013-07-23 Tom Tromey <tromey@redhat.com>
5545 Joseph Myers <joseph@codesourcery.com>
5546
5547 * c-parser.c (struct c_generic_association): New.
5548 (c_generic_association_d): New typedef.
5549 (c_parser_generic_selection): New function.
5550 (c_parser_postfix_expression): Handle RID_GENERIC.
5551
5552 2013-07-13 Jason Merrill <jason@redhat.com>
5553
5554 PR c++/57793
5555 * c-decl.c (finish_struct): Check for too-large class.
5556
5557 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5558
5559 PR c/57821
5560 * c-typeck.c (set_init_index): When folding, check for index overflow.
5561
5562 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5563
5564 * c-parser.c (c_parser_array_notation): Removed rejection of array
5565 notations in an array of function pointers.
5566
5567 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5568
5569 * c-array-notation.c (make_triplet_val_inv): New function.
5570 (create_cmp_incr): Likewise.
5571 (create_array_refs): Likewise.
5572 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5573 Also modularized common parts between functions and called the function.
5574 (build_array_notation_expr): Likewise.
5575 (fix_conditional_array_notations_1): Likewise.
5576 (fix_array_notation_expr): Likewise.
5577 (fix_array_notation_call_expr): Likewise.
5578
5579 2013-06-18 Marek Polacek <polacek@redhat.com>
5580
5581 PR c/57630
5582 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5583
5584 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5585
5586 * c-array-notation.c (build_array_notation_expr): Reject array notation
5587 mismatch between LHS and RHS even inside a call_expr. Also, removed
5588 a couple while statements that were dead code.
5589
5590 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5591
5592 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5593 excessive precision expressions in function parameters. Also removed
5594 couple unwanted while statements.
5595
5596 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5597
5598 * c-array-notation.c (expand_array_notation_exprs): Added
5599 ARRAY_NOTATION_REF case.
5600
5601 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5602
5603 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5604 function to c-family/array-notation-common.c.
5605 (is_cilkplus_reduce_builtin): Likewise.
5606 (find_rank): Likewise.
5607 (extract_array_notation_exprs): Likewise.
5608 (replace_array_notations): Likewise.
5609 (find_inv_trees): Likewise.
5610 (replace_inv_trees): Likewise.
5611 (contains_array_notation_expr): Likewise.
5612 (find_correct_array_notation_type): Likewise.
5613 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5614 (struct inv_list): Moved this to c-family/array-notation-common.c.
5615 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5616
5617 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5618
5619 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5620 reduction functions outside the for-loop. Added a check if the fundecl
5621 is non-NULL. Finally, removed an unwanted if-statement, and made the
5622 body unconditional.
5623
5624 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5625
5626 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5627 condition of the if-statement matches the rank of else-block and then-
5628 block when array notations are used.
5629 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5630 expression after the entire function body is parsed.
5631 (c_parser_expr_no_commas): Delayed creating array notation expressions
5632 to the end of function parsing.
5633 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5634 whole if-statement instead of just the condition.
5635 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5636
5637 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5638
5639 PR c/57474
5640 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5641 array to NULL_TREE if they are unused. Also added a check for the
5642 field to be NULL before its fields are used in future.
5643
5644 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5645
5646 PR bootstrap/57450
5647 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5648 (build_array_notation_expr): Likewise.
5649
5650 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5651
5652 * c-typeck.c (build_array_ref): Added a check to see if array's
5653 index is greater than one. If true, then emit an error.
5654 (build_function_call_vec): Exclude error reporting and checking
5655 for builtin array-notation functions.
5656 (convert_arguments): Likewise.
5657 (c_finish_return): Added a check for array notations as a return
5658 expression. If true, then emit an error.
5659 (c_finish_loop): Added a check for array notations in a loop
5660 condition. If true then emit an error.
5661 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5662 (build_binary_op): Added a check for array notation expr inside
5663 op1 and op0. If present, we call another function to find correct
5664 type.
5665 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5666 * c-parser.c (c_parser_compound_statement): Check if array
5667 notation code is used in tree, if so, then transform them into
5668 appropriate C code.
5669 (c_parser_expr_no_commas): Check if array notation is used in LHS
5670 or RHS, if so, then build array notation expression instead of
5671 regular modify.
5672 (c_parser_postfix_expression_after_primary): Added a check for
5673 colon(s) after square braces, if so then handle it like an array
5674 notation. Also, break up array notations in unary op if found.
5675 (c_parser_direct_declarator_inner): Added a check for array
5676 notation.
5677 (c_parser_compound_statement): Added a check for array notation in
5678 a stmt. If one is present, then expand array notation expr.
5679 (c_parser_if_statement): Likewise.
5680 (c_parser_switch_statement): Added a check for array notations in
5681 a switch statement's condition. If true, then output an error.
5682 (c_parser_while_statement): Similarly, but for a while.
5683 (c_parser_do_statement): Similarly, but for a do-while.
5684 (c_parser_for_statement): Similarly, but for a for-loop.
5685 (c_parser_unary_expression): Check if array notation is used in a
5686 pre-increment or pre-decrement expression. If true, then expand
5687 them.
5688 (c_parser_array_notation): New function.
5689 * c-array-notation.c: New file.
5690 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5691
5692 2013-05-23 Mike Stump <mikestump@comcast.net>
5693
5694 * c-typeck.c (convert_for_assignment): Handle references to memory
5695 spaces better.
5696
5697 2013-05-16 Jason Merrill <jason@redhat.com>
5698
5699 * Make-lang.in (cc1$(exeext)): Use link mutex.
5700
5701 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5702
5703 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5704 to simply use OPT_Wpointer_arith.
5705 (build_unary_op): Likewise.
5706
5707 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5708
5709 PR c/19449
5710 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5711 argument. If set, or it temporarily for parsing of the first
5712 argument into force_folding_builtin_constant_p.
5713 (c_parser_postfix_expression): Adjust callers.
5714
5715 2013-03-21 Richard Biener <rguenther@suse.de>
5716
5717 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5718 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5719
5720 2013-02-12 Marek Polacek <polacek@redhat.com>
5721
5722 PR c/44938
5723 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5724 origtypes to NULL.
5725
5726 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5727
5728 PR c/56078
5729 * c-typeck.c (set_nonincremental_init_from_string): If
5730 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5731 returned false.
5732 (process_init_element): Likewise.
5733
5734 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5735
5736 PR c++/55619
5737 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5738 argument, don't call default_function_array_conversion
5739 nor c_fully_fold here.
5740 (c_parser_asm_statement): Adjust callers.
5741 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5742 and outputs here, and call default_function_array_conversion
5743 on inputs that don't need to be addressable.
5744
5745 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5746
5747 PR c/39464
5748 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5749 warning require that both c_common_unsigned_type as well as
5750 c_common_signed_type is the same for both mvl and mvr types.
5751
5752 2012-11-16 Diego Novillo <dnovillo@google.com>
5753
5754 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5755
5756 * c-common.c: Use new vec API in vec.h.
5757 * c-common.h: Likewise.
5758 * c-gimplify.c: Likewise.
5759 * c-pragma.c: Likewise.
5760 * c-pretty-print.c: Likewise.
5761 * c-pretty-print.h: Likewise.
5762 * c-semantics.c: Likewise.
5763 * c-decl.c: Likewise.
5764 * c-parser.c: Likewise.
5765 * c-tree.h: Likewise.
5766 * c-typeck.c: Likewise.
5767
5768 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5769
5770 PR c++/54930
5771 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5772
5773 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5774
5775 PR c/53066
5776 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5777 shadows a function, unless the variable is a function or a
5778 pointer-to-function.
5779
5780 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5781
5782 PR c/54381
5783 * c-parser.c (struct c_tree_loc_pair): Removed.
5784 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5785 add location_t * and tree * arguments, fill in array of 3
5786 sizeof_arg trees and corresponding locs.
5787 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5788 c_parser_expr_list callers.
5789 (c_parser_postfix_expression_after_primary): Likewise. Pass
5790 array of 3 sizeof_arg trees and locs (corresponding to first
5791 3 arguments) to sizeof_pointer_memaccess_warning.
5792
5793 2012-10-09 Lawrence Crowl <crowl@google.com>
5794
5795 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5796 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5797 hash table.
5798
5799 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5800
5801 PR c++/54194
5802 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5803 call.
5804
5805 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5806
5807 PR c++/54427
5808 * c-typeck.c: Include c-common.h.
5809 (enum stv_conv): Moved to c-common.h.
5810 (scalar_to_vector): Moved to c-common.c.
5811 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5812 * Make-lang.in: c-typeck.c depends on c-common.h.
5813
5814 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5815
5816 * c-decl.c (c_write_global_declarations): Fix handling of
5817 -fdump-ada-spec*.
5818
5819 2012-09-30 Sharad Singhai <singhai@google.com>
5820
5821 * c-decl.c (c_write_global_declarations): Use a different method
5822 to determine if the dump has ben initialized.
5823
5824 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5825
5826 PR c/54552
5827 * c-typeck.c (c_cast_expr): When casting to a type requiring
5828 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5829 c_fully_fold first.
5830
5831 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5832
5833 PR c/54103
5834 * c-typeck.c (build_unary_op): Pass original argument of
5835 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5836 any C_MAYBE_CONST_EXPR, if it has integer operands.
5837 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5838 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5839 to c_objc_common_truthvalue_conversion, then remove any
5840 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5841 c_objc_common_truthvalue_conversion not
5842 c_common_truthvalue_conversion.
5843 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5844 call note_integer_operands for arguments with integer operands
5845 that are not integer constants.
5846
5847 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5848
5849 PR c/54559
5850 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5851 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5852
5853 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5854
5855 PR c/54428
5856 * c-convert.c (convert): Don't call fold_convert_loc if
5857 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5858 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5859 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5860
5861 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5862
5863 PR c/54355
5864 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5865 for nested and empty_ok arguments in the call to
5866 c_parser_declaration_or_fndef.
5867
5868 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5869
5870 * c-tree.h (c_last_sizeof_arg): Declare.
5871 * c-parser.c (struct c_tree_loc_pair): New type.
5872 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5873 non-NULL.
5874 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5875 (c_parser_postfix_expression_after_primary): Likewise. Call
5876 sizeof_pointer_memaccess_warning if needed.
5877 (sizeof_ptr_memacc_comptypes): New function.
5878 * c-typeck.c (c_last_sizeof_arg): New global variable.
5879 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5880
5881 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5882
5883 * c-lang.h (lang_decl): Add variable_size GTY option.
5884
5885 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5886
5887 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5888 * Make-lang.in: Fix dependencies.
5889
5890 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5891
5892 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5893 and add language Makefile hooks.
5894 * config-lang.in: New file.
5895 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5896 add the required "normal" config-lang.in rules.
5897 * c-lang.h: Moved from gcc/ to here.
5898 * c-tree.h: Likewise.
5899 * c-objc-common.c: Likewise.
5900 * c-objc-common.h: Likewise.
5901 * c-typeck.c: Likewise.
5902 * c-convert.c: Likewise.
5903 * c-lang.c: Likewise.
5904 * c-aux-info.c: Likewise.
5905 * c-errors.c: Likewise.
5906 * gccspec.c: Likewise.
5907 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5908 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5909 \f
5910 Copyright (C) 2012-2019 Free Software Foundation, Inc.
5911
5912 Copying and distribution of this file, with or without modification,
5913 are permitted in any medium without royalty provided the copyright
5914 notice and this notice are preserved.