]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
arc.c (hwloop_optimize): Add missing space in string literal.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
783bfe5e
JM
12019-10-15 Joseph Myers <joseph@codesourcery.com>
2
3 * c-parser.c (c_parser_attribute_any_word): Rename to
4 c_parser_gnu_attribute_any_word. All callers changed.
5 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
6 callers changed.
7 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
8 callers changed.
9 (c_parser_declaration_or_fndef, c_parser_declspecs)
10 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
11 (c_parser_struct_declaration, c_parser_declarator)
12 (c_parser_gnu_attribute, c_parser_compound_statement)
13 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
14 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
15 attribute-related syntax productions.
16
56898e43
RS
172019-10-14 Richard Sandiford <richard.sandiford@arm.com>
18
19 * c-objc-common.c (useful_aka_type_p): Replace with...
20 (get_aka_type): ...this new function. Given the original type,
21 decide which aka type to print (if any). Only look through typedefs
22 if user_facing_original_type_p.
23 (print_type): Update accordingly.
24
b9424661
JJ
252019-10-14 Jakub Jelinek <jakub@redhat.com>
26
27 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
28 into int NESTED, if it is 2, diagnose missing commas in between
29 clauses.
30 (c_parser_omp_context_selector): Pass 2 as last argument to
31 c_parser_omp_all_clauses.
32
20de9568
JJ
332019-10-12 Jakub Jelinek <jakub@redhat.com>
34
35 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
36 For simd properties, put them directly into TREE_VALUE.
37 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
38 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
39 add "omp declare variant base" attribute rather than
40 "omp declare variant".
41
fe2bc27c
JM
422019-10-11 Joseph Myers <joseph@codesourcery.com>
43
44 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
45
94e7f906
JJ
462019-10-10 Jakub Jelinek <jakub@redhat.com>
47
48 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
49 true, terminate processing on closing paren and don't skip to end of
50 pragma line.
51 (c_parser_omp_declare_simd): Handle also declare variant.
52 (omp_construct_selectors, omp_device_selectors,
53 omp_implementation_selectors, omp_user_selectors): New variables.
54 (c_parser_omp_context_selector,
55 c_parser_omp_context_selector_specification,
56 c_finish_omp_declare_variant): New functions.
57 (c_finish_omp_declare_simd): Handle both declare simd and
58 declare variant.
59 (c_parser_omp_declare): Handle declare variant.
60
93313b94
JM
612019-10-02 Joseph Myers <joseph@codesourcery.com>
62
63 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
64 CPP_COLON tokens.
65
55879815
RS
662019-10-01 Richard Sandiford <richard.sandiford@arm.com>
67
68 * c-objc-common.c (useful_aka_type_p): New function.
69 (print_type): Use it to decide whether an aka type is worth printing.
70
59bc434a
JJ
712019-09-27 Jakub Jelinek <jakub@redhat.com>
72
73 PR c++/88203
74 * c-parser.c (c_parser_predefined_identifier): New function.
75 (c_parser_postfix_expression): Use it.
76 (c_parser_omp_variable_list): Parse predefined identifiers.
77 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
78 in shared and firstprivate clauses, even when they are predetermined
79 shared.
80
c6447c20
RS
812019-09-27 Richard Sandiford <richard.sandiford@arm.com>
82
83 * c-typeck.c (build_function_call_vec): Take the original function
84 decl as an optional final parameter. Pass all built-in calls to
85 check_builtin_function_arguments.
86
522da4c2
EB
872019-09-20 Eric Botcazou <ebotcazou@adacore.com>
88
89 PR c/91815
90 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
91 of identifiers in the external scope only for variables and functions.
92
68e2c199
PK
932019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
94
95 PR c/78736
96 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
97
22f8849d
IS
982019-08-23 Iain Sandoe <iain@sandoe.co.uk>
99
100 PR pch/61250
101 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
102 after determining that the first token is not
103 PRAGMA_GCC_PCH_PREPROCESS.
104
db376f45
EB
1052019-08-22 Eric Botcazou <ebotcazou@adacore.com>
106
107 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
108 FUNCTION_DECL to the right value in the presence of nested declarators.
109
4d732405
RS
1102019-08-13 Richard Sandiford <richard.sandiford@arm.com>
111
112 PR middle-end/91421
113 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
114
cb1180d5
RS
1152019-08-13 Richard Sandiford <richard.sandiford@arm.com>
116
117 PR middle-end/91421
118 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
119 of a built_in_function.
120 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
121
77eb117f
JJ
1222019-08-10 Jakub Jelinek <jakub@redhat.com>
123
124 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
125 (c_parser_omp_clause_device_type): New function.
126 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
127 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
128 (c_parser_omp_declare_target): Handle device_type clauses. Remove
129 diagnostics for declare target with clauses nested in clause-less
130 declare target declaration-definition-seq.
131 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
132
2c3b8bad
JJ
1332019-08-09 Jakub Jelinek <jakub@redhat.com>
134
bb522e2e
JJ
135 * c-parser.c (check_no_duplicate_clause): Simplify using
136 omp_find_clause.
137 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
138 directive name modifiers.
139 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
140
2c3b8bad
JJ
141 PR c/91401
142 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
143 check_no_duplicate_clause call. Comment it out, instead emit a
144 warning for duplicate dist_schedule clauses.
145
99769e7f
RS
1462019-08-08 Richard Sandiford <richard.sandiford@arm.com>
147
148 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
149
8860d270
JJ
1502019-08-08 Jakub Jelinek <jakub@redhat.com>
151
152 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
153 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
154 instead of generic_head to track duplicates.
155
398e3feb
JJ
1562019-08-07 Jakub Jelinek <jakub@redhat.com>
157
158 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
159 (c_parser_omp_clause_use_device_addr): New function.
160 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
161 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
162 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
163 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
164 map or use_device_* clauses.
165 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
166 in OpenMP, require pointer type rather than pointer or array type.
167 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
168
a28351e7
JJ
1692019-07-31 Jakub Jelinek <jakub@redhat.com>
170
171 PR c/91192
172 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
173 even if finish is UNKNOWN_LOCATION, just use start as finish in that
174 case.
175
6343b6bf
ML
1762019-07-25 Martin Liska <mliska@suse.cz>
177 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
178
179 PR c++/23383
180 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
181
cb50701e
ML
1822019-07-25 Martin Liska <mliska@suse.cz>
183
184 * c-decl.c (merge_decls): Use new macros
185 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
186
62e3e66f
RB
1872019-07-23 Richard Biener <rguenther@suse.de>
188
189 PR tree-optimization/83518
190 * gimple-parser.c (c_parser_parse_gimple_body): When we have
191 a CFG also rebuild cgraph edges.
192
554a530f
JJ
1932019-07-20 Jakub Jelinek <jakub@redhat.com>
194
195 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
196 (c_parser_omp_clause_bind): New function.
197 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
198 (OMP_LOOP_CLAUSE_MASK): Define.
199 (c_parser_omp_loop): New function.
200 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
201 loop combined with parallel or teams.
202 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
203 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
204
d119bf79
RS
2052019-07-18 Richard Sandiford <richard.sandiford@arm.com>
206
207 PR c/53633
208 * c-decl.c (finish_function): Check targetm.warn_func_return
209 before issuing a -Wreturn-type warning.
210
ab20d992 2112019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
212
213 * gimple-parser.c (c_parser_gimple_try_stmt): New.
214 (c_parser_compound_statement): Call it.
215
1fdd6f04
JJ
2162019-07-12 Jakub Jelinek <jakub@redhat.com>
217
218 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
219 (c_parser_omp_clause_order): New function.
220 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
221 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
222 PRAGMA_OMP_CLAUSE_ORDER.
223 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
224
8389386c
RB
2252019-07-10 Richard Biener <rguenther@suse.de>
226
227 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
228 _Literal (int *) &x for address literals.
229
99b1c316
MS
2302019-07-09 Martin Sebor <msebor@redhat.com>
231
232 PR c++/61339
233 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
234 to class.
235 (field_decl_cmp): Same.
236 * c-parser.c (c_parser_struct_or_union_specifier): Same.
237 * c-tree.h: Same.
238 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
239
6c1dae73
MS
2402019-07-09 Martin Sebor <msebor@redhat.com>
241
242 PR c++/61339
243 * c-decl.c: Change class-key from class to struct and vice versa
244 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
245 * gimple-parser.c: Same.
246
69b5279e
RB
2472019-07-01 Richard Biener <rguenther@suse.de>
248
249 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
250 _Literal (char *) &"foo" for address literals pointing to
251 STRING_CSTs.
252
ab20d992
JJ
2532019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
254
255 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
256 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
257 C incompatibility if alternate "__intN__" form is used.
258
1e3d475e
MS
2592019-06-24 Martin Sebor <msebor@redhat.com>
260
261 * c-typeck.c (build_binary_op): Hyphenate floating-point.
262
bf38f7e9
JJ
2632019-06-10 Jakub Jelinek <jakub@redhat.com>
264
265 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
266 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
267 (c_parser_omp_scan_loop_body): New function.
268 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
269 inscan reduction clauses.
270 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
271 non-inscan reductions on the same construct, or inscan reductions with
272 ordered or schedule clauses, or inscan array reductions.
273
65985d78
MS
2742019-06-05 Martin Sebor <msebor@redhat.com>
275
276 PR c/90737
277 * c-typeck.c (c_finish_return): Only consider functions returning
278 pointers as candidates for -Wreturn-local-addr.
279
0ecf545c
MS
2802019-06-05 Martin Sebor <msebor@redhat.com>
281
282 * c-decl.c (start_decl): Adjust quoting and hyphenation
283 in diagnostics.
284 (finish_decl): Same.
285 (finish_enum): Same.
286 (start_function): Same.
287 (declspecs_add_type): Same.
288 * c-parser.c (warn_for_abs): Same.
289 * c-typeck.c (build_binary_op): Same.
290
e03436e7
TS
2912019-05-17 Thomas Schwinge <thomas@codesourcery.com>
292
b48f44bf
TS
293 PR c/89433
294 * c-parser.c (c_finish_oacc_routine): Rework checking if already
295 marked with an OpenACC 'routine' directive.
296
5bf04509
TS
297 PR c/89433
298 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
299 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
300
e03436e7
TS
301 PR c/89433
302 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
303 clauses from "omp declare target" attribute.
304
a9c697b8
MS
3052019-05-16 Martin Sebor <msebor@redhat.com>
306
ab20d992
JJ
307 * c-decl.c (start_decl): Quote keywords, operators, and
308 types in diagnostics.
309 (finish_decl): Same.
310 * c-parser.c (c_parser_asm_statement): Same.
311 (c_parser_conditional_expression): Same.
312 (c_parser_transaction_cancel): Same.
313 * c-typeck.c (c_common_type): Same.
314 (build_conditional_expr): Same.
315 (digest_init): Same.
316 (process_init_element): Same.
317 (build_binary_op): Same.
a9c697b8 318
c4499192
RB
3192019-05-17 Richard Biener <rguenther@suse.de>
320
321 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
322 (c_parser_gimple_unary_expression): Likewise.
323 (c_parser_gimple_parentized_ternary_expression): New function.
324
adfe6e4b
RB
3252019-05-16 Richard Biener <rguenther@suse.de>
326
327 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
328 (c_parser_gimple_unary_expression): Likewise.
329
186dabf2
RB
3302019-05-15 Richard Biener <rguenther@suse.de>
331
332 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
333 __BIT_FIELD_REF.
334
1158c5b4
RB
3352019-05-14 Richard Biener <rguenther@suse.de>
336
337 * gimple-parser.c (c_parser_gimple_statement): Remove
338 questionable auto-promotion to VIEW_CONVERT_EXPR.
339 (c_parser_gimple_typespec): Split out from __MEM parsing.
340 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
341 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
342 as __VIEW_CONVERT with -gimple.
343
fd4485aa
ML
3442019-05-09 Martin Liska <mliska@suse.cz>
345
346 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
347 __MAX.
348 (c_parser_gimple_unary_expression): Parse also binary expression
349 __MIN and __MAX.
350 (c_parser_gimple_parentized_binary_expression): New function.
351
d276406a
ML
3522019-05-09 Martin Liska <mliska@suse.cz>
353
354 * gimple-parser.c (struct gimple_parser): Add probability.
355 for gimple_parser_edge.
356 (gimple_parser::push_edge): Add new argument probability.
357 (c_parser_gimple_parse_bb_spec): Parse also probability
358 if present.
359 (c_parser_parse_gimple_body): Set edge probability.
360 (c_parser_gimple_compound_statement): Consume token
361 before calling c_parser_gimple_goto_stmt.
362 Parse BB counts.
363 (c_parser_gimple_statement): Pass new argument.
364 (c_parser_gimple_goto_stmt): Likewise.
365 (c_parser_gimple_if_stmt): Likewise.
366 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
367 * c-parser.c (c_parser_declaration_or_fndef): Pass
368 hot_bb_threshold argument.
369 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
370 field.
371 (c_parser_gimple_parse_bb_spec_edge_probability): New.
372
f179b64e
JJ
3732019-04-26 Jakub Jelinek <jakub@redhat.com>
374
375 PR debug/90197
376 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
377 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
378 (c_parser_do_statement): Likewise.
379 (c_parser_for_statement): Likewise. Formatting fixes.
380 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
381 emit DEBUG_BEGIN_STMTs if needed.
382
e7178413
JJ
3832019-04-19 Jakub Jelinek <jakub@redhat.com>
384
c280b7ee
JJ
385 PR c/89888
386 * c-typeck.c (struct c_switch): Remove outside_range_p member.
387 (c_start_case): Don't clear it.
388 (do_case): Adjust c_add_case_label caller.
389 (c_finish_case): Adjust c_do_switch_warnings caller.
390
e7178413
JJ
391 PR c++/90108
392 * c-decl.c (merge_decls): If remove is main variant and
393 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
394 variant that has newdecl as TYPE_NAME if any.
395
60a2c645
JJ
3962019-04-12 Jakub Jelinek <jakub@redhat.com>
397
398 PR c/89933
399 * c-decl.c (merge_decls): When newdecl's type is its main variant,
400 don't try to remove it from the variant list, but instead assert
401 it has no variants.
402
2a82beaa
RB
4032019-04-01 Richard Biener <rguenther@suse.de>
404
405 PR c/71598
406 * c-tree.h (c_get_alias_set): Declare.
407 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
408 * c-objc-common.c (c_get_alias_set): Treat enumeral types
409 as the underlying integer type.
410
bec1da64
MS
4112019-03-19 Martin Sebor <msebor@redhat.com>
412
413 PR tree-optimization/89688
414 * c-decl.c (finish_decl): Call braced_lists_to_string for more
415 kinds of initializers.
416
855cd9b1
JJ
4172019-03-19 Jakub Jelinek <jakub@redhat.com>
418
419 PR c/89734
420 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
421 return type even if quals_used is 0. Formatting fixes.
422
baa09dc5
RB
4232019-03-14 Richard Biener <rguenther@suse.de>
424
425 * c-tree.h (enum c_declspec_il): New.
426 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
427 enum bitfield.
428 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
429 Pass start pass and declspec_il to c_parser_parse_gimple_body.
430 (c_parser_declspecs): Adjust.
431 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
432 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
433 and bitmap.h.
434 (struct gimple_parser): New.
435 (gimple_parser::push_edge): New method.
436 (c_parser_gimple_parse_bb_spec): New helper.
437 (c_parser_parse_gimple_body): Get start pass and IL specification.
438 Initialize SSA and CFG.
439 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
440 Build a gimple_parser parsing state and pass it along.
441 (c_parser_gimple_statement): Change intermittend __PHI internal
442 function argument for the edge.
443 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
444 (c_parser_gimple_goto_stmt): Record edges to build.
445 (c_parser_gimple_if_stmt): Likewise.
446 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
447 (c_parser_gimple_or_rtl_pass_list): Likewise.
448
a3f9f006
ML
4492019-03-11 Martin Liska <mliska@suse.cz>
450
451 * c-decl.c (check_for_loop_decls): Wrap an option name
452 in a string format message and fix GNU coding style.
453 * c-parser.c (c_parser_declspecs): Likewise.
454
1db01ff9
JJ
4552019-03-08 Jakub Jelinek <jakub@redhat.com>
456
457 PR tree-optimization/89550
458 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
459 returned true.
460 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
461 or warning returned true.
462
66dcb747
JJ
4632019-02-28 Jakub Jelinek <jakub@redhat.com>
464
465 PR c/89525
466 * c-typeck.c (convert_arguments): Call inform_declaration only if
467 the previous warning_at call returned true.
468
2263c9f2
TS
4692019-02-22 Thomas Schwinge <thomas@codesourcery.com>
470
471 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
472 parameter. Adjust all users.
473 (c_parser_oacc_simple_clause): Replace parser with loc formal
474 parameter. Adjust all users.
475
ab20d992 4762019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
477
478 PR c/87924
479 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
480 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
481
5f88ba10
JJ
4822019-02-15 Jakub Jelinek <jakub@redhat.com>
483
484 PR c/89340
485 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
486 before c_decl_attributes rather than after it.
487
cfc30fd1
JJ
4882019-02-06 Jakub Jelinek <jakub@redhat.com>
489
490 PR c/89211
491 * c-parser.c (c_parser_declaration_or_fndef): Don't update
492 DECL_ARGUMENTS of d if it has been defined already. Use a single if
493 instead of 3 nested ifs.
494
fbe83e6b
JM
4952019-02-06 Joseph Myers <joseph@codesourcery.com>
496
497 PR c/88584
498 * c-decl.c (finish_decl): Do not complete array types for arrays
499 with external linkage not at file scope.
500
f461f938
RB
5012019-02-05 Richard Biener <rguenther@suse.de>
502
503 PR c/88606
504 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
505 all type variants when not supported.
506
fe509359
JJ
5072019-01-30 Jakub Jelinek <jakub@redhat.com>
508
509 PR c/89061
510 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
511 * c-decl.c (decl_jump_unsafe): Return false for
512 C_DECL_COMPOUND_LITERAL_P decls.
513 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
514
6a335b96
JJ
5152019-01-29 Jakub Jelinek <jakub@redhat.com>
516
f4b7e754
JJ
517 PR c/89045
518 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
519 scope.
520
6a335b96
JJ
521 PR c/86125
522 * c-decl.c (last_fileptr_type): Remove.
523 (last_structptr_types): New variable.
524 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
525 {old,new}rettype instead of the types themselves. Assert
526 last_structptr_types array has the same number of elements
527 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
528 argument oldtype and newtype. Instead of handling
529 just fileptr_type_node specially, handle all builtin_structptr_types
530 pointer nodes. Formatting fix.
531
d8b5a1a0
MS
5322019-01-24 Martin Sebor <msebor@redhat.com>
533
534 PR c/86125
535 PR c/88886
536 PR middle-end/86308
537 * c-decl.c (match_builtin_function_types): Add arguments.
538 (diagnose_mismatched_decls): Diagnose mismatched declarations
539 of built-ins more strictly.
540
e21c4491
JJ
5412019-01-24 Jakub Jelinek <jakub@redhat.com>
542
543 PR c++/88976
544 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
545 on #pragma omp cancel with different modifiers.
546
420183d9
L
5472019-01-18 H.J. Lu <hongjiu.lu@intel.com>
548
549 PR c/51628
550 PR c/88664
551 * c-typeck.c (convert_for_assignment): Upate the
552 warn_for_address_or_pointer_of_packed_member call.
553
17ad43dd
TH
5542019-01-16 Tom Honermann <tom@honermann.net>
555 Jason Merrill <jason@redhat.com>
556
557 * c-typeck.c (digest_init): Revised the error message produced for
558 ill-formed cases of array initialization with a string literal.
559 (error_init): Make variadic.
560
5f07d78a
JJ
5612019-01-12 Jakub Jelinek <jakub@redhat.com>
562
563 * c-typeck.c (convert_for_assignment): Fix a comment typo.
564
c4581bbf
JJ
5652019-01-07 Jakub Jelinek <jakub@redhat.com>
566
567 PR c/88701
568 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
569 if current_function_decl is non-NULL.
570
65c5b1eb
JM
5712019-01-07 Joseph Myers <joseph@codesourcery.com>
572
573 PR c/88720
574 PR c/88726
575 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
576 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
577 functions declared but never defined only for external scope, not
578 for other scopes.
579
d8fcab68
JJ
5802019-01-07 Jakub Jelinek <jakub@redhat.com>
581
582 PR c++/85052
583 * c-parser.c (c_parser_postfix_expression): Parse
584 __builtin_convertvector.
585
a5544970
JJ
5862019-01-01 Jakub Jelinek <jakub@redhat.com>
587
588 Update copyright years.
589
da77eace
L
5902018-12-20 H.J. Lu <hongjiu.lu@intel.com>
591
592 PR c/51628
593 * c-typeck.c (convert_for_assignment): Call
594 warn_for_address_or_pointer_of_packed_member.
595
1edf8866
SB
5962018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
597
598 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
599 a more specific error message (instead of just falling through).
600
db4fd626
SB
6012018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
602
603 * c-parser.c (c_parser_asm_statement): Keep track of the location each
604 asm qualifier is first seen; use that to give nicer "duplicate asm
605 qualifier" messages. Delete 'quals" variable, instead pass the
606 "is_volatile_ flag to build_asm_stmt directly.
607 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
608 * c-typeck.c (build_asm_stmt): Ditto; adjust.
609
9c9cfcbb
SB
6102018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
611
612 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
613 "done" boolean variable.
614
a14feb3c
DM
6152018-12-19 David Malcolm <dmalcolm@redhat.com>
616
617 PR c++/87504
618 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
619 Move from here to gcc-rich-location.h and gcc-rich-location.c.
620 (build_binary_op): Use struct op_location_t and
621 class binary_op_rich_location.
622
6d939173
JJ
6232018-12-11 Jakub Jelinek <jakub@redhat.com>
624
625 PR sanitizer/88426
626 * c-convert.c (convert): Call c_fully_fold before calling
627 ubsan_instrument_float_cast.
628
b7055028
SB
6292018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
630
631 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
632 setting "quals".
633
5b76e75f
SB
6342018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
635
636 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
637 after asm. Pass a flag for it to build_asm_expr.
638 * c-tree.h (build_asm_expr): Update declaration.
639 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
640 set ASM_INLINE_P.
641
30bd42b9
SB
6422018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
643
644 PR inline-asm/55681
645 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
646 combination of volatile and goto, in any order, without repetitions.
647
9df6c0e4
JB
6482018-12-04 James Norris <jnorris@codesourcery.com>
649 Cesar Philippidis <cesar@codesourcery.com>
650 Julian Brown <julian@codesourcery.com>
651
652 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
653 code.
654
f44697b7
RB
6552018-11-30 Richard Biener <rguenther@suse.de>
656
657 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
658 _Literal (type) { ... } as empty aggregate or vector constructor.
659
550dfbdc
MS
6602018-11-29 Martin Sebor <msebor@redhat.com>
661
662 PR c/88091
663 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
664 (convert_arguments): Add comments. Pass additional argument to
665 the function above.
666
673670da
MS
6672018-11-29 Martin Sebor <msebor@redhat.com>
668
669 PR c/88172
670 PR testsuite/88208
671 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
672
db1d09b0
MS
6732018-11-23 Martin Sebor <msebor@redhat.com>
674
675 PR testsuite/88098
676 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
677 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
678
98f08eb8
MS
6792018-11-20 Martin Sebor <msebor@redhat.com>
680
681 * c-parser.c (c_parser_has_attribute_expression): New function.
682 (c_parser_attribute): New function.
683 (c_parser_attributes): Move code into c_parser_attribute.
684 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
685
cd5da983
MS
6862018-11-15 Martin Sebor <msebor@redhat.com>
687
688 PR c/83656
689 * c-decl.c (header_for_builtin_fn): Declare.
690 (diagnose_mismatched_decls): Diagnose declarations of built-in
691 functions without a prototype.
692 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
693 (convert_argument): Same.
694 (convert_arguments): Factor code out into convert_argument.
695 Detect mismatches between built-in formal arguments in calls
696 to built-in without prototype.
697 (build_conditional_expr): Same.
698 (type_or_builtin_type): New function.
699 (convert_for_assignment): Add argument. Conditionally issue
700 warnings instead of errors for mismatches.
701
620e594b
DM
7022018-11-13 David Malcolm <dmalcolm@redhat.com>
703
704 * c-decl.c: Replace "source_location" with "location_t".
705 * c-tree.h: Likewise.
706 * c-typeck.c: Likewise.
707 * gimple-parser.c: Likewise.
708
3179ebae
JJ
7092018-11-09 Jakub Jelinek <jakub@redhat.com>
710
81a227c6
JJ
711 * c-parser.c (c_parser_omp_clause_final): Use
712 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
713 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
714 parsing instead of c_parser_paren_condition.
715 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
716 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
717 c_fully_fold instead of c_parser_condition.
718 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
719 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
720 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
721 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
722 c_parser_expr_no_commas instead of c_parser_expression.
723
98c91c56
JJ
724 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
725 reduction clause with inscan modifier.
726
3179ebae
JJ
727 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
728 clauses other than atomic_default_mem_order.
729
28567c40
JJ
7302018-11-08 Jakub Jelinek <jakub@redhat.com>
731
732 * c-parser.c: Include memmode.h.
733 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
734 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
735 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
736 task_reduction clauses.
737 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
738 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
739 section, or lvalue assignment expression.
740 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
741 (c_parser_omp_clause_lastprivate): Parse optional
742 conditional: modifier.
743 (c_parser_omp_clause_hint): Require constant integer expression rather
744 than just integer expression.
745 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
746 clause.
747 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
748 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
749 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
750 functions.
751 (c_parser_omp_clause_depend): Parse iterator modifier and handle
752 iterators. Parse mutexinoutset and depobj kinds.
753 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
754 callers.
755 (c_parser_omp_all_clauses): Likewise. Handle
756 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
757 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
758 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
759 default memory order from requires directive if any. Adjust
760 c_finish_omp_atomic caller.
761 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
762 (c_parser_omp_flush): Parse flush with memory-order-clause.
763 (c_parser_omp_for_loop): Allow NE_EXPR even in
764 OpenMP loops, adjust c_finish_omp_for caller.
765 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
766 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
767 Allow to be called while parsing combined parallel master.
768 Parse combined master taskloop{, simd}.
769 (c_parser_omp_parallel): Parse combined
770 parallel master{, taskloop{, simd}} constructs.
771 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
772 (OMP_TASKGROUP_CLAUSE_MASK): Define.
773 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
774 (OMP_TASKWAIT_CLAUSE_MASK): Define.
775 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
776 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
777 around teams body. Use SET_EXPR_LOCATION.
778 (c_parser_omp_target_data): Allow target data
779 with only use_device_ptr clauses.
780 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
781 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
782 (c_parser_omp_requires): New function.
783 (c_finish_taskloop_clauses): New function.
784 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
785 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
786 declaration. Disallow in_reduction clause when combined with parallel
787 master.
788 (c_parser_omp_construct): Adjust c_parser_omp_master and
789 c_parser_omp_taskgroup callers.
790 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
791 other than cancel.
792 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
793 like OMP_CLAUSE_REDUCTION.
794 (handle_omp_array_sections): Likewise. Call save_expr on array
795 reductions before calling build_index_type. Handle depend clauses
796 with iterators.
797 (struct c_find_omp_var_s): New type.
798 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
799 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
800 with static, runtime or auto schedule kinds. Call save_expr for whole
801 array reduction sizes. Diagnose reductions with zero sized elements
802 or variable length structures. Diagnose nogroup clause used with
803 reduction clause(s). Handle depend clause with
804 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
805 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
806 some different type for other kinds. Use build_unary_op with
807 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
808 Handle depend clauses with iterators. Remove no longer needed special
809 case that predetermined const qualified vars may be specified in
810 firstprivate clause. Complain if const qualified vars are mentioned
811 in data-sharing clauses other than firstprivate or shared. Use
812 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
813 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
814 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
815 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
816
7e2de6df
DM
8172018-10-29 David Malcolm <dmalcolm@redhat.com>
818
819 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
820 logic for change to name_hint::operator bool.
821 (undeclared_variable): Likewise.
822 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
823 (c_parser_parameter_declaration): Likewise.
824
9f936c86
JM
8252018-10-17 Joseph Myers <joseph@codesourcery.com>
826
827 * c-errors.c (pedwarn_c11): New function.
828 * c-parser.c (disable_extension_diagnostics): Save
829 warn_c11_c2x_compat and set it to 0.
830 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
831 (c_parser_static_assert_declaration_no_semi): Handle
832 _Static_assert without string constant.
833 * c-tree.h (pedwarn_c11): New prototype.
834
033eb567
DM
8352018-10-17 David Malcolm <dmalcolm@redhat.com>
836
837 * Make-lang.in (selftest-c): New.
838 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
839 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
840 from gcc/Makefile.in.
841
0edf3afe
RB
8422018-10-02 Richard Biener <rguenther@suse.de>
843
844 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
845
8313a764
JM
8462018-09-26 Joseph Myers <joseph@codesourcery.com>
847
848 PR c/87390
849 * c-typeck.c (build_binary_op): Use excess precision for
850 comparisons of integers and floating-point for C11 and later.
851
ce6f0888
MJ
8522018-09-26 Martin Jambor <mjambor@suse.cz>
853
854 PR c/87347
855 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 856 comment.
ce6f0888 857
9c4a4b3c
DM
8582018-09-17 David Malcolm <dmalcolm@redhat.com>
859
860 * c-objc-common.c (range_label_for_type_mismatch::get_text):
861 Update for new param.
862 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
863 Likewise.
864
80c6d1f4
MJ
8652018-09-17 Martin Jambor <mjambor@suse.cz>
866
867 PR c/63886
868 * c-parser.c: (warn_for_abs): New function.
869 (c_parser_postfix_expression_after_primary): Call it.
870
4a426e36
BE
8712018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
872
873 * c-typeck.c (digest_init): Shorten overlength strings.
874
6d900107
BE
8752018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
876
877 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
878
b5764229
BE
8792018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
880
881 * c-decl.c (finish_decl): Call braced_list_to_string here ...
882 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
883
22eea6b2
AM
8842018-08-30 Alexander Monakov <amonakov@ispras.ru>
885
886 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
887 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
888
85204e23
DM
8892018-08-27 David Malcolm <dmalcolm@redhat.com>
890
891 PR 87091
892 * c-decl.c (implicitly_declare): Update call to
893 maybe_add_include_fixit to suggest overriding the location, as it
894 is for a note.
895 * c-objc-common.c (c_tree_printer): Update for conversion of
896 show_caret_p to a tri-state.
897
3d78e008
ML
8982018-08-27 Martin Liska <mliska@suse.cz>
899
900 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
901 fndecl_built_in_p and remove check for FUNCTION_DECL if
902 possible.
3d78e008
ML
903 (diagnose_mismatched_decls): Likewise.
904 (merge_decls): Likewise.
905 (warn_if_shadowing): Likewise.
906 (pushdecl): Likewise.
907 (implicitly_declare): Likewise.
908 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
909 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
910 * c-typeck.c (build_function_call_vec): Likewise.
911 (convert_arguments): Likewise.
912
097f82ec
DM
9132018-08-20 David Malcolm <dmalcolm@redhat.com>
914
915 PR other/84889
916 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
917 (diagnose_mismatched_decls): Likewise, in various places.
918 (warn_if_shadowing): Likewise.
919 (implicit_decl_warning): Likewise.
920 (implicitly_declare): Likewise.
921 (undeclared_variable): Likewise.
922 (declare_label): Likewise.
923 (grokdeclarator): Likewise.
924 (start_function): Likewise.
925 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
926 (c_parser_parameter_declaration): Likewise.
927 (c_parser_binary_expression): Likewise.
928 * c-typeck.c (c_expr_sizeof_expr): Likewise.
929 (parser_build_binary_op): Likewise.
930 (build_unary_op): Likewise.
931 (error_init): Likewise.
932 (pedwarn_init): Likewise.
933 (warning_init): Likewise.
934 (convert_for_assignment): Likewise.
935
96e6ae57
DM
9362018-08-15 David Malcolm <dmalcolm@redhat.com>
937
938 * c-objc-common.c: Include "gcc-rich-location.h".
939 (c_tree_printer): Move implemenation of '%T' to...
940 (print_type): ...this new function.
941 (range_label_for_type_mismatch::get_text): New function.
942 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
943 range for the various ic_argpass cases.
944 (class maybe_range_label_for_tree_type_mismatch): New class.
945 (build_binary_op): Use it when calling binary_op_error.
946
0cd020ae 9472018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 948
0cd020ae
PK
949 * c-decl.c (start_decl): Do not warn if variables is named as main
950 and is a local variable.
951
72733314
IS
9522018-08-15 Iain Sandoe <iain@sandoe.co.uk>
953
954 PR c/19315
955 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
956 objects of unknown size.
957
23aa9f7c
MS
9582018-08-13 Martin Sebor <msebor@redhat.com>
959
960 PR tree-optimization/71625
961 * c-parser.c (c_parser_declaration_or_fndef): Call
962 braced_list_to_string.
963
e5e7e50d
BH
9642018-08-03 Bogdan Harjoc <harjoc@gmail.com>
965
966 PR c/86690
967 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
968 errors.
969
8a45b051
MS
9702018-08-01 Martin Sebor <msebor@redhat.com>
971
972 PR tree-optimization/86650
973 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
974 and TREE_BLOCK (t) from within percent_K_format to this callsite.
975
5922dcb5
JJ
9762018-08-01 Jakub Jelinek <jakub@redhat.com>
977
978 PR c/85704
979 * c-typeck.c (init_field_decl_cmp): New function.
980 (output_pending_init_elements): Use it for field comparisons
981 instead of pure bit_position comparisons.
982
9b452033
JJ
9832018-07-12 Jakub Jelinek <jakub@redhat.com>
984
985 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
986 type here, instead add "omp declare target implicit" attribute.
987 (finish_decl): Diagnose vars without mappable type here.
988
ab20d992
JJ
9892018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
990 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
991 Cesar Philippidis <cesar@codesourcery.com>
992
993 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
994 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
995 to their non-present_or_* counterparts. Make 'self' an alias to
996 PRAGMA_OACC_CLAUSE_HOST.
997 (c_parser_oacc_data_clause): Update GOMP mappings for
998 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
999 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1000 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1001 Remove support for present_or_* clauses.
1002 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1003 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1004 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1005 (OACC_DATA_CLAUSE_MASK): Likewise.
1006 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1007 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1008 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1009 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1010 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1011
e197e64e
KV
10122018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1013
1014 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1015 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1016 (c_parser_gimple_unary_expression): Likewise.
1017
487f2f61
JJ
10182018-06-15 Jakub Jelinek <jakub@redhat.com>
1019
1020 PR c/86093
1021 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1022 before doing POINTER_DIFF_EXPR.
1023
e4d44a37
MP
10242018-06-07 Marek Polacek <polacek@redhat.com>
1025
1026 PR c/85318
1027 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1028 for loop initial declarations.
1029
b67b9225
DP
10302018-05-30 David Pagan <dave.pagan@oracle.com>
1031
1032 PR c/55976
1033 * c-decl.c (grokdeclarator): Update check for return type warnings.
1034 (start_function): Likewise.
1035 (finish_function): Likewise.
1036 * c-typeck.c (c_finish_return): Update check for return type warnings.
1037 Pass OPT_Wreturn_type to pedwarn when appropriate.
1038
c566cc9f
RS
10392018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1040
1041 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1042 __FMA_EXPR handlng.
1043
e4f81565
RS
10442018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1045
1046 * gimple-parser.c: Include internal-fn.h.
1047 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1048 (c_parser_gimple_call_internal): New function.
1049 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1050 Fix typos in comment.
1051
79e7b1fe
JJ
10522018-05-10 Jakub Jelinek <jakub@redhat.com>
1053
1054 PR c++/85662
1055 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1056 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1057 fold_convert_loc.
1058 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1059 fold_offsetof_1, pass argtype as TYPE to it and drop the
1060 fold_convert_loc.
1061
f7584c81
DP
10622018-05-02 David Pagan <dave.pagan@oracle.com>
1063
1064 PR c/30552
1065 * c-decl.c (old_style_parameter_scope): New function.
1066 * c-parser.c (c_parser_postfix_expression): Check for statement
1067 expressions in old-style function parameter list declarations.
1068 * c-parser.h (old_style_parameter_scope): New extern declaration.
1069
b33a0cb3
JJ
10702018-04-25 Jakub Jelinek <jakub@redhat.com>
1071
1072 PR sanitizer/84307
1073 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1074 it is not TREE_STATIC.
1075 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1076 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1077 its COMPOUND_LITERAL_EXPR_DECL.
1078
c5c5822a
JM
10792018-03-21 Joseph Myers <joseph@codesourcery.com>
1080
1081 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1082 where all functions return the same _FloatN or _FloatNx type,
1083 treat integer types as _Float64 instead of double.
1084
aa1c9429
JJ
10852018-03-21 Jakub Jelinek <jakub@redhat.com>
1086
1087 PR c/84999
1088 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1089 building vector comparison, diagnose it and return error_mark_node.
1090
9bb45a95
JJ
10912018-03-15 Jakub Jelinek <jakub@redhat.com>
1092
1093 PR c/84853
1094 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1095 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1096 INTEGER_TYPE element type.
1097
ada6bad9
DP
10982018-03-13 David Pagan <dave.pagan@oracle.com>
1099
1100 PR c/46921
1101 * c-typeck.c (output_init_element): Ensure field initializer
1102 expression is always evaluated if there are side effects.
1103
849bbdb9
JJ
11042018-03-06 Jakub Jelinek <jakub@redhat.com>
1105
1106 PR c/84721
1107 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1108 !building_stmt_list_p ().
1109
d74641bd
RS
11102018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1111
1112 PR c/84305
1113 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1114 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1115 and include the BIND_EXPR in the list of things that need to be
1116 pre-evaluated.
1117
0444aa9c
NS
11182018-02-09 Nathan Sidwell <nathan@acm.org>
1119
1120 PR c/84293
1121 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1122 to strict_aliasing_warning.
1123
7c30b12a
PC
11242018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1125
1126 * c-typeck.c (really_start_incremental_init, push_init_level,
1127 set_nonincremental_init, output_init_element, process_init_element):
1128 Use DECL_UNNAMED_BIT_FIELD.
1129
2be4dfcb
MP
11302018-01-31 Marek Polacek <polacek@redhat.com>
1131
1132 PR c/81779
1133 * c-parser.c (c_parser_compound_statement_nostart): Call
1134 expansion_point_location_if_in_system_header.
1135
bb9869d5
DM
11362018-01-17 David Malcolm <dmalcolm@redhat.com>
1137
1138 PR c++/83814
1139 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1140 the C part.
1141
b4923738
JJ
11422018-01-13 Jakub Jelinek <jakub@redhat.com>
1143
1144 PR c/83801
1145 * c-tree.h (decl_constant_value_1): Add a bool argument.
1146 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1147 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1148 (decl_constant_value): Adjust caller.
1149 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1150 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1151 decl_constant_value returns initializer that has BLKmode or
1152 array type.
1153 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1154
928686b1
RS
11552018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1156 Alan Hayward <alan.hayward@arm.com>
1157 David Sherwood <david.sherwood@arm.com>
1158
1159 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1160 TYPE_VECTOR_SUBPARTS.
1161
85ec4feb
JJ
11622018-01-03 Jakub Jelinek <jakub@redhat.com>
1163
1164 Update copyright years.
1165
913884f7
JJ
11662018-01-01 Jakub Jelinek <jakub@redhat.com>
1167
1168 PR c/83595
1169 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1170 c_parser_conditional_expression, c_parser_cast_expression,
1171 c_parser_sizeof_expression, c_parser_alignof_expression,
1172 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1173 c_parser_transaction_expression): Use set_error () method instead
1174 of setting value member to error_mark_node.
1175
c6cfa2bf
MM
11762017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1177
1178 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1179 and _Float<N>X built-in functions.
1180
11d29d63
JJ
11812017-12-22 Jakub Jelinek <jakub@redhat.com>
1182
14ec014e
JJ
1183 PR debug/83550
1184 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1185 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1186 incomplete vars rather than after it.
1187
11d29d63
JJ
1188 PR debug/83547
1189 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1190 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1191 and consider empty ones if there are no other stmts. For
1192 -Wunused-value walk all statements before the one only followed by
1193 DEBUG_BEGIN_STMTs.
1194
170a8bd6 11952017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1196 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1197
1198 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1199 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1200 (c_parser_do_statement): Likewise.
1201 (c_parser_for_statement): Likewise.
1202 (c_parser_statement_after_labels): Adjust calls to above.
1203 (c_parse_pragma_ivdep): New static function.
1204 (c_parser_pragma_unroll): Likewise.
1205 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1206 <PRAGMA_UNROLL>: New case.
1207
01512446
JJ
12082017-12-19 Jakub Jelinek <jakub@redhat.com>
1209
1210 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1211 perform_integral_promotions, digest_init): Replace Yoda conditions
1212 with typical order conditions.
1213 * c-decl.c (check_bitfield_type_and_width): Likewise.
1214
c65e18d3
BE
12152017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1216
1217 * c-typeck.c (c_safe_arg_type_equiv_p,
1218 c_safe_function_type_cast_p): New function.
1219 (build_c_cast): Implement -Wcast-function-type.
1220
b7280579
RB
12212017-12-14 Richard Biener <rguenther@suse.de>
1222
1223 PR c/83415
1224 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1225 like REALPART_EXPR for the behavior of whether its operand
1226 is an lvalue.
1227
49e6a6c0
MP
12282017-12-12 Marek Polacek <polacek@redhat.com>
1229
1230 PR c/82679
1231 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1232
ab20d992 12332017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1234
1235 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1236 * c-parser.c (add_debug_begin_stmt): New.
1237 (c_parser_declaration_or_fndef): Call it.
1238 (c_parser_compound_statement_nostart): Likewise.
1239 (c_parser_statement_after_labels): Likewise.
1240 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1241
4b2b493f
JM
12422017-12-07 Joseph Myers <joseph@codesourcery.com>
1243
1244 * c-decl.c (build_compound_literal): Add parameter alignas_align
1245 and set alignment of decl if nonzero.
1246 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1247 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1248 qualifier.
1249 (c_parser_struct_declaration): Update syntax comment.
1250 (c_parser_type_name): Add alignas_ok argument and pass it to
1251 c_parser_declspecs.
1252 (c_parser_cast_expression): Pass true to c_parser_type_name and
1253 give error if a cast used an _Alignas specifier.
1254 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1255 give error if sizeof (type-name) used an _Alignas specifier.
1256 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1257 give error if _Alignof (type-name) used an _Alignas specifier.
1258 (c_parser_postfix_expression_after_paren_type): Check specified
1259 alignment for a compound literal and pass it to
1260 build_compound_literal.
1261 * c-parser.h (c_parser_type_name): Update prototype.
1262 * c-tree.h (build_compound_literal): Update prototype.
1263
5d9ae53d
MS
12642017-12-07 Martin Sebor <msebor@redhat.com>
1265
1266 PR c/81544
1267 * c-decl.c (c_decl_attributes): Look up existing declaration and
1268 pass it to decl_attributes.
1269
c79144f8
DM
12702017-12-06 David Malcolm <dmalcolm@redhat.com>
1271
1272 PR c/83236
1273 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1274 reserved for use by the implementation.
1275
613bc14f
DM
12762017-12-06 David Malcolm <dmalcolm@redhat.com>
1277
1278 * c-decl.c: Include "c-family/c-spellcheck.h".
1279
05abad4c
ML
12802017-12-05 Martin Liska <mliska@suse.cz>
1281 Jakub Jelinek <jakub@redhat.com>
1282
1283 * c-typeck.c (pointer_diff): Add new argument and instrument
1284 pointer subtraction.
1285 (build_binary_op): Similar for pointer comparison.
1286
cc6534d4
JJ
12872017-12-01 Jakub Jelinek <jakub@redhat.com>
1288
65791f42
JJ
1289 PR c/79153
1290 * c-parser.c: Include tree-iterator.h.
1291 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1292 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1293 on it.
1294
cc6534d4
JJ
1295 PR c/83222
1296 * c-tree.h (decl_constant_value_1): Declare.
1297 * c-typeck.c (decl_constant_value_1): New function.
1298 (decl_constant_value): Use it.
1299 * c-fold.c (c_fully_fold_internal): If in_init, use
1300 decl_constant_value_1 instead of decl_constant_value.
1301
5de73c05
JJ
13022017-11-30 Jakub Jelinek <jakub@redhat.com>
1303
1304 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1305
058f0b9e
JJ
13062017-11-28 Jakub Jelinek <jakub@redhat.com>
1307
1308 PR sanitizer/81275
1309 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1310 c_switch_covers_all_cases_p returns true.
1311
5e9d6aa4 13122017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1313 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1314
1315 * Make-lang.in (c/c-array-notation.o): Remove.
1316 * c-array-notation.c: Delete.
1317 * c-decl.c: Remove cilkplus condition.
1318 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1319 c_parser_cilk_verify_simd, c_parser_array_notation,
1320 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1321 c_parser_cilk_simd_fn_vector_attrs,
1322 c_finish_cilk_simd_fn_tokens): Delete.
1323 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1324 (c_parser_direct_declarator_inner): Ditto.
1325 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1326 (c_parser_attributes, c_parser_compound_statement,
1327 c_parser_statement_after_labels, c_parser_if_statement,
1328 c_parser_switch_statement, c_parser_while_statement,
1329 c_parser_do_statement, c_parser_for_statement,
1330 c_parser_unary_expression, c_parser_postfix_expression,
1331 c_parser_postfix_expression_after_primary,
1332 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1333 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1334 support.
1335 * c-typeck.c (build_array_ref, build_function_call_vec,
1336 convert_arguments,
1337 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1338 c_finish_loop, build_binary_op): Remove cilkplus support.
1339
9e851845
JJ
13402017-11-28 Jakub Jelinek <jakub@redhat.com>
1341
1342 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1343 of build3.
1344
ab20d992 13452017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
1346
1347 * Make-lang.in (c.install-plugin): Install backend import library.
1348
41521dee
JJ
13492017-11-23 Jakub Jelinek <jakub@redhat.com>
1350
1351 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1352 pragma_stmt context.
1353
ac9effed
EB
13542017-11-23 Mike Stump <mikestump@comcast.net>
1355 Eric Botcazou <ebotcazou@adacore.com>
1356
1357 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1358 ANNOTATE_EXPR.
1359 (c_parser_do_statement): Likewise.
1360 (c_parser_for_statement): Likewise.
1361
ce95abc4
DM
13622017-11-22 David Malcolm <dmalcolm@redhat.com>
1363
1364 PR c++/62170
1365 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1366 bool to bool *. Within '%T' handling, if showing an "aka", use
1367 "quoted" param to add appropriate quoting.
1368
974aedcc
MP
13692017-11-22 Marek Polacek <polacek@redhat.com>
1370
1371 PR c++/60336
1372 PR middle-end/67239
1373 PR target/68355
1374 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1375
d4300cc6
DM
13762017-11-21 David Malcolm <dmalcolm@redhat.com>
1377
1378 PR c/83056
1379 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1380 earlier failed lookups.
1381
1af4ebf5
MG
13822017-11-21 Marc Glisse <marc.glisse@inria.fr>
1383
1384 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1385 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1386
26edace6
DM
13872017-11-20 David Malcolm <dmalcolm@redhat.com>
1388
1389 PR c/81404
1390 * c-decl.c: Include "c-family/known-headers.h".
1391 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1392 to known-headers.cc.
1393 (class suggest_missing_header): Move to known-header.h.
1394 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1395 than get_c_name_hint.
1396
b1212255
DM
13972017-11-20 David Malcolm <dmalcolm@redhat.com>
1398
1399 * c-decl.c (get_c_name_hint): New function.
1400 (class suggest_missing_header): New class.
1401 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1402 suggest missing headers to the user.
1403
6c7a259b
DM
14042017-11-20 David Malcolm <dmalcolm@redhat.com>
1405
1406 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1407 Include "c-family/name-hint.h"
1408 (implicit_decl_warning): Convert "hint" from
1409 const char * to name_hint. Pass location to
1410 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1411 warning was not printed.
1412 (undeclared_variable): Likewise for "guessed_id".
1413 (lookup_name_fuzzy): Convert return type from const char *
1414 to name_hint. Add location_t param.
1415 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1416 Include "c-family/name-hint.h"
1417 (c_parser_declaration_or_fndef): Convert "hint" from
1418 const char * to name_hint. Pass location to lookup_name_fuzzy.
1419 (c_parser_parameter_declaration): Likewise.
1420
f9c59f7e
JJ
14212017-11-19 Jakub Jelinek <jakub@redhat.com>
1422
1423 PR c/66618
1424 PR c/69960
1425 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1426 where needed.
1427 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1428 handle_omp_array_sections): Likewise.
1429 (digest_init): Don't call decl_constant_value_for_optimization.
1430 * c-tree.h (decl_constant_value_for_optimization): Removed.
1431 * c-fold.c (c_fold_array_ref): New function.
1432 (c_fully_fold_internal): Add LVAL argument, propagate it through
1433 recursive calls. For VAR_P call decl_constant_value and
1434 unshare if not LVAL and either optimizing or IN_INIT. Remove
1435 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1436 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1437 (c_fully_fold): Add LVAL argument, pass it through to
1438 c_fully_fold_internal.
1439 (decl_constant_value_for_optimization): Removed.
1440
3ca0dc60
JM
14412017-11-15 Joseph Myers <joseph@codesourcery.com>
1442
1443 PR c/81156
1444 * c-parser.c (check_tgmath_function): New function.
1445 (enum tgmath_parm_kind): New enum.
1446 (c_parser_postfix_expression): Handle __builtin_tgmath.
1447
64a5912c
DM
14482017-10-31 David Malcolm <dmalcolm@redhat.com>
1449
1450 * c-decl.c (implicit_decl_warning): Update for renaming of
1451 pedwarn_at_rich_loc and warning_at_rich_loc.
1452 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1453 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1454 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1455 (c_parser_struct_or_union_specifier): Likewise for renaming of
1456 pedwarn_at_rich_loc.
1457 (c_parser_parameter_declaration): Likewise for renaming of
1458 error_at_rich_loc.
1459 * c-typeck.c (build_component_ref): Likewise.
1460 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1461 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1462 (set_init_label): Likewise for renaming of error_at_rich_loc.
1463
c1136864
RB
14642017-10-30 Richard Biener <rguenther@suse.de>
1465
1466 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1467 stmts.
1468
ee5fd23a
MM
14692017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1470
1471 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1472 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1473
1a59ccf2
DM
14742017-10-25 David Malcolm <dmalcolm@redhat.com>
1475
1476 PR c/7356
1477 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1478 semicolons.
1479
bc1a75dd
JJ
14802017-10-25 Jakub Jelinek <jakub@redhat.com>
1481
1482 PR libstdc++/81706
1483 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1484 newdecl to corresponding __builtin_ if any.
1485
ff1ff960
PC
14862017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1487
1488 PR c++/82466
1489 * c-decl.c (diagnose_mismatched_decls): Use
1490 OPT_Wbuiltin_declaration_mismatch.
1491
62e1c678
DM
14922017-10-12 David Malcolm <dmalcolm@redhat.com>
1493
1494 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1495 use it to guard calls to maybe_suggest_missing_token_insertion.
1496 (c_parser_parms_list_declarator): Override default value of new
1497 "type_is_unique" param to c_parser_require.
1498 (c_parser_asm_statement): Likewise.
1499 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1500 defaulting to true.
1501
a92f6726
NS
15022017-10-11 Nathan Sidwell <nathan@acm.org>
1503
1504 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1505
8e6cdc90
RS
15062017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1507
1508 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1509 operating on trees as wide_ints.
1510 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1511 (c_tree_equal): Likewise.
1512
8139a48e
DM
15132017-10-04 David Malcolm <dmalcolm@redhat.com>
1514
1515 * c-decl.c (push_parm_decl): Store c_parm's location into the
1516 PARAM_DECL.
1517 (build_c_parm): Add "loc" param and store it within the c_parm.
1518 * c-parser.c (struct c_parser): Add "last_token_location" field.
1519 (c_parser_consume_token): Store location of the token into the
1520 new field.
1521 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1522 when handling a FUNCTION_DECL, if it doesn't already have them.
1523 (c_parser_parameter_declaration): Generate a location for the
1524 parameter, and pass it to the call to build_c_parm.
1525 * c-tree.h (struct c_parm): Add field "loc".
1526 (build_c_parm): Add location_t param.
1527 * c-typeck.c (get_fndecl_argument_location): New function.
1528 (inform_for_arg): New function.
1529 (convert_for_assignment): Use inform_for_arg when dealing with
1530 ic_argpass.
1531
2a389958
JJ
15322017-09-29 Jakub Jelinek <jakub@redhat.com>
1533
7d386d45
JJ
1534 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1535 width is non-NULL.
1536 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1537 don't SET_DECL_C_BIT_FIELD here.
1538
2a389958
JJ
1539 PR c/82340
1540 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1541 instead of trying to set just TREE_READONLY manually.
1542
ebc6a85e
TV
15432017-09-16 Tom de Vries <tom@codesourcery.com>
1544
1545 PR c/81875
1546 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1547 cond itself.
1548
bb75facd
JM
15492017-09-15 Joseph Myers <joseph@codesourcery.com>
1550
1551 PR c/82071
1552 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1553 for C11.
1554 (build_conditional_expr): For C11, generate result with excess
1555 precision when one argument is an integer and the other is of a
1556 type using excess precision.
1557
1d933576
BE
15582017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1559
1560 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1561
267bbb6f
MP
15622017-09-13 Marek Polacek <polacek@redhat.com>
1563
1564 PR c/82167
1565 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1566 than expr.original_type.
1567
6836632e
NS
15682017-09-12 Nathan Sidwell <nathan@acm.org>
1569
1570 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1571 resort_sorted_fields): Moved from c-family/c-common.c.
1572 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1573
e035be33
JM
15742017-09-01 Joseph Myers <joseph@codesourcery.com>
1575
1576 PR c/82071
1577 * c-typeck.c (build_atomic_assign): Handle argument with excess
1578 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1579 argument passed to build_binary_op and convert_for_assignment but
1580 not for call to c_fully_fold.
1581 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1582 Ensure build_binary_op is called with argument with original
1583 semantic type. Avoid calling c_fully_fold with an
1584 EXCESS_PRECISION_EXPR from build_binary_op.
1585
d2e05fcb
JJ
15862017-09-01 Jakub Jelinek <jakub@redhat.com>
1587
1588 PR c/81887
1589 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1590
b397965c
RS
15912017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1592 Alan Hayward <alan.hayward@arm.com>
1593 David Sherwood <david.sherwood@arm.com>
1594
1595 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1596 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1597 m1 and m2 to the signed equivalent of a fixed-point
1598 SCALAR_TYPE_MODE.
1599
14e18d71
DM
16002017-08-24 David Malcolm <dmalcolm@redhat.com>
1601
1602 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1603 than CAN_HAVE_LOCATION_P when determining whether to use the
1604 location_t value within "value".
1605
7f204c0f
DM
16062017-08-21 David Malcolm <dmalcolm@redhat.com>
1607
1608 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1609 rather than peeking the location of the first token.
1610 * c-tree.h (c_expr::get_location): New method.
1611
2f687306
DM
16122017-08-21 David Malcolm <dmalcolm@redhat.com>
1613
1614 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1615 to check_function_arguments.
1616
3e7b80d7
MP
16172017-08-18 Marek Polacek <polacek@redhat.com>
1618
1619 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1620 commentary.
1621
00aa1fa2
L
16222017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1623
1624 PR c/53037
1625 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1626 (check_bitfield_type_and_width): Don't allow bit-field with
1627 warn_if_not_aligned type.
1628
da67acb9
MS
16292017-08-14 Martin Sebor <msebor@redhat.com>
1630
1631 PR c/81117
1632 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1633
bb85aa74
MP
16342017-08-11 Marek Polacek <polacek@redhat.com>
1635
1636 PR c/81795
1637 * c-decl.c (pushtag): Only print inform if the warning was printed.
1638 (grokdeclarator): Likewise.
1639
32129a17
DM
16402017-08-10 David Malcolm <dmalcolm@redhat.com>
1641
1642 * c-parser.c (c_parser_error): Rename to...
1643 (c_parser_error_richloc): ...this, making static, and adding
1644 "richloc" parameter, passing it to the c_parse_error call,
1645 rather than calling c_parser_set_source_position_from_token.
1646 (c_parser_error): Reintroduce, reimplementing in terms of the
1647 above, converting return type from void to bool.
1648 (class token_pair): New class.
1649 (struct matching_paren_traits): New struct.
1650 (matching_parens): New typedef.
1651 (struct matching_brace_traits): New struct.
1652 (matching_braces): New typedef.
1653 (get_matching_symbol): New function.
1654 (c_parser_require): Add param MATCHING_LOCATION, using it to
1655 highlight matching "opening" tokens for missing "closing" tokens.
1656 (c_parser_skip_until_found): Likewise.
1657 (c_parser_static_assert_declaration_no_semi): Convert explicit
1658 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1659 class matching_parens, so that the pertinent open parenthesis is
1660 highlighted when there are problems locating the close
1661 parenthesis.
1662 (c_parser_struct_or_union_specifier): Likewise.
1663 (c_parser_typeof_specifier): Likewise.
1664 (c_parser_alignas_specifier): Likewise.
1665 (c_parser_simple_asm_expr): Likewise.
1666 (c_parser_braced_init): Likewise, for matching_braces.
1667 (c_parser_paren_condition): Likewise, for matching_parens.
1668 (c_parser_switch_statement): Likewise.
1669 (c_parser_for_statement): Likewise.
1670 (c_parser_asm_statement): Likewise.
1671 (c_parser_asm_operands): Likewise.
1672 (c_parser_cast_expression): Likewise.
1673 (c_parser_sizeof_expression): Likewise.
1674 (c_parser_alignof_expression): Likewise.
1675 (c_parser_generic_selection): Likewise.
1676 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1677 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1678 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1679 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1680 c_parser_skip_until_found call.
1681 (c_parser_objc_class_definition): Use class matching_parens as
1682 above.
1683 (c_parser_objc_method_decl): Likewise.
1684 (c_parser_objc_try_catch_finally_statement): Likewise.
1685 (c_parser_objc_synchronized_statement): Likewise.
1686 (c_parser_objc_at_property_declaration): Likewise.
1687 (c_parser_oacc_wait_list): Likewise.
1688 (c_parser_omp_var_list_parens): Likewise.
1689 (c_parser_omp_clause_collapse): Likewise.
1690 (c_parser_omp_clause_default): Likewise.
1691 (c_parser_omp_clause_if): Likewise.
1692 (c_parser_omp_clause_num_threads): Likewise.
1693 (c_parser_omp_clause_num_tasks): Likewise.
1694 (c_parser_omp_clause_grainsize): Likewise.
1695 (c_parser_omp_clause_priority): Likewise.
1696 (c_parser_omp_clause_hint): Likewise.
1697 (c_parser_omp_clause_defaultmap): Likewise.
1698 (c_parser_oacc_single_int_clause): Likewise.
1699 (c_parser_omp_clause_ordered): Likewise.
1700 (c_parser_omp_clause_reduction): Likewise.
1701 (c_parser_omp_clause_schedule): Likewise.
1702 (c_parser_omp_clause_num_teams): Likewise.
1703 (c_parser_omp_clause_thread_limit): Likewise.
1704 (c_parser_omp_clause_aligned): Likewise.
1705 (c_parser_omp_clause_linear): Likewise.
1706 (c_parser_omp_clause_safelen): Likewise.
1707 (c_parser_omp_clause_simdlen): Likewise.
1708 (c_parser_omp_clause_depend): Likewise.
1709 (c_parser_omp_clause_map): Likewise.
1710 (c_parser_omp_clause_device): Likewise.
1711 (c_parser_omp_clause_dist_schedule): Likewise.
1712 (c_parser_omp_clause_proc_bind): Likewise.
1713 (c_parser_omp_clause_uniform): Likewise.
1714 (c_parser_omp_for_loop): Likewise.
1715 (c_parser_cilk_clause_vectorlength): Likewise.
1716 (c_parser_cilk_clause_linear): Likewise.
1717 (c_parser_transaction_expression): Likewise.
1718 * c-parser.h (c_parser_require): Add param matching_location with
1719 default UNKNOWN_LOCATION.
1720 (c_parser_error): Convert return type from void to bool.
1721 (c_parser_skip_until_found): Add param matching_location with
1722 default UNKNOWN_LOCATION.
1723
30af3a2b
MP
17242017-08-09 Marek Polacek <polacek@redhat.com>
1725
1726 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1727 * c-tree.h (build_external_ref): Update declaration.
1728 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1729 (build_external_ref): Change the type of a parameter to bool.
1730 (parser_build_binary_op): Use true/false instead of 1/0.
1731 (pointer_diff): Likewise.
1732 (build_modify_expr): Likewise.
1733 (set_designator): Change the type of a parameter to bool.
1734 (set_init_index): Use true/false instead of 1/0.
1735 (set_init_label): Likewise.
1736 (output_init_element): Change the type of a parameter to bool.
1737 (output_pending_init_elements): Use true/false instead of 1/0.
1738 (process_init_element): Likewise.
1739 (build_binary_op): Change the type of a parameter to bool.
1740
296c53ac
MP
17412017-08-09 Marek Polacek <polacek@redhat.com>
1742
1743 PR c/81233
1744 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1745 Call emit_diagnostic_valist instead of pedwarn.
1746 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1747 Print the relevant types in diagnostics.
1748
a32c8316
MP
17492017-08-09 Marek Polacek <polacek@redhat.com>
1750
1751 PR c/81417
1752 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 1753 build_conditional_expr.
a32c8316
MP
1754 * c-parser.c (c_parser_conditional_expression): Create locations for
1755 EXP1 and EXP2 from their source ranges. Pass the locations down to
1756 build_conditional_expr.
1757 * c-tree.h (build_conditional_expr): Update declaration.
1758 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1759 For -Wsign-compare, also print the types.
1760
314e6352
ML
17612017-08-08 Martin Liska <mliska@suse.cz>
1762
1763 * c-convert.c: Include header files.
1764 * c-typeck.c: Likewise.
1765
577eec56
ML
17662017-08-07 Martin Liska <mliska@suse.cz>
1767
1768 * c-parser.c (c_parser_attributes): Canonicalize name of an
1769 attribute.
1770
f7b6353a
MP
17712017-08-02 Marek Polacek <polacek@redhat.com>
1772
1773 PR c/81289
1774 * c-parser.c (c_parser_unary_expression): Use set_error.
1775
8a6eab34
MP
1776 PR c/81448
1777 PR c/81306
1778 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1779 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1780
ab20d992 17812017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
1782 Martin Liska <mliska@suse.cz>
1783
1784 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1785 statement.
7fef86d3 1786
f34ebeb2
ML
17872017-07-31 Martin Liska <mliska@suse.cz>
1788
1789 PR sanitize/81530
1790 * c-convert.c (convert): Guard condition with flag_sanitize_p
1791 also with current_function_decl non-null equality.
1792 * c-decl.c (grokdeclarator): Likewise.
1793 * c-typeck.c (build_binary_op): Likewise.
1794
8595f67b
MP
17952017-07-25 Marek Polacek <polacek@redhat.com>
1796
1797 * c-decl.c (grokfield): Remove local variable.
1798
d49718d6
MP
17992017-07-25 Marek Polacek <polacek@redhat.com>
1800
1801 PR c/81364
1802 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1803 macro expansion if the body is in { }.
1804 (c_parser_while_statement): Likewise.
1805 (c_parser_for_statement): Likewise.
1806
ff22eb12
NS
18072017-07-18 Nathan Sidwell <nathan@acm.org>
1808
1809 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1810
eea77d1f
DM
18112017-07-14 David Malcolm <dmalcolm@redhat.com>
1812
1813 * c-decl.c (implicitly_declare): When suggesting a missing
1814 #include, provide a fix-it hint.
1815
b6f43128
DM
18162017-07-06 David Malcolm <dmalcolm@redhat.com>
1817
1818 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1819 and call that instead.
1820 * c-tree.h (selftest::run_c_tests): New decl.
1821
3e2becc4
MP
18222017-06-26 Marek Polacek <polacek@redhat.com>
1823
1824 PR c/80116
1825 * c-parser.c (c_parser_if_body): Set the location of the
1826 body of the conditional after parsing all the labels. Call
1827 warn_for_multistatement_macros.
1828 (c_parser_else_body): Likewise.
1829 (c_parser_switch_statement): Likewise.
1830 (c_parser_while_statement): Likewise.
1831 (c_parser_for_statement): Likewise.
1832 (c_parser_statement): Add a default argument. Save the location
1833 after labels have been parsed.
1834 (c_parser_c99_block_statement): Likewise.
1835
343ae898
RB
18362017-06-19 Richard Biener <rguenther@suse.de>
1837
1838 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1839 negated _Literals to parse _Literal (int) -1.
1840
45b2222a
ML
18412017-06-13 Martin Liska <mliska@suse.cz>
1842
1843 PR sanitize/78204
1844 * c-convert.c (convert): Use sanitize_flags_p.
1845 * c-decl.c (grokdeclarator): Likewise.
1846 * c-typeck.c (convert_for_assignment): Likewise.
1847 (c_finish_return): Likewise.
1848 (build_binary_op): Likewise.
1849
8ab7005b
JJ
18502017-06-08 Jakub Jelinek <jakub@redhat.com>
1851
1852 PR c/81006
1853 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1854 to sizetype before size_binop.
1855
363dc72c
JJ
18562017-06-07 Jakub Jelinek <jakub@redhat.com>
1857
1858 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1859 of TDI_generic.
1860
dc949728
MP
18612017-06-06 Marek Polacek <polacek@redhat.com>
1862
1863 PR c/79983
1864 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1865 ref.
1866 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1867
40ffd95f
BE
18682017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1869
1870 * c-parser.c (c_parser_binary_expression): Implement the
1871 -Wsizeof_pointer_div warning.
1872 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1873 from a parenthesized expression.
1874 (c_parser_expr_list): Use c_last_sizeof_loc.
1875 * c-tree.h (c_last_sizeof_loc): New external.
1876 * c-typeck.c (c_last_sizeof_loc): New variable.
1877 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1878
9fc5e7a4
MM
18792017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1880
1881 PR testsuite/80580
1882 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1883
f012c8ef
DM
18842017-05-30 David Malcolm <dmalcolm@redhat.com>
1885
1886 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1887 parameters.
1888
3cd211af
MS
18892017-05-24 Martin Sebor <msebor@redhat.com>
1890
1891 PR c/80731
1892 * c-fold.c (c_fully_fold_internal): Adjust.
1893 * c-typeck.c (parser_build_unary_op): Adjust.
1894
fd71a9a2
TS
18952017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1896
1897 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1898 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1899 "VECTOR_LENGTH".
1900
92fa0f9e
MP
19012017-05-23 Marek Polacek <polacek@redhat.com>
1902
1903 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1904 quotes.
1905
d11c168a
JJ
19062017-05-22 Jakub Jelinek <jakub@redhat.com>
1907
1908 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1909 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1910 it returned invariant. Call tree_invariant_p unconditionally
1911 afterwards to decide whether to return expr or op0.
1912
58aca9d9
NS
19132017-05-22 Nathan Sidwell <nathan@acm.org>
1914
1915 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1916
7fd549d2
TS
19172017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1918
1919 * c-parser.c (c_parser_omp_clause_default): Handle
1920 "OMP_CLAUSE_DEFAULT_PRESENT".
1921
6ecd2339
BE
19222017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1923
1924 * config-lang.in (gtfiles): Add c-family/c-format.c.
1925
8a57ecff
NS
19262017-05-18 Nathan Sidwell <nathan@acm.org>
1927
1928 * c-decl.c (pushdecl_top_level): Delete unused function.
1929
6574d78e
MP
19302017-05-18 Marek Polacek <polacek@redhat.com>
1931
1932 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1933 (check_earlier_gotos): Likewise.
1934 (define_label): Likewise.
1935 (pending_xref_error): Likewise.
1936 (smallest_type_quals_location): Likewise.
1937 (grokdeclarator): Likewise.
1938 (grokparms): Likewise.
1939 (identifier_global_value): Likewise.
1940 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1941 (find_init_member): Likewise.
1942
e3455240
MP
19432017-05-18 Marek Polacek <polacek@redhat.com>
1944
1945 * c-decl.c (start_decl): Use false/true instead of 0/1.
1946 (grokdeclarator): Likewise.
1947 (finish_struct): Likewise.
1948 (start_function): Change the return type to bool. Use false/true
1949 instead of 0/1.
1950 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1951 * c-tree.h (start_function): Update.
1952 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1953 (set_designator): Change the return type to bool. Use false/true
1954 instead of 0/1.
1955
3fa8871b
MP
19562017-05-17 Marek Polacek <polacek@redhat.com>
1957
1958 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1959 * c-typeck.c: Likewise.
1960
142473df
MP
19612017-05-17 Marek Polacek <polacek@redhat.com>
1962
1963 PR sanitizer/80659
1964 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1965 DECL_IGNORED_P even for non-static compound literals.
1966
1a817418
ML
19672017-05-17 Martin Liska <mliska@suse.cz>
1968
1969 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1970 use it instead of int type.
1971
b2fa0a8b
MP
19722017-05-17 Marek Polacek <polacek@redhat.com>
1973
1974 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1975 call c_fully_fold.
1976 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 1977 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
1978 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1979 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1980 save_expr.
1981 (c_parser_conditional_expression): Likewise.
1982 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1983 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1984 (process_init_element): Likewise.
1985 (build_binary_op): Likewise.
1986 (handle_omp_array_sections_1): Likewise.
1987
1e47f02b
TS
19882017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1989
1990 * c-parser.c (c_parser_omp_clause_num_gangs)
1991 (c_parser_omp_clause_num_workers)
1992 (c_parser_omp_clause_vector_length): Merge functions into...
1993 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1994 all users.
1995
c24e924f
NS
19962017-05-11 Nathan Sidwell <nathan@acm.org>
1997
1998 * gimple-parser.c: Don't #include tree-dump.h.
1999
c587104e
MM
20002017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2001
2002 PR testsuite/80580
2003 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2004
67ac9a9d
MM
20052017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2006
2007 PR testsuite/80580
2008 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2009 incorrect __MEM syntax.
2010
ac4eb40f
MM
20112017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2012
2013 PR testsuite/80580
2014 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2015 type of unary '*'.
2016
641da50a
NS
20172017-05-09 Nathan Sidwell <nathan@acm.org>
2018
2019 * c-tree.h (pushdecl): Declare.
2020
56d35585
DM
20212017-05-05 David Malcolm <dmalcolm@redhat.com>
2022
2023 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2024 with diagnostic_report_diagnostic.
2025 * c-errors.c (pedwarn_c99): Likewise.
2026 (pedwarn_c90): Likewise.
2027
815d9cc6
XR
20282017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2029
92a285c1 2030 PR c++/80038
815d9cc6
XR
2031 * c-gimplify.c (c_gimplify_expr): Remove calls to
2032 cilk_gimplifY_call_params_in_spawned_fn.
2033
1c4ea66f
DM
20342017-04-25 David Malcolm <dmalcolm@redhat.com>
2035
2036 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2037 hint for removing extra semicolon.
2038
666f7903
JJ
20392017-04-21 Jakub Jelinek <jakub@redhat.com>
2040
2041 PR c/80468
2042 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2043 enabled, set specs->type to integer_type_node.
2044
5764ee3c
JW
20452017-04-03 Jonathan Wakely <jwakely@redhat.com>
2046
2047 * c-array-notation.c: Fix typo in comment.
2048
10fa8dfb
MP
20492017-03-29 Marek Polacek <polacek@redhat.com>
2050
2051 PR c/79730
2052 * c-decl.c (finish_decl): Check VAR_P.
2053
a9e4a1a5
JJ
20542017-03-27 Jakub Jelinek <jakub@redhat.com>
2055
2056 PR middle-end/80162
2057 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2058 * c-typeck.c (c_mark_addressable): Likewise. Look through
2059 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2060 to ARRAY_TYPE.
2061 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2062
ee3ff394
MP
20632017-03-23 Marek Polacek <polacek@redhat.com>
2064
2065 * c-tree.h: Remove a C_RID_YYCODE reference.
2066
4d1b8e70
JJ
20672017-03-21 Jakub Jelinek <jakub@redhat.com>
2068
2069 PR c/80097
2070 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2071 optional COMPOUND_EXPR with ubsan instrumentation.
2072
31dc71a8
MP
20732017-03-17 Marek Polacek <polacek@redhat.com>
2074
2075 * c-parser.c: Add C11 references.
2076
d579c385
MP
20772017-03-15 Marek Polacek <polacek@redhat.com>
2078
2079 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2080
85059a38
MP
20812017-03-11 Marek Polacek <polacek@redhat.com>
2082
2083 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2084
2f6f187a
DM
20852017-03-10 David Malcolm <dmalcolm@redhat.com>
2086
2087 PR translation/79848
2088 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2089 "%qs".
2090 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2091
36618428
MP
20922017-03-09 Marek Polacek <polacek@redhat.com>
2093
2094 PR sanitizer/79757
2095 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2096 parameter declarations with initializers.
2097
01e5af5a
JJ
20982017-03-09 Jakub Jelinek <jakub@redhat.com>
2099
2100 PR c/79969
2101 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2102 TYPE_STUB_DECL.
2103
a71dbc63
JJ
21042017-03-07 Jakub Jelinek <jakub@redhat.com>
2105
2106 PR c/79834
2107 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2108 for "may only be used in compound statements" diagnostics, change it
2109 such that the same translatable string is used for all pragmas. For
2110 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2111 diagnostics.
2112 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2113 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2114 "may only be used in compound statements" diagnostics, such that the
2115 same translatable string is used for all pragmas.
2116
1ff4bae6
MP
21172017-03-04 Marek Polacek <polacek@redhat.com>
2118
2119 PR c/79847
2120 * c-decl.c (implicit_decl_warning): Add missing space.
2121
7f5a7d78
MP
21222017-03-03 Marek Polacek <polacek@redhat.com>
2123
2124 PR c/79758
2125 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2126 current_function_prototype_arg_types is error_mark_node. Fix
2127 formatting. Use TREE_VALUE instead of TREE_TYPE.
2128
883c8f06
JJ
21292017-03-03 Jakub Jelinek <jakub@redhat.com>
2130
79c9b7a8
JJ
2131 PR c/79837
2132 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2133 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2134 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2135 diagnostics.
2136
883c8f06
JJ
2137 PR c/79836
2138 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2139 instead of %<_Generic>.
2140 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2141 (c_parser_omp_target_exit_data): Use %<release%> instead of
2142 %<release>.
2143
324ff1a0
JJ
21442017-02-28 Jakub Jelinek <jakub@redhat.com>
2145
2146 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2147 instead of just cond ? "..." : "...".
2148 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2149 for "enter"/"exit" keyword.
2150 (c_finish_oacc_routine): Don't use %s to supply portions of the
2151 message.
2152
4227c9ad
JJ
21532017-02-24 Jakub Jelinek <jakub@redhat.com>
2154
2155 PR c++/79588
2156 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2157 handle -Wrestrict here.
2158 * c-typeck.c (build_function_call_vec): Adjust
2159 check_function_arguments caller.
2160
5d972e66
RB
21612017-02-23 Richard Biener <rguenther@suse.de>
2162
2163 PR c/79684
2164 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2165 to initialize c_exprs to return.
2166 (c_parser_gimple_binary_expression): Likewise.
2167 (c_parser_gimple_unary_expression): Likewise.
2168 (c_parser_gimple_postfix_expression): Likewise.
2169
61ac5ebe
MP
21702017-02-22 Marek Polacek <polacek@redhat.com>
2171
2172 PR c/79662
2173 * c-typeck.c (convert_arguments): Handle error_mark_node.
2174
41d1b0b1
PK
21752017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2176
2177 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2178 value of c_parser_parse_ssa_name against error_mark_node and emit
2179 error if ssa name is anonymous and written as default definition.
2180
eab1f169
PK
21812017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2182
2183 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2184 FMA_EXPR.
2185
bcac0b4d
JJ
21862017-02-16 Jakub Jelinek <jakub@redhat.com>
2187
2188 PR c++/79512
2189 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2190 ignore #pragma omp target even when not followed by identifier.
2191
1be33173
PK
21922017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2193
2194 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2195 (c_parser_gimple_unary_expression): Likewise.
2196
aa326bfb
JJ
21972017-02-13 Jakub Jelinek <jakub@redhat.com>
2198
2199 * c-parser.c (c_parser_oacc_declare): Add missing space in
2200 diagnostics.
2201
8a398bc5
PK
22022017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2203
2204 PR c/79478
2205 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2206 set_c_expr_source_range when parsing ssa-name.
2207
3dcde5ef 22082017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2209 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2210
2211 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2212 building IL when arguments are error_mark_node.
2213 (c_parser_gimple_unary_expression): Likewise.
2214 (c_parser_gimple_if_stmt): Likewise.
2215 (c_parser_gimple_switch_stmt): Likewise.
2216 (c_parser_gimple_return_stmt): Likewise.
2217 (c_parser_parse_ssa_name): When name lookup fails do not build
2218 an SSA name. Use undeclared rather than not declared in error
2219 reporting.
2220
192b048b
MP
22212017-02-09 Marek Polacek <polacek@redhat.com>
2222
2223 PR c/79428
2224 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2225 instead of c_parser_skip_until_found.
2226
56f71478
JJ
22272017-02-09 Jakub Jelinek <jakub@redhat.com>
2228
2229 PR c/79431
2230 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2231 symtab_node::get on automatic variables.
2232
02889d23
CLT
22332016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2234 Chung-Lin Tang <cltang@codesourcery.com>
2235
2236 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2237 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2238 semantic checking.
2239 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2240
7af4b20d
RB
22412017-02-07 Richard Biener <rguenther@suse.de>
2242
2243 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2244 (c_parser_gimple_postfix_expression_after_primary):
2245 Do not use c_build_function_call_vec to avoid folding and promotion.
2246 Simplify.
2247
e5e391d6
MO
22482017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2249
2250 PR lto/79061
2251 * c-decl.c (pop_scope): Pass main_input_filename to
2252 build_translation_unit_decl.
2253
c2e84327
DM
22542017-01-24 David Malcolm <dmalcolm@redhat.com>
2255
2256 * c-parser.c: Include "read-rtl-function.h" and
2257 "run-rtl-passes.h".
2258 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2259 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2260 production. Update for renaming of field "gimple_pass" to
2261 "gimple_or_rtl_pass". If __RTL was seen, call
2262 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2263 to an auto_timevar, to cope with early exit.
2264 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2265 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2266 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2267 Handle RID_RTL.
2268 (c_parser_parse_rtl_body): New function.
2269 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2270 (struct c_declspecs): Rename field "gimple_pass" to
2271 "gimple_or_rtl_pass". Add field "rtl_p".
2272 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2273 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2274 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2275 (c_parser_gimple_or_rtl_pass_list): ...this.
2276
2ebd93e1
MP
22772017-01-20 Marek Polacek <polacek@redhat.com>
2278
2279 PR c/64279
2280 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2281
b1c95bb5
RB
22822017-01-13 Richard Biener <rguenther@suse.de>
2283
2284 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2285 nops.
2286
25329913
RB
22872017-01-13 Richard Biener <rguenther@suse.de>
2288
2289 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2290 _Literal ( type-name ) number.
2291
6bb4ea5c
RB
22922017-01-12 Richard Biener <rguenther@suse.de>
2293
2294 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2295 __MEM.
2296
6b5b4e9c
JJ
22972017-01-11 Jakub Jelinek <jakub@redhat.com>
2298
2299 PR c++/72813
2300 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2301 PCH file.
2302
e3252775
RB
23032017-01-11 Richard Biener <rguenther@suse.de>
2304
2305 PR bootstrap/79052
2306 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2307 returns on parse errors.
2308
a9342885
MP
23092017-01-04 Marek Polacek <polacek@redhat.com>
2310
2311 PR c++/64767
2312 * c-parser.c (c_parser_postfix_expression): Mark zero character
2313 constants by setting original_type in c_expr.
2314 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2315 with a zero character constant.
2316 (char_type_p): New function.
2317
5dd9a9d0
DM
23182017-01-04 David Malcolm <dmalcolm@redhat.com>
2319
2320 * c-parser.c (c_parser_declaration_or_fndef): Create a
2321 rich_location at init_loc and parse it to start_init.
2322 (last_init_list_comma): New global.
2323 (c_parser_braced_init): Update last_init_list_comma when parsing
2324 commas. Pass it to pop_init_level. Pass location of closing
2325 brace to pop_init_level.
2326 (c_parser_postfix_expression_after_paren_type): Create a
2327 rich_location at type_loc and parse it to start_init.
2328 (c_parser_omp_declare_reduction): Likewise for loc.
2329 * c-tree.h (start_init): Add rich_location * param.
2330 (pop_init_level): Add location_t param.
2331 * c-typeck.c (struct initializer_stack): Add field
2332 "missing_brace_richloc".
2333 (start_init): Add richloc param, use it to initialize
2334 the stack node's missing_brace_richloc.
2335 (last_init_list_comma): New decl.
2336 (finish_implicit_inits): Pass last_init_list_comma to
2337 pop_init_level.
2338 (push_init_level): When finding missing open braces, add fix-it
2339 hints to the richloc.
2340 (pop_init_level): Add "insert_before" param and pass it
2341 when calling pop_init_level. Add fixits about missing
2342 close braces to any richloc. Use the richloc for the
2343 -Wmissing-braces warning.
2344 (set_designator): Pass last_init_list_comma to pop_init_level.
2345 (process_init_element): Likewise.
2346
cbe34bb5
JJ
23472017-01-01 Jakub Jelinek <jakub@redhat.com>
2348
2349 Update copyright years.
2350
d17680f3
JJ
23512016-12-21 Jakub Jelinek <jakub@redhat.com>
2352
0dba7960
JJ
2353 PR bootstrap/78817
2354 * c-typeck.c (build_function_call_vec): If check_function_arguments
2355 returns true, set TREE_NO_WARNING on CALL_EXPR.
2356
d17680f3
JJ
2357 PR c/77767
2358 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2359 to *expr instead of overwriting it.
2360
aa90531e
RB
23612016-12-20 Richard Biener <rguenther@suse.de>
2362
2363 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2364 error recovery.
2365 (c_parser_gimple_statement): Only build assigns for non-error
2366 stmts.
2367 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2368
629b3d75
MJ
23692016-12-14 Martin Jambor <mjambor@suse.cz>
2370
2371 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2372 omp-low.h.
2373 (c_finish_oacc_routine): Adjusted call to
2374 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2375 to use their new names.
2376 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2377 use its new name.
2378 (c_parser_oacc_update): Likewise.
2379 (c_parser_omp_simd): Likewise.
2380 (c_parser_omp_target_update): Likewise.
2381 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2382 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2383 name.
2384 (c_finish_omp_cancellation_point): Likewise.
2385 * gimple-parser.c: Do not include omp-low.h
2386
c5af52eb
CP
23872016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2388 James Norris <jnorris@codesourcery.com>
2389
2390 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2391 EXIT_DATA,WAIT} are not used in compound statements.
2392 (c_parser_oacc_enter_exit_data): Update diagnostics.
2393
48330c93
BE
23942016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2395
2396 PR c++/71973
2397 * c-decl.c (diagnose_mismatched_decls): Use
2398 OPT_Wbuiltin_declaration_mismatch here too.
2399
899ca90e 24002016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2401 Alan Hayward <alan.hayward@arm.com>
2402 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2403
2404 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2405 (make_label, finish_struct): Likewise.
2406
1ee62b92 24072016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2408 Richard Biener <rguenther@suse.de>
22b15758 2409
8e745a17
JJ
2410 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2411 * config-lang.in (gtfiles): Add c/c-parser.h.
2412 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2413 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2414 * c-parser.c (enum c_id_kind, struct c_token,
2415 c_parser_next_token_is, c_parser_next_token_is_not,
2416 c_parser_next_token_is_keyword,
2417 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2418 Split out to ...
2419 * c-parser.h: ... new header.
2420 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2421 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2422 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2423 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2424 c_parser_error, c_parser_require, c_parser_skip_until_found,
2425 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2426 c_parser_type_name): Export.
2427 (c_parser_tokens_buf): New function.
2428 (c_parser_error): Likewise.
2429 (c_parser_set_error): Likewise.
2430 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2431 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2432 via c_parser_parse_gimple_body.
8e745a17
JJ
2433 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2434 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2435 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2436 c_parser_error, c_parser_require, c_parser_skip_until_found,
2437 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2438 c_parser_type_name): Declare.
1ee62b92
PG
2439 (struct c_parser): Declare forward.
2440 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2441 (c_parser_error): Likewise.
2442 (c_parser_set_error): Likewise.
2443 * gimple-parser.c: New file.
2444 * gimple-parser.h: Likewise.
1ee62b92 2445
22b15758
UB
24462016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2447
2448 PR c/35503
2449 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2450 warn_for_restrict.
2451
84ff4775
LCW
24522016-09-11 Le-Chun Wu <lcwu@google.com>
2453 Mark Wielaard <mjw@redhat.com>
2454
2455 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2456 to the given -Wshadow= variant.
2457
4d0cdd0c
TP
24582016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2459
2460 * c-typeck.c: Include memmodel.h.
2461
1202f33e
JJ
24622016-10-13 Jakub Jelinek <jakub@redhat.com>
2463
2464 PR target/77957
2465 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2466 instead of lhd_return_null_tree_v.
2467
8a14afd0
BS
24682016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2469
2470 PR c++/69733
2471 * c-decl.c (smallest_type_quals_location): New static function.
2472 (grokdeclarator): Try to find the correct location for an ignored
2473 qualifier.
2474
81fea426
MP
24752016-09-26 Marek Polacek <polacek@redhat.com>
2476
2477 PR c/7652
2478 * c-decl.c (pop_scope): Add gcc_fallthrough.
2479
24802016-09-26 Marek Polacek <polacek@redhat.com>
2481
2482 PR c/7652
2483 * c-parser.c (struct c_token): Add flags field.
2484 (c_lex_one_token): Pass it to c_lex_with_flags.
2485 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2486 into IFN_FALLTHROUGH.
2487 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2488 attribute fallthrough after a case label or default label.
2489 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2490
9a2300e9
MP
24912016-09-24 Marek Polacek <polacek@redhat.com>
2492
2493 PR c/77490
2494 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2495 have boolean value. Warn about ++/-- on booleans.
2496
7de76362
JJ
24972016-09-23 Jakub Jelinek <jakub@redhat.com>
2498
2499 * c-parser.c (incomplete_record_decls): Remove unnecessary
2500 = vNULL initialization of file scope vec.
2501
5b73d2ab
MP
25022016-09-16 Marek Polacek <polacek@redhat.com>
2503
2504 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2505
e51fbec3
MP
25062016-09-14 Marek Polacek <polacek@redhat.com>
2507
2508 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2509 (fix_array_notation_expr): Likewise.
2510 * c-decl.c (finish_decl): Likewise.
2511 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2512 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2513 (function_to_pointer_conversion): Use false instead of 0.
2514 (convert_lvalue_to_rvalue): Likewise.
2515 (parser_build_unary_op): Likewise.
2516 (build_atomic_assign): Likewise.
2517 (build_unary_op): Change nonconvert parameter type to bool, use
2518 true/false instead of 1/0.
2519 (build_binary_op): Use true instead of 1.
2520
254830ba
DM
25212016-09-13 David Malcolm <dmalcolm@redhat.com>
2522
2523 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2524 of add_fixit_insert to add_fixit_insert_before.
2525
4c13ba17
MP
25262016-09-13 Marek Polacek <polacek@redhat.com>
2527
2528 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2529 it.
2530
54dcdb88
BE
25312016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2532
2533 PR c++/77496
2534 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2535 COMPOUND_EXPR to warn_for_omitted_condop.
2536
e5106e27
DM
25372016-09-07 David Malcolm <dmalcolm@redhat.com>
2538
2539 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2540 c_get_substring_location for this new langhook.
2541
9dc5773f
JJ
25422016-09-02 Jakub Jelinek <jakub@redhat.com>
2543
2544 PR c/65467
2545 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2546 flag_openmp.
2547 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2548 instead of mark_exp_read on low_bound/length expression.
2549 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2550 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2551 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2552 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2553 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2554 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2555 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2556 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2557 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2558 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2559 instead of mark_expr_read.
2560 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2561 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2562 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2563 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2564 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2565 array section bases outside of depend clause, for depend clause
2566 use convert_lvalue_to_rvalue on the base.
2567 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2568 linear, aligned, map, to and from clauses.
2569 (c_omp_clause_copy_ctor): New function.
2570
295844f6
MP
25712016-09-01 Marek Polacek <polacek@redhat.com>
2572
2573 PR c/7652
2574 * c-typeck.c (composite_type): Add FALLTHRU comment.
2575
089af25c
DM
25762016-08-31 David Malcolm <dmalcolm@redhat.com>
2577
2578 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2579 to the insertion fixits for "struct", "union", and "enum".
2580
f9087798
DM
25812016-08-30 David Malcolm <dmalcolm@redhat.com>
2582
2583 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2584 rather than add_fixit_misspelled_id.
2585 (undeclared_variable): Likewise.
2586 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2587 now-redundant "here" params from add_fixit_insert method calls.
2588 (c_parser_parameter_declaration): Likewise.
2589 * c-typeck.c (build_component_ref): Remove now-redundant range
2590 param from add_fixit_replace method calls.
2591
ebef225f
MP
25922016-08-25 Marek Polacek <polacek@redhat.com>
2593
2594 * c-typeck.c (parser_build_binary_op): Pass LHS to
2595 warn_logical_not_parentheses.
2596
fe377a48
MP
25972016-08-25 Marek Polacek <polacek@redhat.com>
2598
2599 PR c/77323
2600 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2601 or _FloatN or _FloatNx is not supported.
2602 (finish_declspecs): Set type to integer_type_node when _FloatN or
2603 _FloatNx is not supported.
2604
c65699ef
JM
26052016-08-19 Joseph Myers <joseph@codesourcery.com>
2606
2607 PR c/32187
2608 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2609 (struct c_declspecs): Add field floatn_nx_idx.
2610 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2611 and _FloatNx type specifiers.
2612 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2613 (c_parser_declspecs, c_parser_attribute_any_word)
2614 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2615 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2616 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2617 narrower than double.
2618
2f1364c2
JJ
26192016-08-12 Jakub Jelinek <jakub@redhat.com>
2620 Martin Liska <mliska@suse.cz>
2621
2622 PR c/67410
2623 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2624 % to determine val element to change. Assert that
2625 wchar_bytes * charwidth fits into val array.
2626
191816a3
MP
26272016-08-12 Marek Polacek <polacek@redhat.com>
2628
2629 PR c/7652
2630 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2631 (c_parser_postfix_expression): Likewise.
2632 * c-typeck.c (build_unary_op): Adjust fall through comment.
2633 (c_mark_addressable): Likewise.
2634
b95a64bb
JJ
26352016-08-11 Jakub Jelinek <jakub@redhat.com>
2636
2637 PR c/72816
2638 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2639 array member through typedef, for orig_qual_indirect == 0 clear
2640 orig_qual_type.
2641
895aa8e1
DM
26422016-08-08 David Malcolm <dmalcolm@redhat.com>
2643
2644 PR c/64955
2645 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2646 this up to selftest::run_c_tests.
2647 (selftest::run_c_tests): New function.
2648
0b212d8c
TS
26492016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2650
ae9281fc
TS
2651 * c-parser.c (struct oacc_routine_data): Add error_seen and
2652 fndecl_seen members.
2653 (c_finish_oacc_routine): Use these.
2654 (c_parser_declaration_or_fndef): Adjust.
2655 (c_parser_oacc_routine): Likewise. Support more C language
2656 constructs, and improve diagnostics. Move pragma context
2657 checking...
2658 (c_parser_pragma): ... here.
2659
0b212d8c
TS
2660 * c-parser.c (struct oacc_routine_data): New.
2661 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2662 Simplify code.
2663 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2664 declare target" attribute.
2665
76e2c821
JB
26662016-08-01 Jan Beulich <jbeulich@suse.com>
2667
2668 * c-fold.c (c_fully_fold_internal): Also emit shift count
2669 warnings for vector types.
2670 * c-typeck.c (build_binary_op): Likewise.
2671
f618a472
MP
26722016-07-29 Marek Polacek <polacek@redhat.com>
2673
2674 PR c/71742
2675 * c-decl.c (finish_struct): Rephrase an error message.
2676
efd0786f
MP
2677 PR c/71853
2678 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2679 to error node for invalid code.
2680
e00dceaf
MP
2681 PR c/71573
2682 * c-decl.c (implicitly_declare): Return decl early not only for
2683 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2684
673a107a
JJ
26852016-07-29 Jakub Jelinek <jakub@redhat.com>
2686
2687 PR c/71969
2688 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2689 on GNU extern inline functions.
2690
a5b5c8b6
MP
26912016-07-29 Marek Polacek <polacek@redhat.com>
2692
2693 PR c/71583
2694 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2695 check expr.value.
2696
e3fe09c1
UB
26972016-07-22 Uros Bizjak <ubizjak@gmail.com>
2698
2699 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2700
7c8f7eaa
DM
27012016-07-20 David Malcolm <dmalcolm@redhat.com>
2702
2703 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2704 spellcheck-tree.h
2705 (best_macro_match): Likewise, converting from a typedef to a
2706 subclass.
2707 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2708 (lookup_name_fuzzy): Update for change of best_macro_match to a
2709 subclass with a ctor that calls cpp_forall_identifiers.
2710
de6a69ee
DM
27112016-07-20 David Malcolm <dmalcolm@redhat.com>
2712
2713 * c-decl.c (implicit_decl_warning): Update for conversion of
2714 return type of lookup_name_fuzzy to const char *.
2715 (undeclared_variable): Likewise.
2716 (lookup_name_fuzzy): Convert return type from tree to
2717 const char *.
2718 * c-parser.c (c_parser_declaration_or_fndef): Update for
2719 conversion of return type of lookup_name_fuzzy to const char *.
2720 (c_parser_parameter_declaration): Likewise.
2721
b1c9c068
CP
27222016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2723
2724 * c-parser.c (c_parser_oacc_declare): Don't scan for
2725 GOMP_MAP_POINTER.
2726 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2727 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2728 zero-length subarrays.
2729
ddbbcb19
JJ
27302016-07-15 Jakub Jelinek <jakub@redhat.com>
2731
2732 PR c/71858
2733 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2734 instead of FUZZY_LOOKUP_NAME.
2735 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2736 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2737
dd36b877
JJ
27382016-07-14 Jakub Jelinek <jakub@redhat.com>
2739
2740 PR c/71858
2741 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2742
8c681247
TS
27432016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2744
2745 * c-parser.c (c_parser_generic_selection): Make type of variable
2746 auto_vec.
2747 (c_parser_omp_declare_simd): Likewise.
2748
bf4fa671
TS
27492016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2750
2751 * c-decl.c (struct c_struct_parse_info): Change member types
2752 from vec to auto_vec.
2753 (start_struct): Adjust.
2754 (finish_struct): Likewise.
2755
557e8c49
JJ
27562016-07-02 Jakub Jelinek <jakub@redhat.com>
2757
2758 PR c/71719
2759 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2760
54d19c3b
TS
27612016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2762
2763 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2764 Move pragma context checking into...
2765 (c_parser_omp_cancellation_point): ... here, and improve
2766 diagnostic messages.
2767 * c-typeck.c (c_finish_omp_cancel)
2768 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2769
152ef731
JJ
27702016-06-29 Jakub Jelinek <jakub@redhat.com>
2771
2772 PR c/71685
2773 * c-typeck.c (c_build_qualified_type): Don't clear
2774 C_TYPE_INCOMPLETE_VARS for the main variant.
2775
27762016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2777
2778 PR c/71552
2779 * c-typeck.c (output_init_element): Diagnose incompatible types
2780 before non-constant initializers.
2781
e9ac1f86
JJ
27822016-06-28 Jakub Jelinek <jakub@redhat.com>
2783
2784 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2785
277d7ee0
AK
27862016-06-23 Andi Kleen <ak@linux.intel.com>
2787
2788 * Make-lang.in: Add support for autofdo.
2789
1a4f11c8
DM
27902016-06-22 David Malcolm <dmalcolm@redhat.com>
2791
2792 PR c/70339
2793 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2794 (implicit_decl_warning): When issuing warnings for implicit
2795 declarations, attempt to provide a suggestion via
2796 lookup_name_fuzzy.
2797 (undeclared_variable): Likewise when issuing errors.
2798 (lookup_name_in_scope): Likewise.
2799 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2800 (best_macro_match): New typedef.
2801 (find_closest_macro_cpp_cb): New function.
2802 (lookup_name_fuzzy): New function.
2803 * c-parser.c: Include gcc-rich-location.h.
2804 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2805 (c_keyword_starts_typename): ...this new function.
2806 (c_parser_declaration_or_fndef): When issuing errors about
2807 missing "struct" etc, add a fixit. For other kinds of errors,
2808 attempt to provide a suggestion via lookup_name_fuzzy.
2809 (c_parser_parms_declarator): When looking ahead to detect typos in
2810 type names, also reject CPP_KEYWORD.
2811 (c_parser_parameter_declaration): When issuing errors about
2812 unknown type names, attempt to provide a suggestion via
2813 lookup_name_fuzzy.
2814 * c-tree.h (c_keyword_starts_typename): New prototype.
2815
5a578671
JM
28162016-06-20 Joseph Myers <joseph@codesourcery.com>
2817
2818 PR c/71601
2819 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2820 c_common_type returns error_mark_node.
2821
3f8257db 28222016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2823
2824 PR c/69507
2825 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2826 __alignof__ (expression).
2827
6a3f203c
DM
28282016-06-14 David Malcolm <dmalcolm@redhat.com>
2829
2830 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2831
264757fb
DM
28322016-06-14 David Malcolm <dmalcolm@redhat.com>
2833
2834 * c-typeck.c (build_component_ref): Simplify fixit code by
2835 using gcc_rich_location::add_fixit_misspelled_id.
2836 (set_init_label): Likewise.
2837
f7e4f2e3
DM
28382016-06-13 David Malcolm <dmalcolm@redhat.com>
2839
2840 * c-parser.c (c_parser_initelt): Provide location of name for new
2841 location_t param of set_init_label.
2842 * c-tree.h (set_init_label): Add location_t param.
2843 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2844 param and use it when issuing error messages about unrecognized
2845 field names. Attempt to provide a fixit hint if appropriate,
2846 otherwise update the error message to provide the type name.
2847
4b1ffdb1
TS
28482016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2849
2850 PR c/71381
2851 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2852 Loosen checking.
2853
44a845ca
MS
28542016-06-08 Martin Sebor <msebor@redhat.com>
2855 Jakub Jelinek <jakub@redhat.com>
2856
2857 PR c++/70507
2858 PR c/68120
2859 * c-typeck.c (convert_arguments): Don't promote last argument
2860 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2861
92a5f2ba
MP
28622016-06-08 Marek Polacek <polacek@redhat.com>
2863
2864 PR c/71418
2865 * c-decl.c (grokdeclarator): Check TYPE_P.
2866
08203f73
MP
2867 PR c/71426
2868 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2869 code.
2870
6ffd47b7
DM
28712016-06-07 David Malcolm <dmalcolm@redhat.com>
2872
2873 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2874 and structure element reference, capture the location of the
2875 element name token and pass it to build_component_ref.
2876 (c_parser_postfix_expression_after_primary): Likewise for
2877 structure element dereference.
2878 (c_parser_omp_variable_list): Likewise for
2879 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2880 * c-tree.h (build_component_ref): Add location_t param.
2881 * c-typeck.c (build_component_ref): Add location_t param
2882 COMPONENT_LOC. Use it, if available, when issuing hints about
2883 mispelled member names to provide a fixit replacement hint.
2884
1f40cff3
MP
28852016-06-06 Marek Polacek <polacek@redhat.com>
2886
2887 PR c/71362
2888 * c-parser.c (c_parser_direct_declarator): Set location.
2889
5545a907
MP
28902016-06-06 Marek Polacek <polacek@redhat.com>
2891
2892 * c-typeck.c (comptypes_internal): Handle comparisons of
2893 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2894 TYPE_REF_CAN_ALIAS_ALL.
2895
b605f663
CLT
28962016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2897
2898 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2899 arguments as addressable when async clause exists.
2900
00631022
JJ
29012016-05-30 Jakub Jelinek <jakub@redhat.com>
2902
2903 PR c++/71349
2904 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2905 when combined with target construct.
2906
7211a097
JJ
29072016-05-26 Jakub Jelinek <jakub@redhat.com>
2908
2909 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2910 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2911
95efe6b6
MP
29122016-05-25 Marek Polacek <polacek@redhat.com>
2913
2914 PR c/71265
2915 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2916
a23faf7a
MP
2917 PR c/71266
2918 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2919
e46c7770
CP
29202016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2921
2922 * c-parser.c (c_parser_oacc_declare): Add support for
2923 GOMP_MAP_FIRSTPRIVATE_POINTER.
2924 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2925 argument with enum c_omp_region_type ort.
2926 (handle_omp_array_sections): Likewise. Update call to
2927 handle_omp_array_sections_1.
2928 (c_finish_omp_clauses): Add specific errors and warning messages for
2929 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2930 call to handle_omp_array_sections.
2931
a04e69c0
TS
29322016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2933
2934 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2935
f17a223d
RB
29362016-05-24 Richard Biener <rguenther@suse.de>
2937
2938 PR middle-end/70434
2939 PR c/69504
2940 * c-typeck.c (build_array_ref): Do not complain about indexing
2941 non-lvalue vectors. Adjust for function name change.
2942
79063edd
MS
29432016-05-20 Martin Sebor <msebor@redhat.com>
2944
2945 PR c/71115
2946 * c-typeck.c (error_init): Use
2947 expansion_point_location_if_in_system_header.
2948 (warning_init): Same.
2949
8a40fef3
DM
29502016-05-19 David Malcolm <dmalcolm@redhat.com>
2951
2952 PR c/71171
2953 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2954 in error-handling.
2955 (c_parser_postfix_expression): Likewise.
2956 * c-tree.h (c_expr::set_error): New method.
2957 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2958 that result's range is initialized.
2959
e9892350
JG
29602016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2961
2962 * c-typeck.c (parser_build_unary_op): Fix formatting.
2963
8fad45f5
MW
29642016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2965
2966 * c-decl.c (grokdeclarator): Remove errmsg and use of
2967 targetm.invalid_return_type.
2968 (grokparms): Remove errmsg and use of
2969 targetm.invalid_parameter_type.
2970
aa4b467b
JM
29712016-05-13 Joseph Myers <joseph@codesourcery.com>
2972
2973 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2974 function return type.
2975
4f2e1536
MP
29762016-05-12 Marek Polacek <polacek@redhat.com>
2977
2978 PR c/70756
2979 * c-decl.c (build_compound_literal): Pass LOC down to
2980 c_incomplete_type_error.
2981 * c-tree.h (require_complete_type): Adjust declaration.
2982 (c_incomplete_type_error): Likewise.
2983 * c-typeck.c (require_complete_type): Add location parameter, pass it
2984 down to c_incomplete_type_error.
2985 (c_incomplete_type_error): Add location parameter, pass it down to
2986 error_at.
2987 (build_component_ref): Pass location down to c_incomplete_type_error.
2988 (default_conversion): Pass location down to require_complete_type.
2989 (build_array_ref): Likewise.
2990 (build_function_call_vec): Likewise.
2991 (convert_arguments): Likewise.
2992 (build_unary_op): Likewise.
2993 (build_c_cast): Likewise.
2994 (build_modify_expr): Likewise.
2995 (convert_for_assignment): Likewise.
2996 (c_finish_omp_clauses): Likewise.
2997
d6e83a8d
MM
29982016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2999
3000 PR c/43651
3001 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3002 is enabled.
3003 * c-errors.c (pedwarn_c90): Return true if warned.
3004 * c-tree.h (pedwarn_c90): Change return type to bool.
3005 (enum c_declspec_word): Add new enumerator cdw_atomic.
3006
5c3a10fb
MP
30072016-05-11 Marek Polacek <polacek@redhat.com>
3008
3009 PR c++/71024
3010 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3011 diagnose_mismatched_attributes and call it.
3012
cf68d92c
MP
30132016-05-10 Marek Polacek <polacek@redhat.com>
3014
3015 PR c/70255
3016 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3017 on a declaration following the definition.
3018
351f85c5
JJ
30192016-05-05 Jakub Jelinek <jakub@redhat.com>
3020
3021 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3022 parse it through to c_parser_c99_block_statement.
3023 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3024 caller.
3025
deef7113
MP
30262016-05-04 Marek Polacek <polacek@redhat.com>
3027
3028 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3029 OPT_Wdangling_else.
3030
de55efd5
MP
30312016-05-04 Marek Polacek <polacek@redhat.com>
3032
3033 PR c/48778
3034 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3035 for macro expansions.
3036
79ce98bc
MP
30372016-05-03 Marek Polacek <polacek@redhat.com>
3038
3039 PR c/70859
3040 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3041 check_builtin_function_arguments.
3042
fb2647aa
RB
30432016-05-03 Richard Biener <rguenther@suse.de>
3044
3045 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3046 the checksum from the previous stage.
3047
77886428
CP
30482016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3049
3050 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3051 c_finish_omp_clauses.
3052 (c_parser_omp_all_clauses): Likewise.
3053 (c_parser_oacc_cache): Likewise.
3054 (c_parser_oacc_loop): Likewise.
3055 (omp_split_clauses): Likewise.
3056 (c_parser_omp_declare_target): Likewise.
3057 (c_parser_cilk_all_clauses): Likewise.
3058 (c_parser_cilk_for): Likewise.
3059 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3060 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3061
7176a4a0
MP
30622016-05-02 Marek Polacek <polacek@redhat.com>
3063
3064 PR c/70851
3065 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3066 incomplete type.
3067
e7ff0319
CP
30682016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3069
3070 PR middle-end/70626
3071 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3072 OACC_LOOP_CLAUSE_MASK.
3073 (c_parser_oacc_kernels_parallel): Update call to
3074 c_oacc_split_loop_clauses.
3075
9f405ce1
AM
30762016-04-28 Andrew MacLeod <amacleod@redhat.com>
3077
3078 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3079 argument to build_modify_expr in two cases.
3080
c1e1f433
BS
30812016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3082
3083 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3084 warn_for_memset instead of warning directly here.
3085
2448a956
MP
30862016-04-26 Marek Polacek <polacek@redhat.com>
3087
3088 PR c/67784
3089 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3090 out of ...
3091 (c_parser_for_statement): ... here.
3092 (c_parser_if_statement): Use it.
3093 (c_parser_switch_statement): Use it.
3094 (c_parser_while_statement): Use it.
3095
b02a5e26
MP
3096 PR c/70791
3097 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3098
477d4906
IV
30992016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3100
3101 PR c++/69363
3102 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3103 instead of c_finish_cilk_clauses.
3104 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3105 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3106 floating-point variables in the linear clause for Cilk Plus.
3107
fe37c7af
MM
31082016-04-18 Michael Matz <matz@suse.de>
3109
3110 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3111 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3112
949505a9
MP
31132016-04-15 Marek Polacek <polacek@redhat.com>
3114
3115 PR c/70671
3116 * c-typeck.c (build_unary_op): Pass location down to error and
3117 warning call.
3118
dda1bf61
JJ
31192016-04-15 Jakub Jelinek <jakub@redhat.com>
3120
3121 PR c/70436
3122 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3123 where needed.
3124 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3125 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3126 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3127 Adjust c_parser_pragma callers.
3128 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3129 caller.
3130 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3131 c_parser_statement.
3132 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3133 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3134 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3135 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3136 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3137 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3138 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3139 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3140 down where needed.
3141 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3142 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3143 calls.
3144
99cd9857
MP
31452016-04-13 Marek Polacek <polacek@redhat.com>
3146
3147 PR c/70436
3148 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3149 adjust callers.
3150 (c_parser_statement): Likewise.
3151 (c_parser_c99_block_statement): Likewise.
3152 (c_parser_while_statement): Likewise.
3153 (c_parser_for_statement): Likewise.
3154 (c_parser_if_body): Don't set IF_P here.
3155 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3156 about dangling else here.
3157 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3158 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3159 warn about dangling else here.
3160
f13355da
MP
31612016-04-04 Marek Polacek <polacek@redhat.com>
3162
3163 PR c/70307
3164 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3165
5fde6a45
MP
31662016-03-31 Marek Polacek <polacek@redhat.com>
3167
3168 PR c/70297
3169 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3170
4bbf545b
DM
31712016-03-18 David Malcolm <dmalcolm@redhat.com>
3172
3173 PR c/70281
3174 * c-parser.c (c_parser_postfix_expression): Set the source range
3175 for uses of "__builtin_types_compatible_p".
3176
fcc2b74f
JJ
31772016-03-17 Jakub Jelinek <jakub@redhat.com>
3178
3179 PR c/70280
3180 * c-typeck.c (composite_type): Don't count void_list_node
3181 into len, if the list is terminated by void_list_node, start
3182 with void_list_node instead of NULL for newargs. Stop
3183 at void_list_node.
3184
ab4c578f
MP
31852016-03-16 Marek Polacek <polacek@redhat.com>
3186
3187 PR c/70093
3188 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3189 nested functions returning VM types.
3190
96b3c82d
CP
31912016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3192
3193 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3194 when calling c_finish_omp_clauses.
3195
29b9828f
BS
31962016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3197
3198 PR c/69824
3199 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3200 for later.
3201
7ff6ca38
MP
32022016-03-04 Marek Polacek <polacek@redhat.com>
3203
3204 PR c/69798
3205 * c-parser.c (c_parser_postfix_expression): Call
3206 c_parser_cast_expression rather than c_parser_postfix_expression.
3207
686e2237
JJ
32082016-03-01 Jakub Jelinek <jakub@redhat.com>
3209
3210 PR c/69796
3211 PR c/69974
3212 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3213 of incomplete decls to error_mark_node.
3214
0b05329b
MP
32152016-02-24 Marek Polacek <polacek@redhat.com>
3216
3217 PR c/69819
3218 * c-decl.c (finish_decl): Don't update the copy of the type of a
3219 different decl type.
3220
067fbd8b
JJ
32212016-02-23 Jakub Jelinek <jakub@redhat.com>
3222
3223 PR objc/69844
3224 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3225 in id_kind reclassification.
3226
bf14eba2
JJ
32272016-02-16 Jakub Jelinek <jakub@redhat.com>
3228
3229 PR c/69835
3230 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3231
ba539195
JN
32322016-02-16 James Norris <jnorris@codesourcery.com>
3233
3234 PR c/64748
3235 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3236
16595a1f
BS
32372016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3238
f48dfe98
BS
3239 * c-decl.c (build_null_declspecs): Zero the entire struct.
3240
16595a1f
BS
3241 PR c/69522
3242 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3243 callers changed. If nested_p is true, use it to call
3244 finish_implicit_inits.
3245 * c-tree.h (finish_implicit_inits): Declare.
3246 * c-typeck.c (finish_implicit_inits): New function. Move code
3247 from ...
3248 (push_init_level): ... here.
3249 (set_designator, process_init_element): Call finish_implicit_inits.
3250
66756373
JJ
32512016-02-11 Jakub Jelinek <jakub@redhat.com>
3252
3253 PR c/69768
3254 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3255 arguments for -Waddress warning.
3256
1066e9b5
JJ
32572016-02-04 Jakub Jelinek <jakub@redhat.com>
3258
3259 PR c/69669
3260 * c-decl.c (finish_enum): When honoring mode attribute,
3261 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3262
3a5d2ba4
JJ
32632016-01-29 Jakub Jelinek <jakub@redhat.com>
3264
3265 PR debug/69518
3266 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3267 all type variants, not just TYPE_MAIN_VARIANT.
3268
cbdd8ae0
JJ
32692016-01-27 Jakub Jelinek <jakub@redhat.com>
3270
3271 PR debug/66869
3272 * c-decl.c (c_write_global_declarations_1): Warn with
3273 warn_unused_function if static prototype without definition
3274 is not C_DECL_USED.
3275
fa74a4bc
MP
32762016-01-27 Marek Polacek <polacek@redhat.com>
3277
3278 PR c/68062
3279 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3280 to unsigned, if needed. Add -Wsign-compare warning.
3281
13f92e8d
JJ
32822016-01-26 Jakub Jelinek <jakub@redhat.com>
3283
3284 PR tree-optimization/69483
3285 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3286
cd8e73dc 32872016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3288
3289 PR c/24293
3290 * c-tree.h (incomplete_record_decls): Declare.
3291 * c-parser.c (incomplete_record_decls): Define.
3292 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3293 report error if any decl has zero size.
3294 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3295 or enum type to incomplete_record_decls.
3296
e6d6ec9e
TV
32972016-01-14 Tom de Vries <tom@codesourcery.com>
3298
3299 PR tree-optimization/68773
3300 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3301 set force_output.
3302
00083992
MP
33032016-01-14 Marek Polacek <polacek@redhat.com>
3304
3305 PR c/69262
3306 * c-decl.c (grokdeclarator): Provide more information for invalid
3307 array declarations.
3308
7443cf13
DM
33092016-01-06 David Malcolm <dmalcolm@redhat.com>
3310
3311 * c-parser.c (c_parser_unary_expression): For dereferences, build
3312 a combined location before calling build_indirect_ref, so that
3313 error reports cover the full range, manually updating the c_expr
3314 src_range.
3315
6b131d5b
MP
33162016-01-06 Marek Polacek <polacek@redhat.com>
3317
3318 PR sanitizer/69099
3319 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3320 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3321 NULL.
3322
818ab71a
JJ
33232016-01-04 Jakub Jelinek <jakub@redhat.com>
3324
3325 Update copyright years.
3326
2fe0a208
MP
33272016-01-04 Marek Polacek <polacek@redhat.com>
3328
3329 PR c/68908
3330 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3331 optimization to use __atomic_fetch_* built-in if possible.
3332
c7b48c8a
TS
33332015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3334
3335 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3336 into...
3337 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3338 all users.
3339
fda5652f
MP
33402015-12-22 Marek Polacek <polacek@redhat.com>
3341
3342 PR c/69002
3343 * c-typeck.c (build_component_ref): Warn when acessing elements of
3344 atomic structures or unions.
3345
745e411d
DM
33462015-12-21 David Malcolm <dmalcolm@redhat.com>
3347
3348 * c-typeck.c: Include "gcc-rich-location.h".
3349 (build_binary_op): In the two places that call binary_op_error,
3350 create a gcc_rich_location and populate it with the location of
3351 the binary op and its two operands.
3352
94c40e19
DM
33532015-12-16 David Malcolm <dmalcolm@redhat.com>
3354
3355 * c-parser.c (c_parser_statement_after_labels): When calling
3356 c_finish_return, Use the return expression's location if it has
3357 one, falling back to the location of the first token within it.
3358 * c-typeck.c (c_finish_return): When issuing warnings about
3359 the incorrect presence/absence of a return value, issue a note
3360 showing the declaration of the function.
3361
de67c4c3
DM
33622015-12-16 David Malcolm <dmalcolm@redhat.com>
3363
3364 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3365 to 4.
3366 (c_parser_peek_nth_token): New function.
3367 (c_parser_peek_conflict_marker): New function.
3368 (c_parser_error): Detect conflict markers and report them as such.
3369
a10704e1
DM
33702015-12-16 David Malcolm <dmalcolm@redhat.com>
3371
3372 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3373 to preserve range information for the primary expression
3374 in the call to c_parser_postfix_expression_after_primary.
3375
8062bca6
DM
33762015-12-16 David Malcolm <dmalcolm@redhat.com>
3377
3378 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3379 expression location, falling back on the first token location,
3380 rather than always using the latter.
3381
d06f8b75
MP
33822015-12-16 Marek Polacek <polacek@redhat.com>
3383
3384 PR c/64637
3385 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3386 available.
3387
2994fb91
MP
33882015-12-15 Marek Polacek <polacek@redhat.com>
3389
3390 PR c/68907
3391 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3392 artificial decl.
3393
a1b93f8d
DM
33942015-12-08 David Malcolm <dmalcolm@redhat.com>
3395
3396 * c-parser.c (c_parser_alignof_expression): Capture location of
3397 closing parenthesis (if any), or of end of unary expression, and
3398 use it to build a src_range for the expression.
3399
46c6e1e2
DM
34002015-12-08 David Malcolm <dmalcolm@redhat.com>
3401
3402 PR c/68757
3403 * c-parser.c (c_parser_get_builtin_args): Add
3404 "out_close_paren_loc" param, and write back to it.
3405 (c_parser_postfix_expression): Capture the closing
3406 parenthesis location for RID_CHOOSE_EXPR,
3407 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3408 RID_BUILTIN_SHUFFLE and use it to set the source range
3409 for such expressions; within RID_BUILTIN_COMPLEX set
3410 the underlying location.
3411
66189108
MP
34122015-12-07 Marek Polacek <polacek@redhat.com>
3413
3414 PR c/68668
3415 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3416 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3417
f187980b
EB
34182015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3419
3420 * c-tree.h (c_build_va_arg): Adjust prototype.
3421 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3422 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3423 parameter, adjust throughout and issue an error if EXPR is a component
3424 with reverse storage order.
3425
4250754e
JM
34262015-12-02 Jason Merrill <jason@redhat.com>
3427
3428 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3429 (c_fully_fold_internal, decl_constant_value_for_optimization):
3430 Move from c-common.c.
3431 * c-tree.h: Declare decl_constant_value_for_optimization.
3432 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3433
e9e32ee6
JM
34342015-12-02 Joseph Myers <joseph@codesourcery.com>
3435
3436 PR c/68162
3437 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3438 following link from declarator to next declarator. Track original
3439 qualified type and pass it to c_build_qualified_type.
3440 * c-typeck.c (c_build_qualified_type): Add arguments
3441 orig_qual_type and orig_qual_indirect.
3442
ff7a55bf
TS
34432015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3444
3445 * c-parser.c (c_parser_omp_clause_name)
3446 (c_parser_oacc_all_clauses): Alphabetical sorting.
3447
657e4e47
JJ
34482015-12-02 Jakub Jelinek <jakub@redhat.com>
3449
3450 PR c/68533
3451 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3452 for diagnostics.
3453
37d5ad46
JB
34542015-12-01 Julian Brown <julian@codesourcery.com>
3455 Cesar Philippidis <cesar@codesourcery.com>
3456 James Norris <James_Norris@mentor.com>
3457
3458 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3459 (c_parser_oacc_clause_use_device): New function.
3460 (c_parser_oacc_all_clauses): Add use_device support.
3461 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3462 (c_parser_oacc_host_data): New function.
3463 (c_parser_omp_construct): Add host_data support.
3464 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3465 * c-typeck.c (c_finish_oacc_host_data): New function.
3466 (c_finish_omp_clauses): Add use_device support.
3467
a4850ce9
JH
34682015-11-29 Jan Hubicka <hubicka@ucw.cz>
3469
3470 PR c/67106
3471 * c-decl.c: Set TYPE_PACKED in variants.
3472
b58d3df2
ML
34732015-11-27 Martin Liska <mliska@suse.cz>
3474
3475 PR c++/68312
3476 * c-array-notation.c (fix_builtin_array_notation_fn):
3477 Use release_vec_vec instead of vec::release.
3478 (build_array_notation_expr): Likewise.
3479 (fix_conditional_array_notations_1): Likewise.
3480 (fix_array_notation_expr): Likewise.
3481 (fix_array_notation_call_expr): Likewise.
3482
aec17bfe
JJ
34832015-11-27 Jakub Jelinek <jakub@redhat.com>
3484
3485 PR c/63326
3486 * c-parser.c (c_parser_compound_statement_nostart): If
3487 last_label is true, use pragma_stmt instead of pragma_compound
3488 as second c_parser_pragma argument.
3489 (c_parser_omp_ordered, c_parser_omp_target_update,
3490 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3491 false as second argument to c_parser_skip_to_pragma_eol after
3492 diagnosing standalone directives used in pragma_stmt context.
3493
688c4de0
IV
34942015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3495
3496 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3497 with "if (ENABLE_OFFLOADING)".
3498
cbd03aee
DM
34992015-11-23 David Malcolm <dmalcolm@redhat.com>
3500
3501 PR objc/68438
3502 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3503 for various Objective-C constructs: Class.name syntax,
3504 @selector(), @protocol(), @encode(), and [] message syntax.
3505
a87a86e1
DM
35062015-11-20 David Malcolm <dmalcolm@redhat.com>
3507
3508 PR 62314
3509 * c-typeck.c (should_suggest_deref_p): New function.
3510 (build_component_ref): Special-case POINTER_TYPE when
3511 generating a "not a structure of union" error message, and
3512 suggest a "->" rather than a ".", providing a fix-it hint.
3513
8ece8dfb
DM
35142015-11-19 David Malcolm <dmalcolm@redhat.com>
3515
3516 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3517 candidate into a new function, find_closest_identifier.
3518
433068cc
MP
35192015-11-19 Marek Polacek <polacek@redhat.com>
3520
3521 PR c/68412
3522 * c-typeck.c (parser_build_binary_op): Properly handle
3523 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3524
bef08b71
DM
35252015-11-17 David Malcolm <dmalcolm@redhat.com>
3526
3527 * c-parser.c (set_c_expr_source_range): Bulletproof both
3528 overloaded implementations against NULL expr->value.
3529 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3530 values.
3531 (c_parser_unary_expression): Likewise when handling addresses of
3532 labels.
3533 (c_parser_postfix_expression): Likewise for statement expressions,
3534 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3535 __builtin_va_arg, and for __builtin_offset_of.
3536 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3537 src_range using the range of the braced initializer.
3538 (c_parser_transaction_expression): Set src_range for "ret" to a
3539 sane pair of values.
3540
fff77217
KY
35412015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3542
3543 * c-parser.c (c_finish_omp_declare_simd): Look for
3544 "simd" attribute as well. Update error message.
3545
1d899da2
TS
35462015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3547
3548 * c-parser.c (c_parser_omp_declare_target): Adjust.
3549
e4606348
JJ
35502015-11-14 Jakub Jelinek <jakub@redhat.com>
3551
3552 * c-typeck.c (c_finish_omp_clauses): Don't mark
3553 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3554
3e636daf
MP
35552015-11-14 Marek Polacek <polacek@redhat.com>
3556
3557 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3558 * c-typeck.c: Likewise.
3559
ebedc9a3
DM
35602015-11-13 David Malcolm <dmalcolm@redhat.com>
3561
3562 * c-decl.c (warn_defaults_to): Pass line_table to
3563 rich_location ctor.
3564 * c-errors.c (pedwarn_c99): Likewise.
3565 (pedwarn_c90): Likewise.
3566 * c-parser.c (set_c_expr_source_range): New functions.
3567 (c_token::get_range): New method.
3568 (c_token::get_finish): New method.
3569 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3570 based on the range from the start of the LHS to the end of the
3571 RHS.
3572 (c_parser_conditional_expression): Likewise, based on the range
3573 from the start of the cond.value to the end of exp2.value.
3574 (c_parser_binary_expression): Call set_c_expr_source_range on
3575 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3576 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3577 based on the cast_loc through to the end of the expr.
3578 (c_parser_unary_expression): Likewise, based on the
3579 op_loc through to the end of op.
3580 (c_parser_sizeof_expression) Likewise, based on the start of the
3581 sizeof token through to either the closing paren or the end of
3582 expr.
3583 (c_parser_postfix_expression): Likewise, using the token range,
3584 or from the open paren through to the close paren for
3585 parenthesized expressions.
3586 (c_parser_postfix_expression_after_primary): Likewise, for
3587 various kinds of expression.
3588 * c-tree.h (struct c_expr): Add field "src_range".
3589 (c_expr::get_start): New method.
3590 (c_expr::get_finish): New method.
3591 (set_c_expr_source_range): New decls.
3592 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3593 on ret for prefix unary ops.
3594 (parser_build_binary_op): Likewise, running from the start of
3595 arg1.value through to the end of arg2.value.
3596
ec8b536f
MP
35972015-11-13 Marek Polacek <polacek@redhat.com>
3598
3599 PR c/68320
3600 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3601
277fe616
DM
36022015-11-13 David Malcolm <dmalcolm@redhat.com>
3603
3604 * c-typeck.c: Include spellcheck.h.
3605 (lookup_field_fuzzy_find_candidates): New function.
3606 (lookup_field_fuzzy): New function.
3607 (build_component_ref): If the field was not found, try using
3608 lookup_field_fuzzy and potentially offer a suggestion.
3609
6e232ba4
JN
36102015-11-12 James Norris <jnorris@codesourcery.com>
3611 Joseph Myers <joseph@codesourcery.com>
3612
3613 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3614 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3615 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3616 and PRAGMA_OMP_CLAUSE_LINK.
3617 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3618 and PRAGMA_OACC_CLAUSE_LINK.
3619 (OACC_DECLARE_CLAUSE_MASK): New definition.
3620 (c_parser_oacc_declare): New function.
3621
9be4f715
MP
36222015-11-12 Marek Polacek <polacek@redhat.com>
3623
3624 PR c/67784
3625 * c-parser.c (c_parser_for_statement): Reclassify the token in
3626 a correct scope.
3627
e78bede6
MP
36282015-11-11 Marek Polacek <polacek@redhat.com>
3629
3630 PR c/68107
3631 PR c++/68266
3632 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3633 checking the size of an array.
3634
69f293c9
AM
36352015-11-11 Andrew MacLeod <amacleod@redhat.com>
3636
3637 * c-array-notation.c: Remove unused header files.
3638 * c-aux-info.c: Likewise.
3639 * c-convert.c: Likewise.
3640 * c-decl.c: Likewise.
3641 * c-errors.c: Likewise.
3642 * c-lang.c: Likewise.
3643 * c-objc-common.c: Likewise.
3644 * c-parser.c: Likewise.
3645 * c-typeck.c: Likewise.
3646 * gccspec.c: Likewise.
3647
3a40d81d
NS
36482015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3649 Cesar Philippidis <cesar@codesourcery.com>
3650 James Norris <jnorris@codesourcery.com>
3651 Julian Brown <julian@codesourcery.com>
3652 Nathan Sidwell <nathan@codesourcery.com>
3653
3a40d81d
NS
3654 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3655 routine arg.
3656 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3657 (c_parser_pragma): Parse 'acc routine'.
3658 (OACC_ROUTINE_CLAUSE_MARK): Define.
3659 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3660
fc402eec
AA
36612015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3662
3663 PR debug/67192
3664 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3665 location of the backward-goto to the start of the loop body.
3666
f6b0b3db
AA
36672015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3668
3669 PR debug/67192
3670 * c-parser.c (c_parser_while_statement): Finish the loop before
3671 parsing ahead for misleading indentation.
3672 (c_parser_for_statement): Likewise.
3673
ee45a32d
EB
36742015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3675
3676 * c-decl.c (finish_struct): If the structure has reverse storage
3677 order, rewrite the type of array fields with scalar component. Call
3678 maybe_apply_pragma_scalar_storage_order on entry.
3679 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3680 errors on bit-fields and reverse SSO here and not...
3681 (c_mark_addressable): ...here.
3682 (output_init_element): Adjust call to initializer_constant_valid_p.
3683 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3684
8a645150
DM
36852015-11-06 David Malcolm <dmalcolm@redhat.com>
3686
3687 * c-decl.c (warn_defaults_to): Update for change in signature
3688 of diagnostic_set_info.
3689 * c-errors.c (pedwarn_c99): Likewise.
3690 (pedwarn_c90): Likewise.
3691 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3692 for textinfo::set_location.
3693
7a5e4956
CP
36942015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3695 Thomas Schwinge <thomas@codesourcery.com>
3696 James Norris <jnorris@codesourcery.com>
3697
3698 * c-parser.c (c_parser_omp_clause_name): Add support for
3699 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3700 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3701 default(none) in OpenACC.
3702 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3703 arguments.
3704 (c_parser_oacc_clause_tile): New function.
3705 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3706 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3707 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3708 TILE}.
3709 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3710 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3711 FIRSTPRIVATE}.
3712 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3713 (c_parser_oacc_update): Update the error message for missing clauses.
3714 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3715 and OMP_CLAUSE_INDEPENDENT.
3716
bfcfbfa0
MP
37172015-11-05 Marek Polacek <polacek@redhat.com>
3718
3719 PR c/68090
3720 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3721 deal with pre-evaluation on invalid types.
3722
e01d41e5
JJ
37232015-11-05 Jakub Jelinek <jakub@redhat.com>
3724 Ilya Verbin <ilya.verbin@intel.com>
3725
3726 * c-parser.c: Include context.h and gimple-expr.h.
3727 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3728 monotonic together with nonmonotonic.
3729 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3730 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3731 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3732 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3733 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3734 expressions on combined target teams before the target.
3735 (c_parser_omp_declare_target): If decl has "omp declare target" or
3736 "omp declare target link" attribute, and cgraph or varpool node already
3737 exists, then set corresponding flags. Call c_finish_omp_clauses
3738 in the parenthesized extended-list syntax case.
3739 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3740 declare target.
3741 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3742 on OMP_CLAUSE_REDUCTION array sections.
3743 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3744 into the constant offset, or for variable low-bound using
3745 POINTER_PLUS_EXPR. For structure element based array sections use
3746 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3747 (c_finish_omp_clauses): Drop generic_field_head, structure
3748 elements are now always mapped even as array section bases,
3749 diagnose same var in data sharing and mapping clauses. Diagnose if
3750 linear step on declare simd is neither a constant nor a uniform
3751 parameter. Look through POINTER_PLUS_EXPR for array section
3752 reductions. Diagnose the same var or function appearing multiple
3753 times on the same directive. Fix up wording for the to clause if t
3754 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3755 modifier on kinds other than dynamic or guided or nonmonotonic
3756 modifier together with ordered clause.
3757
4bf9e5a8
TS
37582015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3759 Chung-Lin Tang <cltang@codesourcery.com>
3760
3761 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3762
2adfab87
AM
37632015-10-29 Andrew MacLeod <amacleod@redhat.com>
3764
3765 * c-array-notation.c: Reorder #include's and remove duplicates.
3766 * c-aux-info.c: Likewise.
3767 * c-convert.c: Likewise.
3768 * c-decl.c: Likewise.
3769 * c-errors.c: Likewise.
3770 * c-lang.c: Likewise.
3771 * c-objc-common.c: Likewise.
3772 * c-parser.c: Likewise.
3773 * c-typeck.c: Likewise.
3774
e922069e
JW
37752015-10-26 Jim Wilson <jim.wilson@linaro.org>
3776
3777 PR debug/66068
3778 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3779 after calling build_qualified_type.
3780
765dd391
CP
37812015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3782 Thomas Schwinge <thomas@codesourcery.com>
3783 James Norris <jnorris@codesourcery.com>
3784 Joseph Myers <joseph@codesourcery.com>
3785 Julian Brown <julian@codesourcery.com>
3786 Bernd Schmidt <bschmidt@redhat.com>
3787
3788 * c-parser.c (c_parser_oacc_shape_clause): New.
3789 (c_parser_oacc_simple_clause): New.
3790 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3791 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3792
88bae6f4
TS
37932015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3794 James Norris <jnorris@codesourcery.com>
3795 Cesar Philippidis <cesar@codesourcery.com>
3796
3797 PR c/64765
3798 PR c/64880
3799 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3800 parameters, and handle these. Adjust all users.
3801 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3802 into...
3803 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3804 all users.
3805 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3806 declare functions.
3807 (c_finish_omp_construct): Declare function.
3808 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3809 Merge functions into...
3810 (c_finish_omp_construct): ... this new function.
3811
a8fc2579
RB
38122015-10-22 Richard Biener <rguenther@suse.de>
3813
3814 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3815 before folding a MINUS_EXPR.
3816
e9122ef6
MP
38172015-10-21 Marek Polacek <polacek@redhat.com>
3818
3819 PR c/68024
3820 * c-decl.c (start_function): Warn about vararg functions without
3821 a prototype.
3822
9f47c7e5
IE
38232015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3824
3825 * c-typeck.c (build_conditional_expr): Use boolean vector
3826 type for vector comparison.
3827 (build_vec_cmp): New.
3828 (build_binary_op): Use build_vec_cmp for comparison.
3829
fa60eeb9
MP
38302015-10-20 Marek Polacek <polacek@redhat.com>
3831
3832 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3833
2c7020eb
MP
38342015-10-20 Marek Polacek <polacek@redhat.com>
3835
3836 PR c/67964
3837 * c-parser.c (c_parser_attributes): Break out of the loop if the
3838 token after an attribute isn't a comma.
3839
d9a6bd32
JJ
38402015-10-13 Jakub Jelinek <jakub@redhat.com>
3841 Aldy Hernandez <aldyh@redhat.com>
3842
3843 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3844 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3845 (c_parser_omp_variable_list): Handle structure elements for
3846 map, to and from clauses. Handle array sections in reduction
3847 clause. Formatting fixes.
3848 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3849 if clause modifiers.
3850 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3851 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3852 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3853 c_parser_omp_clause_is_device_ptr): New functions.
3854 (c_parser_omp_clause_ordered): Parse optional parameter.
3855 (c_parser_omp_clause_reduction): Handle array reductions.
3856 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3857 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3858 functions.
3859 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3860 (c_parser_omp_clause_depend_sink): New function.
3861 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3862 (c_parser_omp_clause_map): Parse release/delete map kinds and
3863 optional always modifier.
3864 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3865 and c_finish_omp_clauses callers.
3866 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3867 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3868 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3869 (OMP_CRITICAL_CLAUSE_MASK): Define.
3870 (c_parser_omp_critical): Parse critical clauses.
3871 (c_parser_omp_for_loop): Handle doacross loops, adjust
3872 c_finish_omp_for and c_finish_omp_clauses callers.
3873 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3874 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3875 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3876 (c_parser_omp_for): Disallow ordered clause when combined with
3877 distribute. Disallow linear clause when combined with distribute
3878 and not combined with simd.
3879 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3880 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3881 parse clauses and if depend clause is found, don't parse a body.
3882 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3883 Allow target parallel without for after it.
3884 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3885 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3886 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3887 invalid kinds.
3888 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3889 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3890 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3891 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3892 functions.
3893 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3894 defaultmap and is_device_ptr clauses.
3895 (c_parser_omp_target): Parse target parallel and target simd. Set
3896 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3897 and target exit data. Diagnose invalid map kinds.
3898 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3899 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3900 construct.
3901 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3902 &omp_priv.
3903 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3904 (c_parser_omp_taskloop): New function.
3905 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3906 handle PRAGMA_OMP_TASKLOOP.
3907 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3908 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3909 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3910 Add IS_OMP argument, handle structure element bases, diagnose
3911 bitfields, pass IS_OMP recursively, diagnose known zero length
3912 array sections in depend clauses, handle array sections in reduction
3913 clause, diagnose negative length even for pointers.
3914 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3915 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3916 array sections in reduction clause, set
3917 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3918 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3919 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3920 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3921
21ba0cea
MP
39222015-10-06 Marek Polacek <polacek@redhat.com>
3923
3924 * c-parser.c (c_parser_statement_after_labels): Use
3925 protected_set_expr_location.
3926 (c_parser_omp_clause_num_gangs): Likewise.
3927 (c_parser_omp_clause_num_threads): Likewise.
3928 (c_parser_omp_clause_num_workers): Likewise.
3929 (c_parser_omp_clause_vector_length): Likewise.
3930 (c_parser_omp_clause_num_teams): Likewise.
3931 (c_parser_omp_clause_thread_limit): Likewise.
3932 * c-typeck.c (build_c_cast): Likewise.
3933 (c_cast_expr): Likewise.
3934
624d31fe
RS
39352015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3936
3937 * c-typeck.c (c_tree_equal): Use real_equal instead of
3938 REAL_VALUES_EQUAL.
3939
b8fd7909
JM
39402015-10-04 Jason Merrill <jason@redhat.com>
3941
3942 * c-parser.c (c_lex_one_token): Handle @synchronized.
3943 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3944 can change whether the function is transaction_safe.
3945
1c7485af
MP
39462015-10-02 Marek Polacek <polacek@redhat.com>
3947
3948 PR c/67730
3949 * c-typeck.c (convert_for_assignment): Use the expansion point
3950 location throughout.
3951
3e3b8d63
MP
39522015-10-02 Marek Polacek <polacek@redhat.com>
3953
3954 PR c/64249
3955 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3956 and pass it down to c_parser_if_statement.
3957 (c_parser_else_body): Add CHAIN parameter and pass it down to
3958 c_parser_statement_after_labels.
3959 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3960 duplicated if-else-if conditions.
3961
aabef2de
MP
39622015-10-01 Marek Polacek <polacek@redhat.com>
3963
3964 * c-typeck.c (convert_for_assignment): Improve commentary.
3965
de8ddd5f
MP
39662015-09-30 Marek Polacek <polacek@redhat.com>
3967
3968 PR c/67730
3969 * c-typeck.c (c_finish_return): Use the expansion point location for
3970 certain "return with value" warnings.
3971
c4914de6
MLI
39722015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3973
3974 * c-parser.c (pragma_lex): Add loc argument.
3975
0e36f5c7
MP
39762015-09-15 Marek Polacek <polacek@redhat.com>
3977
3978 PR c/67580
3979 * c-decl.c (tag_exists_p): New function.
3980 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3981 struct/union/enum keywords are missing.
3982 * c-tree.h (tag_exists_p): Declare.
3983
2f3bb934
MP
39842015-09-15 Marek Polacek <polacek@redhat.com>
3985
3986 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3987 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3988 Return NULL_TREE instead of 0.
3989 (lookup_name): Return NULL_TREE instead of 0.
3990 (lookup_name_in_scope): Likewise.
3991 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3992 (parser_xref_tag): Use false instead of 0.
3993 (start_struct): Use true instead of 1.
3994 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3995
aa256c4a
MP
39962015-09-14 Marek Polacek <polacek@redhat.com>
3997
3998 * c-typeck.c (set_nonincremental_init_from_string): Use
3999 HOST_WIDE_INT_M1U when shifting a negative value.
4000
dbb68221
MW
40012015-09-09 Mark Wielaard <mjw@redhat.com>
4002
4003 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4004 parm against NULL.
4005
a8a098ac
JJ
40062015-09-10 Jakub Jelinek <jakub@redhat.com>
4007
4008 PR c/67502
4009 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4010 into OMP_FOR_PRE_BODY rather than before the loop.
4011
f4b189d5
JJ
40122015-09-09 Jakub Jelinek <jakub@redhat.com>
4013
0bb99c11
JJ
4014 PR c/67501
4015 * c-parser.c (c_parser_oacc_all_clauses,
4016 c_parser_omp_all_clauses): Remove invalid clause from
4017 list of clauses even if parser->error is set.
4018
fce5e5e3
JJ
4019 PR c/67500
4020 * c-parser.c (c_parser_omp_clause_aligned,
4021 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4022 test for errors.
4023 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4024 error_mark_node.
4025
f4b189d5
JJ
4026 PR c/67495
4027 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4028 instead of c_parser_unary_expression. If the result is !lvalue_p,
4029 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4030
b2aaf235
MP
40312015-09-04 Marek Polacek <polacek@redhat.com>
4032
4033 PR sanitizer/67279
4034 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4035
1807ffc1
MS
40362015-09-03 Martin Sebor <msebor@redhat.com>
4037
4038 PR c/66516
8b652e65
JJ
4039 * c-typeck.c (convert_arguments, parser_build_unary_op,
4040 build_conditional_expr, c_cast_expr, convert_for_assignment,
4041 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4042 reject_gcc_builtin.
4043 (c_decl_implicit): Define.
4044
d04ff417
MP
40452015-09-02 Marek Polacek <polacek@redhat.com>
4046
4047 PR c/67432
4048 * c-parser.c (c_parser_enum_specifier): Give a better error for
4049 an empty enum.
4050
a79683d5
TS
40512015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4052
4053 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4054
191a6b94
MP
40552015-08-12 Marek Polacek <polacek@redhat.com>
4056
4057 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4058 LOC to it.
4059
420a9d9b
MP
40602015-08-03 Marek Polacek <polacek@redhat.com>
4061
4062 PR c/67088
4063 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4064 Use it.
4065 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4066
992118a1
PP
40672015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4068
4069 * c-parser.c (c_parser_if_body): Take token_indent_info
4070 argument. Call warn_for_misleading_indentation even when the
4071 body is a semicolon. Extract token_indent_infos corresponding
4072 to the guard, body and next tokens. Adjust call to
4073 warn_for_misleading_indentation accordingly.
4074 (c_parser_else_body): Likewise.
4075 (c_parser_if_statement): Likewise.
4076 (c_parser_while_statement): Likewise.
4077 (c_parser_for_statement): Likewise.
4078
46308474
LFSM
40792015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4080 Manuel López-Ibáñez <manu@gcc.gnu.org>
4081
4082 * c-decl.c (get_parm_info): Remove static var. Update warning
4083 message.
4084
05b28fd6
MP
40852015-07-27 Marek Polacek <polacek@redhat.com>
4086
4087 PR c++/66555
4088 PR c/54979
4089 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4090
451b5e48
MP
40912015-07-20 Marek Polacek <polacek@redhat.com>
4092
4093 PR c++/55095
4094 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4095 (build_binary_op): Warn about left shift overflows.
4096
1916bcb5
AM
40972015-07-09 Andrew MacLeod <amacleod@redhat.com>
4098
4099 * c-array-notation.c: Adjust includes for flags.h changes.
4100 * c-objc-common.c: Likewise.
4101
c7131fb2
AM
41022015-07-07 Andrew MacLeod <amacleod@redhat.com>
4103
4104 * c-array-notation.c: Adjust includes.
4105 * c-aux-info.c: Likewise.
4106 * c-convert.c: Likewise.
4107 * c-decl.c: Likewise.
4108 * c-errors.c: Likewise.
4109 * c-lang.c: Likewise.
4110 * c-objc-common.c: Likewise.
4111 * c-parser.c: Likewise.
4112 * c-typeck.c: Likewise.
4113
da2e71c9
MLI
41142015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4115
4116 PR fortran/66605
4117 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4118
b155cfd9
MP
41192015-06-29 Marek Polacek <polacek@redhat.com>
4120
4121 PR c/66322
4122 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4123 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4124 about -Wswitch-bool here.
4125 (do_case): Update c_add_case_label call.
4126 (c_finish_case): Update c_do_switch_warnings call.
4127
31521951
MP
41282015-06-27 Marek Polacek <polacek@redhat.com>
4129
4130 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4131
22d03525
MP
41322015-06-26 Marek Polacek <polacek@redhat.com>
4133
4134 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4135 INDIRECT_REF_P.
4136 * c-typeck.c (array_to_pointer_conversion): Likewise.
4137 (build_unary_op): Likewise.
4138 (c_finish_return): Likewise.
4139
f0889939
AM
41402015-06-25 Andrew MacLeod <amacleod@redhat.com>
4141
4142 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4143 * c-parser.c: Likewise.
4144
8d67ee55
RS
41452015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4146
4147 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4148 instead of pointer_hash.
4149 (detect_field_duplicates): Likewise.
4150
0ae9bd27
MP
41512015-06-25 Marek Polacek <polacek@redhat.com>
4152
4153 * c-array-notation.c: Use VAR_P throughout.
4154 * c-decl.c: Likewise.
4155 * c-objc-common.c: Likewise.
4156 * c-parser.c: Likewise.
4157 * c-typeck.c: Likewise.
4158
62f9079a
MP
41592015-06-25 Marek Polacek <polacek@redhat.com>
4160
4161 * c-decl.c: Use is_global_var throughout.
4162 * c-parser.c: Likewise.
4163 * c-typeck.c: Likewise.
4164
abb226c9
AM
41652015-06-17 Andrew MacLeod <amacleod@redhat.com>
4166
4167 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4168 * c-aux-info.c: Likewise.
4169 * c-convert.c: Likewise.
4170 * c-decl.c: Likewise.
4171 * c-errors.c: Likewise.
4172 * c-lang.c: Likewise.
4173 * c-objc-common.c: Likewise.
4174 * c-parser.c: Likewise.
4175 * c-typeck.c: Likewise.
4176
8cbababc
JH
41772015-06-11 Jan Hubicka <hubicka@ucw.cz>
4178
4179 PR middle-end/66325
4180 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4181 variants.
4182
a0349665
PMR
41832015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4184
4185 * c-decl.c (pop_scope): Register the main translation unit
4186 through the new debug hook.
4187
13fdf2e2
AM
41882015-06-08 Andrew MacLeod <amacleod@redhat.com>
4189
4190 * c-array-notation.c : Adjust include files.
4191 * c-aux-info.c : Likewise.
4192 * c-convert.c : Likewise.
4193 * c-decl.c : Likewise.
4194 * c-errors.c : Likewise.
4195 * c-lang.c : Likewise.
4196 * c-lang.h : Likewise.
4197 * c-objc-common.c : Likewise.
4198 * c-parser.c : Likewise.
4199 * c-typeck.c : Likewise.
4200
d7438551
AH
42012015-06-05 Aldy Hernandez <aldyh@redhat.com>
4202
4203 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4204 immediately clobber it.
4205 (c_write_global_declarations_1): Remove call to
4206 check_global_declaration_1.
4207 (c_write_global_declarations_2): Remove.
4208 (c_write_final_cleanups): Rename from c_write_global_declarations.
4209 Remove call to finalize_compilation_unit.
4210 Remove calls to debugging hooks.
4211 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4212 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4213 * c-tree.h: Remove c_write_global_declarations.
4214
ecb9f223
AM
42152015-06-04 Andrew MacLeod <amacleod@redhat.com>
4216
4217 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4218 * c-aux-info.c: Likewise.
4219 * c-convert.c: Likewise.
4220 * c-decl.c: Likewise.
4221 * c-errors.c: Likewise.
4222 * c-lang.c: Likewise.
4223 * c-objc-common.c: Likewise.
4224 * c-parser.c: Likewise.
4225 * c-typeck.c: Likewise.
4226
9482b620
MP
42272015-06-04 Marek Polacek <polacek@redhat.com>
4228
4229 PR c/66341
4230 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4231 it is a lvalue.
4232
bc51ace3
PK
42332015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4234
4235 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4236 Warn for empty struct.
4237 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4238
ea5b45b6
AT
42392015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4240
4241 * c-decl.c (start_function): Call plugin before parsing.
4242 (finish_function): Call plugin after parsing.
4243
c2d47482
PK
42442015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4245
4246 PR c/49551
4247 * c-decl.c (merge_decls): Merge DECL_COMMON.
4248
a95492ab
JW
42492015-05-22 Jim Wilson <jim.wilson@linaro.org>
4250
4251 * Make-lang.in (check_gcc_pallelize): Define.
4252
fd5c817a
MP
42532015-05-22 Marek Polacek <polacek@redhat.com>
4254
4255 PR c/47043
4256 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4257 attributes.
4258
c7b70a3c
MP
42592015-05-21 Marek Polacek <polacek@redhat.com>
4260
4261 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4262 DECL_BUILT_IN.
4263
21b634ae
MP
42642015-05-20 Marek Polacek <polacek@redhat.com>
4265
4266 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4267 * c-typeck.c: Likewise.
4268
296a8c2f
MP
42692015-05-19 Marek Polacek <polacek@redhat.com>
4270
4271 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4272
41b37d5e
JJ
42732015-05-19 Jakub Jelinek <jakub@redhat.com>
4274
4275 PR middle-end/66199
4276 * c-parser.c (c_parser_omp_for_loop): Don't add
4277 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4278 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4279 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4280 constructs.
4281
fab27f52
MM
42822015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4283
4284 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4285 swaps.
fab27f52 4286
40de31cf
MLI
42872015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4288
4289 PR fortran/44054
4290 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4291 accessor function.
4292
3aa3c9fc
MP
42932015-05-14 Marek Polacek <polacek@redhat.com>
4294
4295 PR c/66066
4296 PR c/66127
4297 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4298 rather than with 0.
4299
c3388e62
DM
43002015-05-12 David Malcolm <dmalcolm@redhat.com>
4301
4302 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4303 to add a call to warn_for_misleading_indentation.
4304 (c_parser_else_body): Likewise, adding param "else_loc".
4305 (c_parser_if_statement): Check for misleading indentation.
4306 (c_parser_while_statement): Likewise.
4307 (c_parser_for_statement): Likewise.
4308
755e528f
MP
43092015-05-08 Marek Polacek <polacek@redhat.com>
4310
4311 PR c/64918
4312 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4313 (output_init_element): Likewise.
4314
0173bd2a
MP
43152015-05-07 Marek Polacek <polacek@redhat.com>
4316
4317 PR c/65179
4318 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4319 value.
4320
9babc352
MP
43212015-04-30 Marek Polacek <polacek@redhat.com>
4322
4323 * c-typeck.c (set_init_label): Call error_at instead of error and
4324 pass LOC to it.
4325
ac9f18db
MP
4326 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4327 the type of a decl.
4328
ec3fba51
MP
4329 * c-typeck.c (c_build_va_arg): Clarify the error message.
4330
b811915d
TS
43312015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4332
4333 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4334 OMP_STANDALONE_CLAUSES.
4335
f3075008
MP
43362015-04-28 Marek Polacek <polacek@redhat.com>
4337
4338 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4339
4e81b788
MP
43402015-04-28 Marek Polacek <polacek@redhat.com>
4341
4342 PR c/65901
4343 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4344
6c1db78e
MP
43452015-04-25 Marek Polacek <polacek@redhat.com>
4346
4347 PR c/52085
4348 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4349 attribute.
4350
5c4abbb8
MP
43512015-04-23 Marek Polacek <polacek@redhat.com>
4352
4353 PR c/65345
4354 * c-decl.c (set_labels_context_r): New function.
4355 (store_parm_decls): Call it via walk_tree_without_duplicates.
4356 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4357 instead of create_tmp_var. Build TARGET_EXPR instead of
4358 COMPOUND_EXPR.
4359 (build_atomic_assign): Use create_tmp_var_raw instead of
4360 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4361
06aca1d5
IV
43622015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4363
4364 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4365 (c_parser_omp_target_update): Add missed %> to error_at ().
4366
8fba1830
BRF
43672015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4368
4369 PR target/55143
4370 * c-decl.c (c_default_pointer_mode): Remove definition.
4371 * c-tree.h (c_default_pointer_mode): Remove declaration.
4372
62021f64
TB
43732015-03-27 Tobias Burnus <burnus@net-b.de>
4374
4375 PR c/65586
4376 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4377 error out.
4378 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4379 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4380 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4381
9b65e171
JJ
43822015-03-19 Jakub Jelinek <jakub@redhat.com>
4383
4384 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4385 attribute for DECL_EXTERNAL VAR_DECLs.
4386
17958621
JJ
43872015-03-11 Jakub Jelinek <jakub@redhat.com>
4388
4389 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4390 argument.
4391
7ccb1a11
JJ
43922015-03-10 Jakub Jelinek <jakub@redhat.com>
4393
4394 PR c/65120
4395 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4396 before preparing arguments to warn_logical_not_parentheses.
4397
01177669
JJ
43982015-03-09 Jakub Jelinek <jakub@redhat.com>
4399
4400 PR c/65120
4401 * c-typeck.c (parser_build_binary_op): Don't warn for
4402 !!x == y or !b == y where b is _Bool.
4403
802ac282
MP
44042015-03-09 Marek Polacek <polacek@redhat.com>
4405
4406 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4407 * c-decl.c (grokdeclarator): Likewise.
4408 * c-typeck.c (build_binary_op): Likewise.
4409
e5165b60
MP
44102015-02-27 Marek Polacek <polacek@redhat.com>
4411
4412 PR c/65228
4413 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4414
065d214c
MP
44152015-02-14 Marek Polacek <polacek@redhat.com>
4416
4417 PR c/64768
4418 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4419 declared through a typedef name.
4420
e5d9235b
MP
44212015-02-13 Marek Polacek <polacek@redhat.com>
4422
4423 PR c/65050
4424 * c-decl.c (grokdeclarator): Print also the type when giving
4425 the error message about array's incomplete element type.
4426
fa01ffcc
JJ
44272015-02-11 Jakub Jelinek <jakub@redhat.com>
4428
4429 PR c/64824
4430 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4431 check in the POP macro.
4432
c3e38a03
MP
44332015-02-09 Marek Polacek <polacek@redhat.com>
4434
4435 PR c/64856
4436 * c-typeck.c (process_init_element): Don't always wrap
4437 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4438 initializing a range of elements.
4439
4886ec8e
JJ
44402015-02-04 Jakub Jelinek <jakub@redhat.com>
4441
4442 PR c/64824
4443 PR c/64868
4444 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4445
c3e38a03 44462015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4447
4448 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4449 processing enum declaration.
4450
7b33f0c8
MP
44512015-01-29 Marek Polacek <polacek@redhat.com>
4452
4453 PR c/64709
4454 * c-typeck.c (pop_init_level): If constructor_elements has
4455 exactly one element with integer_zerop value, set constructor_zeroinit
4456 to 1. Remove braces around warning_init call.
4457
dea63e49
JJ
44582015-01-27 Jakub Jelinek <jakub@redhat.com>
4459
4460 PR c/64766
4461 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4462 of FUNCTION_DECLs with error_mark_node.
4463
d38f7dce
JJ
44642015-01-26 Jakub Jelinek <jakub@redhat.com>
4465
4466 PR c/64778
4467 * c-typeck.c (convert_arguments): Return -1 if there are
4468 error_args, even if we've diagnosed too many arguments.
4469
cbf5d0e7
RB
44702015-01-21 Richard Biener <rguenther@suse.de>
4471
4472 PR middle-end/64313
4473 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4474 for builtins the user declared correctly.
4475
41dbbb37
TS
44762015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4477 Bernd Schmidt <bernds@codesourcery.com>
4478 Cesar Philippidis <cesar@codesourcery.com>
4479 James Norris <jnorris@codesourcery.com>
4480 Jakub Jelinek <jakub@redhat.com>
4481 Ilmir Usmanov <i.usmanov@samsung.com>
4482
4483 * c-parser.c: Include "gomp-constants.h".
4484 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4485 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4486 Use OMP_CLAUSE_SET_MAP_KIND.
4487 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4488 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4489 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4490 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4491 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4492 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4493 "copyout", "create", "delete", "deviceptr", "gang", "host",
4494 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4495 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4496 "present_or_create", "pcreate", "seq", "self", "vector",
4497 "vector_length", "wait", "worker".
4498 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4499 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4500 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4501 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4502 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4503 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4504 (c_parser_oacc_data_clause_deviceptr)
4505 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4506 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4507 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4508 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4509 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4510 (c_parser_oacc_parallel, c_parser_oacc_update)
4511 (c_parser_oacc_wait): New functions.
4512 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4513 (c_finish_oacc_data): New prototypes.
4514 * c-typeck.c: Include "gomp-constants.h".
4515 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4516 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4517 OMP_CLAUSE_SET_MAP_KIND.
4518 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4519 (c_finish_oacc_data): New functions.
4520 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4521 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4522 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4523 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4524 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4525 GOMP_MAP_FORCE_DEVICEPTR.
4526
adfac8df
JJ
45272015-01-09 Michael Collison <michael.collison@linaro.org>
4528
4529 * c-array-notation.c: Include hash-set.h, machmode.h,
4530 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4531 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4532 * c-aux-info.c: Ditto.
4533 * c-convert.c: Ditto.
4534 * c-decl.c: Ditto.
4535 * c-errors.c: Ditto.
4536 * c-lang.c: Dittoxs.
4537 * c-objc-common.c: Ditto.
4538 * c-parser.c: Ditto.
4539 * c-typeck.c: Include hash-set.h, machmode.h,
4540 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4541 fold-const.h, wide-int.h, inchash.h, real.h and
4542 fixed-value.h due to flattening of tree.h.
4543
2cc901dc
MP
45442015-01-07 Marek Polacek <polacek@redhat.com>
4545
4546 PR c/64417
4547 * c-typeck.c (process_init_element): Disallow initialization of
4548 a flexible array member with a string constant if the structure
4549 is in an array.
4550
5624e564
JJ
45512015-01-05 Jakub Jelinek <jakub@redhat.com>
4552
e5341100
JJ
4553 PR sanitizer/64344
4554 * c-typeck.c (convert_for_assignment, c_finish_return): For
4555 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4556 types also set in_late_binary_op around convert call.
4557 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4558 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4559 result on expr as last argument to ubsan_instrument_float_cast,
4560 if in_late_binary_op, don't use c_save_expr but save_expr.
4561
5624e564
JJ
4562 Update copyright years.
4563
5bd012f8
MP
45642015-01-05 Marek Polacek <polacek@redhat.com>
4565
4566 PR c/64423
4567 * c-typeck.c (build_array_ref): Pass loc down to
4568 warn_array_subscript_with_type_char.
4569
3f8257db 45702014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4571
4572 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4573 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4574 element type.
8e745a17 4575 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4576 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4577 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4578 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4579 to PEDWARN_FOR_QUALIFIERS.
768952be 4580
8f94a8c4
JJ
45812014-12-17 Jakub Jelinek <jakub@redhat.com>
4582
4583 PR sanitizer/64289
4584 * c-convert.c: Include ubsan.h.
4585 (convert): For real -> integral casts and
4586 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4587 instead instrument the float cast directly.
4588
b731b390
JJ
45892014-11-29 Jakub Jelinek <jakub@redhat.com>
4590
4591 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4592 c_finish_stmt_expr): Remove NULL last argument from
4593 create_tmp_var_raw and create_tmp_var calls.
4594 * c-array-notation.c (fix_builtin_array_notation_fn,
4595 build_array_notation_expr, fix_conditional_array_notations_1,
4596 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4597
541e35a6
MP
45982014-11-28 Marek Polacek <polacek@redhat.com>
4599
4600 PR c/63862
4601 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4602 convert the right operand to integer type.
4603
b286be94
MP
46042014-11-25 Marek Polacek <polacek@redhat.com>
4605
4606 PR c/63877
4607 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4608 for inline functions.
4609
aa7da51a
JJ
46102014-11-21 Jakub Jelinek <jakub@redhat.com>
4611
4612 PR target/63764
4613 * c-typeck.c (build_array_ref): Adjust
4614 convert_vector_to_pointer_for_subscript caller. If it returns true,
4615 call non_lvalue_loc on the result.
4616
d876207f
RB
46172014-11-11 Richard Biener <rguenther@suse.de>
4618
4619 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4620 to true.
4621
e5e44252
AK
46222014-11-10 Andi Kleen <ak@linux.intel.com>
4623
4624 PR c/60804
4625 * c-parser.c (c_parser_statement_after_labels): Call
4626 check_no_cilk.
4627 (c_parser_if_statement): Dito.
4628 (c_parser_switch_statement): Dito.
4629 (c_parser_while_statement): Dito.
4630 (c_parser_do_statement): Dito.
4631 (c_parser_for_statement): Dito.
4632 * c-typeck.c (c_finish_loop): Dito.
4633
13c21655
PC
46342014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4635
4636 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4637 OPT_Wshift_count_overflow in the warnings.
4638
2d51fcef
MP
46392014-10-30 Marek Polacek <polacek@redhat.com>
4640
4641 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4642 print the stripped version as well, if they're not the same.
4643
ef4bddc2
RS
46442014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4645
4646 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4647 machine_mode.
4648
c582198b
AM
46492014-10-28 Andrew MacLeod <amacleod@redhat.com>
4650
4651 * c-decl.c: Adjust include files.
4652 * c-parser.c: Ditto.
4653
ddc8de03
PM
46542014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4655 Tom Tromey <tromey@redhat.com>
4656
4657 * c-tree.h (enum c_oracle_request): New.
4658 (c_binding_oracle_function): New typedef.
4659 (c_binding_oracle, c_pushtag, c_bind): Declare.
4660 * c-decl.c (c_binding_oracle): New global.
4661 (I_SYMBOL_CHECKED): New macro.
4662 (i_symbol_binding): New function.
4663 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4664 (I_TAG_CHECKED): New macro.
4665 (i_tag_binding): New function.
4666 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4667 (I_LABEL_CHECKED): New macro.
4668 (i_label_binding): New function.
4669 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4670 (c_print_identifier): Save and restore c_binding_oracle.
4671 (c_pushtag, c_bind): New functions.
4672
60393bbc
AM
46732014-10-27 Andrew MacLeod <amacleod@redhat.com>
4674
4675 * c-typeck.c: Adjust include files.
4676
d723bb7c
MLI
46772014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4678
4679 PR c++/53061
4680 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4681 initialization here...
4682 (c_initialize_diagnostics): ... but here. Set defaults after
4683 building pretty-printer.
4684
1bc5a451
MP
46852014-10-23 Marek Polacek <polacek@redhat.com>
4686
4687 PR c/63626
4688 * c-decl.c (pop_scope): Don't print warning in external_scope.
4689
4435bb92
MP
46902014-10-19 Marek Polacek <polacek@redhat.com>
4691
4692 PR c/63567
4693 * c-typeck.c (output_init_element): Allow initializing objects with
4694 static storage duration with compound literals even in C99 and add
4695 pedwarn for it.
4696
7278465e
MP
46972014-10-17 Marek Polacek <polacek@redhat.com>
4698
4699 PR c/63567
4700 * c-typeck.c (digest_init): Allow initializing objects with static
4701 storage duration with compound literals even in C99 and add pedwarn
4702 for it.
4703
d9b7be2e
MP
47042014-10-17 Marek Polacek <polacek@redhat.com>
4705
4706 PR c/63543
4707 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4708 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4709 error multiple times. Print the type.
4710
f406ae1f
MP
47112014-10-17 Marek Polacek <polacek@redhat.com>
4712
4713 PR c/63549
4714 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4715 type.
4716
92574c7c
MP
47172014-10-17 Marek Polacek <polacek@redhat.com>
4718
4719 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4720 (start_function): Use OPT_Wimplicit_int instead of 0.
4721 (store_parm_decls_oldstyle): Likewise.
4722
1bc4a978
MT
47232014-10-17 Alan Modra <amodra@gmail.com>
4724
4725 PR middle-end/61848
4726 * c-decl.c (merge_decls): Don't merge section name or tls model
4727 to newdecl symtab node, instead merge to olddecl. Override
4728 existing olddecl section name. Set tls_model for all thread-local
4729 vars, not just OMP thread-private ones. Remove incorrect comment.
4730
83685514
AM
47312014-10-16 Andrew MacLeod <amacleod@redhat.com>
4732
4733 * c-decl.c: Adjust include files.
4734
78a7c317
DD
47352014-10-14 DJ Delorie <dj@redhat.com>
4736
4737 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4738 (c_token_starts_typename): Check all __intN, not just __int128.
4739 (c_token_starts_declspecs): Likewise.
4740 (c_parser_declspecs): Likewise.
4741 (c_parser_attribute_any_word): Likewise.
4742 (c_parser_objc_selector): Likewise.
4743 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4744 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4745 is specified.
4746 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4747 __int128.
4748 (finish_declspecs): Likewise.
4749
74d98c1e
AB
47502014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4751
8e745a17 4752 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4753 the duplicate code.
8e745a17 4754 (c_parser_statement): Call the new function.
74d98c1e 4755
84937de2
MP
47562014-10-09 Marek Polacek <polacek@redhat.com>
4757
4758 PR c/63480
4759 * c-typeck.c (pop_init_level): Don't warn about initializing
4760 with { }.
4761
0382aaa0
MP
47622014-10-07 Marek Polacek <polacek@redhat.com>
4763
4764 PR c/59717
4765 * c-decl.c (header_for_builtin_fn): New function.
4766 (implicitly_declare): Suggest which header to include.
4767
7a0ca710
MP
47682014-10-07 Marek Polacek <polacek@redhat.com>
4769
4770 * c-convert.c (convert): Use error_operand_p.
4771 * c-typeck.c (require_complete_type): Likewise.
4772 (really_atomic_lvalue): Likewise.
4773 (digest_init): Likewise.
4774 (handle_omp_array_sections_1): Likewise.
4775
6bc8a126
MP
47762014-10-03 Marek Polacek <polacek@redhat.com>
4777
4778 PR c/63453
4779 * c-decl.c (pop_scope): Don't warn about "inline function declared
4780 but never defined" for functions marked with gnu_inline attribute.
4781
d90c0a59
JJ
47822014-09-25 Jakub Jelinek <jakub@redhat.com>
4783
4784 PR c++/63249
4785 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4786 on low_bound and length.
4787
083e891e
MP
47882014-09-24 Marek Polacek <polacek@redhat.com>
4789
4790 PR c/61405
4791 PR c/53874
4792 * c-parser.c: Don't define CPP_KEYWORD.
4793 (c_parser_switch_statement): Pass original type to c_finish_case.
4794 * c-tree.h (c_finish_case): Update declaration.
4795 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4796 conditionally to c_do_switch_warnings.
4797
8d95fe25
MP
47982014-09-03 Marek Polacek <polacek@redhat.com>
4799
4800 PR c/62024
4801 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4802 conversions.
4803
9a771876
JJ
48042014-09-02 Jakub Jelinek <jakub@redhat.com>
4805 Balaji V. Iyer <balaji.v.iyer@intel.com>
4806 Igor Zamyatin <igor.zamyatin@intel.com>
4807
4808 * c-parser.c (c_parser_cilk_for): New function.
4809 (c_parser_cilk_grainsize): Likewise.
4810 (c_get_temp_regvar): Likewise.
4811 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4812 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4813 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4814 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4815 case.
4816
b7679d96
CG
48172014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4818
4819 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4820 with using HOST_WIDE_INT without truncation to 'int'
4821
59ea0364
MP
48222014-08-22 Marek Polacek <polacek@redhat.com>
4823
4824 PR c++/62199
4825 * c-typeck.c (parser_build_binary_op): Adjust call to
4826 warn_logical_not_parentheses.
4827
671a475e
IZ
48282014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4829
4830 PR other/62008
4831 * c-parser.c (c_parser_array_notation): Check for correct
4832 type of an array added.
4833
04159acf
MP
48342014-08-19 Marek Polacek <polacek@redhat.com>
4835
4836 PR c++/62153
4837 * c-typeck.c (build_binary_op): If either operand of a comparison
4838 is a boolean expression, call maybe_warn_bool_compare.
4839
c77935ee
PP
48402014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4841
4842 PR c/45584
4843 * c-typeck.c (build_c_cast): Do a conversion even when the
4844 TYPE_MAIN_VARIANTs are the same.
4845
35aff4fb
MP
48462014-08-19 Marek Polacek <polacek@redhat.com>
4847
4848 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4849 pedwarn_c99 instead of pedwarn.
4850 (grokfield): Likewise.
4851 (warn_defaults_to): New function.
4852 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4853 Unconditionally call pedwarn_c99 instead of pedwarn.
4854 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4855 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4856 check flag_isoc11 before.
4857 * c-errors.c (pedwarn_c99): Change the return type to bool.
4858 Handle -Wc99-c11-compat.
4859 * c-parser.c (disable_extension_diagnostics): Handle
4860 warn_c99_c11_compat.
4861 (restore_extension_diagnostics): Likewise.
4862 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4863 instead of pedwarn, don't check flag_isoc11 before.
4864 (c_parser_declspecs): Likewise.
4865 (c_parser_alignas_specifier): Likewise.
4866 (c_parser_alignof_expression): Likewise.
4867 (c_parser_generic_selection): Likewise.
4868 * c-tree.h (pedwarn_c99): Update declaration.
4869 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4870 of pedwarn_c99.
4871
177cce46
MP
48722014-08-19 Marek Polacek <polacek@redhat.com>
4873
4874 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4875 to pedwarn_c90.
4876 * c-errors.c: Include "opts.h".
4877 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4878 * c-parser.c (disable_extension_diagnostics): Handle negative value
4879 of warn_c90_c99_compat, too.
4880 (restore_extension_diagnostics): Likewise.
4881 (c_parser_compound_statement_nostart): Pass
4882 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4883
6dc99c33
MP
48842014-08-12 Marek Polacek <polacek@redhat.com>
4885
4886 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4887 Add pedwarn.
4888 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4889 Likewise.
4890 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4891
3f8257db 48922014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4893
4894 PR c/51849
4895 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4896 Call pedwarn_c90 instead of pedwarn.
4897 (check_bitfield_type_and_width): Likewise.
4898 (declspecs_add_qual): Likewise.
4899 (declspecs_add_type): Likewise.
4900 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4901 Adjust to only call pedwarn_c90.
4902 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4903 pedwarn_c90 instead of pedwarn.
4904 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4905 * c-parser.c (disable_extension_diagnostics): Handle
4906 warn_c90_c99_compat.
4907 (restore_extension_diagnostics): Likewise.
4908 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4909 pedwarn_c90 instead of pedwarn.
4910 (c_parser_initelt): Likewise.
4911 (c_parser_postfix_expression): Likewise.
4912 (c_parser_postfix_expression_after_paren_type): Likewise.
4913 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4914 * c-tree.h: Fix formatting.
4915 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4916 pedwarn_c90 instead of pedwarn.
4917
9f25a338
TS
49182014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4919
4920 * c-typeck.c: Remove include of pointer-set.h.
4921
044331a8
MP
49222014-08-07 Marek Polacek <polacek@redhat.com>
4923
4924 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4925
b787e7a2
TS
49262014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4927
4928 * c-typeck.c: Use hash_map instead of pointer_map.
4929
6e2830c3
TS
49302014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4931
4932 * c-decl.c: Use hash_set instead of pointer_set.
4933
a7ee52fb
IZ
49342014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4935
4936 PR middle-end/61455
4937 * c-array-notation.c (expand_array_notations): Handling
4938 of DECL_EXPR added.
4939
b4dfdc11
MG
49402014-07-31 Marc Glisse <marc.glisse@inria.fr>
4941
4942 PR c++/60517
4943 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4944 a local variable.
4945
976d5a22
TT
49462014-07-30 Tom Tromey <tromey@redhat.com>
4947
4948 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4949 field.
4950 (really_start_incremental_init, push_init_level): Initialize
4951 designator_depth.
4952 (pop_init_level): Set global designator_depth.
4953 (process_init_element): Check for designated_init attribute.
4954
30281de2
MP
49552014-07-20 Marek Polacek <polacek@redhat.com>
4956
4957 PR c/61852
4958 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4959 (implicitly_declare): Pass location to implicit_decl_warning.
4960
b108f48f
JJ
49612014-07-14 Jakub Jelinek <jakub@redhat.com>
4962
4963 PR middle-end/61294
4964 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4965 If non-NULL, call c_parser_check_literal_zero.
4966 (c_parser_check_literal_zero): New function.
4967 (c_parser_postfix_expression_after_primary): Adjust
4968 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4969
773ec47f
MP
49702014-07-06 Marek Polacek <polacek@redhat.com>
4971
4972 PR c/6940
4973 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4974 * c-tree.h (C_ARRAY_PARAMETER): Define.
4975 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4976 function parameter.
4977
22e1cf1c 49782014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 4979 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
4980
4981 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4982 releasing symbol.
4983
52ec0ea3
MP
49842014-07-01 Marek Polacek <polacek@redhat.com>
4985
4986 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4987 instead of 0 to WARN_FOR_ASSIGNMENT.
4988
d5c3d343
MP
49892014-07-01 Marek Polacek <polacek@redhat.com>
4990
4991 PR c/58286
4992 * c-typeck.c (convert_for_assignment): Pass
4993 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4994
6a7253a4
MP
49952014-06-30 Marek Polacek <polacek@redhat.com>
4996
4997 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4998 has no_sanitize_undefined attribute.
4999
5e88a8f4
IZ
50002014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5001
5002 PR middle-end/57541
5003 * c-array-notation.c (fix_builtin_array_notation_fn):
5004 Check for 0 arguments in builtin call. Check that bultin argument is
5005 correct.
5006 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5007 index.
5008
9698b078
SH
50092014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5010
5011 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5012 qualifiers in __auto_type for atomic types.
5013 (c_parser_typeof_specifier): Discard all type qualifiers in
5014 __typeof__ for atomic types.
5015
6e07c515
MP
50162014-06-25 Marek Polacek <polacek@redhat.com>
5017
5018 PR c/61162
5019 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5020 the return expression to c_finish_return.
5021
da6f124d
JJ
50222014-06-25 Jakub Jelinek <jakub@redhat.com>
5023
5024 * c-typeck.c (c_finish_omp_clauses): Make sure
5025 OMP_CLAUSE_LINEAR_STEP has correct type.
5026
c203e8a7
TS
50272014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5028
5029 * c-decl.c: Adjust.
5030
56ad0e38
JJ
50312014-06-24 Jakub Jelinek <jakub@redhat.com>
5032
5033 * c-parser.c (c_parser_omp_for_loop): For
5034 #pragma omp parallel for simd move lastprivate clause from parallel
5035 to for rather than simd.
5036
47c2554f
MP
50372014-06-23 Marek Polacek <polacek@redhat.com>
5038
5039 * c-typeck.c (parser_build_binary_op): Don't call
5040 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5041
56363ffd
JH
50422014-06-15 Jan Hubicka <hubicka@ucw.cz>
5043
5044 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5045 * c-decl.c (merge_decls): Likewise.
5046
d7ff7ae5
MP
50472014-06-09 Marek Polacek <polacek@redhat.com>
5048
5049 PR c/36446
5050 * c-typeck.c (error_init): Call inform instead of error_at.
5051 (pedwarn_init): Call inform instead of pedwarn.
5052 (warning_init): Call inform instead of warning_at.
5053
24d047a3
JH
50542014-06-07 Jan Hubicka <hubicka@ucw.cz>
5055
5056 * c-decl.c (merge_decls): Use set_decl_section_name.
5057 (duplicate_decls): Remove node if it exists.
5058
9bac5cbb
G
50592014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5060
5061 PR c/53119
5062 * c-typeck.c (push_init_level, process_init_element,
5063 pop_init_level): Correct check for zero initialization, move
5064 missing brace warning to respect zero initialization.
5065
8ffcdea8
MP
50662014-06-05 Marek Polacek <polacek@redhat.com>
5067
5068 PR c/56724
5069 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5070
742938c9
MP
50712014-06-05 Marek Polacek <polacek@redhat.com>
5072
5073 PR c/49706
5074 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5075 on the left hand side operand of a comparison.
742938c9 5076
6447c55d
MP
50772014-06-05 Marek Polacek <polacek@redhat.com>
5078
5079 PR c/48062
5080 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5081 Print note only if the warning was printed.
5082
9dc7743c
IZ
50832014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5084
5085 PR c/58942
5086 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5087 with a pointer.
5088
fedfecef
MP
50892014-06-03 Marek Polacek <polacek@redhat.com>
5090
5091 PR c/60439
5092 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5093 c_start_case.
5094 * c-tree.h (c_start_case): Update.
5095 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5096 switch condition has boolean value.
5097
9b2b7279
AM
50982014-06-02 Andrew MacLeod <amacleod@redhat.com>
5099
5100 * c-decl.c: Include builtins.h.
5101 * c-parser.c: Likewise.
5102
5c1bc275
MP
51032014-05-27 Marek Polacek <polacek@redhat.com>
5104
5105 PR c/56724
5106 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5107 error and warning calls to error_at and warning_at. Pass location of
5108 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5109 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5110 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5111
97563bc8
IZ
51122014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5113
5114 PR c/61191
5115 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5116 function parameters.
5117
aede2c10
JH
51182014-05-23 Jan Hubicka <hubicka@ucw.cz>
5119
5120 * c-decl.c (merge_decls): Preserve symtab node pointers.
5121 (duplicate_decls): Free new decl.
5122
edbba2ce
TS
51232014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5124
f3316c6d
TS
5125 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5126 initialization.
5127
edbba2ce
TS
5128 * c-parser.c (c_parser_omp_target): Return bool values.
5129
68c81f24
TS
51302014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5131
5132 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5133 num_teams_loc variable to num_thread_limit_loc.
5134
632f2871
RS
51352014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5136
5137 * c-array-notation.c (expand_array_notations): Use void_node
5138 instead of void_zero_node.
5139
766090c2
TS
51402014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5141
5142 * c-decl.c (finish_struct): Adjust.
5143 (finish_enum): Likewise.
5144 (bind): Adjust.
5145 (record_inline_static): Likewise.
5146 (push_scope): Likewise.
5147 (make_label): Likewise.
5148 (lookup_label_for_goto): Likewise.
5149 (finish_struct): Likewise.
5150 (finish_enum): Likewise.
5151 (store_parm_decls): Likewise.
5152 (c_push_function_context): Likewise.
5153 * c-lang.h: Remove usage of variable_size gty attribute.
5154 * c-parser.c (c_parse_init): Adjust.
5155 (c_parse_file): Likewise.
5156
2b107f6b
MP
51572014-05-13 Marek Polacek <polacek@redhat.com>
5158
5159 PR c/61162
5160 * c-typeck.c (convert_for_assignment): Pass location to
5161 WARN_FOR_ASSIGNMENT instead of input_location.
5162
d033409e
MP
51632014-05-10 Marek Polacek <polacek@redhat.com>
5164
5165 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5166 maybe_warn_string_init.
5167 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5168 maybe_warn_string_init.
5169 * c-tree.h (maybe_warn_string_init): Update declaration.
5170 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5171 Call pedwarn_init with loc instead of with input_location.
5172 (digest_init): Pass init_loc to maybe_warn_string_init.
5173 (pop_init_level): Call pedwarn_init with loc instead of with
5174 input_location.
5175 (set_init_index): Likewise.
5176 (process_init_element): Likewise.
5177
ea58ef42
MP
51782014-05-09 Marek Polacek <polacek@redhat.com>
5179
5180 PR c/61096
5181 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5182 (c_parser_initelt): Pass location to set_init_label. Pass array index
5183 location to set_init_index.
5184 * c-tree.h (push_init_level): Update declaration.
5185 (pop_init_level): Likewise.
5186 (set_init_index): Likewise.
5187 (set_init_label): Likewise.
5188 * c-typeck.c (error_init): Add location parameter. Call error_at
5189 instead of error.
5190 (digest_init): Pass init_loc to error_init.
5191 (really_start_incremental_init):
5192 (push_init_level): Add location parameter. Pass loc to pop_init_level
5193 and error_init.
5194 (pop_init_level): Likewise.
5195 (set_designator): Add location parameter. Pass loc to pop_init_level,
5196 push_init_level, and error_init.
5197 (set_init_index): Add location parameter. Pass loc to error_init and
5198 set_designator.
5199 (set_init_label): Likewise.
5200 (output_init_element): Pass loc to error_init.
5201 (process_init_element): Pass loc to error_init, pop_init_level,
5202 pedwarn_init, and push_init_level.
5203
661a0813
MP
52042014-05-09 Marek Polacek <polacek@redhat.com>
5205
5206 PR c/50459
5207 * c-parser.c (c_parser_attributes): Parse the arguments as an
5208 expression-list if the attribute takes identifier.
5209
2793eeab
MP
52102014-05-08 Marek Polacek <polacek@redhat.com>
5211
5212 PR c/61053
5213 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5214 TYPE_ALIGN_UNIT.
5215
f827930a
MP
52162014-05-08 Marek Polacek <polacek@redhat.com>
5217
5218 PR c/61077
5219 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5220 of main.
5221
1d60af08
KZ
52222014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5223 Mike Stump <mikestump@comcast.net>
5224 Richard Sandiford <rdsandiford@googlemail.com>
5225
5226 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5227 (finish_enum): Use wide-int interfaces.
5228 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5229 * c-typeck.c (build_c_cast): Likewise.
5230 (set_nonincremental_init_from_string): Likewise.
5231 (c_tree_equal): Likewise.
5232
a0e24419
MP
52332014-05-02 Marek Polacek <polacek@redhat.com>
5234
5235 PR c/25801
5236 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5237 Return size_one_node when the type is not complete.
5238 (pointer_diff): Remove comment.
5239 (build_unary_op): Improve error messages.
5240
19fc9faa
MP
52412014-05-02 Marek Polacek <polacek@redhat.com>
5242
5243 * c-typeck.c (c_finish_return): Separate warning_at calls.
5244
63bc4e87
MP
52452014-05-02 Marek Polacek <polacek@redhat.com>
5246
5247 * c-tree.h (error_init): Remove declaration.
5248 (pedwarn_init): Likewise.
5249 * c-typeck.c (error_init): Make static and move above.
5250 (pedwarn_init): Likewise.
5251 (warning_init): Move above.
5252 (maybe_warn_string_init): Likewise.
5253
4bd2511b
JL
52542014-05-01 Jeff Law <law@redhat.com>
5255
5256 Revert:
5257
5258 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5259 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5260 avoid goto.
5261
6a358dcb
MP
52622014-05-02 Marek Polacek <polacek@redhat.com>
5263
5264 PR c/60784
5265 * c-typeck.c (push_init_level): Set constructor_designated to
5266 p->designated for structures.
5267
ae5ebda4
MP
52682014-05-01 Marek Polacek <polacek@redhat.com>
5269
5270 PR c/60915
5271 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5272 function-definition has an attribute after the declarator.
5273
96b40f8d
MP
52742014-05-01 Marek Polacek <polacek@redhat.com>
5275
5276 PR c/60257
5277 * c-typeck.c (warning_init): Add location_t parameter. Call
5278 warning_at instead of warning.
5279 (push_init_level): Pass input_location to warning_init.
5280 (add_pending_init): Add location_t parameter. Pass loc to
5281 warning_init.
5282 (set_nonincremental_init): Pass input_location to add_pending_init.
5283 (set_nonincremental_init_from_string): Likewise.
5284 (output_init_element): Pass loc to warning_init and to
5285 add_pending_init.
5286
32e00768
MP
52872014-05-01 Marek Polacek <polacek@redhat.com>
5288
5289 PR c/43395
5290 * c-typeck.c (c_finish_return): Distinguish between label and variable
5291 when warning about returning local address.
5292
c9379ce2
MP
52932014-05-01 Marek Polacek <polacek@redhat.com>
5294
5295 PR c/29467
5296 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5297 in C89 mode.
5298
d00887e8
MP
52992014-05-01 Marek Polacek <polacek@redhat.com>
5300
5301 PR c/43245
5302 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5303 instead of 0 to WARN_FOR_QUALIFIERS.
5304
5436fa2e
MP
53052014-05-01 Marek Polacek <polacek@redhat.com>
5306
5307 PR c/56989
5308 * c-typeck.c (default_conversion): Use better location for
5309 error call.
5310
f8ed5150
MP
53112014-04-30 Marek Polacek <polacek@redhat.com>
5312
5313 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5314 also when SANITIZE_FLOAT_DIVIDE is on.
5315
8337d1db
MP
53162014-04-30 Marek Polacek <polacek@redhat.com>
5317
5318 PR c/60139
5319 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5320 and pedwarn_init. Use loc insted of input_location.
5321
c4bdc42f
MP
53222014-04-30 Marek Polacek <polacek@redhat.com>
5323
5324 PR c/60351
5325 * c-typeck.c (build_binary_op): Use location when warning about
5326 shift count.
5327
45484dcf
MP
53282014-04-25 Marek Polacek <polacek@redhat.com>
5329
5330 PR c/18079
5331 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5332 always_inline/noinline and hot/cold attributes.
5333
34cf811f
MP
53342014-04-25 Marek Polacek <polacek@redhat.com>
5335
5336 PR c/60114
5337 * c-parser.c (c_parser_initelt): Pass input_location to
5338 process_init_element.
5339 (c_parser_initval): Pass loc to process_init_element.
5340 * c-tree.h (process_init_element): Adjust declaration.
5341 * c-typeck.c (push_init_level): Pass input_location to
5342 process_init_element.
5343 (pop_init_level): Likewise.
5344 (set_designator): Likewise.
5345 (output_init_element): Add location_t parameter. Pass loc to
5346 digest_init.
5347 (output_pending_init_elements): Pass input_location to
5348 output_init_element.
5349 (process_init_element): Add location_t parameter. Pass loc to
5350 output_init_element.
5351
42056eac
JJ
53522014-04-24 Jakub Jelinek <jakub@redhat.com>
5353
5354 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5355 atomic-clause, allow comma in between atomic-clause and
5356 seq_cst.
5357
e162a134
JJ
53582014-04-22 Jakub Jelinek <jakub@redhat.com>
5359
5360 PR c/59073
5361 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5362 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5363
2f6babac
IZ
53642014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5365
5366 PR middle-end/60469
5367 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5368 create_tmp_var instead build_decl for creating temps.
5369 (build_array_notation_expr): Likewise.
5370 (fix_conditional_array_notations_1): Likewise.
5371 (fix_array_notation_expr): Likewise.
5372 (fix_array_notation_call_expr): Likewise.
5373
8edbfaa6
JJ
53742014-03-28 Jakub Jelinek <jakub@redhat.com>
5375
5376 PR c++/60689
5377 * c-tree.h (c_build_function_call_vec): New prototype.
5378 * c-typeck.c (build_function_call_vec): Don't call
5379 resolve_overloaded_builtin here.
5380 (c_build_function_call_vec): New wrapper function around
5381 build_function_call_vec. Call resolve_overloaded_builtin here.
5382 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5383 Call c_build_function_call_vec instead of build_function_call_vec.
5384 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5385 * c-decl.c (finish_decl): Likewise.
5386
7485aeea
MLI
53872014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5388
5389 PR c/55383
5390 * c-typeck.c: Use correct format string in cast-qual warning
5391
b17a8b07
TS
53922014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5393
5394 * c-decl.c (c_decl_attributes): Use
5395 lang_hooks.types.omp_mappable_type.
5396 * c-typeck.c (c_finish_omp_clauses): Likewise.
5397
3af9c5e9
MP
53982014-03-06 Marek Polacek <polacek@redhat.com>
5399
5400 PR c/60197
5401 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5402 of checking tree code.
5403
1c9f5f33
PK
54042014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5405
5406 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5407 (c_parser_parameter_declaration): Likewise.
5408
cc28fc7f
MP
54092014-02-19 Marek Polacek <polacek@redhat.com>
5410
5411 PR c/60195
5412 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5413 Call mark_exp_read on exp.value.
5414 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5415 TREE_ADDRESSABLE on old instead of val.
5416 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5417
b581c05c
PK
54182014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5419
5420 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5421 C_EXPR_APPEND by vec_safe_push.
5422 * c-tree.h (C_EXPR_APPEND): Remove.
5423
81e5eca8
MP
54242014-01-31 Marek Polacek <polacek@redhat.com>
5425
5426 PR c/59963
5427 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5428 build_function_call_vec.
5429 (build_function_call): Likewise.
5430 (build_atomic_assign): Likewise.
5431 (build_function_call_vec): Add arg_loc parameter. Use it.
5432 (convert_arguments): Likewise.
5433 (convert_for_assignment): Rename rhs_loc to expr_loc.
5434 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5435 (c_parser_objc_keywordexpr): Likewise.
5436 (c_parser_postfix_expression_after_primary): Call
5437 build_function_call_vec with expr_loc rather than op_loc.
5438 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5439 build_function_call_vec.
5440 (c_parser_expr_list): Add locations parameter. Fill it with locations
5441 of function arguments.
5442 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5443
68fca595
MP
54442014-01-30 Marek Polacek <polacek@redhat.com>
5445
5446 PR c/59940
5447 * c-typeck.c (build_function_call_vec): Use loc parameter.
5448 (convert_arguments): Add location parameter. Use it.
5449 (ep_convert_and_check): Likewise.
5450 (build_atomic_assign): Adjust convert_for_assignment call.
5451 (build_modify_expr): Likewise.
5452 (digest_init): Likewise.
5453 (c_finish_return): Likewise.
5454 (build_conditional_expr): Adjust ep_convert_and_check calls.
5455 (convert_for_assignment): Add rhs_loc parameter. Use it.
5456 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5457 calls.
5458
fa337f3a
RB
54592014-01-30 Richard Biener <rguenther@suse.de>
5460
5461 PR c/59905
5462 * c-typeck.c (build_function_call_vec): Do not replace calls
5463 to a function via an incompatible type with a runtime abort.
5464
b72271b9
BI
54652014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5466
5467 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5468 flag_enable_cilkplus with flag_cilkplus.
5469 (c_parser_direct_declarator_inner): Likewise.
5470 (c_parser_attribute_any_word): Likewise.
5471 (c_parser_attributes): Likewise.
5472 (c_parser_compound_statement): Likewise.
5473 (c_parser_statement_after_labels): Likewise.
5474 (c_parser_if_statement): Likewise.
5475 (c_parser_switch_statement): Likewise.
5476 (c_parser_do_statement): Likewise.
5477 (c_parser_for_statement): Likewise.
5478 (c_parser_unary_expression): Likewise.
5479 (c_parser_postfix_expression): Likewise.
5480 (c_parser_postfix_expression_after_primary): Likewise.
5481 (c_parser_postfix_expression_after_primary): Likewise.
5482 (c_parser_omp_clause_name): Likewise.
5483 (c_finish_omp_declare_simd): Likewise.
5484 (c_parser_cilk_verify_simd): Likewise.
5485 * c-typeck.c (build_array_ref): Likewise.
5486 (build_function_call_vec): Likewise.
5487 (convert_arguments): Likewise.
5488 (build_compound_expr): Likewise.
5489 (c_finish_return): Likewise.
5490 (c_finish_if_stmt): Likewise.
5491 (c_finish_loop): Likewise.
5492 (build_binary_op): Likewise.
5493
393e8e8b
MP
54942014-01-23 Marek Polacek <polacek@redhat.com>
5495
5496 PR c/59846
5497 * c-typeck.c (parser_build_binary_op): Use location instead of
5498 input_location.
5499 (build_binary_op): Pass location to shorten_compare.
5500
f04dda30
MP
55012014-01-23 Marek Polacek <polacek@redhat.com>
5502
5503 PR c/58346
5504 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5505 an empty aggregate.
5506
789eadcd
MP
55072014-01-23 Marek Polacek <polacek@redhat.com>
5508
5509 PR c/59871
5510 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5511 of a comma expression.
5512 (emit_side_effect_warnings): Likewise.
5513
40f14e9f
BI
55142014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5515
5516 PR c/59825
5517 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5518 function to use walk_tree and moved a lot of its functionality to
5519 expand_array_notations.
5520 (expand_array_notations): New function.
5521
74558dd9
BI
55222014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5523
5524 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5525 attribute an attribute without value.
5526
652fea39
JJ
55272014-01-23 Jakub Jelinek <jakub@redhat.com>
5528
5529 PR middle-end/58809
5530 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5531 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5532
f34f1c87
MP
55332014-01-22 Marek Polacek <polacek@redhat.com>
5534
5535 PR c/59891
5536 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5537 of remove_c_maybe_const_expr on op1 and op2.
5538
241f845a
JJ
55392014-01-15 Jakub Jelinek <jakub@redhat.com>
5540
5541 PR c/58943
5542 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5543 effects, preevaluate rhs using SAVE_EXPR first.
5544
9a74f20c
BI
55452014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5546
5547 PR c++/59631
5548 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5549 statements with if-elseif statements.
5550
96066ce1
MP
55512014-01-06 Marek Polacek <polacek@redhat.com>
5552
5553 PR c/57773
5554 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5555 defined bit-field types only in ISO C.
5556
23a5b65a
RS
55572014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5558
5559 Update copyright years
5560
f9030485
RS
55612014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5562
5563 * c-array-notation.c: Use the standard form for the copyright notice.
5564
41958c28
BI
55652013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5566
5567 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5568 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5569 field in parser is not empty. If not-empty, call the function
5570 c_parser_finish_omp_declare_simd.
5571 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5572 between SIMD-enabled functions and #pragma simd. Added new parameter.
5573 (c_parser_cilk_all_clauses): Modified the usage of the function
5574 c_parser_cilk_clause_vectorlength as mentioned above.
5575 (c_parser_cilk_simd_fn_vector_attrs): New function.
5576 (c_finish_cilk_simd_fn_tokens): Likewise.
5577 (is_cilkplus_vector_p): Likewise.
5578 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5579 "nomask," and "mask" strings in clause name.
5580 (c_parser_omp_all_clauses): Added 3 new case statements:
5581 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5582 PRAGMA_CILK_CLAUSE_NOMASK.
5583 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5584 check for vector attribute and if so call the function
5585 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5586 called the function c_finish_cilk_simd_fn_tokens.
5587 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5588 parser field is non-empty. If so, parse them as you would parse
5589 the omp declare simd pragma.
5590 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5591 Added a check when step is a parameter and flag it as error.
5592 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5593 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5594 pragma_omp_clause.
5595
cef0fd0e
TS
55962013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5597
5598 * c-parser.c (c_parser_omp_parallel): Fix description.
5599
12893402
BI
56002013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5601
5602 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5603 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5604 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5605 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5606
296674db
JM
56072013-12-04 Joseph Myers <joseph@codesourcery.com>
5608
5609 PR c/52023
5610 * c-parser.c (c_parser_alignas_specifier): Use
5611 c_sizeof_or_alignof_type instead of c_alignof.
5612 (c_parser_alignof_expression): Likewise, with min_alignof
5613 parameter depending on alignof spelling used.
5614
edd28054
MP
56152013-12-04 Marek Polacek <polacek@redhat.com>
5616
5617 PR c/54113
5618 * c-decl.c (start_function): Don't warn for missing prototype for
5619 inline functions.
5620
da0fc454
MP
56212013-12-03 Marek Polacek <polacek@redhat.com>
5622
5623 PR c/59351
5624 * c-decl.c (build_compound_literal): Allow compound literals with
5625 empty initial value.
5626
4c2ecab0
JM
56272013-12-02 Joseph Myers <joseph@codesourcery.com>
5628
5629 PR c/58235
5630 * c-typeck.c (build_modify_expr): Diagnose assignment to
5631 expression with array type.
5632
340baef7
JM
56332013-11-29 Joseph Myers <joseph@codesourcery.com>
5634
5635 PR c/42262
5636 * c-typeck.c (process_init_element): Do not treat a string as
5637 initializing a whole array when used with a designator for an
5638 individual element.
5639
6763b9f7
JM
56402013-11-29 Joseph Myers <joseph@codesourcery.com>
5641
5642 PR c/57574
5643 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5644 an inline function following a static declaration.
5645
e7bd1de1
JJ
56462013-11-28 Jakub Jelinek <jakub@redhat.com>
5647
5648 PR c/59310
5649 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5650 to p_name before calling c_parser_omp_teams instead of after.
5651 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5652 argument. Remove unused p_name variable.
5653
0136f8f0
AH
56542013-11-27 Aldy Hernandez <aldyh@redhat.com>
5655 Jakub Jelinek <jakub@redhat.com>
5656
5657 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5658 external_scope is NULL.
5659
241b71bb
TV
56602013-11-27 Tom de Vries <tom@codesourcery.com>
5661 Marc Glisse <marc.glisse@inria.fr>
5662
5663 PR c++/59032
5664 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5665
2fb9a547
AM
56662013-11-22 Andrew MacLeod <amacleod@redhat.com>
5667
5668 * c-typeck.c: Add required include files from gimple.h.
5669
8400e75e
DM
56702013-11-22 David Malcolm <dmalcolm@redhat.com>
5671
5672 * c-decl.c (define_label, shadow_tag_warned)
5673 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5674 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5675 (declspecs_add_type): Remove use of in_system_header macro.
5676 * c-parser.c (c_parser_unary_expression): Likewise.
5677 * c-typeck.c (store_init_value, process_init_element)
5678 (c_start_case): Likewise.
5679
5680 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5681 macro.
5682
5683 * c-parser.c (c_parser_set_source_position_from_token): Remove
5684 reference to in_system_header from comment.
5685
386b1f1f
RS
56862013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5687
5688 * c-decl.c (grokdeclarator): Update comment to refer to
5689 tree_to_[su]hwi rather than tree_low_cst.
5690
ae7e9ddd
RS
56912013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5692
5693 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5694 tree_to_uhwi throughout.
5695
9439e9a1
RS
56962013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5697
5698 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5699 throughout.
5700
9541ffee
RS
57012013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5702
5703 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5704 throughout.
5705
c02065fc
AH
57062013-11-15 Aldy Hernandez <aldyh@redhat.com>
5707
5708 * c-parser.c (c_parser_cilk_simd): New.
5709 (c_parser_cilk_verify_simd): New.
5710 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5711 (c_parser_omp_for_loop): Add case for NE_EXPR.
5712 Set c_break_label for CILK_SIMD.
5713 (c_parser_cilk_clause_vectorlength): New.
5714 (c_parser_cilk_clause_linear): New.
5715 (c_parser_cilk_clause_name): New.
5716 (c_parser_cilk_all_clauses): New.
5717 * c-typeck.c (build_unary_op): Pass location argument to
5718 readonly_error.
5719 (build_modify_expr): Same.
5720 (build_asm_expr): Same.
5721 (c_finish_bc_stmt): Error on break/continue in loops.
5722
18f429e2
AM
57232013-11-14 Andrew MacLeod <amacleod@redhat.com>
5724
5725 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5726
d8a2d370
DN
57272013-11-14 Diego Novillo <dnovillo@google.com>
5728
5729 * c-decl.c: Include print-tree.h.
5730 Include stor-layout.h.
5731 Include varasm.h.
5732 Include attribs.h.
5733 Include stringpool.h.
5734 * c-lang.c: Include fold-const.h.
5735 * c-parser.c: Include stringpool.h.
5736 Include attribs.h.
5737 Include stor-layout.h.
5738 Include varasm.h.
5739 Include trans-mem.h.
5740 * c-typeck.c: Include stor-layout.h.
5741 Include trans-mem.h.
5742 Include varasm.h.
5743 Include stmt.h.
5744
38b7bc7f
JM
57452013-11-13 Joseph Myers <joseph@codesourcery.com>
5746
5747 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5748 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5749 __auto_type.
5750 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5751 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5752 RID_AUTO_TYPE.
5753 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5754 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5755 (c_parser_declarator, c_parser_direct_declarator_inner)
5756 (c_parser_parameter_declaration, c_parser_type_name): All callers
5757 changed.
5758 (c_parser_declaration_or_fndef): Handle declarations with type
5759 determined from the initializer.
5760
45b0be94
AM
57612013-11-12 Andrew MacLeod <amacleod@redhat.com>
5762
18f429e2 5763 * c-typeck.c: Include gimplify.h.
45b0be94 5764
582d9b50
JM
57652013-11-12 Joseph Myers <joseph@codesourcery.com>
5766
5767 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5768 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5769 comment.
5770 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5771 or _Thread_local as appropriate in diagnostics.
5772 (build_null_declspecs): Initialize ret->thread_gnu_p.
5773 (declspecs_add_scspec): Handle either __thread or _Thread_local
5774 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5775 pedantic. Do not disallow _Thread_local extern and _Thread_local
5776 static.
5777
267bac10
JM
57782013-11-07 Joseph Myers <joseph@codesourcery.com>
5779 Andrew MacLeod <amacleod@redhat.com>
5780
5781 * c-aux-info.c (gen_type): Handle atomic qualifier.
5782 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5783 qualifiers when compating types.
5784 (shadow_tag_warned): Handle atomic_p in declspecs.
5785 (quals_from_declspecs): Likewise.
5786 (start_decl): Use c_type_promotes_to when promoting argument
5787 types.
5788 (grokdeclarator): Handle _Atomic.
5789 (get_parm_info): Diagnose any qualifier on "void" as only
5790 parameter.
5791 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5792 comparing types. Use c_type_promotes_to when promoting argument
5793 types.
5794 (finish_function): Use c_type_promotes_to when promoting argument
5795 types.
5796 (build_null_declspecs): Handle atomic_p in declspecs.
5797 (declspecs_add_qual): Handle RID_ATOMIC.
5798 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5799 (c_token_starts_declspecs): Handle RID_ATOMIC.
5800 (c_parser_declspecs): Handle atomic type specifiers and
5801 qualifiers.
5802 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5803 from types of expressions with atomic type.
5804 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5805 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5806 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5807 (c_parser_statement_after_labels, c_parser_switch_statement)
5808 (c_parser_for_statement, c_parser_expr_no_commas)
5809 (c_parser_conditional_expression, c_parser_binary_expression)
5810 (c_parser_cast_expression, c_parser_unary_expression)
5811 (c_parser_postfix_expression)
5812 (c_parser_postfix_expression_after_primary, c_parser_expression):
5813 Use convert_lvalue_to_rvalue.
5814 (c_parser_expression_conv, c_parser_expr_list): Document
5815 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5816 (c_parser_objc_synchronized_statement): Use
5817 convert_lvalue_to_rvalue.
5818 (c_parser_objc_selector): Handle RID_ATOMIC.
5819 (c_parser_objc_receiver, c_parser_array_notation): Use
5820 convert_lvalue_to_rvalue.
5821 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5822 _Atomic (type-name).
5823 (struct c_declspecs): Add atomic_p field.
5824 (convert_lvalue_to_rvalue): Declare.
5825 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5826 corresponding atomic types.
5827 (qualify_type): Don't add _Atomic qualifiers from second argument.
5828 (comp_target_types): Do not allow _Atomic mismatches.
5829 (type_lists_compatible_p): Do not remove atomic qualifiers when
5830 comparing types.
5831 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5832 (build_atomic_assign): New functions.
5833 (build_unary_op): Use build_atomic_assign for atomic increment and
5834 decrement.
5835 (build_conditional_expr): Do not treat _Atomic void as a qualified
5836 version of void.
5837 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5838 (find_anonymous_field_with_type, convert_to_anonymous_field)
5839 (convert_for_assignment): Do not remove atomic qualifiers when
5840 comparing types.
5841 (digest_init): Do not accept initialization of arrays of atomic
5842 elements by string constants.
5843 (build_asm_expr): Use convert_lvalue_to_rvalue.
5844 (build_binary_op): Do not treat _Atomic void as a qualified
5845 version of void.
5846
0c249d4b
DD
58472013-11-06 DJ Delorie <dj@redhat.com>
5848
5849 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5850 both explicit and builtin, print the location of the explicit one.
5851
6d7f7e0a
TB
58522013-11-05 Tobias Burnus <burnus@net-b.de>
5853
5854 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5855 c_parser_omp_distribute, c_parser_omp_teams,
5856 c_parser_omp_target, c_parser_omp_declare): Handle
5857 -fopenmp-simd.
5858
b906f4ca
MP
58592013-11-03 Marek Polacek <polacek@redhat.com>
5860
5861 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5862
ee1d5a02
JJ
58632013-11-01 Jakub Jelinek <jakub@redhat.com>
5864
5865 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5866 check_dup_generic at the end, unless remove is true.
5867 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5868 remove = true;.
5869 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5870
5a9785fb
JJ
58712013-10-31 Jakub Jelinek <jakub@redhat.com>
5872
5873 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5874 with decl that is not pointer nor array.
5875
939b37da
BI
58762013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5877
5878 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5879 a spawning function is found.
5880 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5881 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5882 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5883 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5884 case.
5885 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5886 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5887 expr.
5888 (c_finish_return): Added a check to reject _Cilk_spawn in return
5889 expression.
5890 (build_cilk_spawn): New function.
5891 (build_cilk_sync): Likewise.
5892 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 5893
d4af74d4
TB
58942013-10-27 Tobias Burnus <burnus@net-b.de>
5895
5896 PR other/33426
5897 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5898 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5899 (c_parser_statement_after_labels): Update calls.
5900
d73749df 59012013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5902
5903 PR other/33426
5904 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5905 Handle PRAGMA_IVDEP.
5906 (c_parser_statement_after_labels): Update call.
5907
f28aa681
MP
59082013-10-24 Marek Polacek <polacek@redhat.com>
5909
5910 * c-parser.c (c_parser_struct_declaration): Add a comment.
5911 (c_parser_declarator): Don't allow _Alignas here.
5912
0645c1a2
AM
59132013-10-17 Andrew MacLeod <amacleod@redhat.com>
5914
5915 * c-parser.c: Include omp-low.h.
5916 * c-typeck.c: Likewise.
5917
568a31f2
MP
59182013-10-17 Marek Polacek <polacek@redhat.com>
5919
5920 PR c/58267
5921 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5922 Document syntax of the array-declarator.
5923 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5924 are not permitted.
5925 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5926 (c_parser_struct_declaration): Likewise.
5927 (c_parser_declarator): Likewise.
5928 (c_parser_direct_declarator_inner): Likewise.
5929 (c_parser_parameter_declaration): Likewise.
5930 (c_parser_type_name): Likewise.
5931
acf0174b
JJ
59322013-10-11 Jakub Jelinek <jakub@redhat.com>
5933
5934 * c-lang.h (current_omp_declare_target_attribute): New extern
5935 decl.
5936 * c-parser.c: Include c-lang.h.
5937 (struct c_parser): Change tokens to c_token *.
5938 Add tokens_buf field. Change tokens_avail type to unsigned int.
5939 (c_parser_consume_token): If parser->tokens isn't
5940 &parser->tokens_buf[0], increment parser->tokens.
5941 (c_parser_consume_pragma): Likewise.
5942 (enum pragma_context): Add pragma_struct and pragma_param.
5943 (c_parser_external_declaration): Adjust
5944 c_parser_declaration_or_fndef caller.
5945 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5946 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5947 Adjust recursive call.
5948 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5949 of pragma_external.
5950 (c_parser_parameter_declaration): Use pragma_param instead of
5951 pragma_external.
5952 (c_parser_compound_statement_nostart, c_parser_label,
5953 c_parser_for_statement): Adjust
5954 c_parser_declaration_or_fndef callers.
5955 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5956 it through to c_parser_conditional_expression.
5957 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5958 pass it through to c_parser_binary_expression. Adjust recursive
5959 call.
5960 (c_parser_binary_expression): Remove prec argument, add
5961 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5962 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5963 binop matches it, use build2 instead of parser_build_binary_op.
5964 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5965 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5966 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5967 Handle pragma_struct and pragma_param the same as pragma_external.
5968 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5969 (c_parser_omp_variable_list): Parse array sections for
5970 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5971 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5972 (c_parser_omp_clause_reduction): Handle user defined reductions.
5973 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5974 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5975 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5976 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5977 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5978 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5979 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5980 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5981 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5982 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5983 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5984 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5985 (c_parser_omp_for_loop): Add CODE argument, pass it through
5986 to c_finish_omp_for. Change last argument to cclauses,
5987 and adjust uses to grab parallel clauses from the array of all
5988 the split clauses. Adjust c_parser_binary_expression,
5989 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5990 (omp_split_clauses): New function.
5991 (c_parser_omp_simd): New function.
5992 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5993 Allow the function to be called also when parsing combined constructs,
5994 and call c_parser_omp_simd when parsing for simd.
5995 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5996 #pragma omp section, require exactly one structured-block instead of
5997 sequence of statements.
5998 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5999 Allow the function to be called also when parsing combined constructs.
6000 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6001 Allow the function to be called also when parsing combined
6002 constructs.
6003 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6004 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6005 c_parser_omp_teams, c_parser_omp_target_data,
6006 c_parser_omp_target_update, c_parser_omp_target,
6007 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6008 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6009 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6010 (c_parser_omp_construct): Add p_name and mask vars. Handle
6011 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6012 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6013 and c_parser_omp_sections callers.
6014 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6015 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6016 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6017 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6018 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6019 OMP_CLAUSE_DEPEND.
6020 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6021 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6022 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6023 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6024 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6025 * c-typeck.c: Include tree-inline.h.
6026 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6027 handle_omp_array_sections_1, handle_omp_array_sections,
6028 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6029 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6030 user defined reductions.
6031 (c_tree_equal): New function.
6032 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6033 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6034 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6035 c_check_omp_declare_reduction_r): New prototypes.
6036 * c-decl.c (current_omp_declare_target_attribute): New variable.
6037 (c_decl_attributes): New function.
6038 (start_decl, start_function): Use it instead of decl_attributes.
6039 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6040 c_omp_reduction_decl, c_omp_reduction_lookup,
6041 c_check_omp_declare_reduction_r): New functions.
6042
0a6c2227
TT
60432013-09-25 Tom Tromey <tromey@redhat.com>
6044
6045 * Make-lang.in (c/gccspec.o): Remove.
6046 (CFLAGS-c/gccspec.o): New variable.
6047 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6048 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6049 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6050
f3bc55f0
TT
60512013-09-25 Tom Tromey <tromey@redhat.com>
6052
6053 * Make-lang.in (c/gccspec.o): Don't use subshell.
6054
a24d975c
MP
60552013-09-18 Marek Polacek <polacek@redhat.com>
6056
6057 PR sanitize/58443
6058 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6059 Remove unnecessary check.
6060
ce6923c5
MP
60612013-09-18 Marek Polacek <polacek@redhat.com>
6062
6063 PR sanitizer/58411
6064 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6065 no_sanitize_undefined attribute.
6066
a1e51df9
KT
60672013-09-13 Kai Tietz <ktietz@redhat.com>
6068
6069 PR target/57848
6070 * c-decl.c (c_builtin_function_ext_scope): Remove
6071 wrong assumption that it is never called on prexisting
6072 symbol.
6073
0af94e6f
JR
60742013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6075
6076 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6077
20059c8b
GDR
60782013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6079
6080 * c-objc-common.c (c_tree_printer): Tidy.
6081
de5a5fa1
MP
60822013-08-30 Marek Polacek <polacek@redhat.com>
6083
6084 * c-typeck.c (build_binary_op): Add division by zero and shift
6085 instrumentation.
6086
2531a1d9 60872013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6088 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6089
6e2bcc98 6090 PR c/35649
2531a1d9
JR
6091 * c-typeck.c (c_common_type): Prefer double_type_node over
6092 other REAL_TYPE types with the same precision.
6093 (convert_arguments): Likewise.
6094
025311c4
GDR
60952013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6096
6097 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6098 (c_initialize_diagnostics): Call a destructor for the early printer.
6099
da6ca2b5
GDR
61002013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6101
6102 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6103 printer initialization.
6104
318cda85 61052013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6106
318cda85
BI
6107 PR c/57490
6108 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6109 check for truth values.
6110 (expand_array_notation_exprs): Added truth values case. Removed an
6111 unwanted else. Added for-loop to walk through subtrees in default
6112 case.
6113
b066401f
GDR
61142013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6115
6116 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6117
fb48aadc
JM
61182013-07-23 Joseph Myers <joseph@codesourcery.com>
6119
6120 * c-parser.c (struct c_generic_association): Fix typo.
6121
433cc7b0
TT
61222013-07-23 Tom Tromey <tromey@redhat.com>
6123 Joseph Myers <joseph@codesourcery.com>
6124
6125 * c-parser.c (struct c_generic_association): New.
6126 (c_generic_association_d): New typedef.
6127 (c_parser_generic_selection): New function.
6128 (c_parser_postfix_expression): Handle RID_GENERIC.
6129
26d40c3d
JM
61302013-07-13 Jason Merrill <jason@redhat.com>
6131
6132 PR c++/57793
6133 * c-decl.c (finish_struct): Check for too-large class.
6134
ecdbd01a 61352013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6136
6137 PR c/57821
6138 * c-typeck.c (set_init_index): When folding, check for index overflow.
6139
1141ed3f
BI
61402013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6141
6142 * c-parser.c (c_parser_array_notation): Removed rejection of array
6143 notations in an array of function pointers.
6144
713b46fa
BI
61452013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6146
6147 * c-array-notation.c (make_triplet_val_inv): New function.
6148 (create_cmp_incr): Likewise.
6149 (create_array_refs): Likewise.
6150 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6151 Also modularized common parts between functions and called the function.
6152 (build_array_notation_expr): Likewise.
6153 (fix_conditional_array_notations_1): Likewise.
6154 (fix_array_notation_expr): Likewise.
6155 (fix_array_notation_call_expr): Likewise.
6156
92f20202
MP
61572013-06-18 Marek Polacek <polacek@redhat.com>
6158
6159 PR c/57630
6160 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6161
73a23b06
BI
61622013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6163
6164 * c-array-notation.c (build_array_notation_expr): Reject array notation
6165 mismatch between LHS and RHS even inside a call_expr. Also, removed
6166 a couple while statements that were dead code.
6167
00b8517d
BI
61682013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6169
6170 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6171 excessive precision expressions in function parameters. Also removed
6172 couple unwanted while statements.
6173
1509bdda
BI
61742013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6175
6176 * c-array-notation.c (expand_array_notation_exprs): Added
6177 ARRAY_NOTATION_REF case.
ab20d992 6178
d60f1706
BI
61792013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6180
6181 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6182 function to c-family/array-notation-common.c.
6183 (is_cilkplus_reduce_builtin): Likewise.
6184 (find_rank): Likewise.
6185 (extract_array_notation_exprs): Likewise.
6186 (replace_array_notations): Likewise.
6187 (find_inv_trees): Likewise.
6188 (replace_inv_trees): Likewise.
6189 (contains_array_notation_expr): Likewise.
6190 (find_correct_array_notation_type): Likewise.
6191 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6192 (struct inv_list): Moved this to c-family/array-notation-common.c.
6193 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6194
6d6efbb3
BI
61952013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6196
6197 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6198 reduction functions outside the for-loop. Added a check if the fundecl
6199 is non-NULL. Finally, removed an unwanted if-statement, and made the
6200 body unconditional.
6201
25c22937
BI
62022013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6203
6204 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6205 condition of the if-statement matches the rank of else-block and then-
6206 block when array notations are used.
6207 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6208 expression after the entire function body is parsed.
6209 (c_parser_expr_no_commas): Delayed creating array notation expressions
6210 to the end of function parsing.
6211 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6212 whole if-statement instead of just the condition.
ab20d992 6213 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6214
edd25645
BI
62152013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6216
6217 PR c/57474
6218 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6219 array to NULL_TREE if they are unused. Also added a check for the
6220 field to be NULL before its fields are used in future.
ab20d992 6221
065ce7f1
RO
62222013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6223
6224 PR bootstrap/57450
6225 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6226 (build_array_notation_expr): Likewise.
6227
36536d79
BI
62282013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6229
6230 * c-typeck.c (build_array_ref): Added a check to see if array's
6231 index is greater than one. If true, then emit an error.
6232 (build_function_call_vec): Exclude error reporting and checking
6233 for builtin array-notation functions.
6234 (convert_arguments): Likewise.
6235 (c_finish_return): Added a check for array notations as a return
6236 expression. If true, then emit an error.
6237 (c_finish_loop): Added a check for array notations in a loop
6238 condition. If true then emit an error.
6239 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6240 (build_binary_op): Added a check for array notation expr inside
6241 op1 and op0. If present, we call another function to find correct
6242 type.
6243 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6244 * c-parser.c (c_parser_compound_statement): Check if array
6245 notation code is used in tree, if so, then transform them into
6246 appropriate C code.
6247 (c_parser_expr_no_commas): Check if array notation is used in LHS
6248 or RHS, if so, then build array notation expression instead of
6249 regular modify.
6250 (c_parser_postfix_expression_after_primary): Added a check for
6251 colon(s) after square braces, if so then handle it like an array
6252 notation. Also, break up array notations in unary op if found.
6253 (c_parser_direct_declarator_inner): Added a check for array
6254 notation.
6255 (c_parser_compound_statement): Added a check for array notation in
6256 a stmt. If one is present, then expand array notation expr.
6257 (c_parser_if_statement): Likewise.
6258 (c_parser_switch_statement): Added a check for array notations in
6259 a switch statement's condition. If true, then output an error.
6260 (c_parser_while_statement): Similarly, but for a while.
6261 (c_parser_do_statement): Similarly, but for a do-while.
6262 (c_parser_for_statement): Similarly, but for a for-loop.
6263 (c_parser_unary_expression): Check if array notation is used in a
6264 pre-increment or pre-decrement expression. If true, then expand
6265 them.
6266 (c_parser_array_notation): New function.
6267 * c-array-notation.c: New file.
6268 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 6269
cd192ccc
MS
62702013-05-23 Mike Stump <mikestump@comcast.net>
6271
6272 * c-typeck.c (convert_for_assignment): Handle references to memory
6273 spaces better.
6274
427b248d
JM
62752013-05-16 Jason Merrill <jason@redhat.com>
6276
6277 * Make-lang.in (cc1$(exeext)): Use link mutex.
6278
44d90fe1
PC
62792013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6280
6281 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6282 to simply use OPT_Wpointer_arith.
6283 (build_unary_op): Likewise.
6284
4e7d7b3d
JJ
62852013-04-03 Jakub Jelinek <jakub@redhat.com>
6286
6287 PR c/19449
6288 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6289 argument. If set, or it temporarily for parsing of the first
6290 argument into force_folding_builtin_constant_p.
6291 (c_parser_postfix_expression): Adjust callers.
6292
839b422f
RB
62932013-03-21 Richard Biener <rguenther@suse.de>
6294
6295 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6296 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6297
2ee028f1
MP
62982013-02-12 Marek Polacek <polacek@redhat.com>
6299
6300 PR c/44938
6301 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6302 origtypes to NULL.
6303
8824edff
JJ
63042013-01-24 Jakub Jelinek <jakub@redhat.com>
6305
6306 PR c/56078
6307 * c-typeck.c (set_nonincremental_init_from_string): If
6308 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6309 returned false.
6310 (process_init_element): Likewise.
6311
eadd3d0d
JJ
63122012-12-20 Jakub Jelinek <jakub@redhat.com>
6313
6314 PR c++/55619
6315 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6316 argument, don't call default_function_array_conversion
6317 nor c_fully_fold here.
6318 (c_parser_asm_statement): Adjust callers.
6319 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6320 and outputs here, and call default_function_array_conversion
6321 on inputs that don't need to be addressable.
6322
f8a93a2e
JJ
63232012-12-18 Jakub Jelinek <jakub@redhat.com>
6324
6325 PR c/39464
6326 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6327 warning require that both c_common_unsigned_type as well as
6328 c_common_signed_type is the same for both mvl and mvr types.
6329
9771b263
DN
63302012-11-16 Diego Novillo <dnovillo@google.com>
6331
6332 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6333
6334 * c-common.c: Use new vec API in vec.h.
6335 * c-common.h: Likewise.
6336 * c-gimplify.c: Likewise.
6337 * c-pragma.c: Likewise.
6338 * c-pretty-print.c: Likewise.
6339 * c-pretty-print.h: Likewise.
6340 * c-semantics.c: Likewise.
6341 * c-decl.c: Likewise.
6342 * c-parser.c: Likewise.
6343 * c-tree.h: Likewise.
6344 * c-typeck.c: Likewise.
6345
880661a4
JW
63462012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6347
6348 PR c++/54930
6349 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6350
077d1abe
MLI
63512012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6352
6353 PR c/53066
6354 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6355 shadows a function, unless the variable is a function or a
6356 pointer-to-function.
6357
3a785c97
JJ
63582012-10-12 Jakub Jelinek <jakub@redhat.com>
6359
6360 PR c/54381
6361 * c-parser.c (struct c_tree_loc_pair): Removed.
6362 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6363 add location_t * and tree * arguments, fill in array of 3
6364 sizeof_arg trees and corresponding locs.
6365 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6366 c_parser_expr_list callers.
6367 (c_parser_postfix_expression_after_primary): Likewise. Pass
6368 array of 3 sizeof_arg trees and locs (corresponding to first
6369 3 arguments) to sizeof_pointer_memaccess_warning.
6370
703c8606
LC
63712012-10-09 Lawrence Crowl <crowl@google.com>
6372
6373 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6374 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6375 hash table.
6376
5d9de0d0
PC
63772012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6378
6379 PR c++/54194
6380 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6381 call.
6382
a212e43f
MG
63832012-10-09 Marc Glisse <marc.glisse@inria.fr>
6384
6385 PR c++/54427
6386 * c-typeck.c: Include c-common.h.
6387 (enum stv_conv): Moved to c-common.h.
6388 (scalar_to_vector): Moved to c-common.c.
6389 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6390 * Make-lang.in: c-typeck.c depends on c-common.h.
6391
3b78de56
AC
63922012-10-04 Arnaud Charlet <charlet@adacore.com>
6393
6394 * c-decl.c (c_write_global_declarations): Fix handling of
6395 -fdump-ada-spec*.
6396
78c60e3d
SS
63972012-09-30 Sharad Singhai <singhai@google.com>
6398
6399 * c-decl.c (c_write_global_declarations): Use a different method
6400 to determine if the dump has ben initialized.
6401
9f33203d
JM
64022012-09-14 Joseph Myers <joseph@codesourcery.com>
6403
6404 PR c/54552
6405 * c-typeck.c (c_cast_expr): When casting to a type requiring
6406 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6407 c_fully_fold first.
6408
a27d595d
JM
64092012-09-14 Joseph Myers <joseph@codesourcery.com>
6410
6411 PR c/54103
6412 * c-typeck.c (build_unary_op): Pass original argument of
6413 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6414 any C_MAYBE_CONST_EXPR, if it has integer operands.
6415 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6416 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6417 to c_objc_common_truthvalue_conversion, then remove any
6418 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6419 c_objc_common_truthvalue_conversion not
6420 c_common_truthvalue_conversion.
6421 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6422 call note_integer_operands for arguments with integer operands
6423 that are not integer constants.
6424
9feb29df
JJ
64252012-09-13 Jakub Jelinek <jakub@redhat.com>
6426
6427 PR c/54559
6428 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6429 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6430
d409320c
JJ
64312012-08-31 Jakub Jelinek <jakub@redhat.com>
6432
6433 PR c/54428
6434 * c-convert.c (convert): Don't call fold_convert_loc if
6435 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6436 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6437 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6438
6265d07c
JJ
64392012-08-24 Jakub Jelinek <jakub@redhat.com>
6440
6441 PR c/54355
6442 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6443 for nested and empty_ok arguments in the call to
6444 c_parser_declaration_or_fndef.
6445
1a4049e7
JJ
64462012-08-17 Jakub Jelinek <jakub@redhat.com>
6447
6448 * c-tree.h (c_last_sizeof_arg): Declare.
6449 * c-parser.c (struct c_tree_loc_pair): New type.
6450 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6451 non-NULL.
6452 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6453 (c_parser_postfix_expression_after_primary): Likewise. Call
6454 sizeof_pointer_memaccess_warning if needed.
6455 (sizeof_ptr_memacc_comptypes): New function.
6456 * c-typeck.c (c_last_sizeof_arg): New global variable.
6457 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6458
0229aee9
UB
64592012-07-24 Uros Bizjak <ubizjak@gmail.com>
6460
6461 * c-lang.h (lang_decl): Add variable_size GTY option.
6462
7ee2468b
SB
64632012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6464
6465 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6466 * Make-lang.in: Fix dependencies.
6467
d4a10d0a
SB
64682012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6469
6470 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6471 and add language Makefile hooks.
6472 * config-lang.in: New file.
6473 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6474 add the required "normal" config-lang.in rules.
6475 * c-lang.h: Moved from gcc/ to here.
6476 * c-tree.h: Likewise.
6477 * c-objc-common.c: Likewise.
6478 * c-objc-common.h: Likewise.
6479 * c-typeck.c: Likewise.
6480 * c-convert.c: Likewise.
6481 * c-lang.c: Likewise.
6482 * c-aux-info.c: Likewise.
6483 * c-errors.c: Likewise.
6484 * gccspec.c: Likewise.
6485 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6486 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6487\f
a5544970 6488Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6489
6490Copying and distribution of this file, with or without modification,
6491are permitted in any medium without royalty provided the copyright
6492notice and this notice are preserved.