]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
mklog: Do not print changed functions in testsuite
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
22f8849d
IS
12019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2
3 PR pch/61250
4 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
5 after determining that the first token is not
6 PRAGMA_GCC_PCH_PREPROCESS.
7
db376f45
EB
82019-08-22 Eric Botcazou <ebotcazou@adacore.com>
9
10 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
11 FUNCTION_DECL to the right value in the presence of nested declarators.
12
4d732405
RS
132019-08-13 Richard Sandiford <richard.sandiford@arm.com>
14
15 PR middle-end/91421
16 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
17
cb1180d5
RS
182019-08-13 Richard Sandiford <richard.sandiford@arm.com>
19
20 PR middle-end/91421
21 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
22 of a built_in_function.
23 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
24
77eb117f
JJ
252019-08-10 Jakub Jelinek <jakub@redhat.com>
26
27 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
28 (c_parser_omp_clause_device_type): New function.
29 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
30 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
31 (c_parser_omp_declare_target): Handle device_type clauses. Remove
32 diagnostics for declare target with clauses nested in clause-less
33 declare target declaration-definition-seq.
34 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
35
2c3b8bad
JJ
362019-08-09 Jakub Jelinek <jakub@redhat.com>
37
bb522e2e
JJ
38 * c-parser.c (check_no_duplicate_clause): Simplify using
39 omp_find_clause.
40 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
41 directive name modifiers.
42 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
43
2c3b8bad
JJ
44 PR c/91401
45 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
46 check_no_duplicate_clause call. Comment it out, instead emit a
47 warning for duplicate dist_schedule clauses.
48
99769e7f
RS
492019-08-08 Richard Sandiford <richard.sandiford@arm.com>
50
51 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
52
8860d270
JJ
532019-08-08 Jakub Jelinek <jakub@redhat.com>
54
55 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
56 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
57 instead of generic_head to track duplicates.
58
398e3feb
JJ
592019-08-07 Jakub Jelinek <jakub@redhat.com>
60
61 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
62 (c_parser_omp_clause_use_device_addr): New function.
63 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
64 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
65 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
66 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
67 map or use_device_* clauses.
68 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
69 in OpenMP, require pointer type rather than pointer or array type.
70 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
71
a28351e7
JJ
722019-07-31 Jakub Jelinek <jakub@redhat.com>
73
74 PR c/91192
75 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
76 even if finish is UNKNOWN_LOCATION, just use start as finish in that
77 case.
78
6343b6bf
ML
792019-07-25 Martin Liska <mliska@suse.cz>
80 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
81
82 PR c++/23383
83 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
84
cb50701e
ML
852019-07-25 Martin Liska <mliska@suse.cz>
86
87 * c-decl.c (merge_decls): Use new macros
88 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
89
62e3e66f
RB
902019-07-23 Richard Biener <rguenther@suse.de>
91
92 PR tree-optimization/83518
93 * gimple-parser.c (c_parser_parse_gimple_body): When we have
94 a CFG also rebuild cgraph edges.
95
554a530f
JJ
962019-07-20 Jakub Jelinek <jakub@redhat.com>
97
98 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
99 (c_parser_omp_clause_bind): New function.
100 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
101 (OMP_LOOP_CLAUSE_MASK): Define.
102 (c_parser_omp_loop): New function.
103 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
104 loop combined with parallel or teams.
105 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
106 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
107
d119bf79
RS
1082019-07-18 Richard Sandiford <richard.sandiford@arm.com>
109
110 PR c/53633
111 * c-decl.c (finish_function): Check targetm.warn_func_return
112 before issuing a -Wreturn-type warning.
113
ab20d992 1142019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
115
116 * gimple-parser.c (c_parser_gimple_try_stmt): New.
117 (c_parser_compound_statement): Call it.
118
1fdd6f04
JJ
1192019-07-12 Jakub Jelinek <jakub@redhat.com>
120
121 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
122 (c_parser_omp_clause_order): New function.
123 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
124 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
125 PRAGMA_OMP_CLAUSE_ORDER.
126 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
127
8389386c
RB
1282019-07-10 Richard Biener <rguenther@suse.de>
129
130 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
131 _Literal (int *) &x for address literals.
132
99b1c316
MS
1332019-07-09 Martin Sebor <msebor@redhat.com>
134
135 PR c++/61339
136 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
137 to class.
138 (field_decl_cmp): Same.
139 * c-parser.c (c_parser_struct_or_union_specifier): Same.
140 * c-tree.h: Same.
141 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
142
6c1dae73
MS
1432019-07-09 Martin Sebor <msebor@redhat.com>
144
145 PR c++/61339
146 * c-decl.c: Change class-key from class to struct and vice versa
147 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
148 * gimple-parser.c: Same.
149
69b5279e
RB
1502019-07-01 Richard Biener <rguenther@suse.de>
151
152 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
153 _Literal (char *) &"foo" for address literals pointing to
154 STRING_CSTs.
155
ab20d992
JJ
1562019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
157
158 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
159 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
160 C incompatibility if alternate "__intN__" form is used.
161
1e3d475e
MS
1622019-06-24 Martin Sebor <msebor@redhat.com>
163
164 * c-typeck.c (build_binary_op): Hyphenate floating-point.
165
bf38f7e9
JJ
1662019-06-10 Jakub Jelinek <jakub@redhat.com>
167
168 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
169 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
170 (c_parser_omp_scan_loop_body): New function.
171 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
172 inscan reduction clauses.
173 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
174 non-inscan reductions on the same construct, or inscan reductions with
175 ordered or schedule clauses, or inscan array reductions.
176
65985d78
MS
1772019-06-05 Martin Sebor <msebor@redhat.com>
178
179 PR c/90737
180 * c-typeck.c (c_finish_return): Only consider functions returning
181 pointers as candidates for -Wreturn-local-addr.
182
0ecf545c
MS
1832019-06-05 Martin Sebor <msebor@redhat.com>
184
185 * c-decl.c (start_decl): Adjust quoting and hyphenation
186 in diagnostics.
187 (finish_decl): Same.
188 (finish_enum): Same.
189 (start_function): Same.
190 (declspecs_add_type): Same.
191 * c-parser.c (warn_for_abs): Same.
192 * c-typeck.c (build_binary_op): Same.
193
e03436e7
TS
1942019-05-17 Thomas Schwinge <thomas@codesourcery.com>
195
b48f44bf
TS
196 PR c/89433
197 * c-parser.c (c_finish_oacc_routine): Rework checking if already
198 marked with an OpenACC 'routine' directive.
199
5bf04509
TS
200 PR c/89433
201 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
202 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
203
e03436e7
TS
204 PR c/89433
205 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
206 clauses from "omp declare target" attribute.
207
a9c697b8
MS
2082019-05-16 Martin Sebor <msebor@redhat.com>
209
ab20d992
JJ
210 * c-decl.c (start_decl): Quote keywords, operators, and
211 types in diagnostics.
212 (finish_decl): Same.
213 * c-parser.c (c_parser_asm_statement): Same.
214 (c_parser_conditional_expression): Same.
215 (c_parser_transaction_cancel): Same.
216 * c-typeck.c (c_common_type): Same.
217 (build_conditional_expr): Same.
218 (digest_init): Same.
219 (process_init_element): Same.
220 (build_binary_op): Same.
a9c697b8 221
c4499192
RB
2222019-05-17 Richard Biener <rguenther@suse.de>
223
224 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
225 (c_parser_gimple_unary_expression): Likewise.
226 (c_parser_gimple_parentized_ternary_expression): New function.
227
adfe6e4b
RB
2282019-05-16 Richard Biener <rguenther@suse.de>
229
230 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
231 (c_parser_gimple_unary_expression): Likewise.
232
186dabf2
RB
2332019-05-15 Richard Biener <rguenther@suse.de>
234
235 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
236 __BIT_FIELD_REF.
237
1158c5b4
RB
2382019-05-14 Richard Biener <rguenther@suse.de>
239
240 * gimple-parser.c (c_parser_gimple_statement): Remove
241 questionable auto-promotion to VIEW_CONVERT_EXPR.
242 (c_parser_gimple_typespec): Split out from __MEM parsing.
243 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
244 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
245 as __VIEW_CONVERT with -gimple.
246
fd4485aa
ML
2472019-05-09 Martin Liska <mliska@suse.cz>
248
249 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
250 __MAX.
251 (c_parser_gimple_unary_expression): Parse also binary expression
252 __MIN and __MAX.
253 (c_parser_gimple_parentized_binary_expression): New function.
254
d276406a
ML
2552019-05-09 Martin Liska <mliska@suse.cz>
256
257 * gimple-parser.c (struct gimple_parser): Add probability.
258 for gimple_parser_edge.
259 (gimple_parser::push_edge): Add new argument probability.
260 (c_parser_gimple_parse_bb_spec): Parse also probability
261 if present.
262 (c_parser_parse_gimple_body): Set edge probability.
263 (c_parser_gimple_compound_statement): Consume token
264 before calling c_parser_gimple_goto_stmt.
265 Parse BB counts.
266 (c_parser_gimple_statement): Pass new argument.
267 (c_parser_gimple_goto_stmt): Likewise.
268 (c_parser_gimple_if_stmt): Likewise.
269 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
270 * c-parser.c (c_parser_declaration_or_fndef): Pass
271 hot_bb_threshold argument.
272 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
273 field.
274 (c_parser_gimple_parse_bb_spec_edge_probability): New.
275
f179b64e
JJ
2762019-04-26 Jakub Jelinek <jakub@redhat.com>
277
278 PR debug/90197
279 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
280 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
281 (c_parser_do_statement): Likewise.
282 (c_parser_for_statement): Likewise. Formatting fixes.
283 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
284 emit DEBUG_BEGIN_STMTs if needed.
285
e7178413
JJ
2862019-04-19 Jakub Jelinek <jakub@redhat.com>
287
c280b7ee
JJ
288 PR c/89888
289 * c-typeck.c (struct c_switch): Remove outside_range_p member.
290 (c_start_case): Don't clear it.
291 (do_case): Adjust c_add_case_label caller.
292 (c_finish_case): Adjust c_do_switch_warnings caller.
293
e7178413
JJ
294 PR c++/90108
295 * c-decl.c (merge_decls): If remove is main variant and
296 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
297 variant that has newdecl as TYPE_NAME if any.
298
60a2c645
JJ
2992019-04-12 Jakub Jelinek <jakub@redhat.com>
300
301 PR c/89933
302 * c-decl.c (merge_decls): When newdecl's type is its main variant,
303 don't try to remove it from the variant list, but instead assert
304 it has no variants.
305
2a82beaa
RB
3062019-04-01 Richard Biener <rguenther@suse.de>
307
308 PR c/71598
309 * c-tree.h (c_get_alias_set): Declare.
310 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
311 * c-objc-common.c (c_get_alias_set): Treat enumeral types
312 as the underlying integer type.
313
bec1da64
MS
3142019-03-19 Martin Sebor <msebor@redhat.com>
315
316 PR tree-optimization/89688
317 * c-decl.c (finish_decl): Call braced_lists_to_string for more
318 kinds of initializers.
319
855cd9b1
JJ
3202019-03-19 Jakub Jelinek <jakub@redhat.com>
321
322 PR c/89734
323 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
324 return type even if quals_used is 0. Formatting fixes.
325
baa09dc5
RB
3262019-03-14 Richard Biener <rguenther@suse.de>
327
328 * c-tree.h (enum c_declspec_il): New.
329 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
330 enum bitfield.
331 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
332 Pass start pass and declspec_il to c_parser_parse_gimple_body.
333 (c_parser_declspecs): Adjust.
334 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
335 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
336 and bitmap.h.
337 (struct gimple_parser): New.
338 (gimple_parser::push_edge): New method.
339 (c_parser_gimple_parse_bb_spec): New helper.
340 (c_parser_parse_gimple_body): Get start pass and IL specification.
341 Initialize SSA and CFG.
342 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
343 Build a gimple_parser parsing state and pass it along.
344 (c_parser_gimple_statement): Change intermittend __PHI internal
345 function argument for the edge.
346 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
347 (c_parser_gimple_goto_stmt): Record edges to build.
348 (c_parser_gimple_if_stmt): Likewise.
349 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
350 (c_parser_gimple_or_rtl_pass_list): Likewise.
351
a3f9f006
ML
3522019-03-11 Martin Liska <mliska@suse.cz>
353
354 * c-decl.c (check_for_loop_decls): Wrap an option name
355 in a string format message and fix GNU coding style.
356 * c-parser.c (c_parser_declspecs): Likewise.
357
1db01ff9
JJ
3582019-03-08 Jakub Jelinek <jakub@redhat.com>
359
360 PR tree-optimization/89550
361 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
362 returned true.
363 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
364 or warning returned true.
365
66dcb747
JJ
3662019-02-28 Jakub Jelinek <jakub@redhat.com>
367
368 PR c/89525
369 * c-typeck.c (convert_arguments): Call inform_declaration only if
370 the previous warning_at call returned true.
371
2263c9f2
TS
3722019-02-22 Thomas Schwinge <thomas@codesourcery.com>
373
374 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
375 parameter. Adjust all users.
376 (c_parser_oacc_simple_clause): Replace parser with loc formal
377 parameter. Adjust all users.
378
ab20d992 3792019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
380
381 PR c/87924
382 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
383 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
384
5f88ba10
JJ
3852019-02-15 Jakub Jelinek <jakub@redhat.com>
386
387 PR c/89340
388 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
389 before c_decl_attributes rather than after it.
390
cfc30fd1
JJ
3912019-02-06 Jakub Jelinek <jakub@redhat.com>
392
393 PR c/89211
394 * c-parser.c (c_parser_declaration_or_fndef): Don't update
395 DECL_ARGUMENTS of d if it has been defined already. Use a single if
396 instead of 3 nested ifs.
397
fbe83e6b
JM
3982019-02-06 Joseph Myers <joseph@codesourcery.com>
399
400 PR c/88584
401 * c-decl.c (finish_decl): Do not complete array types for arrays
402 with external linkage not at file scope.
403
f461f938
RB
4042019-02-05 Richard Biener <rguenther@suse.de>
405
406 PR c/88606
407 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
408 all type variants when not supported.
409
fe509359
JJ
4102019-01-30 Jakub Jelinek <jakub@redhat.com>
411
412 PR c/89061
413 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
414 * c-decl.c (decl_jump_unsafe): Return false for
415 C_DECL_COMPOUND_LITERAL_P decls.
416 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
417
6a335b96
JJ
4182019-01-29 Jakub Jelinek <jakub@redhat.com>
419
f4b7e754
JJ
420 PR c/89045
421 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
422 scope.
423
6a335b96
JJ
424 PR c/86125
425 * c-decl.c (last_fileptr_type): Remove.
426 (last_structptr_types): New variable.
427 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
428 {old,new}rettype instead of the types themselves. Assert
429 last_structptr_types array has the same number of elements
430 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
431 argument oldtype and newtype. Instead of handling
432 just fileptr_type_node specially, handle all builtin_structptr_types
433 pointer nodes. Formatting fix.
434
d8b5a1a0
MS
4352019-01-24 Martin Sebor <msebor@redhat.com>
436
437 PR c/86125
438 PR c/88886
439 PR middle-end/86308
440 * c-decl.c (match_builtin_function_types): Add arguments.
441 (diagnose_mismatched_decls): Diagnose mismatched declarations
442 of built-ins more strictly.
443
e21c4491
JJ
4442019-01-24 Jakub Jelinek <jakub@redhat.com>
445
446 PR c++/88976
447 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
448 on #pragma omp cancel with different modifiers.
449
420183d9
L
4502019-01-18 H.J. Lu <hongjiu.lu@intel.com>
451
452 PR c/51628
453 PR c/88664
454 * c-typeck.c (convert_for_assignment): Upate the
455 warn_for_address_or_pointer_of_packed_member call.
456
17ad43dd
TH
4572019-01-16 Tom Honermann <tom@honermann.net>
458 Jason Merrill <jason@redhat.com>
459
460 * c-typeck.c (digest_init): Revised the error message produced for
461 ill-formed cases of array initialization with a string literal.
462 (error_init): Make variadic.
463
5f07d78a
JJ
4642019-01-12 Jakub Jelinek <jakub@redhat.com>
465
466 * c-typeck.c (convert_for_assignment): Fix a comment typo.
467
c4581bbf
JJ
4682019-01-07 Jakub Jelinek <jakub@redhat.com>
469
470 PR c/88701
471 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
472 if current_function_decl is non-NULL.
473
65c5b1eb
JM
4742019-01-07 Joseph Myers <joseph@codesourcery.com>
475
476 PR c/88720
477 PR c/88726
478 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
479 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
480 functions declared but never defined only for external scope, not
481 for other scopes.
482
d8fcab68
JJ
4832019-01-07 Jakub Jelinek <jakub@redhat.com>
484
485 PR c++/85052
486 * c-parser.c (c_parser_postfix_expression): Parse
487 __builtin_convertvector.
488
a5544970
JJ
4892019-01-01 Jakub Jelinek <jakub@redhat.com>
490
491 Update copyright years.
492
da77eace
L
4932018-12-20 H.J. Lu <hongjiu.lu@intel.com>
494
495 PR c/51628
496 * c-typeck.c (convert_for_assignment): Call
497 warn_for_address_or_pointer_of_packed_member.
498
1edf8866
SB
4992018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
500
501 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
502 a more specific error message (instead of just falling through).
503
db4fd626
SB
5042018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
505
506 * c-parser.c (c_parser_asm_statement): Keep track of the location each
507 asm qualifier is first seen; use that to give nicer "duplicate asm
508 qualifier" messages. Delete 'quals" variable, instead pass the
509 "is_volatile_ flag to build_asm_stmt directly.
510 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
511 * c-typeck.c (build_asm_stmt): Ditto; adjust.
512
9c9cfcbb
SB
5132018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
514
515 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
516 "done" boolean variable.
517
a14feb3c
DM
5182018-12-19 David Malcolm <dmalcolm@redhat.com>
519
520 PR c++/87504
521 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
522 Move from here to gcc-rich-location.h and gcc-rich-location.c.
523 (build_binary_op): Use struct op_location_t and
524 class binary_op_rich_location.
525
6d939173
JJ
5262018-12-11 Jakub Jelinek <jakub@redhat.com>
527
528 PR sanitizer/88426
529 * c-convert.c (convert): Call c_fully_fold before calling
530 ubsan_instrument_float_cast.
531
b7055028
SB
5322018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
533
534 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
535 setting "quals".
536
5b76e75f
SB
5372018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
538
539 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
540 after asm. Pass a flag for it to build_asm_expr.
541 * c-tree.h (build_asm_expr): Update declaration.
542 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
543 set ASM_INLINE_P.
544
30bd42b9
SB
5452018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
546
547 PR inline-asm/55681
548 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
549 combination of volatile and goto, in any order, without repetitions.
550
9df6c0e4
JB
5512018-12-04 James Norris <jnorris@codesourcery.com>
552 Cesar Philippidis <cesar@codesourcery.com>
553 Julian Brown <julian@codesourcery.com>
554
555 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
556 code.
557
f44697b7
RB
5582018-11-30 Richard Biener <rguenther@suse.de>
559
560 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
561 _Literal (type) { ... } as empty aggregate or vector constructor.
562
550dfbdc
MS
5632018-11-29 Martin Sebor <msebor@redhat.com>
564
565 PR c/88091
566 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
567 (convert_arguments): Add comments. Pass additional argument to
568 the function above.
569
673670da
MS
5702018-11-29 Martin Sebor <msebor@redhat.com>
571
572 PR c/88172
573 PR testsuite/88208
574 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
575
db1d09b0
MS
5762018-11-23 Martin Sebor <msebor@redhat.com>
577
578 PR testsuite/88098
579 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
580 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
581
98f08eb8
MS
5822018-11-20 Martin Sebor <msebor@redhat.com>
583
584 * c-parser.c (c_parser_has_attribute_expression): New function.
585 (c_parser_attribute): New function.
586 (c_parser_attributes): Move code into c_parser_attribute.
587 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
588
cd5da983
MS
5892018-11-15 Martin Sebor <msebor@redhat.com>
590
591 PR c/83656
592 * c-decl.c (header_for_builtin_fn): Declare.
593 (diagnose_mismatched_decls): Diagnose declarations of built-in
594 functions without a prototype.
595 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
596 (convert_argument): Same.
597 (convert_arguments): Factor code out into convert_argument.
598 Detect mismatches between built-in formal arguments in calls
599 to built-in without prototype.
600 (build_conditional_expr): Same.
601 (type_or_builtin_type): New function.
602 (convert_for_assignment): Add argument. Conditionally issue
603 warnings instead of errors for mismatches.
604
620e594b
DM
6052018-11-13 David Malcolm <dmalcolm@redhat.com>
606
607 * c-decl.c: Replace "source_location" with "location_t".
608 * c-tree.h: Likewise.
609 * c-typeck.c: Likewise.
610 * gimple-parser.c: Likewise.
611
3179ebae
JJ
6122018-11-09 Jakub Jelinek <jakub@redhat.com>
613
81a227c6
JJ
614 * c-parser.c (c_parser_omp_clause_final): Use
615 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
616 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
617 parsing instead of c_parser_paren_condition.
618 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
619 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
620 c_fully_fold instead of c_parser_condition.
621 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
622 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
623 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
624 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
625 c_parser_expr_no_commas instead of c_parser_expression.
626
98c91c56
JJ
627 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
628 reduction clause with inscan modifier.
629
3179ebae
JJ
630 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
631 clauses other than atomic_default_mem_order.
632
28567c40
JJ
6332018-11-08 Jakub Jelinek <jakub@redhat.com>
634
635 * c-parser.c: Include memmode.h.
636 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
637 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
638 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
639 task_reduction clauses.
640 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
641 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
642 section, or lvalue assignment expression.
643 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
644 (c_parser_omp_clause_lastprivate): Parse optional
645 conditional: modifier.
646 (c_parser_omp_clause_hint): Require constant integer expression rather
647 than just integer expression.
648 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
649 clause.
650 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
651 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
652 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
653 functions.
654 (c_parser_omp_clause_depend): Parse iterator modifier and handle
655 iterators. Parse mutexinoutset and depobj kinds.
656 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
657 callers.
658 (c_parser_omp_all_clauses): Likewise. Handle
659 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
660 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
661 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
662 default memory order from requires directive if any. Adjust
663 c_finish_omp_atomic caller.
664 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
665 (c_parser_omp_flush): Parse flush with memory-order-clause.
666 (c_parser_omp_for_loop): Allow NE_EXPR even in
667 OpenMP loops, adjust c_finish_omp_for caller.
668 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
669 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
670 Allow to be called while parsing combined parallel master.
671 Parse combined master taskloop{, simd}.
672 (c_parser_omp_parallel): Parse combined
673 parallel master{, taskloop{, simd}} constructs.
674 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
675 (OMP_TASKGROUP_CLAUSE_MASK): Define.
676 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
677 (OMP_TASKWAIT_CLAUSE_MASK): Define.
678 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
679 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
680 around teams body. Use SET_EXPR_LOCATION.
681 (c_parser_omp_target_data): Allow target data
682 with only use_device_ptr clauses.
683 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
684 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
685 (c_parser_omp_requires): New function.
686 (c_finish_taskloop_clauses): New function.
687 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
688 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
689 declaration. Disallow in_reduction clause when combined with parallel
690 master.
691 (c_parser_omp_construct): Adjust c_parser_omp_master and
692 c_parser_omp_taskgroup callers.
693 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
694 other than cancel.
695 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
696 like OMP_CLAUSE_REDUCTION.
697 (handle_omp_array_sections): Likewise. Call save_expr on array
698 reductions before calling build_index_type. Handle depend clauses
699 with iterators.
700 (struct c_find_omp_var_s): New type.
701 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
702 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
703 with static, runtime or auto schedule kinds. Call save_expr for whole
704 array reduction sizes. Diagnose reductions with zero sized elements
705 or variable length structures. Diagnose nogroup clause used with
706 reduction clause(s). Handle depend clause with
707 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
708 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
709 some different type for other kinds. Use build_unary_op with
710 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
711 Handle depend clauses with iterators. Remove no longer needed special
712 case that predetermined const qualified vars may be specified in
713 firstprivate clause. Complain if const qualified vars are mentioned
714 in data-sharing clauses other than firstprivate or shared. Use
715 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
716 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
717 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
718 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
719
7e2de6df
DM
7202018-10-29 David Malcolm <dmalcolm@redhat.com>
721
722 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
723 logic for change to name_hint::operator bool.
724 (undeclared_variable): Likewise.
725 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
726 (c_parser_parameter_declaration): Likewise.
727
9f936c86
JM
7282018-10-17 Joseph Myers <joseph@codesourcery.com>
729
730 * c-errors.c (pedwarn_c11): New function.
731 * c-parser.c (disable_extension_diagnostics): Save
732 warn_c11_c2x_compat and set it to 0.
733 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
734 (c_parser_static_assert_declaration_no_semi): Handle
735 _Static_assert without string constant.
736 * c-tree.h (pedwarn_c11): New prototype.
737
033eb567
DM
7382018-10-17 David Malcolm <dmalcolm@redhat.com>
739
740 * Make-lang.in (selftest-c): New.
741 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
742 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
743 from gcc/Makefile.in.
744
0edf3afe
RB
7452018-10-02 Richard Biener <rguenther@suse.de>
746
747 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
748
8313a764
JM
7492018-09-26 Joseph Myers <joseph@codesourcery.com>
750
751 PR c/87390
752 * c-typeck.c (build_binary_op): Use excess precision for
753 comparisons of integers and floating-point for C11 and later.
754
ce6f0888
MJ
7552018-09-26 Martin Jambor <mjambor@suse.cz>
756
757 PR c/87347
758 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 759 comment.
ce6f0888 760
9c4a4b3c
DM
7612018-09-17 David Malcolm <dmalcolm@redhat.com>
762
763 * c-objc-common.c (range_label_for_type_mismatch::get_text):
764 Update for new param.
765 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
766 Likewise.
767
80c6d1f4
MJ
7682018-09-17 Martin Jambor <mjambor@suse.cz>
769
770 PR c/63886
771 * c-parser.c: (warn_for_abs): New function.
772 (c_parser_postfix_expression_after_primary): Call it.
773
4a426e36
BE
7742018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
775
776 * c-typeck.c (digest_init): Shorten overlength strings.
777
6d900107
BE
7782018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
779
780 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
781
b5764229
BE
7822018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
783
784 * c-decl.c (finish_decl): Call braced_list_to_string here ...
785 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
786
22eea6b2
AM
7872018-08-30 Alexander Monakov <amonakov@ispras.ru>
788
789 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
790 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
791
85204e23
DM
7922018-08-27 David Malcolm <dmalcolm@redhat.com>
793
794 PR 87091
795 * c-decl.c (implicitly_declare): Update call to
796 maybe_add_include_fixit to suggest overriding the location, as it
797 is for a note.
798 * c-objc-common.c (c_tree_printer): Update for conversion of
799 show_caret_p to a tri-state.
800
3d78e008
ML
8012018-08-27 Martin Liska <mliska@suse.cz>
802
803 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
804 fndecl_built_in_p and remove check for FUNCTION_DECL if
805 possible.
3d78e008
ML
806 (diagnose_mismatched_decls): Likewise.
807 (merge_decls): Likewise.
808 (warn_if_shadowing): Likewise.
809 (pushdecl): Likewise.
810 (implicitly_declare): Likewise.
811 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
812 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
813 * c-typeck.c (build_function_call_vec): Likewise.
814 (convert_arguments): Likewise.
815
097f82ec
DM
8162018-08-20 David Malcolm <dmalcolm@redhat.com>
817
818 PR other/84889
819 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
820 (diagnose_mismatched_decls): Likewise, in various places.
821 (warn_if_shadowing): Likewise.
822 (implicit_decl_warning): Likewise.
823 (implicitly_declare): Likewise.
824 (undeclared_variable): Likewise.
825 (declare_label): Likewise.
826 (grokdeclarator): Likewise.
827 (start_function): Likewise.
828 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
829 (c_parser_parameter_declaration): Likewise.
830 (c_parser_binary_expression): Likewise.
831 * c-typeck.c (c_expr_sizeof_expr): Likewise.
832 (parser_build_binary_op): Likewise.
833 (build_unary_op): Likewise.
834 (error_init): Likewise.
835 (pedwarn_init): Likewise.
836 (warning_init): Likewise.
837 (convert_for_assignment): Likewise.
838
96e6ae57
DM
8392018-08-15 David Malcolm <dmalcolm@redhat.com>
840
841 * c-objc-common.c: Include "gcc-rich-location.h".
842 (c_tree_printer): Move implemenation of '%T' to...
843 (print_type): ...this new function.
844 (range_label_for_type_mismatch::get_text): New function.
845 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
846 range for the various ic_argpass cases.
847 (class maybe_range_label_for_tree_type_mismatch): New class.
848 (build_binary_op): Use it when calling binary_op_error.
849
0cd020ae 8502018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 851
0cd020ae
PK
852 * c-decl.c (start_decl): Do not warn if variables is named as main
853 and is a local variable.
854
72733314
IS
8552018-08-15 Iain Sandoe <iain@sandoe.co.uk>
856
857 PR c/19315
858 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
859 objects of unknown size.
860
23aa9f7c
MS
8612018-08-13 Martin Sebor <msebor@redhat.com>
862
863 PR tree-optimization/71625
864 * c-parser.c (c_parser_declaration_or_fndef): Call
865 braced_list_to_string.
866
e5e7e50d
BH
8672018-08-03 Bogdan Harjoc <harjoc@gmail.com>
868
869 PR c/86690
870 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
871 errors.
872
8a45b051
MS
8732018-08-01 Martin Sebor <msebor@redhat.com>
874
875 PR tree-optimization/86650
876 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
877 and TREE_BLOCK (t) from within percent_K_format to this callsite.
878
5922dcb5
JJ
8792018-08-01 Jakub Jelinek <jakub@redhat.com>
880
881 PR c/85704
882 * c-typeck.c (init_field_decl_cmp): New function.
883 (output_pending_init_elements): Use it for field comparisons
884 instead of pure bit_position comparisons.
885
9b452033
JJ
8862018-07-12 Jakub Jelinek <jakub@redhat.com>
887
888 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
889 type here, instead add "omp declare target implicit" attribute.
890 (finish_decl): Diagnose vars without mappable type here.
891
ab20d992
JJ
8922018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
893 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
894 Cesar Philippidis <cesar@codesourcery.com>
895
896 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
897 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
898 to their non-present_or_* counterparts. Make 'self' an alias to
899 PRAGMA_OACC_CLAUSE_HOST.
900 (c_parser_oacc_data_clause): Update GOMP mappings for
901 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
902 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
903 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
904 Remove support for present_or_* clauses.
905 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
906 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
907 (OACC_DECLARE_CLAUSE_MASK): Likewise.
908 (OACC_DATA_CLAUSE_MASK): Likewise.
909 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
910 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
911 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
912 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
913 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
914
e197e64e
KV
9152018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
916
917 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
918 * gimple-parser.c (c_parser_gimple_statement): Likewise.
919 (c_parser_gimple_unary_expression): Likewise.
920
487f2f61
JJ
9212018-06-15 Jakub Jelinek <jakub@redhat.com>
922
923 PR c/86093
924 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
925 before doing POINTER_DIFF_EXPR.
926
e4d44a37
MP
9272018-06-07 Marek Polacek <polacek@redhat.com>
928
929 PR c/85318
930 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
931 for loop initial declarations.
932
b67b9225
DP
9332018-05-30 David Pagan <dave.pagan@oracle.com>
934
935 PR c/55976
936 * c-decl.c (grokdeclarator): Update check for return type warnings.
937 (start_function): Likewise.
938 (finish_function): Likewise.
939 * c-typeck.c (c_finish_return): Update check for return type warnings.
940 Pass OPT_Wreturn_type to pedwarn when appropriate.
941
c566cc9f
RS
9422018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
943
944 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
945 __FMA_EXPR handlng.
946
e4f81565
RS
9472018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
948
949 * gimple-parser.c: Include internal-fn.h.
950 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
951 (c_parser_gimple_call_internal): New function.
952 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
953 Fix typos in comment.
954
79e7b1fe
JJ
9552018-05-10 Jakub Jelinek <jakub@redhat.com>
956
957 PR c++/85662
958 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
959 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
960 fold_convert_loc.
961 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
962 fold_offsetof_1, pass argtype as TYPE to it and drop the
963 fold_convert_loc.
964
f7584c81
DP
9652018-05-02 David Pagan <dave.pagan@oracle.com>
966
967 PR c/30552
968 * c-decl.c (old_style_parameter_scope): New function.
969 * c-parser.c (c_parser_postfix_expression): Check for statement
970 expressions in old-style function parameter list declarations.
971 * c-parser.h (old_style_parameter_scope): New extern declaration.
972
b33a0cb3
JJ
9732018-04-25 Jakub Jelinek <jakub@redhat.com>
974
975 PR sanitizer/84307
976 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
977 it is not TREE_STATIC.
978 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
979 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
980 its COMPOUND_LITERAL_EXPR_DECL.
981
c5c5822a
JM
9822018-03-21 Joseph Myers <joseph@codesourcery.com>
983
984 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
985 where all functions return the same _FloatN or _FloatNx type,
986 treat integer types as _Float64 instead of double.
987
aa1c9429
JJ
9882018-03-21 Jakub Jelinek <jakub@redhat.com>
989
990 PR c/84999
991 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
992 building vector comparison, diagnose it and return error_mark_node.
993
9bb45a95
JJ
9942018-03-15 Jakub Jelinek <jakub@redhat.com>
995
996 PR c/84853
997 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
998 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
999 INTEGER_TYPE element type.
1000
ada6bad9
DP
10012018-03-13 David Pagan <dave.pagan@oracle.com>
1002
1003 PR c/46921
1004 * c-typeck.c (output_init_element): Ensure field initializer
1005 expression is always evaluated if there are side effects.
1006
849bbdb9
JJ
10072018-03-06 Jakub Jelinek <jakub@redhat.com>
1008
1009 PR c/84721
1010 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1011 !building_stmt_list_p ().
1012
d74641bd
RS
10132018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1014
1015 PR c/84305
1016 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1017 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1018 and include the BIND_EXPR in the list of things that need to be
1019 pre-evaluated.
1020
0444aa9c
NS
10212018-02-09 Nathan Sidwell <nathan@acm.org>
1022
1023 PR c/84293
1024 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1025 to strict_aliasing_warning.
1026
7c30b12a
PC
10272018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1028
1029 * c-typeck.c (really_start_incremental_init, push_init_level,
1030 set_nonincremental_init, output_init_element, process_init_element):
1031 Use DECL_UNNAMED_BIT_FIELD.
1032
2be4dfcb
MP
10332018-01-31 Marek Polacek <polacek@redhat.com>
1034
1035 PR c/81779
1036 * c-parser.c (c_parser_compound_statement_nostart): Call
1037 expansion_point_location_if_in_system_header.
1038
bb9869d5
DM
10392018-01-17 David Malcolm <dmalcolm@redhat.com>
1040
1041 PR c++/83814
1042 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1043 the C part.
1044
b4923738
JJ
10452018-01-13 Jakub Jelinek <jakub@redhat.com>
1046
1047 PR c/83801
1048 * c-tree.h (decl_constant_value_1): Add a bool argument.
1049 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1050 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1051 (decl_constant_value): Adjust caller.
1052 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1053 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1054 decl_constant_value returns initializer that has BLKmode or
1055 array type.
1056 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1057
928686b1
RS
10582018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1059 Alan Hayward <alan.hayward@arm.com>
1060 David Sherwood <david.sherwood@arm.com>
1061
1062 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1063 TYPE_VECTOR_SUBPARTS.
1064
85ec4feb
JJ
10652018-01-03 Jakub Jelinek <jakub@redhat.com>
1066
1067 Update copyright years.
1068
913884f7
JJ
10692018-01-01 Jakub Jelinek <jakub@redhat.com>
1070
1071 PR c/83595
1072 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1073 c_parser_conditional_expression, c_parser_cast_expression,
1074 c_parser_sizeof_expression, c_parser_alignof_expression,
1075 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1076 c_parser_transaction_expression): Use set_error () method instead
1077 of setting value member to error_mark_node.
1078
c6cfa2bf
MM
10792017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1080
1081 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1082 and _Float<N>X built-in functions.
1083
11d29d63
JJ
10842017-12-22 Jakub Jelinek <jakub@redhat.com>
1085
14ec014e
JJ
1086 PR debug/83550
1087 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1088 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1089 incomplete vars rather than after it.
1090
11d29d63
JJ
1091 PR debug/83547
1092 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1093 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1094 and consider empty ones if there are no other stmts. For
1095 -Wunused-value walk all statements before the one only followed by
1096 DEBUG_BEGIN_STMTs.
1097
170a8bd6 10982017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1099 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1100
1101 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1102 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1103 (c_parser_do_statement): Likewise.
1104 (c_parser_for_statement): Likewise.
1105 (c_parser_statement_after_labels): Adjust calls to above.
1106 (c_parse_pragma_ivdep): New static function.
1107 (c_parser_pragma_unroll): Likewise.
1108 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1109 <PRAGMA_UNROLL>: New case.
1110
01512446
JJ
11112017-12-19 Jakub Jelinek <jakub@redhat.com>
1112
1113 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1114 perform_integral_promotions, digest_init): Replace Yoda conditions
1115 with typical order conditions.
1116 * c-decl.c (check_bitfield_type_and_width): Likewise.
1117
c65e18d3
BE
11182017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1119
1120 * c-typeck.c (c_safe_arg_type_equiv_p,
1121 c_safe_function_type_cast_p): New function.
1122 (build_c_cast): Implement -Wcast-function-type.
1123
b7280579
RB
11242017-12-14 Richard Biener <rguenther@suse.de>
1125
1126 PR c/83415
1127 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1128 like REALPART_EXPR for the behavior of whether its operand
1129 is an lvalue.
1130
49e6a6c0
MP
11312017-12-12 Marek Polacek <polacek@redhat.com>
1132
1133 PR c/82679
1134 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1135
ab20d992 11362017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1137
1138 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1139 * c-parser.c (add_debug_begin_stmt): New.
1140 (c_parser_declaration_or_fndef): Call it.
1141 (c_parser_compound_statement_nostart): Likewise.
1142 (c_parser_statement_after_labels): Likewise.
1143 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1144
4b2b493f
JM
11452017-12-07 Joseph Myers <joseph@codesourcery.com>
1146
1147 * c-decl.c (build_compound_literal): Add parameter alignas_align
1148 and set alignment of decl if nonzero.
1149 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1150 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1151 qualifier.
1152 (c_parser_struct_declaration): Update syntax comment.
1153 (c_parser_type_name): Add alignas_ok argument and pass it to
1154 c_parser_declspecs.
1155 (c_parser_cast_expression): Pass true to c_parser_type_name and
1156 give error if a cast used an _Alignas specifier.
1157 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1158 give error if sizeof (type-name) used an _Alignas specifier.
1159 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1160 give error if _Alignof (type-name) used an _Alignas specifier.
1161 (c_parser_postfix_expression_after_paren_type): Check specified
1162 alignment for a compound literal and pass it to
1163 build_compound_literal.
1164 * c-parser.h (c_parser_type_name): Update prototype.
1165 * c-tree.h (build_compound_literal): Update prototype.
1166
5d9ae53d
MS
11672017-12-07 Martin Sebor <msebor@redhat.com>
1168
1169 PR c/81544
1170 * c-decl.c (c_decl_attributes): Look up existing declaration and
1171 pass it to decl_attributes.
1172
c79144f8
DM
11732017-12-06 David Malcolm <dmalcolm@redhat.com>
1174
1175 PR c/83236
1176 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1177 reserved for use by the implementation.
1178
613bc14f
DM
11792017-12-06 David Malcolm <dmalcolm@redhat.com>
1180
1181 * c-decl.c: Include "c-family/c-spellcheck.h".
1182
05abad4c
ML
11832017-12-05 Martin Liska <mliska@suse.cz>
1184 Jakub Jelinek <jakub@redhat.com>
1185
1186 * c-typeck.c (pointer_diff): Add new argument and instrument
1187 pointer subtraction.
1188 (build_binary_op): Similar for pointer comparison.
1189
cc6534d4
JJ
11902017-12-01 Jakub Jelinek <jakub@redhat.com>
1191
65791f42
JJ
1192 PR c/79153
1193 * c-parser.c: Include tree-iterator.h.
1194 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1195 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1196 on it.
1197
cc6534d4
JJ
1198 PR c/83222
1199 * c-tree.h (decl_constant_value_1): Declare.
1200 * c-typeck.c (decl_constant_value_1): New function.
1201 (decl_constant_value): Use it.
1202 * c-fold.c (c_fully_fold_internal): If in_init, use
1203 decl_constant_value_1 instead of decl_constant_value.
1204
5de73c05
JJ
12052017-11-30 Jakub Jelinek <jakub@redhat.com>
1206
1207 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1208
058f0b9e
JJ
12092017-11-28 Jakub Jelinek <jakub@redhat.com>
1210
1211 PR sanitizer/81275
1212 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1213 c_switch_covers_all_cases_p returns true.
1214
5e9d6aa4 12152017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1216 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1217
1218 * Make-lang.in (c/c-array-notation.o): Remove.
1219 * c-array-notation.c: Delete.
1220 * c-decl.c: Remove cilkplus condition.
1221 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1222 c_parser_cilk_verify_simd, c_parser_array_notation,
1223 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1224 c_parser_cilk_simd_fn_vector_attrs,
1225 c_finish_cilk_simd_fn_tokens): Delete.
1226 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1227 (c_parser_direct_declarator_inner): Ditto.
1228 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1229 (c_parser_attributes, c_parser_compound_statement,
1230 c_parser_statement_after_labels, c_parser_if_statement,
1231 c_parser_switch_statement, c_parser_while_statement,
1232 c_parser_do_statement, c_parser_for_statement,
1233 c_parser_unary_expression, c_parser_postfix_expression,
1234 c_parser_postfix_expression_after_primary,
1235 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1236 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1237 support.
1238 * c-typeck.c (build_array_ref, build_function_call_vec,
1239 convert_arguments,
1240 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1241 c_finish_loop, build_binary_op): Remove cilkplus support.
1242
9e851845
JJ
12432017-11-28 Jakub Jelinek <jakub@redhat.com>
1244
1245 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1246 of build3.
1247
ab20d992 12482017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
1249
1250 * Make-lang.in (c.install-plugin): Install backend import library.
1251
41521dee
JJ
12522017-11-23 Jakub Jelinek <jakub@redhat.com>
1253
1254 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1255 pragma_stmt context.
1256
ac9effed
EB
12572017-11-23 Mike Stump <mikestump@comcast.net>
1258 Eric Botcazou <ebotcazou@adacore.com>
1259
1260 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1261 ANNOTATE_EXPR.
1262 (c_parser_do_statement): Likewise.
1263 (c_parser_for_statement): Likewise.
1264
ce95abc4
DM
12652017-11-22 David Malcolm <dmalcolm@redhat.com>
1266
1267 PR c++/62170
1268 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1269 bool to bool *. Within '%T' handling, if showing an "aka", use
1270 "quoted" param to add appropriate quoting.
1271
974aedcc
MP
12722017-11-22 Marek Polacek <polacek@redhat.com>
1273
1274 PR c++/60336
1275 PR middle-end/67239
1276 PR target/68355
1277 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1278
d4300cc6
DM
12792017-11-21 David Malcolm <dmalcolm@redhat.com>
1280
1281 PR c/83056
1282 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1283 earlier failed lookups.
1284
1af4ebf5
MG
12852017-11-21 Marc Glisse <marc.glisse@inria.fr>
1286
1287 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1288 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1289
26edace6
DM
12902017-11-20 David Malcolm <dmalcolm@redhat.com>
1291
1292 PR c/81404
1293 * c-decl.c: Include "c-family/known-headers.h".
1294 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1295 to known-headers.cc.
1296 (class suggest_missing_header): Move to known-header.h.
1297 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1298 than get_c_name_hint.
1299
b1212255
DM
13002017-11-20 David Malcolm <dmalcolm@redhat.com>
1301
1302 * c-decl.c (get_c_name_hint): New function.
1303 (class suggest_missing_header): New class.
1304 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1305 suggest missing headers to the user.
1306
6c7a259b
DM
13072017-11-20 David Malcolm <dmalcolm@redhat.com>
1308
1309 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1310 Include "c-family/name-hint.h"
1311 (implicit_decl_warning): Convert "hint" from
1312 const char * to name_hint. Pass location to
1313 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1314 warning was not printed.
1315 (undeclared_variable): Likewise for "guessed_id".
1316 (lookup_name_fuzzy): Convert return type from const char *
1317 to name_hint. Add location_t param.
1318 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1319 Include "c-family/name-hint.h"
1320 (c_parser_declaration_or_fndef): Convert "hint" from
1321 const char * to name_hint. Pass location to lookup_name_fuzzy.
1322 (c_parser_parameter_declaration): Likewise.
1323
f9c59f7e
JJ
13242017-11-19 Jakub Jelinek <jakub@redhat.com>
1325
1326 PR c/66618
1327 PR c/69960
1328 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1329 where needed.
1330 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1331 handle_omp_array_sections): Likewise.
1332 (digest_init): Don't call decl_constant_value_for_optimization.
1333 * c-tree.h (decl_constant_value_for_optimization): Removed.
1334 * c-fold.c (c_fold_array_ref): New function.
1335 (c_fully_fold_internal): Add LVAL argument, propagate it through
1336 recursive calls. For VAR_P call decl_constant_value and
1337 unshare if not LVAL and either optimizing or IN_INIT. Remove
1338 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1339 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1340 (c_fully_fold): Add LVAL argument, pass it through to
1341 c_fully_fold_internal.
1342 (decl_constant_value_for_optimization): Removed.
1343
3ca0dc60
JM
13442017-11-15 Joseph Myers <joseph@codesourcery.com>
1345
1346 PR c/81156
1347 * c-parser.c (check_tgmath_function): New function.
1348 (enum tgmath_parm_kind): New enum.
1349 (c_parser_postfix_expression): Handle __builtin_tgmath.
1350
64a5912c
DM
13512017-10-31 David Malcolm <dmalcolm@redhat.com>
1352
1353 * c-decl.c (implicit_decl_warning): Update for renaming of
1354 pedwarn_at_rich_loc and warning_at_rich_loc.
1355 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1356 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1357 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1358 (c_parser_struct_or_union_specifier): Likewise for renaming of
1359 pedwarn_at_rich_loc.
1360 (c_parser_parameter_declaration): Likewise for renaming of
1361 error_at_rich_loc.
1362 * c-typeck.c (build_component_ref): Likewise.
1363 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1364 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1365 (set_init_label): Likewise for renaming of error_at_rich_loc.
1366
c1136864
RB
13672017-10-30 Richard Biener <rguenther@suse.de>
1368
1369 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1370 stmts.
1371
ee5fd23a
MM
13722017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1373
1374 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1375 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1376
1a59ccf2
DM
13772017-10-25 David Malcolm <dmalcolm@redhat.com>
1378
1379 PR c/7356
1380 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1381 semicolons.
1382
bc1a75dd
JJ
13832017-10-25 Jakub Jelinek <jakub@redhat.com>
1384
1385 PR libstdc++/81706
1386 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1387 newdecl to corresponding __builtin_ if any.
1388
ff1ff960
PC
13892017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1390
1391 PR c++/82466
1392 * c-decl.c (diagnose_mismatched_decls): Use
1393 OPT_Wbuiltin_declaration_mismatch.
1394
62e1c678
DM
13952017-10-12 David Malcolm <dmalcolm@redhat.com>
1396
1397 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1398 use it to guard calls to maybe_suggest_missing_token_insertion.
1399 (c_parser_parms_list_declarator): Override default value of new
1400 "type_is_unique" param to c_parser_require.
1401 (c_parser_asm_statement): Likewise.
1402 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1403 defaulting to true.
1404
a92f6726
NS
14052017-10-11 Nathan Sidwell <nathan@acm.org>
1406
1407 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1408
8e6cdc90
RS
14092017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1410
1411 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1412 operating on trees as wide_ints.
1413 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1414 (c_tree_equal): Likewise.
1415
8139a48e
DM
14162017-10-04 David Malcolm <dmalcolm@redhat.com>
1417
1418 * c-decl.c (push_parm_decl): Store c_parm's location into the
1419 PARAM_DECL.
1420 (build_c_parm): Add "loc" param and store it within the c_parm.
1421 * c-parser.c (struct c_parser): Add "last_token_location" field.
1422 (c_parser_consume_token): Store location of the token into the
1423 new field.
1424 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1425 when handling a FUNCTION_DECL, if it doesn't already have them.
1426 (c_parser_parameter_declaration): Generate a location for the
1427 parameter, and pass it to the call to build_c_parm.
1428 * c-tree.h (struct c_parm): Add field "loc".
1429 (build_c_parm): Add location_t param.
1430 * c-typeck.c (get_fndecl_argument_location): New function.
1431 (inform_for_arg): New function.
1432 (convert_for_assignment): Use inform_for_arg when dealing with
1433 ic_argpass.
1434
2a389958
JJ
14352017-09-29 Jakub Jelinek <jakub@redhat.com>
1436
7d386d45
JJ
1437 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1438 width is non-NULL.
1439 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1440 don't SET_DECL_C_BIT_FIELD here.
1441
2a389958
JJ
1442 PR c/82340
1443 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1444 instead of trying to set just TREE_READONLY manually.
1445
ebc6a85e
TV
14462017-09-16 Tom de Vries <tom@codesourcery.com>
1447
1448 PR c/81875
1449 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1450 cond itself.
1451
bb75facd
JM
14522017-09-15 Joseph Myers <joseph@codesourcery.com>
1453
1454 PR c/82071
1455 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1456 for C11.
1457 (build_conditional_expr): For C11, generate result with excess
1458 precision when one argument is an integer and the other is of a
1459 type using excess precision.
1460
1d933576
BE
14612017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1462
1463 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1464
267bbb6f
MP
14652017-09-13 Marek Polacek <polacek@redhat.com>
1466
1467 PR c/82167
1468 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1469 than expr.original_type.
1470
6836632e
NS
14712017-09-12 Nathan Sidwell <nathan@acm.org>
1472
1473 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1474 resort_sorted_fields): Moved from c-family/c-common.c.
1475 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1476
e035be33
JM
14772017-09-01 Joseph Myers <joseph@codesourcery.com>
1478
1479 PR c/82071
1480 * c-typeck.c (build_atomic_assign): Handle argument with excess
1481 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1482 argument passed to build_binary_op and convert_for_assignment but
1483 not for call to c_fully_fold.
1484 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1485 Ensure build_binary_op is called with argument with original
1486 semantic type. Avoid calling c_fully_fold with an
1487 EXCESS_PRECISION_EXPR from build_binary_op.
1488
d2e05fcb
JJ
14892017-09-01 Jakub Jelinek <jakub@redhat.com>
1490
1491 PR c/81887
1492 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1493
b397965c
RS
14942017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1495 Alan Hayward <alan.hayward@arm.com>
1496 David Sherwood <david.sherwood@arm.com>
1497
1498 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1499 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1500 m1 and m2 to the signed equivalent of a fixed-point
1501 SCALAR_TYPE_MODE.
1502
14e18d71
DM
15032017-08-24 David Malcolm <dmalcolm@redhat.com>
1504
1505 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1506 than CAN_HAVE_LOCATION_P when determining whether to use the
1507 location_t value within "value".
1508
7f204c0f
DM
15092017-08-21 David Malcolm <dmalcolm@redhat.com>
1510
1511 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1512 rather than peeking the location of the first token.
1513 * c-tree.h (c_expr::get_location): New method.
1514
2f687306
DM
15152017-08-21 David Malcolm <dmalcolm@redhat.com>
1516
1517 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1518 to check_function_arguments.
1519
3e7b80d7
MP
15202017-08-18 Marek Polacek <polacek@redhat.com>
1521
1522 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1523 commentary.
1524
00aa1fa2
L
15252017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1526
1527 PR c/53037
1528 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1529 (check_bitfield_type_and_width): Don't allow bit-field with
1530 warn_if_not_aligned type.
1531
da67acb9
MS
15322017-08-14 Martin Sebor <msebor@redhat.com>
1533
1534 PR c/81117
1535 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1536
bb85aa74
MP
15372017-08-11 Marek Polacek <polacek@redhat.com>
1538
1539 PR c/81795
1540 * c-decl.c (pushtag): Only print inform if the warning was printed.
1541 (grokdeclarator): Likewise.
1542
32129a17
DM
15432017-08-10 David Malcolm <dmalcolm@redhat.com>
1544
1545 * c-parser.c (c_parser_error): Rename to...
1546 (c_parser_error_richloc): ...this, making static, and adding
1547 "richloc" parameter, passing it to the c_parse_error call,
1548 rather than calling c_parser_set_source_position_from_token.
1549 (c_parser_error): Reintroduce, reimplementing in terms of the
1550 above, converting return type from void to bool.
1551 (class token_pair): New class.
1552 (struct matching_paren_traits): New struct.
1553 (matching_parens): New typedef.
1554 (struct matching_brace_traits): New struct.
1555 (matching_braces): New typedef.
1556 (get_matching_symbol): New function.
1557 (c_parser_require): Add param MATCHING_LOCATION, using it to
1558 highlight matching "opening" tokens for missing "closing" tokens.
1559 (c_parser_skip_until_found): Likewise.
1560 (c_parser_static_assert_declaration_no_semi): Convert explicit
1561 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1562 class matching_parens, so that the pertinent open parenthesis is
1563 highlighted when there are problems locating the close
1564 parenthesis.
1565 (c_parser_struct_or_union_specifier): Likewise.
1566 (c_parser_typeof_specifier): Likewise.
1567 (c_parser_alignas_specifier): Likewise.
1568 (c_parser_simple_asm_expr): Likewise.
1569 (c_parser_braced_init): Likewise, for matching_braces.
1570 (c_parser_paren_condition): Likewise, for matching_parens.
1571 (c_parser_switch_statement): Likewise.
1572 (c_parser_for_statement): Likewise.
1573 (c_parser_asm_statement): Likewise.
1574 (c_parser_asm_operands): Likewise.
1575 (c_parser_cast_expression): Likewise.
1576 (c_parser_sizeof_expression): Likewise.
1577 (c_parser_alignof_expression): Likewise.
1578 (c_parser_generic_selection): Likewise.
1579 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1580 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1581 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1582 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1583 c_parser_skip_until_found call.
1584 (c_parser_objc_class_definition): Use class matching_parens as
1585 above.
1586 (c_parser_objc_method_decl): Likewise.
1587 (c_parser_objc_try_catch_finally_statement): Likewise.
1588 (c_parser_objc_synchronized_statement): Likewise.
1589 (c_parser_objc_at_property_declaration): Likewise.
1590 (c_parser_oacc_wait_list): Likewise.
1591 (c_parser_omp_var_list_parens): Likewise.
1592 (c_parser_omp_clause_collapse): Likewise.
1593 (c_parser_omp_clause_default): Likewise.
1594 (c_parser_omp_clause_if): Likewise.
1595 (c_parser_omp_clause_num_threads): Likewise.
1596 (c_parser_omp_clause_num_tasks): Likewise.
1597 (c_parser_omp_clause_grainsize): Likewise.
1598 (c_parser_omp_clause_priority): Likewise.
1599 (c_parser_omp_clause_hint): Likewise.
1600 (c_parser_omp_clause_defaultmap): Likewise.
1601 (c_parser_oacc_single_int_clause): Likewise.
1602 (c_parser_omp_clause_ordered): Likewise.
1603 (c_parser_omp_clause_reduction): Likewise.
1604 (c_parser_omp_clause_schedule): Likewise.
1605 (c_parser_omp_clause_num_teams): Likewise.
1606 (c_parser_omp_clause_thread_limit): Likewise.
1607 (c_parser_omp_clause_aligned): Likewise.
1608 (c_parser_omp_clause_linear): Likewise.
1609 (c_parser_omp_clause_safelen): Likewise.
1610 (c_parser_omp_clause_simdlen): Likewise.
1611 (c_parser_omp_clause_depend): Likewise.
1612 (c_parser_omp_clause_map): Likewise.
1613 (c_parser_omp_clause_device): Likewise.
1614 (c_parser_omp_clause_dist_schedule): Likewise.
1615 (c_parser_omp_clause_proc_bind): Likewise.
1616 (c_parser_omp_clause_uniform): Likewise.
1617 (c_parser_omp_for_loop): Likewise.
1618 (c_parser_cilk_clause_vectorlength): Likewise.
1619 (c_parser_cilk_clause_linear): Likewise.
1620 (c_parser_transaction_expression): Likewise.
1621 * c-parser.h (c_parser_require): Add param matching_location with
1622 default UNKNOWN_LOCATION.
1623 (c_parser_error): Convert return type from void to bool.
1624 (c_parser_skip_until_found): Add param matching_location with
1625 default UNKNOWN_LOCATION.
1626
30af3a2b
MP
16272017-08-09 Marek Polacek <polacek@redhat.com>
1628
1629 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1630 * c-tree.h (build_external_ref): Update declaration.
1631 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1632 (build_external_ref): Change the type of a parameter to bool.
1633 (parser_build_binary_op): Use true/false instead of 1/0.
1634 (pointer_diff): Likewise.
1635 (build_modify_expr): Likewise.
1636 (set_designator): Change the type of a parameter to bool.
1637 (set_init_index): Use true/false instead of 1/0.
1638 (set_init_label): Likewise.
1639 (output_init_element): Change the type of a parameter to bool.
1640 (output_pending_init_elements): Use true/false instead of 1/0.
1641 (process_init_element): Likewise.
1642 (build_binary_op): Change the type of a parameter to bool.
1643
296c53ac
MP
16442017-08-09 Marek Polacek <polacek@redhat.com>
1645
1646 PR c/81233
1647 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1648 Call emit_diagnostic_valist instead of pedwarn.
1649 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1650 Print the relevant types in diagnostics.
1651
a32c8316
MP
16522017-08-09 Marek Polacek <polacek@redhat.com>
1653
1654 PR c/81417
1655 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 1656 build_conditional_expr.
a32c8316
MP
1657 * c-parser.c (c_parser_conditional_expression): Create locations for
1658 EXP1 and EXP2 from their source ranges. Pass the locations down to
1659 build_conditional_expr.
1660 * c-tree.h (build_conditional_expr): Update declaration.
1661 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1662 For -Wsign-compare, also print the types.
1663
314e6352
ML
16642017-08-08 Martin Liska <mliska@suse.cz>
1665
1666 * c-convert.c: Include header files.
1667 * c-typeck.c: Likewise.
1668
577eec56
ML
16692017-08-07 Martin Liska <mliska@suse.cz>
1670
1671 * c-parser.c (c_parser_attributes): Canonicalize name of an
1672 attribute.
1673
f7b6353a
MP
16742017-08-02 Marek Polacek <polacek@redhat.com>
1675
1676 PR c/81289
1677 * c-parser.c (c_parser_unary_expression): Use set_error.
1678
8a6eab34
MP
1679 PR c/81448
1680 PR c/81306
1681 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1682 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1683
ab20d992 16842017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
1685 Martin Liska <mliska@suse.cz>
1686
1687 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1688 statement.
7fef86d3 1689
f34ebeb2
ML
16902017-07-31 Martin Liska <mliska@suse.cz>
1691
1692 PR sanitize/81530
1693 * c-convert.c (convert): Guard condition with flag_sanitize_p
1694 also with current_function_decl non-null equality.
1695 * c-decl.c (grokdeclarator): Likewise.
1696 * c-typeck.c (build_binary_op): Likewise.
1697
8595f67b
MP
16982017-07-25 Marek Polacek <polacek@redhat.com>
1699
1700 * c-decl.c (grokfield): Remove local variable.
1701
d49718d6
MP
17022017-07-25 Marek Polacek <polacek@redhat.com>
1703
1704 PR c/81364
1705 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1706 macro expansion if the body is in { }.
1707 (c_parser_while_statement): Likewise.
1708 (c_parser_for_statement): Likewise.
1709
ff22eb12
NS
17102017-07-18 Nathan Sidwell <nathan@acm.org>
1711
1712 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1713
eea77d1f
DM
17142017-07-14 David Malcolm <dmalcolm@redhat.com>
1715
1716 * c-decl.c (implicitly_declare): When suggesting a missing
1717 #include, provide a fix-it hint.
1718
b6f43128
DM
17192017-07-06 David Malcolm <dmalcolm@redhat.com>
1720
1721 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1722 and call that instead.
1723 * c-tree.h (selftest::run_c_tests): New decl.
1724
3e2becc4
MP
17252017-06-26 Marek Polacek <polacek@redhat.com>
1726
1727 PR c/80116
1728 * c-parser.c (c_parser_if_body): Set the location of the
1729 body of the conditional after parsing all the labels. Call
1730 warn_for_multistatement_macros.
1731 (c_parser_else_body): Likewise.
1732 (c_parser_switch_statement): Likewise.
1733 (c_parser_while_statement): Likewise.
1734 (c_parser_for_statement): Likewise.
1735 (c_parser_statement): Add a default argument. Save the location
1736 after labels have been parsed.
1737 (c_parser_c99_block_statement): Likewise.
1738
343ae898
RB
17392017-06-19 Richard Biener <rguenther@suse.de>
1740
1741 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1742 negated _Literals to parse _Literal (int) -1.
1743
45b2222a
ML
17442017-06-13 Martin Liska <mliska@suse.cz>
1745
1746 PR sanitize/78204
1747 * c-convert.c (convert): Use sanitize_flags_p.
1748 * c-decl.c (grokdeclarator): Likewise.
1749 * c-typeck.c (convert_for_assignment): Likewise.
1750 (c_finish_return): Likewise.
1751 (build_binary_op): Likewise.
1752
8ab7005b
JJ
17532017-06-08 Jakub Jelinek <jakub@redhat.com>
1754
1755 PR c/81006
1756 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1757 to sizetype before size_binop.
1758
363dc72c
JJ
17592017-06-07 Jakub Jelinek <jakub@redhat.com>
1760
1761 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1762 of TDI_generic.
1763
dc949728
MP
17642017-06-06 Marek Polacek <polacek@redhat.com>
1765
1766 PR c/79983
1767 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1768 ref.
1769 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1770
40ffd95f
BE
17712017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1772
1773 * c-parser.c (c_parser_binary_expression): Implement the
1774 -Wsizeof_pointer_div warning.
1775 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1776 from a parenthesized expression.
1777 (c_parser_expr_list): Use c_last_sizeof_loc.
1778 * c-tree.h (c_last_sizeof_loc): New external.
1779 * c-typeck.c (c_last_sizeof_loc): New variable.
1780 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1781
9fc5e7a4
MM
17822017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1783
1784 PR testsuite/80580
1785 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1786
f012c8ef
DM
17872017-05-30 David Malcolm <dmalcolm@redhat.com>
1788
1789 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1790 parameters.
1791
3cd211af
MS
17922017-05-24 Martin Sebor <msebor@redhat.com>
1793
1794 PR c/80731
1795 * c-fold.c (c_fully_fold_internal): Adjust.
1796 * c-typeck.c (parser_build_unary_op): Adjust.
1797
fd71a9a2
TS
17982017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1799
1800 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1801 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1802 "VECTOR_LENGTH".
1803
92fa0f9e
MP
18042017-05-23 Marek Polacek <polacek@redhat.com>
1805
1806 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1807 quotes.
1808
d11c168a
JJ
18092017-05-22 Jakub Jelinek <jakub@redhat.com>
1810
1811 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1812 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1813 it returned invariant. Call tree_invariant_p unconditionally
1814 afterwards to decide whether to return expr or op0.
1815
58aca9d9
NS
18162017-05-22 Nathan Sidwell <nathan@acm.org>
1817
1818 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1819
7fd549d2
TS
18202017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1821
1822 * c-parser.c (c_parser_omp_clause_default): Handle
1823 "OMP_CLAUSE_DEFAULT_PRESENT".
1824
6ecd2339
BE
18252017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1826
1827 * config-lang.in (gtfiles): Add c-family/c-format.c.
1828
8a57ecff
NS
18292017-05-18 Nathan Sidwell <nathan@acm.org>
1830
1831 * c-decl.c (pushdecl_top_level): Delete unused function.
1832
6574d78e
MP
18332017-05-18 Marek Polacek <polacek@redhat.com>
1834
1835 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1836 (check_earlier_gotos): Likewise.
1837 (define_label): Likewise.
1838 (pending_xref_error): Likewise.
1839 (smallest_type_quals_location): Likewise.
1840 (grokdeclarator): Likewise.
1841 (grokparms): Likewise.
1842 (identifier_global_value): Likewise.
1843 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1844 (find_init_member): Likewise.
1845
e3455240
MP
18462017-05-18 Marek Polacek <polacek@redhat.com>
1847
1848 * c-decl.c (start_decl): Use false/true instead of 0/1.
1849 (grokdeclarator): Likewise.
1850 (finish_struct): Likewise.
1851 (start_function): Change the return type to bool. Use false/true
1852 instead of 0/1.
1853 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1854 * c-tree.h (start_function): Update.
1855 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1856 (set_designator): Change the return type to bool. Use false/true
1857 instead of 0/1.
1858
3fa8871b
MP
18592017-05-17 Marek Polacek <polacek@redhat.com>
1860
1861 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1862 * c-typeck.c: Likewise.
1863
142473df
MP
18642017-05-17 Marek Polacek <polacek@redhat.com>
1865
1866 PR sanitizer/80659
1867 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1868 DECL_IGNORED_P even for non-static compound literals.
1869
1a817418
ML
18702017-05-17 Martin Liska <mliska@suse.cz>
1871
1872 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1873 use it instead of int type.
1874
b2fa0a8b
MP
18752017-05-17 Marek Polacek <polacek@redhat.com>
1876
1877 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1878 call c_fully_fold.
1879 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 1880 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
1881 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1882 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1883 save_expr.
1884 (c_parser_conditional_expression): Likewise.
1885 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1886 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1887 (process_init_element): Likewise.
1888 (build_binary_op): Likewise.
1889 (handle_omp_array_sections_1): Likewise.
1890
1e47f02b
TS
18912017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1892
1893 * c-parser.c (c_parser_omp_clause_num_gangs)
1894 (c_parser_omp_clause_num_workers)
1895 (c_parser_omp_clause_vector_length): Merge functions into...
1896 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1897 all users.
1898
c24e924f
NS
18992017-05-11 Nathan Sidwell <nathan@acm.org>
1900
1901 * gimple-parser.c: Don't #include tree-dump.h.
1902
c587104e
MM
19032017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1904
1905 PR testsuite/80580
1906 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1907
67ac9a9d
MM
19082017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1909
1910 PR testsuite/80580
1911 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1912 incorrect __MEM syntax.
1913
ac4eb40f
MM
19142017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1915
1916 PR testsuite/80580
1917 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1918 type of unary '*'.
1919
641da50a
NS
19202017-05-09 Nathan Sidwell <nathan@acm.org>
1921
1922 * c-tree.h (pushdecl): Declare.
1923
56d35585
DM
19242017-05-05 David Malcolm <dmalcolm@redhat.com>
1925
1926 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1927 with diagnostic_report_diagnostic.
1928 * c-errors.c (pedwarn_c99): Likewise.
1929 (pedwarn_c90): Likewise.
1930
815d9cc6
XR
19312017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1932
92a285c1 1933 PR c++/80038
815d9cc6
XR
1934 * c-gimplify.c (c_gimplify_expr): Remove calls to
1935 cilk_gimplifY_call_params_in_spawned_fn.
1936
1c4ea66f
DM
19372017-04-25 David Malcolm <dmalcolm@redhat.com>
1938
1939 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1940 hint for removing extra semicolon.
1941
666f7903
JJ
19422017-04-21 Jakub Jelinek <jakub@redhat.com>
1943
1944 PR c/80468
1945 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1946 enabled, set specs->type to integer_type_node.
1947
5764ee3c
JW
19482017-04-03 Jonathan Wakely <jwakely@redhat.com>
1949
1950 * c-array-notation.c: Fix typo in comment.
1951
10fa8dfb
MP
19522017-03-29 Marek Polacek <polacek@redhat.com>
1953
1954 PR c/79730
1955 * c-decl.c (finish_decl): Check VAR_P.
1956
a9e4a1a5
JJ
19572017-03-27 Jakub Jelinek <jakub@redhat.com>
1958
1959 PR middle-end/80162
1960 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1961 * c-typeck.c (c_mark_addressable): Likewise. Look through
1962 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1963 to ARRAY_TYPE.
1964 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1965
ee3ff394
MP
19662017-03-23 Marek Polacek <polacek@redhat.com>
1967
1968 * c-tree.h: Remove a C_RID_YYCODE reference.
1969
4d1b8e70
JJ
19702017-03-21 Jakub Jelinek <jakub@redhat.com>
1971
1972 PR c/80097
1973 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1974 optional COMPOUND_EXPR with ubsan instrumentation.
1975
31dc71a8
MP
19762017-03-17 Marek Polacek <polacek@redhat.com>
1977
1978 * c-parser.c: Add C11 references.
1979
d579c385
MP
19802017-03-15 Marek Polacek <polacek@redhat.com>
1981
1982 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1983
85059a38
MP
19842017-03-11 Marek Polacek <polacek@redhat.com>
1985
1986 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1987
2f6f187a
DM
19882017-03-10 David Malcolm <dmalcolm@redhat.com>
1989
1990 PR translation/79848
1991 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1992 "%qs".
1993 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1994
36618428
MP
19952017-03-09 Marek Polacek <polacek@redhat.com>
1996
1997 PR sanitizer/79757
1998 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1999 parameter declarations with initializers.
2000
01e5af5a
JJ
20012017-03-09 Jakub Jelinek <jakub@redhat.com>
2002
2003 PR c/79969
2004 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2005 TYPE_STUB_DECL.
2006
a71dbc63
JJ
20072017-03-07 Jakub Jelinek <jakub@redhat.com>
2008
2009 PR c/79834
2010 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2011 for "may only be used in compound statements" diagnostics, change it
2012 such that the same translatable string is used for all pragmas. For
2013 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2014 diagnostics.
2015 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2016 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2017 "may only be used in compound statements" diagnostics, such that the
2018 same translatable string is used for all pragmas.
2019
1ff4bae6
MP
20202017-03-04 Marek Polacek <polacek@redhat.com>
2021
2022 PR c/79847
2023 * c-decl.c (implicit_decl_warning): Add missing space.
2024
7f5a7d78
MP
20252017-03-03 Marek Polacek <polacek@redhat.com>
2026
2027 PR c/79758
2028 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2029 current_function_prototype_arg_types is error_mark_node. Fix
2030 formatting. Use TREE_VALUE instead of TREE_TYPE.
2031
883c8f06
JJ
20322017-03-03 Jakub Jelinek <jakub@redhat.com>
2033
79c9b7a8
JJ
2034 PR c/79837
2035 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2036 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2037 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2038 diagnostics.
2039
883c8f06
JJ
2040 PR c/79836
2041 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2042 instead of %<_Generic>.
2043 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2044 (c_parser_omp_target_exit_data): Use %<release%> instead of
2045 %<release>.
2046
324ff1a0
JJ
20472017-02-28 Jakub Jelinek <jakub@redhat.com>
2048
2049 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2050 instead of just cond ? "..." : "...".
2051 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2052 for "enter"/"exit" keyword.
2053 (c_finish_oacc_routine): Don't use %s to supply portions of the
2054 message.
2055
4227c9ad
JJ
20562017-02-24 Jakub Jelinek <jakub@redhat.com>
2057
2058 PR c++/79588
2059 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2060 handle -Wrestrict here.
2061 * c-typeck.c (build_function_call_vec): Adjust
2062 check_function_arguments caller.
2063
5d972e66
RB
20642017-02-23 Richard Biener <rguenther@suse.de>
2065
2066 PR c/79684
2067 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2068 to initialize c_exprs to return.
2069 (c_parser_gimple_binary_expression): Likewise.
2070 (c_parser_gimple_unary_expression): Likewise.
2071 (c_parser_gimple_postfix_expression): Likewise.
2072
61ac5ebe
MP
20732017-02-22 Marek Polacek <polacek@redhat.com>
2074
2075 PR c/79662
2076 * c-typeck.c (convert_arguments): Handle error_mark_node.
2077
41d1b0b1
PK
20782017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2079
2080 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2081 value of c_parser_parse_ssa_name against error_mark_node and emit
2082 error if ssa name is anonymous and written as default definition.
2083
eab1f169
PK
20842017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2085
2086 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2087 FMA_EXPR.
2088
bcac0b4d
JJ
20892017-02-16 Jakub Jelinek <jakub@redhat.com>
2090
2091 PR c++/79512
2092 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2093 ignore #pragma omp target even when not followed by identifier.
2094
1be33173
PK
20952017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2096
2097 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2098 (c_parser_gimple_unary_expression): Likewise.
2099
aa326bfb
JJ
21002017-02-13 Jakub Jelinek <jakub@redhat.com>
2101
2102 * c-parser.c (c_parser_oacc_declare): Add missing space in
2103 diagnostics.
2104
8a398bc5
PK
21052017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2106
2107 PR c/79478
2108 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2109 set_c_expr_source_range when parsing ssa-name.
2110
3dcde5ef 21112017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2112 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2113
2114 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2115 building IL when arguments are error_mark_node.
2116 (c_parser_gimple_unary_expression): Likewise.
2117 (c_parser_gimple_if_stmt): Likewise.
2118 (c_parser_gimple_switch_stmt): Likewise.
2119 (c_parser_gimple_return_stmt): Likewise.
2120 (c_parser_parse_ssa_name): When name lookup fails do not build
2121 an SSA name. Use undeclared rather than not declared in error
2122 reporting.
2123
192b048b
MP
21242017-02-09 Marek Polacek <polacek@redhat.com>
2125
2126 PR c/79428
2127 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2128 instead of c_parser_skip_until_found.
2129
56f71478
JJ
21302017-02-09 Jakub Jelinek <jakub@redhat.com>
2131
2132 PR c/79431
2133 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2134 symtab_node::get on automatic variables.
2135
02889d23
CLT
21362016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2137 Chung-Lin Tang <cltang@codesourcery.com>
2138
2139 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2140 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2141 semantic checking.
2142 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2143
7af4b20d
RB
21442017-02-07 Richard Biener <rguenther@suse.de>
2145
2146 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2147 (c_parser_gimple_postfix_expression_after_primary):
2148 Do not use c_build_function_call_vec to avoid folding and promotion.
2149 Simplify.
2150
e5e391d6
MO
21512017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2152
2153 PR lto/79061
2154 * c-decl.c (pop_scope): Pass main_input_filename to
2155 build_translation_unit_decl.
2156
c2e84327
DM
21572017-01-24 David Malcolm <dmalcolm@redhat.com>
2158
2159 * c-parser.c: Include "read-rtl-function.h" and
2160 "run-rtl-passes.h".
2161 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2162 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2163 production. Update for renaming of field "gimple_pass" to
2164 "gimple_or_rtl_pass". If __RTL was seen, call
2165 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2166 to an auto_timevar, to cope with early exit.
2167 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2168 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2169 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2170 Handle RID_RTL.
2171 (c_parser_parse_rtl_body): New function.
2172 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2173 (struct c_declspecs): Rename field "gimple_pass" to
2174 "gimple_or_rtl_pass". Add field "rtl_p".
2175 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2176 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2177 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2178 (c_parser_gimple_or_rtl_pass_list): ...this.
2179
2ebd93e1
MP
21802017-01-20 Marek Polacek <polacek@redhat.com>
2181
2182 PR c/64279
2183 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2184
b1c95bb5
RB
21852017-01-13 Richard Biener <rguenther@suse.de>
2186
2187 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2188 nops.
2189
25329913
RB
21902017-01-13 Richard Biener <rguenther@suse.de>
2191
2192 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2193 _Literal ( type-name ) number.
2194
6bb4ea5c
RB
21952017-01-12 Richard Biener <rguenther@suse.de>
2196
2197 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2198 __MEM.
2199
6b5b4e9c
JJ
22002017-01-11 Jakub Jelinek <jakub@redhat.com>
2201
2202 PR c++/72813
2203 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2204 PCH file.
2205
e3252775
RB
22062017-01-11 Richard Biener <rguenther@suse.de>
2207
2208 PR bootstrap/79052
2209 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2210 returns on parse errors.
2211
a9342885
MP
22122017-01-04 Marek Polacek <polacek@redhat.com>
2213
2214 PR c++/64767
2215 * c-parser.c (c_parser_postfix_expression): Mark zero character
2216 constants by setting original_type in c_expr.
2217 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2218 with a zero character constant.
2219 (char_type_p): New function.
2220
5dd9a9d0
DM
22212017-01-04 David Malcolm <dmalcolm@redhat.com>
2222
2223 * c-parser.c (c_parser_declaration_or_fndef): Create a
2224 rich_location at init_loc and parse it to start_init.
2225 (last_init_list_comma): New global.
2226 (c_parser_braced_init): Update last_init_list_comma when parsing
2227 commas. Pass it to pop_init_level. Pass location of closing
2228 brace to pop_init_level.
2229 (c_parser_postfix_expression_after_paren_type): Create a
2230 rich_location at type_loc and parse it to start_init.
2231 (c_parser_omp_declare_reduction): Likewise for loc.
2232 * c-tree.h (start_init): Add rich_location * param.
2233 (pop_init_level): Add location_t param.
2234 * c-typeck.c (struct initializer_stack): Add field
2235 "missing_brace_richloc".
2236 (start_init): Add richloc param, use it to initialize
2237 the stack node's missing_brace_richloc.
2238 (last_init_list_comma): New decl.
2239 (finish_implicit_inits): Pass last_init_list_comma to
2240 pop_init_level.
2241 (push_init_level): When finding missing open braces, add fix-it
2242 hints to the richloc.
2243 (pop_init_level): Add "insert_before" param and pass it
2244 when calling pop_init_level. Add fixits about missing
2245 close braces to any richloc. Use the richloc for the
2246 -Wmissing-braces warning.
2247 (set_designator): Pass last_init_list_comma to pop_init_level.
2248 (process_init_element): Likewise.
2249
cbe34bb5
JJ
22502017-01-01 Jakub Jelinek <jakub@redhat.com>
2251
2252 Update copyright years.
2253
d17680f3
JJ
22542016-12-21 Jakub Jelinek <jakub@redhat.com>
2255
0dba7960
JJ
2256 PR bootstrap/78817
2257 * c-typeck.c (build_function_call_vec): If check_function_arguments
2258 returns true, set TREE_NO_WARNING on CALL_EXPR.
2259
d17680f3
JJ
2260 PR c/77767
2261 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2262 to *expr instead of overwriting it.
2263
aa90531e
RB
22642016-12-20 Richard Biener <rguenther@suse.de>
2265
2266 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2267 error recovery.
2268 (c_parser_gimple_statement): Only build assigns for non-error
2269 stmts.
2270 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2271
629b3d75
MJ
22722016-12-14 Martin Jambor <mjambor@suse.cz>
2273
2274 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2275 omp-low.h.
2276 (c_finish_oacc_routine): Adjusted call to
2277 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2278 to use their new names.
2279 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2280 use its new name.
2281 (c_parser_oacc_update): Likewise.
2282 (c_parser_omp_simd): Likewise.
2283 (c_parser_omp_target_update): Likewise.
2284 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2285 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2286 name.
2287 (c_finish_omp_cancellation_point): Likewise.
2288 * gimple-parser.c: Do not include omp-low.h
2289
c5af52eb
CP
22902016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2291 James Norris <jnorris@codesourcery.com>
2292
2293 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2294 EXIT_DATA,WAIT} are not used in compound statements.
2295 (c_parser_oacc_enter_exit_data): Update diagnostics.
2296
48330c93
BE
22972016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2298
2299 PR c++/71973
2300 * c-decl.c (diagnose_mismatched_decls): Use
2301 OPT_Wbuiltin_declaration_mismatch here too.
2302
899ca90e 23032016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2304 Alan Hayward <alan.hayward@arm.com>
2305 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2306
2307 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2308 (make_label, finish_struct): Likewise.
2309
1ee62b92 23102016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2311 Richard Biener <rguenther@suse.de>
22b15758 2312
8e745a17
JJ
2313 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2314 * config-lang.in (gtfiles): Add c/c-parser.h.
2315 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2316 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2317 * c-parser.c (enum c_id_kind, struct c_token,
2318 c_parser_next_token_is, c_parser_next_token_is_not,
2319 c_parser_next_token_is_keyword,
2320 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2321 Split out to ...
2322 * c-parser.h: ... new header.
2323 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2324 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2325 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2326 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2327 c_parser_error, c_parser_require, c_parser_skip_until_found,
2328 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2329 c_parser_type_name): Export.
2330 (c_parser_tokens_buf): New function.
2331 (c_parser_error): Likewise.
2332 (c_parser_set_error): Likewise.
2333 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2334 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2335 via c_parser_parse_gimple_body.
8e745a17
JJ
2336 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2337 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2338 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2339 c_parser_error, c_parser_require, c_parser_skip_until_found,
2340 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2341 c_parser_type_name): Declare.
1ee62b92
PG
2342 (struct c_parser): Declare forward.
2343 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2344 (c_parser_error): Likewise.
2345 (c_parser_set_error): Likewise.
2346 * gimple-parser.c: New file.
2347 * gimple-parser.h: Likewise.
1ee62b92 2348
22b15758
UB
23492016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2350
2351 PR c/35503
2352 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2353 warn_for_restrict.
2354
84ff4775
LCW
23552016-09-11 Le-Chun Wu <lcwu@google.com>
2356 Mark Wielaard <mjw@redhat.com>
2357
2358 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2359 to the given -Wshadow= variant.
2360
4d0cdd0c
TP
23612016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2362
2363 * c-typeck.c: Include memmodel.h.
2364
1202f33e
JJ
23652016-10-13 Jakub Jelinek <jakub@redhat.com>
2366
2367 PR target/77957
2368 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2369 instead of lhd_return_null_tree_v.
2370
8a14afd0
BS
23712016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2372
2373 PR c++/69733
2374 * c-decl.c (smallest_type_quals_location): New static function.
2375 (grokdeclarator): Try to find the correct location for an ignored
2376 qualifier.
2377
81fea426
MP
23782016-09-26 Marek Polacek <polacek@redhat.com>
2379
2380 PR c/7652
2381 * c-decl.c (pop_scope): Add gcc_fallthrough.
2382
23832016-09-26 Marek Polacek <polacek@redhat.com>
2384
2385 PR c/7652
2386 * c-parser.c (struct c_token): Add flags field.
2387 (c_lex_one_token): Pass it to c_lex_with_flags.
2388 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2389 into IFN_FALLTHROUGH.
2390 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2391 attribute fallthrough after a case label or default label.
2392 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2393
9a2300e9
MP
23942016-09-24 Marek Polacek <polacek@redhat.com>
2395
2396 PR c/77490
2397 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2398 have boolean value. Warn about ++/-- on booleans.
2399
7de76362
JJ
24002016-09-23 Jakub Jelinek <jakub@redhat.com>
2401
2402 * c-parser.c (incomplete_record_decls): Remove unnecessary
2403 = vNULL initialization of file scope vec.
2404
5b73d2ab
MP
24052016-09-16 Marek Polacek <polacek@redhat.com>
2406
2407 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2408
e51fbec3
MP
24092016-09-14 Marek Polacek <polacek@redhat.com>
2410
2411 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2412 (fix_array_notation_expr): Likewise.
2413 * c-decl.c (finish_decl): Likewise.
2414 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2415 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2416 (function_to_pointer_conversion): Use false instead of 0.
2417 (convert_lvalue_to_rvalue): Likewise.
2418 (parser_build_unary_op): Likewise.
2419 (build_atomic_assign): Likewise.
2420 (build_unary_op): Change nonconvert parameter type to bool, use
2421 true/false instead of 1/0.
2422 (build_binary_op): Use true instead of 1.
2423
254830ba
DM
24242016-09-13 David Malcolm <dmalcolm@redhat.com>
2425
2426 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2427 of add_fixit_insert to add_fixit_insert_before.
2428
4c13ba17
MP
24292016-09-13 Marek Polacek <polacek@redhat.com>
2430
2431 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2432 it.
2433
54dcdb88
BE
24342016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2435
2436 PR c++/77496
2437 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2438 COMPOUND_EXPR to warn_for_omitted_condop.
2439
e5106e27
DM
24402016-09-07 David Malcolm <dmalcolm@redhat.com>
2441
2442 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2443 c_get_substring_location for this new langhook.
2444
9dc5773f
JJ
24452016-09-02 Jakub Jelinek <jakub@redhat.com>
2446
2447 PR c/65467
2448 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2449 flag_openmp.
2450 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2451 instead of mark_exp_read on low_bound/length expression.
2452 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2453 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2454 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2455 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2456 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2457 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2458 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2459 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2460 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2461 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2462 instead of mark_expr_read.
2463 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2464 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2465 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2466 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2467 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2468 array section bases outside of depend clause, for depend clause
2469 use convert_lvalue_to_rvalue on the base.
2470 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2471 linear, aligned, map, to and from clauses.
2472 (c_omp_clause_copy_ctor): New function.
2473
295844f6
MP
24742016-09-01 Marek Polacek <polacek@redhat.com>
2475
2476 PR c/7652
2477 * c-typeck.c (composite_type): Add FALLTHRU comment.
2478
089af25c
DM
24792016-08-31 David Malcolm <dmalcolm@redhat.com>
2480
2481 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2482 to the insertion fixits for "struct", "union", and "enum".
2483
f9087798
DM
24842016-08-30 David Malcolm <dmalcolm@redhat.com>
2485
2486 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2487 rather than add_fixit_misspelled_id.
2488 (undeclared_variable): Likewise.
2489 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2490 now-redundant "here" params from add_fixit_insert method calls.
2491 (c_parser_parameter_declaration): Likewise.
2492 * c-typeck.c (build_component_ref): Remove now-redundant range
2493 param from add_fixit_replace method calls.
2494
ebef225f
MP
24952016-08-25 Marek Polacek <polacek@redhat.com>
2496
2497 * c-typeck.c (parser_build_binary_op): Pass LHS to
2498 warn_logical_not_parentheses.
2499
fe377a48
MP
25002016-08-25 Marek Polacek <polacek@redhat.com>
2501
2502 PR c/77323
2503 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2504 or _FloatN or _FloatNx is not supported.
2505 (finish_declspecs): Set type to integer_type_node when _FloatN or
2506 _FloatNx is not supported.
2507
c65699ef
JM
25082016-08-19 Joseph Myers <joseph@codesourcery.com>
2509
2510 PR c/32187
2511 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2512 (struct c_declspecs): Add field floatn_nx_idx.
2513 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2514 and _FloatNx type specifiers.
2515 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2516 (c_parser_declspecs, c_parser_attribute_any_word)
2517 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2518 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2519 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2520 narrower than double.
2521
2f1364c2
JJ
25222016-08-12 Jakub Jelinek <jakub@redhat.com>
2523 Martin Liska <mliska@suse.cz>
2524
2525 PR c/67410
2526 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2527 % to determine val element to change. Assert that
2528 wchar_bytes * charwidth fits into val array.
2529
191816a3
MP
25302016-08-12 Marek Polacek <polacek@redhat.com>
2531
2532 PR c/7652
2533 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2534 (c_parser_postfix_expression): Likewise.
2535 * c-typeck.c (build_unary_op): Adjust fall through comment.
2536 (c_mark_addressable): Likewise.
2537
b95a64bb
JJ
25382016-08-11 Jakub Jelinek <jakub@redhat.com>
2539
2540 PR c/72816
2541 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2542 array member through typedef, for orig_qual_indirect == 0 clear
2543 orig_qual_type.
2544
895aa8e1
DM
25452016-08-08 David Malcolm <dmalcolm@redhat.com>
2546
2547 PR c/64955
2548 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2549 this up to selftest::run_c_tests.
2550 (selftest::run_c_tests): New function.
2551
0b212d8c
TS
25522016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2553
ae9281fc
TS
2554 * c-parser.c (struct oacc_routine_data): Add error_seen and
2555 fndecl_seen members.
2556 (c_finish_oacc_routine): Use these.
2557 (c_parser_declaration_or_fndef): Adjust.
2558 (c_parser_oacc_routine): Likewise. Support more C language
2559 constructs, and improve diagnostics. Move pragma context
2560 checking...
2561 (c_parser_pragma): ... here.
2562
0b212d8c
TS
2563 * c-parser.c (struct oacc_routine_data): New.
2564 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2565 Simplify code.
2566 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2567 declare target" attribute.
2568
76e2c821
JB
25692016-08-01 Jan Beulich <jbeulich@suse.com>
2570
2571 * c-fold.c (c_fully_fold_internal): Also emit shift count
2572 warnings for vector types.
2573 * c-typeck.c (build_binary_op): Likewise.
2574
f618a472
MP
25752016-07-29 Marek Polacek <polacek@redhat.com>
2576
2577 PR c/71742
2578 * c-decl.c (finish_struct): Rephrase an error message.
2579
efd0786f
MP
2580 PR c/71853
2581 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2582 to error node for invalid code.
2583
e00dceaf
MP
2584 PR c/71573
2585 * c-decl.c (implicitly_declare): Return decl early not only for
2586 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2587
673a107a
JJ
25882016-07-29 Jakub Jelinek <jakub@redhat.com>
2589
2590 PR c/71969
2591 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2592 on GNU extern inline functions.
2593
a5b5c8b6
MP
25942016-07-29 Marek Polacek <polacek@redhat.com>
2595
2596 PR c/71583
2597 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2598 check expr.value.
2599
e3fe09c1
UB
26002016-07-22 Uros Bizjak <ubizjak@gmail.com>
2601
2602 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2603
7c8f7eaa
DM
26042016-07-20 David Malcolm <dmalcolm@redhat.com>
2605
2606 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2607 spellcheck-tree.h
2608 (best_macro_match): Likewise, converting from a typedef to a
2609 subclass.
2610 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2611 (lookup_name_fuzzy): Update for change of best_macro_match to a
2612 subclass with a ctor that calls cpp_forall_identifiers.
2613
de6a69ee
DM
26142016-07-20 David Malcolm <dmalcolm@redhat.com>
2615
2616 * c-decl.c (implicit_decl_warning): Update for conversion of
2617 return type of lookup_name_fuzzy to const char *.
2618 (undeclared_variable): Likewise.
2619 (lookup_name_fuzzy): Convert return type from tree to
2620 const char *.
2621 * c-parser.c (c_parser_declaration_or_fndef): Update for
2622 conversion of return type of lookup_name_fuzzy to const char *.
2623 (c_parser_parameter_declaration): Likewise.
2624
b1c9c068
CP
26252016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2626
2627 * c-parser.c (c_parser_oacc_declare): Don't scan for
2628 GOMP_MAP_POINTER.
2629 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2630 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2631 zero-length subarrays.
2632
ddbbcb19
JJ
26332016-07-15 Jakub Jelinek <jakub@redhat.com>
2634
2635 PR c/71858
2636 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2637 instead of FUZZY_LOOKUP_NAME.
2638 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2639 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2640
dd36b877
JJ
26412016-07-14 Jakub Jelinek <jakub@redhat.com>
2642
2643 PR c/71858
2644 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2645
8c681247
TS
26462016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2647
2648 * c-parser.c (c_parser_generic_selection): Make type of variable
2649 auto_vec.
2650 (c_parser_omp_declare_simd): Likewise.
2651
bf4fa671
TS
26522016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2653
2654 * c-decl.c (struct c_struct_parse_info): Change member types
2655 from vec to auto_vec.
2656 (start_struct): Adjust.
2657 (finish_struct): Likewise.
2658
557e8c49
JJ
26592016-07-02 Jakub Jelinek <jakub@redhat.com>
2660
2661 PR c/71719
2662 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2663
54d19c3b
TS
26642016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2665
2666 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2667 Move pragma context checking into...
2668 (c_parser_omp_cancellation_point): ... here, and improve
2669 diagnostic messages.
2670 * c-typeck.c (c_finish_omp_cancel)
2671 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2672
152ef731
JJ
26732016-06-29 Jakub Jelinek <jakub@redhat.com>
2674
2675 PR c/71685
2676 * c-typeck.c (c_build_qualified_type): Don't clear
2677 C_TYPE_INCOMPLETE_VARS for the main variant.
2678
26792016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2680
2681 PR c/71552
2682 * c-typeck.c (output_init_element): Diagnose incompatible types
2683 before non-constant initializers.
2684
e9ac1f86
JJ
26852016-06-28 Jakub Jelinek <jakub@redhat.com>
2686
2687 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2688
277d7ee0
AK
26892016-06-23 Andi Kleen <ak@linux.intel.com>
2690
2691 * Make-lang.in: Add support for autofdo.
2692
1a4f11c8
DM
26932016-06-22 David Malcolm <dmalcolm@redhat.com>
2694
2695 PR c/70339
2696 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2697 (implicit_decl_warning): When issuing warnings for implicit
2698 declarations, attempt to provide a suggestion via
2699 lookup_name_fuzzy.
2700 (undeclared_variable): Likewise when issuing errors.
2701 (lookup_name_in_scope): Likewise.
2702 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2703 (best_macro_match): New typedef.
2704 (find_closest_macro_cpp_cb): New function.
2705 (lookup_name_fuzzy): New function.
2706 * c-parser.c: Include gcc-rich-location.h.
2707 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2708 (c_keyword_starts_typename): ...this new function.
2709 (c_parser_declaration_or_fndef): When issuing errors about
2710 missing "struct" etc, add a fixit. For other kinds of errors,
2711 attempt to provide a suggestion via lookup_name_fuzzy.
2712 (c_parser_parms_declarator): When looking ahead to detect typos in
2713 type names, also reject CPP_KEYWORD.
2714 (c_parser_parameter_declaration): When issuing errors about
2715 unknown type names, attempt to provide a suggestion via
2716 lookup_name_fuzzy.
2717 * c-tree.h (c_keyword_starts_typename): New prototype.
2718
5a578671
JM
27192016-06-20 Joseph Myers <joseph@codesourcery.com>
2720
2721 PR c/71601
2722 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2723 c_common_type returns error_mark_node.
2724
3f8257db 27252016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2726
2727 PR c/69507
2728 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2729 __alignof__ (expression).
2730
6a3f203c
DM
27312016-06-14 David Malcolm <dmalcolm@redhat.com>
2732
2733 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2734
264757fb
DM
27352016-06-14 David Malcolm <dmalcolm@redhat.com>
2736
2737 * c-typeck.c (build_component_ref): Simplify fixit code by
2738 using gcc_rich_location::add_fixit_misspelled_id.
2739 (set_init_label): Likewise.
2740
f7e4f2e3
DM
27412016-06-13 David Malcolm <dmalcolm@redhat.com>
2742
2743 * c-parser.c (c_parser_initelt): Provide location of name for new
2744 location_t param of set_init_label.
2745 * c-tree.h (set_init_label): Add location_t param.
2746 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2747 param and use it when issuing error messages about unrecognized
2748 field names. Attempt to provide a fixit hint if appropriate,
2749 otherwise update the error message to provide the type name.
2750
4b1ffdb1
TS
27512016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2752
2753 PR c/71381
2754 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2755 Loosen checking.
2756
44a845ca
MS
27572016-06-08 Martin Sebor <msebor@redhat.com>
2758 Jakub Jelinek <jakub@redhat.com>
2759
2760 PR c++/70507
2761 PR c/68120
2762 * c-typeck.c (convert_arguments): Don't promote last argument
2763 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2764
92a5f2ba
MP
27652016-06-08 Marek Polacek <polacek@redhat.com>
2766
2767 PR c/71418
2768 * c-decl.c (grokdeclarator): Check TYPE_P.
2769
08203f73
MP
2770 PR c/71426
2771 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2772 code.
2773
6ffd47b7
DM
27742016-06-07 David Malcolm <dmalcolm@redhat.com>
2775
2776 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2777 and structure element reference, capture the location of the
2778 element name token and pass it to build_component_ref.
2779 (c_parser_postfix_expression_after_primary): Likewise for
2780 structure element dereference.
2781 (c_parser_omp_variable_list): Likewise for
2782 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2783 * c-tree.h (build_component_ref): Add location_t param.
2784 * c-typeck.c (build_component_ref): Add location_t param
2785 COMPONENT_LOC. Use it, if available, when issuing hints about
2786 mispelled member names to provide a fixit replacement hint.
2787
1f40cff3
MP
27882016-06-06 Marek Polacek <polacek@redhat.com>
2789
2790 PR c/71362
2791 * c-parser.c (c_parser_direct_declarator): Set location.
2792
5545a907
MP
27932016-06-06 Marek Polacek <polacek@redhat.com>
2794
2795 * c-typeck.c (comptypes_internal): Handle comparisons of
2796 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2797 TYPE_REF_CAN_ALIAS_ALL.
2798
b605f663
CLT
27992016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2800
2801 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2802 arguments as addressable when async clause exists.
2803
00631022
JJ
28042016-05-30 Jakub Jelinek <jakub@redhat.com>
2805
2806 PR c++/71349
2807 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2808 when combined with target construct.
2809
7211a097
JJ
28102016-05-26 Jakub Jelinek <jakub@redhat.com>
2811
2812 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2813 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2814
95efe6b6
MP
28152016-05-25 Marek Polacek <polacek@redhat.com>
2816
2817 PR c/71265
2818 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2819
a23faf7a
MP
2820 PR c/71266
2821 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2822
e46c7770
CP
28232016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2824
2825 * c-parser.c (c_parser_oacc_declare): Add support for
2826 GOMP_MAP_FIRSTPRIVATE_POINTER.
2827 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2828 argument with enum c_omp_region_type ort.
2829 (handle_omp_array_sections): Likewise. Update call to
2830 handle_omp_array_sections_1.
2831 (c_finish_omp_clauses): Add specific errors and warning messages for
2832 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2833 call to handle_omp_array_sections.
2834
a04e69c0
TS
28352016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2836
2837 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2838
f17a223d
RB
28392016-05-24 Richard Biener <rguenther@suse.de>
2840
2841 PR middle-end/70434
2842 PR c/69504
2843 * c-typeck.c (build_array_ref): Do not complain about indexing
2844 non-lvalue vectors. Adjust for function name change.
2845
79063edd
MS
28462016-05-20 Martin Sebor <msebor@redhat.com>
2847
2848 PR c/71115
2849 * c-typeck.c (error_init): Use
2850 expansion_point_location_if_in_system_header.
2851 (warning_init): Same.
2852
8a40fef3
DM
28532016-05-19 David Malcolm <dmalcolm@redhat.com>
2854
2855 PR c/71171
2856 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2857 in error-handling.
2858 (c_parser_postfix_expression): Likewise.
2859 * c-tree.h (c_expr::set_error): New method.
2860 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2861 that result's range is initialized.
2862
e9892350
JG
28632016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2864
2865 * c-typeck.c (parser_build_unary_op): Fix formatting.
2866
8fad45f5
MW
28672016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2868
2869 * c-decl.c (grokdeclarator): Remove errmsg and use of
2870 targetm.invalid_return_type.
2871 (grokparms): Remove errmsg and use of
2872 targetm.invalid_parameter_type.
2873
aa4b467b
JM
28742016-05-13 Joseph Myers <joseph@codesourcery.com>
2875
2876 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2877 function return type.
2878
4f2e1536
MP
28792016-05-12 Marek Polacek <polacek@redhat.com>
2880
2881 PR c/70756
2882 * c-decl.c (build_compound_literal): Pass LOC down to
2883 c_incomplete_type_error.
2884 * c-tree.h (require_complete_type): Adjust declaration.
2885 (c_incomplete_type_error): Likewise.
2886 * c-typeck.c (require_complete_type): Add location parameter, pass it
2887 down to c_incomplete_type_error.
2888 (c_incomplete_type_error): Add location parameter, pass it down to
2889 error_at.
2890 (build_component_ref): Pass location down to c_incomplete_type_error.
2891 (default_conversion): Pass location down to require_complete_type.
2892 (build_array_ref): Likewise.
2893 (build_function_call_vec): Likewise.
2894 (convert_arguments): Likewise.
2895 (build_unary_op): Likewise.
2896 (build_c_cast): Likewise.
2897 (build_modify_expr): Likewise.
2898 (convert_for_assignment): Likewise.
2899 (c_finish_omp_clauses): Likewise.
2900
d6e83a8d
MM
29012016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2902
2903 PR c/43651
2904 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2905 is enabled.
2906 * c-errors.c (pedwarn_c90): Return true if warned.
2907 * c-tree.h (pedwarn_c90): Change return type to bool.
2908 (enum c_declspec_word): Add new enumerator cdw_atomic.
2909
5c3a10fb
MP
29102016-05-11 Marek Polacek <polacek@redhat.com>
2911
2912 PR c++/71024
2913 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2914 diagnose_mismatched_attributes and call it.
2915
cf68d92c
MP
29162016-05-10 Marek Polacek <polacek@redhat.com>
2917
2918 PR c/70255
2919 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2920 on a declaration following the definition.
2921
351f85c5
JJ
29222016-05-05 Jakub Jelinek <jakub@redhat.com>
2923
2924 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2925 parse it through to c_parser_c99_block_statement.
2926 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2927 caller.
2928
deef7113
MP
29292016-05-04 Marek Polacek <polacek@redhat.com>
2930
2931 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2932 OPT_Wdangling_else.
2933
de55efd5
MP
29342016-05-04 Marek Polacek <polacek@redhat.com>
2935
2936 PR c/48778
2937 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2938 for macro expansions.
2939
79ce98bc
MP
29402016-05-03 Marek Polacek <polacek@redhat.com>
2941
2942 PR c/70859
2943 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2944 check_builtin_function_arguments.
2945
fb2647aa
RB
29462016-05-03 Richard Biener <rguenther@suse.de>
2947
2948 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2949 the checksum from the previous stage.
2950
77886428
CP
29512016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2952
2953 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2954 c_finish_omp_clauses.
2955 (c_parser_omp_all_clauses): Likewise.
2956 (c_parser_oacc_cache): Likewise.
2957 (c_parser_oacc_loop): Likewise.
2958 (omp_split_clauses): Likewise.
2959 (c_parser_omp_declare_target): Likewise.
2960 (c_parser_cilk_all_clauses): Likewise.
2961 (c_parser_cilk_for): Likewise.
2962 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2963 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2964
7176a4a0
MP
29652016-05-02 Marek Polacek <polacek@redhat.com>
2966
2967 PR c/70851
2968 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2969 incomplete type.
2970
e7ff0319
CP
29712016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2972
2973 PR middle-end/70626
2974 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2975 OACC_LOOP_CLAUSE_MASK.
2976 (c_parser_oacc_kernels_parallel): Update call to
2977 c_oacc_split_loop_clauses.
2978
9f405ce1
AM
29792016-04-28 Andrew MacLeod <amacleod@redhat.com>
2980
2981 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2982 argument to build_modify_expr in two cases.
2983
c1e1f433
BS
29842016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2985
2986 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2987 warn_for_memset instead of warning directly here.
2988
2448a956
MP
29892016-04-26 Marek Polacek <polacek@redhat.com>
2990
2991 PR c/67784
2992 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2993 out of ...
2994 (c_parser_for_statement): ... here.
2995 (c_parser_if_statement): Use it.
2996 (c_parser_switch_statement): Use it.
2997 (c_parser_while_statement): Use it.
2998
b02a5e26
MP
2999 PR c/70791
3000 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3001
477d4906
IV
30022016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3003
3004 PR c++/69363
3005 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3006 instead of c_finish_cilk_clauses.
3007 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3008 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3009 floating-point variables in the linear clause for Cilk Plus.
3010
fe37c7af
MM
30112016-04-18 Michael Matz <matz@suse.de>
3012
3013 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3014 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3015
949505a9
MP
30162016-04-15 Marek Polacek <polacek@redhat.com>
3017
3018 PR c/70671
3019 * c-typeck.c (build_unary_op): Pass location down to error and
3020 warning call.
3021
dda1bf61
JJ
30222016-04-15 Jakub Jelinek <jakub@redhat.com>
3023
3024 PR c/70436
3025 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3026 where needed.
3027 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3028 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3029 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3030 Adjust c_parser_pragma callers.
3031 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3032 caller.
3033 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3034 c_parser_statement.
3035 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3036 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3037 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3038 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3039 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3040 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3041 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3042 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3043 down where needed.
3044 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3045 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3046 calls.
3047
99cd9857
MP
30482016-04-13 Marek Polacek <polacek@redhat.com>
3049
3050 PR c/70436
3051 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3052 adjust callers.
3053 (c_parser_statement): Likewise.
3054 (c_parser_c99_block_statement): Likewise.
3055 (c_parser_while_statement): Likewise.
3056 (c_parser_for_statement): Likewise.
3057 (c_parser_if_body): Don't set IF_P here.
3058 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3059 about dangling else here.
3060 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3061 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3062 warn about dangling else here.
3063
f13355da
MP
30642016-04-04 Marek Polacek <polacek@redhat.com>
3065
3066 PR c/70307
3067 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3068
5fde6a45
MP
30692016-03-31 Marek Polacek <polacek@redhat.com>
3070
3071 PR c/70297
3072 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3073
4bbf545b
DM
30742016-03-18 David Malcolm <dmalcolm@redhat.com>
3075
3076 PR c/70281
3077 * c-parser.c (c_parser_postfix_expression): Set the source range
3078 for uses of "__builtin_types_compatible_p".
3079
fcc2b74f
JJ
30802016-03-17 Jakub Jelinek <jakub@redhat.com>
3081
3082 PR c/70280
3083 * c-typeck.c (composite_type): Don't count void_list_node
3084 into len, if the list is terminated by void_list_node, start
3085 with void_list_node instead of NULL for newargs. Stop
3086 at void_list_node.
3087
ab4c578f
MP
30882016-03-16 Marek Polacek <polacek@redhat.com>
3089
3090 PR c/70093
3091 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3092 nested functions returning VM types.
3093
96b3c82d
CP
30942016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3095
3096 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3097 when calling c_finish_omp_clauses.
3098
29b9828f
BS
30992016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3100
3101 PR c/69824
3102 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3103 for later.
3104
7ff6ca38
MP
31052016-03-04 Marek Polacek <polacek@redhat.com>
3106
3107 PR c/69798
3108 * c-parser.c (c_parser_postfix_expression): Call
3109 c_parser_cast_expression rather than c_parser_postfix_expression.
3110
686e2237
JJ
31112016-03-01 Jakub Jelinek <jakub@redhat.com>
3112
3113 PR c/69796
3114 PR c/69974
3115 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3116 of incomplete decls to error_mark_node.
3117
0b05329b
MP
31182016-02-24 Marek Polacek <polacek@redhat.com>
3119
3120 PR c/69819
3121 * c-decl.c (finish_decl): Don't update the copy of the type of a
3122 different decl type.
3123
067fbd8b
JJ
31242016-02-23 Jakub Jelinek <jakub@redhat.com>
3125
3126 PR objc/69844
3127 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3128 in id_kind reclassification.
3129
bf14eba2
JJ
31302016-02-16 Jakub Jelinek <jakub@redhat.com>
3131
3132 PR c/69835
3133 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3134
ba539195
JN
31352016-02-16 James Norris <jnorris@codesourcery.com>
3136
3137 PR c/64748
3138 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3139
16595a1f
BS
31402016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3141
f48dfe98
BS
3142 * c-decl.c (build_null_declspecs): Zero the entire struct.
3143
16595a1f
BS
3144 PR c/69522
3145 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3146 callers changed. If nested_p is true, use it to call
3147 finish_implicit_inits.
3148 * c-tree.h (finish_implicit_inits): Declare.
3149 * c-typeck.c (finish_implicit_inits): New function. Move code
3150 from ...
3151 (push_init_level): ... here.
3152 (set_designator, process_init_element): Call finish_implicit_inits.
3153
66756373
JJ
31542016-02-11 Jakub Jelinek <jakub@redhat.com>
3155
3156 PR c/69768
3157 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3158 arguments for -Waddress warning.
3159
1066e9b5
JJ
31602016-02-04 Jakub Jelinek <jakub@redhat.com>
3161
3162 PR c/69669
3163 * c-decl.c (finish_enum): When honoring mode attribute,
3164 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3165
3a5d2ba4
JJ
31662016-01-29 Jakub Jelinek <jakub@redhat.com>
3167
3168 PR debug/69518
3169 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3170 all type variants, not just TYPE_MAIN_VARIANT.
3171
cbdd8ae0
JJ
31722016-01-27 Jakub Jelinek <jakub@redhat.com>
3173
3174 PR debug/66869
3175 * c-decl.c (c_write_global_declarations_1): Warn with
3176 warn_unused_function if static prototype without definition
3177 is not C_DECL_USED.
3178
fa74a4bc
MP
31792016-01-27 Marek Polacek <polacek@redhat.com>
3180
3181 PR c/68062
3182 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3183 to unsigned, if needed. Add -Wsign-compare warning.
3184
13f92e8d
JJ
31852016-01-26 Jakub Jelinek <jakub@redhat.com>
3186
3187 PR tree-optimization/69483
3188 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3189
cd8e73dc 31902016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3191
3192 PR c/24293
3193 * c-tree.h (incomplete_record_decls): Declare.
3194 * c-parser.c (incomplete_record_decls): Define.
3195 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3196 report error if any decl has zero size.
3197 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3198 or enum type to incomplete_record_decls.
3199
e6d6ec9e
TV
32002016-01-14 Tom de Vries <tom@codesourcery.com>
3201
3202 PR tree-optimization/68773
3203 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3204 set force_output.
3205
00083992
MP
32062016-01-14 Marek Polacek <polacek@redhat.com>
3207
3208 PR c/69262
3209 * c-decl.c (grokdeclarator): Provide more information for invalid
3210 array declarations.
3211
7443cf13
DM
32122016-01-06 David Malcolm <dmalcolm@redhat.com>
3213
3214 * c-parser.c (c_parser_unary_expression): For dereferences, build
3215 a combined location before calling build_indirect_ref, so that
3216 error reports cover the full range, manually updating the c_expr
3217 src_range.
3218
6b131d5b
MP
32192016-01-06 Marek Polacek <polacek@redhat.com>
3220
3221 PR sanitizer/69099
3222 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3223 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3224 NULL.
3225
818ab71a
JJ
32262016-01-04 Jakub Jelinek <jakub@redhat.com>
3227
3228 Update copyright years.
3229
2fe0a208
MP
32302016-01-04 Marek Polacek <polacek@redhat.com>
3231
3232 PR c/68908
3233 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3234 optimization to use __atomic_fetch_* built-in if possible.
3235
c7b48c8a
TS
32362015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3237
3238 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3239 into...
3240 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3241 all users.
3242
fda5652f
MP
32432015-12-22 Marek Polacek <polacek@redhat.com>
3244
3245 PR c/69002
3246 * c-typeck.c (build_component_ref): Warn when acessing elements of
3247 atomic structures or unions.
3248
745e411d
DM
32492015-12-21 David Malcolm <dmalcolm@redhat.com>
3250
3251 * c-typeck.c: Include "gcc-rich-location.h".
3252 (build_binary_op): In the two places that call binary_op_error,
3253 create a gcc_rich_location and populate it with the location of
3254 the binary op and its two operands.
3255
94c40e19
DM
32562015-12-16 David Malcolm <dmalcolm@redhat.com>
3257
3258 * c-parser.c (c_parser_statement_after_labels): When calling
3259 c_finish_return, Use the return expression's location if it has
3260 one, falling back to the location of the first token within it.
3261 * c-typeck.c (c_finish_return): When issuing warnings about
3262 the incorrect presence/absence of a return value, issue a note
3263 showing the declaration of the function.
3264
de67c4c3
DM
32652015-12-16 David Malcolm <dmalcolm@redhat.com>
3266
3267 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3268 to 4.
3269 (c_parser_peek_nth_token): New function.
3270 (c_parser_peek_conflict_marker): New function.
3271 (c_parser_error): Detect conflict markers and report them as such.
3272
a10704e1
DM
32732015-12-16 David Malcolm <dmalcolm@redhat.com>
3274
3275 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3276 to preserve range information for the primary expression
3277 in the call to c_parser_postfix_expression_after_primary.
3278
8062bca6
DM
32792015-12-16 David Malcolm <dmalcolm@redhat.com>
3280
3281 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3282 expression location, falling back on the first token location,
3283 rather than always using the latter.
3284
d06f8b75
MP
32852015-12-16 Marek Polacek <polacek@redhat.com>
3286
3287 PR c/64637
3288 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3289 available.
3290
2994fb91
MP
32912015-12-15 Marek Polacek <polacek@redhat.com>
3292
3293 PR c/68907
3294 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3295 artificial decl.
3296
a1b93f8d
DM
32972015-12-08 David Malcolm <dmalcolm@redhat.com>
3298
3299 * c-parser.c (c_parser_alignof_expression): Capture location of
3300 closing parenthesis (if any), or of end of unary expression, and
3301 use it to build a src_range for the expression.
3302
46c6e1e2
DM
33032015-12-08 David Malcolm <dmalcolm@redhat.com>
3304
3305 PR c/68757
3306 * c-parser.c (c_parser_get_builtin_args): Add
3307 "out_close_paren_loc" param, and write back to it.
3308 (c_parser_postfix_expression): Capture the closing
3309 parenthesis location for RID_CHOOSE_EXPR,
3310 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3311 RID_BUILTIN_SHUFFLE and use it to set the source range
3312 for such expressions; within RID_BUILTIN_COMPLEX set
3313 the underlying location.
3314
66189108
MP
33152015-12-07 Marek Polacek <polacek@redhat.com>
3316
3317 PR c/68668
3318 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3319 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3320
f187980b
EB
33212015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3322
3323 * c-tree.h (c_build_va_arg): Adjust prototype.
3324 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3325 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3326 parameter, adjust throughout and issue an error if EXPR is a component
3327 with reverse storage order.
3328
4250754e
JM
33292015-12-02 Jason Merrill <jason@redhat.com>
3330
3331 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3332 (c_fully_fold_internal, decl_constant_value_for_optimization):
3333 Move from c-common.c.
3334 * c-tree.h: Declare decl_constant_value_for_optimization.
3335 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3336
e9e32ee6
JM
33372015-12-02 Joseph Myers <joseph@codesourcery.com>
3338
3339 PR c/68162
3340 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3341 following link from declarator to next declarator. Track original
3342 qualified type and pass it to c_build_qualified_type.
3343 * c-typeck.c (c_build_qualified_type): Add arguments
3344 orig_qual_type and orig_qual_indirect.
3345
ff7a55bf
TS
33462015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3347
3348 * c-parser.c (c_parser_omp_clause_name)
3349 (c_parser_oacc_all_clauses): Alphabetical sorting.
3350
657e4e47
JJ
33512015-12-02 Jakub Jelinek <jakub@redhat.com>
3352
3353 PR c/68533
3354 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3355 for diagnostics.
3356
37d5ad46
JB
33572015-12-01 Julian Brown <julian@codesourcery.com>
3358 Cesar Philippidis <cesar@codesourcery.com>
3359 James Norris <James_Norris@mentor.com>
3360
3361 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3362 (c_parser_oacc_clause_use_device): New function.
3363 (c_parser_oacc_all_clauses): Add use_device support.
3364 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3365 (c_parser_oacc_host_data): New function.
3366 (c_parser_omp_construct): Add host_data support.
3367 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3368 * c-typeck.c (c_finish_oacc_host_data): New function.
3369 (c_finish_omp_clauses): Add use_device support.
3370
a4850ce9
JH
33712015-11-29 Jan Hubicka <hubicka@ucw.cz>
3372
3373 PR c/67106
3374 * c-decl.c: Set TYPE_PACKED in variants.
3375
b58d3df2
ML
33762015-11-27 Martin Liska <mliska@suse.cz>
3377
3378 PR c++/68312
3379 * c-array-notation.c (fix_builtin_array_notation_fn):
3380 Use release_vec_vec instead of vec::release.
3381 (build_array_notation_expr): Likewise.
3382 (fix_conditional_array_notations_1): Likewise.
3383 (fix_array_notation_expr): Likewise.
3384 (fix_array_notation_call_expr): Likewise.
3385
aec17bfe
JJ
33862015-11-27 Jakub Jelinek <jakub@redhat.com>
3387
3388 PR c/63326
3389 * c-parser.c (c_parser_compound_statement_nostart): If
3390 last_label is true, use pragma_stmt instead of pragma_compound
3391 as second c_parser_pragma argument.
3392 (c_parser_omp_ordered, c_parser_omp_target_update,
3393 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3394 false as second argument to c_parser_skip_to_pragma_eol after
3395 diagnosing standalone directives used in pragma_stmt context.
3396
688c4de0
IV
33972015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3398
3399 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3400 with "if (ENABLE_OFFLOADING)".
3401
cbd03aee
DM
34022015-11-23 David Malcolm <dmalcolm@redhat.com>
3403
3404 PR objc/68438
3405 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3406 for various Objective-C constructs: Class.name syntax,
3407 @selector(), @protocol(), @encode(), and [] message syntax.
3408
a87a86e1
DM
34092015-11-20 David Malcolm <dmalcolm@redhat.com>
3410
3411 PR 62314
3412 * c-typeck.c (should_suggest_deref_p): New function.
3413 (build_component_ref): Special-case POINTER_TYPE when
3414 generating a "not a structure of union" error message, and
3415 suggest a "->" rather than a ".", providing a fix-it hint.
3416
8ece8dfb
DM
34172015-11-19 David Malcolm <dmalcolm@redhat.com>
3418
3419 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3420 candidate into a new function, find_closest_identifier.
3421
433068cc
MP
34222015-11-19 Marek Polacek <polacek@redhat.com>
3423
3424 PR c/68412
3425 * c-typeck.c (parser_build_binary_op): Properly handle
3426 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3427
bef08b71
DM
34282015-11-17 David Malcolm <dmalcolm@redhat.com>
3429
3430 * c-parser.c (set_c_expr_source_range): Bulletproof both
3431 overloaded implementations against NULL expr->value.
3432 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3433 values.
3434 (c_parser_unary_expression): Likewise when handling addresses of
3435 labels.
3436 (c_parser_postfix_expression): Likewise for statement expressions,
3437 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3438 __builtin_va_arg, and for __builtin_offset_of.
3439 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3440 src_range using the range of the braced initializer.
3441 (c_parser_transaction_expression): Set src_range for "ret" to a
3442 sane pair of values.
3443
fff77217
KY
34442015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3445
3446 * c-parser.c (c_finish_omp_declare_simd): Look for
3447 "simd" attribute as well. Update error message.
3448
1d899da2
TS
34492015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3450
3451 * c-parser.c (c_parser_omp_declare_target): Adjust.
3452
e4606348
JJ
34532015-11-14 Jakub Jelinek <jakub@redhat.com>
3454
3455 * c-typeck.c (c_finish_omp_clauses): Don't mark
3456 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3457
3e636daf
MP
34582015-11-14 Marek Polacek <polacek@redhat.com>
3459
3460 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3461 * c-typeck.c: Likewise.
3462
ebedc9a3
DM
34632015-11-13 David Malcolm <dmalcolm@redhat.com>
3464
3465 * c-decl.c (warn_defaults_to): Pass line_table to
3466 rich_location ctor.
3467 * c-errors.c (pedwarn_c99): Likewise.
3468 (pedwarn_c90): Likewise.
3469 * c-parser.c (set_c_expr_source_range): New functions.
3470 (c_token::get_range): New method.
3471 (c_token::get_finish): New method.
3472 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3473 based on the range from the start of the LHS to the end of the
3474 RHS.
3475 (c_parser_conditional_expression): Likewise, based on the range
3476 from the start of the cond.value to the end of exp2.value.
3477 (c_parser_binary_expression): Call set_c_expr_source_range on
3478 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3479 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3480 based on the cast_loc through to the end of the expr.
3481 (c_parser_unary_expression): Likewise, based on the
3482 op_loc through to the end of op.
3483 (c_parser_sizeof_expression) Likewise, based on the start of the
3484 sizeof token through to either the closing paren or the end of
3485 expr.
3486 (c_parser_postfix_expression): Likewise, using the token range,
3487 or from the open paren through to the close paren for
3488 parenthesized expressions.
3489 (c_parser_postfix_expression_after_primary): Likewise, for
3490 various kinds of expression.
3491 * c-tree.h (struct c_expr): Add field "src_range".
3492 (c_expr::get_start): New method.
3493 (c_expr::get_finish): New method.
3494 (set_c_expr_source_range): New decls.
3495 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3496 on ret for prefix unary ops.
3497 (parser_build_binary_op): Likewise, running from the start of
3498 arg1.value through to the end of arg2.value.
3499
ec8b536f
MP
35002015-11-13 Marek Polacek <polacek@redhat.com>
3501
3502 PR c/68320
3503 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3504
277fe616
DM
35052015-11-13 David Malcolm <dmalcolm@redhat.com>
3506
3507 * c-typeck.c: Include spellcheck.h.
3508 (lookup_field_fuzzy_find_candidates): New function.
3509 (lookup_field_fuzzy): New function.
3510 (build_component_ref): If the field was not found, try using
3511 lookup_field_fuzzy and potentially offer a suggestion.
3512
6e232ba4
JN
35132015-11-12 James Norris <jnorris@codesourcery.com>
3514 Joseph Myers <joseph@codesourcery.com>
3515
3516 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3517 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3518 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3519 and PRAGMA_OMP_CLAUSE_LINK.
3520 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3521 and PRAGMA_OACC_CLAUSE_LINK.
3522 (OACC_DECLARE_CLAUSE_MASK): New definition.
3523 (c_parser_oacc_declare): New function.
3524
9be4f715
MP
35252015-11-12 Marek Polacek <polacek@redhat.com>
3526
3527 PR c/67784
3528 * c-parser.c (c_parser_for_statement): Reclassify the token in
3529 a correct scope.
3530
e78bede6
MP
35312015-11-11 Marek Polacek <polacek@redhat.com>
3532
3533 PR c/68107
3534 PR c++/68266
3535 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3536 checking the size of an array.
3537
69f293c9
AM
35382015-11-11 Andrew MacLeod <amacleod@redhat.com>
3539
3540 * c-array-notation.c: Remove unused header files.
3541 * c-aux-info.c: Likewise.
3542 * c-convert.c: Likewise.
3543 * c-decl.c: Likewise.
3544 * c-errors.c: Likewise.
3545 * c-lang.c: Likewise.
3546 * c-objc-common.c: Likewise.
3547 * c-parser.c: Likewise.
3548 * c-typeck.c: Likewise.
3549 * gccspec.c: Likewise.
3550
3a40d81d
NS
35512015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3552 Cesar Philippidis <cesar@codesourcery.com>
3553 James Norris <jnorris@codesourcery.com>
3554 Julian Brown <julian@codesourcery.com>
3555 Nathan Sidwell <nathan@codesourcery.com>
3556
3a40d81d
NS
3557 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3558 routine arg.
3559 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3560 (c_parser_pragma): Parse 'acc routine'.
3561 (OACC_ROUTINE_CLAUSE_MARK): Define.
3562 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3563
fc402eec
AA
35642015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3565
3566 PR debug/67192
3567 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3568 location of the backward-goto to the start of the loop body.
3569
f6b0b3db
AA
35702015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3571
3572 PR debug/67192
3573 * c-parser.c (c_parser_while_statement): Finish the loop before
3574 parsing ahead for misleading indentation.
3575 (c_parser_for_statement): Likewise.
3576
ee45a32d
EB
35772015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3578
3579 * c-decl.c (finish_struct): If the structure has reverse storage
3580 order, rewrite the type of array fields with scalar component. Call
3581 maybe_apply_pragma_scalar_storage_order on entry.
3582 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3583 errors on bit-fields and reverse SSO here and not...
3584 (c_mark_addressable): ...here.
3585 (output_init_element): Adjust call to initializer_constant_valid_p.
3586 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3587
8a645150
DM
35882015-11-06 David Malcolm <dmalcolm@redhat.com>
3589
3590 * c-decl.c (warn_defaults_to): Update for change in signature
3591 of diagnostic_set_info.
3592 * c-errors.c (pedwarn_c99): Likewise.
3593 (pedwarn_c90): Likewise.
3594 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3595 for textinfo::set_location.
3596
7a5e4956
CP
35972015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3598 Thomas Schwinge <thomas@codesourcery.com>
3599 James Norris <jnorris@codesourcery.com>
3600
3601 * c-parser.c (c_parser_omp_clause_name): Add support for
3602 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3603 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3604 default(none) in OpenACC.
3605 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3606 arguments.
3607 (c_parser_oacc_clause_tile): New function.
3608 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3609 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3610 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3611 TILE}.
3612 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3613 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3614 FIRSTPRIVATE}.
3615 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3616 (c_parser_oacc_update): Update the error message for missing clauses.
3617 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3618 and OMP_CLAUSE_INDEPENDENT.
3619
bfcfbfa0
MP
36202015-11-05 Marek Polacek <polacek@redhat.com>
3621
3622 PR c/68090
3623 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3624 deal with pre-evaluation on invalid types.
3625
e01d41e5
JJ
36262015-11-05 Jakub Jelinek <jakub@redhat.com>
3627 Ilya Verbin <ilya.verbin@intel.com>
3628
3629 * c-parser.c: Include context.h and gimple-expr.h.
3630 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3631 monotonic together with nonmonotonic.
3632 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3633 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3634 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3635 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3636 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3637 expressions on combined target teams before the target.
3638 (c_parser_omp_declare_target): If decl has "omp declare target" or
3639 "omp declare target link" attribute, and cgraph or varpool node already
3640 exists, then set corresponding flags. Call c_finish_omp_clauses
3641 in the parenthesized extended-list syntax case.
3642 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3643 declare target.
3644 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3645 on OMP_CLAUSE_REDUCTION array sections.
3646 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3647 into the constant offset, or for variable low-bound using
3648 POINTER_PLUS_EXPR. For structure element based array sections use
3649 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3650 (c_finish_omp_clauses): Drop generic_field_head, structure
3651 elements are now always mapped even as array section bases,
3652 diagnose same var in data sharing and mapping clauses. Diagnose if
3653 linear step on declare simd is neither a constant nor a uniform
3654 parameter. Look through POINTER_PLUS_EXPR for array section
3655 reductions. Diagnose the same var or function appearing multiple
3656 times on the same directive. Fix up wording for the to clause if t
3657 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3658 modifier on kinds other than dynamic or guided or nonmonotonic
3659 modifier together with ordered clause.
3660
4bf9e5a8
TS
36612015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3662 Chung-Lin Tang <cltang@codesourcery.com>
3663
3664 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3665
2adfab87
AM
36662015-10-29 Andrew MacLeod <amacleod@redhat.com>
3667
3668 * c-array-notation.c: Reorder #include's and remove duplicates.
3669 * c-aux-info.c: Likewise.
3670 * c-convert.c: Likewise.
3671 * c-decl.c: Likewise.
3672 * c-errors.c: Likewise.
3673 * c-lang.c: Likewise.
3674 * c-objc-common.c: Likewise.
3675 * c-parser.c: Likewise.
3676 * c-typeck.c: Likewise.
3677
e922069e
JW
36782015-10-26 Jim Wilson <jim.wilson@linaro.org>
3679
3680 PR debug/66068
3681 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3682 after calling build_qualified_type.
3683
765dd391
CP
36842015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3685 Thomas Schwinge <thomas@codesourcery.com>
3686 James Norris <jnorris@codesourcery.com>
3687 Joseph Myers <joseph@codesourcery.com>
3688 Julian Brown <julian@codesourcery.com>
3689 Bernd Schmidt <bschmidt@redhat.com>
3690
3691 * c-parser.c (c_parser_oacc_shape_clause): New.
3692 (c_parser_oacc_simple_clause): New.
3693 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3694 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3695
88bae6f4
TS
36962015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3697 James Norris <jnorris@codesourcery.com>
3698 Cesar Philippidis <cesar@codesourcery.com>
3699
3700 PR c/64765
3701 PR c/64880
3702 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3703 parameters, and handle these. Adjust all users.
3704 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3705 into...
3706 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3707 all users.
3708 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3709 declare functions.
3710 (c_finish_omp_construct): Declare function.
3711 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3712 Merge functions into...
3713 (c_finish_omp_construct): ... this new function.
3714
a8fc2579
RB
37152015-10-22 Richard Biener <rguenther@suse.de>
3716
3717 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3718 before folding a MINUS_EXPR.
3719
e9122ef6
MP
37202015-10-21 Marek Polacek <polacek@redhat.com>
3721
3722 PR c/68024
3723 * c-decl.c (start_function): Warn about vararg functions without
3724 a prototype.
3725
9f47c7e5
IE
37262015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3727
3728 * c-typeck.c (build_conditional_expr): Use boolean vector
3729 type for vector comparison.
3730 (build_vec_cmp): New.
3731 (build_binary_op): Use build_vec_cmp for comparison.
3732
fa60eeb9
MP
37332015-10-20 Marek Polacek <polacek@redhat.com>
3734
3735 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3736
2c7020eb
MP
37372015-10-20 Marek Polacek <polacek@redhat.com>
3738
3739 PR c/67964
3740 * c-parser.c (c_parser_attributes): Break out of the loop if the
3741 token after an attribute isn't a comma.
3742
d9a6bd32
JJ
37432015-10-13 Jakub Jelinek <jakub@redhat.com>
3744 Aldy Hernandez <aldyh@redhat.com>
3745
3746 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3747 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3748 (c_parser_omp_variable_list): Handle structure elements for
3749 map, to and from clauses. Handle array sections in reduction
3750 clause. Formatting fixes.
3751 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3752 if clause modifiers.
3753 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3754 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3755 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3756 c_parser_omp_clause_is_device_ptr): New functions.
3757 (c_parser_omp_clause_ordered): Parse optional parameter.
3758 (c_parser_omp_clause_reduction): Handle array reductions.
3759 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3760 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3761 functions.
3762 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3763 (c_parser_omp_clause_depend_sink): New function.
3764 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3765 (c_parser_omp_clause_map): Parse release/delete map kinds and
3766 optional always modifier.
3767 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3768 and c_finish_omp_clauses callers.
3769 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3770 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3771 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3772 (OMP_CRITICAL_CLAUSE_MASK): Define.
3773 (c_parser_omp_critical): Parse critical clauses.
3774 (c_parser_omp_for_loop): Handle doacross loops, adjust
3775 c_finish_omp_for and c_finish_omp_clauses callers.
3776 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3777 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3778 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3779 (c_parser_omp_for): Disallow ordered clause when combined with
3780 distribute. Disallow linear clause when combined with distribute
3781 and not combined with simd.
3782 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3783 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3784 parse clauses and if depend clause is found, don't parse a body.
3785 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3786 Allow target parallel without for after it.
3787 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3788 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3789 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3790 invalid kinds.
3791 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3792 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3793 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3794 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3795 functions.
3796 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3797 defaultmap and is_device_ptr clauses.
3798 (c_parser_omp_target): Parse target parallel and target simd. Set
3799 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3800 and target exit data. Diagnose invalid map kinds.
3801 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3802 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3803 construct.
3804 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3805 &omp_priv.
3806 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3807 (c_parser_omp_taskloop): New function.
3808 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3809 handle PRAGMA_OMP_TASKLOOP.
3810 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3811 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3812 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3813 Add IS_OMP argument, handle structure element bases, diagnose
3814 bitfields, pass IS_OMP recursively, diagnose known zero length
3815 array sections in depend clauses, handle array sections in reduction
3816 clause, diagnose negative length even for pointers.
3817 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3818 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3819 array sections in reduction clause, set
3820 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3821 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3822 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3823 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3824
21ba0cea
MP
38252015-10-06 Marek Polacek <polacek@redhat.com>
3826
3827 * c-parser.c (c_parser_statement_after_labels): Use
3828 protected_set_expr_location.
3829 (c_parser_omp_clause_num_gangs): Likewise.
3830 (c_parser_omp_clause_num_threads): Likewise.
3831 (c_parser_omp_clause_num_workers): Likewise.
3832 (c_parser_omp_clause_vector_length): Likewise.
3833 (c_parser_omp_clause_num_teams): Likewise.
3834 (c_parser_omp_clause_thread_limit): Likewise.
3835 * c-typeck.c (build_c_cast): Likewise.
3836 (c_cast_expr): Likewise.
3837
624d31fe
RS
38382015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3839
3840 * c-typeck.c (c_tree_equal): Use real_equal instead of
3841 REAL_VALUES_EQUAL.
3842
b8fd7909
JM
38432015-10-04 Jason Merrill <jason@redhat.com>
3844
3845 * c-parser.c (c_lex_one_token): Handle @synchronized.
3846 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3847 can change whether the function is transaction_safe.
3848
1c7485af
MP
38492015-10-02 Marek Polacek <polacek@redhat.com>
3850
3851 PR c/67730
3852 * c-typeck.c (convert_for_assignment): Use the expansion point
3853 location throughout.
3854
3e3b8d63
MP
38552015-10-02 Marek Polacek <polacek@redhat.com>
3856
3857 PR c/64249
3858 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3859 and pass it down to c_parser_if_statement.
3860 (c_parser_else_body): Add CHAIN parameter and pass it down to
3861 c_parser_statement_after_labels.
3862 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3863 duplicated if-else-if conditions.
3864
aabef2de
MP
38652015-10-01 Marek Polacek <polacek@redhat.com>
3866
3867 * c-typeck.c (convert_for_assignment): Improve commentary.
3868
de8ddd5f
MP
38692015-09-30 Marek Polacek <polacek@redhat.com>
3870
3871 PR c/67730
3872 * c-typeck.c (c_finish_return): Use the expansion point location for
3873 certain "return with value" warnings.
3874
c4914de6
MLI
38752015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3876
3877 * c-parser.c (pragma_lex): Add loc argument.
3878
0e36f5c7
MP
38792015-09-15 Marek Polacek <polacek@redhat.com>
3880
3881 PR c/67580
3882 * c-decl.c (tag_exists_p): New function.
3883 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3884 struct/union/enum keywords are missing.
3885 * c-tree.h (tag_exists_p): Declare.
3886
2f3bb934
MP
38872015-09-15 Marek Polacek <polacek@redhat.com>
3888
3889 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3890 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3891 Return NULL_TREE instead of 0.
3892 (lookup_name): Return NULL_TREE instead of 0.
3893 (lookup_name_in_scope): Likewise.
3894 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3895 (parser_xref_tag): Use false instead of 0.
3896 (start_struct): Use true instead of 1.
3897 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3898
aa256c4a
MP
38992015-09-14 Marek Polacek <polacek@redhat.com>
3900
3901 * c-typeck.c (set_nonincremental_init_from_string): Use
3902 HOST_WIDE_INT_M1U when shifting a negative value.
3903
dbb68221
MW
39042015-09-09 Mark Wielaard <mjw@redhat.com>
3905
3906 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3907 parm against NULL.
3908
a8a098ac
JJ
39092015-09-10 Jakub Jelinek <jakub@redhat.com>
3910
3911 PR c/67502
3912 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3913 into OMP_FOR_PRE_BODY rather than before the loop.
3914
f4b189d5
JJ
39152015-09-09 Jakub Jelinek <jakub@redhat.com>
3916
0bb99c11
JJ
3917 PR c/67501
3918 * c-parser.c (c_parser_oacc_all_clauses,
3919 c_parser_omp_all_clauses): Remove invalid clause from
3920 list of clauses even if parser->error is set.
3921
fce5e5e3
JJ
3922 PR c/67500
3923 * c-parser.c (c_parser_omp_clause_aligned,
3924 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3925 test for errors.
3926 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3927 error_mark_node.
3928
f4b189d5
JJ
3929 PR c/67495
3930 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3931 instead of c_parser_unary_expression. If the result is !lvalue_p,
3932 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3933
b2aaf235
MP
39342015-09-04 Marek Polacek <polacek@redhat.com>
3935
3936 PR sanitizer/67279
3937 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3938
1807ffc1
MS
39392015-09-03 Martin Sebor <msebor@redhat.com>
3940
3941 PR c/66516
8b652e65
JJ
3942 * c-typeck.c (convert_arguments, parser_build_unary_op,
3943 build_conditional_expr, c_cast_expr, convert_for_assignment,
3944 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
3945 reject_gcc_builtin.
3946 (c_decl_implicit): Define.
3947
d04ff417
MP
39482015-09-02 Marek Polacek <polacek@redhat.com>
3949
3950 PR c/67432
3951 * c-parser.c (c_parser_enum_specifier): Give a better error for
3952 an empty enum.
3953
a79683d5
TS
39542015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3955
3956 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3957
191a6b94
MP
39582015-08-12 Marek Polacek <polacek@redhat.com>
3959
3960 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3961 LOC to it.
3962
420a9d9b
MP
39632015-08-03 Marek Polacek <polacek@redhat.com>
3964
3965 PR c/67088
3966 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3967 Use it.
3968 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3969
992118a1
PP
39702015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3971
3972 * c-parser.c (c_parser_if_body): Take token_indent_info
3973 argument. Call warn_for_misleading_indentation even when the
3974 body is a semicolon. Extract token_indent_infos corresponding
3975 to the guard, body and next tokens. Adjust call to
3976 warn_for_misleading_indentation accordingly.
3977 (c_parser_else_body): Likewise.
3978 (c_parser_if_statement): Likewise.
3979 (c_parser_while_statement): Likewise.
3980 (c_parser_for_statement): Likewise.
3981
46308474
LFSM
39822015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3983 Manuel López-Ibáñez <manu@gcc.gnu.org>
3984
3985 * c-decl.c (get_parm_info): Remove static var. Update warning
3986 message.
3987
05b28fd6
MP
39882015-07-27 Marek Polacek <polacek@redhat.com>
3989
3990 PR c++/66555
3991 PR c/54979
3992 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3993
451b5e48
MP
39942015-07-20 Marek Polacek <polacek@redhat.com>
3995
3996 PR c++/55095
3997 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3998 (build_binary_op): Warn about left shift overflows.
3999
1916bcb5
AM
40002015-07-09 Andrew MacLeod <amacleod@redhat.com>
4001
4002 * c-array-notation.c: Adjust includes for flags.h changes.
4003 * c-objc-common.c: Likewise.
4004
c7131fb2
AM
40052015-07-07 Andrew MacLeod <amacleod@redhat.com>
4006
4007 * c-array-notation.c: Adjust includes.
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
da2e71c9
MLI
40172015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4018
4019 PR fortran/66605
4020 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4021
b155cfd9
MP
40222015-06-29 Marek Polacek <polacek@redhat.com>
4023
4024 PR c/66322
4025 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4026 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4027 about -Wswitch-bool here.
4028 (do_case): Update c_add_case_label call.
4029 (c_finish_case): Update c_do_switch_warnings call.
4030
31521951
MP
40312015-06-27 Marek Polacek <polacek@redhat.com>
4032
4033 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4034
22d03525
MP
40352015-06-26 Marek Polacek <polacek@redhat.com>
4036
4037 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4038 INDIRECT_REF_P.
4039 * c-typeck.c (array_to_pointer_conversion): Likewise.
4040 (build_unary_op): Likewise.
4041 (c_finish_return): Likewise.
4042
f0889939
AM
40432015-06-25 Andrew MacLeod <amacleod@redhat.com>
4044
4045 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4046 * c-parser.c: Likewise.
4047
8d67ee55
RS
40482015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4049
4050 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4051 instead of pointer_hash.
4052 (detect_field_duplicates): Likewise.
4053
0ae9bd27
MP
40542015-06-25 Marek Polacek <polacek@redhat.com>
4055
4056 * c-array-notation.c: Use VAR_P throughout.
4057 * c-decl.c: Likewise.
4058 * c-objc-common.c: Likewise.
4059 * c-parser.c: Likewise.
4060 * c-typeck.c: Likewise.
4061
62f9079a
MP
40622015-06-25 Marek Polacek <polacek@redhat.com>
4063
4064 * c-decl.c: Use is_global_var throughout.
4065 * c-parser.c: Likewise.
4066 * c-typeck.c: Likewise.
4067
abb226c9
AM
40682015-06-17 Andrew MacLeod <amacleod@redhat.com>
4069
4070 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4071 * c-aux-info.c: Likewise.
4072 * c-convert.c: Likewise.
4073 * c-decl.c: Likewise.
4074 * c-errors.c: Likewise.
4075 * c-lang.c: Likewise.
4076 * c-objc-common.c: Likewise.
4077 * c-parser.c: Likewise.
4078 * c-typeck.c: Likewise.
4079
8cbababc
JH
40802015-06-11 Jan Hubicka <hubicka@ucw.cz>
4081
4082 PR middle-end/66325
4083 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4084 variants.
4085
a0349665
PMR
40862015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4087
4088 * c-decl.c (pop_scope): Register the main translation unit
4089 through the new debug hook.
4090
13fdf2e2
AM
40912015-06-08 Andrew MacLeod <amacleod@redhat.com>
4092
4093 * c-array-notation.c : Adjust include files.
4094 * c-aux-info.c : Likewise.
4095 * c-convert.c : Likewise.
4096 * c-decl.c : Likewise.
4097 * c-errors.c : Likewise.
4098 * c-lang.c : Likewise.
4099 * c-lang.h : Likewise.
4100 * c-objc-common.c : Likewise.
4101 * c-parser.c : Likewise.
4102 * c-typeck.c : Likewise.
4103
d7438551
AH
41042015-06-05 Aldy Hernandez <aldyh@redhat.com>
4105
4106 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4107 immediately clobber it.
4108 (c_write_global_declarations_1): Remove call to
4109 check_global_declaration_1.
4110 (c_write_global_declarations_2): Remove.
4111 (c_write_final_cleanups): Rename from c_write_global_declarations.
4112 Remove call to finalize_compilation_unit.
4113 Remove calls to debugging hooks.
4114 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4115 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4116 * c-tree.h: Remove c_write_global_declarations.
4117
ecb9f223
AM
41182015-06-04 Andrew MacLeod <amacleod@redhat.com>
4119
4120 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4121 * c-aux-info.c: Likewise.
4122 * c-convert.c: Likewise.
4123 * c-decl.c: Likewise.
4124 * c-errors.c: Likewise.
4125 * c-lang.c: Likewise.
4126 * c-objc-common.c: Likewise.
4127 * c-parser.c: Likewise.
4128 * c-typeck.c: Likewise.
4129
9482b620
MP
41302015-06-04 Marek Polacek <polacek@redhat.com>
4131
4132 PR c/66341
4133 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4134 it is a lvalue.
4135
bc51ace3
PK
41362015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4137
4138 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4139 Warn for empty struct.
4140 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4141
ea5b45b6
AT
41422015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4143
4144 * c-decl.c (start_function): Call plugin before parsing.
4145 (finish_function): Call plugin after parsing.
4146
c2d47482
PK
41472015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4148
4149 PR c/49551
4150 * c-decl.c (merge_decls): Merge DECL_COMMON.
4151
a95492ab
JW
41522015-05-22 Jim Wilson <jim.wilson@linaro.org>
4153
4154 * Make-lang.in (check_gcc_pallelize): Define.
4155
fd5c817a
MP
41562015-05-22 Marek Polacek <polacek@redhat.com>
4157
4158 PR c/47043
4159 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4160 attributes.
4161
c7b70a3c
MP
41622015-05-21 Marek Polacek <polacek@redhat.com>
4163
4164 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4165 DECL_BUILT_IN.
4166
21b634ae
MP
41672015-05-20 Marek Polacek <polacek@redhat.com>
4168
4169 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4170 * c-typeck.c: Likewise.
4171
296a8c2f
MP
41722015-05-19 Marek Polacek <polacek@redhat.com>
4173
4174 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4175
41b37d5e
JJ
41762015-05-19 Jakub Jelinek <jakub@redhat.com>
4177
4178 PR middle-end/66199
4179 * c-parser.c (c_parser_omp_for_loop): Don't add
4180 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4181 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4182 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4183 constructs.
4184
fab27f52
MM
41852015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4186
4187 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4188 swaps.
fab27f52 4189
40de31cf
MLI
41902015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4191
4192 PR fortran/44054
4193 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4194 accessor function.
4195
3aa3c9fc
MP
41962015-05-14 Marek Polacek <polacek@redhat.com>
4197
4198 PR c/66066
4199 PR c/66127
4200 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4201 rather than with 0.
4202
c3388e62
DM
42032015-05-12 David Malcolm <dmalcolm@redhat.com>
4204
4205 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4206 to add a call to warn_for_misleading_indentation.
4207 (c_parser_else_body): Likewise, adding param "else_loc".
4208 (c_parser_if_statement): Check for misleading indentation.
4209 (c_parser_while_statement): Likewise.
4210 (c_parser_for_statement): Likewise.
4211
755e528f
MP
42122015-05-08 Marek Polacek <polacek@redhat.com>
4213
4214 PR c/64918
4215 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4216 (output_init_element): Likewise.
4217
0173bd2a
MP
42182015-05-07 Marek Polacek <polacek@redhat.com>
4219
4220 PR c/65179
4221 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4222 value.
4223
9babc352
MP
42242015-04-30 Marek Polacek <polacek@redhat.com>
4225
4226 * c-typeck.c (set_init_label): Call error_at instead of error and
4227 pass LOC to it.
4228
ac9f18db
MP
4229 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4230 the type of a decl.
4231
ec3fba51
MP
4232 * c-typeck.c (c_build_va_arg): Clarify the error message.
4233
b811915d
TS
42342015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4235
4236 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4237 OMP_STANDALONE_CLAUSES.
4238
f3075008
MP
42392015-04-28 Marek Polacek <polacek@redhat.com>
4240
4241 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4242
4e81b788
MP
42432015-04-28 Marek Polacek <polacek@redhat.com>
4244
4245 PR c/65901
4246 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4247
6c1db78e
MP
42482015-04-25 Marek Polacek <polacek@redhat.com>
4249
4250 PR c/52085
4251 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4252 attribute.
4253
5c4abbb8
MP
42542015-04-23 Marek Polacek <polacek@redhat.com>
4255
4256 PR c/65345
4257 * c-decl.c (set_labels_context_r): New function.
4258 (store_parm_decls): Call it via walk_tree_without_duplicates.
4259 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4260 instead of create_tmp_var. Build TARGET_EXPR instead of
4261 COMPOUND_EXPR.
4262 (build_atomic_assign): Use create_tmp_var_raw instead of
4263 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4264
06aca1d5
IV
42652015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4266
4267 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4268 (c_parser_omp_target_update): Add missed %> to error_at ().
4269
8fba1830
BRF
42702015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4271
4272 PR target/55143
4273 * c-decl.c (c_default_pointer_mode): Remove definition.
4274 * c-tree.h (c_default_pointer_mode): Remove declaration.
4275
62021f64
TB
42762015-03-27 Tobias Burnus <burnus@net-b.de>
4277
4278 PR c/65586
4279 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4280 error out.
4281 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4282 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4283 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4284
9b65e171
JJ
42852015-03-19 Jakub Jelinek <jakub@redhat.com>
4286
4287 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4288 attribute for DECL_EXTERNAL VAR_DECLs.
4289
17958621
JJ
42902015-03-11 Jakub Jelinek <jakub@redhat.com>
4291
4292 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4293 argument.
4294
7ccb1a11
JJ
42952015-03-10 Jakub Jelinek <jakub@redhat.com>
4296
4297 PR c/65120
4298 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4299 before preparing arguments to warn_logical_not_parentheses.
4300
01177669
JJ
43012015-03-09 Jakub Jelinek <jakub@redhat.com>
4302
4303 PR c/65120
4304 * c-typeck.c (parser_build_binary_op): Don't warn for
4305 !!x == y or !b == y where b is _Bool.
4306
802ac282
MP
43072015-03-09 Marek Polacek <polacek@redhat.com>
4308
4309 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4310 * c-decl.c (grokdeclarator): Likewise.
4311 * c-typeck.c (build_binary_op): Likewise.
4312
e5165b60
MP
43132015-02-27 Marek Polacek <polacek@redhat.com>
4314
4315 PR c/65228
4316 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4317
065d214c
MP
43182015-02-14 Marek Polacek <polacek@redhat.com>
4319
4320 PR c/64768
4321 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4322 declared through a typedef name.
4323
e5d9235b
MP
43242015-02-13 Marek Polacek <polacek@redhat.com>
4325
4326 PR c/65050
4327 * c-decl.c (grokdeclarator): Print also the type when giving
4328 the error message about array's incomplete element type.
4329
fa01ffcc
JJ
43302015-02-11 Jakub Jelinek <jakub@redhat.com>
4331
4332 PR c/64824
4333 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4334 check in the POP macro.
4335
c3e38a03
MP
43362015-02-09 Marek Polacek <polacek@redhat.com>
4337
4338 PR c/64856
4339 * c-typeck.c (process_init_element): Don't always wrap
4340 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4341 initializing a range of elements.
4342
4886ec8e
JJ
43432015-02-04 Jakub Jelinek <jakub@redhat.com>
4344
4345 PR c/64824
4346 PR c/64868
4347 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4348
c3e38a03 43492015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4350
4351 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4352 processing enum declaration.
4353
7b33f0c8
MP
43542015-01-29 Marek Polacek <polacek@redhat.com>
4355
4356 PR c/64709
4357 * c-typeck.c (pop_init_level): If constructor_elements has
4358 exactly one element with integer_zerop value, set constructor_zeroinit
4359 to 1. Remove braces around warning_init call.
4360
dea63e49
JJ
43612015-01-27 Jakub Jelinek <jakub@redhat.com>
4362
4363 PR c/64766
4364 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4365 of FUNCTION_DECLs with error_mark_node.
4366
d38f7dce
JJ
43672015-01-26 Jakub Jelinek <jakub@redhat.com>
4368
4369 PR c/64778
4370 * c-typeck.c (convert_arguments): Return -1 if there are
4371 error_args, even if we've diagnosed too many arguments.
4372
cbf5d0e7
RB
43732015-01-21 Richard Biener <rguenther@suse.de>
4374
4375 PR middle-end/64313
4376 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4377 for builtins the user declared correctly.
4378
41dbbb37
TS
43792015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4380 Bernd Schmidt <bernds@codesourcery.com>
4381 Cesar Philippidis <cesar@codesourcery.com>
4382 James Norris <jnorris@codesourcery.com>
4383 Jakub Jelinek <jakub@redhat.com>
4384 Ilmir Usmanov <i.usmanov@samsung.com>
4385
4386 * c-parser.c: Include "gomp-constants.h".
4387 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4388 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4389 Use OMP_CLAUSE_SET_MAP_KIND.
4390 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4391 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4392 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4393 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4394 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4395 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4396 "copyout", "create", "delete", "deviceptr", "gang", "host",
4397 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4398 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4399 "present_or_create", "pcreate", "seq", "self", "vector",
4400 "vector_length", "wait", "worker".
4401 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4402 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4403 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4404 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4405 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4406 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4407 (c_parser_oacc_data_clause_deviceptr)
4408 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4409 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4410 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4411 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4412 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4413 (c_parser_oacc_parallel, c_parser_oacc_update)
4414 (c_parser_oacc_wait): New functions.
4415 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4416 (c_finish_oacc_data): New prototypes.
4417 * c-typeck.c: Include "gomp-constants.h".
4418 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4419 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4420 OMP_CLAUSE_SET_MAP_KIND.
4421 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4422 (c_finish_oacc_data): New functions.
4423 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4424 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4425 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4426 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4427 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4428 GOMP_MAP_FORCE_DEVICEPTR.
4429
adfac8df
JJ
44302015-01-09 Michael Collison <michael.collison@linaro.org>
4431
4432 * c-array-notation.c: Include hash-set.h, machmode.h,
4433 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4434 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4435 * c-aux-info.c: Ditto.
4436 * c-convert.c: Ditto.
4437 * c-decl.c: Ditto.
4438 * c-errors.c: Ditto.
4439 * c-lang.c: Dittoxs.
4440 * c-objc-common.c: Ditto.
4441 * c-parser.c: Ditto.
4442 * c-typeck.c: Include hash-set.h, machmode.h,
4443 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4444 fold-const.h, wide-int.h, inchash.h, real.h and
4445 fixed-value.h due to flattening of tree.h.
4446
2cc901dc
MP
44472015-01-07 Marek Polacek <polacek@redhat.com>
4448
4449 PR c/64417
4450 * c-typeck.c (process_init_element): Disallow initialization of
4451 a flexible array member with a string constant if the structure
4452 is in an array.
4453
5624e564
JJ
44542015-01-05 Jakub Jelinek <jakub@redhat.com>
4455
e5341100
JJ
4456 PR sanitizer/64344
4457 * c-typeck.c (convert_for_assignment, c_finish_return): For
4458 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4459 types also set in_late_binary_op around convert call.
4460 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4461 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4462 result on expr as last argument to ubsan_instrument_float_cast,
4463 if in_late_binary_op, don't use c_save_expr but save_expr.
4464
5624e564
JJ
4465 Update copyright years.
4466
5bd012f8
MP
44672015-01-05 Marek Polacek <polacek@redhat.com>
4468
4469 PR c/64423
4470 * c-typeck.c (build_array_ref): Pass loc down to
4471 warn_array_subscript_with_type_char.
4472
3f8257db 44732014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4474
4475 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4476 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4477 element type.
8e745a17 4478 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4479 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4480 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4481 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4482 to PEDWARN_FOR_QUALIFIERS.
768952be 4483
8f94a8c4
JJ
44842014-12-17 Jakub Jelinek <jakub@redhat.com>
4485
4486 PR sanitizer/64289
4487 * c-convert.c: Include ubsan.h.
4488 (convert): For real -> integral casts and
4489 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4490 instead instrument the float cast directly.
4491
b731b390
JJ
44922014-11-29 Jakub Jelinek <jakub@redhat.com>
4493
4494 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4495 c_finish_stmt_expr): Remove NULL last argument from
4496 create_tmp_var_raw and create_tmp_var calls.
4497 * c-array-notation.c (fix_builtin_array_notation_fn,
4498 build_array_notation_expr, fix_conditional_array_notations_1,
4499 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4500
541e35a6
MP
45012014-11-28 Marek Polacek <polacek@redhat.com>
4502
4503 PR c/63862
4504 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4505 convert the right operand to integer type.
4506
b286be94
MP
45072014-11-25 Marek Polacek <polacek@redhat.com>
4508
4509 PR c/63877
4510 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4511 for inline functions.
4512
aa7da51a
JJ
45132014-11-21 Jakub Jelinek <jakub@redhat.com>
4514
4515 PR target/63764
4516 * c-typeck.c (build_array_ref): Adjust
4517 convert_vector_to_pointer_for_subscript caller. If it returns true,
4518 call non_lvalue_loc on the result.
4519
d876207f
RB
45202014-11-11 Richard Biener <rguenther@suse.de>
4521
4522 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4523 to true.
4524
e5e44252
AK
45252014-11-10 Andi Kleen <ak@linux.intel.com>
4526
4527 PR c/60804
4528 * c-parser.c (c_parser_statement_after_labels): Call
4529 check_no_cilk.
4530 (c_parser_if_statement): Dito.
4531 (c_parser_switch_statement): Dito.
4532 (c_parser_while_statement): Dito.
4533 (c_parser_do_statement): Dito.
4534 (c_parser_for_statement): Dito.
4535 * c-typeck.c (c_finish_loop): Dito.
4536
13c21655
PC
45372014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4538
4539 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4540 OPT_Wshift_count_overflow in the warnings.
4541
2d51fcef
MP
45422014-10-30 Marek Polacek <polacek@redhat.com>
4543
4544 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4545 print the stripped version as well, if they're not the same.
4546
ef4bddc2
RS
45472014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4548
4549 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4550 machine_mode.
4551
c582198b
AM
45522014-10-28 Andrew MacLeod <amacleod@redhat.com>
4553
4554 * c-decl.c: Adjust include files.
4555 * c-parser.c: Ditto.
4556
ddc8de03
PM
45572014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4558 Tom Tromey <tromey@redhat.com>
4559
4560 * c-tree.h (enum c_oracle_request): New.
4561 (c_binding_oracle_function): New typedef.
4562 (c_binding_oracle, c_pushtag, c_bind): Declare.
4563 * c-decl.c (c_binding_oracle): New global.
4564 (I_SYMBOL_CHECKED): New macro.
4565 (i_symbol_binding): New function.
4566 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4567 (I_TAG_CHECKED): New macro.
4568 (i_tag_binding): New function.
4569 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4570 (I_LABEL_CHECKED): New macro.
4571 (i_label_binding): New function.
4572 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4573 (c_print_identifier): Save and restore c_binding_oracle.
4574 (c_pushtag, c_bind): New functions.
4575
60393bbc
AM
45762014-10-27 Andrew MacLeod <amacleod@redhat.com>
4577
4578 * c-typeck.c: Adjust include files.
4579
d723bb7c
MLI
45802014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4581
4582 PR c++/53061
4583 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4584 initialization here...
4585 (c_initialize_diagnostics): ... but here. Set defaults after
4586 building pretty-printer.
4587
1bc5a451
MP
45882014-10-23 Marek Polacek <polacek@redhat.com>
4589
4590 PR c/63626
4591 * c-decl.c (pop_scope): Don't print warning in external_scope.
4592
4435bb92
MP
45932014-10-19 Marek Polacek <polacek@redhat.com>
4594
4595 PR c/63567
4596 * c-typeck.c (output_init_element): Allow initializing objects with
4597 static storage duration with compound literals even in C99 and add
4598 pedwarn for it.
4599
7278465e
MP
46002014-10-17 Marek Polacek <polacek@redhat.com>
4601
4602 PR c/63567
4603 * c-typeck.c (digest_init): Allow initializing objects with static
4604 storage duration with compound literals even in C99 and add pedwarn
4605 for it.
4606
d9b7be2e
MP
46072014-10-17 Marek Polacek <polacek@redhat.com>
4608
4609 PR c/63543
4610 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4611 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4612 error multiple times. Print the type.
4613
f406ae1f
MP
46142014-10-17 Marek Polacek <polacek@redhat.com>
4615
4616 PR c/63549
4617 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4618 type.
4619
92574c7c
MP
46202014-10-17 Marek Polacek <polacek@redhat.com>
4621
4622 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4623 (start_function): Use OPT_Wimplicit_int instead of 0.
4624 (store_parm_decls_oldstyle): Likewise.
4625
1bc4a978
MT
46262014-10-17 Alan Modra <amodra@gmail.com>
4627
4628 PR middle-end/61848
4629 * c-decl.c (merge_decls): Don't merge section name or tls model
4630 to newdecl symtab node, instead merge to olddecl. Override
4631 existing olddecl section name. Set tls_model for all thread-local
4632 vars, not just OMP thread-private ones. Remove incorrect comment.
4633
83685514
AM
46342014-10-16 Andrew MacLeod <amacleod@redhat.com>
4635
4636 * c-decl.c: Adjust include files.
4637
78a7c317
DD
46382014-10-14 DJ Delorie <dj@redhat.com>
4639
4640 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4641 (c_token_starts_typename): Check all __intN, not just __int128.
4642 (c_token_starts_declspecs): Likewise.
4643 (c_parser_declspecs): Likewise.
4644 (c_parser_attribute_any_word): Likewise.
4645 (c_parser_objc_selector): Likewise.
4646 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4647 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4648 is specified.
4649 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4650 __int128.
4651 (finish_declspecs): Likewise.
4652
74d98c1e
AB
46532014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4654
8e745a17 4655 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4656 the duplicate code.
8e745a17 4657 (c_parser_statement): Call the new function.
74d98c1e 4658
84937de2
MP
46592014-10-09 Marek Polacek <polacek@redhat.com>
4660
4661 PR c/63480
4662 * c-typeck.c (pop_init_level): Don't warn about initializing
4663 with { }.
4664
0382aaa0
MP
46652014-10-07 Marek Polacek <polacek@redhat.com>
4666
4667 PR c/59717
4668 * c-decl.c (header_for_builtin_fn): New function.
4669 (implicitly_declare): Suggest which header to include.
4670
7a0ca710
MP
46712014-10-07 Marek Polacek <polacek@redhat.com>
4672
4673 * c-convert.c (convert): Use error_operand_p.
4674 * c-typeck.c (require_complete_type): Likewise.
4675 (really_atomic_lvalue): Likewise.
4676 (digest_init): Likewise.
4677 (handle_omp_array_sections_1): Likewise.
4678
6bc8a126
MP
46792014-10-03 Marek Polacek <polacek@redhat.com>
4680
4681 PR c/63453
4682 * c-decl.c (pop_scope): Don't warn about "inline function declared
4683 but never defined" for functions marked with gnu_inline attribute.
4684
d90c0a59
JJ
46852014-09-25 Jakub Jelinek <jakub@redhat.com>
4686
4687 PR c++/63249
4688 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4689 on low_bound and length.
4690
083e891e
MP
46912014-09-24 Marek Polacek <polacek@redhat.com>
4692
4693 PR c/61405
4694 PR c/53874
4695 * c-parser.c: Don't define CPP_KEYWORD.
4696 (c_parser_switch_statement): Pass original type to c_finish_case.
4697 * c-tree.h (c_finish_case): Update declaration.
4698 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4699 conditionally to c_do_switch_warnings.
4700
8d95fe25
MP
47012014-09-03 Marek Polacek <polacek@redhat.com>
4702
4703 PR c/62024
4704 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4705 conversions.
4706
9a771876
JJ
47072014-09-02 Jakub Jelinek <jakub@redhat.com>
4708 Balaji V. Iyer <balaji.v.iyer@intel.com>
4709 Igor Zamyatin <igor.zamyatin@intel.com>
4710
4711 * c-parser.c (c_parser_cilk_for): New function.
4712 (c_parser_cilk_grainsize): Likewise.
4713 (c_get_temp_regvar): Likewise.
4714 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4715 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4716 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4717 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4718 case.
4719
b7679d96
CG
47202014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4721
4722 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4723 with using HOST_WIDE_INT without truncation to 'int'
4724
59ea0364
MP
47252014-08-22 Marek Polacek <polacek@redhat.com>
4726
4727 PR c++/62199
4728 * c-typeck.c (parser_build_binary_op): Adjust call to
4729 warn_logical_not_parentheses.
4730
671a475e
IZ
47312014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4732
4733 PR other/62008
4734 * c-parser.c (c_parser_array_notation): Check for correct
4735 type of an array added.
4736
04159acf
MP
47372014-08-19 Marek Polacek <polacek@redhat.com>
4738
4739 PR c++/62153
4740 * c-typeck.c (build_binary_op): If either operand of a comparison
4741 is a boolean expression, call maybe_warn_bool_compare.
4742
c77935ee
PP
47432014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4744
4745 PR c/45584
4746 * c-typeck.c (build_c_cast): Do a conversion even when the
4747 TYPE_MAIN_VARIANTs are the same.
4748
35aff4fb
MP
47492014-08-19 Marek Polacek <polacek@redhat.com>
4750
4751 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4752 pedwarn_c99 instead of pedwarn.
4753 (grokfield): Likewise.
4754 (warn_defaults_to): New function.
4755 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4756 Unconditionally call pedwarn_c99 instead of pedwarn.
4757 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4758 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4759 check flag_isoc11 before.
4760 * c-errors.c (pedwarn_c99): Change the return type to bool.
4761 Handle -Wc99-c11-compat.
4762 * c-parser.c (disable_extension_diagnostics): Handle
4763 warn_c99_c11_compat.
4764 (restore_extension_diagnostics): Likewise.
4765 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4766 instead of pedwarn, don't check flag_isoc11 before.
4767 (c_parser_declspecs): Likewise.
4768 (c_parser_alignas_specifier): Likewise.
4769 (c_parser_alignof_expression): Likewise.
4770 (c_parser_generic_selection): Likewise.
4771 * c-tree.h (pedwarn_c99): Update declaration.
4772 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4773 of pedwarn_c99.
4774
177cce46
MP
47752014-08-19 Marek Polacek <polacek@redhat.com>
4776
4777 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4778 to pedwarn_c90.
4779 * c-errors.c: Include "opts.h".
4780 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4781 * c-parser.c (disable_extension_diagnostics): Handle negative value
4782 of warn_c90_c99_compat, too.
4783 (restore_extension_diagnostics): Likewise.
4784 (c_parser_compound_statement_nostart): Pass
4785 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4786
6dc99c33
MP
47872014-08-12 Marek Polacek <polacek@redhat.com>
4788
4789 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4790 Add pedwarn.
4791 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4792 Likewise.
4793 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4794
3f8257db 47952014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4796
4797 PR c/51849
4798 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4799 Call pedwarn_c90 instead of pedwarn.
4800 (check_bitfield_type_and_width): Likewise.
4801 (declspecs_add_qual): Likewise.
4802 (declspecs_add_type): Likewise.
4803 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4804 Adjust to only call pedwarn_c90.
4805 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4806 pedwarn_c90 instead of pedwarn.
4807 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4808 * c-parser.c (disable_extension_diagnostics): Handle
4809 warn_c90_c99_compat.
4810 (restore_extension_diagnostics): Likewise.
4811 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4812 pedwarn_c90 instead of pedwarn.
4813 (c_parser_initelt): Likewise.
4814 (c_parser_postfix_expression): Likewise.
4815 (c_parser_postfix_expression_after_paren_type): Likewise.
4816 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4817 * c-tree.h: Fix formatting.
4818 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4819 pedwarn_c90 instead of pedwarn.
4820
9f25a338
TS
48212014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4822
4823 * c-typeck.c: Remove include of pointer-set.h.
4824
044331a8
MP
48252014-08-07 Marek Polacek <polacek@redhat.com>
4826
4827 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4828
b787e7a2
TS
48292014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4830
4831 * c-typeck.c: Use hash_map instead of pointer_map.
4832
6e2830c3
TS
48332014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4834
4835 * c-decl.c: Use hash_set instead of pointer_set.
4836
a7ee52fb
IZ
48372014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4838
4839 PR middle-end/61455
4840 * c-array-notation.c (expand_array_notations): Handling
4841 of DECL_EXPR added.
4842
b4dfdc11
MG
48432014-07-31 Marc Glisse <marc.glisse@inria.fr>
4844
4845 PR c++/60517
4846 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4847 a local variable.
4848
976d5a22
TT
48492014-07-30 Tom Tromey <tromey@redhat.com>
4850
4851 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4852 field.
4853 (really_start_incremental_init, push_init_level): Initialize
4854 designator_depth.
4855 (pop_init_level): Set global designator_depth.
4856 (process_init_element): Check for designated_init attribute.
4857
30281de2
MP
48582014-07-20 Marek Polacek <polacek@redhat.com>
4859
4860 PR c/61852
4861 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4862 (implicitly_declare): Pass location to implicit_decl_warning.
4863
b108f48f
JJ
48642014-07-14 Jakub Jelinek <jakub@redhat.com>
4865
4866 PR middle-end/61294
4867 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4868 If non-NULL, call c_parser_check_literal_zero.
4869 (c_parser_check_literal_zero): New function.
4870 (c_parser_postfix_expression_after_primary): Adjust
4871 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4872
773ec47f
MP
48732014-07-06 Marek Polacek <polacek@redhat.com>
4874
4875 PR c/6940
4876 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4877 * c-tree.h (C_ARRAY_PARAMETER): Define.
4878 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4879 function parameter.
4880
22e1cf1c 48812014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4882 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4883
4884 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4885 releasing symbol.
4886
52ec0ea3
MP
48872014-07-01 Marek Polacek <polacek@redhat.com>
4888
4889 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4890 instead of 0 to WARN_FOR_ASSIGNMENT.
4891
d5c3d343
MP
48922014-07-01 Marek Polacek <polacek@redhat.com>
4893
4894 PR c/58286
4895 * c-typeck.c (convert_for_assignment): Pass
4896 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4897
6a7253a4
MP
48982014-06-30 Marek Polacek <polacek@redhat.com>
4899
4900 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4901 has no_sanitize_undefined attribute.
4902
5e88a8f4
IZ
49032014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4904
4905 PR middle-end/57541
4906 * c-array-notation.c (fix_builtin_array_notation_fn):
4907 Check for 0 arguments in builtin call. Check that bultin argument is
4908 correct.
4909 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4910 index.
4911
9698b078
SH
49122014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4913
4914 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4915 qualifiers in __auto_type for atomic types.
4916 (c_parser_typeof_specifier): Discard all type qualifiers in
4917 __typeof__ for atomic types.
4918
6e07c515
MP
49192014-06-25 Marek Polacek <polacek@redhat.com>
4920
4921 PR c/61162
4922 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4923 the return expression to c_finish_return.
4924
da6f124d
JJ
49252014-06-25 Jakub Jelinek <jakub@redhat.com>
4926
4927 * c-typeck.c (c_finish_omp_clauses): Make sure
4928 OMP_CLAUSE_LINEAR_STEP has correct type.
4929
c203e8a7
TS
49302014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4931
4932 * c-decl.c: Adjust.
4933
56ad0e38
JJ
49342014-06-24 Jakub Jelinek <jakub@redhat.com>
4935
4936 * c-parser.c (c_parser_omp_for_loop): For
4937 #pragma omp parallel for simd move lastprivate clause from parallel
4938 to for rather than simd.
4939
47c2554f
MP
49402014-06-23 Marek Polacek <polacek@redhat.com>
4941
4942 * c-typeck.c (parser_build_binary_op): Don't call
4943 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4944
56363ffd
JH
49452014-06-15 Jan Hubicka <hubicka@ucw.cz>
4946
4947 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4948 * c-decl.c (merge_decls): Likewise.
4949
d7ff7ae5
MP
49502014-06-09 Marek Polacek <polacek@redhat.com>
4951
4952 PR c/36446
4953 * c-typeck.c (error_init): Call inform instead of error_at.
4954 (pedwarn_init): Call inform instead of pedwarn.
4955 (warning_init): Call inform instead of warning_at.
4956
24d047a3
JH
49572014-06-07 Jan Hubicka <hubicka@ucw.cz>
4958
4959 * c-decl.c (merge_decls): Use set_decl_section_name.
4960 (duplicate_decls): Remove node if it exists.
4961
9bac5cbb
G
49622014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4963
4964 PR c/53119
4965 * c-typeck.c (push_init_level, process_init_element,
4966 pop_init_level): Correct check for zero initialization, move
4967 missing brace warning to respect zero initialization.
4968
8ffcdea8
MP
49692014-06-05 Marek Polacek <polacek@redhat.com>
4970
4971 PR c/56724
4972 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4973
742938c9
MP
49742014-06-05 Marek Polacek <polacek@redhat.com>
4975
4976 PR c/49706
4977 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 4978 on the left hand side operand of a comparison.
742938c9 4979
6447c55d
MP
49802014-06-05 Marek Polacek <polacek@redhat.com>
4981
4982 PR c/48062
4983 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4984 Print note only if the warning was printed.
4985
9dc7743c
IZ
49862014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4987
4988 PR c/58942
4989 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4990 with a pointer.
4991
fedfecef
MP
49922014-06-03 Marek Polacek <polacek@redhat.com>
4993
4994 PR c/60439
4995 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4996 c_start_case.
4997 * c-tree.h (c_start_case): Update.
4998 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4999 switch condition has boolean value.
5000
9b2b7279
AM
50012014-06-02 Andrew MacLeod <amacleod@redhat.com>
5002
5003 * c-decl.c: Include builtins.h.
5004 * c-parser.c: Likewise.
5005
5c1bc275
MP
50062014-05-27 Marek Polacek <polacek@redhat.com>
5007
5008 PR c/56724
5009 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5010 error and warning calls to error_at and warning_at. Pass location of
5011 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5012 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5013 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5014
97563bc8
IZ
50152014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5016
5017 PR c/61191
5018 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5019 function parameters.
5020
aede2c10
JH
50212014-05-23 Jan Hubicka <hubicka@ucw.cz>
5022
5023 * c-decl.c (merge_decls): Preserve symtab node pointers.
5024 (duplicate_decls): Free new decl.
5025
edbba2ce
TS
50262014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5027
f3316c6d
TS
5028 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5029 initialization.
5030
edbba2ce
TS
5031 * c-parser.c (c_parser_omp_target): Return bool values.
5032
68c81f24
TS
50332014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5034
5035 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5036 num_teams_loc variable to num_thread_limit_loc.
5037
632f2871
RS
50382014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5039
5040 * c-array-notation.c (expand_array_notations): Use void_node
5041 instead of void_zero_node.
5042
766090c2
TS
50432014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5044
5045 * c-decl.c (finish_struct): Adjust.
5046 (finish_enum): Likewise.
5047 (bind): Adjust.
5048 (record_inline_static): Likewise.
5049 (push_scope): Likewise.
5050 (make_label): Likewise.
5051 (lookup_label_for_goto): Likewise.
5052 (finish_struct): Likewise.
5053 (finish_enum): Likewise.
5054 (store_parm_decls): Likewise.
5055 (c_push_function_context): Likewise.
5056 * c-lang.h: Remove usage of variable_size gty attribute.
5057 * c-parser.c (c_parse_init): Adjust.
5058 (c_parse_file): Likewise.
5059
2b107f6b
MP
50602014-05-13 Marek Polacek <polacek@redhat.com>
5061
5062 PR c/61162
5063 * c-typeck.c (convert_for_assignment): Pass location to
5064 WARN_FOR_ASSIGNMENT instead of input_location.
5065
d033409e
MP
50662014-05-10 Marek Polacek <polacek@redhat.com>
5067
5068 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5069 maybe_warn_string_init.
5070 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5071 maybe_warn_string_init.
5072 * c-tree.h (maybe_warn_string_init): Update declaration.
5073 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5074 Call pedwarn_init with loc instead of with input_location.
5075 (digest_init): Pass init_loc to maybe_warn_string_init.
5076 (pop_init_level): Call pedwarn_init with loc instead of with
5077 input_location.
5078 (set_init_index): Likewise.
5079 (process_init_element): Likewise.
5080
ea58ef42
MP
50812014-05-09 Marek Polacek <polacek@redhat.com>
5082
5083 PR c/61096
5084 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5085 (c_parser_initelt): Pass location to set_init_label. Pass array index
5086 location to set_init_index.
5087 * c-tree.h (push_init_level): Update declaration.
5088 (pop_init_level): Likewise.
5089 (set_init_index): Likewise.
5090 (set_init_label): Likewise.
5091 * c-typeck.c (error_init): Add location parameter. Call error_at
5092 instead of error.
5093 (digest_init): Pass init_loc to error_init.
5094 (really_start_incremental_init):
5095 (push_init_level): Add location parameter. Pass loc to pop_init_level
5096 and error_init.
5097 (pop_init_level): Likewise.
5098 (set_designator): Add location parameter. Pass loc to pop_init_level,
5099 push_init_level, and error_init.
5100 (set_init_index): Add location parameter. Pass loc to error_init and
5101 set_designator.
5102 (set_init_label): Likewise.
5103 (output_init_element): Pass loc to error_init.
5104 (process_init_element): Pass loc to error_init, pop_init_level,
5105 pedwarn_init, and push_init_level.
5106
661a0813
MP
51072014-05-09 Marek Polacek <polacek@redhat.com>
5108
5109 PR c/50459
5110 * c-parser.c (c_parser_attributes): Parse the arguments as an
5111 expression-list if the attribute takes identifier.
5112
2793eeab
MP
51132014-05-08 Marek Polacek <polacek@redhat.com>
5114
5115 PR c/61053
5116 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5117 TYPE_ALIGN_UNIT.
5118
f827930a
MP
51192014-05-08 Marek Polacek <polacek@redhat.com>
5120
5121 PR c/61077
5122 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5123 of main.
5124
1d60af08
KZ
51252014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5126 Mike Stump <mikestump@comcast.net>
5127 Richard Sandiford <rdsandiford@googlemail.com>
5128
5129 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5130 (finish_enum): Use wide-int interfaces.
5131 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5132 * c-typeck.c (build_c_cast): Likewise.
5133 (set_nonincremental_init_from_string): Likewise.
5134 (c_tree_equal): Likewise.
5135
a0e24419
MP
51362014-05-02 Marek Polacek <polacek@redhat.com>
5137
5138 PR c/25801
5139 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5140 Return size_one_node when the type is not complete.
5141 (pointer_diff): Remove comment.
5142 (build_unary_op): Improve error messages.
5143
19fc9faa
MP
51442014-05-02 Marek Polacek <polacek@redhat.com>
5145
5146 * c-typeck.c (c_finish_return): Separate warning_at calls.
5147
63bc4e87
MP
51482014-05-02 Marek Polacek <polacek@redhat.com>
5149
5150 * c-tree.h (error_init): Remove declaration.
5151 (pedwarn_init): Likewise.
5152 * c-typeck.c (error_init): Make static and move above.
5153 (pedwarn_init): Likewise.
5154 (warning_init): Move above.
5155 (maybe_warn_string_init): Likewise.
5156
4bd2511b
JL
51572014-05-01 Jeff Law <law@redhat.com>
5158
5159 Revert:
5160
5161 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5162 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5163 avoid goto.
5164
6a358dcb
MP
51652014-05-02 Marek Polacek <polacek@redhat.com>
5166
5167 PR c/60784
5168 * c-typeck.c (push_init_level): Set constructor_designated to
5169 p->designated for structures.
5170
ae5ebda4
MP
51712014-05-01 Marek Polacek <polacek@redhat.com>
5172
5173 PR c/60915
5174 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5175 function-definition has an attribute after the declarator.
5176
96b40f8d
MP
51772014-05-01 Marek Polacek <polacek@redhat.com>
5178
5179 PR c/60257
5180 * c-typeck.c (warning_init): Add location_t parameter. Call
5181 warning_at instead of warning.
5182 (push_init_level): Pass input_location to warning_init.
5183 (add_pending_init): Add location_t parameter. Pass loc to
5184 warning_init.
5185 (set_nonincremental_init): Pass input_location to add_pending_init.
5186 (set_nonincremental_init_from_string): Likewise.
5187 (output_init_element): Pass loc to warning_init and to
5188 add_pending_init.
5189
32e00768
MP
51902014-05-01 Marek Polacek <polacek@redhat.com>
5191
5192 PR c/43395
5193 * c-typeck.c (c_finish_return): Distinguish between label and variable
5194 when warning about returning local address.
5195
c9379ce2
MP
51962014-05-01 Marek Polacek <polacek@redhat.com>
5197
5198 PR c/29467
5199 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5200 in C89 mode.
5201
d00887e8
MP
52022014-05-01 Marek Polacek <polacek@redhat.com>
5203
5204 PR c/43245
5205 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5206 instead of 0 to WARN_FOR_QUALIFIERS.
5207
5436fa2e
MP
52082014-05-01 Marek Polacek <polacek@redhat.com>
5209
5210 PR c/56989
5211 * c-typeck.c (default_conversion): Use better location for
5212 error call.
5213
f8ed5150
MP
52142014-04-30 Marek Polacek <polacek@redhat.com>
5215
5216 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5217 also when SANITIZE_FLOAT_DIVIDE is on.
5218
8337d1db
MP
52192014-04-30 Marek Polacek <polacek@redhat.com>
5220
5221 PR c/60139
5222 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5223 and pedwarn_init. Use loc insted of input_location.
5224
c4bdc42f
MP
52252014-04-30 Marek Polacek <polacek@redhat.com>
5226
5227 PR c/60351
5228 * c-typeck.c (build_binary_op): Use location when warning about
5229 shift count.
5230
45484dcf
MP
52312014-04-25 Marek Polacek <polacek@redhat.com>
5232
5233 PR c/18079
5234 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5235 always_inline/noinline and hot/cold attributes.
5236
34cf811f
MP
52372014-04-25 Marek Polacek <polacek@redhat.com>
5238
5239 PR c/60114
5240 * c-parser.c (c_parser_initelt): Pass input_location to
5241 process_init_element.
5242 (c_parser_initval): Pass loc to process_init_element.
5243 * c-tree.h (process_init_element): Adjust declaration.
5244 * c-typeck.c (push_init_level): Pass input_location to
5245 process_init_element.
5246 (pop_init_level): Likewise.
5247 (set_designator): Likewise.
5248 (output_init_element): Add location_t parameter. Pass loc to
5249 digest_init.
5250 (output_pending_init_elements): Pass input_location to
5251 output_init_element.
5252 (process_init_element): Add location_t parameter. Pass loc to
5253 output_init_element.
5254
42056eac
JJ
52552014-04-24 Jakub Jelinek <jakub@redhat.com>
5256
5257 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5258 atomic-clause, allow comma in between atomic-clause and
5259 seq_cst.
5260
e162a134
JJ
52612014-04-22 Jakub Jelinek <jakub@redhat.com>
5262
5263 PR c/59073
5264 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5265 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5266
2f6babac
IZ
52672014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5268
5269 PR middle-end/60469
5270 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5271 create_tmp_var instead build_decl for creating temps.
5272 (build_array_notation_expr): Likewise.
5273 (fix_conditional_array_notations_1): Likewise.
5274 (fix_array_notation_expr): Likewise.
5275 (fix_array_notation_call_expr): Likewise.
5276
8edbfaa6
JJ
52772014-03-28 Jakub Jelinek <jakub@redhat.com>
5278
5279 PR c++/60689
5280 * c-tree.h (c_build_function_call_vec): New prototype.
5281 * c-typeck.c (build_function_call_vec): Don't call
5282 resolve_overloaded_builtin here.
5283 (c_build_function_call_vec): New wrapper function around
5284 build_function_call_vec. Call resolve_overloaded_builtin here.
5285 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5286 Call c_build_function_call_vec instead of build_function_call_vec.
5287 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5288 * c-decl.c (finish_decl): Likewise.
5289
7485aeea
MLI
52902014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5291
5292 PR c/55383
5293 * c-typeck.c: Use correct format string in cast-qual warning
5294
b17a8b07
TS
52952014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5296
5297 * c-decl.c (c_decl_attributes): Use
5298 lang_hooks.types.omp_mappable_type.
5299 * c-typeck.c (c_finish_omp_clauses): Likewise.
5300
3af9c5e9
MP
53012014-03-06 Marek Polacek <polacek@redhat.com>
5302
5303 PR c/60197
5304 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5305 of checking tree code.
5306
1c9f5f33
PK
53072014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5308
5309 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5310 (c_parser_parameter_declaration): Likewise.
5311
cc28fc7f
MP
53122014-02-19 Marek Polacek <polacek@redhat.com>
5313
5314 PR c/60195
5315 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5316 Call mark_exp_read on exp.value.
5317 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5318 TREE_ADDRESSABLE on old instead of val.
5319 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5320
b581c05c
PK
53212014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5322
5323 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5324 C_EXPR_APPEND by vec_safe_push.
5325 * c-tree.h (C_EXPR_APPEND): Remove.
5326
81e5eca8
MP
53272014-01-31 Marek Polacek <polacek@redhat.com>
5328
5329 PR c/59963
5330 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5331 build_function_call_vec.
5332 (build_function_call): Likewise.
5333 (build_atomic_assign): Likewise.
5334 (build_function_call_vec): Add arg_loc parameter. Use it.
5335 (convert_arguments): Likewise.
5336 (convert_for_assignment): Rename rhs_loc to expr_loc.
5337 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5338 (c_parser_objc_keywordexpr): Likewise.
5339 (c_parser_postfix_expression_after_primary): Call
5340 build_function_call_vec with expr_loc rather than op_loc.
5341 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5342 build_function_call_vec.
5343 (c_parser_expr_list): Add locations parameter. Fill it with locations
5344 of function arguments.
5345 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5346
68fca595
MP
53472014-01-30 Marek Polacek <polacek@redhat.com>
5348
5349 PR c/59940
5350 * c-typeck.c (build_function_call_vec): Use loc parameter.
5351 (convert_arguments): Add location parameter. Use it.
5352 (ep_convert_and_check): Likewise.
5353 (build_atomic_assign): Adjust convert_for_assignment call.
5354 (build_modify_expr): Likewise.
5355 (digest_init): Likewise.
5356 (c_finish_return): Likewise.
5357 (build_conditional_expr): Adjust ep_convert_and_check calls.
5358 (convert_for_assignment): Add rhs_loc parameter. Use it.
5359 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5360 calls.
5361
fa337f3a
RB
53622014-01-30 Richard Biener <rguenther@suse.de>
5363
5364 PR c/59905
5365 * c-typeck.c (build_function_call_vec): Do not replace calls
5366 to a function via an incompatible type with a runtime abort.
5367
b72271b9
BI
53682014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5369
5370 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5371 flag_enable_cilkplus with flag_cilkplus.
5372 (c_parser_direct_declarator_inner): Likewise.
5373 (c_parser_attribute_any_word): Likewise.
5374 (c_parser_attributes): Likewise.
5375 (c_parser_compound_statement): Likewise.
5376 (c_parser_statement_after_labels): Likewise.
5377 (c_parser_if_statement): Likewise.
5378 (c_parser_switch_statement): Likewise.
5379 (c_parser_do_statement): Likewise.
5380 (c_parser_for_statement): Likewise.
5381 (c_parser_unary_expression): Likewise.
5382 (c_parser_postfix_expression): Likewise.
5383 (c_parser_postfix_expression_after_primary): Likewise.
5384 (c_parser_postfix_expression_after_primary): Likewise.
5385 (c_parser_omp_clause_name): Likewise.
5386 (c_finish_omp_declare_simd): Likewise.
5387 (c_parser_cilk_verify_simd): Likewise.
5388 * c-typeck.c (build_array_ref): Likewise.
5389 (build_function_call_vec): Likewise.
5390 (convert_arguments): Likewise.
5391 (build_compound_expr): Likewise.
5392 (c_finish_return): Likewise.
5393 (c_finish_if_stmt): Likewise.
5394 (c_finish_loop): Likewise.
5395 (build_binary_op): Likewise.
5396
393e8e8b
MP
53972014-01-23 Marek Polacek <polacek@redhat.com>
5398
5399 PR c/59846
5400 * c-typeck.c (parser_build_binary_op): Use location instead of
5401 input_location.
5402 (build_binary_op): Pass location to shorten_compare.
5403
f04dda30
MP
54042014-01-23 Marek Polacek <polacek@redhat.com>
5405
5406 PR c/58346
5407 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5408 an empty aggregate.
5409
789eadcd
MP
54102014-01-23 Marek Polacek <polacek@redhat.com>
5411
5412 PR c/59871
5413 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5414 of a comma expression.
5415 (emit_side_effect_warnings): Likewise.
5416
40f14e9f
BI
54172014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5418
5419 PR c/59825
5420 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5421 function to use walk_tree and moved a lot of its functionality to
5422 expand_array_notations.
5423 (expand_array_notations): New function.
5424
74558dd9
BI
54252014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5426
5427 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5428 attribute an attribute without value.
5429
652fea39
JJ
54302014-01-23 Jakub Jelinek <jakub@redhat.com>
5431
5432 PR middle-end/58809
5433 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5434 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5435
f34f1c87
MP
54362014-01-22 Marek Polacek <polacek@redhat.com>
5437
5438 PR c/59891
5439 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5440 of remove_c_maybe_const_expr on op1 and op2.
5441
241f845a
JJ
54422014-01-15 Jakub Jelinek <jakub@redhat.com>
5443
5444 PR c/58943
5445 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5446 effects, preevaluate rhs using SAVE_EXPR first.
5447
9a74f20c
BI
54482014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5449
5450 PR c++/59631
5451 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5452 statements with if-elseif statements.
5453
96066ce1
MP
54542014-01-06 Marek Polacek <polacek@redhat.com>
5455
5456 PR c/57773
5457 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5458 defined bit-field types only in ISO C.
5459
23a5b65a
RS
54602014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5461
5462 Update copyright years
5463
f9030485
RS
54642014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5465
5466 * c-array-notation.c: Use the standard form for the copyright notice.
5467
41958c28
BI
54682013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5469
5470 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5471 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5472 field in parser is not empty. If not-empty, call the function
5473 c_parser_finish_omp_declare_simd.
5474 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5475 between SIMD-enabled functions and #pragma simd. Added new parameter.
5476 (c_parser_cilk_all_clauses): Modified the usage of the function
5477 c_parser_cilk_clause_vectorlength as mentioned above.
5478 (c_parser_cilk_simd_fn_vector_attrs): New function.
5479 (c_finish_cilk_simd_fn_tokens): Likewise.
5480 (is_cilkplus_vector_p): Likewise.
5481 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5482 "nomask," and "mask" strings in clause name.
5483 (c_parser_omp_all_clauses): Added 3 new case statements:
5484 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5485 PRAGMA_CILK_CLAUSE_NOMASK.
5486 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5487 check for vector attribute and if so call the function
5488 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5489 called the function c_finish_cilk_simd_fn_tokens.
5490 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5491 parser field is non-empty. If so, parse them as you would parse
5492 the omp declare simd pragma.
5493 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5494 Added a check when step is a parameter and flag it as error.
5495 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5496 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5497 pragma_omp_clause.
5498
cef0fd0e
TS
54992013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5500
5501 * c-parser.c (c_parser_omp_parallel): Fix description.
5502
12893402
BI
55032013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5504
5505 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5506 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5507 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5508 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5509
296674db
JM
55102013-12-04 Joseph Myers <joseph@codesourcery.com>
5511
5512 PR c/52023
5513 * c-parser.c (c_parser_alignas_specifier): Use
5514 c_sizeof_or_alignof_type instead of c_alignof.
5515 (c_parser_alignof_expression): Likewise, with min_alignof
5516 parameter depending on alignof spelling used.
5517
edd28054
MP
55182013-12-04 Marek Polacek <polacek@redhat.com>
5519
5520 PR c/54113
5521 * c-decl.c (start_function): Don't warn for missing prototype for
5522 inline functions.
5523
da0fc454
MP
55242013-12-03 Marek Polacek <polacek@redhat.com>
5525
5526 PR c/59351
5527 * c-decl.c (build_compound_literal): Allow compound literals with
5528 empty initial value.
5529
4c2ecab0
JM
55302013-12-02 Joseph Myers <joseph@codesourcery.com>
5531
5532 PR c/58235
5533 * c-typeck.c (build_modify_expr): Diagnose assignment to
5534 expression with array type.
5535
340baef7
JM
55362013-11-29 Joseph Myers <joseph@codesourcery.com>
5537
5538 PR c/42262
5539 * c-typeck.c (process_init_element): Do not treat a string as
5540 initializing a whole array when used with a designator for an
5541 individual element.
5542
6763b9f7
JM
55432013-11-29 Joseph Myers <joseph@codesourcery.com>
5544
5545 PR c/57574
5546 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5547 an inline function following a static declaration.
5548
e7bd1de1
JJ
55492013-11-28 Jakub Jelinek <jakub@redhat.com>
5550
5551 PR c/59310
5552 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5553 to p_name before calling c_parser_omp_teams instead of after.
5554 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5555 argument. Remove unused p_name variable.
5556
0136f8f0
AH
55572013-11-27 Aldy Hernandez <aldyh@redhat.com>
5558 Jakub Jelinek <jakub@redhat.com>
5559
5560 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5561 external_scope is NULL.
5562
241b71bb
TV
55632013-11-27 Tom de Vries <tom@codesourcery.com>
5564 Marc Glisse <marc.glisse@inria.fr>
5565
5566 PR c++/59032
5567 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5568
2fb9a547
AM
55692013-11-22 Andrew MacLeod <amacleod@redhat.com>
5570
5571 * c-typeck.c: Add required include files from gimple.h.
5572
8400e75e
DM
55732013-11-22 David Malcolm <dmalcolm@redhat.com>
5574
5575 * c-decl.c (define_label, shadow_tag_warned)
5576 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5577 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5578 (declspecs_add_type): Remove use of in_system_header macro.
5579 * c-parser.c (c_parser_unary_expression): Likewise.
5580 * c-typeck.c (store_init_value, process_init_element)
5581 (c_start_case): Likewise.
5582
5583 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5584 macro.
5585
5586 * c-parser.c (c_parser_set_source_position_from_token): Remove
5587 reference to in_system_header from comment.
5588
386b1f1f
RS
55892013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5590
5591 * c-decl.c (grokdeclarator): Update comment to refer to
5592 tree_to_[su]hwi rather than tree_low_cst.
5593
ae7e9ddd
RS
55942013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5595
5596 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5597 tree_to_uhwi throughout.
5598
9439e9a1
RS
55992013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5600
5601 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5602 throughout.
5603
9541ffee
RS
56042013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5605
5606 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5607 throughout.
5608
c02065fc
AH
56092013-11-15 Aldy Hernandez <aldyh@redhat.com>
5610
5611 * c-parser.c (c_parser_cilk_simd): New.
5612 (c_parser_cilk_verify_simd): New.
5613 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5614 (c_parser_omp_for_loop): Add case for NE_EXPR.
5615 Set c_break_label for CILK_SIMD.
5616 (c_parser_cilk_clause_vectorlength): New.
5617 (c_parser_cilk_clause_linear): New.
5618 (c_parser_cilk_clause_name): New.
5619 (c_parser_cilk_all_clauses): New.
5620 * c-typeck.c (build_unary_op): Pass location argument to
5621 readonly_error.
5622 (build_modify_expr): Same.
5623 (build_asm_expr): Same.
5624 (c_finish_bc_stmt): Error on break/continue in loops.
5625
18f429e2
AM
56262013-11-14 Andrew MacLeod <amacleod@redhat.com>
5627
5628 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5629
d8a2d370
DN
56302013-11-14 Diego Novillo <dnovillo@google.com>
5631
5632 * c-decl.c: Include print-tree.h.
5633 Include stor-layout.h.
5634 Include varasm.h.
5635 Include attribs.h.
5636 Include stringpool.h.
5637 * c-lang.c: Include fold-const.h.
5638 * c-parser.c: Include stringpool.h.
5639 Include attribs.h.
5640 Include stor-layout.h.
5641 Include varasm.h.
5642 Include trans-mem.h.
5643 * c-typeck.c: Include stor-layout.h.
5644 Include trans-mem.h.
5645 Include varasm.h.
5646 Include stmt.h.
5647
38b7bc7f
JM
56482013-11-13 Joseph Myers <joseph@codesourcery.com>
5649
5650 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5651 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5652 __auto_type.
5653 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5654 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5655 RID_AUTO_TYPE.
5656 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5657 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5658 (c_parser_declarator, c_parser_direct_declarator_inner)
5659 (c_parser_parameter_declaration, c_parser_type_name): All callers
5660 changed.
5661 (c_parser_declaration_or_fndef): Handle declarations with type
5662 determined from the initializer.
5663
45b0be94
AM
56642013-11-12 Andrew MacLeod <amacleod@redhat.com>
5665
18f429e2 5666 * c-typeck.c: Include gimplify.h.
45b0be94 5667
582d9b50
JM
56682013-11-12 Joseph Myers <joseph@codesourcery.com>
5669
5670 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5671 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5672 comment.
5673 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5674 or _Thread_local as appropriate in diagnostics.
5675 (build_null_declspecs): Initialize ret->thread_gnu_p.
5676 (declspecs_add_scspec): Handle either __thread or _Thread_local
5677 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5678 pedantic. Do not disallow _Thread_local extern and _Thread_local
5679 static.
5680
267bac10
JM
56812013-11-07 Joseph Myers <joseph@codesourcery.com>
5682 Andrew MacLeod <amacleod@redhat.com>
5683
5684 * c-aux-info.c (gen_type): Handle atomic qualifier.
5685 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5686 qualifiers when compating types.
5687 (shadow_tag_warned): Handle atomic_p in declspecs.
5688 (quals_from_declspecs): Likewise.
5689 (start_decl): Use c_type_promotes_to when promoting argument
5690 types.
5691 (grokdeclarator): Handle _Atomic.
5692 (get_parm_info): Diagnose any qualifier on "void" as only
5693 parameter.
5694 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5695 comparing types. Use c_type_promotes_to when promoting argument
5696 types.
5697 (finish_function): Use c_type_promotes_to when promoting argument
5698 types.
5699 (build_null_declspecs): Handle atomic_p in declspecs.
5700 (declspecs_add_qual): Handle RID_ATOMIC.
5701 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5702 (c_token_starts_declspecs): Handle RID_ATOMIC.
5703 (c_parser_declspecs): Handle atomic type specifiers and
5704 qualifiers.
5705 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5706 from types of expressions with atomic type.
5707 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5708 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5709 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5710 (c_parser_statement_after_labels, c_parser_switch_statement)
5711 (c_parser_for_statement, c_parser_expr_no_commas)
5712 (c_parser_conditional_expression, c_parser_binary_expression)
5713 (c_parser_cast_expression, c_parser_unary_expression)
5714 (c_parser_postfix_expression)
5715 (c_parser_postfix_expression_after_primary, c_parser_expression):
5716 Use convert_lvalue_to_rvalue.
5717 (c_parser_expression_conv, c_parser_expr_list): Document
5718 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5719 (c_parser_objc_synchronized_statement): Use
5720 convert_lvalue_to_rvalue.
5721 (c_parser_objc_selector): Handle RID_ATOMIC.
5722 (c_parser_objc_receiver, c_parser_array_notation): Use
5723 convert_lvalue_to_rvalue.
5724 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5725 _Atomic (type-name).
5726 (struct c_declspecs): Add atomic_p field.
5727 (convert_lvalue_to_rvalue): Declare.
5728 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5729 corresponding atomic types.
5730 (qualify_type): Don't add _Atomic qualifiers from second argument.
5731 (comp_target_types): Do not allow _Atomic mismatches.
5732 (type_lists_compatible_p): Do not remove atomic qualifiers when
5733 comparing types.
5734 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5735 (build_atomic_assign): New functions.
5736 (build_unary_op): Use build_atomic_assign for atomic increment and
5737 decrement.
5738 (build_conditional_expr): Do not treat _Atomic void as a qualified
5739 version of void.
5740 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5741 (find_anonymous_field_with_type, convert_to_anonymous_field)
5742 (convert_for_assignment): Do not remove atomic qualifiers when
5743 comparing types.
5744 (digest_init): Do not accept initialization of arrays of atomic
5745 elements by string constants.
5746 (build_asm_expr): Use convert_lvalue_to_rvalue.
5747 (build_binary_op): Do not treat _Atomic void as a qualified
5748 version of void.
5749
0c249d4b
DD
57502013-11-06 DJ Delorie <dj@redhat.com>
5751
5752 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5753 both explicit and builtin, print the location of the explicit one.
5754
6d7f7e0a
TB
57552013-11-05 Tobias Burnus <burnus@net-b.de>
5756
5757 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5758 c_parser_omp_distribute, c_parser_omp_teams,
5759 c_parser_omp_target, c_parser_omp_declare): Handle
5760 -fopenmp-simd.
5761
b906f4ca
MP
57622013-11-03 Marek Polacek <polacek@redhat.com>
5763
5764 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5765
ee1d5a02
JJ
57662013-11-01 Jakub Jelinek <jakub@redhat.com>
5767
5768 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5769 check_dup_generic at the end, unless remove is true.
5770 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5771 remove = true;.
5772 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5773
5a9785fb
JJ
57742013-10-31 Jakub Jelinek <jakub@redhat.com>
5775
5776 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5777 with decl that is not pointer nor array.
5778
939b37da
BI
57792013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5780
5781 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5782 a spawning function is found.
5783 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5784 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5785 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5786 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5787 case.
5788 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5789 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5790 expr.
5791 (c_finish_return): Added a check to reject _Cilk_spawn in return
5792 expression.
5793 (build_cilk_spawn): New function.
5794 (build_cilk_sync): Likewise.
5795 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 5796
d4af74d4
TB
57972013-10-27 Tobias Burnus <burnus@net-b.de>
5798
5799 PR other/33426
5800 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5801 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5802 (c_parser_statement_after_labels): Update calls.
5803
d73749df 58042013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5805
5806 PR other/33426
5807 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5808 Handle PRAGMA_IVDEP.
5809 (c_parser_statement_after_labels): Update call.
5810
f28aa681
MP
58112013-10-24 Marek Polacek <polacek@redhat.com>
5812
5813 * c-parser.c (c_parser_struct_declaration): Add a comment.
5814 (c_parser_declarator): Don't allow _Alignas here.
5815
0645c1a2
AM
58162013-10-17 Andrew MacLeod <amacleod@redhat.com>
5817
5818 * c-parser.c: Include omp-low.h.
5819 * c-typeck.c: Likewise.
5820
568a31f2
MP
58212013-10-17 Marek Polacek <polacek@redhat.com>
5822
5823 PR c/58267
5824 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5825 Document syntax of the array-declarator.
5826 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5827 are not permitted.
5828 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5829 (c_parser_struct_declaration): Likewise.
5830 (c_parser_declarator): Likewise.
5831 (c_parser_direct_declarator_inner): Likewise.
5832 (c_parser_parameter_declaration): Likewise.
5833 (c_parser_type_name): Likewise.
5834
acf0174b
JJ
58352013-10-11 Jakub Jelinek <jakub@redhat.com>
5836
5837 * c-lang.h (current_omp_declare_target_attribute): New extern
5838 decl.
5839 * c-parser.c: Include c-lang.h.
5840 (struct c_parser): Change tokens to c_token *.
5841 Add tokens_buf field. Change tokens_avail type to unsigned int.
5842 (c_parser_consume_token): If parser->tokens isn't
5843 &parser->tokens_buf[0], increment parser->tokens.
5844 (c_parser_consume_pragma): Likewise.
5845 (enum pragma_context): Add pragma_struct and pragma_param.
5846 (c_parser_external_declaration): Adjust
5847 c_parser_declaration_or_fndef caller.
5848 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5849 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5850 Adjust recursive call.
5851 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5852 of pragma_external.
5853 (c_parser_parameter_declaration): Use pragma_param instead of
5854 pragma_external.
5855 (c_parser_compound_statement_nostart, c_parser_label,
5856 c_parser_for_statement): Adjust
5857 c_parser_declaration_or_fndef callers.
5858 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5859 it through to c_parser_conditional_expression.
5860 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5861 pass it through to c_parser_binary_expression. Adjust recursive
5862 call.
5863 (c_parser_binary_expression): Remove prec argument, add
5864 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5865 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5866 binop matches it, use build2 instead of parser_build_binary_op.
5867 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5868 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5869 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5870 Handle pragma_struct and pragma_param the same as pragma_external.
5871 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5872 (c_parser_omp_variable_list): Parse array sections for
5873 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5874 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5875 (c_parser_omp_clause_reduction): Handle user defined reductions.
5876 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5877 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5878 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5879 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5880 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5881 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5882 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5883 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5884 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5885 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5886 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5887 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5888 (c_parser_omp_for_loop): Add CODE argument, pass it through
5889 to c_finish_omp_for. Change last argument to cclauses,
5890 and adjust uses to grab parallel clauses from the array of all
5891 the split clauses. Adjust c_parser_binary_expression,
5892 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5893 (omp_split_clauses): New function.
5894 (c_parser_omp_simd): New function.
5895 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5896 Allow the function to be called also when parsing combined constructs,
5897 and call c_parser_omp_simd when parsing for simd.
5898 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5899 #pragma omp section, require exactly one structured-block instead of
5900 sequence of statements.
5901 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5902 Allow the function to be called also when parsing combined constructs.
5903 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5904 Allow the function to be called also when parsing combined
5905 constructs.
5906 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5907 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5908 c_parser_omp_teams, c_parser_omp_target_data,
5909 c_parser_omp_target_update, c_parser_omp_target,
5910 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5911 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5912 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5913 (c_parser_omp_construct): Add p_name and mask vars. Handle
5914 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5915 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5916 and c_parser_omp_sections callers.
5917 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5918 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5919 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5920 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5921 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5922 OMP_CLAUSE_DEPEND.
5923 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5924 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5925 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5926 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5927 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5928 * c-typeck.c: Include tree-inline.h.
5929 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5930 handle_omp_array_sections_1, handle_omp_array_sections,
5931 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5932 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5933 user defined reductions.
5934 (c_tree_equal): New function.
5935 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5936 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5937 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5938 c_check_omp_declare_reduction_r): New prototypes.
5939 * c-decl.c (current_omp_declare_target_attribute): New variable.
5940 (c_decl_attributes): New function.
5941 (start_decl, start_function): Use it instead of decl_attributes.
5942 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5943 c_omp_reduction_decl, c_omp_reduction_lookup,
5944 c_check_omp_declare_reduction_r): New functions.
5945
0a6c2227
TT
59462013-09-25 Tom Tromey <tromey@redhat.com>
5947
5948 * Make-lang.in (c/gccspec.o): Remove.
5949 (CFLAGS-c/gccspec.o): New variable.
5950 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5951 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5952 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5953
f3bc55f0
TT
59542013-09-25 Tom Tromey <tromey@redhat.com>
5955
5956 * Make-lang.in (c/gccspec.o): Don't use subshell.
5957
a24d975c
MP
59582013-09-18 Marek Polacek <polacek@redhat.com>
5959
5960 PR sanitize/58443
5961 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5962 Remove unnecessary check.
5963
ce6923c5
MP
59642013-09-18 Marek Polacek <polacek@redhat.com>
5965
5966 PR sanitizer/58411
5967 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5968 no_sanitize_undefined attribute.
5969
a1e51df9
KT
59702013-09-13 Kai Tietz <ktietz@redhat.com>
5971
5972 PR target/57848
5973 * c-decl.c (c_builtin_function_ext_scope): Remove
5974 wrong assumption that it is never called on prexisting
5975 symbol.
5976
0af94e6f
JR
59772013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5978
5979 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5980
20059c8b
GDR
59812013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5982
5983 * c-objc-common.c (c_tree_printer): Tidy.
5984
de5a5fa1
MP
59852013-08-30 Marek Polacek <polacek@redhat.com>
5986
5987 * c-typeck.c (build_binary_op): Add division by zero and shift
5988 instrumentation.
5989
2531a1d9 59902013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 5991 Joseph Myers <joseph@codesourcery.com>
2531a1d9 5992
6e2bcc98 5993 PR c/35649
2531a1d9
JR
5994 * c-typeck.c (c_common_type): Prefer double_type_node over
5995 other REAL_TYPE types with the same precision.
5996 (convert_arguments): Likewise.
5997
025311c4
GDR
59982013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5999
6000 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6001 (c_initialize_diagnostics): Call a destructor for the early printer.
6002
da6ca2b5
GDR
60032013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6004
6005 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6006 printer initialization.
6007
318cda85 60082013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6009
318cda85
BI
6010 PR c/57490
6011 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6012 check for truth values.
6013 (expand_array_notation_exprs): Added truth values case. Removed an
6014 unwanted else. Added for-loop to walk through subtrees in default
6015 case.
6016
b066401f
GDR
60172013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6018
6019 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6020
fb48aadc
JM
60212013-07-23 Joseph Myers <joseph@codesourcery.com>
6022
6023 * c-parser.c (struct c_generic_association): Fix typo.
6024
433cc7b0
TT
60252013-07-23 Tom Tromey <tromey@redhat.com>
6026 Joseph Myers <joseph@codesourcery.com>
6027
6028 * c-parser.c (struct c_generic_association): New.
6029 (c_generic_association_d): New typedef.
6030 (c_parser_generic_selection): New function.
6031 (c_parser_postfix_expression): Handle RID_GENERIC.
6032
26d40c3d
JM
60332013-07-13 Jason Merrill <jason@redhat.com>
6034
6035 PR c++/57793
6036 * c-decl.c (finish_struct): Check for too-large class.
6037
ecdbd01a 60382013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6039
6040 PR c/57821
6041 * c-typeck.c (set_init_index): When folding, check for index overflow.
6042
1141ed3f
BI
60432013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6044
6045 * c-parser.c (c_parser_array_notation): Removed rejection of array
6046 notations in an array of function pointers.
6047
713b46fa
BI
60482013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6049
6050 * c-array-notation.c (make_triplet_val_inv): New function.
6051 (create_cmp_incr): Likewise.
6052 (create_array_refs): Likewise.
6053 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6054 Also modularized common parts between functions and called the function.
6055 (build_array_notation_expr): Likewise.
6056 (fix_conditional_array_notations_1): Likewise.
6057 (fix_array_notation_expr): Likewise.
6058 (fix_array_notation_call_expr): Likewise.
6059
92f20202
MP
60602013-06-18 Marek Polacek <polacek@redhat.com>
6061
6062 PR c/57630
6063 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6064
73a23b06
BI
60652013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6066
6067 * c-array-notation.c (build_array_notation_expr): Reject array notation
6068 mismatch between LHS and RHS even inside a call_expr. Also, removed
6069 a couple while statements that were dead code.
6070
00b8517d
BI
60712013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6072
6073 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6074 excessive precision expressions in function parameters. Also removed
6075 couple unwanted while statements.
6076
1509bdda
BI
60772013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6078
6079 * c-array-notation.c (expand_array_notation_exprs): Added
6080 ARRAY_NOTATION_REF case.
ab20d992 6081
d60f1706
BI
60822013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6083
6084 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6085 function to c-family/array-notation-common.c.
6086 (is_cilkplus_reduce_builtin): Likewise.
6087 (find_rank): Likewise.
6088 (extract_array_notation_exprs): Likewise.
6089 (replace_array_notations): Likewise.
6090 (find_inv_trees): Likewise.
6091 (replace_inv_trees): Likewise.
6092 (contains_array_notation_expr): Likewise.
6093 (find_correct_array_notation_type): Likewise.
6094 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6095 (struct inv_list): Moved this to c-family/array-notation-common.c.
6096 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6097
6d6efbb3
BI
60982013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6099
6100 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6101 reduction functions outside the for-loop. Added a check if the fundecl
6102 is non-NULL. Finally, removed an unwanted if-statement, and made the
6103 body unconditional.
6104
25c22937
BI
61052013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6106
6107 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6108 condition of the if-statement matches the rank of else-block and then-
6109 block when array notations are used.
6110 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6111 expression after the entire function body is parsed.
6112 (c_parser_expr_no_commas): Delayed creating array notation expressions
6113 to the end of function parsing.
6114 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6115 whole if-statement instead of just the condition.
ab20d992 6116 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6117
edd25645
BI
61182013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6119
6120 PR c/57474
6121 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6122 array to NULL_TREE if they are unused. Also added a check for the
6123 field to be NULL before its fields are used in future.
ab20d992 6124
065ce7f1
RO
61252013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6126
6127 PR bootstrap/57450
6128 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6129 (build_array_notation_expr): Likewise.
6130
36536d79
BI
61312013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6132
6133 * c-typeck.c (build_array_ref): Added a check to see if array's
6134 index is greater than one. If true, then emit an error.
6135 (build_function_call_vec): Exclude error reporting and checking
6136 for builtin array-notation functions.
6137 (convert_arguments): Likewise.
6138 (c_finish_return): Added a check for array notations as a return
6139 expression. If true, then emit an error.
6140 (c_finish_loop): Added a check for array notations in a loop
6141 condition. If true then emit an error.
6142 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6143 (build_binary_op): Added a check for array notation expr inside
6144 op1 and op0. If present, we call another function to find correct
6145 type.
6146 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6147 * c-parser.c (c_parser_compound_statement): Check if array
6148 notation code is used in tree, if so, then transform them into
6149 appropriate C code.
6150 (c_parser_expr_no_commas): Check if array notation is used in LHS
6151 or RHS, if so, then build array notation expression instead of
6152 regular modify.
6153 (c_parser_postfix_expression_after_primary): Added a check for
6154 colon(s) after square braces, if so then handle it like an array
6155 notation. Also, break up array notations in unary op if found.
6156 (c_parser_direct_declarator_inner): Added a check for array
6157 notation.
6158 (c_parser_compound_statement): Added a check for array notation in
6159 a stmt. If one is present, then expand array notation expr.
6160 (c_parser_if_statement): Likewise.
6161 (c_parser_switch_statement): Added a check for array notations in
6162 a switch statement's condition. If true, then output an error.
6163 (c_parser_while_statement): Similarly, but for a while.
6164 (c_parser_do_statement): Similarly, but for a do-while.
6165 (c_parser_for_statement): Similarly, but for a for-loop.
6166 (c_parser_unary_expression): Check if array notation is used in a
6167 pre-increment or pre-decrement expression. If true, then expand
6168 them.
6169 (c_parser_array_notation): New function.
6170 * c-array-notation.c: New file.
6171 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 6172
cd192ccc
MS
61732013-05-23 Mike Stump <mikestump@comcast.net>
6174
6175 * c-typeck.c (convert_for_assignment): Handle references to memory
6176 spaces better.
6177
427b248d
JM
61782013-05-16 Jason Merrill <jason@redhat.com>
6179
6180 * Make-lang.in (cc1$(exeext)): Use link mutex.
6181
44d90fe1
PC
61822013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6183
6184 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6185 to simply use OPT_Wpointer_arith.
6186 (build_unary_op): Likewise.
6187
4e7d7b3d
JJ
61882013-04-03 Jakub Jelinek <jakub@redhat.com>
6189
6190 PR c/19449
6191 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6192 argument. If set, or it temporarily for parsing of the first
6193 argument into force_folding_builtin_constant_p.
6194 (c_parser_postfix_expression): Adjust callers.
6195
839b422f
RB
61962013-03-21 Richard Biener <rguenther@suse.de>
6197
6198 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6199 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6200
2ee028f1
MP
62012013-02-12 Marek Polacek <polacek@redhat.com>
6202
6203 PR c/44938
6204 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6205 origtypes to NULL.
6206
8824edff
JJ
62072013-01-24 Jakub Jelinek <jakub@redhat.com>
6208
6209 PR c/56078
6210 * c-typeck.c (set_nonincremental_init_from_string): If
6211 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6212 returned false.
6213 (process_init_element): Likewise.
6214
eadd3d0d
JJ
62152012-12-20 Jakub Jelinek <jakub@redhat.com>
6216
6217 PR c++/55619
6218 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6219 argument, don't call default_function_array_conversion
6220 nor c_fully_fold here.
6221 (c_parser_asm_statement): Adjust callers.
6222 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6223 and outputs here, and call default_function_array_conversion
6224 on inputs that don't need to be addressable.
6225
f8a93a2e
JJ
62262012-12-18 Jakub Jelinek <jakub@redhat.com>
6227
6228 PR c/39464
6229 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6230 warning require that both c_common_unsigned_type as well as
6231 c_common_signed_type is the same for both mvl and mvr types.
6232
9771b263
DN
62332012-11-16 Diego Novillo <dnovillo@google.com>
6234
6235 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6236
6237 * c-common.c: Use new vec API in vec.h.
6238 * c-common.h: Likewise.
6239 * c-gimplify.c: Likewise.
6240 * c-pragma.c: Likewise.
6241 * c-pretty-print.c: Likewise.
6242 * c-pretty-print.h: Likewise.
6243 * c-semantics.c: Likewise.
6244 * c-decl.c: Likewise.
6245 * c-parser.c: Likewise.
6246 * c-tree.h: Likewise.
6247 * c-typeck.c: Likewise.
6248
880661a4
JW
62492012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6250
6251 PR c++/54930
6252 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6253
077d1abe
MLI
62542012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6255
6256 PR c/53066
6257 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6258 shadows a function, unless the variable is a function or a
6259 pointer-to-function.
6260
3a785c97
JJ
62612012-10-12 Jakub Jelinek <jakub@redhat.com>
6262
6263 PR c/54381
6264 * c-parser.c (struct c_tree_loc_pair): Removed.
6265 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6266 add location_t * and tree * arguments, fill in array of 3
6267 sizeof_arg trees and corresponding locs.
6268 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6269 c_parser_expr_list callers.
6270 (c_parser_postfix_expression_after_primary): Likewise. Pass
6271 array of 3 sizeof_arg trees and locs (corresponding to first
6272 3 arguments) to sizeof_pointer_memaccess_warning.
6273
703c8606
LC
62742012-10-09 Lawrence Crowl <crowl@google.com>
6275
6276 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6277 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6278 hash table.
6279
5d9de0d0
PC
62802012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6281
6282 PR c++/54194
6283 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6284 call.
6285
a212e43f
MG
62862012-10-09 Marc Glisse <marc.glisse@inria.fr>
6287
6288 PR c++/54427
6289 * c-typeck.c: Include c-common.h.
6290 (enum stv_conv): Moved to c-common.h.
6291 (scalar_to_vector): Moved to c-common.c.
6292 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6293 * Make-lang.in: c-typeck.c depends on c-common.h.
6294
3b78de56
AC
62952012-10-04 Arnaud Charlet <charlet@adacore.com>
6296
6297 * c-decl.c (c_write_global_declarations): Fix handling of
6298 -fdump-ada-spec*.
6299
78c60e3d
SS
63002012-09-30 Sharad Singhai <singhai@google.com>
6301
6302 * c-decl.c (c_write_global_declarations): Use a different method
6303 to determine if the dump has ben initialized.
6304
9f33203d
JM
63052012-09-14 Joseph Myers <joseph@codesourcery.com>
6306
6307 PR c/54552
6308 * c-typeck.c (c_cast_expr): When casting to a type requiring
6309 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6310 c_fully_fold first.
6311
a27d595d
JM
63122012-09-14 Joseph Myers <joseph@codesourcery.com>
6313
6314 PR c/54103
6315 * c-typeck.c (build_unary_op): Pass original argument of
6316 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6317 any C_MAYBE_CONST_EXPR, if it has integer operands.
6318 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6319 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6320 to c_objc_common_truthvalue_conversion, then remove any
6321 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6322 c_objc_common_truthvalue_conversion not
6323 c_common_truthvalue_conversion.
6324 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6325 call note_integer_operands for arguments with integer operands
6326 that are not integer constants.
6327
9feb29df
JJ
63282012-09-13 Jakub Jelinek <jakub@redhat.com>
6329
6330 PR c/54559
6331 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6332 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6333
d409320c
JJ
63342012-08-31 Jakub Jelinek <jakub@redhat.com>
6335
6336 PR c/54428
6337 * c-convert.c (convert): Don't call fold_convert_loc if
6338 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6339 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6340 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6341
6265d07c
JJ
63422012-08-24 Jakub Jelinek <jakub@redhat.com>
6343
6344 PR c/54355
6345 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6346 for nested and empty_ok arguments in the call to
6347 c_parser_declaration_or_fndef.
6348
1a4049e7
JJ
63492012-08-17 Jakub Jelinek <jakub@redhat.com>
6350
6351 * c-tree.h (c_last_sizeof_arg): Declare.
6352 * c-parser.c (struct c_tree_loc_pair): New type.
6353 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6354 non-NULL.
6355 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6356 (c_parser_postfix_expression_after_primary): Likewise. Call
6357 sizeof_pointer_memaccess_warning if needed.
6358 (sizeof_ptr_memacc_comptypes): New function.
6359 * c-typeck.c (c_last_sizeof_arg): New global variable.
6360 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6361
0229aee9
UB
63622012-07-24 Uros Bizjak <ubizjak@gmail.com>
6363
6364 * c-lang.h (lang_decl): Add variable_size GTY option.
6365
7ee2468b
SB
63662012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6367
6368 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6369 * Make-lang.in: Fix dependencies.
6370
d4a10d0a
SB
63712012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6372
6373 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6374 and add language Makefile hooks.
6375 * config-lang.in: New file.
6376 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6377 add the required "normal" config-lang.in rules.
6378 * c-lang.h: Moved from gcc/ to here.
6379 * c-tree.h: Likewise.
6380 * c-objc-common.c: Likewise.
6381 * c-objc-common.h: Likewise.
6382 * c-typeck.c: Likewise.
6383 * c-convert.c: Likewise.
6384 * c-lang.c: Likewise.
6385 * c-aux-info.c: Likewise.
6386 * c-errors.c: Likewise.
6387 * gccspec.c: Likewise.
6388 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6389 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6390\f
a5544970 6391Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6392
6393Copying and distribution of this file, with or without modification,
6394are permitted in any medium without royalty provided the copyright
6395notice and this notice are preserved.