]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
PR c++/87519 - bogus warning with -Wsign-conversion.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
8860d270
JJ
12019-08-08 Jakub Jelinek <jakub@redhat.com>
2
3 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
4 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
5 instead of generic_head to track duplicates.
6
398e3feb
JJ
72019-08-07 Jakub Jelinek <jakub@redhat.com>
8
9 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
10 (c_parser_omp_clause_use_device_addr): New function.
11 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
12 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
13 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
14 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
15 map or use_device_* clauses.
16 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
17 in OpenMP, require pointer type rather than pointer or array type.
18 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
19
a28351e7
JJ
202019-07-31 Jakub Jelinek <jakub@redhat.com>
21
22 PR c/91192
23 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
24 even if finish is UNKNOWN_LOCATION, just use start as finish in that
25 case.
26
6343b6bf
ML
272019-07-25 Martin Liska <mliska@suse.cz>
28 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
29
30 PR c++/23383
31 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
32
cb50701e
ML
332019-07-25 Martin Liska <mliska@suse.cz>
34
35 * c-decl.c (merge_decls): Use new macros
36 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
37
62e3e66f
RB
382019-07-23 Richard Biener <rguenther@suse.de>
39
40 PR tree-optimization/83518
41 * gimple-parser.c (c_parser_parse_gimple_body): When we have
42 a CFG also rebuild cgraph edges.
43
554a530f
JJ
442019-07-20 Jakub Jelinek <jakub@redhat.com>
45
46 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
47 (c_parser_omp_clause_bind): New function.
48 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
49 (OMP_LOOP_CLAUSE_MASK): Define.
50 (c_parser_omp_loop): New function.
51 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
52 loop combined with parallel or teams.
53 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
54 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
55
d119bf79
RS
562019-07-18 Richard Sandiford <richard.sandiford@arm.com>
57
58 PR c/53633
59 * c-decl.c (finish_function): Check targetm.warn_func_return
60 before issuing a -Wreturn-type warning.
61
fdc1f343
AO
622019-07-12 Alexandre Oliva <oliva@adacore.com>
63
64 * gimple-parser.c (c_parser_gimple_try_stmt): New.
65 (c_parser_compound_statement): Call it.
66
1fdd6f04
JJ
672019-07-12 Jakub Jelinek <jakub@redhat.com>
68
69 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
70 (c_parser_omp_clause_order): New function.
71 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
72 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
73 PRAGMA_OMP_CLAUSE_ORDER.
74 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
75
8389386c
RB
762019-07-10 Richard Biener <rguenther@suse.de>
77
78 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
79 _Literal (int *) &x for address literals.
80
99b1c316
MS
812019-07-09 Martin Sebor <msebor@redhat.com>
82
83 PR c++/61339
84 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
85 to class.
86 (field_decl_cmp): Same.
87 * c-parser.c (c_parser_struct_or_union_specifier): Same.
88 * c-tree.h: Same.
89 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
90
6c1dae73
MS
912019-07-09 Martin Sebor <msebor@redhat.com>
92
93 PR c++/61339
94 * c-decl.c: Change class-key from class to struct and vice versa
95 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
96 * gimple-parser.c: Same.
97
69b5279e
RB
982019-07-01 Richard Biener <rguenther@suse.de>
99
100 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
101 _Literal (char *) &"foo" for address literals pointing to
102 STRING_CSTs.
103
1e3d475e
MS
1042019-06-24 Martin Sebor <msebor@redhat.com>
105
106 * c-typeck.c (build_binary_op): Hyphenate floating-point.
107
bf38f7e9
JJ
1082019-06-10 Jakub Jelinek <jakub@redhat.com>
109
110 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
111 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
112 (c_parser_omp_scan_loop_body): New function.
113 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
114 inscan reduction clauses.
115 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
116 non-inscan reductions on the same construct, or inscan reductions with
117 ordered or schedule clauses, or inscan array reductions.
118
65985d78
MS
1192019-06-05 Martin Sebor <msebor@redhat.com>
120
121 PR c/90737
122 * c-typeck.c (c_finish_return): Only consider functions returning
123 pointers as candidates for -Wreturn-local-addr.
124
0ecf545c
MS
1252019-06-05 Martin Sebor <msebor@redhat.com>
126
127 * c-decl.c (start_decl): Adjust quoting and hyphenation
128 in diagnostics.
129 (finish_decl): Same.
130 (finish_enum): Same.
131 (start_function): Same.
132 (declspecs_add_type): Same.
133 * c-parser.c (warn_for_abs): Same.
134 * c-typeck.c (build_binary_op): Same.
135
e03436e7
TS
1362019-05-17 Thomas Schwinge <thomas@codesourcery.com>
137
b48f44bf
TS
138 PR c/89433
139 * c-parser.c (c_finish_oacc_routine): Rework checking if already
140 marked with an OpenACC 'routine' directive.
141
5bf04509
TS
142 PR c/89433
143 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
144 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
145
e03436e7
TS
146 PR c/89433
147 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
148 clauses from "omp declare target" attribute.
149
a9c697b8
MS
1502019-05-16 Martin Sebor <msebor@redhat.com>
151
152 * c-decl.c (start_decl): Quote keywords, operators, and
153 types in diagnostics.
154 (finish_decl): Same.
155 * c-parser.c (c_parser_asm_statement): Same.
156 (c_parser_conditional_expression): Same.
157 (c_parser_transaction_cancel): Same.
158 * c-typeck.c (c_common_type): Same.
159 (build_conditional_expr): Same.
160 (digest_init): Same.
161 (process_init_element): Same.
162 (build_binary_op): Same.
163
c4499192
RB
1642019-05-17 Richard Biener <rguenther@suse.de>
165
166 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
167 (c_parser_gimple_unary_expression): Likewise.
168 (c_parser_gimple_parentized_ternary_expression): New function.
169
adfe6e4b
RB
1702019-05-16 Richard Biener <rguenther@suse.de>
171
172 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
173 (c_parser_gimple_unary_expression): Likewise.
174
186dabf2
RB
1752019-05-15 Richard Biener <rguenther@suse.de>
176
177 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
178 __BIT_FIELD_REF.
179
1158c5b4
RB
1802019-05-14 Richard Biener <rguenther@suse.de>
181
182 * gimple-parser.c (c_parser_gimple_statement): Remove
183 questionable auto-promotion to VIEW_CONVERT_EXPR.
184 (c_parser_gimple_typespec): Split out from __MEM parsing.
185 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
186 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
187 as __VIEW_CONVERT with -gimple.
188
fd4485aa
ML
1892019-05-09 Martin Liska <mliska@suse.cz>
190
191 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
192 __MAX.
193 (c_parser_gimple_unary_expression): Parse also binary expression
194 __MIN and __MAX.
195 (c_parser_gimple_parentized_binary_expression): New function.
196
d276406a
ML
1972019-05-09 Martin Liska <mliska@suse.cz>
198
199 * gimple-parser.c (struct gimple_parser): Add probability.
200 for gimple_parser_edge.
201 (gimple_parser::push_edge): Add new argument probability.
202 (c_parser_gimple_parse_bb_spec): Parse also probability
203 if present.
204 (c_parser_parse_gimple_body): Set edge probability.
205 (c_parser_gimple_compound_statement): Consume token
206 before calling c_parser_gimple_goto_stmt.
207 Parse BB counts.
208 (c_parser_gimple_statement): Pass new argument.
209 (c_parser_gimple_goto_stmt): Likewise.
210 (c_parser_gimple_if_stmt): Likewise.
211 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
212 * c-parser.c (c_parser_declaration_or_fndef): Pass
213 hot_bb_threshold argument.
214 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
215 field.
216 (c_parser_gimple_parse_bb_spec_edge_probability): New.
217
f179b64e
JJ
2182019-04-26 Jakub Jelinek <jakub@redhat.com>
219
220 PR debug/90197
221 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
222 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
223 (c_parser_do_statement): Likewise.
224 (c_parser_for_statement): Likewise. Formatting fixes.
225 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
226 emit DEBUG_BEGIN_STMTs if needed.
227
e7178413
JJ
2282019-04-19 Jakub Jelinek <jakub@redhat.com>
229
c280b7ee
JJ
230 PR c/89888
231 * c-typeck.c (struct c_switch): Remove outside_range_p member.
232 (c_start_case): Don't clear it.
233 (do_case): Adjust c_add_case_label caller.
234 (c_finish_case): Adjust c_do_switch_warnings caller.
235
e7178413
JJ
236 PR c++/90108
237 * c-decl.c (merge_decls): If remove is main variant and
238 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
239 variant that has newdecl as TYPE_NAME if any.
240
60a2c645
JJ
2412019-04-12 Jakub Jelinek <jakub@redhat.com>
242
243 PR c/89933
244 * c-decl.c (merge_decls): When newdecl's type is its main variant,
245 don't try to remove it from the variant list, but instead assert
246 it has no variants.
247
2a82beaa
RB
2482019-04-01 Richard Biener <rguenther@suse.de>
249
250 PR c/71598
251 * c-tree.h (c_get_alias_set): Declare.
252 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
253 * c-objc-common.c (c_get_alias_set): Treat enumeral types
254 as the underlying integer type.
255
bec1da64
MS
2562019-03-19 Martin Sebor <msebor@redhat.com>
257
258 PR tree-optimization/89688
259 * c-decl.c (finish_decl): Call braced_lists_to_string for more
260 kinds of initializers.
261
855cd9b1
JJ
2622019-03-19 Jakub Jelinek <jakub@redhat.com>
263
264 PR c/89734
265 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
266 return type even if quals_used is 0. Formatting fixes.
267
baa09dc5
RB
2682019-03-14 Richard Biener <rguenther@suse.de>
269
270 * c-tree.h (enum c_declspec_il): New.
271 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
272 enum bitfield.
273 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
274 Pass start pass and declspec_il to c_parser_parse_gimple_body.
275 (c_parser_declspecs): Adjust.
276 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
277 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
278 and bitmap.h.
279 (struct gimple_parser): New.
280 (gimple_parser::push_edge): New method.
281 (c_parser_gimple_parse_bb_spec): New helper.
282 (c_parser_parse_gimple_body): Get start pass and IL specification.
283 Initialize SSA and CFG.
284 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
285 Build a gimple_parser parsing state and pass it along.
286 (c_parser_gimple_statement): Change intermittend __PHI internal
287 function argument for the edge.
288 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
289 (c_parser_gimple_goto_stmt): Record edges to build.
290 (c_parser_gimple_if_stmt): Likewise.
291 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
292 (c_parser_gimple_or_rtl_pass_list): Likewise.
293
a3f9f006
ML
2942019-03-11 Martin Liska <mliska@suse.cz>
295
296 * c-decl.c (check_for_loop_decls): Wrap an option name
297 in a string format message and fix GNU coding style.
298 * c-parser.c (c_parser_declspecs): Likewise.
299
1db01ff9
JJ
3002019-03-08 Jakub Jelinek <jakub@redhat.com>
301
302 PR tree-optimization/89550
303 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
304 returned true.
305 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
306 or warning returned true.
307
66dcb747
JJ
3082019-02-28 Jakub Jelinek <jakub@redhat.com>
309
310 PR c/89525
311 * c-typeck.c (convert_arguments): Call inform_declaration only if
312 the previous warning_at call returned true.
313
2263c9f2
TS
3142019-02-22 Thomas Schwinge <thomas@codesourcery.com>
315
316 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
317 parameter. Adjust all users.
318 (c_parser_oacc_simple_clause): Replace parser with loc formal
319 parameter. Adjust all users.
320
19695f4d
CLT
3212019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
322
323 PR c/87924
324 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
325 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
326
5f88ba10
JJ
3272019-02-15 Jakub Jelinek <jakub@redhat.com>
328
329 PR c/89340
330 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
331 before c_decl_attributes rather than after it.
332
cfc30fd1
JJ
3332019-02-06 Jakub Jelinek <jakub@redhat.com>
334
335 PR c/89211
336 * c-parser.c (c_parser_declaration_or_fndef): Don't update
337 DECL_ARGUMENTS of d if it has been defined already. Use a single if
338 instead of 3 nested ifs.
339
fbe83e6b
JM
3402019-02-06 Joseph Myers <joseph@codesourcery.com>
341
342 PR c/88584
343 * c-decl.c (finish_decl): Do not complete array types for arrays
344 with external linkage not at file scope.
345
f461f938
RB
3462019-02-05 Richard Biener <rguenther@suse.de>
347
348 PR c/88606
349 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
350 all type variants when not supported.
351
fe509359
JJ
3522019-01-30 Jakub Jelinek <jakub@redhat.com>
353
354 PR c/89061
355 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
356 * c-decl.c (decl_jump_unsafe): Return false for
357 C_DECL_COMPOUND_LITERAL_P decls.
358 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
359
6a335b96
JJ
3602019-01-29 Jakub Jelinek <jakub@redhat.com>
361
f4b7e754
JJ
362 PR c/89045
363 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
364 scope.
365
6a335b96
JJ
366 PR c/86125
367 * c-decl.c (last_fileptr_type): Remove.
368 (last_structptr_types): New variable.
369 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
370 {old,new}rettype instead of the types themselves. Assert
371 last_structptr_types array has the same number of elements
372 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
373 argument oldtype and newtype. Instead of handling
374 just fileptr_type_node specially, handle all builtin_structptr_types
375 pointer nodes. Formatting fix.
376
d8b5a1a0
MS
3772019-01-24 Martin Sebor <msebor@redhat.com>
378
379 PR c/86125
380 PR c/88886
381 PR middle-end/86308
382 * c-decl.c (match_builtin_function_types): Add arguments.
383 (diagnose_mismatched_decls): Diagnose mismatched declarations
384 of built-ins more strictly.
385
e21c4491
JJ
3862019-01-24 Jakub Jelinek <jakub@redhat.com>
387
388 PR c++/88976
389 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
390 on #pragma omp cancel with different modifiers.
391
420183d9
L
3922019-01-18 H.J. Lu <hongjiu.lu@intel.com>
393
394 PR c/51628
395 PR c/88664
396 * c-typeck.c (convert_for_assignment): Upate the
397 warn_for_address_or_pointer_of_packed_member call.
398
17ad43dd
TH
3992019-01-16 Tom Honermann <tom@honermann.net>
400 Jason Merrill <jason@redhat.com>
401
402 * c-typeck.c (digest_init): Revised the error message produced for
403 ill-formed cases of array initialization with a string literal.
404 (error_init): Make variadic.
405
5f07d78a
JJ
4062019-01-12 Jakub Jelinek <jakub@redhat.com>
407
408 * c-typeck.c (convert_for_assignment): Fix a comment typo.
409
c4581bbf
JJ
4102019-01-07 Jakub Jelinek <jakub@redhat.com>
411
412 PR c/88701
413 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
414 if current_function_decl is non-NULL.
415
65c5b1eb
JM
4162019-01-07 Joseph Myers <joseph@codesourcery.com>
417
418 PR c/88720
419 PR c/88726
420 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
421 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
422 functions declared but never defined only for external scope, not
423 for other scopes.
424
d8fcab68
JJ
4252019-01-07 Jakub Jelinek <jakub@redhat.com>
426
427 PR c++/85052
428 * c-parser.c (c_parser_postfix_expression): Parse
429 __builtin_convertvector.
430
a5544970
JJ
4312019-01-01 Jakub Jelinek <jakub@redhat.com>
432
433 Update copyright years.
434
da77eace
L
4352018-12-20 H.J. Lu <hongjiu.lu@intel.com>
436
437 PR c/51628
438 * c-typeck.c (convert_for_assignment): Call
439 warn_for_address_or_pointer_of_packed_member.
440
1edf8866
SB
4412018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
442
443 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
444 a more specific error message (instead of just falling through).
445
db4fd626
SB
4462018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
447
448 * c-parser.c (c_parser_asm_statement): Keep track of the location each
449 asm qualifier is first seen; use that to give nicer "duplicate asm
450 qualifier" messages. Delete 'quals" variable, instead pass the
451 "is_volatile_ flag to build_asm_stmt directly.
452 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
453 * c-typeck.c (build_asm_stmt): Ditto; adjust.
454
9c9cfcbb
SB
4552018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
456
457 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
458 "done" boolean variable.
459
a14feb3c
DM
4602018-12-19 David Malcolm <dmalcolm@redhat.com>
461
462 PR c++/87504
463 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
464 Move from here to gcc-rich-location.h and gcc-rich-location.c.
465 (build_binary_op): Use struct op_location_t and
466 class binary_op_rich_location.
467
6d939173
JJ
4682018-12-11 Jakub Jelinek <jakub@redhat.com>
469
470 PR sanitizer/88426
471 * c-convert.c (convert): Call c_fully_fold before calling
472 ubsan_instrument_float_cast.
473
b7055028
SB
4742018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
475
476 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
477 setting "quals".
478
5b76e75f
SB
4792018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
480
481 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
482 after asm. Pass a flag for it to build_asm_expr.
483 * c-tree.h (build_asm_expr): Update declaration.
484 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
485 set ASM_INLINE_P.
486
30bd42b9
SB
4872018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
488
489 PR inline-asm/55681
490 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
491 combination of volatile and goto, in any order, without repetitions.
492
9df6c0e4
JB
4932018-12-04 James Norris <jnorris@codesourcery.com>
494 Cesar Philippidis <cesar@codesourcery.com>
495 Julian Brown <julian@codesourcery.com>
496
497 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
498 code.
499
f44697b7
RB
5002018-11-30 Richard Biener <rguenther@suse.de>
501
502 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
503 _Literal (type) { ... } as empty aggregate or vector constructor.
504
550dfbdc
MS
5052018-11-29 Martin Sebor <msebor@redhat.com>
506
507 PR c/88091
508 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
509 (convert_arguments): Add comments. Pass additional argument to
510 the function above.
511
673670da
MS
5122018-11-29 Martin Sebor <msebor@redhat.com>
513
514 PR c/88172
515 PR testsuite/88208
516 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
517
db1d09b0
MS
5182018-11-23 Martin Sebor <msebor@redhat.com>
519
520 PR testsuite/88098
521 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
522 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
523
98f08eb8
MS
5242018-11-20 Martin Sebor <msebor@redhat.com>
525
526 * c-parser.c (c_parser_has_attribute_expression): New function.
527 (c_parser_attribute): New function.
528 (c_parser_attributes): Move code into c_parser_attribute.
529 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
530
cd5da983
MS
5312018-11-15 Martin Sebor <msebor@redhat.com>
532
533 PR c/83656
534 * c-decl.c (header_for_builtin_fn): Declare.
535 (diagnose_mismatched_decls): Diagnose declarations of built-in
536 functions without a prototype.
537 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
538 (convert_argument): Same.
539 (convert_arguments): Factor code out into convert_argument.
540 Detect mismatches between built-in formal arguments in calls
541 to built-in without prototype.
542 (build_conditional_expr): Same.
543 (type_or_builtin_type): New function.
544 (convert_for_assignment): Add argument. Conditionally issue
545 warnings instead of errors for mismatches.
546
620e594b
DM
5472018-11-13 David Malcolm <dmalcolm@redhat.com>
548
549 * c-decl.c: Replace "source_location" with "location_t".
550 * c-tree.h: Likewise.
551 * c-typeck.c: Likewise.
552 * gimple-parser.c: Likewise.
553
3179ebae
JJ
5542018-11-09 Jakub Jelinek <jakub@redhat.com>
555
81a227c6
JJ
556 * c-parser.c (c_parser_omp_clause_final): Use
557 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
558 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
559 parsing instead of c_parser_paren_condition.
560 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
561 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
562 c_fully_fold instead of c_parser_condition.
563 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
564 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
565 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
566 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
567 c_parser_expr_no_commas instead of c_parser_expression.
568
98c91c56
JJ
569 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
570 reduction clause with inscan modifier.
571
3179ebae
JJ
572 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
573 clauses other than atomic_default_mem_order.
574
28567c40
JJ
5752018-11-08 Jakub Jelinek <jakub@redhat.com>
576
577 * c-parser.c: Include memmode.h.
578 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
579 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
580 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
581 task_reduction clauses.
582 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
583 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
584 section, or lvalue assignment expression.
585 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
586 (c_parser_omp_clause_lastprivate): Parse optional
587 conditional: modifier.
588 (c_parser_omp_clause_hint): Require constant integer expression rather
589 than just integer expression.
590 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
591 clause.
592 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
593 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
594 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
595 functions.
596 (c_parser_omp_clause_depend): Parse iterator modifier and handle
597 iterators. Parse mutexinoutset and depobj kinds.
598 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
599 callers.
600 (c_parser_omp_all_clauses): Likewise. Handle
601 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
602 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
603 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
604 default memory order from requires directive if any. Adjust
605 c_finish_omp_atomic caller.
606 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
607 (c_parser_omp_flush): Parse flush with memory-order-clause.
608 (c_parser_omp_for_loop): Allow NE_EXPR even in
609 OpenMP loops, adjust c_finish_omp_for caller.
610 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
611 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
612 Allow to be called while parsing combined parallel master.
613 Parse combined master taskloop{, simd}.
614 (c_parser_omp_parallel): Parse combined
615 parallel master{, taskloop{, simd}} constructs.
616 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
617 (OMP_TASKGROUP_CLAUSE_MASK): Define.
618 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
619 (OMP_TASKWAIT_CLAUSE_MASK): Define.
620 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
621 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
622 around teams body. Use SET_EXPR_LOCATION.
623 (c_parser_omp_target_data): Allow target data
624 with only use_device_ptr clauses.
625 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
626 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
627 (c_parser_omp_requires): New function.
628 (c_finish_taskloop_clauses): New function.
629 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
630 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
631 declaration. Disallow in_reduction clause when combined with parallel
632 master.
633 (c_parser_omp_construct): Adjust c_parser_omp_master and
634 c_parser_omp_taskgroup callers.
635 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
636 other than cancel.
637 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
638 like OMP_CLAUSE_REDUCTION.
639 (handle_omp_array_sections): Likewise. Call save_expr on array
640 reductions before calling build_index_type. Handle depend clauses
641 with iterators.
642 (struct c_find_omp_var_s): New type.
643 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
644 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
645 with static, runtime or auto schedule kinds. Call save_expr for whole
646 array reduction sizes. Diagnose reductions with zero sized elements
647 or variable length structures. Diagnose nogroup clause used with
648 reduction clause(s). Handle depend clause with
649 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
650 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
651 some different type for other kinds. Use build_unary_op with
652 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
653 Handle depend clauses with iterators. Remove no longer needed special
654 case that predetermined const qualified vars may be specified in
655 firstprivate clause. Complain if const qualified vars are mentioned
656 in data-sharing clauses other than firstprivate or shared. Use
657 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
658 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
659 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
660 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
661
7e2de6df
DM
6622018-10-29 David Malcolm <dmalcolm@redhat.com>
663
664 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
665 logic for change to name_hint::operator bool.
666 (undeclared_variable): Likewise.
667 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
668 (c_parser_parameter_declaration): Likewise.
669
9f936c86
JM
6702018-10-17 Joseph Myers <joseph@codesourcery.com>
671
672 * c-errors.c (pedwarn_c11): New function.
673 * c-parser.c (disable_extension_diagnostics): Save
674 warn_c11_c2x_compat and set it to 0.
675 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
676 (c_parser_static_assert_declaration_no_semi): Handle
677 _Static_assert without string constant.
678 * c-tree.h (pedwarn_c11): New prototype.
679
033eb567
DM
6802018-10-17 David Malcolm <dmalcolm@redhat.com>
681
682 * Make-lang.in (selftest-c): New.
683 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
684 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
685 from gcc/Makefile.in.
686
0edf3afe
RB
6872018-10-02 Richard Biener <rguenther@suse.de>
688
689 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
690
8313a764
JM
6912018-09-26 Joseph Myers <joseph@codesourcery.com>
692
693 PR c/87390
694 * c-typeck.c (build_binary_op): Use excess precision for
695 comparisons of integers and floating-point for C11 and later.
696
ce6f0888
MJ
6972018-09-26 Martin Jambor <mjambor@suse.cz>
698
699 PR c/87347
700 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
701 comment.
702
9c4a4b3c
DM
7032018-09-17 David Malcolm <dmalcolm@redhat.com>
704
705 * c-objc-common.c (range_label_for_type_mismatch::get_text):
706 Update for new param.
707 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
708 Likewise.
709
80c6d1f4
MJ
7102018-09-17 Martin Jambor <mjambor@suse.cz>
711
712 PR c/63886
713 * c-parser.c: (warn_for_abs): New function.
714 (c_parser_postfix_expression_after_primary): Call it.
715
4a426e36
BE
7162018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
717
718 * c-typeck.c (digest_init): Shorten overlength strings.
719
6d900107
BE
7202018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
721
722 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
723
b5764229
BE
7242018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
725
726 * c-decl.c (finish_decl): Call braced_list_to_string here ...
727 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
728
22eea6b2
AM
7292018-08-30 Alexander Monakov <amonakov@ispras.ru>
730
731 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
732 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
733
85204e23
DM
7342018-08-27 David Malcolm <dmalcolm@redhat.com>
735
736 PR 87091
737 * c-decl.c (implicitly_declare): Update call to
738 maybe_add_include_fixit to suggest overriding the location, as it
739 is for a note.
740 * c-objc-common.c (c_tree_printer): Update for conversion of
741 show_caret_p to a tri-state.
742
3d78e008
ML
7432018-08-27 Martin Liska <mliska@suse.cz>
744
745 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
746 fndecl_built_in_p and remove check for FUNCTION_DECL if
747 possible.
3d78e008
ML
748 (diagnose_mismatched_decls): Likewise.
749 (merge_decls): Likewise.
750 (warn_if_shadowing): Likewise.
751 (pushdecl): Likewise.
752 (implicitly_declare): Likewise.
753 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
754 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
755 * c-typeck.c (build_function_call_vec): Likewise.
756 (convert_arguments): Likewise.
757
097f82ec
DM
7582018-08-20 David Malcolm <dmalcolm@redhat.com>
759
760 PR other/84889
761 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
762 (diagnose_mismatched_decls): Likewise, in various places.
763 (warn_if_shadowing): Likewise.
764 (implicit_decl_warning): Likewise.
765 (implicitly_declare): Likewise.
766 (undeclared_variable): Likewise.
767 (declare_label): Likewise.
768 (grokdeclarator): Likewise.
769 (start_function): Likewise.
770 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
771 (c_parser_parameter_declaration): Likewise.
772 (c_parser_binary_expression): Likewise.
773 * c-typeck.c (c_expr_sizeof_expr): Likewise.
774 (parser_build_binary_op): Likewise.
775 (build_unary_op): Likewise.
776 (error_init): Likewise.
777 (pedwarn_init): Likewise.
778 (warning_init): Likewise.
779 (convert_for_assignment): Likewise.
780
96e6ae57
DM
7812018-08-15 David Malcolm <dmalcolm@redhat.com>
782
783 * c-objc-common.c: Include "gcc-rich-location.h".
784 (c_tree_printer): Move implemenation of '%T' to...
785 (print_type): ...this new function.
786 (range_label_for_type_mismatch::get_text): New function.
787 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
788 range for the various ic_argpass cases.
789 (class maybe_range_label_for_tree_type_mismatch): New class.
790 (build_binary_op): Use it when calling binary_op_error.
791
0cd020ae
PK
7922018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
793
794 * c-decl.c (start_decl): Do not warn if variables is named as main
795 and is a local variable.
796
72733314
IS
7972018-08-15 Iain Sandoe <iain@sandoe.co.uk>
798
799 PR c/19315
800 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
801 objects of unknown size.
802
23aa9f7c
MS
8032018-08-13 Martin Sebor <msebor@redhat.com>
804
805 PR tree-optimization/71625
806 * c-parser.c (c_parser_declaration_or_fndef): Call
807 braced_list_to_string.
808
e5e7e50d
BH
8092018-08-03 Bogdan Harjoc <harjoc@gmail.com>
810
811 PR c/86690
812 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
813 errors.
814
8a45b051
MS
8152018-08-01 Martin Sebor <msebor@redhat.com>
816
817 PR tree-optimization/86650
818 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
819 and TREE_BLOCK (t) from within percent_K_format to this callsite.
820
5922dcb5
JJ
8212018-08-01 Jakub Jelinek <jakub@redhat.com>
822
823 PR c/85704
824 * c-typeck.c (init_field_decl_cmp): New function.
825 (output_pending_init_elements): Use it for field comparisons
826 instead of pure bit_position comparisons.
827
9b452033
JJ
8282018-07-12 Jakub Jelinek <jakub@redhat.com>
829
830 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
831 type here, instead add "omp declare target implicit" attribute.
832 (finish_decl): Diagnose vars without mappable type here.
833
829c6349
CLT
8342018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
835 Thomas Schwinge <thomas@codesourcery.com>
836 Cesar Philippidis <cesar@codesourcery.com>
837
838 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
839 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
840 to their non-present_or_* counterparts. Make 'self' an alias to
841 PRAGMA_OACC_CLAUSE_HOST.
842 (c_parser_oacc_data_clause): Update GOMP mappings for
843 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
844 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
845 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
846 Remove support for present_or_* clauses.
847 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
848 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
849 (OACC_DECLARE_CLAUSE_MASK): Likewise.
850 (OACC_DATA_CLAUSE_MASK): Likewise.
851 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
852 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
853 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
854 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
855 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
856
e197e64e
KV
8572018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
858
859 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
860 * gimple-parser.c (c_parser_gimple_statement): Likewise.
861 (c_parser_gimple_unary_expression): Likewise.
862
487f2f61
JJ
8632018-06-15 Jakub Jelinek <jakub@redhat.com>
864
865 PR c/86093
866 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
867 before doing POINTER_DIFF_EXPR.
868
e4d44a37
MP
8692018-06-07 Marek Polacek <polacek@redhat.com>
870
871 PR c/85318
872 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
873 for loop initial declarations.
874
b67b9225
DP
8752018-05-30 David Pagan <dave.pagan@oracle.com>
876
877 PR c/55976
878 * c-decl.c (grokdeclarator): Update check for return type warnings.
879 (start_function): Likewise.
880 (finish_function): Likewise.
881 * c-typeck.c (c_finish_return): Update check for return type warnings.
882 Pass OPT_Wreturn_type to pedwarn when appropriate.
883
c566cc9f
RS
8842018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
885
886 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
887 __FMA_EXPR handlng.
888
e4f81565
RS
8892018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
890
891 * gimple-parser.c: Include internal-fn.h.
892 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
893 (c_parser_gimple_call_internal): New function.
894 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
895 Fix typos in comment.
896
79e7b1fe
JJ
8972018-05-10 Jakub Jelinek <jakub@redhat.com>
898
899 PR c++/85662
900 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
901 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
902 fold_convert_loc.
903 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
904 fold_offsetof_1, pass argtype as TYPE to it and drop the
905 fold_convert_loc.
906
f7584c81
DP
9072018-05-02 David Pagan <dave.pagan@oracle.com>
908
909 PR c/30552
910 * c-decl.c (old_style_parameter_scope): New function.
911 * c-parser.c (c_parser_postfix_expression): Check for statement
912 expressions in old-style function parameter list declarations.
913 * c-parser.h (old_style_parameter_scope): New extern declaration.
914
b33a0cb3
JJ
9152018-04-25 Jakub Jelinek <jakub@redhat.com>
916
917 PR sanitizer/84307
918 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
919 it is not TREE_STATIC.
920 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
921 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
922 its COMPOUND_LITERAL_EXPR_DECL.
923
c5c5822a
JM
9242018-03-21 Joseph Myers <joseph@codesourcery.com>
925
926 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
927 where all functions return the same _FloatN or _FloatNx type,
928 treat integer types as _Float64 instead of double.
929
aa1c9429
JJ
9302018-03-21 Jakub Jelinek <jakub@redhat.com>
931
932 PR c/84999
933 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
934 building vector comparison, diagnose it and return error_mark_node.
935
9bb45a95
JJ
9362018-03-15 Jakub Jelinek <jakub@redhat.com>
937
938 PR c/84853
939 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
940 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
941 INTEGER_TYPE element type.
942
ada6bad9
DP
9432018-03-13 David Pagan <dave.pagan@oracle.com>
944
945 PR c/46921
946 * c-typeck.c (output_init_element): Ensure field initializer
947 expression is always evaluated if there are side effects.
948
849bbdb9
JJ
9492018-03-06 Jakub Jelinek <jakub@redhat.com>
950
951 PR c/84721
952 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
953 !building_stmt_list_p ().
954
d74641bd
RS
9552018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
956
957 PR c/84305
958 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
959 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
960 and include the BIND_EXPR in the list of things that need to be
961 pre-evaluated.
962
0444aa9c
NS
9632018-02-09 Nathan Sidwell <nathan@acm.org>
964
965 PR c/84293
966 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
967 to strict_aliasing_warning.
968
7c30b12a
PC
9692018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
970
971 * c-typeck.c (really_start_incremental_init, push_init_level,
972 set_nonincremental_init, output_init_element, process_init_element):
973 Use DECL_UNNAMED_BIT_FIELD.
974
2be4dfcb
MP
9752018-01-31 Marek Polacek <polacek@redhat.com>
976
977 PR c/81779
978 * c-parser.c (c_parser_compound_statement_nostart): Call
979 expansion_point_location_if_in_system_header.
980
bb9869d5
DM
9812018-01-17 David Malcolm <dmalcolm@redhat.com>
982
983 PR c++/83814
984 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
985 the C part.
986
b4923738
JJ
9872018-01-13 Jakub Jelinek <jakub@redhat.com>
988
989 PR c/83801
990 * c-tree.h (decl_constant_value_1): Add a bool argument.
991 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
992 returning a CONSTRUCTOR if it is true. Use error_operand_p.
993 (decl_constant_value): Adjust caller.
994 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
995 decl_constant_value_1 as IN_INIT. Otherwise, punt if
996 decl_constant_value returns initializer that has BLKmode or
997 array type.
998 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
999
928686b1
RS
10002018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1001 Alan Hayward <alan.hayward@arm.com>
1002 David Sherwood <david.sherwood@arm.com>
1003
1004 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1005 TYPE_VECTOR_SUBPARTS.
1006
85ec4feb
JJ
10072018-01-03 Jakub Jelinek <jakub@redhat.com>
1008
1009 Update copyright years.
1010
913884f7
JJ
10112018-01-01 Jakub Jelinek <jakub@redhat.com>
1012
1013 PR c/83595
1014 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1015 c_parser_conditional_expression, c_parser_cast_expression,
1016 c_parser_sizeof_expression, c_parser_alignof_expression,
1017 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1018 c_parser_transaction_expression): Use set_error () method instead
1019 of setting value member to error_mark_node.
1020
c6cfa2bf
MM
10212017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1022
1023 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1024 and _Float<N>X built-in functions.
1025
11d29d63
JJ
10262017-12-22 Jakub Jelinek <jakub@redhat.com>
1027
14ec014e
JJ
1028 PR debug/83550
1029 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1030 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1031 incomplete vars rather than after it.
1032
11d29d63
JJ
1033 PR debug/83547
1034 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1035 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1036 and consider empty ones if there are no other stmts. For
1037 -Wunused-value walk all statements before the one only followed by
1038 DEBUG_BEGIN_STMTs.
1039
170a8bd6 10402017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1041 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1042
1043 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1044 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1045 (c_parser_do_statement): Likewise.
1046 (c_parser_for_statement): Likewise.
1047 (c_parser_statement_after_labels): Adjust calls to above.
1048 (c_parse_pragma_ivdep): New static function.
1049 (c_parser_pragma_unroll): Likewise.
1050 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1051 <PRAGMA_UNROLL>: New case.
1052
01512446
JJ
10532017-12-19 Jakub Jelinek <jakub@redhat.com>
1054
1055 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1056 perform_integral_promotions, digest_init): Replace Yoda conditions
1057 with typical order conditions.
1058 * c-decl.c (check_bitfield_type_and_width): Likewise.
1059
c65e18d3
BE
10602017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1061
1062 * c-typeck.c (c_safe_arg_type_equiv_p,
1063 c_safe_function_type_cast_p): New function.
1064 (build_c_cast): Implement -Wcast-function-type.
1065
b7280579
RB
10662017-12-14 Richard Biener <rguenther@suse.de>
1067
1068 PR c/83415
1069 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1070 like REALPART_EXPR for the behavior of whether its operand
1071 is an lvalue.
1072
49e6a6c0
MP
10732017-12-12 Marek Polacek <polacek@redhat.com>
1074
1075 PR c/82679
1076 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1077
96a95ac1
AO
10782017-12-12 Alexandre Oliva <aoliva@redhat.com>
1079
1080 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1081 * c-parser.c (add_debug_begin_stmt): New.
1082 (c_parser_declaration_or_fndef): Call it.
1083 (c_parser_compound_statement_nostart): Likewise.
1084 (c_parser_statement_after_labels): Likewise.
1085 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1086
4b2b493f
JM
10872017-12-07 Joseph Myers <joseph@codesourcery.com>
1088
1089 * c-decl.c (build_compound_literal): Add parameter alignas_align
1090 and set alignment of decl if nonzero.
1091 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1092 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1093 qualifier.
1094 (c_parser_struct_declaration): Update syntax comment.
1095 (c_parser_type_name): Add alignas_ok argument and pass it to
1096 c_parser_declspecs.
1097 (c_parser_cast_expression): Pass true to c_parser_type_name and
1098 give error if a cast used an _Alignas specifier.
1099 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1100 give error if sizeof (type-name) used an _Alignas specifier.
1101 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1102 give error if _Alignof (type-name) used an _Alignas specifier.
1103 (c_parser_postfix_expression_after_paren_type): Check specified
1104 alignment for a compound literal and pass it to
1105 build_compound_literal.
1106 * c-parser.h (c_parser_type_name): Update prototype.
1107 * c-tree.h (build_compound_literal): Update prototype.
1108
5d9ae53d
MS
11092017-12-07 Martin Sebor <msebor@redhat.com>
1110
1111 PR c/81544
1112 * c-decl.c (c_decl_attributes): Look up existing declaration and
1113 pass it to decl_attributes.
1114
c79144f8
DM
11152017-12-06 David Malcolm <dmalcolm@redhat.com>
1116
1117 PR c/83236
1118 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1119 reserved for use by the implementation.
1120
613bc14f
DM
11212017-12-06 David Malcolm <dmalcolm@redhat.com>
1122
1123 * c-decl.c: Include "c-family/c-spellcheck.h".
1124
05abad4c
ML
11252017-12-05 Martin Liska <mliska@suse.cz>
1126 Jakub Jelinek <jakub@redhat.com>
1127
1128 * c-typeck.c (pointer_diff): Add new argument and instrument
1129 pointer subtraction.
1130 (build_binary_op): Similar for pointer comparison.
1131
cc6534d4
JJ
11322017-12-01 Jakub Jelinek <jakub@redhat.com>
1133
65791f42
JJ
1134 PR c/79153
1135 * c-parser.c: Include tree-iterator.h.
1136 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1137 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1138 on it.
1139
cc6534d4
JJ
1140 PR c/83222
1141 * c-tree.h (decl_constant_value_1): Declare.
1142 * c-typeck.c (decl_constant_value_1): New function.
1143 (decl_constant_value): Use it.
1144 * c-fold.c (c_fully_fold_internal): If in_init, use
1145 decl_constant_value_1 instead of decl_constant_value.
1146
5de73c05
JJ
11472017-11-30 Jakub Jelinek <jakub@redhat.com>
1148
1149 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1150
058f0b9e
JJ
11512017-11-28 Jakub Jelinek <jakub@redhat.com>
1152
1153 PR sanitizer/81275
1154 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1155 c_switch_covers_all_cases_p returns true.
1156
5e9d6aa4 11572017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1158 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1159
1160 * Make-lang.in (c/c-array-notation.o): Remove.
1161 * c-array-notation.c: Delete.
1162 * c-decl.c: Remove cilkplus condition.
1163 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1164 c_parser_cilk_verify_simd, c_parser_array_notation,
1165 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1166 c_parser_cilk_simd_fn_vector_attrs,
1167 c_finish_cilk_simd_fn_tokens): Delete.
1168 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1169 (c_parser_direct_declarator_inner): Ditto.
1170 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1171 (c_parser_attributes, c_parser_compound_statement,
1172 c_parser_statement_after_labels, c_parser_if_statement,
1173 c_parser_switch_statement, c_parser_while_statement,
1174 c_parser_do_statement, c_parser_for_statement,
1175 c_parser_unary_expression, c_parser_postfix_expression,
1176 c_parser_postfix_expression_after_primary,
1177 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1178 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1179 support.
1180 * c-typeck.c (build_array_ref, build_function_call_vec,
1181 convert_arguments,
1182 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1183 c_finish_loop, build_binary_op): Remove cilkplus support.
1184
9e851845
JJ
11852017-11-28 Jakub Jelinek <jakub@redhat.com>
1186
1187 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1188 of build3.
1189
8c7dbea9
BK
11902017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1191
1192 * Make-lang.in (c.install-plugin): Install backend import library.
1193
41521dee
JJ
11942017-11-23 Jakub Jelinek <jakub@redhat.com>
1195
1196 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1197 pragma_stmt context.
1198
ac9effed
EB
11992017-11-23 Mike Stump <mikestump@comcast.net>
1200 Eric Botcazou <ebotcazou@adacore.com>
1201
1202 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1203 ANNOTATE_EXPR.
1204 (c_parser_do_statement): Likewise.
1205 (c_parser_for_statement): Likewise.
1206
ce95abc4
DM
12072017-11-22 David Malcolm <dmalcolm@redhat.com>
1208
1209 PR c++/62170
1210 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1211 bool to bool *. Within '%T' handling, if showing an "aka", use
1212 "quoted" param to add appropriate quoting.
1213
974aedcc
MP
12142017-11-22 Marek Polacek <polacek@redhat.com>
1215
1216 PR c++/60336
1217 PR middle-end/67239
1218 PR target/68355
1219 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1220
d4300cc6
DM
12212017-11-21 David Malcolm <dmalcolm@redhat.com>
1222
1223 PR c/83056
1224 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1225 earlier failed lookups.
1226
1af4ebf5
MG
12272017-11-21 Marc Glisse <marc.glisse@inria.fr>
1228
1229 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1230 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1231
26edace6
DM
12322017-11-20 David Malcolm <dmalcolm@redhat.com>
1233
1234 PR c/81404
1235 * c-decl.c: Include "c-family/known-headers.h".
1236 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1237 to known-headers.cc.
1238 (class suggest_missing_header): Move to known-header.h.
1239 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1240 than get_c_name_hint.
1241
b1212255
DM
12422017-11-20 David Malcolm <dmalcolm@redhat.com>
1243
1244 * c-decl.c (get_c_name_hint): New function.
1245 (class suggest_missing_header): New class.
1246 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1247 suggest missing headers to the user.
1248
6c7a259b
DM
12492017-11-20 David Malcolm <dmalcolm@redhat.com>
1250
1251 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1252 Include "c-family/name-hint.h"
1253 (implicit_decl_warning): Convert "hint" from
1254 const char * to name_hint. Pass location to
1255 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1256 warning was not printed.
1257 (undeclared_variable): Likewise for "guessed_id".
1258 (lookup_name_fuzzy): Convert return type from const char *
1259 to name_hint. Add location_t param.
1260 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1261 Include "c-family/name-hint.h"
1262 (c_parser_declaration_or_fndef): Convert "hint" from
1263 const char * to name_hint. Pass location to lookup_name_fuzzy.
1264 (c_parser_parameter_declaration): Likewise.
1265
f9c59f7e
JJ
12662017-11-19 Jakub Jelinek <jakub@redhat.com>
1267
1268 PR c/66618
1269 PR c/69960
1270 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1271 where needed.
1272 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1273 handle_omp_array_sections): Likewise.
1274 (digest_init): Don't call decl_constant_value_for_optimization.
1275 * c-tree.h (decl_constant_value_for_optimization): Removed.
1276 * c-fold.c (c_fold_array_ref): New function.
1277 (c_fully_fold_internal): Add LVAL argument, propagate it through
1278 recursive calls. For VAR_P call decl_constant_value and
1279 unshare if not LVAL and either optimizing or IN_INIT. Remove
1280 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1281 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1282 (c_fully_fold): Add LVAL argument, pass it through to
1283 c_fully_fold_internal.
1284 (decl_constant_value_for_optimization): Removed.
1285
3ca0dc60
JM
12862017-11-15 Joseph Myers <joseph@codesourcery.com>
1287
1288 PR c/81156
1289 * c-parser.c (check_tgmath_function): New function.
1290 (enum tgmath_parm_kind): New enum.
1291 (c_parser_postfix_expression): Handle __builtin_tgmath.
1292
64a5912c
DM
12932017-10-31 David Malcolm <dmalcolm@redhat.com>
1294
1295 * c-decl.c (implicit_decl_warning): Update for renaming of
1296 pedwarn_at_rich_loc and warning_at_rich_loc.
1297 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1298 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1299 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1300 (c_parser_struct_or_union_specifier): Likewise for renaming of
1301 pedwarn_at_rich_loc.
1302 (c_parser_parameter_declaration): Likewise for renaming of
1303 error_at_rich_loc.
1304 * c-typeck.c (build_component_ref): Likewise.
1305 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1306 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1307 (set_init_label): Likewise for renaming of error_at_rich_loc.
1308
c1136864
RB
13092017-10-30 Richard Biener <rguenther@suse.de>
1310
1311 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1312 stmts.
1313
ee5fd23a
MM
13142017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1315
1316 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1317 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1318
1a59ccf2
DM
13192017-10-25 David Malcolm <dmalcolm@redhat.com>
1320
1321 PR c/7356
1322 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1323 semicolons.
1324
bc1a75dd
JJ
13252017-10-25 Jakub Jelinek <jakub@redhat.com>
1326
1327 PR libstdc++/81706
1328 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1329 newdecl to corresponding __builtin_ if any.
1330
ff1ff960
PC
13312017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1332
1333 PR c++/82466
1334 * c-decl.c (diagnose_mismatched_decls): Use
1335 OPT_Wbuiltin_declaration_mismatch.
1336
62e1c678
DM
13372017-10-12 David Malcolm <dmalcolm@redhat.com>
1338
1339 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1340 use it to guard calls to maybe_suggest_missing_token_insertion.
1341 (c_parser_parms_list_declarator): Override default value of new
1342 "type_is_unique" param to c_parser_require.
1343 (c_parser_asm_statement): Likewise.
1344 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1345 defaulting to true.
1346
a92f6726
NS
13472017-10-11 Nathan Sidwell <nathan@acm.org>
1348
1349 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1350
8e6cdc90
RS
13512017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1352
1353 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1354 operating on trees as wide_ints.
1355 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1356 (c_tree_equal): Likewise.
1357
8139a48e
DM
13582017-10-04 David Malcolm <dmalcolm@redhat.com>
1359
1360 * c-decl.c (push_parm_decl): Store c_parm's location into the
1361 PARAM_DECL.
1362 (build_c_parm): Add "loc" param and store it within the c_parm.
1363 * c-parser.c (struct c_parser): Add "last_token_location" field.
1364 (c_parser_consume_token): Store location of the token into the
1365 new field.
1366 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1367 when handling a FUNCTION_DECL, if it doesn't already have them.
1368 (c_parser_parameter_declaration): Generate a location for the
1369 parameter, and pass it to the call to build_c_parm.
1370 * c-tree.h (struct c_parm): Add field "loc".
1371 (build_c_parm): Add location_t param.
1372 * c-typeck.c (get_fndecl_argument_location): New function.
1373 (inform_for_arg): New function.
1374 (convert_for_assignment): Use inform_for_arg when dealing with
1375 ic_argpass.
1376
2a389958
JJ
13772017-09-29 Jakub Jelinek <jakub@redhat.com>
1378
7d386d45
JJ
1379 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1380 width is non-NULL.
1381 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1382 don't SET_DECL_C_BIT_FIELD here.
1383
2a389958
JJ
1384 PR c/82340
1385 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1386 instead of trying to set just TREE_READONLY manually.
1387
ebc6a85e
TV
13882017-09-16 Tom de Vries <tom@codesourcery.com>
1389
1390 PR c/81875
1391 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1392 cond itself.
1393
bb75facd
JM
13942017-09-15 Joseph Myers <joseph@codesourcery.com>
1395
1396 PR c/82071
1397 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1398 for C11.
1399 (build_conditional_expr): For C11, generate result with excess
1400 precision when one argument is an integer and the other is of a
1401 type using excess precision.
1402
1d933576
BE
14032017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1404
1405 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1406
267bbb6f
MP
14072017-09-13 Marek Polacek <polacek@redhat.com>
1408
1409 PR c/82167
1410 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1411 than expr.original_type.
1412
6836632e
NS
14132017-09-12 Nathan Sidwell <nathan@acm.org>
1414
1415 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1416 resort_sorted_fields): Moved from c-family/c-common.c.
1417 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1418
e035be33
JM
14192017-09-01 Joseph Myers <joseph@codesourcery.com>
1420
1421 PR c/82071
1422 * c-typeck.c (build_atomic_assign): Handle argument with excess
1423 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1424 argument passed to build_binary_op and convert_for_assignment but
1425 not for call to c_fully_fold.
1426 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1427 Ensure build_binary_op is called with argument with original
1428 semantic type. Avoid calling c_fully_fold with an
1429 EXCESS_PRECISION_EXPR from build_binary_op.
1430
d2e05fcb
JJ
14312017-09-01 Jakub Jelinek <jakub@redhat.com>
1432
1433 PR c/81887
1434 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1435
b397965c
RS
14362017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1437 Alan Hayward <alan.hayward@arm.com>
1438 David Sherwood <david.sherwood@arm.com>
1439
1440 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1441 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1442 m1 and m2 to the signed equivalent of a fixed-point
1443 SCALAR_TYPE_MODE.
1444
14e18d71
DM
14452017-08-24 David Malcolm <dmalcolm@redhat.com>
1446
1447 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1448 than CAN_HAVE_LOCATION_P when determining whether to use the
1449 location_t value within "value".
1450
7f204c0f
DM
14512017-08-21 David Malcolm <dmalcolm@redhat.com>
1452
1453 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1454 rather than peeking the location of the first token.
1455 * c-tree.h (c_expr::get_location): New method.
1456
2f687306
DM
14572017-08-21 David Malcolm <dmalcolm@redhat.com>
1458
1459 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1460 to check_function_arguments.
1461
3e7b80d7
MP
14622017-08-18 Marek Polacek <polacek@redhat.com>
1463
1464 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1465 commentary.
1466
00aa1fa2
L
14672017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1468
1469 PR c/53037
1470 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1471 (check_bitfield_type_and_width): Don't allow bit-field with
1472 warn_if_not_aligned type.
1473
da67acb9
MS
14742017-08-14 Martin Sebor <msebor@redhat.com>
1475
1476 PR c/81117
1477 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1478
bb85aa74
MP
14792017-08-11 Marek Polacek <polacek@redhat.com>
1480
1481 PR c/81795
1482 * c-decl.c (pushtag): Only print inform if the warning was printed.
1483 (grokdeclarator): Likewise.
1484
32129a17
DM
14852017-08-10 David Malcolm <dmalcolm@redhat.com>
1486
1487 * c-parser.c (c_parser_error): Rename to...
1488 (c_parser_error_richloc): ...this, making static, and adding
1489 "richloc" parameter, passing it to the c_parse_error call,
1490 rather than calling c_parser_set_source_position_from_token.
1491 (c_parser_error): Reintroduce, reimplementing in terms of the
1492 above, converting return type from void to bool.
1493 (class token_pair): New class.
1494 (struct matching_paren_traits): New struct.
1495 (matching_parens): New typedef.
1496 (struct matching_brace_traits): New struct.
1497 (matching_braces): New typedef.
1498 (get_matching_symbol): New function.
1499 (c_parser_require): Add param MATCHING_LOCATION, using it to
1500 highlight matching "opening" tokens for missing "closing" tokens.
1501 (c_parser_skip_until_found): Likewise.
1502 (c_parser_static_assert_declaration_no_semi): Convert explicit
1503 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1504 class matching_parens, so that the pertinent open parenthesis is
1505 highlighted when there are problems locating the close
1506 parenthesis.
1507 (c_parser_struct_or_union_specifier): Likewise.
1508 (c_parser_typeof_specifier): Likewise.
1509 (c_parser_alignas_specifier): Likewise.
1510 (c_parser_simple_asm_expr): Likewise.
1511 (c_parser_braced_init): Likewise, for matching_braces.
1512 (c_parser_paren_condition): Likewise, for matching_parens.
1513 (c_parser_switch_statement): Likewise.
1514 (c_parser_for_statement): Likewise.
1515 (c_parser_asm_statement): Likewise.
1516 (c_parser_asm_operands): Likewise.
1517 (c_parser_cast_expression): Likewise.
1518 (c_parser_sizeof_expression): Likewise.
1519 (c_parser_alignof_expression): Likewise.
1520 (c_parser_generic_selection): Likewise.
1521 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1522 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1523 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1524 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1525 c_parser_skip_until_found call.
1526 (c_parser_objc_class_definition): Use class matching_parens as
1527 above.
1528 (c_parser_objc_method_decl): Likewise.
1529 (c_parser_objc_try_catch_finally_statement): Likewise.
1530 (c_parser_objc_synchronized_statement): Likewise.
1531 (c_parser_objc_at_property_declaration): Likewise.
1532 (c_parser_oacc_wait_list): Likewise.
1533 (c_parser_omp_var_list_parens): Likewise.
1534 (c_parser_omp_clause_collapse): Likewise.
1535 (c_parser_omp_clause_default): Likewise.
1536 (c_parser_omp_clause_if): Likewise.
1537 (c_parser_omp_clause_num_threads): Likewise.
1538 (c_parser_omp_clause_num_tasks): Likewise.
1539 (c_parser_omp_clause_grainsize): Likewise.
1540 (c_parser_omp_clause_priority): Likewise.
1541 (c_parser_omp_clause_hint): Likewise.
1542 (c_parser_omp_clause_defaultmap): Likewise.
1543 (c_parser_oacc_single_int_clause): Likewise.
1544 (c_parser_omp_clause_ordered): Likewise.
1545 (c_parser_omp_clause_reduction): Likewise.
1546 (c_parser_omp_clause_schedule): Likewise.
1547 (c_parser_omp_clause_num_teams): Likewise.
1548 (c_parser_omp_clause_thread_limit): Likewise.
1549 (c_parser_omp_clause_aligned): Likewise.
1550 (c_parser_omp_clause_linear): Likewise.
1551 (c_parser_omp_clause_safelen): Likewise.
1552 (c_parser_omp_clause_simdlen): Likewise.
1553 (c_parser_omp_clause_depend): Likewise.
1554 (c_parser_omp_clause_map): Likewise.
1555 (c_parser_omp_clause_device): Likewise.
1556 (c_parser_omp_clause_dist_schedule): Likewise.
1557 (c_parser_omp_clause_proc_bind): Likewise.
1558 (c_parser_omp_clause_uniform): Likewise.
1559 (c_parser_omp_for_loop): Likewise.
1560 (c_parser_cilk_clause_vectorlength): Likewise.
1561 (c_parser_cilk_clause_linear): Likewise.
1562 (c_parser_transaction_expression): Likewise.
1563 * c-parser.h (c_parser_require): Add param matching_location with
1564 default UNKNOWN_LOCATION.
1565 (c_parser_error): Convert return type from void to bool.
1566 (c_parser_skip_until_found): Add param matching_location with
1567 default UNKNOWN_LOCATION.
1568
30af3a2b
MP
15692017-08-09 Marek Polacek <polacek@redhat.com>
1570
1571 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1572 * c-tree.h (build_external_ref): Update declaration.
1573 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1574 (build_external_ref): Change the type of a parameter to bool.
1575 (parser_build_binary_op): Use true/false instead of 1/0.
1576 (pointer_diff): Likewise.
1577 (build_modify_expr): Likewise.
1578 (set_designator): Change the type of a parameter to bool.
1579 (set_init_index): Use true/false instead of 1/0.
1580 (set_init_label): Likewise.
1581 (output_init_element): Change the type of a parameter to bool.
1582 (output_pending_init_elements): Use true/false instead of 1/0.
1583 (process_init_element): Likewise.
1584 (build_binary_op): Change the type of a parameter to bool.
1585
296c53ac
MP
15862017-08-09 Marek Polacek <polacek@redhat.com>
1587
1588 PR c/81233
1589 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1590 Call emit_diagnostic_valist instead of pedwarn.
1591 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1592 Print the relevant types in diagnostics.
1593
a32c8316
MP
15942017-08-09 Marek Polacek <polacek@redhat.com>
1595
1596 PR c/81417
1597 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
1598 build_conditional_expr.
1599 * c-parser.c (c_parser_conditional_expression): Create locations for
1600 EXP1 and EXP2 from their source ranges. Pass the locations down to
1601 build_conditional_expr.
1602 * c-tree.h (build_conditional_expr): Update declaration.
1603 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1604 For -Wsign-compare, also print the types.
1605
314e6352
ML
16062017-08-08 Martin Liska <mliska@suse.cz>
1607
1608 * c-convert.c: Include header files.
1609 * c-typeck.c: Likewise.
1610
577eec56
ML
16112017-08-07 Martin Liska <mliska@suse.cz>
1612
1613 * c-parser.c (c_parser_attributes): Canonicalize name of an
1614 attribute.
1615
f7b6353a
MP
16162017-08-02 Marek Polacek <polacek@redhat.com>
1617
1618 PR c/81289
1619 * c-parser.c (c_parser_unary_expression): Use set_error.
1620
8a6eab34
MP
1621 PR c/81448
1622 PR c/81306
1623 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1624 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1625
7fef86d3
JH
16262017-07-31 Jan Hubicka <hubicka@ucw.cz>
1627 Martin Liska <mliska@suse.cz>
1628
1629 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1630 statement.
7fef86d3 1631
f34ebeb2
ML
16322017-07-31 Martin Liska <mliska@suse.cz>
1633
1634 PR sanitize/81530
1635 * c-convert.c (convert): Guard condition with flag_sanitize_p
1636 also with current_function_decl non-null equality.
1637 * c-decl.c (grokdeclarator): Likewise.
1638 * c-typeck.c (build_binary_op): Likewise.
1639
8595f67b
MP
16402017-07-25 Marek Polacek <polacek@redhat.com>
1641
1642 * c-decl.c (grokfield): Remove local variable.
1643
d49718d6
MP
16442017-07-25 Marek Polacek <polacek@redhat.com>
1645
1646 PR c/81364
1647 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1648 macro expansion if the body is in { }.
1649 (c_parser_while_statement): Likewise.
1650 (c_parser_for_statement): Likewise.
1651
ff22eb12
NS
16522017-07-18 Nathan Sidwell <nathan@acm.org>
1653
1654 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1655
eea77d1f
DM
16562017-07-14 David Malcolm <dmalcolm@redhat.com>
1657
1658 * c-decl.c (implicitly_declare): When suggesting a missing
1659 #include, provide a fix-it hint.
1660
b6f43128
DM
16612017-07-06 David Malcolm <dmalcolm@redhat.com>
1662
1663 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1664 and call that instead.
1665 * c-tree.h (selftest::run_c_tests): New decl.
1666
3e2becc4
MP
16672017-06-26 Marek Polacek <polacek@redhat.com>
1668
1669 PR c/80116
1670 * c-parser.c (c_parser_if_body): Set the location of the
1671 body of the conditional after parsing all the labels. Call
1672 warn_for_multistatement_macros.
1673 (c_parser_else_body): Likewise.
1674 (c_parser_switch_statement): Likewise.
1675 (c_parser_while_statement): Likewise.
1676 (c_parser_for_statement): Likewise.
1677 (c_parser_statement): Add a default argument. Save the location
1678 after labels have been parsed.
1679 (c_parser_c99_block_statement): Likewise.
1680
343ae898
RB
16812017-06-19 Richard Biener <rguenther@suse.de>
1682
1683 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1684 negated _Literals to parse _Literal (int) -1.
1685
45b2222a
ML
16862017-06-13 Martin Liska <mliska@suse.cz>
1687
1688 PR sanitize/78204
1689 * c-convert.c (convert): Use sanitize_flags_p.
1690 * c-decl.c (grokdeclarator): Likewise.
1691 * c-typeck.c (convert_for_assignment): Likewise.
1692 (c_finish_return): Likewise.
1693 (build_binary_op): Likewise.
1694
8ab7005b
JJ
16952017-06-08 Jakub Jelinek <jakub@redhat.com>
1696
1697 PR c/81006
1698 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1699 to sizetype before size_binop.
1700
363dc72c
JJ
17012017-06-07 Jakub Jelinek <jakub@redhat.com>
1702
1703 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1704 of TDI_generic.
1705
dc949728
MP
17062017-06-06 Marek Polacek <polacek@redhat.com>
1707
1708 PR c/79983
1709 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1710 ref.
1711 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1712
40ffd95f
BE
17132017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1714
1715 * c-parser.c (c_parser_binary_expression): Implement the
1716 -Wsizeof_pointer_div warning.
1717 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1718 from a parenthesized expression.
1719 (c_parser_expr_list): Use c_last_sizeof_loc.
1720 * c-tree.h (c_last_sizeof_loc): New external.
1721 * c-typeck.c (c_last_sizeof_loc): New variable.
1722 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1723
9fc5e7a4
MM
17242017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1725
1726 PR testsuite/80580
1727 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1728
f012c8ef
DM
17292017-05-30 David Malcolm <dmalcolm@redhat.com>
1730
1731 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1732 parameters.
1733
3cd211af
MS
17342017-05-24 Martin Sebor <msebor@redhat.com>
1735
1736 PR c/80731
1737 * c-fold.c (c_fully_fold_internal): Adjust.
1738 * c-typeck.c (parser_build_unary_op): Adjust.
1739
fd71a9a2
TS
17402017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1741
1742 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1743 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1744 "VECTOR_LENGTH".
1745
92fa0f9e
MP
17462017-05-23 Marek Polacek <polacek@redhat.com>
1747
1748 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1749 quotes.
1750
d11c168a
JJ
17512017-05-22 Jakub Jelinek <jakub@redhat.com>
1752
1753 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1754 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1755 it returned invariant. Call tree_invariant_p unconditionally
1756 afterwards to decide whether to return expr or op0.
1757
58aca9d9
NS
17582017-05-22 Nathan Sidwell <nathan@acm.org>
1759
1760 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1761
7fd549d2
TS
17622017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1763
1764 * c-parser.c (c_parser_omp_clause_default): Handle
1765 "OMP_CLAUSE_DEFAULT_PRESENT".
1766
6ecd2339
BE
17672017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1768
1769 * config-lang.in (gtfiles): Add c-family/c-format.c.
1770
8a57ecff
NS
17712017-05-18 Nathan Sidwell <nathan@acm.org>
1772
1773 * c-decl.c (pushdecl_top_level): Delete unused function.
1774
6574d78e
MP
17752017-05-18 Marek Polacek <polacek@redhat.com>
1776
1777 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1778 (check_earlier_gotos): Likewise.
1779 (define_label): Likewise.
1780 (pending_xref_error): Likewise.
1781 (smallest_type_quals_location): Likewise.
1782 (grokdeclarator): Likewise.
1783 (grokparms): Likewise.
1784 (identifier_global_value): Likewise.
1785 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1786 (find_init_member): Likewise.
1787
e3455240
MP
17882017-05-18 Marek Polacek <polacek@redhat.com>
1789
1790 * c-decl.c (start_decl): Use false/true instead of 0/1.
1791 (grokdeclarator): Likewise.
1792 (finish_struct): Likewise.
1793 (start_function): Change the return type to bool. Use false/true
1794 instead of 0/1.
1795 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1796 * c-tree.h (start_function): Update.
1797 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1798 (set_designator): Change the return type to bool. Use false/true
1799 instead of 0/1.
1800
3fa8871b
MP
18012017-05-17 Marek Polacek <polacek@redhat.com>
1802
1803 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1804 * c-typeck.c: Likewise.
1805
142473df
MP
18062017-05-17 Marek Polacek <polacek@redhat.com>
1807
1808 PR sanitizer/80659
1809 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1810 DECL_IGNORED_P even for non-static compound literals.
1811
1a817418
ML
18122017-05-17 Martin Liska <mliska@suse.cz>
1813
1814 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1815 use it instead of int type.
1816
b2fa0a8b
MP
18172017-05-17 Marek Polacek <polacek@redhat.com>
1818
1819 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1820 call c_fully_fold.
1821 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1822 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1823 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1824 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1825 save_expr.
1826 (c_parser_conditional_expression): Likewise.
1827 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1828 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1829 (process_init_element): Likewise.
1830 (build_binary_op): Likewise.
1831 (handle_omp_array_sections_1): Likewise.
1832
1e47f02b
TS
18332017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1834
1835 * c-parser.c (c_parser_omp_clause_num_gangs)
1836 (c_parser_omp_clause_num_workers)
1837 (c_parser_omp_clause_vector_length): Merge functions into...
1838 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1839 all users.
1840
c24e924f
NS
18412017-05-11 Nathan Sidwell <nathan@acm.org>
1842
1843 * gimple-parser.c: Don't #include tree-dump.h.
1844
c587104e
MM
18452017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1846
1847 PR testsuite/80580
1848 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1849
67ac9a9d
MM
18502017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1851
1852 PR testsuite/80580
1853 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1854 incorrect __MEM syntax.
1855
ac4eb40f
MM
18562017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1857
1858 PR testsuite/80580
1859 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1860 type of unary '*'.
1861
641da50a
NS
18622017-05-09 Nathan Sidwell <nathan@acm.org>
1863
1864 * c-tree.h (pushdecl): Declare.
1865
56d35585
DM
18662017-05-05 David Malcolm <dmalcolm@redhat.com>
1867
1868 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1869 with diagnostic_report_diagnostic.
1870 * c-errors.c (pedwarn_c99): Likewise.
1871 (pedwarn_c90): Likewise.
1872
815d9cc6
XR
18732017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1874
92a285c1 1875 PR c++/80038
815d9cc6
XR
1876 * c-gimplify.c (c_gimplify_expr): Remove calls to
1877 cilk_gimplifY_call_params_in_spawned_fn.
1878
1c4ea66f
DM
18792017-04-25 David Malcolm <dmalcolm@redhat.com>
1880
1881 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1882 hint for removing extra semicolon.
1883
666f7903
JJ
18842017-04-21 Jakub Jelinek <jakub@redhat.com>
1885
1886 PR c/80468
1887 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1888 enabled, set specs->type to integer_type_node.
1889
5764ee3c
JW
18902017-04-03 Jonathan Wakely <jwakely@redhat.com>
1891
1892 * c-array-notation.c: Fix typo in comment.
1893
10fa8dfb
MP
18942017-03-29 Marek Polacek <polacek@redhat.com>
1895
1896 PR c/79730
1897 * c-decl.c (finish_decl): Check VAR_P.
1898
a9e4a1a5
JJ
18992017-03-27 Jakub Jelinek <jakub@redhat.com>
1900
1901 PR middle-end/80162
1902 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1903 * c-typeck.c (c_mark_addressable): Likewise. Look through
1904 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1905 to ARRAY_TYPE.
1906 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1907
ee3ff394
MP
19082017-03-23 Marek Polacek <polacek@redhat.com>
1909
1910 * c-tree.h: Remove a C_RID_YYCODE reference.
1911
4d1b8e70
JJ
19122017-03-21 Jakub Jelinek <jakub@redhat.com>
1913
1914 PR c/80097
1915 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1916 optional COMPOUND_EXPR with ubsan instrumentation.
1917
31dc71a8
MP
19182017-03-17 Marek Polacek <polacek@redhat.com>
1919
1920 * c-parser.c: Add C11 references.
1921
d579c385
MP
19222017-03-15 Marek Polacek <polacek@redhat.com>
1923
1924 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1925
85059a38
MP
19262017-03-11 Marek Polacek <polacek@redhat.com>
1927
1928 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1929
2f6f187a
DM
19302017-03-10 David Malcolm <dmalcolm@redhat.com>
1931
1932 PR translation/79848
1933 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1934 "%qs".
1935 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1936
36618428
MP
19372017-03-09 Marek Polacek <polacek@redhat.com>
1938
1939 PR sanitizer/79757
1940 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1941 parameter declarations with initializers.
1942
01e5af5a
JJ
19432017-03-09 Jakub Jelinek <jakub@redhat.com>
1944
1945 PR c/79969
1946 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1947 TYPE_STUB_DECL.
1948
a71dbc63
JJ
19492017-03-07 Jakub Jelinek <jakub@redhat.com>
1950
1951 PR c/79834
1952 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1953 for "may only be used in compound statements" diagnostics, change it
1954 such that the same translatable string is used for all pragmas. For
1955 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1956 diagnostics.
1957 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1958 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1959 "may only be used in compound statements" diagnostics, such that the
1960 same translatable string is used for all pragmas.
1961
1ff4bae6
MP
19622017-03-04 Marek Polacek <polacek@redhat.com>
1963
1964 PR c/79847
1965 * c-decl.c (implicit_decl_warning): Add missing space.
1966
7f5a7d78
MP
19672017-03-03 Marek Polacek <polacek@redhat.com>
1968
1969 PR c/79758
1970 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1971 current_function_prototype_arg_types is error_mark_node. Fix
1972 formatting. Use TREE_VALUE instead of TREE_TYPE.
1973
883c8f06
JJ
19742017-03-03 Jakub Jelinek <jakub@redhat.com>
1975
79c9b7a8
JJ
1976 PR c/79837
1977 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1978 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1979 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1980 diagnostics.
1981
883c8f06
JJ
1982 PR c/79836
1983 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1984 instead of %<_Generic>.
1985 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1986 (c_parser_omp_target_exit_data): Use %<release%> instead of
1987 %<release>.
1988
324ff1a0
JJ
19892017-02-28 Jakub Jelinek <jakub@redhat.com>
1990
1991 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1992 instead of just cond ? "..." : "...".
1993 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1994 for "enter"/"exit" keyword.
1995 (c_finish_oacc_routine): Don't use %s to supply portions of the
1996 message.
1997
4227c9ad
JJ
19982017-02-24 Jakub Jelinek <jakub@redhat.com>
1999
2000 PR c++/79588
2001 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2002 handle -Wrestrict here.
2003 * c-typeck.c (build_function_call_vec): Adjust
2004 check_function_arguments caller.
2005
5d972e66
RB
20062017-02-23 Richard Biener <rguenther@suse.de>
2007
2008 PR c/79684
2009 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2010 to initialize c_exprs to return.
2011 (c_parser_gimple_binary_expression): Likewise.
2012 (c_parser_gimple_unary_expression): Likewise.
2013 (c_parser_gimple_postfix_expression): Likewise.
2014
61ac5ebe
MP
20152017-02-22 Marek Polacek <polacek@redhat.com>
2016
2017 PR c/79662
2018 * c-typeck.c (convert_arguments): Handle error_mark_node.
2019
41d1b0b1
PK
20202017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2021
2022 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2023 value of c_parser_parse_ssa_name against error_mark_node and emit
2024 error if ssa name is anonymous and written as default definition.
2025
eab1f169
PK
20262017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2027
2028 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2029 FMA_EXPR.
2030
bcac0b4d
JJ
20312017-02-16 Jakub Jelinek <jakub@redhat.com>
2032
2033 PR c++/79512
2034 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2035 ignore #pragma omp target even when not followed by identifier.
2036
1be33173
PK
20372017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2038
2039 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2040 (c_parser_gimple_unary_expression): Likewise.
2041
aa326bfb
JJ
20422017-02-13 Jakub Jelinek <jakub@redhat.com>
2043
2044 * c-parser.c (c_parser_oacc_declare): Add missing space in
2045 diagnostics.
2046
8a398bc5
PK
20472017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2048
2049 PR c/79478
2050 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2051 set_c_expr_source_range when parsing ssa-name.
2052
3dcde5ef
PG
20532017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
2054 Richard Biener <rguenther@suse.de>
2055
2056 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2057 building IL when arguments are error_mark_node.
2058 (c_parser_gimple_unary_expression): Likewise.
2059 (c_parser_gimple_if_stmt): Likewise.
2060 (c_parser_gimple_switch_stmt): Likewise.
2061 (c_parser_gimple_return_stmt): Likewise.
2062 (c_parser_parse_ssa_name): When name lookup fails do not build
2063 an SSA name. Use undeclared rather than not declared in error
2064 reporting.
2065
192b048b
MP
20662017-02-09 Marek Polacek <polacek@redhat.com>
2067
2068 PR c/79428
2069 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2070 instead of c_parser_skip_until_found.
2071
56f71478
JJ
20722017-02-09 Jakub Jelinek <jakub@redhat.com>
2073
2074 PR c/79431
2075 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2076 symtab_node::get on automatic variables.
2077
02889d23
CLT
20782016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2079 Chung-Lin Tang <cltang@codesourcery.com>
2080
2081 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2082 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2083 semantic checking.
2084 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2085
7af4b20d
RB
20862017-02-07 Richard Biener <rguenther@suse.de>
2087
2088 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2089 (c_parser_gimple_postfix_expression_after_primary):
2090 Do not use c_build_function_call_vec to avoid folding and promotion.
2091 Simplify.
2092
e5e391d6
MO
20932017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2094
2095 PR lto/79061
2096 * c-decl.c (pop_scope): Pass main_input_filename to
2097 build_translation_unit_decl.
2098
c2e84327
DM
20992017-01-24 David Malcolm <dmalcolm@redhat.com>
2100
2101 * c-parser.c: Include "read-rtl-function.h" and
2102 "run-rtl-passes.h".
2103 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2104 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2105 production. Update for renaming of field "gimple_pass" to
2106 "gimple_or_rtl_pass". If __RTL was seen, call
2107 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2108 to an auto_timevar, to cope with early exit.
2109 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2110 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2111 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2112 Handle RID_RTL.
2113 (c_parser_parse_rtl_body): New function.
2114 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2115 (struct c_declspecs): Rename field "gimple_pass" to
2116 "gimple_or_rtl_pass". Add field "rtl_p".
2117 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2118 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2119 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2120 (c_parser_gimple_or_rtl_pass_list): ...this.
2121
2ebd93e1
MP
21222017-01-20 Marek Polacek <polacek@redhat.com>
2123
2124 PR c/64279
2125 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2126
b1c95bb5
RB
21272017-01-13 Richard Biener <rguenther@suse.de>
2128
2129 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2130 nops.
2131
25329913
RB
21322017-01-13 Richard Biener <rguenther@suse.de>
2133
2134 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2135 _Literal ( type-name ) number.
2136
6bb4ea5c
RB
21372017-01-12 Richard Biener <rguenther@suse.de>
2138
2139 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2140 __MEM.
2141
6b5b4e9c
JJ
21422017-01-11 Jakub Jelinek <jakub@redhat.com>
2143
2144 PR c++/72813
2145 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2146 PCH file.
2147
e3252775
RB
21482017-01-11 Richard Biener <rguenther@suse.de>
2149
2150 PR bootstrap/79052
2151 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2152 returns on parse errors.
2153
a9342885
MP
21542017-01-04 Marek Polacek <polacek@redhat.com>
2155
2156 PR c++/64767
2157 * c-parser.c (c_parser_postfix_expression): Mark zero character
2158 constants by setting original_type in c_expr.
2159 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2160 with a zero character constant.
2161 (char_type_p): New function.
2162
5dd9a9d0
DM
21632017-01-04 David Malcolm <dmalcolm@redhat.com>
2164
2165 * c-parser.c (c_parser_declaration_or_fndef): Create a
2166 rich_location at init_loc and parse it to start_init.
2167 (last_init_list_comma): New global.
2168 (c_parser_braced_init): Update last_init_list_comma when parsing
2169 commas. Pass it to pop_init_level. Pass location of closing
2170 brace to pop_init_level.
2171 (c_parser_postfix_expression_after_paren_type): Create a
2172 rich_location at type_loc and parse it to start_init.
2173 (c_parser_omp_declare_reduction): Likewise for loc.
2174 * c-tree.h (start_init): Add rich_location * param.
2175 (pop_init_level): Add location_t param.
2176 * c-typeck.c (struct initializer_stack): Add field
2177 "missing_brace_richloc".
2178 (start_init): Add richloc param, use it to initialize
2179 the stack node's missing_brace_richloc.
2180 (last_init_list_comma): New decl.
2181 (finish_implicit_inits): Pass last_init_list_comma to
2182 pop_init_level.
2183 (push_init_level): When finding missing open braces, add fix-it
2184 hints to the richloc.
2185 (pop_init_level): Add "insert_before" param and pass it
2186 when calling pop_init_level. Add fixits about missing
2187 close braces to any richloc. Use the richloc for the
2188 -Wmissing-braces warning.
2189 (set_designator): Pass last_init_list_comma to pop_init_level.
2190 (process_init_element): Likewise.
2191
cbe34bb5
JJ
21922017-01-01 Jakub Jelinek <jakub@redhat.com>
2193
2194 Update copyright years.
2195
d17680f3
JJ
21962016-12-21 Jakub Jelinek <jakub@redhat.com>
2197
0dba7960
JJ
2198 PR bootstrap/78817
2199 * c-typeck.c (build_function_call_vec): If check_function_arguments
2200 returns true, set TREE_NO_WARNING on CALL_EXPR.
2201
d17680f3
JJ
2202 PR c/77767
2203 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2204 to *expr instead of overwriting it.
2205
aa90531e
RB
22062016-12-20 Richard Biener <rguenther@suse.de>
2207
2208 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2209 error recovery.
2210 (c_parser_gimple_statement): Only build assigns for non-error
2211 stmts.
2212 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2213
629b3d75
MJ
22142016-12-14 Martin Jambor <mjambor@suse.cz>
2215
2216 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2217 omp-low.h.
2218 (c_finish_oacc_routine): Adjusted call to
2219 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2220 to use their new names.
2221 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2222 use its new name.
2223 (c_parser_oacc_update): Likewise.
2224 (c_parser_omp_simd): Likewise.
2225 (c_parser_omp_target_update): Likewise.
2226 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2227 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2228 name.
2229 (c_finish_omp_cancellation_point): Likewise.
2230 * gimple-parser.c: Do not include omp-low.h
2231
c5af52eb
CP
22322016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2233 James Norris <jnorris@codesourcery.com>
2234
2235 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2236 EXIT_DATA,WAIT} are not used in compound statements.
2237 (c_parser_oacc_enter_exit_data): Update diagnostics.
2238
48330c93
BE
22392016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2240
2241 PR c++/71973
2242 * c-decl.c (diagnose_mismatched_decls): Use
2243 OPT_Wbuiltin_declaration_mismatch here too.
2244
899ca90e 22452016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2246 Alan Hayward <alan.hayward@arm.com>
2247 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2248
2249 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2250 (make_label, finish_struct): Likewise.
2251
1ee62b92 22522016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2253 Richard Biener <rguenther@suse.de>
22b15758 2254
8e745a17
JJ
2255 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2256 * config-lang.in (gtfiles): Add c/c-parser.h.
2257 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2258 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2259 * c-parser.c (enum c_id_kind, struct c_token,
2260 c_parser_next_token_is, c_parser_next_token_is_not,
2261 c_parser_next_token_is_keyword,
2262 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2263 Split out to ...
2264 * c-parser.h: ... new header.
2265 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2266 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2267 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2268 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2269 c_parser_error, c_parser_require, c_parser_skip_until_found,
2270 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2271 c_parser_type_name): Export.
2272 (c_parser_tokens_buf): New function.
2273 (c_parser_error): Likewise.
2274 (c_parser_set_error): Likewise.
2275 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2276 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2277 via c_parser_parse_gimple_body.
8e745a17
JJ
2278 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2279 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2280 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2281 c_parser_error, c_parser_require, c_parser_skip_until_found,
2282 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2283 c_parser_type_name): Declare.
1ee62b92
PG
2284 (struct c_parser): Declare forward.
2285 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2286 (c_parser_error): Likewise.
2287 (c_parser_set_error): Likewise.
2288 * gimple-parser.c: New file.
2289 * gimple-parser.h: Likewise.
1ee62b92 2290
22b15758
UB
22912016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2292
2293 PR c/35503
2294 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2295 warn_for_restrict.
2296
84ff4775
LCW
22972016-09-11 Le-Chun Wu <lcwu@google.com>
2298 Mark Wielaard <mjw@redhat.com>
2299
2300 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2301 to the given -Wshadow= variant.
2302
4d0cdd0c
TP
23032016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2304
2305 * c-typeck.c: Include memmodel.h.
2306
1202f33e
JJ
23072016-10-13 Jakub Jelinek <jakub@redhat.com>
2308
2309 PR target/77957
2310 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2311 instead of lhd_return_null_tree_v.
2312
8a14afd0
BS
23132016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2314
2315 PR c++/69733
2316 * c-decl.c (smallest_type_quals_location): New static function.
2317 (grokdeclarator): Try to find the correct location for an ignored
2318 qualifier.
2319
81fea426
MP
23202016-09-26 Marek Polacek <polacek@redhat.com>
2321
2322 PR c/7652
2323 * c-decl.c (pop_scope): Add gcc_fallthrough.
2324
23252016-09-26 Marek Polacek <polacek@redhat.com>
2326
2327 PR c/7652
2328 * c-parser.c (struct c_token): Add flags field.
2329 (c_lex_one_token): Pass it to c_lex_with_flags.
2330 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2331 into IFN_FALLTHROUGH.
2332 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2333 attribute fallthrough after a case label or default label.
2334 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2335
9a2300e9
MP
23362016-09-24 Marek Polacek <polacek@redhat.com>
2337
2338 PR c/77490
2339 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2340 have boolean value. Warn about ++/-- on booleans.
2341
7de76362
JJ
23422016-09-23 Jakub Jelinek <jakub@redhat.com>
2343
2344 * c-parser.c (incomplete_record_decls): Remove unnecessary
2345 = vNULL initialization of file scope vec.
2346
5b73d2ab
MP
23472016-09-16 Marek Polacek <polacek@redhat.com>
2348
2349 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2350
e51fbec3
MP
23512016-09-14 Marek Polacek <polacek@redhat.com>
2352
2353 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2354 (fix_array_notation_expr): Likewise.
2355 * c-decl.c (finish_decl): Likewise.
2356 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2357 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2358 (function_to_pointer_conversion): Use false instead of 0.
2359 (convert_lvalue_to_rvalue): Likewise.
2360 (parser_build_unary_op): Likewise.
2361 (build_atomic_assign): Likewise.
2362 (build_unary_op): Change nonconvert parameter type to bool, use
2363 true/false instead of 1/0.
2364 (build_binary_op): Use true instead of 1.
2365
254830ba
DM
23662016-09-13 David Malcolm <dmalcolm@redhat.com>
2367
2368 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2369 of add_fixit_insert to add_fixit_insert_before.
2370
4c13ba17
MP
23712016-09-13 Marek Polacek <polacek@redhat.com>
2372
2373 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2374 it.
2375
54dcdb88
BE
23762016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2377
2378 PR c++/77496
2379 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2380 COMPOUND_EXPR to warn_for_omitted_condop.
2381
e5106e27
DM
23822016-09-07 David Malcolm <dmalcolm@redhat.com>
2383
2384 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2385 c_get_substring_location for this new langhook.
2386
9dc5773f
JJ
23872016-09-02 Jakub Jelinek <jakub@redhat.com>
2388
2389 PR c/65467
2390 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2391 flag_openmp.
2392 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2393 instead of mark_exp_read on low_bound/length expression.
2394 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2395 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2396 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2397 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2398 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2399 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2400 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2401 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2402 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2403 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2404 instead of mark_expr_read.
2405 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2406 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2407 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2408 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2409 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2410 array section bases outside of depend clause, for depend clause
2411 use convert_lvalue_to_rvalue on the base.
2412 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2413 linear, aligned, map, to and from clauses.
2414 (c_omp_clause_copy_ctor): New function.
2415
295844f6
MP
24162016-09-01 Marek Polacek <polacek@redhat.com>
2417
2418 PR c/7652
2419 * c-typeck.c (composite_type): Add FALLTHRU comment.
2420
089af25c
DM
24212016-08-31 David Malcolm <dmalcolm@redhat.com>
2422
2423 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2424 to the insertion fixits for "struct", "union", and "enum".
2425
f9087798
DM
24262016-08-30 David Malcolm <dmalcolm@redhat.com>
2427
2428 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2429 rather than add_fixit_misspelled_id.
2430 (undeclared_variable): Likewise.
2431 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2432 now-redundant "here" params from add_fixit_insert method calls.
2433 (c_parser_parameter_declaration): Likewise.
2434 * c-typeck.c (build_component_ref): Remove now-redundant range
2435 param from add_fixit_replace method calls.
2436
ebef225f
MP
24372016-08-25 Marek Polacek <polacek@redhat.com>
2438
2439 * c-typeck.c (parser_build_binary_op): Pass LHS to
2440 warn_logical_not_parentheses.
2441
fe377a48
MP
24422016-08-25 Marek Polacek <polacek@redhat.com>
2443
2444 PR c/77323
2445 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2446 or _FloatN or _FloatNx is not supported.
2447 (finish_declspecs): Set type to integer_type_node when _FloatN or
2448 _FloatNx is not supported.
2449
c65699ef
JM
24502016-08-19 Joseph Myers <joseph@codesourcery.com>
2451
2452 PR c/32187
2453 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2454 (struct c_declspecs): Add field floatn_nx_idx.
2455 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2456 and _FloatNx type specifiers.
2457 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2458 (c_parser_declspecs, c_parser_attribute_any_word)
2459 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2460 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2461 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2462 narrower than double.
2463
2f1364c2
JJ
24642016-08-12 Jakub Jelinek <jakub@redhat.com>
2465 Martin Liska <mliska@suse.cz>
2466
2467 PR c/67410
2468 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2469 % to determine val element to change. Assert that
2470 wchar_bytes * charwidth fits into val array.
2471
191816a3
MP
24722016-08-12 Marek Polacek <polacek@redhat.com>
2473
2474 PR c/7652
2475 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2476 (c_parser_postfix_expression): Likewise.
2477 * c-typeck.c (build_unary_op): Adjust fall through comment.
2478 (c_mark_addressable): Likewise.
2479
b95a64bb
JJ
24802016-08-11 Jakub Jelinek <jakub@redhat.com>
2481
2482 PR c/72816
2483 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2484 array member through typedef, for orig_qual_indirect == 0 clear
2485 orig_qual_type.
2486
895aa8e1
DM
24872016-08-08 David Malcolm <dmalcolm@redhat.com>
2488
2489 PR c/64955
2490 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2491 this up to selftest::run_c_tests.
2492 (selftest::run_c_tests): New function.
2493
0b212d8c
TS
24942016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2495
ae9281fc
TS
2496 * c-parser.c (struct oacc_routine_data): Add error_seen and
2497 fndecl_seen members.
2498 (c_finish_oacc_routine): Use these.
2499 (c_parser_declaration_or_fndef): Adjust.
2500 (c_parser_oacc_routine): Likewise. Support more C language
2501 constructs, and improve diagnostics. Move pragma context
2502 checking...
2503 (c_parser_pragma): ... here.
2504
0b212d8c
TS
2505 * c-parser.c (struct oacc_routine_data): New.
2506 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2507 Simplify code.
2508 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2509 declare target" attribute.
2510
76e2c821
JB
25112016-08-01 Jan Beulich <jbeulich@suse.com>
2512
2513 * c-fold.c (c_fully_fold_internal): Also emit shift count
2514 warnings for vector types.
2515 * c-typeck.c (build_binary_op): Likewise.
2516
f618a472
MP
25172016-07-29 Marek Polacek <polacek@redhat.com>
2518
2519 PR c/71742
2520 * c-decl.c (finish_struct): Rephrase an error message.
2521
efd0786f
MP
2522 PR c/71853
2523 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2524 to error node for invalid code.
2525
e00dceaf
MP
2526 PR c/71573
2527 * c-decl.c (implicitly_declare): Return decl early not only for
2528 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2529
673a107a
JJ
25302016-07-29 Jakub Jelinek <jakub@redhat.com>
2531
2532 PR c/71969
2533 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2534 on GNU extern inline functions.
2535
a5b5c8b6
MP
25362016-07-29 Marek Polacek <polacek@redhat.com>
2537
2538 PR c/71583
2539 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2540 check expr.value.
2541
e3fe09c1
UB
25422016-07-22 Uros Bizjak <ubizjak@gmail.com>
2543
2544 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2545
7c8f7eaa
DM
25462016-07-20 David Malcolm <dmalcolm@redhat.com>
2547
2548 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2549 spellcheck-tree.h
2550 (best_macro_match): Likewise, converting from a typedef to a
2551 subclass.
2552 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2553 (lookup_name_fuzzy): Update for change of best_macro_match to a
2554 subclass with a ctor that calls cpp_forall_identifiers.
2555
de6a69ee
DM
25562016-07-20 David Malcolm <dmalcolm@redhat.com>
2557
2558 * c-decl.c (implicit_decl_warning): Update for conversion of
2559 return type of lookup_name_fuzzy to const char *.
2560 (undeclared_variable): Likewise.
2561 (lookup_name_fuzzy): Convert return type from tree to
2562 const char *.
2563 * c-parser.c (c_parser_declaration_or_fndef): Update for
2564 conversion of return type of lookup_name_fuzzy to const char *.
2565 (c_parser_parameter_declaration): Likewise.
2566
b1c9c068
CP
25672016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2568
2569 * c-parser.c (c_parser_oacc_declare): Don't scan for
2570 GOMP_MAP_POINTER.
2571 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2572 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2573 zero-length subarrays.
2574
ddbbcb19
JJ
25752016-07-15 Jakub Jelinek <jakub@redhat.com>
2576
2577 PR c/71858
2578 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2579 instead of FUZZY_LOOKUP_NAME.
2580 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2581 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2582
dd36b877
JJ
25832016-07-14 Jakub Jelinek <jakub@redhat.com>
2584
2585 PR c/71858
2586 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2587
8c681247
TS
25882016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2589
2590 * c-parser.c (c_parser_generic_selection): Make type of variable
2591 auto_vec.
2592 (c_parser_omp_declare_simd): Likewise.
2593
bf4fa671
TS
25942016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2595
2596 * c-decl.c (struct c_struct_parse_info): Change member types
2597 from vec to auto_vec.
2598 (start_struct): Adjust.
2599 (finish_struct): Likewise.
2600
557e8c49
JJ
26012016-07-02 Jakub Jelinek <jakub@redhat.com>
2602
2603 PR c/71719
2604 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2605
54d19c3b
TS
26062016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2607
2608 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2609 Move pragma context checking into...
2610 (c_parser_omp_cancellation_point): ... here, and improve
2611 diagnostic messages.
2612 * c-typeck.c (c_finish_omp_cancel)
2613 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2614
152ef731
JJ
26152016-06-29 Jakub Jelinek <jakub@redhat.com>
2616
2617 PR c/71685
2618 * c-typeck.c (c_build_qualified_type): Don't clear
2619 C_TYPE_INCOMPLETE_VARS for the main variant.
2620
26212016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2622
2623 PR c/71552
2624 * c-typeck.c (output_init_element): Diagnose incompatible types
2625 before non-constant initializers.
2626
e9ac1f86
JJ
26272016-06-28 Jakub Jelinek <jakub@redhat.com>
2628
2629 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2630
277d7ee0
AK
26312016-06-23 Andi Kleen <ak@linux.intel.com>
2632
2633 * Make-lang.in: Add support for autofdo.
2634
1a4f11c8
DM
26352016-06-22 David Malcolm <dmalcolm@redhat.com>
2636
2637 PR c/70339
2638 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2639 (implicit_decl_warning): When issuing warnings for implicit
2640 declarations, attempt to provide a suggestion via
2641 lookup_name_fuzzy.
2642 (undeclared_variable): Likewise when issuing errors.
2643 (lookup_name_in_scope): Likewise.
2644 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2645 (best_macro_match): New typedef.
2646 (find_closest_macro_cpp_cb): New function.
2647 (lookup_name_fuzzy): New function.
2648 * c-parser.c: Include gcc-rich-location.h.
2649 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2650 (c_keyword_starts_typename): ...this new function.
2651 (c_parser_declaration_or_fndef): When issuing errors about
2652 missing "struct" etc, add a fixit. For other kinds of errors,
2653 attempt to provide a suggestion via lookup_name_fuzzy.
2654 (c_parser_parms_declarator): When looking ahead to detect typos in
2655 type names, also reject CPP_KEYWORD.
2656 (c_parser_parameter_declaration): When issuing errors about
2657 unknown type names, attempt to provide a suggestion via
2658 lookup_name_fuzzy.
2659 * c-tree.h (c_keyword_starts_typename): New prototype.
2660
5a578671
JM
26612016-06-20 Joseph Myers <joseph@codesourcery.com>
2662
2663 PR c/71601
2664 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2665 c_common_type returns error_mark_node.
2666
3f8257db 26672016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2668
2669 PR c/69507
2670 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2671 __alignof__ (expression).
2672
6a3f203c
DM
26732016-06-14 David Malcolm <dmalcolm@redhat.com>
2674
2675 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2676
264757fb
DM
26772016-06-14 David Malcolm <dmalcolm@redhat.com>
2678
2679 * c-typeck.c (build_component_ref): Simplify fixit code by
2680 using gcc_rich_location::add_fixit_misspelled_id.
2681 (set_init_label): Likewise.
2682
f7e4f2e3
DM
26832016-06-13 David Malcolm <dmalcolm@redhat.com>
2684
2685 * c-parser.c (c_parser_initelt): Provide location of name for new
2686 location_t param of set_init_label.
2687 * c-tree.h (set_init_label): Add location_t param.
2688 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2689 param and use it when issuing error messages about unrecognized
2690 field names. Attempt to provide a fixit hint if appropriate,
2691 otherwise update the error message to provide the type name.
2692
4b1ffdb1
TS
26932016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2694
2695 PR c/71381
2696 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2697 Loosen checking.
2698
44a845ca
MS
26992016-06-08 Martin Sebor <msebor@redhat.com>
2700 Jakub Jelinek <jakub@redhat.com>
2701
2702 PR c++/70507
2703 PR c/68120
2704 * c-typeck.c (convert_arguments): Don't promote last argument
2705 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2706
92a5f2ba
MP
27072016-06-08 Marek Polacek <polacek@redhat.com>
2708
2709 PR c/71418
2710 * c-decl.c (grokdeclarator): Check TYPE_P.
2711
08203f73
MP
2712 PR c/71426
2713 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2714 code.
2715
6ffd47b7
DM
27162016-06-07 David Malcolm <dmalcolm@redhat.com>
2717
2718 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2719 and structure element reference, capture the location of the
2720 element name token and pass it to build_component_ref.
2721 (c_parser_postfix_expression_after_primary): Likewise for
2722 structure element dereference.
2723 (c_parser_omp_variable_list): Likewise for
2724 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2725 * c-tree.h (build_component_ref): Add location_t param.
2726 * c-typeck.c (build_component_ref): Add location_t param
2727 COMPONENT_LOC. Use it, if available, when issuing hints about
2728 mispelled member names to provide a fixit replacement hint.
2729
1f40cff3
MP
27302016-06-06 Marek Polacek <polacek@redhat.com>
2731
2732 PR c/71362
2733 * c-parser.c (c_parser_direct_declarator): Set location.
2734
5545a907
MP
27352016-06-06 Marek Polacek <polacek@redhat.com>
2736
2737 * c-typeck.c (comptypes_internal): Handle comparisons of
2738 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2739 TYPE_REF_CAN_ALIAS_ALL.
2740
b605f663
CLT
27412016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2742
2743 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2744 arguments as addressable when async clause exists.
2745
00631022
JJ
27462016-05-30 Jakub Jelinek <jakub@redhat.com>
2747
2748 PR c++/71349
2749 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2750 when combined with target construct.
2751
7211a097
JJ
27522016-05-26 Jakub Jelinek <jakub@redhat.com>
2753
2754 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2755 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2756
95efe6b6
MP
27572016-05-25 Marek Polacek <polacek@redhat.com>
2758
2759 PR c/71265
2760 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2761
a23faf7a
MP
2762 PR c/71266
2763 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2764
e46c7770
CP
27652016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2766
2767 * c-parser.c (c_parser_oacc_declare): Add support for
2768 GOMP_MAP_FIRSTPRIVATE_POINTER.
2769 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2770 argument with enum c_omp_region_type ort.
2771 (handle_omp_array_sections): Likewise. Update call to
2772 handle_omp_array_sections_1.
2773 (c_finish_omp_clauses): Add specific errors and warning messages for
2774 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2775 call to handle_omp_array_sections.
2776
a04e69c0
TS
27772016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2778
2779 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2780
f17a223d
RB
27812016-05-24 Richard Biener <rguenther@suse.de>
2782
2783 PR middle-end/70434
2784 PR c/69504
2785 * c-typeck.c (build_array_ref): Do not complain about indexing
2786 non-lvalue vectors. Adjust for function name change.
2787
79063edd
MS
27882016-05-20 Martin Sebor <msebor@redhat.com>
2789
2790 PR c/71115
2791 * c-typeck.c (error_init): Use
2792 expansion_point_location_if_in_system_header.
2793 (warning_init): Same.
2794
8a40fef3
DM
27952016-05-19 David Malcolm <dmalcolm@redhat.com>
2796
2797 PR c/71171
2798 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2799 in error-handling.
2800 (c_parser_postfix_expression): Likewise.
2801 * c-tree.h (c_expr::set_error): New method.
2802 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2803 that result's range is initialized.
2804
e9892350
JG
28052016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2806
2807 * c-typeck.c (parser_build_unary_op): Fix formatting.
2808
8fad45f5
MW
28092016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2810
2811 * c-decl.c (grokdeclarator): Remove errmsg and use of
2812 targetm.invalid_return_type.
2813 (grokparms): Remove errmsg and use of
2814 targetm.invalid_parameter_type.
2815
aa4b467b
JM
28162016-05-13 Joseph Myers <joseph@codesourcery.com>
2817
2818 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2819 function return type.
2820
4f2e1536
MP
28212016-05-12 Marek Polacek <polacek@redhat.com>
2822
2823 PR c/70756
2824 * c-decl.c (build_compound_literal): Pass LOC down to
2825 c_incomplete_type_error.
2826 * c-tree.h (require_complete_type): Adjust declaration.
2827 (c_incomplete_type_error): Likewise.
2828 * c-typeck.c (require_complete_type): Add location parameter, pass it
2829 down to c_incomplete_type_error.
2830 (c_incomplete_type_error): Add location parameter, pass it down to
2831 error_at.
2832 (build_component_ref): Pass location down to c_incomplete_type_error.
2833 (default_conversion): Pass location down to require_complete_type.
2834 (build_array_ref): Likewise.
2835 (build_function_call_vec): Likewise.
2836 (convert_arguments): Likewise.
2837 (build_unary_op): Likewise.
2838 (build_c_cast): Likewise.
2839 (build_modify_expr): Likewise.
2840 (convert_for_assignment): Likewise.
2841 (c_finish_omp_clauses): Likewise.
2842
d6e83a8d
MM
28432016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2844
2845 PR c/43651
2846 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2847 is enabled.
2848 * c-errors.c (pedwarn_c90): Return true if warned.
2849 * c-tree.h (pedwarn_c90): Change return type to bool.
2850 (enum c_declspec_word): Add new enumerator cdw_atomic.
2851
5c3a10fb
MP
28522016-05-11 Marek Polacek <polacek@redhat.com>
2853
2854 PR c++/71024
2855 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2856 diagnose_mismatched_attributes and call it.
2857
cf68d92c
MP
28582016-05-10 Marek Polacek <polacek@redhat.com>
2859
2860 PR c/70255
2861 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2862 on a declaration following the definition.
2863
351f85c5
JJ
28642016-05-05 Jakub Jelinek <jakub@redhat.com>
2865
2866 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2867 parse it through to c_parser_c99_block_statement.
2868 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2869 caller.
2870
deef7113
MP
28712016-05-04 Marek Polacek <polacek@redhat.com>
2872
2873 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2874 OPT_Wdangling_else.
2875
de55efd5
MP
28762016-05-04 Marek Polacek <polacek@redhat.com>
2877
2878 PR c/48778
2879 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2880 for macro expansions.
2881
79ce98bc
MP
28822016-05-03 Marek Polacek <polacek@redhat.com>
2883
2884 PR c/70859
2885 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2886 check_builtin_function_arguments.
2887
fb2647aa
RB
28882016-05-03 Richard Biener <rguenther@suse.de>
2889
2890 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2891 the checksum from the previous stage.
2892
77886428
CP
28932016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2894
2895 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2896 c_finish_omp_clauses.
2897 (c_parser_omp_all_clauses): Likewise.
2898 (c_parser_oacc_cache): Likewise.
2899 (c_parser_oacc_loop): Likewise.
2900 (omp_split_clauses): Likewise.
2901 (c_parser_omp_declare_target): Likewise.
2902 (c_parser_cilk_all_clauses): Likewise.
2903 (c_parser_cilk_for): Likewise.
2904 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2905 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2906
7176a4a0
MP
29072016-05-02 Marek Polacek <polacek@redhat.com>
2908
2909 PR c/70851
2910 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2911 incomplete type.
2912
e7ff0319
CP
29132016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2914
2915 PR middle-end/70626
2916 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2917 OACC_LOOP_CLAUSE_MASK.
2918 (c_parser_oacc_kernels_parallel): Update call to
2919 c_oacc_split_loop_clauses.
2920
9f405ce1
AM
29212016-04-28 Andrew MacLeod <amacleod@redhat.com>
2922
2923 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2924 argument to build_modify_expr in two cases.
2925
c1e1f433
BS
29262016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2927
2928 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2929 warn_for_memset instead of warning directly here.
2930
2448a956
MP
29312016-04-26 Marek Polacek <polacek@redhat.com>
2932
2933 PR c/67784
2934 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2935 out of ...
2936 (c_parser_for_statement): ... here.
2937 (c_parser_if_statement): Use it.
2938 (c_parser_switch_statement): Use it.
2939 (c_parser_while_statement): Use it.
2940
b02a5e26
MP
2941 PR c/70791
2942 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2943
477d4906
IV
29442016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2945
2946 PR c++/69363
2947 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2948 instead of c_finish_cilk_clauses.
2949 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2950 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2951 floating-point variables in the linear clause for Cilk Plus.
2952
fe37c7af
MM
29532016-04-18 Michael Matz <matz@suse.de>
2954
2955 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2956 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2957
949505a9
MP
29582016-04-15 Marek Polacek <polacek@redhat.com>
2959
2960 PR c/70671
2961 * c-typeck.c (build_unary_op): Pass location down to error and
2962 warning call.
2963
dda1bf61
JJ
29642016-04-15 Jakub Jelinek <jakub@redhat.com>
2965
2966 PR c/70436
2967 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2968 where needed.
2969 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2970 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2971 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2972 Adjust c_parser_pragma callers.
2973 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2974 caller.
2975 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2976 c_parser_statement.
2977 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2978 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2979 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2980 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2981 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2982 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2983 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2984 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2985 down where needed.
2986 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2987 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2988 calls.
2989
99cd9857
MP
29902016-04-13 Marek Polacek <polacek@redhat.com>
2991
2992 PR c/70436
2993 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2994 adjust callers.
2995 (c_parser_statement): Likewise.
2996 (c_parser_c99_block_statement): Likewise.
2997 (c_parser_while_statement): Likewise.
2998 (c_parser_for_statement): Likewise.
2999 (c_parser_if_body): Don't set IF_P here.
3000 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3001 about dangling else here.
3002 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3003 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3004 warn about dangling else here.
3005
f13355da
MP
30062016-04-04 Marek Polacek <polacek@redhat.com>
3007
3008 PR c/70307
3009 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3010
5fde6a45
MP
30112016-03-31 Marek Polacek <polacek@redhat.com>
3012
3013 PR c/70297
3014 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3015
4bbf545b
DM
30162016-03-18 David Malcolm <dmalcolm@redhat.com>
3017
3018 PR c/70281
3019 * c-parser.c (c_parser_postfix_expression): Set the source range
3020 for uses of "__builtin_types_compatible_p".
3021
fcc2b74f
JJ
30222016-03-17 Jakub Jelinek <jakub@redhat.com>
3023
3024 PR c/70280
3025 * c-typeck.c (composite_type): Don't count void_list_node
3026 into len, if the list is terminated by void_list_node, start
3027 with void_list_node instead of NULL for newargs. Stop
3028 at void_list_node.
3029
ab4c578f
MP
30302016-03-16 Marek Polacek <polacek@redhat.com>
3031
3032 PR c/70093
3033 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3034 nested functions returning VM types.
3035
96b3c82d
CP
30362016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3037
3038 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3039 when calling c_finish_omp_clauses.
3040
29b9828f
BS
30412016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3042
3043 PR c/69824
3044 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3045 for later.
3046
7ff6ca38
MP
30472016-03-04 Marek Polacek <polacek@redhat.com>
3048
3049 PR c/69798
3050 * c-parser.c (c_parser_postfix_expression): Call
3051 c_parser_cast_expression rather than c_parser_postfix_expression.
3052
686e2237
JJ
30532016-03-01 Jakub Jelinek <jakub@redhat.com>
3054
3055 PR c/69796
3056 PR c/69974
3057 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3058 of incomplete decls to error_mark_node.
3059
0b05329b
MP
30602016-02-24 Marek Polacek <polacek@redhat.com>
3061
3062 PR c/69819
3063 * c-decl.c (finish_decl): Don't update the copy of the type of a
3064 different decl type.
3065
067fbd8b
JJ
30662016-02-23 Jakub Jelinek <jakub@redhat.com>
3067
3068 PR objc/69844
3069 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3070 in id_kind reclassification.
3071
bf14eba2
JJ
30722016-02-16 Jakub Jelinek <jakub@redhat.com>
3073
3074 PR c/69835
3075 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3076
ba539195
JN
30772016-02-16 James Norris <jnorris@codesourcery.com>
3078
3079 PR c/64748
3080 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3081
16595a1f
BS
30822016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3083
f48dfe98
BS
3084 * c-decl.c (build_null_declspecs): Zero the entire struct.
3085
16595a1f
BS
3086 PR c/69522
3087 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3088 callers changed. If nested_p is true, use it to call
3089 finish_implicit_inits.
3090 * c-tree.h (finish_implicit_inits): Declare.
3091 * c-typeck.c (finish_implicit_inits): New function. Move code
3092 from ...
3093 (push_init_level): ... here.
3094 (set_designator, process_init_element): Call finish_implicit_inits.
3095
66756373
JJ
30962016-02-11 Jakub Jelinek <jakub@redhat.com>
3097
3098 PR c/69768
3099 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3100 arguments for -Waddress warning.
3101
1066e9b5
JJ
31022016-02-04 Jakub Jelinek <jakub@redhat.com>
3103
3104 PR c/69669
3105 * c-decl.c (finish_enum): When honoring mode attribute,
3106 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3107
3a5d2ba4
JJ
31082016-01-29 Jakub Jelinek <jakub@redhat.com>
3109
3110 PR debug/69518
3111 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3112 all type variants, not just TYPE_MAIN_VARIANT.
3113
cbdd8ae0
JJ
31142016-01-27 Jakub Jelinek <jakub@redhat.com>
3115
3116 PR debug/66869
3117 * c-decl.c (c_write_global_declarations_1): Warn with
3118 warn_unused_function if static prototype without definition
3119 is not C_DECL_USED.
3120
fa74a4bc
MP
31212016-01-27 Marek Polacek <polacek@redhat.com>
3122
3123 PR c/68062
3124 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3125 to unsigned, if needed. Add -Wsign-compare warning.
3126
13f92e8d
JJ
31272016-01-26 Jakub Jelinek <jakub@redhat.com>
3128
3129 PR tree-optimization/69483
3130 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3131
cd8e73dc 31322016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3133
3134 PR c/24293
3135 * c-tree.h (incomplete_record_decls): Declare.
3136 * c-parser.c (incomplete_record_decls): Define.
3137 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3138 report error if any decl has zero size.
3139 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3140 or enum type to incomplete_record_decls.
3141
e6d6ec9e
TV
31422016-01-14 Tom de Vries <tom@codesourcery.com>
3143
3144 PR tree-optimization/68773
3145 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3146 set force_output.
3147
00083992
MP
31482016-01-14 Marek Polacek <polacek@redhat.com>
3149
3150 PR c/69262
3151 * c-decl.c (grokdeclarator): Provide more information for invalid
3152 array declarations.
3153
7443cf13
DM
31542016-01-06 David Malcolm <dmalcolm@redhat.com>
3155
3156 * c-parser.c (c_parser_unary_expression): For dereferences, build
3157 a combined location before calling build_indirect_ref, so that
3158 error reports cover the full range, manually updating the c_expr
3159 src_range.
3160
6b131d5b
MP
31612016-01-06 Marek Polacek <polacek@redhat.com>
3162
3163 PR sanitizer/69099
3164 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3165 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3166 NULL.
3167
818ab71a
JJ
31682016-01-04 Jakub Jelinek <jakub@redhat.com>
3169
3170 Update copyright years.
3171
2fe0a208
MP
31722016-01-04 Marek Polacek <polacek@redhat.com>
3173
3174 PR c/68908
3175 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3176 optimization to use __atomic_fetch_* built-in if possible.
3177
c7b48c8a
TS
31782015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3179
3180 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3181 into...
3182 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3183 all users.
3184
fda5652f
MP
31852015-12-22 Marek Polacek <polacek@redhat.com>
3186
3187 PR c/69002
3188 * c-typeck.c (build_component_ref): Warn when acessing elements of
3189 atomic structures or unions.
3190
745e411d
DM
31912015-12-21 David Malcolm <dmalcolm@redhat.com>
3192
3193 * c-typeck.c: Include "gcc-rich-location.h".
3194 (build_binary_op): In the two places that call binary_op_error,
3195 create a gcc_rich_location and populate it with the location of
3196 the binary op and its two operands.
3197
94c40e19
DM
31982015-12-16 David Malcolm <dmalcolm@redhat.com>
3199
3200 * c-parser.c (c_parser_statement_after_labels): When calling
3201 c_finish_return, Use the return expression's location if it has
3202 one, falling back to the location of the first token within it.
3203 * c-typeck.c (c_finish_return): When issuing warnings about
3204 the incorrect presence/absence of a return value, issue a note
3205 showing the declaration of the function.
3206
de67c4c3
DM
32072015-12-16 David Malcolm <dmalcolm@redhat.com>
3208
3209 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3210 to 4.
3211 (c_parser_peek_nth_token): New function.
3212 (c_parser_peek_conflict_marker): New function.
3213 (c_parser_error): Detect conflict markers and report them as such.
3214
a10704e1
DM
32152015-12-16 David Malcolm <dmalcolm@redhat.com>
3216
3217 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3218 to preserve range information for the primary expression
3219 in the call to c_parser_postfix_expression_after_primary.
3220
8062bca6
DM
32212015-12-16 David Malcolm <dmalcolm@redhat.com>
3222
3223 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3224 expression location, falling back on the first token location,
3225 rather than always using the latter.
3226
d06f8b75
MP
32272015-12-16 Marek Polacek <polacek@redhat.com>
3228
3229 PR c/64637
3230 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3231 available.
3232
2994fb91
MP
32332015-12-15 Marek Polacek <polacek@redhat.com>
3234
3235 PR c/68907
3236 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3237 artificial decl.
3238
a1b93f8d
DM
32392015-12-08 David Malcolm <dmalcolm@redhat.com>
3240
3241 * c-parser.c (c_parser_alignof_expression): Capture location of
3242 closing parenthesis (if any), or of end of unary expression, and
3243 use it to build a src_range for the expression.
3244
46c6e1e2
DM
32452015-12-08 David Malcolm <dmalcolm@redhat.com>
3246
3247 PR c/68757
3248 * c-parser.c (c_parser_get_builtin_args): Add
3249 "out_close_paren_loc" param, and write back to it.
3250 (c_parser_postfix_expression): Capture the closing
3251 parenthesis location for RID_CHOOSE_EXPR,
3252 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3253 RID_BUILTIN_SHUFFLE and use it to set the source range
3254 for such expressions; within RID_BUILTIN_COMPLEX set
3255 the underlying location.
3256
66189108
MP
32572015-12-07 Marek Polacek <polacek@redhat.com>
3258
3259 PR c/68668
3260 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3261 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3262
f187980b
EB
32632015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3264
3265 * c-tree.h (c_build_va_arg): Adjust prototype.
3266 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3267 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3268 parameter, adjust throughout and issue an error if EXPR is a component
3269 with reverse storage order.
3270
4250754e
JM
32712015-12-02 Jason Merrill <jason@redhat.com>
3272
3273 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3274 (c_fully_fold_internal, decl_constant_value_for_optimization):
3275 Move from c-common.c.
3276 * c-tree.h: Declare decl_constant_value_for_optimization.
3277 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3278
e9e32ee6
JM
32792015-12-02 Joseph Myers <joseph@codesourcery.com>
3280
3281 PR c/68162
3282 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3283 following link from declarator to next declarator. Track original
3284 qualified type and pass it to c_build_qualified_type.
3285 * c-typeck.c (c_build_qualified_type): Add arguments
3286 orig_qual_type and orig_qual_indirect.
3287
ff7a55bf
TS
32882015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3289
3290 * c-parser.c (c_parser_omp_clause_name)
3291 (c_parser_oacc_all_clauses): Alphabetical sorting.
3292
657e4e47
JJ
32932015-12-02 Jakub Jelinek <jakub@redhat.com>
3294
3295 PR c/68533
3296 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3297 for diagnostics.
3298
37d5ad46
JB
32992015-12-01 Julian Brown <julian@codesourcery.com>
3300 Cesar Philippidis <cesar@codesourcery.com>
3301 James Norris <James_Norris@mentor.com>
3302
3303 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3304 (c_parser_oacc_clause_use_device): New function.
3305 (c_parser_oacc_all_clauses): Add use_device support.
3306 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3307 (c_parser_oacc_host_data): New function.
3308 (c_parser_omp_construct): Add host_data support.
3309 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3310 * c-typeck.c (c_finish_oacc_host_data): New function.
3311 (c_finish_omp_clauses): Add use_device support.
3312
a4850ce9
JH
33132015-11-29 Jan Hubicka <hubicka@ucw.cz>
3314
3315 PR c/67106
3316 * c-decl.c: Set TYPE_PACKED in variants.
3317
b58d3df2
ML
33182015-11-27 Martin Liska <mliska@suse.cz>
3319
3320 PR c++/68312
3321 * c-array-notation.c (fix_builtin_array_notation_fn):
3322 Use release_vec_vec instead of vec::release.
3323 (build_array_notation_expr): Likewise.
3324 (fix_conditional_array_notations_1): Likewise.
3325 (fix_array_notation_expr): Likewise.
3326 (fix_array_notation_call_expr): Likewise.
3327
aec17bfe
JJ
33282015-11-27 Jakub Jelinek <jakub@redhat.com>
3329
3330 PR c/63326
3331 * c-parser.c (c_parser_compound_statement_nostart): If
3332 last_label is true, use pragma_stmt instead of pragma_compound
3333 as second c_parser_pragma argument.
3334 (c_parser_omp_ordered, c_parser_omp_target_update,
3335 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3336 false as second argument to c_parser_skip_to_pragma_eol after
3337 diagnosing standalone directives used in pragma_stmt context.
3338
688c4de0
IV
33392015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3340
3341 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3342 with "if (ENABLE_OFFLOADING)".
3343
cbd03aee
DM
33442015-11-23 David Malcolm <dmalcolm@redhat.com>
3345
3346 PR objc/68438
3347 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3348 for various Objective-C constructs: Class.name syntax,
3349 @selector(), @protocol(), @encode(), and [] message syntax.
3350
a87a86e1
DM
33512015-11-20 David Malcolm <dmalcolm@redhat.com>
3352
3353 PR 62314
3354 * c-typeck.c (should_suggest_deref_p): New function.
3355 (build_component_ref): Special-case POINTER_TYPE when
3356 generating a "not a structure of union" error message, and
3357 suggest a "->" rather than a ".", providing a fix-it hint.
3358
8ece8dfb
DM
33592015-11-19 David Malcolm <dmalcolm@redhat.com>
3360
3361 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3362 candidate into a new function, find_closest_identifier.
3363
433068cc
MP
33642015-11-19 Marek Polacek <polacek@redhat.com>
3365
3366 PR c/68412
3367 * c-typeck.c (parser_build_binary_op): Properly handle
3368 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3369
bef08b71
DM
33702015-11-17 David Malcolm <dmalcolm@redhat.com>
3371
3372 * c-parser.c (set_c_expr_source_range): Bulletproof both
3373 overloaded implementations against NULL expr->value.
3374 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3375 values.
3376 (c_parser_unary_expression): Likewise when handling addresses of
3377 labels.
3378 (c_parser_postfix_expression): Likewise for statement expressions,
3379 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3380 __builtin_va_arg, and for __builtin_offset_of.
3381 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3382 src_range using the range of the braced initializer.
3383 (c_parser_transaction_expression): Set src_range for "ret" to a
3384 sane pair of values.
3385
fff77217
KY
33862015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3387
3388 * c-parser.c (c_finish_omp_declare_simd): Look for
3389 "simd" attribute as well. Update error message.
3390
1d899da2
TS
33912015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3392
3393 * c-parser.c (c_parser_omp_declare_target): Adjust.
3394
e4606348
JJ
33952015-11-14 Jakub Jelinek <jakub@redhat.com>
3396
3397 * c-typeck.c (c_finish_omp_clauses): Don't mark
3398 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3399
3e636daf
MP
34002015-11-14 Marek Polacek <polacek@redhat.com>
3401
3402 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3403 * c-typeck.c: Likewise.
3404
ebedc9a3
DM
34052015-11-13 David Malcolm <dmalcolm@redhat.com>
3406
3407 * c-decl.c (warn_defaults_to): Pass line_table to
3408 rich_location ctor.
3409 * c-errors.c (pedwarn_c99): Likewise.
3410 (pedwarn_c90): Likewise.
3411 * c-parser.c (set_c_expr_source_range): New functions.
3412 (c_token::get_range): New method.
3413 (c_token::get_finish): New method.
3414 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3415 based on the range from the start of the LHS to the end of the
3416 RHS.
3417 (c_parser_conditional_expression): Likewise, based on the range
3418 from the start of the cond.value to the end of exp2.value.
3419 (c_parser_binary_expression): Call set_c_expr_source_range on
3420 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3421 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3422 based on the cast_loc through to the end of the expr.
3423 (c_parser_unary_expression): Likewise, based on the
3424 op_loc through to the end of op.
3425 (c_parser_sizeof_expression) Likewise, based on the start of the
3426 sizeof token through to either the closing paren or the end of
3427 expr.
3428 (c_parser_postfix_expression): Likewise, using the token range,
3429 or from the open paren through to the close paren for
3430 parenthesized expressions.
3431 (c_parser_postfix_expression_after_primary): Likewise, for
3432 various kinds of expression.
3433 * c-tree.h (struct c_expr): Add field "src_range".
3434 (c_expr::get_start): New method.
3435 (c_expr::get_finish): New method.
3436 (set_c_expr_source_range): New decls.
3437 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3438 on ret for prefix unary ops.
3439 (parser_build_binary_op): Likewise, running from the start of
3440 arg1.value through to the end of arg2.value.
3441
ec8b536f
MP
34422015-11-13 Marek Polacek <polacek@redhat.com>
3443
3444 PR c/68320
3445 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3446
277fe616
DM
34472015-11-13 David Malcolm <dmalcolm@redhat.com>
3448
3449 * c-typeck.c: Include spellcheck.h.
3450 (lookup_field_fuzzy_find_candidates): New function.
3451 (lookup_field_fuzzy): New function.
3452 (build_component_ref): If the field was not found, try using
3453 lookup_field_fuzzy and potentially offer a suggestion.
3454
6e232ba4
JN
34552015-11-12 James Norris <jnorris@codesourcery.com>
3456 Joseph Myers <joseph@codesourcery.com>
3457
3458 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3459 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3460 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3461 and PRAGMA_OMP_CLAUSE_LINK.
3462 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3463 and PRAGMA_OACC_CLAUSE_LINK.
3464 (OACC_DECLARE_CLAUSE_MASK): New definition.
3465 (c_parser_oacc_declare): New function.
3466
9be4f715
MP
34672015-11-12 Marek Polacek <polacek@redhat.com>
3468
3469 PR c/67784
3470 * c-parser.c (c_parser_for_statement): Reclassify the token in
3471 a correct scope.
3472
e78bede6
MP
34732015-11-11 Marek Polacek <polacek@redhat.com>
3474
3475 PR c/68107
3476 PR c++/68266
3477 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3478 checking the size of an array.
3479
69f293c9
AM
34802015-11-11 Andrew MacLeod <amacleod@redhat.com>
3481
3482 * c-array-notation.c: Remove unused header files.
3483 * c-aux-info.c: Likewise.
3484 * c-convert.c: Likewise.
3485 * c-decl.c: Likewise.
3486 * c-errors.c: Likewise.
3487 * c-lang.c: Likewise.
3488 * c-objc-common.c: Likewise.
3489 * c-parser.c: Likewise.
3490 * c-typeck.c: Likewise.
3491 * gccspec.c: Likewise.
3492
3a40d81d
NS
34932015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3494 Cesar Philippidis <cesar@codesourcery.com>
3495 James Norris <jnorris@codesourcery.com>
3496 Julian Brown <julian@codesourcery.com>
3497 Nathan Sidwell <nathan@codesourcery.com>
3498
3499 c/
3500 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3501 routine arg.
3502 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3503 (c_parser_pragma): Parse 'acc routine'.
3504 (OACC_ROUTINE_CLAUSE_MARK): Define.
3505 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3506
fc402eec
AA
35072015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3508
3509 PR debug/67192
3510 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3511 location of the backward-goto to the start of the loop body.
3512
f6b0b3db
AA
35132015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3514
3515 PR debug/67192
3516 * c-parser.c (c_parser_while_statement): Finish the loop before
3517 parsing ahead for misleading indentation.
3518 (c_parser_for_statement): Likewise.
3519
ee45a32d
EB
35202015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3521
3522 * c-decl.c (finish_struct): If the structure has reverse storage
3523 order, rewrite the type of array fields with scalar component. Call
3524 maybe_apply_pragma_scalar_storage_order on entry.
3525 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3526 errors on bit-fields and reverse SSO here and not...
3527 (c_mark_addressable): ...here.
3528 (output_init_element): Adjust call to initializer_constant_valid_p.
3529 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3530
8a645150
DM
35312015-11-06 David Malcolm <dmalcolm@redhat.com>
3532
3533 * c-decl.c (warn_defaults_to): Update for change in signature
3534 of diagnostic_set_info.
3535 * c-errors.c (pedwarn_c99): Likewise.
3536 (pedwarn_c90): Likewise.
3537 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3538 for textinfo::set_location.
3539
7a5e4956
CP
35402015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3541 Thomas Schwinge <thomas@codesourcery.com>
3542 James Norris <jnorris@codesourcery.com>
3543
3544 * c-parser.c (c_parser_omp_clause_name): Add support for
3545 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3546 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3547 default(none) in OpenACC.
3548 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3549 arguments.
3550 (c_parser_oacc_clause_tile): New function.
3551 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3552 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3553 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3554 TILE}.
3555 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3556 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3557 FIRSTPRIVATE}.
3558 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3559 (c_parser_oacc_update): Update the error message for missing clauses.
3560 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3561 and OMP_CLAUSE_INDEPENDENT.
3562
bfcfbfa0
MP
35632015-11-05 Marek Polacek <polacek@redhat.com>
3564
3565 PR c/68090
3566 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3567 deal with pre-evaluation on invalid types.
3568
e01d41e5
JJ
35692015-11-05 Jakub Jelinek <jakub@redhat.com>
3570 Ilya Verbin <ilya.verbin@intel.com>
3571
3572 * c-parser.c: Include context.h and gimple-expr.h.
3573 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3574 monotonic together with nonmonotonic.
3575 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3576 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3577 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3578 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3579 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3580 expressions on combined target teams before the target.
3581 (c_parser_omp_declare_target): If decl has "omp declare target" or
3582 "omp declare target link" attribute, and cgraph or varpool node already
3583 exists, then set corresponding flags. Call c_finish_omp_clauses
3584 in the parenthesized extended-list syntax case.
3585 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3586 declare target.
3587 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3588 on OMP_CLAUSE_REDUCTION array sections.
3589 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3590 into the constant offset, or for variable low-bound using
3591 POINTER_PLUS_EXPR. For structure element based array sections use
3592 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3593 (c_finish_omp_clauses): Drop generic_field_head, structure
3594 elements are now always mapped even as array section bases,
3595 diagnose same var in data sharing and mapping clauses. Diagnose if
3596 linear step on declare simd is neither a constant nor a uniform
3597 parameter. Look through POINTER_PLUS_EXPR for array section
3598 reductions. Diagnose the same var or function appearing multiple
3599 times on the same directive. Fix up wording for the to clause if t
3600 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3601 modifier on kinds other than dynamic or guided or nonmonotonic
3602 modifier together with ordered clause.
3603
4bf9e5a8
TS
36042015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3605 Chung-Lin Tang <cltang@codesourcery.com>
3606
3607 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3608
2adfab87
AM
36092015-10-29 Andrew MacLeod <amacleod@redhat.com>
3610
3611 * c-array-notation.c: Reorder #include's and remove duplicates.
3612 * c-aux-info.c: Likewise.
3613 * c-convert.c: Likewise.
3614 * c-decl.c: Likewise.
3615 * c-errors.c: Likewise.
3616 * c-lang.c: Likewise.
3617 * c-objc-common.c: Likewise.
3618 * c-parser.c: Likewise.
3619 * c-typeck.c: Likewise.
3620
e922069e
JW
36212015-10-26 Jim Wilson <jim.wilson@linaro.org>
3622
3623 PR debug/66068
3624 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3625 after calling build_qualified_type.
3626
765dd391
CP
36272015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3628 Thomas Schwinge <thomas@codesourcery.com>
3629 James Norris <jnorris@codesourcery.com>
3630 Joseph Myers <joseph@codesourcery.com>
3631 Julian Brown <julian@codesourcery.com>
3632 Bernd Schmidt <bschmidt@redhat.com>
3633
3634 * c-parser.c (c_parser_oacc_shape_clause): New.
3635 (c_parser_oacc_simple_clause): New.
3636 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3637 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3638
88bae6f4
TS
36392015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3640 James Norris <jnorris@codesourcery.com>
3641 Cesar Philippidis <cesar@codesourcery.com>
3642
3643 PR c/64765
3644 PR c/64880
3645 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3646 parameters, and handle these. Adjust all users.
3647 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3648 into...
3649 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3650 all users.
3651 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3652 declare functions.
3653 (c_finish_omp_construct): Declare function.
3654 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3655 Merge functions into...
3656 (c_finish_omp_construct): ... this new function.
3657
a8fc2579
RB
36582015-10-22 Richard Biener <rguenther@suse.de>
3659
3660 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3661 before folding a MINUS_EXPR.
3662
e9122ef6
MP
36632015-10-21 Marek Polacek <polacek@redhat.com>
3664
3665 PR c/68024
3666 * c-decl.c (start_function): Warn about vararg functions without
3667 a prototype.
3668
9f47c7e5
IE
36692015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3670
3671 * c-typeck.c (build_conditional_expr): Use boolean vector
3672 type for vector comparison.
3673 (build_vec_cmp): New.
3674 (build_binary_op): Use build_vec_cmp for comparison.
3675
fa60eeb9
MP
36762015-10-20 Marek Polacek <polacek@redhat.com>
3677
3678 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3679
2c7020eb
MP
36802015-10-20 Marek Polacek <polacek@redhat.com>
3681
3682 PR c/67964
3683 * c-parser.c (c_parser_attributes): Break out of the loop if the
3684 token after an attribute isn't a comma.
3685
d9a6bd32
JJ
36862015-10-13 Jakub Jelinek <jakub@redhat.com>
3687 Aldy Hernandez <aldyh@redhat.com>
3688
3689 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3690 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3691 (c_parser_omp_variable_list): Handle structure elements for
3692 map, to and from clauses. Handle array sections in reduction
3693 clause. Formatting fixes.
3694 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3695 if clause modifiers.
3696 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3697 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3698 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3699 c_parser_omp_clause_is_device_ptr): New functions.
3700 (c_parser_omp_clause_ordered): Parse optional parameter.
3701 (c_parser_omp_clause_reduction): Handle array reductions.
3702 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3703 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3704 functions.
3705 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3706 (c_parser_omp_clause_depend_sink): New function.
3707 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3708 (c_parser_omp_clause_map): Parse release/delete map kinds and
3709 optional always modifier.
3710 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3711 and c_finish_omp_clauses callers.
3712 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3713 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3714 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3715 (OMP_CRITICAL_CLAUSE_MASK): Define.
3716 (c_parser_omp_critical): Parse critical clauses.
3717 (c_parser_omp_for_loop): Handle doacross loops, adjust
3718 c_finish_omp_for and c_finish_omp_clauses callers.
3719 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3720 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3721 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3722 (c_parser_omp_for): Disallow ordered clause when combined with
3723 distribute. Disallow linear clause when combined with distribute
3724 and not combined with simd.
3725 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3726 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3727 parse clauses and if depend clause is found, don't parse a body.
3728 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3729 Allow target parallel without for after it.
3730 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3731 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3732 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3733 invalid kinds.
3734 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3735 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3736 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3737 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3738 functions.
3739 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3740 defaultmap and is_device_ptr clauses.
3741 (c_parser_omp_target): Parse target parallel and target simd. Set
3742 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3743 and target exit data. Diagnose invalid map kinds.
3744 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3745 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3746 construct.
3747 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3748 &omp_priv.
3749 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3750 (c_parser_omp_taskloop): New function.
3751 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3752 handle PRAGMA_OMP_TASKLOOP.
3753 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3754 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3755 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3756 Add IS_OMP argument, handle structure element bases, diagnose
3757 bitfields, pass IS_OMP recursively, diagnose known zero length
3758 array sections in depend clauses, handle array sections in reduction
3759 clause, diagnose negative length even for pointers.
3760 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3761 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3762 array sections in reduction clause, set
3763 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3764 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3765 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3766 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3767
21ba0cea
MP
37682015-10-06 Marek Polacek <polacek@redhat.com>
3769
3770 * c-parser.c (c_parser_statement_after_labels): Use
3771 protected_set_expr_location.
3772 (c_parser_omp_clause_num_gangs): Likewise.
3773 (c_parser_omp_clause_num_threads): Likewise.
3774 (c_parser_omp_clause_num_workers): Likewise.
3775 (c_parser_omp_clause_vector_length): Likewise.
3776 (c_parser_omp_clause_num_teams): Likewise.
3777 (c_parser_omp_clause_thread_limit): Likewise.
3778 * c-typeck.c (build_c_cast): Likewise.
3779 (c_cast_expr): Likewise.
3780
624d31fe
RS
37812015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3782
3783 * c-typeck.c (c_tree_equal): Use real_equal instead of
3784 REAL_VALUES_EQUAL.
3785
b8fd7909
JM
37862015-10-04 Jason Merrill <jason@redhat.com>
3787
3788 * c-parser.c (c_lex_one_token): Handle @synchronized.
3789 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3790 can change whether the function is transaction_safe.
3791
1c7485af
MP
37922015-10-02 Marek Polacek <polacek@redhat.com>
3793
3794 PR c/67730
3795 * c-typeck.c (convert_for_assignment): Use the expansion point
3796 location throughout.
3797
3e3b8d63
MP
37982015-10-02 Marek Polacek <polacek@redhat.com>
3799
3800 PR c/64249
3801 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3802 and pass it down to c_parser_if_statement.
3803 (c_parser_else_body): Add CHAIN parameter and pass it down to
3804 c_parser_statement_after_labels.
3805 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3806 duplicated if-else-if conditions.
3807
aabef2de
MP
38082015-10-01 Marek Polacek <polacek@redhat.com>
3809
3810 * c-typeck.c (convert_for_assignment): Improve commentary.
3811
de8ddd5f
MP
38122015-09-30 Marek Polacek <polacek@redhat.com>
3813
3814 PR c/67730
3815 * c-typeck.c (c_finish_return): Use the expansion point location for
3816 certain "return with value" warnings.
3817
c4914de6
MLI
38182015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3819
3820 * c-parser.c (pragma_lex): Add loc argument.
3821
0e36f5c7
MP
38222015-09-15 Marek Polacek <polacek@redhat.com>
3823
3824 PR c/67580
3825 * c-decl.c (tag_exists_p): New function.
3826 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3827 struct/union/enum keywords are missing.
3828 * c-tree.h (tag_exists_p): Declare.
3829
2f3bb934
MP
38302015-09-15 Marek Polacek <polacek@redhat.com>
3831
3832 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3833 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3834 Return NULL_TREE instead of 0.
3835 (lookup_name): Return NULL_TREE instead of 0.
3836 (lookup_name_in_scope): Likewise.
3837 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3838 (parser_xref_tag): Use false instead of 0.
3839 (start_struct): Use true instead of 1.
3840 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3841
aa256c4a
MP
38422015-09-14 Marek Polacek <polacek@redhat.com>
3843
3844 * c-typeck.c (set_nonincremental_init_from_string): Use
3845 HOST_WIDE_INT_M1U when shifting a negative value.
3846
dbb68221
MW
38472015-09-09 Mark Wielaard <mjw@redhat.com>
3848
3849 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3850 parm against NULL.
3851
a8a098ac
JJ
38522015-09-10 Jakub Jelinek <jakub@redhat.com>
3853
3854 PR c/67502
3855 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3856 into OMP_FOR_PRE_BODY rather than before the loop.
3857
f4b189d5
JJ
38582015-09-09 Jakub Jelinek <jakub@redhat.com>
3859
0bb99c11
JJ
3860 PR c/67501
3861 * c-parser.c (c_parser_oacc_all_clauses,
3862 c_parser_omp_all_clauses): Remove invalid clause from
3863 list of clauses even if parser->error is set.
3864
fce5e5e3
JJ
3865 PR c/67500
3866 * c-parser.c (c_parser_omp_clause_aligned,
3867 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3868 test for errors.
3869 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3870 error_mark_node.
3871
f4b189d5
JJ
3872 PR c/67495
3873 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3874 instead of c_parser_unary_expression. If the result is !lvalue_p,
3875 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3876
b2aaf235
MP
38772015-09-04 Marek Polacek <polacek@redhat.com>
3878
3879 PR sanitizer/67279
3880 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3881
1807ffc1
MS
38822015-09-03 Martin Sebor <msebor@redhat.com>
3883
3884 PR c/66516
8b652e65
JJ
3885 * c-typeck.c (convert_arguments, parser_build_unary_op,
3886 build_conditional_expr, c_cast_expr, convert_for_assignment,
3887 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3888 reject_gcc_builtin.
3889 (c_decl_implicit): Define.
3890
d04ff417
MP
38912015-09-02 Marek Polacek <polacek@redhat.com>
3892
3893 PR c/67432
3894 * c-parser.c (c_parser_enum_specifier): Give a better error for
3895 an empty enum.
3896
a79683d5
TS
38972015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3898
3899 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3900
191a6b94
MP
39012015-08-12 Marek Polacek <polacek@redhat.com>
3902
3903 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3904 LOC to it.
3905
420a9d9b
MP
39062015-08-03 Marek Polacek <polacek@redhat.com>
3907
3908 PR c/67088
3909 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3910 Use it.
3911 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3912
992118a1
PP
39132015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3914
3915 * c-parser.c (c_parser_if_body): Take token_indent_info
3916 argument. Call warn_for_misleading_indentation even when the
3917 body is a semicolon. Extract token_indent_infos corresponding
3918 to the guard, body and next tokens. Adjust call to
3919 warn_for_misleading_indentation accordingly.
3920 (c_parser_else_body): Likewise.
3921 (c_parser_if_statement): Likewise.
3922 (c_parser_while_statement): Likewise.
3923 (c_parser_for_statement): Likewise.
3924
46308474
LFSM
39252015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3926 Manuel López-Ibáñez <manu@gcc.gnu.org>
3927
3928 * c-decl.c (get_parm_info): Remove static var. Update warning
3929 message.
3930
05b28fd6
MP
39312015-07-27 Marek Polacek <polacek@redhat.com>
3932
3933 PR c++/66555
3934 PR c/54979
3935 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3936
451b5e48
MP
39372015-07-20 Marek Polacek <polacek@redhat.com>
3938
3939 PR c++/55095
3940 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3941 (build_binary_op): Warn about left shift overflows.
3942
1916bcb5
AM
39432015-07-09 Andrew MacLeod <amacleod@redhat.com>
3944
3945 * c-array-notation.c: Adjust includes for flags.h changes.
3946 * c-objc-common.c: Likewise.
3947
c7131fb2
AM
39482015-07-07 Andrew MacLeod <amacleod@redhat.com>
3949
3950 * c-array-notation.c: Adjust includes.
3951 * c-aux-info.c: Likewise.
3952 * c-convert.c: Likewise.
3953 * c-decl.c: Likewise.
3954 * c-errors.c: Likewise.
3955 * c-lang.c: Likewise.
3956 * c-objc-common.c: Likewise.
3957 * c-parser.c: Likewise.
3958 * c-typeck.c: Likewise.
3959
da2e71c9
MLI
39602015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3961
3962 PR fortran/66605
3963 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3964
b155cfd9
MP
39652015-06-29 Marek Polacek <polacek@redhat.com>
3966
3967 PR c/66322
3968 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3969 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3970 about -Wswitch-bool here.
3971 (do_case): Update c_add_case_label call.
3972 (c_finish_case): Update c_do_switch_warnings call.
3973
31521951
MP
39742015-06-27 Marek Polacek <polacek@redhat.com>
3975
3976 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3977
22d03525
MP
39782015-06-26 Marek Polacek <polacek@redhat.com>
3979
3980 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3981 INDIRECT_REF_P.
3982 * c-typeck.c (array_to_pointer_conversion): Likewise.
3983 (build_unary_op): Likewise.
3984 (c_finish_return): Likewise.
3985
f0889939
AM
39862015-06-25 Andrew MacLeod <amacleod@redhat.com>
3987
3988 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3989 * c-parser.c: Likewise.
3990
8d67ee55
RS
39912015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3992
3993 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3994 instead of pointer_hash.
3995 (detect_field_duplicates): Likewise.
3996
0ae9bd27
MP
39972015-06-25 Marek Polacek <polacek@redhat.com>
3998
3999 * c-array-notation.c: Use VAR_P throughout.
4000 * c-decl.c: Likewise.
4001 * c-objc-common.c: Likewise.
4002 * c-parser.c: Likewise.
4003 * c-typeck.c: Likewise.
4004
62f9079a
MP
40052015-06-25 Marek Polacek <polacek@redhat.com>
4006
4007 * c-decl.c: Use is_global_var throughout.
4008 * c-parser.c: Likewise.
4009 * c-typeck.c: Likewise.
4010
abb226c9
AM
40112015-06-17 Andrew MacLeod <amacleod@redhat.com>
4012
4013 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4014 * c-aux-info.c: Likewise.
4015 * c-convert.c: Likewise.
4016 * c-decl.c: Likewise.
4017 * c-errors.c: Likewise.
4018 * c-lang.c: Likewise.
4019 * c-objc-common.c: Likewise.
4020 * c-parser.c: Likewise.
4021 * c-typeck.c: Likewise.
4022
8cbababc
JH
40232015-06-11 Jan Hubicka <hubicka@ucw.cz>
4024
4025 PR middle-end/66325
4026 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4027 variants.
4028
a0349665
PMR
40292015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4030
4031 * c-decl.c (pop_scope): Register the main translation unit
4032 through the new debug hook.
4033
13fdf2e2
AM
40342015-06-08 Andrew MacLeod <amacleod@redhat.com>
4035
4036 * c-array-notation.c : Adjust include files.
4037 * c-aux-info.c : Likewise.
4038 * c-convert.c : Likewise.
4039 * c-decl.c : Likewise.
4040 * c-errors.c : Likewise.
4041 * c-lang.c : Likewise.
4042 * c-lang.h : Likewise.
4043 * c-objc-common.c : Likewise.
4044 * c-parser.c : Likewise.
4045 * c-typeck.c : Likewise.
4046
d7438551
AH
40472015-06-05 Aldy Hernandez <aldyh@redhat.com>
4048
4049 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4050 immediately clobber it.
4051 (c_write_global_declarations_1): Remove call to
4052 check_global_declaration_1.
4053 (c_write_global_declarations_2): Remove.
4054 (c_write_final_cleanups): Rename from c_write_global_declarations.
4055 Remove call to finalize_compilation_unit.
4056 Remove calls to debugging hooks.
4057 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4058 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4059 * c-tree.h: Remove c_write_global_declarations.
4060
ecb9f223
AM
40612015-06-04 Andrew MacLeod <amacleod@redhat.com>
4062
4063 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4064 * c-aux-info.c: Likewise.
4065 * c-convert.c: Likewise.
4066 * c-decl.c: Likewise.
4067 * c-errors.c: Likewise.
4068 * c-lang.c: Likewise.
4069 * c-objc-common.c: Likewise.
4070 * c-parser.c: Likewise.
4071 * c-typeck.c: Likewise.
4072
9482b620
MP
40732015-06-04 Marek Polacek <polacek@redhat.com>
4074
4075 PR c/66341
4076 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4077 it is a lvalue.
4078
bc51ace3
PK
40792015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4080
4081 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4082 Warn for empty struct.
4083 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4084
ea5b45b6
AT
40852015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4086
4087 * c-decl.c (start_function): Call plugin before parsing.
4088 (finish_function): Call plugin after parsing.
4089
c2d47482
PK
40902015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4091
4092 PR c/49551
4093 * c-decl.c (merge_decls): Merge DECL_COMMON.
4094
a95492ab
JW
40952015-05-22 Jim Wilson <jim.wilson@linaro.org>
4096
4097 * Make-lang.in (check_gcc_pallelize): Define.
4098
fd5c817a
MP
40992015-05-22 Marek Polacek <polacek@redhat.com>
4100
4101 PR c/47043
4102 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4103 attributes.
4104
c7b70a3c
MP
41052015-05-21 Marek Polacek <polacek@redhat.com>
4106
4107 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4108 DECL_BUILT_IN.
4109
21b634ae
MP
41102015-05-20 Marek Polacek <polacek@redhat.com>
4111
4112 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4113 * c-typeck.c: Likewise.
4114
296a8c2f
MP
41152015-05-19 Marek Polacek <polacek@redhat.com>
4116
4117 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4118
41b37d5e
JJ
41192015-05-19 Jakub Jelinek <jakub@redhat.com>
4120
4121 PR middle-end/66199
4122 * c-parser.c (c_parser_omp_for_loop): Don't add
4123 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4124 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4125 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4126 constructs.
4127
fab27f52
MM
41282015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4129
4130 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4131 swaps.
fab27f52 4132
40de31cf
MLI
41332015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4134
4135 PR fortran/44054
4136 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4137 accessor function.
4138
3aa3c9fc
MP
41392015-05-14 Marek Polacek <polacek@redhat.com>
4140
4141 PR c/66066
4142 PR c/66127
4143 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4144 rather than with 0.
4145
c3388e62
DM
41462015-05-12 David Malcolm <dmalcolm@redhat.com>
4147
4148 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4149 to add a call to warn_for_misleading_indentation.
4150 (c_parser_else_body): Likewise, adding param "else_loc".
4151 (c_parser_if_statement): Check for misleading indentation.
4152 (c_parser_while_statement): Likewise.
4153 (c_parser_for_statement): Likewise.
4154
755e528f
MP
41552015-05-08 Marek Polacek <polacek@redhat.com>
4156
4157 PR c/64918
4158 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4159 (output_init_element): Likewise.
4160
0173bd2a
MP
41612015-05-07 Marek Polacek <polacek@redhat.com>
4162
4163 PR c/65179
4164 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4165 value.
4166
9babc352
MP
41672015-04-30 Marek Polacek <polacek@redhat.com>
4168
4169 * c-typeck.c (set_init_label): Call error_at instead of error and
4170 pass LOC to it.
4171
ac9f18db
MP
4172 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4173 the type of a decl.
4174
ec3fba51
MP
4175 * c-typeck.c (c_build_va_arg): Clarify the error message.
4176
b811915d
TS
41772015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4178
4179 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4180 OMP_STANDALONE_CLAUSES.
4181
f3075008
MP
41822015-04-28 Marek Polacek <polacek@redhat.com>
4183
4184 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4185
4e81b788
MP
41862015-04-28 Marek Polacek <polacek@redhat.com>
4187
4188 PR c/65901
4189 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4190
6c1db78e
MP
41912015-04-25 Marek Polacek <polacek@redhat.com>
4192
4193 PR c/52085
4194 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4195 attribute.
4196
5c4abbb8
MP
41972015-04-23 Marek Polacek <polacek@redhat.com>
4198
4199 PR c/65345
4200 * c-decl.c (set_labels_context_r): New function.
4201 (store_parm_decls): Call it via walk_tree_without_duplicates.
4202 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4203 instead of create_tmp_var. Build TARGET_EXPR instead of
4204 COMPOUND_EXPR.
4205 (build_atomic_assign): Use create_tmp_var_raw instead of
4206 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4207
06aca1d5
IV
42082015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4209
4210 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4211 (c_parser_omp_target_update): Add missed %> to error_at ().
4212
8fba1830
BRF
42132015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4214
4215 PR target/55143
4216 * c-decl.c (c_default_pointer_mode): Remove definition.
4217 * c-tree.h (c_default_pointer_mode): Remove declaration.
4218
62021f64
TB
42192015-03-27 Tobias Burnus <burnus@net-b.de>
4220
4221 PR c/65586
4222 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4223 error out.
4224 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4225 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4226 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4227
9b65e171
JJ
42282015-03-19 Jakub Jelinek <jakub@redhat.com>
4229
4230 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4231 attribute for DECL_EXTERNAL VAR_DECLs.
4232
17958621
JJ
42332015-03-11 Jakub Jelinek <jakub@redhat.com>
4234
4235 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4236 argument.
4237
7ccb1a11
JJ
42382015-03-10 Jakub Jelinek <jakub@redhat.com>
4239
4240 PR c/65120
4241 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4242 before preparing arguments to warn_logical_not_parentheses.
4243
01177669
JJ
42442015-03-09 Jakub Jelinek <jakub@redhat.com>
4245
4246 PR c/65120
4247 * c-typeck.c (parser_build_binary_op): Don't warn for
4248 !!x == y or !b == y where b is _Bool.
4249
802ac282
MP
42502015-03-09 Marek Polacek <polacek@redhat.com>
4251
4252 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4253 * c-decl.c (grokdeclarator): Likewise.
4254 * c-typeck.c (build_binary_op): Likewise.
4255
e5165b60
MP
42562015-02-27 Marek Polacek <polacek@redhat.com>
4257
4258 PR c/65228
4259 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4260
065d214c
MP
42612015-02-14 Marek Polacek <polacek@redhat.com>
4262
4263 PR c/64768
4264 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4265 declared through a typedef name.
4266
e5d9235b
MP
42672015-02-13 Marek Polacek <polacek@redhat.com>
4268
4269 PR c/65050
4270 * c-decl.c (grokdeclarator): Print also the type when giving
4271 the error message about array's incomplete element type.
4272
fa01ffcc
JJ
42732015-02-11 Jakub Jelinek <jakub@redhat.com>
4274
4275 PR c/64824
4276 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4277 check in the POP macro.
4278
c3e38a03
MP
42792015-02-09 Marek Polacek <polacek@redhat.com>
4280
4281 PR c/64856
4282 * c-typeck.c (process_init_element): Don't always wrap
4283 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4284 initializing a range of elements.
4285
4886ec8e
JJ
42862015-02-04 Jakub Jelinek <jakub@redhat.com>
4287
4288 PR c/64824
4289 PR c/64868
4290 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4291
c3e38a03 42922015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4293
4294 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4295 processing enum declaration.
4296
7b33f0c8
MP
42972015-01-29 Marek Polacek <polacek@redhat.com>
4298
4299 PR c/64709
4300 * c-typeck.c (pop_init_level): If constructor_elements has
4301 exactly one element with integer_zerop value, set constructor_zeroinit
4302 to 1. Remove braces around warning_init call.
4303
dea63e49
JJ
43042015-01-27 Jakub Jelinek <jakub@redhat.com>
4305
4306 PR c/64766
4307 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4308 of FUNCTION_DECLs with error_mark_node.
4309
d38f7dce
JJ
43102015-01-26 Jakub Jelinek <jakub@redhat.com>
4311
4312 PR c/64778
4313 * c-typeck.c (convert_arguments): Return -1 if there are
4314 error_args, even if we've diagnosed too many arguments.
4315
cbf5d0e7
RB
43162015-01-21 Richard Biener <rguenther@suse.de>
4317
4318 PR middle-end/64313
4319 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4320 for builtins the user declared correctly.
4321
41dbbb37
TS
43222015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4323 Bernd Schmidt <bernds@codesourcery.com>
4324 Cesar Philippidis <cesar@codesourcery.com>
4325 James Norris <jnorris@codesourcery.com>
4326 Jakub Jelinek <jakub@redhat.com>
4327 Ilmir Usmanov <i.usmanov@samsung.com>
4328
4329 * c-parser.c: Include "gomp-constants.h".
4330 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4331 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4332 Use OMP_CLAUSE_SET_MAP_KIND.
4333 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4334 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4335 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4336 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4337 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4338 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4339 "copyout", "create", "delete", "deviceptr", "gang", "host",
4340 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4341 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4342 "present_or_create", "pcreate", "seq", "self", "vector",
4343 "vector_length", "wait", "worker".
4344 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4345 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4346 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4347 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4348 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4349 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4350 (c_parser_oacc_data_clause_deviceptr)
4351 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4352 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4353 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4354 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4355 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4356 (c_parser_oacc_parallel, c_parser_oacc_update)
4357 (c_parser_oacc_wait): New functions.
4358 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4359 (c_finish_oacc_data): New prototypes.
4360 * c-typeck.c: Include "gomp-constants.h".
4361 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4362 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4363 OMP_CLAUSE_SET_MAP_KIND.
4364 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4365 (c_finish_oacc_data): New functions.
4366 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4367 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4368 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4369 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4370 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4371 GOMP_MAP_FORCE_DEVICEPTR.
4372
adfac8df
JJ
43732015-01-09 Michael Collison <michael.collison@linaro.org>
4374
4375 * c-array-notation.c: Include hash-set.h, machmode.h,
4376 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4377 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4378 * c-aux-info.c: Ditto.
4379 * c-convert.c: Ditto.
4380 * c-decl.c: Ditto.
4381 * c-errors.c: Ditto.
4382 * c-lang.c: Dittoxs.
4383 * c-objc-common.c: Ditto.
4384 * c-parser.c: Ditto.
4385 * c-typeck.c: Include hash-set.h, machmode.h,
4386 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4387 fold-const.h, wide-int.h, inchash.h, real.h and
4388 fixed-value.h due to flattening of tree.h.
4389
2cc901dc
MP
43902015-01-07 Marek Polacek <polacek@redhat.com>
4391
4392 PR c/64417
4393 * c-typeck.c (process_init_element): Disallow initialization of
4394 a flexible array member with a string constant if the structure
4395 is in an array.
4396
5624e564
JJ
43972015-01-05 Jakub Jelinek <jakub@redhat.com>
4398
e5341100
JJ
4399 PR sanitizer/64344
4400 * c-typeck.c (convert_for_assignment, c_finish_return): For
4401 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4402 types also set in_late_binary_op around convert call.
4403 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4404 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4405 result on expr as last argument to ubsan_instrument_float_cast,
4406 if in_late_binary_op, don't use c_save_expr but save_expr.
4407
5624e564
JJ
4408 Update copyright years.
4409
5bd012f8
MP
44102015-01-05 Marek Polacek <polacek@redhat.com>
4411
4412 PR c/64423
4413 * c-typeck.c (build_array_ref): Pass loc down to
4414 warn_array_subscript_with_type_char.
4415
3f8257db 44162014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4417
4418 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4419 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4420 element type.
8e745a17 4421 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4422 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4423 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4424 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4425 to PEDWARN_FOR_QUALIFIERS.
768952be 4426
8f94a8c4
JJ
44272014-12-17 Jakub Jelinek <jakub@redhat.com>
4428
4429 PR sanitizer/64289
4430 * c-convert.c: Include ubsan.h.
4431 (convert): For real -> integral casts and
4432 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4433 instead instrument the float cast directly.
4434
b731b390
JJ
44352014-11-29 Jakub Jelinek <jakub@redhat.com>
4436
4437 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4438 c_finish_stmt_expr): Remove NULL last argument from
4439 create_tmp_var_raw and create_tmp_var calls.
4440 * c-array-notation.c (fix_builtin_array_notation_fn,
4441 build_array_notation_expr, fix_conditional_array_notations_1,
4442 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4443
541e35a6
MP
44442014-11-28 Marek Polacek <polacek@redhat.com>
4445
4446 PR c/63862
4447 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4448 convert the right operand to integer type.
4449
b286be94
MP
44502014-11-25 Marek Polacek <polacek@redhat.com>
4451
4452 PR c/63877
4453 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4454 for inline functions.
4455
aa7da51a
JJ
44562014-11-21 Jakub Jelinek <jakub@redhat.com>
4457
4458 PR target/63764
4459 * c-typeck.c (build_array_ref): Adjust
4460 convert_vector_to_pointer_for_subscript caller. If it returns true,
4461 call non_lvalue_loc on the result.
4462
d876207f
RB
44632014-11-11 Richard Biener <rguenther@suse.de>
4464
4465 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4466 to true.
4467
e5e44252
AK
44682014-11-10 Andi Kleen <ak@linux.intel.com>
4469
4470 PR c/60804
4471 * c-parser.c (c_parser_statement_after_labels): Call
4472 check_no_cilk.
4473 (c_parser_if_statement): Dito.
4474 (c_parser_switch_statement): Dito.
4475 (c_parser_while_statement): Dito.
4476 (c_parser_do_statement): Dito.
4477 (c_parser_for_statement): Dito.
4478 * c-typeck.c (c_finish_loop): Dito.
4479
13c21655
PC
44802014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4481
4482 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4483 OPT_Wshift_count_overflow in the warnings.
4484
2d51fcef
MP
44852014-10-30 Marek Polacek <polacek@redhat.com>
4486
4487 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4488 print the stripped version as well, if they're not the same.
4489
ef4bddc2
RS
44902014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4491
4492 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4493 machine_mode.
4494
c582198b
AM
44952014-10-28 Andrew MacLeod <amacleod@redhat.com>
4496
4497 * c-decl.c: Adjust include files.
4498 * c-parser.c: Ditto.
4499
ddc8de03
PM
45002014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4501 Tom Tromey <tromey@redhat.com>
4502
4503 * c-tree.h (enum c_oracle_request): New.
4504 (c_binding_oracle_function): New typedef.
4505 (c_binding_oracle, c_pushtag, c_bind): Declare.
4506 * c-decl.c (c_binding_oracle): New global.
4507 (I_SYMBOL_CHECKED): New macro.
4508 (i_symbol_binding): New function.
4509 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4510 (I_TAG_CHECKED): New macro.
4511 (i_tag_binding): New function.
4512 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4513 (I_LABEL_CHECKED): New macro.
4514 (i_label_binding): New function.
4515 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4516 (c_print_identifier): Save and restore c_binding_oracle.
4517 (c_pushtag, c_bind): New functions.
4518
60393bbc
AM
45192014-10-27 Andrew MacLeod <amacleod@redhat.com>
4520
4521 * c-typeck.c: Adjust include files.
4522
d723bb7c
MLI
45232014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4524
4525 PR c++/53061
4526 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4527 initialization here...
4528 (c_initialize_diagnostics): ... but here. Set defaults after
4529 building pretty-printer.
4530
1bc5a451
MP
45312014-10-23 Marek Polacek <polacek@redhat.com>
4532
4533 PR c/63626
4534 * c-decl.c (pop_scope): Don't print warning in external_scope.
4535
4435bb92
MP
45362014-10-19 Marek Polacek <polacek@redhat.com>
4537
4538 PR c/63567
4539 * c-typeck.c (output_init_element): Allow initializing objects with
4540 static storage duration with compound literals even in C99 and add
4541 pedwarn for it.
4542
7278465e
MP
45432014-10-17 Marek Polacek <polacek@redhat.com>
4544
4545 PR c/63567
4546 * c-typeck.c (digest_init): Allow initializing objects with static
4547 storage duration with compound literals even in C99 and add pedwarn
4548 for it.
4549
d9b7be2e
MP
45502014-10-17 Marek Polacek <polacek@redhat.com>
4551
4552 PR c/63543
4553 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4554 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4555 error multiple times. Print the type.
4556
f406ae1f
MP
45572014-10-17 Marek Polacek <polacek@redhat.com>
4558
4559 PR c/63549
4560 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4561 type.
4562
92574c7c
MP
45632014-10-17 Marek Polacek <polacek@redhat.com>
4564
4565 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4566 (start_function): Use OPT_Wimplicit_int instead of 0.
4567 (store_parm_decls_oldstyle): Likewise.
4568
1bc4a978
MT
45692014-10-17 Alan Modra <amodra@gmail.com>
4570
4571 PR middle-end/61848
4572 * c-decl.c (merge_decls): Don't merge section name or tls model
4573 to newdecl symtab node, instead merge to olddecl. Override
4574 existing olddecl section name. Set tls_model for all thread-local
4575 vars, not just OMP thread-private ones. Remove incorrect comment.
4576
83685514
AM
45772014-10-16 Andrew MacLeod <amacleod@redhat.com>
4578
4579 * c-decl.c: Adjust include files.
4580
78a7c317
DD
45812014-10-14 DJ Delorie <dj@redhat.com>
4582
4583 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4584 (c_token_starts_typename): Check all __intN, not just __int128.
4585 (c_token_starts_declspecs): Likewise.
4586 (c_parser_declspecs): Likewise.
4587 (c_parser_attribute_any_word): Likewise.
4588 (c_parser_objc_selector): Likewise.
4589 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4590 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4591 is specified.
4592 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4593 __int128.
4594 (finish_declspecs): Likewise.
4595
74d98c1e
AB
45962014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4597
8e745a17 4598 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4599 the duplicate code.
8e745a17 4600 (c_parser_statement): Call the new function.
74d98c1e 4601
84937de2
MP
46022014-10-09 Marek Polacek <polacek@redhat.com>
4603
4604 PR c/63480
4605 * c-typeck.c (pop_init_level): Don't warn about initializing
4606 with { }.
4607
0382aaa0
MP
46082014-10-07 Marek Polacek <polacek@redhat.com>
4609
4610 PR c/59717
4611 * c-decl.c (header_for_builtin_fn): New function.
4612 (implicitly_declare): Suggest which header to include.
4613
7a0ca710
MP
46142014-10-07 Marek Polacek <polacek@redhat.com>
4615
4616 * c-convert.c (convert): Use error_operand_p.
4617 * c-typeck.c (require_complete_type): Likewise.
4618 (really_atomic_lvalue): Likewise.
4619 (digest_init): Likewise.
4620 (handle_omp_array_sections_1): Likewise.
4621
6bc8a126
MP
46222014-10-03 Marek Polacek <polacek@redhat.com>
4623
4624 PR c/63453
4625 * c-decl.c (pop_scope): Don't warn about "inline function declared
4626 but never defined" for functions marked with gnu_inline attribute.
4627
d90c0a59
JJ
46282014-09-25 Jakub Jelinek <jakub@redhat.com>
4629
4630 PR c++/63249
4631 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4632 on low_bound and length.
4633
083e891e
MP
46342014-09-24 Marek Polacek <polacek@redhat.com>
4635
4636 PR c/61405
4637 PR c/53874
4638 * c-parser.c: Don't define CPP_KEYWORD.
4639 (c_parser_switch_statement): Pass original type to c_finish_case.
4640 * c-tree.h (c_finish_case): Update declaration.
4641 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4642 conditionally to c_do_switch_warnings.
4643
8d95fe25
MP
46442014-09-03 Marek Polacek <polacek@redhat.com>
4645
4646 PR c/62024
4647 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4648 conversions.
4649
9a771876
JJ
46502014-09-02 Jakub Jelinek <jakub@redhat.com>
4651 Balaji V. Iyer <balaji.v.iyer@intel.com>
4652 Igor Zamyatin <igor.zamyatin@intel.com>
4653
4654 * c-parser.c (c_parser_cilk_for): New function.
4655 (c_parser_cilk_grainsize): Likewise.
4656 (c_get_temp_regvar): Likewise.
4657 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4658 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4659 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4660 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4661 case.
4662
b7679d96
CG
46632014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4664
4665 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4666 with using HOST_WIDE_INT without truncation to 'int'
4667
59ea0364
MP
46682014-08-22 Marek Polacek <polacek@redhat.com>
4669
4670 PR c++/62199
4671 * c-typeck.c (parser_build_binary_op): Adjust call to
4672 warn_logical_not_parentheses.
4673
671a475e
IZ
46742014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4675
4676 PR other/62008
4677 * c-parser.c (c_parser_array_notation): Check for correct
4678 type of an array added.
4679
04159acf
MP
46802014-08-19 Marek Polacek <polacek@redhat.com>
4681
4682 PR c++/62153
4683 * c-typeck.c (build_binary_op): If either operand of a comparison
4684 is a boolean expression, call maybe_warn_bool_compare.
4685
c77935ee
PP
46862014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4687
4688 PR c/45584
4689 * c-typeck.c (build_c_cast): Do a conversion even when the
4690 TYPE_MAIN_VARIANTs are the same.
4691
35aff4fb
MP
46922014-08-19 Marek Polacek <polacek@redhat.com>
4693
4694 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4695 pedwarn_c99 instead of pedwarn.
4696 (grokfield): Likewise.
4697 (warn_defaults_to): New function.
4698 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4699 Unconditionally call pedwarn_c99 instead of pedwarn.
4700 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4701 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4702 check flag_isoc11 before.
4703 * c-errors.c (pedwarn_c99): Change the return type to bool.
4704 Handle -Wc99-c11-compat.
4705 * c-parser.c (disable_extension_diagnostics): Handle
4706 warn_c99_c11_compat.
4707 (restore_extension_diagnostics): Likewise.
4708 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4709 instead of pedwarn, don't check flag_isoc11 before.
4710 (c_parser_declspecs): Likewise.
4711 (c_parser_alignas_specifier): Likewise.
4712 (c_parser_alignof_expression): Likewise.
4713 (c_parser_generic_selection): Likewise.
4714 * c-tree.h (pedwarn_c99): Update declaration.
4715 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4716 of pedwarn_c99.
4717
177cce46
MP
47182014-08-19 Marek Polacek <polacek@redhat.com>
4719
4720 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4721 to pedwarn_c90.
4722 * c-errors.c: Include "opts.h".
4723 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4724 * c-parser.c (disable_extension_diagnostics): Handle negative value
4725 of warn_c90_c99_compat, too.
4726 (restore_extension_diagnostics): Likewise.
4727 (c_parser_compound_statement_nostart): Pass
4728 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4729
6dc99c33
MP
47302014-08-12 Marek Polacek <polacek@redhat.com>
4731
4732 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4733 Add pedwarn.
4734 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4735 Likewise.
4736 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4737
3f8257db 47382014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4739
4740 PR c/51849
4741 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4742 Call pedwarn_c90 instead of pedwarn.
4743 (check_bitfield_type_and_width): Likewise.
4744 (declspecs_add_qual): Likewise.
4745 (declspecs_add_type): Likewise.
4746 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4747 Adjust to only call pedwarn_c90.
4748 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4749 pedwarn_c90 instead of pedwarn.
4750 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4751 * c-parser.c (disable_extension_diagnostics): Handle
4752 warn_c90_c99_compat.
4753 (restore_extension_diagnostics): Likewise.
4754 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4755 pedwarn_c90 instead of pedwarn.
4756 (c_parser_initelt): Likewise.
4757 (c_parser_postfix_expression): Likewise.
4758 (c_parser_postfix_expression_after_paren_type): Likewise.
4759 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4760 * c-tree.h: Fix formatting.
4761 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4762 pedwarn_c90 instead of pedwarn.
4763
9f25a338
TS
47642014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4765
4766 * c-typeck.c: Remove include of pointer-set.h.
4767
044331a8
MP
47682014-08-07 Marek Polacek <polacek@redhat.com>
4769
4770 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4771
b787e7a2
TS
47722014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4773
4774 * c-typeck.c: Use hash_map instead of pointer_map.
4775
6e2830c3
TS
47762014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4777
4778 * c-decl.c: Use hash_set instead of pointer_set.
4779
a7ee52fb
IZ
47802014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4781
4782 PR middle-end/61455
4783 * c-array-notation.c (expand_array_notations): Handling
4784 of DECL_EXPR added.
4785
b4dfdc11
MG
47862014-07-31 Marc Glisse <marc.glisse@inria.fr>
4787
4788 PR c++/60517
4789 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4790 a local variable.
4791
976d5a22
TT
47922014-07-30 Tom Tromey <tromey@redhat.com>
4793
4794 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4795 field.
4796 (really_start_incremental_init, push_init_level): Initialize
4797 designator_depth.
4798 (pop_init_level): Set global designator_depth.
4799 (process_init_element): Check for designated_init attribute.
4800
30281de2
MP
48012014-07-20 Marek Polacek <polacek@redhat.com>
4802
4803 PR c/61852
4804 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4805 (implicitly_declare): Pass location to implicit_decl_warning.
4806
b108f48f
JJ
48072014-07-14 Jakub Jelinek <jakub@redhat.com>
4808
4809 PR middle-end/61294
4810 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4811 If non-NULL, call c_parser_check_literal_zero.
4812 (c_parser_check_literal_zero): New function.
4813 (c_parser_postfix_expression_after_primary): Adjust
4814 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4815
773ec47f
MP
48162014-07-06 Marek Polacek <polacek@redhat.com>
4817
4818 PR c/6940
4819 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4820 * c-tree.h (C_ARRAY_PARAMETER): Define.
4821 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4822 function parameter.
4823
22e1cf1c 48242014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4825 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4826
4827 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4828 releasing symbol.
4829
52ec0ea3
MP
48302014-07-01 Marek Polacek <polacek@redhat.com>
4831
4832 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4833 instead of 0 to WARN_FOR_ASSIGNMENT.
4834
d5c3d343
MP
48352014-07-01 Marek Polacek <polacek@redhat.com>
4836
4837 PR c/58286
4838 * c-typeck.c (convert_for_assignment): Pass
4839 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4840
6a7253a4
MP
48412014-06-30 Marek Polacek <polacek@redhat.com>
4842
4843 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4844 has no_sanitize_undefined attribute.
4845
5e88a8f4
IZ
48462014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4847
4848 PR middle-end/57541
4849 * c-array-notation.c (fix_builtin_array_notation_fn):
4850 Check for 0 arguments in builtin call. Check that bultin argument is
4851 correct.
4852 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4853 index.
4854
9698b078
SH
48552014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4856
4857 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4858 qualifiers in __auto_type for atomic types.
4859 (c_parser_typeof_specifier): Discard all type qualifiers in
4860 __typeof__ for atomic types.
4861
6e07c515
MP
48622014-06-25 Marek Polacek <polacek@redhat.com>
4863
4864 PR c/61162
4865 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4866 the return expression to c_finish_return.
4867
da6f124d
JJ
48682014-06-25 Jakub Jelinek <jakub@redhat.com>
4869
4870 * c-typeck.c (c_finish_omp_clauses): Make sure
4871 OMP_CLAUSE_LINEAR_STEP has correct type.
4872
c203e8a7
TS
48732014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4874
4875 * c-decl.c: Adjust.
4876
56ad0e38
JJ
48772014-06-24 Jakub Jelinek <jakub@redhat.com>
4878
4879 * c-parser.c (c_parser_omp_for_loop): For
4880 #pragma omp parallel for simd move lastprivate clause from parallel
4881 to for rather than simd.
4882
47c2554f
MP
48832014-06-23 Marek Polacek <polacek@redhat.com>
4884
4885 * c-typeck.c (parser_build_binary_op): Don't call
4886 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4887
56363ffd
JH
48882014-06-15 Jan Hubicka <hubicka@ucw.cz>
4889
4890 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4891 * c-decl.c (merge_decls): Likewise.
4892
d7ff7ae5
MP
48932014-06-09 Marek Polacek <polacek@redhat.com>
4894
4895 PR c/36446
4896 * c-typeck.c (error_init): Call inform instead of error_at.
4897 (pedwarn_init): Call inform instead of pedwarn.
4898 (warning_init): Call inform instead of warning_at.
4899
24d047a3
JH
49002014-06-07 Jan Hubicka <hubicka@ucw.cz>
4901
4902 * c-decl.c (merge_decls): Use set_decl_section_name.
4903 (duplicate_decls): Remove node if it exists.
4904
9bac5cbb
G
49052014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4906
4907 PR c/53119
4908 * c-typeck.c (push_init_level, process_init_element,
4909 pop_init_level): Correct check for zero initialization, move
4910 missing brace warning to respect zero initialization.
4911
8ffcdea8
MP
49122014-06-05 Marek Polacek <polacek@redhat.com>
4913
4914 PR c/56724
4915 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4916
742938c9
MP
49172014-06-05 Marek Polacek <polacek@redhat.com>
4918
4919 PR c/49706
4920 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4921 on the left hand side operand of a comparison.
4922
6447c55d
MP
49232014-06-05 Marek Polacek <polacek@redhat.com>
4924
4925 PR c/48062
4926 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4927 Print note only if the warning was printed.
4928
9dc7743c
IZ
49292014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4930
4931 PR c/58942
4932 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4933 with a pointer.
4934
fedfecef
MP
49352014-06-03 Marek Polacek <polacek@redhat.com>
4936
4937 PR c/60439
4938 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4939 c_start_case.
4940 * c-tree.h (c_start_case): Update.
4941 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4942 switch condition has boolean value.
4943
9b2b7279
AM
49442014-06-02 Andrew MacLeod <amacleod@redhat.com>
4945
4946 * c-decl.c: Include builtins.h.
4947 * c-parser.c: Likewise.
4948
5c1bc275
MP
49492014-05-27 Marek Polacek <polacek@redhat.com>
4950
4951 PR c/56724
4952 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4953 error and warning calls to error_at and warning_at. Pass location of
4954 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4955 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4956 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4957
97563bc8
IZ
49582014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4959
4960 PR c/61191
4961 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4962 function parameters.
4963
aede2c10
JH
49642014-05-23 Jan Hubicka <hubicka@ucw.cz>
4965
4966 * c-decl.c (merge_decls): Preserve symtab node pointers.
4967 (duplicate_decls): Free new decl.
4968
edbba2ce
TS
49692014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4970
f3316c6d
TS
4971 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4972 initialization.
4973
edbba2ce
TS
4974 * c-parser.c (c_parser_omp_target): Return bool values.
4975
68c81f24
TS
49762014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4977
4978 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4979 num_teams_loc variable to num_thread_limit_loc.
4980
632f2871
RS
49812014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4982
4983 * c-array-notation.c (expand_array_notations): Use void_node
4984 instead of void_zero_node.
4985
766090c2
TS
49862014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4987
4988 * c-decl.c (finish_struct): Adjust.
4989 (finish_enum): Likewise.
4990 (bind): Adjust.
4991 (record_inline_static): Likewise.
4992 (push_scope): Likewise.
4993 (make_label): Likewise.
4994 (lookup_label_for_goto): Likewise.
4995 (finish_struct): Likewise.
4996 (finish_enum): Likewise.
4997 (store_parm_decls): Likewise.
4998 (c_push_function_context): Likewise.
4999 * c-lang.h: Remove usage of variable_size gty attribute.
5000 * c-parser.c (c_parse_init): Adjust.
5001 (c_parse_file): Likewise.
5002
2b107f6b
MP
50032014-05-13 Marek Polacek <polacek@redhat.com>
5004
5005 PR c/61162
5006 * c-typeck.c (convert_for_assignment): Pass location to
5007 WARN_FOR_ASSIGNMENT instead of input_location.
5008
d033409e
MP
50092014-05-10 Marek Polacek <polacek@redhat.com>
5010
5011 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5012 maybe_warn_string_init.
5013 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5014 maybe_warn_string_init.
5015 * c-tree.h (maybe_warn_string_init): Update declaration.
5016 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5017 Call pedwarn_init with loc instead of with input_location.
5018 (digest_init): Pass init_loc to maybe_warn_string_init.
5019 (pop_init_level): Call pedwarn_init with loc instead of with
5020 input_location.
5021 (set_init_index): Likewise.
5022 (process_init_element): Likewise.
5023
ea58ef42
MP
50242014-05-09 Marek Polacek <polacek@redhat.com>
5025
5026 PR c/61096
5027 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5028 (c_parser_initelt): Pass location to set_init_label. Pass array index
5029 location to set_init_index.
5030 * c-tree.h (push_init_level): Update declaration.
5031 (pop_init_level): Likewise.
5032 (set_init_index): Likewise.
5033 (set_init_label): Likewise.
5034 * c-typeck.c (error_init): Add location parameter. Call error_at
5035 instead of error.
5036 (digest_init): Pass init_loc to error_init.
5037 (really_start_incremental_init):
5038 (push_init_level): Add location parameter. Pass loc to pop_init_level
5039 and error_init.
5040 (pop_init_level): Likewise.
5041 (set_designator): Add location parameter. Pass loc to pop_init_level,
5042 push_init_level, and error_init.
5043 (set_init_index): Add location parameter. Pass loc to error_init and
5044 set_designator.
5045 (set_init_label): Likewise.
5046 (output_init_element): Pass loc to error_init.
5047 (process_init_element): Pass loc to error_init, pop_init_level,
5048 pedwarn_init, and push_init_level.
5049
661a0813
MP
50502014-05-09 Marek Polacek <polacek@redhat.com>
5051
5052 PR c/50459
5053 * c-parser.c (c_parser_attributes): Parse the arguments as an
5054 expression-list if the attribute takes identifier.
5055
2793eeab
MP
50562014-05-08 Marek Polacek <polacek@redhat.com>
5057
5058 PR c/61053
5059 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5060 TYPE_ALIGN_UNIT.
5061
f827930a
MP
50622014-05-08 Marek Polacek <polacek@redhat.com>
5063
5064 PR c/61077
5065 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5066 of main.
5067
1d60af08
KZ
50682014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5069 Mike Stump <mikestump@comcast.net>
5070 Richard Sandiford <rdsandiford@googlemail.com>
5071
5072 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5073 (finish_enum): Use wide-int interfaces.
5074 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5075 * c-typeck.c (build_c_cast): Likewise.
5076 (set_nonincremental_init_from_string): Likewise.
5077 (c_tree_equal): Likewise.
5078
a0e24419
MP
50792014-05-02 Marek Polacek <polacek@redhat.com>
5080
5081 PR c/25801
5082 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5083 Return size_one_node when the type is not complete.
5084 (pointer_diff): Remove comment.
5085 (build_unary_op): Improve error messages.
5086
19fc9faa
MP
50872014-05-02 Marek Polacek <polacek@redhat.com>
5088
5089 * c-typeck.c (c_finish_return): Separate warning_at calls.
5090
63bc4e87
MP
50912014-05-02 Marek Polacek <polacek@redhat.com>
5092
5093 * c-tree.h (error_init): Remove declaration.
5094 (pedwarn_init): Likewise.
5095 * c-typeck.c (error_init): Make static and move above.
5096 (pedwarn_init): Likewise.
5097 (warning_init): Move above.
5098 (maybe_warn_string_init): Likewise.
5099
4bd2511b
JL
51002014-05-01 Jeff Law <law@redhat.com>
5101
5102 Revert:
5103
5104 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5105 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5106 avoid goto.
5107
6a358dcb
MP
51082014-05-02 Marek Polacek <polacek@redhat.com>
5109
5110 PR c/60784
5111 * c-typeck.c (push_init_level): Set constructor_designated to
5112 p->designated for structures.
5113
ae5ebda4
MP
51142014-05-01 Marek Polacek <polacek@redhat.com>
5115
5116 PR c/60915
5117 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5118 function-definition has an attribute after the declarator.
5119
96b40f8d
MP
51202014-05-01 Marek Polacek <polacek@redhat.com>
5121
5122 PR c/60257
5123 * c-typeck.c (warning_init): Add location_t parameter. Call
5124 warning_at instead of warning.
5125 (push_init_level): Pass input_location to warning_init.
5126 (add_pending_init): Add location_t parameter. Pass loc to
5127 warning_init.
5128 (set_nonincremental_init): Pass input_location to add_pending_init.
5129 (set_nonincremental_init_from_string): Likewise.
5130 (output_init_element): Pass loc to warning_init and to
5131 add_pending_init.
5132
32e00768
MP
51332014-05-01 Marek Polacek <polacek@redhat.com>
5134
5135 PR c/43395
5136 * c-typeck.c (c_finish_return): Distinguish between label and variable
5137 when warning about returning local address.
5138
c9379ce2
MP
51392014-05-01 Marek Polacek <polacek@redhat.com>
5140
5141 PR c/29467
5142 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5143 in C89 mode.
5144
d00887e8
MP
51452014-05-01 Marek Polacek <polacek@redhat.com>
5146
5147 PR c/43245
5148 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5149 instead of 0 to WARN_FOR_QUALIFIERS.
5150
5436fa2e
MP
51512014-05-01 Marek Polacek <polacek@redhat.com>
5152
5153 PR c/56989
5154 * c-typeck.c (default_conversion): Use better location for
5155 error call.
5156
f8ed5150
MP
51572014-04-30 Marek Polacek <polacek@redhat.com>
5158
5159 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5160 also when SANITIZE_FLOAT_DIVIDE is on.
5161
8337d1db
MP
51622014-04-30 Marek Polacek <polacek@redhat.com>
5163
5164 PR c/60139
5165 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5166 and pedwarn_init. Use loc insted of input_location.
5167
c4bdc42f
MP
51682014-04-30 Marek Polacek <polacek@redhat.com>
5169
5170 PR c/60351
5171 * c-typeck.c (build_binary_op): Use location when warning about
5172 shift count.
5173
45484dcf
MP
51742014-04-25 Marek Polacek <polacek@redhat.com>
5175
5176 PR c/18079
5177 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5178 always_inline/noinline and hot/cold attributes.
5179
34cf811f
MP
51802014-04-25 Marek Polacek <polacek@redhat.com>
5181
5182 PR c/60114
5183 * c-parser.c (c_parser_initelt): Pass input_location to
5184 process_init_element.
5185 (c_parser_initval): Pass loc to process_init_element.
5186 * c-tree.h (process_init_element): Adjust declaration.
5187 * c-typeck.c (push_init_level): Pass input_location to
5188 process_init_element.
5189 (pop_init_level): Likewise.
5190 (set_designator): Likewise.
5191 (output_init_element): Add location_t parameter. Pass loc to
5192 digest_init.
5193 (output_pending_init_elements): Pass input_location to
5194 output_init_element.
5195 (process_init_element): Add location_t parameter. Pass loc to
5196 output_init_element.
5197
42056eac
JJ
51982014-04-24 Jakub Jelinek <jakub@redhat.com>
5199
5200 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5201 atomic-clause, allow comma in between atomic-clause and
5202 seq_cst.
5203
e162a134
JJ
52042014-04-22 Jakub Jelinek <jakub@redhat.com>
5205
5206 PR c/59073
5207 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5208 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5209
2f6babac
IZ
52102014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5211
5212 PR middle-end/60469
5213 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5214 create_tmp_var instead build_decl for creating temps.
5215 (build_array_notation_expr): Likewise.
5216 (fix_conditional_array_notations_1): Likewise.
5217 (fix_array_notation_expr): Likewise.
5218 (fix_array_notation_call_expr): Likewise.
5219
8edbfaa6
JJ
52202014-03-28 Jakub Jelinek <jakub@redhat.com>
5221
5222 PR c++/60689
5223 * c-tree.h (c_build_function_call_vec): New prototype.
5224 * c-typeck.c (build_function_call_vec): Don't call
5225 resolve_overloaded_builtin here.
5226 (c_build_function_call_vec): New wrapper function around
5227 build_function_call_vec. Call resolve_overloaded_builtin here.
5228 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5229 Call c_build_function_call_vec instead of build_function_call_vec.
5230 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5231 * c-decl.c (finish_decl): Likewise.
5232
7485aeea
MLI
52332014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5234
5235 PR c/55383
5236 * c-typeck.c: Use correct format string in cast-qual warning
5237
b17a8b07
TS
52382014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5239
5240 * c-decl.c (c_decl_attributes): Use
5241 lang_hooks.types.omp_mappable_type.
5242 * c-typeck.c (c_finish_omp_clauses): Likewise.
5243
3af9c5e9
MP
52442014-03-06 Marek Polacek <polacek@redhat.com>
5245
5246 PR c/60197
5247 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5248 of checking tree code.
5249
1c9f5f33
PK
52502014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5251
5252 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5253 (c_parser_parameter_declaration): Likewise.
5254
cc28fc7f
MP
52552014-02-19 Marek Polacek <polacek@redhat.com>
5256
5257 PR c/60195
5258 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5259 Call mark_exp_read on exp.value.
5260 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5261 TREE_ADDRESSABLE on old instead of val.
5262 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5263
b581c05c
PK
52642014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5265
5266 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5267 C_EXPR_APPEND by vec_safe_push.
5268 * c-tree.h (C_EXPR_APPEND): Remove.
5269
81e5eca8
MP
52702014-01-31 Marek Polacek <polacek@redhat.com>
5271
5272 PR c/59963
5273 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5274 build_function_call_vec.
5275 (build_function_call): Likewise.
5276 (build_atomic_assign): Likewise.
5277 (build_function_call_vec): Add arg_loc parameter. Use it.
5278 (convert_arguments): Likewise.
5279 (convert_for_assignment): Rename rhs_loc to expr_loc.
5280 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5281 (c_parser_objc_keywordexpr): Likewise.
5282 (c_parser_postfix_expression_after_primary): Call
5283 build_function_call_vec with expr_loc rather than op_loc.
5284 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5285 build_function_call_vec.
5286 (c_parser_expr_list): Add locations parameter. Fill it with locations
5287 of function arguments.
5288 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5289
68fca595
MP
52902014-01-30 Marek Polacek <polacek@redhat.com>
5291
5292 PR c/59940
5293 * c-typeck.c (build_function_call_vec): Use loc parameter.
5294 (convert_arguments): Add location parameter. Use it.
5295 (ep_convert_and_check): Likewise.
5296 (build_atomic_assign): Adjust convert_for_assignment call.
5297 (build_modify_expr): Likewise.
5298 (digest_init): Likewise.
5299 (c_finish_return): Likewise.
5300 (build_conditional_expr): Adjust ep_convert_and_check calls.
5301 (convert_for_assignment): Add rhs_loc parameter. Use it.
5302 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5303 calls.
5304
fa337f3a
RB
53052014-01-30 Richard Biener <rguenther@suse.de>
5306
5307 PR c/59905
5308 * c-typeck.c (build_function_call_vec): Do not replace calls
5309 to a function via an incompatible type with a runtime abort.
5310
b72271b9
BI
53112014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5312
5313 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5314 flag_enable_cilkplus with flag_cilkplus.
5315 (c_parser_direct_declarator_inner): Likewise.
5316 (c_parser_attribute_any_word): Likewise.
5317 (c_parser_attributes): Likewise.
5318 (c_parser_compound_statement): Likewise.
5319 (c_parser_statement_after_labels): Likewise.
5320 (c_parser_if_statement): Likewise.
5321 (c_parser_switch_statement): Likewise.
5322 (c_parser_do_statement): Likewise.
5323 (c_parser_for_statement): Likewise.
5324 (c_parser_unary_expression): Likewise.
5325 (c_parser_postfix_expression): Likewise.
5326 (c_parser_postfix_expression_after_primary): Likewise.
5327 (c_parser_postfix_expression_after_primary): Likewise.
5328 (c_parser_omp_clause_name): Likewise.
5329 (c_finish_omp_declare_simd): Likewise.
5330 (c_parser_cilk_verify_simd): Likewise.
5331 * c-typeck.c (build_array_ref): Likewise.
5332 (build_function_call_vec): Likewise.
5333 (convert_arguments): Likewise.
5334 (build_compound_expr): Likewise.
5335 (c_finish_return): Likewise.
5336 (c_finish_if_stmt): Likewise.
5337 (c_finish_loop): Likewise.
5338 (build_binary_op): Likewise.
5339
393e8e8b
MP
53402014-01-23 Marek Polacek <polacek@redhat.com>
5341
5342 PR c/59846
5343 * c-typeck.c (parser_build_binary_op): Use location instead of
5344 input_location.
5345 (build_binary_op): Pass location to shorten_compare.
5346
f04dda30
MP
53472014-01-23 Marek Polacek <polacek@redhat.com>
5348
5349 PR c/58346
5350 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5351 an empty aggregate.
5352
789eadcd
MP
53532014-01-23 Marek Polacek <polacek@redhat.com>
5354
5355 PR c/59871
5356 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5357 of a comma expression.
5358 (emit_side_effect_warnings): Likewise.
5359
40f14e9f
BI
53602014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5361
5362 PR c/59825
5363 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5364 function to use walk_tree and moved a lot of its functionality to
5365 expand_array_notations.
5366 (expand_array_notations): New function.
5367
74558dd9
BI
53682014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5369
5370 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5371 attribute an attribute without value.
5372
652fea39
JJ
53732014-01-23 Jakub Jelinek <jakub@redhat.com>
5374
5375 PR middle-end/58809
5376 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5377 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5378
f34f1c87
MP
53792014-01-22 Marek Polacek <polacek@redhat.com>
5380
5381 PR c/59891
5382 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5383 of remove_c_maybe_const_expr on op1 and op2.
5384
241f845a
JJ
53852014-01-15 Jakub Jelinek <jakub@redhat.com>
5386
5387 PR c/58943
5388 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5389 effects, preevaluate rhs using SAVE_EXPR first.
5390
9a74f20c
BI
53912014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5392
5393 PR c++/59631
5394 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5395 statements with if-elseif statements.
5396
96066ce1
MP
53972014-01-06 Marek Polacek <polacek@redhat.com>
5398
5399 PR c/57773
5400 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5401 defined bit-field types only in ISO C.
5402
23a5b65a
RS
54032014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5404
5405 Update copyright years
5406
f9030485
RS
54072014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5408
5409 * c-array-notation.c: Use the standard form for the copyright notice.
5410
41958c28
BI
54112013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5412
5413 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5414 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5415 field in parser is not empty. If not-empty, call the function
5416 c_parser_finish_omp_declare_simd.
5417 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5418 between SIMD-enabled functions and #pragma simd. Added new parameter.
5419 (c_parser_cilk_all_clauses): Modified the usage of the function
5420 c_parser_cilk_clause_vectorlength as mentioned above.
5421 (c_parser_cilk_simd_fn_vector_attrs): New function.
5422 (c_finish_cilk_simd_fn_tokens): Likewise.
5423 (is_cilkplus_vector_p): Likewise.
5424 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5425 "nomask," and "mask" strings in clause name.
5426 (c_parser_omp_all_clauses): Added 3 new case statements:
5427 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5428 PRAGMA_CILK_CLAUSE_NOMASK.
5429 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5430 check for vector attribute and if so call the function
5431 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5432 called the function c_finish_cilk_simd_fn_tokens.
5433 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5434 parser field is non-empty. If so, parse them as you would parse
5435 the omp declare simd pragma.
5436 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5437 Added a check when step is a parameter and flag it as error.
5438 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5439 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5440 pragma_omp_clause.
5441
cef0fd0e
TS
54422013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5443
5444 * c-parser.c (c_parser_omp_parallel): Fix description.
5445
12893402
BI
54462013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5447
5448 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5449 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5450 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5451 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5452
296674db
JM
54532013-12-04 Joseph Myers <joseph@codesourcery.com>
5454
5455 PR c/52023
5456 * c-parser.c (c_parser_alignas_specifier): Use
5457 c_sizeof_or_alignof_type instead of c_alignof.
5458 (c_parser_alignof_expression): Likewise, with min_alignof
5459 parameter depending on alignof spelling used.
5460
edd28054
MP
54612013-12-04 Marek Polacek <polacek@redhat.com>
5462
5463 PR c/54113
5464 * c-decl.c (start_function): Don't warn for missing prototype for
5465 inline functions.
5466
da0fc454
MP
54672013-12-03 Marek Polacek <polacek@redhat.com>
5468
5469 PR c/59351
5470 * c-decl.c (build_compound_literal): Allow compound literals with
5471 empty initial value.
5472
4c2ecab0
JM
54732013-12-02 Joseph Myers <joseph@codesourcery.com>
5474
5475 PR c/58235
5476 * c-typeck.c (build_modify_expr): Diagnose assignment to
5477 expression with array type.
5478
340baef7
JM
54792013-11-29 Joseph Myers <joseph@codesourcery.com>
5480
5481 PR c/42262
5482 * c-typeck.c (process_init_element): Do not treat a string as
5483 initializing a whole array when used with a designator for an
5484 individual element.
5485
6763b9f7
JM
54862013-11-29 Joseph Myers <joseph@codesourcery.com>
5487
5488 PR c/57574
5489 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5490 an inline function following a static declaration.
5491
e7bd1de1
JJ
54922013-11-28 Jakub Jelinek <jakub@redhat.com>
5493
5494 PR c/59310
5495 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5496 to p_name before calling c_parser_omp_teams instead of after.
5497 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5498 argument. Remove unused p_name variable.
5499
0136f8f0
AH
55002013-11-27 Aldy Hernandez <aldyh@redhat.com>
5501 Jakub Jelinek <jakub@redhat.com>
5502
5503 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5504 external_scope is NULL.
5505
241b71bb
TV
55062013-11-27 Tom de Vries <tom@codesourcery.com>
5507 Marc Glisse <marc.glisse@inria.fr>
5508
5509 PR c++/59032
5510 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5511
2fb9a547
AM
55122013-11-22 Andrew MacLeod <amacleod@redhat.com>
5513
5514 * c-typeck.c: Add required include files from gimple.h.
5515
8400e75e
DM
55162013-11-22 David Malcolm <dmalcolm@redhat.com>
5517
5518 * c-decl.c (define_label, shadow_tag_warned)
5519 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5520 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5521 (declspecs_add_type): Remove use of in_system_header macro.
5522 * c-parser.c (c_parser_unary_expression): Likewise.
5523 * c-typeck.c (store_init_value, process_init_element)
5524 (c_start_case): Likewise.
5525
5526 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5527 macro.
5528
5529 * c-parser.c (c_parser_set_source_position_from_token): Remove
5530 reference to in_system_header from comment.
5531
386b1f1f
RS
55322013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5533
5534 * c-decl.c (grokdeclarator): Update comment to refer to
5535 tree_to_[su]hwi rather than tree_low_cst.
5536
ae7e9ddd
RS
55372013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5538
5539 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5540 tree_to_uhwi throughout.
5541
9439e9a1
RS
55422013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5543
5544 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5545 throughout.
5546
9541ffee
RS
55472013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5548
5549 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5550 throughout.
5551
c02065fc
AH
55522013-11-15 Aldy Hernandez <aldyh@redhat.com>
5553
5554 * c-parser.c (c_parser_cilk_simd): New.
5555 (c_parser_cilk_verify_simd): New.
5556 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5557 (c_parser_omp_for_loop): Add case for NE_EXPR.
5558 Set c_break_label for CILK_SIMD.
5559 (c_parser_cilk_clause_vectorlength): New.
5560 (c_parser_cilk_clause_linear): New.
5561 (c_parser_cilk_clause_name): New.
5562 (c_parser_cilk_all_clauses): New.
5563 * c-typeck.c (build_unary_op): Pass location argument to
5564 readonly_error.
5565 (build_modify_expr): Same.
5566 (build_asm_expr): Same.
5567 (c_finish_bc_stmt): Error on break/continue in loops.
5568
18f429e2
AM
55692013-11-14 Andrew MacLeod <amacleod@redhat.com>
5570
5571 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5572
d8a2d370
DN
55732013-11-14 Diego Novillo <dnovillo@google.com>
5574
5575 * c-decl.c: Include print-tree.h.
5576 Include stor-layout.h.
5577 Include varasm.h.
5578 Include attribs.h.
5579 Include stringpool.h.
5580 * c-lang.c: Include fold-const.h.
5581 * c-parser.c: Include stringpool.h.
5582 Include attribs.h.
5583 Include stor-layout.h.
5584 Include varasm.h.
5585 Include trans-mem.h.
5586 * c-typeck.c: Include stor-layout.h.
5587 Include trans-mem.h.
5588 Include varasm.h.
5589 Include stmt.h.
5590
38b7bc7f
JM
55912013-11-13 Joseph Myers <joseph@codesourcery.com>
5592
5593 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5594 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5595 __auto_type.
5596 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5597 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5598 RID_AUTO_TYPE.
5599 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5600 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5601 (c_parser_declarator, c_parser_direct_declarator_inner)
5602 (c_parser_parameter_declaration, c_parser_type_name): All callers
5603 changed.
5604 (c_parser_declaration_or_fndef): Handle declarations with type
5605 determined from the initializer.
5606
45b0be94
AM
56072013-11-12 Andrew MacLeod <amacleod@redhat.com>
5608
18f429e2 5609 * c-typeck.c: Include gimplify.h.
45b0be94 5610
582d9b50
JM
56112013-11-12 Joseph Myers <joseph@codesourcery.com>
5612
5613 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5614 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5615 comment.
5616 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5617 or _Thread_local as appropriate in diagnostics.
5618 (build_null_declspecs): Initialize ret->thread_gnu_p.
5619 (declspecs_add_scspec): Handle either __thread or _Thread_local
5620 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5621 pedantic. Do not disallow _Thread_local extern and _Thread_local
5622 static.
5623
267bac10
JM
56242013-11-07 Joseph Myers <joseph@codesourcery.com>
5625 Andrew MacLeod <amacleod@redhat.com>
5626
5627 * c-aux-info.c (gen_type): Handle atomic qualifier.
5628 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5629 qualifiers when compating types.
5630 (shadow_tag_warned): Handle atomic_p in declspecs.
5631 (quals_from_declspecs): Likewise.
5632 (start_decl): Use c_type_promotes_to when promoting argument
5633 types.
5634 (grokdeclarator): Handle _Atomic.
5635 (get_parm_info): Diagnose any qualifier on "void" as only
5636 parameter.
5637 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5638 comparing types. Use c_type_promotes_to when promoting argument
5639 types.
5640 (finish_function): Use c_type_promotes_to when promoting argument
5641 types.
5642 (build_null_declspecs): Handle atomic_p in declspecs.
5643 (declspecs_add_qual): Handle RID_ATOMIC.
5644 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5645 (c_token_starts_declspecs): Handle RID_ATOMIC.
5646 (c_parser_declspecs): Handle atomic type specifiers and
5647 qualifiers.
5648 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5649 from types of expressions with atomic type.
5650 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5651 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5652 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5653 (c_parser_statement_after_labels, c_parser_switch_statement)
5654 (c_parser_for_statement, c_parser_expr_no_commas)
5655 (c_parser_conditional_expression, c_parser_binary_expression)
5656 (c_parser_cast_expression, c_parser_unary_expression)
5657 (c_parser_postfix_expression)
5658 (c_parser_postfix_expression_after_primary, c_parser_expression):
5659 Use convert_lvalue_to_rvalue.
5660 (c_parser_expression_conv, c_parser_expr_list): Document
5661 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5662 (c_parser_objc_synchronized_statement): Use
5663 convert_lvalue_to_rvalue.
5664 (c_parser_objc_selector): Handle RID_ATOMIC.
5665 (c_parser_objc_receiver, c_parser_array_notation): Use
5666 convert_lvalue_to_rvalue.
5667 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5668 _Atomic (type-name).
5669 (struct c_declspecs): Add atomic_p field.
5670 (convert_lvalue_to_rvalue): Declare.
5671 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5672 corresponding atomic types.
5673 (qualify_type): Don't add _Atomic qualifiers from second argument.
5674 (comp_target_types): Do not allow _Atomic mismatches.
5675 (type_lists_compatible_p): Do not remove atomic qualifiers when
5676 comparing types.
5677 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5678 (build_atomic_assign): New functions.
5679 (build_unary_op): Use build_atomic_assign for atomic increment and
5680 decrement.
5681 (build_conditional_expr): Do not treat _Atomic void as a qualified
5682 version of void.
5683 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5684 (find_anonymous_field_with_type, convert_to_anonymous_field)
5685 (convert_for_assignment): Do not remove atomic qualifiers when
5686 comparing types.
5687 (digest_init): Do not accept initialization of arrays of atomic
5688 elements by string constants.
5689 (build_asm_expr): Use convert_lvalue_to_rvalue.
5690 (build_binary_op): Do not treat _Atomic void as a qualified
5691 version of void.
5692
0c249d4b
DD
56932013-11-06 DJ Delorie <dj@redhat.com>
5694
5695 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5696 both explicit and builtin, print the location of the explicit one.
5697
6d7f7e0a
TB
56982013-11-05 Tobias Burnus <burnus@net-b.de>
5699
5700 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5701 c_parser_omp_distribute, c_parser_omp_teams,
5702 c_parser_omp_target, c_parser_omp_declare): Handle
5703 -fopenmp-simd.
5704
b906f4ca
MP
57052013-11-03 Marek Polacek <polacek@redhat.com>
5706
5707 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5708
ee1d5a02
JJ
57092013-11-01 Jakub Jelinek <jakub@redhat.com>
5710
5711 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5712 check_dup_generic at the end, unless remove is true.
5713 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5714 remove = true;.
5715 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5716
5a9785fb
JJ
57172013-10-31 Jakub Jelinek <jakub@redhat.com>
5718
5719 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5720 with decl that is not pointer nor array.
5721
939b37da
BI
57222013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5723
5724 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5725 a spawning function is found.
5726 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5727 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5728 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5729 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5730 case.
5731 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5732 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5733 expr.
5734 (c_finish_return): Added a check to reject _Cilk_spawn in return
5735 expression.
5736 (build_cilk_spawn): New function.
5737 (build_cilk_sync): Likewise.
5738 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
5739
d4af74d4
TB
57402013-10-27 Tobias Burnus <burnus@net-b.de>
5741
5742 PR other/33426
5743 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5744 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5745 (c_parser_statement_after_labels): Update calls.
5746
d73749df 57472013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5748
5749 PR other/33426
5750 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5751 Handle PRAGMA_IVDEP.
5752 (c_parser_statement_after_labels): Update call.
5753
f28aa681
MP
57542013-10-24 Marek Polacek <polacek@redhat.com>
5755
5756 * c-parser.c (c_parser_struct_declaration): Add a comment.
5757 (c_parser_declarator): Don't allow _Alignas here.
5758
0645c1a2
AM
57592013-10-17 Andrew MacLeod <amacleod@redhat.com>
5760
5761 * c-parser.c: Include omp-low.h.
5762 * c-typeck.c: Likewise.
5763
568a31f2
MP
57642013-10-17 Marek Polacek <polacek@redhat.com>
5765
5766 PR c/58267
5767 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5768 Document syntax of the array-declarator.
5769 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5770 are not permitted.
5771 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5772 (c_parser_struct_declaration): Likewise.
5773 (c_parser_declarator): Likewise.
5774 (c_parser_direct_declarator_inner): Likewise.
5775 (c_parser_parameter_declaration): Likewise.
5776 (c_parser_type_name): Likewise.
5777
acf0174b
JJ
57782013-10-11 Jakub Jelinek <jakub@redhat.com>
5779
5780 * c-lang.h (current_omp_declare_target_attribute): New extern
5781 decl.
5782 * c-parser.c: Include c-lang.h.
5783 (struct c_parser): Change tokens to c_token *.
5784 Add tokens_buf field. Change tokens_avail type to unsigned int.
5785 (c_parser_consume_token): If parser->tokens isn't
5786 &parser->tokens_buf[0], increment parser->tokens.
5787 (c_parser_consume_pragma): Likewise.
5788 (enum pragma_context): Add pragma_struct and pragma_param.
5789 (c_parser_external_declaration): Adjust
5790 c_parser_declaration_or_fndef caller.
5791 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5792 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5793 Adjust recursive call.
5794 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5795 of pragma_external.
5796 (c_parser_parameter_declaration): Use pragma_param instead of
5797 pragma_external.
5798 (c_parser_compound_statement_nostart, c_parser_label,
5799 c_parser_for_statement): Adjust
5800 c_parser_declaration_or_fndef callers.
5801 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5802 it through to c_parser_conditional_expression.
5803 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5804 pass it through to c_parser_binary_expression. Adjust recursive
5805 call.
5806 (c_parser_binary_expression): Remove prec argument, add
5807 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5808 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5809 binop matches it, use build2 instead of parser_build_binary_op.
5810 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5811 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5812 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5813 Handle pragma_struct and pragma_param the same as pragma_external.
5814 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5815 (c_parser_omp_variable_list): Parse array sections for
5816 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5817 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5818 (c_parser_omp_clause_reduction): Handle user defined reductions.
5819 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5820 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5821 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5822 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5823 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5824 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5825 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5826 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5827 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5828 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5829 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5830 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5831 (c_parser_omp_for_loop): Add CODE argument, pass it through
5832 to c_finish_omp_for. Change last argument to cclauses,
5833 and adjust uses to grab parallel clauses from the array of all
5834 the split clauses. Adjust c_parser_binary_expression,
5835 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5836 (omp_split_clauses): New function.
5837 (c_parser_omp_simd): New function.
5838 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5839 Allow the function to be called also when parsing combined constructs,
5840 and call c_parser_omp_simd when parsing for simd.
5841 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5842 #pragma omp section, require exactly one structured-block instead of
5843 sequence of statements.
5844 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5845 Allow the function to be called also when parsing combined constructs.
5846 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5847 Allow the function to be called also when parsing combined
5848 constructs.
5849 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5850 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5851 c_parser_omp_teams, c_parser_omp_target_data,
5852 c_parser_omp_target_update, c_parser_omp_target,
5853 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5854 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5855 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5856 (c_parser_omp_construct): Add p_name and mask vars. Handle
5857 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5858 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5859 and c_parser_omp_sections callers.
5860 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5861 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5862 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5863 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5864 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5865 OMP_CLAUSE_DEPEND.
5866 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5867 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5868 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5869 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5870 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5871 * c-typeck.c: Include tree-inline.h.
5872 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5873 handle_omp_array_sections_1, handle_omp_array_sections,
5874 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5875 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5876 user defined reductions.
5877 (c_tree_equal): New function.
5878 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5879 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5880 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5881 c_check_omp_declare_reduction_r): New prototypes.
5882 * c-decl.c (current_omp_declare_target_attribute): New variable.
5883 (c_decl_attributes): New function.
5884 (start_decl, start_function): Use it instead of decl_attributes.
5885 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5886 c_omp_reduction_decl, c_omp_reduction_lookup,
5887 c_check_omp_declare_reduction_r): New functions.
5888
0a6c2227
TT
58892013-09-25 Tom Tromey <tromey@redhat.com>
5890
5891 * Make-lang.in (c/gccspec.o): Remove.
5892 (CFLAGS-c/gccspec.o): New variable.
5893 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5894 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5895 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5896
f3bc55f0
TT
58972013-09-25 Tom Tromey <tromey@redhat.com>
5898
5899 * Make-lang.in (c/gccspec.o): Don't use subshell.
5900
a24d975c
MP
59012013-09-18 Marek Polacek <polacek@redhat.com>
5902
5903 PR sanitize/58443
5904 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5905 Remove unnecessary check.
5906
ce6923c5
MP
59072013-09-18 Marek Polacek <polacek@redhat.com>
5908
5909 PR sanitizer/58411
5910 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5911 no_sanitize_undefined attribute.
5912
a1e51df9
KT
59132013-09-13 Kai Tietz <ktietz@redhat.com>
5914
5915 PR target/57848
5916 * c-decl.c (c_builtin_function_ext_scope): Remove
5917 wrong assumption that it is never called on prexisting
5918 symbol.
5919
0af94e6f
JR
59202013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5921
5922 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5923
20059c8b
GDR
59242013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5925
5926 * c-objc-common.c (c_tree_printer): Tidy.
5927
de5a5fa1
MP
59282013-08-30 Marek Polacek <polacek@redhat.com>
5929
5930 * c-typeck.c (build_binary_op): Add division by zero and shift
5931 instrumentation.
5932
2531a1d9 59332013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5934 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5935
6e2bcc98 5936 PR c/35649
2531a1d9
JR
5937 * c-typeck.c (c_common_type): Prefer double_type_node over
5938 other REAL_TYPE types with the same precision.
5939 (convert_arguments): Likewise.
5940
025311c4
GDR
59412013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5942
5943 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5944 (c_initialize_diagnostics): Call a destructor for the early printer.
5945
da6ca2b5
GDR
59462013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5947
5948 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5949 printer initialization.
5950
318cda85 59512013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 5952
318cda85
BI
5953 PR c/57490
5954 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5955 check for truth values.
5956 (expand_array_notation_exprs): Added truth values case. Removed an
5957 unwanted else. Added for-loop to walk through subtrees in default
5958 case.
5959
b066401f
GDR
59602013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5961
5962 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5963
fb48aadc
JM
59642013-07-23 Joseph Myers <joseph@codesourcery.com>
5965
5966 * c-parser.c (struct c_generic_association): Fix typo.
5967
433cc7b0
TT
59682013-07-23 Tom Tromey <tromey@redhat.com>
5969 Joseph Myers <joseph@codesourcery.com>
5970
5971 * c-parser.c (struct c_generic_association): New.
5972 (c_generic_association_d): New typedef.
5973 (c_parser_generic_selection): New function.
5974 (c_parser_postfix_expression): Handle RID_GENERIC.
5975
26d40c3d
JM
59762013-07-13 Jason Merrill <jason@redhat.com>
5977
5978 PR c++/57793
5979 * c-decl.c (finish_struct): Check for too-large class.
5980
ecdbd01a 59812013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5982
5983 PR c/57821
5984 * c-typeck.c (set_init_index): When folding, check for index overflow.
5985
1141ed3f
BI
59862013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5987
5988 * c-parser.c (c_parser_array_notation): Removed rejection of array
5989 notations in an array of function pointers.
5990
713b46fa
BI
59912013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5992
5993 * c-array-notation.c (make_triplet_val_inv): New function.
5994 (create_cmp_incr): Likewise.
5995 (create_array_refs): Likewise.
5996 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5997 Also modularized common parts between functions and called the function.
5998 (build_array_notation_expr): Likewise.
5999 (fix_conditional_array_notations_1): Likewise.
6000 (fix_array_notation_expr): Likewise.
6001 (fix_array_notation_call_expr): Likewise.
6002
92f20202
MP
60032013-06-18 Marek Polacek <polacek@redhat.com>
6004
6005 PR c/57630
6006 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6007
73a23b06
BI
60082013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6009
6010 * c-array-notation.c (build_array_notation_expr): Reject array notation
6011 mismatch between LHS and RHS even inside a call_expr. Also, removed
6012 a couple while statements that were dead code.
6013
00b8517d
BI
60142013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6015
6016 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6017 excessive precision expressions in function parameters. Also removed
6018 couple unwanted while statements.
6019
1509bdda
BI
60202013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6021
6022 * c-array-notation.c (expand_array_notation_exprs): Added
6023 ARRAY_NOTATION_REF case.
6024
d60f1706
BI
60252013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6026
6027 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6028 function to c-family/array-notation-common.c.
6029 (is_cilkplus_reduce_builtin): Likewise.
6030 (find_rank): Likewise.
6031 (extract_array_notation_exprs): Likewise.
6032 (replace_array_notations): Likewise.
6033 (find_inv_trees): Likewise.
6034 (replace_inv_trees): Likewise.
6035 (contains_array_notation_expr): Likewise.
6036 (find_correct_array_notation_type): Likewise.
6037 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6038 (struct inv_list): Moved this to c-family/array-notation-common.c.
6039 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
6040
6d6efbb3
BI
60412013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6042
6043 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6044 reduction functions outside the for-loop. Added a check if the fundecl
6045 is non-NULL. Finally, removed an unwanted if-statement, and made the
6046 body unconditional.
6047
25c22937
BI
60482013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6049
6050 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6051 condition of the if-statement matches the rank of else-block and then-
6052 block when array notations are used.
6053 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6054 expression after the entire function body is parsed.
6055 (c_parser_expr_no_commas): Delayed creating array notation expressions
6056 to the end of function parsing.
6057 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6058 whole if-statement instead of just the condition.
6059 (expand_array_notation_exprs): Added MODIFY_EXPR case.
6060
edd25645
BI
60612013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6062
6063 PR c/57474
6064 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6065 array to NULL_TREE if they are unused. Also added a check for the
6066 field to be NULL before its fields are used in future.
6067
065ce7f1
RO
60682013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6069
6070 PR bootstrap/57450
6071 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6072 (build_array_notation_expr): Likewise.
6073
36536d79
BI
60742013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6075
6076 * c-typeck.c (build_array_ref): Added a check to see if array's
6077 index is greater than one. If true, then emit an error.
6078 (build_function_call_vec): Exclude error reporting and checking
6079 for builtin array-notation functions.
6080 (convert_arguments): Likewise.
6081 (c_finish_return): Added a check for array notations as a return
6082 expression. If true, then emit an error.
6083 (c_finish_loop): Added a check for array notations in a loop
6084 condition. If true then emit an error.
6085 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6086 (build_binary_op): Added a check for array notation expr inside
6087 op1 and op0. If present, we call another function to find correct
6088 type.
6089 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6090 * c-parser.c (c_parser_compound_statement): Check if array
6091 notation code is used in tree, if so, then transform them into
6092 appropriate C code.
6093 (c_parser_expr_no_commas): Check if array notation is used in LHS
6094 or RHS, if so, then build array notation expression instead of
6095 regular modify.
6096 (c_parser_postfix_expression_after_primary): Added a check for
6097 colon(s) after square braces, if so then handle it like an array
6098 notation. Also, break up array notations in unary op if found.
6099 (c_parser_direct_declarator_inner): Added a check for array
6100 notation.
6101 (c_parser_compound_statement): Added a check for array notation in
6102 a stmt. If one is present, then expand array notation expr.
6103 (c_parser_if_statement): Likewise.
6104 (c_parser_switch_statement): Added a check for array notations in
6105 a switch statement's condition. If true, then output an error.
6106 (c_parser_while_statement): Similarly, but for a while.
6107 (c_parser_do_statement): Similarly, but for a do-while.
6108 (c_parser_for_statement): Similarly, but for a for-loop.
6109 (c_parser_unary_expression): Check if array notation is used in a
6110 pre-increment or pre-decrement expression. If true, then expand
6111 them.
6112 (c_parser_array_notation): New function.
6113 * c-array-notation.c: New file.
6114 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
6115
cd192ccc
MS
61162013-05-23 Mike Stump <mikestump@comcast.net>
6117
6118 * c-typeck.c (convert_for_assignment): Handle references to memory
6119 spaces better.
6120
427b248d
JM
61212013-05-16 Jason Merrill <jason@redhat.com>
6122
6123 * Make-lang.in (cc1$(exeext)): Use link mutex.
6124
44d90fe1
PC
61252013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6126
6127 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6128 to simply use OPT_Wpointer_arith.
6129 (build_unary_op): Likewise.
6130
4e7d7b3d
JJ
61312013-04-03 Jakub Jelinek <jakub@redhat.com>
6132
6133 PR c/19449
6134 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6135 argument. If set, or it temporarily for parsing of the first
6136 argument into force_folding_builtin_constant_p.
6137 (c_parser_postfix_expression): Adjust callers.
6138
839b422f
RB
61392013-03-21 Richard Biener <rguenther@suse.de>
6140
6141 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6142 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6143
2ee028f1
MP
61442013-02-12 Marek Polacek <polacek@redhat.com>
6145
6146 PR c/44938
6147 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6148 origtypes to NULL.
6149
8824edff
JJ
61502013-01-24 Jakub Jelinek <jakub@redhat.com>
6151
6152 PR c/56078
6153 * c-typeck.c (set_nonincremental_init_from_string): If
6154 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6155 returned false.
6156 (process_init_element): Likewise.
6157
eadd3d0d
JJ
61582012-12-20 Jakub Jelinek <jakub@redhat.com>
6159
6160 PR c++/55619
6161 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6162 argument, don't call default_function_array_conversion
6163 nor c_fully_fold here.
6164 (c_parser_asm_statement): Adjust callers.
6165 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6166 and outputs here, and call default_function_array_conversion
6167 on inputs that don't need to be addressable.
6168
f8a93a2e
JJ
61692012-12-18 Jakub Jelinek <jakub@redhat.com>
6170
6171 PR c/39464
6172 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6173 warning require that both c_common_unsigned_type as well as
6174 c_common_signed_type is the same for both mvl and mvr types.
6175
9771b263
DN
61762012-11-16 Diego Novillo <dnovillo@google.com>
6177
6178 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6179
6180 * c-common.c: Use new vec API in vec.h.
6181 * c-common.h: Likewise.
6182 * c-gimplify.c: Likewise.
6183 * c-pragma.c: Likewise.
6184 * c-pretty-print.c: Likewise.
6185 * c-pretty-print.h: Likewise.
6186 * c-semantics.c: Likewise.
6187 * c-decl.c: Likewise.
6188 * c-parser.c: Likewise.
6189 * c-tree.h: Likewise.
6190 * c-typeck.c: Likewise.
6191
880661a4
JW
61922012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6193
6194 PR c++/54930
6195 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6196
077d1abe
MLI
61972012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6198
6199 PR c/53066
6200 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6201 shadows a function, unless the variable is a function or a
6202 pointer-to-function.
6203
3a785c97
JJ
62042012-10-12 Jakub Jelinek <jakub@redhat.com>
6205
6206 PR c/54381
6207 * c-parser.c (struct c_tree_loc_pair): Removed.
6208 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6209 add location_t * and tree * arguments, fill in array of 3
6210 sizeof_arg trees and corresponding locs.
6211 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6212 c_parser_expr_list callers.
6213 (c_parser_postfix_expression_after_primary): Likewise. Pass
6214 array of 3 sizeof_arg trees and locs (corresponding to first
6215 3 arguments) to sizeof_pointer_memaccess_warning.
6216
703c8606
LC
62172012-10-09 Lawrence Crowl <crowl@google.com>
6218
6219 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6220 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6221 hash table.
6222
5d9de0d0
PC
62232012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6224
6225 PR c++/54194
6226 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6227 call.
6228
a212e43f
MG
62292012-10-09 Marc Glisse <marc.glisse@inria.fr>
6230
6231 PR c++/54427
6232 * c-typeck.c: Include c-common.h.
6233 (enum stv_conv): Moved to c-common.h.
6234 (scalar_to_vector): Moved to c-common.c.
6235 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6236 * Make-lang.in: c-typeck.c depends on c-common.h.
6237
3b78de56
AC
62382012-10-04 Arnaud Charlet <charlet@adacore.com>
6239
6240 * c-decl.c (c_write_global_declarations): Fix handling of
6241 -fdump-ada-spec*.
6242
78c60e3d
SS
62432012-09-30 Sharad Singhai <singhai@google.com>
6244
6245 * c-decl.c (c_write_global_declarations): Use a different method
6246 to determine if the dump has ben initialized.
6247
9f33203d
JM
62482012-09-14 Joseph Myers <joseph@codesourcery.com>
6249
6250 PR c/54552
6251 * c-typeck.c (c_cast_expr): When casting to a type requiring
6252 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6253 c_fully_fold first.
6254
a27d595d
JM
62552012-09-14 Joseph Myers <joseph@codesourcery.com>
6256
6257 PR c/54103
6258 * c-typeck.c (build_unary_op): Pass original argument of
6259 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6260 any C_MAYBE_CONST_EXPR, if it has integer operands.
6261 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6262 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6263 to c_objc_common_truthvalue_conversion, then remove any
6264 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6265 c_objc_common_truthvalue_conversion not
6266 c_common_truthvalue_conversion.
6267 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6268 call note_integer_operands for arguments with integer operands
6269 that are not integer constants.
6270
9feb29df
JJ
62712012-09-13 Jakub Jelinek <jakub@redhat.com>
6272
6273 PR c/54559
6274 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6275 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6276
d409320c
JJ
62772012-08-31 Jakub Jelinek <jakub@redhat.com>
6278
6279 PR c/54428
6280 * c-convert.c (convert): Don't call fold_convert_loc if
6281 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6282 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6283 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6284
6265d07c
JJ
62852012-08-24 Jakub Jelinek <jakub@redhat.com>
6286
6287 PR c/54355
6288 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6289 for nested and empty_ok arguments in the call to
6290 c_parser_declaration_or_fndef.
6291
1a4049e7
JJ
62922012-08-17 Jakub Jelinek <jakub@redhat.com>
6293
6294 * c-tree.h (c_last_sizeof_arg): Declare.
6295 * c-parser.c (struct c_tree_loc_pair): New type.
6296 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6297 non-NULL.
6298 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6299 (c_parser_postfix_expression_after_primary): Likewise. Call
6300 sizeof_pointer_memaccess_warning if needed.
6301 (sizeof_ptr_memacc_comptypes): New function.
6302 * c-typeck.c (c_last_sizeof_arg): New global variable.
6303 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6304
0229aee9
UB
63052012-07-24 Uros Bizjak <ubizjak@gmail.com>
6306
6307 * c-lang.h (lang_decl): Add variable_size GTY option.
6308
7ee2468b
SB
63092012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6310
6311 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6312 * Make-lang.in: Fix dependencies.
6313
d4a10d0a
SB
63142012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6315
6316 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6317 and add language Makefile hooks.
6318 * config-lang.in: New file.
6319 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6320 add the required "normal" config-lang.in rules.
6321 * c-lang.h: Moved from gcc/ to here.
6322 * c-tree.h: Likewise.
6323 * c-objc-common.c: Likewise.
6324 * c-objc-common.h: Likewise.
6325 * c-typeck.c: Likewise.
6326 * c-convert.c: Likewise.
6327 * c-lang.c: Likewise.
6328 * c-aux-info.c: Likewise.
6329 * c-errors.c: Likewise.
6330 * gccspec.c: Likewise.
6331 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6332 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6333\f
a5544970 6334Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6335
6336Copying and distribution of this file, with or without modification,
6337are permitted in any medium without royalty provided the copyright
6338notice and this notice are preserved.