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