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