]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
compiler: mangle dots in pkgpath
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
fe2bc27c
JM
12019-10-11 Joseph Myers <joseph@codesourcery.com>
2
3 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
4
94e7f906
JJ
52019-10-10 Jakub Jelinek <jakub@redhat.com>
6
7 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
8 true, terminate processing on closing paren and don't skip to end of
9 pragma line.
10 (c_parser_omp_declare_simd): Handle also declare variant.
11 (omp_construct_selectors, omp_device_selectors,
12 omp_implementation_selectors, omp_user_selectors): New variables.
13 (c_parser_omp_context_selector,
14 c_parser_omp_context_selector_specification,
15 c_finish_omp_declare_variant): New functions.
16 (c_finish_omp_declare_simd): Handle both declare simd and
17 declare variant.
18 (c_parser_omp_declare): Handle declare variant.
19
93313b94
JM
202019-10-02 Joseph Myers <joseph@codesourcery.com>
21
22 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
23 CPP_COLON tokens.
24
55879815
RS
252019-10-01 Richard Sandiford <richard.sandiford@arm.com>
26
27 * c-objc-common.c (useful_aka_type_p): New function.
28 (print_type): Use it to decide whether an aka type is worth printing.
29
59bc434a
JJ
302019-09-27 Jakub Jelinek <jakub@redhat.com>
31
32 PR c++/88203
33 * c-parser.c (c_parser_predefined_identifier): New function.
34 (c_parser_postfix_expression): Use it.
35 (c_parser_omp_variable_list): Parse predefined identifiers.
36 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
37 in shared and firstprivate clauses, even when they are predetermined
38 shared.
39
c6447c20
RS
402019-09-27 Richard Sandiford <richard.sandiford@arm.com>
41
42 * c-typeck.c (build_function_call_vec): Take the original function
43 decl as an optional final parameter. Pass all built-in calls to
44 check_builtin_function_arguments.
45
522da4c2
EB
462019-09-20 Eric Botcazou <ebotcazou@adacore.com>
47
48 PR c/91815
49 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
50 of identifiers in the external scope only for variables and functions.
51
68e2c199
PK
522019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
53
54 PR c/78736
55 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
56
22f8849d
IS
572019-08-23 Iain Sandoe <iain@sandoe.co.uk>
58
59 PR pch/61250
60 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
61 after determining that the first token is not
62 PRAGMA_GCC_PCH_PREPROCESS.
63
db376f45
EB
642019-08-22 Eric Botcazou <ebotcazou@adacore.com>
65
66 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
67 FUNCTION_DECL to the right value in the presence of nested declarators.
68
4d732405
RS
692019-08-13 Richard Sandiford <richard.sandiford@arm.com>
70
71 PR middle-end/91421
72 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
73
cb1180d5
RS
742019-08-13 Richard Sandiford <richard.sandiford@arm.com>
75
76 PR middle-end/91421
77 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
78 of a built_in_function.
79 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
80
77eb117f
JJ
812019-08-10 Jakub Jelinek <jakub@redhat.com>
82
83 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
84 (c_parser_omp_clause_device_type): New function.
85 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
86 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
87 (c_parser_omp_declare_target): Handle device_type clauses. Remove
88 diagnostics for declare target with clauses nested in clause-less
89 declare target declaration-definition-seq.
90 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
91
2c3b8bad
JJ
922019-08-09 Jakub Jelinek <jakub@redhat.com>
93
bb522e2e
JJ
94 * c-parser.c (check_no_duplicate_clause): Simplify using
95 omp_find_clause.
96 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
97 directive name modifiers.
98 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
99
2c3b8bad
JJ
100 PR c/91401
101 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
102 check_no_duplicate_clause call. Comment it out, instead emit a
103 warning for duplicate dist_schedule clauses.
104
99769e7f
RS
1052019-08-08 Richard Sandiford <richard.sandiford@arm.com>
106
107 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
108
8860d270
JJ
1092019-08-08 Jakub Jelinek <jakub@redhat.com>
110
111 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
112 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
113 instead of generic_head to track duplicates.
114
398e3feb
JJ
1152019-08-07 Jakub Jelinek <jakub@redhat.com>
116
117 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
118 (c_parser_omp_clause_use_device_addr): New function.
119 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
120 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
121 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
122 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
123 map or use_device_* clauses.
124 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
125 in OpenMP, require pointer type rather than pointer or array type.
126 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
127
a28351e7
JJ
1282019-07-31 Jakub Jelinek <jakub@redhat.com>
129
130 PR c/91192
131 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
132 even if finish is UNKNOWN_LOCATION, just use start as finish in that
133 case.
134
6343b6bf
ML
1352019-07-25 Martin Liska <mliska@suse.cz>
136 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
137
138 PR c++/23383
139 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
140
cb50701e
ML
1412019-07-25 Martin Liska <mliska@suse.cz>
142
143 * c-decl.c (merge_decls): Use new macros
144 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
145
62e3e66f
RB
1462019-07-23 Richard Biener <rguenther@suse.de>
147
148 PR tree-optimization/83518
149 * gimple-parser.c (c_parser_parse_gimple_body): When we have
150 a CFG also rebuild cgraph edges.
151
554a530f
JJ
1522019-07-20 Jakub Jelinek <jakub@redhat.com>
153
154 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
155 (c_parser_omp_clause_bind): New function.
156 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
157 (OMP_LOOP_CLAUSE_MASK): Define.
158 (c_parser_omp_loop): New function.
159 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
160 loop combined with parallel or teams.
161 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
162 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
163
d119bf79
RS
1642019-07-18 Richard Sandiford <richard.sandiford@arm.com>
165
166 PR c/53633
167 * c-decl.c (finish_function): Check targetm.warn_func_return
168 before issuing a -Wreturn-type warning.
169
ab20d992 1702019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
171
172 * gimple-parser.c (c_parser_gimple_try_stmt): New.
173 (c_parser_compound_statement): Call it.
174
1fdd6f04
JJ
1752019-07-12 Jakub Jelinek <jakub@redhat.com>
176
177 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
178 (c_parser_omp_clause_order): New function.
179 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
180 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
181 PRAGMA_OMP_CLAUSE_ORDER.
182 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
183
8389386c
RB
1842019-07-10 Richard Biener <rguenther@suse.de>
185
186 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
187 _Literal (int *) &x for address literals.
188
99b1c316
MS
1892019-07-09 Martin Sebor <msebor@redhat.com>
190
191 PR c++/61339
192 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
193 to class.
194 (field_decl_cmp): Same.
195 * c-parser.c (c_parser_struct_or_union_specifier): Same.
196 * c-tree.h: Same.
197 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
198
6c1dae73
MS
1992019-07-09 Martin Sebor <msebor@redhat.com>
200
201 PR c++/61339
202 * c-decl.c: Change class-key from class to struct and vice versa
203 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
204 * gimple-parser.c: Same.
205
69b5279e
RB
2062019-07-01 Richard Biener <rguenther@suse.de>
207
208 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
209 _Literal (char *) &"foo" for address literals pointing to
210 STRING_CSTs.
211
ab20d992
JJ
2122019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
213
214 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
215 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
216 C incompatibility if alternate "__intN__" form is used.
217
1e3d475e
MS
2182019-06-24 Martin Sebor <msebor@redhat.com>
219
220 * c-typeck.c (build_binary_op): Hyphenate floating-point.
221
bf38f7e9
JJ
2222019-06-10 Jakub Jelinek <jakub@redhat.com>
223
224 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
225 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
226 (c_parser_omp_scan_loop_body): New function.
227 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
228 inscan reduction clauses.
229 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
230 non-inscan reductions on the same construct, or inscan reductions with
231 ordered or schedule clauses, or inscan array reductions.
232
65985d78
MS
2332019-06-05 Martin Sebor <msebor@redhat.com>
234
235 PR c/90737
236 * c-typeck.c (c_finish_return): Only consider functions returning
237 pointers as candidates for -Wreturn-local-addr.
238
0ecf545c
MS
2392019-06-05 Martin Sebor <msebor@redhat.com>
240
241 * c-decl.c (start_decl): Adjust quoting and hyphenation
242 in diagnostics.
243 (finish_decl): Same.
244 (finish_enum): Same.
245 (start_function): Same.
246 (declspecs_add_type): Same.
247 * c-parser.c (warn_for_abs): Same.
248 * c-typeck.c (build_binary_op): Same.
249
e03436e7
TS
2502019-05-17 Thomas Schwinge <thomas@codesourcery.com>
251
b48f44bf
TS
252 PR c/89433
253 * c-parser.c (c_finish_oacc_routine): Rework checking if already
254 marked with an OpenACC 'routine' directive.
255
5bf04509
TS
256 PR c/89433
257 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
258 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
259
e03436e7
TS
260 PR c/89433
261 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
262 clauses from "omp declare target" attribute.
263
a9c697b8
MS
2642019-05-16 Martin Sebor <msebor@redhat.com>
265
ab20d992
JJ
266 * c-decl.c (start_decl): Quote keywords, operators, and
267 types in diagnostics.
268 (finish_decl): Same.
269 * c-parser.c (c_parser_asm_statement): Same.
270 (c_parser_conditional_expression): Same.
271 (c_parser_transaction_cancel): Same.
272 * c-typeck.c (c_common_type): Same.
273 (build_conditional_expr): Same.
274 (digest_init): Same.
275 (process_init_element): Same.
276 (build_binary_op): Same.
a9c697b8 277
c4499192
RB
2782019-05-17 Richard Biener <rguenther@suse.de>
279
280 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
281 (c_parser_gimple_unary_expression): Likewise.
282 (c_parser_gimple_parentized_ternary_expression): New function.
283
adfe6e4b
RB
2842019-05-16 Richard Biener <rguenther@suse.de>
285
286 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
287 (c_parser_gimple_unary_expression): Likewise.
288
186dabf2
RB
2892019-05-15 Richard Biener <rguenther@suse.de>
290
291 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
292 __BIT_FIELD_REF.
293
1158c5b4
RB
2942019-05-14 Richard Biener <rguenther@suse.de>
295
296 * gimple-parser.c (c_parser_gimple_statement): Remove
297 questionable auto-promotion to VIEW_CONVERT_EXPR.
298 (c_parser_gimple_typespec): Split out from __MEM parsing.
299 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
300 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
301 as __VIEW_CONVERT with -gimple.
302
fd4485aa
ML
3032019-05-09 Martin Liska <mliska@suse.cz>
304
305 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
306 __MAX.
307 (c_parser_gimple_unary_expression): Parse also binary expression
308 __MIN and __MAX.
309 (c_parser_gimple_parentized_binary_expression): New function.
310
d276406a
ML
3112019-05-09 Martin Liska <mliska@suse.cz>
312
313 * gimple-parser.c (struct gimple_parser): Add probability.
314 for gimple_parser_edge.
315 (gimple_parser::push_edge): Add new argument probability.
316 (c_parser_gimple_parse_bb_spec): Parse also probability
317 if present.
318 (c_parser_parse_gimple_body): Set edge probability.
319 (c_parser_gimple_compound_statement): Consume token
320 before calling c_parser_gimple_goto_stmt.
321 Parse BB counts.
322 (c_parser_gimple_statement): Pass new argument.
323 (c_parser_gimple_goto_stmt): Likewise.
324 (c_parser_gimple_if_stmt): Likewise.
325 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
326 * c-parser.c (c_parser_declaration_or_fndef): Pass
327 hot_bb_threshold argument.
328 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
329 field.
330 (c_parser_gimple_parse_bb_spec_edge_probability): New.
331
f179b64e
JJ
3322019-04-26 Jakub Jelinek <jakub@redhat.com>
333
334 PR debug/90197
335 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
336 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
337 (c_parser_do_statement): Likewise.
338 (c_parser_for_statement): Likewise. Formatting fixes.
339 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
340 emit DEBUG_BEGIN_STMTs if needed.
341
e7178413
JJ
3422019-04-19 Jakub Jelinek <jakub@redhat.com>
343
c280b7ee
JJ
344 PR c/89888
345 * c-typeck.c (struct c_switch): Remove outside_range_p member.
346 (c_start_case): Don't clear it.
347 (do_case): Adjust c_add_case_label caller.
348 (c_finish_case): Adjust c_do_switch_warnings caller.
349
e7178413
JJ
350 PR c++/90108
351 * c-decl.c (merge_decls): If remove is main variant and
352 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
353 variant that has newdecl as TYPE_NAME if any.
354
60a2c645
JJ
3552019-04-12 Jakub Jelinek <jakub@redhat.com>
356
357 PR c/89933
358 * c-decl.c (merge_decls): When newdecl's type is its main variant,
359 don't try to remove it from the variant list, but instead assert
360 it has no variants.
361
2a82beaa
RB
3622019-04-01 Richard Biener <rguenther@suse.de>
363
364 PR c/71598
365 * c-tree.h (c_get_alias_set): Declare.
366 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
367 * c-objc-common.c (c_get_alias_set): Treat enumeral types
368 as the underlying integer type.
369
bec1da64
MS
3702019-03-19 Martin Sebor <msebor@redhat.com>
371
372 PR tree-optimization/89688
373 * c-decl.c (finish_decl): Call braced_lists_to_string for more
374 kinds of initializers.
375
855cd9b1
JJ
3762019-03-19 Jakub Jelinek <jakub@redhat.com>
377
378 PR c/89734
379 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
380 return type even if quals_used is 0. Formatting fixes.
381
baa09dc5
RB
3822019-03-14 Richard Biener <rguenther@suse.de>
383
384 * c-tree.h (enum c_declspec_il): New.
385 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
386 enum bitfield.
387 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
388 Pass start pass and declspec_il to c_parser_parse_gimple_body.
389 (c_parser_declspecs): Adjust.
390 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
391 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
392 and bitmap.h.
393 (struct gimple_parser): New.
394 (gimple_parser::push_edge): New method.
395 (c_parser_gimple_parse_bb_spec): New helper.
396 (c_parser_parse_gimple_body): Get start pass and IL specification.
397 Initialize SSA and CFG.
398 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
399 Build a gimple_parser parsing state and pass it along.
400 (c_parser_gimple_statement): Change intermittend __PHI internal
401 function argument for the edge.
402 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
403 (c_parser_gimple_goto_stmt): Record edges to build.
404 (c_parser_gimple_if_stmt): Likewise.
405 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
406 (c_parser_gimple_or_rtl_pass_list): Likewise.
407
a3f9f006
ML
4082019-03-11 Martin Liska <mliska@suse.cz>
409
410 * c-decl.c (check_for_loop_decls): Wrap an option name
411 in a string format message and fix GNU coding style.
412 * c-parser.c (c_parser_declspecs): Likewise.
413
1db01ff9
JJ
4142019-03-08 Jakub Jelinek <jakub@redhat.com>
415
416 PR tree-optimization/89550
417 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
418 returned true.
419 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
420 or warning returned true.
421
66dcb747
JJ
4222019-02-28 Jakub Jelinek <jakub@redhat.com>
423
424 PR c/89525
425 * c-typeck.c (convert_arguments): Call inform_declaration only if
426 the previous warning_at call returned true.
427
2263c9f2
TS
4282019-02-22 Thomas Schwinge <thomas@codesourcery.com>
429
430 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
431 parameter. Adjust all users.
432 (c_parser_oacc_simple_clause): Replace parser with loc formal
433 parameter. Adjust all users.
434
ab20d992 4352019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
436
437 PR c/87924
438 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
439 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
440
5f88ba10
JJ
4412019-02-15 Jakub Jelinek <jakub@redhat.com>
442
443 PR c/89340
444 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
445 before c_decl_attributes rather than after it.
446
cfc30fd1
JJ
4472019-02-06 Jakub Jelinek <jakub@redhat.com>
448
449 PR c/89211
450 * c-parser.c (c_parser_declaration_or_fndef): Don't update
451 DECL_ARGUMENTS of d if it has been defined already. Use a single if
452 instead of 3 nested ifs.
453
fbe83e6b
JM
4542019-02-06 Joseph Myers <joseph@codesourcery.com>
455
456 PR c/88584
457 * c-decl.c (finish_decl): Do not complete array types for arrays
458 with external linkage not at file scope.
459
f461f938
RB
4602019-02-05 Richard Biener <rguenther@suse.de>
461
462 PR c/88606
463 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
464 all type variants when not supported.
465
fe509359
JJ
4662019-01-30 Jakub Jelinek <jakub@redhat.com>
467
468 PR c/89061
469 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
470 * c-decl.c (decl_jump_unsafe): Return false for
471 C_DECL_COMPOUND_LITERAL_P decls.
472 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
473
6a335b96
JJ
4742019-01-29 Jakub Jelinek <jakub@redhat.com>
475
f4b7e754
JJ
476 PR c/89045
477 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
478 scope.
479
6a335b96
JJ
480 PR c/86125
481 * c-decl.c (last_fileptr_type): Remove.
482 (last_structptr_types): New variable.
483 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
484 {old,new}rettype instead of the types themselves. Assert
485 last_structptr_types array has the same number of elements
486 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
487 argument oldtype and newtype. Instead of handling
488 just fileptr_type_node specially, handle all builtin_structptr_types
489 pointer nodes. Formatting fix.
490
d8b5a1a0
MS
4912019-01-24 Martin Sebor <msebor@redhat.com>
492
493 PR c/86125
494 PR c/88886
495 PR middle-end/86308
496 * c-decl.c (match_builtin_function_types): Add arguments.
497 (diagnose_mismatched_decls): Diagnose mismatched declarations
498 of built-ins more strictly.
499
e21c4491
JJ
5002019-01-24 Jakub Jelinek <jakub@redhat.com>
501
502 PR c++/88976
503 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
504 on #pragma omp cancel with different modifiers.
505
420183d9
L
5062019-01-18 H.J. Lu <hongjiu.lu@intel.com>
507
508 PR c/51628
509 PR c/88664
510 * c-typeck.c (convert_for_assignment): Upate the
511 warn_for_address_or_pointer_of_packed_member call.
512
17ad43dd
TH
5132019-01-16 Tom Honermann <tom@honermann.net>
514 Jason Merrill <jason@redhat.com>
515
516 * c-typeck.c (digest_init): Revised the error message produced for
517 ill-formed cases of array initialization with a string literal.
518 (error_init): Make variadic.
519
5f07d78a
JJ
5202019-01-12 Jakub Jelinek <jakub@redhat.com>
521
522 * c-typeck.c (convert_for_assignment): Fix a comment typo.
523
c4581bbf
JJ
5242019-01-07 Jakub Jelinek <jakub@redhat.com>
525
526 PR c/88701
527 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
528 if current_function_decl is non-NULL.
529
65c5b1eb
JM
5302019-01-07 Joseph Myers <joseph@codesourcery.com>
531
532 PR c/88720
533 PR c/88726
534 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
535 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
536 functions declared but never defined only for external scope, not
537 for other scopes.
538
d8fcab68
JJ
5392019-01-07 Jakub Jelinek <jakub@redhat.com>
540
541 PR c++/85052
542 * c-parser.c (c_parser_postfix_expression): Parse
543 __builtin_convertvector.
544
a5544970
JJ
5452019-01-01 Jakub Jelinek <jakub@redhat.com>
546
547 Update copyright years.
548
da77eace
L
5492018-12-20 H.J. Lu <hongjiu.lu@intel.com>
550
551 PR c/51628
552 * c-typeck.c (convert_for_assignment): Call
553 warn_for_address_or_pointer_of_packed_member.
554
1edf8866
SB
5552018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
556
557 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
558 a more specific error message (instead of just falling through).
559
db4fd626
SB
5602018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
561
562 * c-parser.c (c_parser_asm_statement): Keep track of the location each
563 asm qualifier is first seen; use that to give nicer "duplicate asm
564 qualifier" messages. Delete 'quals" variable, instead pass the
565 "is_volatile_ flag to build_asm_stmt directly.
566 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
567 * c-typeck.c (build_asm_stmt): Ditto; adjust.
568
9c9cfcbb
SB
5692018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
570
571 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
572 "done" boolean variable.
573
a14feb3c
DM
5742018-12-19 David Malcolm <dmalcolm@redhat.com>
575
576 PR c++/87504
577 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
578 Move from here to gcc-rich-location.h and gcc-rich-location.c.
579 (build_binary_op): Use struct op_location_t and
580 class binary_op_rich_location.
581
6d939173
JJ
5822018-12-11 Jakub Jelinek <jakub@redhat.com>
583
584 PR sanitizer/88426
585 * c-convert.c (convert): Call c_fully_fold before calling
586 ubsan_instrument_float_cast.
587
b7055028
SB
5882018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
589
590 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
591 setting "quals".
592
5b76e75f
SB
5932018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
594
595 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
596 after asm. Pass a flag for it to build_asm_expr.
597 * c-tree.h (build_asm_expr): Update declaration.
598 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
599 set ASM_INLINE_P.
600
30bd42b9
SB
6012018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
602
603 PR inline-asm/55681
604 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
605 combination of volatile and goto, in any order, without repetitions.
606
9df6c0e4
JB
6072018-12-04 James Norris <jnorris@codesourcery.com>
608 Cesar Philippidis <cesar@codesourcery.com>
609 Julian Brown <julian@codesourcery.com>
610
611 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
612 code.
613
f44697b7
RB
6142018-11-30 Richard Biener <rguenther@suse.de>
615
616 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
617 _Literal (type) { ... } as empty aggregate or vector constructor.
618
550dfbdc
MS
6192018-11-29 Martin Sebor <msebor@redhat.com>
620
621 PR c/88091
622 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
623 (convert_arguments): Add comments. Pass additional argument to
624 the function above.
625
673670da
MS
6262018-11-29 Martin Sebor <msebor@redhat.com>
627
628 PR c/88172
629 PR testsuite/88208
630 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
631
db1d09b0
MS
6322018-11-23 Martin Sebor <msebor@redhat.com>
633
634 PR testsuite/88098
635 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
636 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
637
98f08eb8
MS
6382018-11-20 Martin Sebor <msebor@redhat.com>
639
640 * c-parser.c (c_parser_has_attribute_expression): New function.
641 (c_parser_attribute): New function.
642 (c_parser_attributes): Move code into c_parser_attribute.
643 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
644
cd5da983
MS
6452018-11-15 Martin Sebor <msebor@redhat.com>
646
647 PR c/83656
648 * c-decl.c (header_for_builtin_fn): Declare.
649 (diagnose_mismatched_decls): Diagnose declarations of built-in
650 functions without a prototype.
651 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
652 (convert_argument): Same.
653 (convert_arguments): Factor code out into convert_argument.
654 Detect mismatches between built-in formal arguments in calls
655 to built-in without prototype.
656 (build_conditional_expr): Same.
657 (type_or_builtin_type): New function.
658 (convert_for_assignment): Add argument. Conditionally issue
659 warnings instead of errors for mismatches.
660
620e594b
DM
6612018-11-13 David Malcolm <dmalcolm@redhat.com>
662
663 * c-decl.c: Replace "source_location" with "location_t".
664 * c-tree.h: Likewise.
665 * c-typeck.c: Likewise.
666 * gimple-parser.c: Likewise.
667
3179ebae
JJ
6682018-11-09 Jakub Jelinek <jakub@redhat.com>
669
81a227c6
JJ
670 * c-parser.c (c_parser_omp_clause_final): Use
671 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
672 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
673 parsing instead of c_parser_paren_condition.
674 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
675 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
676 c_fully_fold instead of c_parser_condition.
677 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
678 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
679 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
680 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
681 c_parser_expr_no_commas instead of c_parser_expression.
682
98c91c56
JJ
683 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
684 reduction clause with inscan modifier.
685
3179ebae
JJ
686 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
687 clauses other than atomic_default_mem_order.
688
28567c40
JJ
6892018-11-08 Jakub Jelinek <jakub@redhat.com>
690
691 * c-parser.c: Include memmode.h.
692 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
693 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
694 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
695 task_reduction clauses.
696 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
697 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
698 section, or lvalue assignment expression.
699 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
700 (c_parser_omp_clause_lastprivate): Parse optional
701 conditional: modifier.
702 (c_parser_omp_clause_hint): Require constant integer expression rather
703 than just integer expression.
704 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
705 clause.
706 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
707 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
708 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
709 functions.
710 (c_parser_omp_clause_depend): Parse iterator modifier and handle
711 iterators. Parse mutexinoutset and depobj kinds.
712 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
713 callers.
714 (c_parser_omp_all_clauses): Likewise. Handle
715 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
716 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
717 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
718 default memory order from requires directive if any. Adjust
719 c_finish_omp_atomic caller.
720 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
721 (c_parser_omp_flush): Parse flush with memory-order-clause.
722 (c_parser_omp_for_loop): Allow NE_EXPR even in
723 OpenMP loops, adjust c_finish_omp_for caller.
724 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
725 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
726 Allow to be called while parsing combined parallel master.
727 Parse combined master taskloop{, simd}.
728 (c_parser_omp_parallel): Parse combined
729 parallel master{, taskloop{, simd}} constructs.
730 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
731 (OMP_TASKGROUP_CLAUSE_MASK): Define.
732 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
733 (OMP_TASKWAIT_CLAUSE_MASK): Define.
734 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
735 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
736 around teams body. Use SET_EXPR_LOCATION.
737 (c_parser_omp_target_data): Allow target data
738 with only use_device_ptr clauses.
739 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
740 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
741 (c_parser_omp_requires): New function.
742 (c_finish_taskloop_clauses): New function.
743 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
744 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
745 declaration. Disallow in_reduction clause when combined with parallel
746 master.
747 (c_parser_omp_construct): Adjust c_parser_omp_master and
748 c_parser_omp_taskgroup callers.
749 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
750 other than cancel.
751 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
752 like OMP_CLAUSE_REDUCTION.
753 (handle_omp_array_sections): Likewise. Call save_expr on array
754 reductions before calling build_index_type. Handle depend clauses
755 with iterators.
756 (struct c_find_omp_var_s): New type.
757 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
758 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
759 with static, runtime or auto schedule kinds. Call save_expr for whole
760 array reduction sizes. Diagnose reductions with zero sized elements
761 or variable length structures. Diagnose nogroup clause used with
762 reduction clause(s). Handle depend clause with
763 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
764 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
765 some different type for other kinds. Use build_unary_op with
766 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
767 Handle depend clauses with iterators. Remove no longer needed special
768 case that predetermined const qualified vars may be specified in
769 firstprivate clause. Complain if const qualified vars are mentioned
770 in data-sharing clauses other than firstprivate or shared. Use
771 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
772 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
773 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
774 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
775
7e2de6df
DM
7762018-10-29 David Malcolm <dmalcolm@redhat.com>
777
778 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
779 logic for change to name_hint::operator bool.
780 (undeclared_variable): Likewise.
781 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
782 (c_parser_parameter_declaration): Likewise.
783
9f936c86
JM
7842018-10-17 Joseph Myers <joseph@codesourcery.com>
785
786 * c-errors.c (pedwarn_c11): New function.
787 * c-parser.c (disable_extension_diagnostics): Save
788 warn_c11_c2x_compat and set it to 0.
789 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
790 (c_parser_static_assert_declaration_no_semi): Handle
791 _Static_assert without string constant.
792 * c-tree.h (pedwarn_c11): New prototype.
793
033eb567
DM
7942018-10-17 David Malcolm <dmalcolm@redhat.com>
795
796 * Make-lang.in (selftest-c): New.
797 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
798 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
799 from gcc/Makefile.in.
800
0edf3afe
RB
8012018-10-02 Richard Biener <rguenther@suse.de>
802
803 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
804
8313a764
JM
8052018-09-26 Joseph Myers <joseph@codesourcery.com>
806
807 PR c/87390
808 * c-typeck.c (build_binary_op): Use excess precision for
809 comparisons of integers and floating-point for C11 and later.
810
ce6f0888
MJ
8112018-09-26 Martin Jambor <mjambor@suse.cz>
812
813 PR c/87347
814 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 815 comment.
ce6f0888 816
9c4a4b3c
DM
8172018-09-17 David Malcolm <dmalcolm@redhat.com>
818
819 * c-objc-common.c (range_label_for_type_mismatch::get_text):
820 Update for new param.
821 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
822 Likewise.
823
80c6d1f4
MJ
8242018-09-17 Martin Jambor <mjambor@suse.cz>
825
826 PR c/63886
827 * c-parser.c: (warn_for_abs): New function.
828 (c_parser_postfix_expression_after_primary): Call it.
829
4a426e36
BE
8302018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
831
832 * c-typeck.c (digest_init): Shorten overlength strings.
833
6d900107
BE
8342018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
835
836 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
837
b5764229
BE
8382018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
839
840 * c-decl.c (finish_decl): Call braced_list_to_string here ...
841 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
842
22eea6b2
AM
8432018-08-30 Alexander Monakov <amonakov@ispras.ru>
844
845 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
846 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
847
85204e23
DM
8482018-08-27 David Malcolm <dmalcolm@redhat.com>
849
850 PR 87091
851 * c-decl.c (implicitly_declare): Update call to
852 maybe_add_include_fixit to suggest overriding the location, as it
853 is for a note.
854 * c-objc-common.c (c_tree_printer): Update for conversion of
855 show_caret_p to a tri-state.
856
3d78e008
ML
8572018-08-27 Martin Liska <mliska@suse.cz>
858
859 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
860 fndecl_built_in_p and remove check for FUNCTION_DECL if
861 possible.
3d78e008
ML
862 (diagnose_mismatched_decls): Likewise.
863 (merge_decls): Likewise.
864 (warn_if_shadowing): Likewise.
865 (pushdecl): Likewise.
866 (implicitly_declare): Likewise.
867 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
868 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
869 * c-typeck.c (build_function_call_vec): Likewise.
870 (convert_arguments): Likewise.
871
097f82ec
DM
8722018-08-20 David Malcolm <dmalcolm@redhat.com>
873
874 PR other/84889
875 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
876 (diagnose_mismatched_decls): Likewise, in various places.
877 (warn_if_shadowing): Likewise.
878 (implicit_decl_warning): Likewise.
879 (implicitly_declare): Likewise.
880 (undeclared_variable): Likewise.
881 (declare_label): Likewise.
882 (grokdeclarator): Likewise.
883 (start_function): Likewise.
884 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
885 (c_parser_parameter_declaration): Likewise.
886 (c_parser_binary_expression): Likewise.
887 * c-typeck.c (c_expr_sizeof_expr): Likewise.
888 (parser_build_binary_op): Likewise.
889 (build_unary_op): Likewise.
890 (error_init): Likewise.
891 (pedwarn_init): Likewise.
892 (warning_init): Likewise.
893 (convert_for_assignment): Likewise.
894
96e6ae57
DM
8952018-08-15 David Malcolm <dmalcolm@redhat.com>
896
897 * c-objc-common.c: Include "gcc-rich-location.h".
898 (c_tree_printer): Move implemenation of '%T' to...
899 (print_type): ...this new function.
900 (range_label_for_type_mismatch::get_text): New function.
901 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
902 range for the various ic_argpass cases.
903 (class maybe_range_label_for_tree_type_mismatch): New class.
904 (build_binary_op): Use it when calling binary_op_error.
905
0cd020ae 9062018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 907
0cd020ae
PK
908 * c-decl.c (start_decl): Do not warn if variables is named as main
909 and is a local variable.
910
72733314
IS
9112018-08-15 Iain Sandoe <iain@sandoe.co.uk>
912
913 PR c/19315
914 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
915 objects of unknown size.
916
23aa9f7c
MS
9172018-08-13 Martin Sebor <msebor@redhat.com>
918
919 PR tree-optimization/71625
920 * c-parser.c (c_parser_declaration_or_fndef): Call
921 braced_list_to_string.
922
e5e7e50d
BH
9232018-08-03 Bogdan Harjoc <harjoc@gmail.com>
924
925 PR c/86690
926 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
927 errors.
928
8a45b051
MS
9292018-08-01 Martin Sebor <msebor@redhat.com>
930
931 PR tree-optimization/86650
932 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
933 and TREE_BLOCK (t) from within percent_K_format to this callsite.
934
5922dcb5
JJ
9352018-08-01 Jakub Jelinek <jakub@redhat.com>
936
937 PR c/85704
938 * c-typeck.c (init_field_decl_cmp): New function.
939 (output_pending_init_elements): Use it for field comparisons
940 instead of pure bit_position comparisons.
941
9b452033
JJ
9422018-07-12 Jakub Jelinek <jakub@redhat.com>
943
944 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
945 type here, instead add "omp declare target implicit" attribute.
946 (finish_decl): Diagnose vars without mappable type here.
947
ab20d992
JJ
9482018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
949 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
950 Cesar Philippidis <cesar@codesourcery.com>
951
952 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
953 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
954 to their non-present_or_* counterparts. Make 'self' an alias to
955 PRAGMA_OACC_CLAUSE_HOST.
956 (c_parser_oacc_data_clause): Update GOMP mappings for
957 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
958 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
959 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
960 Remove support for present_or_* clauses.
961 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
962 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
963 (OACC_DECLARE_CLAUSE_MASK): Likewise.
964 (OACC_DATA_CLAUSE_MASK): Likewise.
965 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
966 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
967 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
968 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
969 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
970
e197e64e
KV
9712018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
972
973 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
974 * gimple-parser.c (c_parser_gimple_statement): Likewise.
975 (c_parser_gimple_unary_expression): Likewise.
976
487f2f61
JJ
9772018-06-15 Jakub Jelinek <jakub@redhat.com>
978
979 PR c/86093
980 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
981 before doing POINTER_DIFF_EXPR.
982
e4d44a37
MP
9832018-06-07 Marek Polacek <polacek@redhat.com>
984
985 PR c/85318
986 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
987 for loop initial declarations.
988
b67b9225
DP
9892018-05-30 David Pagan <dave.pagan@oracle.com>
990
991 PR c/55976
992 * c-decl.c (grokdeclarator): Update check for return type warnings.
993 (start_function): Likewise.
994 (finish_function): Likewise.
995 * c-typeck.c (c_finish_return): Update check for return type warnings.
996 Pass OPT_Wreturn_type to pedwarn when appropriate.
997
c566cc9f
RS
9982018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
999
1000 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1001 __FMA_EXPR handlng.
1002
e4f81565
RS
10032018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1004
1005 * gimple-parser.c: Include internal-fn.h.
1006 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1007 (c_parser_gimple_call_internal): New function.
1008 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1009 Fix typos in comment.
1010
79e7b1fe
JJ
10112018-05-10 Jakub Jelinek <jakub@redhat.com>
1012
1013 PR c++/85662
1014 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1015 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1016 fold_convert_loc.
1017 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1018 fold_offsetof_1, pass argtype as TYPE to it and drop the
1019 fold_convert_loc.
1020
f7584c81
DP
10212018-05-02 David Pagan <dave.pagan@oracle.com>
1022
1023 PR c/30552
1024 * c-decl.c (old_style_parameter_scope): New function.
1025 * c-parser.c (c_parser_postfix_expression): Check for statement
1026 expressions in old-style function parameter list declarations.
1027 * c-parser.h (old_style_parameter_scope): New extern declaration.
1028
b33a0cb3
JJ
10292018-04-25 Jakub Jelinek <jakub@redhat.com>
1030
1031 PR sanitizer/84307
1032 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1033 it is not TREE_STATIC.
1034 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1035 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1036 its COMPOUND_LITERAL_EXPR_DECL.
1037
c5c5822a
JM
10382018-03-21 Joseph Myers <joseph@codesourcery.com>
1039
1040 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1041 where all functions return the same _FloatN or _FloatNx type,
1042 treat integer types as _Float64 instead of double.
1043
aa1c9429
JJ
10442018-03-21 Jakub Jelinek <jakub@redhat.com>
1045
1046 PR c/84999
1047 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1048 building vector comparison, diagnose it and return error_mark_node.
1049
9bb45a95
JJ
10502018-03-15 Jakub Jelinek <jakub@redhat.com>
1051
1052 PR c/84853
1053 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1054 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1055 INTEGER_TYPE element type.
1056
ada6bad9
DP
10572018-03-13 David Pagan <dave.pagan@oracle.com>
1058
1059 PR c/46921
1060 * c-typeck.c (output_init_element): Ensure field initializer
1061 expression is always evaluated if there are side effects.
1062
849bbdb9
JJ
10632018-03-06 Jakub Jelinek <jakub@redhat.com>
1064
1065 PR c/84721
1066 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1067 !building_stmt_list_p ().
1068
d74641bd
RS
10692018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1070
1071 PR c/84305
1072 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1073 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1074 and include the BIND_EXPR in the list of things that need to be
1075 pre-evaluated.
1076
0444aa9c
NS
10772018-02-09 Nathan Sidwell <nathan@acm.org>
1078
1079 PR c/84293
1080 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1081 to strict_aliasing_warning.
1082
7c30b12a
PC
10832018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1084
1085 * c-typeck.c (really_start_incremental_init, push_init_level,
1086 set_nonincremental_init, output_init_element, process_init_element):
1087 Use DECL_UNNAMED_BIT_FIELD.
1088
2be4dfcb
MP
10892018-01-31 Marek Polacek <polacek@redhat.com>
1090
1091 PR c/81779
1092 * c-parser.c (c_parser_compound_statement_nostart): Call
1093 expansion_point_location_if_in_system_header.
1094
bb9869d5
DM
10952018-01-17 David Malcolm <dmalcolm@redhat.com>
1096
1097 PR c++/83814
1098 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1099 the C part.
1100
b4923738
JJ
11012018-01-13 Jakub Jelinek <jakub@redhat.com>
1102
1103 PR c/83801
1104 * c-tree.h (decl_constant_value_1): Add a bool argument.
1105 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1106 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1107 (decl_constant_value): Adjust caller.
1108 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1109 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1110 decl_constant_value returns initializer that has BLKmode or
1111 array type.
1112 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1113
928686b1
RS
11142018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1115 Alan Hayward <alan.hayward@arm.com>
1116 David Sherwood <david.sherwood@arm.com>
1117
1118 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1119 TYPE_VECTOR_SUBPARTS.
1120
85ec4feb
JJ
11212018-01-03 Jakub Jelinek <jakub@redhat.com>
1122
1123 Update copyright years.
1124
913884f7
JJ
11252018-01-01 Jakub Jelinek <jakub@redhat.com>
1126
1127 PR c/83595
1128 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1129 c_parser_conditional_expression, c_parser_cast_expression,
1130 c_parser_sizeof_expression, c_parser_alignof_expression,
1131 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1132 c_parser_transaction_expression): Use set_error () method instead
1133 of setting value member to error_mark_node.
1134
c6cfa2bf
MM
11352017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1136
1137 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1138 and _Float<N>X built-in functions.
1139
11d29d63
JJ
11402017-12-22 Jakub Jelinek <jakub@redhat.com>
1141
14ec014e
JJ
1142 PR debug/83550
1143 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1144 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1145 incomplete vars rather than after it.
1146
11d29d63
JJ
1147 PR debug/83547
1148 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1149 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1150 and consider empty ones if there are no other stmts. For
1151 -Wunused-value walk all statements before the one only followed by
1152 DEBUG_BEGIN_STMTs.
1153
170a8bd6 11542017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1155 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1156
1157 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1158 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1159 (c_parser_do_statement): Likewise.
1160 (c_parser_for_statement): Likewise.
1161 (c_parser_statement_after_labels): Adjust calls to above.
1162 (c_parse_pragma_ivdep): New static function.
1163 (c_parser_pragma_unroll): Likewise.
1164 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1165 <PRAGMA_UNROLL>: New case.
1166
01512446
JJ
11672017-12-19 Jakub Jelinek <jakub@redhat.com>
1168
1169 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1170 perform_integral_promotions, digest_init): Replace Yoda conditions
1171 with typical order conditions.
1172 * c-decl.c (check_bitfield_type_and_width): Likewise.
1173
c65e18d3
BE
11742017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1175
1176 * c-typeck.c (c_safe_arg_type_equiv_p,
1177 c_safe_function_type_cast_p): New function.
1178 (build_c_cast): Implement -Wcast-function-type.
1179
b7280579
RB
11802017-12-14 Richard Biener <rguenther@suse.de>
1181
1182 PR c/83415
1183 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1184 like REALPART_EXPR for the behavior of whether its operand
1185 is an lvalue.
1186
49e6a6c0
MP
11872017-12-12 Marek Polacek <polacek@redhat.com>
1188
1189 PR c/82679
1190 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1191
ab20d992 11922017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1193
1194 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1195 * c-parser.c (add_debug_begin_stmt): New.
1196 (c_parser_declaration_or_fndef): Call it.
1197 (c_parser_compound_statement_nostart): Likewise.
1198 (c_parser_statement_after_labels): Likewise.
1199 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1200
4b2b493f
JM
12012017-12-07 Joseph Myers <joseph@codesourcery.com>
1202
1203 * c-decl.c (build_compound_literal): Add parameter alignas_align
1204 and set alignment of decl if nonzero.
1205 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1206 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1207 qualifier.
1208 (c_parser_struct_declaration): Update syntax comment.
1209 (c_parser_type_name): Add alignas_ok argument and pass it to
1210 c_parser_declspecs.
1211 (c_parser_cast_expression): Pass true to c_parser_type_name and
1212 give error if a cast used an _Alignas specifier.
1213 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1214 give error if sizeof (type-name) used an _Alignas specifier.
1215 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1216 give error if _Alignof (type-name) used an _Alignas specifier.
1217 (c_parser_postfix_expression_after_paren_type): Check specified
1218 alignment for a compound literal and pass it to
1219 build_compound_literal.
1220 * c-parser.h (c_parser_type_name): Update prototype.
1221 * c-tree.h (build_compound_literal): Update prototype.
1222
5d9ae53d
MS
12232017-12-07 Martin Sebor <msebor@redhat.com>
1224
1225 PR c/81544
1226 * c-decl.c (c_decl_attributes): Look up existing declaration and
1227 pass it to decl_attributes.
1228
c79144f8
DM
12292017-12-06 David Malcolm <dmalcolm@redhat.com>
1230
1231 PR c/83236
1232 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1233 reserved for use by the implementation.
1234
613bc14f
DM
12352017-12-06 David Malcolm <dmalcolm@redhat.com>
1236
1237 * c-decl.c: Include "c-family/c-spellcheck.h".
1238
05abad4c
ML
12392017-12-05 Martin Liska <mliska@suse.cz>
1240 Jakub Jelinek <jakub@redhat.com>
1241
1242 * c-typeck.c (pointer_diff): Add new argument and instrument
1243 pointer subtraction.
1244 (build_binary_op): Similar for pointer comparison.
1245
cc6534d4
JJ
12462017-12-01 Jakub Jelinek <jakub@redhat.com>
1247
65791f42
JJ
1248 PR c/79153
1249 * c-parser.c: Include tree-iterator.h.
1250 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1251 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1252 on it.
1253
cc6534d4
JJ
1254 PR c/83222
1255 * c-tree.h (decl_constant_value_1): Declare.
1256 * c-typeck.c (decl_constant_value_1): New function.
1257 (decl_constant_value): Use it.
1258 * c-fold.c (c_fully_fold_internal): If in_init, use
1259 decl_constant_value_1 instead of decl_constant_value.
1260
5de73c05
JJ
12612017-11-30 Jakub Jelinek <jakub@redhat.com>
1262
1263 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1264
058f0b9e
JJ
12652017-11-28 Jakub Jelinek <jakub@redhat.com>
1266
1267 PR sanitizer/81275
1268 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1269 c_switch_covers_all_cases_p returns true.
1270
5e9d6aa4 12712017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1272 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1273
1274 * Make-lang.in (c/c-array-notation.o): Remove.
1275 * c-array-notation.c: Delete.
1276 * c-decl.c: Remove cilkplus condition.
1277 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1278 c_parser_cilk_verify_simd, c_parser_array_notation,
1279 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1280 c_parser_cilk_simd_fn_vector_attrs,
1281 c_finish_cilk_simd_fn_tokens): Delete.
1282 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1283 (c_parser_direct_declarator_inner): Ditto.
1284 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1285 (c_parser_attributes, c_parser_compound_statement,
1286 c_parser_statement_after_labels, c_parser_if_statement,
1287 c_parser_switch_statement, c_parser_while_statement,
1288 c_parser_do_statement, c_parser_for_statement,
1289 c_parser_unary_expression, c_parser_postfix_expression,
1290 c_parser_postfix_expression_after_primary,
1291 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1292 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1293 support.
1294 * c-typeck.c (build_array_ref, build_function_call_vec,
1295 convert_arguments,
1296 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1297 c_finish_loop, build_binary_op): Remove cilkplus support.
1298
9e851845
JJ
12992017-11-28 Jakub Jelinek <jakub@redhat.com>
1300
1301 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1302 of build3.
1303
ab20d992 13042017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
1305
1306 * Make-lang.in (c.install-plugin): Install backend import library.
1307
41521dee
JJ
13082017-11-23 Jakub Jelinek <jakub@redhat.com>
1309
1310 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1311 pragma_stmt context.
1312
ac9effed
EB
13132017-11-23 Mike Stump <mikestump@comcast.net>
1314 Eric Botcazou <ebotcazou@adacore.com>
1315
1316 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1317 ANNOTATE_EXPR.
1318 (c_parser_do_statement): Likewise.
1319 (c_parser_for_statement): Likewise.
1320
ce95abc4
DM
13212017-11-22 David Malcolm <dmalcolm@redhat.com>
1322
1323 PR c++/62170
1324 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1325 bool to bool *. Within '%T' handling, if showing an "aka", use
1326 "quoted" param to add appropriate quoting.
1327
974aedcc
MP
13282017-11-22 Marek Polacek <polacek@redhat.com>
1329
1330 PR c++/60336
1331 PR middle-end/67239
1332 PR target/68355
1333 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1334
d4300cc6
DM
13352017-11-21 David Malcolm <dmalcolm@redhat.com>
1336
1337 PR c/83056
1338 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1339 earlier failed lookups.
1340
1af4ebf5
MG
13412017-11-21 Marc Glisse <marc.glisse@inria.fr>
1342
1343 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1344 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1345
26edace6
DM
13462017-11-20 David Malcolm <dmalcolm@redhat.com>
1347
1348 PR c/81404
1349 * c-decl.c: Include "c-family/known-headers.h".
1350 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1351 to known-headers.cc.
1352 (class suggest_missing_header): Move to known-header.h.
1353 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1354 than get_c_name_hint.
1355
b1212255
DM
13562017-11-20 David Malcolm <dmalcolm@redhat.com>
1357
1358 * c-decl.c (get_c_name_hint): New function.
1359 (class suggest_missing_header): New class.
1360 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1361 suggest missing headers to the user.
1362
6c7a259b
DM
13632017-11-20 David Malcolm <dmalcolm@redhat.com>
1364
1365 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1366 Include "c-family/name-hint.h"
1367 (implicit_decl_warning): Convert "hint" from
1368 const char * to name_hint. Pass location to
1369 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1370 warning was not printed.
1371 (undeclared_variable): Likewise for "guessed_id".
1372 (lookup_name_fuzzy): Convert return type from const char *
1373 to name_hint. Add location_t param.
1374 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1375 Include "c-family/name-hint.h"
1376 (c_parser_declaration_or_fndef): Convert "hint" from
1377 const char * to name_hint. Pass location to lookup_name_fuzzy.
1378 (c_parser_parameter_declaration): Likewise.
1379
f9c59f7e
JJ
13802017-11-19 Jakub Jelinek <jakub@redhat.com>
1381
1382 PR c/66618
1383 PR c/69960
1384 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1385 where needed.
1386 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1387 handle_omp_array_sections): Likewise.
1388 (digest_init): Don't call decl_constant_value_for_optimization.
1389 * c-tree.h (decl_constant_value_for_optimization): Removed.
1390 * c-fold.c (c_fold_array_ref): New function.
1391 (c_fully_fold_internal): Add LVAL argument, propagate it through
1392 recursive calls. For VAR_P call decl_constant_value and
1393 unshare if not LVAL and either optimizing or IN_INIT. Remove
1394 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1395 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1396 (c_fully_fold): Add LVAL argument, pass it through to
1397 c_fully_fold_internal.
1398 (decl_constant_value_for_optimization): Removed.
1399
3ca0dc60
JM
14002017-11-15 Joseph Myers <joseph@codesourcery.com>
1401
1402 PR c/81156
1403 * c-parser.c (check_tgmath_function): New function.
1404 (enum tgmath_parm_kind): New enum.
1405 (c_parser_postfix_expression): Handle __builtin_tgmath.
1406
64a5912c
DM
14072017-10-31 David Malcolm <dmalcolm@redhat.com>
1408
1409 * c-decl.c (implicit_decl_warning): Update for renaming of
1410 pedwarn_at_rich_loc and warning_at_rich_loc.
1411 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1412 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1413 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1414 (c_parser_struct_or_union_specifier): Likewise for renaming of
1415 pedwarn_at_rich_loc.
1416 (c_parser_parameter_declaration): Likewise for renaming of
1417 error_at_rich_loc.
1418 * c-typeck.c (build_component_ref): Likewise.
1419 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1420 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1421 (set_init_label): Likewise for renaming of error_at_rich_loc.
1422
c1136864
RB
14232017-10-30 Richard Biener <rguenther@suse.de>
1424
1425 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1426 stmts.
1427
ee5fd23a
MM
14282017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1429
1430 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1431 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1432
1a59ccf2
DM
14332017-10-25 David Malcolm <dmalcolm@redhat.com>
1434
1435 PR c/7356
1436 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1437 semicolons.
1438
bc1a75dd
JJ
14392017-10-25 Jakub Jelinek <jakub@redhat.com>
1440
1441 PR libstdc++/81706
1442 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1443 newdecl to corresponding __builtin_ if any.
1444
ff1ff960
PC
14452017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1446
1447 PR c++/82466
1448 * c-decl.c (diagnose_mismatched_decls): Use
1449 OPT_Wbuiltin_declaration_mismatch.
1450
62e1c678
DM
14512017-10-12 David Malcolm <dmalcolm@redhat.com>
1452
1453 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1454 use it to guard calls to maybe_suggest_missing_token_insertion.
1455 (c_parser_parms_list_declarator): Override default value of new
1456 "type_is_unique" param to c_parser_require.
1457 (c_parser_asm_statement): Likewise.
1458 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1459 defaulting to true.
1460
a92f6726
NS
14612017-10-11 Nathan Sidwell <nathan@acm.org>
1462
1463 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1464
8e6cdc90
RS
14652017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1466
1467 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1468 operating on trees as wide_ints.
1469 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1470 (c_tree_equal): Likewise.
1471
8139a48e
DM
14722017-10-04 David Malcolm <dmalcolm@redhat.com>
1473
1474 * c-decl.c (push_parm_decl): Store c_parm's location into the
1475 PARAM_DECL.
1476 (build_c_parm): Add "loc" param and store it within the c_parm.
1477 * c-parser.c (struct c_parser): Add "last_token_location" field.
1478 (c_parser_consume_token): Store location of the token into the
1479 new field.
1480 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1481 when handling a FUNCTION_DECL, if it doesn't already have them.
1482 (c_parser_parameter_declaration): Generate a location for the
1483 parameter, and pass it to the call to build_c_parm.
1484 * c-tree.h (struct c_parm): Add field "loc".
1485 (build_c_parm): Add location_t param.
1486 * c-typeck.c (get_fndecl_argument_location): New function.
1487 (inform_for_arg): New function.
1488 (convert_for_assignment): Use inform_for_arg when dealing with
1489 ic_argpass.
1490
2a389958
JJ
14912017-09-29 Jakub Jelinek <jakub@redhat.com>
1492
7d386d45
JJ
1493 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1494 width is non-NULL.
1495 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1496 don't SET_DECL_C_BIT_FIELD here.
1497
2a389958
JJ
1498 PR c/82340
1499 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1500 instead of trying to set just TREE_READONLY manually.
1501
ebc6a85e
TV
15022017-09-16 Tom de Vries <tom@codesourcery.com>
1503
1504 PR c/81875
1505 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1506 cond itself.
1507
bb75facd
JM
15082017-09-15 Joseph Myers <joseph@codesourcery.com>
1509
1510 PR c/82071
1511 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1512 for C11.
1513 (build_conditional_expr): For C11, generate result with excess
1514 precision when one argument is an integer and the other is of a
1515 type using excess precision.
1516
1d933576
BE
15172017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1518
1519 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1520
267bbb6f
MP
15212017-09-13 Marek Polacek <polacek@redhat.com>
1522
1523 PR c/82167
1524 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1525 than expr.original_type.
1526
6836632e
NS
15272017-09-12 Nathan Sidwell <nathan@acm.org>
1528
1529 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1530 resort_sorted_fields): Moved from c-family/c-common.c.
1531 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1532
e035be33
JM
15332017-09-01 Joseph Myers <joseph@codesourcery.com>
1534
1535 PR c/82071
1536 * c-typeck.c (build_atomic_assign): Handle argument with excess
1537 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1538 argument passed to build_binary_op and convert_for_assignment but
1539 not for call to c_fully_fold.
1540 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1541 Ensure build_binary_op is called with argument with original
1542 semantic type. Avoid calling c_fully_fold with an
1543 EXCESS_PRECISION_EXPR from build_binary_op.
1544
d2e05fcb
JJ
15452017-09-01 Jakub Jelinek <jakub@redhat.com>
1546
1547 PR c/81887
1548 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1549
b397965c
RS
15502017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1551 Alan Hayward <alan.hayward@arm.com>
1552 David Sherwood <david.sherwood@arm.com>
1553
1554 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1555 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1556 m1 and m2 to the signed equivalent of a fixed-point
1557 SCALAR_TYPE_MODE.
1558
14e18d71
DM
15592017-08-24 David Malcolm <dmalcolm@redhat.com>
1560
1561 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1562 than CAN_HAVE_LOCATION_P when determining whether to use the
1563 location_t value within "value".
1564
7f204c0f
DM
15652017-08-21 David Malcolm <dmalcolm@redhat.com>
1566
1567 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1568 rather than peeking the location of the first token.
1569 * c-tree.h (c_expr::get_location): New method.
1570
2f687306
DM
15712017-08-21 David Malcolm <dmalcolm@redhat.com>
1572
1573 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1574 to check_function_arguments.
1575
3e7b80d7
MP
15762017-08-18 Marek Polacek <polacek@redhat.com>
1577
1578 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1579 commentary.
1580
00aa1fa2
L
15812017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1582
1583 PR c/53037
1584 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1585 (check_bitfield_type_and_width): Don't allow bit-field with
1586 warn_if_not_aligned type.
1587
da67acb9
MS
15882017-08-14 Martin Sebor <msebor@redhat.com>
1589
1590 PR c/81117
1591 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1592
bb85aa74
MP
15932017-08-11 Marek Polacek <polacek@redhat.com>
1594
1595 PR c/81795
1596 * c-decl.c (pushtag): Only print inform if the warning was printed.
1597 (grokdeclarator): Likewise.
1598
32129a17
DM
15992017-08-10 David Malcolm <dmalcolm@redhat.com>
1600
1601 * c-parser.c (c_parser_error): Rename to...
1602 (c_parser_error_richloc): ...this, making static, and adding
1603 "richloc" parameter, passing it to the c_parse_error call,
1604 rather than calling c_parser_set_source_position_from_token.
1605 (c_parser_error): Reintroduce, reimplementing in terms of the
1606 above, converting return type from void to bool.
1607 (class token_pair): New class.
1608 (struct matching_paren_traits): New struct.
1609 (matching_parens): New typedef.
1610 (struct matching_brace_traits): New struct.
1611 (matching_braces): New typedef.
1612 (get_matching_symbol): New function.
1613 (c_parser_require): Add param MATCHING_LOCATION, using it to
1614 highlight matching "opening" tokens for missing "closing" tokens.
1615 (c_parser_skip_until_found): Likewise.
1616 (c_parser_static_assert_declaration_no_semi): Convert explicit
1617 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1618 class matching_parens, so that the pertinent open parenthesis is
1619 highlighted when there are problems locating the close
1620 parenthesis.
1621 (c_parser_struct_or_union_specifier): Likewise.
1622 (c_parser_typeof_specifier): Likewise.
1623 (c_parser_alignas_specifier): Likewise.
1624 (c_parser_simple_asm_expr): Likewise.
1625 (c_parser_braced_init): Likewise, for matching_braces.
1626 (c_parser_paren_condition): Likewise, for matching_parens.
1627 (c_parser_switch_statement): Likewise.
1628 (c_parser_for_statement): Likewise.
1629 (c_parser_asm_statement): Likewise.
1630 (c_parser_asm_operands): Likewise.
1631 (c_parser_cast_expression): Likewise.
1632 (c_parser_sizeof_expression): Likewise.
1633 (c_parser_alignof_expression): Likewise.
1634 (c_parser_generic_selection): Likewise.
1635 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1636 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1637 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1638 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1639 c_parser_skip_until_found call.
1640 (c_parser_objc_class_definition): Use class matching_parens as
1641 above.
1642 (c_parser_objc_method_decl): Likewise.
1643 (c_parser_objc_try_catch_finally_statement): Likewise.
1644 (c_parser_objc_synchronized_statement): Likewise.
1645 (c_parser_objc_at_property_declaration): Likewise.
1646 (c_parser_oacc_wait_list): Likewise.
1647 (c_parser_omp_var_list_parens): Likewise.
1648 (c_parser_omp_clause_collapse): Likewise.
1649 (c_parser_omp_clause_default): Likewise.
1650 (c_parser_omp_clause_if): Likewise.
1651 (c_parser_omp_clause_num_threads): Likewise.
1652 (c_parser_omp_clause_num_tasks): Likewise.
1653 (c_parser_omp_clause_grainsize): Likewise.
1654 (c_parser_omp_clause_priority): Likewise.
1655 (c_parser_omp_clause_hint): Likewise.
1656 (c_parser_omp_clause_defaultmap): Likewise.
1657 (c_parser_oacc_single_int_clause): Likewise.
1658 (c_parser_omp_clause_ordered): Likewise.
1659 (c_parser_omp_clause_reduction): Likewise.
1660 (c_parser_omp_clause_schedule): Likewise.
1661 (c_parser_omp_clause_num_teams): Likewise.
1662 (c_parser_omp_clause_thread_limit): Likewise.
1663 (c_parser_omp_clause_aligned): Likewise.
1664 (c_parser_omp_clause_linear): Likewise.
1665 (c_parser_omp_clause_safelen): Likewise.
1666 (c_parser_omp_clause_simdlen): Likewise.
1667 (c_parser_omp_clause_depend): Likewise.
1668 (c_parser_omp_clause_map): Likewise.
1669 (c_parser_omp_clause_device): Likewise.
1670 (c_parser_omp_clause_dist_schedule): Likewise.
1671 (c_parser_omp_clause_proc_bind): Likewise.
1672 (c_parser_omp_clause_uniform): Likewise.
1673 (c_parser_omp_for_loop): Likewise.
1674 (c_parser_cilk_clause_vectorlength): Likewise.
1675 (c_parser_cilk_clause_linear): Likewise.
1676 (c_parser_transaction_expression): Likewise.
1677 * c-parser.h (c_parser_require): Add param matching_location with
1678 default UNKNOWN_LOCATION.
1679 (c_parser_error): Convert return type from void to bool.
1680 (c_parser_skip_until_found): Add param matching_location with
1681 default UNKNOWN_LOCATION.
1682
30af3a2b
MP
16832017-08-09 Marek Polacek <polacek@redhat.com>
1684
1685 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1686 * c-tree.h (build_external_ref): Update declaration.
1687 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1688 (build_external_ref): Change the type of a parameter to bool.
1689 (parser_build_binary_op): Use true/false instead of 1/0.
1690 (pointer_diff): Likewise.
1691 (build_modify_expr): Likewise.
1692 (set_designator): Change the type of a parameter to bool.
1693 (set_init_index): Use true/false instead of 1/0.
1694 (set_init_label): Likewise.
1695 (output_init_element): Change the type of a parameter to bool.
1696 (output_pending_init_elements): Use true/false instead of 1/0.
1697 (process_init_element): Likewise.
1698 (build_binary_op): Change the type of a parameter to bool.
1699
296c53ac
MP
17002017-08-09 Marek Polacek <polacek@redhat.com>
1701
1702 PR c/81233
1703 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1704 Call emit_diagnostic_valist instead of pedwarn.
1705 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1706 Print the relevant types in diagnostics.
1707
a32c8316
MP
17082017-08-09 Marek Polacek <polacek@redhat.com>
1709
1710 PR c/81417
1711 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 1712 build_conditional_expr.
a32c8316
MP
1713 * c-parser.c (c_parser_conditional_expression): Create locations for
1714 EXP1 and EXP2 from their source ranges. Pass the locations down to
1715 build_conditional_expr.
1716 * c-tree.h (build_conditional_expr): Update declaration.
1717 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1718 For -Wsign-compare, also print the types.
1719
314e6352
ML
17202017-08-08 Martin Liska <mliska@suse.cz>
1721
1722 * c-convert.c: Include header files.
1723 * c-typeck.c: Likewise.
1724
577eec56
ML
17252017-08-07 Martin Liska <mliska@suse.cz>
1726
1727 * c-parser.c (c_parser_attributes): Canonicalize name of an
1728 attribute.
1729
f7b6353a
MP
17302017-08-02 Marek Polacek <polacek@redhat.com>
1731
1732 PR c/81289
1733 * c-parser.c (c_parser_unary_expression): Use set_error.
1734
8a6eab34
MP
1735 PR c/81448
1736 PR c/81306
1737 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1738 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1739
ab20d992 17402017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
1741 Martin Liska <mliska@suse.cz>
1742
1743 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1744 statement.
7fef86d3 1745
f34ebeb2
ML
17462017-07-31 Martin Liska <mliska@suse.cz>
1747
1748 PR sanitize/81530
1749 * c-convert.c (convert): Guard condition with flag_sanitize_p
1750 also with current_function_decl non-null equality.
1751 * c-decl.c (grokdeclarator): Likewise.
1752 * c-typeck.c (build_binary_op): Likewise.
1753
8595f67b
MP
17542017-07-25 Marek Polacek <polacek@redhat.com>
1755
1756 * c-decl.c (grokfield): Remove local variable.
1757
d49718d6
MP
17582017-07-25 Marek Polacek <polacek@redhat.com>
1759
1760 PR c/81364
1761 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1762 macro expansion if the body is in { }.
1763 (c_parser_while_statement): Likewise.
1764 (c_parser_for_statement): Likewise.
1765
ff22eb12
NS
17662017-07-18 Nathan Sidwell <nathan@acm.org>
1767
1768 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1769
eea77d1f
DM
17702017-07-14 David Malcolm <dmalcolm@redhat.com>
1771
1772 * c-decl.c (implicitly_declare): When suggesting a missing
1773 #include, provide a fix-it hint.
1774
b6f43128
DM
17752017-07-06 David Malcolm <dmalcolm@redhat.com>
1776
1777 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1778 and call that instead.
1779 * c-tree.h (selftest::run_c_tests): New decl.
1780
3e2becc4
MP
17812017-06-26 Marek Polacek <polacek@redhat.com>
1782
1783 PR c/80116
1784 * c-parser.c (c_parser_if_body): Set the location of the
1785 body of the conditional after parsing all the labels. Call
1786 warn_for_multistatement_macros.
1787 (c_parser_else_body): Likewise.
1788 (c_parser_switch_statement): Likewise.
1789 (c_parser_while_statement): Likewise.
1790 (c_parser_for_statement): Likewise.
1791 (c_parser_statement): Add a default argument. Save the location
1792 after labels have been parsed.
1793 (c_parser_c99_block_statement): Likewise.
1794
343ae898
RB
17952017-06-19 Richard Biener <rguenther@suse.de>
1796
1797 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1798 negated _Literals to parse _Literal (int) -1.
1799
45b2222a
ML
18002017-06-13 Martin Liska <mliska@suse.cz>
1801
1802 PR sanitize/78204
1803 * c-convert.c (convert): Use sanitize_flags_p.
1804 * c-decl.c (grokdeclarator): Likewise.
1805 * c-typeck.c (convert_for_assignment): Likewise.
1806 (c_finish_return): Likewise.
1807 (build_binary_op): Likewise.
1808
8ab7005b
JJ
18092017-06-08 Jakub Jelinek <jakub@redhat.com>
1810
1811 PR c/81006
1812 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1813 to sizetype before size_binop.
1814
363dc72c
JJ
18152017-06-07 Jakub Jelinek <jakub@redhat.com>
1816
1817 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1818 of TDI_generic.
1819
dc949728
MP
18202017-06-06 Marek Polacek <polacek@redhat.com>
1821
1822 PR c/79983
1823 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1824 ref.
1825 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1826
40ffd95f
BE
18272017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1828
1829 * c-parser.c (c_parser_binary_expression): Implement the
1830 -Wsizeof_pointer_div warning.
1831 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1832 from a parenthesized expression.
1833 (c_parser_expr_list): Use c_last_sizeof_loc.
1834 * c-tree.h (c_last_sizeof_loc): New external.
1835 * c-typeck.c (c_last_sizeof_loc): New variable.
1836 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1837
9fc5e7a4
MM
18382017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1839
1840 PR testsuite/80580
1841 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1842
f012c8ef
DM
18432017-05-30 David Malcolm <dmalcolm@redhat.com>
1844
1845 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1846 parameters.
1847
3cd211af
MS
18482017-05-24 Martin Sebor <msebor@redhat.com>
1849
1850 PR c/80731
1851 * c-fold.c (c_fully_fold_internal): Adjust.
1852 * c-typeck.c (parser_build_unary_op): Adjust.
1853
fd71a9a2
TS
18542017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1855
1856 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1857 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1858 "VECTOR_LENGTH".
1859
92fa0f9e
MP
18602017-05-23 Marek Polacek <polacek@redhat.com>
1861
1862 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1863 quotes.
1864
d11c168a
JJ
18652017-05-22 Jakub Jelinek <jakub@redhat.com>
1866
1867 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1868 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1869 it returned invariant. Call tree_invariant_p unconditionally
1870 afterwards to decide whether to return expr or op0.
1871
58aca9d9
NS
18722017-05-22 Nathan Sidwell <nathan@acm.org>
1873
1874 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1875
7fd549d2
TS
18762017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1877
1878 * c-parser.c (c_parser_omp_clause_default): Handle
1879 "OMP_CLAUSE_DEFAULT_PRESENT".
1880
6ecd2339
BE
18812017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1882
1883 * config-lang.in (gtfiles): Add c-family/c-format.c.
1884
8a57ecff
NS
18852017-05-18 Nathan Sidwell <nathan@acm.org>
1886
1887 * c-decl.c (pushdecl_top_level): Delete unused function.
1888
6574d78e
MP
18892017-05-18 Marek Polacek <polacek@redhat.com>
1890
1891 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1892 (check_earlier_gotos): Likewise.
1893 (define_label): Likewise.
1894 (pending_xref_error): Likewise.
1895 (smallest_type_quals_location): Likewise.
1896 (grokdeclarator): Likewise.
1897 (grokparms): Likewise.
1898 (identifier_global_value): Likewise.
1899 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1900 (find_init_member): Likewise.
1901
e3455240
MP
19022017-05-18 Marek Polacek <polacek@redhat.com>
1903
1904 * c-decl.c (start_decl): Use false/true instead of 0/1.
1905 (grokdeclarator): Likewise.
1906 (finish_struct): Likewise.
1907 (start_function): Change the return type to bool. Use false/true
1908 instead of 0/1.
1909 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1910 * c-tree.h (start_function): Update.
1911 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1912 (set_designator): Change the return type to bool. Use false/true
1913 instead of 0/1.
1914
3fa8871b
MP
19152017-05-17 Marek Polacek <polacek@redhat.com>
1916
1917 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1918 * c-typeck.c: Likewise.
1919
142473df
MP
19202017-05-17 Marek Polacek <polacek@redhat.com>
1921
1922 PR sanitizer/80659
1923 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1924 DECL_IGNORED_P even for non-static compound literals.
1925
1a817418
ML
19262017-05-17 Martin Liska <mliska@suse.cz>
1927
1928 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1929 use it instead of int type.
1930
b2fa0a8b
MP
19312017-05-17 Marek Polacek <polacek@redhat.com>
1932
1933 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1934 call c_fully_fold.
1935 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 1936 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
1937 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1938 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1939 save_expr.
1940 (c_parser_conditional_expression): Likewise.
1941 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1942 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1943 (process_init_element): Likewise.
1944 (build_binary_op): Likewise.
1945 (handle_omp_array_sections_1): Likewise.
1946
1e47f02b
TS
19472017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1948
1949 * c-parser.c (c_parser_omp_clause_num_gangs)
1950 (c_parser_omp_clause_num_workers)
1951 (c_parser_omp_clause_vector_length): Merge functions into...
1952 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1953 all users.
1954
c24e924f
NS
19552017-05-11 Nathan Sidwell <nathan@acm.org>
1956
1957 * gimple-parser.c: Don't #include tree-dump.h.
1958
c587104e
MM
19592017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1960
1961 PR testsuite/80580
1962 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1963
67ac9a9d
MM
19642017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1965
1966 PR testsuite/80580
1967 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1968 incorrect __MEM syntax.
1969
ac4eb40f
MM
19702017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1971
1972 PR testsuite/80580
1973 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1974 type of unary '*'.
1975
641da50a
NS
19762017-05-09 Nathan Sidwell <nathan@acm.org>
1977
1978 * c-tree.h (pushdecl): Declare.
1979
56d35585
DM
19802017-05-05 David Malcolm <dmalcolm@redhat.com>
1981
1982 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1983 with diagnostic_report_diagnostic.
1984 * c-errors.c (pedwarn_c99): Likewise.
1985 (pedwarn_c90): Likewise.
1986
815d9cc6
XR
19872017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1988
92a285c1 1989 PR c++/80038
815d9cc6
XR
1990 * c-gimplify.c (c_gimplify_expr): Remove calls to
1991 cilk_gimplifY_call_params_in_spawned_fn.
1992
1c4ea66f
DM
19932017-04-25 David Malcolm <dmalcolm@redhat.com>
1994
1995 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1996 hint for removing extra semicolon.
1997
666f7903
JJ
19982017-04-21 Jakub Jelinek <jakub@redhat.com>
1999
2000 PR c/80468
2001 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2002 enabled, set specs->type to integer_type_node.
2003
5764ee3c
JW
20042017-04-03 Jonathan Wakely <jwakely@redhat.com>
2005
2006 * c-array-notation.c: Fix typo in comment.
2007
10fa8dfb
MP
20082017-03-29 Marek Polacek <polacek@redhat.com>
2009
2010 PR c/79730
2011 * c-decl.c (finish_decl): Check VAR_P.
2012
a9e4a1a5
JJ
20132017-03-27 Jakub Jelinek <jakub@redhat.com>
2014
2015 PR middle-end/80162
2016 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2017 * c-typeck.c (c_mark_addressable): Likewise. Look through
2018 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2019 to ARRAY_TYPE.
2020 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2021
ee3ff394
MP
20222017-03-23 Marek Polacek <polacek@redhat.com>
2023
2024 * c-tree.h: Remove a C_RID_YYCODE reference.
2025
4d1b8e70
JJ
20262017-03-21 Jakub Jelinek <jakub@redhat.com>
2027
2028 PR c/80097
2029 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2030 optional COMPOUND_EXPR with ubsan instrumentation.
2031
31dc71a8
MP
20322017-03-17 Marek Polacek <polacek@redhat.com>
2033
2034 * c-parser.c: Add C11 references.
2035
d579c385
MP
20362017-03-15 Marek Polacek <polacek@redhat.com>
2037
2038 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2039
85059a38
MP
20402017-03-11 Marek Polacek <polacek@redhat.com>
2041
2042 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2043
2f6f187a
DM
20442017-03-10 David Malcolm <dmalcolm@redhat.com>
2045
2046 PR translation/79848
2047 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2048 "%qs".
2049 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2050
36618428
MP
20512017-03-09 Marek Polacek <polacek@redhat.com>
2052
2053 PR sanitizer/79757
2054 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2055 parameter declarations with initializers.
2056
01e5af5a
JJ
20572017-03-09 Jakub Jelinek <jakub@redhat.com>
2058
2059 PR c/79969
2060 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2061 TYPE_STUB_DECL.
2062
a71dbc63
JJ
20632017-03-07 Jakub Jelinek <jakub@redhat.com>
2064
2065 PR c/79834
2066 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2067 for "may only be used in compound statements" diagnostics, change it
2068 such that the same translatable string is used for all pragmas. For
2069 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2070 diagnostics.
2071 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2072 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2073 "may only be used in compound statements" diagnostics, such that the
2074 same translatable string is used for all pragmas.
2075
1ff4bae6
MP
20762017-03-04 Marek Polacek <polacek@redhat.com>
2077
2078 PR c/79847
2079 * c-decl.c (implicit_decl_warning): Add missing space.
2080
7f5a7d78
MP
20812017-03-03 Marek Polacek <polacek@redhat.com>
2082
2083 PR c/79758
2084 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2085 current_function_prototype_arg_types is error_mark_node. Fix
2086 formatting. Use TREE_VALUE instead of TREE_TYPE.
2087
883c8f06
JJ
20882017-03-03 Jakub Jelinek <jakub@redhat.com>
2089
79c9b7a8
JJ
2090 PR c/79837
2091 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2092 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2093 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2094 diagnostics.
2095
883c8f06
JJ
2096 PR c/79836
2097 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2098 instead of %<_Generic>.
2099 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2100 (c_parser_omp_target_exit_data): Use %<release%> instead of
2101 %<release>.
2102
324ff1a0
JJ
21032017-02-28 Jakub Jelinek <jakub@redhat.com>
2104
2105 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2106 instead of just cond ? "..." : "...".
2107 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2108 for "enter"/"exit" keyword.
2109 (c_finish_oacc_routine): Don't use %s to supply portions of the
2110 message.
2111
4227c9ad
JJ
21122017-02-24 Jakub Jelinek <jakub@redhat.com>
2113
2114 PR c++/79588
2115 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2116 handle -Wrestrict here.
2117 * c-typeck.c (build_function_call_vec): Adjust
2118 check_function_arguments caller.
2119
5d972e66
RB
21202017-02-23 Richard Biener <rguenther@suse.de>
2121
2122 PR c/79684
2123 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2124 to initialize c_exprs to return.
2125 (c_parser_gimple_binary_expression): Likewise.
2126 (c_parser_gimple_unary_expression): Likewise.
2127 (c_parser_gimple_postfix_expression): Likewise.
2128
61ac5ebe
MP
21292017-02-22 Marek Polacek <polacek@redhat.com>
2130
2131 PR c/79662
2132 * c-typeck.c (convert_arguments): Handle error_mark_node.
2133
41d1b0b1
PK
21342017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2135
2136 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2137 value of c_parser_parse_ssa_name against error_mark_node and emit
2138 error if ssa name is anonymous and written as default definition.
2139
eab1f169
PK
21402017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2141
2142 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2143 FMA_EXPR.
2144
bcac0b4d
JJ
21452017-02-16 Jakub Jelinek <jakub@redhat.com>
2146
2147 PR c++/79512
2148 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2149 ignore #pragma omp target even when not followed by identifier.
2150
1be33173
PK
21512017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2152
2153 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2154 (c_parser_gimple_unary_expression): Likewise.
2155
aa326bfb
JJ
21562017-02-13 Jakub Jelinek <jakub@redhat.com>
2157
2158 * c-parser.c (c_parser_oacc_declare): Add missing space in
2159 diagnostics.
2160
8a398bc5
PK
21612017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2162
2163 PR c/79478
2164 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2165 set_c_expr_source_range when parsing ssa-name.
2166
3dcde5ef 21672017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2168 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2169
2170 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2171 building IL when arguments are error_mark_node.
2172 (c_parser_gimple_unary_expression): Likewise.
2173 (c_parser_gimple_if_stmt): Likewise.
2174 (c_parser_gimple_switch_stmt): Likewise.
2175 (c_parser_gimple_return_stmt): Likewise.
2176 (c_parser_parse_ssa_name): When name lookup fails do not build
2177 an SSA name. Use undeclared rather than not declared in error
2178 reporting.
2179
192b048b
MP
21802017-02-09 Marek Polacek <polacek@redhat.com>
2181
2182 PR c/79428
2183 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2184 instead of c_parser_skip_until_found.
2185
56f71478
JJ
21862017-02-09 Jakub Jelinek <jakub@redhat.com>
2187
2188 PR c/79431
2189 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2190 symtab_node::get on automatic variables.
2191
02889d23
CLT
21922016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2193 Chung-Lin Tang <cltang@codesourcery.com>
2194
2195 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2196 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2197 semantic checking.
2198 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2199
7af4b20d
RB
22002017-02-07 Richard Biener <rguenther@suse.de>
2201
2202 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2203 (c_parser_gimple_postfix_expression_after_primary):
2204 Do not use c_build_function_call_vec to avoid folding and promotion.
2205 Simplify.
2206
e5e391d6
MO
22072017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2208
2209 PR lto/79061
2210 * c-decl.c (pop_scope): Pass main_input_filename to
2211 build_translation_unit_decl.
2212
c2e84327
DM
22132017-01-24 David Malcolm <dmalcolm@redhat.com>
2214
2215 * c-parser.c: Include "read-rtl-function.h" and
2216 "run-rtl-passes.h".
2217 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2218 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2219 production. Update for renaming of field "gimple_pass" to
2220 "gimple_or_rtl_pass". If __RTL was seen, call
2221 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2222 to an auto_timevar, to cope with early exit.
2223 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2224 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2225 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2226 Handle RID_RTL.
2227 (c_parser_parse_rtl_body): New function.
2228 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2229 (struct c_declspecs): Rename field "gimple_pass" to
2230 "gimple_or_rtl_pass". Add field "rtl_p".
2231 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2232 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2233 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2234 (c_parser_gimple_or_rtl_pass_list): ...this.
2235
2ebd93e1
MP
22362017-01-20 Marek Polacek <polacek@redhat.com>
2237
2238 PR c/64279
2239 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2240
b1c95bb5
RB
22412017-01-13 Richard Biener <rguenther@suse.de>
2242
2243 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2244 nops.
2245
25329913
RB
22462017-01-13 Richard Biener <rguenther@suse.de>
2247
2248 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2249 _Literal ( type-name ) number.
2250
6bb4ea5c
RB
22512017-01-12 Richard Biener <rguenther@suse.de>
2252
2253 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2254 __MEM.
2255
6b5b4e9c
JJ
22562017-01-11 Jakub Jelinek <jakub@redhat.com>
2257
2258 PR c++/72813
2259 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2260 PCH file.
2261
e3252775
RB
22622017-01-11 Richard Biener <rguenther@suse.de>
2263
2264 PR bootstrap/79052
2265 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2266 returns on parse errors.
2267
a9342885
MP
22682017-01-04 Marek Polacek <polacek@redhat.com>
2269
2270 PR c++/64767
2271 * c-parser.c (c_parser_postfix_expression): Mark zero character
2272 constants by setting original_type in c_expr.
2273 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2274 with a zero character constant.
2275 (char_type_p): New function.
2276
5dd9a9d0
DM
22772017-01-04 David Malcolm <dmalcolm@redhat.com>
2278
2279 * c-parser.c (c_parser_declaration_or_fndef): Create a
2280 rich_location at init_loc and parse it to start_init.
2281 (last_init_list_comma): New global.
2282 (c_parser_braced_init): Update last_init_list_comma when parsing
2283 commas. Pass it to pop_init_level. Pass location of closing
2284 brace to pop_init_level.
2285 (c_parser_postfix_expression_after_paren_type): Create a
2286 rich_location at type_loc and parse it to start_init.
2287 (c_parser_omp_declare_reduction): Likewise for loc.
2288 * c-tree.h (start_init): Add rich_location * param.
2289 (pop_init_level): Add location_t param.
2290 * c-typeck.c (struct initializer_stack): Add field
2291 "missing_brace_richloc".
2292 (start_init): Add richloc param, use it to initialize
2293 the stack node's missing_brace_richloc.
2294 (last_init_list_comma): New decl.
2295 (finish_implicit_inits): Pass last_init_list_comma to
2296 pop_init_level.
2297 (push_init_level): When finding missing open braces, add fix-it
2298 hints to the richloc.
2299 (pop_init_level): Add "insert_before" param and pass it
2300 when calling pop_init_level. Add fixits about missing
2301 close braces to any richloc. Use the richloc for the
2302 -Wmissing-braces warning.
2303 (set_designator): Pass last_init_list_comma to pop_init_level.
2304 (process_init_element): Likewise.
2305
cbe34bb5
JJ
23062017-01-01 Jakub Jelinek <jakub@redhat.com>
2307
2308 Update copyright years.
2309
d17680f3
JJ
23102016-12-21 Jakub Jelinek <jakub@redhat.com>
2311
0dba7960
JJ
2312 PR bootstrap/78817
2313 * c-typeck.c (build_function_call_vec): If check_function_arguments
2314 returns true, set TREE_NO_WARNING on CALL_EXPR.
2315
d17680f3
JJ
2316 PR c/77767
2317 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2318 to *expr instead of overwriting it.
2319
aa90531e
RB
23202016-12-20 Richard Biener <rguenther@suse.de>
2321
2322 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2323 error recovery.
2324 (c_parser_gimple_statement): Only build assigns for non-error
2325 stmts.
2326 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2327
629b3d75
MJ
23282016-12-14 Martin Jambor <mjambor@suse.cz>
2329
2330 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2331 omp-low.h.
2332 (c_finish_oacc_routine): Adjusted call to
2333 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2334 to use their new names.
2335 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2336 use its new name.
2337 (c_parser_oacc_update): Likewise.
2338 (c_parser_omp_simd): Likewise.
2339 (c_parser_omp_target_update): Likewise.
2340 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2341 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2342 name.
2343 (c_finish_omp_cancellation_point): Likewise.
2344 * gimple-parser.c: Do not include omp-low.h
2345
c5af52eb
CP
23462016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2347 James Norris <jnorris@codesourcery.com>
2348
2349 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2350 EXIT_DATA,WAIT} are not used in compound statements.
2351 (c_parser_oacc_enter_exit_data): Update diagnostics.
2352
48330c93
BE
23532016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2354
2355 PR c++/71973
2356 * c-decl.c (diagnose_mismatched_decls): Use
2357 OPT_Wbuiltin_declaration_mismatch here too.
2358
899ca90e 23592016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2360 Alan Hayward <alan.hayward@arm.com>
2361 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2362
2363 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2364 (make_label, finish_struct): Likewise.
2365
1ee62b92 23662016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2367 Richard Biener <rguenther@suse.de>
22b15758 2368
8e745a17
JJ
2369 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2370 * config-lang.in (gtfiles): Add c/c-parser.h.
2371 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2372 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2373 * c-parser.c (enum c_id_kind, struct c_token,
2374 c_parser_next_token_is, c_parser_next_token_is_not,
2375 c_parser_next_token_is_keyword,
2376 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2377 Split out to ...
2378 * c-parser.h: ... new header.
2379 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2380 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2381 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2382 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2383 c_parser_error, c_parser_require, c_parser_skip_until_found,
2384 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2385 c_parser_type_name): Export.
2386 (c_parser_tokens_buf): New function.
2387 (c_parser_error): Likewise.
2388 (c_parser_set_error): Likewise.
2389 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2390 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2391 via c_parser_parse_gimple_body.
8e745a17
JJ
2392 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2393 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2394 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2395 c_parser_error, c_parser_require, c_parser_skip_until_found,
2396 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2397 c_parser_type_name): Declare.
1ee62b92
PG
2398 (struct c_parser): Declare forward.
2399 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2400 (c_parser_error): Likewise.
2401 (c_parser_set_error): Likewise.
2402 * gimple-parser.c: New file.
2403 * gimple-parser.h: Likewise.
1ee62b92 2404
22b15758
UB
24052016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2406
2407 PR c/35503
2408 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2409 warn_for_restrict.
2410
84ff4775
LCW
24112016-09-11 Le-Chun Wu <lcwu@google.com>
2412 Mark Wielaard <mjw@redhat.com>
2413
2414 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2415 to the given -Wshadow= variant.
2416
4d0cdd0c
TP
24172016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2418
2419 * c-typeck.c: Include memmodel.h.
2420
1202f33e
JJ
24212016-10-13 Jakub Jelinek <jakub@redhat.com>
2422
2423 PR target/77957
2424 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2425 instead of lhd_return_null_tree_v.
2426
8a14afd0
BS
24272016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2428
2429 PR c++/69733
2430 * c-decl.c (smallest_type_quals_location): New static function.
2431 (grokdeclarator): Try to find the correct location for an ignored
2432 qualifier.
2433
81fea426
MP
24342016-09-26 Marek Polacek <polacek@redhat.com>
2435
2436 PR c/7652
2437 * c-decl.c (pop_scope): Add gcc_fallthrough.
2438
24392016-09-26 Marek Polacek <polacek@redhat.com>
2440
2441 PR c/7652
2442 * c-parser.c (struct c_token): Add flags field.
2443 (c_lex_one_token): Pass it to c_lex_with_flags.
2444 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2445 into IFN_FALLTHROUGH.
2446 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2447 attribute fallthrough after a case label or default label.
2448 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2449
9a2300e9
MP
24502016-09-24 Marek Polacek <polacek@redhat.com>
2451
2452 PR c/77490
2453 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2454 have boolean value. Warn about ++/-- on booleans.
2455
7de76362
JJ
24562016-09-23 Jakub Jelinek <jakub@redhat.com>
2457
2458 * c-parser.c (incomplete_record_decls): Remove unnecessary
2459 = vNULL initialization of file scope vec.
2460
5b73d2ab
MP
24612016-09-16 Marek Polacek <polacek@redhat.com>
2462
2463 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2464
e51fbec3
MP
24652016-09-14 Marek Polacek <polacek@redhat.com>
2466
2467 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2468 (fix_array_notation_expr): Likewise.
2469 * c-decl.c (finish_decl): Likewise.
2470 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2471 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2472 (function_to_pointer_conversion): Use false instead of 0.
2473 (convert_lvalue_to_rvalue): Likewise.
2474 (parser_build_unary_op): Likewise.
2475 (build_atomic_assign): Likewise.
2476 (build_unary_op): Change nonconvert parameter type to bool, use
2477 true/false instead of 1/0.
2478 (build_binary_op): Use true instead of 1.
2479
254830ba
DM
24802016-09-13 David Malcolm <dmalcolm@redhat.com>
2481
2482 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2483 of add_fixit_insert to add_fixit_insert_before.
2484
4c13ba17
MP
24852016-09-13 Marek Polacek <polacek@redhat.com>
2486
2487 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2488 it.
2489
54dcdb88
BE
24902016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2491
2492 PR c++/77496
2493 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2494 COMPOUND_EXPR to warn_for_omitted_condop.
2495
e5106e27
DM
24962016-09-07 David Malcolm <dmalcolm@redhat.com>
2497
2498 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2499 c_get_substring_location for this new langhook.
2500
9dc5773f
JJ
25012016-09-02 Jakub Jelinek <jakub@redhat.com>
2502
2503 PR c/65467
2504 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2505 flag_openmp.
2506 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2507 instead of mark_exp_read on low_bound/length expression.
2508 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2509 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2510 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2511 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2512 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2513 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2514 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2515 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2516 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2517 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2518 instead of mark_expr_read.
2519 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2520 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2521 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2522 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2523 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2524 array section bases outside of depend clause, for depend clause
2525 use convert_lvalue_to_rvalue on the base.
2526 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2527 linear, aligned, map, to and from clauses.
2528 (c_omp_clause_copy_ctor): New function.
2529
295844f6
MP
25302016-09-01 Marek Polacek <polacek@redhat.com>
2531
2532 PR c/7652
2533 * c-typeck.c (composite_type): Add FALLTHRU comment.
2534
089af25c
DM
25352016-08-31 David Malcolm <dmalcolm@redhat.com>
2536
2537 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2538 to the insertion fixits for "struct", "union", and "enum".
2539
f9087798
DM
25402016-08-30 David Malcolm <dmalcolm@redhat.com>
2541
2542 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2543 rather than add_fixit_misspelled_id.
2544 (undeclared_variable): Likewise.
2545 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2546 now-redundant "here" params from add_fixit_insert method calls.
2547 (c_parser_parameter_declaration): Likewise.
2548 * c-typeck.c (build_component_ref): Remove now-redundant range
2549 param from add_fixit_replace method calls.
2550
ebef225f
MP
25512016-08-25 Marek Polacek <polacek@redhat.com>
2552
2553 * c-typeck.c (parser_build_binary_op): Pass LHS to
2554 warn_logical_not_parentheses.
2555
fe377a48
MP
25562016-08-25 Marek Polacek <polacek@redhat.com>
2557
2558 PR c/77323
2559 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2560 or _FloatN or _FloatNx is not supported.
2561 (finish_declspecs): Set type to integer_type_node when _FloatN or
2562 _FloatNx is not supported.
2563
c65699ef
JM
25642016-08-19 Joseph Myers <joseph@codesourcery.com>
2565
2566 PR c/32187
2567 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2568 (struct c_declspecs): Add field floatn_nx_idx.
2569 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2570 and _FloatNx type specifiers.
2571 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2572 (c_parser_declspecs, c_parser_attribute_any_word)
2573 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2574 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2575 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2576 narrower than double.
2577
2f1364c2
JJ
25782016-08-12 Jakub Jelinek <jakub@redhat.com>
2579 Martin Liska <mliska@suse.cz>
2580
2581 PR c/67410
2582 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2583 % to determine val element to change. Assert that
2584 wchar_bytes * charwidth fits into val array.
2585
191816a3
MP
25862016-08-12 Marek Polacek <polacek@redhat.com>
2587
2588 PR c/7652
2589 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2590 (c_parser_postfix_expression): Likewise.
2591 * c-typeck.c (build_unary_op): Adjust fall through comment.
2592 (c_mark_addressable): Likewise.
2593
b95a64bb
JJ
25942016-08-11 Jakub Jelinek <jakub@redhat.com>
2595
2596 PR c/72816
2597 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2598 array member through typedef, for orig_qual_indirect == 0 clear
2599 orig_qual_type.
2600
895aa8e1
DM
26012016-08-08 David Malcolm <dmalcolm@redhat.com>
2602
2603 PR c/64955
2604 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2605 this up to selftest::run_c_tests.
2606 (selftest::run_c_tests): New function.
2607
0b212d8c
TS
26082016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2609
ae9281fc
TS
2610 * c-parser.c (struct oacc_routine_data): Add error_seen and
2611 fndecl_seen members.
2612 (c_finish_oacc_routine): Use these.
2613 (c_parser_declaration_or_fndef): Adjust.
2614 (c_parser_oacc_routine): Likewise. Support more C language
2615 constructs, and improve diagnostics. Move pragma context
2616 checking...
2617 (c_parser_pragma): ... here.
2618
0b212d8c
TS
2619 * c-parser.c (struct oacc_routine_data): New.
2620 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2621 Simplify code.
2622 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2623 declare target" attribute.
2624
76e2c821
JB
26252016-08-01 Jan Beulich <jbeulich@suse.com>
2626
2627 * c-fold.c (c_fully_fold_internal): Also emit shift count
2628 warnings for vector types.
2629 * c-typeck.c (build_binary_op): Likewise.
2630
f618a472
MP
26312016-07-29 Marek Polacek <polacek@redhat.com>
2632
2633 PR c/71742
2634 * c-decl.c (finish_struct): Rephrase an error message.
2635
efd0786f
MP
2636 PR c/71853
2637 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2638 to error node for invalid code.
2639
e00dceaf
MP
2640 PR c/71573
2641 * c-decl.c (implicitly_declare): Return decl early not only for
2642 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2643
673a107a
JJ
26442016-07-29 Jakub Jelinek <jakub@redhat.com>
2645
2646 PR c/71969
2647 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2648 on GNU extern inline functions.
2649
a5b5c8b6
MP
26502016-07-29 Marek Polacek <polacek@redhat.com>
2651
2652 PR c/71583
2653 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2654 check expr.value.
2655
e3fe09c1
UB
26562016-07-22 Uros Bizjak <ubizjak@gmail.com>
2657
2658 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2659
7c8f7eaa
DM
26602016-07-20 David Malcolm <dmalcolm@redhat.com>
2661
2662 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2663 spellcheck-tree.h
2664 (best_macro_match): Likewise, converting from a typedef to a
2665 subclass.
2666 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2667 (lookup_name_fuzzy): Update for change of best_macro_match to a
2668 subclass with a ctor that calls cpp_forall_identifiers.
2669
de6a69ee
DM
26702016-07-20 David Malcolm <dmalcolm@redhat.com>
2671
2672 * c-decl.c (implicit_decl_warning): Update for conversion of
2673 return type of lookup_name_fuzzy to const char *.
2674 (undeclared_variable): Likewise.
2675 (lookup_name_fuzzy): Convert return type from tree to
2676 const char *.
2677 * c-parser.c (c_parser_declaration_or_fndef): Update for
2678 conversion of return type of lookup_name_fuzzy to const char *.
2679 (c_parser_parameter_declaration): Likewise.
2680
b1c9c068
CP
26812016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2682
2683 * c-parser.c (c_parser_oacc_declare): Don't scan for
2684 GOMP_MAP_POINTER.
2685 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2686 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2687 zero-length subarrays.
2688
ddbbcb19
JJ
26892016-07-15 Jakub Jelinek <jakub@redhat.com>
2690
2691 PR c/71858
2692 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2693 instead of FUZZY_LOOKUP_NAME.
2694 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2695 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2696
dd36b877
JJ
26972016-07-14 Jakub Jelinek <jakub@redhat.com>
2698
2699 PR c/71858
2700 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2701
8c681247
TS
27022016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2703
2704 * c-parser.c (c_parser_generic_selection): Make type of variable
2705 auto_vec.
2706 (c_parser_omp_declare_simd): Likewise.
2707
bf4fa671
TS
27082016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2709
2710 * c-decl.c (struct c_struct_parse_info): Change member types
2711 from vec to auto_vec.
2712 (start_struct): Adjust.
2713 (finish_struct): Likewise.
2714
557e8c49
JJ
27152016-07-02 Jakub Jelinek <jakub@redhat.com>
2716
2717 PR c/71719
2718 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2719
54d19c3b
TS
27202016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2721
2722 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2723 Move pragma context checking into...
2724 (c_parser_omp_cancellation_point): ... here, and improve
2725 diagnostic messages.
2726 * c-typeck.c (c_finish_omp_cancel)
2727 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2728
152ef731
JJ
27292016-06-29 Jakub Jelinek <jakub@redhat.com>
2730
2731 PR c/71685
2732 * c-typeck.c (c_build_qualified_type): Don't clear
2733 C_TYPE_INCOMPLETE_VARS for the main variant.
2734
27352016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2736
2737 PR c/71552
2738 * c-typeck.c (output_init_element): Diagnose incompatible types
2739 before non-constant initializers.
2740
e9ac1f86
JJ
27412016-06-28 Jakub Jelinek <jakub@redhat.com>
2742
2743 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2744
277d7ee0
AK
27452016-06-23 Andi Kleen <ak@linux.intel.com>
2746
2747 * Make-lang.in: Add support for autofdo.
2748
1a4f11c8
DM
27492016-06-22 David Malcolm <dmalcolm@redhat.com>
2750
2751 PR c/70339
2752 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2753 (implicit_decl_warning): When issuing warnings for implicit
2754 declarations, attempt to provide a suggestion via
2755 lookup_name_fuzzy.
2756 (undeclared_variable): Likewise when issuing errors.
2757 (lookup_name_in_scope): Likewise.
2758 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2759 (best_macro_match): New typedef.
2760 (find_closest_macro_cpp_cb): New function.
2761 (lookup_name_fuzzy): New function.
2762 * c-parser.c: Include gcc-rich-location.h.
2763 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2764 (c_keyword_starts_typename): ...this new function.
2765 (c_parser_declaration_or_fndef): When issuing errors about
2766 missing "struct" etc, add a fixit. For other kinds of errors,
2767 attempt to provide a suggestion via lookup_name_fuzzy.
2768 (c_parser_parms_declarator): When looking ahead to detect typos in
2769 type names, also reject CPP_KEYWORD.
2770 (c_parser_parameter_declaration): When issuing errors about
2771 unknown type names, attempt to provide a suggestion via
2772 lookup_name_fuzzy.
2773 * c-tree.h (c_keyword_starts_typename): New prototype.
2774
5a578671
JM
27752016-06-20 Joseph Myers <joseph@codesourcery.com>
2776
2777 PR c/71601
2778 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2779 c_common_type returns error_mark_node.
2780
3f8257db 27812016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2782
2783 PR c/69507
2784 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2785 __alignof__ (expression).
2786
6a3f203c
DM
27872016-06-14 David Malcolm <dmalcolm@redhat.com>
2788
2789 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2790
264757fb
DM
27912016-06-14 David Malcolm <dmalcolm@redhat.com>
2792
2793 * c-typeck.c (build_component_ref): Simplify fixit code by
2794 using gcc_rich_location::add_fixit_misspelled_id.
2795 (set_init_label): Likewise.
2796
f7e4f2e3
DM
27972016-06-13 David Malcolm <dmalcolm@redhat.com>
2798
2799 * c-parser.c (c_parser_initelt): Provide location of name for new
2800 location_t param of set_init_label.
2801 * c-tree.h (set_init_label): Add location_t param.
2802 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2803 param and use it when issuing error messages about unrecognized
2804 field names. Attempt to provide a fixit hint if appropriate,
2805 otherwise update the error message to provide the type name.
2806
4b1ffdb1
TS
28072016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2808
2809 PR c/71381
2810 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2811 Loosen checking.
2812
44a845ca
MS
28132016-06-08 Martin Sebor <msebor@redhat.com>
2814 Jakub Jelinek <jakub@redhat.com>
2815
2816 PR c++/70507
2817 PR c/68120
2818 * c-typeck.c (convert_arguments): Don't promote last argument
2819 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2820
92a5f2ba
MP
28212016-06-08 Marek Polacek <polacek@redhat.com>
2822
2823 PR c/71418
2824 * c-decl.c (grokdeclarator): Check TYPE_P.
2825
08203f73
MP
2826 PR c/71426
2827 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2828 code.
2829
6ffd47b7
DM
28302016-06-07 David Malcolm <dmalcolm@redhat.com>
2831
2832 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2833 and structure element reference, capture the location of the
2834 element name token and pass it to build_component_ref.
2835 (c_parser_postfix_expression_after_primary): Likewise for
2836 structure element dereference.
2837 (c_parser_omp_variable_list): Likewise for
2838 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2839 * c-tree.h (build_component_ref): Add location_t param.
2840 * c-typeck.c (build_component_ref): Add location_t param
2841 COMPONENT_LOC. Use it, if available, when issuing hints about
2842 mispelled member names to provide a fixit replacement hint.
2843
1f40cff3
MP
28442016-06-06 Marek Polacek <polacek@redhat.com>
2845
2846 PR c/71362
2847 * c-parser.c (c_parser_direct_declarator): Set location.
2848
5545a907
MP
28492016-06-06 Marek Polacek <polacek@redhat.com>
2850
2851 * c-typeck.c (comptypes_internal): Handle comparisons of
2852 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2853 TYPE_REF_CAN_ALIAS_ALL.
2854
b605f663
CLT
28552016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2856
2857 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2858 arguments as addressable when async clause exists.
2859
00631022
JJ
28602016-05-30 Jakub Jelinek <jakub@redhat.com>
2861
2862 PR c++/71349
2863 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2864 when combined with target construct.
2865
7211a097
JJ
28662016-05-26 Jakub Jelinek <jakub@redhat.com>
2867
2868 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2869 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2870
95efe6b6
MP
28712016-05-25 Marek Polacek <polacek@redhat.com>
2872
2873 PR c/71265
2874 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2875
a23faf7a
MP
2876 PR c/71266
2877 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2878
e46c7770
CP
28792016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2880
2881 * c-parser.c (c_parser_oacc_declare): Add support for
2882 GOMP_MAP_FIRSTPRIVATE_POINTER.
2883 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2884 argument with enum c_omp_region_type ort.
2885 (handle_omp_array_sections): Likewise. Update call to
2886 handle_omp_array_sections_1.
2887 (c_finish_omp_clauses): Add specific errors and warning messages for
2888 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2889 call to handle_omp_array_sections.
2890
a04e69c0
TS
28912016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2892
2893 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2894
f17a223d
RB
28952016-05-24 Richard Biener <rguenther@suse.de>
2896
2897 PR middle-end/70434
2898 PR c/69504
2899 * c-typeck.c (build_array_ref): Do not complain about indexing
2900 non-lvalue vectors. Adjust for function name change.
2901
79063edd
MS
29022016-05-20 Martin Sebor <msebor@redhat.com>
2903
2904 PR c/71115
2905 * c-typeck.c (error_init): Use
2906 expansion_point_location_if_in_system_header.
2907 (warning_init): Same.
2908
8a40fef3
DM
29092016-05-19 David Malcolm <dmalcolm@redhat.com>
2910
2911 PR c/71171
2912 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2913 in error-handling.
2914 (c_parser_postfix_expression): Likewise.
2915 * c-tree.h (c_expr::set_error): New method.
2916 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2917 that result's range is initialized.
2918
e9892350
JG
29192016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2920
2921 * c-typeck.c (parser_build_unary_op): Fix formatting.
2922
8fad45f5
MW
29232016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2924
2925 * c-decl.c (grokdeclarator): Remove errmsg and use of
2926 targetm.invalid_return_type.
2927 (grokparms): Remove errmsg and use of
2928 targetm.invalid_parameter_type.
2929
aa4b467b
JM
29302016-05-13 Joseph Myers <joseph@codesourcery.com>
2931
2932 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2933 function return type.
2934
4f2e1536
MP
29352016-05-12 Marek Polacek <polacek@redhat.com>
2936
2937 PR c/70756
2938 * c-decl.c (build_compound_literal): Pass LOC down to
2939 c_incomplete_type_error.
2940 * c-tree.h (require_complete_type): Adjust declaration.
2941 (c_incomplete_type_error): Likewise.
2942 * c-typeck.c (require_complete_type): Add location parameter, pass it
2943 down to c_incomplete_type_error.
2944 (c_incomplete_type_error): Add location parameter, pass it down to
2945 error_at.
2946 (build_component_ref): Pass location down to c_incomplete_type_error.
2947 (default_conversion): Pass location down to require_complete_type.
2948 (build_array_ref): Likewise.
2949 (build_function_call_vec): Likewise.
2950 (convert_arguments): Likewise.
2951 (build_unary_op): Likewise.
2952 (build_c_cast): Likewise.
2953 (build_modify_expr): Likewise.
2954 (convert_for_assignment): Likewise.
2955 (c_finish_omp_clauses): Likewise.
2956
d6e83a8d
MM
29572016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2958
2959 PR c/43651
2960 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2961 is enabled.
2962 * c-errors.c (pedwarn_c90): Return true if warned.
2963 * c-tree.h (pedwarn_c90): Change return type to bool.
2964 (enum c_declspec_word): Add new enumerator cdw_atomic.
2965
5c3a10fb
MP
29662016-05-11 Marek Polacek <polacek@redhat.com>
2967
2968 PR c++/71024
2969 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2970 diagnose_mismatched_attributes and call it.
2971
cf68d92c
MP
29722016-05-10 Marek Polacek <polacek@redhat.com>
2973
2974 PR c/70255
2975 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2976 on a declaration following the definition.
2977
351f85c5
JJ
29782016-05-05 Jakub Jelinek <jakub@redhat.com>
2979
2980 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2981 parse it through to c_parser_c99_block_statement.
2982 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2983 caller.
2984
deef7113
MP
29852016-05-04 Marek Polacek <polacek@redhat.com>
2986
2987 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2988 OPT_Wdangling_else.
2989
de55efd5
MP
29902016-05-04 Marek Polacek <polacek@redhat.com>
2991
2992 PR c/48778
2993 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2994 for macro expansions.
2995
79ce98bc
MP
29962016-05-03 Marek Polacek <polacek@redhat.com>
2997
2998 PR c/70859
2999 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3000 check_builtin_function_arguments.
3001
fb2647aa
RB
30022016-05-03 Richard Biener <rguenther@suse.de>
3003
3004 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3005 the checksum from the previous stage.
3006
77886428
CP
30072016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3008
3009 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3010 c_finish_omp_clauses.
3011 (c_parser_omp_all_clauses): Likewise.
3012 (c_parser_oacc_cache): Likewise.
3013 (c_parser_oacc_loop): Likewise.
3014 (omp_split_clauses): Likewise.
3015 (c_parser_omp_declare_target): Likewise.
3016 (c_parser_cilk_all_clauses): Likewise.
3017 (c_parser_cilk_for): Likewise.
3018 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3019 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3020
7176a4a0
MP
30212016-05-02 Marek Polacek <polacek@redhat.com>
3022
3023 PR c/70851
3024 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3025 incomplete type.
3026
e7ff0319
CP
30272016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3028
3029 PR middle-end/70626
3030 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3031 OACC_LOOP_CLAUSE_MASK.
3032 (c_parser_oacc_kernels_parallel): Update call to
3033 c_oacc_split_loop_clauses.
3034
9f405ce1
AM
30352016-04-28 Andrew MacLeod <amacleod@redhat.com>
3036
3037 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3038 argument to build_modify_expr in two cases.
3039
c1e1f433
BS
30402016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3041
3042 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3043 warn_for_memset instead of warning directly here.
3044
2448a956
MP
30452016-04-26 Marek Polacek <polacek@redhat.com>
3046
3047 PR c/67784
3048 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3049 out of ...
3050 (c_parser_for_statement): ... here.
3051 (c_parser_if_statement): Use it.
3052 (c_parser_switch_statement): Use it.
3053 (c_parser_while_statement): Use it.
3054
b02a5e26
MP
3055 PR c/70791
3056 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3057
477d4906
IV
30582016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3059
3060 PR c++/69363
3061 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3062 instead of c_finish_cilk_clauses.
3063 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3064 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3065 floating-point variables in the linear clause for Cilk Plus.
3066
fe37c7af
MM
30672016-04-18 Michael Matz <matz@suse.de>
3068
3069 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3070 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3071
949505a9
MP
30722016-04-15 Marek Polacek <polacek@redhat.com>
3073
3074 PR c/70671
3075 * c-typeck.c (build_unary_op): Pass location down to error and
3076 warning call.
3077
dda1bf61
JJ
30782016-04-15 Jakub Jelinek <jakub@redhat.com>
3079
3080 PR c/70436
3081 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3082 where needed.
3083 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3084 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3085 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3086 Adjust c_parser_pragma callers.
3087 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3088 caller.
3089 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3090 c_parser_statement.
3091 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3092 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3093 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3094 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3095 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3096 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3097 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3098 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3099 down where needed.
3100 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3101 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3102 calls.
3103
99cd9857
MP
31042016-04-13 Marek Polacek <polacek@redhat.com>
3105
3106 PR c/70436
3107 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3108 adjust callers.
3109 (c_parser_statement): Likewise.
3110 (c_parser_c99_block_statement): Likewise.
3111 (c_parser_while_statement): Likewise.
3112 (c_parser_for_statement): Likewise.
3113 (c_parser_if_body): Don't set IF_P here.
3114 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3115 about dangling else here.
3116 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3117 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3118 warn about dangling else here.
3119
f13355da
MP
31202016-04-04 Marek Polacek <polacek@redhat.com>
3121
3122 PR c/70307
3123 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3124
5fde6a45
MP
31252016-03-31 Marek Polacek <polacek@redhat.com>
3126
3127 PR c/70297
3128 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3129
4bbf545b
DM
31302016-03-18 David Malcolm <dmalcolm@redhat.com>
3131
3132 PR c/70281
3133 * c-parser.c (c_parser_postfix_expression): Set the source range
3134 for uses of "__builtin_types_compatible_p".
3135
fcc2b74f
JJ
31362016-03-17 Jakub Jelinek <jakub@redhat.com>
3137
3138 PR c/70280
3139 * c-typeck.c (composite_type): Don't count void_list_node
3140 into len, if the list is terminated by void_list_node, start
3141 with void_list_node instead of NULL for newargs. Stop
3142 at void_list_node.
3143
ab4c578f
MP
31442016-03-16 Marek Polacek <polacek@redhat.com>
3145
3146 PR c/70093
3147 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3148 nested functions returning VM types.
3149
96b3c82d
CP
31502016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3151
3152 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3153 when calling c_finish_omp_clauses.
3154
29b9828f
BS
31552016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3156
3157 PR c/69824
3158 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3159 for later.
3160
7ff6ca38
MP
31612016-03-04 Marek Polacek <polacek@redhat.com>
3162
3163 PR c/69798
3164 * c-parser.c (c_parser_postfix_expression): Call
3165 c_parser_cast_expression rather than c_parser_postfix_expression.
3166
686e2237
JJ
31672016-03-01 Jakub Jelinek <jakub@redhat.com>
3168
3169 PR c/69796
3170 PR c/69974
3171 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3172 of incomplete decls to error_mark_node.
3173
0b05329b
MP
31742016-02-24 Marek Polacek <polacek@redhat.com>
3175
3176 PR c/69819
3177 * c-decl.c (finish_decl): Don't update the copy of the type of a
3178 different decl type.
3179
067fbd8b
JJ
31802016-02-23 Jakub Jelinek <jakub@redhat.com>
3181
3182 PR objc/69844
3183 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3184 in id_kind reclassification.
3185
bf14eba2
JJ
31862016-02-16 Jakub Jelinek <jakub@redhat.com>
3187
3188 PR c/69835
3189 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3190
ba539195
JN
31912016-02-16 James Norris <jnorris@codesourcery.com>
3192
3193 PR c/64748
3194 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3195
16595a1f
BS
31962016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3197
f48dfe98
BS
3198 * c-decl.c (build_null_declspecs): Zero the entire struct.
3199
16595a1f
BS
3200 PR c/69522
3201 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3202 callers changed. If nested_p is true, use it to call
3203 finish_implicit_inits.
3204 * c-tree.h (finish_implicit_inits): Declare.
3205 * c-typeck.c (finish_implicit_inits): New function. Move code
3206 from ...
3207 (push_init_level): ... here.
3208 (set_designator, process_init_element): Call finish_implicit_inits.
3209
66756373
JJ
32102016-02-11 Jakub Jelinek <jakub@redhat.com>
3211
3212 PR c/69768
3213 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3214 arguments for -Waddress warning.
3215
1066e9b5
JJ
32162016-02-04 Jakub Jelinek <jakub@redhat.com>
3217
3218 PR c/69669
3219 * c-decl.c (finish_enum): When honoring mode attribute,
3220 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3221
3a5d2ba4
JJ
32222016-01-29 Jakub Jelinek <jakub@redhat.com>
3223
3224 PR debug/69518
3225 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3226 all type variants, not just TYPE_MAIN_VARIANT.
3227
cbdd8ae0
JJ
32282016-01-27 Jakub Jelinek <jakub@redhat.com>
3229
3230 PR debug/66869
3231 * c-decl.c (c_write_global_declarations_1): Warn with
3232 warn_unused_function if static prototype without definition
3233 is not C_DECL_USED.
3234
fa74a4bc
MP
32352016-01-27 Marek Polacek <polacek@redhat.com>
3236
3237 PR c/68062
3238 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3239 to unsigned, if needed. Add -Wsign-compare warning.
3240
13f92e8d
JJ
32412016-01-26 Jakub Jelinek <jakub@redhat.com>
3242
3243 PR tree-optimization/69483
3244 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3245
cd8e73dc 32462016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3247
3248 PR c/24293
3249 * c-tree.h (incomplete_record_decls): Declare.
3250 * c-parser.c (incomplete_record_decls): Define.
3251 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3252 report error if any decl has zero size.
3253 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3254 or enum type to incomplete_record_decls.
3255
e6d6ec9e
TV
32562016-01-14 Tom de Vries <tom@codesourcery.com>
3257
3258 PR tree-optimization/68773
3259 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3260 set force_output.
3261
00083992
MP
32622016-01-14 Marek Polacek <polacek@redhat.com>
3263
3264 PR c/69262
3265 * c-decl.c (grokdeclarator): Provide more information for invalid
3266 array declarations.
3267
7443cf13
DM
32682016-01-06 David Malcolm <dmalcolm@redhat.com>
3269
3270 * c-parser.c (c_parser_unary_expression): For dereferences, build
3271 a combined location before calling build_indirect_ref, so that
3272 error reports cover the full range, manually updating the c_expr
3273 src_range.
3274
6b131d5b
MP
32752016-01-06 Marek Polacek <polacek@redhat.com>
3276
3277 PR sanitizer/69099
3278 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3279 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3280 NULL.
3281
818ab71a
JJ
32822016-01-04 Jakub Jelinek <jakub@redhat.com>
3283
3284 Update copyright years.
3285
2fe0a208
MP
32862016-01-04 Marek Polacek <polacek@redhat.com>
3287
3288 PR c/68908
3289 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3290 optimization to use __atomic_fetch_* built-in if possible.
3291
c7b48c8a
TS
32922015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3293
3294 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3295 into...
3296 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3297 all users.
3298
fda5652f
MP
32992015-12-22 Marek Polacek <polacek@redhat.com>
3300
3301 PR c/69002
3302 * c-typeck.c (build_component_ref): Warn when acessing elements of
3303 atomic structures or unions.
3304
745e411d
DM
33052015-12-21 David Malcolm <dmalcolm@redhat.com>
3306
3307 * c-typeck.c: Include "gcc-rich-location.h".
3308 (build_binary_op): In the two places that call binary_op_error,
3309 create a gcc_rich_location and populate it with the location of
3310 the binary op and its two operands.
3311
94c40e19
DM
33122015-12-16 David Malcolm <dmalcolm@redhat.com>
3313
3314 * c-parser.c (c_parser_statement_after_labels): When calling
3315 c_finish_return, Use the return expression's location if it has
3316 one, falling back to the location of the first token within it.
3317 * c-typeck.c (c_finish_return): When issuing warnings about
3318 the incorrect presence/absence of a return value, issue a note
3319 showing the declaration of the function.
3320
de67c4c3
DM
33212015-12-16 David Malcolm <dmalcolm@redhat.com>
3322
3323 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3324 to 4.
3325 (c_parser_peek_nth_token): New function.
3326 (c_parser_peek_conflict_marker): New function.
3327 (c_parser_error): Detect conflict markers and report them as such.
3328
a10704e1
DM
33292015-12-16 David Malcolm <dmalcolm@redhat.com>
3330
3331 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3332 to preserve range information for the primary expression
3333 in the call to c_parser_postfix_expression_after_primary.
3334
8062bca6
DM
33352015-12-16 David Malcolm <dmalcolm@redhat.com>
3336
3337 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3338 expression location, falling back on the first token location,
3339 rather than always using the latter.
3340
d06f8b75
MP
33412015-12-16 Marek Polacek <polacek@redhat.com>
3342
3343 PR c/64637
3344 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3345 available.
3346
2994fb91
MP
33472015-12-15 Marek Polacek <polacek@redhat.com>
3348
3349 PR c/68907
3350 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3351 artificial decl.
3352
a1b93f8d
DM
33532015-12-08 David Malcolm <dmalcolm@redhat.com>
3354
3355 * c-parser.c (c_parser_alignof_expression): Capture location of
3356 closing parenthesis (if any), or of end of unary expression, and
3357 use it to build a src_range for the expression.
3358
46c6e1e2
DM
33592015-12-08 David Malcolm <dmalcolm@redhat.com>
3360
3361 PR c/68757
3362 * c-parser.c (c_parser_get_builtin_args): Add
3363 "out_close_paren_loc" param, and write back to it.
3364 (c_parser_postfix_expression): Capture the closing
3365 parenthesis location for RID_CHOOSE_EXPR,
3366 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3367 RID_BUILTIN_SHUFFLE and use it to set the source range
3368 for such expressions; within RID_BUILTIN_COMPLEX set
3369 the underlying location.
3370
66189108
MP
33712015-12-07 Marek Polacek <polacek@redhat.com>
3372
3373 PR c/68668
3374 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3375 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3376
f187980b
EB
33772015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3378
3379 * c-tree.h (c_build_va_arg): Adjust prototype.
3380 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3381 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3382 parameter, adjust throughout and issue an error if EXPR is a component
3383 with reverse storage order.
3384
4250754e
JM
33852015-12-02 Jason Merrill <jason@redhat.com>
3386
3387 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3388 (c_fully_fold_internal, decl_constant_value_for_optimization):
3389 Move from c-common.c.
3390 * c-tree.h: Declare decl_constant_value_for_optimization.
3391 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3392
e9e32ee6
JM
33932015-12-02 Joseph Myers <joseph@codesourcery.com>
3394
3395 PR c/68162
3396 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3397 following link from declarator to next declarator. Track original
3398 qualified type and pass it to c_build_qualified_type.
3399 * c-typeck.c (c_build_qualified_type): Add arguments
3400 orig_qual_type and orig_qual_indirect.
3401
ff7a55bf
TS
34022015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3403
3404 * c-parser.c (c_parser_omp_clause_name)
3405 (c_parser_oacc_all_clauses): Alphabetical sorting.
3406
657e4e47
JJ
34072015-12-02 Jakub Jelinek <jakub@redhat.com>
3408
3409 PR c/68533
3410 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3411 for diagnostics.
3412
37d5ad46
JB
34132015-12-01 Julian Brown <julian@codesourcery.com>
3414 Cesar Philippidis <cesar@codesourcery.com>
3415 James Norris <James_Norris@mentor.com>
3416
3417 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3418 (c_parser_oacc_clause_use_device): New function.
3419 (c_parser_oacc_all_clauses): Add use_device support.
3420 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3421 (c_parser_oacc_host_data): New function.
3422 (c_parser_omp_construct): Add host_data support.
3423 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3424 * c-typeck.c (c_finish_oacc_host_data): New function.
3425 (c_finish_omp_clauses): Add use_device support.
3426
a4850ce9
JH
34272015-11-29 Jan Hubicka <hubicka@ucw.cz>
3428
3429 PR c/67106
3430 * c-decl.c: Set TYPE_PACKED in variants.
3431
b58d3df2
ML
34322015-11-27 Martin Liska <mliska@suse.cz>
3433
3434 PR c++/68312
3435 * c-array-notation.c (fix_builtin_array_notation_fn):
3436 Use release_vec_vec instead of vec::release.
3437 (build_array_notation_expr): Likewise.
3438 (fix_conditional_array_notations_1): Likewise.
3439 (fix_array_notation_expr): Likewise.
3440 (fix_array_notation_call_expr): Likewise.
3441
aec17bfe
JJ
34422015-11-27 Jakub Jelinek <jakub@redhat.com>
3443
3444 PR c/63326
3445 * c-parser.c (c_parser_compound_statement_nostart): If
3446 last_label is true, use pragma_stmt instead of pragma_compound
3447 as second c_parser_pragma argument.
3448 (c_parser_omp_ordered, c_parser_omp_target_update,
3449 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3450 false as second argument to c_parser_skip_to_pragma_eol after
3451 diagnosing standalone directives used in pragma_stmt context.
3452
688c4de0
IV
34532015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3454
3455 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3456 with "if (ENABLE_OFFLOADING)".
3457
cbd03aee
DM
34582015-11-23 David Malcolm <dmalcolm@redhat.com>
3459
3460 PR objc/68438
3461 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3462 for various Objective-C constructs: Class.name syntax,
3463 @selector(), @protocol(), @encode(), and [] message syntax.
3464
a87a86e1
DM
34652015-11-20 David Malcolm <dmalcolm@redhat.com>
3466
3467 PR 62314
3468 * c-typeck.c (should_suggest_deref_p): New function.
3469 (build_component_ref): Special-case POINTER_TYPE when
3470 generating a "not a structure of union" error message, and
3471 suggest a "->" rather than a ".", providing a fix-it hint.
3472
8ece8dfb
DM
34732015-11-19 David Malcolm <dmalcolm@redhat.com>
3474
3475 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3476 candidate into a new function, find_closest_identifier.
3477
433068cc
MP
34782015-11-19 Marek Polacek <polacek@redhat.com>
3479
3480 PR c/68412
3481 * c-typeck.c (parser_build_binary_op): Properly handle
3482 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3483
bef08b71
DM
34842015-11-17 David Malcolm <dmalcolm@redhat.com>
3485
3486 * c-parser.c (set_c_expr_source_range): Bulletproof both
3487 overloaded implementations against NULL expr->value.
3488 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3489 values.
3490 (c_parser_unary_expression): Likewise when handling addresses of
3491 labels.
3492 (c_parser_postfix_expression): Likewise for statement expressions,
3493 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3494 __builtin_va_arg, and for __builtin_offset_of.
3495 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3496 src_range using the range of the braced initializer.
3497 (c_parser_transaction_expression): Set src_range for "ret" to a
3498 sane pair of values.
3499
fff77217
KY
35002015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3501
3502 * c-parser.c (c_finish_omp_declare_simd): Look for
3503 "simd" attribute as well. Update error message.
3504
1d899da2
TS
35052015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3506
3507 * c-parser.c (c_parser_omp_declare_target): Adjust.
3508
e4606348
JJ
35092015-11-14 Jakub Jelinek <jakub@redhat.com>
3510
3511 * c-typeck.c (c_finish_omp_clauses): Don't mark
3512 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3513
3e636daf
MP
35142015-11-14 Marek Polacek <polacek@redhat.com>
3515
3516 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3517 * c-typeck.c: Likewise.
3518
ebedc9a3
DM
35192015-11-13 David Malcolm <dmalcolm@redhat.com>
3520
3521 * c-decl.c (warn_defaults_to): Pass line_table to
3522 rich_location ctor.
3523 * c-errors.c (pedwarn_c99): Likewise.
3524 (pedwarn_c90): Likewise.
3525 * c-parser.c (set_c_expr_source_range): New functions.
3526 (c_token::get_range): New method.
3527 (c_token::get_finish): New method.
3528 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3529 based on the range from the start of the LHS to the end of the
3530 RHS.
3531 (c_parser_conditional_expression): Likewise, based on the range
3532 from the start of the cond.value to the end of exp2.value.
3533 (c_parser_binary_expression): Call set_c_expr_source_range on
3534 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3535 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3536 based on the cast_loc through to the end of the expr.
3537 (c_parser_unary_expression): Likewise, based on the
3538 op_loc through to the end of op.
3539 (c_parser_sizeof_expression) Likewise, based on the start of the
3540 sizeof token through to either the closing paren or the end of
3541 expr.
3542 (c_parser_postfix_expression): Likewise, using the token range,
3543 or from the open paren through to the close paren for
3544 parenthesized expressions.
3545 (c_parser_postfix_expression_after_primary): Likewise, for
3546 various kinds of expression.
3547 * c-tree.h (struct c_expr): Add field "src_range".
3548 (c_expr::get_start): New method.
3549 (c_expr::get_finish): New method.
3550 (set_c_expr_source_range): New decls.
3551 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3552 on ret for prefix unary ops.
3553 (parser_build_binary_op): Likewise, running from the start of
3554 arg1.value through to the end of arg2.value.
3555
ec8b536f
MP
35562015-11-13 Marek Polacek <polacek@redhat.com>
3557
3558 PR c/68320
3559 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3560
277fe616
DM
35612015-11-13 David Malcolm <dmalcolm@redhat.com>
3562
3563 * c-typeck.c: Include spellcheck.h.
3564 (lookup_field_fuzzy_find_candidates): New function.
3565 (lookup_field_fuzzy): New function.
3566 (build_component_ref): If the field was not found, try using
3567 lookup_field_fuzzy and potentially offer a suggestion.
3568
6e232ba4
JN
35692015-11-12 James Norris <jnorris@codesourcery.com>
3570 Joseph Myers <joseph@codesourcery.com>
3571
3572 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3573 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3574 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3575 and PRAGMA_OMP_CLAUSE_LINK.
3576 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3577 and PRAGMA_OACC_CLAUSE_LINK.
3578 (OACC_DECLARE_CLAUSE_MASK): New definition.
3579 (c_parser_oacc_declare): New function.
3580
9be4f715
MP
35812015-11-12 Marek Polacek <polacek@redhat.com>
3582
3583 PR c/67784
3584 * c-parser.c (c_parser_for_statement): Reclassify the token in
3585 a correct scope.
3586
e78bede6
MP
35872015-11-11 Marek Polacek <polacek@redhat.com>
3588
3589 PR c/68107
3590 PR c++/68266
3591 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3592 checking the size of an array.
3593
69f293c9
AM
35942015-11-11 Andrew MacLeod <amacleod@redhat.com>
3595
3596 * c-array-notation.c: Remove unused header files.
3597 * c-aux-info.c: Likewise.
3598 * c-convert.c: Likewise.
3599 * c-decl.c: Likewise.
3600 * c-errors.c: Likewise.
3601 * c-lang.c: Likewise.
3602 * c-objc-common.c: Likewise.
3603 * c-parser.c: Likewise.
3604 * c-typeck.c: Likewise.
3605 * gccspec.c: Likewise.
3606
3a40d81d
NS
36072015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3608 Cesar Philippidis <cesar@codesourcery.com>
3609 James Norris <jnorris@codesourcery.com>
3610 Julian Brown <julian@codesourcery.com>
3611 Nathan Sidwell <nathan@codesourcery.com>
3612
3a40d81d
NS
3613 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3614 routine arg.
3615 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3616 (c_parser_pragma): Parse 'acc routine'.
3617 (OACC_ROUTINE_CLAUSE_MARK): Define.
3618 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3619
fc402eec
AA
36202015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3621
3622 PR debug/67192
3623 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3624 location of the backward-goto to the start of the loop body.
3625
f6b0b3db
AA
36262015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3627
3628 PR debug/67192
3629 * c-parser.c (c_parser_while_statement): Finish the loop before
3630 parsing ahead for misleading indentation.
3631 (c_parser_for_statement): Likewise.
3632
ee45a32d
EB
36332015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3634
3635 * c-decl.c (finish_struct): If the structure has reverse storage
3636 order, rewrite the type of array fields with scalar component. Call
3637 maybe_apply_pragma_scalar_storage_order on entry.
3638 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3639 errors on bit-fields and reverse SSO here and not...
3640 (c_mark_addressable): ...here.
3641 (output_init_element): Adjust call to initializer_constant_valid_p.
3642 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3643
8a645150
DM
36442015-11-06 David Malcolm <dmalcolm@redhat.com>
3645
3646 * c-decl.c (warn_defaults_to): Update for change in signature
3647 of diagnostic_set_info.
3648 * c-errors.c (pedwarn_c99): Likewise.
3649 (pedwarn_c90): Likewise.
3650 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3651 for textinfo::set_location.
3652
7a5e4956
CP
36532015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3654 Thomas Schwinge <thomas@codesourcery.com>
3655 James Norris <jnorris@codesourcery.com>
3656
3657 * c-parser.c (c_parser_omp_clause_name): Add support for
3658 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3659 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3660 default(none) in OpenACC.
3661 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3662 arguments.
3663 (c_parser_oacc_clause_tile): New function.
3664 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3665 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3666 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3667 TILE}.
3668 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3669 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3670 FIRSTPRIVATE}.
3671 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3672 (c_parser_oacc_update): Update the error message for missing clauses.
3673 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3674 and OMP_CLAUSE_INDEPENDENT.
3675
bfcfbfa0
MP
36762015-11-05 Marek Polacek <polacek@redhat.com>
3677
3678 PR c/68090
3679 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3680 deal with pre-evaluation on invalid types.
3681
e01d41e5
JJ
36822015-11-05 Jakub Jelinek <jakub@redhat.com>
3683 Ilya Verbin <ilya.verbin@intel.com>
3684
3685 * c-parser.c: Include context.h and gimple-expr.h.
3686 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3687 monotonic together with nonmonotonic.
3688 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3689 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3690 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3691 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3692 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3693 expressions on combined target teams before the target.
3694 (c_parser_omp_declare_target): If decl has "omp declare target" or
3695 "omp declare target link" attribute, and cgraph or varpool node already
3696 exists, then set corresponding flags. Call c_finish_omp_clauses
3697 in the parenthesized extended-list syntax case.
3698 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3699 declare target.
3700 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3701 on OMP_CLAUSE_REDUCTION array sections.
3702 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3703 into the constant offset, or for variable low-bound using
3704 POINTER_PLUS_EXPR. For structure element based array sections use
3705 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3706 (c_finish_omp_clauses): Drop generic_field_head, structure
3707 elements are now always mapped even as array section bases,
3708 diagnose same var in data sharing and mapping clauses. Diagnose if
3709 linear step on declare simd is neither a constant nor a uniform
3710 parameter. Look through POINTER_PLUS_EXPR for array section
3711 reductions. Diagnose the same var or function appearing multiple
3712 times on the same directive. Fix up wording for the to clause if t
3713 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3714 modifier on kinds other than dynamic or guided or nonmonotonic
3715 modifier together with ordered clause.
3716
4bf9e5a8
TS
37172015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3718 Chung-Lin Tang <cltang@codesourcery.com>
3719
3720 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3721
2adfab87
AM
37222015-10-29 Andrew MacLeod <amacleod@redhat.com>
3723
3724 * c-array-notation.c: Reorder #include's and remove duplicates.
3725 * c-aux-info.c: Likewise.
3726 * c-convert.c: Likewise.
3727 * c-decl.c: Likewise.
3728 * c-errors.c: Likewise.
3729 * c-lang.c: Likewise.
3730 * c-objc-common.c: Likewise.
3731 * c-parser.c: Likewise.
3732 * c-typeck.c: Likewise.
3733
e922069e
JW
37342015-10-26 Jim Wilson <jim.wilson@linaro.org>
3735
3736 PR debug/66068
3737 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3738 after calling build_qualified_type.
3739
765dd391
CP
37402015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3741 Thomas Schwinge <thomas@codesourcery.com>
3742 James Norris <jnorris@codesourcery.com>
3743 Joseph Myers <joseph@codesourcery.com>
3744 Julian Brown <julian@codesourcery.com>
3745 Bernd Schmidt <bschmidt@redhat.com>
3746
3747 * c-parser.c (c_parser_oacc_shape_clause): New.
3748 (c_parser_oacc_simple_clause): New.
3749 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3750 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3751
88bae6f4
TS
37522015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3753 James Norris <jnorris@codesourcery.com>
3754 Cesar Philippidis <cesar@codesourcery.com>
3755
3756 PR c/64765
3757 PR c/64880
3758 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3759 parameters, and handle these. Adjust all users.
3760 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3761 into...
3762 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3763 all users.
3764 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3765 declare functions.
3766 (c_finish_omp_construct): Declare function.
3767 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3768 Merge functions into...
3769 (c_finish_omp_construct): ... this new function.
3770
a8fc2579
RB
37712015-10-22 Richard Biener <rguenther@suse.de>
3772
3773 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3774 before folding a MINUS_EXPR.
3775
e9122ef6
MP
37762015-10-21 Marek Polacek <polacek@redhat.com>
3777
3778 PR c/68024
3779 * c-decl.c (start_function): Warn about vararg functions without
3780 a prototype.
3781
9f47c7e5
IE
37822015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3783
3784 * c-typeck.c (build_conditional_expr): Use boolean vector
3785 type for vector comparison.
3786 (build_vec_cmp): New.
3787 (build_binary_op): Use build_vec_cmp for comparison.
3788
fa60eeb9
MP
37892015-10-20 Marek Polacek <polacek@redhat.com>
3790
3791 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3792
2c7020eb
MP
37932015-10-20 Marek Polacek <polacek@redhat.com>
3794
3795 PR c/67964
3796 * c-parser.c (c_parser_attributes): Break out of the loop if the
3797 token after an attribute isn't a comma.
3798
d9a6bd32
JJ
37992015-10-13 Jakub Jelinek <jakub@redhat.com>
3800 Aldy Hernandez <aldyh@redhat.com>
3801
3802 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3803 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3804 (c_parser_omp_variable_list): Handle structure elements for
3805 map, to and from clauses. Handle array sections in reduction
3806 clause. Formatting fixes.
3807 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3808 if clause modifiers.
3809 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3810 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3811 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3812 c_parser_omp_clause_is_device_ptr): New functions.
3813 (c_parser_omp_clause_ordered): Parse optional parameter.
3814 (c_parser_omp_clause_reduction): Handle array reductions.
3815 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3816 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3817 functions.
3818 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3819 (c_parser_omp_clause_depend_sink): New function.
3820 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3821 (c_parser_omp_clause_map): Parse release/delete map kinds and
3822 optional always modifier.
3823 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3824 and c_finish_omp_clauses callers.
3825 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3826 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3827 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3828 (OMP_CRITICAL_CLAUSE_MASK): Define.
3829 (c_parser_omp_critical): Parse critical clauses.
3830 (c_parser_omp_for_loop): Handle doacross loops, adjust
3831 c_finish_omp_for and c_finish_omp_clauses callers.
3832 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3833 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3834 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3835 (c_parser_omp_for): Disallow ordered clause when combined with
3836 distribute. Disallow linear clause when combined with distribute
3837 and not combined with simd.
3838 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3839 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3840 parse clauses and if depend clause is found, don't parse a body.
3841 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3842 Allow target parallel without for after it.
3843 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3844 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3845 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3846 invalid kinds.
3847 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3848 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3849 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3850 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3851 functions.
3852 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3853 defaultmap and is_device_ptr clauses.
3854 (c_parser_omp_target): Parse target parallel and target simd. Set
3855 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3856 and target exit data. Diagnose invalid map kinds.
3857 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3858 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3859 construct.
3860 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3861 &omp_priv.
3862 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3863 (c_parser_omp_taskloop): New function.
3864 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3865 handle PRAGMA_OMP_TASKLOOP.
3866 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3867 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3868 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3869 Add IS_OMP argument, handle structure element bases, diagnose
3870 bitfields, pass IS_OMP recursively, diagnose known zero length
3871 array sections in depend clauses, handle array sections in reduction
3872 clause, diagnose negative length even for pointers.
3873 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3874 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3875 array sections in reduction clause, set
3876 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3877 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3878 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3879 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3880
21ba0cea
MP
38812015-10-06 Marek Polacek <polacek@redhat.com>
3882
3883 * c-parser.c (c_parser_statement_after_labels): Use
3884 protected_set_expr_location.
3885 (c_parser_omp_clause_num_gangs): Likewise.
3886 (c_parser_omp_clause_num_threads): Likewise.
3887 (c_parser_omp_clause_num_workers): Likewise.
3888 (c_parser_omp_clause_vector_length): Likewise.
3889 (c_parser_omp_clause_num_teams): Likewise.
3890 (c_parser_omp_clause_thread_limit): Likewise.
3891 * c-typeck.c (build_c_cast): Likewise.
3892 (c_cast_expr): Likewise.
3893
624d31fe
RS
38942015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3895
3896 * c-typeck.c (c_tree_equal): Use real_equal instead of
3897 REAL_VALUES_EQUAL.
3898
b8fd7909
JM
38992015-10-04 Jason Merrill <jason@redhat.com>
3900
3901 * c-parser.c (c_lex_one_token): Handle @synchronized.
3902 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3903 can change whether the function is transaction_safe.
3904
1c7485af
MP
39052015-10-02 Marek Polacek <polacek@redhat.com>
3906
3907 PR c/67730
3908 * c-typeck.c (convert_for_assignment): Use the expansion point
3909 location throughout.
3910
3e3b8d63
MP
39112015-10-02 Marek Polacek <polacek@redhat.com>
3912
3913 PR c/64249
3914 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3915 and pass it down to c_parser_if_statement.
3916 (c_parser_else_body): Add CHAIN parameter and pass it down to
3917 c_parser_statement_after_labels.
3918 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3919 duplicated if-else-if conditions.
3920
aabef2de
MP
39212015-10-01 Marek Polacek <polacek@redhat.com>
3922
3923 * c-typeck.c (convert_for_assignment): Improve commentary.
3924
de8ddd5f
MP
39252015-09-30 Marek Polacek <polacek@redhat.com>
3926
3927 PR c/67730
3928 * c-typeck.c (c_finish_return): Use the expansion point location for
3929 certain "return with value" warnings.
3930
c4914de6
MLI
39312015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3932
3933 * c-parser.c (pragma_lex): Add loc argument.
3934
0e36f5c7
MP
39352015-09-15 Marek Polacek <polacek@redhat.com>
3936
3937 PR c/67580
3938 * c-decl.c (tag_exists_p): New function.
3939 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3940 struct/union/enum keywords are missing.
3941 * c-tree.h (tag_exists_p): Declare.
3942
2f3bb934
MP
39432015-09-15 Marek Polacek <polacek@redhat.com>
3944
3945 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3946 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3947 Return NULL_TREE instead of 0.
3948 (lookup_name): Return NULL_TREE instead of 0.
3949 (lookup_name_in_scope): Likewise.
3950 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3951 (parser_xref_tag): Use false instead of 0.
3952 (start_struct): Use true instead of 1.
3953 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3954
aa256c4a
MP
39552015-09-14 Marek Polacek <polacek@redhat.com>
3956
3957 * c-typeck.c (set_nonincremental_init_from_string): Use
3958 HOST_WIDE_INT_M1U when shifting a negative value.
3959
dbb68221
MW
39602015-09-09 Mark Wielaard <mjw@redhat.com>
3961
3962 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3963 parm against NULL.
3964
a8a098ac
JJ
39652015-09-10 Jakub Jelinek <jakub@redhat.com>
3966
3967 PR c/67502
3968 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3969 into OMP_FOR_PRE_BODY rather than before the loop.
3970
f4b189d5
JJ
39712015-09-09 Jakub Jelinek <jakub@redhat.com>
3972
0bb99c11
JJ
3973 PR c/67501
3974 * c-parser.c (c_parser_oacc_all_clauses,
3975 c_parser_omp_all_clauses): Remove invalid clause from
3976 list of clauses even if parser->error is set.
3977
fce5e5e3
JJ
3978 PR c/67500
3979 * c-parser.c (c_parser_omp_clause_aligned,
3980 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3981 test for errors.
3982 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3983 error_mark_node.
3984
f4b189d5
JJ
3985 PR c/67495
3986 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3987 instead of c_parser_unary_expression. If the result is !lvalue_p,
3988 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3989
b2aaf235
MP
39902015-09-04 Marek Polacek <polacek@redhat.com>
3991
3992 PR sanitizer/67279
3993 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3994
1807ffc1
MS
39952015-09-03 Martin Sebor <msebor@redhat.com>
3996
3997 PR c/66516
8b652e65
JJ
3998 * c-typeck.c (convert_arguments, parser_build_unary_op,
3999 build_conditional_expr, c_cast_expr, convert_for_assignment,
4000 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4001 reject_gcc_builtin.
4002 (c_decl_implicit): Define.
4003
d04ff417
MP
40042015-09-02 Marek Polacek <polacek@redhat.com>
4005
4006 PR c/67432
4007 * c-parser.c (c_parser_enum_specifier): Give a better error for
4008 an empty enum.
4009
a79683d5
TS
40102015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4011
4012 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4013
191a6b94
MP
40142015-08-12 Marek Polacek <polacek@redhat.com>
4015
4016 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4017 LOC to it.
4018
420a9d9b
MP
40192015-08-03 Marek Polacek <polacek@redhat.com>
4020
4021 PR c/67088
4022 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4023 Use it.
4024 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4025
992118a1
PP
40262015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4027
4028 * c-parser.c (c_parser_if_body): Take token_indent_info
4029 argument. Call warn_for_misleading_indentation even when the
4030 body is a semicolon. Extract token_indent_infos corresponding
4031 to the guard, body and next tokens. Adjust call to
4032 warn_for_misleading_indentation accordingly.
4033 (c_parser_else_body): Likewise.
4034 (c_parser_if_statement): Likewise.
4035 (c_parser_while_statement): Likewise.
4036 (c_parser_for_statement): Likewise.
4037
46308474
LFSM
40382015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4039 Manuel López-Ibáñez <manu@gcc.gnu.org>
4040
4041 * c-decl.c (get_parm_info): Remove static var. Update warning
4042 message.
4043
05b28fd6
MP
40442015-07-27 Marek Polacek <polacek@redhat.com>
4045
4046 PR c++/66555
4047 PR c/54979
4048 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4049
451b5e48
MP
40502015-07-20 Marek Polacek <polacek@redhat.com>
4051
4052 PR c++/55095
4053 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4054 (build_binary_op): Warn about left shift overflows.
4055
1916bcb5
AM
40562015-07-09 Andrew MacLeod <amacleod@redhat.com>
4057
4058 * c-array-notation.c: Adjust includes for flags.h changes.
4059 * c-objc-common.c: Likewise.
4060
c7131fb2
AM
40612015-07-07 Andrew MacLeod <amacleod@redhat.com>
4062
4063 * c-array-notation.c: Adjust includes.
4064 * c-aux-info.c: Likewise.
4065 * c-convert.c: Likewise.
4066 * c-decl.c: Likewise.
4067 * c-errors.c: Likewise.
4068 * c-lang.c: Likewise.
4069 * c-objc-common.c: Likewise.
4070 * c-parser.c: Likewise.
4071 * c-typeck.c: Likewise.
4072
da2e71c9
MLI
40732015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4074
4075 PR fortran/66605
4076 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4077
b155cfd9
MP
40782015-06-29 Marek Polacek <polacek@redhat.com>
4079
4080 PR c/66322
4081 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4082 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4083 about -Wswitch-bool here.
4084 (do_case): Update c_add_case_label call.
4085 (c_finish_case): Update c_do_switch_warnings call.
4086
31521951
MP
40872015-06-27 Marek Polacek <polacek@redhat.com>
4088
4089 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4090
22d03525
MP
40912015-06-26 Marek Polacek <polacek@redhat.com>
4092
4093 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4094 INDIRECT_REF_P.
4095 * c-typeck.c (array_to_pointer_conversion): Likewise.
4096 (build_unary_op): Likewise.
4097 (c_finish_return): Likewise.
4098
f0889939
AM
40992015-06-25 Andrew MacLeod <amacleod@redhat.com>
4100
4101 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4102 * c-parser.c: Likewise.
4103
8d67ee55
RS
41042015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4105
4106 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4107 instead of pointer_hash.
4108 (detect_field_duplicates): Likewise.
4109
0ae9bd27
MP
41102015-06-25 Marek Polacek <polacek@redhat.com>
4111
4112 * c-array-notation.c: Use VAR_P throughout.
4113 * c-decl.c: Likewise.
4114 * c-objc-common.c: Likewise.
4115 * c-parser.c: Likewise.
4116 * c-typeck.c: Likewise.
4117
62f9079a
MP
41182015-06-25 Marek Polacek <polacek@redhat.com>
4119
4120 * c-decl.c: Use is_global_var throughout.
4121 * c-parser.c: Likewise.
4122 * c-typeck.c: Likewise.
4123
abb226c9
AM
41242015-06-17 Andrew MacLeod <amacleod@redhat.com>
4125
4126 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4127 * c-aux-info.c: Likewise.
4128 * c-convert.c: Likewise.
4129 * c-decl.c: Likewise.
4130 * c-errors.c: Likewise.
4131 * c-lang.c: Likewise.
4132 * c-objc-common.c: Likewise.
4133 * c-parser.c: Likewise.
4134 * c-typeck.c: Likewise.
4135
8cbababc
JH
41362015-06-11 Jan Hubicka <hubicka@ucw.cz>
4137
4138 PR middle-end/66325
4139 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4140 variants.
4141
a0349665
PMR
41422015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4143
4144 * c-decl.c (pop_scope): Register the main translation unit
4145 through the new debug hook.
4146
13fdf2e2
AM
41472015-06-08 Andrew MacLeod <amacleod@redhat.com>
4148
4149 * c-array-notation.c : Adjust include files.
4150 * c-aux-info.c : Likewise.
4151 * c-convert.c : Likewise.
4152 * c-decl.c : Likewise.
4153 * c-errors.c : Likewise.
4154 * c-lang.c : Likewise.
4155 * c-lang.h : Likewise.
4156 * c-objc-common.c : Likewise.
4157 * c-parser.c : Likewise.
4158 * c-typeck.c : Likewise.
4159
d7438551
AH
41602015-06-05 Aldy Hernandez <aldyh@redhat.com>
4161
4162 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4163 immediately clobber it.
4164 (c_write_global_declarations_1): Remove call to
4165 check_global_declaration_1.
4166 (c_write_global_declarations_2): Remove.
4167 (c_write_final_cleanups): Rename from c_write_global_declarations.
4168 Remove call to finalize_compilation_unit.
4169 Remove calls to debugging hooks.
4170 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4171 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4172 * c-tree.h: Remove c_write_global_declarations.
4173
ecb9f223
AM
41742015-06-04 Andrew MacLeod <amacleod@redhat.com>
4175
4176 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4177 * c-aux-info.c: Likewise.
4178 * c-convert.c: Likewise.
4179 * c-decl.c: Likewise.
4180 * c-errors.c: Likewise.
4181 * c-lang.c: Likewise.
4182 * c-objc-common.c: Likewise.
4183 * c-parser.c: Likewise.
4184 * c-typeck.c: Likewise.
4185
9482b620
MP
41862015-06-04 Marek Polacek <polacek@redhat.com>
4187
4188 PR c/66341
4189 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4190 it is a lvalue.
4191
bc51ace3
PK
41922015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4193
4194 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4195 Warn for empty struct.
4196 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4197
ea5b45b6
AT
41982015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4199
4200 * c-decl.c (start_function): Call plugin before parsing.
4201 (finish_function): Call plugin after parsing.
4202
c2d47482
PK
42032015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4204
4205 PR c/49551
4206 * c-decl.c (merge_decls): Merge DECL_COMMON.
4207
a95492ab
JW
42082015-05-22 Jim Wilson <jim.wilson@linaro.org>
4209
4210 * Make-lang.in (check_gcc_pallelize): Define.
4211
fd5c817a
MP
42122015-05-22 Marek Polacek <polacek@redhat.com>
4213
4214 PR c/47043
4215 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4216 attributes.
4217
c7b70a3c
MP
42182015-05-21 Marek Polacek <polacek@redhat.com>
4219
4220 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4221 DECL_BUILT_IN.
4222
21b634ae
MP
42232015-05-20 Marek Polacek <polacek@redhat.com>
4224
4225 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4226 * c-typeck.c: Likewise.
4227
296a8c2f
MP
42282015-05-19 Marek Polacek <polacek@redhat.com>
4229
4230 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4231
41b37d5e
JJ
42322015-05-19 Jakub Jelinek <jakub@redhat.com>
4233
4234 PR middle-end/66199
4235 * c-parser.c (c_parser_omp_for_loop): Don't add
4236 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4237 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4238 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4239 constructs.
4240
fab27f52
MM
42412015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4242
4243 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4244 swaps.
fab27f52 4245
40de31cf
MLI
42462015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4247
4248 PR fortran/44054
4249 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4250 accessor function.
4251
3aa3c9fc
MP
42522015-05-14 Marek Polacek <polacek@redhat.com>
4253
4254 PR c/66066
4255 PR c/66127
4256 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4257 rather than with 0.
4258
c3388e62
DM
42592015-05-12 David Malcolm <dmalcolm@redhat.com>
4260
4261 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4262 to add a call to warn_for_misleading_indentation.
4263 (c_parser_else_body): Likewise, adding param "else_loc".
4264 (c_parser_if_statement): Check for misleading indentation.
4265 (c_parser_while_statement): Likewise.
4266 (c_parser_for_statement): Likewise.
4267
755e528f
MP
42682015-05-08 Marek Polacek <polacek@redhat.com>
4269
4270 PR c/64918
4271 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4272 (output_init_element): Likewise.
4273
0173bd2a
MP
42742015-05-07 Marek Polacek <polacek@redhat.com>
4275
4276 PR c/65179
4277 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4278 value.
4279
9babc352
MP
42802015-04-30 Marek Polacek <polacek@redhat.com>
4281
4282 * c-typeck.c (set_init_label): Call error_at instead of error and
4283 pass LOC to it.
4284
ac9f18db
MP
4285 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4286 the type of a decl.
4287
ec3fba51
MP
4288 * c-typeck.c (c_build_va_arg): Clarify the error message.
4289
b811915d
TS
42902015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4291
4292 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4293 OMP_STANDALONE_CLAUSES.
4294
f3075008
MP
42952015-04-28 Marek Polacek <polacek@redhat.com>
4296
4297 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4298
4e81b788
MP
42992015-04-28 Marek Polacek <polacek@redhat.com>
4300
4301 PR c/65901
4302 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4303
6c1db78e
MP
43042015-04-25 Marek Polacek <polacek@redhat.com>
4305
4306 PR c/52085
4307 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4308 attribute.
4309
5c4abbb8
MP
43102015-04-23 Marek Polacek <polacek@redhat.com>
4311
4312 PR c/65345
4313 * c-decl.c (set_labels_context_r): New function.
4314 (store_parm_decls): Call it via walk_tree_without_duplicates.
4315 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4316 instead of create_tmp_var. Build TARGET_EXPR instead of
4317 COMPOUND_EXPR.
4318 (build_atomic_assign): Use create_tmp_var_raw instead of
4319 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4320
06aca1d5
IV
43212015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4322
4323 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4324 (c_parser_omp_target_update): Add missed %> to error_at ().
4325
8fba1830
BRF
43262015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4327
4328 PR target/55143
4329 * c-decl.c (c_default_pointer_mode): Remove definition.
4330 * c-tree.h (c_default_pointer_mode): Remove declaration.
4331
62021f64
TB
43322015-03-27 Tobias Burnus <burnus@net-b.de>
4333
4334 PR c/65586
4335 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4336 error out.
4337 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4338 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4339 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4340
9b65e171
JJ
43412015-03-19 Jakub Jelinek <jakub@redhat.com>
4342
4343 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4344 attribute for DECL_EXTERNAL VAR_DECLs.
4345
17958621
JJ
43462015-03-11 Jakub Jelinek <jakub@redhat.com>
4347
4348 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4349 argument.
4350
7ccb1a11
JJ
43512015-03-10 Jakub Jelinek <jakub@redhat.com>
4352
4353 PR c/65120
4354 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4355 before preparing arguments to warn_logical_not_parentheses.
4356
01177669
JJ
43572015-03-09 Jakub Jelinek <jakub@redhat.com>
4358
4359 PR c/65120
4360 * c-typeck.c (parser_build_binary_op): Don't warn for
4361 !!x == y or !b == y where b is _Bool.
4362
802ac282
MP
43632015-03-09 Marek Polacek <polacek@redhat.com>
4364
4365 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4366 * c-decl.c (grokdeclarator): Likewise.
4367 * c-typeck.c (build_binary_op): Likewise.
4368
e5165b60
MP
43692015-02-27 Marek Polacek <polacek@redhat.com>
4370
4371 PR c/65228
4372 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4373
065d214c
MP
43742015-02-14 Marek Polacek <polacek@redhat.com>
4375
4376 PR c/64768
4377 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4378 declared through a typedef name.
4379
e5d9235b
MP
43802015-02-13 Marek Polacek <polacek@redhat.com>
4381
4382 PR c/65050
4383 * c-decl.c (grokdeclarator): Print also the type when giving
4384 the error message about array's incomplete element type.
4385
fa01ffcc
JJ
43862015-02-11 Jakub Jelinek <jakub@redhat.com>
4387
4388 PR c/64824
4389 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4390 check in the POP macro.
4391
c3e38a03
MP
43922015-02-09 Marek Polacek <polacek@redhat.com>
4393
4394 PR c/64856
4395 * c-typeck.c (process_init_element): Don't always wrap
4396 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4397 initializing a range of elements.
4398
4886ec8e
JJ
43992015-02-04 Jakub Jelinek <jakub@redhat.com>
4400
4401 PR c/64824
4402 PR c/64868
4403 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4404
c3e38a03 44052015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4406
4407 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4408 processing enum declaration.
4409
7b33f0c8
MP
44102015-01-29 Marek Polacek <polacek@redhat.com>
4411
4412 PR c/64709
4413 * c-typeck.c (pop_init_level): If constructor_elements has
4414 exactly one element with integer_zerop value, set constructor_zeroinit
4415 to 1. Remove braces around warning_init call.
4416
dea63e49
JJ
44172015-01-27 Jakub Jelinek <jakub@redhat.com>
4418
4419 PR c/64766
4420 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4421 of FUNCTION_DECLs with error_mark_node.
4422
d38f7dce
JJ
44232015-01-26 Jakub Jelinek <jakub@redhat.com>
4424
4425 PR c/64778
4426 * c-typeck.c (convert_arguments): Return -1 if there are
4427 error_args, even if we've diagnosed too many arguments.
4428
cbf5d0e7
RB
44292015-01-21 Richard Biener <rguenther@suse.de>
4430
4431 PR middle-end/64313
4432 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4433 for builtins the user declared correctly.
4434
41dbbb37
TS
44352015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4436 Bernd Schmidt <bernds@codesourcery.com>
4437 Cesar Philippidis <cesar@codesourcery.com>
4438 James Norris <jnorris@codesourcery.com>
4439 Jakub Jelinek <jakub@redhat.com>
4440 Ilmir Usmanov <i.usmanov@samsung.com>
4441
4442 * c-parser.c: Include "gomp-constants.h".
4443 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4444 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4445 Use OMP_CLAUSE_SET_MAP_KIND.
4446 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4447 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4448 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4449 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4450 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4451 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4452 "copyout", "create", "delete", "deviceptr", "gang", "host",
4453 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4454 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4455 "present_or_create", "pcreate", "seq", "self", "vector",
4456 "vector_length", "wait", "worker".
4457 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4458 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4459 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4460 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4461 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4462 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4463 (c_parser_oacc_data_clause_deviceptr)
4464 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4465 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4466 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4467 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4468 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4469 (c_parser_oacc_parallel, c_parser_oacc_update)
4470 (c_parser_oacc_wait): New functions.
4471 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4472 (c_finish_oacc_data): New prototypes.
4473 * c-typeck.c: Include "gomp-constants.h".
4474 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4475 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4476 OMP_CLAUSE_SET_MAP_KIND.
4477 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4478 (c_finish_oacc_data): New functions.
4479 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4480 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4481 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4482 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4483 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4484 GOMP_MAP_FORCE_DEVICEPTR.
4485
adfac8df
JJ
44862015-01-09 Michael Collison <michael.collison@linaro.org>
4487
4488 * c-array-notation.c: Include hash-set.h, machmode.h,
4489 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4490 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4491 * c-aux-info.c: Ditto.
4492 * c-convert.c: Ditto.
4493 * c-decl.c: Ditto.
4494 * c-errors.c: Ditto.
4495 * c-lang.c: Dittoxs.
4496 * c-objc-common.c: Ditto.
4497 * c-parser.c: Ditto.
4498 * c-typeck.c: Include hash-set.h, machmode.h,
4499 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4500 fold-const.h, wide-int.h, inchash.h, real.h and
4501 fixed-value.h due to flattening of tree.h.
4502
2cc901dc
MP
45032015-01-07 Marek Polacek <polacek@redhat.com>
4504
4505 PR c/64417
4506 * c-typeck.c (process_init_element): Disallow initialization of
4507 a flexible array member with a string constant if the structure
4508 is in an array.
4509
5624e564
JJ
45102015-01-05 Jakub Jelinek <jakub@redhat.com>
4511
e5341100
JJ
4512 PR sanitizer/64344
4513 * c-typeck.c (convert_for_assignment, c_finish_return): For
4514 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4515 types also set in_late_binary_op around convert call.
4516 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4517 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4518 result on expr as last argument to ubsan_instrument_float_cast,
4519 if in_late_binary_op, don't use c_save_expr but save_expr.
4520
5624e564
JJ
4521 Update copyright years.
4522
5bd012f8
MP
45232015-01-05 Marek Polacek <polacek@redhat.com>
4524
4525 PR c/64423
4526 * c-typeck.c (build_array_ref): Pass loc down to
4527 warn_array_subscript_with_type_char.
4528
3f8257db 45292014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4530
4531 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4532 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4533 element type.
8e745a17 4534 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4535 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4536 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4537 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4538 to PEDWARN_FOR_QUALIFIERS.
768952be 4539
8f94a8c4
JJ
45402014-12-17 Jakub Jelinek <jakub@redhat.com>
4541
4542 PR sanitizer/64289
4543 * c-convert.c: Include ubsan.h.
4544 (convert): For real -> integral casts and
4545 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4546 instead instrument the float cast directly.
4547
b731b390
JJ
45482014-11-29 Jakub Jelinek <jakub@redhat.com>
4549
4550 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4551 c_finish_stmt_expr): Remove NULL last argument from
4552 create_tmp_var_raw and create_tmp_var calls.
4553 * c-array-notation.c (fix_builtin_array_notation_fn,
4554 build_array_notation_expr, fix_conditional_array_notations_1,
4555 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4556
541e35a6
MP
45572014-11-28 Marek Polacek <polacek@redhat.com>
4558
4559 PR c/63862
4560 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4561 convert the right operand to integer type.
4562
b286be94
MP
45632014-11-25 Marek Polacek <polacek@redhat.com>
4564
4565 PR c/63877
4566 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4567 for inline functions.
4568
aa7da51a
JJ
45692014-11-21 Jakub Jelinek <jakub@redhat.com>
4570
4571 PR target/63764
4572 * c-typeck.c (build_array_ref): Adjust
4573 convert_vector_to_pointer_for_subscript caller. If it returns true,
4574 call non_lvalue_loc on the result.
4575
d876207f
RB
45762014-11-11 Richard Biener <rguenther@suse.de>
4577
4578 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4579 to true.
4580
e5e44252
AK
45812014-11-10 Andi Kleen <ak@linux.intel.com>
4582
4583 PR c/60804
4584 * c-parser.c (c_parser_statement_after_labels): Call
4585 check_no_cilk.
4586 (c_parser_if_statement): Dito.
4587 (c_parser_switch_statement): Dito.
4588 (c_parser_while_statement): Dito.
4589 (c_parser_do_statement): Dito.
4590 (c_parser_for_statement): Dito.
4591 * c-typeck.c (c_finish_loop): Dito.
4592
13c21655
PC
45932014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4594
4595 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4596 OPT_Wshift_count_overflow in the warnings.
4597
2d51fcef
MP
45982014-10-30 Marek Polacek <polacek@redhat.com>
4599
4600 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4601 print the stripped version as well, if they're not the same.
4602
ef4bddc2
RS
46032014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4604
4605 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4606 machine_mode.
4607
c582198b
AM
46082014-10-28 Andrew MacLeod <amacleod@redhat.com>
4609
4610 * c-decl.c: Adjust include files.
4611 * c-parser.c: Ditto.
4612
ddc8de03
PM
46132014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4614 Tom Tromey <tromey@redhat.com>
4615
4616 * c-tree.h (enum c_oracle_request): New.
4617 (c_binding_oracle_function): New typedef.
4618 (c_binding_oracle, c_pushtag, c_bind): Declare.
4619 * c-decl.c (c_binding_oracle): New global.
4620 (I_SYMBOL_CHECKED): New macro.
4621 (i_symbol_binding): New function.
4622 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4623 (I_TAG_CHECKED): New macro.
4624 (i_tag_binding): New function.
4625 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4626 (I_LABEL_CHECKED): New macro.
4627 (i_label_binding): New function.
4628 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4629 (c_print_identifier): Save and restore c_binding_oracle.
4630 (c_pushtag, c_bind): New functions.
4631
60393bbc
AM
46322014-10-27 Andrew MacLeod <amacleod@redhat.com>
4633
4634 * c-typeck.c: Adjust include files.
4635
d723bb7c
MLI
46362014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4637
4638 PR c++/53061
4639 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4640 initialization here...
4641 (c_initialize_diagnostics): ... but here. Set defaults after
4642 building pretty-printer.
4643
1bc5a451
MP
46442014-10-23 Marek Polacek <polacek@redhat.com>
4645
4646 PR c/63626
4647 * c-decl.c (pop_scope): Don't print warning in external_scope.
4648
4435bb92
MP
46492014-10-19 Marek Polacek <polacek@redhat.com>
4650
4651 PR c/63567
4652 * c-typeck.c (output_init_element): Allow initializing objects with
4653 static storage duration with compound literals even in C99 and add
4654 pedwarn for it.
4655
7278465e
MP
46562014-10-17 Marek Polacek <polacek@redhat.com>
4657
4658 PR c/63567
4659 * c-typeck.c (digest_init): Allow initializing objects with static
4660 storage duration with compound literals even in C99 and add pedwarn
4661 for it.
4662
d9b7be2e
MP
46632014-10-17 Marek Polacek <polacek@redhat.com>
4664
4665 PR c/63543
4666 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4667 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4668 error multiple times. Print the type.
4669
f406ae1f
MP
46702014-10-17 Marek Polacek <polacek@redhat.com>
4671
4672 PR c/63549
4673 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4674 type.
4675
92574c7c
MP
46762014-10-17 Marek Polacek <polacek@redhat.com>
4677
4678 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4679 (start_function): Use OPT_Wimplicit_int instead of 0.
4680 (store_parm_decls_oldstyle): Likewise.
4681
1bc4a978
MT
46822014-10-17 Alan Modra <amodra@gmail.com>
4683
4684 PR middle-end/61848
4685 * c-decl.c (merge_decls): Don't merge section name or tls model
4686 to newdecl symtab node, instead merge to olddecl. Override
4687 existing olddecl section name. Set tls_model for all thread-local
4688 vars, not just OMP thread-private ones. Remove incorrect comment.
4689
83685514
AM
46902014-10-16 Andrew MacLeod <amacleod@redhat.com>
4691
4692 * c-decl.c: Adjust include files.
4693
78a7c317
DD
46942014-10-14 DJ Delorie <dj@redhat.com>
4695
4696 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4697 (c_token_starts_typename): Check all __intN, not just __int128.
4698 (c_token_starts_declspecs): Likewise.
4699 (c_parser_declspecs): Likewise.
4700 (c_parser_attribute_any_word): Likewise.
4701 (c_parser_objc_selector): Likewise.
4702 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4703 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4704 is specified.
4705 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4706 __int128.
4707 (finish_declspecs): Likewise.
4708
74d98c1e
AB
47092014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4710
8e745a17 4711 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4712 the duplicate code.
8e745a17 4713 (c_parser_statement): Call the new function.
74d98c1e 4714
84937de2
MP
47152014-10-09 Marek Polacek <polacek@redhat.com>
4716
4717 PR c/63480
4718 * c-typeck.c (pop_init_level): Don't warn about initializing
4719 with { }.
4720
0382aaa0
MP
47212014-10-07 Marek Polacek <polacek@redhat.com>
4722
4723 PR c/59717
4724 * c-decl.c (header_for_builtin_fn): New function.
4725 (implicitly_declare): Suggest which header to include.
4726
7a0ca710
MP
47272014-10-07 Marek Polacek <polacek@redhat.com>
4728
4729 * c-convert.c (convert): Use error_operand_p.
4730 * c-typeck.c (require_complete_type): Likewise.
4731 (really_atomic_lvalue): Likewise.
4732 (digest_init): Likewise.
4733 (handle_omp_array_sections_1): Likewise.
4734
6bc8a126
MP
47352014-10-03 Marek Polacek <polacek@redhat.com>
4736
4737 PR c/63453
4738 * c-decl.c (pop_scope): Don't warn about "inline function declared
4739 but never defined" for functions marked with gnu_inline attribute.
4740
d90c0a59
JJ
47412014-09-25 Jakub Jelinek <jakub@redhat.com>
4742
4743 PR c++/63249
4744 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4745 on low_bound and length.
4746
083e891e
MP
47472014-09-24 Marek Polacek <polacek@redhat.com>
4748
4749 PR c/61405
4750 PR c/53874
4751 * c-parser.c: Don't define CPP_KEYWORD.
4752 (c_parser_switch_statement): Pass original type to c_finish_case.
4753 * c-tree.h (c_finish_case): Update declaration.
4754 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4755 conditionally to c_do_switch_warnings.
4756
8d95fe25
MP
47572014-09-03 Marek Polacek <polacek@redhat.com>
4758
4759 PR c/62024
4760 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4761 conversions.
4762
9a771876
JJ
47632014-09-02 Jakub Jelinek <jakub@redhat.com>
4764 Balaji V. Iyer <balaji.v.iyer@intel.com>
4765 Igor Zamyatin <igor.zamyatin@intel.com>
4766
4767 * c-parser.c (c_parser_cilk_for): New function.
4768 (c_parser_cilk_grainsize): Likewise.
4769 (c_get_temp_regvar): Likewise.
4770 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4771 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4772 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4773 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4774 case.
4775
b7679d96
CG
47762014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4777
4778 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4779 with using HOST_WIDE_INT without truncation to 'int'
4780
59ea0364
MP
47812014-08-22 Marek Polacek <polacek@redhat.com>
4782
4783 PR c++/62199
4784 * c-typeck.c (parser_build_binary_op): Adjust call to
4785 warn_logical_not_parentheses.
4786
671a475e
IZ
47872014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4788
4789 PR other/62008
4790 * c-parser.c (c_parser_array_notation): Check for correct
4791 type of an array added.
4792
04159acf
MP
47932014-08-19 Marek Polacek <polacek@redhat.com>
4794
4795 PR c++/62153
4796 * c-typeck.c (build_binary_op): If either operand of a comparison
4797 is a boolean expression, call maybe_warn_bool_compare.
4798
c77935ee
PP
47992014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4800
4801 PR c/45584
4802 * c-typeck.c (build_c_cast): Do a conversion even when the
4803 TYPE_MAIN_VARIANTs are the same.
4804
35aff4fb
MP
48052014-08-19 Marek Polacek <polacek@redhat.com>
4806
4807 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4808 pedwarn_c99 instead of pedwarn.
4809 (grokfield): Likewise.
4810 (warn_defaults_to): New function.
4811 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4812 Unconditionally call pedwarn_c99 instead of pedwarn.
4813 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4814 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4815 check flag_isoc11 before.
4816 * c-errors.c (pedwarn_c99): Change the return type to bool.
4817 Handle -Wc99-c11-compat.
4818 * c-parser.c (disable_extension_diagnostics): Handle
4819 warn_c99_c11_compat.
4820 (restore_extension_diagnostics): Likewise.
4821 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4822 instead of pedwarn, don't check flag_isoc11 before.
4823 (c_parser_declspecs): Likewise.
4824 (c_parser_alignas_specifier): Likewise.
4825 (c_parser_alignof_expression): Likewise.
4826 (c_parser_generic_selection): Likewise.
4827 * c-tree.h (pedwarn_c99): Update declaration.
4828 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4829 of pedwarn_c99.
4830
177cce46
MP
48312014-08-19 Marek Polacek <polacek@redhat.com>
4832
4833 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4834 to pedwarn_c90.
4835 * c-errors.c: Include "opts.h".
4836 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4837 * c-parser.c (disable_extension_diagnostics): Handle negative value
4838 of warn_c90_c99_compat, too.
4839 (restore_extension_diagnostics): Likewise.
4840 (c_parser_compound_statement_nostart): Pass
4841 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4842
6dc99c33
MP
48432014-08-12 Marek Polacek <polacek@redhat.com>
4844
4845 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4846 Add pedwarn.
4847 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4848 Likewise.
4849 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4850
3f8257db 48512014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4852
4853 PR c/51849
4854 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4855 Call pedwarn_c90 instead of pedwarn.
4856 (check_bitfield_type_and_width): Likewise.
4857 (declspecs_add_qual): Likewise.
4858 (declspecs_add_type): Likewise.
4859 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4860 Adjust to only call pedwarn_c90.
4861 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4862 pedwarn_c90 instead of pedwarn.
4863 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4864 * c-parser.c (disable_extension_diagnostics): Handle
4865 warn_c90_c99_compat.
4866 (restore_extension_diagnostics): Likewise.
4867 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4868 pedwarn_c90 instead of pedwarn.
4869 (c_parser_initelt): Likewise.
4870 (c_parser_postfix_expression): Likewise.
4871 (c_parser_postfix_expression_after_paren_type): Likewise.
4872 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4873 * c-tree.h: Fix formatting.
4874 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4875 pedwarn_c90 instead of pedwarn.
4876
9f25a338
TS
48772014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4878
4879 * c-typeck.c: Remove include of pointer-set.h.
4880
044331a8
MP
48812014-08-07 Marek Polacek <polacek@redhat.com>
4882
4883 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4884
b787e7a2
TS
48852014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4886
4887 * c-typeck.c: Use hash_map instead of pointer_map.
4888
6e2830c3
TS
48892014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4890
4891 * c-decl.c: Use hash_set instead of pointer_set.
4892
a7ee52fb
IZ
48932014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4894
4895 PR middle-end/61455
4896 * c-array-notation.c (expand_array_notations): Handling
4897 of DECL_EXPR added.
4898
b4dfdc11
MG
48992014-07-31 Marc Glisse <marc.glisse@inria.fr>
4900
4901 PR c++/60517
4902 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4903 a local variable.
4904
976d5a22
TT
49052014-07-30 Tom Tromey <tromey@redhat.com>
4906
4907 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4908 field.
4909 (really_start_incremental_init, push_init_level): Initialize
4910 designator_depth.
4911 (pop_init_level): Set global designator_depth.
4912 (process_init_element): Check for designated_init attribute.
4913
30281de2
MP
49142014-07-20 Marek Polacek <polacek@redhat.com>
4915
4916 PR c/61852
4917 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4918 (implicitly_declare): Pass location to implicit_decl_warning.
4919
b108f48f
JJ
49202014-07-14 Jakub Jelinek <jakub@redhat.com>
4921
4922 PR middle-end/61294
4923 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4924 If non-NULL, call c_parser_check_literal_zero.
4925 (c_parser_check_literal_zero): New function.
4926 (c_parser_postfix_expression_after_primary): Adjust
4927 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4928
773ec47f
MP
49292014-07-06 Marek Polacek <polacek@redhat.com>
4930
4931 PR c/6940
4932 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4933 * c-tree.h (C_ARRAY_PARAMETER): Define.
4934 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4935 function parameter.
4936
22e1cf1c 49372014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4938 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4939
4940 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4941 releasing symbol.
4942
52ec0ea3
MP
49432014-07-01 Marek Polacek <polacek@redhat.com>
4944
4945 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4946 instead of 0 to WARN_FOR_ASSIGNMENT.
4947
d5c3d343
MP
49482014-07-01 Marek Polacek <polacek@redhat.com>
4949
4950 PR c/58286
4951 * c-typeck.c (convert_for_assignment): Pass
4952 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4953
6a7253a4
MP
49542014-06-30 Marek Polacek <polacek@redhat.com>
4955
4956 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4957 has no_sanitize_undefined attribute.
4958
5e88a8f4
IZ
49592014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4960
4961 PR middle-end/57541
4962 * c-array-notation.c (fix_builtin_array_notation_fn):
4963 Check for 0 arguments in builtin call. Check that bultin argument is
4964 correct.
4965 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4966 index.
4967
9698b078
SH
49682014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4969
4970 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4971 qualifiers in __auto_type for atomic types.
4972 (c_parser_typeof_specifier): Discard all type qualifiers in
4973 __typeof__ for atomic types.
4974
6e07c515
MP
49752014-06-25 Marek Polacek <polacek@redhat.com>
4976
4977 PR c/61162
4978 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4979 the return expression to c_finish_return.
4980
da6f124d
JJ
49812014-06-25 Jakub Jelinek <jakub@redhat.com>
4982
4983 * c-typeck.c (c_finish_omp_clauses): Make sure
4984 OMP_CLAUSE_LINEAR_STEP has correct type.
4985
c203e8a7
TS
49862014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4987
4988 * c-decl.c: Adjust.
4989
56ad0e38
JJ
49902014-06-24 Jakub Jelinek <jakub@redhat.com>
4991
4992 * c-parser.c (c_parser_omp_for_loop): For
4993 #pragma omp parallel for simd move lastprivate clause from parallel
4994 to for rather than simd.
4995
47c2554f
MP
49962014-06-23 Marek Polacek <polacek@redhat.com>
4997
4998 * c-typeck.c (parser_build_binary_op): Don't call
4999 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5000
56363ffd
JH
50012014-06-15 Jan Hubicka <hubicka@ucw.cz>
5002
5003 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5004 * c-decl.c (merge_decls): Likewise.
5005
d7ff7ae5
MP
50062014-06-09 Marek Polacek <polacek@redhat.com>
5007
5008 PR c/36446
5009 * c-typeck.c (error_init): Call inform instead of error_at.
5010 (pedwarn_init): Call inform instead of pedwarn.
5011 (warning_init): Call inform instead of warning_at.
5012
24d047a3
JH
50132014-06-07 Jan Hubicka <hubicka@ucw.cz>
5014
5015 * c-decl.c (merge_decls): Use set_decl_section_name.
5016 (duplicate_decls): Remove node if it exists.
5017
9bac5cbb
G
50182014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5019
5020 PR c/53119
5021 * c-typeck.c (push_init_level, process_init_element,
5022 pop_init_level): Correct check for zero initialization, move
5023 missing brace warning to respect zero initialization.
5024
8ffcdea8
MP
50252014-06-05 Marek Polacek <polacek@redhat.com>
5026
5027 PR c/56724
5028 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5029
742938c9
MP
50302014-06-05 Marek Polacek <polacek@redhat.com>
5031
5032 PR c/49706
5033 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5034 on the left hand side operand of a comparison.
742938c9 5035
6447c55d
MP
50362014-06-05 Marek Polacek <polacek@redhat.com>
5037
5038 PR c/48062
5039 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5040 Print note only if the warning was printed.
5041
9dc7743c
IZ
50422014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5043
5044 PR c/58942
5045 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5046 with a pointer.
5047
fedfecef
MP
50482014-06-03 Marek Polacek <polacek@redhat.com>
5049
5050 PR c/60439
5051 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5052 c_start_case.
5053 * c-tree.h (c_start_case): Update.
5054 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5055 switch condition has boolean value.
5056
9b2b7279
AM
50572014-06-02 Andrew MacLeod <amacleod@redhat.com>
5058
5059 * c-decl.c: Include builtins.h.
5060 * c-parser.c: Likewise.
5061
5c1bc275
MP
50622014-05-27 Marek Polacek <polacek@redhat.com>
5063
5064 PR c/56724
5065 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5066 error and warning calls to error_at and warning_at. Pass location of
5067 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5068 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5069 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5070
97563bc8
IZ
50712014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5072
5073 PR c/61191
5074 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5075 function parameters.
5076
aede2c10
JH
50772014-05-23 Jan Hubicka <hubicka@ucw.cz>
5078
5079 * c-decl.c (merge_decls): Preserve symtab node pointers.
5080 (duplicate_decls): Free new decl.
5081
edbba2ce
TS
50822014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5083
f3316c6d
TS
5084 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5085 initialization.
5086
edbba2ce
TS
5087 * c-parser.c (c_parser_omp_target): Return bool values.
5088
68c81f24
TS
50892014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5090
5091 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5092 num_teams_loc variable to num_thread_limit_loc.
5093
632f2871
RS
50942014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5095
5096 * c-array-notation.c (expand_array_notations): Use void_node
5097 instead of void_zero_node.
5098
766090c2
TS
50992014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5100
5101 * c-decl.c (finish_struct): Adjust.
5102 (finish_enum): Likewise.
5103 (bind): Adjust.
5104 (record_inline_static): Likewise.
5105 (push_scope): Likewise.
5106 (make_label): Likewise.
5107 (lookup_label_for_goto): Likewise.
5108 (finish_struct): Likewise.
5109 (finish_enum): Likewise.
5110 (store_parm_decls): Likewise.
5111 (c_push_function_context): Likewise.
5112 * c-lang.h: Remove usage of variable_size gty attribute.
5113 * c-parser.c (c_parse_init): Adjust.
5114 (c_parse_file): Likewise.
5115
2b107f6b
MP
51162014-05-13 Marek Polacek <polacek@redhat.com>
5117
5118 PR c/61162
5119 * c-typeck.c (convert_for_assignment): Pass location to
5120 WARN_FOR_ASSIGNMENT instead of input_location.
5121
d033409e
MP
51222014-05-10 Marek Polacek <polacek@redhat.com>
5123
5124 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5125 maybe_warn_string_init.
5126 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5127 maybe_warn_string_init.
5128 * c-tree.h (maybe_warn_string_init): Update declaration.
5129 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5130 Call pedwarn_init with loc instead of with input_location.
5131 (digest_init): Pass init_loc to maybe_warn_string_init.
5132 (pop_init_level): Call pedwarn_init with loc instead of with
5133 input_location.
5134 (set_init_index): Likewise.
5135 (process_init_element): Likewise.
5136
ea58ef42
MP
51372014-05-09 Marek Polacek <polacek@redhat.com>
5138
5139 PR c/61096
5140 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5141 (c_parser_initelt): Pass location to set_init_label. Pass array index
5142 location to set_init_index.
5143 * c-tree.h (push_init_level): Update declaration.
5144 (pop_init_level): Likewise.
5145 (set_init_index): Likewise.
5146 (set_init_label): Likewise.
5147 * c-typeck.c (error_init): Add location parameter. Call error_at
5148 instead of error.
5149 (digest_init): Pass init_loc to error_init.
5150 (really_start_incremental_init):
5151 (push_init_level): Add location parameter. Pass loc to pop_init_level
5152 and error_init.
5153 (pop_init_level): Likewise.
5154 (set_designator): Add location parameter. Pass loc to pop_init_level,
5155 push_init_level, and error_init.
5156 (set_init_index): Add location parameter. Pass loc to error_init and
5157 set_designator.
5158 (set_init_label): Likewise.
5159 (output_init_element): Pass loc to error_init.
5160 (process_init_element): Pass loc to error_init, pop_init_level,
5161 pedwarn_init, and push_init_level.
5162
661a0813
MP
51632014-05-09 Marek Polacek <polacek@redhat.com>
5164
5165 PR c/50459
5166 * c-parser.c (c_parser_attributes): Parse the arguments as an
5167 expression-list if the attribute takes identifier.
5168
2793eeab
MP
51692014-05-08 Marek Polacek <polacek@redhat.com>
5170
5171 PR c/61053
5172 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5173 TYPE_ALIGN_UNIT.
5174
f827930a
MP
51752014-05-08 Marek Polacek <polacek@redhat.com>
5176
5177 PR c/61077
5178 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5179 of main.
5180
1d60af08
KZ
51812014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5182 Mike Stump <mikestump@comcast.net>
5183 Richard Sandiford <rdsandiford@googlemail.com>
5184
5185 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5186 (finish_enum): Use wide-int interfaces.
5187 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5188 * c-typeck.c (build_c_cast): Likewise.
5189 (set_nonincremental_init_from_string): Likewise.
5190 (c_tree_equal): Likewise.
5191
a0e24419
MP
51922014-05-02 Marek Polacek <polacek@redhat.com>
5193
5194 PR c/25801
5195 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5196 Return size_one_node when the type is not complete.
5197 (pointer_diff): Remove comment.
5198 (build_unary_op): Improve error messages.
5199
19fc9faa
MP
52002014-05-02 Marek Polacek <polacek@redhat.com>
5201
5202 * c-typeck.c (c_finish_return): Separate warning_at calls.
5203
63bc4e87
MP
52042014-05-02 Marek Polacek <polacek@redhat.com>
5205
5206 * c-tree.h (error_init): Remove declaration.
5207 (pedwarn_init): Likewise.
5208 * c-typeck.c (error_init): Make static and move above.
5209 (pedwarn_init): Likewise.
5210 (warning_init): Move above.
5211 (maybe_warn_string_init): Likewise.
5212
4bd2511b
JL
52132014-05-01 Jeff Law <law@redhat.com>
5214
5215 Revert:
5216
5217 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5218 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5219 avoid goto.
5220
6a358dcb
MP
52212014-05-02 Marek Polacek <polacek@redhat.com>
5222
5223 PR c/60784
5224 * c-typeck.c (push_init_level): Set constructor_designated to
5225 p->designated for structures.
5226
ae5ebda4
MP
52272014-05-01 Marek Polacek <polacek@redhat.com>
5228
5229 PR c/60915
5230 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5231 function-definition has an attribute after the declarator.
5232
96b40f8d
MP
52332014-05-01 Marek Polacek <polacek@redhat.com>
5234
5235 PR c/60257
5236 * c-typeck.c (warning_init): Add location_t parameter. Call
5237 warning_at instead of warning.
5238 (push_init_level): Pass input_location to warning_init.
5239 (add_pending_init): Add location_t parameter. Pass loc to
5240 warning_init.
5241 (set_nonincremental_init): Pass input_location to add_pending_init.
5242 (set_nonincremental_init_from_string): Likewise.
5243 (output_init_element): Pass loc to warning_init and to
5244 add_pending_init.
5245
32e00768
MP
52462014-05-01 Marek Polacek <polacek@redhat.com>
5247
5248 PR c/43395
5249 * c-typeck.c (c_finish_return): Distinguish between label and variable
5250 when warning about returning local address.
5251
c9379ce2
MP
52522014-05-01 Marek Polacek <polacek@redhat.com>
5253
5254 PR c/29467
5255 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5256 in C89 mode.
5257
d00887e8
MP
52582014-05-01 Marek Polacek <polacek@redhat.com>
5259
5260 PR c/43245
5261 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5262 instead of 0 to WARN_FOR_QUALIFIERS.
5263
5436fa2e
MP
52642014-05-01 Marek Polacek <polacek@redhat.com>
5265
5266 PR c/56989
5267 * c-typeck.c (default_conversion): Use better location for
5268 error call.
5269
f8ed5150
MP
52702014-04-30 Marek Polacek <polacek@redhat.com>
5271
5272 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5273 also when SANITIZE_FLOAT_DIVIDE is on.
5274
8337d1db
MP
52752014-04-30 Marek Polacek <polacek@redhat.com>
5276
5277 PR c/60139
5278 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5279 and pedwarn_init. Use loc insted of input_location.
5280
c4bdc42f
MP
52812014-04-30 Marek Polacek <polacek@redhat.com>
5282
5283 PR c/60351
5284 * c-typeck.c (build_binary_op): Use location when warning about
5285 shift count.
5286
45484dcf
MP
52872014-04-25 Marek Polacek <polacek@redhat.com>
5288
5289 PR c/18079
5290 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5291 always_inline/noinline and hot/cold attributes.
5292
34cf811f
MP
52932014-04-25 Marek Polacek <polacek@redhat.com>
5294
5295 PR c/60114
5296 * c-parser.c (c_parser_initelt): Pass input_location to
5297 process_init_element.
5298 (c_parser_initval): Pass loc to process_init_element.
5299 * c-tree.h (process_init_element): Adjust declaration.
5300 * c-typeck.c (push_init_level): Pass input_location to
5301 process_init_element.
5302 (pop_init_level): Likewise.
5303 (set_designator): Likewise.
5304 (output_init_element): Add location_t parameter. Pass loc to
5305 digest_init.
5306 (output_pending_init_elements): Pass input_location to
5307 output_init_element.
5308 (process_init_element): Add location_t parameter. Pass loc to
5309 output_init_element.
5310
42056eac
JJ
53112014-04-24 Jakub Jelinek <jakub@redhat.com>
5312
5313 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5314 atomic-clause, allow comma in between atomic-clause and
5315 seq_cst.
5316
e162a134
JJ
53172014-04-22 Jakub Jelinek <jakub@redhat.com>
5318
5319 PR c/59073
5320 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5321 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5322
2f6babac
IZ
53232014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5324
5325 PR middle-end/60469
5326 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5327 create_tmp_var instead build_decl for creating temps.
5328 (build_array_notation_expr): Likewise.
5329 (fix_conditional_array_notations_1): Likewise.
5330 (fix_array_notation_expr): Likewise.
5331 (fix_array_notation_call_expr): Likewise.
5332
8edbfaa6
JJ
53332014-03-28 Jakub Jelinek <jakub@redhat.com>
5334
5335 PR c++/60689
5336 * c-tree.h (c_build_function_call_vec): New prototype.
5337 * c-typeck.c (build_function_call_vec): Don't call
5338 resolve_overloaded_builtin here.
5339 (c_build_function_call_vec): New wrapper function around
5340 build_function_call_vec. Call resolve_overloaded_builtin here.
5341 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5342 Call c_build_function_call_vec instead of build_function_call_vec.
5343 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5344 * c-decl.c (finish_decl): Likewise.
5345
7485aeea
MLI
53462014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5347
5348 PR c/55383
5349 * c-typeck.c: Use correct format string in cast-qual warning
5350
b17a8b07
TS
53512014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5352
5353 * c-decl.c (c_decl_attributes): Use
5354 lang_hooks.types.omp_mappable_type.
5355 * c-typeck.c (c_finish_omp_clauses): Likewise.
5356
3af9c5e9
MP
53572014-03-06 Marek Polacek <polacek@redhat.com>
5358
5359 PR c/60197
5360 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5361 of checking tree code.
5362
1c9f5f33
PK
53632014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5364
5365 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5366 (c_parser_parameter_declaration): Likewise.
5367
cc28fc7f
MP
53682014-02-19 Marek Polacek <polacek@redhat.com>
5369
5370 PR c/60195
5371 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5372 Call mark_exp_read on exp.value.
5373 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5374 TREE_ADDRESSABLE on old instead of val.
5375 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5376
b581c05c
PK
53772014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5378
5379 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5380 C_EXPR_APPEND by vec_safe_push.
5381 * c-tree.h (C_EXPR_APPEND): Remove.
5382
81e5eca8
MP
53832014-01-31 Marek Polacek <polacek@redhat.com>
5384
5385 PR c/59963
5386 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5387 build_function_call_vec.
5388 (build_function_call): Likewise.
5389 (build_atomic_assign): Likewise.
5390 (build_function_call_vec): Add arg_loc parameter. Use it.
5391 (convert_arguments): Likewise.
5392 (convert_for_assignment): Rename rhs_loc to expr_loc.
5393 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5394 (c_parser_objc_keywordexpr): Likewise.
5395 (c_parser_postfix_expression_after_primary): Call
5396 build_function_call_vec with expr_loc rather than op_loc.
5397 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5398 build_function_call_vec.
5399 (c_parser_expr_list): Add locations parameter. Fill it with locations
5400 of function arguments.
5401 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5402
68fca595
MP
54032014-01-30 Marek Polacek <polacek@redhat.com>
5404
5405 PR c/59940
5406 * c-typeck.c (build_function_call_vec): Use loc parameter.
5407 (convert_arguments): Add location parameter. Use it.
5408 (ep_convert_and_check): Likewise.
5409 (build_atomic_assign): Adjust convert_for_assignment call.
5410 (build_modify_expr): Likewise.
5411 (digest_init): Likewise.
5412 (c_finish_return): Likewise.
5413 (build_conditional_expr): Adjust ep_convert_and_check calls.
5414 (convert_for_assignment): Add rhs_loc parameter. Use it.
5415 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5416 calls.
5417
fa337f3a
RB
54182014-01-30 Richard Biener <rguenther@suse.de>
5419
5420 PR c/59905
5421 * c-typeck.c (build_function_call_vec): Do not replace calls
5422 to a function via an incompatible type with a runtime abort.
5423
b72271b9
BI
54242014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5425
5426 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5427 flag_enable_cilkplus with flag_cilkplus.
5428 (c_parser_direct_declarator_inner): Likewise.
5429 (c_parser_attribute_any_word): Likewise.
5430 (c_parser_attributes): Likewise.
5431 (c_parser_compound_statement): Likewise.
5432 (c_parser_statement_after_labels): Likewise.
5433 (c_parser_if_statement): Likewise.
5434 (c_parser_switch_statement): Likewise.
5435 (c_parser_do_statement): Likewise.
5436 (c_parser_for_statement): Likewise.
5437 (c_parser_unary_expression): Likewise.
5438 (c_parser_postfix_expression): Likewise.
5439 (c_parser_postfix_expression_after_primary): Likewise.
5440 (c_parser_postfix_expression_after_primary): Likewise.
5441 (c_parser_omp_clause_name): Likewise.
5442 (c_finish_omp_declare_simd): Likewise.
5443 (c_parser_cilk_verify_simd): Likewise.
5444 * c-typeck.c (build_array_ref): Likewise.
5445 (build_function_call_vec): Likewise.
5446 (convert_arguments): Likewise.
5447 (build_compound_expr): Likewise.
5448 (c_finish_return): Likewise.
5449 (c_finish_if_stmt): Likewise.
5450 (c_finish_loop): Likewise.
5451 (build_binary_op): Likewise.
5452
393e8e8b
MP
54532014-01-23 Marek Polacek <polacek@redhat.com>
5454
5455 PR c/59846
5456 * c-typeck.c (parser_build_binary_op): Use location instead of
5457 input_location.
5458 (build_binary_op): Pass location to shorten_compare.
5459
f04dda30
MP
54602014-01-23 Marek Polacek <polacek@redhat.com>
5461
5462 PR c/58346
5463 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5464 an empty aggregate.
5465
789eadcd
MP
54662014-01-23 Marek Polacek <polacek@redhat.com>
5467
5468 PR c/59871
5469 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5470 of a comma expression.
5471 (emit_side_effect_warnings): Likewise.
5472
40f14e9f
BI
54732014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5474
5475 PR c/59825
5476 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5477 function to use walk_tree and moved a lot of its functionality to
5478 expand_array_notations.
5479 (expand_array_notations): New function.
5480
74558dd9
BI
54812014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5482
5483 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5484 attribute an attribute without value.
5485
652fea39
JJ
54862014-01-23 Jakub Jelinek <jakub@redhat.com>
5487
5488 PR middle-end/58809
5489 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5490 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5491
f34f1c87
MP
54922014-01-22 Marek Polacek <polacek@redhat.com>
5493
5494 PR c/59891
5495 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5496 of remove_c_maybe_const_expr on op1 and op2.
5497
241f845a
JJ
54982014-01-15 Jakub Jelinek <jakub@redhat.com>
5499
5500 PR c/58943
5501 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5502 effects, preevaluate rhs using SAVE_EXPR first.
5503
9a74f20c
BI
55042014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5505
5506 PR c++/59631
5507 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5508 statements with if-elseif statements.
5509
96066ce1
MP
55102014-01-06 Marek Polacek <polacek@redhat.com>
5511
5512 PR c/57773
5513 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5514 defined bit-field types only in ISO C.
5515
23a5b65a
RS
55162014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5517
5518 Update copyright years
5519
f9030485
RS
55202014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5521
5522 * c-array-notation.c: Use the standard form for the copyright notice.
5523
41958c28
BI
55242013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5525
5526 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5527 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5528 field in parser is not empty. If not-empty, call the function
5529 c_parser_finish_omp_declare_simd.
5530 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5531 between SIMD-enabled functions and #pragma simd. Added new parameter.
5532 (c_parser_cilk_all_clauses): Modified the usage of the function
5533 c_parser_cilk_clause_vectorlength as mentioned above.
5534 (c_parser_cilk_simd_fn_vector_attrs): New function.
5535 (c_finish_cilk_simd_fn_tokens): Likewise.
5536 (is_cilkplus_vector_p): Likewise.
5537 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5538 "nomask," and "mask" strings in clause name.
5539 (c_parser_omp_all_clauses): Added 3 new case statements:
5540 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5541 PRAGMA_CILK_CLAUSE_NOMASK.
5542 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5543 check for vector attribute and if so call the function
5544 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5545 called the function c_finish_cilk_simd_fn_tokens.
5546 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5547 parser field is non-empty. If so, parse them as you would parse
5548 the omp declare simd pragma.
5549 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5550 Added a check when step is a parameter and flag it as error.
5551 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5552 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5553 pragma_omp_clause.
5554
cef0fd0e
TS
55552013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5556
5557 * c-parser.c (c_parser_omp_parallel): Fix description.
5558
12893402
BI
55592013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5560
5561 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5562 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5563 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5564 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5565
296674db
JM
55662013-12-04 Joseph Myers <joseph@codesourcery.com>
5567
5568 PR c/52023
5569 * c-parser.c (c_parser_alignas_specifier): Use
5570 c_sizeof_or_alignof_type instead of c_alignof.
5571 (c_parser_alignof_expression): Likewise, with min_alignof
5572 parameter depending on alignof spelling used.
5573
edd28054
MP
55742013-12-04 Marek Polacek <polacek@redhat.com>
5575
5576 PR c/54113
5577 * c-decl.c (start_function): Don't warn for missing prototype for
5578 inline functions.
5579
da0fc454
MP
55802013-12-03 Marek Polacek <polacek@redhat.com>
5581
5582 PR c/59351
5583 * c-decl.c (build_compound_literal): Allow compound literals with
5584 empty initial value.
5585
4c2ecab0
JM
55862013-12-02 Joseph Myers <joseph@codesourcery.com>
5587
5588 PR c/58235
5589 * c-typeck.c (build_modify_expr): Diagnose assignment to
5590 expression with array type.
5591
340baef7
JM
55922013-11-29 Joseph Myers <joseph@codesourcery.com>
5593
5594 PR c/42262
5595 * c-typeck.c (process_init_element): Do not treat a string as
5596 initializing a whole array when used with a designator for an
5597 individual element.
5598
6763b9f7
JM
55992013-11-29 Joseph Myers <joseph@codesourcery.com>
5600
5601 PR c/57574
5602 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5603 an inline function following a static declaration.
5604
e7bd1de1
JJ
56052013-11-28 Jakub Jelinek <jakub@redhat.com>
5606
5607 PR c/59310
5608 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5609 to p_name before calling c_parser_omp_teams instead of after.
5610 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5611 argument. Remove unused p_name variable.
5612
0136f8f0
AH
56132013-11-27 Aldy Hernandez <aldyh@redhat.com>
5614 Jakub Jelinek <jakub@redhat.com>
5615
5616 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5617 external_scope is NULL.
5618
241b71bb
TV
56192013-11-27 Tom de Vries <tom@codesourcery.com>
5620 Marc Glisse <marc.glisse@inria.fr>
5621
5622 PR c++/59032
5623 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5624
2fb9a547
AM
56252013-11-22 Andrew MacLeod <amacleod@redhat.com>
5626
5627 * c-typeck.c: Add required include files from gimple.h.
5628
8400e75e
DM
56292013-11-22 David Malcolm <dmalcolm@redhat.com>
5630
5631 * c-decl.c (define_label, shadow_tag_warned)
5632 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5633 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5634 (declspecs_add_type): Remove use of in_system_header macro.
5635 * c-parser.c (c_parser_unary_expression): Likewise.
5636 * c-typeck.c (store_init_value, process_init_element)
5637 (c_start_case): Likewise.
5638
5639 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5640 macro.
5641
5642 * c-parser.c (c_parser_set_source_position_from_token): Remove
5643 reference to in_system_header from comment.
5644
386b1f1f
RS
56452013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5646
5647 * c-decl.c (grokdeclarator): Update comment to refer to
5648 tree_to_[su]hwi rather than tree_low_cst.
5649
ae7e9ddd
RS
56502013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5651
5652 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5653 tree_to_uhwi throughout.
5654
9439e9a1
RS
56552013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5656
5657 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5658 throughout.
5659
9541ffee
RS
56602013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5661
5662 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5663 throughout.
5664
c02065fc
AH
56652013-11-15 Aldy Hernandez <aldyh@redhat.com>
5666
5667 * c-parser.c (c_parser_cilk_simd): New.
5668 (c_parser_cilk_verify_simd): New.
5669 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5670 (c_parser_omp_for_loop): Add case for NE_EXPR.
5671 Set c_break_label for CILK_SIMD.
5672 (c_parser_cilk_clause_vectorlength): New.
5673 (c_parser_cilk_clause_linear): New.
5674 (c_parser_cilk_clause_name): New.
5675 (c_parser_cilk_all_clauses): New.
5676 * c-typeck.c (build_unary_op): Pass location argument to
5677 readonly_error.
5678 (build_modify_expr): Same.
5679 (build_asm_expr): Same.
5680 (c_finish_bc_stmt): Error on break/continue in loops.
5681
18f429e2
AM
56822013-11-14 Andrew MacLeod <amacleod@redhat.com>
5683
5684 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5685
d8a2d370
DN
56862013-11-14 Diego Novillo <dnovillo@google.com>
5687
5688 * c-decl.c: Include print-tree.h.
5689 Include stor-layout.h.
5690 Include varasm.h.
5691 Include attribs.h.
5692 Include stringpool.h.
5693 * c-lang.c: Include fold-const.h.
5694 * c-parser.c: Include stringpool.h.
5695 Include attribs.h.
5696 Include stor-layout.h.
5697 Include varasm.h.
5698 Include trans-mem.h.
5699 * c-typeck.c: Include stor-layout.h.
5700 Include trans-mem.h.
5701 Include varasm.h.
5702 Include stmt.h.
5703
38b7bc7f
JM
57042013-11-13 Joseph Myers <joseph@codesourcery.com>
5705
5706 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5707 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5708 __auto_type.
5709 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5710 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5711 RID_AUTO_TYPE.
5712 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5713 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5714 (c_parser_declarator, c_parser_direct_declarator_inner)
5715 (c_parser_parameter_declaration, c_parser_type_name): All callers
5716 changed.
5717 (c_parser_declaration_or_fndef): Handle declarations with type
5718 determined from the initializer.
5719
45b0be94
AM
57202013-11-12 Andrew MacLeod <amacleod@redhat.com>
5721
18f429e2 5722 * c-typeck.c: Include gimplify.h.
45b0be94 5723
582d9b50
JM
57242013-11-12 Joseph Myers <joseph@codesourcery.com>
5725
5726 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5727 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5728 comment.
5729 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5730 or _Thread_local as appropriate in diagnostics.
5731 (build_null_declspecs): Initialize ret->thread_gnu_p.
5732 (declspecs_add_scspec): Handle either __thread or _Thread_local
5733 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5734 pedantic. Do not disallow _Thread_local extern and _Thread_local
5735 static.
5736
267bac10
JM
57372013-11-07 Joseph Myers <joseph@codesourcery.com>
5738 Andrew MacLeod <amacleod@redhat.com>
5739
5740 * c-aux-info.c (gen_type): Handle atomic qualifier.
5741 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5742 qualifiers when compating types.
5743 (shadow_tag_warned): Handle atomic_p in declspecs.
5744 (quals_from_declspecs): Likewise.
5745 (start_decl): Use c_type_promotes_to when promoting argument
5746 types.
5747 (grokdeclarator): Handle _Atomic.
5748 (get_parm_info): Diagnose any qualifier on "void" as only
5749 parameter.
5750 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5751 comparing types. Use c_type_promotes_to when promoting argument
5752 types.
5753 (finish_function): Use c_type_promotes_to when promoting argument
5754 types.
5755 (build_null_declspecs): Handle atomic_p in declspecs.
5756 (declspecs_add_qual): Handle RID_ATOMIC.
5757 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5758 (c_token_starts_declspecs): Handle RID_ATOMIC.
5759 (c_parser_declspecs): Handle atomic type specifiers and
5760 qualifiers.
5761 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5762 from types of expressions with atomic type.
5763 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5764 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5765 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5766 (c_parser_statement_after_labels, c_parser_switch_statement)
5767 (c_parser_for_statement, c_parser_expr_no_commas)
5768 (c_parser_conditional_expression, c_parser_binary_expression)
5769 (c_parser_cast_expression, c_parser_unary_expression)
5770 (c_parser_postfix_expression)
5771 (c_parser_postfix_expression_after_primary, c_parser_expression):
5772 Use convert_lvalue_to_rvalue.
5773 (c_parser_expression_conv, c_parser_expr_list): Document
5774 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5775 (c_parser_objc_synchronized_statement): Use
5776 convert_lvalue_to_rvalue.
5777 (c_parser_objc_selector): Handle RID_ATOMIC.
5778 (c_parser_objc_receiver, c_parser_array_notation): Use
5779 convert_lvalue_to_rvalue.
5780 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5781 _Atomic (type-name).
5782 (struct c_declspecs): Add atomic_p field.
5783 (convert_lvalue_to_rvalue): Declare.
5784 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5785 corresponding atomic types.
5786 (qualify_type): Don't add _Atomic qualifiers from second argument.
5787 (comp_target_types): Do not allow _Atomic mismatches.
5788 (type_lists_compatible_p): Do not remove atomic qualifiers when
5789 comparing types.
5790 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5791 (build_atomic_assign): New functions.
5792 (build_unary_op): Use build_atomic_assign for atomic increment and
5793 decrement.
5794 (build_conditional_expr): Do not treat _Atomic void as a qualified
5795 version of void.
5796 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5797 (find_anonymous_field_with_type, convert_to_anonymous_field)
5798 (convert_for_assignment): Do not remove atomic qualifiers when
5799 comparing types.
5800 (digest_init): Do not accept initialization of arrays of atomic
5801 elements by string constants.
5802 (build_asm_expr): Use convert_lvalue_to_rvalue.
5803 (build_binary_op): Do not treat _Atomic void as a qualified
5804 version of void.
5805
0c249d4b
DD
58062013-11-06 DJ Delorie <dj@redhat.com>
5807
5808 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5809 both explicit and builtin, print the location of the explicit one.
5810
6d7f7e0a
TB
58112013-11-05 Tobias Burnus <burnus@net-b.de>
5812
5813 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5814 c_parser_omp_distribute, c_parser_omp_teams,
5815 c_parser_omp_target, c_parser_omp_declare): Handle
5816 -fopenmp-simd.
5817
b906f4ca
MP
58182013-11-03 Marek Polacek <polacek@redhat.com>
5819
5820 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5821
ee1d5a02
JJ
58222013-11-01 Jakub Jelinek <jakub@redhat.com>
5823
5824 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5825 check_dup_generic at the end, unless remove is true.
5826 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5827 remove = true;.
5828 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5829
5a9785fb
JJ
58302013-10-31 Jakub Jelinek <jakub@redhat.com>
5831
5832 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5833 with decl that is not pointer nor array.
5834
939b37da
BI
58352013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5836
5837 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5838 a spawning function is found.
5839 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5840 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5841 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5842 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5843 case.
5844 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5845 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5846 expr.
5847 (c_finish_return): Added a check to reject _Cilk_spawn in return
5848 expression.
5849 (build_cilk_spawn): New function.
5850 (build_cilk_sync): Likewise.
5851 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 5852
d4af74d4
TB
58532013-10-27 Tobias Burnus <burnus@net-b.de>
5854
5855 PR other/33426
5856 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5857 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5858 (c_parser_statement_after_labels): Update calls.
5859
d73749df 58602013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5861
5862 PR other/33426
5863 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5864 Handle PRAGMA_IVDEP.
5865 (c_parser_statement_after_labels): Update call.
5866
f28aa681
MP
58672013-10-24 Marek Polacek <polacek@redhat.com>
5868
5869 * c-parser.c (c_parser_struct_declaration): Add a comment.
5870 (c_parser_declarator): Don't allow _Alignas here.
5871
0645c1a2
AM
58722013-10-17 Andrew MacLeod <amacleod@redhat.com>
5873
5874 * c-parser.c: Include omp-low.h.
5875 * c-typeck.c: Likewise.
5876
568a31f2
MP
58772013-10-17 Marek Polacek <polacek@redhat.com>
5878
5879 PR c/58267
5880 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5881 Document syntax of the array-declarator.
5882 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5883 are not permitted.
5884 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5885 (c_parser_struct_declaration): Likewise.
5886 (c_parser_declarator): Likewise.
5887 (c_parser_direct_declarator_inner): Likewise.
5888 (c_parser_parameter_declaration): Likewise.
5889 (c_parser_type_name): Likewise.
5890
acf0174b
JJ
58912013-10-11 Jakub Jelinek <jakub@redhat.com>
5892
5893 * c-lang.h (current_omp_declare_target_attribute): New extern
5894 decl.
5895 * c-parser.c: Include c-lang.h.
5896 (struct c_parser): Change tokens to c_token *.
5897 Add tokens_buf field. Change tokens_avail type to unsigned int.
5898 (c_parser_consume_token): If parser->tokens isn't
5899 &parser->tokens_buf[0], increment parser->tokens.
5900 (c_parser_consume_pragma): Likewise.
5901 (enum pragma_context): Add pragma_struct and pragma_param.
5902 (c_parser_external_declaration): Adjust
5903 c_parser_declaration_or_fndef caller.
5904 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5905 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5906 Adjust recursive call.
5907 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5908 of pragma_external.
5909 (c_parser_parameter_declaration): Use pragma_param instead of
5910 pragma_external.
5911 (c_parser_compound_statement_nostart, c_parser_label,
5912 c_parser_for_statement): Adjust
5913 c_parser_declaration_or_fndef callers.
5914 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5915 it through to c_parser_conditional_expression.
5916 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5917 pass it through to c_parser_binary_expression. Adjust recursive
5918 call.
5919 (c_parser_binary_expression): Remove prec argument, add
5920 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5921 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5922 binop matches it, use build2 instead of parser_build_binary_op.
5923 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5924 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5925 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5926 Handle pragma_struct and pragma_param the same as pragma_external.
5927 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5928 (c_parser_omp_variable_list): Parse array sections for
5929 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5930 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5931 (c_parser_omp_clause_reduction): Handle user defined reductions.
5932 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5933 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5934 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5935 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5936 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5937 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5938 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5939 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5940 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5941 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5942 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5943 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5944 (c_parser_omp_for_loop): Add CODE argument, pass it through
5945 to c_finish_omp_for. Change last argument to cclauses,
5946 and adjust uses to grab parallel clauses from the array of all
5947 the split clauses. Adjust c_parser_binary_expression,
5948 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5949 (omp_split_clauses): New function.
5950 (c_parser_omp_simd): New function.
5951 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5952 Allow the function to be called also when parsing combined constructs,
5953 and call c_parser_omp_simd when parsing for simd.
5954 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5955 #pragma omp section, require exactly one structured-block instead of
5956 sequence of statements.
5957 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5958 Allow the function to be called also when parsing combined constructs.
5959 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5960 Allow the function to be called also when parsing combined
5961 constructs.
5962 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5963 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5964 c_parser_omp_teams, c_parser_omp_target_data,
5965 c_parser_omp_target_update, c_parser_omp_target,
5966 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5967 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5968 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5969 (c_parser_omp_construct): Add p_name and mask vars. Handle
5970 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5971 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5972 and c_parser_omp_sections callers.
5973 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5974 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5975 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5976 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5977 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5978 OMP_CLAUSE_DEPEND.
5979 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5980 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5981 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5982 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5983 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5984 * c-typeck.c: Include tree-inline.h.
5985 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5986 handle_omp_array_sections_1, handle_omp_array_sections,
5987 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5988 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5989 user defined reductions.
5990 (c_tree_equal): New function.
5991 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5992 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5993 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5994 c_check_omp_declare_reduction_r): New prototypes.
5995 * c-decl.c (current_omp_declare_target_attribute): New variable.
5996 (c_decl_attributes): New function.
5997 (start_decl, start_function): Use it instead of decl_attributes.
5998 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5999 c_omp_reduction_decl, c_omp_reduction_lookup,
6000 c_check_omp_declare_reduction_r): New functions.
6001
0a6c2227
TT
60022013-09-25 Tom Tromey <tromey@redhat.com>
6003
6004 * Make-lang.in (c/gccspec.o): Remove.
6005 (CFLAGS-c/gccspec.o): New variable.
6006 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6007 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6008 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6009
f3bc55f0
TT
60102013-09-25 Tom Tromey <tromey@redhat.com>
6011
6012 * Make-lang.in (c/gccspec.o): Don't use subshell.
6013
a24d975c
MP
60142013-09-18 Marek Polacek <polacek@redhat.com>
6015
6016 PR sanitize/58443
6017 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6018 Remove unnecessary check.
6019
ce6923c5
MP
60202013-09-18 Marek Polacek <polacek@redhat.com>
6021
6022 PR sanitizer/58411
6023 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6024 no_sanitize_undefined attribute.
6025
a1e51df9
KT
60262013-09-13 Kai Tietz <ktietz@redhat.com>
6027
6028 PR target/57848
6029 * c-decl.c (c_builtin_function_ext_scope): Remove
6030 wrong assumption that it is never called on prexisting
6031 symbol.
6032
0af94e6f
JR
60332013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6034
6035 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6036
20059c8b
GDR
60372013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6038
6039 * c-objc-common.c (c_tree_printer): Tidy.
6040
de5a5fa1
MP
60412013-08-30 Marek Polacek <polacek@redhat.com>
6042
6043 * c-typeck.c (build_binary_op): Add division by zero and shift
6044 instrumentation.
6045
2531a1d9 60462013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6047 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6048
6e2bcc98 6049 PR c/35649
2531a1d9
JR
6050 * c-typeck.c (c_common_type): Prefer double_type_node over
6051 other REAL_TYPE types with the same precision.
6052 (convert_arguments): Likewise.
6053
025311c4
GDR
60542013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6055
6056 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6057 (c_initialize_diagnostics): Call a destructor for the early printer.
6058
da6ca2b5
GDR
60592013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6060
6061 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6062 printer initialization.
6063
318cda85 60642013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6065
318cda85
BI
6066 PR c/57490
6067 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6068 check for truth values.
6069 (expand_array_notation_exprs): Added truth values case. Removed an
6070 unwanted else. Added for-loop to walk through subtrees in default
6071 case.
6072
b066401f
GDR
60732013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6074
6075 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6076
fb48aadc
JM
60772013-07-23 Joseph Myers <joseph@codesourcery.com>
6078
6079 * c-parser.c (struct c_generic_association): Fix typo.
6080
433cc7b0
TT
60812013-07-23 Tom Tromey <tromey@redhat.com>
6082 Joseph Myers <joseph@codesourcery.com>
6083
6084 * c-parser.c (struct c_generic_association): New.
6085 (c_generic_association_d): New typedef.
6086 (c_parser_generic_selection): New function.
6087 (c_parser_postfix_expression): Handle RID_GENERIC.
6088
26d40c3d
JM
60892013-07-13 Jason Merrill <jason@redhat.com>
6090
6091 PR c++/57793
6092 * c-decl.c (finish_struct): Check for too-large class.
6093
ecdbd01a 60942013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6095
6096 PR c/57821
6097 * c-typeck.c (set_init_index): When folding, check for index overflow.
6098
1141ed3f
BI
60992013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6100
6101 * c-parser.c (c_parser_array_notation): Removed rejection of array
6102 notations in an array of function pointers.
6103
713b46fa
BI
61042013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6105
6106 * c-array-notation.c (make_triplet_val_inv): New function.
6107 (create_cmp_incr): Likewise.
6108 (create_array_refs): Likewise.
6109 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6110 Also modularized common parts between functions and called the function.
6111 (build_array_notation_expr): Likewise.
6112 (fix_conditional_array_notations_1): Likewise.
6113 (fix_array_notation_expr): Likewise.
6114 (fix_array_notation_call_expr): Likewise.
6115
92f20202
MP
61162013-06-18 Marek Polacek <polacek@redhat.com>
6117
6118 PR c/57630
6119 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6120
73a23b06
BI
61212013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6122
6123 * c-array-notation.c (build_array_notation_expr): Reject array notation
6124 mismatch between LHS and RHS even inside a call_expr. Also, removed
6125 a couple while statements that were dead code.
6126
00b8517d
BI
61272013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6128
6129 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6130 excessive precision expressions in function parameters. Also removed
6131 couple unwanted while statements.
6132
1509bdda
BI
61332013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6134
6135 * c-array-notation.c (expand_array_notation_exprs): Added
6136 ARRAY_NOTATION_REF case.
ab20d992 6137
d60f1706
BI
61382013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6139
6140 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6141 function to c-family/array-notation-common.c.
6142 (is_cilkplus_reduce_builtin): Likewise.
6143 (find_rank): Likewise.
6144 (extract_array_notation_exprs): Likewise.
6145 (replace_array_notations): Likewise.
6146 (find_inv_trees): Likewise.
6147 (replace_inv_trees): Likewise.
6148 (contains_array_notation_expr): Likewise.
6149 (find_correct_array_notation_type): Likewise.
6150 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6151 (struct inv_list): Moved this to c-family/array-notation-common.c.
6152 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6153
6d6efbb3
BI
61542013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6155
6156 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6157 reduction functions outside the for-loop. Added a check if the fundecl
6158 is non-NULL. Finally, removed an unwanted if-statement, and made the
6159 body unconditional.
6160
25c22937
BI
61612013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6162
6163 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6164 condition of the if-statement matches the rank of else-block and then-
6165 block when array notations are used.
6166 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6167 expression after the entire function body is parsed.
6168 (c_parser_expr_no_commas): Delayed creating array notation expressions
6169 to the end of function parsing.
6170 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6171 whole if-statement instead of just the condition.
ab20d992 6172 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6173
edd25645
BI
61742013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6175
6176 PR c/57474
6177 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6178 array to NULL_TREE if they are unused. Also added a check for the
6179 field to be NULL before its fields are used in future.
ab20d992 6180
065ce7f1
RO
61812013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6182
6183 PR bootstrap/57450
6184 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6185 (build_array_notation_expr): Likewise.
6186
36536d79
BI
61872013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6188
6189 * c-typeck.c (build_array_ref): Added a check to see if array's
6190 index is greater than one. If true, then emit an error.
6191 (build_function_call_vec): Exclude error reporting and checking
6192 for builtin array-notation functions.
6193 (convert_arguments): Likewise.
6194 (c_finish_return): Added a check for array notations as a return
6195 expression. If true, then emit an error.
6196 (c_finish_loop): Added a check for array notations in a loop
6197 condition. If true then emit an error.
6198 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6199 (build_binary_op): Added a check for array notation expr inside
6200 op1 and op0. If present, we call another function to find correct
6201 type.
6202 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6203 * c-parser.c (c_parser_compound_statement): Check if array
6204 notation code is used in tree, if so, then transform them into
6205 appropriate C code.
6206 (c_parser_expr_no_commas): Check if array notation is used in LHS
6207 or RHS, if so, then build array notation expression instead of
6208 regular modify.
6209 (c_parser_postfix_expression_after_primary): Added a check for
6210 colon(s) after square braces, if so then handle it like an array
6211 notation. Also, break up array notations in unary op if found.
6212 (c_parser_direct_declarator_inner): Added a check for array
6213 notation.
6214 (c_parser_compound_statement): Added a check for array notation in
6215 a stmt. If one is present, then expand array notation expr.
6216 (c_parser_if_statement): Likewise.
6217 (c_parser_switch_statement): Added a check for array notations in
6218 a switch statement's condition. If true, then output an error.
6219 (c_parser_while_statement): Similarly, but for a while.
6220 (c_parser_do_statement): Similarly, but for a do-while.
6221 (c_parser_for_statement): Similarly, but for a for-loop.
6222 (c_parser_unary_expression): Check if array notation is used in a
6223 pre-increment or pre-decrement expression. If true, then expand
6224 them.
6225 (c_parser_array_notation): New function.
6226 * c-array-notation.c: New file.
6227 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 6228
cd192ccc
MS
62292013-05-23 Mike Stump <mikestump@comcast.net>
6230
6231 * c-typeck.c (convert_for_assignment): Handle references to memory
6232 spaces better.
6233
427b248d
JM
62342013-05-16 Jason Merrill <jason@redhat.com>
6235
6236 * Make-lang.in (cc1$(exeext)): Use link mutex.
6237
44d90fe1
PC
62382013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6239
6240 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6241 to simply use OPT_Wpointer_arith.
6242 (build_unary_op): Likewise.
6243
4e7d7b3d
JJ
62442013-04-03 Jakub Jelinek <jakub@redhat.com>
6245
6246 PR c/19449
6247 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6248 argument. If set, or it temporarily for parsing of the first
6249 argument into force_folding_builtin_constant_p.
6250 (c_parser_postfix_expression): Adjust callers.
6251
839b422f
RB
62522013-03-21 Richard Biener <rguenther@suse.de>
6253
6254 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6255 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6256
2ee028f1
MP
62572013-02-12 Marek Polacek <polacek@redhat.com>
6258
6259 PR c/44938
6260 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6261 origtypes to NULL.
6262
8824edff
JJ
62632013-01-24 Jakub Jelinek <jakub@redhat.com>
6264
6265 PR c/56078
6266 * c-typeck.c (set_nonincremental_init_from_string): If
6267 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6268 returned false.
6269 (process_init_element): Likewise.
6270
eadd3d0d
JJ
62712012-12-20 Jakub Jelinek <jakub@redhat.com>
6272
6273 PR c++/55619
6274 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6275 argument, don't call default_function_array_conversion
6276 nor c_fully_fold here.
6277 (c_parser_asm_statement): Adjust callers.
6278 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6279 and outputs here, and call default_function_array_conversion
6280 on inputs that don't need to be addressable.
6281
f8a93a2e
JJ
62822012-12-18 Jakub Jelinek <jakub@redhat.com>
6283
6284 PR c/39464
6285 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6286 warning require that both c_common_unsigned_type as well as
6287 c_common_signed_type is the same for both mvl and mvr types.
6288
9771b263
DN
62892012-11-16 Diego Novillo <dnovillo@google.com>
6290
6291 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6292
6293 * c-common.c: Use new vec API in vec.h.
6294 * c-common.h: Likewise.
6295 * c-gimplify.c: Likewise.
6296 * c-pragma.c: Likewise.
6297 * c-pretty-print.c: Likewise.
6298 * c-pretty-print.h: Likewise.
6299 * c-semantics.c: Likewise.
6300 * c-decl.c: Likewise.
6301 * c-parser.c: Likewise.
6302 * c-tree.h: Likewise.
6303 * c-typeck.c: Likewise.
6304
880661a4
JW
63052012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6306
6307 PR c++/54930
6308 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6309
077d1abe
MLI
63102012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6311
6312 PR c/53066
6313 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6314 shadows a function, unless the variable is a function or a
6315 pointer-to-function.
6316
3a785c97
JJ
63172012-10-12 Jakub Jelinek <jakub@redhat.com>
6318
6319 PR c/54381
6320 * c-parser.c (struct c_tree_loc_pair): Removed.
6321 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6322 add location_t * and tree * arguments, fill in array of 3
6323 sizeof_arg trees and corresponding locs.
6324 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6325 c_parser_expr_list callers.
6326 (c_parser_postfix_expression_after_primary): Likewise. Pass
6327 array of 3 sizeof_arg trees and locs (corresponding to first
6328 3 arguments) to sizeof_pointer_memaccess_warning.
6329
703c8606
LC
63302012-10-09 Lawrence Crowl <crowl@google.com>
6331
6332 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6333 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6334 hash table.
6335
5d9de0d0
PC
63362012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6337
6338 PR c++/54194
6339 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6340 call.
6341
a212e43f
MG
63422012-10-09 Marc Glisse <marc.glisse@inria.fr>
6343
6344 PR c++/54427
6345 * c-typeck.c: Include c-common.h.
6346 (enum stv_conv): Moved to c-common.h.
6347 (scalar_to_vector): Moved to c-common.c.
6348 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6349 * Make-lang.in: c-typeck.c depends on c-common.h.
6350
3b78de56
AC
63512012-10-04 Arnaud Charlet <charlet@adacore.com>
6352
6353 * c-decl.c (c_write_global_declarations): Fix handling of
6354 -fdump-ada-spec*.
6355
78c60e3d
SS
63562012-09-30 Sharad Singhai <singhai@google.com>
6357
6358 * c-decl.c (c_write_global_declarations): Use a different method
6359 to determine if the dump has ben initialized.
6360
9f33203d
JM
63612012-09-14 Joseph Myers <joseph@codesourcery.com>
6362
6363 PR c/54552
6364 * c-typeck.c (c_cast_expr): When casting to a type requiring
6365 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6366 c_fully_fold first.
6367
a27d595d
JM
63682012-09-14 Joseph Myers <joseph@codesourcery.com>
6369
6370 PR c/54103
6371 * c-typeck.c (build_unary_op): Pass original argument of
6372 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6373 any C_MAYBE_CONST_EXPR, if it has integer operands.
6374 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6375 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6376 to c_objc_common_truthvalue_conversion, then remove any
6377 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6378 c_objc_common_truthvalue_conversion not
6379 c_common_truthvalue_conversion.
6380 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6381 call note_integer_operands for arguments with integer operands
6382 that are not integer constants.
6383
9feb29df
JJ
63842012-09-13 Jakub Jelinek <jakub@redhat.com>
6385
6386 PR c/54559
6387 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6388 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6389
d409320c
JJ
63902012-08-31 Jakub Jelinek <jakub@redhat.com>
6391
6392 PR c/54428
6393 * c-convert.c (convert): Don't call fold_convert_loc if
6394 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6395 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6396 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6397
6265d07c
JJ
63982012-08-24 Jakub Jelinek <jakub@redhat.com>
6399
6400 PR c/54355
6401 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6402 for nested and empty_ok arguments in the call to
6403 c_parser_declaration_or_fndef.
6404
1a4049e7
JJ
64052012-08-17 Jakub Jelinek <jakub@redhat.com>
6406
6407 * c-tree.h (c_last_sizeof_arg): Declare.
6408 * c-parser.c (struct c_tree_loc_pair): New type.
6409 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6410 non-NULL.
6411 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6412 (c_parser_postfix_expression_after_primary): Likewise. Call
6413 sizeof_pointer_memaccess_warning if needed.
6414 (sizeof_ptr_memacc_comptypes): New function.
6415 * c-typeck.c (c_last_sizeof_arg): New global variable.
6416 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6417
0229aee9
UB
64182012-07-24 Uros Bizjak <ubizjak@gmail.com>
6419
6420 * c-lang.h (lang_decl): Add variable_size GTY option.
6421
7ee2468b
SB
64222012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6423
6424 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6425 * Make-lang.in: Fix dependencies.
6426
d4a10d0a
SB
64272012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6428
6429 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6430 and add language Makefile hooks.
6431 * config-lang.in: New file.
6432 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6433 add the required "normal" config-lang.in rules.
6434 * c-lang.h: Moved from gcc/ to here.
6435 * c-tree.h: Likewise.
6436 * c-objc-common.c: Likewise.
6437 * c-objc-common.h: Likewise.
6438 * c-typeck.c: Likewise.
6439 * c-convert.c: Likewise.
6440 * c-lang.c: Likewise.
6441 * c-aux-info.c: Likewise.
6442 * c-errors.c: Likewise.
6443 * gccspec.c: Likewise.
6444 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6445 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6446\f
a5544970 6447Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6448
6449Copying and distribution of this file, with or without modification,
6450are permitted in any medium without royalty provided the copyright
6451notice and this notice are preserved.