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