]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Move string concatenation for C into the parser.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
471c5330
JM
12019-11-07 Joseph Myers <joseph@codesourcery.com>
2
3 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
4 lex_joined_string and translate_strings_p.
5 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
6 c_lex_with_flags.
7 (c_parser_string_literal): New function.
8 (c_parser_static_assert_declaration_no_semi): Use
9 c_parser_string_literal. Do not set lex_untranslated_string.
10 (c_parser_asm_string_literal): Use c_parser_string_literal.
11 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
12 (c_parser_gnu_attributes): Set and restore translate_strings_p
13 instead of lex_untranslated_string.
14 (c_parser_asm_statement): Do not set lex_untranslated_string.
15 (c_parser_asm_operands): Likewise.
16 (c_parser_has_attribute_expression): Set and restore
17 translate_strings_p instead of lex_untranslated_string.
18 (c_parser_postfix_expression): Use c_parser_string_literal.
19 (pragma_lex): Likewise.
20 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
21 (c_parse_file): Set translate_strings_p.
22 * gimple-parser.c (c_parser_gimple_postfix_expression)
23 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
24 * c-parser.c (c_parser_string_literal): Declare function.
25
d0c464d2
JJ
262019-11-02 Jakub Jelinek <jakub@redhat.com>
27
28 * c-parser.c (c_finish_omp_declare_variant): Use
29 omp_get_context_selector instead of c_omp_get_context_selector.
30
ac2cfa6c
RS
312019-10-29 Richard Sandiford <richard.sandiford@arm.com>
32
33 * c-tree.h (c_simulate_enum_decl): Declare.
34 * c-decl.c (c_simulate_enum_decl): New function.
35 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
36
74078538
RS
372019-10-29 Richard Sandiford <richard.sandiford@arm.com>
38
39 * c-tree.h (c_simulate_builtin_function_decl): Declare.
40 * c-decl.c (c_simulate_builtin_function_decl): New function.
41 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
42 to the above.
43
ad1539d5
MS
442019-10-28 Martin Sebor <msebor@redhat.com>
45
46 PR c/66970
47 * c-decl.c (names_builtin_p): Define a new function.
48
cb73e4e7
RB
492019-10-28 Richard Biener <rguenther@suse.de>
50
51 PR c/92249
52 * gimple-parser.c (c_parser_parse_gimple_body): Make
53 current_bb the entry block initially to easier recover
54 from errors.
55 (c_parser_gimple_compound_statement): Adjust.
56
135df52c
JJ
572019-10-24 Jakub Jelinek <jakub@redhat.com>
58
59 * c-parser.c (c_finish_omp_declare_variant): Use
60 omp_context_selector_matches instead of
61 c_omp_context_selector_matches.
62 * c-decl.c (c_decl_attributes): Add "omp declare target block"
63 attribute in between declare target and end declare target
64 pragmas.
65
783bfe5e
JM
662019-10-15 Joseph Myers <joseph@codesourcery.com>
67
68 * c-parser.c (c_parser_attribute_any_word): Rename to
69 c_parser_gnu_attribute_any_word. All callers changed.
70 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
71 callers changed.
72 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
73 callers changed.
74 (c_parser_declaration_or_fndef, c_parser_declspecs)
75 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
76 (c_parser_struct_declaration, c_parser_declarator)
77 (c_parser_gnu_attribute, c_parser_compound_statement)
78 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
79 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
80 attribute-related syntax productions.
81
56898e43
RS
822019-10-14 Richard Sandiford <richard.sandiford@arm.com>
83
84 * c-objc-common.c (useful_aka_type_p): Replace with...
85 (get_aka_type): ...this new function. Given the original type,
86 decide which aka type to print (if any). Only look through typedefs
87 if user_facing_original_type_p.
88 (print_type): Update accordingly.
89
b9424661
JJ
902019-10-14 Jakub Jelinek <jakub@redhat.com>
91
92 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
93 into int NESTED, if it is 2, diagnose missing commas in between
94 clauses.
95 (c_parser_omp_context_selector): Pass 2 as last argument to
96 c_parser_omp_all_clauses.
97
20de9568
JJ
982019-10-12 Jakub Jelinek <jakub@redhat.com>
99
100 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
101 For simd properties, put them directly into TREE_VALUE.
102 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
103 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
104 add "omp declare variant base" attribute rather than
105 "omp declare variant".
106
fe2bc27c
JM
1072019-10-11 Joseph Myers <joseph@codesourcery.com>
108
109 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
110
94e7f906
JJ
1112019-10-10 Jakub Jelinek <jakub@redhat.com>
112
113 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
114 true, terminate processing on closing paren and don't skip to end of
115 pragma line.
116 (c_parser_omp_declare_simd): Handle also declare variant.
117 (omp_construct_selectors, omp_device_selectors,
118 omp_implementation_selectors, omp_user_selectors): New variables.
119 (c_parser_omp_context_selector,
120 c_parser_omp_context_selector_specification,
121 c_finish_omp_declare_variant): New functions.
122 (c_finish_omp_declare_simd): Handle both declare simd and
123 declare variant.
124 (c_parser_omp_declare): Handle declare variant.
125
93313b94
JM
1262019-10-02 Joseph Myers <joseph@codesourcery.com>
127
128 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
129 CPP_COLON tokens.
130
55879815
RS
1312019-10-01 Richard Sandiford <richard.sandiford@arm.com>
132
133 * c-objc-common.c (useful_aka_type_p): New function.
134 (print_type): Use it to decide whether an aka type is worth printing.
135
59bc434a
JJ
1362019-09-27 Jakub Jelinek <jakub@redhat.com>
137
138 PR c++/88203
139 * c-parser.c (c_parser_predefined_identifier): New function.
140 (c_parser_postfix_expression): Use it.
141 (c_parser_omp_variable_list): Parse predefined identifiers.
142 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
143 in shared and firstprivate clauses, even when they are predetermined
144 shared.
145
c6447c20
RS
1462019-09-27 Richard Sandiford <richard.sandiford@arm.com>
147
148 * c-typeck.c (build_function_call_vec): Take the original function
149 decl as an optional final parameter. Pass all built-in calls to
150 check_builtin_function_arguments.
151
522da4c2
EB
1522019-09-20 Eric Botcazou <ebotcazou@adacore.com>
153
154 PR c/91815
155 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
156 of identifiers in the external scope only for variables and functions.
157
68e2c199
PK
1582019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
159
160 PR c/78736
161 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
162
22f8849d
IS
1632019-08-23 Iain Sandoe <iain@sandoe.co.uk>
164
165 PR pch/61250
166 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
167 after determining that the first token is not
168 PRAGMA_GCC_PCH_PREPROCESS.
169
db376f45
EB
1702019-08-22 Eric Botcazou <ebotcazou@adacore.com>
171
172 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
173 FUNCTION_DECL to the right value in the presence of nested declarators.
174
4d732405
RS
1752019-08-13 Richard Sandiford <richard.sandiford@arm.com>
176
177 PR middle-end/91421
178 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
179
cb1180d5
RS
1802019-08-13 Richard Sandiford <richard.sandiford@arm.com>
181
182 PR middle-end/91421
183 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
184 of a built_in_function.
185 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
186
77eb117f
JJ
1872019-08-10 Jakub Jelinek <jakub@redhat.com>
188
189 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
190 (c_parser_omp_clause_device_type): New function.
191 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
192 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
193 (c_parser_omp_declare_target): Handle device_type clauses. Remove
194 diagnostics for declare target with clauses nested in clause-less
195 declare target declaration-definition-seq.
196 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
197
2c3b8bad
JJ
1982019-08-09 Jakub Jelinek <jakub@redhat.com>
199
bb522e2e
JJ
200 * c-parser.c (check_no_duplicate_clause): Simplify using
201 omp_find_clause.
202 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
203 directive name modifiers.
204 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
205
2c3b8bad
JJ
206 PR c/91401
207 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
208 check_no_duplicate_clause call. Comment it out, instead emit a
209 warning for duplicate dist_schedule clauses.
210
99769e7f
RS
2112019-08-08 Richard Sandiford <richard.sandiford@arm.com>
212
213 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
214
8860d270
JJ
2152019-08-08 Jakub Jelinek <jakub@redhat.com>
216
217 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
218 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
219 instead of generic_head to track duplicates.
220
398e3feb
JJ
2212019-08-07 Jakub Jelinek <jakub@redhat.com>
222
223 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
224 (c_parser_omp_clause_use_device_addr): New function.
225 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
226 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
227 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
228 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
229 map or use_device_* clauses.
230 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
231 in OpenMP, require pointer type rather than pointer or array type.
232 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
233
a28351e7
JJ
2342019-07-31 Jakub Jelinek <jakub@redhat.com>
235
236 PR c/91192
237 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
238 even if finish is UNKNOWN_LOCATION, just use start as finish in that
239 case.
240
6343b6bf
ML
2412019-07-25 Martin Liska <mliska@suse.cz>
242 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
243
244 PR c++/23383
245 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
246
cb50701e
ML
2472019-07-25 Martin Liska <mliska@suse.cz>
248
249 * c-decl.c (merge_decls): Use new macros
250 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
251
62e3e66f
RB
2522019-07-23 Richard Biener <rguenther@suse.de>
253
254 PR tree-optimization/83518
255 * gimple-parser.c (c_parser_parse_gimple_body): When we have
256 a CFG also rebuild cgraph edges.
257
554a530f
JJ
2582019-07-20 Jakub Jelinek <jakub@redhat.com>
259
260 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
261 (c_parser_omp_clause_bind): New function.
262 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
263 (OMP_LOOP_CLAUSE_MASK): Define.
264 (c_parser_omp_loop): New function.
265 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
266 loop combined with parallel or teams.
267 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
268 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
269
d119bf79
RS
2702019-07-18 Richard Sandiford <richard.sandiford@arm.com>
271
272 PR c/53633
273 * c-decl.c (finish_function): Check targetm.warn_func_return
274 before issuing a -Wreturn-type warning.
275
ab20d992 2762019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
277
278 * gimple-parser.c (c_parser_gimple_try_stmt): New.
279 (c_parser_compound_statement): Call it.
280
1fdd6f04
JJ
2812019-07-12 Jakub Jelinek <jakub@redhat.com>
282
283 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
284 (c_parser_omp_clause_order): New function.
285 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
286 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
287 PRAGMA_OMP_CLAUSE_ORDER.
288 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
289
8389386c
RB
2902019-07-10 Richard Biener <rguenther@suse.de>
291
292 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
293 _Literal (int *) &x for address literals.
294
99b1c316
MS
2952019-07-09 Martin Sebor <msebor@redhat.com>
296
297 PR c++/61339
298 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
299 to class.
300 (field_decl_cmp): Same.
301 * c-parser.c (c_parser_struct_or_union_specifier): Same.
302 * c-tree.h: Same.
303 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
304
6c1dae73
MS
3052019-07-09 Martin Sebor <msebor@redhat.com>
306
307 PR c++/61339
308 * c-decl.c: Change class-key from class to struct and vice versa
309 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
310 * gimple-parser.c: Same.
311
69b5279e
RB
3122019-07-01 Richard Biener <rguenther@suse.de>
313
314 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
315 _Literal (char *) &"foo" for address literals pointing to
316 STRING_CSTs.
317
ab20d992
JJ
3182019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
319
320 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
321 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
322 C incompatibility if alternate "__intN__" form is used.
323
1e3d475e
MS
3242019-06-24 Martin Sebor <msebor@redhat.com>
325
326 * c-typeck.c (build_binary_op): Hyphenate floating-point.
327
bf38f7e9
JJ
3282019-06-10 Jakub Jelinek <jakub@redhat.com>
329
330 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
331 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
332 (c_parser_omp_scan_loop_body): New function.
333 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
334 inscan reduction clauses.
335 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
336 non-inscan reductions on the same construct, or inscan reductions with
337 ordered or schedule clauses, or inscan array reductions.
338
65985d78
MS
3392019-06-05 Martin Sebor <msebor@redhat.com>
340
341 PR c/90737
342 * c-typeck.c (c_finish_return): Only consider functions returning
343 pointers as candidates for -Wreturn-local-addr.
344
0ecf545c
MS
3452019-06-05 Martin Sebor <msebor@redhat.com>
346
347 * c-decl.c (start_decl): Adjust quoting and hyphenation
348 in diagnostics.
349 (finish_decl): Same.
350 (finish_enum): Same.
351 (start_function): Same.
352 (declspecs_add_type): Same.
353 * c-parser.c (warn_for_abs): Same.
354 * c-typeck.c (build_binary_op): Same.
355
e03436e7
TS
3562019-05-17 Thomas Schwinge <thomas@codesourcery.com>
357
b48f44bf
TS
358 PR c/89433
359 * c-parser.c (c_finish_oacc_routine): Rework checking if already
360 marked with an OpenACC 'routine' directive.
361
5bf04509
TS
362 PR c/89433
363 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
364 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
365
e03436e7
TS
366 PR c/89433
367 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
368 clauses from "omp declare target" attribute.
369
a9c697b8
MS
3702019-05-16 Martin Sebor <msebor@redhat.com>
371
ab20d992
JJ
372 * c-decl.c (start_decl): Quote keywords, operators, and
373 types in diagnostics.
374 (finish_decl): Same.
375 * c-parser.c (c_parser_asm_statement): Same.
376 (c_parser_conditional_expression): Same.
377 (c_parser_transaction_cancel): Same.
378 * c-typeck.c (c_common_type): Same.
379 (build_conditional_expr): Same.
380 (digest_init): Same.
381 (process_init_element): Same.
382 (build_binary_op): Same.
a9c697b8 383
c4499192
RB
3842019-05-17 Richard Biener <rguenther@suse.de>
385
386 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
387 (c_parser_gimple_unary_expression): Likewise.
388 (c_parser_gimple_parentized_ternary_expression): New function.
389
adfe6e4b
RB
3902019-05-16 Richard Biener <rguenther@suse.de>
391
392 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
393 (c_parser_gimple_unary_expression): Likewise.
394
186dabf2
RB
3952019-05-15 Richard Biener <rguenther@suse.de>
396
397 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
398 __BIT_FIELD_REF.
399
1158c5b4
RB
4002019-05-14 Richard Biener <rguenther@suse.de>
401
402 * gimple-parser.c (c_parser_gimple_statement): Remove
403 questionable auto-promotion to VIEW_CONVERT_EXPR.
404 (c_parser_gimple_typespec): Split out from __MEM parsing.
405 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
406 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
407 as __VIEW_CONVERT with -gimple.
408
fd4485aa
ML
4092019-05-09 Martin Liska <mliska@suse.cz>
410
411 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
412 __MAX.
413 (c_parser_gimple_unary_expression): Parse also binary expression
414 __MIN and __MAX.
415 (c_parser_gimple_parentized_binary_expression): New function.
416
d276406a
ML
4172019-05-09 Martin Liska <mliska@suse.cz>
418
419 * gimple-parser.c (struct gimple_parser): Add probability.
420 for gimple_parser_edge.
421 (gimple_parser::push_edge): Add new argument probability.
422 (c_parser_gimple_parse_bb_spec): Parse also probability
423 if present.
424 (c_parser_parse_gimple_body): Set edge probability.
425 (c_parser_gimple_compound_statement): Consume token
426 before calling c_parser_gimple_goto_stmt.
427 Parse BB counts.
428 (c_parser_gimple_statement): Pass new argument.
429 (c_parser_gimple_goto_stmt): Likewise.
430 (c_parser_gimple_if_stmt): Likewise.
431 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
432 * c-parser.c (c_parser_declaration_or_fndef): Pass
433 hot_bb_threshold argument.
434 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
435 field.
436 (c_parser_gimple_parse_bb_spec_edge_probability): New.
437
f179b64e
JJ
4382019-04-26 Jakub Jelinek <jakub@redhat.com>
439
440 PR debug/90197
441 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
442 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
443 (c_parser_do_statement): Likewise.
444 (c_parser_for_statement): Likewise. Formatting fixes.
445 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
446 emit DEBUG_BEGIN_STMTs if needed.
447
e7178413
JJ
4482019-04-19 Jakub Jelinek <jakub@redhat.com>
449
c280b7ee
JJ
450 PR c/89888
451 * c-typeck.c (struct c_switch): Remove outside_range_p member.
452 (c_start_case): Don't clear it.
453 (do_case): Adjust c_add_case_label caller.
454 (c_finish_case): Adjust c_do_switch_warnings caller.
455
e7178413
JJ
456 PR c++/90108
457 * c-decl.c (merge_decls): If remove is main variant and
458 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
459 variant that has newdecl as TYPE_NAME if any.
460
60a2c645
JJ
4612019-04-12 Jakub Jelinek <jakub@redhat.com>
462
463 PR c/89933
464 * c-decl.c (merge_decls): When newdecl's type is its main variant,
465 don't try to remove it from the variant list, but instead assert
466 it has no variants.
467
2a82beaa
RB
4682019-04-01 Richard Biener <rguenther@suse.de>
469
470 PR c/71598
471 * c-tree.h (c_get_alias_set): Declare.
472 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
473 * c-objc-common.c (c_get_alias_set): Treat enumeral types
474 as the underlying integer type.
475
bec1da64
MS
4762019-03-19 Martin Sebor <msebor@redhat.com>
477
478 PR tree-optimization/89688
479 * c-decl.c (finish_decl): Call braced_lists_to_string for more
480 kinds of initializers.
481
855cd9b1
JJ
4822019-03-19 Jakub Jelinek <jakub@redhat.com>
483
484 PR c/89734
485 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
486 return type even if quals_used is 0. Formatting fixes.
487
baa09dc5
RB
4882019-03-14 Richard Biener <rguenther@suse.de>
489
490 * c-tree.h (enum c_declspec_il): New.
491 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
492 enum bitfield.
493 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
494 Pass start pass and declspec_il to c_parser_parse_gimple_body.
495 (c_parser_declspecs): Adjust.
496 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
497 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
498 and bitmap.h.
499 (struct gimple_parser): New.
500 (gimple_parser::push_edge): New method.
501 (c_parser_gimple_parse_bb_spec): New helper.
502 (c_parser_parse_gimple_body): Get start pass and IL specification.
503 Initialize SSA and CFG.
504 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
505 Build a gimple_parser parsing state and pass it along.
506 (c_parser_gimple_statement): Change intermittend __PHI internal
507 function argument for the edge.
508 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
509 (c_parser_gimple_goto_stmt): Record edges to build.
510 (c_parser_gimple_if_stmt): Likewise.
511 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
512 (c_parser_gimple_or_rtl_pass_list): Likewise.
513
a3f9f006
ML
5142019-03-11 Martin Liska <mliska@suse.cz>
515
516 * c-decl.c (check_for_loop_decls): Wrap an option name
517 in a string format message and fix GNU coding style.
518 * c-parser.c (c_parser_declspecs): Likewise.
519
1db01ff9
JJ
5202019-03-08 Jakub Jelinek <jakub@redhat.com>
521
522 PR tree-optimization/89550
523 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
524 returned true.
525 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
526 or warning returned true.
527
66dcb747
JJ
5282019-02-28 Jakub Jelinek <jakub@redhat.com>
529
530 PR c/89525
531 * c-typeck.c (convert_arguments): Call inform_declaration only if
532 the previous warning_at call returned true.
533
2263c9f2
TS
5342019-02-22 Thomas Schwinge <thomas@codesourcery.com>
535
536 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
537 parameter. Adjust all users.
538 (c_parser_oacc_simple_clause): Replace parser with loc formal
539 parameter. Adjust all users.
540
ab20d992 5412019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
542
543 PR c/87924
544 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
545 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
546
5f88ba10
JJ
5472019-02-15 Jakub Jelinek <jakub@redhat.com>
548
549 PR c/89340
550 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
551 before c_decl_attributes rather than after it.
552
cfc30fd1
JJ
5532019-02-06 Jakub Jelinek <jakub@redhat.com>
554
555 PR c/89211
556 * c-parser.c (c_parser_declaration_or_fndef): Don't update
557 DECL_ARGUMENTS of d if it has been defined already. Use a single if
558 instead of 3 nested ifs.
559
fbe83e6b
JM
5602019-02-06 Joseph Myers <joseph@codesourcery.com>
561
562 PR c/88584
563 * c-decl.c (finish_decl): Do not complete array types for arrays
564 with external linkage not at file scope.
565
f461f938
RB
5662019-02-05 Richard Biener <rguenther@suse.de>
567
568 PR c/88606
569 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
570 all type variants when not supported.
571
fe509359
JJ
5722019-01-30 Jakub Jelinek <jakub@redhat.com>
573
574 PR c/89061
575 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
576 * c-decl.c (decl_jump_unsafe): Return false for
577 C_DECL_COMPOUND_LITERAL_P decls.
578 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
579
6a335b96
JJ
5802019-01-29 Jakub Jelinek <jakub@redhat.com>
581
f4b7e754
JJ
582 PR c/89045
583 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
584 scope.
585
6a335b96
JJ
586 PR c/86125
587 * c-decl.c (last_fileptr_type): Remove.
588 (last_structptr_types): New variable.
589 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
590 {old,new}rettype instead of the types themselves. Assert
591 last_structptr_types array has the same number of elements
592 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
593 argument oldtype and newtype. Instead of handling
594 just fileptr_type_node specially, handle all builtin_structptr_types
595 pointer nodes. Formatting fix.
596
d8b5a1a0
MS
5972019-01-24 Martin Sebor <msebor@redhat.com>
598
599 PR c/86125
600 PR c/88886
601 PR middle-end/86308
602 * c-decl.c (match_builtin_function_types): Add arguments.
603 (diagnose_mismatched_decls): Diagnose mismatched declarations
604 of built-ins more strictly.
605
e21c4491
JJ
6062019-01-24 Jakub Jelinek <jakub@redhat.com>
607
608 PR c++/88976
609 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
610 on #pragma omp cancel with different modifiers.
611
420183d9
L
6122019-01-18 H.J. Lu <hongjiu.lu@intel.com>
613
614 PR c/51628
615 PR c/88664
616 * c-typeck.c (convert_for_assignment): Upate the
617 warn_for_address_or_pointer_of_packed_member call.
618
17ad43dd
TH
6192019-01-16 Tom Honermann <tom@honermann.net>
620 Jason Merrill <jason@redhat.com>
621
622 * c-typeck.c (digest_init): Revised the error message produced for
623 ill-formed cases of array initialization with a string literal.
624 (error_init): Make variadic.
625
5f07d78a
JJ
6262019-01-12 Jakub Jelinek <jakub@redhat.com>
627
628 * c-typeck.c (convert_for_assignment): Fix a comment typo.
629
c4581bbf
JJ
6302019-01-07 Jakub Jelinek <jakub@redhat.com>
631
632 PR c/88701
633 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
634 if current_function_decl is non-NULL.
635
65c5b1eb
JM
6362019-01-07 Joseph Myers <joseph@codesourcery.com>
637
638 PR c/88720
639 PR c/88726
640 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
641 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
642 functions declared but never defined only for external scope, not
643 for other scopes.
644
d8fcab68
JJ
6452019-01-07 Jakub Jelinek <jakub@redhat.com>
646
647 PR c++/85052
648 * c-parser.c (c_parser_postfix_expression): Parse
649 __builtin_convertvector.
650
a5544970
JJ
6512019-01-01 Jakub Jelinek <jakub@redhat.com>
652
653 Update copyright years.
654
da77eace
L
6552018-12-20 H.J. Lu <hongjiu.lu@intel.com>
656
657 PR c/51628
658 * c-typeck.c (convert_for_assignment): Call
659 warn_for_address_or_pointer_of_packed_member.
660
1edf8866
SB
6612018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
662
663 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
664 a more specific error message (instead of just falling through).
665
db4fd626
SB
6662018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
667
668 * c-parser.c (c_parser_asm_statement): Keep track of the location each
669 asm qualifier is first seen; use that to give nicer "duplicate asm
670 qualifier" messages. Delete 'quals" variable, instead pass the
671 "is_volatile_ flag to build_asm_stmt directly.
672 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
673 * c-typeck.c (build_asm_stmt): Ditto; adjust.
674
9c9cfcbb
SB
6752018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
676
677 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
678 "done" boolean variable.
679
a14feb3c
DM
6802018-12-19 David Malcolm <dmalcolm@redhat.com>
681
682 PR c++/87504
683 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
684 Move from here to gcc-rich-location.h and gcc-rich-location.c.
685 (build_binary_op): Use struct op_location_t and
686 class binary_op_rich_location.
687
6d939173
JJ
6882018-12-11 Jakub Jelinek <jakub@redhat.com>
689
690 PR sanitizer/88426
691 * c-convert.c (convert): Call c_fully_fold before calling
692 ubsan_instrument_float_cast.
693
b7055028
SB
6942018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
695
696 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
697 setting "quals".
698
5b76e75f
SB
6992018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
700
701 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
702 after asm. Pass a flag for it to build_asm_expr.
703 * c-tree.h (build_asm_expr): Update declaration.
704 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
705 set ASM_INLINE_P.
706
30bd42b9
SB
7072018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
708
709 PR inline-asm/55681
710 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
711 combination of volatile and goto, in any order, without repetitions.
712
9df6c0e4
JB
7132018-12-04 James Norris <jnorris@codesourcery.com>
714 Cesar Philippidis <cesar@codesourcery.com>
715 Julian Brown <julian@codesourcery.com>
716
717 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
718 code.
719
f44697b7
RB
7202018-11-30 Richard Biener <rguenther@suse.de>
721
722 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
723 _Literal (type) { ... } as empty aggregate or vector constructor.
724
550dfbdc
MS
7252018-11-29 Martin Sebor <msebor@redhat.com>
726
727 PR c/88091
728 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
729 (convert_arguments): Add comments. Pass additional argument to
730 the function above.
731
673670da
MS
7322018-11-29 Martin Sebor <msebor@redhat.com>
733
734 PR c/88172
735 PR testsuite/88208
736 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
737
db1d09b0
MS
7382018-11-23 Martin Sebor <msebor@redhat.com>
739
740 PR testsuite/88098
741 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
742 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
743
98f08eb8
MS
7442018-11-20 Martin Sebor <msebor@redhat.com>
745
746 * c-parser.c (c_parser_has_attribute_expression): New function.
747 (c_parser_attribute): New function.
748 (c_parser_attributes): Move code into c_parser_attribute.
749 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
750
cd5da983
MS
7512018-11-15 Martin Sebor <msebor@redhat.com>
752
753 PR c/83656
754 * c-decl.c (header_for_builtin_fn): Declare.
755 (diagnose_mismatched_decls): Diagnose declarations of built-in
756 functions without a prototype.
757 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
758 (convert_argument): Same.
759 (convert_arguments): Factor code out into convert_argument.
760 Detect mismatches between built-in formal arguments in calls
761 to built-in without prototype.
762 (build_conditional_expr): Same.
763 (type_or_builtin_type): New function.
764 (convert_for_assignment): Add argument. Conditionally issue
765 warnings instead of errors for mismatches.
766
620e594b
DM
7672018-11-13 David Malcolm <dmalcolm@redhat.com>
768
769 * c-decl.c: Replace "source_location" with "location_t".
770 * c-tree.h: Likewise.
771 * c-typeck.c: Likewise.
772 * gimple-parser.c: Likewise.
773
3179ebae
JJ
7742018-11-09 Jakub Jelinek <jakub@redhat.com>
775
81a227c6
JJ
776 * c-parser.c (c_parser_omp_clause_final): Use
777 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
778 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
779 parsing instead of c_parser_paren_condition.
780 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
781 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
782 c_fully_fold instead of c_parser_condition.
783 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
784 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
785 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
786 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
787 c_parser_expr_no_commas instead of c_parser_expression.
788
98c91c56
JJ
789 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
790 reduction clause with inscan modifier.
791
3179ebae
JJ
792 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
793 clauses other than atomic_default_mem_order.
794
28567c40
JJ
7952018-11-08 Jakub Jelinek <jakub@redhat.com>
796
797 * c-parser.c: Include memmode.h.
798 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
799 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
800 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
801 task_reduction clauses.
802 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
803 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
804 section, or lvalue assignment expression.
805 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
806 (c_parser_omp_clause_lastprivate): Parse optional
807 conditional: modifier.
808 (c_parser_omp_clause_hint): Require constant integer expression rather
809 than just integer expression.
810 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
811 clause.
812 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
813 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
814 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
815 functions.
816 (c_parser_omp_clause_depend): Parse iterator modifier and handle
817 iterators. Parse mutexinoutset and depobj kinds.
818 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
819 callers.
820 (c_parser_omp_all_clauses): Likewise. Handle
821 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
822 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
823 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
824 default memory order from requires directive if any. Adjust
825 c_finish_omp_atomic caller.
826 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
827 (c_parser_omp_flush): Parse flush with memory-order-clause.
828 (c_parser_omp_for_loop): Allow NE_EXPR even in
829 OpenMP loops, adjust c_finish_omp_for caller.
830 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
831 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
832 Allow to be called while parsing combined parallel master.
833 Parse combined master taskloop{, simd}.
834 (c_parser_omp_parallel): Parse combined
835 parallel master{, taskloop{, simd}} constructs.
836 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
837 (OMP_TASKGROUP_CLAUSE_MASK): Define.
838 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
839 (OMP_TASKWAIT_CLAUSE_MASK): Define.
840 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
841 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
842 around teams body. Use SET_EXPR_LOCATION.
843 (c_parser_omp_target_data): Allow target data
844 with only use_device_ptr clauses.
845 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
846 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
847 (c_parser_omp_requires): New function.
848 (c_finish_taskloop_clauses): New function.
849 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
850 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
851 declaration. Disallow in_reduction clause when combined with parallel
852 master.
853 (c_parser_omp_construct): Adjust c_parser_omp_master and
854 c_parser_omp_taskgroup callers.
855 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
856 other than cancel.
857 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
858 like OMP_CLAUSE_REDUCTION.
859 (handle_omp_array_sections): Likewise. Call save_expr on array
860 reductions before calling build_index_type. Handle depend clauses
861 with iterators.
862 (struct c_find_omp_var_s): New type.
863 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
864 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
865 with static, runtime or auto schedule kinds. Call save_expr for whole
866 array reduction sizes. Diagnose reductions with zero sized elements
867 or variable length structures. Diagnose nogroup clause used with
868 reduction clause(s). Handle depend clause with
869 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
870 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
871 some different type for other kinds. Use build_unary_op with
872 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
873 Handle depend clauses with iterators. Remove no longer needed special
874 case that predetermined const qualified vars may be specified in
875 firstprivate clause. Complain if const qualified vars are mentioned
876 in data-sharing clauses other than firstprivate or shared. Use
877 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
878 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
879 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
880 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
881
7e2de6df
DM
8822018-10-29 David Malcolm <dmalcolm@redhat.com>
883
884 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
885 logic for change to name_hint::operator bool.
886 (undeclared_variable): Likewise.
887 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
888 (c_parser_parameter_declaration): Likewise.
889
9f936c86
JM
8902018-10-17 Joseph Myers <joseph@codesourcery.com>
891
892 * c-errors.c (pedwarn_c11): New function.
893 * c-parser.c (disable_extension_diagnostics): Save
894 warn_c11_c2x_compat and set it to 0.
895 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
896 (c_parser_static_assert_declaration_no_semi): Handle
897 _Static_assert without string constant.
898 * c-tree.h (pedwarn_c11): New prototype.
899
033eb567
DM
9002018-10-17 David Malcolm <dmalcolm@redhat.com>
901
902 * Make-lang.in (selftest-c): New.
903 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
904 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
905 from gcc/Makefile.in.
906
0edf3afe
RB
9072018-10-02 Richard Biener <rguenther@suse.de>
908
909 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
910
8313a764
JM
9112018-09-26 Joseph Myers <joseph@codesourcery.com>
912
913 PR c/87390
914 * c-typeck.c (build_binary_op): Use excess precision for
915 comparisons of integers and floating-point for C11 and later.
916
ce6f0888
MJ
9172018-09-26 Martin Jambor <mjambor@suse.cz>
918
919 PR c/87347
920 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 921 comment.
ce6f0888 922
9c4a4b3c
DM
9232018-09-17 David Malcolm <dmalcolm@redhat.com>
924
925 * c-objc-common.c (range_label_for_type_mismatch::get_text):
926 Update for new param.
927 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
928 Likewise.
929
80c6d1f4
MJ
9302018-09-17 Martin Jambor <mjambor@suse.cz>
931
932 PR c/63886
933 * c-parser.c: (warn_for_abs): New function.
934 (c_parser_postfix_expression_after_primary): Call it.
935
4a426e36
BE
9362018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
937
938 * c-typeck.c (digest_init): Shorten overlength strings.
939
6d900107
BE
9402018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
941
942 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
943
b5764229
BE
9442018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
945
946 * c-decl.c (finish_decl): Call braced_list_to_string here ...
947 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
948
22eea6b2
AM
9492018-08-30 Alexander Monakov <amonakov@ispras.ru>
950
951 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
952 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
953
85204e23
DM
9542018-08-27 David Malcolm <dmalcolm@redhat.com>
955
956 PR 87091
957 * c-decl.c (implicitly_declare): Update call to
958 maybe_add_include_fixit to suggest overriding the location, as it
959 is for a note.
960 * c-objc-common.c (c_tree_printer): Update for conversion of
961 show_caret_p to a tri-state.
962
3d78e008
ML
9632018-08-27 Martin Liska <mliska@suse.cz>
964
965 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
966 fndecl_built_in_p and remove check for FUNCTION_DECL if
967 possible.
3d78e008
ML
968 (diagnose_mismatched_decls): Likewise.
969 (merge_decls): Likewise.
970 (warn_if_shadowing): Likewise.
971 (pushdecl): Likewise.
972 (implicitly_declare): Likewise.
973 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
974 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
975 * c-typeck.c (build_function_call_vec): Likewise.
976 (convert_arguments): Likewise.
977
097f82ec
DM
9782018-08-20 David Malcolm <dmalcolm@redhat.com>
979
980 PR other/84889
981 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
982 (diagnose_mismatched_decls): Likewise, in various places.
983 (warn_if_shadowing): Likewise.
984 (implicit_decl_warning): Likewise.
985 (implicitly_declare): Likewise.
986 (undeclared_variable): Likewise.
987 (declare_label): Likewise.
988 (grokdeclarator): Likewise.
989 (start_function): Likewise.
990 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
991 (c_parser_parameter_declaration): Likewise.
992 (c_parser_binary_expression): Likewise.
993 * c-typeck.c (c_expr_sizeof_expr): Likewise.
994 (parser_build_binary_op): Likewise.
995 (build_unary_op): Likewise.
996 (error_init): Likewise.
997 (pedwarn_init): Likewise.
998 (warning_init): Likewise.
999 (convert_for_assignment): Likewise.
1000
96e6ae57
DM
10012018-08-15 David Malcolm <dmalcolm@redhat.com>
1002
1003 * c-objc-common.c: Include "gcc-rich-location.h".
1004 (c_tree_printer): Move implemenation of '%T' to...
1005 (print_type): ...this new function.
1006 (range_label_for_type_mismatch::get_text): New function.
1007 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1008 range for the various ic_argpass cases.
1009 (class maybe_range_label_for_tree_type_mismatch): New class.
1010 (build_binary_op): Use it when calling binary_op_error.
1011
0cd020ae 10122018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1013
0cd020ae
PK
1014 * c-decl.c (start_decl): Do not warn if variables is named as main
1015 and is a local variable.
1016
72733314
IS
10172018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1018
1019 PR c/19315
1020 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1021 objects of unknown size.
1022
23aa9f7c
MS
10232018-08-13 Martin Sebor <msebor@redhat.com>
1024
1025 PR tree-optimization/71625
1026 * c-parser.c (c_parser_declaration_or_fndef): Call
1027 braced_list_to_string.
1028
e5e7e50d
BH
10292018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1030
1031 PR c/86690
1032 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1033 errors.
1034
8a45b051
MS
10352018-08-01 Martin Sebor <msebor@redhat.com>
1036
1037 PR tree-optimization/86650
1038 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1039 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1040
5922dcb5
JJ
10412018-08-01 Jakub Jelinek <jakub@redhat.com>
1042
1043 PR c/85704
1044 * c-typeck.c (init_field_decl_cmp): New function.
1045 (output_pending_init_elements): Use it for field comparisons
1046 instead of pure bit_position comparisons.
1047
9b452033
JJ
10482018-07-12 Jakub Jelinek <jakub@redhat.com>
1049
1050 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1051 type here, instead add "omp declare target implicit" attribute.
1052 (finish_decl): Diagnose vars without mappable type here.
1053
ab20d992
JJ
10542018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1055 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1056 Cesar Philippidis <cesar@codesourcery.com>
1057
1058 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1059 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1060 to their non-present_or_* counterparts. Make 'self' an alias to
1061 PRAGMA_OACC_CLAUSE_HOST.
1062 (c_parser_oacc_data_clause): Update GOMP mappings for
1063 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1064 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1065 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1066 Remove support for present_or_* clauses.
1067 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1068 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1069 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1070 (OACC_DATA_CLAUSE_MASK): Likewise.
1071 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1072 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1073 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1074 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1075 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1076
e197e64e
KV
10772018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1078
1079 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1080 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1081 (c_parser_gimple_unary_expression): Likewise.
1082
487f2f61
JJ
10832018-06-15 Jakub Jelinek <jakub@redhat.com>
1084
1085 PR c/86093
1086 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1087 before doing POINTER_DIFF_EXPR.
1088
e4d44a37
MP
10892018-06-07 Marek Polacek <polacek@redhat.com>
1090
1091 PR c/85318
1092 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1093 for loop initial declarations.
1094
b67b9225
DP
10952018-05-30 David Pagan <dave.pagan@oracle.com>
1096
1097 PR c/55976
1098 * c-decl.c (grokdeclarator): Update check for return type warnings.
1099 (start_function): Likewise.
1100 (finish_function): Likewise.
1101 * c-typeck.c (c_finish_return): Update check for return type warnings.
1102 Pass OPT_Wreturn_type to pedwarn when appropriate.
1103
c566cc9f
RS
11042018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1105
1106 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1107 __FMA_EXPR handlng.
1108
e4f81565
RS
11092018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1110
1111 * gimple-parser.c: Include internal-fn.h.
1112 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1113 (c_parser_gimple_call_internal): New function.
1114 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1115 Fix typos in comment.
1116
79e7b1fe
JJ
11172018-05-10 Jakub Jelinek <jakub@redhat.com>
1118
1119 PR c++/85662
1120 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1121 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1122 fold_convert_loc.
1123 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1124 fold_offsetof_1, pass argtype as TYPE to it and drop the
1125 fold_convert_loc.
1126
f7584c81
DP
11272018-05-02 David Pagan <dave.pagan@oracle.com>
1128
1129 PR c/30552
1130 * c-decl.c (old_style_parameter_scope): New function.
1131 * c-parser.c (c_parser_postfix_expression): Check for statement
1132 expressions in old-style function parameter list declarations.
1133 * c-parser.h (old_style_parameter_scope): New extern declaration.
1134
b33a0cb3
JJ
11352018-04-25 Jakub Jelinek <jakub@redhat.com>
1136
1137 PR sanitizer/84307
1138 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1139 it is not TREE_STATIC.
1140 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1141 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1142 its COMPOUND_LITERAL_EXPR_DECL.
1143
c5c5822a
JM
11442018-03-21 Joseph Myers <joseph@codesourcery.com>
1145
1146 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1147 where all functions return the same _FloatN or _FloatNx type,
1148 treat integer types as _Float64 instead of double.
1149
aa1c9429
JJ
11502018-03-21 Jakub Jelinek <jakub@redhat.com>
1151
1152 PR c/84999
1153 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1154 building vector comparison, diagnose it and return error_mark_node.
1155
9bb45a95
JJ
11562018-03-15 Jakub Jelinek <jakub@redhat.com>
1157
1158 PR c/84853
1159 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1160 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1161 INTEGER_TYPE element type.
1162
ada6bad9
DP
11632018-03-13 David Pagan <dave.pagan@oracle.com>
1164
1165 PR c/46921
1166 * c-typeck.c (output_init_element): Ensure field initializer
1167 expression is always evaluated if there are side effects.
1168
849bbdb9
JJ
11692018-03-06 Jakub Jelinek <jakub@redhat.com>
1170
1171 PR c/84721
1172 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1173 !building_stmt_list_p ().
1174
d74641bd
RS
11752018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1176
1177 PR c/84305
1178 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1179 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1180 and include the BIND_EXPR in the list of things that need to be
1181 pre-evaluated.
1182
0444aa9c
NS
11832018-02-09 Nathan Sidwell <nathan@acm.org>
1184
1185 PR c/84293
1186 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1187 to strict_aliasing_warning.
1188
7c30b12a
PC
11892018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1190
1191 * c-typeck.c (really_start_incremental_init, push_init_level,
1192 set_nonincremental_init, output_init_element, process_init_element):
1193 Use DECL_UNNAMED_BIT_FIELD.
1194
2be4dfcb
MP
11952018-01-31 Marek Polacek <polacek@redhat.com>
1196
1197 PR c/81779
1198 * c-parser.c (c_parser_compound_statement_nostart): Call
1199 expansion_point_location_if_in_system_header.
1200
bb9869d5
DM
12012018-01-17 David Malcolm <dmalcolm@redhat.com>
1202
1203 PR c++/83814
1204 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1205 the C part.
1206
b4923738
JJ
12072018-01-13 Jakub Jelinek <jakub@redhat.com>
1208
1209 PR c/83801
1210 * c-tree.h (decl_constant_value_1): Add a bool argument.
1211 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1212 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1213 (decl_constant_value): Adjust caller.
1214 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1215 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1216 decl_constant_value returns initializer that has BLKmode or
1217 array type.
1218 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1219
928686b1
RS
12202018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1221 Alan Hayward <alan.hayward@arm.com>
1222 David Sherwood <david.sherwood@arm.com>
1223
1224 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1225 TYPE_VECTOR_SUBPARTS.
1226
85ec4feb
JJ
12272018-01-03 Jakub Jelinek <jakub@redhat.com>
1228
1229 Update copyright years.
1230
913884f7
JJ
12312018-01-01 Jakub Jelinek <jakub@redhat.com>
1232
1233 PR c/83595
1234 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1235 c_parser_conditional_expression, c_parser_cast_expression,
1236 c_parser_sizeof_expression, c_parser_alignof_expression,
1237 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1238 c_parser_transaction_expression): Use set_error () method instead
1239 of setting value member to error_mark_node.
1240
c6cfa2bf
MM
12412017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1242
1243 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1244 and _Float<N>X built-in functions.
1245
11d29d63
JJ
12462017-12-22 Jakub Jelinek <jakub@redhat.com>
1247
14ec014e
JJ
1248 PR debug/83550
1249 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1250 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1251 incomplete vars rather than after it.
1252
11d29d63
JJ
1253 PR debug/83547
1254 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1255 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1256 and consider empty ones if there are no other stmts. For
1257 -Wunused-value walk all statements before the one only followed by
1258 DEBUG_BEGIN_STMTs.
1259
170a8bd6 12602017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1261 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1262
1263 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1264 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1265 (c_parser_do_statement): Likewise.
1266 (c_parser_for_statement): Likewise.
1267 (c_parser_statement_after_labels): Adjust calls to above.
1268 (c_parse_pragma_ivdep): New static function.
1269 (c_parser_pragma_unroll): Likewise.
1270 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1271 <PRAGMA_UNROLL>: New case.
1272
01512446
JJ
12732017-12-19 Jakub Jelinek <jakub@redhat.com>
1274
1275 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1276 perform_integral_promotions, digest_init): Replace Yoda conditions
1277 with typical order conditions.
1278 * c-decl.c (check_bitfield_type_and_width): Likewise.
1279
c65e18d3
BE
12802017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1281
1282 * c-typeck.c (c_safe_arg_type_equiv_p,
1283 c_safe_function_type_cast_p): New function.
1284 (build_c_cast): Implement -Wcast-function-type.
1285
b7280579
RB
12862017-12-14 Richard Biener <rguenther@suse.de>
1287
1288 PR c/83415
1289 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1290 like REALPART_EXPR for the behavior of whether its operand
1291 is an lvalue.
1292
49e6a6c0
MP
12932017-12-12 Marek Polacek <polacek@redhat.com>
1294
1295 PR c/82679
1296 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1297
ab20d992 12982017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1299
1300 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1301 * c-parser.c (add_debug_begin_stmt): New.
1302 (c_parser_declaration_or_fndef): Call it.
1303 (c_parser_compound_statement_nostart): Likewise.
1304 (c_parser_statement_after_labels): Likewise.
1305 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1306
4b2b493f
JM
13072017-12-07 Joseph Myers <joseph@codesourcery.com>
1308
1309 * c-decl.c (build_compound_literal): Add parameter alignas_align
1310 and set alignment of decl if nonzero.
1311 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1312 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1313 qualifier.
1314 (c_parser_struct_declaration): Update syntax comment.
1315 (c_parser_type_name): Add alignas_ok argument and pass it to
1316 c_parser_declspecs.
1317 (c_parser_cast_expression): Pass true to c_parser_type_name and
1318 give error if a cast used an _Alignas specifier.
1319 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1320 give error if sizeof (type-name) used an _Alignas specifier.
1321 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1322 give error if _Alignof (type-name) used an _Alignas specifier.
1323 (c_parser_postfix_expression_after_paren_type): Check specified
1324 alignment for a compound literal and pass it to
1325 build_compound_literal.
1326 * c-parser.h (c_parser_type_name): Update prototype.
1327 * c-tree.h (build_compound_literal): Update prototype.
1328
5d9ae53d
MS
13292017-12-07 Martin Sebor <msebor@redhat.com>
1330
1331 PR c/81544
1332 * c-decl.c (c_decl_attributes): Look up existing declaration and
1333 pass it to decl_attributes.
1334
c79144f8
DM
13352017-12-06 David Malcolm <dmalcolm@redhat.com>
1336
1337 PR c/83236
1338 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1339 reserved for use by the implementation.
1340
613bc14f
DM
13412017-12-06 David Malcolm <dmalcolm@redhat.com>
1342
1343 * c-decl.c: Include "c-family/c-spellcheck.h".
1344
05abad4c
ML
13452017-12-05 Martin Liska <mliska@suse.cz>
1346 Jakub Jelinek <jakub@redhat.com>
1347
1348 * c-typeck.c (pointer_diff): Add new argument and instrument
1349 pointer subtraction.
1350 (build_binary_op): Similar for pointer comparison.
1351
cc6534d4
JJ
13522017-12-01 Jakub Jelinek <jakub@redhat.com>
1353
65791f42
JJ
1354 PR c/79153
1355 * c-parser.c: Include tree-iterator.h.
1356 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1357 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1358 on it.
1359
cc6534d4
JJ
1360 PR c/83222
1361 * c-tree.h (decl_constant_value_1): Declare.
1362 * c-typeck.c (decl_constant_value_1): New function.
1363 (decl_constant_value): Use it.
1364 * c-fold.c (c_fully_fold_internal): If in_init, use
1365 decl_constant_value_1 instead of decl_constant_value.
1366
5de73c05
JJ
13672017-11-30 Jakub Jelinek <jakub@redhat.com>
1368
1369 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1370
058f0b9e
JJ
13712017-11-28 Jakub Jelinek <jakub@redhat.com>
1372
1373 PR sanitizer/81275
1374 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1375 c_switch_covers_all_cases_p returns true.
1376
5e9d6aa4 13772017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1378 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1379
1380 * Make-lang.in (c/c-array-notation.o): Remove.
1381 * c-array-notation.c: Delete.
1382 * c-decl.c: Remove cilkplus condition.
1383 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1384 c_parser_cilk_verify_simd, c_parser_array_notation,
1385 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1386 c_parser_cilk_simd_fn_vector_attrs,
1387 c_finish_cilk_simd_fn_tokens): Delete.
1388 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1389 (c_parser_direct_declarator_inner): Ditto.
1390 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1391 (c_parser_attributes, c_parser_compound_statement,
1392 c_parser_statement_after_labels, c_parser_if_statement,
1393 c_parser_switch_statement, c_parser_while_statement,
1394 c_parser_do_statement, c_parser_for_statement,
1395 c_parser_unary_expression, c_parser_postfix_expression,
1396 c_parser_postfix_expression_after_primary,
1397 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1398 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1399 support.
1400 * c-typeck.c (build_array_ref, build_function_call_vec,
1401 convert_arguments,
1402 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1403 c_finish_loop, build_binary_op): Remove cilkplus support.
1404
9e851845
JJ
14052017-11-28 Jakub Jelinek <jakub@redhat.com>
1406
1407 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1408 of build3.
1409
ab20d992 14102017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
1411
1412 * Make-lang.in (c.install-plugin): Install backend import library.
1413
41521dee
JJ
14142017-11-23 Jakub Jelinek <jakub@redhat.com>
1415
1416 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1417 pragma_stmt context.
1418
ac9effed
EB
14192017-11-23 Mike Stump <mikestump@comcast.net>
1420 Eric Botcazou <ebotcazou@adacore.com>
1421
1422 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1423 ANNOTATE_EXPR.
1424 (c_parser_do_statement): Likewise.
1425 (c_parser_for_statement): Likewise.
1426
ce95abc4
DM
14272017-11-22 David Malcolm <dmalcolm@redhat.com>
1428
1429 PR c++/62170
1430 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1431 bool to bool *. Within '%T' handling, if showing an "aka", use
1432 "quoted" param to add appropriate quoting.
1433
974aedcc
MP
14342017-11-22 Marek Polacek <polacek@redhat.com>
1435
1436 PR c++/60336
1437 PR middle-end/67239
1438 PR target/68355
1439 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1440
d4300cc6
DM
14412017-11-21 David Malcolm <dmalcolm@redhat.com>
1442
1443 PR c/83056
1444 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1445 earlier failed lookups.
1446
1af4ebf5
MG
14472017-11-21 Marc Glisse <marc.glisse@inria.fr>
1448
1449 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1450 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1451
26edace6
DM
14522017-11-20 David Malcolm <dmalcolm@redhat.com>
1453
1454 PR c/81404
1455 * c-decl.c: Include "c-family/known-headers.h".
1456 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1457 to known-headers.cc.
1458 (class suggest_missing_header): Move to known-header.h.
1459 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1460 than get_c_name_hint.
1461
b1212255
DM
14622017-11-20 David Malcolm <dmalcolm@redhat.com>
1463
1464 * c-decl.c (get_c_name_hint): New function.
1465 (class suggest_missing_header): New class.
1466 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1467 suggest missing headers to the user.
1468
6c7a259b
DM
14692017-11-20 David Malcolm <dmalcolm@redhat.com>
1470
1471 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1472 Include "c-family/name-hint.h"
1473 (implicit_decl_warning): Convert "hint" from
1474 const char * to name_hint. Pass location to
1475 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1476 warning was not printed.
1477 (undeclared_variable): Likewise for "guessed_id".
1478 (lookup_name_fuzzy): Convert return type from const char *
1479 to name_hint. Add location_t param.
1480 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1481 Include "c-family/name-hint.h"
1482 (c_parser_declaration_or_fndef): Convert "hint" from
1483 const char * to name_hint. Pass location to lookup_name_fuzzy.
1484 (c_parser_parameter_declaration): Likewise.
1485
f9c59f7e
JJ
14862017-11-19 Jakub Jelinek <jakub@redhat.com>
1487
1488 PR c/66618
1489 PR c/69960
1490 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1491 where needed.
1492 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1493 handle_omp_array_sections): Likewise.
1494 (digest_init): Don't call decl_constant_value_for_optimization.
1495 * c-tree.h (decl_constant_value_for_optimization): Removed.
1496 * c-fold.c (c_fold_array_ref): New function.
1497 (c_fully_fold_internal): Add LVAL argument, propagate it through
1498 recursive calls. For VAR_P call decl_constant_value and
1499 unshare if not LVAL and either optimizing or IN_INIT. Remove
1500 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1501 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1502 (c_fully_fold): Add LVAL argument, pass it through to
1503 c_fully_fold_internal.
1504 (decl_constant_value_for_optimization): Removed.
1505
3ca0dc60
JM
15062017-11-15 Joseph Myers <joseph@codesourcery.com>
1507
1508 PR c/81156
1509 * c-parser.c (check_tgmath_function): New function.
1510 (enum tgmath_parm_kind): New enum.
1511 (c_parser_postfix_expression): Handle __builtin_tgmath.
1512
64a5912c
DM
15132017-10-31 David Malcolm <dmalcolm@redhat.com>
1514
1515 * c-decl.c (implicit_decl_warning): Update for renaming of
1516 pedwarn_at_rich_loc and warning_at_rich_loc.
1517 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1518 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1519 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1520 (c_parser_struct_or_union_specifier): Likewise for renaming of
1521 pedwarn_at_rich_loc.
1522 (c_parser_parameter_declaration): Likewise for renaming of
1523 error_at_rich_loc.
1524 * c-typeck.c (build_component_ref): Likewise.
1525 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1526 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1527 (set_init_label): Likewise for renaming of error_at_rich_loc.
1528
c1136864
RB
15292017-10-30 Richard Biener <rguenther@suse.de>
1530
1531 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1532 stmts.
1533
ee5fd23a
MM
15342017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1535
1536 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1537 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1538
1a59ccf2
DM
15392017-10-25 David Malcolm <dmalcolm@redhat.com>
1540
1541 PR c/7356
1542 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1543 semicolons.
1544
bc1a75dd
JJ
15452017-10-25 Jakub Jelinek <jakub@redhat.com>
1546
1547 PR libstdc++/81706
1548 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1549 newdecl to corresponding __builtin_ if any.
1550
ff1ff960
PC
15512017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1552
1553 PR c++/82466
1554 * c-decl.c (diagnose_mismatched_decls): Use
1555 OPT_Wbuiltin_declaration_mismatch.
1556
62e1c678
DM
15572017-10-12 David Malcolm <dmalcolm@redhat.com>
1558
1559 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1560 use it to guard calls to maybe_suggest_missing_token_insertion.
1561 (c_parser_parms_list_declarator): Override default value of new
1562 "type_is_unique" param to c_parser_require.
1563 (c_parser_asm_statement): Likewise.
1564 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1565 defaulting to true.
1566
a92f6726
NS
15672017-10-11 Nathan Sidwell <nathan@acm.org>
1568
1569 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1570
8e6cdc90
RS
15712017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1572
1573 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1574 operating on trees as wide_ints.
1575 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1576 (c_tree_equal): Likewise.
1577
8139a48e
DM
15782017-10-04 David Malcolm <dmalcolm@redhat.com>
1579
1580 * c-decl.c (push_parm_decl): Store c_parm's location into the
1581 PARAM_DECL.
1582 (build_c_parm): Add "loc" param and store it within the c_parm.
1583 * c-parser.c (struct c_parser): Add "last_token_location" field.
1584 (c_parser_consume_token): Store location of the token into the
1585 new field.
1586 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1587 when handling a FUNCTION_DECL, if it doesn't already have them.
1588 (c_parser_parameter_declaration): Generate a location for the
1589 parameter, and pass it to the call to build_c_parm.
1590 * c-tree.h (struct c_parm): Add field "loc".
1591 (build_c_parm): Add location_t param.
1592 * c-typeck.c (get_fndecl_argument_location): New function.
1593 (inform_for_arg): New function.
1594 (convert_for_assignment): Use inform_for_arg when dealing with
1595 ic_argpass.
1596
2a389958
JJ
15972017-09-29 Jakub Jelinek <jakub@redhat.com>
1598
7d386d45
JJ
1599 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1600 width is non-NULL.
1601 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1602 don't SET_DECL_C_BIT_FIELD here.
1603
2a389958
JJ
1604 PR c/82340
1605 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1606 instead of trying to set just TREE_READONLY manually.
1607
ebc6a85e
TV
16082017-09-16 Tom de Vries <tom@codesourcery.com>
1609
1610 PR c/81875
1611 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1612 cond itself.
1613
bb75facd
JM
16142017-09-15 Joseph Myers <joseph@codesourcery.com>
1615
1616 PR c/82071
1617 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1618 for C11.
1619 (build_conditional_expr): For C11, generate result with excess
1620 precision when one argument is an integer and the other is of a
1621 type using excess precision.
1622
1d933576
BE
16232017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1624
1625 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1626
267bbb6f
MP
16272017-09-13 Marek Polacek <polacek@redhat.com>
1628
1629 PR c/82167
1630 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1631 than expr.original_type.
1632
6836632e
NS
16332017-09-12 Nathan Sidwell <nathan@acm.org>
1634
1635 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1636 resort_sorted_fields): Moved from c-family/c-common.c.
1637 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1638
e035be33
JM
16392017-09-01 Joseph Myers <joseph@codesourcery.com>
1640
1641 PR c/82071
1642 * c-typeck.c (build_atomic_assign): Handle argument with excess
1643 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1644 argument passed to build_binary_op and convert_for_assignment but
1645 not for call to c_fully_fold.
1646 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1647 Ensure build_binary_op is called with argument with original
1648 semantic type. Avoid calling c_fully_fold with an
1649 EXCESS_PRECISION_EXPR from build_binary_op.
1650
d2e05fcb
JJ
16512017-09-01 Jakub Jelinek <jakub@redhat.com>
1652
1653 PR c/81887
1654 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1655
b397965c
RS
16562017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1657 Alan Hayward <alan.hayward@arm.com>
1658 David Sherwood <david.sherwood@arm.com>
1659
1660 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1661 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1662 m1 and m2 to the signed equivalent of a fixed-point
1663 SCALAR_TYPE_MODE.
1664
14e18d71
DM
16652017-08-24 David Malcolm <dmalcolm@redhat.com>
1666
1667 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1668 than CAN_HAVE_LOCATION_P when determining whether to use the
1669 location_t value within "value".
1670
7f204c0f
DM
16712017-08-21 David Malcolm <dmalcolm@redhat.com>
1672
1673 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1674 rather than peeking the location of the first token.
1675 * c-tree.h (c_expr::get_location): New method.
1676
2f687306
DM
16772017-08-21 David Malcolm <dmalcolm@redhat.com>
1678
1679 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1680 to check_function_arguments.
1681
3e7b80d7
MP
16822017-08-18 Marek Polacek <polacek@redhat.com>
1683
1684 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1685 commentary.
1686
00aa1fa2
L
16872017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1688
1689 PR c/53037
1690 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1691 (check_bitfield_type_and_width): Don't allow bit-field with
1692 warn_if_not_aligned type.
1693
da67acb9
MS
16942017-08-14 Martin Sebor <msebor@redhat.com>
1695
1696 PR c/81117
1697 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1698
bb85aa74
MP
16992017-08-11 Marek Polacek <polacek@redhat.com>
1700
1701 PR c/81795
1702 * c-decl.c (pushtag): Only print inform if the warning was printed.
1703 (grokdeclarator): Likewise.
1704
32129a17
DM
17052017-08-10 David Malcolm <dmalcolm@redhat.com>
1706
1707 * c-parser.c (c_parser_error): Rename to...
1708 (c_parser_error_richloc): ...this, making static, and adding
1709 "richloc" parameter, passing it to the c_parse_error call,
1710 rather than calling c_parser_set_source_position_from_token.
1711 (c_parser_error): Reintroduce, reimplementing in terms of the
1712 above, converting return type from void to bool.
1713 (class token_pair): New class.
1714 (struct matching_paren_traits): New struct.
1715 (matching_parens): New typedef.
1716 (struct matching_brace_traits): New struct.
1717 (matching_braces): New typedef.
1718 (get_matching_symbol): New function.
1719 (c_parser_require): Add param MATCHING_LOCATION, using it to
1720 highlight matching "opening" tokens for missing "closing" tokens.
1721 (c_parser_skip_until_found): Likewise.
1722 (c_parser_static_assert_declaration_no_semi): Convert explicit
1723 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1724 class matching_parens, so that the pertinent open parenthesis is
1725 highlighted when there are problems locating the close
1726 parenthesis.
1727 (c_parser_struct_or_union_specifier): Likewise.
1728 (c_parser_typeof_specifier): Likewise.
1729 (c_parser_alignas_specifier): Likewise.
1730 (c_parser_simple_asm_expr): Likewise.
1731 (c_parser_braced_init): Likewise, for matching_braces.
1732 (c_parser_paren_condition): Likewise, for matching_parens.
1733 (c_parser_switch_statement): Likewise.
1734 (c_parser_for_statement): Likewise.
1735 (c_parser_asm_statement): Likewise.
1736 (c_parser_asm_operands): Likewise.
1737 (c_parser_cast_expression): Likewise.
1738 (c_parser_sizeof_expression): Likewise.
1739 (c_parser_alignof_expression): Likewise.
1740 (c_parser_generic_selection): Likewise.
1741 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1742 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1743 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1744 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1745 c_parser_skip_until_found call.
1746 (c_parser_objc_class_definition): Use class matching_parens as
1747 above.
1748 (c_parser_objc_method_decl): Likewise.
1749 (c_parser_objc_try_catch_finally_statement): Likewise.
1750 (c_parser_objc_synchronized_statement): Likewise.
1751 (c_parser_objc_at_property_declaration): Likewise.
1752 (c_parser_oacc_wait_list): Likewise.
1753 (c_parser_omp_var_list_parens): Likewise.
1754 (c_parser_omp_clause_collapse): Likewise.
1755 (c_parser_omp_clause_default): Likewise.
1756 (c_parser_omp_clause_if): Likewise.
1757 (c_parser_omp_clause_num_threads): Likewise.
1758 (c_parser_omp_clause_num_tasks): Likewise.
1759 (c_parser_omp_clause_grainsize): Likewise.
1760 (c_parser_omp_clause_priority): Likewise.
1761 (c_parser_omp_clause_hint): Likewise.
1762 (c_parser_omp_clause_defaultmap): Likewise.
1763 (c_parser_oacc_single_int_clause): Likewise.
1764 (c_parser_omp_clause_ordered): Likewise.
1765 (c_parser_omp_clause_reduction): Likewise.
1766 (c_parser_omp_clause_schedule): Likewise.
1767 (c_parser_omp_clause_num_teams): Likewise.
1768 (c_parser_omp_clause_thread_limit): Likewise.
1769 (c_parser_omp_clause_aligned): Likewise.
1770 (c_parser_omp_clause_linear): Likewise.
1771 (c_parser_omp_clause_safelen): Likewise.
1772 (c_parser_omp_clause_simdlen): Likewise.
1773 (c_parser_omp_clause_depend): Likewise.
1774 (c_parser_omp_clause_map): Likewise.
1775 (c_parser_omp_clause_device): Likewise.
1776 (c_parser_omp_clause_dist_schedule): Likewise.
1777 (c_parser_omp_clause_proc_bind): Likewise.
1778 (c_parser_omp_clause_uniform): Likewise.
1779 (c_parser_omp_for_loop): Likewise.
1780 (c_parser_cilk_clause_vectorlength): Likewise.
1781 (c_parser_cilk_clause_linear): Likewise.
1782 (c_parser_transaction_expression): Likewise.
1783 * c-parser.h (c_parser_require): Add param matching_location with
1784 default UNKNOWN_LOCATION.
1785 (c_parser_error): Convert return type from void to bool.
1786 (c_parser_skip_until_found): Add param matching_location with
1787 default UNKNOWN_LOCATION.
1788
30af3a2b
MP
17892017-08-09 Marek Polacek <polacek@redhat.com>
1790
1791 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1792 * c-tree.h (build_external_ref): Update declaration.
1793 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1794 (build_external_ref): Change the type of a parameter to bool.
1795 (parser_build_binary_op): Use true/false instead of 1/0.
1796 (pointer_diff): Likewise.
1797 (build_modify_expr): Likewise.
1798 (set_designator): Change the type of a parameter to bool.
1799 (set_init_index): Use true/false instead of 1/0.
1800 (set_init_label): Likewise.
1801 (output_init_element): Change the type of a parameter to bool.
1802 (output_pending_init_elements): Use true/false instead of 1/0.
1803 (process_init_element): Likewise.
1804 (build_binary_op): Change the type of a parameter to bool.
1805
296c53ac
MP
18062017-08-09 Marek Polacek <polacek@redhat.com>
1807
1808 PR c/81233
1809 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1810 Call emit_diagnostic_valist instead of pedwarn.
1811 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1812 Print the relevant types in diagnostics.
1813
a32c8316
MP
18142017-08-09 Marek Polacek <polacek@redhat.com>
1815
1816 PR c/81417
1817 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 1818 build_conditional_expr.
a32c8316
MP
1819 * c-parser.c (c_parser_conditional_expression): Create locations for
1820 EXP1 and EXP2 from their source ranges. Pass the locations down to
1821 build_conditional_expr.
1822 * c-tree.h (build_conditional_expr): Update declaration.
1823 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1824 For -Wsign-compare, also print the types.
1825
314e6352
ML
18262017-08-08 Martin Liska <mliska@suse.cz>
1827
1828 * c-convert.c: Include header files.
1829 * c-typeck.c: Likewise.
1830
577eec56
ML
18312017-08-07 Martin Liska <mliska@suse.cz>
1832
1833 * c-parser.c (c_parser_attributes): Canonicalize name of an
1834 attribute.
1835
f7b6353a
MP
18362017-08-02 Marek Polacek <polacek@redhat.com>
1837
1838 PR c/81289
1839 * c-parser.c (c_parser_unary_expression): Use set_error.
1840
8a6eab34
MP
1841 PR c/81448
1842 PR c/81306
1843 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
1844 warnings. Avoid walking MACRO_MAP_LOCATIONS.
1845
ab20d992 18462017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
1847 Martin Liska <mliska@suse.cz>
1848
1849 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 1850 statement.
7fef86d3 1851
f34ebeb2
ML
18522017-07-31 Martin Liska <mliska@suse.cz>
1853
1854 PR sanitize/81530
1855 * c-convert.c (convert): Guard condition with flag_sanitize_p
1856 also with current_function_decl non-null equality.
1857 * c-decl.c (grokdeclarator): Likewise.
1858 * c-typeck.c (build_binary_op): Likewise.
1859
8595f67b
MP
18602017-07-25 Marek Polacek <polacek@redhat.com>
1861
1862 * c-decl.c (grokfield): Remove local variable.
1863
d49718d6
MP
18642017-07-25 Marek Polacek <polacek@redhat.com>
1865
1866 PR c/81364
1867 * c-parser.c (c_parser_else_body): Don't warn about multistatement
1868 macro expansion if the body is in { }.
1869 (c_parser_while_statement): Likewise.
1870 (c_parser_for_statement): Likewise.
1871
ff22eb12
NS
18722017-07-18 Nathan Sidwell <nathan@acm.org>
1873
1874 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
1875
eea77d1f
DM
18762017-07-14 David Malcolm <dmalcolm@redhat.com>
1877
1878 * c-decl.c (implicitly_declare): When suggesting a missing
1879 #include, provide a fix-it hint.
1880
b6f43128
DM
18812017-07-06 David Malcolm <dmalcolm@redhat.com>
1882
1883 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
1884 and call that instead.
1885 * c-tree.h (selftest::run_c_tests): New decl.
1886
3e2becc4
MP
18872017-06-26 Marek Polacek <polacek@redhat.com>
1888
1889 PR c/80116
1890 * c-parser.c (c_parser_if_body): Set the location of the
1891 body of the conditional after parsing all the labels. Call
1892 warn_for_multistatement_macros.
1893 (c_parser_else_body): Likewise.
1894 (c_parser_switch_statement): Likewise.
1895 (c_parser_while_statement): Likewise.
1896 (c_parser_for_statement): Likewise.
1897 (c_parser_statement): Add a default argument. Save the location
1898 after labels have been parsed.
1899 (c_parser_c99_block_statement): Likewise.
1900
343ae898
RB
19012017-06-19 Richard Biener <rguenther@suse.de>
1902
1903 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1904 negated _Literals to parse _Literal (int) -1.
1905
45b2222a
ML
19062017-06-13 Martin Liska <mliska@suse.cz>
1907
1908 PR sanitize/78204
1909 * c-convert.c (convert): Use sanitize_flags_p.
1910 * c-decl.c (grokdeclarator): Likewise.
1911 * c-typeck.c (convert_for_assignment): Likewise.
1912 (c_finish_return): Likewise.
1913 (build_binary_op): Likewise.
1914
8ab7005b
JJ
19152017-06-08 Jakub Jelinek <jakub@redhat.com>
1916
1917 PR c/81006
1918 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
1919 to sizetype before size_binop.
1920
363dc72c
JJ
19212017-06-07 Jakub Jelinek <jakub@redhat.com>
1922
1923 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
1924 of TDI_generic.
1925
dc949728
MP
19262017-06-06 Marek Polacek <polacek@redhat.com>
1927
1928 PR c/79983
1929 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
1930 ref.
1931 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
1932
40ffd95f
BE
19332017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1934
1935 * c-parser.c (c_parser_binary_expression): Implement the
1936 -Wsizeof_pointer_div warning.
1937 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
1938 from a parenthesized expression.
1939 (c_parser_expr_list): Use c_last_sizeof_loc.
1940 * c-tree.h (c_last_sizeof_loc): New external.
1941 * c-typeck.c (c_last_sizeof_loc): New variable.
1942 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
1943
9fc5e7a4
MM
19442017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
1945
1946 PR testsuite/80580
1947 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
1948
f012c8ef
DM
19492017-05-30 David Malcolm <dmalcolm@redhat.com>
1950
1951 * c-objc-common.c (c_tree_printer): Gain bool and const char **
1952 parameters.
1953
3cd211af
MS
19542017-05-24 Martin Sebor <msebor@redhat.com>
1955
1956 PR c/80731
1957 * c-fold.c (c_fully_fold_internal): Adjust.
1958 * c-typeck.c (parser_build_unary_op): Adjust.
1959
fd71a9a2
TS
19602017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1961
1962 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1963 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1964 "VECTOR_LENGTH".
1965
92fa0f9e
MP
19662017-05-23 Marek Polacek <polacek@redhat.com>
1967
1968 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1969 quotes.
1970
d11c168a
JJ
19712017-05-22 Jakub Jelinek <jakub@redhat.com>
1972
1973 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1974 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1975 it returned invariant. Call tree_invariant_p unconditionally
1976 afterwards to decide whether to return expr or op0.
1977
58aca9d9
NS
19782017-05-22 Nathan Sidwell <nathan@acm.org>
1979
1980 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1981
7fd549d2
TS
19822017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1983
1984 * c-parser.c (c_parser_omp_clause_default): Handle
1985 "OMP_CLAUSE_DEFAULT_PRESENT".
1986
6ecd2339
BE
19872017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1988
1989 * config-lang.in (gtfiles): Add c-family/c-format.c.
1990
8a57ecff
NS
19912017-05-18 Nathan Sidwell <nathan@acm.org>
1992
1993 * c-decl.c (pushdecl_top_level): Delete unused function.
1994
6574d78e
MP
19952017-05-18 Marek Polacek <polacek@redhat.com>
1996
1997 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1998 (check_earlier_gotos): Likewise.
1999 (define_label): Likewise.
2000 (pending_xref_error): Likewise.
2001 (smallest_type_quals_location): Likewise.
2002 (grokdeclarator): Likewise.
2003 (grokparms): Likewise.
2004 (identifier_global_value): Likewise.
2005 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2006 (find_init_member): Likewise.
2007
e3455240
MP
20082017-05-18 Marek Polacek <polacek@redhat.com>
2009
2010 * c-decl.c (start_decl): Use false/true instead of 0/1.
2011 (grokdeclarator): Likewise.
2012 (finish_struct): Likewise.
2013 (start_function): Change the return type to bool. Use false/true
2014 instead of 0/1.
2015 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2016 * c-tree.h (start_function): Update.
2017 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2018 (set_designator): Change the return type to bool. Use false/true
2019 instead of 0/1.
2020
3fa8871b
MP
20212017-05-17 Marek Polacek <polacek@redhat.com>
2022
2023 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2024 * c-typeck.c: Likewise.
2025
142473df
MP
20262017-05-17 Marek Polacek <polacek@redhat.com>
2027
2028 PR sanitizer/80659
2029 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2030 DECL_IGNORED_P even for non-static compound literals.
2031
1a817418
ML
20322017-05-17 Martin Liska <mliska@suse.cz>
2033
2034 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2035 use it instead of int type.
2036
b2fa0a8b
MP
20372017-05-17 Marek Polacek <polacek@redhat.com>
2038
2039 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2040 call c_fully_fold.
2041 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2042 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2043 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2044 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2045 save_expr.
2046 (c_parser_conditional_expression): Likewise.
2047 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2048 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2049 (process_init_element): Likewise.
2050 (build_binary_op): Likewise.
2051 (handle_omp_array_sections_1): Likewise.
2052
1e47f02b
TS
20532017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2054
2055 * c-parser.c (c_parser_omp_clause_num_gangs)
2056 (c_parser_omp_clause_num_workers)
2057 (c_parser_omp_clause_vector_length): Merge functions into...
2058 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2059 all users.
2060
c24e924f
NS
20612017-05-11 Nathan Sidwell <nathan@acm.org>
2062
2063 * gimple-parser.c: Don't #include tree-dump.h.
2064
c587104e
MM
20652017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2066
2067 PR testsuite/80580
2068 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2069
67ac9a9d
MM
20702017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2071
2072 PR testsuite/80580
2073 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2074 incorrect __MEM syntax.
2075
ac4eb40f
MM
20762017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2077
2078 PR testsuite/80580
2079 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2080 type of unary '*'.
2081
641da50a
NS
20822017-05-09 Nathan Sidwell <nathan@acm.org>
2083
2084 * c-tree.h (pushdecl): Declare.
2085
56d35585
DM
20862017-05-05 David Malcolm <dmalcolm@redhat.com>
2087
2088 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2089 with diagnostic_report_diagnostic.
2090 * c-errors.c (pedwarn_c99): Likewise.
2091 (pedwarn_c90): Likewise.
2092
815d9cc6
XR
20932017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2094
92a285c1 2095 PR c++/80038
815d9cc6
XR
2096 * c-gimplify.c (c_gimplify_expr): Remove calls to
2097 cilk_gimplifY_call_params_in_spawned_fn.
2098
1c4ea66f
DM
20992017-04-25 David Malcolm <dmalcolm@redhat.com>
2100
2101 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2102 hint for removing extra semicolon.
2103
666f7903
JJ
21042017-04-21 Jakub Jelinek <jakub@redhat.com>
2105
2106 PR c/80468
2107 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2108 enabled, set specs->type to integer_type_node.
2109
5764ee3c
JW
21102017-04-03 Jonathan Wakely <jwakely@redhat.com>
2111
2112 * c-array-notation.c: Fix typo in comment.
2113
10fa8dfb
MP
21142017-03-29 Marek Polacek <polacek@redhat.com>
2115
2116 PR c/79730
2117 * c-decl.c (finish_decl): Check VAR_P.
2118
a9e4a1a5
JJ
21192017-03-27 Jakub Jelinek <jakub@redhat.com>
2120
2121 PR middle-end/80162
2122 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2123 * c-typeck.c (c_mark_addressable): Likewise. Look through
2124 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2125 to ARRAY_TYPE.
2126 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2127
ee3ff394
MP
21282017-03-23 Marek Polacek <polacek@redhat.com>
2129
2130 * c-tree.h: Remove a C_RID_YYCODE reference.
2131
4d1b8e70
JJ
21322017-03-21 Jakub Jelinek <jakub@redhat.com>
2133
2134 PR c/80097
2135 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2136 optional COMPOUND_EXPR with ubsan instrumentation.
2137
31dc71a8
MP
21382017-03-17 Marek Polacek <polacek@redhat.com>
2139
2140 * c-parser.c: Add C11 references.
2141
d579c385
MP
21422017-03-15 Marek Polacek <polacek@redhat.com>
2143
2144 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2145
85059a38
MP
21462017-03-11 Marek Polacek <polacek@redhat.com>
2147
2148 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2149
2f6f187a
DM
21502017-03-10 David Malcolm <dmalcolm@redhat.com>
2151
2152 PR translation/79848
2153 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2154 "%qs".
2155 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2156
36618428
MP
21572017-03-09 Marek Polacek <polacek@redhat.com>
2158
2159 PR sanitizer/79757
2160 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2161 parameter declarations with initializers.
2162
01e5af5a
JJ
21632017-03-09 Jakub Jelinek <jakub@redhat.com>
2164
2165 PR c/79969
2166 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2167 TYPE_STUB_DECL.
2168
a71dbc63
JJ
21692017-03-07 Jakub Jelinek <jakub@redhat.com>
2170
2171 PR c/79834
2172 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2173 for "may only be used in compound statements" diagnostics, change it
2174 such that the same translatable string is used for all pragmas. For
2175 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2176 diagnostics.
2177 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2178 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2179 "may only be used in compound statements" diagnostics, such that the
2180 same translatable string is used for all pragmas.
2181
1ff4bae6
MP
21822017-03-04 Marek Polacek <polacek@redhat.com>
2183
2184 PR c/79847
2185 * c-decl.c (implicit_decl_warning): Add missing space.
2186
7f5a7d78
MP
21872017-03-03 Marek Polacek <polacek@redhat.com>
2188
2189 PR c/79758
2190 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2191 current_function_prototype_arg_types is error_mark_node. Fix
2192 formatting. Use TREE_VALUE instead of TREE_TYPE.
2193
883c8f06
JJ
21942017-03-03 Jakub Jelinek <jakub@redhat.com>
2195
79c9b7a8
JJ
2196 PR c/79837
2197 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2198 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2199 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2200 diagnostics.
2201
883c8f06
JJ
2202 PR c/79836
2203 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2204 instead of %<_Generic>.
2205 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2206 (c_parser_omp_target_exit_data): Use %<release%> instead of
2207 %<release>.
2208
324ff1a0
JJ
22092017-02-28 Jakub Jelinek <jakub@redhat.com>
2210
2211 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2212 instead of just cond ? "..." : "...".
2213 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2214 for "enter"/"exit" keyword.
2215 (c_finish_oacc_routine): Don't use %s to supply portions of the
2216 message.
2217
4227c9ad
JJ
22182017-02-24 Jakub Jelinek <jakub@redhat.com>
2219
2220 PR c++/79588
2221 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2222 handle -Wrestrict here.
2223 * c-typeck.c (build_function_call_vec): Adjust
2224 check_function_arguments caller.
2225
5d972e66
RB
22262017-02-23 Richard Biener <rguenther@suse.de>
2227
2228 PR c/79684
2229 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2230 to initialize c_exprs to return.
2231 (c_parser_gimple_binary_expression): Likewise.
2232 (c_parser_gimple_unary_expression): Likewise.
2233 (c_parser_gimple_postfix_expression): Likewise.
2234
61ac5ebe
MP
22352017-02-22 Marek Polacek <polacek@redhat.com>
2236
2237 PR c/79662
2238 * c-typeck.c (convert_arguments): Handle error_mark_node.
2239
41d1b0b1
PK
22402017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2241
2242 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2243 value of c_parser_parse_ssa_name against error_mark_node and emit
2244 error if ssa name is anonymous and written as default definition.
2245
eab1f169
PK
22462017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2247
2248 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2249 FMA_EXPR.
2250
bcac0b4d
JJ
22512017-02-16 Jakub Jelinek <jakub@redhat.com>
2252
2253 PR c++/79512
2254 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2255 ignore #pragma omp target even when not followed by identifier.
2256
1be33173
PK
22572017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2258
2259 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2260 (c_parser_gimple_unary_expression): Likewise.
2261
aa326bfb
JJ
22622017-02-13 Jakub Jelinek <jakub@redhat.com>
2263
2264 * c-parser.c (c_parser_oacc_declare): Add missing space in
2265 diagnostics.
2266
8a398bc5
PK
22672017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2268
2269 PR c/79478
2270 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2271 set_c_expr_source_range when parsing ssa-name.
2272
3dcde5ef 22732017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2274 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2275
2276 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2277 building IL when arguments are error_mark_node.
2278 (c_parser_gimple_unary_expression): Likewise.
2279 (c_parser_gimple_if_stmt): Likewise.
2280 (c_parser_gimple_switch_stmt): Likewise.
2281 (c_parser_gimple_return_stmt): Likewise.
2282 (c_parser_parse_ssa_name): When name lookup fails do not build
2283 an SSA name. Use undeclared rather than not declared in error
2284 reporting.
2285
192b048b
MP
22862017-02-09 Marek Polacek <polacek@redhat.com>
2287
2288 PR c/79428
2289 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2290 instead of c_parser_skip_until_found.
2291
56f71478
JJ
22922017-02-09 Jakub Jelinek <jakub@redhat.com>
2293
2294 PR c/79431
2295 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2296 symtab_node::get on automatic variables.
2297
02889d23
CLT
22982016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2299 Chung-Lin Tang <cltang@codesourcery.com>
2300
2301 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2302 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2303 semantic checking.
2304 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2305
7af4b20d
RB
23062017-02-07 Richard Biener <rguenther@suse.de>
2307
2308 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2309 (c_parser_gimple_postfix_expression_after_primary):
2310 Do not use c_build_function_call_vec to avoid folding and promotion.
2311 Simplify.
2312
e5e391d6
MO
23132017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2314
2315 PR lto/79061
2316 * c-decl.c (pop_scope): Pass main_input_filename to
2317 build_translation_unit_decl.
2318
c2e84327
DM
23192017-01-24 David Malcolm <dmalcolm@redhat.com>
2320
2321 * c-parser.c: Include "read-rtl-function.h" and
2322 "run-rtl-passes.h".
2323 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2324 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2325 production. Update for renaming of field "gimple_pass" to
2326 "gimple_or_rtl_pass". If __RTL was seen, call
2327 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2328 to an auto_timevar, to cope with early exit.
2329 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2330 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2331 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2332 Handle RID_RTL.
2333 (c_parser_parse_rtl_body): New function.
2334 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2335 (struct c_declspecs): Rename field "gimple_pass" to
2336 "gimple_or_rtl_pass". Add field "rtl_p".
2337 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2338 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2339 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2340 (c_parser_gimple_or_rtl_pass_list): ...this.
2341
2ebd93e1
MP
23422017-01-20 Marek Polacek <polacek@redhat.com>
2343
2344 PR c/64279
2345 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2346
b1c95bb5
RB
23472017-01-13 Richard Biener <rguenther@suse.de>
2348
2349 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2350 nops.
2351
25329913
RB
23522017-01-13 Richard Biener <rguenther@suse.de>
2353
2354 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2355 _Literal ( type-name ) number.
2356
6bb4ea5c
RB
23572017-01-12 Richard Biener <rguenther@suse.de>
2358
2359 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2360 __MEM.
2361
6b5b4e9c
JJ
23622017-01-11 Jakub Jelinek <jakub@redhat.com>
2363
2364 PR c++/72813
2365 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2366 PCH file.
2367
e3252775
RB
23682017-01-11 Richard Biener <rguenther@suse.de>
2369
2370 PR bootstrap/79052
2371 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2372 returns on parse errors.
2373
a9342885
MP
23742017-01-04 Marek Polacek <polacek@redhat.com>
2375
2376 PR c++/64767
2377 * c-parser.c (c_parser_postfix_expression): Mark zero character
2378 constants by setting original_type in c_expr.
2379 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2380 with a zero character constant.
2381 (char_type_p): New function.
2382
5dd9a9d0
DM
23832017-01-04 David Malcolm <dmalcolm@redhat.com>
2384
2385 * c-parser.c (c_parser_declaration_or_fndef): Create a
2386 rich_location at init_loc and parse it to start_init.
2387 (last_init_list_comma): New global.
2388 (c_parser_braced_init): Update last_init_list_comma when parsing
2389 commas. Pass it to pop_init_level. Pass location of closing
2390 brace to pop_init_level.
2391 (c_parser_postfix_expression_after_paren_type): Create a
2392 rich_location at type_loc and parse it to start_init.
2393 (c_parser_omp_declare_reduction): Likewise for loc.
2394 * c-tree.h (start_init): Add rich_location * param.
2395 (pop_init_level): Add location_t param.
2396 * c-typeck.c (struct initializer_stack): Add field
2397 "missing_brace_richloc".
2398 (start_init): Add richloc param, use it to initialize
2399 the stack node's missing_brace_richloc.
2400 (last_init_list_comma): New decl.
2401 (finish_implicit_inits): Pass last_init_list_comma to
2402 pop_init_level.
2403 (push_init_level): When finding missing open braces, add fix-it
2404 hints to the richloc.
2405 (pop_init_level): Add "insert_before" param and pass it
2406 when calling pop_init_level. Add fixits about missing
2407 close braces to any richloc. Use the richloc for the
2408 -Wmissing-braces warning.
2409 (set_designator): Pass last_init_list_comma to pop_init_level.
2410 (process_init_element): Likewise.
2411
cbe34bb5
JJ
24122017-01-01 Jakub Jelinek <jakub@redhat.com>
2413
2414 Update copyright years.
2415
d17680f3
JJ
24162016-12-21 Jakub Jelinek <jakub@redhat.com>
2417
0dba7960
JJ
2418 PR bootstrap/78817
2419 * c-typeck.c (build_function_call_vec): If check_function_arguments
2420 returns true, set TREE_NO_WARNING on CALL_EXPR.
2421
d17680f3
JJ
2422 PR c/77767
2423 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2424 to *expr instead of overwriting it.
2425
aa90531e
RB
24262016-12-20 Richard Biener <rguenther@suse.de>
2427
2428 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2429 error recovery.
2430 (c_parser_gimple_statement): Only build assigns for non-error
2431 stmts.
2432 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2433
629b3d75
MJ
24342016-12-14 Martin Jambor <mjambor@suse.cz>
2435
2436 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2437 omp-low.h.
2438 (c_finish_oacc_routine): Adjusted call to
2439 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2440 to use their new names.
2441 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2442 use its new name.
2443 (c_parser_oacc_update): Likewise.
2444 (c_parser_omp_simd): Likewise.
2445 (c_parser_omp_target_update): Likewise.
2446 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2447 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2448 name.
2449 (c_finish_omp_cancellation_point): Likewise.
2450 * gimple-parser.c: Do not include omp-low.h
2451
c5af52eb
CP
24522016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2453 James Norris <jnorris@codesourcery.com>
2454
2455 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2456 EXIT_DATA,WAIT} are not used in compound statements.
2457 (c_parser_oacc_enter_exit_data): Update diagnostics.
2458
48330c93
BE
24592016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2460
2461 PR c++/71973
2462 * c-decl.c (diagnose_mismatched_decls): Use
2463 OPT_Wbuiltin_declaration_mismatch here too.
2464
899ca90e 24652016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2466 Alan Hayward <alan.hayward@arm.com>
2467 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2468
2469 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2470 (make_label, finish_struct): Likewise.
2471
1ee62b92 24722016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2473 Richard Biener <rguenther@suse.de>
22b15758 2474
8e745a17
JJ
2475 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2476 * config-lang.in (gtfiles): Add c/c-parser.h.
2477 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2478 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2479 * c-parser.c (enum c_id_kind, struct c_token,
2480 c_parser_next_token_is, c_parser_next_token_is_not,
2481 c_parser_next_token_is_keyword,
2482 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2483 Split out to ...
2484 * c-parser.h: ... new header.
2485 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2486 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2487 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2488 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2489 c_parser_error, c_parser_require, c_parser_skip_until_found,
2490 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2491 c_parser_type_name): Export.
2492 (c_parser_tokens_buf): New function.
2493 (c_parser_error): Likewise.
2494 (c_parser_set_error): Likewise.
2495 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2496 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2497 via c_parser_parse_gimple_body.
8e745a17
JJ
2498 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2499 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2500 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2501 c_parser_error, c_parser_require, c_parser_skip_until_found,
2502 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2503 c_parser_type_name): Declare.
1ee62b92
PG
2504 (struct c_parser): Declare forward.
2505 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2506 (c_parser_error): Likewise.
2507 (c_parser_set_error): Likewise.
2508 * gimple-parser.c: New file.
2509 * gimple-parser.h: Likewise.
1ee62b92 2510
22b15758
UB
25112016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2512
2513 PR c/35503
2514 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2515 warn_for_restrict.
2516
84ff4775
LCW
25172016-09-11 Le-Chun Wu <lcwu@google.com>
2518 Mark Wielaard <mjw@redhat.com>
2519
2520 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2521 to the given -Wshadow= variant.
2522
4d0cdd0c
TP
25232016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2524
2525 * c-typeck.c: Include memmodel.h.
2526
1202f33e
JJ
25272016-10-13 Jakub Jelinek <jakub@redhat.com>
2528
2529 PR target/77957
2530 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2531 instead of lhd_return_null_tree_v.
2532
8a14afd0
BS
25332016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2534
2535 PR c++/69733
2536 * c-decl.c (smallest_type_quals_location): New static function.
2537 (grokdeclarator): Try to find the correct location for an ignored
2538 qualifier.
2539
81fea426
MP
25402016-09-26 Marek Polacek <polacek@redhat.com>
2541
2542 PR c/7652
2543 * c-decl.c (pop_scope): Add gcc_fallthrough.
2544
25452016-09-26 Marek Polacek <polacek@redhat.com>
2546
2547 PR c/7652
2548 * c-parser.c (struct c_token): Add flags field.
2549 (c_lex_one_token): Pass it to c_lex_with_flags.
2550 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2551 into IFN_FALLTHROUGH.
2552 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2553 attribute fallthrough after a case label or default label.
2554 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2555
9a2300e9
MP
25562016-09-24 Marek Polacek <polacek@redhat.com>
2557
2558 PR c/77490
2559 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2560 have boolean value. Warn about ++/-- on booleans.
2561
7de76362
JJ
25622016-09-23 Jakub Jelinek <jakub@redhat.com>
2563
2564 * c-parser.c (incomplete_record_decls): Remove unnecessary
2565 = vNULL initialization of file scope vec.
2566
5b73d2ab
MP
25672016-09-16 Marek Polacek <polacek@redhat.com>
2568
2569 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2570
e51fbec3
MP
25712016-09-14 Marek Polacek <polacek@redhat.com>
2572
2573 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2574 (fix_array_notation_expr): Likewise.
2575 * c-decl.c (finish_decl): Likewise.
2576 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2577 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2578 (function_to_pointer_conversion): Use false instead of 0.
2579 (convert_lvalue_to_rvalue): Likewise.
2580 (parser_build_unary_op): Likewise.
2581 (build_atomic_assign): Likewise.
2582 (build_unary_op): Change nonconvert parameter type to bool, use
2583 true/false instead of 1/0.
2584 (build_binary_op): Use true instead of 1.
2585
254830ba
DM
25862016-09-13 David Malcolm <dmalcolm@redhat.com>
2587
2588 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2589 of add_fixit_insert to add_fixit_insert_before.
2590
4c13ba17
MP
25912016-09-13 Marek Polacek <polacek@redhat.com>
2592
2593 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2594 it.
2595
54dcdb88
BE
25962016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2597
2598 PR c++/77496
2599 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2600 COMPOUND_EXPR to warn_for_omitted_condop.
2601
e5106e27
DM
26022016-09-07 David Malcolm <dmalcolm@redhat.com>
2603
2604 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2605 c_get_substring_location for this new langhook.
2606
9dc5773f
JJ
26072016-09-02 Jakub Jelinek <jakub@redhat.com>
2608
2609 PR c/65467
2610 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2611 flag_openmp.
2612 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2613 instead of mark_exp_read on low_bound/length expression.
2614 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2615 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2616 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2617 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2618 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2619 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2620 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2621 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2622 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2623 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2624 instead of mark_expr_read.
2625 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2626 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2627 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2628 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2629 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2630 array section bases outside of depend clause, for depend clause
2631 use convert_lvalue_to_rvalue on the base.
2632 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2633 linear, aligned, map, to and from clauses.
2634 (c_omp_clause_copy_ctor): New function.
2635
295844f6
MP
26362016-09-01 Marek Polacek <polacek@redhat.com>
2637
2638 PR c/7652
2639 * c-typeck.c (composite_type): Add FALLTHRU comment.
2640
089af25c
DM
26412016-08-31 David Malcolm <dmalcolm@redhat.com>
2642
2643 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2644 to the insertion fixits for "struct", "union", and "enum".
2645
f9087798
DM
26462016-08-30 David Malcolm <dmalcolm@redhat.com>
2647
2648 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2649 rather than add_fixit_misspelled_id.
2650 (undeclared_variable): Likewise.
2651 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2652 now-redundant "here" params from add_fixit_insert method calls.
2653 (c_parser_parameter_declaration): Likewise.
2654 * c-typeck.c (build_component_ref): Remove now-redundant range
2655 param from add_fixit_replace method calls.
2656
ebef225f
MP
26572016-08-25 Marek Polacek <polacek@redhat.com>
2658
2659 * c-typeck.c (parser_build_binary_op): Pass LHS to
2660 warn_logical_not_parentheses.
2661
fe377a48
MP
26622016-08-25 Marek Polacek <polacek@redhat.com>
2663
2664 PR c/77323
2665 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2666 or _FloatN or _FloatNx is not supported.
2667 (finish_declspecs): Set type to integer_type_node when _FloatN or
2668 _FloatNx is not supported.
2669
c65699ef
JM
26702016-08-19 Joseph Myers <joseph@codesourcery.com>
2671
2672 PR c/32187
2673 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2674 (struct c_declspecs): Add field floatn_nx_idx.
2675 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2676 and _FloatNx type specifiers.
2677 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2678 (c_parser_declspecs, c_parser_attribute_any_word)
2679 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2680 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2681 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2682 narrower than double.
2683
2f1364c2
JJ
26842016-08-12 Jakub Jelinek <jakub@redhat.com>
2685 Martin Liska <mliska@suse.cz>
2686
2687 PR c/67410
2688 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2689 % to determine val element to change. Assert that
2690 wchar_bytes * charwidth fits into val array.
2691
191816a3
MP
26922016-08-12 Marek Polacek <polacek@redhat.com>
2693
2694 PR c/7652
2695 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2696 (c_parser_postfix_expression): Likewise.
2697 * c-typeck.c (build_unary_op): Adjust fall through comment.
2698 (c_mark_addressable): Likewise.
2699
b95a64bb
JJ
27002016-08-11 Jakub Jelinek <jakub@redhat.com>
2701
2702 PR c/72816
2703 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2704 array member through typedef, for orig_qual_indirect == 0 clear
2705 orig_qual_type.
2706
895aa8e1
DM
27072016-08-08 David Malcolm <dmalcolm@redhat.com>
2708
2709 PR c/64955
2710 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2711 this up to selftest::run_c_tests.
2712 (selftest::run_c_tests): New function.
2713
0b212d8c
TS
27142016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2715
ae9281fc
TS
2716 * c-parser.c (struct oacc_routine_data): Add error_seen and
2717 fndecl_seen members.
2718 (c_finish_oacc_routine): Use these.
2719 (c_parser_declaration_or_fndef): Adjust.
2720 (c_parser_oacc_routine): Likewise. Support more C language
2721 constructs, and improve diagnostics. Move pragma context
2722 checking...
2723 (c_parser_pragma): ... here.
2724
0b212d8c
TS
2725 * c-parser.c (struct oacc_routine_data): New.
2726 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2727 Simplify code.
2728 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2729 declare target" attribute.
2730
76e2c821
JB
27312016-08-01 Jan Beulich <jbeulich@suse.com>
2732
2733 * c-fold.c (c_fully_fold_internal): Also emit shift count
2734 warnings for vector types.
2735 * c-typeck.c (build_binary_op): Likewise.
2736
f618a472
MP
27372016-07-29 Marek Polacek <polacek@redhat.com>
2738
2739 PR c/71742
2740 * c-decl.c (finish_struct): Rephrase an error message.
2741
efd0786f
MP
2742 PR c/71853
2743 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2744 to error node for invalid code.
2745
e00dceaf
MP
2746 PR c/71573
2747 * c-decl.c (implicitly_declare): Return decl early not only for
2748 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2749
673a107a
JJ
27502016-07-29 Jakub Jelinek <jakub@redhat.com>
2751
2752 PR c/71969
2753 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2754 on GNU extern inline functions.
2755
a5b5c8b6
MP
27562016-07-29 Marek Polacek <polacek@redhat.com>
2757
2758 PR c/71583
2759 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2760 check expr.value.
2761
e3fe09c1
UB
27622016-07-22 Uros Bizjak <ubizjak@gmail.com>
2763
2764 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2765
7c8f7eaa
DM
27662016-07-20 David Malcolm <dmalcolm@redhat.com>
2767
2768 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2769 spellcheck-tree.h
2770 (best_macro_match): Likewise, converting from a typedef to a
2771 subclass.
2772 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2773 (lookup_name_fuzzy): Update for change of best_macro_match to a
2774 subclass with a ctor that calls cpp_forall_identifiers.
2775
de6a69ee
DM
27762016-07-20 David Malcolm <dmalcolm@redhat.com>
2777
2778 * c-decl.c (implicit_decl_warning): Update for conversion of
2779 return type of lookup_name_fuzzy to const char *.
2780 (undeclared_variable): Likewise.
2781 (lookup_name_fuzzy): Convert return type from tree to
2782 const char *.
2783 * c-parser.c (c_parser_declaration_or_fndef): Update for
2784 conversion of return type of lookup_name_fuzzy to const char *.
2785 (c_parser_parameter_declaration): Likewise.
2786
b1c9c068
CP
27872016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2788
2789 * c-parser.c (c_parser_oacc_declare): Don't scan for
2790 GOMP_MAP_POINTER.
2791 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2792 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2793 zero-length subarrays.
2794
ddbbcb19
JJ
27952016-07-15 Jakub Jelinek <jakub@redhat.com>
2796
2797 PR c/71858
2798 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2799 instead of FUZZY_LOOKUP_NAME.
2800 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2801 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2802
dd36b877
JJ
28032016-07-14 Jakub Jelinek <jakub@redhat.com>
2804
2805 PR c/71858
2806 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2807
8c681247
TS
28082016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2809
2810 * c-parser.c (c_parser_generic_selection): Make type of variable
2811 auto_vec.
2812 (c_parser_omp_declare_simd): Likewise.
2813
bf4fa671
TS
28142016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2815
2816 * c-decl.c (struct c_struct_parse_info): Change member types
2817 from vec to auto_vec.
2818 (start_struct): Adjust.
2819 (finish_struct): Likewise.
2820
557e8c49
JJ
28212016-07-02 Jakub Jelinek <jakub@redhat.com>
2822
2823 PR c/71719
2824 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2825
54d19c3b
TS
28262016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2827
2828 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2829 Move pragma context checking into...
2830 (c_parser_omp_cancellation_point): ... here, and improve
2831 diagnostic messages.
2832 * c-typeck.c (c_finish_omp_cancel)
2833 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2834
152ef731
JJ
28352016-06-29 Jakub Jelinek <jakub@redhat.com>
2836
2837 PR c/71685
2838 * c-typeck.c (c_build_qualified_type): Don't clear
2839 C_TYPE_INCOMPLETE_VARS for the main variant.
2840
28412016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
2842
2843 PR c/71552
2844 * c-typeck.c (output_init_element): Diagnose incompatible types
2845 before non-constant initializers.
2846
e9ac1f86
JJ
28472016-06-28 Jakub Jelinek <jakub@redhat.com>
2848
2849 * Make-lang.in: Don't cat ../stage_current if it does not exist.
2850
277d7ee0
AK
28512016-06-23 Andi Kleen <ak@linux.intel.com>
2852
2853 * Make-lang.in: Add support for autofdo.
2854
1a4f11c8
DM
28552016-06-22 David Malcolm <dmalcolm@redhat.com>
2856
2857 PR c/70339
2858 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
2859 (implicit_decl_warning): When issuing warnings for implicit
2860 declarations, attempt to provide a suggestion via
2861 lookup_name_fuzzy.
2862 (undeclared_variable): Likewise when issuing errors.
2863 (lookup_name_in_scope): Likewise.
2864 (struct edit_distance_traits<cpp_hashnode *>): New struct.
2865 (best_macro_match): New typedef.
2866 (find_closest_macro_cpp_cb): New function.
2867 (lookup_name_fuzzy): New function.
2868 * c-parser.c: Include gcc-rich-location.h.
2869 (c_token_starts_typename): Split out case CPP_KEYWORD into...
2870 (c_keyword_starts_typename): ...this new function.
2871 (c_parser_declaration_or_fndef): When issuing errors about
2872 missing "struct" etc, add a fixit. For other kinds of errors,
2873 attempt to provide a suggestion via lookup_name_fuzzy.
2874 (c_parser_parms_declarator): When looking ahead to detect typos in
2875 type names, also reject CPP_KEYWORD.
2876 (c_parser_parameter_declaration): When issuing errors about
2877 unknown type names, attempt to provide a suggestion via
2878 lookup_name_fuzzy.
2879 * c-tree.h (c_keyword_starts_typename): New prototype.
2880
5a578671
JM
28812016-06-20 Joseph Myers <joseph@codesourcery.com>
2882
2883 PR c/71601
2884 * c-typeck.c (build_conditional_expr): Return error_mark_node if
2885 c_common_type returns error_mark_node.
2886
3f8257db 28872016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
2888
2889 PR c/69507
2890 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
2891 __alignof__ (expression).
2892
6a3f203c
DM
28932016-06-14 David Malcolm <dmalcolm@redhat.com>
2894
2895 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
2896
264757fb
DM
28972016-06-14 David Malcolm <dmalcolm@redhat.com>
2898
2899 * c-typeck.c (build_component_ref): Simplify fixit code by
2900 using gcc_rich_location::add_fixit_misspelled_id.
2901 (set_init_label): Likewise.
2902
f7e4f2e3
DM
29032016-06-13 David Malcolm <dmalcolm@redhat.com>
2904
2905 * c-parser.c (c_parser_initelt): Provide location of name for new
2906 location_t param of set_init_label.
2907 * c-tree.h (set_init_label): Add location_t param.
2908 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
2909 param and use it when issuing error messages about unrecognized
2910 field names. Attempt to provide a fixit hint if appropriate,
2911 otherwise update the error message to provide the type name.
2912
4b1ffdb1
TS
29132016-06-10 Thomas Schwinge <thomas@codesourcery.com>
2914
2915 PR c/71381
2916 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
2917 Loosen checking.
2918
44a845ca
MS
29192016-06-08 Martin Sebor <msebor@redhat.com>
2920 Jakub Jelinek <jakub@redhat.com>
2921
2922 PR c++/70507
2923 PR c/68120
2924 * c-typeck.c (convert_arguments): Don't promote last argument
2925 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2926
92a5f2ba
MP
29272016-06-08 Marek Polacek <polacek@redhat.com>
2928
2929 PR c/71418
2930 * c-decl.c (grokdeclarator): Check TYPE_P.
2931
08203f73
MP
2932 PR c/71426
2933 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
2934 code.
2935
6ffd47b7
DM
29362016-06-07 David Malcolm <dmalcolm@redhat.com>
2937
2938 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
2939 and structure element reference, capture the location of the
2940 element name token and pass it to build_component_ref.
2941 (c_parser_postfix_expression_after_primary): Likewise for
2942 structure element dereference.
2943 (c_parser_omp_variable_list): Likewise for
2944 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
2945 * c-tree.h (build_component_ref): Add location_t param.
2946 * c-typeck.c (build_component_ref): Add location_t param
2947 COMPONENT_LOC. Use it, if available, when issuing hints about
2948 mispelled member names to provide a fixit replacement hint.
2949
1f40cff3
MP
29502016-06-06 Marek Polacek <polacek@redhat.com>
2951
2952 PR c/71362
2953 * c-parser.c (c_parser_direct_declarator): Set location.
2954
5545a907
MP
29552016-06-06 Marek Polacek <polacek@redhat.com>
2956
2957 * c-typeck.c (comptypes_internal): Handle comparisons of
2958 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
2959 TYPE_REF_CAN_ALIAS_ALL.
2960
b605f663
CLT
29612016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2962
2963 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2964 arguments as addressable when async clause exists.
2965
00631022
JJ
29662016-05-30 Jakub Jelinek <jakub@redhat.com>
2967
2968 PR c++/71349
2969 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2970 when combined with target construct.
2971
7211a097
JJ
29722016-05-26 Jakub Jelinek <jakub@redhat.com>
2973
2974 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2975 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2976
95efe6b6
MP
29772016-05-25 Marek Polacek <polacek@redhat.com>
2978
2979 PR c/71265
2980 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2981
a23faf7a
MP
2982 PR c/71266
2983 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2984
e46c7770
CP
29852016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2986
2987 * c-parser.c (c_parser_oacc_declare): Add support for
2988 GOMP_MAP_FIRSTPRIVATE_POINTER.
2989 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2990 argument with enum c_omp_region_type ort.
2991 (handle_omp_array_sections): Likewise. Update call to
2992 handle_omp_array_sections_1.
2993 (c_finish_omp_clauses): Add specific errors and warning messages for
2994 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2995 call to handle_omp_array_sections.
2996
a04e69c0
TS
29972016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2998
2999 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3000
f17a223d
RB
30012016-05-24 Richard Biener <rguenther@suse.de>
3002
3003 PR middle-end/70434
3004 PR c/69504
3005 * c-typeck.c (build_array_ref): Do not complain about indexing
3006 non-lvalue vectors. Adjust for function name change.
3007
79063edd
MS
30082016-05-20 Martin Sebor <msebor@redhat.com>
3009
3010 PR c/71115
3011 * c-typeck.c (error_init): Use
3012 expansion_point_location_if_in_system_header.
3013 (warning_init): Same.
3014
8a40fef3
DM
30152016-05-19 David Malcolm <dmalcolm@redhat.com>
3016
3017 PR c/71171
3018 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3019 in error-handling.
3020 (c_parser_postfix_expression): Likewise.
3021 * c-tree.h (c_expr::set_error): New method.
3022 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3023 that result's range is initialized.
3024
e9892350
JG
30252016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3026
3027 * c-typeck.c (parser_build_unary_op): Fix formatting.
3028
8fad45f5
MW
30292016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3030
3031 * c-decl.c (grokdeclarator): Remove errmsg and use of
3032 targetm.invalid_return_type.
3033 (grokparms): Remove errmsg and use of
3034 targetm.invalid_parameter_type.
3035
aa4b467b
JM
30362016-05-13 Joseph Myers <joseph@codesourcery.com>
3037
3038 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3039 function return type.
3040
4f2e1536
MP
30412016-05-12 Marek Polacek <polacek@redhat.com>
3042
3043 PR c/70756
3044 * c-decl.c (build_compound_literal): Pass LOC down to
3045 c_incomplete_type_error.
3046 * c-tree.h (require_complete_type): Adjust declaration.
3047 (c_incomplete_type_error): Likewise.
3048 * c-typeck.c (require_complete_type): Add location parameter, pass it
3049 down to c_incomplete_type_error.
3050 (c_incomplete_type_error): Add location parameter, pass it down to
3051 error_at.
3052 (build_component_ref): Pass location down to c_incomplete_type_error.
3053 (default_conversion): Pass location down to require_complete_type.
3054 (build_array_ref): Likewise.
3055 (build_function_call_vec): Likewise.
3056 (convert_arguments): Likewise.
3057 (build_unary_op): Likewise.
3058 (build_c_cast): Likewise.
3059 (build_modify_expr): Likewise.
3060 (convert_for_assignment): Likewise.
3061 (c_finish_omp_clauses): Likewise.
3062
d6e83a8d
MM
30632016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3064
3065 PR c/43651
3066 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3067 is enabled.
3068 * c-errors.c (pedwarn_c90): Return true if warned.
3069 * c-tree.h (pedwarn_c90): Change return type to bool.
3070 (enum c_declspec_word): Add new enumerator cdw_atomic.
3071
5c3a10fb
MP
30722016-05-11 Marek Polacek <polacek@redhat.com>
3073
3074 PR c++/71024
3075 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3076 diagnose_mismatched_attributes and call it.
3077
cf68d92c
MP
30782016-05-10 Marek Polacek <polacek@redhat.com>
3079
3080 PR c/70255
3081 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3082 on a declaration following the definition.
3083
351f85c5
JJ
30842016-05-05 Jakub Jelinek <jakub@redhat.com>
3085
3086 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3087 parse it through to c_parser_c99_block_statement.
3088 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3089 caller.
3090
deef7113
MP
30912016-05-04 Marek Polacek <polacek@redhat.com>
3092
3093 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3094 OPT_Wdangling_else.
3095
de55efd5
MP
30962016-05-04 Marek Polacek <polacek@redhat.com>
3097
3098 PR c/48778
3099 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3100 for macro expansions.
3101
79ce98bc
MP
31022016-05-03 Marek Polacek <polacek@redhat.com>
3103
3104 PR c/70859
3105 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3106 check_builtin_function_arguments.
3107
fb2647aa
RB
31082016-05-03 Richard Biener <rguenther@suse.de>
3109
3110 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3111 the checksum from the previous stage.
3112
77886428
CP
31132016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3114
3115 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3116 c_finish_omp_clauses.
3117 (c_parser_omp_all_clauses): Likewise.
3118 (c_parser_oacc_cache): Likewise.
3119 (c_parser_oacc_loop): Likewise.
3120 (omp_split_clauses): Likewise.
3121 (c_parser_omp_declare_target): Likewise.
3122 (c_parser_cilk_all_clauses): Likewise.
3123 (c_parser_cilk_for): Likewise.
3124 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3125 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3126
7176a4a0
MP
31272016-05-02 Marek Polacek <polacek@redhat.com>
3128
3129 PR c/70851
3130 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3131 incomplete type.
3132
e7ff0319
CP
31332016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3134
3135 PR middle-end/70626
3136 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3137 OACC_LOOP_CLAUSE_MASK.
3138 (c_parser_oacc_kernels_parallel): Update call to
3139 c_oacc_split_loop_clauses.
3140
9f405ce1
AM
31412016-04-28 Andrew MacLeod <amacleod@redhat.com>
3142
3143 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3144 argument to build_modify_expr in two cases.
3145
c1e1f433
BS
31462016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3147
3148 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3149 warn_for_memset instead of warning directly here.
3150
2448a956
MP
31512016-04-26 Marek Polacek <polacek@redhat.com>
3152
3153 PR c/67784
3154 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3155 out of ...
3156 (c_parser_for_statement): ... here.
3157 (c_parser_if_statement): Use it.
3158 (c_parser_switch_statement): Use it.
3159 (c_parser_while_statement): Use it.
3160
b02a5e26
MP
3161 PR c/70791
3162 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3163
477d4906
IV
31642016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3165
3166 PR c++/69363
3167 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3168 instead of c_finish_cilk_clauses.
3169 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3170 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3171 floating-point variables in the linear clause for Cilk Plus.
3172
fe37c7af
MM
31732016-04-18 Michael Matz <matz@suse.de>
3174
3175 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3176 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3177
949505a9
MP
31782016-04-15 Marek Polacek <polacek@redhat.com>
3179
3180 PR c/70671
3181 * c-typeck.c (build_unary_op): Pass location down to error and
3182 warning call.
3183
dda1bf61
JJ
31842016-04-15 Jakub Jelinek <jakub@redhat.com>
3185
3186 PR c/70436
3187 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3188 where needed.
3189 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3190 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3191 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3192 Adjust c_parser_pragma callers.
3193 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3194 caller.
3195 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3196 c_parser_statement.
3197 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3198 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3199 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3200 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3201 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3202 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3203 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3204 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3205 down where needed.
3206 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3207 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3208 calls.
3209
99cd9857
MP
32102016-04-13 Marek Polacek <polacek@redhat.com>
3211
3212 PR c/70436
3213 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3214 adjust callers.
3215 (c_parser_statement): Likewise.
3216 (c_parser_c99_block_statement): Likewise.
3217 (c_parser_while_statement): Likewise.
3218 (c_parser_for_statement): Likewise.
3219 (c_parser_if_body): Don't set IF_P here.
3220 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3221 about dangling else here.
3222 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3223 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3224 warn about dangling else here.
3225
f13355da
MP
32262016-04-04 Marek Polacek <polacek@redhat.com>
3227
3228 PR c/70307
3229 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3230
5fde6a45
MP
32312016-03-31 Marek Polacek <polacek@redhat.com>
3232
3233 PR c/70297
3234 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3235
4bbf545b
DM
32362016-03-18 David Malcolm <dmalcolm@redhat.com>
3237
3238 PR c/70281
3239 * c-parser.c (c_parser_postfix_expression): Set the source range
3240 for uses of "__builtin_types_compatible_p".
3241
fcc2b74f
JJ
32422016-03-17 Jakub Jelinek <jakub@redhat.com>
3243
3244 PR c/70280
3245 * c-typeck.c (composite_type): Don't count void_list_node
3246 into len, if the list is terminated by void_list_node, start
3247 with void_list_node instead of NULL for newargs. Stop
3248 at void_list_node.
3249
ab4c578f
MP
32502016-03-16 Marek Polacek <polacek@redhat.com>
3251
3252 PR c/70093
3253 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3254 nested functions returning VM types.
3255
96b3c82d
CP
32562016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3257
3258 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3259 when calling c_finish_omp_clauses.
3260
29b9828f
BS
32612016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3262
3263 PR c/69824
3264 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3265 for later.
3266
7ff6ca38
MP
32672016-03-04 Marek Polacek <polacek@redhat.com>
3268
3269 PR c/69798
3270 * c-parser.c (c_parser_postfix_expression): Call
3271 c_parser_cast_expression rather than c_parser_postfix_expression.
3272
686e2237
JJ
32732016-03-01 Jakub Jelinek <jakub@redhat.com>
3274
3275 PR c/69796
3276 PR c/69974
3277 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3278 of incomplete decls to error_mark_node.
3279
0b05329b
MP
32802016-02-24 Marek Polacek <polacek@redhat.com>
3281
3282 PR c/69819
3283 * c-decl.c (finish_decl): Don't update the copy of the type of a
3284 different decl type.
3285
067fbd8b
JJ
32862016-02-23 Jakub Jelinek <jakub@redhat.com>
3287
3288 PR objc/69844
3289 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3290 in id_kind reclassification.
3291
bf14eba2
JJ
32922016-02-16 Jakub Jelinek <jakub@redhat.com>
3293
3294 PR c/69835
3295 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3296
ba539195
JN
32972016-02-16 James Norris <jnorris@codesourcery.com>
3298
3299 PR c/64748
3300 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3301
16595a1f
BS
33022016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3303
f48dfe98
BS
3304 * c-decl.c (build_null_declspecs): Zero the entire struct.
3305
16595a1f
BS
3306 PR c/69522
3307 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3308 callers changed. If nested_p is true, use it to call
3309 finish_implicit_inits.
3310 * c-tree.h (finish_implicit_inits): Declare.
3311 * c-typeck.c (finish_implicit_inits): New function. Move code
3312 from ...
3313 (push_init_level): ... here.
3314 (set_designator, process_init_element): Call finish_implicit_inits.
3315
66756373
JJ
33162016-02-11 Jakub Jelinek <jakub@redhat.com>
3317
3318 PR c/69768
3319 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3320 arguments for -Waddress warning.
3321
1066e9b5
JJ
33222016-02-04 Jakub Jelinek <jakub@redhat.com>
3323
3324 PR c/69669
3325 * c-decl.c (finish_enum): When honoring mode attribute,
3326 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3327
3a5d2ba4
JJ
33282016-01-29 Jakub Jelinek <jakub@redhat.com>
3329
3330 PR debug/69518
3331 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3332 all type variants, not just TYPE_MAIN_VARIANT.
3333
cbdd8ae0
JJ
33342016-01-27 Jakub Jelinek <jakub@redhat.com>
3335
3336 PR debug/66869
3337 * c-decl.c (c_write_global_declarations_1): Warn with
3338 warn_unused_function if static prototype without definition
3339 is not C_DECL_USED.
3340
fa74a4bc
MP
33412016-01-27 Marek Polacek <polacek@redhat.com>
3342
3343 PR c/68062
3344 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3345 to unsigned, if needed. Add -Wsign-compare warning.
3346
13f92e8d
JJ
33472016-01-26 Jakub Jelinek <jakub@redhat.com>
3348
3349 PR tree-optimization/69483
3350 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3351
cd8e73dc 33522016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3353
3354 PR c/24293
3355 * c-tree.h (incomplete_record_decls): Declare.
3356 * c-parser.c (incomplete_record_decls): Define.
3357 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3358 report error if any decl has zero size.
3359 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3360 or enum type to incomplete_record_decls.
3361
e6d6ec9e
TV
33622016-01-14 Tom de Vries <tom@codesourcery.com>
3363
3364 PR tree-optimization/68773
3365 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3366 set force_output.
3367
00083992
MP
33682016-01-14 Marek Polacek <polacek@redhat.com>
3369
3370 PR c/69262
3371 * c-decl.c (grokdeclarator): Provide more information for invalid
3372 array declarations.
3373
7443cf13
DM
33742016-01-06 David Malcolm <dmalcolm@redhat.com>
3375
3376 * c-parser.c (c_parser_unary_expression): For dereferences, build
3377 a combined location before calling build_indirect_ref, so that
3378 error reports cover the full range, manually updating the c_expr
3379 src_range.
3380
6b131d5b
MP
33812016-01-06 Marek Polacek <polacek@redhat.com>
3382
3383 PR sanitizer/69099
3384 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3385 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3386 NULL.
3387
818ab71a
JJ
33882016-01-04 Jakub Jelinek <jakub@redhat.com>
3389
3390 Update copyright years.
3391
2fe0a208
MP
33922016-01-04 Marek Polacek <polacek@redhat.com>
3393
3394 PR c/68908
3395 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3396 optimization to use __atomic_fetch_* built-in if possible.
3397
c7b48c8a
TS
33982015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3399
3400 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3401 into...
3402 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3403 all users.
3404
fda5652f
MP
34052015-12-22 Marek Polacek <polacek@redhat.com>
3406
3407 PR c/69002
3408 * c-typeck.c (build_component_ref): Warn when acessing elements of
3409 atomic structures or unions.
3410
745e411d
DM
34112015-12-21 David Malcolm <dmalcolm@redhat.com>
3412
3413 * c-typeck.c: Include "gcc-rich-location.h".
3414 (build_binary_op): In the two places that call binary_op_error,
3415 create a gcc_rich_location and populate it with the location of
3416 the binary op and its two operands.
3417
94c40e19
DM
34182015-12-16 David Malcolm <dmalcolm@redhat.com>
3419
3420 * c-parser.c (c_parser_statement_after_labels): When calling
3421 c_finish_return, Use the return expression's location if it has
3422 one, falling back to the location of the first token within it.
3423 * c-typeck.c (c_finish_return): When issuing warnings about
3424 the incorrect presence/absence of a return value, issue a note
3425 showing the declaration of the function.
3426
de67c4c3
DM
34272015-12-16 David Malcolm <dmalcolm@redhat.com>
3428
3429 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3430 to 4.
3431 (c_parser_peek_nth_token): New function.
3432 (c_parser_peek_conflict_marker): New function.
3433 (c_parser_error): Detect conflict markers and report them as such.
3434
a10704e1
DM
34352015-12-16 David Malcolm <dmalcolm@redhat.com>
3436
3437 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3438 to preserve range information for the primary expression
3439 in the call to c_parser_postfix_expression_after_primary.
3440
8062bca6
DM
34412015-12-16 David Malcolm <dmalcolm@redhat.com>
3442
3443 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3444 expression location, falling back on the first token location,
3445 rather than always using the latter.
3446
d06f8b75
MP
34472015-12-16 Marek Polacek <polacek@redhat.com>
3448
3449 PR c/64637
3450 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3451 available.
3452
2994fb91
MP
34532015-12-15 Marek Polacek <polacek@redhat.com>
3454
3455 PR c/68907
3456 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3457 artificial decl.
3458
a1b93f8d
DM
34592015-12-08 David Malcolm <dmalcolm@redhat.com>
3460
3461 * c-parser.c (c_parser_alignof_expression): Capture location of
3462 closing parenthesis (if any), or of end of unary expression, and
3463 use it to build a src_range for the expression.
3464
46c6e1e2
DM
34652015-12-08 David Malcolm <dmalcolm@redhat.com>
3466
3467 PR c/68757
3468 * c-parser.c (c_parser_get_builtin_args): Add
3469 "out_close_paren_loc" param, and write back to it.
3470 (c_parser_postfix_expression): Capture the closing
3471 parenthesis location for RID_CHOOSE_EXPR,
3472 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3473 RID_BUILTIN_SHUFFLE and use it to set the source range
3474 for such expressions; within RID_BUILTIN_COMPLEX set
3475 the underlying location.
3476
66189108
MP
34772015-12-07 Marek Polacek <polacek@redhat.com>
3478
3479 PR c/68668
3480 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3481 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3482
f187980b
EB
34832015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3484
3485 * c-tree.h (c_build_va_arg): Adjust prototype.
3486 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3487 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3488 parameter, adjust throughout and issue an error if EXPR is a component
3489 with reverse storage order.
3490
4250754e
JM
34912015-12-02 Jason Merrill <jason@redhat.com>
3492
3493 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3494 (c_fully_fold_internal, decl_constant_value_for_optimization):
3495 Move from c-common.c.
3496 * c-tree.h: Declare decl_constant_value_for_optimization.
3497 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3498
e9e32ee6
JM
34992015-12-02 Joseph Myers <joseph@codesourcery.com>
3500
3501 PR c/68162
3502 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3503 following link from declarator to next declarator. Track original
3504 qualified type and pass it to c_build_qualified_type.
3505 * c-typeck.c (c_build_qualified_type): Add arguments
3506 orig_qual_type and orig_qual_indirect.
3507
ff7a55bf
TS
35082015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3509
3510 * c-parser.c (c_parser_omp_clause_name)
3511 (c_parser_oacc_all_clauses): Alphabetical sorting.
3512
657e4e47
JJ
35132015-12-02 Jakub Jelinek <jakub@redhat.com>
3514
3515 PR c/68533
3516 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3517 for diagnostics.
3518
37d5ad46
JB
35192015-12-01 Julian Brown <julian@codesourcery.com>
3520 Cesar Philippidis <cesar@codesourcery.com>
3521 James Norris <James_Norris@mentor.com>
3522
3523 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3524 (c_parser_oacc_clause_use_device): New function.
3525 (c_parser_oacc_all_clauses): Add use_device support.
3526 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3527 (c_parser_oacc_host_data): New function.
3528 (c_parser_omp_construct): Add host_data support.
3529 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3530 * c-typeck.c (c_finish_oacc_host_data): New function.
3531 (c_finish_omp_clauses): Add use_device support.
3532
a4850ce9
JH
35332015-11-29 Jan Hubicka <hubicka@ucw.cz>
3534
3535 PR c/67106
3536 * c-decl.c: Set TYPE_PACKED in variants.
3537
b58d3df2
ML
35382015-11-27 Martin Liska <mliska@suse.cz>
3539
3540 PR c++/68312
3541 * c-array-notation.c (fix_builtin_array_notation_fn):
3542 Use release_vec_vec instead of vec::release.
3543 (build_array_notation_expr): Likewise.
3544 (fix_conditional_array_notations_1): Likewise.
3545 (fix_array_notation_expr): Likewise.
3546 (fix_array_notation_call_expr): Likewise.
3547
aec17bfe
JJ
35482015-11-27 Jakub Jelinek <jakub@redhat.com>
3549
3550 PR c/63326
3551 * c-parser.c (c_parser_compound_statement_nostart): If
3552 last_label is true, use pragma_stmt instead of pragma_compound
3553 as second c_parser_pragma argument.
3554 (c_parser_omp_ordered, c_parser_omp_target_update,
3555 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3556 false as second argument to c_parser_skip_to_pragma_eol after
3557 diagnosing standalone directives used in pragma_stmt context.
3558
688c4de0
IV
35592015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3560
3561 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3562 with "if (ENABLE_OFFLOADING)".
3563
cbd03aee
DM
35642015-11-23 David Malcolm <dmalcolm@redhat.com>
3565
3566 PR objc/68438
3567 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3568 for various Objective-C constructs: Class.name syntax,
3569 @selector(), @protocol(), @encode(), and [] message syntax.
3570
a87a86e1
DM
35712015-11-20 David Malcolm <dmalcolm@redhat.com>
3572
3573 PR 62314
3574 * c-typeck.c (should_suggest_deref_p): New function.
3575 (build_component_ref): Special-case POINTER_TYPE when
3576 generating a "not a structure of union" error message, and
3577 suggest a "->" rather than a ".", providing a fix-it hint.
3578
8ece8dfb
DM
35792015-11-19 David Malcolm <dmalcolm@redhat.com>
3580
3581 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3582 candidate into a new function, find_closest_identifier.
3583
433068cc
MP
35842015-11-19 Marek Polacek <polacek@redhat.com>
3585
3586 PR c/68412
3587 * c-typeck.c (parser_build_binary_op): Properly handle
3588 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3589
bef08b71
DM
35902015-11-17 David Malcolm <dmalcolm@redhat.com>
3591
3592 * c-parser.c (set_c_expr_source_range): Bulletproof both
3593 overloaded implementations against NULL expr->value.
3594 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3595 values.
3596 (c_parser_unary_expression): Likewise when handling addresses of
3597 labels.
3598 (c_parser_postfix_expression): Likewise for statement expressions,
3599 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3600 __builtin_va_arg, and for __builtin_offset_of.
3601 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3602 src_range using the range of the braced initializer.
3603 (c_parser_transaction_expression): Set src_range for "ret" to a
3604 sane pair of values.
3605
fff77217
KY
36062015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3607
3608 * c-parser.c (c_finish_omp_declare_simd): Look for
3609 "simd" attribute as well. Update error message.
3610
1d899da2
TS
36112015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3612
3613 * c-parser.c (c_parser_omp_declare_target): Adjust.
3614
e4606348
JJ
36152015-11-14 Jakub Jelinek <jakub@redhat.com>
3616
3617 * c-typeck.c (c_finish_omp_clauses): Don't mark
3618 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3619
3e636daf
MP
36202015-11-14 Marek Polacek <polacek@redhat.com>
3621
3622 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3623 * c-typeck.c: Likewise.
3624
ebedc9a3
DM
36252015-11-13 David Malcolm <dmalcolm@redhat.com>
3626
3627 * c-decl.c (warn_defaults_to): Pass line_table to
3628 rich_location ctor.
3629 * c-errors.c (pedwarn_c99): Likewise.
3630 (pedwarn_c90): Likewise.
3631 * c-parser.c (set_c_expr_source_range): New functions.
3632 (c_token::get_range): New method.
3633 (c_token::get_finish): New method.
3634 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3635 based on the range from the start of the LHS to the end of the
3636 RHS.
3637 (c_parser_conditional_expression): Likewise, based on the range
3638 from the start of the cond.value to the end of exp2.value.
3639 (c_parser_binary_expression): Call set_c_expr_source_range on
3640 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3641 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3642 based on the cast_loc through to the end of the expr.
3643 (c_parser_unary_expression): Likewise, based on the
3644 op_loc through to the end of op.
3645 (c_parser_sizeof_expression) Likewise, based on the start of the
3646 sizeof token through to either the closing paren or the end of
3647 expr.
3648 (c_parser_postfix_expression): Likewise, using the token range,
3649 or from the open paren through to the close paren for
3650 parenthesized expressions.
3651 (c_parser_postfix_expression_after_primary): Likewise, for
3652 various kinds of expression.
3653 * c-tree.h (struct c_expr): Add field "src_range".
3654 (c_expr::get_start): New method.
3655 (c_expr::get_finish): New method.
3656 (set_c_expr_source_range): New decls.
3657 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3658 on ret for prefix unary ops.
3659 (parser_build_binary_op): Likewise, running from the start of
3660 arg1.value through to the end of arg2.value.
3661
ec8b536f
MP
36622015-11-13 Marek Polacek <polacek@redhat.com>
3663
3664 PR c/68320
3665 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3666
277fe616
DM
36672015-11-13 David Malcolm <dmalcolm@redhat.com>
3668
3669 * c-typeck.c: Include spellcheck.h.
3670 (lookup_field_fuzzy_find_candidates): New function.
3671 (lookup_field_fuzzy): New function.
3672 (build_component_ref): If the field was not found, try using
3673 lookup_field_fuzzy and potentially offer a suggestion.
3674
6e232ba4
JN
36752015-11-12 James Norris <jnorris@codesourcery.com>
3676 Joseph Myers <joseph@codesourcery.com>
3677
3678 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3679 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3680 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3681 and PRAGMA_OMP_CLAUSE_LINK.
3682 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3683 and PRAGMA_OACC_CLAUSE_LINK.
3684 (OACC_DECLARE_CLAUSE_MASK): New definition.
3685 (c_parser_oacc_declare): New function.
3686
9be4f715
MP
36872015-11-12 Marek Polacek <polacek@redhat.com>
3688
3689 PR c/67784
3690 * c-parser.c (c_parser_for_statement): Reclassify the token in
3691 a correct scope.
3692
e78bede6
MP
36932015-11-11 Marek Polacek <polacek@redhat.com>
3694
3695 PR c/68107
3696 PR c++/68266
3697 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3698 checking the size of an array.
3699
69f293c9
AM
37002015-11-11 Andrew MacLeod <amacleod@redhat.com>
3701
3702 * c-array-notation.c: Remove unused header files.
3703 * c-aux-info.c: Likewise.
3704 * c-convert.c: Likewise.
3705 * c-decl.c: Likewise.
3706 * c-errors.c: Likewise.
3707 * c-lang.c: Likewise.
3708 * c-objc-common.c: Likewise.
3709 * c-parser.c: Likewise.
3710 * c-typeck.c: Likewise.
3711 * gccspec.c: Likewise.
3712
3a40d81d
NS
37132015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3714 Cesar Philippidis <cesar@codesourcery.com>
3715 James Norris <jnorris@codesourcery.com>
3716 Julian Brown <julian@codesourcery.com>
3717 Nathan Sidwell <nathan@codesourcery.com>
3718
3a40d81d
NS
3719 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3720 routine arg.
3721 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3722 (c_parser_pragma): Parse 'acc routine'.
3723 (OACC_ROUTINE_CLAUSE_MARK): Define.
3724 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3725
fc402eec
AA
37262015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3727
3728 PR debug/67192
3729 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3730 location of the backward-goto to the start of the loop body.
3731
f6b0b3db
AA
37322015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3733
3734 PR debug/67192
3735 * c-parser.c (c_parser_while_statement): Finish the loop before
3736 parsing ahead for misleading indentation.
3737 (c_parser_for_statement): Likewise.
3738
ee45a32d
EB
37392015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3740
3741 * c-decl.c (finish_struct): If the structure has reverse storage
3742 order, rewrite the type of array fields with scalar component. Call
3743 maybe_apply_pragma_scalar_storage_order on entry.
3744 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3745 errors on bit-fields and reverse SSO here and not...
3746 (c_mark_addressable): ...here.
3747 (output_init_element): Adjust call to initializer_constant_valid_p.
3748 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3749
8a645150
DM
37502015-11-06 David Malcolm <dmalcolm@redhat.com>
3751
3752 * c-decl.c (warn_defaults_to): Update for change in signature
3753 of diagnostic_set_info.
3754 * c-errors.c (pedwarn_c99): Likewise.
3755 (pedwarn_c90): Likewise.
3756 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3757 for textinfo::set_location.
3758
7a5e4956
CP
37592015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3760 Thomas Schwinge <thomas@codesourcery.com>
3761 James Norris <jnorris@codesourcery.com>
3762
3763 * c-parser.c (c_parser_omp_clause_name): Add support for
3764 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3765 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3766 default(none) in OpenACC.
3767 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3768 arguments.
3769 (c_parser_oacc_clause_tile): New function.
3770 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3771 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3772 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3773 TILE}.
3774 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3775 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3776 FIRSTPRIVATE}.
3777 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3778 (c_parser_oacc_update): Update the error message for missing clauses.
3779 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3780 and OMP_CLAUSE_INDEPENDENT.
3781
bfcfbfa0
MP
37822015-11-05 Marek Polacek <polacek@redhat.com>
3783
3784 PR c/68090
3785 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3786 deal with pre-evaluation on invalid types.
3787
e01d41e5
JJ
37882015-11-05 Jakub Jelinek <jakub@redhat.com>
3789 Ilya Verbin <ilya.verbin@intel.com>
3790
3791 * c-parser.c: Include context.h and gimple-expr.h.
3792 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3793 monotonic together with nonmonotonic.
3794 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3795 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3796 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3797 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3798 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3799 expressions on combined target teams before the target.
3800 (c_parser_omp_declare_target): If decl has "omp declare target" or
3801 "omp declare target link" attribute, and cgraph or varpool node already
3802 exists, then set corresponding flags. Call c_finish_omp_clauses
3803 in the parenthesized extended-list syntax case.
3804 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3805 declare target.
3806 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3807 on OMP_CLAUSE_REDUCTION array sections.
3808 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3809 into the constant offset, or for variable low-bound using
3810 POINTER_PLUS_EXPR. For structure element based array sections use
3811 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3812 (c_finish_omp_clauses): Drop generic_field_head, structure
3813 elements are now always mapped even as array section bases,
3814 diagnose same var in data sharing and mapping clauses. Diagnose if
3815 linear step on declare simd is neither a constant nor a uniform
3816 parameter. Look through POINTER_PLUS_EXPR for array section
3817 reductions. Diagnose the same var or function appearing multiple
3818 times on the same directive. Fix up wording for the to clause if t
3819 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3820 modifier on kinds other than dynamic or guided or nonmonotonic
3821 modifier together with ordered clause.
3822
4bf9e5a8
TS
38232015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3824 Chung-Lin Tang <cltang@codesourcery.com>
3825
3826 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3827
2adfab87
AM
38282015-10-29 Andrew MacLeod <amacleod@redhat.com>
3829
3830 * c-array-notation.c: Reorder #include's and remove duplicates.
3831 * c-aux-info.c: Likewise.
3832 * c-convert.c: Likewise.
3833 * c-decl.c: Likewise.
3834 * c-errors.c: Likewise.
3835 * c-lang.c: Likewise.
3836 * c-objc-common.c: Likewise.
3837 * c-parser.c: Likewise.
3838 * c-typeck.c: Likewise.
3839
e922069e
JW
38402015-10-26 Jim Wilson <jim.wilson@linaro.org>
3841
3842 PR debug/66068
3843 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
3844 after calling build_qualified_type.
3845
765dd391
CP
38462015-10-27 Cesar Philippidis <cesar@codesourcery.com>
3847 Thomas Schwinge <thomas@codesourcery.com>
3848 James Norris <jnorris@codesourcery.com>
3849 Joseph Myers <joseph@codesourcery.com>
3850 Julian Brown <julian@codesourcery.com>
3851 Bernd Schmidt <bschmidt@redhat.com>
3852
3853 * c-parser.c (c_parser_oacc_shape_clause): New.
3854 (c_parser_oacc_simple_clause): New.
3855 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
3856 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
3857
88bae6f4
TS
38582015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3859 James Norris <jnorris@codesourcery.com>
3860 Cesar Philippidis <cesar@codesourcery.com>
3861
3862 PR c/64765
3863 PR c/64880
3864 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
3865 parameters, and handle these. Adjust all users.
3866 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
3867 into...
3868 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
3869 all users.
3870 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
3871 declare functions.
3872 (c_finish_omp_construct): Declare function.
3873 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
3874 Merge functions into...
3875 (c_finish_omp_construct): ... this new function.
3876
a8fc2579
RB
38772015-10-22 Richard Biener <rguenther@suse.de>
3878
3879 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
3880 before folding a MINUS_EXPR.
3881
e9122ef6
MP
38822015-10-21 Marek Polacek <polacek@redhat.com>
3883
3884 PR c/68024
3885 * c-decl.c (start_function): Warn about vararg functions without
3886 a prototype.
3887
9f47c7e5
IE
38882015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
3889
3890 * c-typeck.c (build_conditional_expr): Use boolean vector
3891 type for vector comparison.
3892 (build_vec_cmp): New.
3893 (build_binary_op): Use build_vec_cmp for comparison.
3894
fa60eeb9
MP
38952015-10-20 Marek Polacek <polacek@redhat.com>
3896
3897 * c-parser.c (is_cilkplus_vector_p): Don't define here.
3898
2c7020eb
MP
38992015-10-20 Marek Polacek <polacek@redhat.com>
3900
3901 PR c/67964
3902 * c-parser.c (c_parser_attributes): Break out of the loop if the
3903 token after an attribute isn't a comma.
3904
d9a6bd32
JJ
39052015-10-13 Jakub Jelinek <jakub@redhat.com>
3906 Aldy Hernandez <aldyh@redhat.com>
3907
3908 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
3909 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
3910 (c_parser_omp_variable_list): Handle structure elements for
3911 map, to and from clauses. Handle array sections in reduction
3912 clause. Formatting fixes.
3913 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
3914 if clause modifiers.
3915 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3916 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3917 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
3918 c_parser_omp_clause_is_device_ptr): New functions.
3919 (c_parser_omp_clause_ordered): Parse optional parameter.
3920 (c_parser_omp_clause_reduction): Handle array reductions.
3921 (c_parser_omp_clause_schedule): Parse optional simd modifier.
3922 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
3923 functions.
3924 (c_parser_omp_clause_linear): Parse linear clause modifiers.
3925 (c_parser_omp_clause_depend_sink): New function.
3926 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
3927 (c_parser_omp_clause_map): Parse release/delete map kinds and
3928 optional always modifier.
3929 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
3930 and c_finish_omp_clauses callers.
3931 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
3932 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
3933 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
3934 (OMP_CRITICAL_CLAUSE_MASK): Define.
3935 (c_parser_omp_critical): Parse critical clauses.
3936 (c_parser_omp_for_loop): Handle doacross loops, adjust
3937 c_finish_omp_for and c_finish_omp_clauses callers.
3938 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
3939 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
3940 (OMP_FOR_CLAUSE_MASK): Add linear clause.
3941 (c_parser_omp_for): Disallow ordered clause when combined with
3942 distribute. Disallow linear clause when combined with distribute
3943 and not combined with simd.
3944 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
3945 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
3946 parse clauses and if depend clause is found, don't parse a body.
3947 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
3948 Allow target parallel without for after it.
3949 (OMP_TASK_CLAUSE_MASK): Add priority clause.
3950 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
3951 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
3952 invalid kinds.
3953 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
3954 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
3955 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
3956 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
3957 functions.
3958 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
3959 defaultmap and is_device_ptr clauses.
3960 (c_parser_omp_target): Parse target parallel and target simd. Set
3961 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3962 and target exit data. Diagnose invalid map kinds.
3963 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3964 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3965 construct.
3966 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3967 &omp_priv.
3968 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3969 (c_parser_omp_taskloop): New function.
3970 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3971 handle PRAGMA_OMP_TASKLOOP.
3972 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3973 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3974 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3975 Add IS_OMP argument, handle structure element bases, diagnose
3976 bitfields, pass IS_OMP recursively, diagnose known zero length
3977 array sections in depend clauses, handle array sections in reduction
3978 clause, diagnose negative length even for pointers.
3979 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3980 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3981 array sections in reduction clause, set
3982 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3983 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3984 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3985 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3986
21ba0cea
MP
39872015-10-06 Marek Polacek <polacek@redhat.com>
3988
3989 * c-parser.c (c_parser_statement_after_labels): Use
3990 protected_set_expr_location.
3991 (c_parser_omp_clause_num_gangs): Likewise.
3992 (c_parser_omp_clause_num_threads): Likewise.
3993 (c_parser_omp_clause_num_workers): Likewise.
3994 (c_parser_omp_clause_vector_length): Likewise.
3995 (c_parser_omp_clause_num_teams): Likewise.
3996 (c_parser_omp_clause_thread_limit): Likewise.
3997 * c-typeck.c (build_c_cast): Likewise.
3998 (c_cast_expr): Likewise.
3999
624d31fe
RS
40002015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4001
4002 * c-typeck.c (c_tree_equal): Use real_equal instead of
4003 REAL_VALUES_EQUAL.
4004
b8fd7909
JM
40052015-10-04 Jason Merrill <jason@redhat.com>
4006
4007 * c-parser.c (c_lex_one_token): Handle @synchronized.
4008 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4009 can change whether the function is transaction_safe.
4010
1c7485af
MP
40112015-10-02 Marek Polacek <polacek@redhat.com>
4012
4013 PR c/67730
4014 * c-typeck.c (convert_for_assignment): Use the expansion point
4015 location throughout.
4016
3e3b8d63
MP
40172015-10-02 Marek Polacek <polacek@redhat.com>
4018
4019 PR c/64249
4020 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4021 and pass it down to c_parser_if_statement.
4022 (c_parser_else_body): Add CHAIN parameter and pass it down to
4023 c_parser_statement_after_labels.
4024 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4025 duplicated if-else-if conditions.
4026
aabef2de
MP
40272015-10-01 Marek Polacek <polacek@redhat.com>
4028
4029 * c-typeck.c (convert_for_assignment): Improve commentary.
4030
de8ddd5f
MP
40312015-09-30 Marek Polacek <polacek@redhat.com>
4032
4033 PR c/67730
4034 * c-typeck.c (c_finish_return): Use the expansion point location for
4035 certain "return with value" warnings.
4036
c4914de6
MLI
40372015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4038
4039 * c-parser.c (pragma_lex): Add loc argument.
4040
0e36f5c7
MP
40412015-09-15 Marek Polacek <polacek@redhat.com>
4042
4043 PR c/67580
4044 * c-decl.c (tag_exists_p): New function.
4045 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4046 struct/union/enum keywords are missing.
4047 * c-tree.h (tag_exists_p): Declare.
4048
2f3bb934
MP
40492015-09-15 Marek Polacek <polacek@redhat.com>
4050
4051 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4052 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4053 Return NULL_TREE instead of 0.
4054 (lookup_name): Return NULL_TREE instead of 0.
4055 (lookup_name_in_scope): Likewise.
4056 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4057 (parser_xref_tag): Use false instead of 0.
4058 (start_struct): Use true instead of 1.
4059 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4060
aa256c4a
MP
40612015-09-14 Marek Polacek <polacek@redhat.com>
4062
4063 * c-typeck.c (set_nonincremental_init_from_string): Use
4064 HOST_WIDE_INT_M1U when shifting a negative value.
4065
dbb68221
MW
40662015-09-09 Mark Wielaard <mjw@redhat.com>
4067
4068 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4069 parm against NULL.
4070
a8a098ac
JJ
40712015-09-10 Jakub Jelinek <jakub@redhat.com>
4072
4073 PR c/67502
4074 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4075 into OMP_FOR_PRE_BODY rather than before the loop.
4076
f4b189d5
JJ
40772015-09-09 Jakub Jelinek <jakub@redhat.com>
4078
0bb99c11
JJ
4079 PR c/67501
4080 * c-parser.c (c_parser_oacc_all_clauses,
4081 c_parser_omp_all_clauses): Remove invalid clause from
4082 list of clauses even if parser->error is set.
4083
fce5e5e3
JJ
4084 PR c/67500
4085 * c-parser.c (c_parser_omp_clause_aligned,
4086 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4087 test for errors.
4088 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4089 error_mark_node.
4090
f4b189d5
JJ
4091 PR c/67495
4092 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4093 instead of c_parser_unary_expression. If the result is !lvalue_p,
4094 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4095
b2aaf235
MP
40962015-09-04 Marek Polacek <polacek@redhat.com>
4097
4098 PR sanitizer/67279
4099 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4100
1807ffc1
MS
41012015-09-03 Martin Sebor <msebor@redhat.com>
4102
4103 PR c/66516
8b652e65
JJ
4104 * c-typeck.c (convert_arguments, parser_build_unary_op,
4105 build_conditional_expr, c_cast_expr, convert_for_assignment,
4106 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4107 reject_gcc_builtin.
4108 (c_decl_implicit): Define.
4109
d04ff417
MP
41102015-09-02 Marek Polacek <polacek@redhat.com>
4111
4112 PR c/67432
4113 * c-parser.c (c_parser_enum_specifier): Give a better error for
4114 an empty enum.
4115
a79683d5
TS
41162015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4117
4118 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4119
191a6b94
MP
41202015-08-12 Marek Polacek <polacek@redhat.com>
4121
4122 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4123 LOC to it.
4124
420a9d9b
MP
41252015-08-03 Marek Polacek <polacek@redhat.com>
4126
4127 PR c/67088
4128 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4129 Use it.
4130 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4131
992118a1
PP
41322015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4133
4134 * c-parser.c (c_parser_if_body): Take token_indent_info
4135 argument. Call warn_for_misleading_indentation even when the
4136 body is a semicolon. Extract token_indent_infos corresponding
4137 to the guard, body and next tokens. Adjust call to
4138 warn_for_misleading_indentation accordingly.
4139 (c_parser_else_body): Likewise.
4140 (c_parser_if_statement): Likewise.
4141 (c_parser_while_statement): Likewise.
4142 (c_parser_for_statement): Likewise.
4143
46308474
LFSM
41442015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4145 Manuel López-Ibáñez <manu@gcc.gnu.org>
4146
4147 * c-decl.c (get_parm_info): Remove static var. Update warning
4148 message.
4149
05b28fd6
MP
41502015-07-27 Marek Polacek <polacek@redhat.com>
4151
4152 PR c++/66555
4153 PR c/54979
4154 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4155
451b5e48
MP
41562015-07-20 Marek Polacek <polacek@redhat.com>
4157
4158 PR c++/55095
4159 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4160 (build_binary_op): Warn about left shift overflows.
4161
1916bcb5
AM
41622015-07-09 Andrew MacLeod <amacleod@redhat.com>
4163
4164 * c-array-notation.c: Adjust includes for flags.h changes.
4165 * c-objc-common.c: Likewise.
4166
c7131fb2
AM
41672015-07-07 Andrew MacLeod <amacleod@redhat.com>
4168
4169 * c-array-notation.c: Adjust includes.
4170 * c-aux-info.c: Likewise.
4171 * c-convert.c: Likewise.
4172 * c-decl.c: Likewise.
4173 * c-errors.c: Likewise.
4174 * c-lang.c: Likewise.
4175 * c-objc-common.c: Likewise.
4176 * c-parser.c: Likewise.
4177 * c-typeck.c: Likewise.
4178
da2e71c9
MLI
41792015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4180
4181 PR fortran/66605
4182 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4183
b155cfd9
MP
41842015-06-29 Marek Polacek <polacek@redhat.com>
4185
4186 PR c/66322
4187 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4188 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4189 about -Wswitch-bool here.
4190 (do_case): Update c_add_case_label call.
4191 (c_finish_case): Update c_do_switch_warnings call.
4192
31521951
MP
41932015-06-27 Marek Polacek <polacek@redhat.com>
4194
4195 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4196
22d03525
MP
41972015-06-26 Marek Polacek <polacek@redhat.com>
4198
4199 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4200 INDIRECT_REF_P.
4201 * c-typeck.c (array_to_pointer_conversion): Likewise.
4202 (build_unary_op): Likewise.
4203 (c_finish_return): Likewise.
4204
f0889939
AM
42052015-06-25 Andrew MacLeod <amacleod@redhat.com>
4206
4207 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4208 * c-parser.c: Likewise.
4209
8d67ee55
RS
42102015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4211
4212 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4213 instead of pointer_hash.
4214 (detect_field_duplicates): Likewise.
4215
0ae9bd27
MP
42162015-06-25 Marek Polacek <polacek@redhat.com>
4217
4218 * c-array-notation.c: Use VAR_P throughout.
4219 * c-decl.c: Likewise.
4220 * c-objc-common.c: Likewise.
4221 * c-parser.c: Likewise.
4222 * c-typeck.c: Likewise.
4223
62f9079a
MP
42242015-06-25 Marek Polacek <polacek@redhat.com>
4225
4226 * c-decl.c: Use is_global_var throughout.
4227 * c-parser.c: Likewise.
4228 * c-typeck.c: Likewise.
4229
abb226c9
AM
42302015-06-17 Andrew MacLeod <amacleod@redhat.com>
4231
4232 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4233 * c-aux-info.c: Likewise.
4234 * c-convert.c: Likewise.
4235 * c-decl.c: Likewise.
4236 * c-errors.c: Likewise.
4237 * c-lang.c: Likewise.
4238 * c-objc-common.c: Likewise.
4239 * c-parser.c: Likewise.
4240 * c-typeck.c: Likewise.
4241
8cbababc
JH
42422015-06-11 Jan Hubicka <hubicka@ucw.cz>
4243
4244 PR middle-end/66325
4245 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4246 variants.
4247
a0349665
PMR
42482015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4249
4250 * c-decl.c (pop_scope): Register the main translation unit
4251 through the new debug hook.
4252
13fdf2e2
AM
42532015-06-08 Andrew MacLeod <amacleod@redhat.com>
4254
4255 * c-array-notation.c : Adjust include files.
4256 * c-aux-info.c : Likewise.
4257 * c-convert.c : Likewise.
4258 * c-decl.c : Likewise.
4259 * c-errors.c : Likewise.
4260 * c-lang.c : Likewise.
4261 * c-lang.h : Likewise.
4262 * c-objc-common.c : Likewise.
4263 * c-parser.c : Likewise.
4264 * c-typeck.c : Likewise.
4265
d7438551
AH
42662015-06-05 Aldy Hernandez <aldyh@redhat.com>
4267
4268 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4269 immediately clobber it.
4270 (c_write_global_declarations_1): Remove call to
4271 check_global_declaration_1.
4272 (c_write_global_declarations_2): Remove.
4273 (c_write_final_cleanups): Rename from c_write_global_declarations.
4274 Remove call to finalize_compilation_unit.
4275 Remove calls to debugging hooks.
4276 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4277 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4278 * c-tree.h: Remove c_write_global_declarations.
4279
ecb9f223
AM
42802015-06-04 Andrew MacLeod <amacleod@redhat.com>
4281
4282 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4283 * c-aux-info.c: Likewise.
4284 * c-convert.c: Likewise.
4285 * c-decl.c: Likewise.
4286 * c-errors.c: Likewise.
4287 * c-lang.c: Likewise.
4288 * c-objc-common.c: Likewise.
4289 * c-parser.c: Likewise.
4290 * c-typeck.c: Likewise.
4291
9482b620
MP
42922015-06-04 Marek Polacek <polacek@redhat.com>
4293
4294 PR c/66341
4295 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4296 it is a lvalue.
4297
bc51ace3
PK
42982015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4299
4300 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4301 Warn for empty struct.
4302 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4303
ea5b45b6
AT
43042015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4305
4306 * c-decl.c (start_function): Call plugin before parsing.
4307 (finish_function): Call plugin after parsing.
4308
c2d47482
PK
43092015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4310
4311 PR c/49551
4312 * c-decl.c (merge_decls): Merge DECL_COMMON.
4313
a95492ab
JW
43142015-05-22 Jim Wilson <jim.wilson@linaro.org>
4315
4316 * Make-lang.in (check_gcc_pallelize): Define.
4317
fd5c817a
MP
43182015-05-22 Marek Polacek <polacek@redhat.com>
4319
4320 PR c/47043
4321 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4322 attributes.
4323
c7b70a3c
MP
43242015-05-21 Marek Polacek <polacek@redhat.com>
4325
4326 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4327 DECL_BUILT_IN.
4328
21b634ae
MP
43292015-05-20 Marek Polacek <polacek@redhat.com>
4330
4331 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4332 * c-typeck.c: Likewise.
4333
296a8c2f
MP
43342015-05-19 Marek Polacek <polacek@redhat.com>
4335
4336 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4337
41b37d5e
JJ
43382015-05-19 Jakub Jelinek <jakub@redhat.com>
4339
4340 PR middle-end/66199
4341 * c-parser.c (c_parser_omp_for_loop): Don't add
4342 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4343 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4344 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4345 constructs.
4346
fab27f52
MM
43472015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4348
4349 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4350 swaps.
fab27f52 4351
40de31cf
MLI
43522015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4353
4354 PR fortran/44054
4355 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4356 accessor function.
4357
3aa3c9fc
MP
43582015-05-14 Marek Polacek <polacek@redhat.com>
4359
4360 PR c/66066
4361 PR c/66127
4362 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4363 rather than with 0.
4364
c3388e62
DM
43652015-05-12 David Malcolm <dmalcolm@redhat.com>
4366
4367 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4368 to add a call to warn_for_misleading_indentation.
4369 (c_parser_else_body): Likewise, adding param "else_loc".
4370 (c_parser_if_statement): Check for misleading indentation.
4371 (c_parser_while_statement): Likewise.
4372 (c_parser_for_statement): Likewise.
4373
755e528f
MP
43742015-05-08 Marek Polacek <polacek@redhat.com>
4375
4376 PR c/64918
4377 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4378 (output_init_element): Likewise.
4379
0173bd2a
MP
43802015-05-07 Marek Polacek <polacek@redhat.com>
4381
4382 PR c/65179
4383 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4384 value.
4385
9babc352
MP
43862015-04-30 Marek Polacek <polacek@redhat.com>
4387
4388 * c-typeck.c (set_init_label): Call error_at instead of error and
4389 pass LOC to it.
4390
ac9f18db
MP
4391 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4392 the type of a decl.
4393
ec3fba51
MP
4394 * c-typeck.c (c_build_va_arg): Clarify the error message.
4395
b811915d
TS
43962015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4397
4398 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4399 OMP_STANDALONE_CLAUSES.
4400
f3075008
MP
44012015-04-28 Marek Polacek <polacek@redhat.com>
4402
4403 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4404
4e81b788
MP
44052015-04-28 Marek Polacek <polacek@redhat.com>
4406
4407 PR c/65901
4408 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4409
6c1db78e
MP
44102015-04-25 Marek Polacek <polacek@redhat.com>
4411
4412 PR c/52085
4413 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4414 attribute.
4415
5c4abbb8
MP
44162015-04-23 Marek Polacek <polacek@redhat.com>
4417
4418 PR c/65345
4419 * c-decl.c (set_labels_context_r): New function.
4420 (store_parm_decls): Call it via walk_tree_without_duplicates.
4421 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4422 instead of create_tmp_var. Build TARGET_EXPR instead of
4423 COMPOUND_EXPR.
4424 (build_atomic_assign): Use create_tmp_var_raw instead of
4425 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4426
06aca1d5
IV
44272015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4428
4429 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4430 (c_parser_omp_target_update): Add missed %> to error_at ().
4431
8fba1830
BRF
44322015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4433
4434 PR target/55143
4435 * c-decl.c (c_default_pointer_mode): Remove definition.
4436 * c-tree.h (c_default_pointer_mode): Remove declaration.
4437
62021f64
TB
44382015-03-27 Tobias Burnus <burnus@net-b.de>
4439
4440 PR c/65586
4441 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4442 error out.
4443 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4444 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4445 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4446
9b65e171
JJ
44472015-03-19 Jakub Jelinek <jakub@redhat.com>
4448
4449 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4450 attribute for DECL_EXTERNAL VAR_DECLs.
4451
17958621
JJ
44522015-03-11 Jakub Jelinek <jakub@redhat.com>
4453
4454 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4455 argument.
4456
7ccb1a11
JJ
44572015-03-10 Jakub Jelinek <jakub@redhat.com>
4458
4459 PR c/65120
4460 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4461 before preparing arguments to warn_logical_not_parentheses.
4462
01177669
JJ
44632015-03-09 Jakub Jelinek <jakub@redhat.com>
4464
4465 PR c/65120
4466 * c-typeck.c (parser_build_binary_op): Don't warn for
4467 !!x == y or !b == y where b is _Bool.
4468
802ac282
MP
44692015-03-09 Marek Polacek <polacek@redhat.com>
4470
4471 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4472 * c-decl.c (grokdeclarator): Likewise.
4473 * c-typeck.c (build_binary_op): Likewise.
4474
e5165b60
MP
44752015-02-27 Marek Polacek <polacek@redhat.com>
4476
4477 PR c/65228
4478 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4479
065d214c
MP
44802015-02-14 Marek Polacek <polacek@redhat.com>
4481
4482 PR c/64768
4483 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4484 declared through a typedef name.
4485
e5d9235b
MP
44862015-02-13 Marek Polacek <polacek@redhat.com>
4487
4488 PR c/65050
4489 * c-decl.c (grokdeclarator): Print also the type when giving
4490 the error message about array's incomplete element type.
4491
fa01ffcc
JJ
44922015-02-11 Jakub Jelinek <jakub@redhat.com>
4493
4494 PR c/64824
4495 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4496 check in the POP macro.
4497
c3e38a03
MP
44982015-02-09 Marek Polacek <polacek@redhat.com>
4499
4500 PR c/64856
4501 * c-typeck.c (process_init_element): Don't always wrap
4502 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4503 initializing a range of elements.
4504
4886ec8e
JJ
45052015-02-04 Jakub Jelinek <jakub@redhat.com>
4506
4507 PR c/64824
4508 PR c/64868
4509 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4510
c3e38a03 45112015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4512
4513 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4514 processing enum declaration.
4515
7b33f0c8
MP
45162015-01-29 Marek Polacek <polacek@redhat.com>
4517
4518 PR c/64709
4519 * c-typeck.c (pop_init_level): If constructor_elements has
4520 exactly one element with integer_zerop value, set constructor_zeroinit
4521 to 1. Remove braces around warning_init call.
4522
dea63e49
JJ
45232015-01-27 Jakub Jelinek <jakub@redhat.com>
4524
4525 PR c/64766
4526 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4527 of FUNCTION_DECLs with error_mark_node.
4528
d38f7dce
JJ
45292015-01-26 Jakub Jelinek <jakub@redhat.com>
4530
4531 PR c/64778
4532 * c-typeck.c (convert_arguments): Return -1 if there are
4533 error_args, even if we've diagnosed too many arguments.
4534
cbf5d0e7
RB
45352015-01-21 Richard Biener <rguenther@suse.de>
4536
4537 PR middle-end/64313
4538 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4539 for builtins the user declared correctly.
4540
41dbbb37
TS
45412015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4542 Bernd Schmidt <bernds@codesourcery.com>
4543 Cesar Philippidis <cesar@codesourcery.com>
4544 James Norris <jnorris@codesourcery.com>
4545 Jakub Jelinek <jakub@redhat.com>
4546 Ilmir Usmanov <i.usmanov@samsung.com>
4547
4548 * c-parser.c: Include "gomp-constants.h".
4549 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4550 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4551 Use OMP_CLAUSE_SET_MAP_KIND.
4552 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4553 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4554 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4555 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4556 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4557 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4558 "copyout", "create", "delete", "deviceptr", "gang", "host",
4559 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4560 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4561 "present_or_create", "pcreate", "seq", "self", "vector",
4562 "vector_length", "wait", "worker".
4563 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4564 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4565 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4566 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4567 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4568 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4569 (c_parser_oacc_data_clause_deviceptr)
4570 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4571 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4572 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4573 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4574 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4575 (c_parser_oacc_parallel, c_parser_oacc_update)
4576 (c_parser_oacc_wait): New functions.
4577 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4578 (c_finish_oacc_data): New prototypes.
4579 * c-typeck.c: Include "gomp-constants.h".
4580 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4581 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4582 OMP_CLAUSE_SET_MAP_KIND.
4583 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4584 (c_finish_oacc_data): New functions.
4585 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4586 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4587 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4588 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4589 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4590 GOMP_MAP_FORCE_DEVICEPTR.
4591
adfac8df
JJ
45922015-01-09 Michael Collison <michael.collison@linaro.org>
4593
4594 * c-array-notation.c: Include hash-set.h, machmode.h,
4595 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4596 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4597 * c-aux-info.c: Ditto.
4598 * c-convert.c: Ditto.
4599 * c-decl.c: Ditto.
4600 * c-errors.c: Ditto.
4601 * c-lang.c: Dittoxs.
4602 * c-objc-common.c: Ditto.
4603 * c-parser.c: Ditto.
4604 * c-typeck.c: Include hash-set.h, machmode.h,
4605 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4606 fold-const.h, wide-int.h, inchash.h, real.h and
4607 fixed-value.h due to flattening of tree.h.
4608
2cc901dc
MP
46092015-01-07 Marek Polacek <polacek@redhat.com>
4610
4611 PR c/64417
4612 * c-typeck.c (process_init_element): Disallow initialization of
4613 a flexible array member with a string constant if the structure
4614 is in an array.
4615
5624e564
JJ
46162015-01-05 Jakub Jelinek <jakub@redhat.com>
4617
e5341100
JJ
4618 PR sanitizer/64344
4619 * c-typeck.c (convert_for_assignment, c_finish_return): For
4620 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4621 types also set in_late_binary_op around convert call.
4622 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4623 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4624 result on expr as last argument to ubsan_instrument_float_cast,
4625 if in_late_binary_op, don't use c_save_expr but save_expr.
4626
5624e564
JJ
4627 Update copyright years.
4628
5bd012f8
MP
46292015-01-05 Marek Polacek <polacek@redhat.com>
4630
4631 PR c/64423
4632 * c-typeck.c (build_array_ref): Pass loc down to
4633 warn_array_subscript_with_type_char.
4634
3f8257db 46352014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4636
4637 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4638 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4639 element type.
8e745a17 4640 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4641 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4642 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4643 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4644 to PEDWARN_FOR_QUALIFIERS.
768952be 4645
8f94a8c4
JJ
46462014-12-17 Jakub Jelinek <jakub@redhat.com>
4647
4648 PR sanitizer/64289
4649 * c-convert.c: Include ubsan.h.
4650 (convert): For real -> integral casts and
4651 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4652 instead instrument the float cast directly.
4653
b731b390
JJ
46542014-11-29 Jakub Jelinek <jakub@redhat.com>
4655
4656 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4657 c_finish_stmt_expr): Remove NULL last argument from
4658 create_tmp_var_raw and create_tmp_var calls.
4659 * c-array-notation.c (fix_builtin_array_notation_fn,
4660 build_array_notation_expr, fix_conditional_array_notations_1,
4661 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4662
541e35a6
MP
46632014-11-28 Marek Polacek <polacek@redhat.com>
4664
4665 PR c/63862
4666 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4667 convert the right operand to integer type.
4668
b286be94
MP
46692014-11-25 Marek Polacek <polacek@redhat.com>
4670
4671 PR c/63877
4672 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4673 for inline functions.
4674
aa7da51a
JJ
46752014-11-21 Jakub Jelinek <jakub@redhat.com>
4676
4677 PR target/63764
4678 * c-typeck.c (build_array_ref): Adjust
4679 convert_vector_to_pointer_for_subscript caller. If it returns true,
4680 call non_lvalue_loc on the result.
4681
d876207f
RB
46822014-11-11 Richard Biener <rguenther@suse.de>
4683
4684 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4685 to true.
4686
e5e44252
AK
46872014-11-10 Andi Kleen <ak@linux.intel.com>
4688
4689 PR c/60804
4690 * c-parser.c (c_parser_statement_after_labels): Call
4691 check_no_cilk.
4692 (c_parser_if_statement): Dito.
4693 (c_parser_switch_statement): Dito.
4694 (c_parser_while_statement): Dito.
4695 (c_parser_do_statement): Dito.
4696 (c_parser_for_statement): Dito.
4697 * c-typeck.c (c_finish_loop): Dito.
4698
13c21655
PC
46992014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4700
4701 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4702 OPT_Wshift_count_overflow in the warnings.
4703
2d51fcef
MP
47042014-10-30 Marek Polacek <polacek@redhat.com>
4705
4706 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4707 print the stripped version as well, if they're not the same.
4708
ef4bddc2
RS
47092014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4710
4711 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4712 machine_mode.
4713
c582198b
AM
47142014-10-28 Andrew MacLeod <amacleod@redhat.com>
4715
4716 * c-decl.c: Adjust include files.
4717 * c-parser.c: Ditto.
4718
ddc8de03
PM
47192014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4720 Tom Tromey <tromey@redhat.com>
4721
4722 * c-tree.h (enum c_oracle_request): New.
4723 (c_binding_oracle_function): New typedef.
4724 (c_binding_oracle, c_pushtag, c_bind): Declare.
4725 * c-decl.c (c_binding_oracle): New global.
4726 (I_SYMBOL_CHECKED): New macro.
4727 (i_symbol_binding): New function.
4728 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4729 (I_TAG_CHECKED): New macro.
4730 (i_tag_binding): New function.
4731 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4732 (I_LABEL_CHECKED): New macro.
4733 (i_label_binding): New function.
4734 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4735 (c_print_identifier): Save and restore c_binding_oracle.
4736 (c_pushtag, c_bind): New functions.
4737
60393bbc
AM
47382014-10-27 Andrew MacLeod <amacleod@redhat.com>
4739
4740 * c-typeck.c: Adjust include files.
4741
d723bb7c
MLI
47422014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4743
4744 PR c++/53061
4745 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4746 initialization here...
4747 (c_initialize_diagnostics): ... but here. Set defaults after
4748 building pretty-printer.
4749
1bc5a451
MP
47502014-10-23 Marek Polacek <polacek@redhat.com>
4751
4752 PR c/63626
4753 * c-decl.c (pop_scope): Don't print warning in external_scope.
4754
4435bb92
MP
47552014-10-19 Marek Polacek <polacek@redhat.com>
4756
4757 PR c/63567
4758 * c-typeck.c (output_init_element): Allow initializing objects with
4759 static storage duration with compound literals even in C99 and add
4760 pedwarn for it.
4761
7278465e
MP
47622014-10-17 Marek Polacek <polacek@redhat.com>
4763
4764 PR c/63567
4765 * c-typeck.c (digest_init): Allow initializing objects with static
4766 storage duration with compound literals even in C99 and add pedwarn
4767 for it.
4768
d9b7be2e
MP
47692014-10-17 Marek Polacek <polacek@redhat.com>
4770
4771 PR c/63543
4772 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4773 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4774 error multiple times. Print the type.
4775
f406ae1f
MP
47762014-10-17 Marek Polacek <polacek@redhat.com>
4777
4778 PR c/63549
4779 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4780 type.
4781
92574c7c
MP
47822014-10-17 Marek Polacek <polacek@redhat.com>
4783
4784 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4785 (start_function): Use OPT_Wimplicit_int instead of 0.
4786 (store_parm_decls_oldstyle): Likewise.
4787
1bc4a978
MT
47882014-10-17 Alan Modra <amodra@gmail.com>
4789
4790 PR middle-end/61848
4791 * c-decl.c (merge_decls): Don't merge section name or tls model
4792 to newdecl symtab node, instead merge to olddecl. Override
4793 existing olddecl section name. Set tls_model for all thread-local
4794 vars, not just OMP thread-private ones. Remove incorrect comment.
4795
83685514
AM
47962014-10-16 Andrew MacLeod <amacleod@redhat.com>
4797
4798 * c-decl.c: Adjust include files.
4799
78a7c317
DD
48002014-10-14 DJ Delorie <dj@redhat.com>
4801
4802 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4803 (c_token_starts_typename): Check all __intN, not just __int128.
4804 (c_token_starts_declspecs): Likewise.
4805 (c_parser_declspecs): Likewise.
4806 (c_parser_attribute_any_word): Likewise.
4807 (c_parser_objc_selector): Likewise.
4808 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4809 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4810 is specified.
4811 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4812 __int128.
4813 (finish_declspecs): Likewise.
4814
74d98c1e
AB
48152014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4816
8e745a17 4817 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4818 the duplicate code.
8e745a17 4819 (c_parser_statement): Call the new function.
74d98c1e 4820
84937de2
MP
48212014-10-09 Marek Polacek <polacek@redhat.com>
4822
4823 PR c/63480
4824 * c-typeck.c (pop_init_level): Don't warn about initializing
4825 with { }.
4826
0382aaa0
MP
48272014-10-07 Marek Polacek <polacek@redhat.com>
4828
4829 PR c/59717
4830 * c-decl.c (header_for_builtin_fn): New function.
4831 (implicitly_declare): Suggest which header to include.
4832
7a0ca710
MP
48332014-10-07 Marek Polacek <polacek@redhat.com>
4834
4835 * c-convert.c (convert): Use error_operand_p.
4836 * c-typeck.c (require_complete_type): Likewise.
4837 (really_atomic_lvalue): Likewise.
4838 (digest_init): Likewise.
4839 (handle_omp_array_sections_1): Likewise.
4840
6bc8a126
MP
48412014-10-03 Marek Polacek <polacek@redhat.com>
4842
4843 PR c/63453
4844 * c-decl.c (pop_scope): Don't warn about "inline function declared
4845 but never defined" for functions marked with gnu_inline attribute.
4846
d90c0a59
JJ
48472014-09-25 Jakub Jelinek <jakub@redhat.com>
4848
4849 PR c++/63249
4850 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
4851 on low_bound and length.
4852
083e891e
MP
48532014-09-24 Marek Polacek <polacek@redhat.com>
4854
4855 PR c/61405
4856 PR c/53874
4857 * c-parser.c: Don't define CPP_KEYWORD.
4858 (c_parser_switch_statement): Pass original type to c_finish_case.
4859 * c-tree.h (c_finish_case): Update declaration.
4860 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
4861 conditionally to c_do_switch_warnings.
4862
8d95fe25
MP
48632014-09-03 Marek Polacek <polacek@redhat.com>
4864
4865 PR c/62024
4866 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
4867 conversions.
4868
9a771876
JJ
48692014-09-02 Jakub Jelinek <jakub@redhat.com>
4870 Balaji V. Iyer <balaji.v.iyer@intel.com>
4871 Igor Zamyatin <igor.zamyatin@intel.com>
4872
4873 * c-parser.c (c_parser_cilk_for): New function.
4874 (c_parser_cilk_grainsize): Likewise.
4875 (c_get_temp_regvar): Likewise.
4876 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
4877 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
4878 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
4879 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
4880 case.
4881
b7679d96
CG
48822014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
4883
4884 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
4885 with using HOST_WIDE_INT without truncation to 'int'
4886
59ea0364
MP
48872014-08-22 Marek Polacek <polacek@redhat.com>
4888
4889 PR c++/62199
4890 * c-typeck.c (parser_build_binary_op): Adjust call to
4891 warn_logical_not_parentheses.
4892
671a475e
IZ
48932014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
4894
4895 PR other/62008
4896 * c-parser.c (c_parser_array_notation): Check for correct
4897 type of an array added.
4898
04159acf
MP
48992014-08-19 Marek Polacek <polacek@redhat.com>
4900
4901 PR c++/62153
4902 * c-typeck.c (build_binary_op): If either operand of a comparison
4903 is a boolean expression, call maybe_warn_bool_compare.
4904
c77935ee
PP
49052014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
4906
4907 PR c/45584
4908 * c-typeck.c (build_c_cast): Do a conversion even when the
4909 TYPE_MAIN_VARIANTs are the same.
4910
35aff4fb
MP
49112014-08-19 Marek Polacek <polacek@redhat.com>
4912
4913 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
4914 pedwarn_c99 instead of pedwarn.
4915 (grokfield): Likewise.
4916 (warn_defaults_to): New function.
4917 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
4918 Unconditionally call pedwarn_c99 instead of pedwarn.
4919 (start_function): Call warn_defaults_to instead of pedwarn_c99.
4920 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
4921 check flag_isoc11 before.
4922 * c-errors.c (pedwarn_c99): Change the return type to bool.
4923 Handle -Wc99-c11-compat.
4924 * c-parser.c (disable_extension_diagnostics): Handle
4925 warn_c99_c11_compat.
4926 (restore_extension_diagnostics): Likewise.
4927 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
4928 instead of pedwarn, don't check flag_isoc11 before.
4929 (c_parser_declspecs): Likewise.
4930 (c_parser_alignas_specifier): Likewise.
4931 (c_parser_alignof_expression): Likewise.
4932 (c_parser_generic_selection): Likewise.
4933 * c-tree.h (pedwarn_c99): Update declaration.
4934 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
4935 of pedwarn_c99.
4936
177cce46
MP
49372014-08-19 Marek Polacek <polacek@redhat.com>
4938
4939 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
4940 to pedwarn_c90.
4941 * c-errors.c: Include "opts.h".
4942 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
4943 * c-parser.c (disable_extension_diagnostics): Handle negative value
4944 of warn_c90_c99_compat, too.
4945 (restore_extension_diagnostics): Likewise.
4946 (c_parser_compound_statement_nostart): Pass
4947 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
4948
6dc99c33
MP
49492014-08-12 Marek Polacek <polacek@redhat.com>
4950
4951 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
4952 Add pedwarn.
4953 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
4954 Likewise.
4955 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
4956
3f8257db 49572014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
4958
4959 PR c/51849
4960 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4961 Call pedwarn_c90 instead of pedwarn.
4962 (check_bitfield_type_and_width): Likewise.
4963 (declspecs_add_qual): Likewise.
4964 (declspecs_add_type): Likewise.
4965 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4966 Adjust to only call pedwarn_c90.
4967 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4968 pedwarn_c90 instead of pedwarn.
4969 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4970 * c-parser.c (disable_extension_diagnostics): Handle
4971 warn_c90_c99_compat.
4972 (restore_extension_diagnostics): Likewise.
4973 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4974 pedwarn_c90 instead of pedwarn.
4975 (c_parser_initelt): Likewise.
4976 (c_parser_postfix_expression): Likewise.
4977 (c_parser_postfix_expression_after_paren_type): Likewise.
4978 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4979 * c-tree.h: Fix formatting.
4980 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4981 pedwarn_c90 instead of pedwarn.
4982
9f25a338
TS
49832014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4984
4985 * c-typeck.c: Remove include of pointer-set.h.
4986
044331a8
MP
49872014-08-07 Marek Polacek <polacek@redhat.com>
4988
4989 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4990
b787e7a2
TS
49912014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4992
4993 * c-typeck.c: Use hash_map instead of pointer_map.
4994
6e2830c3
TS
49952014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4996
4997 * c-decl.c: Use hash_set instead of pointer_set.
4998
a7ee52fb
IZ
49992014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5000
5001 PR middle-end/61455
5002 * c-array-notation.c (expand_array_notations): Handling
5003 of DECL_EXPR added.
5004
b4dfdc11
MG
50052014-07-31 Marc Glisse <marc.glisse@inria.fr>
5006
5007 PR c++/60517
5008 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5009 a local variable.
5010
976d5a22
TT
50112014-07-30 Tom Tromey <tromey@redhat.com>
5012
5013 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5014 field.
5015 (really_start_incremental_init, push_init_level): Initialize
5016 designator_depth.
5017 (pop_init_level): Set global designator_depth.
5018 (process_init_element): Check for designated_init attribute.
5019
30281de2
MP
50202014-07-20 Marek Polacek <polacek@redhat.com>
5021
5022 PR c/61852
5023 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5024 (implicitly_declare): Pass location to implicit_decl_warning.
5025
b108f48f
JJ
50262014-07-14 Jakub Jelinek <jakub@redhat.com>
5027
5028 PR middle-end/61294
5029 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5030 If non-NULL, call c_parser_check_literal_zero.
5031 (c_parser_check_literal_zero): New function.
5032 (c_parser_postfix_expression_after_primary): Adjust
5033 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5034
773ec47f
MP
50352014-07-06 Marek Polacek <polacek@redhat.com>
5036
5037 PR c/6940
5038 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5039 * c-tree.h (C_ARRAY_PARAMETER): Define.
5040 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5041 function parameter.
5042
22e1cf1c 50432014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5044 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5045
5046 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5047 releasing symbol.
5048
52ec0ea3
MP
50492014-07-01 Marek Polacek <polacek@redhat.com>
5050
5051 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5052 instead of 0 to WARN_FOR_ASSIGNMENT.
5053
d5c3d343
MP
50542014-07-01 Marek Polacek <polacek@redhat.com>
5055
5056 PR c/58286
5057 * c-typeck.c (convert_for_assignment): Pass
5058 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5059
6a7253a4
MP
50602014-06-30 Marek Polacek <polacek@redhat.com>
5061
5062 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5063 has no_sanitize_undefined attribute.
5064
5e88a8f4
IZ
50652014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5066
5067 PR middle-end/57541
5068 * c-array-notation.c (fix_builtin_array_notation_fn):
5069 Check for 0 arguments in builtin call. Check that bultin argument is
5070 correct.
5071 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5072 index.
5073
9698b078
SH
50742014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5075
5076 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5077 qualifiers in __auto_type for atomic types.
5078 (c_parser_typeof_specifier): Discard all type qualifiers in
5079 __typeof__ for atomic types.
5080
6e07c515
MP
50812014-06-25 Marek Polacek <polacek@redhat.com>
5082
5083 PR c/61162
5084 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5085 the return expression to c_finish_return.
5086
da6f124d
JJ
50872014-06-25 Jakub Jelinek <jakub@redhat.com>
5088
5089 * c-typeck.c (c_finish_omp_clauses): Make sure
5090 OMP_CLAUSE_LINEAR_STEP has correct type.
5091
c203e8a7
TS
50922014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5093
5094 * c-decl.c: Adjust.
5095
56ad0e38
JJ
50962014-06-24 Jakub Jelinek <jakub@redhat.com>
5097
5098 * c-parser.c (c_parser_omp_for_loop): For
5099 #pragma omp parallel for simd move lastprivate clause from parallel
5100 to for rather than simd.
5101
47c2554f
MP
51022014-06-23 Marek Polacek <polacek@redhat.com>
5103
5104 * c-typeck.c (parser_build_binary_op): Don't call
5105 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5106
56363ffd
JH
51072014-06-15 Jan Hubicka <hubicka@ucw.cz>
5108
5109 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5110 * c-decl.c (merge_decls): Likewise.
5111
d7ff7ae5
MP
51122014-06-09 Marek Polacek <polacek@redhat.com>
5113
5114 PR c/36446
5115 * c-typeck.c (error_init): Call inform instead of error_at.
5116 (pedwarn_init): Call inform instead of pedwarn.
5117 (warning_init): Call inform instead of warning_at.
5118
24d047a3
JH
51192014-06-07 Jan Hubicka <hubicka@ucw.cz>
5120
5121 * c-decl.c (merge_decls): Use set_decl_section_name.
5122 (duplicate_decls): Remove node if it exists.
5123
9bac5cbb
G
51242014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5125
5126 PR c/53119
5127 * c-typeck.c (push_init_level, process_init_element,
5128 pop_init_level): Correct check for zero initialization, move
5129 missing brace warning to respect zero initialization.
5130
8ffcdea8
MP
51312014-06-05 Marek Polacek <polacek@redhat.com>
5132
5133 PR c/56724
5134 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5135
742938c9
MP
51362014-06-05 Marek Polacek <polacek@redhat.com>
5137
5138 PR c/49706
5139 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5140 on the left hand side operand of a comparison.
742938c9 5141
6447c55d
MP
51422014-06-05 Marek Polacek <polacek@redhat.com>
5143
5144 PR c/48062
5145 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5146 Print note only if the warning was printed.
5147
9dc7743c
IZ
51482014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5149
5150 PR c/58942
5151 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5152 with a pointer.
5153
fedfecef
MP
51542014-06-03 Marek Polacek <polacek@redhat.com>
5155
5156 PR c/60439
5157 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5158 c_start_case.
5159 * c-tree.h (c_start_case): Update.
5160 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5161 switch condition has boolean value.
5162
9b2b7279
AM
51632014-06-02 Andrew MacLeod <amacleod@redhat.com>
5164
5165 * c-decl.c: Include builtins.h.
5166 * c-parser.c: Likewise.
5167
5c1bc275
MP
51682014-05-27 Marek Polacek <polacek@redhat.com>
5169
5170 PR c/56724
5171 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5172 error and warning calls to error_at and warning_at. Pass location of
5173 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5174 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5175 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5176
97563bc8
IZ
51772014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5178
5179 PR c/61191
5180 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5181 function parameters.
5182
aede2c10
JH
51832014-05-23 Jan Hubicka <hubicka@ucw.cz>
5184
5185 * c-decl.c (merge_decls): Preserve symtab node pointers.
5186 (duplicate_decls): Free new decl.
5187
edbba2ce
TS
51882014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5189
f3316c6d
TS
5190 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5191 initialization.
5192
edbba2ce
TS
5193 * c-parser.c (c_parser_omp_target): Return bool values.
5194
68c81f24
TS
51952014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5196
5197 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5198 num_teams_loc variable to num_thread_limit_loc.
5199
632f2871
RS
52002014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5201
5202 * c-array-notation.c (expand_array_notations): Use void_node
5203 instead of void_zero_node.
5204
766090c2
TS
52052014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5206
5207 * c-decl.c (finish_struct): Adjust.
5208 (finish_enum): Likewise.
5209 (bind): Adjust.
5210 (record_inline_static): Likewise.
5211 (push_scope): Likewise.
5212 (make_label): Likewise.
5213 (lookup_label_for_goto): Likewise.
5214 (finish_struct): Likewise.
5215 (finish_enum): Likewise.
5216 (store_parm_decls): Likewise.
5217 (c_push_function_context): Likewise.
5218 * c-lang.h: Remove usage of variable_size gty attribute.
5219 * c-parser.c (c_parse_init): Adjust.
5220 (c_parse_file): Likewise.
5221
2b107f6b
MP
52222014-05-13 Marek Polacek <polacek@redhat.com>
5223
5224 PR c/61162
5225 * c-typeck.c (convert_for_assignment): Pass location to
5226 WARN_FOR_ASSIGNMENT instead of input_location.
5227
d033409e
MP
52282014-05-10 Marek Polacek <polacek@redhat.com>
5229
5230 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5231 maybe_warn_string_init.
5232 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5233 maybe_warn_string_init.
5234 * c-tree.h (maybe_warn_string_init): Update declaration.
5235 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5236 Call pedwarn_init with loc instead of with input_location.
5237 (digest_init): Pass init_loc to maybe_warn_string_init.
5238 (pop_init_level): Call pedwarn_init with loc instead of with
5239 input_location.
5240 (set_init_index): Likewise.
5241 (process_init_element): Likewise.
5242
ea58ef42
MP
52432014-05-09 Marek Polacek <polacek@redhat.com>
5244
5245 PR c/61096
5246 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5247 (c_parser_initelt): Pass location to set_init_label. Pass array index
5248 location to set_init_index.
5249 * c-tree.h (push_init_level): Update declaration.
5250 (pop_init_level): Likewise.
5251 (set_init_index): Likewise.
5252 (set_init_label): Likewise.
5253 * c-typeck.c (error_init): Add location parameter. Call error_at
5254 instead of error.
5255 (digest_init): Pass init_loc to error_init.
5256 (really_start_incremental_init):
5257 (push_init_level): Add location parameter. Pass loc to pop_init_level
5258 and error_init.
5259 (pop_init_level): Likewise.
5260 (set_designator): Add location parameter. Pass loc to pop_init_level,
5261 push_init_level, and error_init.
5262 (set_init_index): Add location parameter. Pass loc to error_init and
5263 set_designator.
5264 (set_init_label): Likewise.
5265 (output_init_element): Pass loc to error_init.
5266 (process_init_element): Pass loc to error_init, pop_init_level,
5267 pedwarn_init, and push_init_level.
5268
661a0813
MP
52692014-05-09 Marek Polacek <polacek@redhat.com>
5270
5271 PR c/50459
5272 * c-parser.c (c_parser_attributes): Parse the arguments as an
5273 expression-list if the attribute takes identifier.
5274
2793eeab
MP
52752014-05-08 Marek Polacek <polacek@redhat.com>
5276
5277 PR c/61053
5278 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5279 TYPE_ALIGN_UNIT.
5280
f827930a
MP
52812014-05-08 Marek Polacek <polacek@redhat.com>
5282
5283 PR c/61077
5284 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5285 of main.
5286
1d60af08
KZ
52872014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5288 Mike Stump <mikestump@comcast.net>
5289 Richard Sandiford <rdsandiford@googlemail.com>
5290
5291 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5292 (finish_enum): Use wide-int interfaces.
5293 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5294 * c-typeck.c (build_c_cast): Likewise.
5295 (set_nonincremental_init_from_string): Likewise.
5296 (c_tree_equal): Likewise.
5297
a0e24419
MP
52982014-05-02 Marek Polacek <polacek@redhat.com>
5299
5300 PR c/25801
5301 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5302 Return size_one_node when the type is not complete.
5303 (pointer_diff): Remove comment.
5304 (build_unary_op): Improve error messages.
5305
19fc9faa
MP
53062014-05-02 Marek Polacek <polacek@redhat.com>
5307
5308 * c-typeck.c (c_finish_return): Separate warning_at calls.
5309
63bc4e87
MP
53102014-05-02 Marek Polacek <polacek@redhat.com>
5311
5312 * c-tree.h (error_init): Remove declaration.
5313 (pedwarn_init): Likewise.
5314 * c-typeck.c (error_init): Make static and move above.
5315 (pedwarn_init): Likewise.
5316 (warning_init): Move above.
5317 (maybe_warn_string_init): Likewise.
5318
4bd2511b
JL
53192014-05-01 Jeff Law <law@redhat.com>
5320
5321 Revert:
5322
5323 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5324 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5325 avoid goto.
5326
6a358dcb
MP
53272014-05-02 Marek Polacek <polacek@redhat.com>
5328
5329 PR c/60784
5330 * c-typeck.c (push_init_level): Set constructor_designated to
5331 p->designated for structures.
5332
ae5ebda4
MP
53332014-05-01 Marek Polacek <polacek@redhat.com>
5334
5335 PR c/60915
5336 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5337 function-definition has an attribute after the declarator.
5338
96b40f8d
MP
53392014-05-01 Marek Polacek <polacek@redhat.com>
5340
5341 PR c/60257
5342 * c-typeck.c (warning_init): Add location_t parameter. Call
5343 warning_at instead of warning.
5344 (push_init_level): Pass input_location to warning_init.
5345 (add_pending_init): Add location_t parameter. Pass loc to
5346 warning_init.
5347 (set_nonincremental_init): Pass input_location to add_pending_init.
5348 (set_nonincremental_init_from_string): Likewise.
5349 (output_init_element): Pass loc to warning_init and to
5350 add_pending_init.
5351
32e00768
MP
53522014-05-01 Marek Polacek <polacek@redhat.com>
5353
5354 PR c/43395
5355 * c-typeck.c (c_finish_return): Distinguish between label and variable
5356 when warning about returning local address.
5357
c9379ce2
MP
53582014-05-01 Marek Polacek <polacek@redhat.com>
5359
5360 PR c/29467
5361 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5362 in C89 mode.
5363
d00887e8
MP
53642014-05-01 Marek Polacek <polacek@redhat.com>
5365
5366 PR c/43245
5367 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5368 instead of 0 to WARN_FOR_QUALIFIERS.
5369
5436fa2e
MP
53702014-05-01 Marek Polacek <polacek@redhat.com>
5371
5372 PR c/56989
5373 * c-typeck.c (default_conversion): Use better location for
5374 error call.
5375
f8ed5150
MP
53762014-04-30 Marek Polacek <polacek@redhat.com>
5377
5378 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5379 also when SANITIZE_FLOAT_DIVIDE is on.
5380
8337d1db
MP
53812014-04-30 Marek Polacek <polacek@redhat.com>
5382
5383 PR c/60139
5384 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5385 and pedwarn_init. Use loc insted of input_location.
5386
c4bdc42f
MP
53872014-04-30 Marek Polacek <polacek@redhat.com>
5388
5389 PR c/60351
5390 * c-typeck.c (build_binary_op): Use location when warning about
5391 shift count.
5392
45484dcf
MP
53932014-04-25 Marek Polacek <polacek@redhat.com>
5394
5395 PR c/18079
5396 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5397 always_inline/noinline and hot/cold attributes.
5398
34cf811f
MP
53992014-04-25 Marek Polacek <polacek@redhat.com>
5400
5401 PR c/60114
5402 * c-parser.c (c_parser_initelt): Pass input_location to
5403 process_init_element.
5404 (c_parser_initval): Pass loc to process_init_element.
5405 * c-tree.h (process_init_element): Adjust declaration.
5406 * c-typeck.c (push_init_level): Pass input_location to
5407 process_init_element.
5408 (pop_init_level): Likewise.
5409 (set_designator): Likewise.
5410 (output_init_element): Add location_t parameter. Pass loc to
5411 digest_init.
5412 (output_pending_init_elements): Pass input_location to
5413 output_init_element.
5414 (process_init_element): Add location_t parameter. Pass loc to
5415 output_init_element.
5416
42056eac
JJ
54172014-04-24 Jakub Jelinek <jakub@redhat.com>
5418
5419 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5420 atomic-clause, allow comma in between atomic-clause and
5421 seq_cst.
5422
e162a134
JJ
54232014-04-22 Jakub Jelinek <jakub@redhat.com>
5424
5425 PR c/59073
5426 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5427 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5428
2f6babac
IZ
54292014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5430
5431 PR middle-end/60469
5432 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5433 create_tmp_var instead build_decl for creating temps.
5434 (build_array_notation_expr): Likewise.
5435 (fix_conditional_array_notations_1): Likewise.
5436 (fix_array_notation_expr): Likewise.
5437 (fix_array_notation_call_expr): Likewise.
5438
8edbfaa6
JJ
54392014-03-28 Jakub Jelinek <jakub@redhat.com>
5440
5441 PR c++/60689
5442 * c-tree.h (c_build_function_call_vec): New prototype.
5443 * c-typeck.c (build_function_call_vec): Don't call
5444 resolve_overloaded_builtin here.
5445 (c_build_function_call_vec): New wrapper function around
5446 build_function_call_vec. Call resolve_overloaded_builtin here.
5447 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5448 Call c_build_function_call_vec instead of build_function_call_vec.
5449 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5450 * c-decl.c (finish_decl): Likewise.
5451
7485aeea
MLI
54522014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5453
5454 PR c/55383
5455 * c-typeck.c: Use correct format string in cast-qual warning
5456
b17a8b07
TS
54572014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5458
5459 * c-decl.c (c_decl_attributes): Use
5460 lang_hooks.types.omp_mappable_type.
5461 * c-typeck.c (c_finish_omp_clauses): Likewise.
5462
3af9c5e9
MP
54632014-03-06 Marek Polacek <polacek@redhat.com>
5464
5465 PR c/60197
5466 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5467 of checking tree code.
5468
1c9f5f33
PK
54692014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5470
5471 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5472 (c_parser_parameter_declaration): Likewise.
5473
cc28fc7f
MP
54742014-02-19 Marek Polacek <polacek@redhat.com>
5475
5476 PR c/60195
5477 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5478 Call mark_exp_read on exp.value.
5479 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5480 TREE_ADDRESSABLE on old instead of val.
5481 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5482
b581c05c
PK
54832014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5484
5485 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5486 C_EXPR_APPEND by vec_safe_push.
5487 * c-tree.h (C_EXPR_APPEND): Remove.
5488
81e5eca8
MP
54892014-01-31 Marek Polacek <polacek@redhat.com>
5490
5491 PR c/59963
5492 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5493 build_function_call_vec.
5494 (build_function_call): Likewise.
5495 (build_atomic_assign): Likewise.
5496 (build_function_call_vec): Add arg_loc parameter. Use it.
5497 (convert_arguments): Likewise.
5498 (convert_for_assignment): Rename rhs_loc to expr_loc.
5499 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5500 (c_parser_objc_keywordexpr): Likewise.
5501 (c_parser_postfix_expression_after_primary): Call
5502 build_function_call_vec with expr_loc rather than op_loc.
5503 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5504 build_function_call_vec.
5505 (c_parser_expr_list): Add locations parameter. Fill it with locations
5506 of function arguments.
5507 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5508
68fca595
MP
55092014-01-30 Marek Polacek <polacek@redhat.com>
5510
5511 PR c/59940
5512 * c-typeck.c (build_function_call_vec): Use loc parameter.
5513 (convert_arguments): Add location parameter. Use it.
5514 (ep_convert_and_check): Likewise.
5515 (build_atomic_assign): Adjust convert_for_assignment call.
5516 (build_modify_expr): Likewise.
5517 (digest_init): Likewise.
5518 (c_finish_return): Likewise.
5519 (build_conditional_expr): Adjust ep_convert_and_check calls.
5520 (convert_for_assignment): Add rhs_loc parameter. Use it.
5521 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5522 calls.
5523
fa337f3a
RB
55242014-01-30 Richard Biener <rguenther@suse.de>
5525
5526 PR c/59905
5527 * c-typeck.c (build_function_call_vec): Do not replace calls
5528 to a function via an incompatible type with a runtime abort.
5529
b72271b9
BI
55302014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5531
5532 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5533 flag_enable_cilkplus with flag_cilkplus.
5534 (c_parser_direct_declarator_inner): Likewise.
5535 (c_parser_attribute_any_word): Likewise.
5536 (c_parser_attributes): Likewise.
5537 (c_parser_compound_statement): Likewise.
5538 (c_parser_statement_after_labels): Likewise.
5539 (c_parser_if_statement): Likewise.
5540 (c_parser_switch_statement): Likewise.
5541 (c_parser_do_statement): Likewise.
5542 (c_parser_for_statement): Likewise.
5543 (c_parser_unary_expression): Likewise.
5544 (c_parser_postfix_expression): Likewise.
5545 (c_parser_postfix_expression_after_primary): Likewise.
5546 (c_parser_postfix_expression_after_primary): Likewise.
5547 (c_parser_omp_clause_name): Likewise.
5548 (c_finish_omp_declare_simd): Likewise.
5549 (c_parser_cilk_verify_simd): Likewise.
5550 * c-typeck.c (build_array_ref): Likewise.
5551 (build_function_call_vec): Likewise.
5552 (convert_arguments): Likewise.
5553 (build_compound_expr): Likewise.
5554 (c_finish_return): Likewise.
5555 (c_finish_if_stmt): Likewise.
5556 (c_finish_loop): Likewise.
5557 (build_binary_op): Likewise.
5558
393e8e8b
MP
55592014-01-23 Marek Polacek <polacek@redhat.com>
5560
5561 PR c/59846
5562 * c-typeck.c (parser_build_binary_op): Use location instead of
5563 input_location.
5564 (build_binary_op): Pass location to shorten_compare.
5565
f04dda30
MP
55662014-01-23 Marek Polacek <polacek@redhat.com>
5567
5568 PR c/58346
5569 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5570 an empty aggregate.
5571
789eadcd
MP
55722014-01-23 Marek Polacek <polacek@redhat.com>
5573
5574 PR c/59871
5575 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5576 of a comma expression.
5577 (emit_side_effect_warnings): Likewise.
5578
40f14e9f
BI
55792014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5580
5581 PR c/59825
5582 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5583 function to use walk_tree and moved a lot of its functionality to
5584 expand_array_notations.
5585 (expand_array_notations): New function.
5586
74558dd9
BI
55872014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5588
5589 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5590 attribute an attribute without value.
5591
652fea39
JJ
55922014-01-23 Jakub Jelinek <jakub@redhat.com>
5593
5594 PR middle-end/58809
5595 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5596 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5597
f34f1c87
MP
55982014-01-22 Marek Polacek <polacek@redhat.com>
5599
5600 PR c/59891
5601 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5602 of remove_c_maybe_const_expr on op1 and op2.
5603
241f845a
JJ
56042014-01-15 Jakub Jelinek <jakub@redhat.com>
5605
5606 PR c/58943
5607 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5608 effects, preevaluate rhs using SAVE_EXPR first.
5609
9a74f20c
BI
56102014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5611
5612 PR c++/59631
5613 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5614 statements with if-elseif statements.
5615
96066ce1
MP
56162014-01-06 Marek Polacek <polacek@redhat.com>
5617
5618 PR c/57773
5619 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5620 defined bit-field types only in ISO C.
5621
23a5b65a
RS
56222014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5623
5624 Update copyright years
5625
f9030485
RS
56262014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5627
5628 * c-array-notation.c: Use the standard form for the copyright notice.
5629
41958c28
BI
56302013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5631
5632 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5633 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5634 field in parser is not empty. If not-empty, call the function
5635 c_parser_finish_omp_declare_simd.
5636 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5637 between SIMD-enabled functions and #pragma simd. Added new parameter.
5638 (c_parser_cilk_all_clauses): Modified the usage of the function
5639 c_parser_cilk_clause_vectorlength as mentioned above.
5640 (c_parser_cilk_simd_fn_vector_attrs): New function.
5641 (c_finish_cilk_simd_fn_tokens): Likewise.
5642 (is_cilkplus_vector_p): Likewise.
5643 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5644 "nomask," and "mask" strings in clause name.
5645 (c_parser_omp_all_clauses): Added 3 new case statements:
5646 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5647 PRAGMA_CILK_CLAUSE_NOMASK.
5648 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5649 check for vector attribute and if so call the function
5650 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5651 called the function c_finish_cilk_simd_fn_tokens.
5652 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5653 parser field is non-empty. If so, parse them as you would parse
5654 the omp declare simd pragma.
5655 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5656 Added a check when step is a parameter and flag it as error.
5657 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5658 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5659 pragma_omp_clause.
5660
cef0fd0e
TS
56612013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5662
5663 * c-parser.c (c_parser_omp_parallel): Fix description.
5664
12893402
BI
56652013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5666
5667 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5668 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5669 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5670 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5671
296674db
JM
56722013-12-04 Joseph Myers <joseph@codesourcery.com>
5673
5674 PR c/52023
5675 * c-parser.c (c_parser_alignas_specifier): Use
5676 c_sizeof_or_alignof_type instead of c_alignof.
5677 (c_parser_alignof_expression): Likewise, with min_alignof
5678 parameter depending on alignof spelling used.
5679
edd28054
MP
56802013-12-04 Marek Polacek <polacek@redhat.com>
5681
5682 PR c/54113
5683 * c-decl.c (start_function): Don't warn for missing prototype for
5684 inline functions.
5685
da0fc454
MP
56862013-12-03 Marek Polacek <polacek@redhat.com>
5687
5688 PR c/59351
5689 * c-decl.c (build_compound_literal): Allow compound literals with
5690 empty initial value.
5691
4c2ecab0
JM
56922013-12-02 Joseph Myers <joseph@codesourcery.com>
5693
5694 PR c/58235
5695 * c-typeck.c (build_modify_expr): Diagnose assignment to
5696 expression with array type.
5697
340baef7
JM
56982013-11-29 Joseph Myers <joseph@codesourcery.com>
5699
5700 PR c/42262
5701 * c-typeck.c (process_init_element): Do not treat a string as
5702 initializing a whole array when used with a designator for an
5703 individual element.
5704
6763b9f7
JM
57052013-11-29 Joseph Myers <joseph@codesourcery.com>
5706
5707 PR c/57574
5708 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5709 an inline function following a static declaration.
5710
e7bd1de1
JJ
57112013-11-28 Jakub Jelinek <jakub@redhat.com>
5712
5713 PR c/59310
5714 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5715 to p_name before calling c_parser_omp_teams instead of after.
5716 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5717 argument. Remove unused p_name variable.
5718
0136f8f0
AH
57192013-11-27 Aldy Hernandez <aldyh@redhat.com>
5720 Jakub Jelinek <jakub@redhat.com>
5721
5722 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5723 external_scope is NULL.
5724
241b71bb
TV
57252013-11-27 Tom de Vries <tom@codesourcery.com>
5726 Marc Glisse <marc.glisse@inria.fr>
5727
5728 PR c++/59032
5729 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5730
2fb9a547
AM
57312013-11-22 Andrew MacLeod <amacleod@redhat.com>
5732
5733 * c-typeck.c: Add required include files from gimple.h.
5734
8400e75e
DM
57352013-11-22 David Malcolm <dmalcolm@redhat.com>
5736
5737 * c-decl.c (define_label, shadow_tag_warned)
5738 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5739 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5740 (declspecs_add_type): Remove use of in_system_header macro.
5741 * c-parser.c (c_parser_unary_expression): Likewise.
5742 * c-typeck.c (store_init_value, process_init_element)
5743 (c_start_case): Likewise.
5744
5745 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5746 macro.
5747
5748 * c-parser.c (c_parser_set_source_position_from_token): Remove
5749 reference to in_system_header from comment.
5750
386b1f1f
RS
57512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5752
5753 * c-decl.c (grokdeclarator): Update comment to refer to
5754 tree_to_[su]hwi rather than tree_low_cst.
5755
ae7e9ddd
RS
57562013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5757
5758 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5759 tree_to_uhwi throughout.
5760
9439e9a1
RS
57612013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5762
5763 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5764 throughout.
5765
9541ffee
RS
57662013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5767
5768 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5769 throughout.
5770
c02065fc
AH
57712013-11-15 Aldy Hernandez <aldyh@redhat.com>
5772
5773 * c-parser.c (c_parser_cilk_simd): New.
5774 (c_parser_cilk_verify_simd): New.
5775 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5776 (c_parser_omp_for_loop): Add case for NE_EXPR.
5777 Set c_break_label for CILK_SIMD.
5778 (c_parser_cilk_clause_vectorlength): New.
5779 (c_parser_cilk_clause_linear): New.
5780 (c_parser_cilk_clause_name): New.
5781 (c_parser_cilk_all_clauses): New.
5782 * c-typeck.c (build_unary_op): Pass location argument to
5783 readonly_error.
5784 (build_modify_expr): Same.
5785 (build_asm_expr): Same.
5786 (c_finish_bc_stmt): Error on break/continue in loops.
5787
18f429e2
AM
57882013-11-14 Andrew MacLeod <amacleod@redhat.com>
5789
5790 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5791
d8a2d370
DN
57922013-11-14 Diego Novillo <dnovillo@google.com>
5793
5794 * c-decl.c: Include print-tree.h.
5795 Include stor-layout.h.
5796 Include varasm.h.
5797 Include attribs.h.
5798 Include stringpool.h.
5799 * c-lang.c: Include fold-const.h.
5800 * c-parser.c: Include stringpool.h.
5801 Include attribs.h.
5802 Include stor-layout.h.
5803 Include varasm.h.
5804 Include trans-mem.h.
5805 * c-typeck.c: Include stor-layout.h.
5806 Include trans-mem.h.
5807 Include varasm.h.
5808 Include stmt.h.
5809
38b7bc7f
JM
58102013-11-13 Joseph Myers <joseph@codesourcery.com>
5811
5812 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5813 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5814 __auto_type.
5815 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5816 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5817 RID_AUTO_TYPE.
5818 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5819 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5820 (c_parser_declarator, c_parser_direct_declarator_inner)
5821 (c_parser_parameter_declaration, c_parser_type_name): All callers
5822 changed.
5823 (c_parser_declaration_or_fndef): Handle declarations with type
5824 determined from the initializer.
5825
45b0be94
AM
58262013-11-12 Andrew MacLeod <amacleod@redhat.com>
5827
18f429e2 5828 * c-typeck.c: Include gimplify.h.
45b0be94 5829
582d9b50
JM
58302013-11-12 Joseph Myers <joseph@codesourcery.com>
5831
5832 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5833 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5834 comment.
5835 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5836 or _Thread_local as appropriate in diagnostics.
5837 (build_null_declspecs): Initialize ret->thread_gnu_p.
5838 (declspecs_add_scspec): Handle either __thread or _Thread_local
5839 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
5840 pedantic. Do not disallow _Thread_local extern and _Thread_local
5841 static.
5842
267bac10
JM
58432013-11-07 Joseph Myers <joseph@codesourcery.com>
5844 Andrew MacLeod <amacleod@redhat.com>
5845
5846 * c-aux-info.c (gen_type): Handle atomic qualifier.
5847 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
5848 qualifiers when compating types.
5849 (shadow_tag_warned): Handle atomic_p in declspecs.
5850 (quals_from_declspecs): Likewise.
5851 (start_decl): Use c_type_promotes_to when promoting argument
5852 types.
5853 (grokdeclarator): Handle _Atomic.
5854 (get_parm_info): Diagnose any qualifier on "void" as only
5855 parameter.
5856 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
5857 comparing types. Use c_type_promotes_to when promoting argument
5858 types.
5859 (finish_function): Use c_type_promotes_to when promoting argument
5860 types.
5861 (build_null_declspecs): Handle atomic_p in declspecs.
5862 (declspecs_add_qual): Handle RID_ATOMIC.
5863 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
5864 (c_token_starts_declspecs): Handle RID_ATOMIC.
5865 (c_parser_declspecs): Handle atomic type specifiers and
5866 qualifiers.
5867 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
5868 from types of expressions with atomic type.
5869 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
5870 (c_parser_attribute_any_word): Handle RID_ATOMIC.
5871 (c_parser_initializer, c_parser_initelt, c_parser_initval)
5872 (c_parser_statement_after_labels, c_parser_switch_statement)
5873 (c_parser_for_statement, c_parser_expr_no_commas)
5874 (c_parser_conditional_expression, c_parser_binary_expression)
5875 (c_parser_cast_expression, c_parser_unary_expression)
5876 (c_parser_postfix_expression)
5877 (c_parser_postfix_expression_after_primary, c_parser_expression):
5878 Use convert_lvalue_to_rvalue.
5879 (c_parser_expression_conv, c_parser_expr_list): Document
5880 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
5881 (c_parser_objc_synchronized_statement): Use
5882 convert_lvalue_to_rvalue.
5883 (c_parser_objc_selector): Handle RID_ATOMIC.
5884 (c_parser_objc_receiver, c_parser_array_notation): Use
5885 convert_lvalue_to_rvalue.
5886 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
5887 _Atomic (type-name).
5888 (struct c_declspecs): Add atomic_p field.
5889 (convert_lvalue_to_rvalue): Declare.
5890 * c-typeck.c (c_type_promotes_to): Promote atomic types to
5891 corresponding atomic types.
5892 (qualify_type): Don't add _Atomic qualifiers from second argument.
5893 (comp_target_types): Do not allow _Atomic mismatches.
5894 (type_lists_compatible_p): Do not remove atomic qualifiers when
5895 comparing types.
5896 (really_atomic_lvalue, convert_lvalue_to_rvalue)
5897 (build_atomic_assign): New functions.
5898 (build_unary_op): Use build_atomic_assign for atomic increment and
5899 decrement.
5900 (build_conditional_expr): Do not treat _Atomic void as a qualified
5901 version of void.
5902 (build_modify_expr): Use build_atomic_assign for atomic LHS.
5903 (find_anonymous_field_with_type, convert_to_anonymous_field)
5904 (convert_for_assignment): Do not remove atomic qualifiers when
5905 comparing types.
5906 (digest_init): Do not accept initialization of arrays of atomic
5907 elements by string constants.
5908 (build_asm_expr): Use convert_lvalue_to_rvalue.
5909 (build_binary_op): Do not treat _Atomic void as a qualified
5910 version of void.
5911
0c249d4b
DD
59122013-11-06 DJ Delorie <dj@redhat.com>
5913
5914 * c-decl.c (locate_old_decl): If a previous conflicting decl is
5915 both explicit and builtin, print the location of the explicit one.
5916
6d7f7e0a
TB
59172013-11-05 Tobias Burnus <burnus@net-b.de>
5918
5919 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
5920 c_parser_omp_distribute, c_parser_omp_teams,
5921 c_parser_omp_target, c_parser_omp_declare): Handle
5922 -fopenmp-simd.
5923
b906f4ca
MP
59242013-11-03 Marek Polacek <polacek@redhat.com>
5925
5926 * c-decl.c (grokdeclarator): Add VLA instrumentation.
5927
ee1d5a02
JJ
59282013-11-01 Jakub Jelinek <jakub@redhat.com>
5929
5930 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
5931 check_dup_generic at the end, unless remove is true.
5932 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
5933 remove = true;.
5934 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
5935
5a9785fb
JJ
59362013-10-31 Jakub Jelinek <jakub@redhat.com>
5937
5938 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
5939 with decl that is not pointer nor array.
5940
939b37da
BI
59412013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5942
5943 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
5944 a spawning function is found.
5945 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
5946 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
5947 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5948 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
5949 case.
5950 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
5951 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
5952 expr.
5953 (c_finish_return): Added a check to reject _Cilk_spawn in return
5954 expression.
5955 (build_cilk_spawn): New function.
5956 (build_cilk_sync): Likewise.
5957 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 5958
d4af74d4
TB
59592013-10-27 Tobias Burnus <burnus@net-b.de>
5960
5961 PR other/33426
5962 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5963 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5964 (c_parser_statement_after_labels): Update calls.
5965
d73749df 59662013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5967
5968 PR other/33426
5969 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5970 Handle PRAGMA_IVDEP.
5971 (c_parser_statement_after_labels): Update call.
5972
f28aa681
MP
59732013-10-24 Marek Polacek <polacek@redhat.com>
5974
5975 * c-parser.c (c_parser_struct_declaration): Add a comment.
5976 (c_parser_declarator): Don't allow _Alignas here.
5977
0645c1a2
AM
59782013-10-17 Andrew MacLeod <amacleod@redhat.com>
5979
5980 * c-parser.c: Include omp-low.h.
5981 * c-typeck.c: Likewise.
5982
568a31f2
MP
59832013-10-17 Marek Polacek <polacek@redhat.com>
5984
5985 PR c/58267
5986 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5987 Document syntax of the array-declarator.
5988 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5989 are not permitted.
5990 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5991 (c_parser_struct_declaration): Likewise.
5992 (c_parser_declarator): Likewise.
5993 (c_parser_direct_declarator_inner): Likewise.
5994 (c_parser_parameter_declaration): Likewise.
5995 (c_parser_type_name): Likewise.
5996
acf0174b
JJ
59972013-10-11 Jakub Jelinek <jakub@redhat.com>
5998
5999 * c-lang.h (current_omp_declare_target_attribute): New extern
6000 decl.
6001 * c-parser.c: Include c-lang.h.
6002 (struct c_parser): Change tokens to c_token *.
6003 Add tokens_buf field. Change tokens_avail type to unsigned int.
6004 (c_parser_consume_token): If parser->tokens isn't
6005 &parser->tokens_buf[0], increment parser->tokens.
6006 (c_parser_consume_pragma): Likewise.
6007 (enum pragma_context): Add pragma_struct and pragma_param.
6008 (c_parser_external_declaration): Adjust
6009 c_parser_declaration_or_fndef caller.
6010 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6011 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6012 Adjust recursive call.
6013 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6014 of pragma_external.
6015 (c_parser_parameter_declaration): Use pragma_param instead of
6016 pragma_external.
6017 (c_parser_compound_statement_nostart, c_parser_label,
6018 c_parser_for_statement): Adjust
6019 c_parser_declaration_or_fndef callers.
6020 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6021 it through to c_parser_conditional_expression.
6022 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6023 pass it through to c_parser_binary_expression. Adjust recursive
6024 call.
6025 (c_parser_binary_expression): Remove prec argument, add
6026 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6027 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6028 binop matches it, use build2 instead of parser_build_binary_op.
6029 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6030 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6031 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6032 Handle pragma_struct and pragma_param the same as pragma_external.
6033 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6034 (c_parser_omp_variable_list): Parse array sections for
6035 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6036 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6037 (c_parser_omp_clause_reduction): Handle user defined reductions.
6038 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6039 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6040 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6041 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6042 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6043 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6044 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6045 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6046 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6047 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6048 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6049 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6050 (c_parser_omp_for_loop): Add CODE argument, pass it through
6051 to c_finish_omp_for. Change last argument to cclauses,
6052 and adjust uses to grab parallel clauses from the array of all
6053 the split clauses. Adjust c_parser_binary_expression,
6054 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6055 (omp_split_clauses): New function.
6056 (c_parser_omp_simd): New function.
6057 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6058 Allow the function to be called also when parsing combined constructs,
6059 and call c_parser_omp_simd when parsing for simd.
6060 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6061 #pragma omp section, require exactly one structured-block instead of
6062 sequence of statements.
6063 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6064 Allow the function to be called also when parsing combined constructs.
6065 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6066 Allow the function to be called also when parsing combined
6067 constructs.
6068 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6069 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6070 c_parser_omp_teams, c_parser_omp_target_data,
6071 c_parser_omp_target_update, c_parser_omp_target,
6072 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6073 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6074 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6075 (c_parser_omp_construct): Add p_name and mask vars. Handle
6076 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6077 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6078 and c_parser_omp_sections callers.
6079 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6080 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6081 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6082 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6083 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6084 OMP_CLAUSE_DEPEND.
6085 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6086 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6087 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6088 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6089 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6090 * c-typeck.c: Include tree-inline.h.
6091 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6092 handle_omp_array_sections_1, handle_omp_array_sections,
6093 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6094 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6095 user defined reductions.
6096 (c_tree_equal): New function.
6097 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6098 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6099 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6100 c_check_omp_declare_reduction_r): New prototypes.
6101 * c-decl.c (current_omp_declare_target_attribute): New variable.
6102 (c_decl_attributes): New function.
6103 (start_decl, start_function): Use it instead of decl_attributes.
6104 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6105 c_omp_reduction_decl, c_omp_reduction_lookup,
6106 c_check_omp_declare_reduction_r): New functions.
6107
0a6c2227
TT
61082013-09-25 Tom Tromey <tromey@redhat.com>
6109
6110 * Make-lang.in (c/gccspec.o): Remove.
6111 (CFLAGS-c/gccspec.o): New variable.
6112 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6113 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6114 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6115
f3bc55f0
TT
61162013-09-25 Tom Tromey <tromey@redhat.com>
6117
6118 * Make-lang.in (c/gccspec.o): Don't use subshell.
6119
a24d975c
MP
61202013-09-18 Marek Polacek <polacek@redhat.com>
6121
6122 PR sanitize/58443
6123 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6124 Remove unnecessary check.
6125
ce6923c5
MP
61262013-09-18 Marek Polacek <polacek@redhat.com>
6127
6128 PR sanitizer/58411
6129 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6130 no_sanitize_undefined attribute.
6131
a1e51df9
KT
61322013-09-13 Kai Tietz <ktietz@redhat.com>
6133
6134 PR target/57848
6135 * c-decl.c (c_builtin_function_ext_scope): Remove
6136 wrong assumption that it is never called on prexisting
6137 symbol.
6138
0af94e6f
JR
61392013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6140
6141 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6142
20059c8b
GDR
61432013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6144
6145 * c-objc-common.c (c_tree_printer): Tidy.
6146
de5a5fa1
MP
61472013-08-30 Marek Polacek <polacek@redhat.com>
6148
6149 * c-typeck.c (build_binary_op): Add division by zero and shift
6150 instrumentation.
6151
2531a1d9 61522013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6153 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6154
6e2bcc98 6155 PR c/35649
2531a1d9
JR
6156 * c-typeck.c (c_common_type): Prefer double_type_node over
6157 other REAL_TYPE types with the same precision.
6158 (convert_arguments): Likewise.
6159
025311c4
GDR
61602013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6161
6162 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6163 (c_initialize_diagnostics): Call a destructor for the early printer.
6164
da6ca2b5
GDR
61652013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6166
6167 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6168 printer initialization.
6169
318cda85 61702013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6171
318cda85
BI
6172 PR c/57490
6173 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6174 check for truth values.
6175 (expand_array_notation_exprs): Added truth values case. Removed an
6176 unwanted else. Added for-loop to walk through subtrees in default
6177 case.
6178
b066401f
GDR
61792013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6180
6181 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6182
fb48aadc
JM
61832013-07-23 Joseph Myers <joseph@codesourcery.com>
6184
6185 * c-parser.c (struct c_generic_association): Fix typo.
6186
433cc7b0
TT
61872013-07-23 Tom Tromey <tromey@redhat.com>
6188 Joseph Myers <joseph@codesourcery.com>
6189
6190 * c-parser.c (struct c_generic_association): New.
6191 (c_generic_association_d): New typedef.
6192 (c_parser_generic_selection): New function.
6193 (c_parser_postfix_expression): Handle RID_GENERIC.
6194
26d40c3d
JM
61952013-07-13 Jason Merrill <jason@redhat.com>
6196
6197 PR c++/57793
6198 * c-decl.c (finish_struct): Check for too-large class.
6199
ecdbd01a 62002013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6201
6202 PR c/57821
6203 * c-typeck.c (set_init_index): When folding, check for index overflow.
6204
1141ed3f
BI
62052013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6206
6207 * c-parser.c (c_parser_array_notation): Removed rejection of array
6208 notations in an array of function pointers.
6209
713b46fa
BI
62102013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6211
6212 * c-array-notation.c (make_triplet_val_inv): New function.
6213 (create_cmp_incr): Likewise.
6214 (create_array_refs): Likewise.
6215 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6216 Also modularized common parts between functions and called the function.
6217 (build_array_notation_expr): Likewise.
6218 (fix_conditional_array_notations_1): Likewise.
6219 (fix_array_notation_expr): Likewise.
6220 (fix_array_notation_call_expr): Likewise.
6221
92f20202
MP
62222013-06-18 Marek Polacek <polacek@redhat.com>
6223
6224 PR c/57630
6225 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6226
73a23b06
BI
62272013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6228
6229 * c-array-notation.c (build_array_notation_expr): Reject array notation
6230 mismatch between LHS and RHS even inside a call_expr. Also, removed
6231 a couple while statements that were dead code.
6232
00b8517d
BI
62332013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6234
6235 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6236 excessive precision expressions in function parameters. Also removed
6237 couple unwanted while statements.
6238
1509bdda
BI
62392013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6240
6241 * c-array-notation.c (expand_array_notation_exprs): Added
6242 ARRAY_NOTATION_REF case.
ab20d992 6243
d60f1706
BI
62442013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6245
6246 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6247 function to c-family/array-notation-common.c.
6248 (is_cilkplus_reduce_builtin): Likewise.
6249 (find_rank): Likewise.
6250 (extract_array_notation_exprs): Likewise.
6251 (replace_array_notations): Likewise.
6252 (find_inv_trees): Likewise.
6253 (replace_inv_trees): Likewise.
6254 (contains_array_notation_expr): Likewise.
6255 (find_correct_array_notation_type): Likewise.
6256 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6257 (struct inv_list): Moved this to c-family/array-notation-common.c.
6258 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6259
6d6efbb3
BI
62602013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6261
6262 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6263 reduction functions outside the for-loop. Added a check if the fundecl
6264 is non-NULL. Finally, removed an unwanted if-statement, and made the
6265 body unconditional.
6266
25c22937
BI
62672013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6268
6269 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6270 condition of the if-statement matches the rank of else-block and then-
6271 block when array notations are used.
6272 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6273 expression after the entire function body is parsed.
6274 (c_parser_expr_no_commas): Delayed creating array notation expressions
6275 to the end of function parsing.
6276 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6277 whole if-statement instead of just the condition.
ab20d992 6278 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6279
edd25645
BI
62802013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6281
6282 PR c/57474
6283 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6284 array to NULL_TREE if they are unused. Also added a check for the
6285 field to be NULL before its fields are used in future.
ab20d992 6286
065ce7f1
RO
62872013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6288
6289 PR bootstrap/57450
6290 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6291 (build_array_notation_expr): Likewise.
6292
36536d79
BI
62932013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6294
6295 * c-typeck.c (build_array_ref): Added a check to see if array's
6296 index is greater than one. If true, then emit an error.
6297 (build_function_call_vec): Exclude error reporting and checking
6298 for builtin array-notation functions.
6299 (convert_arguments): Likewise.
6300 (c_finish_return): Added a check for array notations as a return
6301 expression. If true, then emit an error.
6302 (c_finish_loop): Added a check for array notations in a loop
6303 condition. If true then emit an error.
6304 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6305 (build_binary_op): Added a check for array notation expr inside
6306 op1 and op0. If present, we call another function to find correct
6307 type.
6308 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6309 * c-parser.c (c_parser_compound_statement): Check if array
6310 notation code is used in tree, if so, then transform them into
6311 appropriate C code.
6312 (c_parser_expr_no_commas): Check if array notation is used in LHS
6313 or RHS, if so, then build array notation expression instead of
6314 regular modify.
6315 (c_parser_postfix_expression_after_primary): Added a check for
6316 colon(s) after square braces, if so then handle it like an array
6317 notation. Also, break up array notations in unary op if found.
6318 (c_parser_direct_declarator_inner): Added a check for array
6319 notation.
6320 (c_parser_compound_statement): Added a check for array notation in
6321 a stmt. If one is present, then expand array notation expr.
6322 (c_parser_if_statement): Likewise.
6323 (c_parser_switch_statement): Added a check for array notations in
6324 a switch statement's condition. If true, then output an error.
6325 (c_parser_while_statement): Similarly, but for a while.
6326 (c_parser_do_statement): Similarly, but for a do-while.
6327 (c_parser_for_statement): Similarly, but for a for-loop.
6328 (c_parser_unary_expression): Check if array notation is used in a
6329 pre-increment or pre-decrement expression. If true, then expand
6330 them.
6331 (c_parser_array_notation): New function.
6332 * c-array-notation.c: New file.
6333 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 6334
cd192ccc
MS
63352013-05-23 Mike Stump <mikestump@comcast.net>
6336
6337 * c-typeck.c (convert_for_assignment): Handle references to memory
6338 spaces better.
6339
427b248d
JM
63402013-05-16 Jason Merrill <jason@redhat.com>
6341
6342 * Make-lang.in (cc1$(exeext)): Use link mutex.
6343
44d90fe1
PC
63442013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6345
6346 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6347 to simply use OPT_Wpointer_arith.
6348 (build_unary_op): Likewise.
6349
4e7d7b3d
JJ
63502013-04-03 Jakub Jelinek <jakub@redhat.com>
6351
6352 PR c/19449
6353 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6354 argument. If set, or it temporarily for parsing of the first
6355 argument into force_folding_builtin_constant_p.
6356 (c_parser_postfix_expression): Adjust callers.
6357
839b422f
RB
63582013-03-21 Richard Biener <rguenther@suse.de>
6359
6360 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6361 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6362
2ee028f1
MP
63632013-02-12 Marek Polacek <polacek@redhat.com>
6364
6365 PR c/44938
6366 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6367 origtypes to NULL.
6368
8824edff
JJ
63692013-01-24 Jakub Jelinek <jakub@redhat.com>
6370
6371 PR c/56078
6372 * c-typeck.c (set_nonincremental_init_from_string): If
6373 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6374 returned false.
6375 (process_init_element): Likewise.
6376
eadd3d0d
JJ
63772012-12-20 Jakub Jelinek <jakub@redhat.com>
6378
6379 PR c++/55619
6380 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6381 argument, don't call default_function_array_conversion
6382 nor c_fully_fold here.
6383 (c_parser_asm_statement): Adjust callers.
6384 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6385 and outputs here, and call default_function_array_conversion
6386 on inputs that don't need to be addressable.
6387
f8a93a2e
JJ
63882012-12-18 Jakub Jelinek <jakub@redhat.com>
6389
6390 PR c/39464
6391 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6392 warning require that both c_common_unsigned_type as well as
6393 c_common_signed_type is the same for both mvl and mvr types.
6394
9771b263
DN
63952012-11-16 Diego Novillo <dnovillo@google.com>
6396
6397 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6398
6399 * c-common.c: Use new vec API in vec.h.
6400 * c-common.h: Likewise.
6401 * c-gimplify.c: Likewise.
6402 * c-pragma.c: Likewise.
6403 * c-pretty-print.c: Likewise.
6404 * c-pretty-print.h: Likewise.
6405 * c-semantics.c: Likewise.
6406 * c-decl.c: Likewise.
6407 * c-parser.c: Likewise.
6408 * c-tree.h: Likewise.
6409 * c-typeck.c: Likewise.
6410
880661a4
JW
64112012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6412
6413 PR c++/54930
6414 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6415
077d1abe
MLI
64162012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6417
6418 PR c/53066
6419 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6420 shadows a function, unless the variable is a function or a
6421 pointer-to-function.
6422
3a785c97
JJ
64232012-10-12 Jakub Jelinek <jakub@redhat.com>
6424
6425 PR c/54381
6426 * c-parser.c (struct c_tree_loc_pair): Removed.
6427 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6428 add location_t * and tree * arguments, fill in array of 3
6429 sizeof_arg trees and corresponding locs.
6430 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6431 c_parser_expr_list callers.
6432 (c_parser_postfix_expression_after_primary): Likewise. Pass
6433 array of 3 sizeof_arg trees and locs (corresponding to first
6434 3 arguments) to sizeof_pointer_memaccess_warning.
6435
703c8606
LC
64362012-10-09 Lawrence Crowl <crowl@google.com>
6437
6438 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6439 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6440 hash table.
6441
5d9de0d0
PC
64422012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6443
6444 PR c++/54194
6445 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6446 call.
6447
a212e43f
MG
64482012-10-09 Marc Glisse <marc.glisse@inria.fr>
6449
6450 PR c++/54427
6451 * c-typeck.c: Include c-common.h.
6452 (enum stv_conv): Moved to c-common.h.
6453 (scalar_to_vector): Moved to c-common.c.
6454 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6455 * Make-lang.in: c-typeck.c depends on c-common.h.
6456
3b78de56
AC
64572012-10-04 Arnaud Charlet <charlet@adacore.com>
6458
6459 * c-decl.c (c_write_global_declarations): Fix handling of
6460 -fdump-ada-spec*.
6461
78c60e3d
SS
64622012-09-30 Sharad Singhai <singhai@google.com>
6463
6464 * c-decl.c (c_write_global_declarations): Use a different method
6465 to determine if the dump has ben initialized.
6466
9f33203d
JM
64672012-09-14 Joseph Myers <joseph@codesourcery.com>
6468
6469 PR c/54552
6470 * c-typeck.c (c_cast_expr): When casting to a type requiring
6471 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6472 c_fully_fold first.
6473
a27d595d
JM
64742012-09-14 Joseph Myers <joseph@codesourcery.com>
6475
6476 PR c/54103
6477 * c-typeck.c (build_unary_op): Pass original argument of
6478 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6479 any C_MAYBE_CONST_EXPR, if it has integer operands.
6480 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6481 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6482 to c_objc_common_truthvalue_conversion, then remove any
6483 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6484 c_objc_common_truthvalue_conversion not
6485 c_common_truthvalue_conversion.
6486 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6487 call note_integer_operands for arguments with integer operands
6488 that are not integer constants.
6489
9feb29df
JJ
64902012-09-13 Jakub Jelinek <jakub@redhat.com>
6491
6492 PR c/54559
6493 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6494 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6495
d409320c
JJ
64962012-08-31 Jakub Jelinek <jakub@redhat.com>
6497
6498 PR c/54428
6499 * c-convert.c (convert): Don't call fold_convert_loc if
6500 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6501 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6502 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6503
6265d07c
JJ
65042012-08-24 Jakub Jelinek <jakub@redhat.com>
6505
6506 PR c/54355
6507 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6508 for nested and empty_ok arguments in the call to
6509 c_parser_declaration_or_fndef.
6510
1a4049e7
JJ
65112012-08-17 Jakub Jelinek <jakub@redhat.com>
6512
6513 * c-tree.h (c_last_sizeof_arg): Declare.
6514 * c-parser.c (struct c_tree_loc_pair): New type.
6515 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6516 non-NULL.
6517 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6518 (c_parser_postfix_expression_after_primary): Likewise. Call
6519 sizeof_pointer_memaccess_warning if needed.
6520 (sizeof_ptr_memacc_comptypes): New function.
6521 * c-typeck.c (c_last_sizeof_arg): New global variable.
6522 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6523
0229aee9
UB
65242012-07-24 Uros Bizjak <ubizjak@gmail.com>
6525
6526 * c-lang.h (lang_decl): Add variable_size GTY option.
6527
7ee2468b
SB
65282012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6529
6530 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6531 * Make-lang.in: Fix dependencies.
6532
d4a10d0a
SB
65332012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6534
6535 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6536 and add language Makefile hooks.
6537 * config-lang.in: New file.
6538 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6539 add the required "normal" config-lang.in rules.
6540 * c-lang.h: Moved from gcc/ to here.
6541 * c-tree.h: Likewise.
6542 * c-objc-common.c: Likewise.
6543 * c-objc-common.h: Likewise.
6544 * c-typeck.c: Likewise.
6545 * c-convert.c: Likewise.
6546 * c-lang.c: Likewise.
6547 * c-aux-info.c: Likewise.
6548 * c-errors.c: Likewise.
6549 * gccspec.c: Likewise.
6550 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6551 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6552\f
a5544970 6553Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6554
6555Copying and distribution of this file, with or without modification,
6556are permitted in any medium without royalty provided the copyright
6557notice and this notice are preserved.