]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
Daily bump.
[gcc.git] / gcc / c / ChangeLog
CommitLineData
20a38017
MM
12019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
2
3 * c-parser.c (c_parser_parse_rtl_body): Always call
4 run_rtl_passes, even if startwith pass is not provided.
5
d5fbe5e0
JM
62019-11-15 Joseph Myers <joseph@codesourcery.com>
7
8 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
9 duplicate standard attributes.
10
97cc1187
JM
112019-11-15 Joseph Myers <joseph@codesourcery.com>
12
13 * c-decl.c (std_attribute_table): Add maybe_unused.
14
f8aea5e3
JM
152019-11-15 Joseph Myers <joseph@codesourcery.com>
16
17 * c-decl.c (std_attribute_table): Add fallthrough.
18 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
19 attribute at top level.
20
2cc94aa8
JM
212019-11-15 Joseph Myers <joseph@codesourcery.com>
22
23 * c-decl.c (std_attribute_table): New.
24 (c_init_decl_processing): Register attributes from
25 std_attribute_table.
26 * c-parser.c (c_parser_attribute_arguments): Add arguments
27 require_string and allow_empty_args. All callers changed.
28 (c_parser_std_attribute): Set require_string argument for
29 "deprecated" attribute.
30
7c5890cc
JM
312019-11-14 Joseph Myers <joseph@codesourcery.com>
32
33 * c-parser.c (c_parser_postfix_expression)
34 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
35 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
36
e8738f4e
RS
372019-11-14 Richard Sandiford <richard.sandiford@arm.com>
38
39 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
40 of build_same_sized_truth_vector_type.
41 (build_vec_cmp): Likewise.
42
b2417b59
JJ
432019-11-14 Jakub Jelinek <jakub@redhat.com>
44
bedb7f04
JJ
45 * c-parser.c (c_parser_omp_context_selector): Don't require score
46 argument to fit into shwi, just to be INTEGER_CST. Diagnose
47 negative score.
48
b2417b59
JJ
49 * c-parser.c (c_parser_omp_context_selector): Rename
50 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
51 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
52 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
53 and string literals.
54
4e03c3a7
JM
552019-11-14 Joseph Myers <joseph@codesourcery.com>
56
57 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
58 ctsk_tagfirstref_attrs.
59 (struct c_declspecs): Update description of attrs. Add
60 postfix_attrs and non_std_attrs_seen_p. Increase size of
61 typespec_kind bit-field.
62 (c_warn_unused_attributes): New declaration.
63 (parser_xref_tag): Update prototype.
64 * c-decl.c (c_warn_unused_attributes): New function.
65 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
66 ctsk_tagref_attrs. Handle attribute declarations.
67 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
68 (grokdeclarator): Handle standard attributes.
69 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
70 attributes to incomplete type reference.
71 (xref_tag): Update call to parser_xref_tag.
72 (declspecs_add_addrspace, declspecs_add_type)
73 (declspecs_add_scspec, declspecs_add_attrs): Set
74 non_std_attrs_seen_p.
75 (finish_declspecs): Apply postfix standard attributes to type.
76 * c-parser.c (c_token_starts_declspecs)
77 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
78 (c_parser_next_tokens_start_declaration): Update comments.
79 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
80 parser->tokens[2] to parser->tokens[1].
81 (c_parser_nth_token_starts_std_attributes)
82 (c_parser_std_attribute_specifier_sequence): New functions.
83 (c_parser_declaration_or_fndef): Add arguments have_attrs and
84 attrs. All callers changed. Handle standard attributes.
85 (c_parser_parms_declarator, c_parser_parms_list_declarator)
86 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
87 All callers changed.
88 (c_parser_declspecs): Add arguments start_std_attr_ok and
89 end_std_attr_ok. All callers changed. Handle standard
90 attributes.
91 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
92 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
93 (c_parser_compound_statement_nostart, c_parser_all_labels)
94 (c_parser_label, c_parser_statement, c_parser_for_statement):
95 Handle standard attributes.
96 * c-parser.h (c_parser_declspecs): Update prototype.
97 * gimple-parser.c (c_parser_gimple_declaration): Update call to
98 c_parser_declspecs.
99
0c29cac4
ML
1002019-11-12 Martin Liska <mliska@suse.cz>
101
102 * gimple-parser.c: Do not include params.h.
103
028d4092
ML
1042019-11-12 Martin Liska <mliska@suse.cz>
105
106 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
107 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
108 macro.
109
62aee289
MR
1102019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
111 Frederik Harwath <frederik@codesourcery.com>
112
113 gcc/c/
114 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
115 (c_parser_oacc_kernels_parallel): Rename function to...
116 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
117 (c_parser_omp_construct): Update accordingly.
118
119
7cec9588
JJ
1202019-11-11 Jakub Jelinek <jakub@redhat.com>
121
122 * c-parser.c (c_parser_translation_unit): Diagnose declare target
123 without corresponding end declare target.
124
f486280c
RS
1252019-11-08 Richard Sandiford <richard.sandiford@arm.com>
126
127 * c-convert.c (convert): Only handle vector conversions if one of
128 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
129 allows it.
130 * c-typeck.c (build_array_ref): Only allow vector indexing if the
131 vectors satisfy gnu_vector_type_p.
132 (build_unary_op): Only allow unary operators to be applied to
133 vectors if they satisfy gnu_vector_type_p.
134 (digest_init): Only allow by-element initialization of vectors
135 if they satisfy gnu_vector_type_p.
136 (really_start_incremental_init): Likewise.
137 (push_init_level): Likewise.
138 (pop_init_level): Likewise.
139 (process_init_element): Likewise.
140 (build_binary_op): Only allow binary operators to be applied to
141 vectors if they satisfy gnu_vector_type_p.
142
017c6491
JM
1432019-11-08 Joseph Myers <joseph@codesourcery.com>
144
145 * c-decl.c (grokparms): Convert () in a function definition to
146 (void) for C2x.
147 (store_parm_decls_oldstyle): Pedwarn for C2x.
148 (store_parm_decls): Update comment about () not generating a
149 prototype.
150
c01bd174
JM
1512019-11-07 Joseph Myers <joseph@codesourcery.com>
152
153 * c-parser.c (c_parser_attribute_arguments): New function.
154 Factored out of c_parser_gnu_attribute.
155 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
156 (c_parser_balanced_token_sequence, c_parser_std_attribute)
157 (c_parser_std_attribute_specifier): New functions.
158 (c_parser_transaction_attributes): Use
159 c_parser_std_attribute_specifier.
160
471c5330
JM
1612019-11-07 Joseph Myers <joseph@codesourcery.com>
162
163 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
164 lex_joined_string and translate_strings_p.
165 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
166 c_lex_with_flags.
167 (c_parser_string_literal): New function.
168 (c_parser_static_assert_declaration_no_semi): Use
169 c_parser_string_literal. Do not set lex_untranslated_string.
170 (c_parser_asm_string_literal): Use c_parser_string_literal.
171 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
172 (c_parser_gnu_attributes): Set and restore translate_strings_p
173 instead of lex_untranslated_string.
174 (c_parser_asm_statement): Do not set lex_untranslated_string.
175 (c_parser_asm_operands): Likewise.
176 (c_parser_has_attribute_expression): Set and restore
177 translate_strings_p instead of lex_untranslated_string.
178 (c_parser_postfix_expression): Use c_parser_string_literal.
179 (pragma_lex): Likewise.
180 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
181 (c_parse_file): Set translate_strings_p.
182 * gimple-parser.c (c_parser_gimple_postfix_expression)
183 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
184 * c-parser.c (c_parser_string_literal): Declare function.
185
d0c464d2
JJ
1862019-11-02 Jakub Jelinek <jakub@redhat.com>
187
188 * c-parser.c (c_finish_omp_declare_variant): Use
189 omp_get_context_selector instead of c_omp_get_context_selector.
190
ac2cfa6c
RS
1912019-10-29 Richard Sandiford <richard.sandiford@arm.com>
192
193 * c-tree.h (c_simulate_enum_decl): Declare.
194 * c-decl.c (c_simulate_enum_decl): New function.
195 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
196
74078538
RS
1972019-10-29 Richard Sandiford <richard.sandiford@arm.com>
198
199 * c-tree.h (c_simulate_builtin_function_decl): Declare.
200 * c-decl.c (c_simulate_builtin_function_decl): New function.
201 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
202 to the above.
203
ad1539d5
MS
2042019-10-28 Martin Sebor <msebor@redhat.com>
205
206 PR c/66970
207 * c-decl.c (names_builtin_p): Define a new function.
208
cb73e4e7
RB
2092019-10-28 Richard Biener <rguenther@suse.de>
210
211 PR c/92249
212 * gimple-parser.c (c_parser_parse_gimple_body): Make
213 current_bb the entry block initially to easier recover
214 from errors.
215 (c_parser_gimple_compound_statement): Adjust.
216
135df52c
JJ
2172019-10-24 Jakub Jelinek <jakub@redhat.com>
218
219 * c-parser.c (c_finish_omp_declare_variant): Use
220 omp_context_selector_matches instead of
221 c_omp_context_selector_matches.
222 * c-decl.c (c_decl_attributes): Add "omp declare target block"
223 attribute in between declare target and end declare target
224 pragmas.
225
783bfe5e
JM
2262019-10-15 Joseph Myers <joseph@codesourcery.com>
227
228 * c-parser.c (c_parser_attribute_any_word): Rename to
229 c_parser_gnu_attribute_any_word. All callers changed.
230 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
231 callers changed.
232 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
233 callers changed.
234 (c_parser_declaration_or_fndef, c_parser_declspecs)
235 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
236 (c_parser_struct_declaration, c_parser_declarator)
237 (c_parser_gnu_attribute, c_parser_compound_statement)
238 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
239 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
240 attribute-related syntax productions.
241
56898e43
RS
2422019-10-14 Richard Sandiford <richard.sandiford@arm.com>
243
244 * c-objc-common.c (useful_aka_type_p): Replace with...
245 (get_aka_type): ...this new function. Given the original type,
246 decide which aka type to print (if any). Only look through typedefs
247 if user_facing_original_type_p.
248 (print_type): Update accordingly.
249
b9424661
JJ
2502019-10-14 Jakub Jelinek <jakub@redhat.com>
251
252 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
253 into int NESTED, if it is 2, diagnose missing commas in between
254 clauses.
255 (c_parser_omp_context_selector): Pass 2 as last argument to
256 c_parser_omp_all_clauses.
257
20de9568
JJ
2582019-10-12 Jakub Jelinek <jakub@redhat.com>
259
260 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
261 For simd properties, put them directly into TREE_VALUE.
262 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
263 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
264 add "omp declare variant base" attribute rather than
265 "omp declare variant".
266
fe2bc27c
JM
2672019-10-11 Joseph Myers <joseph@codesourcery.com>
268
269 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
270
94e7f906
JJ
2712019-10-10 Jakub Jelinek <jakub@redhat.com>
272
273 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
274 true, terminate processing on closing paren and don't skip to end of
275 pragma line.
276 (c_parser_omp_declare_simd): Handle also declare variant.
277 (omp_construct_selectors, omp_device_selectors,
278 omp_implementation_selectors, omp_user_selectors): New variables.
279 (c_parser_omp_context_selector,
280 c_parser_omp_context_selector_specification,
281 c_finish_omp_declare_variant): New functions.
282 (c_finish_omp_declare_simd): Handle both declare simd and
283 declare variant.
284 (c_parser_omp_declare): Handle declare variant.
285
93313b94
JM
2862019-10-02 Joseph Myers <joseph@codesourcery.com>
287
288 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
289 CPP_COLON tokens.
290
55879815
RS
2912019-10-01 Richard Sandiford <richard.sandiford@arm.com>
292
293 * c-objc-common.c (useful_aka_type_p): New function.
294 (print_type): Use it to decide whether an aka type is worth printing.
295
59bc434a
JJ
2962019-09-27 Jakub Jelinek <jakub@redhat.com>
297
298 PR c++/88203
299 * c-parser.c (c_parser_predefined_identifier): New function.
300 (c_parser_postfix_expression): Use it.
301 (c_parser_omp_variable_list): Parse predefined identifiers.
302 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
303 in shared and firstprivate clauses, even when they are predetermined
304 shared.
305
c6447c20
RS
3062019-09-27 Richard Sandiford <richard.sandiford@arm.com>
307
308 * c-typeck.c (build_function_call_vec): Take the original function
309 decl as an optional final parameter. Pass all built-in calls to
310 check_builtin_function_arguments.
311
522da4c2
EB
3122019-09-20 Eric Botcazou <ebotcazou@adacore.com>
313
314 PR c/91815
315 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
316 of identifiers in the external scope only for variables and functions.
317
68e2c199
PK
3182019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
319
320 PR c/78736
321 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
322
22f8849d
IS
3232019-08-23 Iain Sandoe <iain@sandoe.co.uk>
324
325 PR pch/61250
326 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
327 after determining that the first token is not
328 PRAGMA_GCC_PCH_PREPROCESS.
329
db376f45
EB
3302019-08-22 Eric Botcazou <ebotcazou@adacore.com>
331
332 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
333 FUNCTION_DECL to the right value in the presence of nested declarators.
334
4d732405
RS
3352019-08-13 Richard Sandiford <richard.sandiford@arm.com>
336
337 PR middle-end/91421
338 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
339
cb1180d5
RS
3402019-08-13 Richard Sandiford <richard.sandiford@arm.com>
341
342 PR middle-end/91421
343 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
344 of a built_in_function.
345 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
346
77eb117f
JJ
3472019-08-10 Jakub Jelinek <jakub@redhat.com>
348
349 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
350 (c_parser_omp_clause_device_type): New function.
351 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
352 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
353 (c_parser_omp_declare_target): Handle device_type clauses. Remove
354 diagnostics for declare target with clauses nested in clause-less
355 declare target declaration-definition-seq.
356 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
357
2c3b8bad
JJ
3582019-08-09 Jakub Jelinek <jakub@redhat.com>
359
bb522e2e
JJ
360 * c-parser.c (check_no_duplicate_clause): Simplify using
361 omp_find_clause.
362 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
363 directive name modifiers.
364 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
365
2c3b8bad
JJ
366 PR c/91401
367 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
368 check_no_duplicate_clause call. Comment it out, instead emit a
369 warning for duplicate dist_schedule clauses.
370
99769e7f
RS
3712019-08-08 Richard Sandiford <richard.sandiford@arm.com>
372
373 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
374
8860d270
JJ
3752019-08-08 Jakub Jelinek <jakub@redhat.com>
376
377 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
378 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
379 instead of generic_head to track duplicates.
380
398e3feb
JJ
3812019-08-07 Jakub Jelinek <jakub@redhat.com>
382
383 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
384 (c_parser_omp_clause_use_device_addr): New function.
385 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
386 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
387 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
388 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
389 map or use_device_* clauses.
390 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
391 in OpenMP, require pointer type rather than pointer or array type.
392 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
393
a28351e7
JJ
3942019-07-31 Jakub Jelinek <jakub@redhat.com>
395
396 PR c/91192
397 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
398 even if finish is UNKNOWN_LOCATION, just use start as finish in that
399 case.
400
6343b6bf
ML
4012019-07-25 Martin Liska <mliska@suse.cz>
402 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
403
404 PR c++/23383
405 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
406
cb50701e
ML
4072019-07-25 Martin Liska <mliska@suse.cz>
408
409 * c-decl.c (merge_decls): Use new macros
410 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
411
62e3e66f
RB
4122019-07-23 Richard Biener <rguenther@suse.de>
413
414 PR tree-optimization/83518
415 * gimple-parser.c (c_parser_parse_gimple_body): When we have
416 a CFG also rebuild cgraph edges.
417
554a530f
JJ
4182019-07-20 Jakub Jelinek <jakub@redhat.com>
419
420 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
421 (c_parser_omp_clause_bind): New function.
422 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
423 (OMP_LOOP_CLAUSE_MASK): Define.
424 (c_parser_omp_loop): New function.
425 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
426 loop combined with parallel or teams.
427 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
428 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
429
d119bf79
RS
4302019-07-18 Richard Sandiford <richard.sandiford@arm.com>
431
432 PR c/53633
433 * c-decl.c (finish_function): Check targetm.warn_func_return
434 before issuing a -Wreturn-type warning.
435
ab20d992 4362019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
437
438 * gimple-parser.c (c_parser_gimple_try_stmt): New.
439 (c_parser_compound_statement): Call it.
440
1fdd6f04
JJ
4412019-07-12 Jakub Jelinek <jakub@redhat.com>
442
443 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
444 (c_parser_omp_clause_order): New function.
445 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
446 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
447 PRAGMA_OMP_CLAUSE_ORDER.
448 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
449
8389386c
RB
4502019-07-10 Richard Biener <rguenther@suse.de>
451
452 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
453 _Literal (int *) &x for address literals.
454
99b1c316
MS
4552019-07-09 Martin Sebor <msebor@redhat.com>
456
457 PR c++/61339
458 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
459 to class.
460 (field_decl_cmp): Same.
461 * c-parser.c (c_parser_struct_or_union_specifier): Same.
462 * c-tree.h: Same.
463 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
464
6c1dae73
MS
4652019-07-09 Martin Sebor <msebor@redhat.com>
466
467 PR c++/61339
468 * c-decl.c: Change class-key from class to struct and vice versa
469 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
470 * gimple-parser.c: Same.
471
69b5279e
RB
4722019-07-01 Richard Biener <rguenther@suse.de>
473
474 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
475 _Literal (char *) &"foo" for address literals pointing to
476 STRING_CSTs.
477
ab20d992
JJ
4782019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
479
480 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
481 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
482 C incompatibility if alternate "__intN__" form is used.
483
1e3d475e
MS
4842019-06-24 Martin Sebor <msebor@redhat.com>
485
486 * c-typeck.c (build_binary_op): Hyphenate floating-point.
487
bf38f7e9
JJ
4882019-06-10 Jakub Jelinek <jakub@redhat.com>
489
490 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
491 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
492 (c_parser_omp_scan_loop_body): New function.
493 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
494 inscan reduction clauses.
495 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
496 non-inscan reductions on the same construct, or inscan reductions with
497 ordered or schedule clauses, or inscan array reductions.
498
65985d78
MS
4992019-06-05 Martin Sebor <msebor@redhat.com>
500
501 PR c/90737
502 * c-typeck.c (c_finish_return): Only consider functions returning
503 pointers as candidates for -Wreturn-local-addr.
504
0ecf545c
MS
5052019-06-05 Martin Sebor <msebor@redhat.com>
506
507 * c-decl.c (start_decl): Adjust quoting and hyphenation
508 in diagnostics.
509 (finish_decl): Same.
510 (finish_enum): Same.
511 (start_function): Same.
512 (declspecs_add_type): Same.
513 * c-parser.c (warn_for_abs): Same.
514 * c-typeck.c (build_binary_op): Same.
515
e03436e7
TS
5162019-05-17 Thomas Schwinge <thomas@codesourcery.com>
517
b48f44bf
TS
518 PR c/89433
519 * c-parser.c (c_finish_oacc_routine): Rework checking if already
520 marked with an OpenACC 'routine' directive.
521
5bf04509
TS
522 PR c/89433
523 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
524 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
525
e03436e7
TS
526 PR c/89433
527 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
528 clauses from "omp declare target" attribute.
529
a9c697b8
MS
5302019-05-16 Martin Sebor <msebor@redhat.com>
531
ab20d992
JJ
532 * c-decl.c (start_decl): Quote keywords, operators, and
533 types in diagnostics.
534 (finish_decl): Same.
535 * c-parser.c (c_parser_asm_statement): Same.
536 (c_parser_conditional_expression): Same.
537 (c_parser_transaction_cancel): Same.
538 * c-typeck.c (c_common_type): Same.
539 (build_conditional_expr): Same.
540 (digest_init): Same.
541 (process_init_element): Same.
542 (build_binary_op): Same.
a9c697b8 543
c4499192
RB
5442019-05-17 Richard Biener <rguenther@suse.de>
545
546 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
547 (c_parser_gimple_unary_expression): Likewise.
548 (c_parser_gimple_parentized_ternary_expression): New function.
549
adfe6e4b
RB
5502019-05-16 Richard Biener <rguenther@suse.de>
551
552 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
553 (c_parser_gimple_unary_expression): Likewise.
554
186dabf2
RB
5552019-05-15 Richard Biener <rguenther@suse.de>
556
557 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
558 __BIT_FIELD_REF.
559
1158c5b4
RB
5602019-05-14 Richard Biener <rguenther@suse.de>
561
562 * gimple-parser.c (c_parser_gimple_statement): Remove
563 questionable auto-promotion to VIEW_CONVERT_EXPR.
564 (c_parser_gimple_typespec): Split out from __MEM parsing.
565 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
566 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
567 as __VIEW_CONVERT with -gimple.
568
fd4485aa
ML
5692019-05-09 Martin Liska <mliska@suse.cz>
570
571 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
572 __MAX.
573 (c_parser_gimple_unary_expression): Parse also binary expression
574 __MIN and __MAX.
575 (c_parser_gimple_parentized_binary_expression): New function.
576
d276406a
ML
5772019-05-09 Martin Liska <mliska@suse.cz>
578
579 * gimple-parser.c (struct gimple_parser): Add probability.
580 for gimple_parser_edge.
581 (gimple_parser::push_edge): Add new argument probability.
582 (c_parser_gimple_parse_bb_spec): Parse also probability
583 if present.
584 (c_parser_parse_gimple_body): Set edge probability.
585 (c_parser_gimple_compound_statement): Consume token
586 before calling c_parser_gimple_goto_stmt.
587 Parse BB counts.
588 (c_parser_gimple_statement): Pass new argument.
589 (c_parser_gimple_goto_stmt): Likewise.
590 (c_parser_gimple_if_stmt): Likewise.
591 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
592 * c-parser.c (c_parser_declaration_or_fndef): Pass
593 hot_bb_threshold argument.
594 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
595 field.
596 (c_parser_gimple_parse_bb_spec_edge_probability): New.
597
f179b64e
JJ
5982019-04-26 Jakub Jelinek <jakub@redhat.com>
599
600 PR debug/90197
601 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
602 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
603 (c_parser_do_statement): Likewise.
604 (c_parser_for_statement): Likewise. Formatting fixes.
605 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
606 emit DEBUG_BEGIN_STMTs if needed.
607
e7178413
JJ
6082019-04-19 Jakub Jelinek <jakub@redhat.com>
609
c280b7ee
JJ
610 PR c/89888
611 * c-typeck.c (struct c_switch): Remove outside_range_p member.
612 (c_start_case): Don't clear it.
613 (do_case): Adjust c_add_case_label caller.
614 (c_finish_case): Adjust c_do_switch_warnings caller.
615
e7178413
JJ
616 PR c++/90108
617 * c-decl.c (merge_decls): If remove is main variant and
618 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
619 variant that has newdecl as TYPE_NAME if any.
620
60a2c645
JJ
6212019-04-12 Jakub Jelinek <jakub@redhat.com>
622
623 PR c/89933
624 * c-decl.c (merge_decls): When newdecl's type is its main variant,
625 don't try to remove it from the variant list, but instead assert
626 it has no variants.
627
2a82beaa
RB
6282019-04-01 Richard Biener <rguenther@suse.de>
629
630 PR c/71598
631 * c-tree.h (c_get_alias_set): Declare.
632 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
633 * c-objc-common.c (c_get_alias_set): Treat enumeral types
634 as the underlying integer type.
635
bec1da64
MS
6362019-03-19 Martin Sebor <msebor@redhat.com>
637
638 PR tree-optimization/89688
639 * c-decl.c (finish_decl): Call braced_lists_to_string for more
640 kinds of initializers.
641
855cd9b1
JJ
6422019-03-19 Jakub Jelinek <jakub@redhat.com>
643
644 PR c/89734
645 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
646 return type even if quals_used is 0. Formatting fixes.
647
baa09dc5
RB
6482019-03-14 Richard Biener <rguenther@suse.de>
649
650 * c-tree.h (enum c_declspec_il): New.
651 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
652 enum bitfield.
653 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
654 Pass start pass and declspec_il to c_parser_parse_gimple_body.
655 (c_parser_declspecs): Adjust.
656 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
657 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
658 and bitmap.h.
659 (struct gimple_parser): New.
660 (gimple_parser::push_edge): New method.
661 (c_parser_gimple_parse_bb_spec): New helper.
662 (c_parser_parse_gimple_body): Get start pass and IL specification.
663 Initialize SSA and CFG.
664 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
665 Build a gimple_parser parsing state and pass it along.
666 (c_parser_gimple_statement): Change intermittend __PHI internal
667 function argument for the edge.
668 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
669 (c_parser_gimple_goto_stmt): Record edges to build.
670 (c_parser_gimple_if_stmt): Likewise.
671 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
672 (c_parser_gimple_or_rtl_pass_list): Likewise.
673
a3f9f006
ML
6742019-03-11 Martin Liska <mliska@suse.cz>
675
676 * c-decl.c (check_for_loop_decls): Wrap an option name
677 in a string format message and fix GNU coding style.
678 * c-parser.c (c_parser_declspecs): Likewise.
679
1db01ff9
JJ
6802019-03-08 Jakub Jelinek <jakub@redhat.com>
681
682 PR tree-optimization/89550
683 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
684 returned true.
685 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
686 or warning returned true.
687
66dcb747
JJ
6882019-02-28 Jakub Jelinek <jakub@redhat.com>
689
690 PR c/89525
691 * c-typeck.c (convert_arguments): Call inform_declaration only if
692 the previous warning_at call returned true.
693
2263c9f2
TS
6942019-02-22 Thomas Schwinge <thomas@codesourcery.com>
695
696 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
697 parameter. Adjust all users.
698 (c_parser_oacc_simple_clause): Replace parser with loc formal
699 parameter. Adjust all users.
700
ab20d992 7012019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
702
703 PR c/87924
704 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
705 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
706
5f88ba10
JJ
7072019-02-15 Jakub Jelinek <jakub@redhat.com>
708
709 PR c/89340
710 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
711 before c_decl_attributes rather than after it.
712
cfc30fd1
JJ
7132019-02-06 Jakub Jelinek <jakub@redhat.com>
714
715 PR c/89211
716 * c-parser.c (c_parser_declaration_or_fndef): Don't update
717 DECL_ARGUMENTS of d if it has been defined already. Use a single if
718 instead of 3 nested ifs.
719
fbe83e6b
JM
7202019-02-06 Joseph Myers <joseph@codesourcery.com>
721
722 PR c/88584
723 * c-decl.c (finish_decl): Do not complete array types for arrays
724 with external linkage not at file scope.
725
f461f938
RB
7262019-02-05 Richard Biener <rguenther@suse.de>
727
728 PR c/88606
729 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
730 all type variants when not supported.
731
fe509359
JJ
7322019-01-30 Jakub Jelinek <jakub@redhat.com>
733
734 PR c/89061
735 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
736 * c-decl.c (decl_jump_unsafe): Return false for
737 C_DECL_COMPOUND_LITERAL_P decls.
738 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
739
6a335b96
JJ
7402019-01-29 Jakub Jelinek <jakub@redhat.com>
741
f4b7e754
JJ
742 PR c/89045
743 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
744 scope.
745
6a335b96
JJ
746 PR c/86125
747 * c-decl.c (last_fileptr_type): Remove.
748 (last_structptr_types): New variable.
749 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
750 {old,new}rettype instead of the types themselves. Assert
751 last_structptr_types array has the same number of elements
752 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
753 argument oldtype and newtype. Instead of handling
754 just fileptr_type_node specially, handle all builtin_structptr_types
755 pointer nodes. Formatting fix.
756
d8b5a1a0
MS
7572019-01-24 Martin Sebor <msebor@redhat.com>
758
759 PR c/86125
760 PR c/88886
761 PR middle-end/86308
762 * c-decl.c (match_builtin_function_types): Add arguments.
763 (diagnose_mismatched_decls): Diagnose mismatched declarations
764 of built-ins more strictly.
765
e21c4491
JJ
7662019-01-24 Jakub Jelinek <jakub@redhat.com>
767
768 PR c++/88976
769 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
770 on #pragma omp cancel with different modifiers.
771
420183d9
L
7722019-01-18 H.J. Lu <hongjiu.lu@intel.com>
773
774 PR c/51628
775 PR c/88664
776 * c-typeck.c (convert_for_assignment): Upate the
777 warn_for_address_or_pointer_of_packed_member call.
778
17ad43dd
TH
7792019-01-16 Tom Honermann <tom@honermann.net>
780 Jason Merrill <jason@redhat.com>
781
782 * c-typeck.c (digest_init): Revised the error message produced for
783 ill-formed cases of array initialization with a string literal.
784 (error_init): Make variadic.
785
5f07d78a
JJ
7862019-01-12 Jakub Jelinek <jakub@redhat.com>
787
788 * c-typeck.c (convert_for_assignment): Fix a comment typo.
789
c4581bbf
JJ
7902019-01-07 Jakub Jelinek <jakub@redhat.com>
791
792 PR c/88701
793 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
794 if current_function_decl is non-NULL.
795
65c5b1eb
JM
7962019-01-07 Joseph Myers <joseph@codesourcery.com>
797
798 PR c/88720
799 PR c/88726
800 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
801 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
802 functions declared but never defined only for external scope, not
803 for other scopes.
804
d8fcab68
JJ
8052019-01-07 Jakub Jelinek <jakub@redhat.com>
806
807 PR c++/85052
808 * c-parser.c (c_parser_postfix_expression): Parse
809 __builtin_convertvector.
810
a5544970
JJ
8112019-01-01 Jakub Jelinek <jakub@redhat.com>
812
813 Update copyright years.
814
da77eace
L
8152018-12-20 H.J. Lu <hongjiu.lu@intel.com>
816
817 PR c/51628
818 * c-typeck.c (convert_for_assignment): Call
819 warn_for_address_or_pointer_of_packed_member.
820
1edf8866
SB
8212018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
822
823 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
824 a more specific error message (instead of just falling through).
825
db4fd626
SB
8262018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
827
828 * c-parser.c (c_parser_asm_statement): Keep track of the location each
829 asm qualifier is first seen; use that to give nicer "duplicate asm
830 qualifier" messages. Delete 'quals" variable, instead pass the
831 "is_volatile_ flag to build_asm_stmt directly.
832 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
833 * c-typeck.c (build_asm_stmt): Ditto; adjust.
834
9c9cfcbb
SB
8352018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
836
837 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
838 "done" boolean variable.
839
a14feb3c
DM
8402018-12-19 David Malcolm <dmalcolm@redhat.com>
841
842 PR c++/87504
843 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
844 Move from here to gcc-rich-location.h and gcc-rich-location.c.
845 (build_binary_op): Use struct op_location_t and
846 class binary_op_rich_location.
847
6d939173
JJ
8482018-12-11 Jakub Jelinek <jakub@redhat.com>
849
850 PR sanitizer/88426
851 * c-convert.c (convert): Call c_fully_fold before calling
852 ubsan_instrument_float_cast.
853
b7055028
SB
8542018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
855
856 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
857 setting "quals".
858
5b76e75f
SB
8592018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
860
861 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
862 after asm. Pass a flag for it to build_asm_expr.
863 * c-tree.h (build_asm_expr): Update declaration.
864 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
865 set ASM_INLINE_P.
866
30bd42b9
SB
8672018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
868
869 PR inline-asm/55681
870 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
871 combination of volatile and goto, in any order, without repetitions.
872
9df6c0e4
JB
8732018-12-04 James Norris <jnorris@codesourcery.com>
874 Cesar Philippidis <cesar@codesourcery.com>
875 Julian Brown <julian@codesourcery.com>
876
877 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
878 code.
879
f44697b7
RB
8802018-11-30 Richard Biener <rguenther@suse.de>
881
882 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
883 _Literal (type) { ... } as empty aggregate or vector constructor.
884
550dfbdc
MS
8852018-11-29 Martin Sebor <msebor@redhat.com>
886
887 PR c/88091
888 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
889 (convert_arguments): Add comments. Pass additional argument to
890 the function above.
891
673670da
MS
8922018-11-29 Martin Sebor <msebor@redhat.com>
893
894 PR c/88172
895 PR testsuite/88208
896 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
897
db1d09b0
MS
8982018-11-23 Martin Sebor <msebor@redhat.com>
899
900 PR testsuite/88098
901 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
902 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
903
98f08eb8
MS
9042018-11-20 Martin Sebor <msebor@redhat.com>
905
906 * c-parser.c (c_parser_has_attribute_expression): New function.
907 (c_parser_attribute): New function.
908 (c_parser_attributes): Move code into c_parser_attribute.
909 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
910
cd5da983
MS
9112018-11-15 Martin Sebor <msebor@redhat.com>
912
913 PR c/83656
914 * c-decl.c (header_for_builtin_fn): Declare.
915 (diagnose_mismatched_decls): Diagnose declarations of built-in
916 functions without a prototype.
917 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
918 (convert_argument): Same.
919 (convert_arguments): Factor code out into convert_argument.
920 Detect mismatches between built-in formal arguments in calls
921 to built-in without prototype.
922 (build_conditional_expr): Same.
923 (type_or_builtin_type): New function.
924 (convert_for_assignment): Add argument. Conditionally issue
925 warnings instead of errors for mismatches.
926
620e594b
DM
9272018-11-13 David Malcolm <dmalcolm@redhat.com>
928
929 * c-decl.c: Replace "source_location" with "location_t".
930 * c-tree.h: Likewise.
931 * c-typeck.c: Likewise.
932 * gimple-parser.c: Likewise.
933
3179ebae
JJ
9342018-11-09 Jakub Jelinek <jakub@redhat.com>
935
81a227c6
JJ
936 * c-parser.c (c_parser_omp_clause_final): Use
937 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
938 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
939 parsing instead of c_parser_paren_condition.
940 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
941 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
942 c_fully_fold instead of c_parser_condition.
943 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
944 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
945 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
946 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
947 c_parser_expr_no_commas instead of c_parser_expression.
948
98c91c56
JJ
949 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
950 reduction clause with inscan modifier.
951
3179ebae
JJ
952 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
953 clauses other than atomic_default_mem_order.
954
28567c40
JJ
9552018-11-08 Jakub Jelinek <jakub@redhat.com>
956
957 * c-parser.c: Include memmode.h.
958 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
959 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
960 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
961 task_reduction clauses.
962 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
963 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
964 section, or lvalue assignment expression.
965 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
966 (c_parser_omp_clause_lastprivate): Parse optional
967 conditional: modifier.
968 (c_parser_omp_clause_hint): Require constant integer expression rather
969 than just integer expression.
970 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
971 clause.
972 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
973 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
974 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
975 functions.
976 (c_parser_omp_clause_depend): Parse iterator modifier and handle
977 iterators. Parse mutexinoutset and depobj kinds.
978 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
979 callers.
980 (c_parser_omp_all_clauses): Likewise. Handle
981 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
982 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
983 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
984 default memory order from requires directive if any. Adjust
985 c_finish_omp_atomic caller.
986 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
987 (c_parser_omp_flush): Parse flush with memory-order-clause.
988 (c_parser_omp_for_loop): Allow NE_EXPR even in
989 OpenMP loops, adjust c_finish_omp_for caller.
990 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
991 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
992 Allow to be called while parsing combined parallel master.
993 Parse combined master taskloop{, simd}.
994 (c_parser_omp_parallel): Parse combined
995 parallel master{, taskloop{, simd}} constructs.
996 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
997 (OMP_TASKGROUP_CLAUSE_MASK): Define.
998 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
999 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1000 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1001 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1002 around teams body. Use SET_EXPR_LOCATION.
1003 (c_parser_omp_target_data): Allow target data
1004 with only use_device_ptr clauses.
1005 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1006 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1007 (c_parser_omp_requires): New function.
1008 (c_finish_taskloop_clauses): New function.
1009 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1010 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1011 declaration. Disallow in_reduction clause when combined with parallel
1012 master.
1013 (c_parser_omp_construct): Adjust c_parser_omp_master and
1014 c_parser_omp_taskgroup callers.
1015 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1016 other than cancel.
1017 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1018 like OMP_CLAUSE_REDUCTION.
1019 (handle_omp_array_sections): Likewise. Call save_expr on array
1020 reductions before calling build_index_type. Handle depend clauses
1021 with iterators.
1022 (struct c_find_omp_var_s): New type.
1023 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1024 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1025 with static, runtime or auto schedule kinds. Call save_expr for whole
1026 array reduction sizes. Diagnose reductions with zero sized elements
1027 or variable length structures. Diagnose nogroup clause used with
1028 reduction clause(s). Handle depend clause with
1029 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1030 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1031 some different type for other kinds. Use build_unary_op with
1032 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1033 Handle depend clauses with iterators. Remove no longer needed special
1034 case that predetermined const qualified vars may be specified in
1035 firstprivate clause. Complain if const qualified vars are mentioned
1036 in data-sharing clauses other than firstprivate or shared. Use
1037 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1038 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1039 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1040 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1041
7e2de6df
DM
10422018-10-29 David Malcolm <dmalcolm@redhat.com>
1043
1044 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1045 logic for change to name_hint::operator bool.
1046 (undeclared_variable): Likewise.
1047 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1048 (c_parser_parameter_declaration): Likewise.
1049
9f936c86
JM
10502018-10-17 Joseph Myers <joseph@codesourcery.com>
1051
1052 * c-errors.c (pedwarn_c11): New function.
1053 * c-parser.c (disable_extension_diagnostics): Save
1054 warn_c11_c2x_compat and set it to 0.
1055 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1056 (c_parser_static_assert_declaration_no_semi): Handle
1057 _Static_assert without string constant.
1058 * c-tree.h (pedwarn_c11): New prototype.
1059
033eb567
DM
10602018-10-17 David Malcolm <dmalcolm@redhat.com>
1061
1062 * Make-lang.in (selftest-c): New.
1063 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1064 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1065 from gcc/Makefile.in.
1066
0edf3afe
RB
10672018-10-02 Richard Biener <rguenther@suse.de>
1068
1069 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1070
8313a764
JM
10712018-09-26 Joseph Myers <joseph@codesourcery.com>
1072
1073 PR c/87390
1074 * c-typeck.c (build_binary_op): Use excess precision for
1075 comparisons of integers and floating-point for C11 and later.
1076
ce6f0888
MJ
10772018-09-26 Martin Jambor <mjambor@suse.cz>
1078
1079 PR c/87347
1080 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1081 comment.
ce6f0888 1082
9c4a4b3c
DM
10832018-09-17 David Malcolm <dmalcolm@redhat.com>
1084
1085 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1086 Update for new param.
1087 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1088 Likewise.
1089
80c6d1f4
MJ
10902018-09-17 Martin Jambor <mjambor@suse.cz>
1091
1092 PR c/63886
1093 * c-parser.c: (warn_for_abs): New function.
1094 (c_parser_postfix_expression_after_primary): Call it.
1095
4a426e36
BE
10962018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1097
1098 * c-typeck.c (digest_init): Shorten overlength strings.
1099
6d900107
BE
11002018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1101
1102 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1103
b5764229
BE
11042018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1105
1106 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1107 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1108
22eea6b2
AM
11092018-08-30 Alexander Monakov <amonakov@ispras.ru>
1110
1111 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1112 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1113
85204e23
DM
11142018-08-27 David Malcolm <dmalcolm@redhat.com>
1115
1116 PR 87091
1117 * c-decl.c (implicitly_declare): Update call to
1118 maybe_add_include_fixit to suggest overriding the location, as it
1119 is for a note.
1120 * c-objc-common.c (c_tree_printer): Update for conversion of
1121 show_caret_p to a tri-state.
1122
3d78e008
ML
11232018-08-27 Martin Liska <mliska@suse.cz>
1124
1125 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1126 fndecl_built_in_p and remove check for FUNCTION_DECL if
1127 possible.
3d78e008
ML
1128 (diagnose_mismatched_decls): Likewise.
1129 (merge_decls): Likewise.
1130 (warn_if_shadowing): Likewise.
1131 (pushdecl): Likewise.
1132 (implicitly_declare): Likewise.
1133 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1134 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1135 * c-typeck.c (build_function_call_vec): Likewise.
1136 (convert_arguments): Likewise.
1137
097f82ec
DM
11382018-08-20 David Malcolm <dmalcolm@redhat.com>
1139
1140 PR other/84889
1141 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1142 (diagnose_mismatched_decls): Likewise, in various places.
1143 (warn_if_shadowing): Likewise.
1144 (implicit_decl_warning): Likewise.
1145 (implicitly_declare): Likewise.
1146 (undeclared_variable): Likewise.
1147 (declare_label): Likewise.
1148 (grokdeclarator): Likewise.
1149 (start_function): Likewise.
1150 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1151 (c_parser_parameter_declaration): Likewise.
1152 (c_parser_binary_expression): Likewise.
1153 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1154 (parser_build_binary_op): Likewise.
1155 (build_unary_op): Likewise.
1156 (error_init): Likewise.
1157 (pedwarn_init): Likewise.
1158 (warning_init): Likewise.
1159 (convert_for_assignment): Likewise.
1160
96e6ae57
DM
11612018-08-15 David Malcolm <dmalcolm@redhat.com>
1162
1163 * c-objc-common.c: Include "gcc-rich-location.h".
1164 (c_tree_printer): Move implemenation of '%T' to...
1165 (print_type): ...this new function.
1166 (range_label_for_type_mismatch::get_text): New function.
1167 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1168 range for the various ic_argpass cases.
1169 (class maybe_range_label_for_tree_type_mismatch): New class.
1170 (build_binary_op): Use it when calling binary_op_error.
1171
0cd020ae 11722018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1173
0cd020ae
PK
1174 * c-decl.c (start_decl): Do not warn if variables is named as main
1175 and is a local variable.
1176
72733314
IS
11772018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1178
1179 PR c/19315
1180 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1181 objects of unknown size.
1182
23aa9f7c
MS
11832018-08-13 Martin Sebor <msebor@redhat.com>
1184
1185 PR tree-optimization/71625
1186 * c-parser.c (c_parser_declaration_or_fndef): Call
1187 braced_list_to_string.
1188
e5e7e50d
BH
11892018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1190
1191 PR c/86690
1192 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1193 errors.
1194
8a45b051
MS
11952018-08-01 Martin Sebor <msebor@redhat.com>
1196
1197 PR tree-optimization/86650
1198 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1199 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1200
5922dcb5
JJ
12012018-08-01 Jakub Jelinek <jakub@redhat.com>
1202
1203 PR c/85704
1204 * c-typeck.c (init_field_decl_cmp): New function.
1205 (output_pending_init_elements): Use it for field comparisons
1206 instead of pure bit_position comparisons.
1207
9b452033
JJ
12082018-07-12 Jakub Jelinek <jakub@redhat.com>
1209
1210 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1211 type here, instead add "omp declare target implicit" attribute.
1212 (finish_decl): Diagnose vars without mappable type here.
1213
ab20d992
JJ
12142018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1215 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1216 Cesar Philippidis <cesar@codesourcery.com>
1217
1218 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1219 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1220 to their non-present_or_* counterparts. Make 'self' an alias to
1221 PRAGMA_OACC_CLAUSE_HOST.
1222 (c_parser_oacc_data_clause): Update GOMP mappings for
1223 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1224 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1225 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1226 Remove support for present_or_* clauses.
1227 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1228 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1229 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1230 (OACC_DATA_CLAUSE_MASK): Likewise.
1231 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1232 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1233 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1234 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1235 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1236
e197e64e
KV
12372018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1238
1239 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1240 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1241 (c_parser_gimple_unary_expression): Likewise.
1242
487f2f61
JJ
12432018-06-15 Jakub Jelinek <jakub@redhat.com>
1244
1245 PR c/86093
1246 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1247 before doing POINTER_DIFF_EXPR.
1248
e4d44a37
MP
12492018-06-07 Marek Polacek <polacek@redhat.com>
1250
1251 PR c/85318
1252 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1253 for loop initial declarations.
1254
b67b9225
DP
12552018-05-30 David Pagan <dave.pagan@oracle.com>
1256
1257 PR c/55976
1258 * c-decl.c (grokdeclarator): Update check for return type warnings.
1259 (start_function): Likewise.
1260 (finish_function): Likewise.
1261 * c-typeck.c (c_finish_return): Update check for return type warnings.
1262 Pass OPT_Wreturn_type to pedwarn when appropriate.
1263
c566cc9f
RS
12642018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1265
1266 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1267 __FMA_EXPR handlng.
1268
e4f81565
RS
12692018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1270
1271 * gimple-parser.c: Include internal-fn.h.
1272 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1273 (c_parser_gimple_call_internal): New function.
1274 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1275 Fix typos in comment.
1276
79e7b1fe
JJ
12772018-05-10 Jakub Jelinek <jakub@redhat.com>
1278
1279 PR c++/85662
1280 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1281 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1282 fold_convert_loc.
1283 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1284 fold_offsetof_1, pass argtype as TYPE to it and drop the
1285 fold_convert_loc.
1286
f7584c81
DP
12872018-05-02 David Pagan <dave.pagan@oracle.com>
1288
1289 PR c/30552
1290 * c-decl.c (old_style_parameter_scope): New function.
1291 * c-parser.c (c_parser_postfix_expression): Check for statement
1292 expressions in old-style function parameter list declarations.
1293 * c-parser.h (old_style_parameter_scope): New extern declaration.
1294
b33a0cb3
JJ
12952018-04-25 Jakub Jelinek <jakub@redhat.com>
1296
1297 PR sanitizer/84307
1298 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1299 it is not TREE_STATIC.
1300 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1301 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1302 its COMPOUND_LITERAL_EXPR_DECL.
1303
c5c5822a
JM
13042018-03-21 Joseph Myers <joseph@codesourcery.com>
1305
1306 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1307 where all functions return the same _FloatN or _FloatNx type,
1308 treat integer types as _Float64 instead of double.
1309
aa1c9429
JJ
13102018-03-21 Jakub Jelinek <jakub@redhat.com>
1311
1312 PR c/84999
1313 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1314 building vector comparison, diagnose it and return error_mark_node.
1315
9bb45a95
JJ
13162018-03-15 Jakub Jelinek <jakub@redhat.com>
1317
1318 PR c/84853
1319 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1320 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1321 INTEGER_TYPE element type.
1322
ada6bad9
DP
13232018-03-13 David Pagan <dave.pagan@oracle.com>
1324
1325 PR c/46921
1326 * c-typeck.c (output_init_element): Ensure field initializer
1327 expression is always evaluated if there are side effects.
1328
849bbdb9
JJ
13292018-03-06 Jakub Jelinek <jakub@redhat.com>
1330
1331 PR c/84721
1332 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1333 !building_stmt_list_p ().
1334
d74641bd
RS
13352018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1336
1337 PR c/84305
1338 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1339 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1340 and include the BIND_EXPR in the list of things that need to be
1341 pre-evaluated.
1342
0444aa9c
NS
13432018-02-09 Nathan Sidwell <nathan@acm.org>
1344
1345 PR c/84293
1346 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1347 to strict_aliasing_warning.
1348
7c30b12a
PC
13492018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1350
1351 * c-typeck.c (really_start_incremental_init, push_init_level,
1352 set_nonincremental_init, output_init_element, process_init_element):
1353 Use DECL_UNNAMED_BIT_FIELD.
1354
2be4dfcb
MP
13552018-01-31 Marek Polacek <polacek@redhat.com>
1356
1357 PR c/81779
1358 * c-parser.c (c_parser_compound_statement_nostart): Call
1359 expansion_point_location_if_in_system_header.
1360
bb9869d5
DM
13612018-01-17 David Malcolm <dmalcolm@redhat.com>
1362
1363 PR c++/83814
1364 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1365 the C part.
1366
b4923738
JJ
13672018-01-13 Jakub Jelinek <jakub@redhat.com>
1368
1369 PR c/83801
1370 * c-tree.h (decl_constant_value_1): Add a bool argument.
1371 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1372 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1373 (decl_constant_value): Adjust caller.
1374 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1375 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1376 decl_constant_value returns initializer that has BLKmode or
1377 array type.
1378 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1379
928686b1
RS
13802018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1381 Alan Hayward <alan.hayward@arm.com>
1382 David Sherwood <david.sherwood@arm.com>
1383
1384 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1385 TYPE_VECTOR_SUBPARTS.
1386
85ec4feb
JJ
13872018-01-03 Jakub Jelinek <jakub@redhat.com>
1388
1389 Update copyright years.
1390
913884f7
JJ
13912018-01-01 Jakub Jelinek <jakub@redhat.com>
1392
1393 PR c/83595
1394 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1395 c_parser_conditional_expression, c_parser_cast_expression,
1396 c_parser_sizeof_expression, c_parser_alignof_expression,
1397 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1398 c_parser_transaction_expression): Use set_error () method instead
1399 of setting value member to error_mark_node.
1400
c6cfa2bf
MM
14012017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1402
1403 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1404 and _Float<N>X built-in functions.
1405
11d29d63
JJ
14062017-12-22 Jakub Jelinek <jakub@redhat.com>
1407
14ec014e
JJ
1408 PR debug/83550
1409 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1410 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1411 incomplete vars rather than after it.
1412
11d29d63
JJ
1413 PR debug/83547
1414 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1415 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1416 and consider empty ones if there are no other stmts. For
1417 -Wunused-value walk all statements before the one only followed by
1418 DEBUG_BEGIN_STMTs.
1419
170a8bd6 14202017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1421 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1422
1423 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1424 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1425 (c_parser_do_statement): Likewise.
1426 (c_parser_for_statement): Likewise.
1427 (c_parser_statement_after_labels): Adjust calls to above.
1428 (c_parse_pragma_ivdep): New static function.
1429 (c_parser_pragma_unroll): Likewise.
1430 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1431 <PRAGMA_UNROLL>: New case.
1432
01512446
JJ
14332017-12-19 Jakub Jelinek <jakub@redhat.com>
1434
1435 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1436 perform_integral_promotions, digest_init): Replace Yoda conditions
1437 with typical order conditions.
1438 * c-decl.c (check_bitfield_type_and_width): Likewise.
1439
c65e18d3
BE
14402017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1441
1442 * c-typeck.c (c_safe_arg_type_equiv_p,
1443 c_safe_function_type_cast_p): New function.
1444 (build_c_cast): Implement -Wcast-function-type.
1445
b7280579
RB
14462017-12-14 Richard Biener <rguenther@suse.de>
1447
1448 PR c/83415
1449 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1450 like REALPART_EXPR for the behavior of whether its operand
1451 is an lvalue.
1452
49e6a6c0
MP
14532017-12-12 Marek Polacek <polacek@redhat.com>
1454
1455 PR c/82679
1456 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1457
ab20d992 14582017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1459
1460 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1461 * c-parser.c (add_debug_begin_stmt): New.
1462 (c_parser_declaration_or_fndef): Call it.
1463 (c_parser_compound_statement_nostart): Likewise.
1464 (c_parser_statement_after_labels): Likewise.
1465 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1466
4b2b493f
JM
14672017-12-07 Joseph Myers <joseph@codesourcery.com>
1468
1469 * c-decl.c (build_compound_literal): Add parameter alignas_align
1470 and set alignment of decl if nonzero.
1471 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1472 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1473 qualifier.
1474 (c_parser_struct_declaration): Update syntax comment.
1475 (c_parser_type_name): Add alignas_ok argument and pass it to
1476 c_parser_declspecs.
1477 (c_parser_cast_expression): Pass true to c_parser_type_name and
1478 give error if a cast used an _Alignas specifier.
1479 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1480 give error if sizeof (type-name) used an _Alignas specifier.
1481 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1482 give error if _Alignof (type-name) used an _Alignas specifier.
1483 (c_parser_postfix_expression_after_paren_type): Check specified
1484 alignment for a compound literal and pass it to
1485 build_compound_literal.
1486 * c-parser.h (c_parser_type_name): Update prototype.
1487 * c-tree.h (build_compound_literal): Update prototype.
1488
5d9ae53d
MS
14892017-12-07 Martin Sebor <msebor@redhat.com>
1490
1491 PR c/81544
1492 * c-decl.c (c_decl_attributes): Look up existing declaration and
1493 pass it to decl_attributes.
1494
c79144f8
DM
14952017-12-06 David Malcolm <dmalcolm@redhat.com>
1496
1497 PR c/83236
1498 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1499 reserved for use by the implementation.
1500
613bc14f
DM
15012017-12-06 David Malcolm <dmalcolm@redhat.com>
1502
1503 * c-decl.c: Include "c-family/c-spellcheck.h".
1504
05abad4c
ML
15052017-12-05 Martin Liska <mliska@suse.cz>
1506 Jakub Jelinek <jakub@redhat.com>
1507
1508 * c-typeck.c (pointer_diff): Add new argument and instrument
1509 pointer subtraction.
1510 (build_binary_op): Similar for pointer comparison.
1511
cc6534d4
JJ
15122017-12-01 Jakub Jelinek <jakub@redhat.com>
1513
65791f42
JJ
1514 PR c/79153
1515 * c-parser.c: Include tree-iterator.h.
1516 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1517 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1518 on it.
1519
cc6534d4
JJ
1520 PR c/83222
1521 * c-tree.h (decl_constant_value_1): Declare.
1522 * c-typeck.c (decl_constant_value_1): New function.
1523 (decl_constant_value): Use it.
1524 * c-fold.c (c_fully_fold_internal): If in_init, use
1525 decl_constant_value_1 instead of decl_constant_value.
1526
5de73c05
JJ
15272017-11-30 Jakub Jelinek <jakub@redhat.com>
1528
1529 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1530
058f0b9e
JJ
15312017-11-28 Jakub Jelinek <jakub@redhat.com>
1532
1533 PR sanitizer/81275
1534 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1535 c_switch_covers_all_cases_p returns true.
1536
5e9d6aa4 15372017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1538 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1539
1540 * Make-lang.in (c/c-array-notation.o): Remove.
1541 * c-array-notation.c: Delete.
1542 * c-decl.c: Remove cilkplus condition.
1543 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1544 c_parser_cilk_verify_simd, c_parser_array_notation,
1545 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1546 c_parser_cilk_simd_fn_vector_attrs,
1547 c_finish_cilk_simd_fn_tokens): Delete.
1548 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1549 (c_parser_direct_declarator_inner): Ditto.
1550 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1551 (c_parser_attributes, c_parser_compound_statement,
1552 c_parser_statement_after_labels, c_parser_if_statement,
1553 c_parser_switch_statement, c_parser_while_statement,
1554 c_parser_do_statement, c_parser_for_statement,
1555 c_parser_unary_expression, c_parser_postfix_expression,
1556 c_parser_postfix_expression_after_primary,
1557 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1558 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1559 support.
1560 * c-typeck.c (build_array_ref, build_function_call_vec,
1561 convert_arguments,
1562 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1563 c_finish_loop, build_binary_op): Remove cilkplus support.
1564
9e851845
JJ
15652017-11-28 Jakub Jelinek <jakub@redhat.com>
1566
1567 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1568 of build3.
1569
ab20d992 15702017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
1571
1572 * Make-lang.in (c.install-plugin): Install backend import library.
1573
41521dee
JJ
15742017-11-23 Jakub Jelinek <jakub@redhat.com>
1575
1576 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1577 pragma_stmt context.
1578
ac9effed
EB
15792017-11-23 Mike Stump <mikestump@comcast.net>
1580 Eric Botcazou <ebotcazou@adacore.com>
1581
1582 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1583 ANNOTATE_EXPR.
1584 (c_parser_do_statement): Likewise.
1585 (c_parser_for_statement): Likewise.
1586
ce95abc4
DM
15872017-11-22 David Malcolm <dmalcolm@redhat.com>
1588
1589 PR c++/62170
1590 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1591 bool to bool *. Within '%T' handling, if showing an "aka", use
1592 "quoted" param to add appropriate quoting.
1593
974aedcc
MP
15942017-11-22 Marek Polacek <polacek@redhat.com>
1595
1596 PR c++/60336
1597 PR middle-end/67239
1598 PR target/68355
1599 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1600
d4300cc6
DM
16012017-11-21 David Malcolm <dmalcolm@redhat.com>
1602
1603 PR c/83056
1604 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1605 earlier failed lookups.
1606
1af4ebf5
MG
16072017-11-21 Marc Glisse <marc.glisse@inria.fr>
1608
1609 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1610 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1611
26edace6
DM
16122017-11-20 David Malcolm <dmalcolm@redhat.com>
1613
1614 PR c/81404
1615 * c-decl.c: Include "c-family/known-headers.h".
1616 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1617 to known-headers.cc.
1618 (class suggest_missing_header): Move to known-header.h.
1619 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1620 than get_c_name_hint.
1621
b1212255
DM
16222017-11-20 David Malcolm <dmalcolm@redhat.com>
1623
1624 * c-decl.c (get_c_name_hint): New function.
1625 (class suggest_missing_header): New class.
1626 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1627 suggest missing headers to the user.
1628
6c7a259b
DM
16292017-11-20 David Malcolm <dmalcolm@redhat.com>
1630
1631 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1632 Include "c-family/name-hint.h"
1633 (implicit_decl_warning): Convert "hint" from
1634 const char * to name_hint. Pass location to
1635 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1636 warning was not printed.
1637 (undeclared_variable): Likewise for "guessed_id".
1638 (lookup_name_fuzzy): Convert return type from const char *
1639 to name_hint. Add location_t param.
1640 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1641 Include "c-family/name-hint.h"
1642 (c_parser_declaration_or_fndef): Convert "hint" from
1643 const char * to name_hint. Pass location to lookup_name_fuzzy.
1644 (c_parser_parameter_declaration): Likewise.
1645
f9c59f7e
JJ
16462017-11-19 Jakub Jelinek <jakub@redhat.com>
1647
1648 PR c/66618
1649 PR c/69960
1650 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1651 where needed.
1652 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1653 handle_omp_array_sections): Likewise.
1654 (digest_init): Don't call decl_constant_value_for_optimization.
1655 * c-tree.h (decl_constant_value_for_optimization): Removed.
1656 * c-fold.c (c_fold_array_ref): New function.
1657 (c_fully_fold_internal): Add LVAL argument, propagate it through
1658 recursive calls. For VAR_P call decl_constant_value and
1659 unshare if not LVAL and either optimizing or IN_INIT. Remove
1660 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1661 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1662 (c_fully_fold): Add LVAL argument, pass it through to
1663 c_fully_fold_internal.
1664 (decl_constant_value_for_optimization): Removed.
1665
3ca0dc60
JM
16662017-11-15 Joseph Myers <joseph@codesourcery.com>
1667
1668 PR c/81156
1669 * c-parser.c (check_tgmath_function): New function.
1670 (enum tgmath_parm_kind): New enum.
1671 (c_parser_postfix_expression): Handle __builtin_tgmath.
1672
64a5912c
DM
16732017-10-31 David Malcolm <dmalcolm@redhat.com>
1674
1675 * c-decl.c (implicit_decl_warning): Update for renaming of
1676 pedwarn_at_rich_loc and warning_at_rich_loc.
1677 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1678 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1679 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1680 (c_parser_struct_or_union_specifier): Likewise for renaming of
1681 pedwarn_at_rich_loc.
1682 (c_parser_parameter_declaration): Likewise for renaming of
1683 error_at_rich_loc.
1684 * c-typeck.c (build_component_ref): Likewise.
1685 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1686 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1687 (set_init_label): Likewise for renaming of error_at_rich_loc.
1688
c1136864
RB
16892017-10-30 Richard Biener <rguenther@suse.de>
1690
1691 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1692 stmts.
1693
ee5fd23a
MM
16942017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1695
1696 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1697 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1698
1a59ccf2
DM
16992017-10-25 David Malcolm <dmalcolm@redhat.com>
1700
1701 PR c/7356
1702 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1703 semicolons.
1704
bc1a75dd
JJ
17052017-10-25 Jakub Jelinek <jakub@redhat.com>
1706
1707 PR libstdc++/81706
1708 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1709 newdecl to corresponding __builtin_ if any.
1710
ff1ff960
PC
17112017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1712
1713 PR c++/82466
1714 * c-decl.c (diagnose_mismatched_decls): Use
1715 OPT_Wbuiltin_declaration_mismatch.
1716
62e1c678
DM
17172017-10-12 David Malcolm <dmalcolm@redhat.com>
1718
1719 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1720 use it to guard calls to maybe_suggest_missing_token_insertion.
1721 (c_parser_parms_list_declarator): Override default value of new
1722 "type_is_unique" param to c_parser_require.
1723 (c_parser_asm_statement): Likewise.
1724 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1725 defaulting to true.
1726
a92f6726
NS
17272017-10-11 Nathan Sidwell <nathan@acm.org>
1728
1729 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1730
8e6cdc90
RS
17312017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1732
1733 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1734 operating on trees as wide_ints.
1735 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1736 (c_tree_equal): Likewise.
1737
8139a48e
DM
17382017-10-04 David Malcolm <dmalcolm@redhat.com>
1739
1740 * c-decl.c (push_parm_decl): Store c_parm's location into the
1741 PARAM_DECL.
1742 (build_c_parm): Add "loc" param and store it within the c_parm.
1743 * c-parser.c (struct c_parser): Add "last_token_location" field.
1744 (c_parser_consume_token): Store location of the token into the
1745 new field.
1746 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1747 when handling a FUNCTION_DECL, if it doesn't already have them.
1748 (c_parser_parameter_declaration): Generate a location for the
1749 parameter, and pass it to the call to build_c_parm.
1750 * c-tree.h (struct c_parm): Add field "loc".
1751 (build_c_parm): Add location_t param.
1752 * c-typeck.c (get_fndecl_argument_location): New function.
1753 (inform_for_arg): New function.
1754 (convert_for_assignment): Use inform_for_arg when dealing with
1755 ic_argpass.
1756
2a389958
JJ
17572017-09-29 Jakub Jelinek <jakub@redhat.com>
1758
7d386d45
JJ
1759 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1760 width is non-NULL.
1761 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1762 don't SET_DECL_C_BIT_FIELD here.
1763
2a389958
JJ
1764 PR c/82340
1765 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1766 instead of trying to set just TREE_READONLY manually.
1767
ebc6a85e
TV
17682017-09-16 Tom de Vries <tom@codesourcery.com>
1769
1770 PR c/81875
1771 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1772 cond itself.
1773
bb75facd
JM
17742017-09-15 Joseph Myers <joseph@codesourcery.com>
1775
1776 PR c/82071
1777 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1778 for C11.
1779 (build_conditional_expr): For C11, generate result with excess
1780 precision when one argument is an integer and the other is of a
1781 type using excess precision.
1782
1d933576
BE
17832017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1784
1785 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1786
267bbb6f
MP
17872017-09-13 Marek Polacek <polacek@redhat.com>
1788
1789 PR c/82167
1790 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1791 than expr.original_type.
1792
6836632e
NS
17932017-09-12 Nathan Sidwell <nathan@acm.org>
1794
1795 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1796 resort_sorted_fields): Moved from c-family/c-common.c.
1797 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1798
e035be33
JM
17992017-09-01 Joseph Myers <joseph@codesourcery.com>
1800
1801 PR c/82071
1802 * c-typeck.c (build_atomic_assign): Handle argument with excess
1803 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1804 argument passed to build_binary_op and convert_for_assignment but
1805 not for call to c_fully_fold.
1806 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1807 Ensure build_binary_op is called with argument with original
1808 semantic type. Avoid calling c_fully_fold with an
1809 EXCESS_PRECISION_EXPR from build_binary_op.
1810
d2e05fcb
JJ
18112017-09-01 Jakub Jelinek <jakub@redhat.com>
1812
1813 PR c/81887
1814 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1815
b397965c
RS
18162017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1817 Alan Hayward <alan.hayward@arm.com>
1818 David Sherwood <david.sherwood@arm.com>
1819
1820 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1821 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1822 m1 and m2 to the signed equivalent of a fixed-point
1823 SCALAR_TYPE_MODE.
1824
14e18d71
DM
18252017-08-24 David Malcolm <dmalcolm@redhat.com>
1826
1827 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1828 than CAN_HAVE_LOCATION_P when determining whether to use the
1829 location_t value within "value".
1830
7f204c0f
DM
18312017-08-21 David Malcolm <dmalcolm@redhat.com>
1832
1833 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1834 rather than peeking the location of the first token.
1835 * c-tree.h (c_expr::get_location): New method.
1836
2f687306
DM
18372017-08-21 David Malcolm <dmalcolm@redhat.com>
1838
1839 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1840 to check_function_arguments.
1841
3e7b80d7
MP
18422017-08-18 Marek Polacek <polacek@redhat.com>
1843
1844 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1845 commentary.
1846
00aa1fa2
L
18472017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1848
1849 PR c/53037
1850 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1851 (check_bitfield_type_and_width): Don't allow bit-field with
1852 warn_if_not_aligned type.
1853
da67acb9
MS
18542017-08-14 Martin Sebor <msebor@redhat.com>
1855
1856 PR c/81117
1857 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1858
bb85aa74
MP
18592017-08-11 Marek Polacek <polacek@redhat.com>
1860
1861 PR c/81795
1862 * c-decl.c (pushtag): Only print inform if the warning was printed.
1863 (grokdeclarator): Likewise.
1864
32129a17
DM
18652017-08-10 David Malcolm <dmalcolm@redhat.com>
1866
1867 * c-parser.c (c_parser_error): Rename to...
1868 (c_parser_error_richloc): ...this, making static, and adding
1869 "richloc" parameter, passing it to the c_parse_error call,
1870 rather than calling c_parser_set_source_position_from_token.
1871 (c_parser_error): Reintroduce, reimplementing in terms of the
1872 above, converting return type from void to bool.
1873 (class token_pair): New class.
1874 (struct matching_paren_traits): New struct.
1875 (matching_parens): New typedef.
1876 (struct matching_brace_traits): New struct.
1877 (matching_braces): New typedef.
1878 (get_matching_symbol): New function.
1879 (c_parser_require): Add param MATCHING_LOCATION, using it to
1880 highlight matching "opening" tokens for missing "closing" tokens.
1881 (c_parser_skip_until_found): Likewise.
1882 (c_parser_static_assert_declaration_no_semi): Convert explicit
1883 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1884 class matching_parens, so that the pertinent open parenthesis is
1885 highlighted when there are problems locating the close
1886 parenthesis.
1887 (c_parser_struct_or_union_specifier): Likewise.
1888 (c_parser_typeof_specifier): Likewise.
1889 (c_parser_alignas_specifier): Likewise.
1890 (c_parser_simple_asm_expr): Likewise.
1891 (c_parser_braced_init): Likewise, for matching_braces.
1892 (c_parser_paren_condition): Likewise, for matching_parens.
1893 (c_parser_switch_statement): Likewise.
1894 (c_parser_for_statement): Likewise.
1895 (c_parser_asm_statement): Likewise.
1896 (c_parser_asm_operands): Likewise.
1897 (c_parser_cast_expression): Likewise.
1898 (c_parser_sizeof_expression): Likewise.
1899 (c_parser_alignof_expression): Likewise.
1900 (c_parser_generic_selection): Likewise.
1901 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1902 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1903 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1904 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1905 c_parser_skip_until_found call.
1906 (c_parser_objc_class_definition): Use class matching_parens as
1907 above.
1908 (c_parser_objc_method_decl): Likewise.
1909 (c_parser_objc_try_catch_finally_statement): Likewise.
1910 (c_parser_objc_synchronized_statement): Likewise.
1911 (c_parser_objc_at_property_declaration): Likewise.
1912 (c_parser_oacc_wait_list): Likewise.
1913 (c_parser_omp_var_list_parens): Likewise.
1914 (c_parser_omp_clause_collapse): Likewise.
1915 (c_parser_omp_clause_default): Likewise.
1916 (c_parser_omp_clause_if): Likewise.
1917 (c_parser_omp_clause_num_threads): Likewise.
1918 (c_parser_omp_clause_num_tasks): Likewise.
1919 (c_parser_omp_clause_grainsize): Likewise.
1920 (c_parser_omp_clause_priority): Likewise.
1921 (c_parser_omp_clause_hint): Likewise.
1922 (c_parser_omp_clause_defaultmap): Likewise.
1923 (c_parser_oacc_single_int_clause): Likewise.
1924 (c_parser_omp_clause_ordered): Likewise.
1925 (c_parser_omp_clause_reduction): Likewise.
1926 (c_parser_omp_clause_schedule): Likewise.
1927 (c_parser_omp_clause_num_teams): Likewise.
1928 (c_parser_omp_clause_thread_limit): Likewise.
1929 (c_parser_omp_clause_aligned): Likewise.
1930 (c_parser_omp_clause_linear): Likewise.
1931 (c_parser_omp_clause_safelen): Likewise.
1932 (c_parser_omp_clause_simdlen): Likewise.
1933 (c_parser_omp_clause_depend): Likewise.
1934 (c_parser_omp_clause_map): Likewise.
1935 (c_parser_omp_clause_device): Likewise.
1936 (c_parser_omp_clause_dist_schedule): Likewise.
1937 (c_parser_omp_clause_proc_bind): Likewise.
1938 (c_parser_omp_clause_uniform): Likewise.
1939 (c_parser_omp_for_loop): Likewise.
1940 (c_parser_cilk_clause_vectorlength): Likewise.
1941 (c_parser_cilk_clause_linear): Likewise.
1942 (c_parser_transaction_expression): Likewise.
1943 * c-parser.h (c_parser_require): Add param matching_location with
1944 default UNKNOWN_LOCATION.
1945 (c_parser_error): Convert return type from void to bool.
1946 (c_parser_skip_until_found): Add param matching_location with
1947 default UNKNOWN_LOCATION.
1948
30af3a2b
MP
19492017-08-09 Marek Polacek <polacek@redhat.com>
1950
1951 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1952 * c-tree.h (build_external_ref): Update declaration.
1953 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1954 (build_external_ref): Change the type of a parameter to bool.
1955 (parser_build_binary_op): Use true/false instead of 1/0.
1956 (pointer_diff): Likewise.
1957 (build_modify_expr): Likewise.
1958 (set_designator): Change the type of a parameter to bool.
1959 (set_init_index): Use true/false instead of 1/0.
1960 (set_init_label): Likewise.
1961 (output_init_element): Change the type of a parameter to bool.
1962 (output_pending_init_elements): Use true/false instead of 1/0.
1963 (process_init_element): Likewise.
1964 (build_binary_op): Change the type of a parameter to bool.
1965
296c53ac
MP
19662017-08-09 Marek Polacek <polacek@redhat.com>
1967
1968 PR c/81233
1969 * c-typeck.c (pedwarn_init): Make the function take a variable list.
1970 Call emit_diagnostic_valist instead of pedwarn.
1971 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
1972 Print the relevant types in diagnostics.
1973
a32c8316
MP
19742017-08-09 Marek Polacek <polacek@redhat.com>
1975
1976 PR c/81417
1977 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 1978 build_conditional_expr.
a32c8316
MP
1979 * c-parser.c (c_parser_conditional_expression): Create locations for
1980 EXP1 and EXP2 from their source ranges. Pass the locations down to
1981 build_conditional_expr.
1982 * c-tree.h (build_conditional_expr): Update declaration.
1983 * c-typeck.c (build_conditional_expr): Add location_t parameters.
1984 For -Wsign-compare, also print the types.
1985
314e6352
ML
19862017-08-08 Martin Liska <mliska@suse.cz>
1987
1988 * c-convert.c: Include header files.
1989 * c-typeck.c: Likewise.
1990
577eec56
ML
19912017-08-07 Martin Liska <mliska@suse.cz>
1992
1993 * c-parser.c (c_parser_attributes): Canonicalize name of an
1994 attribute.
1995
f7b6353a
MP
19962017-08-02 Marek Polacek <polacek@redhat.com>
1997
1998 PR c/81289
1999 * c-parser.c (c_parser_unary_expression): Use set_error.
2000
8a6eab34
MP
2001 PR c/81448
2002 PR c/81306
2003 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2004 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2005
ab20d992 20062017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2007 Martin Liska <mliska@suse.cz>
2008
2009 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2010 statement.
7fef86d3 2011
f34ebeb2
ML
20122017-07-31 Martin Liska <mliska@suse.cz>
2013
2014 PR sanitize/81530
2015 * c-convert.c (convert): Guard condition with flag_sanitize_p
2016 also with current_function_decl non-null equality.
2017 * c-decl.c (grokdeclarator): Likewise.
2018 * c-typeck.c (build_binary_op): Likewise.
2019
8595f67b
MP
20202017-07-25 Marek Polacek <polacek@redhat.com>
2021
2022 * c-decl.c (grokfield): Remove local variable.
2023
d49718d6
MP
20242017-07-25 Marek Polacek <polacek@redhat.com>
2025
2026 PR c/81364
2027 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2028 macro expansion if the body is in { }.
2029 (c_parser_while_statement): Likewise.
2030 (c_parser_for_statement): Likewise.
2031
ff22eb12
NS
20322017-07-18 Nathan Sidwell <nathan@acm.org>
2033
2034 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2035
eea77d1f
DM
20362017-07-14 David Malcolm <dmalcolm@redhat.com>
2037
2038 * c-decl.c (implicitly_declare): When suggesting a missing
2039 #include, provide a fix-it hint.
2040
b6f43128
DM
20412017-07-06 David Malcolm <dmalcolm@redhat.com>
2042
2043 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2044 and call that instead.
2045 * c-tree.h (selftest::run_c_tests): New decl.
2046
3e2becc4
MP
20472017-06-26 Marek Polacek <polacek@redhat.com>
2048
2049 PR c/80116
2050 * c-parser.c (c_parser_if_body): Set the location of the
2051 body of the conditional after parsing all the labels. Call
2052 warn_for_multistatement_macros.
2053 (c_parser_else_body): Likewise.
2054 (c_parser_switch_statement): Likewise.
2055 (c_parser_while_statement): Likewise.
2056 (c_parser_for_statement): Likewise.
2057 (c_parser_statement): Add a default argument. Save the location
2058 after labels have been parsed.
2059 (c_parser_c99_block_statement): Likewise.
2060
343ae898
RB
20612017-06-19 Richard Biener <rguenther@suse.de>
2062
2063 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2064 negated _Literals to parse _Literal (int) -1.
2065
45b2222a
ML
20662017-06-13 Martin Liska <mliska@suse.cz>
2067
2068 PR sanitize/78204
2069 * c-convert.c (convert): Use sanitize_flags_p.
2070 * c-decl.c (grokdeclarator): Likewise.
2071 * c-typeck.c (convert_for_assignment): Likewise.
2072 (c_finish_return): Likewise.
2073 (build_binary_op): Likewise.
2074
8ab7005b
JJ
20752017-06-08 Jakub Jelinek <jakub@redhat.com>
2076
2077 PR c/81006
2078 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2079 to sizetype before size_binop.
2080
363dc72c
JJ
20812017-06-07 Jakub Jelinek <jakub@redhat.com>
2082
2083 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2084 of TDI_generic.
2085
dc949728
MP
20862017-06-06 Marek Polacek <polacek@redhat.com>
2087
2088 PR c/79983
2089 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2090 ref.
2091 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2092
40ffd95f
BE
20932017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2094
2095 * c-parser.c (c_parser_binary_expression): Implement the
2096 -Wsizeof_pointer_div warning.
2097 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2098 from a parenthesized expression.
2099 (c_parser_expr_list): Use c_last_sizeof_loc.
2100 * c-tree.h (c_last_sizeof_loc): New external.
2101 * c-typeck.c (c_last_sizeof_loc): New variable.
2102 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2103
9fc5e7a4
MM
21042017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2105
2106 PR testsuite/80580
2107 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2108
f012c8ef
DM
21092017-05-30 David Malcolm <dmalcolm@redhat.com>
2110
2111 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2112 parameters.
2113
3cd211af
MS
21142017-05-24 Martin Sebor <msebor@redhat.com>
2115
2116 PR c/80731
2117 * c-fold.c (c_fully_fold_internal): Adjust.
2118 * c-typeck.c (parser_build_unary_op): Adjust.
2119
fd71a9a2
TS
21202017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2121
2122 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2123 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2124 "VECTOR_LENGTH".
2125
92fa0f9e
MP
21262017-05-23 Marek Polacek <polacek@redhat.com>
2127
2128 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2129 quotes.
2130
d11c168a
JJ
21312017-05-22 Jakub Jelinek <jakub@redhat.com>
2132
2133 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2134 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2135 it returned invariant. Call tree_invariant_p unconditionally
2136 afterwards to decide whether to return expr or op0.
2137
58aca9d9
NS
21382017-05-22 Nathan Sidwell <nathan@acm.org>
2139
2140 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2141
7fd549d2
TS
21422017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2143
2144 * c-parser.c (c_parser_omp_clause_default): Handle
2145 "OMP_CLAUSE_DEFAULT_PRESENT".
2146
6ecd2339
BE
21472017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2148
2149 * config-lang.in (gtfiles): Add c-family/c-format.c.
2150
8a57ecff
NS
21512017-05-18 Nathan Sidwell <nathan@acm.org>
2152
2153 * c-decl.c (pushdecl_top_level): Delete unused function.
2154
6574d78e
MP
21552017-05-18 Marek Polacek <polacek@redhat.com>
2156
2157 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2158 (check_earlier_gotos): Likewise.
2159 (define_label): Likewise.
2160 (pending_xref_error): Likewise.
2161 (smallest_type_quals_location): Likewise.
2162 (grokdeclarator): Likewise.
2163 (grokparms): Likewise.
2164 (identifier_global_value): Likewise.
2165 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2166 (find_init_member): Likewise.
2167
e3455240
MP
21682017-05-18 Marek Polacek <polacek@redhat.com>
2169
2170 * c-decl.c (start_decl): Use false/true instead of 0/1.
2171 (grokdeclarator): Likewise.
2172 (finish_struct): Likewise.
2173 (start_function): Change the return type to bool. Use false/true
2174 instead of 0/1.
2175 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2176 * c-tree.h (start_function): Update.
2177 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2178 (set_designator): Change the return type to bool. Use false/true
2179 instead of 0/1.
2180
3fa8871b
MP
21812017-05-17 Marek Polacek <polacek@redhat.com>
2182
2183 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2184 * c-typeck.c: Likewise.
2185
142473df
MP
21862017-05-17 Marek Polacek <polacek@redhat.com>
2187
2188 PR sanitizer/80659
2189 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2190 DECL_IGNORED_P even for non-static compound literals.
2191
1a817418
ML
21922017-05-17 Martin Liska <mliska@suse.cz>
2193
2194 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2195 use it instead of int type.
2196
b2fa0a8b
MP
21972017-05-17 Marek Polacek <polacek@redhat.com>
2198
2199 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2200 call c_fully_fold.
2201 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2202 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2203 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2204 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2205 save_expr.
2206 (c_parser_conditional_expression): Likewise.
2207 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2208 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2209 (process_init_element): Likewise.
2210 (build_binary_op): Likewise.
2211 (handle_omp_array_sections_1): Likewise.
2212
1e47f02b
TS
22132017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2214
2215 * c-parser.c (c_parser_omp_clause_num_gangs)
2216 (c_parser_omp_clause_num_workers)
2217 (c_parser_omp_clause_vector_length): Merge functions into...
2218 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2219 all users.
2220
c24e924f
NS
22212017-05-11 Nathan Sidwell <nathan@acm.org>
2222
2223 * gimple-parser.c: Don't #include tree-dump.h.
2224
c587104e
MM
22252017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2226
2227 PR testsuite/80580
2228 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2229
67ac9a9d
MM
22302017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2231
2232 PR testsuite/80580
2233 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2234 incorrect __MEM syntax.
2235
ac4eb40f
MM
22362017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2237
2238 PR testsuite/80580
2239 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2240 type of unary '*'.
2241
641da50a
NS
22422017-05-09 Nathan Sidwell <nathan@acm.org>
2243
2244 * c-tree.h (pushdecl): Declare.
2245
56d35585
DM
22462017-05-05 David Malcolm <dmalcolm@redhat.com>
2247
2248 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2249 with diagnostic_report_diagnostic.
2250 * c-errors.c (pedwarn_c99): Likewise.
2251 (pedwarn_c90): Likewise.
2252
815d9cc6
XR
22532017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2254
92a285c1 2255 PR c++/80038
815d9cc6
XR
2256 * c-gimplify.c (c_gimplify_expr): Remove calls to
2257 cilk_gimplifY_call_params_in_spawned_fn.
2258
1c4ea66f
DM
22592017-04-25 David Malcolm <dmalcolm@redhat.com>
2260
2261 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2262 hint for removing extra semicolon.
2263
666f7903
JJ
22642017-04-21 Jakub Jelinek <jakub@redhat.com>
2265
2266 PR c/80468
2267 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2268 enabled, set specs->type to integer_type_node.
2269
5764ee3c
JW
22702017-04-03 Jonathan Wakely <jwakely@redhat.com>
2271
2272 * c-array-notation.c: Fix typo in comment.
2273
10fa8dfb
MP
22742017-03-29 Marek Polacek <polacek@redhat.com>
2275
2276 PR c/79730
2277 * c-decl.c (finish_decl): Check VAR_P.
2278
a9e4a1a5
JJ
22792017-03-27 Jakub Jelinek <jakub@redhat.com>
2280
2281 PR middle-end/80162
2282 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2283 * c-typeck.c (c_mark_addressable): Likewise. Look through
2284 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2285 to ARRAY_TYPE.
2286 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2287
ee3ff394
MP
22882017-03-23 Marek Polacek <polacek@redhat.com>
2289
2290 * c-tree.h: Remove a C_RID_YYCODE reference.
2291
4d1b8e70
JJ
22922017-03-21 Jakub Jelinek <jakub@redhat.com>
2293
2294 PR c/80097
2295 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2296 optional COMPOUND_EXPR with ubsan instrumentation.
2297
31dc71a8
MP
22982017-03-17 Marek Polacek <polacek@redhat.com>
2299
2300 * c-parser.c: Add C11 references.
2301
d579c385
MP
23022017-03-15 Marek Polacek <polacek@redhat.com>
2303
2304 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2305
85059a38
MP
23062017-03-11 Marek Polacek <polacek@redhat.com>
2307
2308 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2309
2f6f187a
DM
23102017-03-10 David Malcolm <dmalcolm@redhat.com>
2311
2312 PR translation/79848
2313 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2314 "%qs".
2315 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2316
36618428
MP
23172017-03-09 Marek Polacek <polacek@redhat.com>
2318
2319 PR sanitizer/79757
2320 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2321 parameter declarations with initializers.
2322
01e5af5a
JJ
23232017-03-09 Jakub Jelinek <jakub@redhat.com>
2324
2325 PR c/79969
2326 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2327 TYPE_STUB_DECL.
2328
a71dbc63
JJ
23292017-03-07 Jakub Jelinek <jakub@redhat.com>
2330
2331 PR c/79834
2332 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2333 for "may only be used in compound statements" diagnostics, change it
2334 such that the same translatable string is used for all pragmas. For
2335 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2336 diagnostics.
2337 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2338 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2339 "may only be used in compound statements" diagnostics, such that the
2340 same translatable string is used for all pragmas.
2341
1ff4bae6
MP
23422017-03-04 Marek Polacek <polacek@redhat.com>
2343
2344 PR c/79847
2345 * c-decl.c (implicit_decl_warning): Add missing space.
2346
7f5a7d78
MP
23472017-03-03 Marek Polacek <polacek@redhat.com>
2348
2349 PR c/79758
2350 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2351 current_function_prototype_arg_types is error_mark_node. Fix
2352 formatting. Use TREE_VALUE instead of TREE_TYPE.
2353
883c8f06
JJ
23542017-03-03 Jakub Jelinek <jakub@redhat.com>
2355
79c9b7a8
JJ
2356 PR c/79837
2357 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2358 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2359 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2360 diagnostics.
2361
883c8f06
JJ
2362 PR c/79836
2363 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2364 instead of %<_Generic>.
2365 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2366 (c_parser_omp_target_exit_data): Use %<release%> instead of
2367 %<release>.
2368
324ff1a0
JJ
23692017-02-28 Jakub Jelinek <jakub@redhat.com>
2370
2371 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2372 instead of just cond ? "..." : "...".
2373 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2374 for "enter"/"exit" keyword.
2375 (c_finish_oacc_routine): Don't use %s to supply portions of the
2376 message.
2377
4227c9ad
JJ
23782017-02-24 Jakub Jelinek <jakub@redhat.com>
2379
2380 PR c++/79588
2381 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2382 handle -Wrestrict here.
2383 * c-typeck.c (build_function_call_vec): Adjust
2384 check_function_arguments caller.
2385
5d972e66
RB
23862017-02-23 Richard Biener <rguenther@suse.de>
2387
2388 PR c/79684
2389 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2390 to initialize c_exprs to return.
2391 (c_parser_gimple_binary_expression): Likewise.
2392 (c_parser_gimple_unary_expression): Likewise.
2393 (c_parser_gimple_postfix_expression): Likewise.
2394
61ac5ebe
MP
23952017-02-22 Marek Polacek <polacek@redhat.com>
2396
2397 PR c/79662
2398 * c-typeck.c (convert_arguments): Handle error_mark_node.
2399
41d1b0b1
PK
24002017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2401
2402 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2403 value of c_parser_parse_ssa_name against error_mark_node and emit
2404 error if ssa name is anonymous and written as default definition.
2405
eab1f169
PK
24062017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2407
2408 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2409 FMA_EXPR.
2410
bcac0b4d
JJ
24112017-02-16 Jakub Jelinek <jakub@redhat.com>
2412
2413 PR c++/79512
2414 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2415 ignore #pragma omp target even when not followed by identifier.
2416
1be33173
PK
24172017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2418
2419 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2420 (c_parser_gimple_unary_expression): Likewise.
2421
aa326bfb
JJ
24222017-02-13 Jakub Jelinek <jakub@redhat.com>
2423
2424 * c-parser.c (c_parser_oacc_declare): Add missing space in
2425 diagnostics.
2426
8a398bc5
PK
24272017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2428
2429 PR c/79478
2430 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2431 set_c_expr_source_range when parsing ssa-name.
2432
3dcde5ef 24332017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2434 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2435
2436 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2437 building IL when arguments are error_mark_node.
2438 (c_parser_gimple_unary_expression): Likewise.
2439 (c_parser_gimple_if_stmt): Likewise.
2440 (c_parser_gimple_switch_stmt): Likewise.
2441 (c_parser_gimple_return_stmt): Likewise.
2442 (c_parser_parse_ssa_name): When name lookup fails do not build
2443 an SSA name. Use undeclared rather than not declared in error
2444 reporting.
2445
192b048b
MP
24462017-02-09 Marek Polacek <polacek@redhat.com>
2447
2448 PR c/79428
2449 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2450 instead of c_parser_skip_until_found.
2451
56f71478
JJ
24522017-02-09 Jakub Jelinek <jakub@redhat.com>
2453
2454 PR c/79431
2455 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2456 symtab_node::get on automatic variables.
2457
02889d23
CLT
24582016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2459 Chung-Lin Tang <cltang@codesourcery.com>
2460
2461 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2462 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2463 semantic checking.
2464 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2465
7af4b20d
RB
24662017-02-07 Richard Biener <rguenther@suse.de>
2467
2468 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2469 (c_parser_gimple_postfix_expression_after_primary):
2470 Do not use c_build_function_call_vec to avoid folding and promotion.
2471 Simplify.
2472
e5e391d6
MO
24732017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2474
2475 PR lto/79061
2476 * c-decl.c (pop_scope): Pass main_input_filename to
2477 build_translation_unit_decl.
2478
c2e84327
DM
24792017-01-24 David Malcolm <dmalcolm@redhat.com>
2480
2481 * c-parser.c: Include "read-rtl-function.h" and
2482 "run-rtl-passes.h".
2483 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2484 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2485 production. Update for renaming of field "gimple_pass" to
2486 "gimple_or_rtl_pass". If __RTL was seen, call
2487 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2488 to an auto_timevar, to cope with early exit.
2489 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2490 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2491 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2492 Handle RID_RTL.
2493 (c_parser_parse_rtl_body): New function.
2494 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2495 (struct c_declspecs): Rename field "gimple_pass" to
2496 "gimple_or_rtl_pass". Add field "rtl_p".
2497 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2498 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2499 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2500 (c_parser_gimple_or_rtl_pass_list): ...this.
2501
2ebd93e1
MP
25022017-01-20 Marek Polacek <polacek@redhat.com>
2503
2504 PR c/64279
2505 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2506
b1c95bb5
RB
25072017-01-13 Richard Biener <rguenther@suse.de>
2508
2509 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2510 nops.
2511
25329913
RB
25122017-01-13 Richard Biener <rguenther@suse.de>
2513
2514 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2515 _Literal ( type-name ) number.
2516
6bb4ea5c
RB
25172017-01-12 Richard Biener <rguenther@suse.de>
2518
2519 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2520 __MEM.
2521
6b5b4e9c
JJ
25222017-01-11 Jakub Jelinek <jakub@redhat.com>
2523
2524 PR c++/72813
2525 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2526 PCH file.
2527
e3252775
RB
25282017-01-11 Richard Biener <rguenther@suse.de>
2529
2530 PR bootstrap/79052
2531 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2532 returns on parse errors.
2533
a9342885
MP
25342017-01-04 Marek Polacek <polacek@redhat.com>
2535
2536 PR c++/64767
2537 * c-parser.c (c_parser_postfix_expression): Mark zero character
2538 constants by setting original_type in c_expr.
2539 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2540 with a zero character constant.
2541 (char_type_p): New function.
2542
5dd9a9d0
DM
25432017-01-04 David Malcolm <dmalcolm@redhat.com>
2544
2545 * c-parser.c (c_parser_declaration_or_fndef): Create a
2546 rich_location at init_loc and parse it to start_init.
2547 (last_init_list_comma): New global.
2548 (c_parser_braced_init): Update last_init_list_comma when parsing
2549 commas. Pass it to pop_init_level. Pass location of closing
2550 brace to pop_init_level.
2551 (c_parser_postfix_expression_after_paren_type): Create a
2552 rich_location at type_loc and parse it to start_init.
2553 (c_parser_omp_declare_reduction): Likewise for loc.
2554 * c-tree.h (start_init): Add rich_location * param.
2555 (pop_init_level): Add location_t param.
2556 * c-typeck.c (struct initializer_stack): Add field
2557 "missing_brace_richloc".
2558 (start_init): Add richloc param, use it to initialize
2559 the stack node's missing_brace_richloc.
2560 (last_init_list_comma): New decl.
2561 (finish_implicit_inits): Pass last_init_list_comma to
2562 pop_init_level.
2563 (push_init_level): When finding missing open braces, add fix-it
2564 hints to the richloc.
2565 (pop_init_level): Add "insert_before" param and pass it
2566 when calling pop_init_level. Add fixits about missing
2567 close braces to any richloc. Use the richloc for the
2568 -Wmissing-braces warning.
2569 (set_designator): Pass last_init_list_comma to pop_init_level.
2570 (process_init_element): Likewise.
2571
cbe34bb5
JJ
25722017-01-01 Jakub Jelinek <jakub@redhat.com>
2573
2574 Update copyright years.
2575
d17680f3
JJ
25762016-12-21 Jakub Jelinek <jakub@redhat.com>
2577
0dba7960
JJ
2578 PR bootstrap/78817
2579 * c-typeck.c (build_function_call_vec): If check_function_arguments
2580 returns true, set TREE_NO_WARNING on CALL_EXPR.
2581
d17680f3
JJ
2582 PR c/77767
2583 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2584 to *expr instead of overwriting it.
2585
aa90531e
RB
25862016-12-20 Richard Biener <rguenther@suse.de>
2587
2588 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2589 error recovery.
2590 (c_parser_gimple_statement): Only build assigns for non-error
2591 stmts.
2592 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2593
629b3d75
MJ
25942016-12-14 Martin Jambor <mjambor@suse.cz>
2595
2596 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2597 omp-low.h.
2598 (c_finish_oacc_routine): Adjusted call to
2599 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2600 to use their new names.
2601 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2602 use its new name.
2603 (c_parser_oacc_update): Likewise.
2604 (c_parser_omp_simd): Likewise.
2605 (c_parser_omp_target_update): Likewise.
2606 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2607 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2608 name.
2609 (c_finish_omp_cancellation_point): Likewise.
2610 * gimple-parser.c: Do not include omp-low.h
2611
c5af52eb
CP
26122016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2613 James Norris <jnorris@codesourcery.com>
2614
2615 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2616 EXIT_DATA,WAIT} are not used in compound statements.
2617 (c_parser_oacc_enter_exit_data): Update diagnostics.
2618
48330c93
BE
26192016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2620
2621 PR c++/71973
2622 * c-decl.c (diagnose_mismatched_decls): Use
2623 OPT_Wbuiltin_declaration_mismatch here too.
2624
899ca90e 26252016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2626 Alan Hayward <alan.hayward@arm.com>
2627 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2628
2629 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2630 (make_label, finish_struct): Likewise.
2631
1ee62b92 26322016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2633 Richard Biener <rguenther@suse.de>
22b15758 2634
8e745a17
JJ
2635 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2636 * config-lang.in (gtfiles): Add c/c-parser.h.
2637 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2638 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2639 * c-parser.c (enum c_id_kind, struct c_token,
2640 c_parser_next_token_is, c_parser_next_token_is_not,
2641 c_parser_next_token_is_keyword,
2642 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2643 Split out to ...
2644 * c-parser.h: ... new header.
2645 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2646 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2647 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2648 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2649 c_parser_error, c_parser_require, c_parser_skip_until_found,
2650 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2651 c_parser_type_name): Export.
2652 (c_parser_tokens_buf): New function.
2653 (c_parser_error): Likewise.
2654 (c_parser_set_error): Likewise.
2655 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2656 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2657 via c_parser_parse_gimple_body.
8e745a17
JJ
2658 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2659 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2660 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2661 c_parser_error, c_parser_require, c_parser_skip_until_found,
2662 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2663 c_parser_type_name): Declare.
1ee62b92
PG
2664 (struct c_parser): Declare forward.
2665 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2666 (c_parser_error): Likewise.
2667 (c_parser_set_error): Likewise.
2668 * gimple-parser.c: New file.
2669 * gimple-parser.h: Likewise.
1ee62b92 2670
22b15758
UB
26712016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2672
2673 PR c/35503
2674 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2675 warn_for_restrict.
2676
84ff4775
LCW
26772016-09-11 Le-Chun Wu <lcwu@google.com>
2678 Mark Wielaard <mjw@redhat.com>
2679
2680 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2681 to the given -Wshadow= variant.
2682
4d0cdd0c
TP
26832016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2684
2685 * c-typeck.c: Include memmodel.h.
2686
1202f33e
JJ
26872016-10-13 Jakub Jelinek <jakub@redhat.com>
2688
2689 PR target/77957
2690 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2691 instead of lhd_return_null_tree_v.
2692
8a14afd0
BS
26932016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2694
2695 PR c++/69733
2696 * c-decl.c (smallest_type_quals_location): New static function.
2697 (grokdeclarator): Try to find the correct location for an ignored
2698 qualifier.
2699
81fea426
MP
27002016-09-26 Marek Polacek <polacek@redhat.com>
2701
2702 PR c/7652
2703 * c-decl.c (pop_scope): Add gcc_fallthrough.
2704
27052016-09-26 Marek Polacek <polacek@redhat.com>
2706
2707 PR c/7652
2708 * c-parser.c (struct c_token): Add flags field.
2709 (c_lex_one_token): Pass it to c_lex_with_flags.
2710 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2711 into IFN_FALLTHROUGH.
2712 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2713 attribute fallthrough after a case label or default label.
2714 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2715
9a2300e9
MP
27162016-09-24 Marek Polacek <polacek@redhat.com>
2717
2718 PR c/77490
2719 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2720 have boolean value. Warn about ++/-- on booleans.
2721
7de76362
JJ
27222016-09-23 Jakub Jelinek <jakub@redhat.com>
2723
2724 * c-parser.c (incomplete_record_decls): Remove unnecessary
2725 = vNULL initialization of file scope vec.
2726
5b73d2ab
MP
27272016-09-16 Marek Polacek <polacek@redhat.com>
2728
2729 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2730
e51fbec3
MP
27312016-09-14 Marek Polacek <polacek@redhat.com>
2732
2733 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2734 (fix_array_notation_expr): Likewise.
2735 * c-decl.c (finish_decl): Likewise.
2736 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2737 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2738 (function_to_pointer_conversion): Use false instead of 0.
2739 (convert_lvalue_to_rvalue): Likewise.
2740 (parser_build_unary_op): Likewise.
2741 (build_atomic_assign): Likewise.
2742 (build_unary_op): Change nonconvert parameter type to bool, use
2743 true/false instead of 1/0.
2744 (build_binary_op): Use true instead of 1.
2745
254830ba
DM
27462016-09-13 David Malcolm <dmalcolm@redhat.com>
2747
2748 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2749 of add_fixit_insert to add_fixit_insert_before.
2750
4c13ba17
MP
27512016-09-13 Marek Polacek <polacek@redhat.com>
2752
2753 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2754 it.
2755
54dcdb88
BE
27562016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2757
2758 PR c++/77496
2759 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2760 COMPOUND_EXPR to warn_for_omitted_condop.
2761
e5106e27
DM
27622016-09-07 David Malcolm <dmalcolm@redhat.com>
2763
2764 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2765 c_get_substring_location for this new langhook.
2766
9dc5773f
JJ
27672016-09-02 Jakub Jelinek <jakub@redhat.com>
2768
2769 PR c/65467
2770 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2771 flag_openmp.
2772 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2773 instead of mark_exp_read on low_bound/length expression.
2774 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2775 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2776 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2777 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2778 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2779 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2780 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2781 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2782 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2783 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2784 instead of mark_expr_read.
2785 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2786 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2787 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2788 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2789 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2790 array section bases outside of depend clause, for depend clause
2791 use convert_lvalue_to_rvalue on the base.
2792 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2793 linear, aligned, map, to and from clauses.
2794 (c_omp_clause_copy_ctor): New function.
2795
295844f6
MP
27962016-09-01 Marek Polacek <polacek@redhat.com>
2797
2798 PR c/7652
2799 * c-typeck.c (composite_type): Add FALLTHRU comment.
2800
089af25c
DM
28012016-08-31 David Malcolm <dmalcolm@redhat.com>
2802
2803 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2804 to the insertion fixits for "struct", "union", and "enum".
2805
f9087798
DM
28062016-08-30 David Malcolm <dmalcolm@redhat.com>
2807
2808 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2809 rather than add_fixit_misspelled_id.
2810 (undeclared_variable): Likewise.
2811 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2812 now-redundant "here" params from add_fixit_insert method calls.
2813 (c_parser_parameter_declaration): Likewise.
2814 * c-typeck.c (build_component_ref): Remove now-redundant range
2815 param from add_fixit_replace method calls.
2816
ebef225f
MP
28172016-08-25 Marek Polacek <polacek@redhat.com>
2818
2819 * c-typeck.c (parser_build_binary_op): Pass LHS to
2820 warn_logical_not_parentheses.
2821
fe377a48
MP
28222016-08-25 Marek Polacek <polacek@redhat.com>
2823
2824 PR c/77323
2825 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2826 or _FloatN or _FloatNx is not supported.
2827 (finish_declspecs): Set type to integer_type_node when _FloatN or
2828 _FloatNx is not supported.
2829
c65699ef
JM
28302016-08-19 Joseph Myers <joseph@codesourcery.com>
2831
2832 PR c/32187
2833 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2834 (struct c_declspecs): Add field floatn_nx_idx.
2835 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2836 and _FloatNx type specifiers.
2837 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2838 (c_parser_declspecs, c_parser_attribute_any_word)
2839 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2840 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2841 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2842 narrower than double.
2843
2f1364c2
JJ
28442016-08-12 Jakub Jelinek <jakub@redhat.com>
2845 Martin Liska <mliska@suse.cz>
2846
2847 PR c/67410
2848 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2849 % to determine val element to change. Assert that
2850 wchar_bytes * charwidth fits into val array.
2851
191816a3
MP
28522016-08-12 Marek Polacek <polacek@redhat.com>
2853
2854 PR c/7652
2855 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2856 (c_parser_postfix_expression): Likewise.
2857 * c-typeck.c (build_unary_op): Adjust fall through comment.
2858 (c_mark_addressable): Likewise.
2859
b95a64bb
JJ
28602016-08-11 Jakub Jelinek <jakub@redhat.com>
2861
2862 PR c/72816
2863 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2864 array member through typedef, for orig_qual_indirect == 0 clear
2865 orig_qual_type.
2866
895aa8e1
DM
28672016-08-08 David Malcolm <dmalcolm@redhat.com>
2868
2869 PR c/64955
2870 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2871 this up to selftest::run_c_tests.
2872 (selftest::run_c_tests): New function.
2873
0b212d8c
TS
28742016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2875
ae9281fc
TS
2876 * c-parser.c (struct oacc_routine_data): Add error_seen and
2877 fndecl_seen members.
2878 (c_finish_oacc_routine): Use these.
2879 (c_parser_declaration_or_fndef): Adjust.
2880 (c_parser_oacc_routine): Likewise. Support more C language
2881 constructs, and improve diagnostics. Move pragma context
2882 checking...
2883 (c_parser_pragma): ... here.
2884
0b212d8c
TS
2885 * c-parser.c (struct oacc_routine_data): New.
2886 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2887 Simplify code.
2888 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2889 declare target" attribute.
2890
76e2c821
JB
28912016-08-01 Jan Beulich <jbeulich@suse.com>
2892
2893 * c-fold.c (c_fully_fold_internal): Also emit shift count
2894 warnings for vector types.
2895 * c-typeck.c (build_binary_op): Likewise.
2896
f618a472
MP
28972016-07-29 Marek Polacek <polacek@redhat.com>
2898
2899 PR c/71742
2900 * c-decl.c (finish_struct): Rephrase an error message.
2901
efd0786f
MP
2902 PR c/71853
2903 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2904 to error node for invalid code.
2905
e00dceaf
MP
2906 PR c/71573
2907 * c-decl.c (implicitly_declare): Return decl early not only for
2908 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2909
673a107a
JJ
29102016-07-29 Jakub Jelinek <jakub@redhat.com>
2911
2912 PR c/71969
2913 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2914 on GNU extern inline functions.
2915
a5b5c8b6
MP
29162016-07-29 Marek Polacek <polacek@redhat.com>
2917
2918 PR c/71583
2919 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2920 check expr.value.
2921
e3fe09c1
UB
29222016-07-22 Uros Bizjak <ubizjak@gmail.com>
2923
2924 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2925
7c8f7eaa
DM
29262016-07-20 David Malcolm <dmalcolm@redhat.com>
2927
2928 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2929 spellcheck-tree.h
2930 (best_macro_match): Likewise, converting from a typedef to a
2931 subclass.
2932 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2933 (lookup_name_fuzzy): Update for change of best_macro_match to a
2934 subclass with a ctor that calls cpp_forall_identifiers.
2935
de6a69ee
DM
29362016-07-20 David Malcolm <dmalcolm@redhat.com>
2937
2938 * c-decl.c (implicit_decl_warning): Update for conversion of
2939 return type of lookup_name_fuzzy to const char *.
2940 (undeclared_variable): Likewise.
2941 (lookup_name_fuzzy): Convert return type from tree to
2942 const char *.
2943 * c-parser.c (c_parser_declaration_or_fndef): Update for
2944 conversion of return type of lookup_name_fuzzy to const char *.
2945 (c_parser_parameter_declaration): Likewise.
2946
b1c9c068
CP
29472016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2948
2949 * c-parser.c (c_parser_oacc_declare): Don't scan for
2950 GOMP_MAP_POINTER.
2951 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2952 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2953 zero-length subarrays.
2954
ddbbcb19
JJ
29552016-07-15 Jakub Jelinek <jakub@redhat.com>
2956
2957 PR c/71858
2958 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
2959 instead of FUZZY_LOOKUP_NAME.
2960 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
2961 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
2962
dd36b877
JJ
29632016-07-14 Jakub Jelinek <jakub@redhat.com>
2964
2965 PR c/71858
2966 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
2967
8c681247
TS
29682016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2969
2970 * c-parser.c (c_parser_generic_selection): Make type of variable
2971 auto_vec.
2972 (c_parser_omp_declare_simd): Likewise.
2973
bf4fa671
TS
29742016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2975
2976 * c-decl.c (struct c_struct_parse_info): Change member types
2977 from vec to auto_vec.
2978 (start_struct): Adjust.
2979 (finish_struct): Likewise.
2980
557e8c49
JJ
29812016-07-02 Jakub Jelinek <jakub@redhat.com>
2982
2983 PR c/71719
2984 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
2985
54d19c3b
TS
29862016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2987
2988 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
2989 Move pragma context checking into...
2990 (c_parser_omp_cancellation_point): ... here, and improve
2991 diagnostic messages.
2992 * c-typeck.c (c_finish_omp_cancel)
2993 (c_finish_omp_cancellation_point): Improve diagnostic messages.
2994
152ef731
JJ
29952016-06-29 Jakub Jelinek <jakub@redhat.com>
2996
2997 PR c/71685
2998 * c-typeck.c (c_build_qualified_type): Don't clear
2999 C_TYPE_INCOMPLETE_VARS for the main variant.
3000
30012016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3002
3003 PR c/71552
3004 * c-typeck.c (output_init_element): Diagnose incompatible types
3005 before non-constant initializers.
3006
e9ac1f86
JJ
30072016-06-28 Jakub Jelinek <jakub@redhat.com>
3008
3009 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3010
277d7ee0
AK
30112016-06-23 Andi Kleen <ak@linux.intel.com>
3012
3013 * Make-lang.in: Add support for autofdo.
3014
1a4f11c8
DM
30152016-06-22 David Malcolm <dmalcolm@redhat.com>
3016
3017 PR c/70339
3018 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3019 (implicit_decl_warning): When issuing warnings for implicit
3020 declarations, attempt to provide a suggestion via
3021 lookup_name_fuzzy.
3022 (undeclared_variable): Likewise when issuing errors.
3023 (lookup_name_in_scope): Likewise.
3024 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3025 (best_macro_match): New typedef.
3026 (find_closest_macro_cpp_cb): New function.
3027 (lookup_name_fuzzy): New function.
3028 * c-parser.c: Include gcc-rich-location.h.
3029 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3030 (c_keyword_starts_typename): ...this new function.
3031 (c_parser_declaration_or_fndef): When issuing errors about
3032 missing "struct" etc, add a fixit. For other kinds of errors,
3033 attempt to provide a suggestion via lookup_name_fuzzy.
3034 (c_parser_parms_declarator): When looking ahead to detect typos in
3035 type names, also reject CPP_KEYWORD.
3036 (c_parser_parameter_declaration): When issuing errors about
3037 unknown type names, attempt to provide a suggestion via
3038 lookup_name_fuzzy.
3039 * c-tree.h (c_keyword_starts_typename): New prototype.
3040
5a578671
JM
30412016-06-20 Joseph Myers <joseph@codesourcery.com>
3042
3043 PR c/71601
3044 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3045 c_common_type returns error_mark_node.
3046
3f8257db 30472016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3048
3049 PR c/69507
3050 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3051 __alignof__ (expression).
3052
6a3f203c
DM
30532016-06-14 David Malcolm <dmalcolm@redhat.com>
3054
3055 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3056
264757fb
DM
30572016-06-14 David Malcolm <dmalcolm@redhat.com>
3058
3059 * c-typeck.c (build_component_ref): Simplify fixit code by
3060 using gcc_rich_location::add_fixit_misspelled_id.
3061 (set_init_label): Likewise.
3062
f7e4f2e3
DM
30632016-06-13 David Malcolm <dmalcolm@redhat.com>
3064
3065 * c-parser.c (c_parser_initelt): Provide location of name for new
3066 location_t param of set_init_label.
3067 * c-tree.h (set_init_label): Add location_t param.
3068 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3069 param and use it when issuing error messages about unrecognized
3070 field names. Attempt to provide a fixit hint if appropriate,
3071 otherwise update the error message to provide the type name.
3072
4b1ffdb1
TS
30732016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3074
3075 PR c/71381
3076 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3077 Loosen checking.
3078
44a845ca
MS
30792016-06-08 Martin Sebor <msebor@redhat.com>
3080 Jakub Jelinek <jakub@redhat.com>
3081
3082 PR c++/70507
3083 PR c/68120
3084 * c-typeck.c (convert_arguments): Don't promote last argument
3085 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3086
92a5f2ba
MP
30872016-06-08 Marek Polacek <polacek@redhat.com>
3088
3089 PR c/71418
3090 * c-decl.c (grokdeclarator): Check TYPE_P.
3091
08203f73
MP
3092 PR c/71426
3093 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3094 code.
3095
6ffd47b7
DM
30962016-06-07 David Malcolm <dmalcolm@redhat.com>
3097
3098 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3099 and structure element reference, capture the location of the
3100 element name token and pass it to build_component_ref.
3101 (c_parser_postfix_expression_after_primary): Likewise for
3102 structure element dereference.
3103 (c_parser_omp_variable_list): Likewise for
3104 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3105 * c-tree.h (build_component_ref): Add location_t param.
3106 * c-typeck.c (build_component_ref): Add location_t param
3107 COMPONENT_LOC. Use it, if available, when issuing hints about
3108 mispelled member names to provide a fixit replacement hint.
3109
1f40cff3
MP
31102016-06-06 Marek Polacek <polacek@redhat.com>
3111
3112 PR c/71362
3113 * c-parser.c (c_parser_direct_declarator): Set location.
3114
5545a907
MP
31152016-06-06 Marek Polacek <polacek@redhat.com>
3116
3117 * c-typeck.c (comptypes_internal): Handle comparisons of
3118 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3119 TYPE_REF_CAN_ALIAS_ALL.
3120
b605f663
CLT
31212016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3122
3123 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3124 arguments as addressable when async clause exists.
3125
00631022
JJ
31262016-05-30 Jakub Jelinek <jakub@redhat.com>
3127
3128 PR c++/71349
3129 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3130 when combined with target construct.
3131
7211a097
JJ
31322016-05-26 Jakub Jelinek <jakub@redhat.com>
3133
3134 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3135 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3136
95efe6b6
MP
31372016-05-25 Marek Polacek <polacek@redhat.com>
3138
3139 PR c/71265
3140 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3141
a23faf7a
MP
3142 PR c/71266
3143 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3144
e46c7770
CP
31452016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3146
3147 * c-parser.c (c_parser_oacc_declare): Add support for
3148 GOMP_MAP_FIRSTPRIVATE_POINTER.
3149 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3150 argument with enum c_omp_region_type ort.
3151 (handle_omp_array_sections): Likewise. Update call to
3152 handle_omp_array_sections_1.
3153 (c_finish_omp_clauses): Add specific errors and warning messages for
3154 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3155 call to handle_omp_array_sections.
3156
a04e69c0
TS
31572016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3158
3159 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3160
f17a223d
RB
31612016-05-24 Richard Biener <rguenther@suse.de>
3162
3163 PR middle-end/70434
3164 PR c/69504
3165 * c-typeck.c (build_array_ref): Do not complain about indexing
3166 non-lvalue vectors. Adjust for function name change.
3167
79063edd
MS
31682016-05-20 Martin Sebor <msebor@redhat.com>
3169
3170 PR c/71115
3171 * c-typeck.c (error_init): Use
3172 expansion_point_location_if_in_system_header.
3173 (warning_init): Same.
3174
8a40fef3
DM
31752016-05-19 David Malcolm <dmalcolm@redhat.com>
3176
3177 PR c/71171
3178 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3179 in error-handling.
3180 (c_parser_postfix_expression): Likewise.
3181 * c-tree.h (c_expr::set_error): New method.
3182 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3183 that result's range is initialized.
3184
e9892350
JG
31852016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3186
3187 * c-typeck.c (parser_build_unary_op): Fix formatting.
3188
8fad45f5
MW
31892016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3190
3191 * c-decl.c (grokdeclarator): Remove errmsg and use of
3192 targetm.invalid_return_type.
3193 (grokparms): Remove errmsg and use of
3194 targetm.invalid_parameter_type.
3195
aa4b467b
JM
31962016-05-13 Joseph Myers <joseph@codesourcery.com>
3197
3198 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3199 function return type.
3200
4f2e1536
MP
32012016-05-12 Marek Polacek <polacek@redhat.com>
3202
3203 PR c/70756
3204 * c-decl.c (build_compound_literal): Pass LOC down to
3205 c_incomplete_type_error.
3206 * c-tree.h (require_complete_type): Adjust declaration.
3207 (c_incomplete_type_error): Likewise.
3208 * c-typeck.c (require_complete_type): Add location parameter, pass it
3209 down to c_incomplete_type_error.
3210 (c_incomplete_type_error): Add location parameter, pass it down to
3211 error_at.
3212 (build_component_ref): Pass location down to c_incomplete_type_error.
3213 (default_conversion): Pass location down to require_complete_type.
3214 (build_array_ref): Likewise.
3215 (build_function_call_vec): Likewise.
3216 (convert_arguments): Likewise.
3217 (build_unary_op): Likewise.
3218 (build_c_cast): Likewise.
3219 (build_modify_expr): Likewise.
3220 (convert_for_assignment): Likewise.
3221 (c_finish_omp_clauses): Likewise.
3222
d6e83a8d
MM
32232016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3224
3225 PR c/43651
3226 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3227 is enabled.
3228 * c-errors.c (pedwarn_c90): Return true if warned.
3229 * c-tree.h (pedwarn_c90): Change return type to bool.
3230 (enum c_declspec_word): Add new enumerator cdw_atomic.
3231
5c3a10fb
MP
32322016-05-11 Marek Polacek <polacek@redhat.com>
3233
3234 PR c++/71024
3235 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3236 diagnose_mismatched_attributes and call it.
3237
cf68d92c
MP
32382016-05-10 Marek Polacek <polacek@redhat.com>
3239
3240 PR c/70255
3241 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3242 on a declaration following the definition.
3243
351f85c5
JJ
32442016-05-05 Jakub Jelinek <jakub@redhat.com>
3245
3246 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3247 parse it through to c_parser_c99_block_statement.
3248 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3249 caller.
3250
deef7113
MP
32512016-05-04 Marek Polacek <polacek@redhat.com>
3252
3253 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3254 OPT_Wdangling_else.
3255
de55efd5
MP
32562016-05-04 Marek Polacek <polacek@redhat.com>
3257
3258 PR c/48778
3259 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3260 for macro expansions.
3261
79ce98bc
MP
32622016-05-03 Marek Polacek <polacek@redhat.com>
3263
3264 PR c/70859
3265 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3266 check_builtin_function_arguments.
3267
fb2647aa
RB
32682016-05-03 Richard Biener <rguenther@suse.de>
3269
3270 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3271 the checksum from the previous stage.
3272
77886428
CP
32732016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3274
3275 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3276 c_finish_omp_clauses.
3277 (c_parser_omp_all_clauses): Likewise.
3278 (c_parser_oacc_cache): Likewise.
3279 (c_parser_oacc_loop): Likewise.
3280 (omp_split_clauses): Likewise.
3281 (c_parser_omp_declare_target): Likewise.
3282 (c_parser_cilk_all_clauses): Likewise.
3283 (c_parser_cilk_for): Likewise.
3284 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3285 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3286
7176a4a0
MP
32872016-05-02 Marek Polacek <polacek@redhat.com>
3288
3289 PR c/70851
3290 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3291 incomplete type.
3292
e7ff0319
CP
32932016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3294
3295 PR middle-end/70626
3296 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3297 OACC_LOOP_CLAUSE_MASK.
3298 (c_parser_oacc_kernels_parallel): Update call to
3299 c_oacc_split_loop_clauses.
3300
9f405ce1
AM
33012016-04-28 Andrew MacLeod <amacleod@redhat.com>
3302
3303 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3304 argument to build_modify_expr in two cases.
3305
c1e1f433
BS
33062016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3307
3308 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3309 warn_for_memset instead of warning directly here.
3310
2448a956
MP
33112016-04-26 Marek Polacek <polacek@redhat.com>
3312
3313 PR c/67784
3314 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3315 out of ...
3316 (c_parser_for_statement): ... here.
3317 (c_parser_if_statement): Use it.
3318 (c_parser_switch_statement): Use it.
3319 (c_parser_while_statement): Use it.
3320
b02a5e26
MP
3321 PR c/70791
3322 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3323
477d4906
IV
33242016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3325
3326 PR c++/69363
3327 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3328 instead of c_finish_cilk_clauses.
3329 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3330 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3331 floating-point variables in the linear clause for Cilk Plus.
3332
fe37c7af
MM
33332016-04-18 Michael Matz <matz@suse.de>
3334
3335 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3336 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3337
949505a9
MP
33382016-04-15 Marek Polacek <polacek@redhat.com>
3339
3340 PR c/70671
3341 * c-typeck.c (build_unary_op): Pass location down to error and
3342 warning call.
3343
dda1bf61
JJ
33442016-04-15 Jakub Jelinek <jakub@redhat.com>
3345
3346 PR c/70436
3347 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3348 where needed.
3349 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3350 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3351 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3352 Adjust c_parser_pragma callers.
3353 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3354 caller.
3355 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3356 c_parser_statement.
3357 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3358 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3359 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3360 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3361 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3362 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3363 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3364 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3365 down where needed.
3366 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3367 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3368 calls.
3369
99cd9857
MP
33702016-04-13 Marek Polacek <polacek@redhat.com>
3371
3372 PR c/70436
3373 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3374 adjust callers.
3375 (c_parser_statement): Likewise.
3376 (c_parser_c99_block_statement): Likewise.
3377 (c_parser_while_statement): Likewise.
3378 (c_parser_for_statement): Likewise.
3379 (c_parser_if_body): Don't set IF_P here.
3380 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3381 about dangling else here.
3382 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3383 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3384 warn about dangling else here.
3385
f13355da
MP
33862016-04-04 Marek Polacek <polacek@redhat.com>
3387
3388 PR c/70307
3389 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3390
5fde6a45
MP
33912016-03-31 Marek Polacek <polacek@redhat.com>
3392
3393 PR c/70297
3394 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3395
4bbf545b
DM
33962016-03-18 David Malcolm <dmalcolm@redhat.com>
3397
3398 PR c/70281
3399 * c-parser.c (c_parser_postfix_expression): Set the source range
3400 for uses of "__builtin_types_compatible_p".
3401
fcc2b74f
JJ
34022016-03-17 Jakub Jelinek <jakub@redhat.com>
3403
3404 PR c/70280
3405 * c-typeck.c (composite_type): Don't count void_list_node
3406 into len, if the list is terminated by void_list_node, start
3407 with void_list_node instead of NULL for newargs. Stop
3408 at void_list_node.
3409
ab4c578f
MP
34102016-03-16 Marek Polacek <polacek@redhat.com>
3411
3412 PR c/70093
3413 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3414 nested functions returning VM types.
3415
96b3c82d
CP
34162016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3417
3418 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3419 when calling c_finish_omp_clauses.
3420
29b9828f
BS
34212016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3422
3423 PR c/69824
3424 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3425 for later.
3426
7ff6ca38
MP
34272016-03-04 Marek Polacek <polacek@redhat.com>
3428
3429 PR c/69798
3430 * c-parser.c (c_parser_postfix_expression): Call
3431 c_parser_cast_expression rather than c_parser_postfix_expression.
3432
686e2237
JJ
34332016-03-01 Jakub Jelinek <jakub@redhat.com>
3434
3435 PR c/69796
3436 PR c/69974
3437 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3438 of incomplete decls to error_mark_node.
3439
0b05329b
MP
34402016-02-24 Marek Polacek <polacek@redhat.com>
3441
3442 PR c/69819
3443 * c-decl.c (finish_decl): Don't update the copy of the type of a
3444 different decl type.
3445
067fbd8b
JJ
34462016-02-23 Jakub Jelinek <jakub@redhat.com>
3447
3448 PR objc/69844
3449 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3450 in id_kind reclassification.
3451
bf14eba2
JJ
34522016-02-16 Jakub Jelinek <jakub@redhat.com>
3453
3454 PR c/69835
3455 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3456
ba539195
JN
34572016-02-16 James Norris <jnorris@codesourcery.com>
3458
3459 PR c/64748
3460 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3461
16595a1f
BS
34622016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3463
f48dfe98
BS
3464 * c-decl.c (build_null_declspecs): Zero the entire struct.
3465
16595a1f
BS
3466 PR c/69522
3467 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3468 callers changed. If nested_p is true, use it to call
3469 finish_implicit_inits.
3470 * c-tree.h (finish_implicit_inits): Declare.
3471 * c-typeck.c (finish_implicit_inits): New function. Move code
3472 from ...
3473 (push_init_level): ... here.
3474 (set_designator, process_init_element): Call finish_implicit_inits.
3475
66756373
JJ
34762016-02-11 Jakub Jelinek <jakub@redhat.com>
3477
3478 PR c/69768
3479 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3480 arguments for -Waddress warning.
3481
1066e9b5
JJ
34822016-02-04 Jakub Jelinek <jakub@redhat.com>
3483
3484 PR c/69669
3485 * c-decl.c (finish_enum): When honoring mode attribute,
3486 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3487
3a5d2ba4
JJ
34882016-01-29 Jakub Jelinek <jakub@redhat.com>
3489
3490 PR debug/69518
3491 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3492 all type variants, not just TYPE_MAIN_VARIANT.
3493
cbdd8ae0
JJ
34942016-01-27 Jakub Jelinek <jakub@redhat.com>
3495
3496 PR debug/66869
3497 * c-decl.c (c_write_global_declarations_1): Warn with
3498 warn_unused_function if static prototype without definition
3499 is not C_DECL_USED.
3500
fa74a4bc
MP
35012016-01-27 Marek Polacek <polacek@redhat.com>
3502
3503 PR c/68062
3504 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3505 to unsigned, if needed. Add -Wsign-compare warning.
3506
13f92e8d
JJ
35072016-01-26 Jakub Jelinek <jakub@redhat.com>
3508
3509 PR tree-optimization/69483
3510 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3511
cd8e73dc 35122016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3513
3514 PR c/24293
3515 * c-tree.h (incomplete_record_decls): Declare.
3516 * c-parser.c (incomplete_record_decls): Define.
3517 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3518 report error if any decl has zero size.
3519 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3520 or enum type to incomplete_record_decls.
3521
e6d6ec9e
TV
35222016-01-14 Tom de Vries <tom@codesourcery.com>
3523
3524 PR tree-optimization/68773
3525 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3526 set force_output.
3527
00083992
MP
35282016-01-14 Marek Polacek <polacek@redhat.com>
3529
3530 PR c/69262
3531 * c-decl.c (grokdeclarator): Provide more information for invalid
3532 array declarations.
3533
7443cf13
DM
35342016-01-06 David Malcolm <dmalcolm@redhat.com>
3535
3536 * c-parser.c (c_parser_unary_expression): For dereferences, build
3537 a combined location before calling build_indirect_ref, so that
3538 error reports cover the full range, manually updating the c_expr
3539 src_range.
3540
6b131d5b
MP
35412016-01-06 Marek Polacek <polacek@redhat.com>
3542
3543 PR sanitizer/69099
3544 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3545 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3546 NULL.
3547
818ab71a
JJ
35482016-01-04 Jakub Jelinek <jakub@redhat.com>
3549
3550 Update copyright years.
3551
2fe0a208
MP
35522016-01-04 Marek Polacek <polacek@redhat.com>
3553
3554 PR c/68908
3555 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3556 optimization to use __atomic_fetch_* built-in if possible.
3557
c7b48c8a
TS
35582015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3559
3560 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3561 into...
3562 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3563 all users.
3564
fda5652f
MP
35652015-12-22 Marek Polacek <polacek@redhat.com>
3566
3567 PR c/69002
3568 * c-typeck.c (build_component_ref): Warn when acessing elements of
3569 atomic structures or unions.
3570
745e411d
DM
35712015-12-21 David Malcolm <dmalcolm@redhat.com>
3572
3573 * c-typeck.c: Include "gcc-rich-location.h".
3574 (build_binary_op): In the two places that call binary_op_error,
3575 create a gcc_rich_location and populate it with the location of
3576 the binary op and its two operands.
3577
94c40e19
DM
35782015-12-16 David Malcolm <dmalcolm@redhat.com>
3579
3580 * c-parser.c (c_parser_statement_after_labels): When calling
3581 c_finish_return, Use the return expression's location if it has
3582 one, falling back to the location of the first token within it.
3583 * c-typeck.c (c_finish_return): When issuing warnings about
3584 the incorrect presence/absence of a return value, issue a note
3585 showing the declaration of the function.
3586
de67c4c3
DM
35872015-12-16 David Malcolm <dmalcolm@redhat.com>
3588
3589 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3590 to 4.
3591 (c_parser_peek_nth_token): New function.
3592 (c_parser_peek_conflict_marker): New function.
3593 (c_parser_error): Detect conflict markers and report them as such.
3594
a10704e1
DM
35952015-12-16 David Malcolm <dmalcolm@redhat.com>
3596
3597 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3598 to preserve range information for the primary expression
3599 in the call to c_parser_postfix_expression_after_primary.
3600
8062bca6
DM
36012015-12-16 David Malcolm <dmalcolm@redhat.com>
3602
3603 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3604 expression location, falling back on the first token location,
3605 rather than always using the latter.
3606
d06f8b75
MP
36072015-12-16 Marek Polacek <polacek@redhat.com>
3608
3609 PR c/64637
3610 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3611 available.
3612
2994fb91
MP
36132015-12-15 Marek Polacek <polacek@redhat.com>
3614
3615 PR c/68907
3616 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3617 artificial decl.
3618
a1b93f8d
DM
36192015-12-08 David Malcolm <dmalcolm@redhat.com>
3620
3621 * c-parser.c (c_parser_alignof_expression): Capture location of
3622 closing parenthesis (if any), or of end of unary expression, and
3623 use it to build a src_range for the expression.
3624
46c6e1e2
DM
36252015-12-08 David Malcolm <dmalcolm@redhat.com>
3626
3627 PR c/68757
3628 * c-parser.c (c_parser_get_builtin_args): Add
3629 "out_close_paren_loc" param, and write back to it.
3630 (c_parser_postfix_expression): Capture the closing
3631 parenthesis location for RID_CHOOSE_EXPR,
3632 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3633 RID_BUILTIN_SHUFFLE and use it to set the source range
3634 for such expressions; within RID_BUILTIN_COMPLEX set
3635 the underlying location.
3636
66189108
MP
36372015-12-07 Marek Polacek <polacek@redhat.com>
3638
3639 PR c/68668
3640 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3641 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3642
f187980b
EB
36432015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3644
3645 * c-tree.h (c_build_va_arg): Adjust prototype.
3646 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3647 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3648 parameter, adjust throughout and issue an error if EXPR is a component
3649 with reverse storage order.
3650
4250754e
JM
36512015-12-02 Jason Merrill <jason@redhat.com>
3652
3653 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3654 (c_fully_fold_internal, decl_constant_value_for_optimization):
3655 Move from c-common.c.
3656 * c-tree.h: Declare decl_constant_value_for_optimization.
3657 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3658
e9e32ee6
JM
36592015-12-02 Joseph Myers <joseph@codesourcery.com>
3660
3661 PR c/68162
3662 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3663 following link from declarator to next declarator. Track original
3664 qualified type and pass it to c_build_qualified_type.
3665 * c-typeck.c (c_build_qualified_type): Add arguments
3666 orig_qual_type and orig_qual_indirect.
3667
ff7a55bf
TS
36682015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3669
3670 * c-parser.c (c_parser_omp_clause_name)
3671 (c_parser_oacc_all_clauses): Alphabetical sorting.
3672
657e4e47
JJ
36732015-12-02 Jakub Jelinek <jakub@redhat.com>
3674
3675 PR c/68533
3676 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3677 for diagnostics.
3678
37d5ad46
JB
36792015-12-01 Julian Brown <julian@codesourcery.com>
3680 Cesar Philippidis <cesar@codesourcery.com>
3681 James Norris <James_Norris@mentor.com>
3682
3683 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3684 (c_parser_oacc_clause_use_device): New function.
3685 (c_parser_oacc_all_clauses): Add use_device support.
3686 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3687 (c_parser_oacc_host_data): New function.
3688 (c_parser_omp_construct): Add host_data support.
3689 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3690 * c-typeck.c (c_finish_oacc_host_data): New function.
3691 (c_finish_omp_clauses): Add use_device support.
3692
a4850ce9
JH
36932015-11-29 Jan Hubicka <hubicka@ucw.cz>
3694
3695 PR c/67106
3696 * c-decl.c: Set TYPE_PACKED in variants.
3697
b58d3df2
ML
36982015-11-27 Martin Liska <mliska@suse.cz>
3699
3700 PR c++/68312
3701 * c-array-notation.c (fix_builtin_array_notation_fn):
3702 Use release_vec_vec instead of vec::release.
3703 (build_array_notation_expr): Likewise.
3704 (fix_conditional_array_notations_1): Likewise.
3705 (fix_array_notation_expr): Likewise.
3706 (fix_array_notation_call_expr): Likewise.
3707
aec17bfe
JJ
37082015-11-27 Jakub Jelinek <jakub@redhat.com>
3709
3710 PR c/63326
3711 * c-parser.c (c_parser_compound_statement_nostart): If
3712 last_label is true, use pragma_stmt instead of pragma_compound
3713 as second c_parser_pragma argument.
3714 (c_parser_omp_ordered, c_parser_omp_target_update,
3715 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3716 false as second argument to c_parser_skip_to_pragma_eol after
3717 diagnosing standalone directives used in pragma_stmt context.
3718
688c4de0
IV
37192015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3720
3721 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3722 with "if (ENABLE_OFFLOADING)".
3723
cbd03aee
DM
37242015-11-23 David Malcolm <dmalcolm@redhat.com>
3725
3726 PR objc/68438
3727 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3728 for various Objective-C constructs: Class.name syntax,
3729 @selector(), @protocol(), @encode(), and [] message syntax.
3730
a87a86e1
DM
37312015-11-20 David Malcolm <dmalcolm@redhat.com>
3732
3733 PR 62314
3734 * c-typeck.c (should_suggest_deref_p): New function.
3735 (build_component_ref): Special-case POINTER_TYPE when
3736 generating a "not a structure of union" error message, and
3737 suggest a "->" rather than a ".", providing a fix-it hint.
3738
8ece8dfb
DM
37392015-11-19 David Malcolm <dmalcolm@redhat.com>
3740
3741 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3742 candidate into a new function, find_closest_identifier.
3743
433068cc
MP
37442015-11-19 Marek Polacek <polacek@redhat.com>
3745
3746 PR c/68412
3747 * c-typeck.c (parser_build_binary_op): Properly handle
3748 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3749
bef08b71
DM
37502015-11-17 David Malcolm <dmalcolm@redhat.com>
3751
3752 * c-parser.c (set_c_expr_source_range): Bulletproof both
3753 overloaded implementations against NULL expr->value.
3754 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3755 values.
3756 (c_parser_unary_expression): Likewise when handling addresses of
3757 labels.
3758 (c_parser_postfix_expression): Likewise for statement expressions,
3759 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3760 __builtin_va_arg, and for __builtin_offset_of.
3761 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3762 src_range using the range of the braced initializer.
3763 (c_parser_transaction_expression): Set src_range for "ret" to a
3764 sane pair of values.
3765
fff77217
KY
37662015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3767
3768 * c-parser.c (c_finish_omp_declare_simd): Look for
3769 "simd" attribute as well. Update error message.
3770
1d899da2
TS
37712015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3772
3773 * c-parser.c (c_parser_omp_declare_target): Adjust.
3774
e4606348
JJ
37752015-11-14 Jakub Jelinek <jakub@redhat.com>
3776
3777 * c-typeck.c (c_finish_omp_clauses): Don't mark
3778 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3779
3e636daf
MP
37802015-11-14 Marek Polacek <polacek@redhat.com>
3781
3782 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3783 * c-typeck.c: Likewise.
3784
ebedc9a3
DM
37852015-11-13 David Malcolm <dmalcolm@redhat.com>
3786
3787 * c-decl.c (warn_defaults_to): Pass line_table to
3788 rich_location ctor.
3789 * c-errors.c (pedwarn_c99): Likewise.
3790 (pedwarn_c90): Likewise.
3791 * c-parser.c (set_c_expr_source_range): New functions.
3792 (c_token::get_range): New method.
3793 (c_token::get_finish): New method.
3794 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3795 based on the range from the start of the LHS to the end of the
3796 RHS.
3797 (c_parser_conditional_expression): Likewise, based on the range
3798 from the start of the cond.value to the end of exp2.value.
3799 (c_parser_binary_expression): Call set_c_expr_source_range on
3800 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3801 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3802 based on the cast_loc through to the end of the expr.
3803 (c_parser_unary_expression): Likewise, based on the
3804 op_loc through to the end of op.
3805 (c_parser_sizeof_expression) Likewise, based on the start of the
3806 sizeof token through to either the closing paren or the end of
3807 expr.
3808 (c_parser_postfix_expression): Likewise, using the token range,
3809 or from the open paren through to the close paren for
3810 parenthesized expressions.
3811 (c_parser_postfix_expression_after_primary): Likewise, for
3812 various kinds of expression.
3813 * c-tree.h (struct c_expr): Add field "src_range".
3814 (c_expr::get_start): New method.
3815 (c_expr::get_finish): New method.
3816 (set_c_expr_source_range): New decls.
3817 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3818 on ret for prefix unary ops.
3819 (parser_build_binary_op): Likewise, running from the start of
3820 arg1.value through to the end of arg2.value.
3821
ec8b536f
MP
38222015-11-13 Marek Polacek <polacek@redhat.com>
3823
3824 PR c/68320
3825 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3826
277fe616
DM
38272015-11-13 David Malcolm <dmalcolm@redhat.com>
3828
3829 * c-typeck.c: Include spellcheck.h.
3830 (lookup_field_fuzzy_find_candidates): New function.
3831 (lookup_field_fuzzy): New function.
3832 (build_component_ref): If the field was not found, try using
3833 lookup_field_fuzzy and potentially offer a suggestion.
3834
6e232ba4
JN
38352015-11-12 James Norris <jnorris@codesourcery.com>
3836 Joseph Myers <joseph@codesourcery.com>
3837
3838 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3839 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3840 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3841 and PRAGMA_OMP_CLAUSE_LINK.
3842 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3843 and PRAGMA_OACC_CLAUSE_LINK.
3844 (OACC_DECLARE_CLAUSE_MASK): New definition.
3845 (c_parser_oacc_declare): New function.
3846
9be4f715
MP
38472015-11-12 Marek Polacek <polacek@redhat.com>
3848
3849 PR c/67784
3850 * c-parser.c (c_parser_for_statement): Reclassify the token in
3851 a correct scope.
3852
e78bede6
MP
38532015-11-11 Marek Polacek <polacek@redhat.com>
3854
3855 PR c/68107
3856 PR c++/68266
3857 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3858 checking the size of an array.
3859
69f293c9
AM
38602015-11-11 Andrew MacLeod <amacleod@redhat.com>
3861
3862 * c-array-notation.c: Remove unused header files.
3863 * c-aux-info.c: Likewise.
3864 * c-convert.c: Likewise.
3865 * c-decl.c: Likewise.
3866 * c-errors.c: Likewise.
3867 * c-lang.c: Likewise.
3868 * c-objc-common.c: Likewise.
3869 * c-parser.c: Likewise.
3870 * c-typeck.c: Likewise.
3871 * gccspec.c: Likewise.
3872
3a40d81d
NS
38732015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3874 Cesar Philippidis <cesar@codesourcery.com>
3875 James Norris <jnorris@codesourcery.com>
3876 Julian Brown <julian@codesourcery.com>
3877 Nathan Sidwell <nathan@codesourcery.com>
3878
3a40d81d
NS
3879 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3880 routine arg.
3881 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3882 (c_parser_pragma): Parse 'acc routine'.
3883 (OACC_ROUTINE_CLAUSE_MARK): Define.
3884 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3885
fc402eec
AA
38862015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3887
3888 PR debug/67192
3889 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3890 location of the backward-goto to the start of the loop body.
3891
f6b0b3db
AA
38922015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3893
3894 PR debug/67192
3895 * c-parser.c (c_parser_while_statement): Finish the loop before
3896 parsing ahead for misleading indentation.
3897 (c_parser_for_statement): Likewise.
3898
ee45a32d
EB
38992015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3900
3901 * c-decl.c (finish_struct): If the structure has reverse storage
3902 order, rewrite the type of array fields with scalar component. Call
3903 maybe_apply_pragma_scalar_storage_order on entry.
3904 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3905 errors on bit-fields and reverse SSO here and not...
3906 (c_mark_addressable): ...here.
3907 (output_init_element): Adjust call to initializer_constant_valid_p.
3908 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3909
8a645150
DM
39102015-11-06 David Malcolm <dmalcolm@redhat.com>
3911
3912 * c-decl.c (warn_defaults_to): Update for change in signature
3913 of diagnostic_set_info.
3914 * c-errors.c (pedwarn_c99): Likewise.
3915 (pedwarn_c90): Likewise.
3916 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3917 for textinfo::set_location.
3918
7a5e4956
CP
39192015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3920 Thomas Schwinge <thomas@codesourcery.com>
3921 James Norris <jnorris@codesourcery.com>
3922
3923 * c-parser.c (c_parser_omp_clause_name): Add support for
3924 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3925 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3926 default(none) in OpenACC.
3927 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3928 arguments.
3929 (c_parser_oacc_clause_tile): New function.
3930 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3931 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3932 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3933 TILE}.
3934 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3935 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3936 FIRSTPRIVATE}.
3937 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3938 (c_parser_oacc_update): Update the error message for missing clauses.
3939 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3940 and OMP_CLAUSE_INDEPENDENT.
3941
bfcfbfa0
MP
39422015-11-05 Marek Polacek <polacek@redhat.com>
3943
3944 PR c/68090
3945 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3946 deal with pre-evaluation on invalid types.
3947
e01d41e5
JJ
39482015-11-05 Jakub Jelinek <jakub@redhat.com>
3949 Ilya Verbin <ilya.verbin@intel.com>
3950
3951 * c-parser.c: Include context.h and gimple-expr.h.
3952 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3953 monotonic together with nonmonotonic.
3954 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3955 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
3956 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
3957 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
3958 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
3959 expressions on combined target teams before the target.
3960 (c_parser_omp_declare_target): If decl has "omp declare target" or
3961 "omp declare target link" attribute, and cgraph or varpool node already
3962 exists, then set corresponding flags. Call c_finish_omp_clauses
3963 in the parenthesized extended-list syntax case.
3964 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
3965 declare target.
3966 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
3967 on OMP_CLAUSE_REDUCTION array sections.
3968 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
3969 into the constant offset, or for variable low-bound using
3970 POINTER_PLUS_EXPR. For structure element based array sections use
3971 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
3972 (c_finish_omp_clauses): Drop generic_field_head, structure
3973 elements are now always mapped even as array section bases,
3974 diagnose same var in data sharing and mapping clauses. Diagnose if
3975 linear step on declare simd is neither a constant nor a uniform
3976 parameter. Look through POINTER_PLUS_EXPR for array section
3977 reductions. Diagnose the same var or function appearing multiple
3978 times on the same directive. Fix up wording for the to clause if t
3979 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
3980 modifier on kinds other than dynamic or guided or nonmonotonic
3981 modifier together with ordered clause.
3982
4bf9e5a8
TS
39832015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3984 Chung-Lin Tang <cltang@codesourcery.com>
3985
3986 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
3987
2adfab87
AM
39882015-10-29 Andrew MacLeod <amacleod@redhat.com>
3989
3990 * c-array-notation.c: Reorder #include's and remove duplicates.
3991 * c-aux-info.c: Likewise.
3992 * c-convert.c: Likewise.
3993 * c-decl.c: Likewise.
3994 * c-errors.c: Likewise.
3995 * c-lang.c: Likewise.
3996 * c-objc-common.c: Likewise.
3997 * c-parser.c: Likewise.
3998 * c-typeck.c: Likewise.
3999
e922069e
JW
40002015-10-26 Jim Wilson <jim.wilson@linaro.org>
4001
4002 PR debug/66068
4003 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4004 after calling build_qualified_type.
4005
765dd391
CP
40062015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4007 Thomas Schwinge <thomas@codesourcery.com>
4008 James Norris <jnorris@codesourcery.com>
4009 Joseph Myers <joseph@codesourcery.com>
4010 Julian Brown <julian@codesourcery.com>
4011 Bernd Schmidt <bschmidt@redhat.com>
4012
4013 * c-parser.c (c_parser_oacc_shape_clause): New.
4014 (c_parser_oacc_simple_clause): New.
4015 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4016 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4017
88bae6f4
TS
40182015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4019 James Norris <jnorris@codesourcery.com>
4020 Cesar Philippidis <cesar@codesourcery.com>
4021
4022 PR c/64765
4023 PR c/64880
4024 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4025 parameters, and handle these. Adjust all users.
4026 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4027 into...
4028 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4029 all users.
4030 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4031 declare functions.
4032 (c_finish_omp_construct): Declare function.
4033 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4034 Merge functions into...
4035 (c_finish_omp_construct): ... this new function.
4036
a8fc2579
RB
40372015-10-22 Richard Biener <rguenther@suse.de>
4038
4039 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4040 before folding a MINUS_EXPR.
4041
e9122ef6
MP
40422015-10-21 Marek Polacek <polacek@redhat.com>
4043
4044 PR c/68024
4045 * c-decl.c (start_function): Warn about vararg functions without
4046 a prototype.
4047
9f47c7e5
IE
40482015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4049
4050 * c-typeck.c (build_conditional_expr): Use boolean vector
4051 type for vector comparison.
4052 (build_vec_cmp): New.
4053 (build_binary_op): Use build_vec_cmp for comparison.
4054
fa60eeb9
MP
40552015-10-20 Marek Polacek <polacek@redhat.com>
4056
4057 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4058
2c7020eb
MP
40592015-10-20 Marek Polacek <polacek@redhat.com>
4060
4061 PR c/67964
4062 * c-parser.c (c_parser_attributes): Break out of the loop if the
4063 token after an attribute isn't a comma.
4064
d9a6bd32
JJ
40652015-10-13 Jakub Jelinek <jakub@redhat.com>
4066 Aldy Hernandez <aldyh@redhat.com>
4067
4068 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4069 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4070 (c_parser_omp_variable_list): Handle structure elements for
4071 map, to and from clauses. Handle array sections in reduction
4072 clause. Formatting fixes.
4073 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4074 if clause modifiers.
4075 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4076 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4077 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4078 c_parser_omp_clause_is_device_ptr): New functions.
4079 (c_parser_omp_clause_ordered): Parse optional parameter.
4080 (c_parser_omp_clause_reduction): Handle array reductions.
4081 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4082 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4083 functions.
4084 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4085 (c_parser_omp_clause_depend_sink): New function.
4086 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4087 (c_parser_omp_clause_map): Parse release/delete map kinds and
4088 optional always modifier.
4089 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4090 and c_finish_omp_clauses callers.
4091 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4092 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4093 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4094 (OMP_CRITICAL_CLAUSE_MASK): Define.
4095 (c_parser_omp_critical): Parse critical clauses.
4096 (c_parser_omp_for_loop): Handle doacross loops, adjust
4097 c_finish_omp_for and c_finish_omp_clauses callers.
4098 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4099 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4100 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4101 (c_parser_omp_for): Disallow ordered clause when combined with
4102 distribute. Disallow linear clause when combined with distribute
4103 and not combined with simd.
4104 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4105 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4106 parse clauses and if depend clause is found, don't parse a body.
4107 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4108 Allow target parallel without for after it.
4109 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4110 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4111 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4112 invalid kinds.
4113 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4114 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4115 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4116 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4117 functions.
4118 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4119 defaultmap and is_device_ptr clauses.
4120 (c_parser_omp_target): Parse target parallel and target simd. Set
4121 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4122 and target exit data. Diagnose invalid map kinds.
4123 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4124 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4125 construct.
4126 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4127 &omp_priv.
4128 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4129 (c_parser_omp_taskloop): New function.
4130 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4131 handle PRAGMA_OMP_TASKLOOP.
4132 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4133 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4134 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4135 Add IS_OMP argument, handle structure element bases, diagnose
4136 bitfields, pass IS_OMP recursively, diagnose known zero length
4137 array sections in depend clauses, handle array sections in reduction
4138 clause, diagnose negative length even for pointers.
4139 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4140 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4141 array sections in reduction clause, set
4142 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4143 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4144 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4145 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4146
21ba0cea
MP
41472015-10-06 Marek Polacek <polacek@redhat.com>
4148
4149 * c-parser.c (c_parser_statement_after_labels): Use
4150 protected_set_expr_location.
4151 (c_parser_omp_clause_num_gangs): Likewise.
4152 (c_parser_omp_clause_num_threads): Likewise.
4153 (c_parser_omp_clause_num_workers): Likewise.
4154 (c_parser_omp_clause_vector_length): Likewise.
4155 (c_parser_omp_clause_num_teams): Likewise.
4156 (c_parser_omp_clause_thread_limit): Likewise.
4157 * c-typeck.c (build_c_cast): Likewise.
4158 (c_cast_expr): Likewise.
4159
624d31fe
RS
41602015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4161
4162 * c-typeck.c (c_tree_equal): Use real_equal instead of
4163 REAL_VALUES_EQUAL.
4164
b8fd7909
JM
41652015-10-04 Jason Merrill <jason@redhat.com>
4166
4167 * c-parser.c (c_lex_one_token): Handle @synchronized.
4168 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4169 can change whether the function is transaction_safe.
4170
1c7485af
MP
41712015-10-02 Marek Polacek <polacek@redhat.com>
4172
4173 PR c/67730
4174 * c-typeck.c (convert_for_assignment): Use the expansion point
4175 location throughout.
4176
3e3b8d63
MP
41772015-10-02 Marek Polacek <polacek@redhat.com>
4178
4179 PR c/64249
4180 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4181 and pass it down to c_parser_if_statement.
4182 (c_parser_else_body): Add CHAIN parameter and pass it down to
4183 c_parser_statement_after_labels.
4184 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4185 duplicated if-else-if conditions.
4186
aabef2de
MP
41872015-10-01 Marek Polacek <polacek@redhat.com>
4188
4189 * c-typeck.c (convert_for_assignment): Improve commentary.
4190
de8ddd5f
MP
41912015-09-30 Marek Polacek <polacek@redhat.com>
4192
4193 PR c/67730
4194 * c-typeck.c (c_finish_return): Use the expansion point location for
4195 certain "return with value" warnings.
4196
c4914de6
MLI
41972015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4198
4199 * c-parser.c (pragma_lex): Add loc argument.
4200
0e36f5c7
MP
42012015-09-15 Marek Polacek <polacek@redhat.com>
4202
4203 PR c/67580
4204 * c-decl.c (tag_exists_p): New function.
4205 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4206 struct/union/enum keywords are missing.
4207 * c-tree.h (tag_exists_p): Declare.
4208
2f3bb934
MP
42092015-09-15 Marek Polacek <polacek@redhat.com>
4210
4211 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4212 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4213 Return NULL_TREE instead of 0.
4214 (lookup_name): Return NULL_TREE instead of 0.
4215 (lookup_name_in_scope): Likewise.
4216 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4217 (parser_xref_tag): Use false instead of 0.
4218 (start_struct): Use true instead of 1.
4219 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4220
aa256c4a
MP
42212015-09-14 Marek Polacek <polacek@redhat.com>
4222
4223 * c-typeck.c (set_nonincremental_init_from_string): Use
4224 HOST_WIDE_INT_M1U when shifting a negative value.
4225
dbb68221
MW
42262015-09-09 Mark Wielaard <mjw@redhat.com>
4227
4228 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4229 parm against NULL.
4230
a8a098ac
JJ
42312015-09-10 Jakub Jelinek <jakub@redhat.com>
4232
4233 PR c/67502
4234 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4235 into OMP_FOR_PRE_BODY rather than before the loop.
4236
f4b189d5
JJ
42372015-09-09 Jakub Jelinek <jakub@redhat.com>
4238
0bb99c11
JJ
4239 PR c/67501
4240 * c-parser.c (c_parser_oacc_all_clauses,
4241 c_parser_omp_all_clauses): Remove invalid clause from
4242 list of clauses even if parser->error is set.
4243
fce5e5e3
JJ
4244 PR c/67500
4245 * c-parser.c (c_parser_omp_clause_aligned,
4246 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4247 test for errors.
4248 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4249 error_mark_node.
4250
f4b189d5
JJ
4251 PR c/67495
4252 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4253 instead of c_parser_unary_expression. If the result is !lvalue_p,
4254 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4255
b2aaf235
MP
42562015-09-04 Marek Polacek <polacek@redhat.com>
4257
4258 PR sanitizer/67279
4259 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4260
1807ffc1
MS
42612015-09-03 Martin Sebor <msebor@redhat.com>
4262
4263 PR c/66516
8b652e65
JJ
4264 * c-typeck.c (convert_arguments, parser_build_unary_op,
4265 build_conditional_expr, c_cast_expr, convert_for_assignment,
4266 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4267 reject_gcc_builtin.
4268 (c_decl_implicit): Define.
4269
d04ff417
MP
42702015-09-02 Marek Polacek <polacek@redhat.com>
4271
4272 PR c/67432
4273 * c-parser.c (c_parser_enum_specifier): Give a better error for
4274 an empty enum.
4275
a79683d5
TS
42762015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4277
4278 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4279
191a6b94
MP
42802015-08-12 Marek Polacek <polacek@redhat.com>
4281
4282 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4283 LOC to it.
4284
420a9d9b
MP
42852015-08-03 Marek Polacek <polacek@redhat.com>
4286
4287 PR c/67088
4288 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4289 Use it.
4290 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4291
992118a1
PP
42922015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4293
4294 * c-parser.c (c_parser_if_body): Take token_indent_info
4295 argument. Call warn_for_misleading_indentation even when the
4296 body is a semicolon. Extract token_indent_infos corresponding
4297 to the guard, body and next tokens. Adjust call to
4298 warn_for_misleading_indentation accordingly.
4299 (c_parser_else_body): Likewise.
4300 (c_parser_if_statement): Likewise.
4301 (c_parser_while_statement): Likewise.
4302 (c_parser_for_statement): Likewise.
4303
46308474
LFSM
43042015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4305 Manuel López-Ibáñez <manu@gcc.gnu.org>
4306
4307 * c-decl.c (get_parm_info): Remove static var. Update warning
4308 message.
4309
05b28fd6
MP
43102015-07-27 Marek Polacek <polacek@redhat.com>
4311
4312 PR c++/66555
4313 PR c/54979
4314 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4315
451b5e48
MP
43162015-07-20 Marek Polacek <polacek@redhat.com>
4317
4318 PR c++/55095
4319 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4320 (build_binary_op): Warn about left shift overflows.
4321
1916bcb5
AM
43222015-07-09 Andrew MacLeod <amacleod@redhat.com>
4323
4324 * c-array-notation.c: Adjust includes for flags.h changes.
4325 * c-objc-common.c: Likewise.
4326
c7131fb2
AM
43272015-07-07 Andrew MacLeod <amacleod@redhat.com>
4328
4329 * c-array-notation.c: Adjust includes.
4330 * c-aux-info.c: Likewise.
4331 * c-convert.c: Likewise.
4332 * c-decl.c: Likewise.
4333 * c-errors.c: Likewise.
4334 * c-lang.c: Likewise.
4335 * c-objc-common.c: Likewise.
4336 * c-parser.c: Likewise.
4337 * c-typeck.c: Likewise.
4338
da2e71c9
MLI
43392015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4340
4341 PR fortran/66605
4342 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4343
b155cfd9
MP
43442015-06-29 Marek Polacek <polacek@redhat.com>
4345
4346 PR c/66322
4347 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4348 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4349 about -Wswitch-bool here.
4350 (do_case): Update c_add_case_label call.
4351 (c_finish_case): Update c_do_switch_warnings call.
4352
31521951
MP
43532015-06-27 Marek Polacek <polacek@redhat.com>
4354
4355 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4356
22d03525
MP
43572015-06-26 Marek Polacek <polacek@redhat.com>
4358
4359 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4360 INDIRECT_REF_P.
4361 * c-typeck.c (array_to_pointer_conversion): Likewise.
4362 (build_unary_op): Likewise.
4363 (c_finish_return): Likewise.
4364
f0889939
AM
43652015-06-25 Andrew MacLeod <amacleod@redhat.com>
4366
4367 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4368 * c-parser.c: Likewise.
4369
8d67ee55
RS
43702015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4371
4372 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4373 instead of pointer_hash.
4374 (detect_field_duplicates): Likewise.
4375
0ae9bd27
MP
43762015-06-25 Marek Polacek <polacek@redhat.com>
4377
4378 * c-array-notation.c: Use VAR_P throughout.
4379 * c-decl.c: Likewise.
4380 * c-objc-common.c: Likewise.
4381 * c-parser.c: Likewise.
4382 * c-typeck.c: Likewise.
4383
62f9079a
MP
43842015-06-25 Marek Polacek <polacek@redhat.com>
4385
4386 * c-decl.c: Use is_global_var throughout.
4387 * c-parser.c: Likewise.
4388 * c-typeck.c: Likewise.
4389
abb226c9
AM
43902015-06-17 Andrew MacLeod <amacleod@redhat.com>
4391
4392 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4393 * c-aux-info.c: Likewise.
4394 * c-convert.c: Likewise.
4395 * c-decl.c: Likewise.
4396 * c-errors.c: Likewise.
4397 * c-lang.c: Likewise.
4398 * c-objc-common.c: Likewise.
4399 * c-parser.c: Likewise.
4400 * c-typeck.c: Likewise.
4401
8cbababc
JH
44022015-06-11 Jan Hubicka <hubicka@ucw.cz>
4403
4404 PR middle-end/66325
4405 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4406 variants.
4407
a0349665
PMR
44082015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4409
4410 * c-decl.c (pop_scope): Register the main translation unit
4411 through the new debug hook.
4412
13fdf2e2
AM
44132015-06-08 Andrew MacLeod <amacleod@redhat.com>
4414
4415 * c-array-notation.c : Adjust include files.
4416 * c-aux-info.c : Likewise.
4417 * c-convert.c : Likewise.
4418 * c-decl.c : Likewise.
4419 * c-errors.c : Likewise.
4420 * c-lang.c : Likewise.
4421 * c-lang.h : Likewise.
4422 * c-objc-common.c : Likewise.
4423 * c-parser.c : Likewise.
4424 * c-typeck.c : Likewise.
4425
d7438551
AH
44262015-06-05 Aldy Hernandez <aldyh@redhat.com>
4427
4428 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4429 immediately clobber it.
4430 (c_write_global_declarations_1): Remove call to
4431 check_global_declaration_1.
4432 (c_write_global_declarations_2): Remove.
4433 (c_write_final_cleanups): Rename from c_write_global_declarations.
4434 Remove call to finalize_compilation_unit.
4435 Remove calls to debugging hooks.
4436 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4437 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4438 * c-tree.h: Remove c_write_global_declarations.
4439
ecb9f223
AM
44402015-06-04 Andrew MacLeod <amacleod@redhat.com>
4441
4442 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4443 * c-aux-info.c: Likewise.
4444 * c-convert.c: Likewise.
4445 * c-decl.c: Likewise.
4446 * c-errors.c: Likewise.
4447 * c-lang.c: Likewise.
4448 * c-objc-common.c: Likewise.
4449 * c-parser.c: Likewise.
4450 * c-typeck.c: Likewise.
4451
9482b620
MP
44522015-06-04 Marek Polacek <polacek@redhat.com>
4453
4454 PR c/66341
4455 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4456 it is a lvalue.
4457
bc51ace3
PK
44582015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4459
4460 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4461 Warn for empty struct.
4462 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4463
ea5b45b6
AT
44642015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4465
4466 * c-decl.c (start_function): Call plugin before parsing.
4467 (finish_function): Call plugin after parsing.
4468
c2d47482
PK
44692015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4470
4471 PR c/49551
4472 * c-decl.c (merge_decls): Merge DECL_COMMON.
4473
a95492ab
JW
44742015-05-22 Jim Wilson <jim.wilson@linaro.org>
4475
4476 * Make-lang.in (check_gcc_pallelize): Define.
4477
fd5c817a
MP
44782015-05-22 Marek Polacek <polacek@redhat.com>
4479
4480 PR c/47043
4481 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4482 attributes.
4483
c7b70a3c
MP
44842015-05-21 Marek Polacek <polacek@redhat.com>
4485
4486 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4487 DECL_BUILT_IN.
4488
21b634ae
MP
44892015-05-20 Marek Polacek <polacek@redhat.com>
4490
4491 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4492 * c-typeck.c: Likewise.
4493
296a8c2f
MP
44942015-05-19 Marek Polacek <polacek@redhat.com>
4495
4496 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4497
41b37d5e
JJ
44982015-05-19 Jakub Jelinek <jakub@redhat.com>
4499
4500 PR middle-end/66199
4501 * c-parser.c (c_parser_omp_for_loop): Don't add
4502 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4503 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4504 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4505 constructs.
4506
fab27f52
MM
45072015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4508
4509 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4510 swaps.
fab27f52 4511
40de31cf
MLI
45122015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4513
4514 PR fortran/44054
4515 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4516 accessor function.
4517
3aa3c9fc
MP
45182015-05-14 Marek Polacek <polacek@redhat.com>
4519
4520 PR c/66066
4521 PR c/66127
4522 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4523 rather than with 0.
4524
c3388e62
DM
45252015-05-12 David Malcolm <dmalcolm@redhat.com>
4526
4527 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4528 to add a call to warn_for_misleading_indentation.
4529 (c_parser_else_body): Likewise, adding param "else_loc".
4530 (c_parser_if_statement): Check for misleading indentation.
4531 (c_parser_while_statement): Likewise.
4532 (c_parser_for_statement): Likewise.
4533
755e528f
MP
45342015-05-08 Marek Polacek <polacek@redhat.com>
4535
4536 PR c/64918
4537 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4538 (output_init_element): Likewise.
4539
0173bd2a
MP
45402015-05-07 Marek Polacek <polacek@redhat.com>
4541
4542 PR c/65179
4543 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4544 value.
4545
9babc352
MP
45462015-04-30 Marek Polacek <polacek@redhat.com>
4547
4548 * c-typeck.c (set_init_label): Call error_at instead of error and
4549 pass LOC to it.
4550
ac9f18db
MP
4551 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4552 the type of a decl.
4553
ec3fba51
MP
4554 * c-typeck.c (c_build_va_arg): Clarify the error message.
4555
b811915d
TS
45562015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4557
4558 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4559 OMP_STANDALONE_CLAUSES.
4560
f3075008
MP
45612015-04-28 Marek Polacek <polacek@redhat.com>
4562
4563 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4564
4e81b788
MP
45652015-04-28 Marek Polacek <polacek@redhat.com>
4566
4567 PR c/65901
4568 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4569
6c1db78e
MP
45702015-04-25 Marek Polacek <polacek@redhat.com>
4571
4572 PR c/52085
4573 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4574 attribute.
4575
5c4abbb8
MP
45762015-04-23 Marek Polacek <polacek@redhat.com>
4577
4578 PR c/65345
4579 * c-decl.c (set_labels_context_r): New function.
4580 (store_parm_decls): Call it via walk_tree_without_duplicates.
4581 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4582 instead of create_tmp_var. Build TARGET_EXPR instead of
4583 COMPOUND_EXPR.
4584 (build_atomic_assign): Use create_tmp_var_raw instead of
4585 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4586
06aca1d5
IV
45872015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4588
4589 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4590 (c_parser_omp_target_update): Add missed %> to error_at ().
4591
8fba1830
BRF
45922015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4593
4594 PR target/55143
4595 * c-decl.c (c_default_pointer_mode): Remove definition.
4596 * c-tree.h (c_default_pointer_mode): Remove declaration.
4597
62021f64
TB
45982015-03-27 Tobias Burnus <burnus@net-b.de>
4599
4600 PR c/65586
4601 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4602 error out.
4603 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4604 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4605 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4606
9b65e171
JJ
46072015-03-19 Jakub Jelinek <jakub@redhat.com>
4608
4609 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4610 attribute for DECL_EXTERNAL VAR_DECLs.
4611
17958621
JJ
46122015-03-11 Jakub Jelinek <jakub@redhat.com>
4613
4614 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4615 argument.
4616
7ccb1a11
JJ
46172015-03-10 Jakub Jelinek <jakub@redhat.com>
4618
4619 PR c/65120
4620 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4621 before preparing arguments to warn_logical_not_parentheses.
4622
01177669
JJ
46232015-03-09 Jakub Jelinek <jakub@redhat.com>
4624
4625 PR c/65120
4626 * c-typeck.c (parser_build_binary_op): Don't warn for
4627 !!x == y or !b == y where b is _Bool.
4628
802ac282
MP
46292015-03-09 Marek Polacek <polacek@redhat.com>
4630
4631 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4632 * c-decl.c (grokdeclarator): Likewise.
4633 * c-typeck.c (build_binary_op): Likewise.
4634
e5165b60
MP
46352015-02-27 Marek Polacek <polacek@redhat.com>
4636
4637 PR c/65228
4638 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4639
065d214c
MP
46402015-02-14 Marek Polacek <polacek@redhat.com>
4641
4642 PR c/64768
4643 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4644 declared through a typedef name.
4645
e5d9235b
MP
46462015-02-13 Marek Polacek <polacek@redhat.com>
4647
4648 PR c/65050
4649 * c-decl.c (grokdeclarator): Print also the type when giving
4650 the error message about array's incomplete element type.
4651
fa01ffcc
JJ
46522015-02-11 Jakub Jelinek <jakub@redhat.com>
4653
4654 PR c/64824
4655 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4656 check in the POP macro.
4657
c3e38a03
MP
46582015-02-09 Marek Polacek <polacek@redhat.com>
4659
4660 PR c/64856
4661 * c-typeck.c (process_init_element): Don't always wrap
4662 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4663 initializing a range of elements.
4664
4886ec8e
JJ
46652015-02-04 Jakub Jelinek <jakub@redhat.com>
4666
4667 PR c/64824
4668 PR c/64868
4669 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4670
c3e38a03 46712015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4672
4673 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4674 processing enum declaration.
4675
7b33f0c8
MP
46762015-01-29 Marek Polacek <polacek@redhat.com>
4677
4678 PR c/64709
4679 * c-typeck.c (pop_init_level): If constructor_elements has
4680 exactly one element with integer_zerop value, set constructor_zeroinit
4681 to 1. Remove braces around warning_init call.
4682
dea63e49
JJ
46832015-01-27 Jakub Jelinek <jakub@redhat.com>
4684
4685 PR c/64766
4686 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4687 of FUNCTION_DECLs with error_mark_node.
4688
d38f7dce
JJ
46892015-01-26 Jakub Jelinek <jakub@redhat.com>
4690
4691 PR c/64778
4692 * c-typeck.c (convert_arguments): Return -1 if there are
4693 error_args, even if we've diagnosed too many arguments.
4694
cbf5d0e7
RB
46952015-01-21 Richard Biener <rguenther@suse.de>
4696
4697 PR middle-end/64313
4698 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4699 for builtins the user declared correctly.
4700
41dbbb37
TS
47012015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4702 Bernd Schmidt <bernds@codesourcery.com>
4703 Cesar Philippidis <cesar@codesourcery.com>
4704 James Norris <jnorris@codesourcery.com>
4705 Jakub Jelinek <jakub@redhat.com>
4706 Ilmir Usmanov <i.usmanov@samsung.com>
4707
4708 * c-parser.c: Include "gomp-constants.h".
4709 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4710 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4711 Use OMP_CLAUSE_SET_MAP_KIND.
4712 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4713 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4714 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4715 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4716 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4717 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4718 "copyout", "create", "delete", "deviceptr", "gang", "host",
4719 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4720 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4721 "present_or_create", "pcreate", "seq", "self", "vector",
4722 "vector_length", "wait", "worker".
4723 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4724 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4725 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4726 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4727 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4728 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4729 (c_parser_oacc_data_clause_deviceptr)
4730 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4731 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4732 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4733 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4734 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4735 (c_parser_oacc_parallel, c_parser_oacc_update)
4736 (c_parser_oacc_wait): New functions.
4737 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4738 (c_finish_oacc_data): New prototypes.
4739 * c-typeck.c: Include "gomp-constants.h".
4740 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4741 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4742 OMP_CLAUSE_SET_MAP_KIND.
4743 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4744 (c_finish_oacc_data): New functions.
4745 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4746 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4747 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4748 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4749 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4750 GOMP_MAP_FORCE_DEVICEPTR.
4751
adfac8df
JJ
47522015-01-09 Michael Collison <michael.collison@linaro.org>
4753
4754 * c-array-notation.c: Include hash-set.h, machmode.h,
4755 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4756 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4757 * c-aux-info.c: Ditto.
4758 * c-convert.c: Ditto.
4759 * c-decl.c: Ditto.
4760 * c-errors.c: Ditto.
4761 * c-lang.c: Dittoxs.
4762 * c-objc-common.c: Ditto.
4763 * c-parser.c: Ditto.
4764 * c-typeck.c: Include hash-set.h, machmode.h,
4765 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4766 fold-const.h, wide-int.h, inchash.h, real.h and
4767 fixed-value.h due to flattening of tree.h.
4768
2cc901dc
MP
47692015-01-07 Marek Polacek <polacek@redhat.com>
4770
4771 PR c/64417
4772 * c-typeck.c (process_init_element): Disallow initialization of
4773 a flexible array member with a string constant if the structure
4774 is in an array.
4775
5624e564
JJ
47762015-01-05 Jakub Jelinek <jakub@redhat.com>
4777
e5341100
JJ
4778 PR sanitizer/64344
4779 * c-typeck.c (convert_for_assignment, c_finish_return): For
4780 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4781 types also set in_late_binary_op around convert call.
4782 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4783 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4784 result on expr as last argument to ubsan_instrument_float_cast,
4785 if in_late_binary_op, don't use c_save_expr but save_expr.
4786
5624e564
JJ
4787 Update copyright years.
4788
5bd012f8
MP
47892015-01-05 Marek Polacek <polacek@redhat.com>
4790
4791 PR c/64423
4792 * c-typeck.c (build_array_ref): Pass loc down to
4793 warn_array_subscript_with_type_char.
4794
3f8257db 47952014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4796
4797 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4798 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4799 element type.
8e745a17 4800 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4801 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4802 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4803 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4804 to PEDWARN_FOR_QUALIFIERS.
768952be 4805
8f94a8c4
JJ
48062014-12-17 Jakub Jelinek <jakub@redhat.com>
4807
4808 PR sanitizer/64289
4809 * c-convert.c: Include ubsan.h.
4810 (convert): For real -> integral casts and
4811 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4812 instead instrument the float cast directly.
4813
b731b390
JJ
48142014-11-29 Jakub Jelinek <jakub@redhat.com>
4815
4816 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4817 c_finish_stmt_expr): Remove NULL last argument from
4818 create_tmp_var_raw and create_tmp_var calls.
4819 * c-array-notation.c (fix_builtin_array_notation_fn,
4820 build_array_notation_expr, fix_conditional_array_notations_1,
4821 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4822
541e35a6
MP
48232014-11-28 Marek Polacek <polacek@redhat.com>
4824
4825 PR c/63862
4826 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4827 convert the right operand to integer type.
4828
b286be94
MP
48292014-11-25 Marek Polacek <polacek@redhat.com>
4830
4831 PR c/63877
4832 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4833 for inline functions.
4834
aa7da51a
JJ
48352014-11-21 Jakub Jelinek <jakub@redhat.com>
4836
4837 PR target/63764
4838 * c-typeck.c (build_array_ref): Adjust
4839 convert_vector_to_pointer_for_subscript caller. If it returns true,
4840 call non_lvalue_loc on the result.
4841
d876207f
RB
48422014-11-11 Richard Biener <rguenther@suse.de>
4843
4844 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4845 to true.
4846
e5e44252
AK
48472014-11-10 Andi Kleen <ak@linux.intel.com>
4848
4849 PR c/60804
4850 * c-parser.c (c_parser_statement_after_labels): Call
4851 check_no_cilk.
4852 (c_parser_if_statement): Dito.
4853 (c_parser_switch_statement): Dito.
4854 (c_parser_while_statement): Dito.
4855 (c_parser_do_statement): Dito.
4856 (c_parser_for_statement): Dito.
4857 * c-typeck.c (c_finish_loop): Dito.
4858
13c21655
PC
48592014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4860
4861 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4862 OPT_Wshift_count_overflow in the warnings.
4863
2d51fcef
MP
48642014-10-30 Marek Polacek <polacek@redhat.com>
4865
4866 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4867 print the stripped version as well, if they're not the same.
4868
ef4bddc2
RS
48692014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4870
4871 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4872 machine_mode.
4873
c582198b
AM
48742014-10-28 Andrew MacLeod <amacleod@redhat.com>
4875
4876 * c-decl.c: Adjust include files.
4877 * c-parser.c: Ditto.
4878
ddc8de03
PM
48792014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4880 Tom Tromey <tromey@redhat.com>
4881
4882 * c-tree.h (enum c_oracle_request): New.
4883 (c_binding_oracle_function): New typedef.
4884 (c_binding_oracle, c_pushtag, c_bind): Declare.
4885 * c-decl.c (c_binding_oracle): New global.
4886 (I_SYMBOL_CHECKED): New macro.
4887 (i_symbol_binding): New function.
4888 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4889 (I_TAG_CHECKED): New macro.
4890 (i_tag_binding): New function.
4891 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4892 (I_LABEL_CHECKED): New macro.
4893 (i_label_binding): New function.
4894 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4895 (c_print_identifier): Save and restore c_binding_oracle.
4896 (c_pushtag, c_bind): New functions.
4897
60393bbc
AM
48982014-10-27 Andrew MacLeod <amacleod@redhat.com>
4899
4900 * c-typeck.c: Adjust include files.
4901
d723bb7c
MLI
49022014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4903
4904 PR c++/53061
4905 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4906 initialization here...
4907 (c_initialize_diagnostics): ... but here. Set defaults after
4908 building pretty-printer.
4909
1bc5a451
MP
49102014-10-23 Marek Polacek <polacek@redhat.com>
4911
4912 PR c/63626
4913 * c-decl.c (pop_scope): Don't print warning in external_scope.
4914
4435bb92
MP
49152014-10-19 Marek Polacek <polacek@redhat.com>
4916
4917 PR c/63567
4918 * c-typeck.c (output_init_element): Allow initializing objects with
4919 static storage duration with compound literals even in C99 and add
4920 pedwarn for it.
4921
7278465e
MP
49222014-10-17 Marek Polacek <polacek@redhat.com>
4923
4924 PR c/63567
4925 * c-typeck.c (digest_init): Allow initializing objects with static
4926 storage duration with compound literals even in C99 and add pedwarn
4927 for it.
4928
d9b7be2e
MP
49292014-10-17 Marek Polacek <polacek@redhat.com>
4930
4931 PR c/63543
4932 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4933 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4934 error multiple times. Print the type.
4935
f406ae1f
MP
49362014-10-17 Marek Polacek <polacek@redhat.com>
4937
4938 PR c/63549
4939 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4940 type.
4941
92574c7c
MP
49422014-10-17 Marek Polacek <polacek@redhat.com>
4943
4944 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4945 (start_function): Use OPT_Wimplicit_int instead of 0.
4946 (store_parm_decls_oldstyle): Likewise.
4947
1bc4a978
MT
49482014-10-17 Alan Modra <amodra@gmail.com>
4949
4950 PR middle-end/61848
4951 * c-decl.c (merge_decls): Don't merge section name or tls model
4952 to newdecl symtab node, instead merge to olddecl. Override
4953 existing olddecl section name. Set tls_model for all thread-local
4954 vars, not just OMP thread-private ones. Remove incorrect comment.
4955
83685514
AM
49562014-10-16 Andrew MacLeod <amacleod@redhat.com>
4957
4958 * c-decl.c: Adjust include files.
4959
78a7c317
DD
49602014-10-14 DJ Delorie <dj@redhat.com>
4961
4962 * c-parser.c (c_parse_init): Add RID entries for each __intN.
4963 (c_token_starts_typename): Check all __intN, not just __int128.
4964 (c_token_starts_declspecs): Likewise.
4965 (c_parser_declspecs): Likewise.
4966 (c_parser_attribute_any_word): Likewise.
4967 (c_parser_objc_selector): Likewise.
4968 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
4969 (struct c_declspecs): Add int_n_idx field to record *which* __intN
4970 is specified.
4971 * c-decl.c (declspecs_add_type): Check for all __intN, not just
4972 __int128.
4973 (finish_declspecs): Likewise.
4974
74d98c1e
AB
49752014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
4976
8e745a17 4977 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 4978 the duplicate code.
8e745a17 4979 (c_parser_statement): Call the new function.
74d98c1e 4980
84937de2
MP
49812014-10-09 Marek Polacek <polacek@redhat.com>
4982
4983 PR c/63480
4984 * c-typeck.c (pop_init_level): Don't warn about initializing
4985 with { }.
4986
0382aaa0
MP
49872014-10-07 Marek Polacek <polacek@redhat.com>
4988
4989 PR c/59717
4990 * c-decl.c (header_for_builtin_fn): New function.
4991 (implicitly_declare): Suggest which header to include.
4992
7a0ca710
MP
49932014-10-07 Marek Polacek <polacek@redhat.com>
4994
4995 * c-convert.c (convert): Use error_operand_p.
4996 * c-typeck.c (require_complete_type): Likewise.
4997 (really_atomic_lvalue): Likewise.
4998 (digest_init): Likewise.
4999 (handle_omp_array_sections_1): Likewise.
5000
6bc8a126
MP
50012014-10-03 Marek Polacek <polacek@redhat.com>
5002
5003 PR c/63453
5004 * c-decl.c (pop_scope): Don't warn about "inline function declared
5005 but never defined" for functions marked with gnu_inline attribute.
5006
d90c0a59
JJ
50072014-09-25 Jakub Jelinek <jakub@redhat.com>
5008
5009 PR c++/63249
5010 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5011 on low_bound and length.
5012
083e891e
MP
50132014-09-24 Marek Polacek <polacek@redhat.com>
5014
5015 PR c/61405
5016 PR c/53874
5017 * c-parser.c: Don't define CPP_KEYWORD.
5018 (c_parser_switch_statement): Pass original type to c_finish_case.
5019 * c-tree.h (c_finish_case): Update declaration.
5020 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5021 conditionally to c_do_switch_warnings.
5022
8d95fe25
MP
50232014-09-03 Marek Polacek <polacek@redhat.com>
5024
5025 PR c/62024
5026 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5027 conversions.
5028
9a771876
JJ
50292014-09-02 Jakub Jelinek <jakub@redhat.com>
5030 Balaji V. Iyer <balaji.v.iyer@intel.com>
5031 Igor Zamyatin <igor.zamyatin@intel.com>
5032
5033 * c-parser.c (c_parser_cilk_for): New function.
5034 (c_parser_cilk_grainsize): Likewise.
5035 (c_get_temp_regvar): Likewise.
5036 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5037 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5038 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5039 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5040 case.
5041
b7679d96
CG
50422014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5043
5044 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5045 with using HOST_WIDE_INT without truncation to 'int'
5046
59ea0364
MP
50472014-08-22 Marek Polacek <polacek@redhat.com>
5048
5049 PR c++/62199
5050 * c-typeck.c (parser_build_binary_op): Adjust call to
5051 warn_logical_not_parentheses.
5052
671a475e
IZ
50532014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5054
5055 PR other/62008
5056 * c-parser.c (c_parser_array_notation): Check for correct
5057 type of an array added.
5058
04159acf
MP
50592014-08-19 Marek Polacek <polacek@redhat.com>
5060
5061 PR c++/62153
5062 * c-typeck.c (build_binary_op): If either operand of a comparison
5063 is a boolean expression, call maybe_warn_bool_compare.
5064
c77935ee
PP
50652014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5066
5067 PR c/45584
5068 * c-typeck.c (build_c_cast): Do a conversion even when the
5069 TYPE_MAIN_VARIANTs are the same.
5070
35aff4fb
MP
50712014-08-19 Marek Polacek <polacek@redhat.com>
5072
5073 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5074 pedwarn_c99 instead of pedwarn.
5075 (grokfield): Likewise.
5076 (warn_defaults_to): New function.
5077 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5078 Unconditionally call pedwarn_c99 instead of pedwarn.
5079 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5080 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5081 check flag_isoc11 before.
5082 * c-errors.c (pedwarn_c99): Change the return type to bool.
5083 Handle -Wc99-c11-compat.
5084 * c-parser.c (disable_extension_diagnostics): Handle
5085 warn_c99_c11_compat.
5086 (restore_extension_diagnostics): Likewise.
5087 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5088 instead of pedwarn, don't check flag_isoc11 before.
5089 (c_parser_declspecs): Likewise.
5090 (c_parser_alignas_specifier): Likewise.
5091 (c_parser_alignof_expression): Likewise.
5092 (c_parser_generic_selection): Likewise.
5093 * c-tree.h (pedwarn_c99): Update declaration.
5094 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5095 of pedwarn_c99.
5096
177cce46
MP
50972014-08-19 Marek Polacek <polacek@redhat.com>
5098
5099 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5100 to pedwarn_c90.
5101 * c-errors.c: Include "opts.h".
5102 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5103 * c-parser.c (disable_extension_diagnostics): Handle negative value
5104 of warn_c90_c99_compat, too.
5105 (restore_extension_diagnostics): Likewise.
5106 (c_parser_compound_statement_nostart): Pass
5107 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5108
6dc99c33
MP
51092014-08-12 Marek Polacek <polacek@redhat.com>
5110
5111 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5112 Add pedwarn.
5113 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5114 Likewise.
5115 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5116
3f8257db 51172014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5118
5119 PR c/51849
5120 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5121 Call pedwarn_c90 instead of pedwarn.
5122 (check_bitfield_type_and_width): Likewise.
5123 (declspecs_add_qual): Likewise.
5124 (declspecs_add_type): Likewise.
5125 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5126 Adjust to only call pedwarn_c90.
5127 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5128 pedwarn_c90 instead of pedwarn.
5129 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5130 * c-parser.c (disable_extension_diagnostics): Handle
5131 warn_c90_c99_compat.
5132 (restore_extension_diagnostics): Likewise.
5133 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5134 pedwarn_c90 instead of pedwarn.
5135 (c_parser_initelt): Likewise.
5136 (c_parser_postfix_expression): Likewise.
5137 (c_parser_postfix_expression_after_paren_type): Likewise.
5138 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5139 * c-tree.h: Fix formatting.
5140 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5141 pedwarn_c90 instead of pedwarn.
5142
9f25a338
TS
51432014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5144
5145 * c-typeck.c: Remove include of pointer-set.h.
5146
044331a8
MP
51472014-08-07 Marek Polacek <polacek@redhat.com>
5148
5149 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5150
b787e7a2
TS
51512014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5152
5153 * c-typeck.c: Use hash_map instead of pointer_map.
5154
6e2830c3
TS
51552014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5156
5157 * c-decl.c: Use hash_set instead of pointer_set.
5158
a7ee52fb
IZ
51592014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5160
5161 PR middle-end/61455
5162 * c-array-notation.c (expand_array_notations): Handling
5163 of DECL_EXPR added.
5164
b4dfdc11
MG
51652014-07-31 Marc Glisse <marc.glisse@inria.fr>
5166
5167 PR c++/60517
5168 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5169 a local variable.
5170
976d5a22
TT
51712014-07-30 Tom Tromey <tromey@redhat.com>
5172
5173 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5174 field.
5175 (really_start_incremental_init, push_init_level): Initialize
5176 designator_depth.
5177 (pop_init_level): Set global designator_depth.
5178 (process_init_element): Check for designated_init attribute.
5179
30281de2
MP
51802014-07-20 Marek Polacek <polacek@redhat.com>
5181
5182 PR c/61852
5183 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5184 (implicitly_declare): Pass location to implicit_decl_warning.
5185
b108f48f
JJ
51862014-07-14 Jakub Jelinek <jakub@redhat.com>
5187
5188 PR middle-end/61294
5189 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5190 If non-NULL, call c_parser_check_literal_zero.
5191 (c_parser_check_literal_zero): New function.
5192 (c_parser_postfix_expression_after_primary): Adjust
5193 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5194
773ec47f
MP
51952014-07-06 Marek Polacek <polacek@redhat.com>
5196
5197 PR c/6940
5198 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5199 * c-tree.h (C_ARRAY_PARAMETER): Define.
5200 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5201 function parameter.
5202
22e1cf1c 52032014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5204 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5205
5206 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5207 releasing symbol.
5208
52ec0ea3
MP
52092014-07-01 Marek Polacek <polacek@redhat.com>
5210
5211 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5212 instead of 0 to WARN_FOR_ASSIGNMENT.
5213
d5c3d343
MP
52142014-07-01 Marek Polacek <polacek@redhat.com>
5215
5216 PR c/58286
5217 * c-typeck.c (convert_for_assignment): Pass
5218 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5219
6a7253a4
MP
52202014-06-30 Marek Polacek <polacek@redhat.com>
5221
5222 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5223 has no_sanitize_undefined attribute.
5224
5e88a8f4
IZ
52252014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5226
5227 PR middle-end/57541
5228 * c-array-notation.c (fix_builtin_array_notation_fn):
5229 Check for 0 arguments in builtin call. Check that bultin argument is
5230 correct.
5231 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5232 index.
5233
9698b078
SH
52342014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5235
5236 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5237 qualifiers in __auto_type for atomic types.
5238 (c_parser_typeof_specifier): Discard all type qualifiers in
5239 __typeof__ for atomic types.
5240
6e07c515
MP
52412014-06-25 Marek Polacek <polacek@redhat.com>
5242
5243 PR c/61162
5244 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5245 the return expression to c_finish_return.
5246
da6f124d
JJ
52472014-06-25 Jakub Jelinek <jakub@redhat.com>
5248
5249 * c-typeck.c (c_finish_omp_clauses): Make sure
5250 OMP_CLAUSE_LINEAR_STEP has correct type.
5251
c203e8a7
TS
52522014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5253
5254 * c-decl.c: Adjust.
5255
56ad0e38
JJ
52562014-06-24 Jakub Jelinek <jakub@redhat.com>
5257
5258 * c-parser.c (c_parser_omp_for_loop): For
5259 #pragma omp parallel for simd move lastprivate clause from parallel
5260 to for rather than simd.
5261
47c2554f
MP
52622014-06-23 Marek Polacek <polacek@redhat.com>
5263
5264 * c-typeck.c (parser_build_binary_op): Don't call
5265 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5266
56363ffd
JH
52672014-06-15 Jan Hubicka <hubicka@ucw.cz>
5268
5269 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5270 * c-decl.c (merge_decls): Likewise.
5271
d7ff7ae5
MP
52722014-06-09 Marek Polacek <polacek@redhat.com>
5273
5274 PR c/36446
5275 * c-typeck.c (error_init): Call inform instead of error_at.
5276 (pedwarn_init): Call inform instead of pedwarn.
5277 (warning_init): Call inform instead of warning_at.
5278
24d047a3
JH
52792014-06-07 Jan Hubicka <hubicka@ucw.cz>
5280
5281 * c-decl.c (merge_decls): Use set_decl_section_name.
5282 (duplicate_decls): Remove node if it exists.
5283
9bac5cbb
G
52842014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5285
5286 PR c/53119
5287 * c-typeck.c (push_init_level, process_init_element,
5288 pop_init_level): Correct check for zero initialization, move
5289 missing brace warning to respect zero initialization.
5290
8ffcdea8
MP
52912014-06-05 Marek Polacek <polacek@redhat.com>
5292
5293 PR c/56724
5294 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5295
742938c9
MP
52962014-06-05 Marek Polacek <polacek@redhat.com>
5297
5298 PR c/49706
5299 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5300 on the left hand side operand of a comparison.
742938c9 5301
6447c55d
MP
53022014-06-05 Marek Polacek <polacek@redhat.com>
5303
5304 PR c/48062
5305 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5306 Print note only if the warning was printed.
5307
9dc7743c
IZ
53082014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5309
5310 PR c/58942
5311 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5312 with a pointer.
5313
fedfecef
MP
53142014-06-03 Marek Polacek <polacek@redhat.com>
5315
5316 PR c/60439
5317 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5318 c_start_case.
5319 * c-tree.h (c_start_case): Update.
5320 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5321 switch condition has boolean value.
5322
9b2b7279
AM
53232014-06-02 Andrew MacLeod <amacleod@redhat.com>
5324
5325 * c-decl.c: Include builtins.h.
5326 * c-parser.c: Likewise.
5327
5c1bc275
MP
53282014-05-27 Marek Polacek <polacek@redhat.com>
5329
5330 PR c/56724
5331 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5332 error and warning calls to error_at and warning_at. Pass location of
5333 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5334 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5335 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5336
97563bc8
IZ
53372014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5338
5339 PR c/61191
5340 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5341 function parameters.
5342
aede2c10
JH
53432014-05-23 Jan Hubicka <hubicka@ucw.cz>
5344
5345 * c-decl.c (merge_decls): Preserve symtab node pointers.
5346 (duplicate_decls): Free new decl.
5347
edbba2ce
TS
53482014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5349
f3316c6d
TS
5350 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5351 initialization.
5352
edbba2ce
TS
5353 * c-parser.c (c_parser_omp_target): Return bool values.
5354
68c81f24
TS
53552014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5356
5357 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5358 num_teams_loc variable to num_thread_limit_loc.
5359
632f2871
RS
53602014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5361
5362 * c-array-notation.c (expand_array_notations): Use void_node
5363 instead of void_zero_node.
5364
766090c2
TS
53652014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5366
5367 * c-decl.c (finish_struct): Adjust.
5368 (finish_enum): Likewise.
5369 (bind): Adjust.
5370 (record_inline_static): Likewise.
5371 (push_scope): Likewise.
5372 (make_label): Likewise.
5373 (lookup_label_for_goto): Likewise.
5374 (finish_struct): Likewise.
5375 (finish_enum): Likewise.
5376 (store_parm_decls): Likewise.
5377 (c_push_function_context): Likewise.
5378 * c-lang.h: Remove usage of variable_size gty attribute.
5379 * c-parser.c (c_parse_init): Adjust.
5380 (c_parse_file): Likewise.
5381
2b107f6b
MP
53822014-05-13 Marek Polacek <polacek@redhat.com>
5383
5384 PR c/61162
5385 * c-typeck.c (convert_for_assignment): Pass location to
5386 WARN_FOR_ASSIGNMENT instead of input_location.
5387
d033409e
MP
53882014-05-10 Marek Polacek <polacek@redhat.com>
5389
5390 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5391 maybe_warn_string_init.
5392 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5393 maybe_warn_string_init.
5394 * c-tree.h (maybe_warn_string_init): Update declaration.
5395 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5396 Call pedwarn_init with loc instead of with input_location.
5397 (digest_init): Pass init_loc to maybe_warn_string_init.
5398 (pop_init_level): Call pedwarn_init with loc instead of with
5399 input_location.
5400 (set_init_index): Likewise.
5401 (process_init_element): Likewise.
5402
ea58ef42
MP
54032014-05-09 Marek Polacek <polacek@redhat.com>
5404
5405 PR c/61096
5406 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5407 (c_parser_initelt): Pass location to set_init_label. Pass array index
5408 location to set_init_index.
5409 * c-tree.h (push_init_level): Update declaration.
5410 (pop_init_level): Likewise.
5411 (set_init_index): Likewise.
5412 (set_init_label): Likewise.
5413 * c-typeck.c (error_init): Add location parameter. Call error_at
5414 instead of error.
5415 (digest_init): Pass init_loc to error_init.
5416 (really_start_incremental_init):
5417 (push_init_level): Add location parameter. Pass loc to pop_init_level
5418 and error_init.
5419 (pop_init_level): Likewise.
5420 (set_designator): Add location parameter. Pass loc to pop_init_level,
5421 push_init_level, and error_init.
5422 (set_init_index): Add location parameter. Pass loc to error_init and
5423 set_designator.
5424 (set_init_label): Likewise.
5425 (output_init_element): Pass loc to error_init.
5426 (process_init_element): Pass loc to error_init, pop_init_level,
5427 pedwarn_init, and push_init_level.
5428
661a0813
MP
54292014-05-09 Marek Polacek <polacek@redhat.com>
5430
5431 PR c/50459
5432 * c-parser.c (c_parser_attributes): Parse the arguments as an
5433 expression-list if the attribute takes identifier.
5434
2793eeab
MP
54352014-05-08 Marek Polacek <polacek@redhat.com>
5436
5437 PR c/61053
5438 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5439 TYPE_ALIGN_UNIT.
5440
f827930a
MP
54412014-05-08 Marek Polacek <polacek@redhat.com>
5442
5443 PR c/61077
5444 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5445 of main.
5446
1d60af08
KZ
54472014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5448 Mike Stump <mikestump@comcast.net>
5449 Richard Sandiford <rdsandiford@googlemail.com>
5450
5451 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5452 (finish_enum): Use wide-int interfaces.
5453 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5454 * c-typeck.c (build_c_cast): Likewise.
5455 (set_nonincremental_init_from_string): Likewise.
5456 (c_tree_equal): Likewise.
5457
a0e24419
MP
54582014-05-02 Marek Polacek <polacek@redhat.com>
5459
5460 PR c/25801
5461 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5462 Return size_one_node when the type is not complete.
5463 (pointer_diff): Remove comment.
5464 (build_unary_op): Improve error messages.
5465
19fc9faa
MP
54662014-05-02 Marek Polacek <polacek@redhat.com>
5467
5468 * c-typeck.c (c_finish_return): Separate warning_at calls.
5469
63bc4e87
MP
54702014-05-02 Marek Polacek <polacek@redhat.com>
5471
5472 * c-tree.h (error_init): Remove declaration.
5473 (pedwarn_init): Likewise.
5474 * c-typeck.c (error_init): Make static and move above.
5475 (pedwarn_init): Likewise.
5476 (warning_init): Move above.
5477 (maybe_warn_string_init): Likewise.
5478
4bd2511b
JL
54792014-05-01 Jeff Law <law@redhat.com>
5480
5481 Revert:
5482
5483 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5484 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5485 avoid goto.
5486
6a358dcb
MP
54872014-05-02 Marek Polacek <polacek@redhat.com>
5488
5489 PR c/60784
5490 * c-typeck.c (push_init_level): Set constructor_designated to
5491 p->designated for structures.
5492
ae5ebda4
MP
54932014-05-01 Marek Polacek <polacek@redhat.com>
5494
5495 PR c/60915
5496 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5497 function-definition has an attribute after the declarator.
5498
96b40f8d
MP
54992014-05-01 Marek Polacek <polacek@redhat.com>
5500
5501 PR c/60257
5502 * c-typeck.c (warning_init): Add location_t parameter. Call
5503 warning_at instead of warning.
5504 (push_init_level): Pass input_location to warning_init.
5505 (add_pending_init): Add location_t parameter. Pass loc to
5506 warning_init.
5507 (set_nonincremental_init): Pass input_location to add_pending_init.
5508 (set_nonincremental_init_from_string): Likewise.
5509 (output_init_element): Pass loc to warning_init and to
5510 add_pending_init.
5511
32e00768
MP
55122014-05-01 Marek Polacek <polacek@redhat.com>
5513
5514 PR c/43395
5515 * c-typeck.c (c_finish_return): Distinguish between label and variable
5516 when warning about returning local address.
5517
c9379ce2
MP
55182014-05-01 Marek Polacek <polacek@redhat.com>
5519
5520 PR c/29467
5521 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5522 in C89 mode.
5523
d00887e8
MP
55242014-05-01 Marek Polacek <polacek@redhat.com>
5525
5526 PR c/43245
5527 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5528 instead of 0 to WARN_FOR_QUALIFIERS.
5529
5436fa2e
MP
55302014-05-01 Marek Polacek <polacek@redhat.com>
5531
5532 PR c/56989
5533 * c-typeck.c (default_conversion): Use better location for
5534 error call.
5535
f8ed5150
MP
55362014-04-30 Marek Polacek <polacek@redhat.com>
5537
5538 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5539 also when SANITIZE_FLOAT_DIVIDE is on.
5540
8337d1db
MP
55412014-04-30 Marek Polacek <polacek@redhat.com>
5542
5543 PR c/60139
5544 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5545 and pedwarn_init. Use loc insted of input_location.
5546
c4bdc42f
MP
55472014-04-30 Marek Polacek <polacek@redhat.com>
5548
5549 PR c/60351
5550 * c-typeck.c (build_binary_op): Use location when warning about
5551 shift count.
5552
45484dcf
MP
55532014-04-25 Marek Polacek <polacek@redhat.com>
5554
5555 PR c/18079
5556 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5557 always_inline/noinline and hot/cold attributes.
5558
34cf811f
MP
55592014-04-25 Marek Polacek <polacek@redhat.com>
5560
5561 PR c/60114
5562 * c-parser.c (c_parser_initelt): Pass input_location to
5563 process_init_element.
5564 (c_parser_initval): Pass loc to process_init_element.
5565 * c-tree.h (process_init_element): Adjust declaration.
5566 * c-typeck.c (push_init_level): Pass input_location to
5567 process_init_element.
5568 (pop_init_level): Likewise.
5569 (set_designator): Likewise.
5570 (output_init_element): Add location_t parameter. Pass loc to
5571 digest_init.
5572 (output_pending_init_elements): Pass input_location to
5573 output_init_element.
5574 (process_init_element): Add location_t parameter. Pass loc to
5575 output_init_element.
5576
42056eac
JJ
55772014-04-24 Jakub Jelinek <jakub@redhat.com>
5578
5579 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5580 atomic-clause, allow comma in between atomic-clause and
5581 seq_cst.
5582
e162a134
JJ
55832014-04-22 Jakub Jelinek <jakub@redhat.com>
5584
5585 PR c/59073
5586 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5587 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5588
2f6babac
IZ
55892014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5590
5591 PR middle-end/60469
5592 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5593 create_tmp_var instead build_decl for creating temps.
5594 (build_array_notation_expr): Likewise.
5595 (fix_conditional_array_notations_1): Likewise.
5596 (fix_array_notation_expr): Likewise.
5597 (fix_array_notation_call_expr): Likewise.
5598
8edbfaa6
JJ
55992014-03-28 Jakub Jelinek <jakub@redhat.com>
5600
5601 PR c++/60689
5602 * c-tree.h (c_build_function_call_vec): New prototype.
5603 * c-typeck.c (build_function_call_vec): Don't call
5604 resolve_overloaded_builtin here.
5605 (c_build_function_call_vec): New wrapper function around
5606 build_function_call_vec. Call resolve_overloaded_builtin here.
5607 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5608 Call c_build_function_call_vec instead of build_function_call_vec.
5609 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5610 * c-decl.c (finish_decl): Likewise.
5611
7485aeea
MLI
56122014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5613
5614 PR c/55383
5615 * c-typeck.c: Use correct format string in cast-qual warning
5616
b17a8b07
TS
56172014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5618
5619 * c-decl.c (c_decl_attributes): Use
5620 lang_hooks.types.omp_mappable_type.
5621 * c-typeck.c (c_finish_omp_clauses): Likewise.
5622
3af9c5e9
MP
56232014-03-06 Marek Polacek <polacek@redhat.com>
5624
5625 PR c/60197
5626 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5627 of checking tree code.
5628
1c9f5f33
PK
56292014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5630
5631 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5632 (c_parser_parameter_declaration): Likewise.
5633
cc28fc7f
MP
56342014-02-19 Marek Polacek <polacek@redhat.com>
5635
5636 PR c/60195
5637 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5638 Call mark_exp_read on exp.value.
5639 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5640 TREE_ADDRESSABLE on old instead of val.
5641 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5642
b581c05c
PK
56432014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5644
5645 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5646 C_EXPR_APPEND by vec_safe_push.
5647 * c-tree.h (C_EXPR_APPEND): Remove.
5648
81e5eca8
MP
56492014-01-31 Marek Polacek <polacek@redhat.com>
5650
5651 PR c/59963
5652 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5653 build_function_call_vec.
5654 (build_function_call): Likewise.
5655 (build_atomic_assign): Likewise.
5656 (build_function_call_vec): Add arg_loc parameter. Use it.
5657 (convert_arguments): Likewise.
5658 (convert_for_assignment): Rename rhs_loc to expr_loc.
5659 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5660 (c_parser_objc_keywordexpr): Likewise.
5661 (c_parser_postfix_expression_after_primary): Call
5662 build_function_call_vec with expr_loc rather than op_loc.
5663 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5664 build_function_call_vec.
5665 (c_parser_expr_list): Add locations parameter. Fill it with locations
5666 of function arguments.
5667 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5668
68fca595
MP
56692014-01-30 Marek Polacek <polacek@redhat.com>
5670
5671 PR c/59940
5672 * c-typeck.c (build_function_call_vec): Use loc parameter.
5673 (convert_arguments): Add location parameter. Use it.
5674 (ep_convert_and_check): Likewise.
5675 (build_atomic_assign): Adjust convert_for_assignment call.
5676 (build_modify_expr): Likewise.
5677 (digest_init): Likewise.
5678 (c_finish_return): Likewise.
5679 (build_conditional_expr): Adjust ep_convert_and_check calls.
5680 (convert_for_assignment): Add rhs_loc parameter. Use it.
5681 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5682 calls.
5683
fa337f3a
RB
56842014-01-30 Richard Biener <rguenther@suse.de>
5685
5686 PR c/59905
5687 * c-typeck.c (build_function_call_vec): Do not replace calls
5688 to a function via an incompatible type with a runtime abort.
5689
b72271b9
BI
56902014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5691
5692 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5693 flag_enable_cilkplus with flag_cilkplus.
5694 (c_parser_direct_declarator_inner): Likewise.
5695 (c_parser_attribute_any_word): Likewise.
5696 (c_parser_attributes): Likewise.
5697 (c_parser_compound_statement): Likewise.
5698 (c_parser_statement_after_labels): Likewise.
5699 (c_parser_if_statement): Likewise.
5700 (c_parser_switch_statement): Likewise.
5701 (c_parser_do_statement): Likewise.
5702 (c_parser_for_statement): Likewise.
5703 (c_parser_unary_expression): Likewise.
5704 (c_parser_postfix_expression): Likewise.
5705 (c_parser_postfix_expression_after_primary): Likewise.
5706 (c_parser_postfix_expression_after_primary): Likewise.
5707 (c_parser_omp_clause_name): Likewise.
5708 (c_finish_omp_declare_simd): Likewise.
5709 (c_parser_cilk_verify_simd): Likewise.
5710 * c-typeck.c (build_array_ref): Likewise.
5711 (build_function_call_vec): Likewise.
5712 (convert_arguments): Likewise.
5713 (build_compound_expr): Likewise.
5714 (c_finish_return): Likewise.
5715 (c_finish_if_stmt): Likewise.
5716 (c_finish_loop): Likewise.
5717 (build_binary_op): Likewise.
5718
393e8e8b
MP
57192014-01-23 Marek Polacek <polacek@redhat.com>
5720
5721 PR c/59846
5722 * c-typeck.c (parser_build_binary_op): Use location instead of
5723 input_location.
5724 (build_binary_op): Pass location to shorten_compare.
5725
f04dda30
MP
57262014-01-23 Marek Polacek <polacek@redhat.com>
5727
5728 PR c/58346
5729 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5730 an empty aggregate.
5731
789eadcd
MP
57322014-01-23 Marek Polacek <polacek@redhat.com>
5733
5734 PR c/59871
5735 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5736 of a comma expression.
5737 (emit_side_effect_warnings): Likewise.
5738
40f14e9f
BI
57392014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5740
5741 PR c/59825
5742 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5743 function to use walk_tree and moved a lot of its functionality to
5744 expand_array_notations.
5745 (expand_array_notations): New function.
5746
74558dd9
BI
57472014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5748
5749 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5750 attribute an attribute without value.
5751
652fea39
JJ
57522014-01-23 Jakub Jelinek <jakub@redhat.com>
5753
5754 PR middle-end/58809
5755 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5756 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5757
f34f1c87
MP
57582014-01-22 Marek Polacek <polacek@redhat.com>
5759
5760 PR c/59891
5761 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5762 of remove_c_maybe_const_expr on op1 and op2.
5763
241f845a
JJ
57642014-01-15 Jakub Jelinek <jakub@redhat.com>
5765
5766 PR c/58943
5767 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5768 effects, preevaluate rhs using SAVE_EXPR first.
5769
9a74f20c
BI
57702014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5771
5772 PR c++/59631
5773 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5774 statements with if-elseif statements.
5775
96066ce1
MP
57762014-01-06 Marek Polacek <polacek@redhat.com>
5777
5778 PR c/57773
5779 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5780 defined bit-field types only in ISO C.
5781
23a5b65a
RS
57822014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5783
5784 Update copyright years
5785
f9030485
RS
57862014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5787
5788 * c-array-notation.c: Use the standard form for the copyright notice.
5789
41958c28
BI
57902013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5791
5792 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5793 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5794 field in parser is not empty. If not-empty, call the function
5795 c_parser_finish_omp_declare_simd.
5796 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5797 between SIMD-enabled functions and #pragma simd. Added new parameter.
5798 (c_parser_cilk_all_clauses): Modified the usage of the function
5799 c_parser_cilk_clause_vectorlength as mentioned above.
5800 (c_parser_cilk_simd_fn_vector_attrs): New function.
5801 (c_finish_cilk_simd_fn_tokens): Likewise.
5802 (is_cilkplus_vector_p): Likewise.
5803 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5804 "nomask," and "mask" strings in clause name.
5805 (c_parser_omp_all_clauses): Added 3 new case statements:
5806 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5807 PRAGMA_CILK_CLAUSE_NOMASK.
5808 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5809 check for vector attribute and if so call the function
5810 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5811 called the function c_finish_cilk_simd_fn_tokens.
5812 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5813 parser field is non-empty. If so, parse them as you would parse
5814 the omp declare simd pragma.
5815 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5816 Added a check when step is a parameter and flag it as error.
5817 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5818 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5819 pragma_omp_clause.
5820
cef0fd0e
TS
58212013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5822
5823 * c-parser.c (c_parser_omp_parallel): Fix description.
5824
12893402
BI
58252013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5826
5827 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5828 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5829 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5830 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5831
296674db
JM
58322013-12-04 Joseph Myers <joseph@codesourcery.com>
5833
5834 PR c/52023
5835 * c-parser.c (c_parser_alignas_specifier): Use
5836 c_sizeof_or_alignof_type instead of c_alignof.
5837 (c_parser_alignof_expression): Likewise, with min_alignof
5838 parameter depending on alignof spelling used.
5839
edd28054
MP
58402013-12-04 Marek Polacek <polacek@redhat.com>
5841
5842 PR c/54113
5843 * c-decl.c (start_function): Don't warn for missing prototype for
5844 inline functions.
5845
da0fc454
MP
58462013-12-03 Marek Polacek <polacek@redhat.com>
5847
5848 PR c/59351
5849 * c-decl.c (build_compound_literal): Allow compound literals with
5850 empty initial value.
5851
4c2ecab0
JM
58522013-12-02 Joseph Myers <joseph@codesourcery.com>
5853
5854 PR c/58235
5855 * c-typeck.c (build_modify_expr): Diagnose assignment to
5856 expression with array type.
5857
340baef7
JM
58582013-11-29 Joseph Myers <joseph@codesourcery.com>
5859
5860 PR c/42262
5861 * c-typeck.c (process_init_element): Do not treat a string as
5862 initializing a whole array when used with a designator for an
5863 individual element.
5864
6763b9f7
JM
58652013-11-29 Joseph Myers <joseph@codesourcery.com>
5866
5867 PR c/57574
5868 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5869 an inline function following a static declaration.
5870
e7bd1de1
JJ
58712013-11-28 Jakub Jelinek <jakub@redhat.com>
5872
5873 PR c/59310
5874 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5875 to p_name before calling c_parser_omp_teams instead of after.
5876 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5877 argument. Remove unused p_name variable.
5878
0136f8f0
AH
58792013-11-27 Aldy Hernandez <aldyh@redhat.com>
5880 Jakub Jelinek <jakub@redhat.com>
5881
5882 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5883 external_scope is NULL.
5884
241b71bb
TV
58852013-11-27 Tom de Vries <tom@codesourcery.com>
5886 Marc Glisse <marc.glisse@inria.fr>
5887
5888 PR c++/59032
5889 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5890
2fb9a547
AM
58912013-11-22 Andrew MacLeod <amacleod@redhat.com>
5892
5893 * c-typeck.c: Add required include files from gimple.h.
5894
8400e75e
DM
58952013-11-22 David Malcolm <dmalcolm@redhat.com>
5896
5897 * c-decl.c (define_label, shadow_tag_warned)
5898 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5899 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5900 (declspecs_add_type): Remove use of in_system_header macro.
5901 * c-parser.c (c_parser_unary_expression): Likewise.
5902 * c-typeck.c (store_init_value, process_init_element)
5903 (c_start_case): Likewise.
5904
5905 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5906 macro.
5907
5908 * c-parser.c (c_parser_set_source_position_from_token): Remove
5909 reference to in_system_header from comment.
5910
386b1f1f
RS
59112013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5912
5913 * c-decl.c (grokdeclarator): Update comment to refer to
5914 tree_to_[su]hwi rather than tree_low_cst.
5915
ae7e9ddd
RS
59162013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5917
5918 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5919 tree_to_uhwi throughout.
5920
9439e9a1
RS
59212013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5922
5923 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5924 throughout.
5925
9541ffee
RS
59262013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5927
5928 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5929 throughout.
5930
c02065fc
AH
59312013-11-15 Aldy Hernandez <aldyh@redhat.com>
5932
5933 * c-parser.c (c_parser_cilk_simd): New.
5934 (c_parser_cilk_verify_simd): New.
5935 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5936 (c_parser_omp_for_loop): Add case for NE_EXPR.
5937 Set c_break_label for CILK_SIMD.
5938 (c_parser_cilk_clause_vectorlength): New.
5939 (c_parser_cilk_clause_linear): New.
5940 (c_parser_cilk_clause_name): New.
5941 (c_parser_cilk_all_clauses): New.
5942 * c-typeck.c (build_unary_op): Pass location argument to
5943 readonly_error.
5944 (build_modify_expr): Same.
5945 (build_asm_expr): Same.
5946 (c_finish_bc_stmt): Error on break/continue in loops.
5947
18f429e2
AM
59482013-11-14 Andrew MacLeod <amacleod@redhat.com>
5949
5950 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5951
d8a2d370
DN
59522013-11-14 Diego Novillo <dnovillo@google.com>
5953
5954 * c-decl.c: Include print-tree.h.
5955 Include stor-layout.h.
5956 Include varasm.h.
5957 Include attribs.h.
5958 Include stringpool.h.
5959 * c-lang.c: Include fold-const.h.
5960 * c-parser.c: Include stringpool.h.
5961 Include attribs.h.
5962 Include stor-layout.h.
5963 Include varasm.h.
5964 Include trans-mem.h.
5965 * c-typeck.c: Include stor-layout.h.
5966 Include trans-mem.h.
5967 Include varasm.h.
5968 Include stmt.h.
5969
38b7bc7f
JM
59702013-11-13 Joseph Myers <joseph@codesourcery.com>
5971
5972 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
5973 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
5974 __auto_type.
5975 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
5976 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
5977 RID_AUTO_TYPE.
5978 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
5979 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
5980 (c_parser_declarator, c_parser_direct_declarator_inner)
5981 (c_parser_parameter_declaration, c_parser_type_name): All callers
5982 changed.
5983 (c_parser_declaration_or_fndef): Handle declarations with type
5984 determined from the initializer.
5985
45b0be94
AM
59862013-11-12 Andrew MacLeod <amacleod@redhat.com>
5987
18f429e2 5988 * c-typeck.c: Include gimplify.h.
45b0be94 5989
582d9b50
JM
59902013-11-12 Joseph Myers <joseph@codesourcery.com>
5991
5992 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
5993 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
5994 comment.
5995 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
5996 or _Thread_local as appropriate in diagnostics.
5997 (build_null_declspecs): Initialize ret->thread_gnu_p.
5998 (declspecs_add_scspec): Handle either __thread or _Thread_local
5999 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6000 pedantic. Do not disallow _Thread_local extern and _Thread_local
6001 static.
6002
267bac10
JM
60032013-11-07 Joseph Myers <joseph@codesourcery.com>
6004 Andrew MacLeod <amacleod@redhat.com>
6005
6006 * c-aux-info.c (gen_type): Handle atomic qualifier.
6007 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6008 qualifiers when compating types.
6009 (shadow_tag_warned): Handle atomic_p in declspecs.
6010 (quals_from_declspecs): Likewise.
6011 (start_decl): Use c_type_promotes_to when promoting argument
6012 types.
6013 (grokdeclarator): Handle _Atomic.
6014 (get_parm_info): Diagnose any qualifier on "void" as only
6015 parameter.
6016 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6017 comparing types. Use c_type_promotes_to when promoting argument
6018 types.
6019 (finish_function): Use c_type_promotes_to when promoting argument
6020 types.
6021 (build_null_declspecs): Handle atomic_p in declspecs.
6022 (declspecs_add_qual): Handle RID_ATOMIC.
6023 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6024 (c_token_starts_declspecs): Handle RID_ATOMIC.
6025 (c_parser_declspecs): Handle atomic type specifiers and
6026 qualifiers.
6027 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6028 from types of expressions with atomic type.
6029 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6030 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6031 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6032 (c_parser_statement_after_labels, c_parser_switch_statement)
6033 (c_parser_for_statement, c_parser_expr_no_commas)
6034 (c_parser_conditional_expression, c_parser_binary_expression)
6035 (c_parser_cast_expression, c_parser_unary_expression)
6036 (c_parser_postfix_expression)
6037 (c_parser_postfix_expression_after_primary, c_parser_expression):
6038 Use convert_lvalue_to_rvalue.
6039 (c_parser_expression_conv, c_parser_expr_list): Document
6040 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6041 (c_parser_objc_synchronized_statement): Use
6042 convert_lvalue_to_rvalue.
6043 (c_parser_objc_selector): Handle RID_ATOMIC.
6044 (c_parser_objc_receiver, c_parser_array_notation): Use
6045 convert_lvalue_to_rvalue.
6046 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6047 _Atomic (type-name).
6048 (struct c_declspecs): Add atomic_p field.
6049 (convert_lvalue_to_rvalue): Declare.
6050 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6051 corresponding atomic types.
6052 (qualify_type): Don't add _Atomic qualifiers from second argument.
6053 (comp_target_types): Do not allow _Atomic mismatches.
6054 (type_lists_compatible_p): Do not remove atomic qualifiers when
6055 comparing types.
6056 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6057 (build_atomic_assign): New functions.
6058 (build_unary_op): Use build_atomic_assign for atomic increment and
6059 decrement.
6060 (build_conditional_expr): Do not treat _Atomic void as a qualified
6061 version of void.
6062 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6063 (find_anonymous_field_with_type, convert_to_anonymous_field)
6064 (convert_for_assignment): Do not remove atomic qualifiers when
6065 comparing types.
6066 (digest_init): Do not accept initialization of arrays of atomic
6067 elements by string constants.
6068 (build_asm_expr): Use convert_lvalue_to_rvalue.
6069 (build_binary_op): Do not treat _Atomic void as a qualified
6070 version of void.
6071
0c249d4b
DD
60722013-11-06 DJ Delorie <dj@redhat.com>
6073
6074 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6075 both explicit and builtin, print the location of the explicit one.
6076
6d7f7e0a
TB
60772013-11-05 Tobias Burnus <burnus@net-b.de>
6078
6079 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6080 c_parser_omp_distribute, c_parser_omp_teams,
6081 c_parser_omp_target, c_parser_omp_declare): Handle
6082 -fopenmp-simd.
6083
b906f4ca
MP
60842013-11-03 Marek Polacek <polacek@redhat.com>
6085
6086 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6087
ee1d5a02
JJ
60882013-11-01 Jakub Jelinek <jakub@redhat.com>
6089
6090 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6091 check_dup_generic at the end, unless remove is true.
6092 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6093 remove = true;.
6094 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6095
5a9785fb
JJ
60962013-10-31 Jakub Jelinek <jakub@redhat.com>
6097
6098 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6099 with decl that is not pointer nor array.
6100
939b37da
BI
61012013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6102
6103 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6104 a spawning function is found.
6105 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6106 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6107 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6108 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6109 case.
6110 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6111 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6112 expr.
6113 (c_finish_return): Added a check to reject _Cilk_spawn in return
6114 expression.
6115 (build_cilk_spawn): New function.
6116 (build_cilk_sync): Likewise.
6117 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6118
d4af74d4
TB
61192013-10-27 Tobias Burnus <burnus@net-b.de>
6120
6121 PR other/33426
6122 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6123 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6124 (c_parser_statement_after_labels): Update calls.
6125
d73749df 61262013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6127
6128 PR other/33426
6129 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6130 Handle PRAGMA_IVDEP.
6131 (c_parser_statement_after_labels): Update call.
6132
f28aa681
MP
61332013-10-24 Marek Polacek <polacek@redhat.com>
6134
6135 * c-parser.c (c_parser_struct_declaration): Add a comment.
6136 (c_parser_declarator): Don't allow _Alignas here.
6137
0645c1a2
AM
61382013-10-17 Andrew MacLeod <amacleod@redhat.com>
6139
6140 * c-parser.c: Include omp-low.h.
6141 * c-typeck.c: Likewise.
6142
568a31f2
MP
61432013-10-17 Marek Polacek <polacek@redhat.com>
6144
6145 PR c/58267
6146 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6147 Document syntax of the array-declarator.
6148 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6149 are not permitted.
6150 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6151 (c_parser_struct_declaration): Likewise.
6152 (c_parser_declarator): Likewise.
6153 (c_parser_direct_declarator_inner): Likewise.
6154 (c_parser_parameter_declaration): Likewise.
6155 (c_parser_type_name): Likewise.
6156
acf0174b
JJ
61572013-10-11 Jakub Jelinek <jakub@redhat.com>
6158
6159 * c-lang.h (current_omp_declare_target_attribute): New extern
6160 decl.
6161 * c-parser.c: Include c-lang.h.
6162 (struct c_parser): Change tokens to c_token *.
6163 Add tokens_buf field. Change tokens_avail type to unsigned int.
6164 (c_parser_consume_token): If parser->tokens isn't
6165 &parser->tokens_buf[0], increment parser->tokens.
6166 (c_parser_consume_pragma): Likewise.
6167 (enum pragma_context): Add pragma_struct and pragma_param.
6168 (c_parser_external_declaration): Adjust
6169 c_parser_declaration_or_fndef caller.
6170 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6171 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6172 Adjust recursive call.
6173 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6174 of pragma_external.
6175 (c_parser_parameter_declaration): Use pragma_param instead of
6176 pragma_external.
6177 (c_parser_compound_statement_nostart, c_parser_label,
6178 c_parser_for_statement): Adjust
6179 c_parser_declaration_or_fndef callers.
6180 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6181 it through to c_parser_conditional_expression.
6182 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6183 pass it through to c_parser_binary_expression. Adjust recursive
6184 call.
6185 (c_parser_binary_expression): Remove prec argument, add
6186 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6187 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6188 binop matches it, use build2 instead of parser_build_binary_op.
6189 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6190 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6191 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6192 Handle pragma_struct and pragma_param the same as pragma_external.
6193 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6194 (c_parser_omp_variable_list): Parse array sections for
6195 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6196 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6197 (c_parser_omp_clause_reduction): Handle user defined reductions.
6198 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6199 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6200 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6201 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6202 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6203 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6204 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6205 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6206 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6207 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6208 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6209 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6210 (c_parser_omp_for_loop): Add CODE argument, pass it through
6211 to c_finish_omp_for. Change last argument to cclauses,
6212 and adjust uses to grab parallel clauses from the array of all
6213 the split clauses. Adjust c_parser_binary_expression,
6214 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6215 (omp_split_clauses): New function.
6216 (c_parser_omp_simd): New function.
6217 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6218 Allow the function to be called also when parsing combined constructs,
6219 and call c_parser_omp_simd when parsing for simd.
6220 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6221 #pragma omp section, require exactly one structured-block instead of
6222 sequence of statements.
6223 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6224 Allow the function to be called also when parsing combined constructs.
6225 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6226 Allow the function to be called also when parsing combined
6227 constructs.
6228 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6229 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6230 c_parser_omp_teams, c_parser_omp_target_data,
6231 c_parser_omp_target_update, c_parser_omp_target,
6232 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6233 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6234 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6235 (c_parser_omp_construct): Add p_name and mask vars. Handle
6236 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6237 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6238 and c_parser_omp_sections callers.
6239 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6240 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6241 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6242 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6243 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6244 OMP_CLAUSE_DEPEND.
6245 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6246 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6247 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6248 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6249 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6250 * c-typeck.c: Include tree-inline.h.
6251 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6252 handle_omp_array_sections_1, handle_omp_array_sections,
6253 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6254 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6255 user defined reductions.
6256 (c_tree_equal): New function.
6257 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6258 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6259 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6260 c_check_omp_declare_reduction_r): New prototypes.
6261 * c-decl.c (current_omp_declare_target_attribute): New variable.
6262 (c_decl_attributes): New function.
6263 (start_decl, start_function): Use it instead of decl_attributes.
6264 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6265 c_omp_reduction_decl, c_omp_reduction_lookup,
6266 c_check_omp_declare_reduction_r): New functions.
6267
0a6c2227
TT
62682013-09-25 Tom Tromey <tromey@redhat.com>
6269
6270 * Make-lang.in (c/gccspec.o): Remove.
6271 (CFLAGS-c/gccspec.o): New variable.
6272 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6273 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6274 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6275
f3bc55f0
TT
62762013-09-25 Tom Tromey <tromey@redhat.com>
6277
6278 * Make-lang.in (c/gccspec.o): Don't use subshell.
6279
a24d975c
MP
62802013-09-18 Marek Polacek <polacek@redhat.com>
6281
6282 PR sanitize/58443
6283 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6284 Remove unnecessary check.
6285
ce6923c5
MP
62862013-09-18 Marek Polacek <polacek@redhat.com>
6287
6288 PR sanitizer/58411
6289 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6290 no_sanitize_undefined attribute.
6291
a1e51df9
KT
62922013-09-13 Kai Tietz <ktietz@redhat.com>
6293
6294 PR target/57848
6295 * c-decl.c (c_builtin_function_ext_scope): Remove
6296 wrong assumption that it is never called on prexisting
6297 symbol.
6298
0af94e6f
JR
62992013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6300
6301 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6302
20059c8b
GDR
63032013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6304
6305 * c-objc-common.c (c_tree_printer): Tidy.
6306
de5a5fa1
MP
63072013-08-30 Marek Polacek <polacek@redhat.com>
6308
6309 * c-typeck.c (build_binary_op): Add division by zero and shift
6310 instrumentation.
6311
2531a1d9 63122013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6313 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6314
6e2bcc98 6315 PR c/35649
2531a1d9
JR
6316 * c-typeck.c (c_common_type): Prefer double_type_node over
6317 other REAL_TYPE types with the same precision.
6318 (convert_arguments): Likewise.
6319
025311c4
GDR
63202013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6321
6322 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6323 (c_initialize_diagnostics): Call a destructor for the early printer.
6324
da6ca2b5
GDR
63252013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6326
6327 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6328 printer initialization.
6329
318cda85 63302013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6331
318cda85
BI
6332 PR c/57490
6333 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6334 check for truth values.
6335 (expand_array_notation_exprs): Added truth values case. Removed an
6336 unwanted else. Added for-loop to walk through subtrees in default
6337 case.
6338
b066401f
GDR
63392013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6340
6341 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6342
fb48aadc
JM
63432013-07-23 Joseph Myers <joseph@codesourcery.com>
6344
6345 * c-parser.c (struct c_generic_association): Fix typo.
6346
433cc7b0
TT
63472013-07-23 Tom Tromey <tromey@redhat.com>
6348 Joseph Myers <joseph@codesourcery.com>
6349
6350 * c-parser.c (struct c_generic_association): New.
6351 (c_generic_association_d): New typedef.
6352 (c_parser_generic_selection): New function.
6353 (c_parser_postfix_expression): Handle RID_GENERIC.
6354
26d40c3d
JM
63552013-07-13 Jason Merrill <jason@redhat.com>
6356
6357 PR c++/57793
6358 * c-decl.c (finish_struct): Check for too-large class.
6359
ecdbd01a 63602013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6361
6362 PR c/57821
6363 * c-typeck.c (set_init_index): When folding, check for index overflow.
6364
1141ed3f
BI
63652013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6366
6367 * c-parser.c (c_parser_array_notation): Removed rejection of array
6368 notations in an array of function pointers.
6369
713b46fa
BI
63702013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6371
6372 * c-array-notation.c (make_triplet_val_inv): New function.
6373 (create_cmp_incr): Likewise.
6374 (create_array_refs): Likewise.
6375 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6376 Also modularized common parts between functions and called the function.
6377 (build_array_notation_expr): Likewise.
6378 (fix_conditional_array_notations_1): Likewise.
6379 (fix_array_notation_expr): Likewise.
6380 (fix_array_notation_call_expr): Likewise.
6381
92f20202
MP
63822013-06-18 Marek Polacek <polacek@redhat.com>
6383
6384 PR c/57630
6385 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6386
73a23b06
BI
63872013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6388
6389 * c-array-notation.c (build_array_notation_expr): Reject array notation
6390 mismatch between LHS and RHS even inside a call_expr. Also, removed
6391 a couple while statements that were dead code.
6392
00b8517d
BI
63932013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6394
6395 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6396 excessive precision expressions in function parameters. Also removed
6397 couple unwanted while statements.
6398
1509bdda
BI
63992013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6400
6401 * c-array-notation.c (expand_array_notation_exprs): Added
6402 ARRAY_NOTATION_REF case.
ab20d992 6403
d60f1706
BI
64042013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6405
6406 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6407 function to c-family/array-notation-common.c.
6408 (is_cilkplus_reduce_builtin): Likewise.
6409 (find_rank): Likewise.
6410 (extract_array_notation_exprs): Likewise.
6411 (replace_array_notations): Likewise.
6412 (find_inv_trees): Likewise.
6413 (replace_inv_trees): Likewise.
6414 (contains_array_notation_expr): Likewise.
6415 (find_correct_array_notation_type): Likewise.
6416 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6417 (struct inv_list): Moved this to c-family/array-notation-common.c.
6418 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6419
6d6efbb3
BI
64202013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6421
6422 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6423 reduction functions outside the for-loop. Added a check if the fundecl
6424 is non-NULL. Finally, removed an unwanted if-statement, and made the
6425 body unconditional.
6426
25c22937
BI
64272013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6428
6429 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6430 condition of the if-statement matches the rank of else-block and then-
6431 block when array notations are used.
6432 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6433 expression after the entire function body is parsed.
6434 (c_parser_expr_no_commas): Delayed creating array notation expressions
6435 to the end of function parsing.
6436 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6437 whole if-statement instead of just the condition.
ab20d992 6438 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6439
edd25645
BI
64402013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6441
6442 PR c/57474
6443 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6444 array to NULL_TREE if they are unused. Also added a check for the
6445 field to be NULL before its fields are used in future.
ab20d992 6446
065ce7f1
RO
64472013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6448
6449 PR bootstrap/57450
6450 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6451 (build_array_notation_expr): Likewise.
6452
36536d79
BI
64532013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6454
6455 * c-typeck.c (build_array_ref): Added a check to see if array's
6456 index is greater than one. If true, then emit an error.
6457 (build_function_call_vec): Exclude error reporting and checking
6458 for builtin array-notation functions.
6459 (convert_arguments): Likewise.
6460 (c_finish_return): Added a check for array notations as a return
6461 expression. If true, then emit an error.
6462 (c_finish_loop): Added a check for array notations in a loop
6463 condition. If true then emit an error.
6464 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6465 (build_binary_op): Added a check for array notation expr inside
6466 op1 and op0. If present, we call another function to find correct
6467 type.
6468 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6469 * c-parser.c (c_parser_compound_statement): Check if array
6470 notation code is used in tree, if so, then transform them into
6471 appropriate C code.
6472 (c_parser_expr_no_commas): Check if array notation is used in LHS
6473 or RHS, if so, then build array notation expression instead of
6474 regular modify.
6475 (c_parser_postfix_expression_after_primary): Added a check for
6476 colon(s) after square braces, if so then handle it like an array
6477 notation. Also, break up array notations in unary op if found.
6478 (c_parser_direct_declarator_inner): Added a check for array
6479 notation.
6480 (c_parser_compound_statement): Added a check for array notation in
6481 a stmt. If one is present, then expand array notation expr.
6482 (c_parser_if_statement): Likewise.
6483 (c_parser_switch_statement): Added a check for array notations in
6484 a switch statement's condition. If true, then output an error.
6485 (c_parser_while_statement): Similarly, but for a while.
6486 (c_parser_do_statement): Similarly, but for a do-while.
6487 (c_parser_for_statement): Similarly, but for a for-loop.
6488 (c_parser_unary_expression): Check if array notation is used in a
6489 pre-increment or pre-decrement expression. If true, then expand
6490 them.
6491 (c_parser_array_notation): New function.
6492 * c-array-notation.c: New file.
6493 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 6494
cd192ccc
MS
64952013-05-23 Mike Stump <mikestump@comcast.net>
6496
6497 * c-typeck.c (convert_for_assignment): Handle references to memory
6498 spaces better.
6499
427b248d
JM
65002013-05-16 Jason Merrill <jason@redhat.com>
6501
6502 * Make-lang.in (cc1$(exeext)): Use link mutex.
6503
44d90fe1
PC
65042013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6505
6506 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6507 to simply use OPT_Wpointer_arith.
6508 (build_unary_op): Likewise.
6509
4e7d7b3d
JJ
65102013-04-03 Jakub Jelinek <jakub@redhat.com>
6511
6512 PR c/19449
6513 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6514 argument. If set, or it temporarily for parsing of the first
6515 argument into force_folding_builtin_constant_p.
6516 (c_parser_postfix_expression): Adjust callers.
6517
839b422f
RB
65182013-03-21 Richard Biener <rguenther@suse.de>
6519
6520 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6521 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6522
2ee028f1
MP
65232013-02-12 Marek Polacek <polacek@redhat.com>
6524
6525 PR c/44938
6526 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6527 origtypes to NULL.
6528
8824edff
JJ
65292013-01-24 Jakub Jelinek <jakub@redhat.com>
6530
6531 PR c/56078
6532 * c-typeck.c (set_nonincremental_init_from_string): If
6533 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6534 returned false.
6535 (process_init_element): Likewise.
6536
eadd3d0d
JJ
65372012-12-20 Jakub Jelinek <jakub@redhat.com>
6538
6539 PR c++/55619
6540 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6541 argument, don't call default_function_array_conversion
6542 nor c_fully_fold here.
6543 (c_parser_asm_statement): Adjust callers.
6544 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6545 and outputs here, and call default_function_array_conversion
6546 on inputs that don't need to be addressable.
6547
f8a93a2e
JJ
65482012-12-18 Jakub Jelinek <jakub@redhat.com>
6549
6550 PR c/39464
6551 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6552 warning require that both c_common_unsigned_type as well as
6553 c_common_signed_type is the same for both mvl and mvr types.
6554
9771b263
DN
65552012-11-16 Diego Novillo <dnovillo@google.com>
6556
6557 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6558
6559 * c-common.c: Use new vec API in vec.h.
6560 * c-common.h: Likewise.
6561 * c-gimplify.c: Likewise.
6562 * c-pragma.c: Likewise.
6563 * c-pretty-print.c: Likewise.
6564 * c-pretty-print.h: Likewise.
6565 * c-semantics.c: Likewise.
6566 * c-decl.c: Likewise.
6567 * c-parser.c: Likewise.
6568 * c-tree.h: Likewise.
6569 * c-typeck.c: Likewise.
6570
880661a4
JW
65712012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6572
6573 PR c++/54930
6574 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6575
077d1abe
MLI
65762012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6577
6578 PR c/53066
6579 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6580 shadows a function, unless the variable is a function or a
6581 pointer-to-function.
6582
3a785c97
JJ
65832012-10-12 Jakub Jelinek <jakub@redhat.com>
6584
6585 PR c/54381
6586 * c-parser.c (struct c_tree_loc_pair): Removed.
6587 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6588 add location_t * and tree * arguments, fill in array of 3
6589 sizeof_arg trees and corresponding locs.
6590 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6591 c_parser_expr_list callers.
6592 (c_parser_postfix_expression_after_primary): Likewise. Pass
6593 array of 3 sizeof_arg trees and locs (corresponding to first
6594 3 arguments) to sizeof_pointer_memaccess_warning.
6595
703c8606
LC
65962012-10-09 Lawrence Crowl <crowl@google.com>
6597
6598 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6599 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6600 hash table.
6601
5d9de0d0
PC
66022012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6603
6604 PR c++/54194
6605 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6606 call.
6607
a212e43f
MG
66082012-10-09 Marc Glisse <marc.glisse@inria.fr>
6609
6610 PR c++/54427
6611 * c-typeck.c: Include c-common.h.
6612 (enum stv_conv): Moved to c-common.h.
6613 (scalar_to_vector): Moved to c-common.c.
6614 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6615 * Make-lang.in: c-typeck.c depends on c-common.h.
6616
3b78de56
AC
66172012-10-04 Arnaud Charlet <charlet@adacore.com>
6618
6619 * c-decl.c (c_write_global_declarations): Fix handling of
6620 -fdump-ada-spec*.
6621
78c60e3d
SS
66222012-09-30 Sharad Singhai <singhai@google.com>
6623
6624 * c-decl.c (c_write_global_declarations): Use a different method
6625 to determine if the dump has ben initialized.
6626
9f33203d
JM
66272012-09-14 Joseph Myers <joseph@codesourcery.com>
6628
6629 PR c/54552
6630 * c-typeck.c (c_cast_expr): When casting to a type requiring
6631 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6632 c_fully_fold first.
6633
a27d595d
JM
66342012-09-14 Joseph Myers <joseph@codesourcery.com>
6635
6636 PR c/54103
6637 * c-typeck.c (build_unary_op): Pass original argument of
6638 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6639 any C_MAYBE_CONST_EXPR, if it has integer operands.
6640 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6641 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6642 to c_objc_common_truthvalue_conversion, then remove any
6643 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6644 c_objc_common_truthvalue_conversion not
6645 c_common_truthvalue_conversion.
6646 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6647 call note_integer_operands for arguments with integer operands
6648 that are not integer constants.
6649
9feb29df
JJ
66502012-09-13 Jakub Jelinek <jakub@redhat.com>
6651
6652 PR c/54559
6653 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6654 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6655
d409320c
JJ
66562012-08-31 Jakub Jelinek <jakub@redhat.com>
6657
6658 PR c/54428
6659 * c-convert.c (convert): Don't call fold_convert_loc if
6660 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6661 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6662 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6663
6265d07c
JJ
66642012-08-24 Jakub Jelinek <jakub@redhat.com>
6665
6666 PR c/54355
6667 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6668 for nested and empty_ok arguments in the call to
6669 c_parser_declaration_or_fndef.
6670
1a4049e7
JJ
66712012-08-17 Jakub Jelinek <jakub@redhat.com>
6672
6673 * c-tree.h (c_last_sizeof_arg): Declare.
6674 * c-parser.c (struct c_tree_loc_pair): New type.
6675 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6676 non-NULL.
6677 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6678 (c_parser_postfix_expression_after_primary): Likewise. Call
6679 sizeof_pointer_memaccess_warning if needed.
6680 (sizeof_ptr_memacc_comptypes): New function.
6681 * c-typeck.c (c_last_sizeof_arg): New global variable.
6682 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6683
0229aee9
UB
66842012-07-24 Uros Bizjak <ubizjak@gmail.com>
6685
6686 * c-lang.h (lang_decl): Add variable_size GTY option.
6687
7ee2468b
SB
66882012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6689
6690 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6691 * Make-lang.in: Fix dependencies.
6692
d4a10d0a
SB
66932012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6694
6695 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6696 and add language Makefile hooks.
6697 * config-lang.in: New file.
6698 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6699 add the required "normal" config-lang.in rules.
6700 * c-lang.h: Moved from gcc/ to here.
6701 * c-tree.h: Likewise.
6702 * c-objc-common.c: Likewise.
6703 * c-objc-common.h: Likewise.
6704 * c-typeck.c: Likewise.
6705 * c-convert.c: Likewise.
6706 * c-lang.c: Likewise.
6707 * c-aux-info.c: Likewise.
6708 * c-errors.c: Likewise.
6709 * gccspec.c: Likewise.
6710 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6711 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6712\f
a5544970 6713Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6714
6715Copying and distribution of this file, with or without modification,
6716are permitted in any medium without royalty provided the copyright
6717notice and this notice are preserved.
This page took 2.500262 seconds and 5 git commands to generate.