]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Properly handle C2x attributes on types.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
1723e1be
JM
12019-11-25 Joseph Myers <joseph@codesourcery.com>
2
3 * c-tree.h (struct c_declarator): Use a structure for id member.
4 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
5 declarators at the start, not when handling individual declarators
6 later. Use u.id.id instead of u.id.
7 (grokfield): Use u.id.id instead of u.id.
8 (build_id_declarator): Set u.id.id and u.id.attrs.
9 (finish_declspecs): Handle postfix attributes in case of typedef
10 name or typeof used.
11 * c-parser.c (c_parser_direct_declarator)
12 (c_parser_direct_declarator_inner): Place declarator for
13 attributes inside that for function or array, not outside. Set
14 u.id.attrs for identifiers.
15 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
16 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
17 instead of u.id.
18
bdaf8be1
JJ
192019-11-22 Jakub Jelinek <jakub@redhat.com>
20
21 PR c/90677
22 * c-decl.c (identifier_global_tag): Define.
23
3e00ba47
RB
242019-11-20 Richard Biener <rguenther@suse.de>
25
26 PR c/92088
27 * c-decl.c (grokdeclarator): Prevent inlining of nested
28 function with VLA arguments.
29
8c5b727a
JM
302019-11-20 Joseph Myers <joseph@codesourcery.com>
31
32 * c-decl.c (c_warn_type_attributes): New function.
33 (groktypename, grokdeclarator, finish_declspecs): Call
34 c_warn_type_attributes before applying attributes to types.
35 * c-tree.h (c_warn_type_attributes): Declare.
36
192961ff
JM
372019-11-19 Joseph Myers <joseph@codesourcery.com>
38
39 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
40 standard attributes.
41 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
42 pedwarn for unknown standard attributes and return error_mark_node
43 for them.
44
20a38017
MM
452019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
46
47 * c-parser.c (c_parser_parse_rtl_body): Always call
48 run_rtl_passes, even if startwith pass is not provided.
49
d5fbe5e0
JM
502019-11-15 Joseph Myers <joseph@codesourcery.com>
51
52 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
53 duplicate standard attributes.
54
97cc1187
JM
552019-11-15 Joseph Myers <joseph@codesourcery.com>
56
57 * c-decl.c (std_attribute_table): Add maybe_unused.
58
f8aea5e3
JM
592019-11-15 Joseph Myers <joseph@codesourcery.com>
60
61 * c-decl.c (std_attribute_table): Add fallthrough.
62 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
63 attribute at top level.
64
2cc94aa8
JM
652019-11-15 Joseph Myers <joseph@codesourcery.com>
66
67 * c-decl.c (std_attribute_table): New.
68 (c_init_decl_processing): Register attributes from
69 std_attribute_table.
70 * c-parser.c (c_parser_attribute_arguments): Add arguments
71 require_string and allow_empty_args. All callers changed.
72 (c_parser_std_attribute): Set require_string argument for
73 "deprecated" attribute.
74
7c5890cc
JM
752019-11-14 Joseph Myers <joseph@codesourcery.com>
76
77 * c-parser.c (c_parser_postfix_expression)
78 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
79 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
80
e8738f4e
RS
812019-11-14 Richard Sandiford <richard.sandiford@arm.com>
82
83 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
84 of build_same_sized_truth_vector_type.
85 (build_vec_cmp): Likewise.
86
b2417b59
JJ
872019-11-14 Jakub Jelinek <jakub@redhat.com>
88
bedb7f04
JJ
89 * c-parser.c (c_parser_omp_context_selector): Don't require score
90 argument to fit into shwi, just to be INTEGER_CST. Diagnose
91 negative score.
92
b2417b59
JJ
93 * c-parser.c (c_parser_omp_context_selector): Rename
94 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
95 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
96 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
97 and string literals.
98
4e03c3a7
JM
992019-11-14 Joseph Myers <joseph@codesourcery.com>
100
101 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
102 ctsk_tagfirstref_attrs.
103 (struct c_declspecs): Update description of attrs. Add
104 postfix_attrs and non_std_attrs_seen_p. Increase size of
105 typespec_kind bit-field.
106 (c_warn_unused_attributes): New declaration.
107 (parser_xref_tag): Update prototype.
108 * c-decl.c (c_warn_unused_attributes): New function.
109 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
110 ctsk_tagref_attrs. Handle attribute declarations.
111 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
112 (grokdeclarator): Handle standard attributes.
113 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
114 attributes to incomplete type reference.
115 (xref_tag): Update call to parser_xref_tag.
116 (declspecs_add_addrspace, declspecs_add_type)
117 (declspecs_add_scspec, declspecs_add_attrs): Set
118 non_std_attrs_seen_p.
119 (finish_declspecs): Apply postfix standard attributes to type.
120 * c-parser.c (c_token_starts_declspecs)
121 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
122 (c_parser_next_tokens_start_declaration): Update comments.
123 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
124 parser->tokens[2] to parser->tokens[1].
125 (c_parser_nth_token_starts_std_attributes)
126 (c_parser_std_attribute_specifier_sequence): New functions.
127 (c_parser_declaration_or_fndef): Add arguments have_attrs and
128 attrs. All callers changed. Handle standard attributes.
129 (c_parser_parms_declarator, c_parser_parms_list_declarator)
130 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
131 All callers changed.
132 (c_parser_declspecs): Add arguments start_std_attr_ok and
133 end_std_attr_ok. All callers changed. Handle standard
134 attributes.
135 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
136 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
137 (c_parser_compound_statement_nostart, c_parser_all_labels)
138 (c_parser_label, c_parser_statement, c_parser_for_statement):
139 Handle standard attributes.
140 * c-parser.h (c_parser_declspecs): Update prototype.
141 * gimple-parser.c (c_parser_gimple_declaration): Update call to
142 c_parser_declspecs.
143
0c29cac4
ML
1442019-11-12 Martin Liska <mliska@suse.cz>
145
146 * gimple-parser.c: Do not include params.h.
147
028d4092
ML
1482019-11-12 Martin Liska <mliska@suse.cz>
149
150 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
151 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
152 macro.
153
62aee289
MR
1542019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
155 Frederik Harwath <frederik@codesourcery.com>
156
157 gcc/c/
158 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
159 (c_parser_oacc_kernels_parallel): Rename function to...
160 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
161 (c_parser_omp_construct): Update accordingly.
162
163
7cec9588
JJ
1642019-11-11 Jakub Jelinek <jakub@redhat.com>
165
166 * c-parser.c (c_parser_translation_unit): Diagnose declare target
167 without corresponding end declare target.
168
f486280c
RS
1692019-11-08 Richard Sandiford <richard.sandiford@arm.com>
170
171 * c-convert.c (convert): Only handle vector conversions if one of
172 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
173 allows it.
174 * c-typeck.c (build_array_ref): Only allow vector indexing if the
175 vectors satisfy gnu_vector_type_p.
176 (build_unary_op): Only allow unary operators to be applied to
177 vectors if they satisfy gnu_vector_type_p.
178 (digest_init): Only allow by-element initialization of vectors
179 if they satisfy gnu_vector_type_p.
180 (really_start_incremental_init): Likewise.
181 (push_init_level): Likewise.
182 (pop_init_level): Likewise.
183 (process_init_element): Likewise.
184 (build_binary_op): Only allow binary operators to be applied to
185 vectors if they satisfy gnu_vector_type_p.
186
017c6491
JM
1872019-11-08 Joseph Myers <joseph@codesourcery.com>
188
189 * c-decl.c (grokparms): Convert () in a function definition to
190 (void) for C2x.
191 (store_parm_decls_oldstyle): Pedwarn for C2x.
192 (store_parm_decls): Update comment about () not generating a
193 prototype.
194
c01bd174
JM
1952019-11-07 Joseph Myers <joseph@codesourcery.com>
196
197 * c-parser.c (c_parser_attribute_arguments): New function.
198 Factored out of c_parser_gnu_attribute.
199 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
200 (c_parser_balanced_token_sequence, c_parser_std_attribute)
201 (c_parser_std_attribute_specifier): New functions.
202 (c_parser_transaction_attributes): Use
203 c_parser_std_attribute_specifier.
204
471c5330
JM
2052019-11-07 Joseph Myers <joseph@codesourcery.com>
206
207 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
208 lex_joined_string and translate_strings_p.
209 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
210 c_lex_with_flags.
211 (c_parser_string_literal): New function.
212 (c_parser_static_assert_declaration_no_semi): Use
213 c_parser_string_literal. Do not set lex_untranslated_string.
214 (c_parser_asm_string_literal): Use c_parser_string_literal.
215 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
216 (c_parser_gnu_attributes): Set and restore translate_strings_p
217 instead of lex_untranslated_string.
218 (c_parser_asm_statement): Do not set lex_untranslated_string.
219 (c_parser_asm_operands): Likewise.
220 (c_parser_has_attribute_expression): Set and restore
221 translate_strings_p instead of lex_untranslated_string.
222 (c_parser_postfix_expression): Use c_parser_string_literal.
223 (pragma_lex): Likewise.
224 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
225 (c_parse_file): Set translate_strings_p.
226 * gimple-parser.c (c_parser_gimple_postfix_expression)
227 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
228 * c-parser.c (c_parser_string_literal): Declare function.
229
d0c464d2
JJ
2302019-11-02 Jakub Jelinek <jakub@redhat.com>
231
232 * c-parser.c (c_finish_omp_declare_variant): Use
233 omp_get_context_selector instead of c_omp_get_context_selector.
234
ac2cfa6c
RS
2352019-10-29 Richard Sandiford <richard.sandiford@arm.com>
236
237 * c-tree.h (c_simulate_enum_decl): Declare.
238 * c-decl.c (c_simulate_enum_decl): New function.
239 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
240
74078538
RS
2412019-10-29 Richard Sandiford <richard.sandiford@arm.com>
242
243 * c-tree.h (c_simulate_builtin_function_decl): Declare.
244 * c-decl.c (c_simulate_builtin_function_decl): New function.
245 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
246 to the above.
247
ad1539d5
MS
2482019-10-28 Martin Sebor <msebor@redhat.com>
249
250 PR c/66970
251 * c-decl.c (names_builtin_p): Define a new function.
252
cb73e4e7
RB
2532019-10-28 Richard Biener <rguenther@suse.de>
254
255 PR c/92249
256 * gimple-parser.c (c_parser_parse_gimple_body): Make
257 current_bb the entry block initially to easier recover
258 from errors.
259 (c_parser_gimple_compound_statement): Adjust.
260
135df52c
JJ
2612019-10-24 Jakub Jelinek <jakub@redhat.com>
262
263 * c-parser.c (c_finish_omp_declare_variant): Use
264 omp_context_selector_matches instead of
265 c_omp_context_selector_matches.
266 * c-decl.c (c_decl_attributes): Add "omp declare target block"
267 attribute in between declare target and end declare target
268 pragmas.
269
783bfe5e
JM
2702019-10-15 Joseph Myers <joseph@codesourcery.com>
271
272 * c-parser.c (c_parser_attribute_any_word): Rename to
273 c_parser_gnu_attribute_any_word. All callers changed.
274 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
275 callers changed.
276 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
277 callers changed.
278 (c_parser_declaration_or_fndef, c_parser_declspecs)
279 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
280 (c_parser_struct_declaration, c_parser_declarator)
281 (c_parser_gnu_attribute, c_parser_compound_statement)
282 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
283 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
284 attribute-related syntax productions.
285
56898e43
RS
2862019-10-14 Richard Sandiford <richard.sandiford@arm.com>
287
288 * c-objc-common.c (useful_aka_type_p): Replace with...
289 (get_aka_type): ...this new function. Given the original type,
290 decide which aka type to print (if any). Only look through typedefs
291 if user_facing_original_type_p.
292 (print_type): Update accordingly.
293
b9424661
JJ
2942019-10-14 Jakub Jelinek <jakub@redhat.com>
295
296 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
297 into int NESTED, if it is 2, diagnose missing commas in between
298 clauses.
299 (c_parser_omp_context_selector): Pass 2 as last argument to
300 c_parser_omp_all_clauses.
301
20de9568
JJ
3022019-10-12 Jakub Jelinek <jakub@redhat.com>
303
304 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
305 For simd properties, put them directly into TREE_VALUE.
306 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
307 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
308 add "omp declare variant base" attribute rather than
309 "omp declare variant".
310
fe2bc27c
JM
3112019-10-11 Joseph Myers <joseph@codesourcery.com>
312
313 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
314
94e7f906
JJ
3152019-10-10 Jakub Jelinek <jakub@redhat.com>
316
317 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
318 true, terminate processing on closing paren and don't skip to end of
319 pragma line.
320 (c_parser_omp_declare_simd): Handle also declare variant.
321 (omp_construct_selectors, omp_device_selectors,
322 omp_implementation_selectors, omp_user_selectors): New variables.
323 (c_parser_omp_context_selector,
324 c_parser_omp_context_selector_specification,
325 c_finish_omp_declare_variant): New functions.
326 (c_finish_omp_declare_simd): Handle both declare simd and
327 declare variant.
328 (c_parser_omp_declare): Handle declare variant.
329
93313b94
JM
3302019-10-02 Joseph Myers <joseph@codesourcery.com>
331
332 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
333 CPP_COLON tokens.
334
55879815
RS
3352019-10-01 Richard Sandiford <richard.sandiford@arm.com>
336
337 * c-objc-common.c (useful_aka_type_p): New function.
338 (print_type): Use it to decide whether an aka type is worth printing.
339
59bc434a
JJ
3402019-09-27 Jakub Jelinek <jakub@redhat.com>
341
342 PR c++/88203
343 * c-parser.c (c_parser_predefined_identifier): New function.
344 (c_parser_postfix_expression): Use it.
345 (c_parser_omp_variable_list): Parse predefined identifiers.
346 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
347 in shared and firstprivate clauses, even when they are predetermined
348 shared.
349
c6447c20
RS
3502019-09-27 Richard Sandiford <richard.sandiford@arm.com>
351
352 * c-typeck.c (build_function_call_vec): Take the original function
353 decl as an optional final parameter. Pass all built-in calls to
354 check_builtin_function_arguments.
355
522da4c2
EB
3562019-09-20 Eric Botcazou <ebotcazou@adacore.com>
357
358 PR c/91815
359 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
360 of identifiers in the external scope only for variables and functions.
361
68e2c199
PK
3622019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
363
364 PR c/78736
365 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
366
22f8849d
IS
3672019-08-23 Iain Sandoe <iain@sandoe.co.uk>
368
369 PR pch/61250
370 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
371 after determining that the first token is not
372 PRAGMA_GCC_PCH_PREPROCESS.
373
db376f45
EB
3742019-08-22 Eric Botcazou <ebotcazou@adacore.com>
375
376 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
377 FUNCTION_DECL to the right value in the presence of nested declarators.
378
4d732405
RS
3792019-08-13 Richard Sandiford <richard.sandiford@arm.com>
380
381 PR middle-end/91421
382 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
383
cb1180d5
RS
3842019-08-13 Richard Sandiford <richard.sandiford@arm.com>
385
386 PR middle-end/91421
387 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
388 of a built_in_function.
389 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
390
77eb117f
JJ
3912019-08-10 Jakub Jelinek <jakub@redhat.com>
392
393 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
394 (c_parser_omp_clause_device_type): New function.
395 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
396 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
397 (c_parser_omp_declare_target): Handle device_type clauses. Remove
398 diagnostics for declare target with clauses nested in clause-less
399 declare target declaration-definition-seq.
400 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
401
2c3b8bad
JJ
4022019-08-09 Jakub Jelinek <jakub@redhat.com>
403
bb522e2e
JJ
404 * c-parser.c (check_no_duplicate_clause): Simplify using
405 omp_find_clause.
406 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
407 directive name modifiers.
408 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
409
2c3b8bad
JJ
410 PR c/91401
411 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
412 check_no_duplicate_clause call. Comment it out, instead emit a
413 warning for duplicate dist_schedule clauses.
414
99769e7f
RS
4152019-08-08 Richard Sandiford <richard.sandiford@arm.com>
416
417 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
418
8860d270
JJ
4192019-08-08 Jakub Jelinek <jakub@redhat.com>
420
421 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
422 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
423 instead of generic_head to track duplicates.
424
398e3feb
JJ
4252019-08-07 Jakub Jelinek <jakub@redhat.com>
426
427 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
428 (c_parser_omp_clause_use_device_addr): New function.
429 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
430 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
431 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
432 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
433 map or use_device_* clauses.
434 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
435 in OpenMP, require pointer type rather than pointer or array type.
436 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
437
a28351e7
JJ
4382019-07-31 Jakub Jelinek <jakub@redhat.com>
439
440 PR c/91192
441 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
442 even if finish is UNKNOWN_LOCATION, just use start as finish in that
443 case.
444
6343b6bf
ML
4452019-07-25 Martin Liska <mliska@suse.cz>
446 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
447
448 PR c++/23383
449 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
450
cb50701e
ML
4512019-07-25 Martin Liska <mliska@suse.cz>
452
453 * c-decl.c (merge_decls): Use new macros
454 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
455
62e3e66f
RB
4562019-07-23 Richard Biener <rguenther@suse.de>
457
458 PR tree-optimization/83518
459 * gimple-parser.c (c_parser_parse_gimple_body): When we have
460 a CFG also rebuild cgraph edges.
461
554a530f
JJ
4622019-07-20 Jakub Jelinek <jakub@redhat.com>
463
464 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
465 (c_parser_omp_clause_bind): New function.
466 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
467 (OMP_LOOP_CLAUSE_MASK): Define.
468 (c_parser_omp_loop): New function.
469 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
470 loop combined with parallel or teams.
471 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
472 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
473
d119bf79
RS
4742019-07-18 Richard Sandiford <richard.sandiford@arm.com>
475
476 PR c/53633
477 * c-decl.c (finish_function): Check targetm.warn_func_return
478 before issuing a -Wreturn-type warning.
479
ab20d992 4802019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
481
482 * gimple-parser.c (c_parser_gimple_try_stmt): New.
483 (c_parser_compound_statement): Call it.
484
1fdd6f04
JJ
4852019-07-12 Jakub Jelinek <jakub@redhat.com>
486
487 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
488 (c_parser_omp_clause_order): New function.
489 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
490 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
491 PRAGMA_OMP_CLAUSE_ORDER.
492 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
493
8389386c
RB
4942019-07-10 Richard Biener <rguenther@suse.de>
495
496 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
497 _Literal (int *) &x for address literals.
498
99b1c316
MS
4992019-07-09 Martin Sebor <msebor@redhat.com>
500
501 PR c++/61339
502 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
503 to class.
504 (field_decl_cmp): Same.
505 * c-parser.c (c_parser_struct_or_union_specifier): Same.
506 * c-tree.h: Same.
507 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
508
6c1dae73
MS
5092019-07-09 Martin Sebor <msebor@redhat.com>
510
511 PR c++/61339
512 * c-decl.c: Change class-key from class to struct and vice versa
513 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
514 * gimple-parser.c: Same.
515
69b5279e
RB
5162019-07-01 Richard Biener <rguenther@suse.de>
517
518 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
519 _Literal (char *) &"foo" for address literals pointing to
520 STRING_CSTs.
521
ab20d992
JJ
5222019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
523
524 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
525 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
526 C incompatibility if alternate "__intN__" form is used.
527
1e3d475e
MS
5282019-06-24 Martin Sebor <msebor@redhat.com>
529
530 * c-typeck.c (build_binary_op): Hyphenate floating-point.
531
bf38f7e9
JJ
5322019-06-10 Jakub Jelinek <jakub@redhat.com>
533
534 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
535 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
536 (c_parser_omp_scan_loop_body): New function.
537 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
538 inscan reduction clauses.
539 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
540 non-inscan reductions on the same construct, or inscan reductions with
541 ordered or schedule clauses, or inscan array reductions.
542
65985d78
MS
5432019-06-05 Martin Sebor <msebor@redhat.com>
544
545 PR c/90737
546 * c-typeck.c (c_finish_return): Only consider functions returning
547 pointers as candidates for -Wreturn-local-addr.
548
0ecf545c
MS
5492019-06-05 Martin Sebor <msebor@redhat.com>
550
551 * c-decl.c (start_decl): Adjust quoting and hyphenation
552 in diagnostics.
553 (finish_decl): Same.
554 (finish_enum): Same.
555 (start_function): Same.
556 (declspecs_add_type): Same.
557 * c-parser.c (warn_for_abs): Same.
558 * c-typeck.c (build_binary_op): Same.
559
e03436e7
TS
5602019-05-17 Thomas Schwinge <thomas@codesourcery.com>
561
b48f44bf
TS
562 PR c/89433
563 * c-parser.c (c_finish_oacc_routine): Rework checking if already
564 marked with an OpenACC 'routine' directive.
565
5bf04509
TS
566 PR c/89433
567 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
568 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
569
e03436e7
TS
570 PR c/89433
571 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
572 clauses from "omp declare target" attribute.
573
a9c697b8
MS
5742019-05-16 Martin Sebor <msebor@redhat.com>
575
ab20d992
JJ
576 * c-decl.c (start_decl): Quote keywords, operators, and
577 types in diagnostics.
578 (finish_decl): Same.
579 * c-parser.c (c_parser_asm_statement): Same.
580 (c_parser_conditional_expression): Same.
581 (c_parser_transaction_cancel): Same.
582 * c-typeck.c (c_common_type): Same.
583 (build_conditional_expr): Same.
584 (digest_init): Same.
585 (process_init_element): Same.
586 (build_binary_op): Same.
a9c697b8 587
c4499192
RB
5882019-05-17 Richard Biener <rguenther@suse.de>
589
590 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
591 (c_parser_gimple_unary_expression): Likewise.
592 (c_parser_gimple_parentized_ternary_expression): New function.
593
adfe6e4b
RB
5942019-05-16 Richard Biener <rguenther@suse.de>
595
596 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
597 (c_parser_gimple_unary_expression): Likewise.
598
186dabf2
RB
5992019-05-15 Richard Biener <rguenther@suse.de>
600
601 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
602 __BIT_FIELD_REF.
603
1158c5b4
RB
6042019-05-14 Richard Biener <rguenther@suse.de>
605
606 * gimple-parser.c (c_parser_gimple_statement): Remove
607 questionable auto-promotion to VIEW_CONVERT_EXPR.
608 (c_parser_gimple_typespec): Split out from __MEM parsing.
609 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
610 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
611 as __VIEW_CONVERT with -gimple.
612
fd4485aa
ML
6132019-05-09 Martin Liska <mliska@suse.cz>
614
615 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
616 __MAX.
617 (c_parser_gimple_unary_expression): Parse also binary expression
618 __MIN and __MAX.
619 (c_parser_gimple_parentized_binary_expression): New function.
620
d276406a
ML
6212019-05-09 Martin Liska <mliska@suse.cz>
622
623 * gimple-parser.c (struct gimple_parser): Add probability.
624 for gimple_parser_edge.
625 (gimple_parser::push_edge): Add new argument probability.
626 (c_parser_gimple_parse_bb_spec): Parse also probability
627 if present.
628 (c_parser_parse_gimple_body): Set edge probability.
629 (c_parser_gimple_compound_statement): Consume token
630 before calling c_parser_gimple_goto_stmt.
631 Parse BB counts.
632 (c_parser_gimple_statement): Pass new argument.
633 (c_parser_gimple_goto_stmt): Likewise.
634 (c_parser_gimple_if_stmt): Likewise.
635 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
636 * c-parser.c (c_parser_declaration_or_fndef): Pass
637 hot_bb_threshold argument.
638 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
639 field.
640 (c_parser_gimple_parse_bb_spec_edge_probability): New.
641
f179b64e
JJ
6422019-04-26 Jakub Jelinek <jakub@redhat.com>
643
644 PR debug/90197
645 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
646 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
647 (c_parser_do_statement): Likewise.
648 (c_parser_for_statement): Likewise. Formatting fixes.
649 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
650 emit DEBUG_BEGIN_STMTs if needed.
651
e7178413
JJ
6522019-04-19 Jakub Jelinek <jakub@redhat.com>
653
c280b7ee
JJ
654 PR c/89888
655 * c-typeck.c (struct c_switch): Remove outside_range_p member.
656 (c_start_case): Don't clear it.
657 (do_case): Adjust c_add_case_label caller.
658 (c_finish_case): Adjust c_do_switch_warnings caller.
659
e7178413
JJ
660 PR c++/90108
661 * c-decl.c (merge_decls): If remove is main variant and
662 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
663 variant that has newdecl as TYPE_NAME if any.
664
60a2c645
JJ
6652019-04-12 Jakub Jelinek <jakub@redhat.com>
666
667 PR c/89933
668 * c-decl.c (merge_decls): When newdecl's type is its main variant,
669 don't try to remove it from the variant list, but instead assert
670 it has no variants.
671
2a82beaa
RB
6722019-04-01 Richard Biener <rguenther@suse.de>
673
674 PR c/71598
675 * c-tree.h (c_get_alias_set): Declare.
676 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
677 * c-objc-common.c (c_get_alias_set): Treat enumeral types
678 as the underlying integer type.
679
bec1da64
MS
6802019-03-19 Martin Sebor <msebor@redhat.com>
681
682 PR tree-optimization/89688
683 * c-decl.c (finish_decl): Call braced_lists_to_string for more
684 kinds of initializers.
685
855cd9b1
JJ
6862019-03-19 Jakub Jelinek <jakub@redhat.com>
687
688 PR c/89734
689 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
690 return type even if quals_used is 0. Formatting fixes.
691
baa09dc5
RB
6922019-03-14 Richard Biener <rguenther@suse.de>
693
694 * c-tree.h (enum c_declspec_il): New.
695 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
696 enum bitfield.
697 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
698 Pass start pass and declspec_il to c_parser_parse_gimple_body.
699 (c_parser_declspecs): Adjust.
700 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
701 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
702 and bitmap.h.
703 (struct gimple_parser): New.
704 (gimple_parser::push_edge): New method.
705 (c_parser_gimple_parse_bb_spec): New helper.
706 (c_parser_parse_gimple_body): Get start pass and IL specification.
707 Initialize SSA and CFG.
708 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
709 Build a gimple_parser parsing state and pass it along.
710 (c_parser_gimple_statement): Change intermittend __PHI internal
711 function argument for the edge.
712 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
713 (c_parser_gimple_goto_stmt): Record edges to build.
714 (c_parser_gimple_if_stmt): Likewise.
715 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
716 (c_parser_gimple_or_rtl_pass_list): Likewise.
717
a3f9f006
ML
7182019-03-11 Martin Liska <mliska@suse.cz>
719
720 * c-decl.c (check_for_loop_decls): Wrap an option name
721 in a string format message and fix GNU coding style.
722 * c-parser.c (c_parser_declspecs): Likewise.
723
1db01ff9
JJ
7242019-03-08 Jakub Jelinek <jakub@redhat.com>
725
726 PR tree-optimization/89550
727 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
728 returned true.
729 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
730 or warning returned true.
731
66dcb747
JJ
7322019-02-28 Jakub Jelinek <jakub@redhat.com>
733
734 PR c/89525
735 * c-typeck.c (convert_arguments): Call inform_declaration only if
736 the previous warning_at call returned true.
737
2263c9f2
TS
7382019-02-22 Thomas Schwinge <thomas@codesourcery.com>
739
740 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
741 parameter. Adjust all users.
742 (c_parser_oacc_simple_clause): Replace parser with loc formal
743 parameter. Adjust all users.
744
ab20d992 7452019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
746
747 PR c/87924
748 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
749 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
750
5f88ba10
JJ
7512019-02-15 Jakub Jelinek <jakub@redhat.com>
752
753 PR c/89340
754 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
755 before c_decl_attributes rather than after it.
756
cfc30fd1
JJ
7572019-02-06 Jakub Jelinek <jakub@redhat.com>
758
759 PR c/89211
760 * c-parser.c (c_parser_declaration_or_fndef): Don't update
761 DECL_ARGUMENTS of d if it has been defined already. Use a single if
762 instead of 3 nested ifs.
763
fbe83e6b
JM
7642019-02-06 Joseph Myers <joseph@codesourcery.com>
765
766 PR c/88584
767 * c-decl.c (finish_decl): Do not complete array types for arrays
768 with external linkage not at file scope.
769
f461f938
RB
7702019-02-05 Richard Biener <rguenther@suse.de>
771
772 PR c/88606
773 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
774 all type variants when not supported.
775
fe509359
JJ
7762019-01-30 Jakub Jelinek <jakub@redhat.com>
777
778 PR c/89061
779 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
780 * c-decl.c (decl_jump_unsafe): Return false for
781 C_DECL_COMPOUND_LITERAL_P decls.
782 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
783
6a335b96
JJ
7842019-01-29 Jakub Jelinek <jakub@redhat.com>
785
f4b7e754
JJ
786 PR c/89045
787 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
788 scope.
789
6a335b96
JJ
790 PR c/86125
791 * c-decl.c (last_fileptr_type): Remove.
792 (last_structptr_types): New variable.
793 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
794 {old,new}rettype instead of the types themselves. Assert
795 last_structptr_types array has the same number of elements
796 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
797 argument oldtype and newtype. Instead of handling
798 just fileptr_type_node specially, handle all builtin_structptr_types
799 pointer nodes. Formatting fix.
800
d8b5a1a0
MS
8012019-01-24 Martin Sebor <msebor@redhat.com>
802
803 PR c/86125
804 PR c/88886
805 PR middle-end/86308
806 * c-decl.c (match_builtin_function_types): Add arguments.
807 (diagnose_mismatched_decls): Diagnose mismatched declarations
808 of built-ins more strictly.
809
e21c4491
JJ
8102019-01-24 Jakub Jelinek <jakub@redhat.com>
811
812 PR c++/88976
813 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
814 on #pragma omp cancel with different modifiers.
815
420183d9
L
8162019-01-18 H.J. Lu <hongjiu.lu@intel.com>
817
818 PR c/51628
819 PR c/88664
820 * c-typeck.c (convert_for_assignment): Upate the
821 warn_for_address_or_pointer_of_packed_member call.
822
17ad43dd
TH
8232019-01-16 Tom Honermann <tom@honermann.net>
824 Jason Merrill <jason@redhat.com>
825
826 * c-typeck.c (digest_init): Revised the error message produced for
827 ill-formed cases of array initialization with a string literal.
828 (error_init): Make variadic.
829
5f07d78a
JJ
8302019-01-12 Jakub Jelinek <jakub@redhat.com>
831
832 * c-typeck.c (convert_for_assignment): Fix a comment typo.
833
c4581bbf
JJ
8342019-01-07 Jakub Jelinek <jakub@redhat.com>
835
836 PR c/88701
837 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
838 if current_function_decl is non-NULL.
839
65c5b1eb
JM
8402019-01-07 Joseph Myers <joseph@codesourcery.com>
841
842 PR c/88720
843 PR c/88726
844 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
845 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
846 functions declared but never defined only for external scope, not
847 for other scopes.
848
d8fcab68
JJ
8492019-01-07 Jakub Jelinek <jakub@redhat.com>
850
851 PR c++/85052
852 * c-parser.c (c_parser_postfix_expression): Parse
853 __builtin_convertvector.
854
a5544970
JJ
8552019-01-01 Jakub Jelinek <jakub@redhat.com>
856
857 Update copyright years.
858
da77eace
L
8592018-12-20 H.J. Lu <hongjiu.lu@intel.com>
860
861 PR c/51628
862 * c-typeck.c (convert_for_assignment): Call
863 warn_for_address_or_pointer_of_packed_member.
864
1edf8866
SB
8652018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
866
867 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
868 a more specific error message (instead of just falling through).
869
db4fd626
SB
8702018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
871
872 * c-parser.c (c_parser_asm_statement): Keep track of the location each
873 asm qualifier is first seen; use that to give nicer "duplicate asm
874 qualifier" messages. Delete 'quals" variable, instead pass the
875 "is_volatile_ flag to build_asm_stmt directly.
876 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
877 * c-typeck.c (build_asm_stmt): Ditto; adjust.
878
9c9cfcbb
SB
8792018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
880
881 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
882 "done" boolean variable.
883
a14feb3c
DM
8842018-12-19 David Malcolm <dmalcolm@redhat.com>
885
886 PR c++/87504
887 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
888 Move from here to gcc-rich-location.h and gcc-rich-location.c.
889 (build_binary_op): Use struct op_location_t and
890 class binary_op_rich_location.
891
6d939173
JJ
8922018-12-11 Jakub Jelinek <jakub@redhat.com>
893
894 PR sanitizer/88426
895 * c-convert.c (convert): Call c_fully_fold before calling
896 ubsan_instrument_float_cast.
897
b7055028
SB
8982018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
899
900 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
901 setting "quals".
902
5b76e75f
SB
9032018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
904
905 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
906 after asm. Pass a flag for it to build_asm_expr.
907 * c-tree.h (build_asm_expr): Update declaration.
908 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
909 set ASM_INLINE_P.
910
30bd42b9
SB
9112018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
912
913 PR inline-asm/55681
914 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
915 combination of volatile and goto, in any order, without repetitions.
916
9df6c0e4
JB
9172018-12-04 James Norris <jnorris@codesourcery.com>
918 Cesar Philippidis <cesar@codesourcery.com>
919 Julian Brown <julian@codesourcery.com>
920
921 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
922 code.
923
f44697b7
RB
9242018-11-30 Richard Biener <rguenther@suse.de>
925
926 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
927 _Literal (type) { ... } as empty aggregate or vector constructor.
928
550dfbdc
MS
9292018-11-29 Martin Sebor <msebor@redhat.com>
930
931 PR c/88091
932 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
933 (convert_arguments): Add comments. Pass additional argument to
934 the function above.
935
673670da
MS
9362018-11-29 Martin Sebor <msebor@redhat.com>
937
938 PR c/88172
939 PR testsuite/88208
940 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
941
db1d09b0
MS
9422018-11-23 Martin Sebor <msebor@redhat.com>
943
944 PR testsuite/88098
945 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
946 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
947
98f08eb8
MS
9482018-11-20 Martin Sebor <msebor@redhat.com>
949
950 * c-parser.c (c_parser_has_attribute_expression): New function.
951 (c_parser_attribute): New function.
952 (c_parser_attributes): Move code into c_parser_attribute.
953 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
954
cd5da983
MS
9552018-11-15 Martin Sebor <msebor@redhat.com>
956
957 PR c/83656
958 * c-decl.c (header_for_builtin_fn): Declare.
959 (diagnose_mismatched_decls): Diagnose declarations of built-in
960 functions without a prototype.
961 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
962 (convert_argument): Same.
963 (convert_arguments): Factor code out into convert_argument.
964 Detect mismatches between built-in formal arguments in calls
965 to built-in without prototype.
966 (build_conditional_expr): Same.
967 (type_or_builtin_type): New function.
968 (convert_for_assignment): Add argument. Conditionally issue
969 warnings instead of errors for mismatches.
970
620e594b
DM
9712018-11-13 David Malcolm <dmalcolm@redhat.com>
972
973 * c-decl.c: Replace "source_location" with "location_t".
974 * c-tree.h: Likewise.
975 * c-typeck.c: Likewise.
976 * gimple-parser.c: Likewise.
977
3179ebae
JJ
9782018-11-09 Jakub Jelinek <jakub@redhat.com>
979
81a227c6
JJ
980 * c-parser.c (c_parser_omp_clause_final): Use
981 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
982 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
983 parsing instead of c_parser_paren_condition.
984 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
985 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
986 c_fully_fold instead of c_parser_condition.
987 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
988 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
989 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
990 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
991 c_parser_expr_no_commas instead of c_parser_expression.
992
98c91c56
JJ
993 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
994 reduction clause with inscan modifier.
995
3179ebae
JJ
996 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
997 clauses other than atomic_default_mem_order.
998
28567c40
JJ
9992018-11-08 Jakub Jelinek <jakub@redhat.com>
1000
1001 * c-parser.c: Include memmode.h.
1002 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1003 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1004 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1005 task_reduction clauses.
1006 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1007 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1008 section, or lvalue assignment expression.
1009 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1010 (c_parser_omp_clause_lastprivate): Parse optional
1011 conditional: modifier.
1012 (c_parser_omp_clause_hint): Require constant integer expression rather
1013 than just integer expression.
1014 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1015 clause.
1016 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1017 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1018 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1019 functions.
1020 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1021 iterators. Parse mutexinoutset and depobj kinds.
1022 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1023 callers.
1024 (c_parser_omp_all_clauses): Likewise. Handle
1025 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1026 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1027 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1028 default memory order from requires directive if any. Adjust
1029 c_finish_omp_atomic caller.
1030 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1031 (c_parser_omp_flush): Parse flush with memory-order-clause.
1032 (c_parser_omp_for_loop): Allow NE_EXPR even in
1033 OpenMP loops, adjust c_finish_omp_for caller.
1034 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1035 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1036 Allow to be called while parsing combined parallel master.
1037 Parse combined master taskloop{, simd}.
1038 (c_parser_omp_parallel): Parse combined
1039 parallel master{, taskloop{, simd}} constructs.
1040 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1041 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1042 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1043 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1044 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1045 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1046 around teams body. Use SET_EXPR_LOCATION.
1047 (c_parser_omp_target_data): Allow target data
1048 with only use_device_ptr clauses.
1049 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1050 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1051 (c_parser_omp_requires): New function.
1052 (c_finish_taskloop_clauses): New function.
1053 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1054 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1055 declaration. Disallow in_reduction clause when combined with parallel
1056 master.
1057 (c_parser_omp_construct): Adjust c_parser_omp_master and
1058 c_parser_omp_taskgroup callers.
1059 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1060 other than cancel.
1061 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1062 like OMP_CLAUSE_REDUCTION.
1063 (handle_omp_array_sections): Likewise. Call save_expr on array
1064 reductions before calling build_index_type. Handle depend clauses
1065 with iterators.
1066 (struct c_find_omp_var_s): New type.
1067 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1068 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1069 with static, runtime or auto schedule kinds. Call save_expr for whole
1070 array reduction sizes. Diagnose reductions with zero sized elements
1071 or variable length structures. Diagnose nogroup clause used with
1072 reduction clause(s). Handle depend clause with
1073 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1074 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1075 some different type for other kinds. Use build_unary_op with
1076 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1077 Handle depend clauses with iterators. Remove no longer needed special
1078 case that predetermined const qualified vars may be specified in
1079 firstprivate clause. Complain if const qualified vars are mentioned
1080 in data-sharing clauses other than firstprivate or shared. Use
1081 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1082 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1083 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1084 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1085
7e2de6df
DM
10862018-10-29 David Malcolm <dmalcolm@redhat.com>
1087
1088 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1089 logic for change to name_hint::operator bool.
1090 (undeclared_variable): Likewise.
1091 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1092 (c_parser_parameter_declaration): Likewise.
1093
9f936c86
JM
10942018-10-17 Joseph Myers <joseph@codesourcery.com>
1095
1096 * c-errors.c (pedwarn_c11): New function.
1097 * c-parser.c (disable_extension_diagnostics): Save
1098 warn_c11_c2x_compat and set it to 0.
1099 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1100 (c_parser_static_assert_declaration_no_semi): Handle
1101 _Static_assert without string constant.
1102 * c-tree.h (pedwarn_c11): New prototype.
1103
033eb567
DM
11042018-10-17 David Malcolm <dmalcolm@redhat.com>
1105
1106 * Make-lang.in (selftest-c): New.
1107 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1108 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1109 from gcc/Makefile.in.
1110
0edf3afe
RB
11112018-10-02 Richard Biener <rguenther@suse.de>
1112
1113 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1114
8313a764
JM
11152018-09-26 Joseph Myers <joseph@codesourcery.com>
1116
1117 PR c/87390
1118 * c-typeck.c (build_binary_op): Use excess precision for
1119 comparisons of integers and floating-point for C11 and later.
1120
ce6f0888
MJ
11212018-09-26 Martin Jambor <mjambor@suse.cz>
1122
1123 PR c/87347
1124 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1125 comment.
ce6f0888 1126
9c4a4b3c
DM
11272018-09-17 David Malcolm <dmalcolm@redhat.com>
1128
1129 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1130 Update for new param.
1131 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1132 Likewise.
1133
80c6d1f4
MJ
11342018-09-17 Martin Jambor <mjambor@suse.cz>
1135
1136 PR c/63886
1137 * c-parser.c: (warn_for_abs): New function.
1138 (c_parser_postfix_expression_after_primary): Call it.
1139
4a426e36
BE
11402018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1141
1142 * c-typeck.c (digest_init): Shorten overlength strings.
1143
6d900107
BE
11442018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1145
1146 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1147
b5764229
BE
11482018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1149
1150 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1151 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1152
22eea6b2
AM
11532018-08-30 Alexander Monakov <amonakov@ispras.ru>
1154
1155 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1156 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1157
85204e23
DM
11582018-08-27 David Malcolm <dmalcolm@redhat.com>
1159
1160 PR 87091
1161 * c-decl.c (implicitly_declare): Update call to
1162 maybe_add_include_fixit to suggest overriding the location, as it
1163 is for a note.
1164 * c-objc-common.c (c_tree_printer): Update for conversion of
1165 show_caret_p to a tri-state.
1166
3d78e008
ML
11672018-08-27 Martin Liska <mliska@suse.cz>
1168
1169 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1170 fndecl_built_in_p and remove check for FUNCTION_DECL if
1171 possible.
3d78e008
ML
1172 (diagnose_mismatched_decls): Likewise.
1173 (merge_decls): Likewise.
1174 (warn_if_shadowing): Likewise.
1175 (pushdecl): Likewise.
1176 (implicitly_declare): Likewise.
1177 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1178 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1179 * c-typeck.c (build_function_call_vec): Likewise.
1180 (convert_arguments): Likewise.
1181
097f82ec
DM
11822018-08-20 David Malcolm <dmalcolm@redhat.com>
1183
1184 PR other/84889
1185 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1186 (diagnose_mismatched_decls): Likewise, in various places.
1187 (warn_if_shadowing): Likewise.
1188 (implicit_decl_warning): Likewise.
1189 (implicitly_declare): Likewise.
1190 (undeclared_variable): Likewise.
1191 (declare_label): Likewise.
1192 (grokdeclarator): Likewise.
1193 (start_function): Likewise.
1194 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1195 (c_parser_parameter_declaration): Likewise.
1196 (c_parser_binary_expression): Likewise.
1197 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1198 (parser_build_binary_op): Likewise.
1199 (build_unary_op): Likewise.
1200 (error_init): Likewise.
1201 (pedwarn_init): Likewise.
1202 (warning_init): Likewise.
1203 (convert_for_assignment): Likewise.
1204
96e6ae57
DM
12052018-08-15 David Malcolm <dmalcolm@redhat.com>
1206
1207 * c-objc-common.c: Include "gcc-rich-location.h".
1208 (c_tree_printer): Move implemenation of '%T' to...
1209 (print_type): ...this new function.
1210 (range_label_for_type_mismatch::get_text): New function.
1211 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1212 range for the various ic_argpass cases.
1213 (class maybe_range_label_for_tree_type_mismatch): New class.
1214 (build_binary_op): Use it when calling binary_op_error.
1215
0cd020ae 12162018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1217
0cd020ae
PK
1218 * c-decl.c (start_decl): Do not warn if variables is named as main
1219 and is a local variable.
1220
72733314
IS
12212018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1222
1223 PR c/19315
1224 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1225 objects of unknown size.
1226
23aa9f7c
MS
12272018-08-13 Martin Sebor <msebor@redhat.com>
1228
1229 PR tree-optimization/71625
1230 * c-parser.c (c_parser_declaration_or_fndef): Call
1231 braced_list_to_string.
1232
e5e7e50d
BH
12332018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1234
1235 PR c/86690
1236 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1237 errors.
1238
8a45b051
MS
12392018-08-01 Martin Sebor <msebor@redhat.com>
1240
1241 PR tree-optimization/86650
1242 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1243 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1244
5922dcb5
JJ
12452018-08-01 Jakub Jelinek <jakub@redhat.com>
1246
1247 PR c/85704
1248 * c-typeck.c (init_field_decl_cmp): New function.
1249 (output_pending_init_elements): Use it for field comparisons
1250 instead of pure bit_position comparisons.
1251
9b452033
JJ
12522018-07-12 Jakub Jelinek <jakub@redhat.com>
1253
1254 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1255 type here, instead add "omp declare target implicit" attribute.
1256 (finish_decl): Diagnose vars without mappable type here.
1257
ab20d992
JJ
12582018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1259 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1260 Cesar Philippidis <cesar@codesourcery.com>
1261
1262 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1263 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1264 to their non-present_or_* counterparts. Make 'self' an alias to
1265 PRAGMA_OACC_CLAUSE_HOST.
1266 (c_parser_oacc_data_clause): Update GOMP mappings for
1267 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1268 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1269 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1270 Remove support for present_or_* clauses.
1271 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1272 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1273 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1274 (OACC_DATA_CLAUSE_MASK): Likewise.
1275 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1276 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1277 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1278 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1279 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1280
e197e64e
KV
12812018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1282
1283 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1284 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1285 (c_parser_gimple_unary_expression): Likewise.
1286
487f2f61
JJ
12872018-06-15 Jakub Jelinek <jakub@redhat.com>
1288
1289 PR c/86093
1290 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1291 before doing POINTER_DIFF_EXPR.
1292
e4d44a37
MP
12932018-06-07 Marek Polacek <polacek@redhat.com>
1294
1295 PR c/85318
1296 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1297 for loop initial declarations.
1298
b67b9225
DP
12992018-05-30 David Pagan <dave.pagan@oracle.com>
1300
1301 PR c/55976
1302 * c-decl.c (grokdeclarator): Update check for return type warnings.
1303 (start_function): Likewise.
1304 (finish_function): Likewise.
1305 * c-typeck.c (c_finish_return): Update check for return type warnings.
1306 Pass OPT_Wreturn_type to pedwarn when appropriate.
1307
c566cc9f
RS
13082018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1309
1310 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1311 __FMA_EXPR handlng.
1312
e4f81565
RS
13132018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1314
1315 * gimple-parser.c: Include internal-fn.h.
1316 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1317 (c_parser_gimple_call_internal): New function.
1318 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1319 Fix typos in comment.
1320
79e7b1fe
JJ
13212018-05-10 Jakub Jelinek <jakub@redhat.com>
1322
1323 PR c++/85662
1324 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1325 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1326 fold_convert_loc.
1327 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1328 fold_offsetof_1, pass argtype as TYPE to it and drop the
1329 fold_convert_loc.
1330
f7584c81
DP
13312018-05-02 David Pagan <dave.pagan@oracle.com>
1332
1333 PR c/30552
1334 * c-decl.c (old_style_parameter_scope): New function.
1335 * c-parser.c (c_parser_postfix_expression): Check for statement
1336 expressions in old-style function parameter list declarations.
1337 * c-parser.h (old_style_parameter_scope): New extern declaration.
1338
b33a0cb3
JJ
13392018-04-25 Jakub Jelinek <jakub@redhat.com>
1340
1341 PR sanitizer/84307
1342 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1343 it is not TREE_STATIC.
1344 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1345 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1346 its COMPOUND_LITERAL_EXPR_DECL.
1347
c5c5822a
JM
13482018-03-21 Joseph Myers <joseph@codesourcery.com>
1349
1350 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1351 where all functions return the same _FloatN or _FloatNx type,
1352 treat integer types as _Float64 instead of double.
1353
aa1c9429
JJ
13542018-03-21 Jakub Jelinek <jakub@redhat.com>
1355
1356 PR c/84999
1357 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1358 building vector comparison, diagnose it and return error_mark_node.
1359
9bb45a95
JJ
13602018-03-15 Jakub Jelinek <jakub@redhat.com>
1361
1362 PR c/84853
1363 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1364 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1365 INTEGER_TYPE element type.
1366
ada6bad9
DP
13672018-03-13 David Pagan <dave.pagan@oracle.com>
1368
1369 PR c/46921
1370 * c-typeck.c (output_init_element): Ensure field initializer
1371 expression is always evaluated if there are side effects.
1372
849bbdb9
JJ
13732018-03-06 Jakub Jelinek <jakub@redhat.com>
1374
1375 PR c/84721
1376 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1377 !building_stmt_list_p ().
1378
d74641bd
RS
13792018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1380
1381 PR c/84305
1382 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1383 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1384 and include the BIND_EXPR in the list of things that need to be
1385 pre-evaluated.
1386
0444aa9c
NS
13872018-02-09 Nathan Sidwell <nathan@acm.org>
1388
1389 PR c/84293
1390 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1391 to strict_aliasing_warning.
1392
7c30b12a
PC
13932018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1394
1395 * c-typeck.c (really_start_incremental_init, push_init_level,
1396 set_nonincremental_init, output_init_element, process_init_element):
1397 Use DECL_UNNAMED_BIT_FIELD.
1398
2be4dfcb
MP
13992018-01-31 Marek Polacek <polacek@redhat.com>
1400
1401 PR c/81779
1402 * c-parser.c (c_parser_compound_statement_nostart): Call
1403 expansion_point_location_if_in_system_header.
1404
bb9869d5
DM
14052018-01-17 David Malcolm <dmalcolm@redhat.com>
1406
1407 PR c++/83814
1408 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1409 the C part.
1410
b4923738
JJ
14112018-01-13 Jakub Jelinek <jakub@redhat.com>
1412
1413 PR c/83801
1414 * c-tree.h (decl_constant_value_1): Add a bool argument.
1415 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1416 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1417 (decl_constant_value): Adjust caller.
1418 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1419 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1420 decl_constant_value returns initializer that has BLKmode or
1421 array type.
1422 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1423
928686b1
RS
14242018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1425 Alan Hayward <alan.hayward@arm.com>
1426 David Sherwood <david.sherwood@arm.com>
1427
1428 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1429 TYPE_VECTOR_SUBPARTS.
1430
85ec4feb
JJ
14312018-01-03 Jakub Jelinek <jakub@redhat.com>
1432
1433 Update copyright years.
1434
913884f7
JJ
14352018-01-01 Jakub Jelinek <jakub@redhat.com>
1436
1437 PR c/83595
1438 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1439 c_parser_conditional_expression, c_parser_cast_expression,
1440 c_parser_sizeof_expression, c_parser_alignof_expression,
1441 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1442 c_parser_transaction_expression): Use set_error () method instead
1443 of setting value member to error_mark_node.
1444
c6cfa2bf
MM
14452017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1446
1447 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1448 and _Float<N>X built-in functions.
1449
11d29d63
JJ
14502017-12-22 Jakub Jelinek <jakub@redhat.com>
1451
14ec014e
JJ
1452 PR debug/83550
1453 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1454 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1455 incomplete vars rather than after it.
1456
11d29d63
JJ
1457 PR debug/83547
1458 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1459 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1460 and consider empty ones if there are no other stmts. For
1461 -Wunused-value walk all statements before the one only followed by
1462 DEBUG_BEGIN_STMTs.
1463
170a8bd6 14642017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1465 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1466
1467 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1468 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1469 (c_parser_do_statement): Likewise.
1470 (c_parser_for_statement): Likewise.
1471 (c_parser_statement_after_labels): Adjust calls to above.
1472 (c_parse_pragma_ivdep): New static function.
1473 (c_parser_pragma_unroll): Likewise.
1474 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1475 <PRAGMA_UNROLL>: New case.
1476
01512446
JJ
14772017-12-19 Jakub Jelinek <jakub@redhat.com>
1478
1479 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1480 perform_integral_promotions, digest_init): Replace Yoda conditions
1481 with typical order conditions.
1482 * c-decl.c (check_bitfield_type_and_width): Likewise.
1483
c65e18d3
BE
14842017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1485
1486 * c-typeck.c (c_safe_arg_type_equiv_p,
1487 c_safe_function_type_cast_p): New function.
1488 (build_c_cast): Implement -Wcast-function-type.
1489
b7280579
RB
14902017-12-14 Richard Biener <rguenther@suse.de>
1491
1492 PR c/83415
1493 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1494 like REALPART_EXPR for the behavior of whether its operand
1495 is an lvalue.
1496
49e6a6c0
MP
14972017-12-12 Marek Polacek <polacek@redhat.com>
1498
1499 PR c/82679
1500 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1501
ab20d992 15022017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1503
1504 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1505 * c-parser.c (add_debug_begin_stmt): New.
1506 (c_parser_declaration_or_fndef): Call it.
1507 (c_parser_compound_statement_nostart): Likewise.
1508 (c_parser_statement_after_labels): Likewise.
1509 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1510
4b2b493f
JM
15112017-12-07 Joseph Myers <joseph@codesourcery.com>
1512
1513 * c-decl.c (build_compound_literal): Add parameter alignas_align
1514 and set alignment of decl if nonzero.
1515 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1516 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1517 qualifier.
1518 (c_parser_struct_declaration): Update syntax comment.
1519 (c_parser_type_name): Add alignas_ok argument and pass it to
1520 c_parser_declspecs.
1521 (c_parser_cast_expression): Pass true to c_parser_type_name and
1522 give error if a cast used an _Alignas specifier.
1523 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1524 give error if sizeof (type-name) used an _Alignas specifier.
1525 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1526 give error if _Alignof (type-name) used an _Alignas specifier.
1527 (c_parser_postfix_expression_after_paren_type): Check specified
1528 alignment for a compound literal and pass it to
1529 build_compound_literal.
1530 * c-parser.h (c_parser_type_name): Update prototype.
1531 * c-tree.h (build_compound_literal): Update prototype.
1532
5d9ae53d
MS
15332017-12-07 Martin Sebor <msebor@redhat.com>
1534
1535 PR c/81544
1536 * c-decl.c (c_decl_attributes): Look up existing declaration and
1537 pass it to decl_attributes.
1538
c79144f8
DM
15392017-12-06 David Malcolm <dmalcolm@redhat.com>
1540
1541 PR c/83236
1542 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1543 reserved for use by the implementation.
1544
613bc14f
DM
15452017-12-06 David Malcolm <dmalcolm@redhat.com>
1546
1547 * c-decl.c: Include "c-family/c-spellcheck.h".
1548
05abad4c
ML
15492017-12-05 Martin Liska <mliska@suse.cz>
1550 Jakub Jelinek <jakub@redhat.com>
1551
1552 * c-typeck.c (pointer_diff): Add new argument and instrument
1553 pointer subtraction.
1554 (build_binary_op): Similar for pointer comparison.
1555
cc6534d4
JJ
15562017-12-01 Jakub Jelinek <jakub@redhat.com>
1557
65791f42
JJ
1558 PR c/79153
1559 * c-parser.c: Include tree-iterator.h.
1560 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1561 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1562 on it.
1563
cc6534d4
JJ
1564 PR c/83222
1565 * c-tree.h (decl_constant_value_1): Declare.
1566 * c-typeck.c (decl_constant_value_1): New function.
1567 (decl_constant_value): Use it.
1568 * c-fold.c (c_fully_fold_internal): If in_init, use
1569 decl_constant_value_1 instead of decl_constant_value.
1570
5de73c05
JJ
15712017-11-30 Jakub Jelinek <jakub@redhat.com>
1572
1573 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1574
058f0b9e
JJ
15752017-11-28 Jakub Jelinek <jakub@redhat.com>
1576
1577 PR sanitizer/81275
1578 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1579 c_switch_covers_all_cases_p returns true.
1580
5e9d6aa4 15812017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1582 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1583
1584 * Make-lang.in (c/c-array-notation.o): Remove.
1585 * c-array-notation.c: Delete.
1586 * c-decl.c: Remove cilkplus condition.
1587 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1588 c_parser_cilk_verify_simd, c_parser_array_notation,
1589 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1590 c_parser_cilk_simd_fn_vector_attrs,
1591 c_finish_cilk_simd_fn_tokens): Delete.
1592 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1593 (c_parser_direct_declarator_inner): Ditto.
1594 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1595 (c_parser_attributes, c_parser_compound_statement,
1596 c_parser_statement_after_labels, c_parser_if_statement,
1597 c_parser_switch_statement, c_parser_while_statement,
1598 c_parser_do_statement, c_parser_for_statement,
1599 c_parser_unary_expression, c_parser_postfix_expression,
1600 c_parser_postfix_expression_after_primary,
1601 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1602 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1603 support.
1604 * c-typeck.c (build_array_ref, build_function_call_vec,
1605 convert_arguments,
1606 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1607 c_finish_loop, build_binary_op): Remove cilkplus support.
1608
9e851845
JJ
16092017-11-28 Jakub Jelinek <jakub@redhat.com>
1610
1611 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1612 of build3.
1613
ab20d992 16142017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
1615
1616 * Make-lang.in (c.install-plugin): Install backend import library.
1617
41521dee
JJ
16182017-11-23 Jakub Jelinek <jakub@redhat.com>
1619
1620 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1621 pragma_stmt context.
1622
ac9effed
EB
16232017-11-23 Mike Stump <mikestump@comcast.net>
1624 Eric Botcazou <ebotcazou@adacore.com>
1625
1626 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1627 ANNOTATE_EXPR.
1628 (c_parser_do_statement): Likewise.
1629 (c_parser_for_statement): Likewise.
1630
ce95abc4
DM
16312017-11-22 David Malcolm <dmalcolm@redhat.com>
1632
1633 PR c++/62170
1634 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1635 bool to bool *. Within '%T' handling, if showing an "aka", use
1636 "quoted" param to add appropriate quoting.
1637
974aedcc
MP
16382017-11-22 Marek Polacek <polacek@redhat.com>
1639
1640 PR c++/60336
1641 PR middle-end/67239
1642 PR target/68355
1643 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1644
d4300cc6
DM
16452017-11-21 David Malcolm <dmalcolm@redhat.com>
1646
1647 PR c/83056
1648 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1649 earlier failed lookups.
1650
1af4ebf5
MG
16512017-11-21 Marc Glisse <marc.glisse@inria.fr>
1652
1653 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1654 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1655
26edace6
DM
16562017-11-20 David Malcolm <dmalcolm@redhat.com>
1657
1658 PR c/81404
1659 * c-decl.c: Include "c-family/known-headers.h".
1660 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1661 to known-headers.cc.
1662 (class suggest_missing_header): Move to known-header.h.
1663 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1664 than get_c_name_hint.
1665
b1212255
DM
16662017-11-20 David Malcolm <dmalcolm@redhat.com>
1667
1668 * c-decl.c (get_c_name_hint): New function.
1669 (class suggest_missing_header): New class.
1670 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1671 suggest missing headers to the user.
1672
6c7a259b
DM
16732017-11-20 David Malcolm <dmalcolm@redhat.com>
1674
1675 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1676 Include "c-family/name-hint.h"
1677 (implicit_decl_warning): Convert "hint" from
1678 const char * to name_hint. Pass location to
1679 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1680 warning was not printed.
1681 (undeclared_variable): Likewise for "guessed_id".
1682 (lookup_name_fuzzy): Convert return type from const char *
1683 to name_hint. Add location_t param.
1684 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1685 Include "c-family/name-hint.h"
1686 (c_parser_declaration_or_fndef): Convert "hint" from
1687 const char * to name_hint. Pass location to lookup_name_fuzzy.
1688 (c_parser_parameter_declaration): Likewise.
1689
f9c59f7e
JJ
16902017-11-19 Jakub Jelinek <jakub@redhat.com>
1691
1692 PR c/66618
1693 PR c/69960
1694 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1695 where needed.
1696 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1697 handle_omp_array_sections): Likewise.
1698 (digest_init): Don't call decl_constant_value_for_optimization.
1699 * c-tree.h (decl_constant_value_for_optimization): Removed.
1700 * c-fold.c (c_fold_array_ref): New function.
1701 (c_fully_fold_internal): Add LVAL argument, propagate it through
1702 recursive calls. For VAR_P call decl_constant_value and
1703 unshare if not LVAL and either optimizing or IN_INIT. Remove
1704 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1705 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1706 (c_fully_fold): Add LVAL argument, pass it through to
1707 c_fully_fold_internal.
1708 (decl_constant_value_for_optimization): Removed.
1709
3ca0dc60
JM
17102017-11-15 Joseph Myers <joseph@codesourcery.com>
1711
1712 PR c/81156
1713 * c-parser.c (check_tgmath_function): New function.
1714 (enum tgmath_parm_kind): New enum.
1715 (c_parser_postfix_expression): Handle __builtin_tgmath.
1716
64a5912c
DM
17172017-10-31 David Malcolm <dmalcolm@redhat.com>
1718
1719 * c-decl.c (implicit_decl_warning): Update for renaming of
1720 pedwarn_at_rich_loc and warning_at_rich_loc.
1721 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1722 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1723 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1724 (c_parser_struct_or_union_specifier): Likewise for renaming of
1725 pedwarn_at_rich_loc.
1726 (c_parser_parameter_declaration): Likewise for renaming of
1727 error_at_rich_loc.
1728 * c-typeck.c (build_component_ref): Likewise.
1729 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1730 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1731 (set_init_label): Likewise for renaming of error_at_rich_loc.
1732
c1136864
RB
17332017-10-30 Richard Biener <rguenther@suse.de>
1734
1735 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1736 stmts.
1737
ee5fd23a
MM
17382017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1739
1740 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1741 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1742
1a59ccf2
DM
17432017-10-25 David Malcolm <dmalcolm@redhat.com>
1744
1745 PR c/7356
1746 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1747 semicolons.
1748
bc1a75dd
JJ
17492017-10-25 Jakub Jelinek <jakub@redhat.com>
1750
1751 PR libstdc++/81706
1752 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1753 newdecl to corresponding __builtin_ if any.
1754
ff1ff960
PC
17552017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1756
1757 PR c++/82466
1758 * c-decl.c (diagnose_mismatched_decls): Use
1759 OPT_Wbuiltin_declaration_mismatch.
1760
62e1c678
DM
17612017-10-12 David Malcolm <dmalcolm@redhat.com>
1762
1763 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1764 use it to guard calls to maybe_suggest_missing_token_insertion.
1765 (c_parser_parms_list_declarator): Override default value of new
1766 "type_is_unique" param to c_parser_require.
1767 (c_parser_asm_statement): Likewise.
1768 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1769 defaulting to true.
1770
a92f6726
NS
17712017-10-11 Nathan Sidwell <nathan@acm.org>
1772
1773 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1774
8e6cdc90
RS
17752017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1776
1777 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1778 operating on trees as wide_ints.
1779 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1780 (c_tree_equal): Likewise.
1781
8139a48e
DM
17822017-10-04 David Malcolm <dmalcolm@redhat.com>
1783
1784 * c-decl.c (push_parm_decl): Store c_parm's location into the
1785 PARAM_DECL.
1786 (build_c_parm): Add "loc" param and store it within the c_parm.
1787 * c-parser.c (struct c_parser): Add "last_token_location" field.
1788 (c_parser_consume_token): Store location of the token into the
1789 new field.
1790 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1791 when handling a FUNCTION_DECL, if it doesn't already have them.
1792 (c_parser_parameter_declaration): Generate a location for the
1793 parameter, and pass it to the call to build_c_parm.
1794 * c-tree.h (struct c_parm): Add field "loc".
1795 (build_c_parm): Add location_t param.
1796 * c-typeck.c (get_fndecl_argument_location): New function.
1797 (inform_for_arg): New function.
1798 (convert_for_assignment): Use inform_for_arg when dealing with
1799 ic_argpass.
1800
2a389958
JJ
18012017-09-29 Jakub Jelinek <jakub@redhat.com>
1802
7d386d45
JJ
1803 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1804 width is non-NULL.
1805 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1806 don't SET_DECL_C_BIT_FIELD here.
1807
2a389958
JJ
1808 PR c/82340
1809 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1810 instead of trying to set just TREE_READONLY manually.
1811
ebc6a85e
TV
18122017-09-16 Tom de Vries <tom@codesourcery.com>
1813
1814 PR c/81875
1815 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1816 cond itself.
1817
bb75facd
JM
18182017-09-15 Joseph Myers <joseph@codesourcery.com>
1819
1820 PR c/82071
1821 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1822 for C11.
1823 (build_conditional_expr): For C11, generate result with excess
1824 precision when one argument is an integer and the other is of a
1825 type using excess precision.
1826
1d933576
BE
18272017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1828
1829 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1830
267bbb6f
MP
18312017-09-13 Marek Polacek <polacek@redhat.com>
1832
1833 PR c/82167
1834 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1835 than expr.original_type.
1836
6836632e
NS
18372017-09-12 Nathan Sidwell <nathan@acm.org>
1838
1839 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1840 resort_sorted_fields): Moved from c-family/c-common.c.
1841 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1842
e035be33
JM
18432017-09-01 Joseph Myers <joseph@codesourcery.com>
1844
1845 PR c/82071
1846 * c-typeck.c (build_atomic_assign): Handle argument with excess
1847 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1848 argument passed to build_binary_op and convert_for_assignment but
1849 not for call to c_fully_fold.
1850 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1851 Ensure build_binary_op is called with argument with original
1852 semantic type. Avoid calling c_fully_fold with an
1853 EXCESS_PRECISION_EXPR from build_binary_op.
1854
d2e05fcb
JJ
18552017-09-01 Jakub Jelinek <jakub@redhat.com>
1856
1857 PR c/81887
1858 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1859
b397965c
RS
18602017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1861 Alan Hayward <alan.hayward@arm.com>
1862 David Sherwood <david.sherwood@arm.com>
1863
1864 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1865 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1866 m1 and m2 to the signed equivalent of a fixed-point
1867 SCALAR_TYPE_MODE.
1868
14e18d71
DM
18692017-08-24 David Malcolm <dmalcolm@redhat.com>
1870
1871 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1872 than CAN_HAVE_LOCATION_P when determining whether to use the
1873 location_t value within "value".
1874
7f204c0f
DM
18752017-08-21 David Malcolm <dmalcolm@redhat.com>
1876
1877 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1878 rather than peeking the location of the first token.
1879 * c-tree.h (c_expr::get_location): New method.
1880
2f687306
DM
18812017-08-21 David Malcolm <dmalcolm@redhat.com>
1882
1883 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1884 to check_function_arguments.
1885
3e7b80d7
MP
18862017-08-18 Marek Polacek <polacek@redhat.com>
1887
1888 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1889 commentary.
1890
00aa1fa2
L
18912017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1892
1893 PR c/53037
1894 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1895 (check_bitfield_type_and_width): Don't allow bit-field with
1896 warn_if_not_aligned type.
1897
da67acb9
MS
18982017-08-14 Martin Sebor <msebor@redhat.com>
1899
1900 PR c/81117
1901 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1902
bb85aa74
MP
19032017-08-11 Marek Polacek <polacek@redhat.com>
1904
1905 PR c/81795
1906 * c-decl.c (pushtag): Only print inform if the warning was printed.
1907 (grokdeclarator): Likewise.
1908
32129a17
DM
19092017-08-10 David Malcolm <dmalcolm@redhat.com>
1910
1911 * c-parser.c (c_parser_error): Rename to...
1912 (c_parser_error_richloc): ...this, making static, and adding
1913 "richloc" parameter, passing it to the c_parse_error call,
1914 rather than calling c_parser_set_source_position_from_token.
1915 (c_parser_error): Reintroduce, reimplementing in terms of the
1916 above, converting return type from void to bool.
1917 (class token_pair): New class.
1918 (struct matching_paren_traits): New struct.
1919 (matching_parens): New typedef.
1920 (struct matching_brace_traits): New struct.
1921 (matching_braces): New typedef.
1922 (get_matching_symbol): New function.
1923 (c_parser_require): Add param MATCHING_LOCATION, using it to
1924 highlight matching "opening" tokens for missing "closing" tokens.
1925 (c_parser_skip_until_found): Likewise.
1926 (c_parser_static_assert_declaration_no_semi): Convert explicit
1927 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1928 class matching_parens, so that the pertinent open parenthesis is
1929 highlighted when there are problems locating the close
1930 parenthesis.
1931 (c_parser_struct_or_union_specifier): Likewise.
1932 (c_parser_typeof_specifier): Likewise.
1933 (c_parser_alignas_specifier): Likewise.
1934 (c_parser_simple_asm_expr): Likewise.
1935 (c_parser_braced_init): Likewise, for matching_braces.
1936 (c_parser_paren_condition): Likewise, for matching_parens.
1937 (c_parser_switch_statement): Likewise.
1938 (c_parser_for_statement): Likewise.
1939 (c_parser_asm_statement): Likewise.
1940 (c_parser_asm_operands): Likewise.
1941 (c_parser_cast_expression): Likewise.
1942 (c_parser_sizeof_expression): Likewise.
1943 (c_parser_alignof_expression): Likewise.
1944 (c_parser_generic_selection): Likewise.
1945 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1946 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
1947 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
1948 In case CPP_OPEN_PAREN, pass loc_open_paren to the
1949 c_parser_skip_until_found call.
1950 (c_parser_objc_class_definition): Use class matching_parens as
1951 above.
1952 (c_parser_objc_method_decl): Likewise.
1953 (c_parser_objc_try_catch_finally_statement): Likewise.
1954 (c_parser_objc_synchronized_statement): Likewise.
1955 (c_parser_objc_at_property_declaration): Likewise.
1956 (c_parser_oacc_wait_list): Likewise.
1957 (c_parser_omp_var_list_parens): Likewise.
1958 (c_parser_omp_clause_collapse): Likewise.
1959 (c_parser_omp_clause_default): Likewise.
1960 (c_parser_omp_clause_if): Likewise.
1961 (c_parser_omp_clause_num_threads): Likewise.
1962 (c_parser_omp_clause_num_tasks): Likewise.
1963 (c_parser_omp_clause_grainsize): Likewise.
1964 (c_parser_omp_clause_priority): Likewise.
1965 (c_parser_omp_clause_hint): Likewise.
1966 (c_parser_omp_clause_defaultmap): Likewise.
1967 (c_parser_oacc_single_int_clause): Likewise.
1968 (c_parser_omp_clause_ordered): Likewise.
1969 (c_parser_omp_clause_reduction): Likewise.
1970 (c_parser_omp_clause_schedule): Likewise.
1971 (c_parser_omp_clause_num_teams): Likewise.
1972 (c_parser_omp_clause_thread_limit): Likewise.
1973 (c_parser_omp_clause_aligned): Likewise.
1974 (c_parser_omp_clause_linear): Likewise.
1975 (c_parser_omp_clause_safelen): Likewise.
1976 (c_parser_omp_clause_simdlen): Likewise.
1977 (c_parser_omp_clause_depend): Likewise.
1978 (c_parser_omp_clause_map): Likewise.
1979 (c_parser_omp_clause_device): Likewise.
1980 (c_parser_omp_clause_dist_schedule): Likewise.
1981 (c_parser_omp_clause_proc_bind): Likewise.
1982 (c_parser_omp_clause_uniform): Likewise.
1983 (c_parser_omp_for_loop): Likewise.
1984 (c_parser_cilk_clause_vectorlength): Likewise.
1985 (c_parser_cilk_clause_linear): Likewise.
1986 (c_parser_transaction_expression): Likewise.
1987 * c-parser.h (c_parser_require): Add param matching_location with
1988 default UNKNOWN_LOCATION.
1989 (c_parser_error): Convert return type from void to bool.
1990 (c_parser_skip_until_found): Add param matching_location with
1991 default UNKNOWN_LOCATION.
1992
30af3a2b
MP
19932017-08-09 Marek Polacek <polacek@redhat.com>
1994
1995 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
1996 * c-tree.h (build_external_ref): Update declaration.
1997 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
1998 (build_external_ref): Change the type of a parameter to bool.
1999 (parser_build_binary_op): Use true/false instead of 1/0.
2000 (pointer_diff): Likewise.
2001 (build_modify_expr): Likewise.
2002 (set_designator): Change the type of a parameter to bool.
2003 (set_init_index): Use true/false instead of 1/0.
2004 (set_init_label): Likewise.
2005 (output_init_element): Change the type of a parameter to bool.
2006 (output_pending_init_elements): Use true/false instead of 1/0.
2007 (process_init_element): Likewise.
2008 (build_binary_op): Change the type of a parameter to bool.
2009
296c53ac
MP
20102017-08-09 Marek Polacek <polacek@redhat.com>
2011
2012 PR c/81233
2013 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2014 Call emit_diagnostic_valist instead of pedwarn.
2015 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2016 Print the relevant types in diagnostics.
2017
a32c8316
MP
20182017-08-09 Marek Polacek <polacek@redhat.com>
2019
2020 PR c/81417
2021 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2022 build_conditional_expr.
a32c8316
MP
2023 * c-parser.c (c_parser_conditional_expression): Create locations for
2024 EXP1 and EXP2 from their source ranges. Pass the locations down to
2025 build_conditional_expr.
2026 * c-tree.h (build_conditional_expr): Update declaration.
2027 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2028 For -Wsign-compare, also print the types.
2029
314e6352
ML
20302017-08-08 Martin Liska <mliska@suse.cz>
2031
2032 * c-convert.c: Include header files.
2033 * c-typeck.c: Likewise.
2034
577eec56
ML
20352017-08-07 Martin Liska <mliska@suse.cz>
2036
2037 * c-parser.c (c_parser_attributes): Canonicalize name of an
2038 attribute.
2039
f7b6353a
MP
20402017-08-02 Marek Polacek <polacek@redhat.com>
2041
2042 PR c/81289
2043 * c-parser.c (c_parser_unary_expression): Use set_error.
2044
8a6eab34
MP
2045 PR c/81448
2046 PR c/81306
2047 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2048 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2049
ab20d992 20502017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2051 Martin Liska <mliska@suse.cz>
2052
2053 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2054 statement.
7fef86d3 2055
f34ebeb2
ML
20562017-07-31 Martin Liska <mliska@suse.cz>
2057
2058 PR sanitize/81530
2059 * c-convert.c (convert): Guard condition with flag_sanitize_p
2060 also with current_function_decl non-null equality.
2061 * c-decl.c (grokdeclarator): Likewise.
2062 * c-typeck.c (build_binary_op): Likewise.
2063
8595f67b
MP
20642017-07-25 Marek Polacek <polacek@redhat.com>
2065
2066 * c-decl.c (grokfield): Remove local variable.
2067
d49718d6
MP
20682017-07-25 Marek Polacek <polacek@redhat.com>
2069
2070 PR c/81364
2071 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2072 macro expansion if the body is in { }.
2073 (c_parser_while_statement): Likewise.
2074 (c_parser_for_statement): Likewise.
2075
ff22eb12
NS
20762017-07-18 Nathan Sidwell <nathan@acm.org>
2077
2078 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2079
eea77d1f
DM
20802017-07-14 David Malcolm <dmalcolm@redhat.com>
2081
2082 * c-decl.c (implicitly_declare): When suggesting a missing
2083 #include, provide a fix-it hint.
2084
b6f43128
DM
20852017-07-06 David Malcolm <dmalcolm@redhat.com>
2086
2087 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2088 and call that instead.
2089 * c-tree.h (selftest::run_c_tests): New decl.
2090
3e2becc4
MP
20912017-06-26 Marek Polacek <polacek@redhat.com>
2092
2093 PR c/80116
2094 * c-parser.c (c_parser_if_body): Set the location of the
2095 body of the conditional after parsing all the labels. Call
2096 warn_for_multistatement_macros.
2097 (c_parser_else_body): Likewise.
2098 (c_parser_switch_statement): Likewise.
2099 (c_parser_while_statement): Likewise.
2100 (c_parser_for_statement): Likewise.
2101 (c_parser_statement): Add a default argument. Save the location
2102 after labels have been parsed.
2103 (c_parser_c99_block_statement): Likewise.
2104
343ae898
RB
21052017-06-19 Richard Biener <rguenther@suse.de>
2106
2107 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2108 negated _Literals to parse _Literal (int) -1.
2109
45b2222a
ML
21102017-06-13 Martin Liska <mliska@suse.cz>
2111
2112 PR sanitize/78204
2113 * c-convert.c (convert): Use sanitize_flags_p.
2114 * c-decl.c (grokdeclarator): Likewise.
2115 * c-typeck.c (convert_for_assignment): Likewise.
2116 (c_finish_return): Likewise.
2117 (build_binary_op): Likewise.
2118
8ab7005b
JJ
21192017-06-08 Jakub Jelinek <jakub@redhat.com>
2120
2121 PR c/81006
2122 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2123 to sizetype before size_binop.
2124
363dc72c
JJ
21252017-06-07 Jakub Jelinek <jakub@redhat.com>
2126
2127 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2128 of TDI_generic.
2129
dc949728
MP
21302017-06-06 Marek Polacek <polacek@redhat.com>
2131
2132 PR c/79983
2133 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2134 ref.
2135 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2136
40ffd95f
BE
21372017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2138
2139 * c-parser.c (c_parser_binary_expression): Implement the
2140 -Wsizeof_pointer_div warning.
2141 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2142 from a parenthesized expression.
2143 (c_parser_expr_list): Use c_last_sizeof_loc.
2144 * c-tree.h (c_last_sizeof_loc): New external.
2145 * c-typeck.c (c_last_sizeof_loc): New variable.
2146 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2147
9fc5e7a4
MM
21482017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2149
2150 PR testsuite/80580
2151 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2152
f012c8ef
DM
21532017-05-30 David Malcolm <dmalcolm@redhat.com>
2154
2155 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2156 parameters.
2157
3cd211af
MS
21582017-05-24 Martin Sebor <msebor@redhat.com>
2159
2160 PR c/80731
2161 * c-fold.c (c_fully_fold_internal): Adjust.
2162 * c-typeck.c (parser_build_unary_op): Adjust.
2163
fd71a9a2
TS
21642017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2165
2166 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2167 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2168 "VECTOR_LENGTH".
2169
92fa0f9e
MP
21702017-05-23 Marek Polacek <polacek@redhat.com>
2171
2172 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2173 quotes.
2174
d11c168a
JJ
21752017-05-22 Jakub Jelinek <jakub@redhat.com>
2176
2177 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2178 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2179 it returned invariant. Call tree_invariant_p unconditionally
2180 afterwards to decide whether to return expr or op0.
2181
58aca9d9
NS
21822017-05-22 Nathan Sidwell <nathan@acm.org>
2183
2184 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2185
7fd549d2
TS
21862017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2187
2188 * c-parser.c (c_parser_omp_clause_default): Handle
2189 "OMP_CLAUSE_DEFAULT_PRESENT".
2190
6ecd2339
BE
21912017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2192
2193 * config-lang.in (gtfiles): Add c-family/c-format.c.
2194
8a57ecff
NS
21952017-05-18 Nathan Sidwell <nathan@acm.org>
2196
2197 * c-decl.c (pushdecl_top_level): Delete unused function.
2198
6574d78e
MP
21992017-05-18 Marek Polacek <polacek@redhat.com>
2200
2201 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2202 (check_earlier_gotos): Likewise.
2203 (define_label): Likewise.
2204 (pending_xref_error): Likewise.
2205 (smallest_type_quals_location): Likewise.
2206 (grokdeclarator): Likewise.
2207 (grokparms): Likewise.
2208 (identifier_global_value): Likewise.
2209 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2210 (find_init_member): Likewise.
2211
e3455240
MP
22122017-05-18 Marek Polacek <polacek@redhat.com>
2213
2214 * c-decl.c (start_decl): Use false/true instead of 0/1.
2215 (grokdeclarator): Likewise.
2216 (finish_struct): Likewise.
2217 (start_function): Change the return type to bool. Use false/true
2218 instead of 0/1.
2219 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2220 * c-tree.h (start_function): Update.
2221 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2222 (set_designator): Change the return type to bool. Use false/true
2223 instead of 0/1.
2224
3fa8871b
MP
22252017-05-17 Marek Polacek <polacek@redhat.com>
2226
2227 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2228 * c-typeck.c: Likewise.
2229
142473df
MP
22302017-05-17 Marek Polacek <polacek@redhat.com>
2231
2232 PR sanitizer/80659
2233 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2234 DECL_IGNORED_P even for non-static compound literals.
2235
1a817418
ML
22362017-05-17 Martin Liska <mliska@suse.cz>
2237
2238 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2239 use it instead of int type.
2240
b2fa0a8b
MP
22412017-05-17 Marek Polacek <polacek@redhat.com>
2242
2243 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2244 call c_fully_fold.
2245 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2246 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2247 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2248 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2249 save_expr.
2250 (c_parser_conditional_expression): Likewise.
2251 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2252 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2253 (process_init_element): Likewise.
2254 (build_binary_op): Likewise.
2255 (handle_omp_array_sections_1): Likewise.
2256
1e47f02b
TS
22572017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2258
2259 * c-parser.c (c_parser_omp_clause_num_gangs)
2260 (c_parser_omp_clause_num_workers)
2261 (c_parser_omp_clause_vector_length): Merge functions into...
2262 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2263 all users.
2264
c24e924f
NS
22652017-05-11 Nathan Sidwell <nathan@acm.org>
2266
2267 * gimple-parser.c: Don't #include tree-dump.h.
2268
c587104e
MM
22692017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2270
2271 PR testsuite/80580
2272 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2273
67ac9a9d
MM
22742017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2275
2276 PR testsuite/80580
2277 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2278 incorrect __MEM syntax.
2279
ac4eb40f
MM
22802017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2281
2282 PR testsuite/80580
2283 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2284 type of unary '*'.
2285
641da50a
NS
22862017-05-09 Nathan Sidwell <nathan@acm.org>
2287
2288 * c-tree.h (pushdecl): Declare.
2289
56d35585
DM
22902017-05-05 David Malcolm <dmalcolm@redhat.com>
2291
2292 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2293 with diagnostic_report_diagnostic.
2294 * c-errors.c (pedwarn_c99): Likewise.
2295 (pedwarn_c90): Likewise.
2296
815d9cc6
XR
22972017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2298
92a285c1 2299 PR c++/80038
815d9cc6
XR
2300 * c-gimplify.c (c_gimplify_expr): Remove calls to
2301 cilk_gimplifY_call_params_in_spawned_fn.
2302
1c4ea66f
DM
23032017-04-25 David Malcolm <dmalcolm@redhat.com>
2304
2305 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2306 hint for removing extra semicolon.
2307
666f7903
JJ
23082017-04-21 Jakub Jelinek <jakub@redhat.com>
2309
2310 PR c/80468
2311 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2312 enabled, set specs->type to integer_type_node.
2313
5764ee3c
JW
23142017-04-03 Jonathan Wakely <jwakely@redhat.com>
2315
2316 * c-array-notation.c: Fix typo in comment.
2317
10fa8dfb
MP
23182017-03-29 Marek Polacek <polacek@redhat.com>
2319
2320 PR c/79730
2321 * c-decl.c (finish_decl): Check VAR_P.
2322
a9e4a1a5
JJ
23232017-03-27 Jakub Jelinek <jakub@redhat.com>
2324
2325 PR middle-end/80162
2326 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2327 * c-typeck.c (c_mark_addressable): Likewise. Look through
2328 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2329 to ARRAY_TYPE.
2330 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2331
ee3ff394
MP
23322017-03-23 Marek Polacek <polacek@redhat.com>
2333
2334 * c-tree.h: Remove a C_RID_YYCODE reference.
2335
4d1b8e70
JJ
23362017-03-21 Jakub Jelinek <jakub@redhat.com>
2337
2338 PR c/80097
2339 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2340 optional COMPOUND_EXPR with ubsan instrumentation.
2341
31dc71a8
MP
23422017-03-17 Marek Polacek <polacek@redhat.com>
2343
2344 * c-parser.c: Add C11 references.
2345
d579c385
MP
23462017-03-15 Marek Polacek <polacek@redhat.com>
2347
2348 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2349
85059a38
MP
23502017-03-11 Marek Polacek <polacek@redhat.com>
2351
2352 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2353
2f6f187a
DM
23542017-03-10 David Malcolm <dmalcolm@redhat.com>
2355
2356 PR translation/79848
2357 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2358 "%qs".
2359 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2360
36618428
MP
23612017-03-09 Marek Polacek <polacek@redhat.com>
2362
2363 PR sanitizer/79757
2364 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2365 parameter declarations with initializers.
2366
01e5af5a
JJ
23672017-03-09 Jakub Jelinek <jakub@redhat.com>
2368
2369 PR c/79969
2370 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2371 TYPE_STUB_DECL.
2372
a71dbc63
JJ
23732017-03-07 Jakub Jelinek <jakub@redhat.com>
2374
2375 PR c/79834
2376 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2377 for "may only be used in compound statements" diagnostics, change it
2378 such that the same translatable string is used for all pragmas. For
2379 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2380 diagnostics.
2381 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2382 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2383 "may only be used in compound statements" diagnostics, such that the
2384 same translatable string is used for all pragmas.
2385
1ff4bae6
MP
23862017-03-04 Marek Polacek <polacek@redhat.com>
2387
2388 PR c/79847
2389 * c-decl.c (implicit_decl_warning): Add missing space.
2390
7f5a7d78
MP
23912017-03-03 Marek Polacek <polacek@redhat.com>
2392
2393 PR c/79758
2394 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2395 current_function_prototype_arg_types is error_mark_node. Fix
2396 formatting. Use TREE_VALUE instead of TREE_TYPE.
2397
883c8f06
JJ
23982017-03-03 Jakub Jelinek <jakub@redhat.com>
2399
79c9b7a8
JJ
2400 PR c/79837
2401 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2402 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2403 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2404 diagnostics.
2405
883c8f06
JJ
2406 PR c/79836
2407 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2408 instead of %<_Generic>.
2409 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2410 (c_parser_omp_target_exit_data): Use %<release%> instead of
2411 %<release>.
2412
324ff1a0
JJ
24132017-02-28 Jakub Jelinek <jakub@redhat.com>
2414
2415 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2416 instead of just cond ? "..." : "...".
2417 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2418 for "enter"/"exit" keyword.
2419 (c_finish_oacc_routine): Don't use %s to supply portions of the
2420 message.
2421
4227c9ad
JJ
24222017-02-24 Jakub Jelinek <jakub@redhat.com>
2423
2424 PR c++/79588
2425 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2426 handle -Wrestrict here.
2427 * c-typeck.c (build_function_call_vec): Adjust
2428 check_function_arguments caller.
2429
5d972e66
RB
24302017-02-23 Richard Biener <rguenther@suse.de>
2431
2432 PR c/79684
2433 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2434 to initialize c_exprs to return.
2435 (c_parser_gimple_binary_expression): Likewise.
2436 (c_parser_gimple_unary_expression): Likewise.
2437 (c_parser_gimple_postfix_expression): Likewise.
2438
61ac5ebe
MP
24392017-02-22 Marek Polacek <polacek@redhat.com>
2440
2441 PR c/79662
2442 * c-typeck.c (convert_arguments): Handle error_mark_node.
2443
41d1b0b1
PK
24442017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2445
2446 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2447 value of c_parser_parse_ssa_name against error_mark_node and emit
2448 error if ssa name is anonymous and written as default definition.
2449
eab1f169
PK
24502017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2451
2452 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2453 FMA_EXPR.
2454
bcac0b4d
JJ
24552017-02-16 Jakub Jelinek <jakub@redhat.com>
2456
2457 PR c++/79512
2458 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2459 ignore #pragma omp target even when not followed by identifier.
2460
1be33173
PK
24612017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2462
2463 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2464 (c_parser_gimple_unary_expression): Likewise.
2465
aa326bfb
JJ
24662017-02-13 Jakub Jelinek <jakub@redhat.com>
2467
2468 * c-parser.c (c_parser_oacc_declare): Add missing space in
2469 diagnostics.
2470
8a398bc5
PK
24712017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2472
2473 PR c/79478
2474 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2475 set_c_expr_source_range when parsing ssa-name.
2476
3dcde5ef 24772017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2478 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2479
2480 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2481 building IL when arguments are error_mark_node.
2482 (c_parser_gimple_unary_expression): Likewise.
2483 (c_parser_gimple_if_stmt): Likewise.
2484 (c_parser_gimple_switch_stmt): Likewise.
2485 (c_parser_gimple_return_stmt): Likewise.
2486 (c_parser_parse_ssa_name): When name lookup fails do not build
2487 an SSA name. Use undeclared rather than not declared in error
2488 reporting.
2489
192b048b
MP
24902017-02-09 Marek Polacek <polacek@redhat.com>
2491
2492 PR c/79428
2493 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2494 instead of c_parser_skip_until_found.
2495
56f71478
JJ
24962017-02-09 Jakub Jelinek <jakub@redhat.com>
2497
2498 PR c/79431
2499 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2500 symtab_node::get on automatic variables.
2501
02889d23
CLT
25022016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2503 Chung-Lin Tang <cltang@codesourcery.com>
2504
2505 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2506 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2507 semantic checking.
2508 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2509
7af4b20d
RB
25102017-02-07 Richard Biener <rguenther@suse.de>
2511
2512 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2513 (c_parser_gimple_postfix_expression_after_primary):
2514 Do not use c_build_function_call_vec to avoid folding and promotion.
2515 Simplify.
2516
e5e391d6
MO
25172017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2518
2519 PR lto/79061
2520 * c-decl.c (pop_scope): Pass main_input_filename to
2521 build_translation_unit_decl.
2522
c2e84327
DM
25232017-01-24 David Malcolm <dmalcolm@redhat.com>
2524
2525 * c-parser.c: Include "read-rtl-function.h" and
2526 "run-rtl-passes.h".
2527 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2528 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2529 production. Update for renaming of field "gimple_pass" to
2530 "gimple_or_rtl_pass". If __RTL was seen, call
2531 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2532 to an auto_timevar, to cope with early exit.
2533 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2534 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2535 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2536 Handle RID_RTL.
2537 (c_parser_parse_rtl_body): New function.
2538 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2539 (struct c_declspecs): Rename field "gimple_pass" to
2540 "gimple_or_rtl_pass". Add field "rtl_p".
2541 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2542 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2543 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2544 (c_parser_gimple_or_rtl_pass_list): ...this.
2545
2ebd93e1
MP
25462017-01-20 Marek Polacek <polacek@redhat.com>
2547
2548 PR c/64279
2549 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2550
b1c95bb5
RB
25512017-01-13 Richard Biener <rguenther@suse.de>
2552
2553 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2554 nops.
2555
25329913
RB
25562017-01-13 Richard Biener <rguenther@suse.de>
2557
2558 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2559 _Literal ( type-name ) number.
2560
6bb4ea5c
RB
25612017-01-12 Richard Biener <rguenther@suse.de>
2562
2563 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2564 __MEM.
2565
6b5b4e9c
JJ
25662017-01-11 Jakub Jelinek <jakub@redhat.com>
2567
2568 PR c++/72813
2569 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2570 PCH file.
2571
e3252775
RB
25722017-01-11 Richard Biener <rguenther@suse.de>
2573
2574 PR bootstrap/79052
2575 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2576 returns on parse errors.
2577
a9342885
MP
25782017-01-04 Marek Polacek <polacek@redhat.com>
2579
2580 PR c++/64767
2581 * c-parser.c (c_parser_postfix_expression): Mark zero character
2582 constants by setting original_type in c_expr.
2583 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2584 with a zero character constant.
2585 (char_type_p): New function.
2586
5dd9a9d0
DM
25872017-01-04 David Malcolm <dmalcolm@redhat.com>
2588
2589 * c-parser.c (c_parser_declaration_or_fndef): Create a
2590 rich_location at init_loc and parse it to start_init.
2591 (last_init_list_comma): New global.
2592 (c_parser_braced_init): Update last_init_list_comma when parsing
2593 commas. Pass it to pop_init_level. Pass location of closing
2594 brace to pop_init_level.
2595 (c_parser_postfix_expression_after_paren_type): Create a
2596 rich_location at type_loc and parse it to start_init.
2597 (c_parser_omp_declare_reduction): Likewise for loc.
2598 * c-tree.h (start_init): Add rich_location * param.
2599 (pop_init_level): Add location_t param.
2600 * c-typeck.c (struct initializer_stack): Add field
2601 "missing_brace_richloc".
2602 (start_init): Add richloc param, use it to initialize
2603 the stack node's missing_brace_richloc.
2604 (last_init_list_comma): New decl.
2605 (finish_implicit_inits): Pass last_init_list_comma to
2606 pop_init_level.
2607 (push_init_level): When finding missing open braces, add fix-it
2608 hints to the richloc.
2609 (pop_init_level): Add "insert_before" param and pass it
2610 when calling pop_init_level. Add fixits about missing
2611 close braces to any richloc. Use the richloc for the
2612 -Wmissing-braces warning.
2613 (set_designator): Pass last_init_list_comma to pop_init_level.
2614 (process_init_element): Likewise.
2615
cbe34bb5
JJ
26162017-01-01 Jakub Jelinek <jakub@redhat.com>
2617
2618 Update copyright years.
2619
d17680f3
JJ
26202016-12-21 Jakub Jelinek <jakub@redhat.com>
2621
0dba7960
JJ
2622 PR bootstrap/78817
2623 * c-typeck.c (build_function_call_vec): If check_function_arguments
2624 returns true, set TREE_NO_WARNING on CALL_EXPR.
2625
d17680f3
JJ
2626 PR c/77767
2627 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2628 to *expr instead of overwriting it.
2629
aa90531e
RB
26302016-12-20 Richard Biener <rguenther@suse.de>
2631
2632 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2633 error recovery.
2634 (c_parser_gimple_statement): Only build assigns for non-error
2635 stmts.
2636 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2637
629b3d75
MJ
26382016-12-14 Martin Jambor <mjambor@suse.cz>
2639
2640 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2641 omp-low.h.
2642 (c_finish_oacc_routine): Adjusted call to
2643 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2644 to use their new names.
2645 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2646 use its new name.
2647 (c_parser_oacc_update): Likewise.
2648 (c_parser_omp_simd): Likewise.
2649 (c_parser_omp_target_update): Likewise.
2650 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2651 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2652 name.
2653 (c_finish_omp_cancellation_point): Likewise.
2654 * gimple-parser.c: Do not include omp-low.h
2655
c5af52eb
CP
26562016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2657 James Norris <jnorris@codesourcery.com>
2658
2659 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2660 EXIT_DATA,WAIT} are not used in compound statements.
2661 (c_parser_oacc_enter_exit_data): Update diagnostics.
2662
48330c93
BE
26632016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2664
2665 PR c++/71973
2666 * c-decl.c (diagnose_mismatched_decls): Use
2667 OPT_Wbuiltin_declaration_mismatch here too.
2668
899ca90e 26692016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2670 Alan Hayward <alan.hayward@arm.com>
2671 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2672
2673 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2674 (make_label, finish_struct): Likewise.
2675
1ee62b92 26762016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2677 Richard Biener <rguenther@suse.de>
22b15758 2678
8e745a17
JJ
2679 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2680 * config-lang.in (gtfiles): Add c/c-parser.h.
2681 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2682 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2683 * c-parser.c (enum c_id_kind, struct c_token,
2684 c_parser_next_token_is, c_parser_next_token_is_not,
2685 c_parser_next_token_is_keyword,
2686 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2687 Split out to ...
2688 * c-parser.h: ... new header.
2689 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2690 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2691 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2692 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2693 c_parser_error, c_parser_require, c_parser_skip_until_found,
2694 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2695 c_parser_type_name): Export.
2696 (c_parser_tokens_buf): New function.
2697 (c_parser_error): Likewise.
2698 (c_parser_set_error): Likewise.
2699 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2700 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2701 via c_parser_parse_gimple_body.
8e745a17
JJ
2702 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2703 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2704 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2705 c_parser_error, c_parser_require, c_parser_skip_until_found,
2706 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2707 c_parser_type_name): Declare.
1ee62b92
PG
2708 (struct c_parser): Declare forward.
2709 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2710 (c_parser_error): Likewise.
2711 (c_parser_set_error): Likewise.
2712 * gimple-parser.c: New file.
2713 * gimple-parser.h: Likewise.
1ee62b92 2714
22b15758
UB
27152016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2716
2717 PR c/35503
2718 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2719 warn_for_restrict.
2720
84ff4775
LCW
27212016-09-11 Le-Chun Wu <lcwu@google.com>
2722 Mark Wielaard <mjw@redhat.com>
2723
2724 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2725 to the given -Wshadow= variant.
2726
4d0cdd0c
TP
27272016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2728
2729 * c-typeck.c: Include memmodel.h.
2730
1202f33e
JJ
27312016-10-13 Jakub Jelinek <jakub@redhat.com>
2732
2733 PR target/77957
2734 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2735 instead of lhd_return_null_tree_v.
2736
8a14afd0
BS
27372016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2738
2739 PR c++/69733
2740 * c-decl.c (smallest_type_quals_location): New static function.
2741 (grokdeclarator): Try to find the correct location for an ignored
2742 qualifier.
2743
81fea426
MP
27442016-09-26 Marek Polacek <polacek@redhat.com>
2745
2746 PR c/7652
2747 * c-decl.c (pop_scope): Add gcc_fallthrough.
2748
27492016-09-26 Marek Polacek <polacek@redhat.com>
2750
2751 PR c/7652
2752 * c-parser.c (struct c_token): Add flags field.
2753 (c_lex_one_token): Pass it to c_lex_with_flags.
2754 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2755 into IFN_FALLTHROUGH.
2756 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2757 attribute fallthrough after a case label or default label.
2758 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2759
9a2300e9
MP
27602016-09-24 Marek Polacek <polacek@redhat.com>
2761
2762 PR c/77490
2763 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2764 have boolean value. Warn about ++/-- on booleans.
2765
7de76362
JJ
27662016-09-23 Jakub Jelinek <jakub@redhat.com>
2767
2768 * c-parser.c (incomplete_record_decls): Remove unnecessary
2769 = vNULL initialization of file scope vec.
2770
5b73d2ab
MP
27712016-09-16 Marek Polacek <polacek@redhat.com>
2772
2773 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2774
e51fbec3
MP
27752016-09-14 Marek Polacek <polacek@redhat.com>
2776
2777 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2778 (fix_array_notation_expr): Likewise.
2779 * c-decl.c (finish_decl): Likewise.
2780 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2781 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2782 (function_to_pointer_conversion): Use false instead of 0.
2783 (convert_lvalue_to_rvalue): Likewise.
2784 (parser_build_unary_op): Likewise.
2785 (build_atomic_assign): Likewise.
2786 (build_unary_op): Change nonconvert parameter type to bool, use
2787 true/false instead of 1/0.
2788 (build_binary_op): Use true instead of 1.
2789
254830ba
DM
27902016-09-13 David Malcolm <dmalcolm@redhat.com>
2791
2792 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2793 of add_fixit_insert to add_fixit_insert_before.
2794
4c13ba17
MP
27952016-09-13 Marek Polacek <polacek@redhat.com>
2796
2797 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2798 it.
2799
54dcdb88
BE
28002016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2801
2802 PR c++/77496
2803 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2804 COMPOUND_EXPR to warn_for_omitted_condop.
2805
e5106e27
DM
28062016-09-07 David Malcolm <dmalcolm@redhat.com>
2807
2808 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2809 c_get_substring_location for this new langhook.
2810
9dc5773f
JJ
28112016-09-02 Jakub Jelinek <jakub@redhat.com>
2812
2813 PR c/65467
2814 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2815 flag_openmp.
2816 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2817 instead of mark_exp_read on low_bound/length expression.
2818 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2819 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2820 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2821 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2822 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2823 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2824 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2825 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2826 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2827 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2828 instead of mark_expr_read.
2829 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2830 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2831 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2832 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2833 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2834 array section bases outside of depend clause, for depend clause
2835 use convert_lvalue_to_rvalue on the base.
2836 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2837 linear, aligned, map, to and from clauses.
2838 (c_omp_clause_copy_ctor): New function.
2839
295844f6
MP
28402016-09-01 Marek Polacek <polacek@redhat.com>
2841
2842 PR c/7652
2843 * c-typeck.c (composite_type): Add FALLTHRU comment.
2844
089af25c
DM
28452016-08-31 David Malcolm <dmalcolm@redhat.com>
2846
2847 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2848 to the insertion fixits for "struct", "union", and "enum".
2849
f9087798
DM
28502016-08-30 David Malcolm <dmalcolm@redhat.com>
2851
2852 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2853 rather than add_fixit_misspelled_id.
2854 (undeclared_variable): Likewise.
2855 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2856 now-redundant "here" params from add_fixit_insert method calls.
2857 (c_parser_parameter_declaration): Likewise.
2858 * c-typeck.c (build_component_ref): Remove now-redundant range
2859 param from add_fixit_replace method calls.
2860
ebef225f
MP
28612016-08-25 Marek Polacek <polacek@redhat.com>
2862
2863 * c-typeck.c (parser_build_binary_op): Pass LHS to
2864 warn_logical_not_parentheses.
2865
fe377a48
MP
28662016-08-25 Marek Polacek <polacek@redhat.com>
2867
2868 PR c/77323
2869 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2870 or _FloatN or _FloatNx is not supported.
2871 (finish_declspecs): Set type to integer_type_node when _FloatN or
2872 _FloatNx is not supported.
2873
c65699ef
JM
28742016-08-19 Joseph Myers <joseph@codesourcery.com>
2875
2876 PR c/32187
2877 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2878 (struct c_declspecs): Add field floatn_nx_idx.
2879 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2880 and _FloatNx type specifiers.
2881 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2882 (c_parser_declspecs, c_parser_attribute_any_word)
2883 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2884 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2885 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2886 narrower than double.
2887
2f1364c2
JJ
28882016-08-12 Jakub Jelinek <jakub@redhat.com>
2889 Martin Liska <mliska@suse.cz>
2890
2891 PR c/67410
2892 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2893 % to determine val element to change. Assert that
2894 wchar_bytes * charwidth fits into val array.
2895
191816a3
MP
28962016-08-12 Marek Polacek <polacek@redhat.com>
2897
2898 PR c/7652
2899 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2900 (c_parser_postfix_expression): Likewise.
2901 * c-typeck.c (build_unary_op): Adjust fall through comment.
2902 (c_mark_addressable): Likewise.
2903
b95a64bb
JJ
29042016-08-11 Jakub Jelinek <jakub@redhat.com>
2905
2906 PR c/72816
2907 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2908 array member through typedef, for orig_qual_indirect == 0 clear
2909 orig_qual_type.
2910
895aa8e1
DM
29112016-08-08 David Malcolm <dmalcolm@redhat.com>
2912
2913 PR c/64955
2914 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2915 this up to selftest::run_c_tests.
2916 (selftest::run_c_tests): New function.
2917
0b212d8c
TS
29182016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2919
ae9281fc
TS
2920 * c-parser.c (struct oacc_routine_data): Add error_seen and
2921 fndecl_seen members.
2922 (c_finish_oacc_routine): Use these.
2923 (c_parser_declaration_or_fndef): Adjust.
2924 (c_parser_oacc_routine): Likewise. Support more C language
2925 constructs, and improve diagnostics. Move pragma context
2926 checking...
2927 (c_parser_pragma): ... here.
2928
0b212d8c
TS
2929 * c-parser.c (struct oacc_routine_data): New.
2930 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2931 Simplify code.
2932 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2933 declare target" attribute.
2934
76e2c821
JB
29352016-08-01 Jan Beulich <jbeulich@suse.com>
2936
2937 * c-fold.c (c_fully_fold_internal): Also emit shift count
2938 warnings for vector types.
2939 * c-typeck.c (build_binary_op): Likewise.
2940
f618a472
MP
29412016-07-29 Marek Polacek <polacek@redhat.com>
2942
2943 PR c/71742
2944 * c-decl.c (finish_struct): Rephrase an error message.
2945
efd0786f
MP
2946 PR c/71853
2947 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
2948 to error node for invalid code.
2949
e00dceaf
MP
2950 PR c/71573
2951 * c-decl.c (implicitly_declare): Return decl early not only for
2952 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
2953
673a107a
JJ
29542016-07-29 Jakub Jelinek <jakub@redhat.com>
2955
2956 PR c/71969
2957 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
2958 on GNU extern inline functions.
2959
a5b5c8b6
MP
29602016-07-29 Marek Polacek <polacek@redhat.com>
2961
2962 PR c/71583
2963 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
2964 check expr.value.
2965
e3fe09c1
UB
29662016-07-22 Uros Bizjak <ubizjak@gmail.com>
2967
2968 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
2969
7c8f7eaa
DM
29702016-07-20 David Malcolm <dmalcolm@redhat.com>
2971
2972 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
2973 spellcheck-tree.h
2974 (best_macro_match): Likewise, converting from a typedef to a
2975 subclass.
2976 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
2977 (lookup_name_fuzzy): Update for change of best_macro_match to a
2978 subclass with a ctor that calls cpp_forall_identifiers.
2979
de6a69ee
DM
29802016-07-20 David Malcolm <dmalcolm@redhat.com>
2981
2982 * c-decl.c (implicit_decl_warning): Update for conversion of
2983 return type of lookup_name_fuzzy to const char *.
2984 (undeclared_variable): Likewise.
2985 (lookup_name_fuzzy): Convert return type from tree to
2986 const char *.
2987 * c-parser.c (c_parser_declaration_or_fndef): Update for
2988 conversion of return type of lookup_name_fuzzy to const char *.
2989 (c_parser_parameter_declaration): Likewise.
2990
b1c9c068
CP
29912016-07-15 Cesar Philippidis <cesar@codesourcery.com>
2992
2993 * c-parser.c (c_parser_oacc_declare): Don't scan for
2994 GOMP_MAP_POINTER.
2995 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
2996 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
2997 zero-length subarrays.
2998
ddbbcb19
JJ
29992016-07-15 Jakub Jelinek <jakub@redhat.com>
3000
3001 PR c/71858
3002 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3003 instead of FUZZY_LOOKUP_NAME.
3004 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3005 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3006
dd36b877
JJ
30072016-07-14 Jakub Jelinek <jakub@redhat.com>
3008
3009 PR c/71858
3010 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3011
8c681247
TS
30122016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3013
3014 * c-parser.c (c_parser_generic_selection): Make type of variable
3015 auto_vec.
3016 (c_parser_omp_declare_simd): Likewise.
3017
bf4fa671
TS
30182016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3019
3020 * c-decl.c (struct c_struct_parse_info): Change member types
3021 from vec to auto_vec.
3022 (start_struct): Adjust.
3023 (finish_struct): Likewise.
3024
557e8c49
JJ
30252016-07-02 Jakub Jelinek <jakub@redhat.com>
3026
3027 PR c/71719
3028 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3029
54d19c3b
TS
30302016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3031
3032 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3033 Move pragma context checking into...
3034 (c_parser_omp_cancellation_point): ... here, and improve
3035 diagnostic messages.
3036 * c-typeck.c (c_finish_omp_cancel)
3037 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3038
152ef731
JJ
30392016-06-29 Jakub Jelinek <jakub@redhat.com>
3040
3041 PR c/71685
3042 * c-typeck.c (c_build_qualified_type): Don't clear
3043 C_TYPE_INCOMPLETE_VARS for the main variant.
3044
30452016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3046
3047 PR c/71552
3048 * c-typeck.c (output_init_element): Diagnose incompatible types
3049 before non-constant initializers.
3050
e9ac1f86
JJ
30512016-06-28 Jakub Jelinek <jakub@redhat.com>
3052
3053 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3054
277d7ee0
AK
30552016-06-23 Andi Kleen <ak@linux.intel.com>
3056
3057 * Make-lang.in: Add support for autofdo.
3058
1a4f11c8
DM
30592016-06-22 David Malcolm <dmalcolm@redhat.com>
3060
3061 PR c/70339
3062 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3063 (implicit_decl_warning): When issuing warnings for implicit
3064 declarations, attempt to provide a suggestion via
3065 lookup_name_fuzzy.
3066 (undeclared_variable): Likewise when issuing errors.
3067 (lookup_name_in_scope): Likewise.
3068 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3069 (best_macro_match): New typedef.
3070 (find_closest_macro_cpp_cb): New function.
3071 (lookup_name_fuzzy): New function.
3072 * c-parser.c: Include gcc-rich-location.h.
3073 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3074 (c_keyword_starts_typename): ...this new function.
3075 (c_parser_declaration_or_fndef): When issuing errors about
3076 missing "struct" etc, add a fixit. For other kinds of errors,
3077 attempt to provide a suggestion via lookup_name_fuzzy.
3078 (c_parser_parms_declarator): When looking ahead to detect typos in
3079 type names, also reject CPP_KEYWORD.
3080 (c_parser_parameter_declaration): When issuing errors about
3081 unknown type names, attempt to provide a suggestion via
3082 lookup_name_fuzzy.
3083 * c-tree.h (c_keyword_starts_typename): New prototype.
3084
5a578671
JM
30852016-06-20 Joseph Myers <joseph@codesourcery.com>
3086
3087 PR c/71601
3088 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3089 c_common_type returns error_mark_node.
3090
3f8257db 30912016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3092
3093 PR c/69507
3094 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3095 __alignof__ (expression).
3096
6a3f203c
DM
30972016-06-14 David Malcolm <dmalcolm@redhat.com>
3098
3099 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3100
264757fb
DM
31012016-06-14 David Malcolm <dmalcolm@redhat.com>
3102
3103 * c-typeck.c (build_component_ref): Simplify fixit code by
3104 using gcc_rich_location::add_fixit_misspelled_id.
3105 (set_init_label): Likewise.
3106
f7e4f2e3
DM
31072016-06-13 David Malcolm <dmalcolm@redhat.com>
3108
3109 * c-parser.c (c_parser_initelt): Provide location of name for new
3110 location_t param of set_init_label.
3111 * c-tree.h (set_init_label): Add location_t param.
3112 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3113 param and use it when issuing error messages about unrecognized
3114 field names. Attempt to provide a fixit hint if appropriate,
3115 otherwise update the error message to provide the type name.
3116
4b1ffdb1
TS
31172016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3118
3119 PR c/71381
3120 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3121 Loosen checking.
3122
44a845ca
MS
31232016-06-08 Martin Sebor <msebor@redhat.com>
3124 Jakub Jelinek <jakub@redhat.com>
3125
3126 PR c++/70507
3127 PR c/68120
3128 * c-typeck.c (convert_arguments): Don't promote last argument
3129 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3130
92a5f2ba
MP
31312016-06-08 Marek Polacek <polacek@redhat.com>
3132
3133 PR c/71418
3134 * c-decl.c (grokdeclarator): Check TYPE_P.
3135
08203f73
MP
3136 PR c/71426
3137 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3138 code.
3139
6ffd47b7
DM
31402016-06-07 David Malcolm <dmalcolm@redhat.com>
3141
3142 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3143 and structure element reference, capture the location of the
3144 element name token and pass it to build_component_ref.
3145 (c_parser_postfix_expression_after_primary): Likewise for
3146 structure element dereference.
3147 (c_parser_omp_variable_list): Likewise for
3148 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3149 * c-tree.h (build_component_ref): Add location_t param.
3150 * c-typeck.c (build_component_ref): Add location_t param
3151 COMPONENT_LOC. Use it, if available, when issuing hints about
3152 mispelled member names to provide a fixit replacement hint.
3153
1f40cff3
MP
31542016-06-06 Marek Polacek <polacek@redhat.com>
3155
3156 PR c/71362
3157 * c-parser.c (c_parser_direct_declarator): Set location.
3158
5545a907
MP
31592016-06-06 Marek Polacek <polacek@redhat.com>
3160
3161 * c-typeck.c (comptypes_internal): Handle comparisons of
3162 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3163 TYPE_REF_CAN_ALIAS_ALL.
3164
b605f663
CLT
31652016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3166
3167 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3168 arguments as addressable when async clause exists.
3169
00631022
JJ
31702016-05-30 Jakub Jelinek <jakub@redhat.com>
3171
3172 PR c++/71349
3173 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3174 when combined with target construct.
3175
7211a097
JJ
31762016-05-26 Jakub Jelinek <jakub@redhat.com>
3177
3178 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3179 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3180
95efe6b6
MP
31812016-05-25 Marek Polacek <polacek@redhat.com>
3182
3183 PR c/71265
3184 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3185
a23faf7a
MP
3186 PR c/71266
3187 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3188
e46c7770
CP
31892016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3190
3191 * c-parser.c (c_parser_oacc_declare): Add support for
3192 GOMP_MAP_FIRSTPRIVATE_POINTER.
3193 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3194 argument with enum c_omp_region_type ort.
3195 (handle_omp_array_sections): Likewise. Update call to
3196 handle_omp_array_sections_1.
3197 (c_finish_omp_clauses): Add specific errors and warning messages for
3198 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3199 call to handle_omp_array_sections.
3200
a04e69c0
TS
32012016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3202
3203 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3204
f17a223d
RB
32052016-05-24 Richard Biener <rguenther@suse.de>
3206
3207 PR middle-end/70434
3208 PR c/69504
3209 * c-typeck.c (build_array_ref): Do not complain about indexing
3210 non-lvalue vectors. Adjust for function name change.
3211
79063edd
MS
32122016-05-20 Martin Sebor <msebor@redhat.com>
3213
3214 PR c/71115
3215 * c-typeck.c (error_init): Use
3216 expansion_point_location_if_in_system_header.
3217 (warning_init): Same.
3218
8a40fef3
DM
32192016-05-19 David Malcolm <dmalcolm@redhat.com>
3220
3221 PR c/71171
3222 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3223 in error-handling.
3224 (c_parser_postfix_expression): Likewise.
3225 * c-tree.h (c_expr::set_error): New method.
3226 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3227 that result's range is initialized.
3228
e9892350
JG
32292016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3230
3231 * c-typeck.c (parser_build_unary_op): Fix formatting.
3232
8fad45f5
MW
32332016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3234
3235 * c-decl.c (grokdeclarator): Remove errmsg and use of
3236 targetm.invalid_return_type.
3237 (grokparms): Remove errmsg and use of
3238 targetm.invalid_parameter_type.
3239
aa4b467b
JM
32402016-05-13 Joseph Myers <joseph@codesourcery.com>
3241
3242 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3243 function return type.
3244
4f2e1536
MP
32452016-05-12 Marek Polacek <polacek@redhat.com>
3246
3247 PR c/70756
3248 * c-decl.c (build_compound_literal): Pass LOC down to
3249 c_incomplete_type_error.
3250 * c-tree.h (require_complete_type): Adjust declaration.
3251 (c_incomplete_type_error): Likewise.
3252 * c-typeck.c (require_complete_type): Add location parameter, pass it
3253 down to c_incomplete_type_error.
3254 (c_incomplete_type_error): Add location parameter, pass it down to
3255 error_at.
3256 (build_component_ref): Pass location down to c_incomplete_type_error.
3257 (default_conversion): Pass location down to require_complete_type.
3258 (build_array_ref): Likewise.
3259 (build_function_call_vec): Likewise.
3260 (convert_arguments): Likewise.
3261 (build_unary_op): Likewise.
3262 (build_c_cast): Likewise.
3263 (build_modify_expr): Likewise.
3264 (convert_for_assignment): Likewise.
3265 (c_finish_omp_clauses): Likewise.
3266
d6e83a8d
MM
32672016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3268
3269 PR c/43651
3270 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3271 is enabled.
3272 * c-errors.c (pedwarn_c90): Return true if warned.
3273 * c-tree.h (pedwarn_c90): Change return type to bool.
3274 (enum c_declspec_word): Add new enumerator cdw_atomic.
3275
5c3a10fb
MP
32762016-05-11 Marek Polacek <polacek@redhat.com>
3277
3278 PR c++/71024
3279 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3280 diagnose_mismatched_attributes and call it.
3281
cf68d92c
MP
32822016-05-10 Marek Polacek <polacek@redhat.com>
3283
3284 PR c/70255
3285 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3286 on a declaration following the definition.
3287
351f85c5
JJ
32882016-05-05 Jakub Jelinek <jakub@redhat.com>
3289
3290 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3291 parse it through to c_parser_c99_block_statement.
3292 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3293 caller.
3294
deef7113
MP
32952016-05-04 Marek Polacek <polacek@redhat.com>
3296
3297 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3298 OPT_Wdangling_else.
3299
de55efd5
MP
33002016-05-04 Marek Polacek <polacek@redhat.com>
3301
3302 PR c/48778
3303 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3304 for macro expansions.
3305
79ce98bc
MP
33062016-05-03 Marek Polacek <polacek@redhat.com>
3307
3308 PR c/70859
3309 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3310 check_builtin_function_arguments.
3311
fb2647aa
RB
33122016-05-03 Richard Biener <rguenther@suse.de>
3313
3314 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3315 the checksum from the previous stage.
3316
77886428
CP
33172016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3318
3319 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3320 c_finish_omp_clauses.
3321 (c_parser_omp_all_clauses): Likewise.
3322 (c_parser_oacc_cache): Likewise.
3323 (c_parser_oacc_loop): Likewise.
3324 (omp_split_clauses): Likewise.
3325 (c_parser_omp_declare_target): Likewise.
3326 (c_parser_cilk_all_clauses): Likewise.
3327 (c_parser_cilk_for): Likewise.
3328 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3329 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3330
7176a4a0
MP
33312016-05-02 Marek Polacek <polacek@redhat.com>
3332
3333 PR c/70851
3334 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3335 incomplete type.
3336
e7ff0319
CP
33372016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3338
3339 PR middle-end/70626
3340 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3341 OACC_LOOP_CLAUSE_MASK.
3342 (c_parser_oacc_kernels_parallel): Update call to
3343 c_oacc_split_loop_clauses.
3344
9f405ce1
AM
33452016-04-28 Andrew MacLeod <amacleod@redhat.com>
3346
3347 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3348 argument to build_modify_expr in two cases.
3349
c1e1f433
BS
33502016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3351
3352 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3353 warn_for_memset instead of warning directly here.
3354
2448a956
MP
33552016-04-26 Marek Polacek <polacek@redhat.com>
3356
3357 PR c/67784
3358 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3359 out of ...
3360 (c_parser_for_statement): ... here.
3361 (c_parser_if_statement): Use it.
3362 (c_parser_switch_statement): Use it.
3363 (c_parser_while_statement): Use it.
3364
b02a5e26
MP
3365 PR c/70791
3366 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3367
477d4906
IV
33682016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3369
3370 PR c++/69363
3371 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3372 instead of c_finish_cilk_clauses.
3373 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3374 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3375 floating-point variables in the linear clause for Cilk Plus.
3376
fe37c7af
MM
33772016-04-18 Michael Matz <matz@suse.de>
3378
3379 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3380 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3381
949505a9
MP
33822016-04-15 Marek Polacek <polacek@redhat.com>
3383
3384 PR c/70671
3385 * c-typeck.c (build_unary_op): Pass location down to error and
3386 warning call.
3387
dda1bf61
JJ
33882016-04-15 Jakub Jelinek <jakub@redhat.com>
3389
3390 PR c/70436
3391 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3392 where needed.
3393 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3394 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3395 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3396 Adjust c_parser_pragma callers.
3397 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3398 caller.
3399 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3400 c_parser_statement.
3401 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3402 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3403 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3404 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3405 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3406 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3407 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3408 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3409 down where needed.
3410 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3411 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3412 calls.
3413
99cd9857
MP
34142016-04-13 Marek Polacek <polacek@redhat.com>
3415
3416 PR c/70436
3417 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3418 adjust callers.
3419 (c_parser_statement): Likewise.
3420 (c_parser_c99_block_statement): Likewise.
3421 (c_parser_while_statement): Likewise.
3422 (c_parser_for_statement): Likewise.
3423 (c_parser_if_body): Don't set IF_P here.
3424 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3425 about dangling else here.
3426 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3427 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3428 warn about dangling else here.
3429
f13355da
MP
34302016-04-04 Marek Polacek <polacek@redhat.com>
3431
3432 PR c/70307
3433 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3434
5fde6a45
MP
34352016-03-31 Marek Polacek <polacek@redhat.com>
3436
3437 PR c/70297
3438 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3439
4bbf545b
DM
34402016-03-18 David Malcolm <dmalcolm@redhat.com>
3441
3442 PR c/70281
3443 * c-parser.c (c_parser_postfix_expression): Set the source range
3444 for uses of "__builtin_types_compatible_p".
3445
fcc2b74f
JJ
34462016-03-17 Jakub Jelinek <jakub@redhat.com>
3447
3448 PR c/70280
3449 * c-typeck.c (composite_type): Don't count void_list_node
3450 into len, if the list is terminated by void_list_node, start
3451 with void_list_node instead of NULL for newargs. Stop
3452 at void_list_node.
3453
ab4c578f
MP
34542016-03-16 Marek Polacek <polacek@redhat.com>
3455
3456 PR c/70093
3457 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3458 nested functions returning VM types.
3459
96b3c82d
CP
34602016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3461
3462 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3463 when calling c_finish_omp_clauses.
3464
29b9828f
BS
34652016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3466
3467 PR c/69824
3468 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3469 for later.
3470
7ff6ca38
MP
34712016-03-04 Marek Polacek <polacek@redhat.com>
3472
3473 PR c/69798
3474 * c-parser.c (c_parser_postfix_expression): Call
3475 c_parser_cast_expression rather than c_parser_postfix_expression.
3476
686e2237
JJ
34772016-03-01 Jakub Jelinek <jakub@redhat.com>
3478
3479 PR c/69796
3480 PR c/69974
3481 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3482 of incomplete decls to error_mark_node.
3483
0b05329b
MP
34842016-02-24 Marek Polacek <polacek@redhat.com>
3485
3486 PR c/69819
3487 * c-decl.c (finish_decl): Don't update the copy of the type of a
3488 different decl type.
3489
067fbd8b
JJ
34902016-02-23 Jakub Jelinek <jakub@redhat.com>
3491
3492 PR objc/69844
3493 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3494 in id_kind reclassification.
3495
bf14eba2
JJ
34962016-02-16 Jakub Jelinek <jakub@redhat.com>
3497
3498 PR c/69835
3499 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3500
ba539195
JN
35012016-02-16 James Norris <jnorris@codesourcery.com>
3502
3503 PR c/64748
3504 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3505
16595a1f
BS
35062016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3507
f48dfe98
BS
3508 * c-decl.c (build_null_declspecs): Zero the entire struct.
3509
16595a1f
BS
3510 PR c/69522
3511 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3512 callers changed. If nested_p is true, use it to call
3513 finish_implicit_inits.
3514 * c-tree.h (finish_implicit_inits): Declare.
3515 * c-typeck.c (finish_implicit_inits): New function. Move code
3516 from ...
3517 (push_init_level): ... here.
3518 (set_designator, process_init_element): Call finish_implicit_inits.
3519
66756373
JJ
35202016-02-11 Jakub Jelinek <jakub@redhat.com>
3521
3522 PR c/69768
3523 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3524 arguments for -Waddress warning.
3525
1066e9b5
JJ
35262016-02-04 Jakub Jelinek <jakub@redhat.com>
3527
3528 PR c/69669
3529 * c-decl.c (finish_enum): When honoring mode attribute,
3530 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3531
3a5d2ba4
JJ
35322016-01-29 Jakub Jelinek <jakub@redhat.com>
3533
3534 PR debug/69518
3535 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3536 all type variants, not just TYPE_MAIN_VARIANT.
3537
cbdd8ae0
JJ
35382016-01-27 Jakub Jelinek <jakub@redhat.com>
3539
3540 PR debug/66869
3541 * c-decl.c (c_write_global_declarations_1): Warn with
3542 warn_unused_function if static prototype without definition
3543 is not C_DECL_USED.
3544
fa74a4bc
MP
35452016-01-27 Marek Polacek <polacek@redhat.com>
3546
3547 PR c/68062
3548 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3549 to unsigned, if needed. Add -Wsign-compare warning.
3550
13f92e8d
JJ
35512016-01-26 Jakub Jelinek <jakub@redhat.com>
3552
3553 PR tree-optimization/69483
3554 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3555
cd8e73dc 35562016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3557
3558 PR c/24293
3559 * c-tree.h (incomplete_record_decls): Declare.
3560 * c-parser.c (incomplete_record_decls): Define.
3561 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3562 report error if any decl has zero size.
3563 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3564 or enum type to incomplete_record_decls.
3565
e6d6ec9e
TV
35662016-01-14 Tom de Vries <tom@codesourcery.com>
3567
3568 PR tree-optimization/68773
3569 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3570 set force_output.
3571
00083992
MP
35722016-01-14 Marek Polacek <polacek@redhat.com>
3573
3574 PR c/69262
3575 * c-decl.c (grokdeclarator): Provide more information for invalid
3576 array declarations.
3577
7443cf13
DM
35782016-01-06 David Malcolm <dmalcolm@redhat.com>
3579
3580 * c-parser.c (c_parser_unary_expression): For dereferences, build
3581 a combined location before calling build_indirect_ref, so that
3582 error reports cover the full range, manually updating the c_expr
3583 src_range.
3584
6b131d5b
MP
35852016-01-06 Marek Polacek <polacek@redhat.com>
3586
3587 PR sanitizer/69099
3588 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3589 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3590 NULL.
3591
818ab71a
JJ
35922016-01-04 Jakub Jelinek <jakub@redhat.com>
3593
3594 Update copyright years.
3595
2fe0a208
MP
35962016-01-04 Marek Polacek <polacek@redhat.com>
3597
3598 PR c/68908
3599 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3600 optimization to use __atomic_fetch_* built-in if possible.
3601
c7b48c8a
TS
36022015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3603
3604 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3605 into...
3606 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3607 all users.
3608
fda5652f
MP
36092015-12-22 Marek Polacek <polacek@redhat.com>
3610
3611 PR c/69002
3612 * c-typeck.c (build_component_ref): Warn when acessing elements of
3613 atomic structures or unions.
3614
745e411d
DM
36152015-12-21 David Malcolm <dmalcolm@redhat.com>
3616
3617 * c-typeck.c: Include "gcc-rich-location.h".
3618 (build_binary_op): In the two places that call binary_op_error,
3619 create a gcc_rich_location and populate it with the location of
3620 the binary op and its two operands.
3621
94c40e19
DM
36222015-12-16 David Malcolm <dmalcolm@redhat.com>
3623
3624 * c-parser.c (c_parser_statement_after_labels): When calling
3625 c_finish_return, Use the return expression's location if it has
3626 one, falling back to the location of the first token within it.
3627 * c-typeck.c (c_finish_return): When issuing warnings about
3628 the incorrect presence/absence of a return value, issue a note
3629 showing the declaration of the function.
3630
de67c4c3
DM
36312015-12-16 David Malcolm <dmalcolm@redhat.com>
3632
3633 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3634 to 4.
3635 (c_parser_peek_nth_token): New function.
3636 (c_parser_peek_conflict_marker): New function.
3637 (c_parser_error): Detect conflict markers and report them as such.
3638
a10704e1
DM
36392015-12-16 David Malcolm <dmalcolm@redhat.com>
3640
3641 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3642 to preserve range information for the primary expression
3643 in the call to c_parser_postfix_expression_after_primary.
3644
8062bca6
DM
36452015-12-16 David Malcolm <dmalcolm@redhat.com>
3646
3647 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3648 expression location, falling back on the first token location,
3649 rather than always using the latter.
3650
d06f8b75
MP
36512015-12-16 Marek Polacek <polacek@redhat.com>
3652
3653 PR c/64637
3654 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3655 available.
3656
2994fb91
MP
36572015-12-15 Marek Polacek <polacek@redhat.com>
3658
3659 PR c/68907
3660 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3661 artificial decl.
3662
a1b93f8d
DM
36632015-12-08 David Malcolm <dmalcolm@redhat.com>
3664
3665 * c-parser.c (c_parser_alignof_expression): Capture location of
3666 closing parenthesis (if any), or of end of unary expression, and
3667 use it to build a src_range for the expression.
3668
46c6e1e2
DM
36692015-12-08 David Malcolm <dmalcolm@redhat.com>
3670
3671 PR c/68757
3672 * c-parser.c (c_parser_get_builtin_args): Add
3673 "out_close_paren_loc" param, and write back to it.
3674 (c_parser_postfix_expression): Capture the closing
3675 parenthesis location for RID_CHOOSE_EXPR,
3676 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3677 RID_BUILTIN_SHUFFLE and use it to set the source range
3678 for such expressions; within RID_BUILTIN_COMPLEX set
3679 the underlying location.
3680
66189108
MP
36812015-12-07 Marek Polacek <polacek@redhat.com>
3682
3683 PR c/68668
3684 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3685 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3686
f187980b
EB
36872015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3688
3689 * c-tree.h (c_build_va_arg): Adjust prototype.
3690 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3691 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3692 parameter, adjust throughout and issue an error if EXPR is a component
3693 with reverse storage order.
3694
4250754e
JM
36952015-12-02 Jason Merrill <jason@redhat.com>
3696
3697 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3698 (c_fully_fold_internal, decl_constant_value_for_optimization):
3699 Move from c-common.c.
3700 * c-tree.h: Declare decl_constant_value_for_optimization.
3701 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3702
e9e32ee6
JM
37032015-12-02 Joseph Myers <joseph@codesourcery.com>
3704
3705 PR c/68162
3706 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3707 following link from declarator to next declarator. Track original
3708 qualified type and pass it to c_build_qualified_type.
3709 * c-typeck.c (c_build_qualified_type): Add arguments
3710 orig_qual_type and orig_qual_indirect.
3711
ff7a55bf
TS
37122015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3713
3714 * c-parser.c (c_parser_omp_clause_name)
3715 (c_parser_oacc_all_clauses): Alphabetical sorting.
3716
657e4e47
JJ
37172015-12-02 Jakub Jelinek <jakub@redhat.com>
3718
3719 PR c/68533
3720 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3721 for diagnostics.
3722
37d5ad46
JB
37232015-12-01 Julian Brown <julian@codesourcery.com>
3724 Cesar Philippidis <cesar@codesourcery.com>
3725 James Norris <James_Norris@mentor.com>
3726
3727 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3728 (c_parser_oacc_clause_use_device): New function.
3729 (c_parser_oacc_all_clauses): Add use_device support.
3730 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3731 (c_parser_oacc_host_data): New function.
3732 (c_parser_omp_construct): Add host_data support.
3733 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3734 * c-typeck.c (c_finish_oacc_host_data): New function.
3735 (c_finish_omp_clauses): Add use_device support.
3736
a4850ce9
JH
37372015-11-29 Jan Hubicka <hubicka@ucw.cz>
3738
3739 PR c/67106
3740 * c-decl.c: Set TYPE_PACKED in variants.
3741
b58d3df2
ML
37422015-11-27 Martin Liska <mliska@suse.cz>
3743
3744 PR c++/68312
3745 * c-array-notation.c (fix_builtin_array_notation_fn):
3746 Use release_vec_vec instead of vec::release.
3747 (build_array_notation_expr): Likewise.
3748 (fix_conditional_array_notations_1): Likewise.
3749 (fix_array_notation_expr): Likewise.
3750 (fix_array_notation_call_expr): Likewise.
3751
aec17bfe
JJ
37522015-11-27 Jakub Jelinek <jakub@redhat.com>
3753
3754 PR c/63326
3755 * c-parser.c (c_parser_compound_statement_nostart): If
3756 last_label is true, use pragma_stmt instead of pragma_compound
3757 as second c_parser_pragma argument.
3758 (c_parser_omp_ordered, c_parser_omp_target_update,
3759 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3760 false as second argument to c_parser_skip_to_pragma_eol after
3761 diagnosing standalone directives used in pragma_stmt context.
3762
688c4de0
IV
37632015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3764
3765 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3766 with "if (ENABLE_OFFLOADING)".
3767
cbd03aee
DM
37682015-11-23 David Malcolm <dmalcolm@redhat.com>
3769
3770 PR objc/68438
3771 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3772 for various Objective-C constructs: Class.name syntax,
3773 @selector(), @protocol(), @encode(), and [] message syntax.
3774
a87a86e1
DM
37752015-11-20 David Malcolm <dmalcolm@redhat.com>
3776
3777 PR 62314
3778 * c-typeck.c (should_suggest_deref_p): New function.
3779 (build_component_ref): Special-case POINTER_TYPE when
3780 generating a "not a structure of union" error message, and
3781 suggest a "->" rather than a ".", providing a fix-it hint.
3782
8ece8dfb
DM
37832015-11-19 David Malcolm <dmalcolm@redhat.com>
3784
3785 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3786 candidate into a new function, find_closest_identifier.
3787
433068cc
MP
37882015-11-19 Marek Polacek <polacek@redhat.com>
3789
3790 PR c/68412
3791 * c-typeck.c (parser_build_binary_op): Properly handle
3792 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3793
bef08b71
DM
37942015-11-17 David Malcolm <dmalcolm@redhat.com>
3795
3796 * c-parser.c (set_c_expr_source_range): Bulletproof both
3797 overloaded implementations against NULL expr->value.
3798 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3799 values.
3800 (c_parser_unary_expression): Likewise when handling addresses of
3801 labels.
3802 (c_parser_postfix_expression): Likewise for statement expressions,
3803 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3804 __builtin_va_arg, and for __builtin_offset_of.
3805 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3806 src_range using the range of the braced initializer.
3807 (c_parser_transaction_expression): Set src_range for "ret" to a
3808 sane pair of values.
3809
fff77217
KY
38102015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3811
3812 * c-parser.c (c_finish_omp_declare_simd): Look for
3813 "simd" attribute as well. Update error message.
3814
1d899da2
TS
38152015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3816
3817 * c-parser.c (c_parser_omp_declare_target): Adjust.
3818
e4606348
JJ
38192015-11-14 Jakub Jelinek <jakub@redhat.com>
3820
3821 * c-typeck.c (c_finish_omp_clauses): Don't mark
3822 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3823
3e636daf
MP
38242015-11-14 Marek Polacek <polacek@redhat.com>
3825
3826 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3827 * c-typeck.c: Likewise.
3828
ebedc9a3
DM
38292015-11-13 David Malcolm <dmalcolm@redhat.com>
3830
3831 * c-decl.c (warn_defaults_to): Pass line_table to
3832 rich_location ctor.
3833 * c-errors.c (pedwarn_c99): Likewise.
3834 (pedwarn_c90): Likewise.
3835 * c-parser.c (set_c_expr_source_range): New functions.
3836 (c_token::get_range): New method.
3837 (c_token::get_finish): New method.
3838 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3839 based on the range from the start of the LHS to the end of the
3840 RHS.
3841 (c_parser_conditional_expression): Likewise, based on the range
3842 from the start of the cond.value to the end of exp2.value.
3843 (c_parser_binary_expression): Call set_c_expr_source_range on
3844 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3845 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3846 based on the cast_loc through to the end of the expr.
3847 (c_parser_unary_expression): Likewise, based on the
3848 op_loc through to the end of op.
3849 (c_parser_sizeof_expression) Likewise, based on the start of the
3850 sizeof token through to either the closing paren or the end of
3851 expr.
3852 (c_parser_postfix_expression): Likewise, using the token range,
3853 or from the open paren through to the close paren for
3854 parenthesized expressions.
3855 (c_parser_postfix_expression_after_primary): Likewise, for
3856 various kinds of expression.
3857 * c-tree.h (struct c_expr): Add field "src_range".
3858 (c_expr::get_start): New method.
3859 (c_expr::get_finish): New method.
3860 (set_c_expr_source_range): New decls.
3861 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3862 on ret for prefix unary ops.
3863 (parser_build_binary_op): Likewise, running from the start of
3864 arg1.value through to the end of arg2.value.
3865
ec8b536f
MP
38662015-11-13 Marek Polacek <polacek@redhat.com>
3867
3868 PR c/68320
3869 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3870
277fe616
DM
38712015-11-13 David Malcolm <dmalcolm@redhat.com>
3872
3873 * c-typeck.c: Include spellcheck.h.
3874 (lookup_field_fuzzy_find_candidates): New function.
3875 (lookup_field_fuzzy): New function.
3876 (build_component_ref): If the field was not found, try using
3877 lookup_field_fuzzy and potentially offer a suggestion.
3878
6e232ba4
JN
38792015-11-12 James Norris <jnorris@codesourcery.com>
3880 Joseph Myers <joseph@codesourcery.com>
3881
3882 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3883 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3884 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3885 and PRAGMA_OMP_CLAUSE_LINK.
3886 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3887 and PRAGMA_OACC_CLAUSE_LINK.
3888 (OACC_DECLARE_CLAUSE_MASK): New definition.
3889 (c_parser_oacc_declare): New function.
3890
9be4f715
MP
38912015-11-12 Marek Polacek <polacek@redhat.com>
3892
3893 PR c/67784
3894 * c-parser.c (c_parser_for_statement): Reclassify the token in
3895 a correct scope.
3896
e78bede6
MP
38972015-11-11 Marek Polacek <polacek@redhat.com>
3898
3899 PR c/68107
3900 PR c++/68266
3901 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3902 checking the size of an array.
3903
69f293c9
AM
39042015-11-11 Andrew MacLeod <amacleod@redhat.com>
3905
3906 * c-array-notation.c: Remove unused header files.
3907 * c-aux-info.c: Likewise.
3908 * c-convert.c: Likewise.
3909 * c-decl.c: Likewise.
3910 * c-errors.c: Likewise.
3911 * c-lang.c: Likewise.
3912 * c-objc-common.c: Likewise.
3913 * c-parser.c: Likewise.
3914 * c-typeck.c: Likewise.
3915 * gccspec.c: Likewise.
3916
3a40d81d
NS
39172015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3918 Cesar Philippidis <cesar@codesourcery.com>
3919 James Norris <jnorris@codesourcery.com>
3920 Julian Brown <julian@codesourcery.com>
3921 Nathan Sidwell <nathan@codesourcery.com>
3922
3a40d81d
NS
3923 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3924 routine arg.
3925 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3926 (c_parser_pragma): Parse 'acc routine'.
3927 (OACC_ROUTINE_CLAUSE_MARK): Define.
3928 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3929
fc402eec
AA
39302015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3931
3932 PR debug/67192
3933 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3934 location of the backward-goto to the start of the loop body.
3935
f6b0b3db
AA
39362015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3937
3938 PR debug/67192
3939 * c-parser.c (c_parser_while_statement): Finish the loop before
3940 parsing ahead for misleading indentation.
3941 (c_parser_for_statement): Likewise.
3942
ee45a32d
EB
39432015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3944
3945 * c-decl.c (finish_struct): If the structure has reverse storage
3946 order, rewrite the type of array fields with scalar component. Call
3947 maybe_apply_pragma_scalar_storage_order on entry.
3948 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
3949 errors on bit-fields and reverse SSO here and not...
3950 (c_mark_addressable): ...here.
3951 (output_init_element): Adjust call to initializer_constant_valid_p.
3952 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
3953
8a645150
DM
39542015-11-06 David Malcolm <dmalcolm@redhat.com>
3955
3956 * c-decl.c (warn_defaults_to): Update for change in signature
3957 of diagnostic_set_info.
3958 * c-errors.c (pedwarn_c99): Likewise.
3959 (pedwarn_c90): Likewise.
3960 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
3961 for textinfo::set_location.
3962
7a5e4956
CP
39632015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3964 Thomas Schwinge <thomas@codesourcery.com>
3965 James Norris <jnorris@codesourcery.com>
3966
3967 * c-parser.c (c_parser_omp_clause_name): Add support for
3968 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
3969 (c_parser_omp_clause_default): Add is_oacc argument. Handle
3970 default(none) in OpenACC.
3971 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
3972 arguments.
3973 (c_parser_oacc_clause_tile): New function.
3974 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
3975 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
3976 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
3977 TILE}.
3978 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
3979 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
3980 FIRSTPRIVATE}.
3981 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
3982 (c_parser_oacc_update): Update the error message for missing clauses.
3983 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
3984 and OMP_CLAUSE_INDEPENDENT.
3985
bfcfbfa0
MP
39862015-11-05 Marek Polacek <polacek@redhat.com>
3987
3988 PR c/68090
3989 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
3990 deal with pre-evaluation on invalid types.
3991
e01d41e5
JJ
39922015-11-05 Jakub Jelinek <jakub@redhat.com>
3993 Ilya Verbin <ilya.verbin@intel.com>
3994
3995 * c-parser.c: Include context.h and gimple-expr.h.
3996 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
3997 monotonic together with nonmonotonic.
3998 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
3999 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4000 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4001 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4002 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4003 expressions on combined target teams before the target.
4004 (c_parser_omp_declare_target): If decl has "omp declare target" or
4005 "omp declare target link" attribute, and cgraph or varpool node already
4006 exists, then set corresponding flags. Call c_finish_omp_clauses
4007 in the parenthesized extended-list syntax case.
4008 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4009 declare target.
4010 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4011 on OMP_CLAUSE_REDUCTION array sections.
4012 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4013 into the constant offset, or for variable low-bound using
4014 POINTER_PLUS_EXPR. For structure element based array sections use
4015 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4016 (c_finish_omp_clauses): Drop generic_field_head, structure
4017 elements are now always mapped even as array section bases,
4018 diagnose same var in data sharing and mapping clauses. Diagnose if
4019 linear step on declare simd is neither a constant nor a uniform
4020 parameter. Look through POINTER_PLUS_EXPR for array section
4021 reductions. Diagnose the same var or function appearing multiple
4022 times on the same directive. Fix up wording for the to clause if t
4023 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4024 modifier on kinds other than dynamic or guided or nonmonotonic
4025 modifier together with ordered clause.
4026
4bf9e5a8
TS
40272015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4028 Chung-Lin Tang <cltang@codesourcery.com>
4029
4030 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4031
2adfab87
AM
40322015-10-29 Andrew MacLeod <amacleod@redhat.com>
4033
4034 * c-array-notation.c: Reorder #include's and remove duplicates.
4035 * c-aux-info.c: Likewise.
4036 * c-convert.c: Likewise.
4037 * c-decl.c: Likewise.
4038 * c-errors.c: Likewise.
4039 * c-lang.c: Likewise.
4040 * c-objc-common.c: Likewise.
4041 * c-parser.c: Likewise.
4042 * c-typeck.c: Likewise.
4043
e922069e
JW
40442015-10-26 Jim Wilson <jim.wilson@linaro.org>
4045
4046 PR debug/66068
4047 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4048 after calling build_qualified_type.
4049
765dd391
CP
40502015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4051 Thomas Schwinge <thomas@codesourcery.com>
4052 James Norris <jnorris@codesourcery.com>
4053 Joseph Myers <joseph@codesourcery.com>
4054 Julian Brown <julian@codesourcery.com>
4055 Bernd Schmidt <bschmidt@redhat.com>
4056
4057 * c-parser.c (c_parser_oacc_shape_clause): New.
4058 (c_parser_oacc_simple_clause): New.
4059 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4060 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4061
88bae6f4
TS
40622015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4063 James Norris <jnorris@codesourcery.com>
4064 Cesar Philippidis <cesar@codesourcery.com>
4065
4066 PR c/64765
4067 PR c/64880
4068 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4069 parameters, and handle these. Adjust all users.
4070 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4071 into...
4072 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4073 all users.
4074 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4075 declare functions.
4076 (c_finish_omp_construct): Declare function.
4077 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4078 Merge functions into...
4079 (c_finish_omp_construct): ... this new function.
4080
a8fc2579
RB
40812015-10-22 Richard Biener <rguenther@suse.de>
4082
4083 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4084 before folding a MINUS_EXPR.
4085
e9122ef6
MP
40862015-10-21 Marek Polacek <polacek@redhat.com>
4087
4088 PR c/68024
4089 * c-decl.c (start_function): Warn about vararg functions without
4090 a prototype.
4091
9f47c7e5
IE
40922015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4093
4094 * c-typeck.c (build_conditional_expr): Use boolean vector
4095 type for vector comparison.
4096 (build_vec_cmp): New.
4097 (build_binary_op): Use build_vec_cmp for comparison.
4098
fa60eeb9
MP
40992015-10-20 Marek Polacek <polacek@redhat.com>
4100
4101 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4102
2c7020eb
MP
41032015-10-20 Marek Polacek <polacek@redhat.com>
4104
4105 PR c/67964
4106 * c-parser.c (c_parser_attributes): Break out of the loop if the
4107 token after an attribute isn't a comma.
4108
d9a6bd32
JJ
41092015-10-13 Jakub Jelinek <jakub@redhat.com>
4110 Aldy Hernandez <aldyh@redhat.com>
4111
4112 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4113 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4114 (c_parser_omp_variable_list): Handle structure elements for
4115 map, to and from clauses. Handle array sections in reduction
4116 clause. Formatting fixes.
4117 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4118 if clause modifiers.
4119 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4120 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4121 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4122 c_parser_omp_clause_is_device_ptr): New functions.
4123 (c_parser_omp_clause_ordered): Parse optional parameter.
4124 (c_parser_omp_clause_reduction): Handle array reductions.
4125 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4126 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4127 functions.
4128 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4129 (c_parser_omp_clause_depend_sink): New function.
4130 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4131 (c_parser_omp_clause_map): Parse release/delete map kinds and
4132 optional always modifier.
4133 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4134 and c_finish_omp_clauses callers.
4135 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4136 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4137 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4138 (OMP_CRITICAL_CLAUSE_MASK): Define.
4139 (c_parser_omp_critical): Parse critical clauses.
4140 (c_parser_omp_for_loop): Handle doacross loops, adjust
4141 c_finish_omp_for and c_finish_omp_clauses callers.
4142 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4143 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4144 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4145 (c_parser_omp_for): Disallow ordered clause when combined with
4146 distribute. Disallow linear clause when combined with distribute
4147 and not combined with simd.
4148 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4149 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4150 parse clauses and if depend clause is found, don't parse a body.
4151 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4152 Allow target parallel without for after it.
4153 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4154 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4155 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4156 invalid kinds.
4157 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4158 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4159 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4160 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4161 functions.
4162 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4163 defaultmap and is_device_ptr clauses.
4164 (c_parser_omp_target): Parse target parallel and target simd. Set
4165 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4166 and target exit data. Diagnose invalid map kinds.
4167 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4168 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4169 construct.
4170 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4171 &omp_priv.
4172 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4173 (c_parser_omp_taskloop): New function.
4174 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4175 handle PRAGMA_OMP_TASKLOOP.
4176 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4177 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4178 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4179 Add IS_OMP argument, handle structure element bases, diagnose
4180 bitfields, pass IS_OMP recursively, diagnose known zero length
4181 array sections in depend clauses, handle array sections in reduction
4182 clause, diagnose negative length even for pointers.
4183 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4184 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4185 array sections in reduction clause, set
4186 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4187 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4188 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4189 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4190
21ba0cea
MP
41912015-10-06 Marek Polacek <polacek@redhat.com>
4192
4193 * c-parser.c (c_parser_statement_after_labels): Use
4194 protected_set_expr_location.
4195 (c_parser_omp_clause_num_gangs): Likewise.
4196 (c_parser_omp_clause_num_threads): Likewise.
4197 (c_parser_omp_clause_num_workers): Likewise.
4198 (c_parser_omp_clause_vector_length): Likewise.
4199 (c_parser_omp_clause_num_teams): Likewise.
4200 (c_parser_omp_clause_thread_limit): Likewise.
4201 * c-typeck.c (build_c_cast): Likewise.
4202 (c_cast_expr): Likewise.
4203
624d31fe
RS
42042015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4205
4206 * c-typeck.c (c_tree_equal): Use real_equal instead of
4207 REAL_VALUES_EQUAL.
4208
b8fd7909
JM
42092015-10-04 Jason Merrill <jason@redhat.com>
4210
4211 * c-parser.c (c_lex_one_token): Handle @synchronized.
4212 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4213 can change whether the function is transaction_safe.
4214
1c7485af
MP
42152015-10-02 Marek Polacek <polacek@redhat.com>
4216
4217 PR c/67730
4218 * c-typeck.c (convert_for_assignment): Use the expansion point
4219 location throughout.
4220
3e3b8d63
MP
42212015-10-02 Marek Polacek <polacek@redhat.com>
4222
4223 PR c/64249
4224 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4225 and pass it down to c_parser_if_statement.
4226 (c_parser_else_body): Add CHAIN parameter and pass it down to
4227 c_parser_statement_after_labels.
4228 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4229 duplicated if-else-if conditions.
4230
aabef2de
MP
42312015-10-01 Marek Polacek <polacek@redhat.com>
4232
4233 * c-typeck.c (convert_for_assignment): Improve commentary.
4234
de8ddd5f
MP
42352015-09-30 Marek Polacek <polacek@redhat.com>
4236
4237 PR c/67730
4238 * c-typeck.c (c_finish_return): Use the expansion point location for
4239 certain "return with value" warnings.
4240
c4914de6
MLI
42412015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4242
4243 * c-parser.c (pragma_lex): Add loc argument.
4244
0e36f5c7
MP
42452015-09-15 Marek Polacek <polacek@redhat.com>
4246
4247 PR c/67580
4248 * c-decl.c (tag_exists_p): New function.
4249 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4250 struct/union/enum keywords are missing.
4251 * c-tree.h (tag_exists_p): Declare.
4252
2f3bb934
MP
42532015-09-15 Marek Polacek <polacek@redhat.com>
4254
4255 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4256 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4257 Return NULL_TREE instead of 0.
4258 (lookup_name): Return NULL_TREE instead of 0.
4259 (lookup_name_in_scope): Likewise.
4260 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4261 (parser_xref_tag): Use false instead of 0.
4262 (start_struct): Use true instead of 1.
4263 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4264
aa256c4a
MP
42652015-09-14 Marek Polacek <polacek@redhat.com>
4266
4267 * c-typeck.c (set_nonincremental_init_from_string): Use
4268 HOST_WIDE_INT_M1U when shifting a negative value.
4269
dbb68221
MW
42702015-09-09 Mark Wielaard <mjw@redhat.com>
4271
4272 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4273 parm against NULL.
4274
a8a098ac
JJ
42752015-09-10 Jakub Jelinek <jakub@redhat.com>
4276
4277 PR c/67502
4278 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4279 into OMP_FOR_PRE_BODY rather than before the loop.
4280
f4b189d5
JJ
42812015-09-09 Jakub Jelinek <jakub@redhat.com>
4282
0bb99c11
JJ
4283 PR c/67501
4284 * c-parser.c (c_parser_oacc_all_clauses,
4285 c_parser_omp_all_clauses): Remove invalid clause from
4286 list of clauses even if parser->error is set.
4287
fce5e5e3
JJ
4288 PR c/67500
4289 * c-parser.c (c_parser_omp_clause_aligned,
4290 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4291 test for errors.
4292 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4293 error_mark_node.
4294
f4b189d5
JJ
4295 PR c/67495
4296 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4297 instead of c_parser_unary_expression. If the result is !lvalue_p,
4298 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4299
b2aaf235
MP
43002015-09-04 Marek Polacek <polacek@redhat.com>
4301
4302 PR sanitizer/67279
4303 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4304
1807ffc1
MS
43052015-09-03 Martin Sebor <msebor@redhat.com>
4306
4307 PR c/66516
8b652e65
JJ
4308 * c-typeck.c (convert_arguments, parser_build_unary_op,
4309 build_conditional_expr, c_cast_expr, convert_for_assignment,
4310 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4311 reject_gcc_builtin.
4312 (c_decl_implicit): Define.
4313
d04ff417
MP
43142015-09-02 Marek Polacek <polacek@redhat.com>
4315
4316 PR c/67432
4317 * c-parser.c (c_parser_enum_specifier): Give a better error for
4318 an empty enum.
4319
a79683d5
TS
43202015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4321
4322 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4323
191a6b94
MP
43242015-08-12 Marek Polacek <polacek@redhat.com>
4325
4326 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4327 LOC to it.
4328
420a9d9b
MP
43292015-08-03 Marek Polacek <polacek@redhat.com>
4330
4331 PR c/67088
4332 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4333 Use it.
4334 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4335
992118a1
PP
43362015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4337
4338 * c-parser.c (c_parser_if_body): Take token_indent_info
4339 argument. Call warn_for_misleading_indentation even when the
4340 body is a semicolon. Extract token_indent_infos corresponding
4341 to the guard, body and next tokens. Adjust call to
4342 warn_for_misleading_indentation accordingly.
4343 (c_parser_else_body): Likewise.
4344 (c_parser_if_statement): Likewise.
4345 (c_parser_while_statement): Likewise.
4346 (c_parser_for_statement): Likewise.
4347
46308474
LFSM
43482015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4349 Manuel López-Ibáñez <manu@gcc.gnu.org>
4350
4351 * c-decl.c (get_parm_info): Remove static var. Update warning
4352 message.
4353
05b28fd6
MP
43542015-07-27 Marek Polacek <polacek@redhat.com>
4355
4356 PR c++/66555
4357 PR c/54979
4358 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4359
451b5e48
MP
43602015-07-20 Marek Polacek <polacek@redhat.com>
4361
4362 PR c++/55095
4363 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4364 (build_binary_op): Warn about left shift overflows.
4365
1916bcb5
AM
43662015-07-09 Andrew MacLeod <amacleod@redhat.com>
4367
4368 * c-array-notation.c: Adjust includes for flags.h changes.
4369 * c-objc-common.c: Likewise.
4370
c7131fb2
AM
43712015-07-07 Andrew MacLeod <amacleod@redhat.com>
4372
4373 * c-array-notation.c: Adjust includes.
4374 * c-aux-info.c: Likewise.
4375 * c-convert.c: Likewise.
4376 * c-decl.c: Likewise.
4377 * c-errors.c: Likewise.
4378 * c-lang.c: Likewise.
4379 * c-objc-common.c: Likewise.
4380 * c-parser.c: Likewise.
4381 * c-typeck.c: Likewise.
4382
da2e71c9
MLI
43832015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4384
4385 PR fortran/66605
4386 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4387
b155cfd9
MP
43882015-06-29 Marek Polacek <polacek@redhat.com>
4389
4390 PR c/66322
4391 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4392 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4393 about -Wswitch-bool here.
4394 (do_case): Update c_add_case_label call.
4395 (c_finish_case): Update c_do_switch_warnings call.
4396
31521951
MP
43972015-06-27 Marek Polacek <polacek@redhat.com>
4398
4399 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4400
22d03525
MP
44012015-06-26 Marek Polacek <polacek@redhat.com>
4402
4403 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4404 INDIRECT_REF_P.
4405 * c-typeck.c (array_to_pointer_conversion): Likewise.
4406 (build_unary_op): Likewise.
4407 (c_finish_return): Likewise.
4408
f0889939
AM
44092015-06-25 Andrew MacLeod <amacleod@redhat.com>
4410
4411 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4412 * c-parser.c: Likewise.
4413
8d67ee55
RS
44142015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4415
4416 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4417 instead of pointer_hash.
4418 (detect_field_duplicates): Likewise.
4419
0ae9bd27
MP
44202015-06-25 Marek Polacek <polacek@redhat.com>
4421
4422 * c-array-notation.c: Use VAR_P throughout.
4423 * c-decl.c: Likewise.
4424 * c-objc-common.c: Likewise.
4425 * c-parser.c: Likewise.
4426 * c-typeck.c: Likewise.
4427
62f9079a
MP
44282015-06-25 Marek Polacek <polacek@redhat.com>
4429
4430 * c-decl.c: Use is_global_var throughout.
4431 * c-parser.c: Likewise.
4432 * c-typeck.c: Likewise.
4433
abb226c9
AM
44342015-06-17 Andrew MacLeod <amacleod@redhat.com>
4435
4436 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4437 * c-aux-info.c: Likewise.
4438 * c-convert.c: Likewise.
4439 * c-decl.c: Likewise.
4440 * c-errors.c: Likewise.
4441 * c-lang.c: Likewise.
4442 * c-objc-common.c: Likewise.
4443 * c-parser.c: Likewise.
4444 * c-typeck.c: Likewise.
4445
8cbababc
JH
44462015-06-11 Jan Hubicka <hubicka@ucw.cz>
4447
4448 PR middle-end/66325
4449 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4450 variants.
4451
a0349665
PMR
44522015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4453
4454 * c-decl.c (pop_scope): Register the main translation unit
4455 through the new debug hook.
4456
13fdf2e2
AM
44572015-06-08 Andrew MacLeod <amacleod@redhat.com>
4458
4459 * c-array-notation.c : Adjust include files.
4460 * c-aux-info.c : Likewise.
4461 * c-convert.c : Likewise.
4462 * c-decl.c : Likewise.
4463 * c-errors.c : Likewise.
4464 * c-lang.c : Likewise.
4465 * c-lang.h : Likewise.
4466 * c-objc-common.c : Likewise.
4467 * c-parser.c : Likewise.
4468 * c-typeck.c : Likewise.
4469
d7438551
AH
44702015-06-05 Aldy Hernandez <aldyh@redhat.com>
4471
4472 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4473 immediately clobber it.
4474 (c_write_global_declarations_1): Remove call to
4475 check_global_declaration_1.
4476 (c_write_global_declarations_2): Remove.
4477 (c_write_final_cleanups): Rename from c_write_global_declarations.
4478 Remove call to finalize_compilation_unit.
4479 Remove calls to debugging hooks.
4480 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4481 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4482 * c-tree.h: Remove c_write_global_declarations.
4483
ecb9f223
AM
44842015-06-04 Andrew MacLeod <amacleod@redhat.com>
4485
4486 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4487 * c-aux-info.c: Likewise.
4488 * c-convert.c: Likewise.
4489 * c-decl.c: Likewise.
4490 * c-errors.c: Likewise.
4491 * c-lang.c: Likewise.
4492 * c-objc-common.c: Likewise.
4493 * c-parser.c: Likewise.
4494 * c-typeck.c: Likewise.
4495
9482b620
MP
44962015-06-04 Marek Polacek <polacek@redhat.com>
4497
4498 PR c/66341
4499 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4500 it is a lvalue.
4501
bc51ace3
PK
45022015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4503
4504 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4505 Warn for empty struct.
4506 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4507
ea5b45b6
AT
45082015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4509
4510 * c-decl.c (start_function): Call plugin before parsing.
4511 (finish_function): Call plugin after parsing.
4512
c2d47482
PK
45132015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4514
4515 PR c/49551
4516 * c-decl.c (merge_decls): Merge DECL_COMMON.
4517
a95492ab
JW
45182015-05-22 Jim Wilson <jim.wilson@linaro.org>
4519
4520 * Make-lang.in (check_gcc_pallelize): Define.
4521
fd5c817a
MP
45222015-05-22 Marek Polacek <polacek@redhat.com>
4523
4524 PR c/47043
4525 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4526 attributes.
4527
c7b70a3c
MP
45282015-05-21 Marek Polacek <polacek@redhat.com>
4529
4530 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4531 DECL_BUILT_IN.
4532
21b634ae
MP
45332015-05-20 Marek Polacek <polacek@redhat.com>
4534
4535 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4536 * c-typeck.c: Likewise.
4537
296a8c2f
MP
45382015-05-19 Marek Polacek <polacek@redhat.com>
4539
4540 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4541
41b37d5e
JJ
45422015-05-19 Jakub Jelinek <jakub@redhat.com>
4543
4544 PR middle-end/66199
4545 * c-parser.c (c_parser_omp_for_loop): Don't add
4546 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4547 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4548 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4549 constructs.
4550
fab27f52
MM
45512015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4552
4553 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4554 swaps.
fab27f52 4555
40de31cf
MLI
45562015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4557
4558 PR fortran/44054
4559 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4560 accessor function.
4561
3aa3c9fc
MP
45622015-05-14 Marek Polacek <polacek@redhat.com>
4563
4564 PR c/66066
4565 PR c/66127
4566 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4567 rather than with 0.
4568
c3388e62
DM
45692015-05-12 David Malcolm <dmalcolm@redhat.com>
4570
4571 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4572 to add a call to warn_for_misleading_indentation.
4573 (c_parser_else_body): Likewise, adding param "else_loc".
4574 (c_parser_if_statement): Check for misleading indentation.
4575 (c_parser_while_statement): Likewise.
4576 (c_parser_for_statement): Likewise.
4577
755e528f
MP
45782015-05-08 Marek Polacek <polacek@redhat.com>
4579
4580 PR c/64918
4581 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4582 (output_init_element): Likewise.
4583
0173bd2a
MP
45842015-05-07 Marek Polacek <polacek@redhat.com>
4585
4586 PR c/65179
4587 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4588 value.
4589
9babc352
MP
45902015-04-30 Marek Polacek <polacek@redhat.com>
4591
4592 * c-typeck.c (set_init_label): Call error_at instead of error and
4593 pass LOC to it.
4594
ac9f18db
MP
4595 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4596 the type of a decl.
4597
ec3fba51
MP
4598 * c-typeck.c (c_build_va_arg): Clarify the error message.
4599
b811915d
TS
46002015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4601
4602 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4603 OMP_STANDALONE_CLAUSES.
4604
f3075008
MP
46052015-04-28 Marek Polacek <polacek@redhat.com>
4606
4607 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4608
4e81b788
MP
46092015-04-28 Marek Polacek <polacek@redhat.com>
4610
4611 PR c/65901
4612 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4613
6c1db78e
MP
46142015-04-25 Marek Polacek <polacek@redhat.com>
4615
4616 PR c/52085
4617 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4618 attribute.
4619
5c4abbb8
MP
46202015-04-23 Marek Polacek <polacek@redhat.com>
4621
4622 PR c/65345
4623 * c-decl.c (set_labels_context_r): New function.
4624 (store_parm_decls): Call it via walk_tree_without_duplicates.
4625 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4626 instead of create_tmp_var. Build TARGET_EXPR instead of
4627 COMPOUND_EXPR.
4628 (build_atomic_assign): Use create_tmp_var_raw instead of
4629 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4630
06aca1d5
IV
46312015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4632
4633 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4634 (c_parser_omp_target_update): Add missed %> to error_at ().
4635
8fba1830
BRF
46362015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4637
4638 PR target/55143
4639 * c-decl.c (c_default_pointer_mode): Remove definition.
4640 * c-tree.h (c_default_pointer_mode): Remove declaration.
4641
62021f64
TB
46422015-03-27 Tobias Burnus <burnus@net-b.de>
4643
4644 PR c/65586
4645 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4646 error out.
4647 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4648 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4649 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4650
9b65e171
JJ
46512015-03-19 Jakub Jelinek <jakub@redhat.com>
4652
4653 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4654 attribute for DECL_EXTERNAL VAR_DECLs.
4655
17958621
JJ
46562015-03-11 Jakub Jelinek <jakub@redhat.com>
4657
4658 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4659 argument.
4660
7ccb1a11
JJ
46612015-03-10 Jakub Jelinek <jakub@redhat.com>
4662
4663 PR c/65120
4664 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4665 before preparing arguments to warn_logical_not_parentheses.
4666
01177669
JJ
46672015-03-09 Jakub Jelinek <jakub@redhat.com>
4668
4669 PR c/65120
4670 * c-typeck.c (parser_build_binary_op): Don't warn for
4671 !!x == y or !b == y where b is _Bool.
4672
802ac282
MP
46732015-03-09 Marek Polacek <polacek@redhat.com>
4674
4675 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4676 * c-decl.c (grokdeclarator): Likewise.
4677 * c-typeck.c (build_binary_op): Likewise.
4678
e5165b60
MP
46792015-02-27 Marek Polacek <polacek@redhat.com>
4680
4681 PR c/65228
4682 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4683
065d214c
MP
46842015-02-14 Marek Polacek <polacek@redhat.com>
4685
4686 PR c/64768
4687 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4688 declared through a typedef name.
4689
e5d9235b
MP
46902015-02-13 Marek Polacek <polacek@redhat.com>
4691
4692 PR c/65050
4693 * c-decl.c (grokdeclarator): Print also the type when giving
4694 the error message about array's incomplete element type.
4695
fa01ffcc
JJ
46962015-02-11 Jakub Jelinek <jakub@redhat.com>
4697
4698 PR c/64824
4699 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4700 check in the POP macro.
4701
c3e38a03
MP
47022015-02-09 Marek Polacek <polacek@redhat.com>
4703
4704 PR c/64856
4705 * c-typeck.c (process_init_element): Don't always wrap
4706 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4707 initializing a range of elements.
4708
4886ec8e
JJ
47092015-02-04 Jakub Jelinek <jakub@redhat.com>
4710
4711 PR c/64824
4712 PR c/64868
4713 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4714
c3e38a03 47152015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4716
4717 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4718 processing enum declaration.
4719
7b33f0c8
MP
47202015-01-29 Marek Polacek <polacek@redhat.com>
4721
4722 PR c/64709
4723 * c-typeck.c (pop_init_level): If constructor_elements has
4724 exactly one element with integer_zerop value, set constructor_zeroinit
4725 to 1. Remove braces around warning_init call.
4726
dea63e49
JJ
47272015-01-27 Jakub Jelinek <jakub@redhat.com>
4728
4729 PR c/64766
4730 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4731 of FUNCTION_DECLs with error_mark_node.
4732
d38f7dce
JJ
47332015-01-26 Jakub Jelinek <jakub@redhat.com>
4734
4735 PR c/64778
4736 * c-typeck.c (convert_arguments): Return -1 if there are
4737 error_args, even if we've diagnosed too many arguments.
4738
cbf5d0e7
RB
47392015-01-21 Richard Biener <rguenther@suse.de>
4740
4741 PR middle-end/64313
4742 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4743 for builtins the user declared correctly.
4744
41dbbb37
TS
47452015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4746 Bernd Schmidt <bernds@codesourcery.com>
4747 Cesar Philippidis <cesar@codesourcery.com>
4748 James Norris <jnorris@codesourcery.com>
4749 Jakub Jelinek <jakub@redhat.com>
4750 Ilmir Usmanov <i.usmanov@samsung.com>
4751
4752 * c-parser.c: Include "gomp-constants.h".
4753 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4754 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4755 Use OMP_CLAUSE_SET_MAP_KIND.
4756 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4757 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4758 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4759 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4760 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4761 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4762 "copyout", "create", "delete", "deviceptr", "gang", "host",
4763 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4764 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4765 "present_or_create", "pcreate", "seq", "self", "vector",
4766 "vector_length", "wait", "worker".
4767 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4768 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4769 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4770 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4771 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4772 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4773 (c_parser_oacc_data_clause_deviceptr)
4774 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4775 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4776 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4777 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4778 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4779 (c_parser_oacc_parallel, c_parser_oacc_update)
4780 (c_parser_oacc_wait): New functions.
4781 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4782 (c_finish_oacc_data): New prototypes.
4783 * c-typeck.c: Include "gomp-constants.h".
4784 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4785 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4786 OMP_CLAUSE_SET_MAP_KIND.
4787 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4788 (c_finish_oacc_data): New functions.
4789 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4790 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4791 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4792 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4793 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4794 GOMP_MAP_FORCE_DEVICEPTR.
4795
adfac8df
JJ
47962015-01-09 Michael Collison <michael.collison@linaro.org>
4797
4798 * c-array-notation.c: Include hash-set.h, machmode.h,
4799 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4800 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4801 * c-aux-info.c: Ditto.
4802 * c-convert.c: Ditto.
4803 * c-decl.c: Ditto.
4804 * c-errors.c: Ditto.
4805 * c-lang.c: Dittoxs.
4806 * c-objc-common.c: Ditto.
4807 * c-parser.c: Ditto.
4808 * c-typeck.c: Include hash-set.h, machmode.h,
4809 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4810 fold-const.h, wide-int.h, inchash.h, real.h and
4811 fixed-value.h due to flattening of tree.h.
4812
2cc901dc
MP
48132015-01-07 Marek Polacek <polacek@redhat.com>
4814
4815 PR c/64417
4816 * c-typeck.c (process_init_element): Disallow initialization of
4817 a flexible array member with a string constant if the structure
4818 is in an array.
4819
5624e564
JJ
48202015-01-05 Jakub Jelinek <jakub@redhat.com>
4821
e5341100
JJ
4822 PR sanitizer/64344
4823 * c-typeck.c (convert_for_assignment, c_finish_return): For
4824 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4825 types also set in_late_binary_op around convert call.
4826 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4827 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4828 result on expr as last argument to ubsan_instrument_float_cast,
4829 if in_late_binary_op, don't use c_save_expr but save_expr.
4830
5624e564
JJ
4831 Update copyright years.
4832
5bd012f8
MP
48332015-01-05 Marek Polacek <polacek@redhat.com>
4834
4835 PR c/64423
4836 * c-typeck.c (build_array_ref): Pass loc down to
4837 warn_array_subscript_with_type_char.
4838
3f8257db 48392014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4840
4841 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4842 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4843 element type.
8e745a17 4844 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4845 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4846 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4847 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4848 to PEDWARN_FOR_QUALIFIERS.
768952be 4849
8f94a8c4
JJ
48502014-12-17 Jakub Jelinek <jakub@redhat.com>
4851
4852 PR sanitizer/64289
4853 * c-convert.c: Include ubsan.h.
4854 (convert): For real -> integral casts and
4855 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4856 instead instrument the float cast directly.
4857
b731b390
JJ
48582014-11-29 Jakub Jelinek <jakub@redhat.com>
4859
4860 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4861 c_finish_stmt_expr): Remove NULL last argument from
4862 create_tmp_var_raw and create_tmp_var calls.
4863 * c-array-notation.c (fix_builtin_array_notation_fn,
4864 build_array_notation_expr, fix_conditional_array_notations_1,
4865 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4866
541e35a6
MP
48672014-11-28 Marek Polacek <polacek@redhat.com>
4868
4869 PR c/63862
4870 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4871 convert the right operand to integer type.
4872
b286be94
MP
48732014-11-25 Marek Polacek <polacek@redhat.com>
4874
4875 PR c/63877
4876 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4877 for inline functions.
4878
aa7da51a
JJ
48792014-11-21 Jakub Jelinek <jakub@redhat.com>
4880
4881 PR target/63764
4882 * c-typeck.c (build_array_ref): Adjust
4883 convert_vector_to_pointer_for_subscript caller. If it returns true,
4884 call non_lvalue_loc on the result.
4885
d876207f
RB
48862014-11-11 Richard Biener <rguenther@suse.de>
4887
4888 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4889 to true.
4890
e5e44252
AK
48912014-11-10 Andi Kleen <ak@linux.intel.com>
4892
4893 PR c/60804
4894 * c-parser.c (c_parser_statement_after_labels): Call
4895 check_no_cilk.
4896 (c_parser_if_statement): Dito.
4897 (c_parser_switch_statement): Dito.
4898 (c_parser_while_statement): Dito.
4899 (c_parser_do_statement): Dito.
4900 (c_parser_for_statement): Dito.
4901 * c-typeck.c (c_finish_loop): Dito.
4902
13c21655
PC
49032014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4904
4905 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4906 OPT_Wshift_count_overflow in the warnings.
4907
2d51fcef
MP
49082014-10-30 Marek Polacek <polacek@redhat.com>
4909
4910 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4911 print the stripped version as well, if they're not the same.
4912
ef4bddc2
RS
49132014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4914
4915 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4916 machine_mode.
4917
c582198b
AM
49182014-10-28 Andrew MacLeod <amacleod@redhat.com>
4919
4920 * c-decl.c: Adjust include files.
4921 * c-parser.c: Ditto.
4922
ddc8de03
PM
49232014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4924 Tom Tromey <tromey@redhat.com>
4925
4926 * c-tree.h (enum c_oracle_request): New.
4927 (c_binding_oracle_function): New typedef.
4928 (c_binding_oracle, c_pushtag, c_bind): Declare.
4929 * c-decl.c (c_binding_oracle): New global.
4930 (I_SYMBOL_CHECKED): New macro.
4931 (i_symbol_binding): New function.
4932 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4933 (I_TAG_CHECKED): New macro.
4934 (i_tag_binding): New function.
4935 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4936 (I_LABEL_CHECKED): New macro.
4937 (i_label_binding): New function.
4938 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4939 (c_print_identifier): Save and restore c_binding_oracle.
4940 (c_pushtag, c_bind): New functions.
4941
60393bbc
AM
49422014-10-27 Andrew MacLeod <amacleod@redhat.com>
4943
4944 * c-typeck.c: Adjust include files.
4945
d723bb7c
MLI
49462014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4947
4948 PR c++/53061
4949 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
4950 initialization here...
4951 (c_initialize_diagnostics): ... but here. Set defaults after
4952 building pretty-printer.
4953
1bc5a451
MP
49542014-10-23 Marek Polacek <polacek@redhat.com>
4955
4956 PR c/63626
4957 * c-decl.c (pop_scope): Don't print warning in external_scope.
4958
4435bb92
MP
49592014-10-19 Marek Polacek <polacek@redhat.com>
4960
4961 PR c/63567
4962 * c-typeck.c (output_init_element): Allow initializing objects with
4963 static storage duration with compound literals even in C99 and add
4964 pedwarn for it.
4965
7278465e
MP
49662014-10-17 Marek Polacek <polacek@redhat.com>
4967
4968 PR c/63567
4969 * c-typeck.c (digest_init): Allow initializing objects with static
4970 storage duration with compound literals even in C99 and add pedwarn
4971 for it.
4972
d9b7be2e
MP
49732014-10-17 Marek Polacek <polacek@redhat.com>
4974
4975 PR c/63543
4976 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
4977 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
4978 error multiple times. Print the type.
4979
f406ae1f
MP
49802014-10-17 Marek Polacek <polacek@redhat.com>
4981
4982 PR c/63549
4983 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
4984 type.
4985
92574c7c
MP
49862014-10-17 Marek Polacek <polacek@redhat.com>
4987
4988 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
4989 (start_function): Use OPT_Wimplicit_int instead of 0.
4990 (store_parm_decls_oldstyle): Likewise.
4991
1bc4a978
MT
49922014-10-17 Alan Modra <amodra@gmail.com>
4993
4994 PR middle-end/61848
4995 * c-decl.c (merge_decls): Don't merge section name or tls model
4996 to newdecl symtab node, instead merge to olddecl. Override
4997 existing olddecl section name. Set tls_model for all thread-local
4998 vars, not just OMP thread-private ones. Remove incorrect comment.
4999
83685514
AM
50002014-10-16 Andrew MacLeod <amacleod@redhat.com>
5001
5002 * c-decl.c: Adjust include files.
5003
78a7c317
DD
50042014-10-14 DJ Delorie <dj@redhat.com>
5005
5006 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5007 (c_token_starts_typename): Check all __intN, not just __int128.
5008 (c_token_starts_declspecs): Likewise.
5009 (c_parser_declspecs): Likewise.
5010 (c_parser_attribute_any_word): Likewise.
5011 (c_parser_objc_selector): Likewise.
5012 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5013 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5014 is specified.
5015 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5016 __int128.
5017 (finish_declspecs): Likewise.
5018
74d98c1e
AB
50192014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5020
8e745a17 5021 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5022 the duplicate code.
8e745a17 5023 (c_parser_statement): Call the new function.
74d98c1e 5024
84937de2
MP
50252014-10-09 Marek Polacek <polacek@redhat.com>
5026
5027 PR c/63480
5028 * c-typeck.c (pop_init_level): Don't warn about initializing
5029 with { }.
5030
0382aaa0
MP
50312014-10-07 Marek Polacek <polacek@redhat.com>
5032
5033 PR c/59717
5034 * c-decl.c (header_for_builtin_fn): New function.
5035 (implicitly_declare): Suggest which header to include.
5036
7a0ca710
MP
50372014-10-07 Marek Polacek <polacek@redhat.com>
5038
5039 * c-convert.c (convert): Use error_operand_p.
5040 * c-typeck.c (require_complete_type): Likewise.
5041 (really_atomic_lvalue): Likewise.
5042 (digest_init): Likewise.
5043 (handle_omp_array_sections_1): Likewise.
5044
6bc8a126
MP
50452014-10-03 Marek Polacek <polacek@redhat.com>
5046
5047 PR c/63453
5048 * c-decl.c (pop_scope): Don't warn about "inline function declared
5049 but never defined" for functions marked with gnu_inline attribute.
5050
d90c0a59
JJ
50512014-09-25 Jakub Jelinek <jakub@redhat.com>
5052
5053 PR c++/63249
5054 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5055 on low_bound and length.
5056
083e891e
MP
50572014-09-24 Marek Polacek <polacek@redhat.com>
5058
5059 PR c/61405
5060 PR c/53874
5061 * c-parser.c: Don't define CPP_KEYWORD.
5062 (c_parser_switch_statement): Pass original type to c_finish_case.
5063 * c-tree.h (c_finish_case): Update declaration.
5064 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5065 conditionally to c_do_switch_warnings.
5066
8d95fe25
MP
50672014-09-03 Marek Polacek <polacek@redhat.com>
5068
5069 PR c/62024
5070 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5071 conversions.
5072
9a771876
JJ
50732014-09-02 Jakub Jelinek <jakub@redhat.com>
5074 Balaji V. Iyer <balaji.v.iyer@intel.com>
5075 Igor Zamyatin <igor.zamyatin@intel.com>
5076
5077 * c-parser.c (c_parser_cilk_for): New function.
5078 (c_parser_cilk_grainsize): Likewise.
5079 (c_get_temp_regvar): Likewise.
5080 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5081 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5082 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5083 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5084 case.
5085
b7679d96
CG
50862014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5087
5088 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5089 with using HOST_WIDE_INT without truncation to 'int'
5090
59ea0364
MP
50912014-08-22 Marek Polacek <polacek@redhat.com>
5092
5093 PR c++/62199
5094 * c-typeck.c (parser_build_binary_op): Adjust call to
5095 warn_logical_not_parentheses.
5096
671a475e
IZ
50972014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5098
5099 PR other/62008
5100 * c-parser.c (c_parser_array_notation): Check for correct
5101 type of an array added.
5102
04159acf
MP
51032014-08-19 Marek Polacek <polacek@redhat.com>
5104
5105 PR c++/62153
5106 * c-typeck.c (build_binary_op): If either operand of a comparison
5107 is a boolean expression, call maybe_warn_bool_compare.
5108
c77935ee
PP
51092014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5110
5111 PR c/45584
5112 * c-typeck.c (build_c_cast): Do a conversion even when the
5113 TYPE_MAIN_VARIANTs are the same.
5114
35aff4fb
MP
51152014-08-19 Marek Polacek <polacek@redhat.com>
5116
5117 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5118 pedwarn_c99 instead of pedwarn.
5119 (grokfield): Likewise.
5120 (warn_defaults_to): New function.
5121 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5122 Unconditionally call pedwarn_c99 instead of pedwarn.
5123 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5124 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5125 check flag_isoc11 before.
5126 * c-errors.c (pedwarn_c99): Change the return type to bool.
5127 Handle -Wc99-c11-compat.
5128 * c-parser.c (disable_extension_diagnostics): Handle
5129 warn_c99_c11_compat.
5130 (restore_extension_diagnostics): Likewise.
5131 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5132 instead of pedwarn, don't check flag_isoc11 before.
5133 (c_parser_declspecs): Likewise.
5134 (c_parser_alignas_specifier): Likewise.
5135 (c_parser_alignof_expression): Likewise.
5136 (c_parser_generic_selection): Likewise.
5137 * c-tree.h (pedwarn_c99): Update declaration.
5138 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5139 of pedwarn_c99.
5140
177cce46
MP
51412014-08-19 Marek Polacek <polacek@redhat.com>
5142
5143 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5144 to pedwarn_c90.
5145 * c-errors.c: Include "opts.h".
5146 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5147 * c-parser.c (disable_extension_diagnostics): Handle negative value
5148 of warn_c90_c99_compat, too.
5149 (restore_extension_diagnostics): Likewise.
5150 (c_parser_compound_statement_nostart): Pass
5151 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5152
6dc99c33
MP
51532014-08-12 Marek Polacek <polacek@redhat.com>
5154
5155 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5156 Add pedwarn.
5157 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5158 Likewise.
5159 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5160
3f8257db 51612014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5162
5163 PR c/51849
5164 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5165 Call pedwarn_c90 instead of pedwarn.
5166 (check_bitfield_type_and_width): Likewise.
5167 (declspecs_add_qual): Likewise.
5168 (declspecs_add_type): Likewise.
5169 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5170 Adjust to only call pedwarn_c90.
5171 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5172 pedwarn_c90 instead of pedwarn.
5173 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5174 * c-parser.c (disable_extension_diagnostics): Handle
5175 warn_c90_c99_compat.
5176 (restore_extension_diagnostics): Likewise.
5177 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5178 pedwarn_c90 instead of pedwarn.
5179 (c_parser_initelt): Likewise.
5180 (c_parser_postfix_expression): Likewise.
5181 (c_parser_postfix_expression_after_paren_type): Likewise.
5182 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5183 * c-tree.h: Fix formatting.
5184 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5185 pedwarn_c90 instead of pedwarn.
5186
9f25a338
TS
51872014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5188
5189 * c-typeck.c: Remove include of pointer-set.h.
5190
044331a8
MP
51912014-08-07 Marek Polacek <polacek@redhat.com>
5192
5193 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5194
b787e7a2
TS
51952014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5196
5197 * c-typeck.c: Use hash_map instead of pointer_map.
5198
6e2830c3
TS
51992014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5200
5201 * c-decl.c: Use hash_set instead of pointer_set.
5202
a7ee52fb
IZ
52032014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5204
5205 PR middle-end/61455
5206 * c-array-notation.c (expand_array_notations): Handling
5207 of DECL_EXPR added.
5208
b4dfdc11
MG
52092014-07-31 Marc Glisse <marc.glisse@inria.fr>
5210
5211 PR c++/60517
5212 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5213 a local variable.
5214
976d5a22
TT
52152014-07-30 Tom Tromey <tromey@redhat.com>
5216
5217 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5218 field.
5219 (really_start_incremental_init, push_init_level): Initialize
5220 designator_depth.
5221 (pop_init_level): Set global designator_depth.
5222 (process_init_element): Check for designated_init attribute.
5223
30281de2
MP
52242014-07-20 Marek Polacek <polacek@redhat.com>
5225
5226 PR c/61852
5227 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5228 (implicitly_declare): Pass location to implicit_decl_warning.
5229
b108f48f
JJ
52302014-07-14 Jakub Jelinek <jakub@redhat.com>
5231
5232 PR middle-end/61294
5233 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5234 If non-NULL, call c_parser_check_literal_zero.
5235 (c_parser_check_literal_zero): New function.
5236 (c_parser_postfix_expression_after_primary): Adjust
5237 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5238
773ec47f
MP
52392014-07-06 Marek Polacek <polacek@redhat.com>
5240
5241 PR c/6940
5242 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5243 * c-tree.h (C_ARRAY_PARAMETER): Define.
5244 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5245 function parameter.
5246
22e1cf1c 52472014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5248 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5249
5250 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5251 releasing symbol.
5252
52ec0ea3
MP
52532014-07-01 Marek Polacek <polacek@redhat.com>
5254
5255 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5256 instead of 0 to WARN_FOR_ASSIGNMENT.
5257
d5c3d343
MP
52582014-07-01 Marek Polacek <polacek@redhat.com>
5259
5260 PR c/58286
5261 * c-typeck.c (convert_for_assignment): Pass
5262 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5263
6a7253a4
MP
52642014-06-30 Marek Polacek <polacek@redhat.com>
5265
5266 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5267 has no_sanitize_undefined attribute.
5268
5e88a8f4
IZ
52692014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5270
5271 PR middle-end/57541
5272 * c-array-notation.c (fix_builtin_array_notation_fn):
5273 Check for 0 arguments in builtin call. Check that bultin argument is
5274 correct.
5275 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5276 index.
5277
9698b078
SH
52782014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5279
5280 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5281 qualifiers in __auto_type for atomic types.
5282 (c_parser_typeof_specifier): Discard all type qualifiers in
5283 __typeof__ for atomic types.
5284
6e07c515
MP
52852014-06-25 Marek Polacek <polacek@redhat.com>
5286
5287 PR c/61162
5288 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5289 the return expression to c_finish_return.
5290
da6f124d
JJ
52912014-06-25 Jakub Jelinek <jakub@redhat.com>
5292
5293 * c-typeck.c (c_finish_omp_clauses): Make sure
5294 OMP_CLAUSE_LINEAR_STEP has correct type.
5295
c203e8a7
TS
52962014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5297
5298 * c-decl.c: Adjust.
5299
56ad0e38
JJ
53002014-06-24 Jakub Jelinek <jakub@redhat.com>
5301
5302 * c-parser.c (c_parser_omp_for_loop): For
5303 #pragma omp parallel for simd move lastprivate clause from parallel
5304 to for rather than simd.
5305
47c2554f
MP
53062014-06-23 Marek Polacek <polacek@redhat.com>
5307
5308 * c-typeck.c (parser_build_binary_op): Don't call
5309 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5310
56363ffd
JH
53112014-06-15 Jan Hubicka <hubicka@ucw.cz>
5312
5313 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5314 * c-decl.c (merge_decls): Likewise.
5315
d7ff7ae5
MP
53162014-06-09 Marek Polacek <polacek@redhat.com>
5317
5318 PR c/36446
5319 * c-typeck.c (error_init): Call inform instead of error_at.
5320 (pedwarn_init): Call inform instead of pedwarn.
5321 (warning_init): Call inform instead of warning_at.
5322
24d047a3
JH
53232014-06-07 Jan Hubicka <hubicka@ucw.cz>
5324
5325 * c-decl.c (merge_decls): Use set_decl_section_name.
5326 (duplicate_decls): Remove node if it exists.
5327
9bac5cbb
G
53282014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5329
5330 PR c/53119
5331 * c-typeck.c (push_init_level, process_init_element,
5332 pop_init_level): Correct check for zero initialization, move
5333 missing brace warning to respect zero initialization.
5334
8ffcdea8
MP
53352014-06-05 Marek Polacek <polacek@redhat.com>
5336
5337 PR c/56724
5338 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5339
742938c9
MP
53402014-06-05 Marek Polacek <polacek@redhat.com>
5341
5342 PR c/49706
5343 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5344 on the left hand side operand of a comparison.
742938c9 5345
6447c55d
MP
53462014-06-05 Marek Polacek <polacek@redhat.com>
5347
5348 PR c/48062
5349 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5350 Print note only if the warning was printed.
5351
9dc7743c
IZ
53522014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5353
5354 PR c/58942
5355 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5356 with a pointer.
5357
fedfecef
MP
53582014-06-03 Marek Polacek <polacek@redhat.com>
5359
5360 PR c/60439
5361 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5362 c_start_case.
5363 * c-tree.h (c_start_case): Update.
5364 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5365 switch condition has boolean value.
5366
9b2b7279
AM
53672014-06-02 Andrew MacLeod <amacleod@redhat.com>
5368
5369 * c-decl.c: Include builtins.h.
5370 * c-parser.c: Likewise.
5371
5c1bc275
MP
53722014-05-27 Marek Polacek <polacek@redhat.com>
5373
5374 PR c/56724
5375 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5376 error and warning calls to error_at and warning_at. Pass location of
5377 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5378 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5379 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5380
97563bc8
IZ
53812014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5382
5383 PR c/61191
5384 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5385 function parameters.
5386
aede2c10
JH
53872014-05-23 Jan Hubicka <hubicka@ucw.cz>
5388
5389 * c-decl.c (merge_decls): Preserve symtab node pointers.
5390 (duplicate_decls): Free new decl.
5391
edbba2ce
TS
53922014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5393
f3316c6d
TS
5394 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5395 initialization.
5396
edbba2ce
TS
5397 * c-parser.c (c_parser_omp_target): Return bool values.
5398
68c81f24
TS
53992014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5400
5401 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5402 num_teams_loc variable to num_thread_limit_loc.
5403
632f2871
RS
54042014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5405
5406 * c-array-notation.c (expand_array_notations): Use void_node
5407 instead of void_zero_node.
5408
766090c2
TS
54092014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5410
5411 * c-decl.c (finish_struct): Adjust.
5412 (finish_enum): Likewise.
5413 (bind): Adjust.
5414 (record_inline_static): Likewise.
5415 (push_scope): Likewise.
5416 (make_label): Likewise.
5417 (lookup_label_for_goto): Likewise.
5418 (finish_struct): Likewise.
5419 (finish_enum): Likewise.
5420 (store_parm_decls): Likewise.
5421 (c_push_function_context): Likewise.
5422 * c-lang.h: Remove usage of variable_size gty attribute.
5423 * c-parser.c (c_parse_init): Adjust.
5424 (c_parse_file): Likewise.
5425
2b107f6b
MP
54262014-05-13 Marek Polacek <polacek@redhat.com>
5427
5428 PR c/61162
5429 * c-typeck.c (convert_for_assignment): Pass location to
5430 WARN_FOR_ASSIGNMENT instead of input_location.
5431
d033409e
MP
54322014-05-10 Marek Polacek <polacek@redhat.com>
5433
5434 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5435 maybe_warn_string_init.
5436 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5437 maybe_warn_string_init.
5438 * c-tree.h (maybe_warn_string_init): Update declaration.
5439 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5440 Call pedwarn_init with loc instead of with input_location.
5441 (digest_init): Pass init_loc to maybe_warn_string_init.
5442 (pop_init_level): Call pedwarn_init with loc instead of with
5443 input_location.
5444 (set_init_index): Likewise.
5445 (process_init_element): Likewise.
5446
ea58ef42
MP
54472014-05-09 Marek Polacek <polacek@redhat.com>
5448
5449 PR c/61096
5450 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5451 (c_parser_initelt): Pass location to set_init_label. Pass array index
5452 location to set_init_index.
5453 * c-tree.h (push_init_level): Update declaration.
5454 (pop_init_level): Likewise.
5455 (set_init_index): Likewise.
5456 (set_init_label): Likewise.
5457 * c-typeck.c (error_init): Add location parameter. Call error_at
5458 instead of error.
5459 (digest_init): Pass init_loc to error_init.
5460 (really_start_incremental_init):
5461 (push_init_level): Add location parameter. Pass loc to pop_init_level
5462 and error_init.
5463 (pop_init_level): Likewise.
5464 (set_designator): Add location parameter. Pass loc to pop_init_level,
5465 push_init_level, and error_init.
5466 (set_init_index): Add location parameter. Pass loc to error_init and
5467 set_designator.
5468 (set_init_label): Likewise.
5469 (output_init_element): Pass loc to error_init.
5470 (process_init_element): Pass loc to error_init, pop_init_level,
5471 pedwarn_init, and push_init_level.
5472
661a0813
MP
54732014-05-09 Marek Polacek <polacek@redhat.com>
5474
5475 PR c/50459
5476 * c-parser.c (c_parser_attributes): Parse the arguments as an
5477 expression-list if the attribute takes identifier.
5478
2793eeab
MP
54792014-05-08 Marek Polacek <polacek@redhat.com>
5480
5481 PR c/61053
5482 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5483 TYPE_ALIGN_UNIT.
5484
f827930a
MP
54852014-05-08 Marek Polacek <polacek@redhat.com>
5486
5487 PR c/61077
5488 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5489 of main.
5490
1d60af08
KZ
54912014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5492 Mike Stump <mikestump@comcast.net>
5493 Richard Sandiford <rdsandiford@googlemail.com>
5494
5495 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5496 (finish_enum): Use wide-int interfaces.
5497 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5498 * c-typeck.c (build_c_cast): Likewise.
5499 (set_nonincremental_init_from_string): Likewise.
5500 (c_tree_equal): Likewise.
5501
a0e24419
MP
55022014-05-02 Marek Polacek <polacek@redhat.com>
5503
5504 PR c/25801
5505 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5506 Return size_one_node when the type is not complete.
5507 (pointer_diff): Remove comment.
5508 (build_unary_op): Improve error messages.
5509
19fc9faa
MP
55102014-05-02 Marek Polacek <polacek@redhat.com>
5511
5512 * c-typeck.c (c_finish_return): Separate warning_at calls.
5513
63bc4e87
MP
55142014-05-02 Marek Polacek <polacek@redhat.com>
5515
5516 * c-tree.h (error_init): Remove declaration.
5517 (pedwarn_init): Likewise.
5518 * c-typeck.c (error_init): Make static and move above.
5519 (pedwarn_init): Likewise.
5520 (warning_init): Move above.
5521 (maybe_warn_string_init): Likewise.
5522
4bd2511b
JL
55232014-05-01 Jeff Law <law@redhat.com>
5524
5525 Revert:
5526
5527 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5528 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5529 avoid goto.
5530
6a358dcb
MP
55312014-05-02 Marek Polacek <polacek@redhat.com>
5532
5533 PR c/60784
5534 * c-typeck.c (push_init_level): Set constructor_designated to
5535 p->designated for structures.
5536
ae5ebda4
MP
55372014-05-01 Marek Polacek <polacek@redhat.com>
5538
5539 PR c/60915
5540 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5541 function-definition has an attribute after the declarator.
5542
96b40f8d
MP
55432014-05-01 Marek Polacek <polacek@redhat.com>
5544
5545 PR c/60257
5546 * c-typeck.c (warning_init): Add location_t parameter. Call
5547 warning_at instead of warning.
5548 (push_init_level): Pass input_location to warning_init.
5549 (add_pending_init): Add location_t parameter. Pass loc to
5550 warning_init.
5551 (set_nonincremental_init): Pass input_location to add_pending_init.
5552 (set_nonincremental_init_from_string): Likewise.
5553 (output_init_element): Pass loc to warning_init and to
5554 add_pending_init.
5555
32e00768
MP
55562014-05-01 Marek Polacek <polacek@redhat.com>
5557
5558 PR c/43395
5559 * c-typeck.c (c_finish_return): Distinguish between label and variable
5560 when warning about returning local address.
5561
c9379ce2
MP
55622014-05-01 Marek Polacek <polacek@redhat.com>
5563
5564 PR c/29467
5565 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5566 in C89 mode.
5567
d00887e8
MP
55682014-05-01 Marek Polacek <polacek@redhat.com>
5569
5570 PR c/43245
5571 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5572 instead of 0 to WARN_FOR_QUALIFIERS.
5573
5436fa2e
MP
55742014-05-01 Marek Polacek <polacek@redhat.com>
5575
5576 PR c/56989
5577 * c-typeck.c (default_conversion): Use better location for
5578 error call.
5579
f8ed5150
MP
55802014-04-30 Marek Polacek <polacek@redhat.com>
5581
5582 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5583 also when SANITIZE_FLOAT_DIVIDE is on.
5584
8337d1db
MP
55852014-04-30 Marek Polacek <polacek@redhat.com>
5586
5587 PR c/60139
5588 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5589 and pedwarn_init. Use loc insted of input_location.
5590
c4bdc42f
MP
55912014-04-30 Marek Polacek <polacek@redhat.com>
5592
5593 PR c/60351
5594 * c-typeck.c (build_binary_op): Use location when warning about
5595 shift count.
5596
45484dcf
MP
55972014-04-25 Marek Polacek <polacek@redhat.com>
5598
5599 PR c/18079
5600 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5601 always_inline/noinline and hot/cold attributes.
5602
34cf811f
MP
56032014-04-25 Marek Polacek <polacek@redhat.com>
5604
5605 PR c/60114
5606 * c-parser.c (c_parser_initelt): Pass input_location to
5607 process_init_element.
5608 (c_parser_initval): Pass loc to process_init_element.
5609 * c-tree.h (process_init_element): Adjust declaration.
5610 * c-typeck.c (push_init_level): Pass input_location to
5611 process_init_element.
5612 (pop_init_level): Likewise.
5613 (set_designator): Likewise.
5614 (output_init_element): Add location_t parameter. Pass loc to
5615 digest_init.
5616 (output_pending_init_elements): Pass input_location to
5617 output_init_element.
5618 (process_init_element): Add location_t parameter. Pass loc to
5619 output_init_element.
5620
42056eac
JJ
56212014-04-24 Jakub Jelinek <jakub@redhat.com>
5622
5623 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5624 atomic-clause, allow comma in between atomic-clause and
5625 seq_cst.
5626
e162a134
JJ
56272014-04-22 Jakub Jelinek <jakub@redhat.com>
5628
5629 PR c/59073
5630 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5631 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5632
2f6babac
IZ
56332014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5634
5635 PR middle-end/60469
5636 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5637 create_tmp_var instead build_decl for creating temps.
5638 (build_array_notation_expr): Likewise.
5639 (fix_conditional_array_notations_1): Likewise.
5640 (fix_array_notation_expr): Likewise.
5641 (fix_array_notation_call_expr): Likewise.
5642
8edbfaa6
JJ
56432014-03-28 Jakub Jelinek <jakub@redhat.com>
5644
5645 PR c++/60689
5646 * c-tree.h (c_build_function_call_vec): New prototype.
5647 * c-typeck.c (build_function_call_vec): Don't call
5648 resolve_overloaded_builtin here.
5649 (c_build_function_call_vec): New wrapper function around
5650 build_function_call_vec. Call resolve_overloaded_builtin here.
5651 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5652 Call c_build_function_call_vec instead of build_function_call_vec.
5653 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5654 * c-decl.c (finish_decl): Likewise.
5655
7485aeea
MLI
56562014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5657
5658 PR c/55383
5659 * c-typeck.c: Use correct format string in cast-qual warning
5660
b17a8b07
TS
56612014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5662
5663 * c-decl.c (c_decl_attributes): Use
5664 lang_hooks.types.omp_mappable_type.
5665 * c-typeck.c (c_finish_omp_clauses): Likewise.
5666
3af9c5e9
MP
56672014-03-06 Marek Polacek <polacek@redhat.com>
5668
5669 PR c/60197
5670 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5671 of checking tree code.
5672
1c9f5f33
PK
56732014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5674
5675 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5676 (c_parser_parameter_declaration): Likewise.
5677
cc28fc7f
MP
56782014-02-19 Marek Polacek <polacek@redhat.com>
5679
5680 PR c/60195
5681 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5682 Call mark_exp_read on exp.value.
5683 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5684 TREE_ADDRESSABLE on old instead of val.
5685 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5686
b581c05c
PK
56872014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5688
5689 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5690 C_EXPR_APPEND by vec_safe_push.
5691 * c-tree.h (C_EXPR_APPEND): Remove.
5692
81e5eca8
MP
56932014-01-31 Marek Polacek <polacek@redhat.com>
5694
5695 PR c/59963
5696 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5697 build_function_call_vec.
5698 (build_function_call): Likewise.
5699 (build_atomic_assign): Likewise.
5700 (build_function_call_vec): Add arg_loc parameter. Use it.
5701 (convert_arguments): Likewise.
5702 (convert_for_assignment): Rename rhs_loc to expr_loc.
5703 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5704 (c_parser_objc_keywordexpr): Likewise.
5705 (c_parser_postfix_expression_after_primary): Call
5706 build_function_call_vec with expr_loc rather than op_loc.
5707 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5708 build_function_call_vec.
5709 (c_parser_expr_list): Add locations parameter. Fill it with locations
5710 of function arguments.
5711 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5712
68fca595
MP
57132014-01-30 Marek Polacek <polacek@redhat.com>
5714
5715 PR c/59940
5716 * c-typeck.c (build_function_call_vec): Use loc parameter.
5717 (convert_arguments): Add location parameter. Use it.
5718 (ep_convert_and_check): Likewise.
5719 (build_atomic_assign): Adjust convert_for_assignment call.
5720 (build_modify_expr): Likewise.
5721 (digest_init): Likewise.
5722 (c_finish_return): Likewise.
5723 (build_conditional_expr): Adjust ep_convert_and_check calls.
5724 (convert_for_assignment): Add rhs_loc parameter. Use it.
5725 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5726 calls.
5727
fa337f3a
RB
57282014-01-30 Richard Biener <rguenther@suse.de>
5729
5730 PR c/59905
5731 * c-typeck.c (build_function_call_vec): Do not replace calls
5732 to a function via an incompatible type with a runtime abort.
5733
b72271b9
BI
57342014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5735
5736 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5737 flag_enable_cilkplus with flag_cilkplus.
5738 (c_parser_direct_declarator_inner): Likewise.
5739 (c_parser_attribute_any_word): Likewise.
5740 (c_parser_attributes): Likewise.
5741 (c_parser_compound_statement): Likewise.
5742 (c_parser_statement_after_labels): Likewise.
5743 (c_parser_if_statement): Likewise.
5744 (c_parser_switch_statement): Likewise.
5745 (c_parser_do_statement): Likewise.
5746 (c_parser_for_statement): Likewise.
5747 (c_parser_unary_expression): Likewise.
5748 (c_parser_postfix_expression): Likewise.
5749 (c_parser_postfix_expression_after_primary): Likewise.
5750 (c_parser_postfix_expression_after_primary): Likewise.
5751 (c_parser_omp_clause_name): Likewise.
5752 (c_finish_omp_declare_simd): Likewise.
5753 (c_parser_cilk_verify_simd): Likewise.
5754 * c-typeck.c (build_array_ref): Likewise.
5755 (build_function_call_vec): Likewise.
5756 (convert_arguments): Likewise.
5757 (build_compound_expr): Likewise.
5758 (c_finish_return): Likewise.
5759 (c_finish_if_stmt): Likewise.
5760 (c_finish_loop): Likewise.
5761 (build_binary_op): Likewise.
5762
393e8e8b
MP
57632014-01-23 Marek Polacek <polacek@redhat.com>
5764
5765 PR c/59846
5766 * c-typeck.c (parser_build_binary_op): Use location instead of
5767 input_location.
5768 (build_binary_op): Pass location to shorten_compare.
5769
f04dda30
MP
57702014-01-23 Marek Polacek <polacek@redhat.com>
5771
5772 PR c/58346
5773 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5774 an empty aggregate.
5775
789eadcd
MP
57762014-01-23 Marek Polacek <polacek@redhat.com>
5777
5778 PR c/59871
5779 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5780 of a comma expression.
5781 (emit_side_effect_warnings): Likewise.
5782
40f14e9f
BI
57832014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5784
5785 PR c/59825
5786 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5787 function to use walk_tree and moved a lot of its functionality to
5788 expand_array_notations.
5789 (expand_array_notations): New function.
5790
74558dd9
BI
57912014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5792
5793 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5794 attribute an attribute without value.
5795
652fea39
JJ
57962014-01-23 Jakub Jelinek <jakub@redhat.com>
5797
5798 PR middle-end/58809
5799 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5800 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5801
f34f1c87
MP
58022014-01-22 Marek Polacek <polacek@redhat.com>
5803
5804 PR c/59891
5805 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5806 of remove_c_maybe_const_expr on op1 and op2.
5807
241f845a
JJ
58082014-01-15 Jakub Jelinek <jakub@redhat.com>
5809
5810 PR c/58943
5811 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5812 effects, preevaluate rhs using SAVE_EXPR first.
5813
9a74f20c
BI
58142014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5815
5816 PR c++/59631
5817 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5818 statements with if-elseif statements.
5819
96066ce1
MP
58202014-01-06 Marek Polacek <polacek@redhat.com>
5821
5822 PR c/57773
5823 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5824 defined bit-field types only in ISO C.
5825
23a5b65a
RS
58262014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5827
5828 Update copyright years
5829
f9030485
RS
58302014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5831
5832 * c-array-notation.c: Use the standard form for the copyright notice.
5833
41958c28
BI
58342013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5835
5836 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5837 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5838 field in parser is not empty. If not-empty, call the function
5839 c_parser_finish_omp_declare_simd.
5840 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5841 between SIMD-enabled functions and #pragma simd. Added new parameter.
5842 (c_parser_cilk_all_clauses): Modified the usage of the function
5843 c_parser_cilk_clause_vectorlength as mentioned above.
5844 (c_parser_cilk_simd_fn_vector_attrs): New function.
5845 (c_finish_cilk_simd_fn_tokens): Likewise.
5846 (is_cilkplus_vector_p): Likewise.
5847 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5848 "nomask," and "mask" strings in clause name.
5849 (c_parser_omp_all_clauses): Added 3 new case statements:
5850 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5851 PRAGMA_CILK_CLAUSE_NOMASK.
5852 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5853 check for vector attribute and if so call the function
5854 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5855 called the function c_finish_cilk_simd_fn_tokens.
5856 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5857 parser field is non-empty. If so, parse them as you would parse
5858 the omp declare simd pragma.
5859 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5860 Added a check when step is a parameter and flag it as error.
5861 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5862 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5863 pragma_omp_clause.
5864
cef0fd0e
TS
58652013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5866
5867 * c-parser.c (c_parser_omp_parallel): Fix description.
5868
12893402
BI
58692013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5870
5871 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5872 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5873 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5874 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5875
296674db
JM
58762013-12-04 Joseph Myers <joseph@codesourcery.com>
5877
5878 PR c/52023
5879 * c-parser.c (c_parser_alignas_specifier): Use
5880 c_sizeof_or_alignof_type instead of c_alignof.
5881 (c_parser_alignof_expression): Likewise, with min_alignof
5882 parameter depending on alignof spelling used.
5883
edd28054
MP
58842013-12-04 Marek Polacek <polacek@redhat.com>
5885
5886 PR c/54113
5887 * c-decl.c (start_function): Don't warn for missing prototype for
5888 inline functions.
5889
da0fc454
MP
58902013-12-03 Marek Polacek <polacek@redhat.com>
5891
5892 PR c/59351
5893 * c-decl.c (build_compound_literal): Allow compound literals with
5894 empty initial value.
5895
4c2ecab0
JM
58962013-12-02 Joseph Myers <joseph@codesourcery.com>
5897
5898 PR c/58235
5899 * c-typeck.c (build_modify_expr): Diagnose assignment to
5900 expression with array type.
5901
340baef7
JM
59022013-11-29 Joseph Myers <joseph@codesourcery.com>
5903
5904 PR c/42262
5905 * c-typeck.c (process_init_element): Do not treat a string as
5906 initializing a whole array when used with a designator for an
5907 individual element.
5908
6763b9f7
JM
59092013-11-29 Joseph Myers <joseph@codesourcery.com>
5910
5911 PR c/57574
5912 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5913 an inline function following a static declaration.
5914
e7bd1de1
JJ
59152013-11-28 Jakub Jelinek <jakub@redhat.com>
5916
5917 PR c/59310
5918 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5919 to p_name before calling c_parser_omp_teams instead of after.
5920 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5921 argument. Remove unused p_name variable.
5922
0136f8f0
AH
59232013-11-27 Aldy Hernandez <aldyh@redhat.com>
5924 Jakub Jelinek <jakub@redhat.com>
5925
5926 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5927 external_scope is NULL.
5928
241b71bb
TV
59292013-11-27 Tom de Vries <tom@codesourcery.com>
5930 Marc Glisse <marc.glisse@inria.fr>
5931
5932 PR c++/59032
5933 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5934
2fb9a547
AM
59352013-11-22 Andrew MacLeod <amacleod@redhat.com>
5936
5937 * c-typeck.c: Add required include files from gimple.h.
5938
8400e75e
DM
59392013-11-22 David Malcolm <dmalcolm@redhat.com>
5940
5941 * c-decl.c (define_label, shadow_tag_warned)
5942 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5943 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5944 (declspecs_add_type): Remove use of in_system_header macro.
5945 * c-parser.c (c_parser_unary_expression): Likewise.
5946 * c-typeck.c (store_init_value, process_init_element)
5947 (c_start_case): Likewise.
5948
5949 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
5950 macro.
5951
5952 * c-parser.c (c_parser_set_source_position_from_token): Remove
5953 reference to in_system_header from comment.
5954
386b1f1f
RS
59552013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5956
5957 * c-decl.c (grokdeclarator): Update comment to refer to
5958 tree_to_[su]hwi rather than tree_low_cst.
5959
ae7e9ddd
RS
59602013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5961
5962 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
5963 tree_to_uhwi throughout.
5964
9439e9a1
RS
59652013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5966
5967 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
5968 throughout.
5969
9541ffee
RS
59702013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5971
5972 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
5973 throughout.
5974
c02065fc
AH
59752013-11-15 Aldy Hernandez <aldyh@redhat.com>
5976
5977 * c-parser.c (c_parser_cilk_simd): New.
5978 (c_parser_cilk_verify_simd): New.
5979 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
5980 (c_parser_omp_for_loop): Add case for NE_EXPR.
5981 Set c_break_label for CILK_SIMD.
5982 (c_parser_cilk_clause_vectorlength): New.
5983 (c_parser_cilk_clause_linear): New.
5984 (c_parser_cilk_clause_name): New.
5985 (c_parser_cilk_all_clauses): New.
5986 * c-typeck.c (build_unary_op): Pass location argument to
5987 readonly_error.
5988 (build_modify_expr): Same.
5989 (build_asm_expr): Same.
5990 (c_finish_bc_stmt): Error on break/continue in loops.
5991
18f429e2
AM
59922013-11-14 Andrew MacLeod <amacleod@redhat.com>
5993
5994 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
5995
d8a2d370
DN
59962013-11-14 Diego Novillo <dnovillo@google.com>
5997
5998 * c-decl.c: Include print-tree.h.
5999 Include stor-layout.h.
6000 Include varasm.h.
6001 Include attribs.h.
6002 Include stringpool.h.
6003 * c-lang.c: Include fold-const.h.
6004 * c-parser.c: Include stringpool.h.
6005 Include attribs.h.
6006 Include stor-layout.h.
6007 Include varasm.h.
6008 Include trans-mem.h.
6009 * c-typeck.c: Include stor-layout.h.
6010 Include trans-mem.h.
6011 Include varasm.h.
6012 Include stmt.h.
6013
38b7bc7f
JM
60142013-11-13 Joseph Myers <joseph@codesourcery.com>
6015
6016 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6017 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6018 __auto_type.
6019 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6020 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6021 RID_AUTO_TYPE.
6022 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6023 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6024 (c_parser_declarator, c_parser_direct_declarator_inner)
6025 (c_parser_parameter_declaration, c_parser_type_name): All callers
6026 changed.
6027 (c_parser_declaration_or_fndef): Handle declarations with type
6028 determined from the initializer.
6029
45b0be94
AM
60302013-11-12 Andrew MacLeod <amacleod@redhat.com>
6031
18f429e2 6032 * c-typeck.c: Include gimplify.h.
45b0be94 6033
582d9b50
JM
60342013-11-12 Joseph Myers <joseph@codesourcery.com>
6035
6036 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6037 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6038 comment.
6039 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6040 or _Thread_local as appropriate in diagnostics.
6041 (build_null_declspecs): Initialize ret->thread_gnu_p.
6042 (declspecs_add_scspec): Handle either __thread or _Thread_local
6043 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6044 pedantic. Do not disallow _Thread_local extern and _Thread_local
6045 static.
6046
267bac10
JM
60472013-11-07 Joseph Myers <joseph@codesourcery.com>
6048 Andrew MacLeod <amacleod@redhat.com>
6049
6050 * c-aux-info.c (gen_type): Handle atomic qualifier.
6051 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6052 qualifiers when compating types.
6053 (shadow_tag_warned): Handle atomic_p in declspecs.
6054 (quals_from_declspecs): Likewise.
6055 (start_decl): Use c_type_promotes_to when promoting argument
6056 types.
6057 (grokdeclarator): Handle _Atomic.
6058 (get_parm_info): Diagnose any qualifier on "void" as only
6059 parameter.
6060 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6061 comparing types. Use c_type_promotes_to when promoting argument
6062 types.
6063 (finish_function): Use c_type_promotes_to when promoting argument
6064 types.
6065 (build_null_declspecs): Handle atomic_p in declspecs.
6066 (declspecs_add_qual): Handle RID_ATOMIC.
6067 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6068 (c_token_starts_declspecs): Handle RID_ATOMIC.
6069 (c_parser_declspecs): Handle atomic type specifiers and
6070 qualifiers.
6071 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6072 from types of expressions with atomic type.
6073 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6074 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6075 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6076 (c_parser_statement_after_labels, c_parser_switch_statement)
6077 (c_parser_for_statement, c_parser_expr_no_commas)
6078 (c_parser_conditional_expression, c_parser_binary_expression)
6079 (c_parser_cast_expression, c_parser_unary_expression)
6080 (c_parser_postfix_expression)
6081 (c_parser_postfix_expression_after_primary, c_parser_expression):
6082 Use convert_lvalue_to_rvalue.
6083 (c_parser_expression_conv, c_parser_expr_list): Document
6084 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6085 (c_parser_objc_synchronized_statement): Use
6086 convert_lvalue_to_rvalue.
6087 (c_parser_objc_selector): Handle RID_ATOMIC.
6088 (c_parser_objc_receiver, c_parser_array_notation): Use
6089 convert_lvalue_to_rvalue.
6090 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6091 _Atomic (type-name).
6092 (struct c_declspecs): Add atomic_p field.
6093 (convert_lvalue_to_rvalue): Declare.
6094 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6095 corresponding atomic types.
6096 (qualify_type): Don't add _Atomic qualifiers from second argument.
6097 (comp_target_types): Do not allow _Atomic mismatches.
6098 (type_lists_compatible_p): Do not remove atomic qualifiers when
6099 comparing types.
6100 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6101 (build_atomic_assign): New functions.
6102 (build_unary_op): Use build_atomic_assign for atomic increment and
6103 decrement.
6104 (build_conditional_expr): Do not treat _Atomic void as a qualified
6105 version of void.
6106 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6107 (find_anonymous_field_with_type, convert_to_anonymous_field)
6108 (convert_for_assignment): Do not remove atomic qualifiers when
6109 comparing types.
6110 (digest_init): Do not accept initialization of arrays of atomic
6111 elements by string constants.
6112 (build_asm_expr): Use convert_lvalue_to_rvalue.
6113 (build_binary_op): Do not treat _Atomic void as a qualified
6114 version of void.
6115
0c249d4b
DD
61162013-11-06 DJ Delorie <dj@redhat.com>
6117
6118 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6119 both explicit and builtin, print the location of the explicit one.
6120
6d7f7e0a
TB
61212013-11-05 Tobias Burnus <burnus@net-b.de>
6122
6123 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6124 c_parser_omp_distribute, c_parser_omp_teams,
6125 c_parser_omp_target, c_parser_omp_declare): Handle
6126 -fopenmp-simd.
6127
b906f4ca
MP
61282013-11-03 Marek Polacek <polacek@redhat.com>
6129
6130 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6131
ee1d5a02
JJ
61322013-11-01 Jakub Jelinek <jakub@redhat.com>
6133
6134 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6135 check_dup_generic at the end, unless remove is true.
6136 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6137 remove = true;.
6138 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6139
5a9785fb
JJ
61402013-10-31 Jakub Jelinek <jakub@redhat.com>
6141
6142 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6143 with decl that is not pointer nor array.
6144
939b37da
BI
61452013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6146
6147 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6148 a spawning function is found.
6149 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6150 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6151 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6152 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6153 case.
6154 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6155 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6156 expr.
6157 (c_finish_return): Added a check to reject _Cilk_spawn in return
6158 expression.
6159 (build_cilk_spawn): New function.
6160 (build_cilk_sync): Likewise.
6161 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6162
d4af74d4
TB
61632013-10-27 Tobias Burnus <burnus@net-b.de>
6164
6165 PR other/33426
6166 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6167 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6168 (c_parser_statement_after_labels): Update calls.
6169
d73749df 61702013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6171
6172 PR other/33426
6173 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6174 Handle PRAGMA_IVDEP.
6175 (c_parser_statement_after_labels): Update call.
6176
f28aa681
MP
61772013-10-24 Marek Polacek <polacek@redhat.com>
6178
6179 * c-parser.c (c_parser_struct_declaration): Add a comment.
6180 (c_parser_declarator): Don't allow _Alignas here.
6181
0645c1a2
AM
61822013-10-17 Andrew MacLeod <amacleod@redhat.com>
6183
6184 * c-parser.c: Include omp-low.h.
6185 * c-typeck.c: Likewise.
6186
568a31f2
MP
61872013-10-17 Marek Polacek <polacek@redhat.com>
6188
6189 PR c/58267
6190 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6191 Document syntax of the array-declarator.
6192 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6193 are not permitted.
6194 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6195 (c_parser_struct_declaration): Likewise.
6196 (c_parser_declarator): Likewise.
6197 (c_parser_direct_declarator_inner): Likewise.
6198 (c_parser_parameter_declaration): Likewise.
6199 (c_parser_type_name): Likewise.
6200
acf0174b
JJ
62012013-10-11 Jakub Jelinek <jakub@redhat.com>
6202
6203 * c-lang.h (current_omp_declare_target_attribute): New extern
6204 decl.
6205 * c-parser.c: Include c-lang.h.
6206 (struct c_parser): Change tokens to c_token *.
6207 Add tokens_buf field. Change tokens_avail type to unsigned int.
6208 (c_parser_consume_token): If parser->tokens isn't
6209 &parser->tokens_buf[0], increment parser->tokens.
6210 (c_parser_consume_pragma): Likewise.
6211 (enum pragma_context): Add pragma_struct and pragma_param.
6212 (c_parser_external_declaration): Adjust
6213 c_parser_declaration_or_fndef caller.
6214 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6215 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6216 Adjust recursive call.
6217 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6218 of pragma_external.
6219 (c_parser_parameter_declaration): Use pragma_param instead of
6220 pragma_external.
6221 (c_parser_compound_statement_nostart, c_parser_label,
6222 c_parser_for_statement): Adjust
6223 c_parser_declaration_or_fndef callers.
6224 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6225 it through to c_parser_conditional_expression.
6226 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6227 pass it through to c_parser_binary_expression. Adjust recursive
6228 call.
6229 (c_parser_binary_expression): Remove prec argument, add
6230 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6231 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6232 binop matches it, use build2 instead of parser_build_binary_op.
6233 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6234 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6235 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6236 Handle pragma_struct and pragma_param the same as pragma_external.
6237 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6238 (c_parser_omp_variable_list): Parse array sections for
6239 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6240 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6241 (c_parser_omp_clause_reduction): Handle user defined reductions.
6242 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6243 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6244 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6245 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6246 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6247 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6248 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6249 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6250 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6251 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6252 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6253 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6254 (c_parser_omp_for_loop): Add CODE argument, pass it through
6255 to c_finish_omp_for. Change last argument to cclauses,
6256 and adjust uses to grab parallel clauses from the array of all
6257 the split clauses. Adjust c_parser_binary_expression,
6258 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6259 (omp_split_clauses): New function.
6260 (c_parser_omp_simd): New function.
6261 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6262 Allow the function to be called also when parsing combined constructs,
6263 and call c_parser_omp_simd when parsing for simd.
6264 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6265 #pragma omp section, require exactly one structured-block instead of
6266 sequence of statements.
6267 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6268 Allow the function to be called also when parsing combined constructs.
6269 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6270 Allow the function to be called also when parsing combined
6271 constructs.
6272 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6273 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6274 c_parser_omp_teams, c_parser_omp_target_data,
6275 c_parser_omp_target_update, c_parser_omp_target,
6276 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6277 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6278 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6279 (c_parser_omp_construct): Add p_name and mask vars. Handle
6280 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6281 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6282 and c_parser_omp_sections callers.
6283 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6284 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6285 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6286 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6287 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6288 OMP_CLAUSE_DEPEND.
6289 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6290 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6291 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6292 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6293 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6294 * c-typeck.c: Include tree-inline.h.
6295 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6296 handle_omp_array_sections_1, handle_omp_array_sections,
6297 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6298 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6299 user defined reductions.
6300 (c_tree_equal): New function.
6301 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6302 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6303 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6304 c_check_omp_declare_reduction_r): New prototypes.
6305 * c-decl.c (current_omp_declare_target_attribute): New variable.
6306 (c_decl_attributes): New function.
6307 (start_decl, start_function): Use it instead of decl_attributes.
6308 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6309 c_omp_reduction_decl, c_omp_reduction_lookup,
6310 c_check_omp_declare_reduction_r): New functions.
6311
0a6c2227
TT
63122013-09-25 Tom Tromey <tromey@redhat.com>
6313
6314 * Make-lang.in (c/gccspec.o): Remove.
6315 (CFLAGS-c/gccspec.o): New variable.
6316 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6317 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6318 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6319
f3bc55f0
TT
63202013-09-25 Tom Tromey <tromey@redhat.com>
6321
6322 * Make-lang.in (c/gccspec.o): Don't use subshell.
6323
a24d975c
MP
63242013-09-18 Marek Polacek <polacek@redhat.com>
6325
6326 PR sanitize/58443
6327 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6328 Remove unnecessary check.
6329
ce6923c5
MP
63302013-09-18 Marek Polacek <polacek@redhat.com>
6331
6332 PR sanitizer/58411
6333 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6334 no_sanitize_undefined attribute.
6335
a1e51df9
KT
63362013-09-13 Kai Tietz <ktietz@redhat.com>
6337
6338 PR target/57848
6339 * c-decl.c (c_builtin_function_ext_scope): Remove
6340 wrong assumption that it is never called on prexisting
6341 symbol.
6342
0af94e6f
JR
63432013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6344
6345 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6346
20059c8b
GDR
63472013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6348
6349 * c-objc-common.c (c_tree_printer): Tidy.
6350
de5a5fa1
MP
63512013-08-30 Marek Polacek <polacek@redhat.com>
6352
6353 * c-typeck.c (build_binary_op): Add division by zero and shift
6354 instrumentation.
6355
2531a1d9 63562013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6357 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6358
6e2bcc98 6359 PR c/35649
2531a1d9
JR
6360 * c-typeck.c (c_common_type): Prefer double_type_node over
6361 other REAL_TYPE types with the same precision.
6362 (convert_arguments): Likewise.
6363
025311c4
GDR
63642013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6365
6366 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6367 (c_initialize_diagnostics): Call a destructor for the early printer.
6368
da6ca2b5
GDR
63692013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6370
6371 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6372 printer initialization.
6373
318cda85 63742013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6375
318cda85
BI
6376 PR c/57490
6377 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6378 check for truth values.
6379 (expand_array_notation_exprs): Added truth values case. Removed an
6380 unwanted else. Added for-loop to walk through subtrees in default
6381 case.
6382
b066401f
GDR
63832013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6384
6385 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6386
fb48aadc
JM
63872013-07-23 Joseph Myers <joseph@codesourcery.com>
6388
6389 * c-parser.c (struct c_generic_association): Fix typo.
6390
433cc7b0
TT
63912013-07-23 Tom Tromey <tromey@redhat.com>
6392 Joseph Myers <joseph@codesourcery.com>
6393
6394 * c-parser.c (struct c_generic_association): New.
6395 (c_generic_association_d): New typedef.
6396 (c_parser_generic_selection): New function.
6397 (c_parser_postfix_expression): Handle RID_GENERIC.
6398
26d40c3d
JM
63992013-07-13 Jason Merrill <jason@redhat.com>
6400
6401 PR c++/57793
6402 * c-decl.c (finish_struct): Check for too-large class.
6403
ecdbd01a 64042013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6405
6406 PR c/57821
6407 * c-typeck.c (set_init_index): When folding, check for index overflow.
6408
1141ed3f
BI
64092013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6410
6411 * c-parser.c (c_parser_array_notation): Removed rejection of array
6412 notations in an array of function pointers.
6413
713b46fa
BI
64142013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6415
6416 * c-array-notation.c (make_triplet_val_inv): New function.
6417 (create_cmp_incr): Likewise.
6418 (create_array_refs): Likewise.
6419 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6420 Also modularized common parts between functions and called the function.
6421 (build_array_notation_expr): Likewise.
6422 (fix_conditional_array_notations_1): Likewise.
6423 (fix_array_notation_expr): Likewise.
6424 (fix_array_notation_call_expr): Likewise.
6425
92f20202
MP
64262013-06-18 Marek Polacek <polacek@redhat.com>
6427
6428 PR c/57630
6429 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6430
73a23b06
BI
64312013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6432
6433 * c-array-notation.c (build_array_notation_expr): Reject array notation
6434 mismatch between LHS and RHS even inside a call_expr. Also, removed
6435 a couple while statements that were dead code.
6436
00b8517d
BI
64372013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6438
6439 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6440 excessive precision expressions in function parameters. Also removed
6441 couple unwanted while statements.
6442
1509bdda
BI
64432013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6444
6445 * c-array-notation.c (expand_array_notation_exprs): Added
6446 ARRAY_NOTATION_REF case.
ab20d992 6447
d60f1706
BI
64482013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6449
6450 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6451 function to c-family/array-notation-common.c.
6452 (is_cilkplus_reduce_builtin): Likewise.
6453 (find_rank): Likewise.
6454 (extract_array_notation_exprs): Likewise.
6455 (replace_array_notations): Likewise.
6456 (find_inv_trees): Likewise.
6457 (replace_inv_trees): Likewise.
6458 (contains_array_notation_expr): Likewise.
6459 (find_correct_array_notation_type): Likewise.
6460 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6461 (struct inv_list): Moved this to c-family/array-notation-common.c.
6462 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6463
6d6efbb3
BI
64642013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6465
6466 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6467 reduction functions outside the for-loop. Added a check if the fundecl
6468 is non-NULL. Finally, removed an unwanted if-statement, and made the
6469 body unconditional.
6470
25c22937
BI
64712013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6472
6473 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6474 condition of the if-statement matches the rank of else-block and then-
6475 block when array notations are used.
6476 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6477 expression after the entire function body is parsed.
6478 (c_parser_expr_no_commas): Delayed creating array notation expressions
6479 to the end of function parsing.
6480 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6481 whole if-statement instead of just the condition.
ab20d992 6482 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6483
edd25645
BI
64842013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6485
6486 PR c/57474
6487 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6488 array to NULL_TREE if they are unused. Also added a check for the
6489 field to be NULL before its fields are used in future.
ab20d992 6490
065ce7f1
RO
64912013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6492
6493 PR bootstrap/57450
6494 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6495 (build_array_notation_expr): Likewise.
6496
36536d79
BI
64972013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6498
6499 * c-typeck.c (build_array_ref): Added a check to see if array's
6500 index is greater than one. If true, then emit an error.
6501 (build_function_call_vec): Exclude error reporting and checking
6502 for builtin array-notation functions.
6503 (convert_arguments): Likewise.
6504 (c_finish_return): Added a check for array notations as a return
6505 expression. If true, then emit an error.
6506 (c_finish_loop): Added a check for array notations in a loop
6507 condition. If true then emit an error.
6508 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6509 (build_binary_op): Added a check for array notation expr inside
6510 op1 and op0. If present, we call another function to find correct
6511 type.
6512 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6513 * c-parser.c (c_parser_compound_statement): Check if array
6514 notation code is used in tree, if so, then transform them into
6515 appropriate C code.
6516 (c_parser_expr_no_commas): Check if array notation is used in LHS
6517 or RHS, if so, then build array notation expression instead of
6518 regular modify.
6519 (c_parser_postfix_expression_after_primary): Added a check for
6520 colon(s) after square braces, if so then handle it like an array
6521 notation. Also, break up array notations in unary op if found.
6522 (c_parser_direct_declarator_inner): Added a check for array
6523 notation.
6524 (c_parser_compound_statement): Added a check for array notation in
6525 a stmt. If one is present, then expand array notation expr.
6526 (c_parser_if_statement): Likewise.
6527 (c_parser_switch_statement): Added a check for array notations in
6528 a switch statement's condition. If true, then output an error.
6529 (c_parser_while_statement): Similarly, but for a while.
6530 (c_parser_do_statement): Similarly, but for a do-while.
6531 (c_parser_for_statement): Similarly, but for a for-loop.
6532 (c_parser_unary_expression): Check if array notation is used in a
6533 pre-increment or pre-decrement expression. If true, then expand
6534 them.
6535 (c_parser_array_notation): New function.
6536 * c-array-notation.c: New file.
6537 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 6538
cd192ccc
MS
65392013-05-23 Mike Stump <mikestump@comcast.net>
6540
6541 * c-typeck.c (convert_for_assignment): Handle references to memory
6542 spaces better.
6543
427b248d
JM
65442013-05-16 Jason Merrill <jason@redhat.com>
6545
6546 * Make-lang.in (cc1$(exeext)): Use link mutex.
6547
44d90fe1
PC
65482013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6549
6550 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6551 to simply use OPT_Wpointer_arith.
6552 (build_unary_op): Likewise.
6553
4e7d7b3d
JJ
65542013-04-03 Jakub Jelinek <jakub@redhat.com>
6555
6556 PR c/19449
6557 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6558 argument. If set, or it temporarily for parsing of the first
6559 argument into force_folding_builtin_constant_p.
6560 (c_parser_postfix_expression): Adjust callers.
6561
839b422f
RB
65622013-03-21 Richard Biener <rguenther@suse.de>
6563
6564 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6565 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6566
2ee028f1
MP
65672013-02-12 Marek Polacek <polacek@redhat.com>
6568
6569 PR c/44938
6570 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6571 origtypes to NULL.
6572
8824edff
JJ
65732013-01-24 Jakub Jelinek <jakub@redhat.com>
6574
6575 PR c/56078
6576 * c-typeck.c (set_nonincremental_init_from_string): If
6577 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6578 returned false.
6579 (process_init_element): Likewise.
6580
eadd3d0d
JJ
65812012-12-20 Jakub Jelinek <jakub@redhat.com>
6582
6583 PR c++/55619
6584 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6585 argument, don't call default_function_array_conversion
6586 nor c_fully_fold here.
6587 (c_parser_asm_statement): Adjust callers.
6588 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6589 and outputs here, and call default_function_array_conversion
6590 on inputs that don't need to be addressable.
6591
f8a93a2e
JJ
65922012-12-18 Jakub Jelinek <jakub@redhat.com>
6593
6594 PR c/39464
6595 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6596 warning require that both c_common_unsigned_type as well as
6597 c_common_signed_type is the same for both mvl and mvr types.
6598
9771b263
DN
65992012-11-16 Diego Novillo <dnovillo@google.com>
6600
6601 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6602
6603 * c-common.c: Use new vec API in vec.h.
6604 * c-common.h: Likewise.
6605 * c-gimplify.c: Likewise.
6606 * c-pragma.c: Likewise.
6607 * c-pretty-print.c: Likewise.
6608 * c-pretty-print.h: Likewise.
6609 * c-semantics.c: Likewise.
6610 * c-decl.c: Likewise.
6611 * c-parser.c: Likewise.
6612 * c-tree.h: Likewise.
6613 * c-typeck.c: Likewise.
6614
880661a4
JW
66152012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6616
6617 PR c++/54930
6618 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6619
077d1abe
MLI
66202012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6621
6622 PR c/53066
6623 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6624 shadows a function, unless the variable is a function or a
6625 pointer-to-function.
6626
3a785c97
JJ
66272012-10-12 Jakub Jelinek <jakub@redhat.com>
6628
6629 PR c/54381
6630 * c-parser.c (struct c_tree_loc_pair): Removed.
6631 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6632 add location_t * and tree * arguments, fill in array of 3
6633 sizeof_arg trees and corresponding locs.
6634 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6635 c_parser_expr_list callers.
6636 (c_parser_postfix_expression_after_primary): Likewise. Pass
6637 array of 3 sizeof_arg trees and locs (corresponding to first
6638 3 arguments) to sizeof_pointer_memaccess_warning.
6639
703c8606
LC
66402012-10-09 Lawrence Crowl <crowl@google.com>
6641
6642 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6643 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6644 hash table.
6645
5d9de0d0
PC
66462012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6647
6648 PR c++/54194
6649 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6650 call.
6651
a212e43f
MG
66522012-10-09 Marc Glisse <marc.glisse@inria.fr>
6653
6654 PR c++/54427
6655 * c-typeck.c: Include c-common.h.
6656 (enum stv_conv): Moved to c-common.h.
6657 (scalar_to_vector): Moved to c-common.c.
6658 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6659 * Make-lang.in: c-typeck.c depends on c-common.h.
6660
3b78de56
AC
66612012-10-04 Arnaud Charlet <charlet@adacore.com>
6662
6663 * c-decl.c (c_write_global_declarations): Fix handling of
6664 -fdump-ada-spec*.
6665
78c60e3d
SS
66662012-09-30 Sharad Singhai <singhai@google.com>
6667
6668 * c-decl.c (c_write_global_declarations): Use a different method
6669 to determine if the dump has ben initialized.
6670
9f33203d
JM
66712012-09-14 Joseph Myers <joseph@codesourcery.com>
6672
6673 PR c/54552
6674 * c-typeck.c (c_cast_expr): When casting to a type requiring
6675 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6676 c_fully_fold first.
6677
a27d595d
JM
66782012-09-14 Joseph Myers <joseph@codesourcery.com>
6679
6680 PR c/54103
6681 * c-typeck.c (build_unary_op): Pass original argument of
6682 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6683 any C_MAYBE_CONST_EXPR, if it has integer operands.
6684 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6685 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6686 to c_objc_common_truthvalue_conversion, then remove any
6687 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6688 c_objc_common_truthvalue_conversion not
6689 c_common_truthvalue_conversion.
6690 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6691 call note_integer_operands for arguments with integer operands
6692 that are not integer constants.
6693
9feb29df
JJ
66942012-09-13 Jakub Jelinek <jakub@redhat.com>
6695
6696 PR c/54559
6697 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6698 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6699
d409320c
JJ
67002012-08-31 Jakub Jelinek <jakub@redhat.com>
6701
6702 PR c/54428
6703 * c-convert.c (convert): Don't call fold_convert_loc if
6704 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6705 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6706 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6707
6265d07c
JJ
67082012-08-24 Jakub Jelinek <jakub@redhat.com>
6709
6710 PR c/54355
6711 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6712 for nested and empty_ok arguments in the call to
6713 c_parser_declaration_or_fndef.
6714
1a4049e7
JJ
67152012-08-17 Jakub Jelinek <jakub@redhat.com>
6716
6717 * c-tree.h (c_last_sizeof_arg): Declare.
6718 * c-parser.c (struct c_tree_loc_pair): New type.
6719 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6720 non-NULL.
6721 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6722 (c_parser_postfix_expression_after_primary): Likewise. Call
6723 sizeof_pointer_memaccess_warning if needed.
6724 (sizeof_ptr_memacc_comptypes): New function.
6725 * c-typeck.c (c_last_sizeof_arg): New global variable.
6726 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6727
0229aee9
UB
67282012-07-24 Uros Bizjak <ubizjak@gmail.com>
6729
6730 * c-lang.h (lang_decl): Add variable_size GTY option.
6731
7ee2468b
SB
67322012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6733
6734 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6735 * Make-lang.in: Fix dependencies.
6736
d4a10d0a
SB
67372012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6738
6739 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6740 and add language Makefile hooks.
6741 * config-lang.in: New file.
6742 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6743 add the required "normal" config-lang.in rules.
6744 * c-lang.h: Moved from gcc/ to here.
6745 * c-tree.h: Likewise.
6746 * c-objc-common.c: Likewise.
6747 * c-objc-common.h: Likewise.
6748 * c-typeck.c: Likewise.
6749 * c-convert.c: Likewise.
6750 * c-lang.c: Likewise.
6751 * c-aux-info.c: Likewise.
6752 * c-errors.c: Likewise.
6753 * gccspec.c: Likewise.
6754 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6755 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6756\f
a5544970 6757Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6758
6759Copying and distribution of this file, with or without modification,
6760are permitted in any medium without royalty provided the copyright
6761notice and this notice are preserved.