]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
diagnostic_show_locus: move initial newline to callers
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
4691bf46
JM
12019-12-04 Joseph Myers <joseph@codesourcery.com>
2
3 PR c/36941
4 PR c/88827
5 * c-typeck.c (convert_lvalue_to_rvalue): Call
6 require_complete_type for arguments not of void types.
7 (build_indirect_ref): Do not diagnose dereferencing pointers to
8 incomplete types.
9 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
10
85d11957
JM
112019-12-03 Joseph Myers <joseph@codesourcery.com>
12
13 PR c/88704
14 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
15 old-style parameter definitions.
16
4569f8b3
SL
172019-12-01 Sandra Loosemore <sandra@codesourcery.com>
18
19 PR target/92499
20
21 * c-decl.c (flexible_array_type_p): Move to common code.
22
65ef05d0
RS
232019-11-30 Richard Sandiford <richard.sandiford@arm.com>
24
25 * c-decl.c (start_decl): Allow initialization of variables whose
26 size is a POLY_INT_CST.
27 (finish_decl): Use verify_type_context to check whether the target
28 allows variables with a particular type to have static or thread-local
29 storage duration. Don't raise a second error if such variables do
30 not have a constant size.
31 (grokdeclarator): Use verify_type_context to check whether the
32 target allows fields or array elements to have a particular type.
33 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
34 the target allows pointer difference for the types involved.
35 (build_unary_op): Likewise for pointer increment and decrement.
36
34b43828
JM
372019-11-29 Joseph Myers <joseph@codesourcery.com>
38
39 * c-parser.c (struct c_parser): Add members raw_tokens and
40 raw_tokens_used.
41 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
42 using previously-lexed raw tokens.
43 (c_parser_peek_nth_token_raw)
44 (c_parser_check_balanced_raw_token_sequence): New functions.
45 (c_parser_nth_token_starts_std_attributes): Use
46 c_parser_check_balanced_raw_token_sequence for Objective-C.
47
5b8d9367
JM
482019-11-25 Joseph Myers <joseph@codesourcery.com>
49
50 PR c/91985
51 * c-decl.c (finish_declspecs): Use int instead of decimal
52 floating-point types if decimal floating-point not supported.
53
1723e1be
JM
542019-11-25 Joseph Myers <joseph@codesourcery.com>
55
56 * c-tree.h (struct c_declarator): Use a structure for id member.
57 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
58 declarators at the start, not when handling individual declarators
59 later. Use u.id.id instead of u.id.
60 (grokfield): Use u.id.id instead of u.id.
61 (build_id_declarator): Set u.id.id and u.id.attrs.
62 (finish_declspecs): Handle postfix attributes in case of typedef
63 name or typeof used.
64 * c-parser.c (c_parser_direct_declarator)
65 (c_parser_direct_declarator_inner): Place declarator for
66 attributes inside that for function or array, not outside. Set
67 u.id.attrs for identifiers.
68 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
69 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
70 instead of u.id.
71
bdaf8be1
JJ
722019-11-22 Jakub Jelinek <jakub@redhat.com>
73
74 PR c/90677
75 * c-decl.c (identifier_global_tag): Define.
76
3e00ba47
RB
772019-11-20 Richard Biener <rguenther@suse.de>
78
79 PR c/92088
80 * c-decl.c (grokdeclarator): Prevent inlining of nested
81 function with VLA arguments.
82
8c5b727a
JM
832019-11-20 Joseph Myers <joseph@codesourcery.com>
84
85 * c-decl.c (c_warn_type_attributes): New function.
86 (groktypename, grokdeclarator, finish_declspecs): Call
87 c_warn_type_attributes before applying attributes to types.
88 * c-tree.h (c_warn_type_attributes): Declare.
89
192961ff
JM
902019-11-19 Joseph Myers <joseph@codesourcery.com>
91
92 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
93 standard attributes.
94 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
95 pedwarn for unknown standard attributes and return error_mark_node
96 for them.
97
20a38017
MM
982019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
99
100 * c-parser.c (c_parser_parse_rtl_body): Always call
101 run_rtl_passes, even if startwith pass is not provided.
102
d5fbe5e0
JM
1032019-11-15 Joseph Myers <joseph@codesourcery.com>
104
105 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
106 duplicate standard attributes.
107
97cc1187
JM
1082019-11-15 Joseph Myers <joseph@codesourcery.com>
109
110 * c-decl.c (std_attribute_table): Add maybe_unused.
111
f8aea5e3
JM
1122019-11-15 Joseph Myers <joseph@codesourcery.com>
113
114 * c-decl.c (std_attribute_table): Add fallthrough.
115 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
116 attribute at top level.
117
2cc94aa8
JM
1182019-11-15 Joseph Myers <joseph@codesourcery.com>
119
120 * c-decl.c (std_attribute_table): New.
121 (c_init_decl_processing): Register attributes from
122 std_attribute_table.
123 * c-parser.c (c_parser_attribute_arguments): Add arguments
124 require_string and allow_empty_args. All callers changed.
125 (c_parser_std_attribute): Set require_string argument for
126 "deprecated" attribute.
127
7c5890cc
JM
1282019-11-14 Joseph Myers <joseph@codesourcery.com>
129
130 * c-parser.c (c_parser_postfix_expression)
131 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
132 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
133
e8738f4e
RS
1342019-11-14 Richard Sandiford <richard.sandiford@arm.com>
135
136 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
137 of build_same_sized_truth_vector_type.
138 (build_vec_cmp): Likewise.
139
b2417b59
JJ
1402019-11-14 Jakub Jelinek <jakub@redhat.com>
141
bedb7f04
JJ
142 * c-parser.c (c_parser_omp_context_selector): Don't require score
143 argument to fit into shwi, just to be INTEGER_CST. Diagnose
144 negative score.
145
b2417b59
JJ
146 * c-parser.c (c_parser_omp_context_selector): Rename
147 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
148 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
149 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
150 and string literals.
151
4e03c3a7
JM
1522019-11-14 Joseph Myers <joseph@codesourcery.com>
153
154 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
155 ctsk_tagfirstref_attrs.
156 (struct c_declspecs): Update description of attrs. Add
157 postfix_attrs and non_std_attrs_seen_p. Increase size of
158 typespec_kind bit-field.
159 (c_warn_unused_attributes): New declaration.
160 (parser_xref_tag): Update prototype.
161 * c-decl.c (c_warn_unused_attributes): New function.
162 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
163 ctsk_tagref_attrs. Handle attribute declarations.
164 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
165 (grokdeclarator): Handle standard attributes.
166 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
167 attributes to incomplete type reference.
168 (xref_tag): Update call to parser_xref_tag.
169 (declspecs_add_addrspace, declspecs_add_type)
170 (declspecs_add_scspec, declspecs_add_attrs): Set
171 non_std_attrs_seen_p.
172 (finish_declspecs): Apply postfix standard attributes to type.
173 * c-parser.c (c_token_starts_declspecs)
174 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
175 (c_parser_next_tokens_start_declaration): Update comments.
176 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
177 parser->tokens[2] to parser->tokens[1].
178 (c_parser_nth_token_starts_std_attributes)
179 (c_parser_std_attribute_specifier_sequence): New functions.
180 (c_parser_declaration_or_fndef): Add arguments have_attrs and
181 attrs. All callers changed. Handle standard attributes.
182 (c_parser_parms_declarator, c_parser_parms_list_declarator)
183 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
184 All callers changed.
185 (c_parser_declspecs): Add arguments start_std_attr_ok and
186 end_std_attr_ok. All callers changed. Handle standard
187 attributes.
188 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
189 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
190 (c_parser_compound_statement_nostart, c_parser_all_labels)
191 (c_parser_label, c_parser_statement, c_parser_for_statement):
192 Handle standard attributes.
193 * c-parser.h (c_parser_declspecs): Update prototype.
194 * gimple-parser.c (c_parser_gimple_declaration): Update call to
195 c_parser_declspecs.
196
0c29cac4
ML
1972019-11-12 Martin Liska <mliska@suse.cz>
198
199 * gimple-parser.c: Do not include params.h.
200
028d4092
ML
2012019-11-12 Martin Liska <mliska@suse.cz>
202
203 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
204 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
205 macro.
206
62aee289
MR
2072019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
208 Frederik Harwath <frederik@codesourcery.com>
209
210 gcc/c/
211 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
212 (c_parser_oacc_kernels_parallel): Rename function to...
213 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
214 (c_parser_omp_construct): Update accordingly.
215
216
7cec9588
JJ
2172019-11-11 Jakub Jelinek <jakub@redhat.com>
218
219 * c-parser.c (c_parser_translation_unit): Diagnose declare target
220 without corresponding end declare target.
221
f486280c
RS
2222019-11-08 Richard Sandiford <richard.sandiford@arm.com>
223
224 * c-convert.c (convert): Only handle vector conversions if one of
225 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
226 allows it.
227 * c-typeck.c (build_array_ref): Only allow vector indexing if the
228 vectors satisfy gnu_vector_type_p.
229 (build_unary_op): Only allow unary operators to be applied to
230 vectors if they satisfy gnu_vector_type_p.
231 (digest_init): Only allow by-element initialization of vectors
232 if they satisfy gnu_vector_type_p.
233 (really_start_incremental_init): Likewise.
234 (push_init_level): Likewise.
235 (pop_init_level): Likewise.
236 (process_init_element): Likewise.
237 (build_binary_op): Only allow binary operators to be applied to
238 vectors if they satisfy gnu_vector_type_p.
239
017c6491
JM
2402019-11-08 Joseph Myers <joseph@codesourcery.com>
241
242 * c-decl.c (grokparms): Convert () in a function definition to
243 (void) for C2x.
244 (store_parm_decls_oldstyle): Pedwarn for C2x.
245 (store_parm_decls): Update comment about () not generating a
246 prototype.
247
c01bd174
JM
2482019-11-07 Joseph Myers <joseph@codesourcery.com>
249
250 * c-parser.c (c_parser_attribute_arguments): New function.
251 Factored out of c_parser_gnu_attribute.
252 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
253 (c_parser_balanced_token_sequence, c_parser_std_attribute)
254 (c_parser_std_attribute_specifier): New functions.
255 (c_parser_transaction_attributes): Use
256 c_parser_std_attribute_specifier.
257
471c5330
JM
2582019-11-07 Joseph Myers <joseph@codesourcery.com>
259
260 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
261 lex_joined_string and translate_strings_p.
262 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
263 c_lex_with_flags.
264 (c_parser_string_literal): New function.
265 (c_parser_static_assert_declaration_no_semi): Use
266 c_parser_string_literal. Do not set lex_untranslated_string.
267 (c_parser_asm_string_literal): Use c_parser_string_literal.
268 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
269 (c_parser_gnu_attributes): Set and restore translate_strings_p
270 instead of lex_untranslated_string.
271 (c_parser_asm_statement): Do not set lex_untranslated_string.
272 (c_parser_asm_operands): Likewise.
273 (c_parser_has_attribute_expression): Set and restore
274 translate_strings_p instead of lex_untranslated_string.
275 (c_parser_postfix_expression): Use c_parser_string_literal.
276 (pragma_lex): Likewise.
277 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
278 (c_parse_file): Set translate_strings_p.
279 * gimple-parser.c (c_parser_gimple_postfix_expression)
280 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
281 * c-parser.c (c_parser_string_literal): Declare function.
282
d0c464d2
JJ
2832019-11-02 Jakub Jelinek <jakub@redhat.com>
284
285 * c-parser.c (c_finish_omp_declare_variant): Use
286 omp_get_context_selector instead of c_omp_get_context_selector.
287
ac2cfa6c
RS
2882019-10-29 Richard Sandiford <richard.sandiford@arm.com>
289
290 * c-tree.h (c_simulate_enum_decl): Declare.
291 * c-decl.c (c_simulate_enum_decl): New function.
292 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
293
74078538
RS
2942019-10-29 Richard Sandiford <richard.sandiford@arm.com>
295
296 * c-tree.h (c_simulate_builtin_function_decl): Declare.
297 * c-decl.c (c_simulate_builtin_function_decl): New function.
298 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
299 to the above.
300
ad1539d5
MS
3012019-10-28 Martin Sebor <msebor@redhat.com>
302
303 PR c/66970
304 * c-decl.c (names_builtin_p): Define a new function.
305
cb73e4e7
RB
3062019-10-28 Richard Biener <rguenther@suse.de>
307
308 PR c/92249
309 * gimple-parser.c (c_parser_parse_gimple_body): Make
310 current_bb the entry block initially to easier recover
311 from errors.
312 (c_parser_gimple_compound_statement): Adjust.
313
135df52c
JJ
3142019-10-24 Jakub Jelinek <jakub@redhat.com>
315
316 * c-parser.c (c_finish_omp_declare_variant): Use
317 omp_context_selector_matches instead of
318 c_omp_context_selector_matches.
319 * c-decl.c (c_decl_attributes): Add "omp declare target block"
320 attribute in between declare target and end declare target
321 pragmas.
322
783bfe5e
JM
3232019-10-15 Joseph Myers <joseph@codesourcery.com>
324
325 * c-parser.c (c_parser_attribute_any_word): Rename to
326 c_parser_gnu_attribute_any_word. All callers changed.
327 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
328 callers changed.
329 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
330 callers changed.
331 (c_parser_declaration_or_fndef, c_parser_declspecs)
332 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
333 (c_parser_struct_declaration, c_parser_declarator)
334 (c_parser_gnu_attribute, c_parser_compound_statement)
335 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
336 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
337 attribute-related syntax productions.
338
56898e43
RS
3392019-10-14 Richard Sandiford <richard.sandiford@arm.com>
340
341 * c-objc-common.c (useful_aka_type_p): Replace with...
342 (get_aka_type): ...this new function. Given the original type,
343 decide which aka type to print (if any). Only look through typedefs
344 if user_facing_original_type_p.
345 (print_type): Update accordingly.
346
b9424661
JJ
3472019-10-14 Jakub Jelinek <jakub@redhat.com>
348
349 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
350 into int NESTED, if it is 2, diagnose missing commas in between
351 clauses.
352 (c_parser_omp_context_selector): Pass 2 as last argument to
353 c_parser_omp_all_clauses.
354
20de9568
JJ
3552019-10-12 Jakub Jelinek <jakub@redhat.com>
356
357 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
358 For simd properties, put them directly into TREE_VALUE.
359 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
360 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
361 add "omp declare variant base" attribute rather than
362 "omp declare variant".
363
fe2bc27c
JM
3642019-10-11 Joseph Myers <joseph@codesourcery.com>
365
366 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
367
94e7f906
JJ
3682019-10-10 Jakub Jelinek <jakub@redhat.com>
369
370 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
371 true, terminate processing on closing paren and don't skip to end of
372 pragma line.
373 (c_parser_omp_declare_simd): Handle also declare variant.
374 (omp_construct_selectors, omp_device_selectors,
375 omp_implementation_selectors, omp_user_selectors): New variables.
376 (c_parser_omp_context_selector,
377 c_parser_omp_context_selector_specification,
378 c_finish_omp_declare_variant): New functions.
379 (c_finish_omp_declare_simd): Handle both declare simd and
380 declare variant.
381 (c_parser_omp_declare): Handle declare variant.
382
93313b94
JM
3832019-10-02 Joseph Myers <joseph@codesourcery.com>
384
385 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
386 CPP_COLON tokens.
387
55879815
RS
3882019-10-01 Richard Sandiford <richard.sandiford@arm.com>
389
390 * c-objc-common.c (useful_aka_type_p): New function.
391 (print_type): Use it to decide whether an aka type is worth printing.
392
59bc434a
JJ
3932019-09-27 Jakub Jelinek <jakub@redhat.com>
394
395 PR c++/88203
396 * c-parser.c (c_parser_predefined_identifier): New function.
397 (c_parser_postfix_expression): Use it.
398 (c_parser_omp_variable_list): Parse predefined identifiers.
399 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
400 in shared and firstprivate clauses, even when they are predetermined
401 shared.
402
c6447c20
RS
4032019-09-27 Richard Sandiford <richard.sandiford@arm.com>
404
405 * c-typeck.c (build_function_call_vec): Take the original function
406 decl as an optional final parameter. Pass all built-in calls to
407 check_builtin_function_arguments.
408
522da4c2
EB
4092019-09-20 Eric Botcazou <ebotcazou@adacore.com>
410
411 PR c/91815
412 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
413 of identifiers in the external scope only for variables and functions.
414
68e2c199
PK
4152019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
416
417 PR c/78736
418 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
419
22f8849d
IS
4202019-08-23 Iain Sandoe <iain@sandoe.co.uk>
421
422 PR pch/61250
423 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
424 after determining that the first token is not
425 PRAGMA_GCC_PCH_PREPROCESS.
426
db376f45
EB
4272019-08-22 Eric Botcazou <ebotcazou@adacore.com>
428
429 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
430 FUNCTION_DECL to the right value in the presence of nested declarators.
431
4d732405
RS
4322019-08-13 Richard Sandiford <richard.sandiford@arm.com>
433
434 PR middle-end/91421
435 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
436
cb1180d5
RS
4372019-08-13 Richard Sandiford <richard.sandiford@arm.com>
438
439 PR middle-end/91421
440 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
441 of a built_in_function.
442 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
443
77eb117f
JJ
4442019-08-10 Jakub Jelinek <jakub@redhat.com>
445
446 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
447 (c_parser_omp_clause_device_type): New function.
448 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
449 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
450 (c_parser_omp_declare_target): Handle device_type clauses. Remove
451 diagnostics for declare target with clauses nested in clause-less
452 declare target declaration-definition-seq.
453 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
454
2c3b8bad
JJ
4552019-08-09 Jakub Jelinek <jakub@redhat.com>
456
bb522e2e
JJ
457 * c-parser.c (check_no_duplicate_clause): Simplify using
458 omp_find_clause.
459 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
460 directive name modifiers.
461 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
462
2c3b8bad
JJ
463 PR c/91401
464 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
465 check_no_duplicate_clause call. Comment it out, instead emit a
466 warning for duplicate dist_schedule clauses.
467
99769e7f
RS
4682019-08-08 Richard Sandiford <richard.sandiford@arm.com>
469
470 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
471
8860d270
JJ
4722019-08-08 Jakub Jelinek <jakub@redhat.com>
473
474 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
475 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
476 instead of generic_head to track duplicates.
477
398e3feb
JJ
4782019-08-07 Jakub Jelinek <jakub@redhat.com>
479
480 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
481 (c_parser_omp_clause_use_device_addr): New function.
482 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
483 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
484 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
485 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
486 map or use_device_* clauses.
487 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
488 in OpenMP, require pointer type rather than pointer or array type.
489 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
490
a28351e7
JJ
4912019-07-31 Jakub Jelinek <jakub@redhat.com>
492
493 PR c/91192
494 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
495 even if finish is UNKNOWN_LOCATION, just use start as finish in that
496 case.
497
6343b6bf
ML
4982019-07-25 Martin Liska <mliska@suse.cz>
499 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
500
501 PR c++/23383
502 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
503
cb50701e
ML
5042019-07-25 Martin Liska <mliska@suse.cz>
505
506 * c-decl.c (merge_decls): Use new macros
507 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
508
62e3e66f
RB
5092019-07-23 Richard Biener <rguenther@suse.de>
510
511 PR tree-optimization/83518
512 * gimple-parser.c (c_parser_parse_gimple_body): When we have
513 a CFG also rebuild cgraph edges.
514
554a530f
JJ
5152019-07-20 Jakub Jelinek <jakub@redhat.com>
516
517 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
518 (c_parser_omp_clause_bind): New function.
519 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
520 (OMP_LOOP_CLAUSE_MASK): Define.
521 (c_parser_omp_loop): New function.
522 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
523 loop combined with parallel or teams.
524 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
525 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
526
d119bf79
RS
5272019-07-18 Richard Sandiford <richard.sandiford@arm.com>
528
529 PR c/53633
530 * c-decl.c (finish_function): Check targetm.warn_func_return
531 before issuing a -Wreturn-type warning.
532
ab20d992 5332019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
534
535 * gimple-parser.c (c_parser_gimple_try_stmt): New.
536 (c_parser_compound_statement): Call it.
537
1fdd6f04
JJ
5382019-07-12 Jakub Jelinek <jakub@redhat.com>
539
540 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
541 (c_parser_omp_clause_order): New function.
542 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
543 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
544 PRAGMA_OMP_CLAUSE_ORDER.
545 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
546
8389386c
RB
5472019-07-10 Richard Biener <rguenther@suse.de>
548
549 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
550 _Literal (int *) &x for address literals.
551
99b1c316
MS
5522019-07-09 Martin Sebor <msebor@redhat.com>
553
554 PR c++/61339
555 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
556 to class.
557 (field_decl_cmp): Same.
558 * c-parser.c (c_parser_struct_or_union_specifier): Same.
559 * c-tree.h: Same.
560 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
561
6c1dae73
MS
5622019-07-09 Martin Sebor <msebor@redhat.com>
563
564 PR c++/61339
565 * c-decl.c: Change class-key from class to struct and vice versa
566 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
567 * gimple-parser.c: Same.
568
69b5279e
RB
5692019-07-01 Richard Biener <rguenther@suse.de>
570
571 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
572 _Literal (char *) &"foo" for address literals pointing to
573 STRING_CSTs.
574
ab20d992
JJ
5752019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
576
577 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
578 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
579 C incompatibility if alternate "__intN__" form is used.
580
1e3d475e
MS
5812019-06-24 Martin Sebor <msebor@redhat.com>
582
583 * c-typeck.c (build_binary_op): Hyphenate floating-point.
584
bf38f7e9
JJ
5852019-06-10 Jakub Jelinek <jakub@redhat.com>
586
587 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
588 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
589 (c_parser_omp_scan_loop_body): New function.
590 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
591 inscan reduction clauses.
592 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
593 non-inscan reductions on the same construct, or inscan reductions with
594 ordered or schedule clauses, or inscan array reductions.
595
65985d78
MS
5962019-06-05 Martin Sebor <msebor@redhat.com>
597
598 PR c/90737
599 * c-typeck.c (c_finish_return): Only consider functions returning
600 pointers as candidates for -Wreturn-local-addr.
601
0ecf545c
MS
6022019-06-05 Martin Sebor <msebor@redhat.com>
603
604 * c-decl.c (start_decl): Adjust quoting and hyphenation
605 in diagnostics.
606 (finish_decl): Same.
607 (finish_enum): Same.
608 (start_function): Same.
609 (declspecs_add_type): Same.
610 * c-parser.c (warn_for_abs): Same.
611 * c-typeck.c (build_binary_op): Same.
612
e03436e7
TS
6132019-05-17 Thomas Schwinge <thomas@codesourcery.com>
614
b48f44bf
TS
615 PR c/89433
616 * c-parser.c (c_finish_oacc_routine): Rework checking if already
617 marked with an OpenACC 'routine' directive.
618
5bf04509
TS
619 PR c/89433
620 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
621 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
622
e03436e7
TS
623 PR c/89433
624 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
625 clauses from "omp declare target" attribute.
626
a9c697b8
MS
6272019-05-16 Martin Sebor <msebor@redhat.com>
628
ab20d992
JJ
629 * c-decl.c (start_decl): Quote keywords, operators, and
630 types in diagnostics.
631 (finish_decl): Same.
632 * c-parser.c (c_parser_asm_statement): Same.
633 (c_parser_conditional_expression): Same.
634 (c_parser_transaction_cancel): Same.
635 * c-typeck.c (c_common_type): Same.
636 (build_conditional_expr): Same.
637 (digest_init): Same.
638 (process_init_element): Same.
639 (build_binary_op): Same.
a9c697b8 640
c4499192
RB
6412019-05-17 Richard Biener <rguenther@suse.de>
642
643 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
644 (c_parser_gimple_unary_expression): Likewise.
645 (c_parser_gimple_parentized_ternary_expression): New function.
646
adfe6e4b
RB
6472019-05-16 Richard Biener <rguenther@suse.de>
648
649 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
650 (c_parser_gimple_unary_expression): Likewise.
651
186dabf2
RB
6522019-05-15 Richard Biener <rguenther@suse.de>
653
654 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
655 __BIT_FIELD_REF.
656
1158c5b4
RB
6572019-05-14 Richard Biener <rguenther@suse.de>
658
659 * gimple-parser.c (c_parser_gimple_statement): Remove
660 questionable auto-promotion to VIEW_CONVERT_EXPR.
661 (c_parser_gimple_typespec): Split out from __MEM parsing.
662 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
663 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
664 as __VIEW_CONVERT with -gimple.
665
fd4485aa
ML
6662019-05-09 Martin Liska <mliska@suse.cz>
667
668 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
669 __MAX.
670 (c_parser_gimple_unary_expression): Parse also binary expression
671 __MIN and __MAX.
672 (c_parser_gimple_parentized_binary_expression): New function.
673
d276406a
ML
6742019-05-09 Martin Liska <mliska@suse.cz>
675
676 * gimple-parser.c (struct gimple_parser): Add probability.
677 for gimple_parser_edge.
678 (gimple_parser::push_edge): Add new argument probability.
679 (c_parser_gimple_parse_bb_spec): Parse also probability
680 if present.
681 (c_parser_parse_gimple_body): Set edge probability.
682 (c_parser_gimple_compound_statement): Consume token
683 before calling c_parser_gimple_goto_stmt.
684 Parse BB counts.
685 (c_parser_gimple_statement): Pass new argument.
686 (c_parser_gimple_goto_stmt): Likewise.
687 (c_parser_gimple_if_stmt): Likewise.
688 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
689 * c-parser.c (c_parser_declaration_or_fndef): Pass
690 hot_bb_threshold argument.
691 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
692 field.
693 (c_parser_gimple_parse_bb_spec_edge_probability): New.
694
f179b64e
JJ
6952019-04-26 Jakub Jelinek <jakub@redhat.com>
696
697 PR debug/90197
698 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
699 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
700 (c_parser_do_statement): Likewise.
701 (c_parser_for_statement): Likewise. Formatting fixes.
702 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
703 emit DEBUG_BEGIN_STMTs if needed.
704
e7178413
JJ
7052019-04-19 Jakub Jelinek <jakub@redhat.com>
706
c280b7ee
JJ
707 PR c/89888
708 * c-typeck.c (struct c_switch): Remove outside_range_p member.
709 (c_start_case): Don't clear it.
710 (do_case): Adjust c_add_case_label caller.
711 (c_finish_case): Adjust c_do_switch_warnings caller.
712
e7178413
JJ
713 PR c++/90108
714 * c-decl.c (merge_decls): If remove is main variant and
715 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
716 variant that has newdecl as TYPE_NAME if any.
717
60a2c645
JJ
7182019-04-12 Jakub Jelinek <jakub@redhat.com>
719
720 PR c/89933
721 * c-decl.c (merge_decls): When newdecl's type is its main variant,
722 don't try to remove it from the variant list, but instead assert
723 it has no variants.
724
2a82beaa
RB
7252019-04-01 Richard Biener <rguenther@suse.de>
726
727 PR c/71598
728 * c-tree.h (c_get_alias_set): Declare.
729 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
730 * c-objc-common.c (c_get_alias_set): Treat enumeral types
731 as the underlying integer type.
732
bec1da64
MS
7332019-03-19 Martin Sebor <msebor@redhat.com>
734
735 PR tree-optimization/89688
736 * c-decl.c (finish_decl): Call braced_lists_to_string for more
737 kinds of initializers.
738
855cd9b1
JJ
7392019-03-19 Jakub Jelinek <jakub@redhat.com>
740
741 PR c/89734
742 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
743 return type even if quals_used is 0. Formatting fixes.
744
baa09dc5
RB
7452019-03-14 Richard Biener <rguenther@suse.de>
746
747 * c-tree.h (enum c_declspec_il): New.
748 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
749 enum bitfield.
750 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
751 Pass start pass and declspec_il to c_parser_parse_gimple_body.
752 (c_parser_declspecs): Adjust.
753 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
754 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
755 and bitmap.h.
756 (struct gimple_parser): New.
757 (gimple_parser::push_edge): New method.
758 (c_parser_gimple_parse_bb_spec): New helper.
759 (c_parser_parse_gimple_body): Get start pass and IL specification.
760 Initialize SSA and CFG.
761 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
762 Build a gimple_parser parsing state and pass it along.
763 (c_parser_gimple_statement): Change intermittend __PHI internal
764 function argument for the edge.
765 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
766 (c_parser_gimple_goto_stmt): Record edges to build.
767 (c_parser_gimple_if_stmt): Likewise.
768 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
769 (c_parser_gimple_or_rtl_pass_list): Likewise.
770
a3f9f006
ML
7712019-03-11 Martin Liska <mliska@suse.cz>
772
773 * c-decl.c (check_for_loop_decls): Wrap an option name
774 in a string format message and fix GNU coding style.
775 * c-parser.c (c_parser_declspecs): Likewise.
776
1db01ff9
JJ
7772019-03-08 Jakub Jelinek <jakub@redhat.com>
778
779 PR tree-optimization/89550
780 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
781 returned true.
782 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
783 or warning returned true.
784
66dcb747
JJ
7852019-02-28 Jakub Jelinek <jakub@redhat.com>
786
787 PR c/89525
788 * c-typeck.c (convert_arguments): Call inform_declaration only if
789 the previous warning_at call returned true.
790
2263c9f2
TS
7912019-02-22 Thomas Schwinge <thomas@codesourcery.com>
792
793 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
794 parameter. Adjust all users.
795 (c_parser_oacc_simple_clause): Replace parser with loc formal
796 parameter. Adjust all users.
797
ab20d992 7982019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
799
800 PR c/87924
801 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
802 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
803
5f88ba10
JJ
8042019-02-15 Jakub Jelinek <jakub@redhat.com>
805
806 PR c/89340
807 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
808 before c_decl_attributes rather than after it.
809
cfc30fd1
JJ
8102019-02-06 Jakub Jelinek <jakub@redhat.com>
811
812 PR c/89211
813 * c-parser.c (c_parser_declaration_or_fndef): Don't update
814 DECL_ARGUMENTS of d if it has been defined already. Use a single if
815 instead of 3 nested ifs.
816
fbe83e6b
JM
8172019-02-06 Joseph Myers <joseph@codesourcery.com>
818
819 PR c/88584
820 * c-decl.c (finish_decl): Do not complete array types for arrays
821 with external linkage not at file scope.
822
f461f938
RB
8232019-02-05 Richard Biener <rguenther@suse.de>
824
825 PR c/88606
826 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
827 all type variants when not supported.
828
fe509359
JJ
8292019-01-30 Jakub Jelinek <jakub@redhat.com>
830
831 PR c/89061
832 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
833 * c-decl.c (decl_jump_unsafe): Return false for
834 C_DECL_COMPOUND_LITERAL_P decls.
835 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
836
6a335b96
JJ
8372019-01-29 Jakub Jelinek <jakub@redhat.com>
838
f4b7e754
JJ
839 PR c/89045
840 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
841 scope.
842
6a335b96
JJ
843 PR c/86125
844 * c-decl.c (last_fileptr_type): Remove.
845 (last_structptr_types): New variable.
846 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
847 {old,new}rettype instead of the types themselves. Assert
848 last_structptr_types array has the same number of elements
849 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
850 argument oldtype and newtype. Instead of handling
851 just fileptr_type_node specially, handle all builtin_structptr_types
852 pointer nodes. Formatting fix.
853
d8b5a1a0
MS
8542019-01-24 Martin Sebor <msebor@redhat.com>
855
856 PR c/86125
857 PR c/88886
858 PR middle-end/86308
859 * c-decl.c (match_builtin_function_types): Add arguments.
860 (diagnose_mismatched_decls): Diagnose mismatched declarations
861 of built-ins more strictly.
862
e21c4491
JJ
8632019-01-24 Jakub Jelinek <jakub@redhat.com>
864
865 PR c++/88976
866 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
867 on #pragma omp cancel with different modifiers.
868
420183d9
L
8692019-01-18 H.J. Lu <hongjiu.lu@intel.com>
870
871 PR c/51628
872 PR c/88664
873 * c-typeck.c (convert_for_assignment): Upate the
874 warn_for_address_or_pointer_of_packed_member call.
875
17ad43dd
TH
8762019-01-16 Tom Honermann <tom@honermann.net>
877 Jason Merrill <jason@redhat.com>
878
879 * c-typeck.c (digest_init): Revised the error message produced for
880 ill-formed cases of array initialization with a string literal.
881 (error_init): Make variadic.
882
5f07d78a
JJ
8832019-01-12 Jakub Jelinek <jakub@redhat.com>
884
885 * c-typeck.c (convert_for_assignment): Fix a comment typo.
886
c4581bbf
JJ
8872019-01-07 Jakub Jelinek <jakub@redhat.com>
888
889 PR c/88701
890 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
891 if current_function_decl is non-NULL.
892
65c5b1eb
JM
8932019-01-07 Joseph Myers <joseph@codesourcery.com>
894
895 PR c/88720
896 PR c/88726
897 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
898 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
899 functions declared but never defined only for external scope, not
900 for other scopes.
901
d8fcab68
JJ
9022019-01-07 Jakub Jelinek <jakub@redhat.com>
903
904 PR c++/85052
905 * c-parser.c (c_parser_postfix_expression): Parse
906 __builtin_convertvector.
907
a5544970
JJ
9082019-01-01 Jakub Jelinek <jakub@redhat.com>
909
910 Update copyright years.
911
da77eace
L
9122018-12-20 H.J. Lu <hongjiu.lu@intel.com>
913
914 PR c/51628
915 * c-typeck.c (convert_for_assignment): Call
916 warn_for_address_or_pointer_of_packed_member.
917
1edf8866
SB
9182018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
919
920 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
921 a more specific error message (instead of just falling through).
922
db4fd626
SB
9232018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
924
925 * c-parser.c (c_parser_asm_statement): Keep track of the location each
926 asm qualifier is first seen; use that to give nicer "duplicate asm
927 qualifier" messages. Delete 'quals" variable, instead pass the
928 "is_volatile_ flag to build_asm_stmt directly.
929 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
930 * c-typeck.c (build_asm_stmt): Ditto; adjust.
931
9c9cfcbb
SB
9322018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
933
934 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
935 "done" boolean variable.
936
a14feb3c
DM
9372018-12-19 David Malcolm <dmalcolm@redhat.com>
938
939 PR c++/87504
940 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
941 Move from here to gcc-rich-location.h and gcc-rich-location.c.
942 (build_binary_op): Use struct op_location_t and
943 class binary_op_rich_location.
944
6d939173
JJ
9452018-12-11 Jakub Jelinek <jakub@redhat.com>
946
947 PR sanitizer/88426
948 * c-convert.c (convert): Call c_fully_fold before calling
949 ubsan_instrument_float_cast.
950
b7055028
SB
9512018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
952
953 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
954 setting "quals".
955
5b76e75f
SB
9562018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
957
958 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
959 after asm. Pass a flag for it to build_asm_expr.
960 * c-tree.h (build_asm_expr): Update declaration.
961 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
962 set ASM_INLINE_P.
963
30bd42b9
SB
9642018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
965
966 PR inline-asm/55681
967 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
968 combination of volatile and goto, in any order, without repetitions.
969
9df6c0e4
JB
9702018-12-04 James Norris <jnorris@codesourcery.com>
971 Cesar Philippidis <cesar@codesourcery.com>
972 Julian Brown <julian@codesourcery.com>
973
974 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
975 code.
976
f44697b7
RB
9772018-11-30 Richard Biener <rguenther@suse.de>
978
979 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
980 _Literal (type) { ... } as empty aggregate or vector constructor.
981
550dfbdc
MS
9822018-11-29 Martin Sebor <msebor@redhat.com>
983
984 PR c/88091
985 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
986 (convert_arguments): Add comments. Pass additional argument to
987 the function above.
988
673670da
MS
9892018-11-29 Martin Sebor <msebor@redhat.com>
990
991 PR c/88172
992 PR testsuite/88208
993 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
994
db1d09b0
MS
9952018-11-23 Martin Sebor <msebor@redhat.com>
996
997 PR testsuite/88098
998 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
999 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1000
98f08eb8
MS
10012018-11-20 Martin Sebor <msebor@redhat.com>
1002
1003 * c-parser.c (c_parser_has_attribute_expression): New function.
1004 (c_parser_attribute): New function.
1005 (c_parser_attributes): Move code into c_parser_attribute.
1006 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1007
cd5da983
MS
10082018-11-15 Martin Sebor <msebor@redhat.com>
1009
1010 PR c/83656
1011 * c-decl.c (header_for_builtin_fn): Declare.
1012 (diagnose_mismatched_decls): Diagnose declarations of built-in
1013 functions without a prototype.
1014 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1015 (convert_argument): Same.
1016 (convert_arguments): Factor code out into convert_argument.
1017 Detect mismatches between built-in formal arguments in calls
1018 to built-in without prototype.
1019 (build_conditional_expr): Same.
1020 (type_or_builtin_type): New function.
1021 (convert_for_assignment): Add argument. Conditionally issue
1022 warnings instead of errors for mismatches.
1023
620e594b
DM
10242018-11-13 David Malcolm <dmalcolm@redhat.com>
1025
1026 * c-decl.c: Replace "source_location" with "location_t".
1027 * c-tree.h: Likewise.
1028 * c-typeck.c: Likewise.
1029 * gimple-parser.c: Likewise.
1030
3179ebae
JJ
10312018-11-09 Jakub Jelinek <jakub@redhat.com>
1032
81a227c6
JJ
1033 * c-parser.c (c_parser_omp_clause_final): Use
1034 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1035 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1036 parsing instead of c_parser_paren_condition.
1037 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1038 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1039 c_fully_fold instead of c_parser_condition.
1040 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1041 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1042 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1043 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1044 c_parser_expr_no_commas instead of c_parser_expression.
1045
98c91c56
JJ
1046 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1047 reduction clause with inscan modifier.
1048
3179ebae
JJ
1049 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1050 clauses other than atomic_default_mem_order.
1051
28567c40
JJ
10522018-11-08 Jakub Jelinek <jakub@redhat.com>
1053
1054 * c-parser.c: Include memmode.h.
1055 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1056 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1057 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1058 task_reduction clauses.
1059 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1060 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1061 section, or lvalue assignment expression.
1062 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1063 (c_parser_omp_clause_lastprivate): Parse optional
1064 conditional: modifier.
1065 (c_parser_omp_clause_hint): Require constant integer expression rather
1066 than just integer expression.
1067 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1068 clause.
1069 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1070 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1071 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1072 functions.
1073 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1074 iterators. Parse mutexinoutset and depobj kinds.
1075 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1076 callers.
1077 (c_parser_omp_all_clauses): Likewise. Handle
1078 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1079 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1080 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1081 default memory order from requires directive if any. Adjust
1082 c_finish_omp_atomic caller.
1083 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1084 (c_parser_omp_flush): Parse flush with memory-order-clause.
1085 (c_parser_omp_for_loop): Allow NE_EXPR even in
1086 OpenMP loops, adjust c_finish_omp_for caller.
1087 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1088 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1089 Allow to be called while parsing combined parallel master.
1090 Parse combined master taskloop{, simd}.
1091 (c_parser_omp_parallel): Parse combined
1092 parallel master{, taskloop{, simd}} constructs.
1093 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1094 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1095 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1096 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1097 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1098 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1099 around teams body. Use SET_EXPR_LOCATION.
1100 (c_parser_omp_target_data): Allow target data
1101 with only use_device_ptr clauses.
1102 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1103 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1104 (c_parser_omp_requires): New function.
1105 (c_finish_taskloop_clauses): New function.
1106 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1107 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1108 declaration. Disallow in_reduction clause when combined with parallel
1109 master.
1110 (c_parser_omp_construct): Adjust c_parser_omp_master and
1111 c_parser_omp_taskgroup callers.
1112 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1113 other than cancel.
1114 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1115 like OMP_CLAUSE_REDUCTION.
1116 (handle_omp_array_sections): Likewise. Call save_expr on array
1117 reductions before calling build_index_type. Handle depend clauses
1118 with iterators.
1119 (struct c_find_omp_var_s): New type.
1120 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1121 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1122 with static, runtime or auto schedule kinds. Call save_expr for whole
1123 array reduction sizes. Diagnose reductions with zero sized elements
1124 or variable length structures. Diagnose nogroup clause used with
1125 reduction clause(s). Handle depend clause with
1126 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1127 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1128 some different type for other kinds. Use build_unary_op with
1129 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1130 Handle depend clauses with iterators. Remove no longer needed special
1131 case that predetermined const qualified vars may be specified in
1132 firstprivate clause. Complain if const qualified vars are mentioned
1133 in data-sharing clauses other than firstprivate or shared. Use
1134 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1135 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1136 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1137 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1138
7e2de6df
DM
11392018-10-29 David Malcolm <dmalcolm@redhat.com>
1140
1141 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1142 logic for change to name_hint::operator bool.
1143 (undeclared_variable): Likewise.
1144 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1145 (c_parser_parameter_declaration): Likewise.
1146
9f936c86
JM
11472018-10-17 Joseph Myers <joseph@codesourcery.com>
1148
1149 * c-errors.c (pedwarn_c11): New function.
1150 * c-parser.c (disable_extension_diagnostics): Save
1151 warn_c11_c2x_compat and set it to 0.
1152 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1153 (c_parser_static_assert_declaration_no_semi): Handle
1154 _Static_assert without string constant.
1155 * c-tree.h (pedwarn_c11): New prototype.
1156
033eb567
DM
11572018-10-17 David Malcolm <dmalcolm@redhat.com>
1158
1159 * Make-lang.in (selftest-c): New.
1160 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1161 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1162 from gcc/Makefile.in.
1163
0edf3afe
RB
11642018-10-02 Richard Biener <rguenther@suse.de>
1165
1166 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1167
8313a764
JM
11682018-09-26 Joseph Myers <joseph@codesourcery.com>
1169
1170 PR c/87390
1171 * c-typeck.c (build_binary_op): Use excess precision for
1172 comparisons of integers and floating-point for C11 and later.
1173
ce6f0888
MJ
11742018-09-26 Martin Jambor <mjambor@suse.cz>
1175
1176 PR c/87347
1177 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1178 comment.
ce6f0888 1179
9c4a4b3c
DM
11802018-09-17 David Malcolm <dmalcolm@redhat.com>
1181
1182 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1183 Update for new param.
1184 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1185 Likewise.
1186
80c6d1f4
MJ
11872018-09-17 Martin Jambor <mjambor@suse.cz>
1188
1189 PR c/63886
1190 * c-parser.c: (warn_for_abs): New function.
1191 (c_parser_postfix_expression_after_primary): Call it.
1192
4a426e36
BE
11932018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1194
1195 * c-typeck.c (digest_init): Shorten overlength strings.
1196
6d900107
BE
11972018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1198
1199 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1200
b5764229
BE
12012018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1202
1203 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1204 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1205
22eea6b2
AM
12062018-08-30 Alexander Monakov <amonakov@ispras.ru>
1207
1208 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1209 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1210
85204e23
DM
12112018-08-27 David Malcolm <dmalcolm@redhat.com>
1212
1213 PR 87091
1214 * c-decl.c (implicitly_declare): Update call to
1215 maybe_add_include_fixit to suggest overriding the location, as it
1216 is for a note.
1217 * c-objc-common.c (c_tree_printer): Update for conversion of
1218 show_caret_p to a tri-state.
1219
3d78e008
ML
12202018-08-27 Martin Liska <mliska@suse.cz>
1221
1222 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1223 fndecl_built_in_p and remove check for FUNCTION_DECL if
1224 possible.
3d78e008
ML
1225 (diagnose_mismatched_decls): Likewise.
1226 (merge_decls): Likewise.
1227 (warn_if_shadowing): Likewise.
1228 (pushdecl): Likewise.
1229 (implicitly_declare): Likewise.
1230 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1231 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1232 * c-typeck.c (build_function_call_vec): Likewise.
1233 (convert_arguments): Likewise.
1234
097f82ec
DM
12352018-08-20 David Malcolm <dmalcolm@redhat.com>
1236
1237 PR other/84889
1238 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1239 (diagnose_mismatched_decls): Likewise, in various places.
1240 (warn_if_shadowing): Likewise.
1241 (implicit_decl_warning): Likewise.
1242 (implicitly_declare): Likewise.
1243 (undeclared_variable): Likewise.
1244 (declare_label): Likewise.
1245 (grokdeclarator): Likewise.
1246 (start_function): Likewise.
1247 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1248 (c_parser_parameter_declaration): Likewise.
1249 (c_parser_binary_expression): Likewise.
1250 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1251 (parser_build_binary_op): Likewise.
1252 (build_unary_op): Likewise.
1253 (error_init): Likewise.
1254 (pedwarn_init): Likewise.
1255 (warning_init): Likewise.
1256 (convert_for_assignment): Likewise.
1257
96e6ae57
DM
12582018-08-15 David Malcolm <dmalcolm@redhat.com>
1259
1260 * c-objc-common.c: Include "gcc-rich-location.h".
1261 (c_tree_printer): Move implemenation of '%T' to...
1262 (print_type): ...this new function.
1263 (range_label_for_type_mismatch::get_text): New function.
1264 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1265 range for the various ic_argpass cases.
1266 (class maybe_range_label_for_tree_type_mismatch): New class.
1267 (build_binary_op): Use it when calling binary_op_error.
1268
0cd020ae 12692018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1270
0cd020ae
PK
1271 * c-decl.c (start_decl): Do not warn if variables is named as main
1272 and is a local variable.
1273
72733314
IS
12742018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1275
1276 PR c/19315
1277 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1278 objects of unknown size.
1279
23aa9f7c
MS
12802018-08-13 Martin Sebor <msebor@redhat.com>
1281
1282 PR tree-optimization/71625
1283 * c-parser.c (c_parser_declaration_or_fndef): Call
1284 braced_list_to_string.
1285
e5e7e50d
BH
12862018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1287
1288 PR c/86690
1289 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1290 errors.
1291
8a45b051
MS
12922018-08-01 Martin Sebor <msebor@redhat.com>
1293
1294 PR tree-optimization/86650
1295 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1296 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1297
5922dcb5
JJ
12982018-08-01 Jakub Jelinek <jakub@redhat.com>
1299
1300 PR c/85704
1301 * c-typeck.c (init_field_decl_cmp): New function.
1302 (output_pending_init_elements): Use it for field comparisons
1303 instead of pure bit_position comparisons.
1304
9b452033
JJ
13052018-07-12 Jakub Jelinek <jakub@redhat.com>
1306
1307 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1308 type here, instead add "omp declare target implicit" attribute.
1309 (finish_decl): Diagnose vars without mappable type here.
1310
ab20d992
JJ
13112018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1312 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1313 Cesar Philippidis <cesar@codesourcery.com>
1314
1315 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1316 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1317 to their non-present_or_* counterparts. Make 'self' an alias to
1318 PRAGMA_OACC_CLAUSE_HOST.
1319 (c_parser_oacc_data_clause): Update GOMP mappings for
1320 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1321 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1322 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1323 Remove support for present_or_* clauses.
1324 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1325 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1326 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1327 (OACC_DATA_CLAUSE_MASK): Likewise.
1328 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1329 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1330 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1331 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1332 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1333
e197e64e
KV
13342018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1335
1336 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1337 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1338 (c_parser_gimple_unary_expression): Likewise.
1339
487f2f61
JJ
13402018-06-15 Jakub Jelinek <jakub@redhat.com>
1341
1342 PR c/86093
1343 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1344 before doing POINTER_DIFF_EXPR.
1345
e4d44a37
MP
13462018-06-07 Marek Polacek <polacek@redhat.com>
1347
1348 PR c/85318
1349 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1350 for loop initial declarations.
1351
b67b9225
DP
13522018-05-30 David Pagan <dave.pagan@oracle.com>
1353
1354 PR c/55976
1355 * c-decl.c (grokdeclarator): Update check for return type warnings.
1356 (start_function): Likewise.
1357 (finish_function): Likewise.
1358 * c-typeck.c (c_finish_return): Update check for return type warnings.
1359 Pass OPT_Wreturn_type to pedwarn when appropriate.
1360
c566cc9f
RS
13612018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1362
1363 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1364 __FMA_EXPR handlng.
1365
e4f81565
RS
13662018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1367
1368 * gimple-parser.c: Include internal-fn.h.
1369 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1370 (c_parser_gimple_call_internal): New function.
1371 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1372 Fix typos in comment.
1373
79e7b1fe
JJ
13742018-05-10 Jakub Jelinek <jakub@redhat.com>
1375
1376 PR c++/85662
1377 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1378 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1379 fold_convert_loc.
1380 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1381 fold_offsetof_1, pass argtype as TYPE to it and drop the
1382 fold_convert_loc.
1383
f7584c81
DP
13842018-05-02 David Pagan <dave.pagan@oracle.com>
1385
1386 PR c/30552
1387 * c-decl.c (old_style_parameter_scope): New function.
1388 * c-parser.c (c_parser_postfix_expression): Check for statement
1389 expressions in old-style function parameter list declarations.
1390 * c-parser.h (old_style_parameter_scope): New extern declaration.
1391
b33a0cb3
JJ
13922018-04-25 Jakub Jelinek <jakub@redhat.com>
1393
1394 PR sanitizer/84307
1395 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1396 it is not TREE_STATIC.
1397 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1398 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1399 its COMPOUND_LITERAL_EXPR_DECL.
1400
c5c5822a
JM
14012018-03-21 Joseph Myers <joseph@codesourcery.com>
1402
1403 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1404 where all functions return the same _FloatN or _FloatNx type,
1405 treat integer types as _Float64 instead of double.
1406
aa1c9429
JJ
14072018-03-21 Jakub Jelinek <jakub@redhat.com>
1408
1409 PR c/84999
1410 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1411 building vector comparison, diagnose it and return error_mark_node.
1412
9bb45a95
JJ
14132018-03-15 Jakub Jelinek <jakub@redhat.com>
1414
1415 PR c/84853
1416 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1417 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1418 INTEGER_TYPE element type.
1419
ada6bad9
DP
14202018-03-13 David Pagan <dave.pagan@oracle.com>
1421
1422 PR c/46921
1423 * c-typeck.c (output_init_element): Ensure field initializer
1424 expression is always evaluated if there are side effects.
1425
849bbdb9
JJ
14262018-03-06 Jakub Jelinek <jakub@redhat.com>
1427
1428 PR c/84721
1429 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1430 !building_stmt_list_p ().
1431
d74641bd
RS
14322018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1433
1434 PR c/84305
1435 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1436 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1437 and include the BIND_EXPR in the list of things that need to be
1438 pre-evaluated.
1439
0444aa9c
NS
14402018-02-09 Nathan Sidwell <nathan@acm.org>
1441
1442 PR c/84293
1443 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1444 to strict_aliasing_warning.
1445
7c30b12a
PC
14462018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1447
1448 * c-typeck.c (really_start_incremental_init, push_init_level,
1449 set_nonincremental_init, output_init_element, process_init_element):
1450 Use DECL_UNNAMED_BIT_FIELD.
1451
2be4dfcb
MP
14522018-01-31 Marek Polacek <polacek@redhat.com>
1453
1454 PR c/81779
1455 * c-parser.c (c_parser_compound_statement_nostart): Call
1456 expansion_point_location_if_in_system_header.
1457
bb9869d5
DM
14582018-01-17 David Malcolm <dmalcolm@redhat.com>
1459
1460 PR c++/83814
1461 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1462 the C part.
1463
b4923738
JJ
14642018-01-13 Jakub Jelinek <jakub@redhat.com>
1465
1466 PR c/83801
1467 * c-tree.h (decl_constant_value_1): Add a bool argument.
1468 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1469 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1470 (decl_constant_value): Adjust caller.
1471 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1472 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1473 decl_constant_value returns initializer that has BLKmode or
1474 array type.
1475 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1476
928686b1
RS
14772018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1478 Alan Hayward <alan.hayward@arm.com>
1479 David Sherwood <david.sherwood@arm.com>
1480
1481 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1482 TYPE_VECTOR_SUBPARTS.
1483
85ec4feb
JJ
14842018-01-03 Jakub Jelinek <jakub@redhat.com>
1485
1486 Update copyright years.
1487
913884f7
JJ
14882018-01-01 Jakub Jelinek <jakub@redhat.com>
1489
1490 PR c/83595
1491 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1492 c_parser_conditional_expression, c_parser_cast_expression,
1493 c_parser_sizeof_expression, c_parser_alignof_expression,
1494 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1495 c_parser_transaction_expression): Use set_error () method instead
1496 of setting value member to error_mark_node.
1497
c6cfa2bf
MM
14982017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1499
1500 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1501 and _Float<N>X built-in functions.
1502
11d29d63
JJ
15032017-12-22 Jakub Jelinek <jakub@redhat.com>
1504
14ec014e
JJ
1505 PR debug/83550
1506 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1507 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1508 incomplete vars rather than after it.
1509
11d29d63
JJ
1510 PR debug/83547
1511 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1512 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1513 and consider empty ones if there are no other stmts. For
1514 -Wunused-value walk all statements before the one only followed by
1515 DEBUG_BEGIN_STMTs.
1516
170a8bd6 15172017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1518 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1519
1520 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1521 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1522 (c_parser_do_statement): Likewise.
1523 (c_parser_for_statement): Likewise.
1524 (c_parser_statement_after_labels): Adjust calls to above.
1525 (c_parse_pragma_ivdep): New static function.
1526 (c_parser_pragma_unroll): Likewise.
1527 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1528 <PRAGMA_UNROLL>: New case.
1529
01512446
JJ
15302017-12-19 Jakub Jelinek <jakub@redhat.com>
1531
1532 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1533 perform_integral_promotions, digest_init): Replace Yoda conditions
1534 with typical order conditions.
1535 * c-decl.c (check_bitfield_type_and_width): Likewise.
1536
c65e18d3
BE
15372017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1538
1539 * c-typeck.c (c_safe_arg_type_equiv_p,
1540 c_safe_function_type_cast_p): New function.
1541 (build_c_cast): Implement -Wcast-function-type.
1542
b7280579
RB
15432017-12-14 Richard Biener <rguenther@suse.de>
1544
1545 PR c/83415
1546 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1547 like REALPART_EXPR for the behavior of whether its operand
1548 is an lvalue.
1549
49e6a6c0
MP
15502017-12-12 Marek Polacek <polacek@redhat.com>
1551
1552 PR c/82679
1553 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1554
ab20d992 15552017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1556
1557 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1558 * c-parser.c (add_debug_begin_stmt): New.
1559 (c_parser_declaration_or_fndef): Call it.
1560 (c_parser_compound_statement_nostart): Likewise.
1561 (c_parser_statement_after_labels): Likewise.
1562 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1563
4b2b493f
JM
15642017-12-07 Joseph Myers <joseph@codesourcery.com>
1565
1566 * c-decl.c (build_compound_literal): Add parameter alignas_align
1567 and set alignment of decl if nonzero.
1568 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1569 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1570 qualifier.
1571 (c_parser_struct_declaration): Update syntax comment.
1572 (c_parser_type_name): Add alignas_ok argument and pass it to
1573 c_parser_declspecs.
1574 (c_parser_cast_expression): Pass true to c_parser_type_name and
1575 give error if a cast used an _Alignas specifier.
1576 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1577 give error if sizeof (type-name) used an _Alignas specifier.
1578 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1579 give error if _Alignof (type-name) used an _Alignas specifier.
1580 (c_parser_postfix_expression_after_paren_type): Check specified
1581 alignment for a compound literal and pass it to
1582 build_compound_literal.
1583 * c-parser.h (c_parser_type_name): Update prototype.
1584 * c-tree.h (build_compound_literal): Update prototype.
1585
5d9ae53d
MS
15862017-12-07 Martin Sebor <msebor@redhat.com>
1587
1588 PR c/81544
1589 * c-decl.c (c_decl_attributes): Look up existing declaration and
1590 pass it to decl_attributes.
1591
c79144f8
DM
15922017-12-06 David Malcolm <dmalcolm@redhat.com>
1593
1594 PR c/83236
1595 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1596 reserved for use by the implementation.
1597
613bc14f
DM
15982017-12-06 David Malcolm <dmalcolm@redhat.com>
1599
1600 * c-decl.c: Include "c-family/c-spellcheck.h".
1601
05abad4c
ML
16022017-12-05 Martin Liska <mliska@suse.cz>
1603 Jakub Jelinek <jakub@redhat.com>
1604
1605 * c-typeck.c (pointer_diff): Add new argument and instrument
1606 pointer subtraction.
1607 (build_binary_op): Similar for pointer comparison.
1608
cc6534d4
JJ
16092017-12-01 Jakub Jelinek <jakub@redhat.com>
1610
65791f42
JJ
1611 PR c/79153
1612 * c-parser.c: Include tree-iterator.h.
1613 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1614 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1615 on it.
1616
cc6534d4
JJ
1617 PR c/83222
1618 * c-tree.h (decl_constant_value_1): Declare.
1619 * c-typeck.c (decl_constant_value_1): New function.
1620 (decl_constant_value): Use it.
1621 * c-fold.c (c_fully_fold_internal): If in_init, use
1622 decl_constant_value_1 instead of decl_constant_value.
1623
5de73c05
JJ
16242017-11-30 Jakub Jelinek <jakub@redhat.com>
1625
1626 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1627
058f0b9e
JJ
16282017-11-28 Jakub Jelinek <jakub@redhat.com>
1629
1630 PR sanitizer/81275
1631 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1632 c_switch_covers_all_cases_p returns true.
1633
5e9d6aa4 16342017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1635 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1636
1637 * Make-lang.in (c/c-array-notation.o): Remove.
1638 * c-array-notation.c: Delete.
1639 * c-decl.c: Remove cilkplus condition.
1640 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1641 c_parser_cilk_verify_simd, c_parser_array_notation,
1642 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1643 c_parser_cilk_simd_fn_vector_attrs,
1644 c_finish_cilk_simd_fn_tokens): Delete.
1645 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1646 (c_parser_direct_declarator_inner): Ditto.
1647 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1648 (c_parser_attributes, c_parser_compound_statement,
1649 c_parser_statement_after_labels, c_parser_if_statement,
1650 c_parser_switch_statement, c_parser_while_statement,
1651 c_parser_do_statement, c_parser_for_statement,
1652 c_parser_unary_expression, c_parser_postfix_expression,
1653 c_parser_postfix_expression_after_primary,
1654 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1655 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1656 support.
1657 * c-typeck.c (build_array_ref, build_function_call_vec,
1658 convert_arguments,
1659 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1660 c_finish_loop, build_binary_op): Remove cilkplus support.
1661
9e851845
JJ
16622017-11-28 Jakub Jelinek <jakub@redhat.com>
1663
1664 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1665 of build3.
1666
ab20d992 16672017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
1668
1669 * Make-lang.in (c.install-plugin): Install backend import library.
1670
41521dee
JJ
16712017-11-23 Jakub Jelinek <jakub@redhat.com>
1672
1673 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1674 pragma_stmt context.
1675
ac9effed
EB
16762017-11-23 Mike Stump <mikestump@comcast.net>
1677 Eric Botcazou <ebotcazou@adacore.com>
1678
1679 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1680 ANNOTATE_EXPR.
1681 (c_parser_do_statement): Likewise.
1682 (c_parser_for_statement): Likewise.
1683
ce95abc4
DM
16842017-11-22 David Malcolm <dmalcolm@redhat.com>
1685
1686 PR c++/62170
1687 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1688 bool to bool *. Within '%T' handling, if showing an "aka", use
1689 "quoted" param to add appropriate quoting.
1690
974aedcc
MP
16912017-11-22 Marek Polacek <polacek@redhat.com>
1692
1693 PR c++/60336
1694 PR middle-end/67239
1695 PR target/68355
1696 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1697
d4300cc6
DM
16982017-11-21 David Malcolm <dmalcolm@redhat.com>
1699
1700 PR c/83056
1701 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1702 earlier failed lookups.
1703
1af4ebf5
MG
17042017-11-21 Marc Glisse <marc.glisse@inria.fr>
1705
1706 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1707 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1708
26edace6
DM
17092017-11-20 David Malcolm <dmalcolm@redhat.com>
1710
1711 PR c/81404
1712 * c-decl.c: Include "c-family/known-headers.h".
1713 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1714 to known-headers.cc.
1715 (class suggest_missing_header): Move to known-header.h.
1716 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1717 than get_c_name_hint.
1718
b1212255
DM
17192017-11-20 David Malcolm <dmalcolm@redhat.com>
1720
1721 * c-decl.c (get_c_name_hint): New function.
1722 (class suggest_missing_header): New class.
1723 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1724 suggest missing headers to the user.
1725
6c7a259b
DM
17262017-11-20 David Malcolm <dmalcolm@redhat.com>
1727
1728 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1729 Include "c-family/name-hint.h"
1730 (implicit_decl_warning): Convert "hint" from
1731 const char * to name_hint. Pass location to
1732 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1733 warning was not printed.
1734 (undeclared_variable): Likewise for "guessed_id".
1735 (lookup_name_fuzzy): Convert return type from const char *
1736 to name_hint. Add location_t param.
1737 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1738 Include "c-family/name-hint.h"
1739 (c_parser_declaration_or_fndef): Convert "hint" from
1740 const char * to name_hint. Pass location to lookup_name_fuzzy.
1741 (c_parser_parameter_declaration): Likewise.
1742
f9c59f7e
JJ
17432017-11-19 Jakub Jelinek <jakub@redhat.com>
1744
1745 PR c/66618
1746 PR c/69960
1747 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1748 where needed.
1749 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1750 handle_omp_array_sections): Likewise.
1751 (digest_init): Don't call decl_constant_value_for_optimization.
1752 * c-tree.h (decl_constant_value_for_optimization): Removed.
1753 * c-fold.c (c_fold_array_ref): New function.
1754 (c_fully_fold_internal): Add LVAL argument, propagate it through
1755 recursive calls. For VAR_P call decl_constant_value and
1756 unshare if not LVAL and either optimizing or IN_INIT. Remove
1757 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1758 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1759 (c_fully_fold): Add LVAL argument, pass it through to
1760 c_fully_fold_internal.
1761 (decl_constant_value_for_optimization): Removed.
1762
3ca0dc60
JM
17632017-11-15 Joseph Myers <joseph@codesourcery.com>
1764
1765 PR c/81156
1766 * c-parser.c (check_tgmath_function): New function.
1767 (enum tgmath_parm_kind): New enum.
1768 (c_parser_postfix_expression): Handle __builtin_tgmath.
1769
64a5912c
DM
17702017-10-31 David Malcolm <dmalcolm@redhat.com>
1771
1772 * c-decl.c (implicit_decl_warning): Update for renaming of
1773 pedwarn_at_rich_loc and warning_at_rich_loc.
1774 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1775 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1776 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1777 (c_parser_struct_or_union_specifier): Likewise for renaming of
1778 pedwarn_at_rich_loc.
1779 (c_parser_parameter_declaration): Likewise for renaming of
1780 error_at_rich_loc.
1781 * c-typeck.c (build_component_ref): Likewise.
1782 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1783 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1784 (set_init_label): Likewise for renaming of error_at_rich_loc.
1785
c1136864
RB
17862017-10-30 Richard Biener <rguenther@suse.de>
1787
1788 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1789 stmts.
1790
ee5fd23a
MM
17912017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1792
1793 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1794 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1795
1a59ccf2
DM
17962017-10-25 David Malcolm <dmalcolm@redhat.com>
1797
1798 PR c/7356
1799 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1800 semicolons.
1801
bc1a75dd
JJ
18022017-10-25 Jakub Jelinek <jakub@redhat.com>
1803
1804 PR libstdc++/81706
1805 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1806 newdecl to corresponding __builtin_ if any.
1807
ff1ff960
PC
18082017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1809
1810 PR c++/82466
1811 * c-decl.c (diagnose_mismatched_decls): Use
1812 OPT_Wbuiltin_declaration_mismatch.
1813
62e1c678
DM
18142017-10-12 David Malcolm <dmalcolm@redhat.com>
1815
1816 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1817 use it to guard calls to maybe_suggest_missing_token_insertion.
1818 (c_parser_parms_list_declarator): Override default value of new
1819 "type_is_unique" param to c_parser_require.
1820 (c_parser_asm_statement): Likewise.
1821 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1822 defaulting to true.
1823
a92f6726
NS
18242017-10-11 Nathan Sidwell <nathan@acm.org>
1825
1826 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1827
8e6cdc90
RS
18282017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1829
1830 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1831 operating on trees as wide_ints.
1832 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1833 (c_tree_equal): Likewise.
1834
8139a48e
DM
18352017-10-04 David Malcolm <dmalcolm@redhat.com>
1836
1837 * c-decl.c (push_parm_decl): Store c_parm's location into the
1838 PARAM_DECL.
1839 (build_c_parm): Add "loc" param and store it within the c_parm.
1840 * c-parser.c (struct c_parser): Add "last_token_location" field.
1841 (c_parser_consume_token): Store location of the token into the
1842 new field.
1843 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1844 when handling a FUNCTION_DECL, if it doesn't already have them.
1845 (c_parser_parameter_declaration): Generate a location for the
1846 parameter, and pass it to the call to build_c_parm.
1847 * c-tree.h (struct c_parm): Add field "loc".
1848 (build_c_parm): Add location_t param.
1849 * c-typeck.c (get_fndecl_argument_location): New function.
1850 (inform_for_arg): New function.
1851 (convert_for_assignment): Use inform_for_arg when dealing with
1852 ic_argpass.
1853
2a389958
JJ
18542017-09-29 Jakub Jelinek <jakub@redhat.com>
1855
7d386d45
JJ
1856 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1857 width is non-NULL.
1858 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1859 don't SET_DECL_C_BIT_FIELD here.
1860
2a389958
JJ
1861 PR c/82340
1862 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1863 instead of trying to set just TREE_READONLY manually.
1864
ebc6a85e
TV
18652017-09-16 Tom de Vries <tom@codesourcery.com>
1866
1867 PR c/81875
1868 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1869 cond itself.
1870
bb75facd
JM
18712017-09-15 Joseph Myers <joseph@codesourcery.com>
1872
1873 PR c/82071
1874 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1875 for C11.
1876 (build_conditional_expr): For C11, generate result with excess
1877 precision when one argument is an integer and the other is of a
1878 type using excess precision.
1879
1d933576
BE
18802017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1881
1882 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1883
267bbb6f
MP
18842017-09-13 Marek Polacek <polacek@redhat.com>
1885
1886 PR c/82167
1887 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1888 than expr.original_type.
1889
6836632e
NS
18902017-09-12 Nathan Sidwell <nathan@acm.org>
1891
1892 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1893 resort_sorted_fields): Moved from c-family/c-common.c.
1894 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1895
e035be33
JM
18962017-09-01 Joseph Myers <joseph@codesourcery.com>
1897
1898 PR c/82071
1899 * c-typeck.c (build_atomic_assign): Handle argument with excess
1900 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1901 argument passed to build_binary_op and convert_for_assignment but
1902 not for call to c_fully_fold.
1903 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1904 Ensure build_binary_op is called with argument with original
1905 semantic type. Avoid calling c_fully_fold with an
1906 EXCESS_PRECISION_EXPR from build_binary_op.
1907
d2e05fcb
JJ
19082017-09-01 Jakub Jelinek <jakub@redhat.com>
1909
1910 PR c/81887
1911 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1912
b397965c
RS
19132017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1914 Alan Hayward <alan.hayward@arm.com>
1915 David Sherwood <david.sherwood@arm.com>
1916
1917 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1918 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1919 m1 and m2 to the signed equivalent of a fixed-point
1920 SCALAR_TYPE_MODE.
1921
14e18d71
DM
19222017-08-24 David Malcolm <dmalcolm@redhat.com>
1923
1924 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1925 than CAN_HAVE_LOCATION_P when determining whether to use the
1926 location_t value within "value".
1927
7f204c0f
DM
19282017-08-21 David Malcolm <dmalcolm@redhat.com>
1929
1930 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1931 rather than peeking the location of the first token.
1932 * c-tree.h (c_expr::get_location): New method.
1933
2f687306
DM
19342017-08-21 David Malcolm <dmalcolm@redhat.com>
1935
1936 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1937 to check_function_arguments.
1938
3e7b80d7
MP
19392017-08-18 Marek Polacek <polacek@redhat.com>
1940
1941 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1942 commentary.
1943
00aa1fa2
L
19442017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1945
1946 PR c/53037
1947 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1948 (check_bitfield_type_and_width): Don't allow bit-field with
1949 warn_if_not_aligned type.
1950
da67acb9
MS
19512017-08-14 Martin Sebor <msebor@redhat.com>
1952
1953 PR c/81117
1954 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1955
bb85aa74
MP
19562017-08-11 Marek Polacek <polacek@redhat.com>
1957
1958 PR c/81795
1959 * c-decl.c (pushtag): Only print inform if the warning was printed.
1960 (grokdeclarator): Likewise.
1961
32129a17
DM
19622017-08-10 David Malcolm <dmalcolm@redhat.com>
1963
1964 * c-parser.c (c_parser_error): Rename to...
1965 (c_parser_error_richloc): ...this, making static, and adding
1966 "richloc" parameter, passing it to the c_parse_error call,
1967 rather than calling c_parser_set_source_position_from_token.
1968 (c_parser_error): Reintroduce, reimplementing in terms of the
1969 above, converting return type from void to bool.
1970 (class token_pair): New class.
1971 (struct matching_paren_traits): New struct.
1972 (matching_parens): New typedef.
1973 (struct matching_brace_traits): New struct.
1974 (matching_braces): New typedef.
1975 (get_matching_symbol): New function.
1976 (c_parser_require): Add param MATCHING_LOCATION, using it to
1977 highlight matching "opening" tokens for missing "closing" tokens.
1978 (c_parser_skip_until_found): Likewise.
1979 (c_parser_static_assert_declaration_no_semi): Convert explicit
1980 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
1981 class matching_parens, so that the pertinent open parenthesis is
1982 highlighted when there are problems locating the close
1983 parenthesis.
1984 (c_parser_struct_or_union_specifier): Likewise.
1985 (c_parser_typeof_specifier): Likewise.
1986 (c_parser_alignas_specifier): Likewise.
1987 (c_parser_simple_asm_expr): Likewise.
1988 (c_parser_braced_init): Likewise, for matching_braces.
1989 (c_parser_paren_condition): Likewise, for matching_parens.
1990 (c_parser_switch_statement): Likewise.
1991 (c_parser_for_statement): Likewise.
1992 (c_parser_asm_statement): Likewise.
1993 (c_parser_asm_operands): Likewise.
1994 (c_parser_cast_expression): Likewise.
1995 (c_parser_sizeof_expression): Likewise.
1996 (c_parser_alignof_expression): Likewise.
1997 (c_parser_generic_selection): Likewise.
1998 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
1999 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2000 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2001 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2002 c_parser_skip_until_found call.
2003 (c_parser_objc_class_definition): Use class matching_parens as
2004 above.
2005 (c_parser_objc_method_decl): Likewise.
2006 (c_parser_objc_try_catch_finally_statement): Likewise.
2007 (c_parser_objc_synchronized_statement): Likewise.
2008 (c_parser_objc_at_property_declaration): Likewise.
2009 (c_parser_oacc_wait_list): Likewise.
2010 (c_parser_omp_var_list_parens): Likewise.
2011 (c_parser_omp_clause_collapse): Likewise.
2012 (c_parser_omp_clause_default): Likewise.
2013 (c_parser_omp_clause_if): Likewise.
2014 (c_parser_omp_clause_num_threads): Likewise.
2015 (c_parser_omp_clause_num_tasks): Likewise.
2016 (c_parser_omp_clause_grainsize): Likewise.
2017 (c_parser_omp_clause_priority): Likewise.
2018 (c_parser_omp_clause_hint): Likewise.
2019 (c_parser_omp_clause_defaultmap): Likewise.
2020 (c_parser_oacc_single_int_clause): Likewise.
2021 (c_parser_omp_clause_ordered): Likewise.
2022 (c_parser_omp_clause_reduction): Likewise.
2023 (c_parser_omp_clause_schedule): Likewise.
2024 (c_parser_omp_clause_num_teams): Likewise.
2025 (c_parser_omp_clause_thread_limit): Likewise.
2026 (c_parser_omp_clause_aligned): Likewise.
2027 (c_parser_omp_clause_linear): Likewise.
2028 (c_parser_omp_clause_safelen): Likewise.
2029 (c_parser_omp_clause_simdlen): Likewise.
2030 (c_parser_omp_clause_depend): Likewise.
2031 (c_parser_omp_clause_map): Likewise.
2032 (c_parser_omp_clause_device): Likewise.
2033 (c_parser_omp_clause_dist_schedule): Likewise.
2034 (c_parser_omp_clause_proc_bind): Likewise.
2035 (c_parser_omp_clause_uniform): Likewise.
2036 (c_parser_omp_for_loop): Likewise.
2037 (c_parser_cilk_clause_vectorlength): Likewise.
2038 (c_parser_cilk_clause_linear): Likewise.
2039 (c_parser_transaction_expression): Likewise.
2040 * c-parser.h (c_parser_require): Add param matching_location with
2041 default UNKNOWN_LOCATION.
2042 (c_parser_error): Convert return type from void to bool.
2043 (c_parser_skip_until_found): Add param matching_location with
2044 default UNKNOWN_LOCATION.
2045
30af3a2b
MP
20462017-08-09 Marek Polacek <polacek@redhat.com>
2047
2048 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2049 * c-tree.h (build_external_ref): Update declaration.
2050 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2051 (build_external_ref): Change the type of a parameter to bool.
2052 (parser_build_binary_op): Use true/false instead of 1/0.
2053 (pointer_diff): Likewise.
2054 (build_modify_expr): Likewise.
2055 (set_designator): Change the type of a parameter to bool.
2056 (set_init_index): Use true/false instead of 1/0.
2057 (set_init_label): Likewise.
2058 (output_init_element): Change the type of a parameter to bool.
2059 (output_pending_init_elements): Use true/false instead of 1/0.
2060 (process_init_element): Likewise.
2061 (build_binary_op): Change the type of a parameter to bool.
2062
296c53ac
MP
20632017-08-09 Marek Polacek <polacek@redhat.com>
2064
2065 PR c/81233
2066 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2067 Call emit_diagnostic_valist instead of pedwarn.
2068 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2069 Print the relevant types in diagnostics.
2070
a32c8316
MP
20712017-08-09 Marek Polacek <polacek@redhat.com>
2072
2073 PR c/81417
2074 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2075 build_conditional_expr.
a32c8316
MP
2076 * c-parser.c (c_parser_conditional_expression): Create locations for
2077 EXP1 and EXP2 from their source ranges. Pass the locations down to
2078 build_conditional_expr.
2079 * c-tree.h (build_conditional_expr): Update declaration.
2080 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2081 For -Wsign-compare, also print the types.
2082
314e6352
ML
20832017-08-08 Martin Liska <mliska@suse.cz>
2084
2085 * c-convert.c: Include header files.
2086 * c-typeck.c: Likewise.
2087
577eec56
ML
20882017-08-07 Martin Liska <mliska@suse.cz>
2089
2090 * c-parser.c (c_parser_attributes): Canonicalize name of an
2091 attribute.
2092
f7b6353a
MP
20932017-08-02 Marek Polacek <polacek@redhat.com>
2094
2095 PR c/81289
2096 * c-parser.c (c_parser_unary_expression): Use set_error.
2097
8a6eab34
MP
2098 PR c/81448
2099 PR c/81306
2100 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2101 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2102
ab20d992 21032017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2104 Martin Liska <mliska@suse.cz>
2105
2106 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2107 statement.
7fef86d3 2108
f34ebeb2
ML
21092017-07-31 Martin Liska <mliska@suse.cz>
2110
2111 PR sanitize/81530
2112 * c-convert.c (convert): Guard condition with flag_sanitize_p
2113 also with current_function_decl non-null equality.
2114 * c-decl.c (grokdeclarator): Likewise.
2115 * c-typeck.c (build_binary_op): Likewise.
2116
8595f67b
MP
21172017-07-25 Marek Polacek <polacek@redhat.com>
2118
2119 * c-decl.c (grokfield): Remove local variable.
2120
d49718d6
MP
21212017-07-25 Marek Polacek <polacek@redhat.com>
2122
2123 PR c/81364
2124 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2125 macro expansion if the body is in { }.
2126 (c_parser_while_statement): Likewise.
2127 (c_parser_for_statement): Likewise.
2128
ff22eb12
NS
21292017-07-18 Nathan Sidwell <nathan@acm.org>
2130
2131 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2132
eea77d1f
DM
21332017-07-14 David Malcolm <dmalcolm@redhat.com>
2134
2135 * c-decl.c (implicitly_declare): When suggesting a missing
2136 #include, provide a fix-it hint.
2137
b6f43128
DM
21382017-07-06 David Malcolm <dmalcolm@redhat.com>
2139
2140 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2141 and call that instead.
2142 * c-tree.h (selftest::run_c_tests): New decl.
2143
3e2becc4
MP
21442017-06-26 Marek Polacek <polacek@redhat.com>
2145
2146 PR c/80116
2147 * c-parser.c (c_parser_if_body): Set the location of the
2148 body of the conditional after parsing all the labels. Call
2149 warn_for_multistatement_macros.
2150 (c_parser_else_body): Likewise.
2151 (c_parser_switch_statement): Likewise.
2152 (c_parser_while_statement): Likewise.
2153 (c_parser_for_statement): Likewise.
2154 (c_parser_statement): Add a default argument. Save the location
2155 after labels have been parsed.
2156 (c_parser_c99_block_statement): Likewise.
2157
343ae898
RB
21582017-06-19 Richard Biener <rguenther@suse.de>
2159
2160 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2161 negated _Literals to parse _Literal (int) -1.
2162
45b2222a
ML
21632017-06-13 Martin Liska <mliska@suse.cz>
2164
2165 PR sanitize/78204
2166 * c-convert.c (convert): Use sanitize_flags_p.
2167 * c-decl.c (grokdeclarator): Likewise.
2168 * c-typeck.c (convert_for_assignment): Likewise.
2169 (c_finish_return): Likewise.
2170 (build_binary_op): Likewise.
2171
8ab7005b
JJ
21722017-06-08 Jakub Jelinek <jakub@redhat.com>
2173
2174 PR c/81006
2175 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2176 to sizetype before size_binop.
2177
363dc72c
JJ
21782017-06-07 Jakub Jelinek <jakub@redhat.com>
2179
2180 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2181 of TDI_generic.
2182
dc949728
MP
21832017-06-06 Marek Polacek <polacek@redhat.com>
2184
2185 PR c/79983
2186 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2187 ref.
2188 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2189
40ffd95f
BE
21902017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2191
2192 * c-parser.c (c_parser_binary_expression): Implement the
2193 -Wsizeof_pointer_div warning.
2194 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2195 from a parenthesized expression.
2196 (c_parser_expr_list): Use c_last_sizeof_loc.
2197 * c-tree.h (c_last_sizeof_loc): New external.
2198 * c-typeck.c (c_last_sizeof_loc): New variable.
2199 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2200
9fc5e7a4
MM
22012017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2202
2203 PR testsuite/80580
2204 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2205
f012c8ef
DM
22062017-05-30 David Malcolm <dmalcolm@redhat.com>
2207
2208 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2209 parameters.
2210
3cd211af
MS
22112017-05-24 Martin Sebor <msebor@redhat.com>
2212
2213 PR c/80731
2214 * c-fold.c (c_fully_fold_internal): Adjust.
2215 * c-typeck.c (parser_build_unary_op): Adjust.
2216
fd71a9a2
TS
22172017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2218
2219 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2220 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2221 "VECTOR_LENGTH".
2222
92fa0f9e
MP
22232017-05-23 Marek Polacek <polacek@redhat.com>
2224
2225 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2226 quotes.
2227
d11c168a
JJ
22282017-05-22 Jakub Jelinek <jakub@redhat.com>
2229
2230 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2231 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2232 it returned invariant. Call tree_invariant_p unconditionally
2233 afterwards to decide whether to return expr or op0.
2234
58aca9d9
NS
22352017-05-22 Nathan Sidwell <nathan@acm.org>
2236
2237 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2238
7fd549d2
TS
22392017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2240
2241 * c-parser.c (c_parser_omp_clause_default): Handle
2242 "OMP_CLAUSE_DEFAULT_PRESENT".
2243
6ecd2339
BE
22442017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2245
2246 * config-lang.in (gtfiles): Add c-family/c-format.c.
2247
8a57ecff
NS
22482017-05-18 Nathan Sidwell <nathan@acm.org>
2249
2250 * c-decl.c (pushdecl_top_level): Delete unused function.
2251
6574d78e
MP
22522017-05-18 Marek Polacek <polacek@redhat.com>
2253
2254 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2255 (check_earlier_gotos): Likewise.
2256 (define_label): Likewise.
2257 (pending_xref_error): Likewise.
2258 (smallest_type_quals_location): Likewise.
2259 (grokdeclarator): Likewise.
2260 (grokparms): Likewise.
2261 (identifier_global_value): Likewise.
2262 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2263 (find_init_member): Likewise.
2264
e3455240
MP
22652017-05-18 Marek Polacek <polacek@redhat.com>
2266
2267 * c-decl.c (start_decl): Use false/true instead of 0/1.
2268 (grokdeclarator): Likewise.
2269 (finish_struct): Likewise.
2270 (start_function): Change the return type to bool. Use false/true
2271 instead of 0/1.
2272 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2273 * c-tree.h (start_function): Update.
2274 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2275 (set_designator): Change the return type to bool. Use false/true
2276 instead of 0/1.
2277
3fa8871b
MP
22782017-05-17 Marek Polacek <polacek@redhat.com>
2279
2280 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2281 * c-typeck.c: Likewise.
2282
142473df
MP
22832017-05-17 Marek Polacek <polacek@redhat.com>
2284
2285 PR sanitizer/80659
2286 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2287 DECL_IGNORED_P even for non-static compound literals.
2288
1a817418
ML
22892017-05-17 Martin Liska <mliska@suse.cz>
2290
2291 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2292 use it instead of int type.
2293
b2fa0a8b
MP
22942017-05-17 Marek Polacek <polacek@redhat.com>
2295
2296 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2297 call c_fully_fold.
2298 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2299 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2300 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2301 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2302 save_expr.
2303 (c_parser_conditional_expression): Likewise.
2304 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2305 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2306 (process_init_element): Likewise.
2307 (build_binary_op): Likewise.
2308 (handle_omp_array_sections_1): Likewise.
2309
1e47f02b
TS
23102017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2311
2312 * c-parser.c (c_parser_omp_clause_num_gangs)
2313 (c_parser_omp_clause_num_workers)
2314 (c_parser_omp_clause_vector_length): Merge functions into...
2315 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2316 all users.
2317
c24e924f
NS
23182017-05-11 Nathan Sidwell <nathan@acm.org>
2319
2320 * gimple-parser.c: Don't #include tree-dump.h.
2321
c587104e
MM
23222017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2323
2324 PR testsuite/80580
2325 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2326
67ac9a9d
MM
23272017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2328
2329 PR testsuite/80580
2330 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2331 incorrect __MEM syntax.
2332
ac4eb40f
MM
23332017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2334
2335 PR testsuite/80580
2336 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2337 type of unary '*'.
2338
641da50a
NS
23392017-05-09 Nathan Sidwell <nathan@acm.org>
2340
2341 * c-tree.h (pushdecl): Declare.
2342
56d35585
DM
23432017-05-05 David Malcolm <dmalcolm@redhat.com>
2344
2345 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2346 with diagnostic_report_diagnostic.
2347 * c-errors.c (pedwarn_c99): Likewise.
2348 (pedwarn_c90): Likewise.
2349
815d9cc6
XR
23502017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2351
92a285c1 2352 PR c++/80038
815d9cc6
XR
2353 * c-gimplify.c (c_gimplify_expr): Remove calls to
2354 cilk_gimplifY_call_params_in_spawned_fn.
2355
1c4ea66f
DM
23562017-04-25 David Malcolm <dmalcolm@redhat.com>
2357
2358 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2359 hint for removing extra semicolon.
2360
666f7903
JJ
23612017-04-21 Jakub Jelinek <jakub@redhat.com>
2362
2363 PR c/80468
2364 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2365 enabled, set specs->type to integer_type_node.
2366
5764ee3c
JW
23672017-04-03 Jonathan Wakely <jwakely@redhat.com>
2368
2369 * c-array-notation.c: Fix typo in comment.
2370
10fa8dfb
MP
23712017-03-29 Marek Polacek <polacek@redhat.com>
2372
2373 PR c/79730
2374 * c-decl.c (finish_decl): Check VAR_P.
2375
a9e4a1a5
JJ
23762017-03-27 Jakub Jelinek <jakub@redhat.com>
2377
2378 PR middle-end/80162
2379 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2380 * c-typeck.c (c_mark_addressable): Likewise. Look through
2381 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2382 to ARRAY_TYPE.
2383 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2384
ee3ff394
MP
23852017-03-23 Marek Polacek <polacek@redhat.com>
2386
2387 * c-tree.h: Remove a C_RID_YYCODE reference.
2388
4d1b8e70
JJ
23892017-03-21 Jakub Jelinek <jakub@redhat.com>
2390
2391 PR c/80097
2392 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2393 optional COMPOUND_EXPR with ubsan instrumentation.
2394
31dc71a8
MP
23952017-03-17 Marek Polacek <polacek@redhat.com>
2396
2397 * c-parser.c: Add C11 references.
2398
d579c385
MP
23992017-03-15 Marek Polacek <polacek@redhat.com>
2400
2401 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2402
85059a38
MP
24032017-03-11 Marek Polacek <polacek@redhat.com>
2404
2405 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2406
2f6f187a
DM
24072017-03-10 David Malcolm <dmalcolm@redhat.com>
2408
2409 PR translation/79848
2410 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2411 "%qs".
2412 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2413
36618428
MP
24142017-03-09 Marek Polacek <polacek@redhat.com>
2415
2416 PR sanitizer/79757
2417 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2418 parameter declarations with initializers.
2419
01e5af5a
JJ
24202017-03-09 Jakub Jelinek <jakub@redhat.com>
2421
2422 PR c/79969
2423 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2424 TYPE_STUB_DECL.
2425
a71dbc63
JJ
24262017-03-07 Jakub Jelinek <jakub@redhat.com>
2427
2428 PR c/79834
2429 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2430 for "may only be used in compound statements" diagnostics, change it
2431 such that the same translatable string is used for all pragmas. For
2432 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2433 diagnostics.
2434 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2435 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2436 "may only be used in compound statements" diagnostics, such that the
2437 same translatable string is used for all pragmas.
2438
1ff4bae6
MP
24392017-03-04 Marek Polacek <polacek@redhat.com>
2440
2441 PR c/79847
2442 * c-decl.c (implicit_decl_warning): Add missing space.
2443
7f5a7d78
MP
24442017-03-03 Marek Polacek <polacek@redhat.com>
2445
2446 PR c/79758
2447 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2448 current_function_prototype_arg_types is error_mark_node. Fix
2449 formatting. Use TREE_VALUE instead of TREE_TYPE.
2450
883c8f06
JJ
24512017-03-03 Jakub Jelinek <jakub@redhat.com>
2452
79c9b7a8
JJ
2453 PR c/79837
2454 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2455 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2456 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2457 diagnostics.
2458
883c8f06
JJ
2459 PR c/79836
2460 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2461 instead of %<_Generic>.
2462 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2463 (c_parser_omp_target_exit_data): Use %<release%> instead of
2464 %<release>.
2465
324ff1a0
JJ
24662017-02-28 Jakub Jelinek <jakub@redhat.com>
2467
2468 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2469 instead of just cond ? "..." : "...".
2470 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2471 for "enter"/"exit" keyword.
2472 (c_finish_oacc_routine): Don't use %s to supply portions of the
2473 message.
2474
4227c9ad
JJ
24752017-02-24 Jakub Jelinek <jakub@redhat.com>
2476
2477 PR c++/79588
2478 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2479 handle -Wrestrict here.
2480 * c-typeck.c (build_function_call_vec): Adjust
2481 check_function_arguments caller.
2482
5d972e66
RB
24832017-02-23 Richard Biener <rguenther@suse.de>
2484
2485 PR c/79684
2486 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2487 to initialize c_exprs to return.
2488 (c_parser_gimple_binary_expression): Likewise.
2489 (c_parser_gimple_unary_expression): Likewise.
2490 (c_parser_gimple_postfix_expression): Likewise.
2491
61ac5ebe
MP
24922017-02-22 Marek Polacek <polacek@redhat.com>
2493
2494 PR c/79662
2495 * c-typeck.c (convert_arguments): Handle error_mark_node.
2496
41d1b0b1
PK
24972017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2498
2499 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2500 value of c_parser_parse_ssa_name against error_mark_node and emit
2501 error if ssa name is anonymous and written as default definition.
2502
eab1f169
PK
25032017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2504
2505 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2506 FMA_EXPR.
2507
bcac0b4d
JJ
25082017-02-16 Jakub Jelinek <jakub@redhat.com>
2509
2510 PR c++/79512
2511 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2512 ignore #pragma omp target even when not followed by identifier.
2513
1be33173
PK
25142017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2515
2516 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2517 (c_parser_gimple_unary_expression): Likewise.
2518
aa326bfb
JJ
25192017-02-13 Jakub Jelinek <jakub@redhat.com>
2520
2521 * c-parser.c (c_parser_oacc_declare): Add missing space in
2522 diagnostics.
2523
8a398bc5
PK
25242017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2525
2526 PR c/79478
2527 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2528 set_c_expr_source_range when parsing ssa-name.
2529
3dcde5ef 25302017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2531 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2532
2533 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2534 building IL when arguments are error_mark_node.
2535 (c_parser_gimple_unary_expression): Likewise.
2536 (c_parser_gimple_if_stmt): Likewise.
2537 (c_parser_gimple_switch_stmt): Likewise.
2538 (c_parser_gimple_return_stmt): Likewise.
2539 (c_parser_parse_ssa_name): When name lookup fails do not build
2540 an SSA name. Use undeclared rather than not declared in error
2541 reporting.
2542
192b048b
MP
25432017-02-09 Marek Polacek <polacek@redhat.com>
2544
2545 PR c/79428
2546 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2547 instead of c_parser_skip_until_found.
2548
56f71478
JJ
25492017-02-09 Jakub Jelinek <jakub@redhat.com>
2550
2551 PR c/79431
2552 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2553 symtab_node::get on automatic variables.
2554
02889d23
CLT
25552016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2556 Chung-Lin Tang <cltang@codesourcery.com>
2557
2558 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2559 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2560 semantic checking.
2561 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2562
7af4b20d
RB
25632017-02-07 Richard Biener <rguenther@suse.de>
2564
2565 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2566 (c_parser_gimple_postfix_expression_after_primary):
2567 Do not use c_build_function_call_vec to avoid folding and promotion.
2568 Simplify.
2569
e5e391d6
MO
25702017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2571
2572 PR lto/79061
2573 * c-decl.c (pop_scope): Pass main_input_filename to
2574 build_translation_unit_decl.
2575
c2e84327
DM
25762017-01-24 David Malcolm <dmalcolm@redhat.com>
2577
2578 * c-parser.c: Include "read-rtl-function.h" and
2579 "run-rtl-passes.h".
2580 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2581 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2582 production. Update for renaming of field "gimple_pass" to
2583 "gimple_or_rtl_pass". If __RTL was seen, call
2584 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2585 to an auto_timevar, to cope with early exit.
2586 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2587 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2588 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2589 Handle RID_RTL.
2590 (c_parser_parse_rtl_body): New function.
2591 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2592 (struct c_declspecs): Rename field "gimple_pass" to
2593 "gimple_or_rtl_pass". Add field "rtl_p".
2594 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2595 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2596 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2597 (c_parser_gimple_or_rtl_pass_list): ...this.
2598
2ebd93e1
MP
25992017-01-20 Marek Polacek <polacek@redhat.com>
2600
2601 PR c/64279
2602 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2603
b1c95bb5
RB
26042017-01-13 Richard Biener <rguenther@suse.de>
2605
2606 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2607 nops.
2608
25329913
RB
26092017-01-13 Richard Biener <rguenther@suse.de>
2610
2611 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2612 _Literal ( type-name ) number.
2613
6bb4ea5c
RB
26142017-01-12 Richard Biener <rguenther@suse.de>
2615
2616 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2617 __MEM.
2618
6b5b4e9c
JJ
26192017-01-11 Jakub Jelinek <jakub@redhat.com>
2620
2621 PR c++/72813
2622 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2623 PCH file.
2624
e3252775
RB
26252017-01-11 Richard Biener <rguenther@suse.de>
2626
2627 PR bootstrap/79052
2628 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2629 returns on parse errors.
2630
a9342885
MP
26312017-01-04 Marek Polacek <polacek@redhat.com>
2632
2633 PR c++/64767
2634 * c-parser.c (c_parser_postfix_expression): Mark zero character
2635 constants by setting original_type in c_expr.
2636 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2637 with a zero character constant.
2638 (char_type_p): New function.
2639
5dd9a9d0
DM
26402017-01-04 David Malcolm <dmalcolm@redhat.com>
2641
2642 * c-parser.c (c_parser_declaration_or_fndef): Create a
2643 rich_location at init_loc and parse it to start_init.
2644 (last_init_list_comma): New global.
2645 (c_parser_braced_init): Update last_init_list_comma when parsing
2646 commas. Pass it to pop_init_level. Pass location of closing
2647 brace to pop_init_level.
2648 (c_parser_postfix_expression_after_paren_type): Create a
2649 rich_location at type_loc and parse it to start_init.
2650 (c_parser_omp_declare_reduction): Likewise for loc.
2651 * c-tree.h (start_init): Add rich_location * param.
2652 (pop_init_level): Add location_t param.
2653 * c-typeck.c (struct initializer_stack): Add field
2654 "missing_brace_richloc".
2655 (start_init): Add richloc param, use it to initialize
2656 the stack node's missing_brace_richloc.
2657 (last_init_list_comma): New decl.
2658 (finish_implicit_inits): Pass last_init_list_comma to
2659 pop_init_level.
2660 (push_init_level): When finding missing open braces, add fix-it
2661 hints to the richloc.
2662 (pop_init_level): Add "insert_before" param and pass it
2663 when calling pop_init_level. Add fixits about missing
2664 close braces to any richloc. Use the richloc for the
2665 -Wmissing-braces warning.
2666 (set_designator): Pass last_init_list_comma to pop_init_level.
2667 (process_init_element): Likewise.
2668
cbe34bb5
JJ
26692017-01-01 Jakub Jelinek <jakub@redhat.com>
2670
2671 Update copyright years.
2672
d17680f3
JJ
26732016-12-21 Jakub Jelinek <jakub@redhat.com>
2674
0dba7960
JJ
2675 PR bootstrap/78817
2676 * c-typeck.c (build_function_call_vec): If check_function_arguments
2677 returns true, set TREE_NO_WARNING on CALL_EXPR.
2678
d17680f3
JJ
2679 PR c/77767
2680 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2681 to *expr instead of overwriting it.
2682
aa90531e
RB
26832016-12-20 Richard Biener <rguenther@suse.de>
2684
2685 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2686 error recovery.
2687 (c_parser_gimple_statement): Only build assigns for non-error
2688 stmts.
2689 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2690
629b3d75
MJ
26912016-12-14 Martin Jambor <mjambor@suse.cz>
2692
2693 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2694 omp-low.h.
2695 (c_finish_oacc_routine): Adjusted call to
2696 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2697 to use their new names.
2698 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2699 use its new name.
2700 (c_parser_oacc_update): Likewise.
2701 (c_parser_omp_simd): Likewise.
2702 (c_parser_omp_target_update): Likewise.
2703 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2704 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2705 name.
2706 (c_finish_omp_cancellation_point): Likewise.
2707 * gimple-parser.c: Do not include omp-low.h
2708
c5af52eb
CP
27092016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2710 James Norris <jnorris@codesourcery.com>
2711
2712 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2713 EXIT_DATA,WAIT} are not used in compound statements.
2714 (c_parser_oacc_enter_exit_data): Update diagnostics.
2715
48330c93
BE
27162016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2717
2718 PR c++/71973
2719 * c-decl.c (diagnose_mismatched_decls): Use
2720 OPT_Wbuiltin_declaration_mismatch here too.
2721
899ca90e 27222016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2723 Alan Hayward <alan.hayward@arm.com>
2724 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2725
2726 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2727 (make_label, finish_struct): Likewise.
2728
1ee62b92 27292016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2730 Richard Biener <rguenther@suse.de>
22b15758 2731
8e745a17
JJ
2732 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2733 * config-lang.in (gtfiles): Add c/c-parser.h.
2734 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2735 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2736 * c-parser.c (enum c_id_kind, struct c_token,
2737 c_parser_next_token_is, c_parser_next_token_is_not,
2738 c_parser_next_token_is_keyword,
2739 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2740 Split out to ...
2741 * c-parser.h: ... new header.
2742 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2743 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2744 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2745 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2746 c_parser_error, c_parser_require, c_parser_skip_until_found,
2747 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2748 c_parser_type_name): Export.
2749 (c_parser_tokens_buf): New function.
2750 (c_parser_error): Likewise.
2751 (c_parser_set_error): Likewise.
2752 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2753 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2754 via c_parser_parse_gimple_body.
8e745a17
JJ
2755 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2756 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2757 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2758 c_parser_error, c_parser_require, c_parser_skip_until_found,
2759 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2760 c_parser_type_name): Declare.
1ee62b92
PG
2761 (struct c_parser): Declare forward.
2762 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2763 (c_parser_error): Likewise.
2764 (c_parser_set_error): Likewise.
2765 * gimple-parser.c: New file.
2766 * gimple-parser.h: Likewise.
1ee62b92 2767
22b15758
UB
27682016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2769
2770 PR c/35503
2771 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2772 warn_for_restrict.
2773
84ff4775
LCW
27742016-09-11 Le-Chun Wu <lcwu@google.com>
2775 Mark Wielaard <mjw@redhat.com>
2776
2777 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2778 to the given -Wshadow= variant.
2779
4d0cdd0c
TP
27802016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2781
2782 * c-typeck.c: Include memmodel.h.
2783
1202f33e
JJ
27842016-10-13 Jakub Jelinek <jakub@redhat.com>
2785
2786 PR target/77957
2787 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2788 instead of lhd_return_null_tree_v.
2789
8a14afd0
BS
27902016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2791
2792 PR c++/69733
2793 * c-decl.c (smallest_type_quals_location): New static function.
2794 (grokdeclarator): Try to find the correct location for an ignored
2795 qualifier.
2796
81fea426
MP
27972016-09-26 Marek Polacek <polacek@redhat.com>
2798
2799 PR c/7652
2800 * c-decl.c (pop_scope): Add gcc_fallthrough.
2801
28022016-09-26 Marek Polacek <polacek@redhat.com>
2803
2804 PR c/7652
2805 * c-parser.c (struct c_token): Add flags field.
2806 (c_lex_one_token): Pass it to c_lex_with_flags.
2807 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2808 into IFN_FALLTHROUGH.
2809 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2810 attribute fallthrough after a case label or default label.
2811 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2812
9a2300e9
MP
28132016-09-24 Marek Polacek <polacek@redhat.com>
2814
2815 PR c/77490
2816 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2817 have boolean value. Warn about ++/-- on booleans.
2818
7de76362
JJ
28192016-09-23 Jakub Jelinek <jakub@redhat.com>
2820
2821 * c-parser.c (incomplete_record_decls): Remove unnecessary
2822 = vNULL initialization of file scope vec.
2823
5b73d2ab
MP
28242016-09-16 Marek Polacek <polacek@redhat.com>
2825
2826 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2827
e51fbec3
MP
28282016-09-14 Marek Polacek <polacek@redhat.com>
2829
2830 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2831 (fix_array_notation_expr): Likewise.
2832 * c-decl.c (finish_decl): Likewise.
2833 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2834 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2835 (function_to_pointer_conversion): Use false instead of 0.
2836 (convert_lvalue_to_rvalue): Likewise.
2837 (parser_build_unary_op): Likewise.
2838 (build_atomic_assign): Likewise.
2839 (build_unary_op): Change nonconvert parameter type to bool, use
2840 true/false instead of 1/0.
2841 (build_binary_op): Use true instead of 1.
2842
254830ba
DM
28432016-09-13 David Malcolm <dmalcolm@redhat.com>
2844
2845 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2846 of add_fixit_insert to add_fixit_insert_before.
2847
4c13ba17
MP
28482016-09-13 Marek Polacek <polacek@redhat.com>
2849
2850 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2851 it.
2852
54dcdb88
BE
28532016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2854
2855 PR c++/77496
2856 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2857 COMPOUND_EXPR to warn_for_omitted_condop.
2858
e5106e27
DM
28592016-09-07 David Malcolm <dmalcolm@redhat.com>
2860
2861 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2862 c_get_substring_location for this new langhook.
2863
9dc5773f
JJ
28642016-09-02 Jakub Jelinek <jakub@redhat.com>
2865
2866 PR c/65467
2867 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2868 flag_openmp.
2869 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2870 instead of mark_exp_read on low_bound/length expression.
2871 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2872 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2873 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2874 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2875 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2876 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2877 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2878 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2879 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2880 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2881 instead of mark_expr_read.
2882 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2883 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2884 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2885 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2886 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2887 array section bases outside of depend clause, for depend clause
2888 use convert_lvalue_to_rvalue on the base.
2889 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2890 linear, aligned, map, to and from clauses.
2891 (c_omp_clause_copy_ctor): New function.
2892
295844f6
MP
28932016-09-01 Marek Polacek <polacek@redhat.com>
2894
2895 PR c/7652
2896 * c-typeck.c (composite_type): Add FALLTHRU comment.
2897
089af25c
DM
28982016-08-31 David Malcolm <dmalcolm@redhat.com>
2899
2900 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2901 to the insertion fixits for "struct", "union", and "enum".
2902
f9087798
DM
29032016-08-30 David Malcolm <dmalcolm@redhat.com>
2904
2905 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2906 rather than add_fixit_misspelled_id.
2907 (undeclared_variable): Likewise.
2908 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2909 now-redundant "here" params from add_fixit_insert method calls.
2910 (c_parser_parameter_declaration): Likewise.
2911 * c-typeck.c (build_component_ref): Remove now-redundant range
2912 param from add_fixit_replace method calls.
2913
ebef225f
MP
29142016-08-25 Marek Polacek <polacek@redhat.com>
2915
2916 * c-typeck.c (parser_build_binary_op): Pass LHS to
2917 warn_logical_not_parentheses.
2918
fe377a48
MP
29192016-08-25 Marek Polacek <polacek@redhat.com>
2920
2921 PR c/77323
2922 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2923 or _FloatN or _FloatNx is not supported.
2924 (finish_declspecs): Set type to integer_type_node when _FloatN or
2925 _FloatNx is not supported.
2926
c65699ef
JM
29272016-08-19 Joseph Myers <joseph@codesourcery.com>
2928
2929 PR c/32187
2930 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2931 (struct c_declspecs): Add field floatn_nx_idx.
2932 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2933 and _FloatNx type specifiers.
2934 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2935 (c_parser_declspecs, c_parser_attribute_any_word)
2936 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2937 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2938 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2939 narrower than double.
2940
2f1364c2
JJ
29412016-08-12 Jakub Jelinek <jakub@redhat.com>
2942 Martin Liska <mliska@suse.cz>
2943
2944 PR c/67410
2945 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2946 % to determine val element to change. Assert that
2947 wchar_bytes * charwidth fits into val array.
2948
191816a3
MP
29492016-08-12 Marek Polacek <polacek@redhat.com>
2950
2951 PR c/7652
2952 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2953 (c_parser_postfix_expression): Likewise.
2954 * c-typeck.c (build_unary_op): Adjust fall through comment.
2955 (c_mark_addressable): Likewise.
2956
b95a64bb
JJ
29572016-08-11 Jakub Jelinek <jakub@redhat.com>
2958
2959 PR c/72816
2960 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2961 array member through typedef, for orig_qual_indirect == 0 clear
2962 orig_qual_type.
2963
895aa8e1
DM
29642016-08-08 David Malcolm <dmalcolm@redhat.com>
2965
2966 PR c/64955
2967 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2968 this up to selftest::run_c_tests.
2969 (selftest::run_c_tests): New function.
2970
0b212d8c
TS
29712016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2972
ae9281fc
TS
2973 * c-parser.c (struct oacc_routine_data): Add error_seen and
2974 fndecl_seen members.
2975 (c_finish_oacc_routine): Use these.
2976 (c_parser_declaration_or_fndef): Adjust.
2977 (c_parser_oacc_routine): Likewise. Support more C language
2978 constructs, and improve diagnostics. Move pragma context
2979 checking...
2980 (c_parser_pragma): ... here.
2981
0b212d8c
TS
2982 * c-parser.c (struct oacc_routine_data): New.
2983 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
2984 Simplify code.
2985 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
2986 declare target" attribute.
2987
76e2c821
JB
29882016-08-01 Jan Beulich <jbeulich@suse.com>
2989
2990 * c-fold.c (c_fully_fold_internal): Also emit shift count
2991 warnings for vector types.
2992 * c-typeck.c (build_binary_op): Likewise.
2993
f618a472
MP
29942016-07-29 Marek Polacek <polacek@redhat.com>
2995
2996 PR c/71742
2997 * c-decl.c (finish_struct): Rephrase an error message.
2998
efd0786f
MP
2999 PR c/71853
3000 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3001 to error node for invalid code.
3002
e00dceaf
MP
3003 PR c/71573
3004 * c-decl.c (implicitly_declare): Return decl early not only for
3005 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3006
673a107a
JJ
30072016-07-29 Jakub Jelinek <jakub@redhat.com>
3008
3009 PR c/71969
3010 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3011 on GNU extern inline functions.
3012
a5b5c8b6
MP
30132016-07-29 Marek Polacek <polacek@redhat.com>
3014
3015 PR c/71583
3016 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3017 check expr.value.
3018
e3fe09c1
UB
30192016-07-22 Uros Bizjak <ubizjak@gmail.com>
3020
3021 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3022
7c8f7eaa
DM
30232016-07-20 David Malcolm <dmalcolm@redhat.com>
3024
3025 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3026 spellcheck-tree.h
3027 (best_macro_match): Likewise, converting from a typedef to a
3028 subclass.
3029 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3030 (lookup_name_fuzzy): Update for change of best_macro_match to a
3031 subclass with a ctor that calls cpp_forall_identifiers.
3032
de6a69ee
DM
30332016-07-20 David Malcolm <dmalcolm@redhat.com>
3034
3035 * c-decl.c (implicit_decl_warning): Update for conversion of
3036 return type of lookup_name_fuzzy to const char *.
3037 (undeclared_variable): Likewise.
3038 (lookup_name_fuzzy): Convert return type from tree to
3039 const char *.
3040 * c-parser.c (c_parser_declaration_or_fndef): Update for
3041 conversion of return type of lookup_name_fuzzy to const char *.
3042 (c_parser_parameter_declaration): Likewise.
3043
b1c9c068
CP
30442016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3045
3046 * c-parser.c (c_parser_oacc_declare): Don't scan for
3047 GOMP_MAP_POINTER.
3048 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3049 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3050 zero-length subarrays.
3051
ddbbcb19
JJ
30522016-07-15 Jakub Jelinek <jakub@redhat.com>
3053
3054 PR c/71858
3055 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3056 instead of FUZZY_LOOKUP_NAME.
3057 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3058 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3059
dd36b877
JJ
30602016-07-14 Jakub Jelinek <jakub@redhat.com>
3061
3062 PR c/71858
3063 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3064
8c681247
TS
30652016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3066
3067 * c-parser.c (c_parser_generic_selection): Make type of variable
3068 auto_vec.
3069 (c_parser_omp_declare_simd): Likewise.
3070
bf4fa671
TS
30712016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3072
3073 * c-decl.c (struct c_struct_parse_info): Change member types
3074 from vec to auto_vec.
3075 (start_struct): Adjust.
3076 (finish_struct): Likewise.
3077
557e8c49
JJ
30782016-07-02 Jakub Jelinek <jakub@redhat.com>
3079
3080 PR c/71719
3081 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3082
54d19c3b
TS
30832016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3084
3085 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3086 Move pragma context checking into...
3087 (c_parser_omp_cancellation_point): ... here, and improve
3088 diagnostic messages.
3089 * c-typeck.c (c_finish_omp_cancel)
3090 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3091
152ef731
JJ
30922016-06-29 Jakub Jelinek <jakub@redhat.com>
3093
3094 PR c/71685
3095 * c-typeck.c (c_build_qualified_type): Don't clear
3096 C_TYPE_INCOMPLETE_VARS for the main variant.
3097
30982016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3099
3100 PR c/71552
3101 * c-typeck.c (output_init_element): Diagnose incompatible types
3102 before non-constant initializers.
3103
e9ac1f86
JJ
31042016-06-28 Jakub Jelinek <jakub@redhat.com>
3105
3106 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3107
277d7ee0
AK
31082016-06-23 Andi Kleen <ak@linux.intel.com>
3109
3110 * Make-lang.in: Add support for autofdo.
3111
1a4f11c8
DM
31122016-06-22 David Malcolm <dmalcolm@redhat.com>
3113
3114 PR c/70339
3115 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3116 (implicit_decl_warning): When issuing warnings for implicit
3117 declarations, attempt to provide a suggestion via
3118 lookup_name_fuzzy.
3119 (undeclared_variable): Likewise when issuing errors.
3120 (lookup_name_in_scope): Likewise.
3121 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3122 (best_macro_match): New typedef.
3123 (find_closest_macro_cpp_cb): New function.
3124 (lookup_name_fuzzy): New function.
3125 * c-parser.c: Include gcc-rich-location.h.
3126 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3127 (c_keyword_starts_typename): ...this new function.
3128 (c_parser_declaration_or_fndef): When issuing errors about
3129 missing "struct" etc, add a fixit. For other kinds of errors,
3130 attempt to provide a suggestion via lookup_name_fuzzy.
3131 (c_parser_parms_declarator): When looking ahead to detect typos in
3132 type names, also reject CPP_KEYWORD.
3133 (c_parser_parameter_declaration): When issuing errors about
3134 unknown type names, attempt to provide a suggestion via
3135 lookup_name_fuzzy.
3136 * c-tree.h (c_keyword_starts_typename): New prototype.
3137
5a578671
JM
31382016-06-20 Joseph Myers <joseph@codesourcery.com>
3139
3140 PR c/71601
3141 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3142 c_common_type returns error_mark_node.
3143
3f8257db 31442016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3145
3146 PR c/69507
3147 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3148 __alignof__ (expression).
3149
6a3f203c
DM
31502016-06-14 David Malcolm <dmalcolm@redhat.com>
3151
3152 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3153
264757fb
DM
31542016-06-14 David Malcolm <dmalcolm@redhat.com>
3155
3156 * c-typeck.c (build_component_ref): Simplify fixit code by
3157 using gcc_rich_location::add_fixit_misspelled_id.
3158 (set_init_label): Likewise.
3159
f7e4f2e3
DM
31602016-06-13 David Malcolm <dmalcolm@redhat.com>
3161
3162 * c-parser.c (c_parser_initelt): Provide location of name for new
3163 location_t param of set_init_label.
3164 * c-tree.h (set_init_label): Add location_t param.
3165 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3166 param and use it when issuing error messages about unrecognized
3167 field names. Attempt to provide a fixit hint if appropriate,
3168 otherwise update the error message to provide the type name.
3169
4b1ffdb1
TS
31702016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3171
3172 PR c/71381
3173 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3174 Loosen checking.
3175
44a845ca
MS
31762016-06-08 Martin Sebor <msebor@redhat.com>
3177 Jakub Jelinek <jakub@redhat.com>
3178
3179 PR c++/70507
3180 PR c/68120
3181 * c-typeck.c (convert_arguments): Don't promote last argument
3182 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3183
92a5f2ba
MP
31842016-06-08 Marek Polacek <polacek@redhat.com>
3185
3186 PR c/71418
3187 * c-decl.c (grokdeclarator): Check TYPE_P.
3188
08203f73
MP
3189 PR c/71426
3190 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3191 code.
3192
6ffd47b7
DM
31932016-06-07 David Malcolm <dmalcolm@redhat.com>
3194
3195 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3196 and structure element reference, capture the location of the
3197 element name token and pass it to build_component_ref.
3198 (c_parser_postfix_expression_after_primary): Likewise for
3199 structure element dereference.
3200 (c_parser_omp_variable_list): Likewise for
3201 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3202 * c-tree.h (build_component_ref): Add location_t param.
3203 * c-typeck.c (build_component_ref): Add location_t param
3204 COMPONENT_LOC. Use it, if available, when issuing hints about
3205 mispelled member names to provide a fixit replacement hint.
3206
1f40cff3
MP
32072016-06-06 Marek Polacek <polacek@redhat.com>
3208
3209 PR c/71362
3210 * c-parser.c (c_parser_direct_declarator): Set location.
3211
5545a907
MP
32122016-06-06 Marek Polacek <polacek@redhat.com>
3213
3214 * c-typeck.c (comptypes_internal): Handle comparisons of
3215 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3216 TYPE_REF_CAN_ALIAS_ALL.
3217
b605f663
CLT
32182016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3219
3220 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3221 arguments as addressable when async clause exists.
3222
00631022
JJ
32232016-05-30 Jakub Jelinek <jakub@redhat.com>
3224
3225 PR c++/71349
3226 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3227 when combined with target construct.
3228
7211a097
JJ
32292016-05-26 Jakub Jelinek <jakub@redhat.com>
3230
3231 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3232 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3233
95efe6b6
MP
32342016-05-25 Marek Polacek <polacek@redhat.com>
3235
3236 PR c/71265
3237 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3238
a23faf7a
MP
3239 PR c/71266
3240 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3241
e46c7770
CP
32422016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3243
3244 * c-parser.c (c_parser_oacc_declare): Add support for
3245 GOMP_MAP_FIRSTPRIVATE_POINTER.
3246 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3247 argument with enum c_omp_region_type ort.
3248 (handle_omp_array_sections): Likewise. Update call to
3249 handle_omp_array_sections_1.
3250 (c_finish_omp_clauses): Add specific errors and warning messages for
3251 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3252 call to handle_omp_array_sections.
3253
a04e69c0
TS
32542016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3255
3256 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3257
f17a223d
RB
32582016-05-24 Richard Biener <rguenther@suse.de>
3259
3260 PR middle-end/70434
3261 PR c/69504
3262 * c-typeck.c (build_array_ref): Do not complain about indexing
3263 non-lvalue vectors. Adjust for function name change.
3264
79063edd
MS
32652016-05-20 Martin Sebor <msebor@redhat.com>
3266
3267 PR c/71115
3268 * c-typeck.c (error_init): Use
3269 expansion_point_location_if_in_system_header.
3270 (warning_init): Same.
3271
8a40fef3
DM
32722016-05-19 David Malcolm <dmalcolm@redhat.com>
3273
3274 PR c/71171
3275 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3276 in error-handling.
3277 (c_parser_postfix_expression): Likewise.
3278 * c-tree.h (c_expr::set_error): New method.
3279 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3280 that result's range is initialized.
3281
e9892350
JG
32822016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3283
3284 * c-typeck.c (parser_build_unary_op): Fix formatting.
3285
8fad45f5
MW
32862016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3287
3288 * c-decl.c (grokdeclarator): Remove errmsg and use of
3289 targetm.invalid_return_type.
3290 (grokparms): Remove errmsg and use of
3291 targetm.invalid_parameter_type.
3292
aa4b467b
JM
32932016-05-13 Joseph Myers <joseph@codesourcery.com>
3294
3295 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3296 function return type.
3297
4f2e1536
MP
32982016-05-12 Marek Polacek <polacek@redhat.com>
3299
3300 PR c/70756
3301 * c-decl.c (build_compound_literal): Pass LOC down to
3302 c_incomplete_type_error.
3303 * c-tree.h (require_complete_type): Adjust declaration.
3304 (c_incomplete_type_error): Likewise.
3305 * c-typeck.c (require_complete_type): Add location parameter, pass it
3306 down to c_incomplete_type_error.
3307 (c_incomplete_type_error): Add location parameter, pass it down to
3308 error_at.
3309 (build_component_ref): Pass location down to c_incomplete_type_error.
3310 (default_conversion): Pass location down to require_complete_type.
3311 (build_array_ref): Likewise.
3312 (build_function_call_vec): Likewise.
3313 (convert_arguments): Likewise.
3314 (build_unary_op): Likewise.
3315 (build_c_cast): Likewise.
3316 (build_modify_expr): Likewise.
3317 (convert_for_assignment): Likewise.
3318 (c_finish_omp_clauses): Likewise.
3319
d6e83a8d
MM
33202016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3321
3322 PR c/43651
3323 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3324 is enabled.
3325 * c-errors.c (pedwarn_c90): Return true if warned.
3326 * c-tree.h (pedwarn_c90): Change return type to bool.
3327 (enum c_declspec_word): Add new enumerator cdw_atomic.
3328
5c3a10fb
MP
33292016-05-11 Marek Polacek <polacek@redhat.com>
3330
3331 PR c++/71024
3332 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3333 diagnose_mismatched_attributes and call it.
3334
cf68d92c
MP
33352016-05-10 Marek Polacek <polacek@redhat.com>
3336
3337 PR c/70255
3338 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3339 on a declaration following the definition.
3340
351f85c5
JJ
33412016-05-05 Jakub Jelinek <jakub@redhat.com>
3342
3343 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3344 parse it through to c_parser_c99_block_statement.
3345 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3346 caller.
3347
deef7113
MP
33482016-05-04 Marek Polacek <polacek@redhat.com>
3349
3350 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3351 OPT_Wdangling_else.
3352
de55efd5
MP
33532016-05-04 Marek Polacek <polacek@redhat.com>
3354
3355 PR c/48778
3356 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3357 for macro expansions.
3358
79ce98bc
MP
33592016-05-03 Marek Polacek <polacek@redhat.com>
3360
3361 PR c/70859
3362 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3363 check_builtin_function_arguments.
3364
fb2647aa
RB
33652016-05-03 Richard Biener <rguenther@suse.de>
3366
3367 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3368 the checksum from the previous stage.
3369
77886428
CP
33702016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3371
3372 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3373 c_finish_omp_clauses.
3374 (c_parser_omp_all_clauses): Likewise.
3375 (c_parser_oacc_cache): Likewise.
3376 (c_parser_oacc_loop): Likewise.
3377 (omp_split_clauses): Likewise.
3378 (c_parser_omp_declare_target): Likewise.
3379 (c_parser_cilk_all_clauses): Likewise.
3380 (c_parser_cilk_for): Likewise.
3381 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3382 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3383
7176a4a0
MP
33842016-05-02 Marek Polacek <polacek@redhat.com>
3385
3386 PR c/70851
3387 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3388 incomplete type.
3389
e7ff0319
CP
33902016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3391
3392 PR middle-end/70626
3393 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3394 OACC_LOOP_CLAUSE_MASK.
3395 (c_parser_oacc_kernels_parallel): Update call to
3396 c_oacc_split_loop_clauses.
3397
9f405ce1
AM
33982016-04-28 Andrew MacLeod <amacleod@redhat.com>
3399
3400 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3401 argument to build_modify_expr in two cases.
3402
c1e1f433
BS
34032016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3404
3405 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3406 warn_for_memset instead of warning directly here.
3407
2448a956
MP
34082016-04-26 Marek Polacek <polacek@redhat.com>
3409
3410 PR c/67784
3411 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3412 out of ...
3413 (c_parser_for_statement): ... here.
3414 (c_parser_if_statement): Use it.
3415 (c_parser_switch_statement): Use it.
3416 (c_parser_while_statement): Use it.
3417
b02a5e26
MP
3418 PR c/70791
3419 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3420
477d4906
IV
34212016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3422
3423 PR c++/69363
3424 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3425 instead of c_finish_cilk_clauses.
3426 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3427 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3428 floating-point variables in the linear clause for Cilk Plus.
3429
fe37c7af
MM
34302016-04-18 Michael Matz <matz@suse.de>
3431
3432 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3433 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3434
949505a9
MP
34352016-04-15 Marek Polacek <polacek@redhat.com>
3436
3437 PR c/70671
3438 * c-typeck.c (build_unary_op): Pass location down to error and
3439 warning call.
3440
dda1bf61
JJ
34412016-04-15 Jakub Jelinek <jakub@redhat.com>
3442
3443 PR c/70436
3444 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3445 where needed.
3446 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3447 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3448 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3449 Adjust c_parser_pragma callers.
3450 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3451 caller.
3452 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3453 c_parser_statement.
3454 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3455 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3456 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3457 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3458 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3459 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3460 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3461 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3462 down where needed.
3463 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3464 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3465 calls.
3466
99cd9857
MP
34672016-04-13 Marek Polacek <polacek@redhat.com>
3468
3469 PR c/70436
3470 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3471 adjust callers.
3472 (c_parser_statement): Likewise.
3473 (c_parser_c99_block_statement): Likewise.
3474 (c_parser_while_statement): Likewise.
3475 (c_parser_for_statement): Likewise.
3476 (c_parser_if_body): Don't set IF_P here.
3477 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3478 about dangling else here.
3479 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3480 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3481 warn about dangling else here.
3482
f13355da
MP
34832016-04-04 Marek Polacek <polacek@redhat.com>
3484
3485 PR c/70307
3486 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3487
5fde6a45
MP
34882016-03-31 Marek Polacek <polacek@redhat.com>
3489
3490 PR c/70297
3491 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3492
4bbf545b
DM
34932016-03-18 David Malcolm <dmalcolm@redhat.com>
3494
3495 PR c/70281
3496 * c-parser.c (c_parser_postfix_expression): Set the source range
3497 for uses of "__builtin_types_compatible_p".
3498
fcc2b74f
JJ
34992016-03-17 Jakub Jelinek <jakub@redhat.com>
3500
3501 PR c/70280
3502 * c-typeck.c (composite_type): Don't count void_list_node
3503 into len, if the list is terminated by void_list_node, start
3504 with void_list_node instead of NULL for newargs. Stop
3505 at void_list_node.
3506
ab4c578f
MP
35072016-03-16 Marek Polacek <polacek@redhat.com>
3508
3509 PR c/70093
3510 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3511 nested functions returning VM types.
3512
96b3c82d
CP
35132016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3514
3515 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3516 when calling c_finish_omp_clauses.
3517
29b9828f
BS
35182016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3519
3520 PR c/69824
3521 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3522 for later.
3523
7ff6ca38
MP
35242016-03-04 Marek Polacek <polacek@redhat.com>
3525
3526 PR c/69798
3527 * c-parser.c (c_parser_postfix_expression): Call
3528 c_parser_cast_expression rather than c_parser_postfix_expression.
3529
686e2237
JJ
35302016-03-01 Jakub Jelinek <jakub@redhat.com>
3531
3532 PR c/69796
3533 PR c/69974
3534 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3535 of incomplete decls to error_mark_node.
3536
0b05329b
MP
35372016-02-24 Marek Polacek <polacek@redhat.com>
3538
3539 PR c/69819
3540 * c-decl.c (finish_decl): Don't update the copy of the type of a
3541 different decl type.
3542
067fbd8b
JJ
35432016-02-23 Jakub Jelinek <jakub@redhat.com>
3544
3545 PR objc/69844
3546 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3547 in id_kind reclassification.
3548
bf14eba2
JJ
35492016-02-16 Jakub Jelinek <jakub@redhat.com>
3550
3551 PR c/69835
3552 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3553
ba539195
JN
35542016-02-16 James Norris <jnorris@codesourcery.com>
3555
3556 PR c/64748
3557 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3558
16595a1f
BS
35592016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3560
f48dfe98
BS
3561 * c-decl.c (build_null_declspecs): Zero the entire struct.
3562
16595a1f
BS
3563 PR c/69522
3564 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3565 callers changed. If nested_p is true, use it to call
3566 finish_implicit_inits.
3567 * c-tree.h (finish_implicit_inits): Declare.
3568 * c-typeck.c (finish_implicit_inits): New function. Move code
3569 from ...
3570 (push_init_level): ... here.
3571 (set_designator, process_init_element): Call finish_implicit_inits.
3572
66756373
JJ
35732016-02-11 Jakub Jelinek <jakub@redhat.com>
3574
3575 PR c/69768
3576 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3577 arguments for -Waddress warning.
3578
1066e9b5
JJ
35792016-02-04 Jakub Jelinek <jakub@redhat.com>
3580
3581 PR c/69669
3582 * c-decl.c (finish_enum): When honoring mode attribute,
3583 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3584
3a5d2ba4
JJ
35852016-01-29 Jakub Jelinek <jakub@redhat.com>
3586
3587 PR debug/69518
3588 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3589 all type variants, not just TYPE_MAIN_VARIANT.
3590
cbdd8ae0
JJ
35912016-01-27 Jakub Jelinek <jakub@redhat.com>
3592
3593 PR debug/66869
3594 * c-decl.c (c_write_global_declarations_1): Warn with
3595 warn_unused_function if static prototype without definition
3596 is not C_DECL_USED.
3597
fa74a4bc
MP
35982016-01-27 Marek Polacek <polacek@redhat.com>
3599
3600 PR c/68062
3601 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3602 to unsigned, if needed. Add -Wsign-compare warning.
3603
13f92e8d
JJ
36042016-01-26 Jakub Jelinek <jakub@redhat.com>
3605
3606 PR tree-optimization/69483
3607 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3608
cd8e73dc 36092016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3610
3611 PR c/24293
3612 * c-tree.h (incomplete_record_decls): Declare.
3613 * c-parser.c (incomplete_record_decls): Define.
3614 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3615 report error if any decl has zero size.
3616 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3617 or enum type to incomplete_record_decls.
3618
e6d6ec9e
TV
36192016-01-14 Tom de Vries <tom@codesourcery.com>
3620
3621 PR tree-optimization/68773
3622 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3623 set force_output.
3624
00083992
MP
36252016-01-14 Marek Polacek <polacek@redhat.com>
3626
3627 PR c/69262
3628 * c-decl.c (grokdeclarator): Provide more information for invalid
3629 array declarations.
3630
7443cf13
DM
36312016-01-06 David Malcolm <dmalcolm@redhat.com>
3632
3633 * c-parser.c (c_parser_unary_expression): For dereferences, build
3634 a combined location before calling build_indirect_ref, so that
3635 error reports cover the full range, manually updating the c_expr
3636 src_range.
3637
6b131d5b
MP
36382016-01-06 Marek Polacek <polacek@redhat.com>
3639
3640 PR sanitizer/69099
3641 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3642 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3643 NULL.
3644
818ab71a
JJ
36452016-01-04 Jakub Jelinek <jakub@redhat.com>
3646
3647 Update copyright years.
3648
2fe0a208
MP
36492016-01-04 Marek Polacek <polacek@redhat.com>
3650
3651 PR c/68908
3652 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3653 optimization to use __atomic_fetch_* built-in if possible.
3654
c7b48c8a
TS
36552015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3656
3657 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3658 into...
3659 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3660 all users.
3661
fda5652f
MP
36622015-12-22 Marek Polacek <polacek@redhat.com>
3663
3664 PR c/69002
3665 * c-typeck.c (build_component_ref): Warn when acessing elements of
3666 atomic structures or unions.
3667
745e411d
DM
36682015-12-21 David Malcolm <dmalcolm@redhat.com>
3669
3670 * c-typeck.c: Include "gcc-rich-location.h".
3671 (build_binary_op): In the two places that call binary_op_error,
3672 create a gcc_rich_location and populate it with the location of
3673 the binary op and its two operands.
3674
94c40e19
DM
36752015-12-16 David Malcolm <dmalcolm@redhat.com>
3676
3677 * c-parser.c (c_parser_statement_after_labels): When calling
3678 c_finish_return, Use the return expression's location if it has
3679 one, falling back to the location of the first token within it.
3680 * c-typeck.c (c_finish_return): When issuing warnings about
3681 the incorrect presence/absence of a return value, issue a note
3682 showing the declaration of the function.
3683
de67c4c3
DM
36842015-12-16 David Malcolm <dmalcolm@redhat.com>
3685
3686 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3687 to 4.
3688 (c_parser_peek_nth_token): New function.
3689 (c_parser_peek_conflict_marker): New function.
3690 (c_parser_error): Detect conflict markers and report them as such.
3691
a10704e1
DM
36922015-12-16 David Malcolm <dmalcolm@redhat.com>
3693
3694 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3695 to preserve range information for the primary expression
3696 in the call to c_parser_postfix_expression_after_primary.
3697
8062bca6
DM
36982015-12-16 David Malcolm <dmalcolm@redhat.com>
3699
3700 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3701 expression location, falling back on the first token location,
3702 rather than always using the latter.
3703
d06f8b75
MP
37042015-12-16 Marek Polacek <polacek@redhat.com>
3705
3706 PR c/64637
3707 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3708 available.
3709
2994fb91
MP
37102015-12-15 Marek Polacek <polacek@redhat.com>
3711
3712 PR c/68907
3713 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3714 artificial decl.
3715
a1b93f8d
DM
37162015-12-08 David Malcolm <dmalcolm@redhat.com>
3717
3718 * c-parser.c (c_parser_alignof_expression): Capture location of
3719 closing parenthesis (if any), or of end of unary expression, and
3720 use it to build a src_range for the expression.
3721
46c6e1e2
DM
37222015-12-08 David Malcolm <dmalcolm@redhat.com>
3723
3724 PR c/68757
3725 * c-parser.c (c_parser_get_builtin_args): Add
3726 "out_close_paren_loc" param, and write back to it.
3727 (c_parser_postfix_expression): Capture the closing
3728 parenthesis location for RID_CHOOSE_EXPR,
3729 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3730 RID_BUILTIN_SHUFFLE and use it to set the source range
3731 for such expressions; within RID_BUILTIN_COMPLEX set
3732 the underlying location.
3733
66189108
MP
37342015-12-07 Marek Polacek <polacek@redhat.com>
3735
3736 PR c/68668
3737 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3738 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3739
f187980b
EB
37402015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3741
3742 * c-tree.h (c_build_va_arg): Adjust prototype.
3743 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3744 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3745 parameter, adjust throughout and issue an error if EXPR is a component
3746 with reverse storage order.
3747
4250754e
JM
37482015-12-02 Jason Merrill <jason@redhat.com>
3749
3750 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3751 (c_fully_fold_internal, decl_constant_value_for_optimization):
3752 Move from c-common.c.
3753 * c-tree.h: Declare decl_constant_value_for_optimization.
3754 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3755
e9e32ee6
JM
37562015-12-02 Joseph Myers <joseph@codesourcery.com>
3757
3758 PR c/68162
3759 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3760 following link from declarator to next declarator. Track original
3761 qualified type and pass it to c_build_qualified_type.
3762 * c-typeck.c (c_build_qualified_type): Add arguments
3763 orig_qual_type and orig_qual_indirect.
3764
ff7a55bf
TS
37652015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3766
3767 * c-parser.c (c_parser_omp_clause_name)
3768 (c_parser_oacc_all_clauses): Alphabetical sorting.
3769
657e4e47
JJ
37702015-12-02 Jakub Jelinek <jakub@redhat.com>
3771
3772 PR c/68533
3773 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3774 for diagnostics.
3775
37d5ad46
JB
37762015-12-01 Julian Brown <julian@codesourcery.com>
3777 Cesar Philippidis <cesar@codesourcery.com>
3778 James Norris <James_Norris@mentor.com>
3779
3780 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3781 (c_parser_oacc_clause_use_device): New function.
3782 (c_parser_oacc_all_clauses): Add use_device support.
3783 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3784 (c_parser_oacc_host_data): New function.
3785 (c_parser_omp_construct): Add host_data support.
3786 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3787 * c-typeck.c (c_finish_oacc_host_data): New function.
3788 (c_finish_omp_clauses): Add use_device support.
3789
a4850ce9
JH
37902015-11-29 Jan Hubicka <hubicka@ucw.cz>
3791
3792 PR c/67106
3793 * c-decl.c: Set TYPE_PACKED in variants.
3794
b58d3df2
ML
37952015-11-27 Martin Liska <mliska@suse.cz>
3796
3797 PR c++/68312
3798 * c-array-notation.c (fix_builtin_array_notation_fn):
3799 Use release_vec_vec instead of vec::release.
3800 (build_array_notation_expr): Likewise.
3801 (fix_conditional_array_notations_1): Likewise.
3802 (fix_array_notation_expr): Likewise.
3803 (fix_array_notation_call_expr): Likewise.
3804
aec17bfe
JJ
38052015-11-27 Jakub Jelinek <jakub@redhat.com>
3806
3807 PR c/63326
3808 * c-parser.c (c_parser_compound_statement_nostart): If
3809 last_label is true, use pragma_stmt instead of pragma_compound
3810 as second c_parser_pragma argument.
3811 (c_parser_omp_ordered, c_parser_omp_target_update,
3812 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3813 false as second argument to c_parser_skip_to_pragma_eol after
3814 diagnosing standalone directives used in pragma_stmt context.
3815
688c4de0
IV
38162015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3817
3818 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3819 with "if (ENABLE_OFFLOADING)".
3820
cbd03aee
DM
38212015-11-23 David Malcolm <dmalcolm@redhat.com>
3822
3823 PR objc/68438
3824 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3825 for various Objective-C constructs: Class.name syntax,
3826 @selector(), @protocol(), @encode(), and [] message syntax.
3827
a87a86e1
DM
38282015-11-20 David Malcolm <dmalcolm@redhat.com>
3829
3830 PR 62314
3831 * c-typeck.c (should_suggest_deref_p): New function.
3832 (build_component_ref): Special-case POINTER_TYPE when
3833 generating a "not a structure of union" error message, and
3834 suggest a "->" rather than a ".", providing a fix-it hint.
3835
8ece8dfb
DM
38362015-11-19 David Malcolm <dmalcolm@redhat.com>
3837
3838 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3839 candidate into a new function, find_closest_identifier.
3840
433068cc
MP
38412015-11-19 Marek Polacek <polacek@redhat.com>
3842
3843 PR c/68412
3844 * c-typeck.c (parser_build_binary_op): Properly handle
3845 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3846
bef08b71
DM
38472015-11-17 David Malcolm <dmalcolm@redhat.com>
3848
3849 * c-parser.c (set_c_expr_source_range): Bulletproof both
3850 overloaded implementations against NULL expr->value.
3851 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3852 values.
3853 (c_parser_unary_expression): Likewise when handling addresses of
3854 labels.
3855 (c_parser_postfix_expression): Likewise for statement expressions,
3856 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3857 __builtin_va_arg, and for __builtin_offset_of.
3858 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3859 src_range using the range of the braced initializer.
3860 (c_parser_transaction_expression): Set src_range for "ret" to a
3861 sane pair of values.
3862
fff77217
KY
38632015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3864
3865 * c-parser.c (c_finish_omp_declare_simd): Look for
3866 "simd" attribute as well. Update error message.
3867
1d899da2
TS
38682015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3869
3870 * c-parser.c (c_parser_omp_declare_target): Adjust.
3871
e4606348
JJ
38722015-11-14 Jakub Jelinek <jakub@redhat.com>
3873
3874 * c-typeck.c (c_finish_omp_clauses): Don't mark
3875 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3876
3e636daf
MP
38772015-11-14 Marek Polacek <polacek@redhat.com>
3878
3879 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3880 * c-typeck.c: Likewise.
3881
ebedc9a3
DM
38822015-11-13 David Malcolm <dmalcolm@redhat.com>
3883
3884 * c-decl.c (warn_defaults_to): Pass line_table to
3885 rich_location ctor.
3886 * c-errors.c (pedwarn_c99): Likewise.
3887 (pedwarn_c90): Likewise.
3888 * c-parser.c (set_c_expr_source_range): New functions.
3889 (c_token::get_range): New method.
3890 (c_token::get_finish): New method.
3891 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3892 based on the range from the start of the LHS to the end of the
3893 RHS.
3894 (c_parser_conditional_expression): Likewise, based on the range
3895 from the start of the cond.value to the end of exp2.value.
3896 (c_parser_binary_expression): Call set_c_expr_source_range on
3897 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3898 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3899 based on the cast_loc through to the end of the expr.
3900 (c_parser_unary_expression): Likewise, based on the
3901 op_loc through to the end of op.
3902 (c_parser_sizeof_expression) Likewise, based on the start of the
3903 sizeof token through to either the closing paren or the end of
3904 expr.
3905 (c_parser_postfix_expression): Likewise, using the token range,
3906 or from the open paren through to the close paren for
3907 parenthesized expressions.
3908 (c_parser_postfix_expression_after_primary): Likewise, for
3909 various kinds of expression.
3910 * c-tree.h (struct c_expr): Add field "src_range".
3911 (c_expr::get_start): New method.
3912 (c_expr::get_finish): New method.
3913 (set_c_expr_source_range): New decls.
3914 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3915 on ret for prefix unary ops.
3916 (parser_build_binary_op): Likewise, running from the start of
3917 arg1.value through to the end of arg2.value.
3918
ec8b536f
MP
39192015-11-13 Marek Polacek <polacek@redhat.com>
3920
3921 PR c/68320
3922 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3923
277fe616
DM
39242015-11-13 David Malcolm <dmalcolm@redhat.com>
3925
3926 * c-typeck.c: Include spellcheck.h.
3927 (lookup_field_fuzzy_find_candidates): New function.
3928 (lookup_field_fuzzy): New function.
3929 (build_component_ref): If the field was not found, try using
3930 lookup_field_fuzzy and potentially offer a suggestion.
3931
6e232ba4
JN
39322015-11-12 James Norris <jnorris@codesourcery.com>
3933 Joseph Myers <joseph@codesourcery.com>
3934
3935 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3936 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3937 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3938 and PRAGMA_OMP_CLAUSE_LINK.
3939 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3940 and PRAGMA_OACC_CLAUSE_LINK.
3941 (OACC_DECLARE_CLAUSE_MASK): New definition.
3942 (c_parser_oacc_declare): New function.
3943
9be4f715
MP
39442015-11-12 Marek Polacek <polacek@redhat.com>
3945
3946 PR c/67784
3947 * c-parser.c (c_parser_for_statement): Reclassify the token in
3948 a correct scope.
3949
e78bede6
MP
39502015-11-11 Marek Polacek <polacek@redhat.com>
3951
3952 PR c/68107
3953 PR c++/68266
3954 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3955 checking the size of an array.
3956
69f293c9
AM
39572015-11-11 Andrew MacLeod <amacleod@redhat.com>
3958
3959 * c-array-notation.c: Remove unused header files.
3960 * c-aux-info.c: Likewise.
3961 * c-convert.c: Likewise.
3962 * c-decl.c: Likewise.
3963 * c-errors.c: Likewise.
3964 * c-lang.c: Likewise.
3965 * c-objc-common.c: Likewise.
3966 * c-parser.c: Likewise.
3967 * c-typeck.c: Likewise.
3968 * gccspec.c: Likewise.
3969
3a40d81d
NS
39702015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3971 Cesar Philippidis <cesar@codesourcery.com>
3972 James Norris <jnorris@codesourcery.com>
3973 Julian Brown <julian@codesourcery.com>
3974 Nathan Sidwell <nathan@codesourcery.com>
3975
3a40d81d
NS
3976 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3977 routine arg.
3978 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3979 (c_parser_pragma): Parse 'acc routine'.
3980 (OACC_ROUTINE_CLAUSE_MARK): Define.
3981 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
3982
fc402eec
AA
39832015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3984
3985 PR debug/67192
3986 * c-typeck.c (c_finish_loop): For unconditional loops, set the
3987 location of the backward-goto to the start of the loop body.
3988
f6b0b3db
AA
39892015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
3990
3991 PR debug/67192
3992 * c-parser.c (c_parser_while_statement): Finish the loop before
3993 parsing ahead for misleading indentation.
3994 (c_parser_for_statement): Likewise.
3995
ee45a32d
EB
39962015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3997
3998 * c-decl.c (finish_struct): If the structure has reverse storage
3999 order, rewrite the type of array fields with scalar component. Call
4000 maybe_apply_pragma_scalar_storage_order on entry.
4001 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4002 errors on bit-fields and reverse SSO here and not...
4003 (c_mark_addressable): ...here.
4004 (output_init_element): Adjust call to initializer_constant_valid_p.
4005 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4006
8a645150
DM
40072015-11-06 David Malcolm <dmalcolm@redhat.com>
4008
4009 * c-decl.c (warn_defaults_to): Update for change in signature
4010 of diagnostic_set_info.
4011 * c-errors.c (pedwarn_c99): Likewise.
4012 (pedwarn_c90): Likewise.
4013 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4014 for textinfo::set_location.
4015
7a5e4956
CP
40162015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4017 Thomas Schwinge <thomas@codesourcery.com>
4018 James Norris <jnorris@codesourcery.com>
4019
4020 * c-parser.c (c_parser_omp_clause_name): Add support for
4021 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4022 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4023 default(none) in OpenACC.
4024 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4025 arguments.
4026 (c_parser_oacc_clause_tile): New function.
4027 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4028 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4029 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4030 TILE}.
4031 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4032 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4033 FIRSTPRIVATE}.
4034 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4035 (c_parser_oacc_update): Update the error message for missing clauses.
4036 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4037 and OMP_CLAUSE_INDEPENDENT.
4038
bfcfbfa0
MP
40392015-11-05 Marek Polacek <polacek@redhat.com>
4040
4041 PR c/68090
4042 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4043 deal with pre-evaluation on invalid types.
4044
e01d41e5
JJ
40452015-11-05 Jakub Jelinek <jakub@redhat.com>
4046 Ilya Verbin <ilya.verbin@intel.com>
4047
4048 * c-parser.c: Include context.h and gimple-expr.h.
4049 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4050 monotonic together with nonmonotonic.
4051 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4052 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4053 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4054 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4055 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4056 expressions on combined target teams before the target.
4057 (c_parser_omp_declare_target): If decl has "omp declare target" or
4058 "omp declare target link" attribute, and cgraph or varpool node already
4059 exists, then set corresponding flags. Call c_finish_omp_clauses
4060 in the parenthesized extended-list syntax case.
4061 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4062 declare target.
4063 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4064 on OMP_CLAUSE_REDUCTION array sections.
4065 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4066 into the constant offset, or for variable low-bound using
4067 POINTER_PLUS_EXPR. For structure element based array sections use
4068 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4069 (c_finish_omp_clauses): Drop generic_field_head, structure
4070 elements are now always mapped even as array section bases,
4071 diagnose same var in data sharing and mapping clauses. Diagnose if
4072 linear step on declare simd is neither a constant nor a uniform
4073 parameter. Look through POINTER_PLUS_EXPR for array section
4074 reductions. Diagnose the same var or function appearing multiple
4075 times on the same directive. Fix up wording for the to clause if t
4076 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4077 modifier on kinds other than dynamic or guided or nonmonotonic
4078 modifier together with ordered clause.
4079
4bf9e5a8
TS
40802015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4081 Chung-Lin Tang <cltang@codesourcery.com>
4082
4083 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4084
2adfab87
AM
40852015-10-29 Andrew MacLeod <amacleod@redhat.com>
4086
4087 * c-array-notation.c: Reorder #include's and remove duplicates.
4088 * c-aux-info.c: Likewise.
4089 * c-convert.c: Likewise.
4090 * c-decl.c: Likewise.
4091 * c-errors.c: Likewise.
4092 * c-lang.c: Likewise.
4093 * c-objc-common.c: Likewise.
4094 * c-parser.c: Likewise.
4095 * c-typeck.c: Likewise.
4096
e922069e
JW
40972015-10-26 Jim Wilson <jim.wilson@linaro.org>
4098
4099 PR debug/66068
4100 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4101 after calling build_qualified_type.
4102
765dd391
CP
41032015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4104 Thomas Schwinge <thomas@codesourcery.com>
4105 James Norris <jnorris@codesourcery.com>
4106 Joseph Myers <joseph@codesourcery.com>
4107 Julian Brown <julian@codesourcery.com>
4108 Bernd Schmidt <bschmidt@redhat.com>
4109
4110 * c-parser.c (c_parser_oacc_shape_clause): New.
4111 (c_parser_oacc_simple_clause): New.
4112 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4113 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4114
88bae6f4
TS
41152015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4116 James Norris <jnorris@codesourcery.com>
4117 Cesar Philippidis <cesar@codesourcery.com>
4118
4119 PR c/64765
4120 PR c/64880
4121 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4122 parameters, and handle these. Adjust all users.
4123 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4124 into...
4125 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4126 all users.
4127 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4128 declare functions.
4129 (c_finish_omp_construct): Declare function.
4130 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4131 Merge functions into...
4132 (c_finish_omp_construct): ... this new function.
4133
a8fc2579
RB
41342015-10-22 Richard Biener <rguenther@suse.de>
4135
4136 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4137 before folding a MINUS_EXPR.
4138
e9122ef6
MP
41392015-10-21 Marek Polacek <polacek@redhat.com>
4140
4141 PR c/68024
4142 * c-decl.c (start_function): Warn about vararg functions without
4143 a prototype.
4144
9f47c7e5
IE
41452015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4146
4147 * c-typeck.c (build_conditional_expr): Use boolean vector
4148 type for vector comparison.
4149 (build_vec_cmp): New.
4150 (build_binary_op): Use build_vec_cmp for comparison.
4151
fa60eeb9
MP
41522015-10-20 Marek Polacek <polacek@redhat.com>
4153
4154 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4155
2c7020eb
MP
41562015-10-20 Marek Polacek <polacek@redhat.com>
4157
4158 PR c/67964
4159 * c-parser.c (c_parser_attributes): Break out of the loop if the
4160 token after an attribute isn't a comma.
4161
d9a6bd32
JJ
41622015-10-13 Jakub Jelinek <jakub@redhat.com>
4163 Aldy Hernandez <aldyh@redhat.com>
4164
4165 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4166 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4167 (c_parser_omp_variable_list): Handle structure elements for
4168 map, to and from clauses. Handle array sections in reduction
4169 clause. Formatting fixes.
4170 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4171 if clause modifiers.
4172 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4173 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4174 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4175 c_parser_omp_clause_is_device_ptr): New functions.
4176 (c_parser_omp_clause_ordered): Parse optional parameter.
4177 (c_parser_omp_clause_reduction): Handle array reductions.
4178 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4179 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4180 functions.
4181 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4182 (c_parser_omp_clause_depend_sink): New function.
4183 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4184 (c_parser_omp_clause_map): Parse release/delete map kinds and
4185 optional always modifier.
4186 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4187 and c_finish_omp_clauses callers.
4188 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4189 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4190 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4191 (OMP_CRITICAL_CLAUSE_MASK): Define.
4192 (c_parser_omp_critical): Parse critical clauses.
4193 (c_parser_omp_for_loop): Handle doacross loops, adjust
4194 c_finish_omp_for and c_finish_omp_clauses callers.
4195 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4196 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4197 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4198 (c_parser_omp_for): Disallow ordered clause when combined with
4199 distribute. Disallow linear clause when combined with distribute
4200 and not combined with simd.
4201 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4202 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4203 parse clauses and if depend clause is found, don't parse a body.
4204 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4205 Allow target parallel without for after it.
4206 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4207 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4208 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4209 invalid kinds.
4210 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4211 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4212 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4213 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4214 functions.
4215 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4216 defaultmap and is_device_ptr clauses.
4217 (c_parser_omp_target): Parse target parallel and target simd. Set
4218 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4219 and target exit data. Diagnose invalid map kinds.
4220 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4221 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4222 construct.
4223 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4224 &omp_priv.
4225 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4226 (c_parser_omp_taskloop): New function.
4227 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4228 handle PRAGMA_OMP_TASKLOOP.
4229 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4230 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4231 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4232 Add IS_OMP argument, handle structure element bases, diagnose
4233 bitfields, pass IS_OMP recursively, diagnose known zero length
4234 array sections in depend clauses, handle array sections in reduction
4235 clause, diagnose negative length even for pointers.
4236 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4237 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4238 array sections in reduction clause, set
4239 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4240 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4241 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4242 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4243
21ba0cea
MP
42442015-10-06 Marek Polacek <polacek@redhat.com>
4245
4246 * c-parser.c (c_parser_statement_after_labels): Use
4247 protected_set_expr_location.
4248 (c_parser_omp_clause_num_gangs): Likewise.
4249 (c_parser_omp_clause_num_threads): Likewise.
4250 (c_parser_omp_clause_num_workers): Likewise.
4251 (c_parser_omp_clause_vector_length): Likewise.
4252 (c_parser_omp_clause_num_teams): Likewise.
4253 (c_parser_omp_clause_thread_limit): Likewise.
4254 * c-typeck.c (build_c_cast): Likewise.
4255 (c_cast_expr): Likewise.
4256
624d31fe
RS
42572015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4258
4259 * c-typeck.c (c_tree_equal): Use real_equal instead of
4260 REAL_VALUES_EQUAL.
4261
b8fd7909
JM
42622015-10-04 Jason Merrill <jason@redhat.com>
4263
4264 * c-parser.c (c_lex_one_token): Handle @synchronized.
4265 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4266 can change whether the function is transaction_safe.
4267
1c7485af
MP
42682015-10-02 Marek Polacek <polacek@redhat.com>
4269
4270 PR c/67730
4271 * c-typeck.c (convert_for_assignment): Use the expansion point
4272 location throughout.
4273
3e3b8d63
MP
42742015-10-02 Marek Polacek <polacek@redhat.com>
4275
4276 PR c/64249
4277 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4278 and pass it down to c_parser_if_statement.
4279 (c_parser_else_body): Add CHAIN parameter and pass it down to
4280 c_parser_statement_after_labels.
4281 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4282 duplicated if-else-if conditions.
4283
aabef2de
MP
42842015-10-01 Marek Polacek <polacek@redhat.com>
4285
4286 * c-typeck.c (convert_for_assignment): Improve commentary.
4287
de8ddd5f
MP
42882015-09-30 Marek Polacek <polacek@redhat.com>
4289
4290 PR c/67730
4291 * c-typeck.c (c_finish_return): Use the expansion point location for
4292 certain "return with value" warnings.
4293
c4914de6
MLI
42942015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4295
4296 * c-parser.c (pragma_lex): Add loc argument.
4297
0e36f5c7
MP
42982015-09-15 Marek Polacek <polacek@redhat.com>
4299
4300 PR c/67580
4301 * c-decl.c (tag_exists_p): New function.
4302 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4303 struct/union/enum keywords are missing.
4304 * c-tree.h (tag_exists_p): Declare.
4305
2f3bb934
MP
43062015-09-15 Marek Polacek <polacek@redhat.com>
4307
4308 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4309 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4310 Return NULL_TREE instead of 0.
4311 (lookup_name): Return NULL_TREE instead of 0.
4312 (lookup_name_in_scope): Likewise.
4313 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4314 (parser_xref_tag): Use false instead of 0.
4315 (start_struct): Use true instead of 1.
4316 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4317
aa256c4a
MP
43182015-09-14 Marek Polacek <polacek@redhat.com>
4319
4320 * c-typeck.c (set_nonincremental_init_from_string): Use
4321 HOST_WIDE_INT_M1U when shifting a negative value.
4322
dbb68221
MW
43232015-09-09 Mark Wielaard <mjw@redhat.com>
4324
4325 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4326 parm against NULL.
4327
a8a098ac
JJ
43282015-09-10 Jakub Jelinek <jakub@redhat.com>
4329
4330 PR c/67502
4331 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4332 into OMP_FOR_PRE_BODY rather than before the loop.
4333
f4b189d5
JJ
43342015-09-09 Jakub Jelinek <jakub@redhat.com>
4335
0bb99c11
JJ
4336 PR c/67501
4337 * c-parser.c (c_parser_oacc_all_clauses,
4338 c_parser_omp_all_clauses): Remove invalid clause from
4339 list of clauses even if parser->error is set.
4340
fce5e5e3
JJ
4341 PR c/67500
4342 * c-parser.c (c_parser_omp_clause_aligned,
4343 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4344 test for errors.
4345 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4346 error_mark_node.
4347
f4b189d5
JJ
4348 PR c/67495
4349 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4350 instead of c_parser_unary_expression. If the result is !lvalue_p,
4351 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4352
b2aaf235
MP
43532015-09-04 Marek Polacek <polacek@redhat.com>
4354
4355 PR sanitizer/67279
4356 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4357
1807ffc1
MS
43582015-09-03 Martin Sebor <msebor@redhat.com>
4359
4360 PR c/66516
8b652e65
JJ
4361 * c-typeck.c (convert_arguments, parser_build_unary_op,
4362 build_conditional_expr, c_cast_expr, convert_for_assignment,
4363 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4364 reject_gcc_builtin.
4365 (c_decl_implicit): Define.
4366
d04ff417
MP
43672015-09-02 Marek Polacek <polacek@redhat.com>
4368
4369 PR c/67432
4370 * c-parser.c (c_parser_enum_specifier): Give a better error for
4371 an empty enum.
4372
a79683d5
TS
43732015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4374
4375 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4376
191a6b94
MP
43772015-08-12 Marek Polacek <polacek@redhat.com>
4378
4379 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4380 LOC to it.
4381
420a9d9b
MP
43822015-08-03 Marek Polacek <polacek@redhat.com>
4383
4384 PR c/67088
4385 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4386 Use it.
4387 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4388
992118a1
PP
43892015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4390
4391 * c-parser.c (c_parser_if_body): Take token_indent_info
4392 argument. Call warn_for_misleading_indentation even when the
4393 body is a semicolon. Extract token_indent_infos corresponding
4394 to the guard, body and next tokens. Adjust call to
4395 warn_for_misleading_indentation accordingly.
4396 (c_parser_else_body): Likewise.
4397 (c_parser_if_statement): Likewise.
4398 (c_parser_while_statement): Likewise.
4399 (c_parser_for_statement): Likewise.
4400
46308474
LFSM
44012015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4402 Manuel López-Ibáñez <manu@gcc.gnu.org>
4403
4404 * c-decl.c (get_parm_info): Remove static var. Update warning
4405 message.
4406
05b28fd6
MP
44072015-07-27 Marek Polacek <polacek@redhat.com>
4408
4409 PR c++/66555
4410 PR c/54979
4411 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4412
451b5e48
MP
44132015-07-20 Marek Polacek <polacek@redhat.com>
4414
4415 PR c++/55095
4416 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4417 (build_binary_op): Warn about left shift overflows.
4418
1916bcb5
AM
44192015-07-09 Andrew MacLeod <amacleod@redhat.com>
4420
4421 * c-array-notation.c: Adjust includes for flags.h changes.
4422 * c-objc-common.c: Likewise.
4423
c7131fb2
AM
44242015-07-07 Andrew MacLeod <amacleod@redhat.com>
4425
4426 * c-array-notation.c: Adjust includes.
4427 * c-aux-info.c: Likewise.
4428 * c-convert.c: Likewise.
4429 * c-decl.c: Likewise.
4430 * c-errors.c: Likewise.
4431 * c-lang.c: Likewise.
4432 * c-objc-common.c: Likewise.
4433 * c-parser.c: Likewise.
4434 * c-typeck.c: Likewise.
4435
da2e71c9
MLI
44362015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4437
4438 PR fortran/66605
4439 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4440
b155cfd9
MP
44412015-06-29 Marek Polacek <polacek@redhat.com>
4442
4443 PR c/66322
4444 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4445 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4446 about -Wswitch-bool here.
4447 (do_case): Update c_add_case_label call.
4448 (c_finish_case): Update c_do_switch_warnings call.
4449
31521951
MP
44502015-06-27 Marek Polacek <polacek@redhat.com>
4451
4452 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4453
22d03525
MP
44542015-06-26 Marek Polacek <polacek@redhat.com>
4455
4456 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4457 INDIRECT_REF_P.
4458 * c-typeck.c (array_to_pointer_conversion): Likewise.
4459 (build_unary_op): Likewise.
4460 (c_finish_return): Likewise.
4461
f0889939
AM
44622015-06-25 Andrew MacLeod <amacleod@redhat.com>
4463
4464 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4465 * c-parser.c: Likewise.
4466
8d67ee55
RS
44672015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4468
4469 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4470 instead of pointer_hash.
4471 (detect_field_duplicates): Likewise.
4472
0ae9bd27
MP
44732015-06-25 Marek Polacek <polacek@redhat.com>
4474
4475 * c-array-notation.c: Use VAR_P throughout.
4476 * c-decl.c: Likewise.
4477 * c-objc-common.c: Likewise.
4478 * c-parser.c: Likewise.
4479 * c-typeck.c: Likewise.
4480
62f9079a
MP
44812015-06-25 Marek Polacek <polacek@redhat.com>
4482
4483 * c-decl.c: Use is_global_var throughout.
4484 * c-parser.c: Likewise.
4485 * c-typeck.c: Likewise.
4486
abb226c9
AM
44872015-06-17 Andrew MacLeod <amacleod@redhat.com>
4488
4489 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4490 * c-aux-info.c: Likewise.
4491 * c-convert.c: Likewise.
4492 * c-decl.c: Likewise.
4493 * c-errors.c: Likewise.
4494 * c-lang.c: Likewise.
4495 * c-objc-common.c: Likewise.
4496 * c-parser.c: Likewise.
4497 * c-typeck.c: Likewise.
4498
8cbababc
JH
44992015-06-11 Jan Hubicka <hubicka@ucw.cz>
4500
4501 PR middle-end/66325
4502 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4503 variants.
4504
a0349665
PMR
45052015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4506
4507 * c-decl.c (pop_scope): Register the main translation unit
4508 through the new debug hook.
4509
13fdf2e2
AM
45102015-06-08 Andrew MacLeod <amacleod@redhat.com>
4511
4512 * c-array-notation.c : Adjust include files.
4513 * c-aux-info.c : Likewise.
4514 * c-convert.c : Likewise.
4515 * c-decl.c : Likewise.
4516 * c-errors.c : Likewise.
4517 * c-lang.c : Likewise.
4518 * c-lang.h : Likewise.
4519 * c-objc-common.c : Likewise.
4520 * c-parser.c : Likewise.
4521 * c-typeck.c : Likewise.
4522
d7438551
AH
45232015-06-05 Aldy Hernandez <aldyh@redhat.com>
4524
4525 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4526 immediately clobber it.
4527 (c_write_global_declarations_1): Remove call to
4528 check_global_declaration_1.
4529 (c_write_global_declarations_2): Remove.
4530 (c_write_final_cleanups): Rename from c_write_global_declarations.
4531 Remove call to finalize_compilation_unit.
4532 Remove calls to debugging hooks.
4533 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4534 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4535 * c-tree.h: Remove c_write_global_declarations.
4536
ecb9f223
AM
45372015-06-04 Andrew MacLeod <amacleod@redhat.com>
4538
4539 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4540 * c-aux-info.c: Likewise.
4541 * c-convert.c: Likewise.
4542 * c-decl.c: Likewise.
4543 * c-errors.c: Likewise.
4544 * c-lang.c: Likewise.
4545 * c-objc-common.c: Likewise.
4546 * c-parser.c: Likewise.
4547 * c-typeck.c: Likewise.
4548
9482b620
MP
45492015-06-04 Marek Polacek <polacek@redhat.com>
4550
4551 PR c/66341
4552 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4553 it is a lvalue.
4554
bc51ace3
PK
45552015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4556
4557 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4558 Warn for empty struct.
4559 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4560
ea5b45b6
AT
45612015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4562
4563 * c-decl.c (start_function): Call plugin before parsing.
4564 (finish_function): Call plugin after parsing.
4565
c2d47482
PK
45662015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4567
4568 PR c/49551
4569 * c-decl.c (merge_decls): Merge DECL_COMMON.
4570
a95492ab
JW
45712015-05-22 Jim Wilson <jim.wilson@linaro.org>
4572
4573 * Make-lang.in (check_gcc_pallelize): Define.
4574
fd5c817a
MP
45752015-05-22 Marek Polacek <polacek@redhat.com>
4576
4577 PR c/47043
4578 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4579 attributes.
4580
c7b70a3c
MP
45812015-05-21 Marek Polacek <polacek@redhat.com>
4582
4583 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4584 DECL_BUILT_IN.
4585
21b634ae
MP
45862015-05-20 Marek Polacek <polacek@redhat.com>
4587
4588 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4589 * c-typeck.c: Likewise.
4590
296a8c2f
MP
45912015-05-19 Marek Polacek <polacek@redhat.com>
4592
4593 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4594
41b37d5e
JJ
45952015-05-19 Jakub Jelinek <jakub@redhat.com>
4596
4597 PR middle-end/66199
4598 * c-parser.c (c_parser_omp_for_loop): Don't add
4599 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4600 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4601 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4602 constructs.
4603
fab27f52
MM
46042015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4605
4606 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4607 swaps.
fab27f52 4608
40de31cf
MLI
46092015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4610
4611 PR fortran/44054
4612 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4613 accessor function.
4614
3aa3c9fc
MP
46152015-05-14 Marek Polacek <polacek@redhat.com>
4616
4617 PR c/66066
4618 PR c/66127
4619 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4620 rather than with 0.
4621
c3388e62
DM
46222015-05-12 David Malcolm <dmalcolm@redhat.com>
4623
4624 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4625 to add a call to warn_for_misleading_indentation.
4626 (c_parser_else_body): Likewise, adding param "else_loc".
4627 (c_parser_if_statement): Check for misleading indentation.
4628 (c_parser_while_statement): Likewise.
4629 (c_parser_for_statement): Likewise.
4630
755e528f
MP
46312015-05-08 Marek Polacek <polacek@redhat.com>
4632
4633 PR c/64918
4634 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4635 (output_init_element): Likewise.
4636
0173bd2a
MP
46372015-05-07 Marek Polacek <polacek@redhat.com>
4638
4639 PR c/65179
4640 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4641 value.
4642
9babc352
MP
46432015-04-30 Marek Polacek <polacek@redhat.com>
4644
4645 * c-typeck.c (set_init_label): Call error_at instead of error and
4646 pass LOC to it.
4647
ac9f18db
MP
4648 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4649 the type of a decl.
4650
ec3fba51
MP
4651 * c-typeck.c (c_build_va_arg): Clarify the error message.
4652
b811915d
TS
46532015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4654
4655 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4656 OMP_STANDALONE_CLAUSES.
4657
f3075008
MP
46582015-04-28 Marek Polacek <polacek@redhat.com>
4659
4660 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4661
4e81b788
MP
46622015-04-28 Marek Polacek <polacek@redhat.com>
4663
4664 PR c/65901
4665 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4666
6c1db78e
MP
46672015-04-25 Marek Polacek <polacek@redhat.com>
4668
4669 PR c/52085
4670 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4671 attribute.
4672
5c4abbb8
MP
46732015-04-23 Marek Polacek <polacek@redhat.com>
4674
4675 PR c/65345
4676 * c-decl.c (set_labels_context_r): New function.
4677 (store_parm_decls): Call it via walk_tree_without_duplicates.
4678 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4679 instead of create_tmp_var. Build TARGET_EXPR instead of
4680 COMPOUND_EXPR.
4681 (build_atomic_assign): Use create_tmp_var_raw instead of
4682 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4683
06aca1d5
IV
46842015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4685
4686 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4687 (c_parser_omp_target_update): Add missed %> to error_at ().
4688
8fba1830
BRF
46892015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4690
4691 PR target/55143
4692 * c-decl.c (c_default_pointer_mode): Remove definition.
4693 * c-tree.h (c_default_pointer_mode): Remove declaration.
4694
62021f64
TB
46952015-03-27 Tobias Burnus <burnus@net-b.de>
4696
4697 PR c/65586
4698 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4699 error out.
4700 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4701 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4702 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4703
9b65e171
JJ
47042015-03-19 Jakub Jelinek <jakub@redhat.com>
4705
4706 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4707 attribute for DECL_EXTERNAL VAR_DECLs.
4708
17958621
JJ
47092015-03-11 Jakub Jelinek <jakub@redhat.com>
4710
4711 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4712 argument.
4713
7ccb1a11
JJ
47142015-03-10 Jakub Jelinek <jakub@redhat.com>
4715
4716 PR c/65120
4717 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4718 before preparing arguments to warn_logical_not_parentheses.
4719
01177669
JJ
47202015-03-09 Jakub Jelinek <jakub@redhat.com>
4721
4722 PR c/65120
4723 * c-typeck.c (parser_build_binary_op): Don't warn for
4724 !!x == y or !b == y where b is _Bool.
4725
802ac282
MP
47262015-03-09 Marek Polacek <polacek@redhat.com>
4727
4728 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4729 * c-decl.c (grokdeclarator): Likewise.
4730 * c-typeck.c (build_binary_op): Likewise.
4731
e5165b60
MP
47322015-02-27 Marek Polacek <polacek@redhat.com>
4733
4734 PR c/65228
4735 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4736
065d214c
MP
47372015-02-14 Marek Polacek <polacek@redhat.com>
4738
4739 PR c/64768
4740 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4741 declared through a typedef name.
4742
e5d9235b
MP
47432015-02-13 Marek Polacek <polacek@redhat.com>
4744
4745 PR c/65050
4746 * c-decl.c (grokdeclarator): Print also the type when giving
4747 the error message about array's incomplete element type.
4748
fa01ffcc
JJ
47492015-02-11 Jakub Jelinek <jakub@redhat.com>
4750
4751 PR c/64824
4752 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4753 check in the POP macro.
4754
c3e38a03
MP
47552015-02-09 Marek Polacek <polacek@redhat.com>
4756
4757 PR c/64856
4758 * c-typeck.c (process_init_element): Don't always wrap
4759 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4760 initializing a range of elements.
4761
4886ec8e
JJ
47622015-02-04 Jakub Jelinek <jakub@redhat.com>
4763
4764 PR c/64824
4765 PR c/64868
4766 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4767
c3e38a03 47682015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4769
4770 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4771 processing enum declaration.
4772
7b33f0c8
MP
47732015-01-29 Marek Polacek <polacek@redhat.com>
4774
4775 PR c/64709
4776 * c-typeck.c (pop_init_level): If constructor_elements has
4777 exactly one element with integer_zerop value, set constructor_zeroinit
4778 to 1. Remove braces around warning_init call.
4779
dea63e49
JJ
47802015-01-27 Jakub Jelinek <jakub@redhat.com>
4781
4782 PR c/64766
4783 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4784 of FUNCTION_DECLs with error_mark_node.
4785
d38f7dce
JJ
47862015-01-26 Jakub Jelinek <jakub@redhat.com>
4787
4788 PR c/64778
4789 * c-typeck.c (convert_arguments): Return -1 if there are
4790 error_args, even if we've diagnosed too many arguments.
4791
cbf5d0e7
RB
47922015-01-21 Richard Biener <rguenther@suse.de>
4793
4794 PR middle-end/64313
4795 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4796 for builtins the user declared correctly.
4797
41dbbb37
TS
47982015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4799 Bernd Schmidt <bernds@codesourcery.com>
4800 Cesar Philippidis <cesar@codesourcery.com>
4801 James Norris <jnorris@codesourcery.com>
4802 Jakub Jelinek <jakub@redhat.com>
4803 Ilmir Usmanov <i.usmanov@samsung.com>
4804
4805 * c-parser.c: Include "gomp-constants.h".
4806 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4807 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4808 Use OMP_CLAUSE_SET_MAP_KIND.
4809 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4810 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4811 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4812 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4813 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4814 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4815 "copyout", "create", "delete", "deviceptr", "gang", "host",
4816 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4817 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4818 "present_or_create", "pcreate", "seq", "self", "vector",
4819 "vector_length", "wait", "worker".
4820 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4821 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4822 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4823 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4824 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4825 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4826 (c_parser_oacc_data_clause_deviceptr)
4827 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4828 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4829 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4830 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4831 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4832 (c_parser_oacc_parallel, c_parser_oacc_update)
4833 (c_parser_oacc_wait): New functions.
4834 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4835 (c_finish_oacc_data): New prototypes.
4836 * c-typeck.c: Include "gomp-constants.h".
4837 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4838 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4839 OMP_CLAUSE_SET_MAP_KIND.
4840 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4841 (c_finish_oacc_data): New functions.
4842 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4843 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4844 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4845 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4846 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4847 GOMP_MAP_FORCE_DEVICEPTR.
4848
adfac8df
JJ
48492015-01-09 Michael Collison <michael.collison@linaro.org>
4850
4851 * c-array-notation.c: Include hash-set.h, machmode.h,
4852 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4853 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4854 * c-aux-info.c: Ditto.
4855 * c-convert.c: Ditto.
4856 * c-decl.c: Ditto.
4857 * c-errors.c: Ditto.
4858 * c-lang.c: Dittoxs.
4859 * c-objc-common.c: Ditto.
4860 * c-parser.c: Ditto.
4861 * c-typeck.c: Include hash-set.h, machmode.h,
4862 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4863 fold-const.h, wide-int.h, inchash.h, real.h and
4864 fixed-value.h due to flattening of tree.h.
4865
2cc901dc
MP
48662015-01-07 Marek Polacek <polacek@redhat.com>
4867
4868 PR c/64417
4869 * c-typeck.c (process_init_element): Disallow initialization of
4870 a flexible array member with a string constant if the structure
4871 is in an array.
4872
5624e564
JJ
48732015-01-05 Jakub Jelinek <jakub@redhat.com>
4874
e5341100
JJ
4875 PR sanitizer/64344
4876 * c-typeck.c (convert_for_assignment, c_finish_return): For
4877 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4878 types also set in_late_binary_op around convert call.
4879 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4880 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4881 result on expr as last argument to ubsan_instrument_float_cast,
4882 if in_late_binary_op, don't use c_save_expr but save_expr.
4883
5624e564
JJ
4884 Update copyright years.
4885
5bd012f8
MP
48862015-01-05 Marek Polacek <polacek@redhat.com>
4887
4888 PR c/64423
4889 * c-typeck.c (build_array_ref): Pass loc down to
4890 warn_array_subscript_with_type_char.
4891
3f8257db 48922014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4893
4894 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4895 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4896 element type.
8e745a17 4897 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4898 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4899 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4900 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4901 to PEDWARN_FOR_QUALIFIERS.
768952be 4902
8f94a8c4
JJ
49032014-12-17 Jakub Jelinek <jakub@redhat.com>
4904
4905 PR sanitizer/64289
4906 * c-convert.c: Include ubsan.h.
4907 (convert): For real -> integral casts and
4908 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4909 instead instrument the float cast directly.
4910
b731b390
JJ
49112014-11-29 Jakub Jelinek <jakub@redhat.com>
4912
4913 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4914 c_finish_stmt_expr): Remove NULL last argument from
4915 create_tmp_var_raw and create_tmp_var calls.
4916 * c-array-notation.c (fix_builtin_array_notation_fn,
4917 build_array_notation_expr, fix_conditional_array_notations_1,
4918 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4919
541e35a6
MP
49202014-11-28 Marek Polacek <polacek@redhat.com>
4921
4922 PR c/63862
4923 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4924 convert the right operand to integer type.
4925
b286be94
MP
49262014-11-25 Marek Polacek <polacek@redhat.com>
4927
4928 PR c/63877
4929 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4930 for inline functions.
4931
aa7da51a
JJ
49322014-11-21 Jakub Jelinek <jakub@redhat.com>
4933
4934 PR target/63764
4935 * c-typeck.c (build_array_ref): Adjust
4936 convert_vector_to_pointer_for_subscript caller. If it returns true,
4937 call non_lvalue_loc on the result.
4938
d876207f
RB
49392014-11-11 Richard Biener <rguenther@suse.de>
4940
4941 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4942 to true.
4943
e5e44252
AK
49442014-11-10 Andi Kleen <ak@linux.intel.com>
4945
4946 PR c/60804
4947 * c-parser.c (c_parser_statement_after_labels): Call
4948 check_no_cilk.
4949 (c_parser_if_statement): Dito.
4950 (c_parser_switch_statement): Dito.
4951 (c_parser_while_statement): Dito.
4952 (c_parser_do_statement): Dito.
4953 (c_parser_for_statement): Dito.
4954 * c-typeck.c (c_finish_loop): Dito.
4955
13c21655
PC
49562014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4957
4958 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4959 OPT_Wshift_count_overflow in the warnings.
4960
2d51fcef
MP
49612014-10-30 Marek Polacek <polacek@redhat.com>
4962
4963 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4964 print the stripped version as well, if they're not the same.
4965
ef4bddc2
RS
49662014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4967
4968 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4969 machine_mode.
4970
c582198b
AM
49712014-10-28 Andrew MacLeod <amacleod@redhat.com>
4972
4973 * c-decl.c: Adjust include files.
4974 * c-parser.c: Ditto.
4975
ddc8de03
PM
49762014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4977 Tom Tromey <tromey@redhat.com>
4978
4979 * c-tree.h (enum c_oracle_request): New.
4980 (c_binding_oracle_function): New typedef.
4981 (c_binding_oracle, c_pushtag, c_bind): Declare.
4982 * c-decl.c (c_binding_oracle): New global.
4983 (I_SYMBOL_CHECKED): New macro.
4984 (i_symbol_binding): New function.
4985 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
4986 (I_TAG_CHECKED): New macro.
4987 (i_tag_binding): New function.
4988 (I_TAG_BINDING, I_TAG_DECL): Redefine.
4989 (I_LABEL_CHECKED): New macro.
4990 (i_label_binding): New function.
4991 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
4992 (c_print_identifier): Save and restore c_binding_oracle.
4993 (c_pushtag, c_bind): New functions.
4994
60393bbc
AM
49952014-10-27 Andrew MacLeod <amacleod@redhat.com>
4996
4997 * c-typeck.c: Adjust include files.
4998
d723bb7c
MLI
49992014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5000
5001 PR c++/53061
5002 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5003 initialization here...
5004 (c_initialize_diagnostics): ... but here. Set defaults after
5005 building pretty-printer.
5006
1bc5a451
MP
50072014-10-23 Marek Polacek <polacek@redhat.com>
5008
5009 PR c/63626
5010 * c-decl.c (pop_scope): Don't print warning in external_scope.
5011
4435bb92
MP
50122014-10-19 Marek Polacek <polacek@redhat.com>
5013
5014 PR c/63567
5015 * c-typeck.c (output_init_element): Allow initializing objects with
5016 static storage duration with compound literals even in C99 and add
5017 pedwarn for it.
5018
7278465e
MP
50192014-10-17 Marek Polacek <polacek@redhat.com>
5020
5021 PR c/63567
5022 * c-typeck.c (digest_init): Allow initializing objects with static
5023 storage duration with compound literals even in C99 and add pedwarn
5024 for it.
5025
d9b7be2e
MP
50262014-10-17 Marek Polacek <polacek@redhat.com>
5027
5028 PR c/63543
5029 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5030 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5031 error multiple times. Print the type.
5032
f406ae1f
MP
50332014-10-17 Marek Polacek <polacek@redhat.com>
5034
5035 PR c/63549
5036 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5037 type.
5038
92574c7c
MP
50392014-10-17 Marek Polacek <polacek@redhat.com>
5040
5041 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5042 (start_function): Use OPT_Wimplicit_int instead of 0.
5043 (store_parm_decls_oldstyle): Likewise.
5044
1bc4a978
MT
50452014-10-17 Alan Modra <amodra@gmail.com>
5046
5047 PR middle-end/61848
5048 * c-decl.c (merge_decls): Don't merge section name or tls model
5049 to newdecl symtab node, instead merge to olddecl. Override
5050 existing olddecl section name. Set tls_model for all thread-local
5051 vars, not just OMP thread-private ones. Remove incorrect comment.
5052
83685514
AM
50532014-10-16 Andrew MacLeod <amacleod@redhat.com>
5054
5055 * c-decl.c: Adjust include files.
5056
78a7c317
DD
50572014-10-14 DJ Delorie <dj@redhat.com>
5058
5059 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5060 (c_token_starts_typename): Check all __intN, not just __int128.
5061 (c_token_starts_declspecs): Likewise.
5062 (c_parser_declspecs): Likewise.
5063 (c_parser_attribute_any_word): Likewise.
5064 (c_parser_objc_selector): Likewise.
5065 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5066 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5067 is specified.
5068 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5069 __int128.
5070 (finish_declspecs): Likewise.
5071
74d98c1e
AB
50722014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5073
8e745a17 5074 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5075 the duplicate code.
8e745a17 5076 (c_parser_statement): Call the new function.
74d98c1e 5077
84937de2
MP
50782014-10-09 Marek Polacek <polacek@redhat.com>
5079
5080 PR c/63480
5081 * c-typeck.c (pop_init_level): Don't warn about initializing
5082 with { }.
5083
0382aaa0
MP
50842014-10-07 Marek Polacek <polacek@redhat.com>
5085
5086 PR c/59717
5087 * c-decl.c (header_for_builtin_fn): New function.
5088 (implicitly_declare): Suggest which header to include.
5089
7a0ca710
MP
50902014-10-07 Marek Polacek <polacek@redhat.com>
5091
5092 * c-convert.c (convert): Use error_operand_p.
5093 * c-typeck.c (require_complete_type): Likewise.
5094 (really_atomic_lvalue): Likewise.
5095 (digest_init): Likewise.
5096 (handle_omp_array_sections_1): Likewise.
5097
6bc8a126
MP
50982014-10-03 Marek Polacek <polacek@redhat.com>
5099
5100 PR c/63453
5101 * c-decl.c (pop_scope): Don't warn about "inline function declared
5102 but never defined" for functions marked with gnu_inline attribute.
5103
d90c0a59
JJ
51042014-09-25 Jakub Jelinek <jakub@redhat.com>
5105
5106 PR c++/63249
5107 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5108 on low_bound and length.
5109
083e891e
MP
51102014-09-24 Marek Polacek <polacek@redhat.com>
5111
5112 PR c/61405
5113 PR c/53874
5114 * c-parser.c: Don't define CPP_KEYWORD.
5115 (c_parser_switch_statement): Pass original type to c_finish_case.
5116 * c-tree.h (c_finish_case): Update declaration.
5117 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5118 conditionally to c_do_switch_warnings.
5119
8d95fe25
MP
51202014-09-03 Marek Polacek <polacek@redhat.com>
5121
5122 PR c/62024
5123 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5124 conversions.
5125
9a771876
JJ
51262014-09-02 Jakub Jelinek <jakub@redhat.com>
5127 Balaji V. Iyer <balaji.v.iyer@intel.com>
5128 Igor Zamyatin <igor.zamyatin@intel.com>
5129
5130 * c-parser.c (c_parser_cilk_for): New function.
5131 (c_parser_cilk_grainsize): Likewise.
5132 (c_get_temp_regvar): Likewise.
5133 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5134 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5135 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5136 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5137 case.
5138
b7679d96
CG
51392014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5140
5141 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5142 with using HOST_WIDE_INT without truncation to 'int'
5143
59ea0364
MP
51442014-08-22 Marek Polacek <polacek@redhat.com>
5145
5146 PR c++/62199
5147 * c-typeck.c (parser_build_binary_op): Adjust call to
5148 warn_logical_not_parentheses.
5149
671a475e
IZ
51502014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5151
5152 PR other/62008
5153 * c-parser.c (c_parser_array_notation): Check for correct
5154 type of an array added.
5155
04159acf
MP
51562014-08-19 Marek Polacek <polacek@redhat.com>
5157
5158 PR c++/62153
5159 * c-typeck.c (build_binary_op): If either operand of a comparison
5160 is a boolean expression, call maybe_warn_bool_compare.
5161
c77935ee
PP
51622014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5163
5164 PR c/45584
5165 * c-typeck.c (build_c_cast): Do a conversion even when the
5166 TYPE_MAIN_VARIANTs are the same.
5167
35aff4fb
MP
51682014-08-19 Marek Polacek <polacek@redhat.com>
5169
5170 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5171 pedwarn_c99 instead of pedwarn.
5172 (grokfield): Likewise.
5173 (warn_defaults_to): New function.
5174 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5175 Unconditionally call pedwarn_c99 instead of pedwarn.
5176 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5177 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5178 check flag_isoc11 before.
5179 * c-errors.c (pedwarn_c99): Change the return type to bool.
5180 Handle -Wc99-c11-compat.
5181 * c-parser.c (disable_extension_diagnostics): Handle
5182 warn_c99_c11_compat.
5183 (restore_extension_diagnostics): Likewise.
5184 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5185 instead of pedwarn, don't check flag_isoc11 before.
5186 (c_parser_declspecs): Likewise.
5187 (c_parser_alignas_specifier): Likewise.
5188 (c_parser_alignof_expression): Likewise.
5189 (c_parser_generic_selection): Likewise.
5190 * c-tree.h (pedwarn_c99): Update declaration.
5191 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5192 of pedwarn_c99.
5193
177cce46
MP
51942014-08-19 Marek Polacek <polacek@redhat.com>
5195
5196 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5197 to pedwarn_c90.
5198 * c-errors.c: Include "opts.h".
5199 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5200 * c-parser.c (disable_extension_diagnostics): Handle negative value
5201 of warn_c90_c99_compat, too.
5202 (restore_extension_diagnostics): Likewise.
5203 (c_parser_compound_statement_nostart): Pass
5204 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5205
6dc99c33
MP
52062014-08-12 Marek Polacek <polacek@redhat.com>
5207
5208 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5209 Add pedwarn.
5210 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5211 Likewise.
5212 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5213
3f8257db 52142014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5215
5216 PR c/51849
5217 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5218 Call pedwarn_c90 instead of pedwarn.
5219 (check_bitfield_type_and_width): Likewise.
5220 (declspecs_add_qual): Likewise.
5221 (declspecs_add_type): Likewise.
5222 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5223 Adjust to only call pedwarn_c90.
5224 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5225 pedwarn_c90 instead of pedwarn.
5226 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5227 * c-parser.c (disable_extension_diagnostics): Handle
5228 warn_c90_c99_compat.
5229 (restore_extension_diagnostics): Likewise.
5230 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5231 pedwarn_c90 instead of pedwarn.
5232 (c_parser_initelt): Likewise.
5233 (c_parser_postfix_expression): Likewise.
5234 (c_parser_postfix_expression_after_paren_type): Likewise.
5235 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5236 * c-tree.h: Fix formatting.
5237 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5238 pedwarn_c90 instead of pedwarn.
5239
9f25a338
TS
52402014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5241
5242 * c-typeck.c: Remove include of pointer-set.h.
5243
044331a8
MP
52442014-08-07 Marek Polacek <polacek@redhat.com>
5245
5246 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5247
b787e7a2
TS
52482014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5249
5250 * c-typeck.c: Use hash_map instead of pointer_map.
5251
6e2830c3
TS
52522014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5253
5254 * c-decl.c: Use hash_set instead of pointer_set.
5255
a7ee52fb
IZ
52562014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5257
5258 PR middle-end/61455
5259 * c-array-notation.c (expand_array_notations): Handling
5260 of DECL_EXPR added.
5261
b4dfdc11
MG
52622014-07-31 Marc Glisse <marc.glisse@inria.fr>
5263
5264 PR c++/60517
5265 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5266 a local variable.
5267
976d5a22
TT
52682014-07-30 Tom Tromey <tromey@redhat.com>
5269
5270 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5271 field.
5272 (really_start_incremental_init, push_init_level): Initialize
5273 designator_depth.
5274 (pop_init_level): Set global designator_depth.
5275 (process_init_element): Check for designated_init attribute.
5276
30281de2
MP
52772014-07-20 Marek Polacek <polacek@redhat.com>
5278
5279 PR c/61852
5280 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5281 (implicitly_declare): Pass location to implicit_decl_warning.
5282
b108f48f
JJ
52832014-07-14 Jakub Jelinek <jakub@redhat.com>
5284
5285 PR middle-end/61294
5286 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5287 If non-NULL, call c_parser_check_literal_zero.
5288 (c_parser_check_literal_zero): New function.
5289 (c_parser_postfix_expression_after_primary): Adjust
5290 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5291
773ec47f
MP
52922014-07-06 Marek Polacek <polacek@redhat.com>
5293
5294 PR c/6940
5295 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5296 * c-tree.h (C_ARRAY_PARAMETER): Define.
5297 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5298 function parameter.
5299
22e1cf1c 53002014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5301 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5302
5303 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5304 releasing symbol.
5305
52ec0ea3
MP
53062014-07-01 Marek Polacek <polacek@redhat.com>
5307
5308 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5309 instead of 0 to WARN_FOR_ASSIGNMENT.
5310
d5c3d343
MP
53112014-07-01 Marek Polacek <polacek@redhat.com>
5312
5313 PR c/58286
5314 * c-typeck.c (convert_for_assignment): Pass
5315 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5316
6a7253a4
MP
53172014-06-30 Marek Polacek <polacek@redhat.com>
5318
5319 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5320 has no_sanitize_undefined attribute.
5321
5e88a8f4
IZ
53222014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5323
5324 PR middle-end/57541
5325 * c-array-notation.c (fix_builtin_array_notation_fn):
5326 Check for 0 arguments in builtin call. Check that bultin argument is
5327 correct.
5328 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5329 index.
5330
9698b078
SH
53312014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5332
5333 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5334 qualifiers in __auto_type for atomic types.
5335 (c_parser_typeof_specifier): Discard all type qualifiers in
5336 __typeof__ for atomic types.
5337
6e07c515
MP
53382014-06-25 Marek Polacek <polacek@redhat.com>
5339
5340 PR c/61162
5341 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5342 the return expression to c_finish_return.
5343
da6f124d
JJ
53442014-06-25 Jakub Jelinek <jakub@redhat.com>
5345
5346 * c-typeck.c (c_finish_omp_clauses): Make sure
5347 OMP_CLAUSE_LINEAR_STEP has correct type.
5348
c203e8a7
TS
53492014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5350
5351 * c-decl.c: Adjust.
5352
56ad0e38
JJ
53532014-06-24 Jakub Jelinek <jakub@redhat.com>
5354
5355 * c-parser.c (c_parser_omp_for_loop): For
5356 #pragma omp parallel for simd move lastprivate clause from parallel
5357 to for rather than simd.
5358
47c2554f
MP
53592014-06-23 Marek Polacek <polacek@redhat.com>
5360
5361 * c-typeck.c (parser_build_binary_op): Don't call
5362 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5363
56363ffd
JH
53642014-06-15 Jan Hubicka <hubicka@ucw.cz>
5365
5366 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5367 * c-decl.c (merge_decls): Likewise.
5368
d7ff7ae5
MP
53692014-06-09 Marek Polacek <polacek@redhat.com>
5370
5371 PR c/36446
5372 * c-typeck.c (error_init): Call inform instead of error_at.
5373 (pedwarn_init): Call inform instead of pedwarn.
5374 (warning_init): Call inform instead of warning_at.
5375
24d047a3
JH
53762014-06-07 Jan Hubicka <hubicka@ucw.cz>
5377
5378 * c-decl.c (merge_decls): Use set_decl_section_name.
5379 (duplicate_decls): Remove node if it exists.
5380
9bac5cbb
G
53812014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5382
5383 PR c/53119
5384 * c-typeck.c (push_init_level, process_init_element,
5385 pop_init_level): Correct check for zero initialization, move
5386 missing brace warning to respect zero initialization.
5387
8ffcdea8
MP
53882014-06-05 Marek Polacek <polacek@redhat.com>
5389
5390 PR c/56724
5391 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5392
742938c9
MP
53932014-06-05 Marek Polacek <polacek@redhat.com>
5394
5395 PR c/49706
5396 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5397 on the left hand side operand of a comparison.
742938c9 5398
6447c55d
MP
53992014-06-05 Marek Polacek <polacek@redhat.com>
5400
5401 PR c/48062
5402 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5403 Print note only if the warning was printed.
5404
9dc7743c
IZ
54052014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5406
5407 PR c/58942
5408 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5409 with a pointer.
5410
fedfecef
MP
54112014-06-03 Marek Polacek <polacek@redhat.com>
5412
5413 PR c/60439
5414 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5415 c_start_case.
5416 * c-tree.h (c_start_case): Update.
5417 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5418 switch condition has boolean value.
5419
9b2b7279
AM
54202014-06-02 Andrew MacLeod <amacleod@redhat.com>
5421
5422 * c-decl.c: Include builtins.h.
5423 * c-parser.c: Likewise.
5424
5c1bc275
MP
54252014-05-27 Marek Polacek <polacek@redhat.com>
5426
5427 PR c/56724
5428 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5429 error and warning calls to error_at and warning_at. Pass location of
5430 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5431 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5432 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5433
97563bc8
IZ
54342014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5435
5436 PR c/61191
5437 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5438 function parameters.
5439
aede2c10
JH
54402014-05-23 Jan Hubicka <hubicka@ucw.cz>
5441
5442 * c-decl.c (merge_decls): Preserve symtab node pointers.
5443 (duplicate_decls): Free new decl.
5444
edbba2ce
TS
54452014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5446
f3316c6d
TS
5447 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5448 initialization.
5449
edbba2ce
TS
5450 * c-parser.c (c_parser_omp_target): Return bool values.
5451
68c81f24
TS
54522014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5453
5454 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5455 num_teams_loc variable to num_thread_limit_loc.
5456
632f2871
RS
54572014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5458
5459 * c-array-notation.c (expand_array_notations): Use void_node
5460 instead of void_zero_node.
5461
766090c2
TS
54622014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5463
5464 * c-decl.c (finish_struct): Adjust.
5465 (finish_enum): Likewise.
5466 (bind): Adjust.
5467 (record_inline_static): Likewise.
5468 (push_scope): Likewise.
5469 (make_label): Likewise.
5470 (lookup_label_for_goto): Likewise.
5471 (finish_struct): Likewise.
5472 (finish_enum): Likewise.
5473 (store_parm_decls): Likewise.
5474 (c_push_function_context): Likewise.
5475 * c-lang.h: Remove usage of variable_size gty attribute.
5476 * c-parser.c (c_parse_init): Adjust.
5477 (c_parse_file): Likewise.
5478
2b107f6b
MP
54792014-05-13 Marek Polacek <polacek@redhat.com>
5480
5481 PR c/61162
5482 * c-typeck.c (convert_for_assignment): Pass location to
5483 WARN_FOR_ASSIGNMENT instead of input_location.
5484
d033409e
MP
54852014-05-10 Marek Polacek <polacek@redhat.com>
5486
5487 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5488 maybe_warn_string_init.
5489 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5490 maybe_warn_string_init.
5491 * c-tree.h (maybe_warn_string_init): Update declaration.
5492 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5493 Call pedwarn_init with loc instead of with input_location.
5494 (digest_init): Pass init_loc to maybe_warn_string_init.
5495 (pop_init_level): Call pedwarn_init with loc instead of with
5496 input_location.
5497 (set_init_index): Likewise.
5498 (process_init_element): Likewise.
5499
ea58ef42
MP
55002014-05-09 Marek Polacek <polacek@redhat.com>
5501
5502 PR c/61096
5503 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5504 (c_parser_initelt): Pass location to set_init_label. Pass array index
5505 location to set_init_index.
5506 * c-tree.h (push_init_level): Update declaration.
5507 (pop_init_level): Likewise.
5508 (set_init_index): Likewise.
5509 (set_init_label): Likewise.
5510 * c-typeck.c (error_init): Add location parameter. Call error_at
5511 instead of error.
5512 (digest_init): Pass init_loc to error_init.
5513 (really_start_incremental_init):
5514 (push_init_level): Add location parameter. Pass loc to pop_init_level
5515 and error_init.
5516 (pop_init_level): Likewise.
5517 (set_designator): Add location parameter. Pass loc to pop_init_level,
5518 push_init_level, and error_init.
5519 (set_init_index): Add location parameter. Pass loc to error_init and
5520 set_designator.
5521 (set_init_label): Likewise.
5522 (output_init_element): Pass loc to error_init.
5523 (process_init_element): Pass loc to error_init, pop_init_level,
5524 pedwarn_init, and push_init_level.
5525
661a0813
MP
55262014-05-09 Marek Polacek <polacek@redhat.com>
5527
5528 PR c/50459
5529 * c-parser.c (c_parser_attributes): Parse the arguments as an
5530 expression-list if the attribute takes identifier.
5531
2793eeab
MP
55322014-05-08 Marek Polacek <polacek@redhat.com>
5533
5534 PR c/61053
5535 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5536 TYPE_ALIGN_UNIT.
5537
f827930a
MP
55382014-05-08 Marek Polacek <polacek@redhat.com>
5539
5540 PR c/61077
5541 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5542 of main.
5543
1d60af08
KZ
55442014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5545 Mike Stump <mikestump@comcast.net>
5546 Richard Sandiford <rdsandiford@googlemail.com>
5547
5548 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5549 (finish_enum): Use wide-int interfaces.
5550 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5551 * c-typeck.c (build_c_cast): Likewise.
5552 (set_nonincremental_init_from_string): Likewise.
5553 (c_tree_equal): Likewise.
5554
a0e24419
MP
55552014-05-02 Marek Polacek <polacek@redhat.com>
5556
5557 PR c/25801
5558 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5559 Return size_one_node when the type is not complete.
5560 (pointer_diff): Remove comment.
5561 (build_unary_op): Improve error messages.
5562
19fc9faa
MP
55632014-05-02 Marek Polacek <polacek@redhat.com>
5564
5565 * c-typeck.c (c_finish_return): Separate warning_at calls.
5566
63bc4e87
MP
55672014-05-02 Marek Polacek <polacek@redhat.com>
5568
5569 * c-tree.h (error_init): Remove declaration.
5570 (pedwarn_init): Likewise.
5571 * c-typeck.c (error_init): Make static and move above.
5572 (pedwarn_init): Likewise.
5573 (warning_init): Move above.
5574 (maybe_warn_string_init): Likewise.
5575
4bd2511b
JL
55762014-05-01 Jeff Law <law@redhat.com>
5577
5578 Revert:
5579
5580 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5581 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5582 avoid goto.
5583
6a358dcb
MP
55842014-05-02 Marek Polacek <polacek@redhat.com>
5585
5586 PR c/60784
5587 * c-typeck.c (push_init_level): Set constructor_designated to
5588 p->designated for structures.
5589
ae5ebda4
MP
55902014-05-01 Marek Polacek <polacek@redhat.com>
5591
5592 PR c/60915
5593 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5594 function-definition has an attribute after the declarator.
5595
96b40f8d
MP
55962014-05-01 Marek Polacek <polacek@redhat.com>
5597
5598 PR c/60257
5599 * c-typeck.c (warning_init): Add location_t parameter. Call
5600 warning_at instead of warning.
5601 (push_init_level): Pass input_location to warning_init.
5602 (add_pending_init): Add location_t parameter. Pass loc to
5603 warning_init.
5604 (set_nonincremental_init): Pass input_location to add_pending_init.
5605 (set_nonincremental_init_from_string): Likewise.
5606 (output_init_element): Pass loc to warning_init and to
5607 add_pending_init.
5608
32e00768
MP
56092014-05-01 Marek Polacek <polacek@redhat.com>
5610
5611 PR c/43395
5612 * c-typeck.c (c_finish_return): Distinguish between label and variable
5613 when warning about returning local address.
5614
c9379ce2
MP
56152014-05-01 Marek Polacek <polacek@redhat.com>
5616
5617 PR c/29467
5618 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5619 in C89 mode.
5620
d00887e8
MP
56212014-05-01 Marek Polacek <polacek@redhat.com>
5622
5623 PR c/43245
5624 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5625 instead of 0 to WARN_FOR_QUALIFIERS.
5626
5436fa2e
MP
56272014-05-01 Marek Polacek <polacek@redhat.com>
5628
5629 PR c/56989
5630 * c-typeck.c (default_conversion): Use better location for
5631 error call.
5632
f8ed5150
MP
56332014-04-30 Marek Polacek <polacek@redhat.com>
5634
5635 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5636 also when SANITIZE_FLOAT_DIVIDE is on.
5637
8337d1db
MP
56382014-04-30 Marek Polacek <polacek@redhat.com>
5639
5640 PR c/60139
5641 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5642 and pedwarn_init. Use loc insted of input_location.
5643
c4bdc42f
MP
56442014-04-30 Marek Polacek <polacek@redhat.com>
5645
5646 PR c/60351
5647 * c-typeck.c (build_binary_op): Use location when warning about
5648 shift count.
5649
45484dcf
MP
56502014-04-25 Marek Polacek <polacek@redhat.com>
5651
5652 PR c/18079
5653 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5654 always_inline/noinline and hot/cold attributes.
5655
34cf811f
MP
56562014-04-25 Marek Polacek <polacek@redhat.com>
5657
5658 PR c/60114
5659 * c-parser.c (c_parser_initelt): Pass input_location to
5660 process_init_element.
5661 (c_parser_initval): Pass loc to process_init_element.
5662 * c-tree.h (process_init_element): Adjust declaration.
5663 * c-typeck.c (push_init_level): Pass input_location to
5664 process_init_element.
5665 (pop_init_level): Likewise.
5666 (set_designator): Likewise.
5667 (output_init_element): Add location_t parameter. Pass loc to
5668 digest_init.
5669 (output_pending_init_elements): Pass input_location to
5670 output_init_element.
5671 (process_init_element): Add location_t parameter. Pass loc to
5672 output_init_element.
5673
42056eac
JJ
56742014-04-24 Jakub Jelinek <jakub@redhat.com>
5675
5676 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5677 atomic-clause, allow comma in between atomic-clause and
5678 seq_cst.
5679
e162a134
JJ
56802014-04-22 Jakub Jelinek <jakub@redhat.com>
5681
5682 PR c/59073
5683 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5684 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5685
2f6babac
IZ
56862014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5687
5688 PR middle-end/60469
5689 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5690 create_tmp_var instead build_decl for creating temps.
5691 (build_array_notation_expr): Likewise.
5692 (fix_conditional_array_notations_1): Likewise.
5693 (fix_array_notation_expr): Likewise.
5694 (fix_array_notation_call_expr): Likewise.
5695
8edbfaa6
JJ
56962014-03-28 Jakub Jelinek <jakub@redhat.com>
5697
5698 PR c++/60689
5699 * c-tree.h (c_build_function_call_vec): New prototype.
5700 * c-typeck.c (build_function_call_vec): Don't call
5701 resolve_overloaded_builtin here.
5702 (c_build_function_call_vec): New wrapper function around
5703 build_function_call_vec. Call resolve_overloaded_builtin here.
5704 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5705 Call c_build_function_call_vec instead of build_function_call_vec.
5706 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5707 * c-decl.c (finish_decl): Likewise.
5708
7485aeea
MLI
57092014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5710
5711 PR c/55383
5712 * c-typeck.c: Use correct format string in cast-qual warning
5713
b17a8b07
TS
57142014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5715
5716 * c-decl.c (c_decl_attributes): Use
5717 lang_hooks.types.omp_mappable_type.
5718 * c-typeck.c (c_finish_omp_clauses): Likewise.
5719
3af9c5e9
MP
57202014-03-06 Marek Polacek <polacek@redhat.com>
5721
5722 PR c/60197
5723 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5724 of checking tree code.
5725
1c9f5f33
PK
57262014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5727
5728 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5729 (c_parser_parameter_declaration): Likewise.
5730
cc28fc7f
MP
57312014-02-19 Marek Polacek <polacek@redhat.com>
5732
5733 PR c/60195
5734 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5735 Call mark_exp_read on exp.value.
5736 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5737 TREE_ADDRESSABLE on old instead of val.
5738 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5739
b581c05c
PK
57402014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5741
5742 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5743 C_EXPR_APPEND by vec_safe_push.
5744 * c-tree.h (C_EXPR_APPEND): Remove.
5745
81e5eca8
MP
57462014-01-31 Marek Polacek <polacek@redhat.com>
5747
5748 PR c/59963
5749 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5750 build_function_call_vec.
5751 (build_function_call): Likewise.
5752 (build_atomic_assign): Likewise.
5753 (build_function_call_vec): Add arg_loc parameter. Use it.
5754 (convert_arguments): Likewise.
5755 (convert_for_assignment): Rename rhs_loc to expr_loc.
5756 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5757 (c_parser_objc_keywordexpr): Likewise.
5758 (c_parser_postfix_expression_after_primary): Call
5759 build_function_call_vec with expr_loc rather than op_loc.
5760 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5761 build_function_call_vec.
5762 (c_parser_expr_list): Add locations parameter. Fill it with locations
5763 of function arguments.
5764 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5765
68fca595
MP
57662014-01-30 Marek Polacek <polacek@redhat.com>
5767
5768 PR c/59940
5769 * c-typeck.c (build_function_call_vec): Use loc parameter.
5770 (convert_arguments): Add location parameter. Use it.
5771 (ep_convert_and_check): Likewise.
5772 (build_atomic_assign): Adjust convert_for_assignment call.
5773 (build_modify_expr): Likewise.
5774 (digest_init): Likewise.
5775 (c_finish_return): Likewise.
5776 (build_conditional_expr): Adjust ep_convert_and_check calls.
5777 (convert_for_assignment): Add rhs_loc parameter. Use it.
5778 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5779 calls.
5780
fa337f3a
RB
57812014-01-30 Richard Biener <rguenther@suse.de>
5782
5783 PR c/59905
5784 * c-typeck.c (build_function_call_vec): Do not replace calls
5785 to a function via an incompatible type with a runtime abort.
5786
b72271b9
BI
57872014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5788
5789 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5790 flag_enable_cilkplus with flag_cilkplus.
5791 (c_parser_direct_declarator_inner): Likewise.
5792 (c_parser_attribute_any_word): Likewise.
5793 (c_parser_attributes): Likewise.
5794 (c_parser_compound_statement): Likewise.
5795 (c_parser_statement_after_labels): Likewise.
5796 (c_parser_if_statement): Likewise.
5797 (c_parser_switch_statement): Likewise.
5798 (c_parser_do_statement): Likewise.
5799 (c_parser_for_statement): Likewise.
5800 (c_parser_unary_expression): Likewise.
5801 (c_parser_postfix_expression): Likewise.
5802 (c_parser_postfix_expression_after_primary): Likewise.
5803 (c_parser_postfix_expression_after_primary): Likewise.
5804 (c_parser_omp_clause_name): Likewise.
5805 (c_finish_omp_declare_simd): Likewise.
5806 (c_parser_cilk_verify_simd): Likewise.
5807 * c-typeck.c (build_array_ref): Likewise.
5808 (build_function_call_vec): Likewise.
5809 (convert_arguments): Likewise.
5810 (build_compound_expr): Likewise.
5811 (c_finish_return): Likewise.
5812 (c_finish_if_stmt): Likewise.
5813 (c_finish_loop): Likewise.
5814 (build_binary_op): Likewise.
5815
393e8e8b
MP
58162014-01-23 Marek Polacek <polacek@redhat.com>
5817
5818 PR c/59846
5819 * c-typeck.c (parser_build_binary_op): Use location instead of
5820 input_location.
5821 (build_binary_op): Pass location to shorten_compare.
5822
f04dda30
MP
58232014-01-23 Marek Polacek <polacek@redhat.com>
5824
5825 PR c/58346
5826 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5827 an empty aggregate.
5828
789eadcd
MP
58292014-01-23 Marek Polacek <polacek@redhat.com>
5830
5831 PR c/59871
5832 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5833 of a comma expression.
5834 (emit_side_effect_warnings): Likewise.
5835
40f14e9f
BI
58362014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5837
5838 PR c/59825
5839 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5840 function to use walk_tree and moved a lot of its functionality to
5841 expand_array_notations.
5842 (expand_array_notations): New function.
5843
74558dd9
BI
58442014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5845
5846 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5847 attribute an attribute without value.
5848
652fea39
JJ
58492014-01-23 Jakub Jelinek <jakub@redhat.com>
5850
5851 PR middle-end/58809
5852 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5853 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5854
f34f1c87
MP
58552014-01-22 Marek Polacek <polacek@redhat.com>
5856
5857 PR c/59891
5858 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5859 of remove_c_maybe_const_expr on op1 and op2.
5860
241f845a
JJ
58612014-01-15 Jakub Jelinek <jakub@redhat.com>
5862
5863 PR c/58943
5864 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5865 effects, preevaluate rhs using SAVE_EXPR first.
5866
9a74f20c
BI
58672014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5868
5869 PR c++/59631
5870 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5871 statements with if-elseif statements.
5872
96066ce1
MP
58732014-01-06 Marek Polacek <polacek@redhat.com>
5874
5875 PR c/57773
5876 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5877 defined bit-field types only in ISO C.
5878
23a5b65a
RS
58792014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5880
5881 Update copyright years
5882
f9030485
RS
58832014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5884
5885 * c-array-notation.c: Use the standard form for the copyright notice.
5886
41958c28
BI
58872013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5888
5889 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5890 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5891 field in parser is not empty. If not-empty, call the function
5892 c_parser_finish_omp_declare_simd.
5893 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5894 between SIMD-enabled functions and #pragma simd. Added new parameter.
5895 (c_parser_cilk_all_clauses): Modified the usage of the function
5896 c_parser_cilk_clause_vectorlength as mentioned above.
5897 (c_parser_cilk_simd_fn_vector_attrs): New function.
5898 (c_finish_cilk_simd_fn_tokens): Likewise.
5899 (is_cilkplus_vector_p): Likewise.
5900 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5901 "nomask," and "mask" strings in clause name.
5902 (c_parser_omp_all_clauses): Added 3 new case statements:
5903 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5904 PRAGMA_CILK_CLAUSE_NOMASK.
5905 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5906 check for vector attribute and if so call the function
5907 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5908 called the function c_finish_cilk_simd_fn_tokens.
5909 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5910 parser field is non-empty. If so, parse them as you would parse
5911 the omp declare simd pragma.
5912 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5913 Added a check when step is a parameter and flag it as error.
5914 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5915 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5916 pragma_omp_clause.
5917
cef0fd0e
TS
59182013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5919
5920 * c-parser.c (c_parser_omp_parallel): Fix description.
5921
12893402
BI
59222013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5923
5924 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5925 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5926 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5927 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5928
296674db
JM
59292013-12-04 Joseph Myers <joseph@codesourcery.com>
5930
5931 PR c/52023
5932 * c-parser.c (c_parser_alignas_specifier): Use
5933 c_sizeof_or_alignof_type instead of c_alignof.
5934 (c_parser_alignof_expression): Likewise, with min_alignof
5935 parameter depending on alignof spelling used.
5936
edd28054
MP
59372013-12-04 Marek Polacek <polacek@redhat.com>
5938
5939 PR c/54113
5940 * c-decl.c (start_function): Don't warn for missing prototype for
5941 inline functions.
5942
da0fc454
MP
59432013-12-03 Marek Polacek <polacek@redhat.com>
5944
5945 PR c/59351
5946 * c-decl.c (build_compound_literal): Allow compound literals with
5947 empty initial value.
5948
4c2ecab0
JM
59492013-12-02 Joseph Myers <joseph@codesourcery.com>
5950
5951 PR c/58235
5952 * c-typeck.c (build_modify_expr): Diagnose assignment to
5953 expression with array type.
5954
340baef7
JM
59552013-11-29 Joseph Myers <joseph@codesourcery.com>
5956
5957 PR c/42262
5958 * c-typeck.c (process_init_element): Do not treat a string as
5959 initializing a whole array when used with a designator for an
5960 individual element.
5961
6763b9f7
JM
59622013-11-29 Joseph Myers <joseph@codesourcery.com>
5963
5964 PR c/57574
5965 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5966 an inline function following a static declaration.
5967
e7bd1de1
JJ
59682013-11-28 Jakub Jelinek <jakub@redhat.com>
5969
5970 PR c/59310
5971 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5972 to p_name before calling c_parser_omp_teams instead of after.
5973 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5974 argument. Remove unused p_name variable.
5975
0136f8f0
AH
59762013-11-27 Aldy Hernandez <aldyh@redhat.com>
5977 Jakub Jelinek <jakub@redhat.com>
5978
5979 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5980 external_scope is NULL.
5981
241b71bb
TV
59822013-11-27 Tom de Vries <tom@codesourcery.com>
5983 Marc Glisse <marc.glisse@inria.fr>
5984
5985 PR c++/59032
5986 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
5987
2fb9a547
AM
59882013-11-22 Andrew MacLeod <amacleod@redhat.com>
5989
5990 * c-typeck.c: Add required include files from gimple.h.
5991
8400e75e
DM
59922013-11-22 David Malcolm <dmalcolm@redhat.com>
5993
5994 * c-decl.c (define_label, shadow_tag_warned)
5995 (check_bitfield_type_and_width, grokdeclarator, grokparms,
5996 store_parm_decls_newstyle, store_parm_decls_oldstyle)
5997 (declspecs_add_type): Remove use of in_system_header macro.
5998 * c-parser.c (c_parser_unary_expression): Likewise.
5999 * c-typeck.c (store_init_value, process_init_element)
6000 (c_start_case): Likewise.
6001
6002 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6003 macro.
6004
6005 * c-parser.c (c_parser_set_source_position_from_token): Remove
6006 reference to in_system_header from comment.
6007
386b1f1f
RS
60082013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6009
6010 * c-decl.c (grokdeclarator): Update comment to refer to
6011 tree_to_[su]hwi rather than tree_low_cst.
6012
ae7e9ddd
RS
60132013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6014
6015 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6016 tree_to_uhwi throughout.
6017
9439e9a1
RS
60182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6019
6020 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6021 throughout.
6022
9541ffee
RS
60232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6024
6025 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6026 throughout.
6027
c02065fc
AH
60282013-11-15 Aldy Hernandez <aldyh@redhat.com>
6029
6030 * c-parser.c (c_parser_cilk_simd): New.
6031 (c_parser_cilk_verify_simd): New.
6032 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6033 (c_parser_omp_for_loop): Add case for NE_EXPR.
6034 Set c_break_label for CILK_SIMD.
6035 (c_parser_cilk_clause_vectorlength): New.
6036 (c_parser_cilk_clause_linear): New.
6037 (c_parser_cilk_clause_name): New.
6038 (c_parser_cilk_all_clauses): New.
6039 * c-typeck.c (build_unary_op): Pass location argument to
6040 readonly_error.
6041 (build_modify_expr): Same.
6042 (build_asm_expr): Same.
6043 (c_finish_bc_stmt): Error on break/continue in loops.
6044
18f429e2
AM
60452013-11-14 Andrew MacLeod <amacleod@redhat.com>
6046
6047 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6048
d8a2d370
DN
60492013-11-14 Diego Novillo <dnovillo@google.com>
6050
6051 * c-decl.c: Include print-tree.h.
6052 Include stor-layout.h.
6053 Include varasm.h.
6054 Include attribs.h.
6055 Include stringpool.h.
6056 * c-lang.c: Include fold-const.h.
6057 * c-parser.c: Include stringpool.h.
6058 Include attribs.h.
6059 Include stor-layout.h.
6060 Include varasm.h.
6061 Include trans-mem.h.
6062 * c-typeck.c: Include stor-layout.h.
6063 Include trans-mem.h.
6064 Include varasm.h.
6065 Include stmt.h.
6066
38b7bc7f
JM
60672013-11-13 Joseph Myers <joseph@codesourcery.com>
6068
6069 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6070 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6071 __auto_type.
6072 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6073 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6074 RID_AUTO_TYPE.
6075 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6076 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6077 (c_parser_declarator, c_parser_direct_declarator_inner)
6078 (c_parser_parameter_declaration, c_parser_type_name): All callers
6079 changed.
6080 (c_parser_declaration_or_fndef): Handle declarations with type
6081 determined from the initializer.
6082
45b0be94
AM
60832013-11-12 Andrew MacLeod <amacleod@redhat.com>
6084
18f429e2 6085 * c-typeck.c: Include gimplify.h.
45b0be94 6086
582d9b50
JM
60872013-11-12 Joseph Myers <joseph@codesourcery.com>
6088
6089 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6090 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6091 comment.
6092 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6093 or _Thread_local as appropriate in diagnostics.
6094 (build_null_declspecs): Initialize ret->thread_gnu_p.
6095 (declspecs_add_scspec): Handle either __thread or _Thread_local
6096 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6097 pedantic. Do not disallow _Thread_local extern and _Thread_local
6098 static.
6099
267bac10
JM
61002013-11-07 Joseph Myers <joseph@codesourcery.com>
6101 Andrew MacLeod <amacleod@redhat.com>
6102
6103 * c-aux-info.c (gen_type): Handle atomic qualifier.
6104 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6105 qualifiers when compating types.
6106 (shadow_tag_warned): Handle atomic_p in declspecs.
6107 (quals_from_declspecs): Likewise.
6108 (start_decl): Use c_type_promotes_to when promoting argument
6109 types.
6110 (grokdeclarator): Handle _Atomic.
6111 (get_parm_info): Diagnose any qualifier on "void" as only
6112 parameter.
6113 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6114 comparing types. Use c_type_promotes_to when promoting argument
6115 types.
6116 (finish_function): Use c_type_promotes_to when promoting argument
6117 types.
6118 (build_null_declspecs): Handle atomic_p in declspecs.
6119 (declspecs_add_qual): Handle RID_ATOMIC.
6120 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6121 (c_token_starts_declspecs): Handle RID_ATOMIC.
6122 (c_parser_declspecs): Handle atomic type specifiers and
6123 qualifiers.
6124 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6125 from types of expressions with atomic type.
6126 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6127 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6128 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6129 (c_parser_statement_after_labels, c_parser_switch_statement)
6130 (c_parser_for_statement, c_parser_expr_no_commas)
6131 (c_parser_conditional_expression, c_parser_binary_expression)
6132 (c_parser_cast_expression, c_parser_unary_expression)
6133 (c_parser_postfix_expression)
6134 (c_parser_postfix_expression_after_primary, c_parser_expression):
6135 Use convert_lvalue_to_rvalue.
6136 (c_parser_expression_conv, c_parser_expr_list): Document
6137 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6138 (c_parser_objc_synchronized_statement): Use
6139 convert_lvalue_to_rvalue.
6140 (c_parser_objc_selector): Handle RID_ATOMIC.
6141 (c_parser_objc_receiver, c_parser_array_notation): Use
6142 convert_lvalue_to_rvalue.
6143 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6144 _Atomic (type-name).
6145 (struct c_declspecs): Add atomic_p field.
6146 (convert_lvalue_to_rvalue): Declare.
6147 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6148 corresponding atomic types.
6149 (qualify_type): Don't add _Atomic qualifiers from second argument.
6150 (comp_target_types): Do not allow _Atomic mismatches.
6151 (type_lists_compatible_p): Do not remove atomic qualifiers when
6152 comparing types.
6153 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6154 (build_atomic_assign): New functions.
6155 (build_unary_op): Use build_atomic_assign for atomic increment and
6156 decrement.
6157 (build_conditional_expr): Do not treat _Atomic void as a qualified
6158 version of void.
6159 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6160 (find_anonymous_field_with_type, convert_to_anonymous_field)
6161 (convert_for_assignment): Do not remove atomic qualifiers when
6162 comparing types.
6163 (digest_init): Do not accept initialization of arrays of atomic
6164 elements by string constants.
6165 (build_asm_expr): Use convert_lvalue_to_rvalue.
6166 (build_binary_op): Do not treat _Atomic void as a qualified
6167 version of void.
6168
0c249d4b
DD
61692013-11-06 DJ Delorie <dj@redhat.com>
6170
6171 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6172 both explicit and builtin, print the location of the explicit one.
6173
6d7f7e0a
TB
61742013-11-05 Tobias Burnus <burnus@net-b.de>
6175
6176 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6177 c_parser_omp_distribute, c_parser_omp_teams,
6178 c_parser_omp_target, c_parser_omp_declare): Handle
6179 -fopenmp-simd.
6180
b906f4ca
MP
61812013-11-03 Marek Polacek <polacek@redhat.com>
6182
6183 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6184
ee1d5a02
JJ
61852013-11-01 Jakub Jelinek <jakub@redhat.com>
6186
6187 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6188 check_dup_generic at the end, unless remove is true.
6189 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6190 remove = true;.
6191 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6192
5a9785fb
JJ
61932013-10-31 Jakub Jelinek <jakub@redhat.com>
6194
6195 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6196 with decl that is not pointer nor array.
6197
939b37da
BI
61982013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6199
6200 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6201 a spawning function is found.
6202 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6203 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6204 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6205 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6206 case.
6207 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6208 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6209 expr.
6210 (c_finish_return): Added a check to reject _Cilk_spawn in return
6211 expression.
6212 (build_cilk_spawn): New function.
6213 (build_cilk_sync): Likewise.
6214 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6215
d4af74d4
TB
62162013-10-27 Tobias Burnus <burnus@net-b.de>
6217
6218 PR other/33426
6219 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6220 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6221 (c_parser_statement_after_labels): Update calls.
6222
d73749df 62232013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6224
6225 PR other/33426
6226 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6227 Handle PRAGMA_IVDEP.
6228 (c_parser_statement_after_labels): Update call.
6229
f28aa681
MP
62302013-10-24 Marek Polacek <polacek@redhat.com>
6231
6232 * c-parser.c (c_parser_struct_declaration): Add a comment.
6233 (c_parser_declarator): Don't allow _Alignas here.
6234
0645c1a2
AM
62352013-10-17 Andrew MacLeod <amacleod@redhat.com>
6236
6237 * c-parser.c: Include omp-low.h.
6238 * c-typeck.c: Likewise.
6239
568a31f2
MP
62402013-10-17 Marek Polacek <polacek@redhat.com>
6241
6242 PR c/58267
6243 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6244 Document syntax of the array-declarator.
6245 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6246 are not permitted.
6247 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6248 (c_parser_struct_declaration): Likewise.
6249 (c_parser_declarator): Likewise.
6250 (c_parser_direct_declarator_inner): Likewise.
6251 (c_parser_parameter_declaration): Likewise.
6252 (c_parser_type_name): Likewise.
6253
acf0174b
JJ
62542013-10-11 Jakub Jelinek <jakub@redhat.com>
6255
6256 * c-lang.h (current_omp_declare_target_attribute): New extern
6257 decl.
6258 * c-parser.c: Include c-lang.h.
6259 (struct c_parser): Change tokens to c_token *.
6260 Add tokens_buf field. Change tokens_avail type to unsigned int.
6261 (c_parser_consume_token): If parser->tokens isn't
6262 &parser->tokens_buf[0], increment parser->tokens.
6263 (c_parser_consume_pragma): Likewise.
6264 (enum pragma_context): Add pragma_struct and pragma_param.
6265 (c_parser_external_declaration): Adjust
6266 c_parser_declaration_or_fndef caller.
6267 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6268 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6269 Adjust recursive call.
6270 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6271 of pragma_external.
6272 (c_parser_parameter_declaration): Use pragma_param instead of
6273 pragma_external.
6274 (c_parser_compound_statement_nostart, c_parser_label,
6275 c_parser_for_statement): Adjust
6276 c_parser_declaration_or_fndef callers.
6277 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6278 it through to c_parser_conditional_expression.
6279 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6280 pass it through to c_parser_binary_expression. Adjust recursive
6281 call.
6282 (c_parser_binary_expression): Remove prec argument, add
6283 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6284 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6285 binop matches it, use build2 instead of parser_build_binary_op.
6286 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6287 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6288 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6289 Handle pragma_struct and pragma_param the same as pragma_external.
6290 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6291 (c_parser_omp_variable_list): Parse array sections for
6292 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6293 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6294 (c_parser_omp_clause_reduction): Handle user defined reductions.
6295 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6296 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6297 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6298 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6299 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6300 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6301 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6302 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6303 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6304 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6305 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6306 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6307 (c_parser_omp_for_loop): Add CODE argument, pass it through
6308 to c_finish_omp_for. Change last argument to cclauses,
6309 and adjust uses to grab parallel clauses from the array of all
6310 the split clauses. Adjust c_parser_binary_expression,
6311 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6312 (omp_split_clauses): New function.
6313 (c_parser_omp_simd): New function.
6314 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6315 Allow the function to be called also when parsing combined constructs,
6316 and call c_parser_omp_simd when parsing for simd.
6317 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6318 #pragma omp section, require exactly one structured-block instead of
6319 sequence of statements.
6320 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6321 Allow the function to be called also when parsing combined constructs.
6322 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6323 Allow the function to be called also when parsing combined
6324 constructs.
6325 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6326 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6327 c_parser_omp_teams, c_parser_omp_target_data,
6328 c_parser_omp_target_update, c_parser_omp_target,
6329 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6330 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6331 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6332 (c_parser_omp_construct): Add p_name and mask vars. Handle
6333 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6334 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6335 and c_parser_omp_sections callers.
6336 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6337 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6338 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6339 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6340 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6341 OMP_CLAUSE_DEPEND.
6342 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6343 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6344 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6345 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6346 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6347 * c-typeck.c: Include tree-inline.h.
6348 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6349 handle_omp_array_sections_1, handle_omp_array_sections,
6350 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6351 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6352 user defined reductions.
6353 (c_tree_equal): New function.
6354 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6355 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6356 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6357 c_check_omp_declare_reduction_r): New prototypes.
6358 * c-decl.c (current_omp_declare_target_attribute): New variable.
6359 (c_decl_attributes): New function.
6360 (start_decl, start_function): Use it instead of decl_attributes.
6361 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6362 c_omp_reduction_decl, c_omp_reduction_lookup,
6363 c_check_omp_declare_reduction_r): New functions.
6364
0a6c2227
TT
63652013-09-25 Tom Tromey <tromey@redhat.com>
6366
6367 * Make-lang.in (c/gccspec.o): Remove.
6368 (CFLAGS-c/gccspec.o): New variable.
6369 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6370 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6371 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6372
f3bc55f0
TT
63732013-09-25 Tom Tromey <tromey@redhat.com>
6374
6375 * Make-lang.in (c/gccspec.o): Don't use subshell.
6376
a24d975c
MP
63772013-09-18 Marek Polacek <polacek@redhat.com>
6378
6379 PR sanitize/58443
6380 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6381 Remove unnecessary check.
6382
ce6923c5
MP
63832013-09-18 Marek Polacek <polacek@redhat.com>
6384
6385 PR sanitizer/58411
6386 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6387 no_sanitize_undefined attribute.
6388
a1e51df9
KT
63892013-09-13 Kai Tietz <ktietz@redhat.com>
6390
6391 PR target/57848
6392 * c-decl.c (c_builtin_function_ext_scope): Remove
6393 wrong assumption that it is never called on prexisting
6394 symbol.
6395
0af94e6f
JR
63962013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6397
6398 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6399
20059c8b
GDR
64002013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6401
6402 * c-objc-common.c (c_tree_printer): Tidy.
6403
de5a5fa1
MP
64042013-08-30 Marek Polacek <polacek@redhat.com>
6405
6406 * c-typeck.c (build_binary_op): Add division by zero and shift
6407 instrumentation.
6408
2531a1d9 64092013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6410 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6411
6e2bcc98 6412 PR c/35649
2531a1d9
JR
6413 * c-typeck.c (c_common_type): Prefer double_type_node over
6414 other REAL_TYPE types with the same precision.
6415 (convert_arguments): Likewise.
6416
025311c4
GDR
64172013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6418
6419 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6420 (c_initialize_diagnostics): Call a destructor for the early printer.
6421
da6ca2b5
GDR
64222013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6423
6424 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6425 printer initialization.
6426
318cda85 64272013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6428
318cda85
BI
6429 PR c/57490
6430 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6431 check for truth values.
6432 (expand_array_notation_exprs): Added truth values case. Removed an
6433 unwanted else. Added for-loop to walk through subtrees in default
6434 case.
6435
b066401f
GDR
64362013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6437
6438 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6439
fb48aadc
JM
64402013-07-23 Joseph Myers <joseph@codesourcery.com>
6441
6442 * c-parser.c (struct c_generic_association): Fix typo.
6443
433cc7b0
TT
64442013-07-23 Tom Tromey <tromey@redhat.com>
6445 Joseph Myers <joseph@codesourcery.com>
6446
6447 * c-parser.c (struct c_generic_association): New.
6448 (c_generic_association_d): New typedef.
6449 (c_parser_generic_selection): New function.
6450 (c_parser_postfix_expression): Handle RID_GENERIC.
6451
26d40c3d
JM
64522013-07-13 Jason Merrill <jason@redhat.com>
6453
6454 PR c++/57793
6455 * c-decl.c (finish_struct): Check for too-large class.
6456
ecdbd01a 64572013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6458
6459 PR c/57821
6460 * c-typeck.c (set_init_index): When folding, check for index overflow.
6461
1141ed3f
BI
64622013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6463
6464 * c-parser.c (c_parser_array_notation): Removed rejection of array
6465 notations in an array of function pointers.
6466
713b46fa
BI
64672013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6468
6469 * c-array-notation.c (make_triplet_val_inv): New function.
6470 (create_cmp_incr): Likewise.
6471 (create_array_refs): Likewise.
6472 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6473 Also modularized common parts between functions and called the function.
6474 (build_array_notation_expr): Likewise.
6475 (fix_conditional_array_notations_1): Likewise.
6476 (fix_array_notation_expr): Likewise.
6477 (fix_array_notation_call_expr): Likewise.
6478
92f20202
MP
64792013-06-18 Marek Polacek <polacek@redhat.com>
6480
6481 PR c/57630
6482 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6483
73a23b06
BI
64842013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6485
6486 * c-array-notation.c (build_array_notation_expr): Reject array notation
6487 mismatch between LHS and RHS even inside a call_expr. Also, removed
6488 a couple while statements that were dead code.
6489
00b8517d
BI
64902013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6491
6492 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6493 excessive precision expressions in function parameters. Also removed
6494 couple unwanted while statements.
6495
1509bdda
BI
64962013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6497
6498 * c-array-notation.c (expand_array_notation_exprs): Added
6499 ARRAY_NOTATION_REF case.
ab20d992 6500
d60f1706
BI
65012013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6502
6503 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6504 function to c-family/array-notation-common.c.
6505 (is_cilkplus_reduce_builtin): Likewise.
6506 (find_rank): Likewise.
6507 (extract_array_notation_exprs): Likewise.
6508 (replace_array_notations): Likewise.
6509 (find_inv_trees): Likewise.
6510 (replace_inv_trees): Likewise.
6511 (contains_array_notation_expr): Likewise.
6512 (find_correct_array_notation_type): Likewise.
6513 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6514 (struct inv_list): Moved this to c-family/array-notation-common.c.
6515 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6516
6d6efbb3
BI
65172013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6518
6519 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6520 reduction functions outside the for-loop. Added a check if the fundecl
6521 is non-NULL. Finally, removed an unwanted if-statement, and made the
6522 body unconditional.
6523
25c22937
BI
65242013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6525
6526 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6527 condition of the if-statement matches the rank of else-block and then-
6528 block when array notations are used.
6529 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6530 expression after the entire function body is parsed.
6531 (c_parser_expr_no_commas): Delayed creating array notation expressions
6532 to the end of function parsing.
6533 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6534 whole if-statement instead of just the condition.
ab20d992 6535 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6536
edd25645
BI
65372013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6538
6539 PR c/57474
6540 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6541 array to NULL_TREE if they are unused. Also added a check for the
6542 field to be NULL before its fields are used in future.
ab20d992 6543
065ce7f1
RO
65442013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6545
6546 PR bootstrap/57450
6547 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6548 (build_array_notation_expr): Likewise.
6549
36536d79
BI
65502013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6551
6552 * c-typeck.c (build_array_ref): Added a check to see if array's
6553 index is greater than one. If true, then emit an error.
6554 (build_function_call_vec): Exclude error reporting and checking
6555 for builtin array-notation functions.
6556 (convert_arguments): Likewise.
6557 (c_finish_return): Added a check for array notations as a return
6558 expression. If true, then emit an error.
6559 (c_finish_loop): Added a check for array notations in a loop
6560 condition. If true then emit an error.
6561 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6562 (build_binary_op): Added a check for array notation expr inside
6563 op1 and op0. If present, we call another function to find correct
6564 type.
6565 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6566 * c-parser.c (c_parser_compound_statement): Check if array
6567 notation code is used in tree, if so, then transform them into
6568 appropriate C code.
6569 (c_parser_expr_no_commas): Check if array notation is used in LHS
6570 or RHS, if so, then build array notation expression instead of
6571 regular modify.
6572 (c_parser_postfix_expression_after_primary): Added a check for
6573 colon(s) after square braces, if so then handle it like an array
6574 notation. Also, break up array notations in unary op if found.
6575 (c_parser_direct_declarator_inner): Added a check for array
6576 notation.
6577 (c_parser_compound_statement): Added a check for array notation in
6578 a stmt. If one is present, then expand array notation expr.
6579 (c_parser_if_statement): Likewise.
6580 (c_parser_switch_statement): Added a check for array notations in
6581 a switch statement's condition. If true, then output an error.
6582 (c_parser_while_statement): Similarly, but for a while.
6583 (c_parser_do_statement): Similarly, but for a do-while.
6584 (c_parser_for_statement): Similarly, but for a for-loop.
6585 (c_parser_unary_expression): Check if array notation is used in a
6586 pre-increment or pre-decrement expression. If true, then expand
6587 them.
6588 (c_parser_array_notation): New function.
6589 * c-array-notation.c: New file.
6590 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 6591
cd192ccc
MS
65922013-05-23 Mike Stump <mikestump@comcast.net>
6593
6594 * c-typeck.c (convert_for_assignment): Handle references to memory
6595 spaces better.
6596
427b248d
JM
65972013-05-16 Jason Merrill <jason@redhat.com>
6598
6599 * Make-lang.in (cc1$(exeext)): Use link mutex.
6600
44d90fe1
PC
66012013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6602
6603 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6604 to simply use OPT_Wpointer_arith.
6605 (build_unary_op): Likewise.
6606
4e7d7b3d
JJ
66072013-04-03 Jakub Jelinek <jakub@redhat.com>
6608
6609 PR c/19449
6610 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6611 argument. If set, or it temporarily for parsing of the first
6612 argument into force_folding_builtin_constant_p.
6613 (c_parser_postfix_expression): Adjust callers.
6614
839b422f
RB
66152013-03-21 Richard Biener <rguenther@suse.de>
6616
6617 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6618 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6619
2ee028f1
MP
66202013-02-12 Marek Polacek <polacek@redhat.com>
6621
6622 PR c/44938
6623 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6624 origtypes to NULL.
6625
8824edff
JJ
66262013-01-24 Jakub Jelinek <jakub@redhat.com>
6627
6628 PR c/56078
6629 * c-typeck.c (set_nonincremental_init_from_string): If
6630 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6631 returned false.
6632 (process_init_element): Likewise.
6633
eadd3d0d
JJ
66342012-12-20 Jakub Jelinek <jakub@redhat.com>
6635
6636 PR c++/55619
6637 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6638 argument, don't call default_function_array_conversion
6639 nor c_fully_fold here.
6640 (c_parser_asm_statement): Adjust callers.
6641 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6642 and outputs here, and call default_function_array_conversion
6643 on inputs that don't need to be addressable.
6644
f8a93a2e
JJ
66452012-12-18 Jakub Jelinek <jakub@redhat.com>
6646
6647 PR c/39464
6648 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6649 warning require that both c_common_unsigned_type as well as
6650 c_common_signed_type is the same for both mvl and mvr types.
6651
9771b263
DN
66522012-11-16 Diego Novillo <dnovillo@google.com>
6653
6654 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6655
6656 * c-common.c: Use new vec API in vec.h.
6657 * c-common.h: Likewise.
6658 * c-gimplify.c: Likewise.
6659 * c-pragma.c: Likewise.
6660 * c-pretty-print.c: Likewise.
6661 * c-pretty-print.h: Likewise.
6662 * c-semantics.c: Likewise.
6663 * c-decl.c: Likewise.
6664 * c-parser.c: Likewise.
6665 * c-tree.h: Likewise.
6666 * c-typeck.c: Likewise.
6667
880661a4
JW
66682012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6669
6670 PR c++/54930
6671 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6672
077d1abe
MLI
66732012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6674
6675 PR c/53066
6676 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6677 shadows a function, unless the variable is a function or a
6678 pointer-to-function.
6679
3a785c97
JJ
66802012-10-12 Jakub Jelinek <jakub@redhat.com>
6681
6682 PR c/54381
6683 * c-parser.c (struct c_tree_loc_pair): Removed.
6684 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6685 add location_t * and tree * arguments, fill in array of 3
6686 sizeof_arg trees and corresponding locs.
6687 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6688 c_parser_expr_list callers.
6689 (c_parser_postfix_expression_after_primary): Likewise. Pass
6690 array of 3 sizeof_arg trees and locs (corresponding to first
6691 3 arguments) to sizeof_pointer_memaccess_warning.
6692
703c8606
LC
66932012-10-09 Lawrence Crowl <crowl@google.com>
6694
6695 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6696 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6697 hash table.
6698
5d9de0d0
PC
66992012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6700
6701 PR c++/54194
6702 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6703 call.
6704
a212e43f
MG
67052012-10-09 Marc Glisse <marc.glisse@inria.fr>
6706
6707 PR c++/54427
6708 * c-typeck.c: Include c-common.h.
6709 (enum stv_conv): Moved to c-common.h.
6710 (scalar_to_vector): Moved to c-common.c.
6711 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6712 * Make-lang.in: c-typeck.c depends on c-common.h.
6713
3b78de56
AC
67142012-10-04 Arnaud Charlet <charlet@adacore.com>
6715
6716 * c-decl.c (c_write_global_declarations): Fix handling of
6717 -fdump-ada-spec*.
6718
78c60e3d
SS
67192012-09-30 Sharad Singhai <singhai@google.com>
6720
6721 * c-decl.c (c_write_global_declarations): Use a different method
6722 to determine if the dump has ben initialized.
6723
9f33203d
JM
67242012-09-14 Joseph Myers <joseph@codesourcery.com>
6725
6726 PR c/54552
6727 * c-typeck.c (c_cast_expr): When casting to a type requiring
6728 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6729 c_fully_fold first.
6730
a27d595d
JM
67312012-09-14 Joseph Myers <joseph@codesourcery.com>
6732
6733 PR c/54103
6734 * c-typeck.c (build_unary_op): Pass original argument of
6735 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6736 any C_MAYBE_CONST_EXPR, if it has integer operands.
6737 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6738 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6739 to c_objc_common_truthvalue_conversion, then remove any
6740 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6741 c_objc_common_truthvalue_conversion not
6742 c_common_truthvalue_conversion.
6743 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6744 call note_integer_operands for arguments with integer operands
6745 that are not integer constants.
6746
9feb29df
JJ
67472012-09-13 Jakub Jelinek <jakub@redhat.com>
6748
6749 PR c/54559
6750 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6751 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6752
d409320c
JJ
67532012-08-31 Jakub Jelinek <jakub@redhat.com>
6754
6755 PR c/54428
6756 * c-convert.c (convert): Don't call fold_convert_loc if
6757 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6758 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6759 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6760
6265d07c
JJ
67612012-08-24 Jakub Jelinek <jakub@redhat.com>
6762
6763 PR c/54355
6764 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6765 for nested and empty_ok arguments in the call to
6766 c_parser_declaration_or_fndef.
6767
1a4049e7
JJ
67682012-08-17 Jakub Jelinek <jakub@redhat.com>
6769
6770 * c-tree.h (c_last_sizeof_arg): Declare.
6771 * c-parser.c (struct c_tree_loc_pair): New type.
6772 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6773 non-NULL.
6774 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6775 (c_parser_postfix_expression_after_primary): Likewise. Call
6776 sizeof_pointer_memaccess_warning if needed.
6777 (sizeof_ptr_memacc_comptypes): New function.
6778 * c-typeck.c (c_last_sizeof_arg): New global variable.
6779 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6780
0229aee9
UB
67812012-07-24 Uros Bizjak <ubizjak@gmail.com>
6782
6783 * c-lang.h (lang_decl): Add variable_size GTY option.
6784
7ee2468b
SB
67852012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6786
6787 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6788 * Make-lang.in: Fix dependencies.
6789
d4a10d0a
SB
67902012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6791
6792 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6793 and add language Makefile hooks.
6794 * config-lang.in: New file.
6795 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6796 add the required "normal" config-lang.in rules.
6797 * c-lang.h: Moved from gcc/ to here.
6798 * c-tree.h: Likewise.
6799 * c-objc-common.c: Likewise.
6800 * c-objc-common.h: Likewise.
6801 * c-typeck.c: Likewise.
6802 * c-convert.c: Likewise.
6803 * c-lang.c: Likewise.
6804 * c-aux-info.c: Likewise.
6805 * c-errors.c: Likewise.
6806 * gccspec.c: Likewise.
6807 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6808 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6809\f
a5544970 6810Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6811
6812Copying and distribution of this file, with or without modification,
6813are permitted in any medium without royalty provided the copyright
6814notice and this notice are preserved.