]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
fortran: Fix PR number in comment of testcase for PR 69497
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
519d7496
JB
12019-12-19 Julian Brown <julian@codesourcery.com>
2 Cesar Philippidis <cesar@codesourcery.com>
3
4 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
5 detach clauses.
6 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
7 Allow deref (->) in variable lists if true.
8 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
9 Pass to c_parser_omp_variable_list.
10 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
11 call to c_parser_omp_variable_list.
12 (c_parser_oacc_all_clauses): Support attach and detach clauses.
13 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
14 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
15 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
16 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
17 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
18 and detach. Support deref.
19 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
20 GOMP_MAP_ALWAYS_POINTER for OpenACC.
21 (c_oacc_check_attachments): New function.
22 (c_finish_omp_clauses): Check attach/detach arguments for being
23 pointers using above. Support deref.
24
a6163563
JB
252019-12-19 Julian Brown <julian@codesourcery.com>
26 Maciej W. Rozycki <macro@codesourcery.com>
27 Tobias Burnus <tobias@codesourcery.com>
28 Thomas Schwinge <thomas@codesourcery.com>
29
30 * c-parser.c (c_parser_omp_clause_name): Support no_create.
31 (c_parser_oacc_data_clause): Likewise.
32 (c_parser_oacc_all_clauses): Likewise.
33 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
34 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
35 PRAGMA_OACC_CLAUSE_NO_CREATE.
36 * c-typeck.c (handle_omp_array_sections): Support
37 GOMP_MAP_NO_ALLOC.
38
d68f5d45
DM
392019-12-09 David Malcolm <dmalcolm@redhat.com>
40
41 * c-objc-common.c (range_label_for_type_mismatch::get_text):
42 Replace label_text ctor calls.
43
4691bf46
JM
442019-12-04 Joseph Myers <joseph@codesourcery.com>
45
46 PR c/36941
47 PR c/88827
48 * c-typeck.c (convert_lvalue_to_rvalue): Call
49 require_complete_type for arguments not of void types.
50 (build_indirect_ref): Do not diagnose dereferencing pointers to
51 incomplete types.
52 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
53
85d11957
JM
542019-12-03 Joseph Myers <joseph@codesourcery.com>
55
56 PR c/88704
57 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
58 old-style parameter definitions.
59
4569f8b3
SL
602019-12-01 Sandra Loosemore <sandra@codesourcery.com>
61
62 PR target/92499
63
64 * c-decl.c (flexible_array_type_p): Move to common code.
65
65ef05d0
RS
662019-11-30 Richard Sandiford <richard.sandiford@arm.com>
67
68 * c-decl.c (start_decl): Allow initialization of variables whose
69 size is a POLY_INT_CST.
70 (finish_decl): Use verify_type_context to check whether the target
71 allows variables with a particular type to have static or thread-local
72 storage duration. Don't raise a second error if such variables do
73 not have a constant size.
74 (grokdeclarator): Use verify_type_context to check whether the
75 target allows fields or array elements to have a particular type.
76 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
77 the target allows pointer difference for the types involved.
78 (build_unary_op): Likewise for pointer increment and decrement.
79
34b43828
JM
802019-11-29 Joseph Myers <joseph@codesourcery.com>
81
82 * c-parser.c (struct c_parser): Add members raw_tokens and
83 raw_tokens_used.
84 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
85 using previously-lexed raw tokens.
86 (c_parser_peek_nth_token_raw)
87 (c_parser_check_balanced_raw_token_sequence): New functions.
88 (c_parser_nth_token_starts_std_attributes): Use
89 c_parser_check_balanced_raw_token_sequence for Objective-C.
90
5b8d9367
JM
912019-11-25 Joseph Myers <joseph@codesourcery.com>
92
93 PR c/91985
94 * c-decl.c (finish_declspecs): Use int instead of decimal
95 floating-point types if decimal floating-point not supported.
96
1723e1be
JM
972019-11-25 Joseph Myers <joseph@codesourcery.com>
98
99 * c-tree.h (struct c_declarator): Use a structure for id member.
100 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
101 declarators at the start, not when handling individual declarators
102 later. Use u.id.id instead of u.id.
103 (grokfield): Use u.id.id instead of u.id.
104 (build_id_declarator): Set u.id.id and u.id.attrs.
105 (finish_declspecs): Handle postfix attributes in case of typedef
106 name or typeof used.
107 * c-parser.c (c_parser_direct_declarator)
108 (c_parser_direct_declarator_inner): Place declarator for
109 attributes inside that for function or array, not outside. Set
110 u.id.attrs for identifiers.
111 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
112 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
113 instead of u.id.
114
bdaf8be1
JJ
1152019-11-22 Jakub Jelinek <jakub@redhat.com>
116
117 PR c/90677
118 * c-decl.c (identifier_global_tag): Define.
119
3e00ba47
RB
1202019-11-20 Richard Biener <rguenther@suse.de>
121
122 PR c/92088
123 * c-decl.c (grokdeclarator): Prevent inlining of nested
124 function with VLA arguments.
125
8c5b727a
JM
1262019-11-20 Joseph Myers <joseph@codesourcery.com>
127
128 * c-decl.c (c_warn_type_attributes): New function.
129 (groktypename, grokdeclarator, finish_declspecs): Call
130 c_warn_type_attributes before applying attributes to types.
131 * c-tree.h (c_warn_type_attributes): Declare.
132
192961ff
JM
1332019-11-19 Joseph Myers <joseph@codesourcery.com>
134
135 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
136 standard attributes.
137 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
138 pedwarn for unknown standard attributes and return error_mark_node
139 for them.
140
20a38017
MM
1412019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
142
143 * c-parser.c (c_parser_parse_rtl_body): Always call
144 run_rtl_passes, even if startwith pass is not provided.
145
d5fbe5e0
JM
1462019-11-15 Joseph Myers <joseph@codesourcery.com>
147
148 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
149 duplicate standard attributes.
150
97cc1187
JM
1512019-11-15 Joseph Myers <joseph@codesourcery.com>
152
153 * c-decl.c (std_attribute_table): Add maybe_unused.
154
f8aea5e3
JM
1552019-11-15 Joseph Myers <joseph@codesourcery.com>
156
157 * c-decl.c (std_attribute_table): Add fallthrough.
158 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
159 attribute at top level.
160
2cc94aa8
JM
1612019-11-15 Joseph Myers <joseph@codesourcery.com>
162
163 * c-decl.c (std_attribute_table): New.
164 (c_init_decl_processing): Register attributes from
165 std_attribute_table.
166 * c-parser.c (c_parser_attribute_arguments): Add arguments
167 require_string and allow_empty_args. All callers changed.
168 (c_parser_std_attribute): Set require_string argument for
169 "deprecated" attribute.
170
7c5890cc
JM
1712019-11-14 Joseph Myers <joseph@codesourcery.com>
172
173 * c-parser.c (c_parser_postfix_expression)
174 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
175 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
176
e8738f4e
RS
1772019-11-14 Richard Sandiford <richard.sandiford@arm.com>
178
179 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
180 of build_same_sized_truth_vector_type.
181 (build_vec_cmp): Likewise.
182
b2417b59
JJ
1832019-11-14 Jakub Jelinek <jakub@redhat.com>
184
bedb7f04
JJ
185 * c-parser.c (c_parser_omp_context_selector): Don't require score
186 argument to fit into shwi, just to be INTEGER_CST. Diagnose
187 negative score.
188
b2417b59
JJ
189 * c-parser.c (c_parser_omp_context_selector): Rename
190 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
191 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
192 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
193 and string literals.
194
4e03c3a7
JM
1952019-11-14 Joseph Myers <joseph@codesourcery.com>
196
197 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
198 ctsk_tagfirstref_attrs.
199 (struct c_declspecs): Update description of attrs. Add
200 postfix_attrs and non_std_attrs_seen_p. Increase size of
201 typespec_kind bit-field.
202 (c_warn_unused_attributes): New declaration.
203 (parser_xref_tag): Update prototype.
204 * c-decl.c (c_warn_unused_attributes): New function.
205 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
206 ctsk_tagref_attrs. Handle attribute declarations.
207 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
208 (grokdeclarator): Handle standard attributes.
209 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
210 attributes to incomplete type reference.
211 (xref_tag): Update call to parser_xref_tag.
212 (declspecs_add_addrspace, declspecs_add_type)
213 (declspecs_add_scspec, declspecs_add_attrs): Set
214 non_std_attrs_seen_p.
215 (finish_declspecs): Apply postfix standard attributes to type.
216 * c-parser.c (c_token_starts_declspecs)
217 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
218 (c_parser_next_tokens_start_declaration): Update comments.
219 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
220 parser->tokens[2] to parser->tokens[1].
221 (c_parser_nth_token_starts_std_attributes)
222 (c_parser_std_attribute_specifier_sequence): New functions.
223 (c_parser_declaration_or_fndef): Add arguments have_attrs and
224 attrs. All callers changed. Handle standard attributes.
225 (c_parser_parms_declarator, c_parser_parms_list_declarator)
226 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
227 All callers changed.
228 (c_parser_declspecs): Add arguments start_std_attr_ok and
229 end_std_attr_ok. All callers changed. Handle standard
230 attributes.
231 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
232 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
233 (c_parser_compound_statement_nostart, c_parser_all_labels)
234 (c_parser_label, c_parser_statement, c_parser_for_statement):
235 Handle standard attributes.
236 * c-parser.h (c_parser_declspecs): Update prototype.
237 * gimple-parser.c (c_parser_gimple_declaration): Update call to
238 c_parser_declspecs.
239
0c29cac4
ML
2402019-11-12 Martin Liska <mliska@suse.cz>
241
242 * gimple-parser.c: Do not include params.h.
243
028d4092
ML
2442019-11-12 Martin Liska <mliska@suse.cz>
245
246 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
247 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
248 macro.
249
62aee289
MR
2502019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
251 Frederik Harwath <frederik@codesourcery.com>
252
253 gcc/c/
254 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
255 (c_parser_oacc_kernels_parallel): Rename function to...
256 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
257 (c_parser_omp_construct): Update accordingly.
258
259
7cec9588
JJ
2602019-11-11 Jakub Jelinek <jakub@redhat.com>
261
262 * c-parser.c (c_parser_translation_unit): Diagnose declare target
263 without corresponding end declare target.
264
f486280c
RS
2652019-11-08 Richard Sandiford <richard.sandiford@arm.com>
266
267 * c-convert.c (convert): Only handle vector conversions if one of
268 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
269 allows it.
270 * c-typeck.c (build_array_ref): Only allow vector indexing if the
271 vectors satisfy gnu_vector_type_p.
272 (build_unary_op): Only allow unary operators to be applied to
273 vectors if they satisfy gnu_vector_type_p.
274 (digest_init): Only allow by-element initialization of vectors
275 if they satisfy gnu_vector_type_p.
276 (really_start_incremental_init): Likewise.
277 (push_init_level): Likewise.
278 (pop_init_level): Likewise.
279 (process_init_element): Likewise.
280 (build_binary_op): Only allow binary operators to be applied to
281 vectors if they satisfy gnu_vector_type_p.
282
017c6491
JM
2832019-11-08 Joseph Myers <joseph@codesourcery.com>
284
285 * c-decl.c (grokparms): Convert () in a function definition to
286 (void) for C2x.
287 (store_parm_decls_oldstyle): Pedwarn for C2x.
288 (store_parm_decls): Update comment about () not generating a
289 prototype.
290
c01bd174
JM
2912019-11-07 Joseph Myers <joseph@codesourcery.com>
292
293 * c-parser.c (c_parser_attribute_arguments): New function.
294 Factored out of c_parser_gnu_attribute.
295 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
296 (c_parser_balanced_token_sequence, c_parser_std_attribute)
297 (c_parser_std_attribute_specifier): New functions.
298 (c_parser_transaction_attributes): Use
299 c_parser_std_attribute_specifier.
300
471c5330
JM
3012019-11-07 Joseph Myers <joseph@codesourcery.com>
302
303 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
304 lex_joined_string and translate_strings_p.
305 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
306 c_lex_with_flags.
307 (c_parser_string_literal): New function.
308 (c_parser_static_assert_declaration_no_semi): Use
309 c_parser_string_literal. Do not set lex_untranslated_string.
310 (c_parser_asm_string_literal): Use c_parser_string_literal.
311 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
312 (c_parser_gnu_attributes): Set and restore translate_strings_p
313 instead of lex_untranslated_string.
314 (c_parser_asm_statement): Do not set lex_untranslated_string.
315 (c_parser_asm_operands): Likewise.
316 (c_parser_has_attribute_expression): Set and restore
317 translate_strings_p instead of lex_untranslated_string.
318 (c_parser_postfix_expression): Use c_parser_string_literal.
319 (pragma_lex): Likewise.
320 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
321 (c_parse_file): Set translate_strings_p.
322 * gimple-parser.c (c_parser_gimple_postfix_expression)
323 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
324 * c-parser.c (c_parser_string_literal): Declare function.
325
d0c464d2
JJ
3262019-11-02 Jakub Jelinek <jakub@redhat.com>
327
328 * c-parser.c (c_finish_omp_declare_variant): Use
329 omp_get_context_selector instead of c_omp_get_context_selector.
330
ac2cfa6c
RS
3312019-10-29 Richard Sandiford <richard.sandiford@arm.com>
332
333 * c-tree.h (c_simulate_enum_decl): Declare.
334 * c-decl.c (c_simulate_enum_decl): New function.
335 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
336
74078538
RS
3372019-10-29 Richard Sandiford <richard.sandiford@arm.com>
338
339 * c-tree.h (c_simulate_builtin_function_decl): Declare.
340 * c-decl.c (c_simulate_builtin_function_decl): New function.
341 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
342 to the above.
343
ad1539d5
MS
3442019-10-28 Martin Sebor <msebor@redhat.com>
345
346 PR c/66970
347 * c-decl.c (names_builtin_p): Define a new function.
348
cb73e4e7
RB
3492019-10-28 Richard Biener <rguenther@suse.de>
350
351 PR c/92249
352 * gimple-parser.c (c_parser_parse_gimple_body): Make
353 current_bb the entry block initially to easier recover
354 from errors.
355 (c_parser_gimple_compound_statement): Adjust.
356
135df52c
JJ
3572019-10-24 Jakub Jelinek <jakub@redhat.com>
358
359 * c-parser.c (c_finish_omp_declare_variant): Use
360 omp_context_selector_matches instead of
361 c_omp_context_selector_matches.
362 * c-decl.c (c_decl_attributes): Add "omp declare target block"
363 attribute in between declare target and end declare target
364 pragmas.
365
783bfe5e
JM
3662019-10-15 Joseph Myers <joseph@codesourcery.com>
367
368 * c-parser.c (c_parser_attribute_any_word): Rename to
369 c_parser_gnu_attribute_any_word. All callers changed.
370 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
371 callers changed.
372 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
373 callers changed.
374 (c_parser_declaration_or_fndef, c_parser_declspecs)
375 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
376 (c_parser_struct_declaration, c_parser_declarator)
377 (c_parser_gnu_attribute, c_parser_compound_statement)
378 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
379 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
380 attribute-related syntax productions.
381
56898e43
RS
3822019-10-14 Richard Sandiford <richard.sandiford@arm.com>
383
384 * c-objc-common.c (useful_aka_type_p): Replace with...
385 (get_aka_type): ...this new function. Given the original type,
386 decide which aka type to print (if any). Only look through typedefs
387 if user_facing_original_type_p.
388 (print_type): Update accordingly.
389
b9424661
JJ
3902019-10-14 Jakub Jelinek <jakub@redhat.com>
391
392 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
393 into int NESTED, if it is 2, diagnose missing commas in between
394 clauses.
395 (c_parser_omp_context_selector): Pass 2 as last argument to
396 c_parser_omp_all_clauses.
397
20de9568
JJ
3982019-10-12 Jakub Jelinek <jakub@redhat.com>
399
400 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
401 For simd properties, put them directly into TREE_VALUE.
402 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
403 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
404 add "omp declare variant base" attribute rather than
405 "omp declare variant".
406
fe2bc27c
JM
4072019-10-11 Joseph Myers <joseph@codesourcery.com>
408
409 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
410
94e7f906
JJ
4112019-10-10 Jakub Jelinek <jakub@redhat.com>
412
413 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
414 true, terminate processing on closing paren and don't skip to end of
415 pragma line.
416 (c_parser_omp_declare_simd): Handle also declare variant.
417 (omp_construct_selectors, omp_device_selectors,
418 omp_implementation_selectors, omp_user_selectors): New variables.
419 (c_parser_omp_context_selector,
420 c_parser_omp_context_selector_specification,
421 c_finish_omp_declare_variant): New functions.
422 (c_finish_omp_declare_simd): Handle both declare simd and
423 declare variant.
424 (c_parser_omp_declare): Handle declare variant.
425
93313b94
JM
4262019-10-02 Joseph Myers <joseph@codesourcery.com>
427
428 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
429 CPP_COLON tokens.
430
55879815
RS
4312019-10-01 Richard Sandiford <richard.sandiford@arm.com>
432
433 * c-objc-common.c (useful_aka_type_p): New function.
434 (print_type): Use it to decide whether an aka type is worth printing.
435
59bc434a
JJ
4362019-09-27 Jakub Jelinek <jakub@redhat.com>
437
438 PR c++/88203
439 * c-parser.c (c_parser_predefined_identifier): New function.
440 (c_parser_postfix_expression): Use it.
441 (c_parser_omp_variable_list): Parse predefined identifiers.
442 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
443 in shared and firstprivate clauses, even when they are predetermined
444 shared.
445
c6447c20
RS
4462019-09-27 Richard Sandiford <richard.sandiford@arm.com>
447
448 * c-typeck.c (build_function_call_vec): Take the original function
449 decl as an optional final parameter. Pass all built-in calls to
450 check_builtin_function_arguments.
451
522da4c2
EB
4522019-09-20 Eric Botcazou <ebotcazou@adacore.com>
453
454 PR c/91815
455 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
456 of identifiers in the external scope only for variables and functions.
457
68e2c199
PK
4582019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
459
460 PR c/78736
461 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
462
22f8849d
IS
4632019-08-23 Iain Sandoe <iain@sandoe.co.uk>
464
465 PR pch/61250
466 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
467 after determining that the first token is not
468 PRAGMA_GCC_PCH_PREPROCESS.
469
db376f45
EB
4702019-08-22 Eric Botcazou <ebotcazou@adacore.com>
471
472 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
473 FUNCTION_DECL to the right value in the presence of nested declarators.
474
4d732405
RS
4752019-08-13 Richard Sandiford <richard.sandiford@arm.com>
476
477 PR middle-end/91421
478 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
479
cb1180d5
RS
4802019-08-13 Richard Sandiford <richard.sandiford@arm.com>
481
482 PR middle-end/91421
483 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
484 of a built_in_function.
485 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
486
77eb117f
JJ
4872019-08-10 Jakub Jelinek <jakub@redhat.com>
488
489 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
490 (c_parser_omp_clause_device_type): New function.
491 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
492 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
493 (c_parser_omp_declare_target): Handle device_type clauses. Remove
494 diagnostics for declare target with clauses nested in clause-less
495 declare target declaration-definition-seq.
496 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
497
2c3b8bad
JJ
4982019-08-09 Jakub Jelinek <jakub@redhat.com>
499
bb522e2e
JJ
500 * c-parser.c (check_no_duplicate_clause): Simplify using
501 omp_find_clause.
502 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
503 directive name modifiers.
504 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
505
2c3b8bad
JJ
506 PR c/91401
507 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
508 check_no_duplicate_clause call. Comment it out, instead emit a
509 warning for duplicate dist_schedule clauses.
510
99769e7f
RS
5112019-08-08 Richard Sandiford <richard.sandiford@arm.com>
512
513 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
514
8860d270
JJ
5152019-08-08 Jakub Jelinek <jakub@redhat.com>
516
517 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
518 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
519 instead of generic_head to track duplicates.
520
398e3feb
JJ
5212019-08-07 Jakub Jelinek <jakub@redhat.com>
522
523 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
524 (c_parser_omp_clause_use_device_addr): New function.
525 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
526 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
527 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
528 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
529 map or use_device_* clauses.
530 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
531 in OpenMP, require pointer type rather than pointer or array type.
532 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
533
a28351e7
JJ
5342019-07-31 Jakub Jelinek <jakub@redhat.com>
535
536 PR c/91192
537 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
538 even if finish is UNKNOWN_LOCATION, just use start as finish in that
539 case.
540
6343b6bf
ML
5412019-07-25 Martin Liska <mliska@suse.cz>
542 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
543
544 PR c++/23383
545 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
546
cb50701e
ML
5472019-07-25 Martin Liska <mliska@suse.cz>
548
549 * c-decl.c (merge_decls): Use new macros
550 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
551
62e3e66f
RB
5522019-07-23 Richard Biener <rguenther@suse.de>
553
554 PR tree-optimization/83518
555 * gimple-parser.c (c_parser_parse_gimple_body): When we have
556 a CFG also rebuild cgraph edges.
557
554a530f
JJ
5582019-07-20 Jakub Jelinek <jakub@redhat.com>
559
560 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
561 (c_parser_omp_clause_bind): New function.
562 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
563 (OMP_LOOP_CLAUSE_MASK): Define.
564 (c_parser_omp_loop): New function.
565 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
566 loop combined with parallel or teams.
567 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
568 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
569
d119bf79
RS
5702019-07-18 Richard Sandiford <richard.sandiford@arm.com>
571
572 PR c/53633
573 * c-decl.c (finish_function): Check targetm.warn_func_return
574 before issuing a -Wreturn-type warning.
575
ab20d992 5762019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
577
578 * gimple-parser.c (c_parser_gimple_try_stmt): New.
579 (c_parser_compound_statement): Call it.
580
1fdd6f04
JJ
5812019-07-12 Jakub Jelinek <jakub@redhat.com>
582
583 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
584 (c_parser_omp_clause_order): New function.
585 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
586 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
587 PRAGMA_OMP_CLAUSE_ORDER.
588 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
589
8389386c
RB
5902019-07-10 Richard Biener <rguenther@suse.de>
591
592 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
593 _Literal (int *) &x for address literals.
594
99b1c316
MS
5952019-07-09 Martin Sebor <msebor@redhat.com>
596
597 PR c++/61339
598 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
599 to class.
600 (field_decl_cmp): Same.
601 * c-parser.c (c_parser_struct_or_union_specifier): Same.
602 * c-tree.h: Same.
603 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
604
6c1dae73
MS
6052019-07-09 Martin Sebor <msebor@redhat.com>
606
607 PR c++/61339
608 * c-decl.c: Change class-key from class to struct and vice versa
609 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
610 * gimple-parser.c: Same.
611
69b5279e
RB
6122019-07-01 Richard Biener <rguenther@suse.de>
613
614 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
615 _Literal (char *) &"foo" for address literals pointing to
616 STRING_CSTs.
617
ab20d992
JJ
6182019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
619
620 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
621 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
622 C incompatibility if alternate "__intN__" form is used.
623
1e3d475e
MS
6242019-06-24 Martin Sebor <msebor@redhat.com>
625
626 * c-typeck.c (build_binary_op): Hyphenate floating-point.
627
bf38f7e9
JJ
6282019-06-10 Jakub Jelinek <jakub@redhat.com>
629
630 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
631 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
632 (c_parser_omp_scan_loop_body): New function.
633 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
634 inscan reduction clauses.
635 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
636 non-inscan reductions on the same construct, or inscan reductions with
637 ordered or schedule clauses, or inscan array reductions.
638
65985d78
MS
6392019-06-05 Martin Sebor <msebor@redhat.com>
640
641 PR c/90737
642 * c-typeck.c (c_finish_return): Only consider functions returning
643 pointers as candidates for -Wreturn-local-addr.
644
0ecf545c
MS
6452019-06-05 Martin Sebor <msebor@redhat.com>
646
647 * c-decl.c (start_decl): Adjust quoting and hyphenation
648 in diagnostics.
649 (finish_decl): Same.
650 (finish_enum): Same.
651 (start_function): Same.
652 (declspecs_add_type): Same.
653 * c-parser.c (warn_for_abs): Same.
654 * c-typeck.c (build_binary_op): Same.
655
e03436e7
TS
6562019-05-17 Thomas Schwinge <thomas@codesourcery.com>
657
b48f44bf
TS
658 PR c/89433
659 * c-parser.c (c_finish_oacc_routine): Rework checking if already
660 marked with an OpenACC 'routine' directive.
661
5bf04509
TS
662 PR c/89433
663 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
664 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
665
e03436e7
TS
666 PR c/89433
667 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
668 clauses from "omp declare target" attribute.
669
a9c697b8
MS
6702019-05-16 Martin Sebor <msebor@redhat.com>
671
ab20d992
JJ
672 * c-decl.c (start_decl): Quote keywords, operators, and
673 types in diagnostics.
674 (finish_decl): Same.
675 * c-parser.c (c_parser_asm_statement): Same.
676 (c_parser_conditional_expression): Same.
677 (c_parser_transaction_cancel): Same.
678 * c-typeck.c (c_common_type): Same.
679 (build_conditional_expr): Same.
680 (digest_init): Same.
681 (process_init_element): Same.
682 (build_binary_op): Same.
a9c697b8 683
c4499192
RB
6842019-05-17 Richard Biener <rguenther@suse.de>
685
686 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
687 (c_parser_gimple_unary_expression): Likewise.
688 (c_parser_gimple_parentized_ternary_expression): New function.
689
adfe6e4b
RB
6902019-05-16 Richard Biener <rguenther@suse.de>
691
692 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
693 (c_parser_gimple_unary_expression): Likewise.
694
186dabf2
RB
6952019-05-15 Richard Biener <rguenther@suse.de>
696
697 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
698 __BIT_FIELD_REF.
699
1158c5b4
RB
7002019-05-14 Richard Biener <rguenther@suse.de>
701
702 * gimple-parser.c (c_parser_gimple_statement): Remove
703 questionable auto-promotion to VIEW_CONVERT_EXPR.
704 (c_parser_gimple_typespec): Split out from __MEM parsing.
705 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
706 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
707 as __VIEW_CONVERT with -gimple.
708
fd4485aa
ML
7092019-05-09 Martin Liska <mliska@suse.cz>
710
711 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
712 __MAX.
713 (c_parser_gimple_unary_expression): Parse also binary expression
714 __MIN and __MAX.
715 (c_parser_gimple_parentized_binary_expression): New function.
716
d276406a
ML
7172019-05-09 Martin Liska <mliska@suse.cz>
718
719 * gimple-parser.c (struct gimple_parser): Add probability.
720 for gimple_parser_edge.
721 (gimple_parser::push_edge): Add new argument probability.
722 (c_parser_gimple_parse_bb_spec): Parse also probability
723 if present.
724 (c_parser_parse_gimple_body): Set edge probability.
725 (c_parser_gimple_compound_statement): Consume token
726 before calling c_parser_gimple_goto_stmt.
727 Parse BB counts.
728 (c_parser_gimple_statement): Pass new argument.
729 (c_parser_gimple_goto_stmt): Likewise.
730 (c_parser_gimple_if_stmt): Likewise.
731 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
732 * c-parser.c (c_parser_declaration_or_fndef): Pass
733 hot_bb_threshold argument.
734 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
735 field.
736 (c_parser_gimple_parse_bb_spec_edge_probability): New.
737
f179b64e
JJ
7382019-04-26 Jakub Jelinek <jakub@redhat.com>
739
740 PR debug/90197
741 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
742 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
743 (c_parser_do_statement): Likewise.
744 (c_parser_for_statement): Likewise. Formatting fixes.
745 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
746 emit DEBUG_BEGIN_STMTs if needed.
747
e7178413
JJ
7482019-04-19 Jakub Jelinek <jakub@redhat.com>
749
c280b7ee
JJ
750 PR c/89888
751 * c-typeck.c (struct c_switch): Remove outside_range_p member.
752 (c_start_case): Don't clear it.
753 (do_case): Adjust c_add_case_label caller.
754 (c_finish_case): Adjust c_do_switch_warnings caller.
755
e7178413
JJ
756 PR c++/90108
757 * c-decl.c (merge_decls): If remove is main variant and
758 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
759 variant that has newdecl as TYPE_NAME if any.
760
60a2c645
JJ
7612019-04-12 Jakub Jelinek <jakub@redhat.com>
762
763 PR c/89933
764 * c-decl.c (merge_decls): When newdecl's type is its main variant,
765 don't try to remove it from the variant list, but instead assert
766 it has no variants.
767
2a82beaa
RB
7682019-04-01 Richard Biener <rguenther@suse.de>
769
770 PR c/71598
771 * c-tree.h (c_get_alias_set): Declare.
772 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
773 * c-objc-common.c (c_get_alias_set): Treat enumeral types
774 as the underlying integer type.
775
bec1da64
MS
7762019-03-19 Martin Sebor <msebor@redhat.com>
777
778 PR tree-optimization/89688
779 * c-decl.c (finish_decl): Call braced_lists_to_string for more
780 kinds of initializers.
781
855cd9b1
JJ
7822019-03-19 Jakub Jelinek <jakub@redhat.com>
783
784 PR c/89734
785 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
786 return type even if quals_used is 0. Formatting fixes.
787
baa09dc5
RB
7882019-03-14 Richard Biener <rguenther@suse.de>
789
790 * c-tree.h (enum c_declspec_il): New.
791 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
792 enum bitfield.
793 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
794 Pass start pass and declspec_il to c_parser_parse_gimple_body.
795 (c_parser_declspecs): Adjust.
796 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
797 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
798 and bitmap.h.
799 (struct gimple_parser): New.
800 (gimple_parser::push_edge): New method.
801 (c_parser_gimple_parse_bb_spec): New helper.
802 (c_parser_parse_gimple_body): Get start pass and IL specification.
803 Initialize SSA and CFG.
804 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
805 Build a gimple_parser parsing state and pass it along.
806 (c_parser_gimple_statement): Change intermittend __PHI internal
807 function argument for the edge.
808 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
809 (c_parser_gimple_goto_stmt): Record edges to build.
810 (c_parser_gimple_if_stmt): Likewise.
811 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
812 (c_parser_gimple_or_rtl_pass_list): Likewise.
813
a3f9f006
ML
8142019-03-11 Martin Liska <mliska@suse.cz>
815
816 * c-decl.c (check_for_loop_decls): Wrap an option name
817 in a string format message and fix GNU coding style.
818 * c-parser.c (c_parser_declspecs): Likewise.
819
1db01ff9
JJ
8202019-03-08 Jakub Jelinek <jakub@redhat.com>
821
822 PR tree-optimization/89550
823 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
824 returned true.
825 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
826 or warning returned true.
827
66dcb747
JJ
8282019-02-28 Jakub Jelinek <jakub@redhat.com>
829
830 PR c/89525
831 * c-typeck.c (convert_arguments): Call inform_declaration only if
832 the previous warning_at call returned true.
833
2263c9f2
TS
8342019-02-22 Thomas Schwinge <thomas@codesourcery.com>
835
836 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
837 parameter. Adjust all users.
838 (c_parser_oacc_simple_clause): Replace parser with loc formal
839 parameter. Adjust all users.
840
ab20d992 8412019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
842
843 PR c/87924
844 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
845 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
846
5f88ba10
JJ
8472019-02-15 Jakub Jelinek <jakub@redhat.com>
848
849 PR c/89340
850 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
851 before c_decl_attributes rather than after it.
852
cfc30fd1
JJ
8532019-02-06 Jakub Jelinek <jakub@redhat.com>
854
855 PR c/89211
856 * c-parser.c (c_parser_declaration_or_fndef): Don't update
857 DECL_ARGUMENTS of d if it has been defined already. Use a single if
858 instead of 3 nested ifs.
859
fbe83e6b
JM
8602019-02-06 Joseph Myers <joseph@codesourcery.com>
861
862 PR c/88584
863 * c-decl.c (finish_decl): Do not complete array types for arrays
864 with external linkage not at file scope.
865
f461f938
RB
8662019-02-05 Richard Biener <rguenther@suse.de>
867
868 PR c/88606
869 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
870 all type variants when not supported.
871
fe509359
JJ
8722019-01-30 Jakub Jelinek <jakub@redhat.com>
873
874 PR c/89061
875 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
876 * c-decl.c (decl_jump_unsafe): Return false for
877 C_DECL_COMPOUND_LITERAL_P decls.
878 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
879
6a335b96
JJ
8802019-01-29 Jakub Jelinek <jakub@redhat.com>
881
f4b7e754
JJ
882 PR c/89045
883 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
884 scope.
885
6a335b96
JJ
886 PR c/86125
887 * c-decl.c (last_fileptr_type): Remove.
888 (last_structptr_types): New variable.
889 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
890 {old,new}rettype instead of the types themselves. Assert
891 last_structptr_types array has the same number of elements
892 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
893 argument oldtype and newtype. Instead of handling
894 just fileptr_type_node specially, handle all builtin_structptr_types
895 pointer nodes. Formatting fix.
896
d8b5a1a0
MS
8972019-01-24 Martin Sebor <msebor@redhat.com>
898
899 PR c/86125
900 PR c/88886
901 PR middle-end/86308
902 * c-decl.c (match_builtin_function_types): Add arguments.
903 (diagnose_mismatched_decls): Diagnose mismatched declarations
904 of built-ins more strictly.
905
e21c4491
JJ
9062019-01-24 Jakub Jelinek <jakub@redhat.com>
907
908 PR c++/88976
909 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
910 on #pragma omp cancel with different modifiers.
911
420183d9
L
9122019-01-18 H.J. Lu <hongjiu.lu@intel.com>
913
914 PR c/51628
915 PR c/88664
916 * c-typeck.c (convert_for_assignment): Upate the
917 warn_for_address_or_pointer_of_packed_member call.
918
17ad43dd
TH
9192019-01-16 Tom Honermann <tom@honermann.net>
920 Jason Merrill <jason@redhat.com>
921
922 * c-typeck.c (digest_init): Revised the error message produced for
923 ill-formed cases of array initialization with a string literal.
924 (error_init): Make variadic.
925
5f07d78a
JJ
9262019-01-12 Jakub Jelinek <jakub@redhat.com>
927
928 * c-typeck.c (convert_for_assignment): Fix a comment typo.
929
c4581bbf
JJ
9302019-01-07 Jakub Jelinek <jakub@redhat.com>
931
932 PR c/88701
933 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
934 if current_function_decl is non-NULL.
935
65c5b1eb
JM
9362019-01-07 Joseph Myers <joseph@codesourcery.com>
937
938 PR c/88720
939 PR c/88726
940 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
941 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
942 functions declared but never defined only for external scope, not
943 for other scopes.
944
d8fcab68
JJ
9452019-01-07 Jakub Jelinek <jakub@redhat.com>
946
947 PR c++/85052
948 * c-parser.c (c_parser_postfix_expression): Parse
949 __builtin_convertvector.
950
a5544970
JJ
9512019-01-01 Jakub Jelinek <jakub@redhat.com>
952
953 Update copyright years.
954
da77eace
L
9552018-12-20 H.J. Lu <hongjiu.lu@intel.com>
956
957 PR c/51628
958 * c-typeck.c (convert_for_assignment): Call
959 warn_for_address_or_pointer_of_packed_member.
960
1edf8866
SB
9612018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
962
963 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
964 a more specific error message (instead of just falling through).
965
db4fd626
SB
9662018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
967
968 * c-parser.c (c_parser_asm_statement): Keep track of the location each
969 asm qualifier is first seen; use that to give nicer "duplicate asm
970 qualifier" messages. Delete 'quals" variable, instead pass the
971 "is_volatile_ flag to build_asm_stmt directly.
972 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
973 * c-typeck.c (build_asm_stmt): Ditto; adjust.
974
9c9cfcbb
SB
9752018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
976
977 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
978 "done" boolean variable.
979
a14feb3c
DM
9802018-12-19 David Malcolm <dmalcolm@redhat.com>
981
982 PR c++/87504
983 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
984 Move from here to gcc-rich-location.h and gcc-rich-location.c.
985 (build_binary_op): Use struct op_location_t and
986 class binary_op_rich_location.
987
6d939173
JJ
9882018-12-11 Jakub Jelinek <jakub@redhat.com>
989
990 PR sanitizer/88426
991 * c-convert.c (convert): Call c_fully_fold before calling
992 ubsan_instrument_float_cast.
993
b7055028
SB
9942018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
995
996 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
997 setting "quals".
998
5b76e75f
SB
9992018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1000
1001 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1002 after asm. Pass a flag for it to build_asm_expr.
1003 * c-tree.h (build_asm_expr): Update declaration.
1004 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1005 set ASM_INLINE_P.
1006
30bd42b9
SB
10072018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1008
1009 PR inline-asm/55681
1010 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1011 combination of volatile and goto, in any order, without repetitions.
1012
9df6c0e4
JB
10132018-12-04 James Norris <jnorris@codesourcery.com>
1014 Cesar Philippidis <cesar@codesourcery.com>
1015 Julian Brown <julian@codesourcery.com>
1016
1017 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1018 code.
1019
f44697b7
RB
10202018-11-30 Richard Biener <rguenther@suse.de>
1021
1022 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1023 _Literal (type) { ... } as empty aggregate or vector constructor.
1024
550dfbdc
MS
10252018-11-29 Martin Sebor <msebor@redhat.com>
1026
1027 PR c/88091
1028 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1029 (convert_arguments): Add comments. Pass additional argument to
1030 the function above.
1031
673670da
MS
10322018-11-29 Martin Sebor <msebor@redhat.com>
1033
1034 PR c/88172
1035 PR testsuite/88208
1036 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1037
db1d09b0
MS
10382018-11-23 Martin Sebor <msebor@redhat.com>
1039
1040 PR testsuite/88098
1041 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1042 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1043
98f08eb8
MS
10442018-11-20 Martin Sebor <msebor@redhat.com>
1045
1046 * c-parser.c (c_parser_has_attribute_expression): New function.
1047 (c_parser_attribute): New function.
1048 (c_parser_attributes): Move code into c_parser_attribute.
1049 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1050
cd5da983
MS
10512018-11-15 Martin Sebor <msebor@redhat.com>
1052
1053 PR c/83656
1054 * c-decl.c (header_for_builtin_fn): Declare.
1055 (diagnose_mismatched_decls): Diagnose declarations of built-in
1056 functions without a prototype.
1057 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1058 (convert_argument): Same.
1059 (convert_arguments): Factor code out into convert_argument.
1060 Detect mismatches between built-in formal arguments in calls
1061 to built-in without prototype.
1062 (build_conditional_expr): Same.
1063 (type_or_builtin_type): New function.
1064 (convert_for_assignment): Add argument. Conditionally issue
1065 warnings instead of errors for mismatches.
1066
620e594b
DM
10672018-11-13 David Malcolm <dmalcolm@redhat.com>
1068
1069 * c-decl.c: Replace "source_location" with "location_t".
1070 * c-tree.h: Likewise.
1071 * c-typeck.c: Likewise.
1072 * gimple-parser.c: Likewise.
1073
3179ebae
JJ
10742018-11-09 Jakub Jelinek <jakub@redhat.com>
1075
81a227c6
JJ
1076 * c-parser.c (c_parser_omp_clause_final): Use
1077 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1078 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1079 parsing instead of c_parser_paren_condition.
1080 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1081 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1082 c_fully_fold instead of c_parser_condition.
1083 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1084 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1085 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1086 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1087 c_parser_expr_no_commas instead of c_parser_expression.
1088
98c91c56
JJ
1089 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1090 reduction clause with inscan modifier.
1091
3179ebae
JJ
1092 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1093 clauses other than atomic_default_mem_order.
1094
28567c40
JJ
10952018-11-08 Jakub Jelinek <jakub@redhat.com>
1096
1097 * c-parser.c: Include memmode.h.
1098 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1099 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1100 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1101 task_reduction clauses.
1102 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1103 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1104 section, or lvalue assignment expression.
1105 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1106 (c_parser_omp_clause_lastprivate): Parse optional
1107 conditional: modifier.
1108 (c_parser_omp_clause_hint): Require constant integer expression rather
1109 than just integer expression.
1110 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1111 clause.
1112 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1113 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1114 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1115 functions.
1116 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1117 iterators. Parse mutexinoutset and depobj kinds.
1118 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1119 callers.
1120 (c_parser_omp_all_clauses): Likewise. Handle
1121 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1122 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1123 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1124 default memory order from requires directive if any. Adjust
1125 c_finish_omp_atomic caller.
1126 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1127 (c_parser_omp_flush): Parse flush with memory-order-clause.
1128 (c_parser_omp_for_loop): Allow NE_EXPR even in
1129 OpenMP loops, adjust c_finish_omp_for caller.
1130 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1131 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1132 Allow to be called while parsing combined parallel master.
1133 Parse combined master taskloop{, simd}.
1134 (c_parser_omp_parallel): Parse combined
1135 parallel master{, taskloop{, simd}} constructs.
1136 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1137 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1138 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1139 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1140 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1141 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1142 around teams body. Use SET_EXPR_LOCATION.
1143 (c_parser_omp_target_data): Allow target data
1144 with only use_device_ptr clauses.
1145 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1146 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1147 (c_parser_omp_requires): New function.
1148 (c_finish_taskloop_clauses): New function.
1149 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1150 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1151 declaration. Disallow in_reduction clause when combined with parallel
1152 master.
1153 (c_parser_omp_construct): Adjust c_parser_omp_master and
1154 c_parser_omp_taskgroup callers.
1155 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1156 other than cancel.
1157 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1158 like OMP_CLAUSE_REDUCTION.
1159 (handle_omp_array_sections): Likewise. Call save_expr on array
1160 reductions before calling build_index_type. Handle depend clauses
1161 with iterators.
1162 (struct c_find_omp_var_s): New type.
1163 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1164 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1165 with static, runtime or auto schedule kinds. Call save_expr for whole
1166 array reduction sizes. Diagnose reductions with zero sized elements
1167 or variable length structures. Diagnose nogroup clause used with
1168 reduction clause(s). Handle depend clause with
1169 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1170 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1171 some different type for other kinds. Use build_unary_op with
1172 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1173 Handle depend clauses with iterators. Remove no longer needed special
1174 case that predetermined const qualified vars may be specified in
1175 firstprivate clause. Complain if const qualified vars are mentioned
1176 in data-sharing clauses other than firstprivate or shared. Use
1177 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1178 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1179 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1180 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1181
7e2de6df
DM
11822018-10-29 David Malcolm <dmalcolm@redhat.com>
1183
1184 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1185 logic for change to name_hint::operator bool.
1186 (undeclared_variable): Likewise.
1187 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1188 (c_parser_parameter_declaration): Likewise.
1189
9f936c86
JM
11902018-10-17 Joseph Myers <joseph@codesourcery.com>
1191
1192 * c-errors.c (pedwarn_c11): New function.
1193 * c-parser.c (disable_extension_diagnostics): Save
1194 warn_c11_c2x_compat and set it to 0.
1195 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1196 (c_parser_static_assert_declaration_no_semi): Handle
1197 _Static_assert without string constant.
1198 * c-tree.h (pedwarn_c11): New prototype.
1199
033eb567
DM
12002018-10-17 David Malcolm <dmalcolm@redhat.com>
1201
1202 * Make-lang.in (selftest-c): New.
1203 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1204 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1205 from gcc/Makefile.in.
1206
0edf3afe
RB
12072018-10-02 Richard Biener <rguenther@suse.de>
1208
1209 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1210
8313a764
JM
12112018-09-26 Joseph Myers <joseph@codesourcery.com>
1212
1213 PR c/87390
1214 * c-typeck.c (build_binary_op): Use excess precision for
1215 comparisons of integers and floating-point for C11 and later.
1216
ce6f0888
MJ
12172018-09-26 Martin Jambor <mjambor@suse.cz>
1218
1219 PR c/87347
1220 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1221 comment.
ce6f0888 1222
9c4a4b3c
DM
12232018-09-17 David Malcolm <dmalcolm@redhat.com>
1224
1225 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1226 Update for new param.
1227 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1228 Likewise.
1229
80c6d1f4
MJ
12302018-09-17 Martin Jambor <mjambor@suse.cz>
1231
1232 PR c/63886
1233 * c-parser.c: (warn_for_abs): New function.
1234 (c_parser_postfix_expression_after_primary): Call it.
1235
4a426e36
BE
12362018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1237
1238 * c-typeck.c (digest_init): Shorten overlength strings.
1239
6d900107
BE
12402018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1241
1242 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1243
b5764229
BE
12442018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1245
1246 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1247 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1248
22eea6b2
AM
12492018-08-30 Alexander Monakov <amonakov@ispras.ru>
1250
1251 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1252 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1253
85204e23
DM
12542018-08-27 David Malcolm <dmalcolm@redhat.com>
1255
1256 PR 87091
1257 * c-decl.c (implicitly_declare): Update call to
1258 maybe_add_include_fixit to suggest overriding the location, as it
1259 is for a note.
1260 * c-objc-common.c (c_tree_printer): Update for conversion of
1261 show_caret_p to a tri-state.
1262
3d78e008
ML
12632018-08-27 Martin Liska <mliska@suse.cz>
1264
1265 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1266 fndecl_built_in_p and remove check for FUNCTION_DECL if
1267 possible.
3d78e008
ML
1268 (diagnose_mismatched_decls): Likewise.
1269 (merge_decls): Likewise.
1270 (warn_if_shadowing): Likewise.
1271 (pushdecl): Likewise.
1272 (implicitly_declare): Likewise.
1273 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1274 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1275 * c-typeck.c (build_function_call_vec): Likewise.
1276 (convert_arguments): Likewise.
1277
097f82ec
DM
12782018-08-20 David Malcolm <dmalcolm@redhat.com>
1279
1280 PR other/84889
1281 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1282 (diagnose_mismatched_decls): Likewise, in various places.
1283 (warn_if_shadowing): Likewise.
1284 (implicit_decl_warning): Likewise.
1285 (implicitly_declare): Likewise.
1286 (undeclared_variable): Likewise.
1287 (declare_label): Likewise.
1288 (grokdeclarator): Likewise.
1289 (start_function): Likewise.
1290 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1291 (c_parser_parameter_declaration): Likewise.
1292 (c_parser_binary_expression): Likewise.
1293 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1294 (parser_build_binary_op): Likewise.
1295 (build_unary_op): Likewise.
1296 (error_init): Likewise.
1297 (pedwarn_init): Likewise.
1298 (warning_init): Likewise.
1299 (convert_for_assignment): Likewise.
1300
96e6ae57
DM
13012018-08-15 David Malcolm <dmalcolm@redhat.com>
1302
1303 * c-objc-common.c: Include "gcc-rich-location.h".
1304 (c_tree_printer): Move implemenation of '%T' to...
1305 (print_type): ...this new function.
1306 (range_label_for_type_mismatch::get_text): New function.
1307 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1308 range for the various ic_argpass cases.
1309 (class maybe_range_label_for_tree_type_mismatch): New class.
1310 (build_binary_op): Use it when calling binary_op_error.
1311
0cd020ae 13122018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1313
0cd020ae
PK
1314 * c-decl.c (start_decl): Do not warn if variables is named as main
1315 and is a local variable.
1316
72733314
IS
13172018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1318
1319 PR c/19315
1320 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1321 objects of unknown size.
1322
23aa9f7c
MS
13232018-08-13 Martin Sebor <msebor@redhat.com>
1324
1325 PR tree-optimization/71625
1326 * c-parser.c (c_parser_declaration_or_fndef): Call
1327 braced_list_to_string.
1328
e5e7e50d
BH
13292018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1330
1331 PR c/86690
1332 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1333 errors.
1334
8a45b051
MS
13352018-08-01 Martin Sebor <msebor@redhat.com>
1336
1337 PR tree-optimization/86650
1338 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1339 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1340
5922dcb5
JJ
13412018-08-01 Jakub Jelinek <jakub@redhat.com>
1342
1343 PR c/85704
1344 * c-typeck.c (init_field_decl_cmp): New function.
1345 (output_pending_init_elements): Use it for field comparisons
1346 instead of pure bit_position comparisons.
1347
9b452033
JJ
13482018-07-12 Jakub Jelinek <jakub@redhat.com>
1349
1350 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1351 type here, instead add "omp declare target implicit" attribute.
1352 (finish_decl): Diagnose vars without mappable type here.
1353
ab20d992
JJ
13542018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1355 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1356 Cesar Philippidis <cesar@codesourcery.com>
1357
1358 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1359 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1360 to their non-present_or_* counterparts. Make 'self' an alias to
1361 PRAGMA_OACC_CLAUSE_HOST.
1362 (c_parser_oacc_data_clause): Update GOMP mappings for
1363 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1364 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1365 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1366 Remove support for present_or_* clauses.
1367 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1368 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1369 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1370 (OACC_DATA_CLAUSE_MASK): Likewise.
1371 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1372 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1373 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1374 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1375 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1376
e197e64e
KV
13772018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1378
1379 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1380 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1381 (c_parser_gimple_unary_expression): Likewise.
1382
487f2f61
JJ
13832018-06-15 Jakub Jelinek <jakub@redhat.com>
1384
1385 PR c/86093
1386 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1387 before doing POINTER_DIFF_EXPR.
1388
e4d44a37
MP
13892018-06-07 Marek Polacek <polacek@redhat.com>
1390
1391 PR c/85318
1392 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1393 for loop initial declarations.
1394
b67b9225
DP
13952018-05-30 David Pagan <dave.pagan@oracle.com>
1396
1397 PR c/55976
1398 * c-decl.c (grokdeclarator): Update check for return type warnings.
1399 (start_function): Likewise.
1400 (finish_function): Likewise.
1401 * c-typeck.c (c_finish_return): Update check for return type warnings.
1402 Pass OPT_Wreturn_type to pedwarn when appropriate.
1403
c566cc9f
RS
14042018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1405
1406 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1407 __FMA_EXPR handlng.
1408
e4f81565
RS
14092018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1410
1411 * gimple-parser.c: Include internal-fn.h.
1412 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1413 (c_parser_gimple_call_internal): New function.
1414 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1415 Fix typos in comment.
1416
79e7b1fe
JJ
14172018-05-10 Jakub Jelinek <jakub@redhat.com>
1418
1419 PR c++/85662
1420 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1421 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1422 fold_convert_loc.
1423 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1424 fold_offsetof_1, pass argtype as TYPE to it and drop the
1425 fold_convert_loc.
1426
f7584c81
DP
14272018-05-02 David Pagan <dave.pagan@oracle.com>
1428
1429 PR c/30552
1430 * c-decl.c (old_style_parameter_scope): New function.
1431 * c-parser.c (c_parser_postfix_expression): Check for statement
1432 expressions in old-style function parameter list declarations.
1433 * c-parser.h (old_style_parameter_scope): New extern declaration.
1434
b33a0cb3
JJ
14352018-04-25 Jakub Jelinek <jakub@redhat.com>
1436
1437 PR sanitizer/84307
1438 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1439 it is not TREE_STATIC.
1440 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1441 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1442 its COMPOUND_LITERAL_EXPR_DECL.
1443
c5c5822a
JM
14442018-03-21 Joseph Myers <joseph@codesourcery.com>
1445
1446 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1447 where all functions return the same _FloatN or _FloatNx type,
1448 treat integer types as _Float64 instead of double.
1449
aa1c9429
JJ
14502018-03-21 Jakub Jelinek <jakub@redhat.com>
1451
1452 PR c/84999
1453 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1454 building vector comparison, diagnose it and return error_mark_node.
1455
9bb45a95
JJ
14562018-03-15 Jakub Jelinek <jakub@redhat.com>
1457
1458 PR c/84853
1459 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1460 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1461 INTEGER_TYPE element type.
1462
ada6bad9
DP
14632018-03-13 David Pagan <dave.pagan@oracle.com>
1464
1465 PR c/46921
1466 * c-typeck.c (output_init_element): Ensure field initializer
1467 expression is always evaluated if there are side effects.
1468
849bbdb9
JJ
14692018-03-06 Jakub Jelinek <jakub@redhat.com>
1470
1471 PR c/84721
1472 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1473 !building_stmt_list_p ().
1474
d74641bd
RS
14752018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1476
1477 PR c/84305
1478 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1479 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1480 and include the BIND_EXPR in the list of things that need to be
1481 pre-evaluated.
1482
0444aa9c
NS
14832018-02-09 Nathan Sidwell <nathan@acm.org>
1484
1485 PR c/84293
1486 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1487 to strict_aliasing_warning.
1488
7c30b12a
PC
14892018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1490
1491 * c-typeck.c (really_start_incremental_init, push_init_level,
1492 set_nonincremental_init, output_init_element, process_init_element):
1493 Use DECL_UNNAMED_BIT_FIELD.
1494
2be4dfcb
MP
14952018-01-31 Marek Polacek <polacek@redhat.com>
1496
1497 PR c/81779
1498 * c-parser.c (c_parser_compound_statement_nostart): Call
1499 expansion_point_location_if_in_system_header.
1500
bb9869d5
DM
15012018-01-17 David Malcolm <dmalcolm@redhat.com>
1502
1503 PR c++/83814
1504 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1505 the C part.
1506
b4923738
JJ
15072018-01-13 Jakub Jelinek <jakub@redhat.com>
1508
1509 PR c/83801
1510 * c-tree.h (decl_constant_value_1): Add a bool argument.
1511 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1512 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1513 (decl_constant_value): Adjust caller.
1514 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1515 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1516 decl_constant_value returns initializer that has BLKmode or
1517 array type.
1518 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1519
928686b1
RS
15202018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1521 Alan Hayward <alan.hayward@arm.com>
1522 David Sherwood <david.sherwood@arm.com>
1523
1524 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1525 TYPE_VECTOR_SUBPARTS.
1526
85ec4feb
JJ
15272018-01-03 Jakub Jelinek <jakub@redhat.com>
1528
1529 Update copyright years.
1530
913884f7
JJ
15312018-01-01 Jakub Jelinek <jakub@redhat.com>
1532
1533 PR c/83595
1534 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1535 c_parser_conditional_expression, c_parser_cast_expression,
1536 c_parser_sizeof_expression, c_parser_alignof_expression,
1537 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1538 c_parser_transaction_expression): Use set_error () method instead
1539 of setting value member to error_mark_node.
1540
c6cfa2bf
MM
15412017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1542
1543 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1544 and _Float<N>X built-in functions.
1545
11d29d63
JJ
15462017-12-22 Jakub Jelinek <jakub@redhat.com>
1547
14ec014e
JJ
1548 PR debug/83550
1549 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1550 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1551 incomplete vars rather than after it.
1552
11d29d63
JJ
1553 PR debug/83547
1554 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1555 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1556 and consider empty ones if there are no other stmts. For
1557 -Wunused-value walk all statements before the one only followed by
1558 DEBUG_BEGIN_STMTs.
1559
170a8bd6 15602017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1561 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1562
1563 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1564 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1565 (c_parser_do_statement): Likewise.
1566 (c_parser_for_statement): Likewise.
1567 (c_parser_statement_after_labels): Adjust calls to above.
1568 (c_parse_pragma_ivdep): New static function.
1569 (c_parser_pragma_unroll): Likewise.
1570 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1571 <PRAGMA_UNROLL>: New case.
1572
01512446
JJ
15732017-12-19 Jakub Jelinek <jakub@redhat.com>
1574
1575 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1576 perform_integral_promotions, digest_init): Replace Yoda conditions
1577 with typical order conditions.
1578 * c-decl.c (check_bitfield_type_and_width): Likewise.
1579
c65e18d3
BE
15802017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1581
1582 * c-typeck.c (c_safe_arg_type_equiv_p,
1583 c_safe_function_type_cast_p): New function.
1584 (build_c_cast): Implement -Wcast-function-type.
1585
b7280579
RB
15862017-12-14 Richard Biener <rguenther@suse.de>
1587
1588 PR c/83415
1589 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1590 like REALPART_EXPR for the behavior of whether its operand
1591 is an lvalue.
1592
49e6a6c0
MP
15932017-12-12 Marek Polacek <polacek@redhat.com>
1594
1595 PR c/82679
1596 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1597
ab20d992 15982017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1599
1600 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1601 * c-parser.c (add_debug_begin_stmt): New.
1602 (c_parser_declaration_or_fndef): Call it.
1603 (c_parser_compound_statement_nostart): Likewise.
1604 (c_parser_statement_after_labels): Likewise.
1605 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1606
4b2b493f
JM
16072017-12-07 Joseph Myers <joseph@codesourcery.com>
1608
1609 * c-decl.c (build_compound_literal): Add parameter alignas_align
1610 and set alignment of decl if nonzero.
1611 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1612 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1613 qualifier.
1614 (c_parser_struct_declaration): Update syntax comment.
1615 (c_parser_type_name): Add alignas_ok argument and pass it to
1616 c_parser_declspecs.
1617 (c_parser_cast_expression): Pass true to c_parser_type_name and
1618 give error if a cast used an _Alignas specifier.
1619 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1620 give error if sizeof (type-name) used an _Alignas specifier.
1621 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1622 give error if _Alignof (type-name) used an _Alignas specifier.
1623 (c_parser_postfix_expression_after_paren_type): Check specified
1624 alignment for a compound literal and pass it to
1625 build_compound_literal.
1626 * c-parser.h (c_parser_type_name): Update prototype.
1627 * c-tree.h (build_compound_literal): Update prototype.
1628
5d9ae53d
MS
16292017-12-07 Martin Sebor <msebor@redhat.com>
1630
1631 PR c/81544
1632 * c-decl.c (c_decl_attributes): Look up existing declaration and
1633 pass it to decl_attributes.
1634
c79144f8
DM
16352017-12-06 David Malcolm <dmalcolm@redhat.com>
1636
1637 PR c/83236
1638 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1639 reserved for use by the implementation.
1640
613bc14f
DM
16412017-12-06 David Malcolm <dmalcolm@redhat.com>
1642
1643 * c-decl.c: Include "c-family/c-spellcheck.h".
1644
05abad4c
ML
16452017-12-05 Martin Liska <mliska@suse.cz>
1646 Jakub Jelinek <jakub@redhat.com>
1647
1648 * c-typeck.c (pointer_diff): Add new argument and instrument
1649 pointer subtraction.
1650 (build_binary_op): Similar for pointer comparison.
1651
cc6534d4
JJ
16522017-12-01 Jakub Jelinek <jakub@redhat.com>
1653
65791f42
JJ
1654 PR c/79153
1655 * c-parser.c: Include tree-iterator.h.
1656 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1657 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1658 on it.
1659
cc6534d4
JJ
1660 PR c/83222
1661 * c-tree.h (decl_constant_value_1): Declare.
1662 * c-typeck.c (decl_constant_value_1): New function.
1663 (decl_constant_value): Use it.
1664 * c-fold.c (c_fully_fold_internal): If in_init, use
1665 decl_constant_value_1 instead of decl_constant_value.
1666
5de73c05
JJ
16672017-11-30 Jakub Jelinek <jakub@redhat.com>
1668
1669 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1670
058f0b9e
JJ
16712017-11-28 Jakub Jelinek <jakub@redhat.com>
1672
1673 PR sanitizer/81275
1674 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1675 c_switch_covers_all_cases_p returns true.
1676
5e9d6aa4 16772017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1678 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1679
1680 * Make-lang.in (c/c-array-notation.o): Remove.
1681 * c-array-notation.c: Delete.
1682 * c-decl.c: Remove cilkplus condition.
1683 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1684 c_parser_cilk_verify_simd, c_parser_array_notation,
1685 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1686 c_parser_cilk_simd_fn_vector_attrs,
1687 c_finish_cilk_simd_fn_tokens): Delete.
1688 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1689 (c_parser_direct_declarator_inner): Ditto.
1690 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1691 (c_parser_attributes, c_parser_compound_statement,
1692 c_parser_statement_after_labels, c_parser_if_statement,
1693 c_parser_switch_statement, c_parser_while_statement,
1694 c_parser_do_statement, c_parser_for_statement,
1695 c_parser_unary_expression, c_parser_postfix_expression,
1696 c_parser_postfix_expression_after_primary,
1697 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1698 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1699 support.
1700 * c-typeck.c (build_array_ref, build_function_call_vec,
1701 convert_arguments,
1702 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1703 c_finish_loop, build_binary_op): Remove cilkplus support.
1704
9e851845
JJ
17052017-11-28 Jakub Jelinek <jakub@redhat.com>
1706
1707 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1708 of build3.
1709
ab20d992 17102017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
1711
1712 * Make-lang.in (c.install-plugin): Install backend import library.
1713
41521dee
JJ
17142017-11-23 Jakub Jelinek <jakub@redhat.com>
1715
1716 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1717 pragma_stmt context.
1718
ac9effed
EB
17192017-11-23 Mike Stump <mikestump@comcast.net>
1720 Eric Botcazou <ebotcazou@adacore.com>
1721
1722 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1723 ANNOTATE_EXPR.
1724 (c_parser_do_statement): Likewise.
1725 (c_parser_for_statement): Likewise.
1726
ce95abc4
DM
17272017-11-22 David Malcolm <dmalcolm@redhat.com>
1728
1729 PR c++/62170
1730 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1731 bool to bool *. Within '%T' handling, if showing an "aka", use
1732 "quoted" param to add appropriate quoting.
1733
974aedcc
MP
17342017-11-22 Marek Polacek <polacek@redhat.com>
1735
1736 PR c++/60336
1737 PR middle-end/67239
1738 PR target/68355
1739 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1740
d4300cc6
DM
17412017-11-21 David Malcolm <dmalcolm@redhat.com>
1742
1743 PR c/83056
1744 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1745 earlier failed lookups.
1746
1af4ebf5
MG
17472017-11-21 Marc Glisse <marc.glisse@inria.fr>
1748
1749 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1750 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1751
26edace6
DM
17522017-11-20 David Malcolm <dmalcolm@redhat.com>
1753
1754 PR c/81404
1755 * c-decl.c: Include "c-family/known-headers.h".
1756 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1757 to known-headers.cc.
1758 (class suggest_missing_header): Move to known-header.h.
1759 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1760 than get_c_name_hint.
1761
b1212255
DM
17622017-11-20 David Malcolm <dmalcolm@redhat.com>
1763
1764 * c-decl.c (get_c_name_hint): New function.
1765 (class suggest_missing_header): New class.
1766 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1767 suggest missing headers to the user.
1768
6c7a259b
DM
17692017-11-20 David Malcolm <dmalcolm@redhat.com>
1770
1771 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1772 Include "c-family/name-hint.h"
1773 (implicit_decl_warning): Convert "hint" from
1774 const char * to name_hint. Pass location to
1775 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1776 warning was not printed.
1777 (undeclared_variable): Likewise for "guessed_id".
1778 (lookup_name_fuzzy): Convert return type from const char *
1779 to name_hint. Add location_t param.
1780 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1781 Include "c-family/name-hint.h"
1782 (c_parser_declaration_or_fndef): Convert "hint" from
1783 const char * to name_hint. Pass location to lookup_name_fuzzy.
1784 (c_parser_parameter_declaration): Likewise.
1785
f9c59f7e
JJ
17862017-11-19 Jakub Jelinek <jakub@redhat.com>
1787
1788 PR c/66618
1789 PR c/69960
1790 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1791 where needed.
1792 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1793 handle_omp_array_sections): Likewise.
1794 (digest_init): Don't call decl_constant_value_for_optimization.
1795 * c-tree.h (decl_constant_value_for_optimization): Removed.
1796 * c-fold.c (c_fold_array_ref): New function.
1797 (c_fully_fold_internal): Add LVAL argument, propagate it through
1798 recursive calls. For VAR_P call decl_constant_value and
1799 unshare if not LVAL and either optimizing or IN_INIT. Remove
1800 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1801 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1802 (c_fully_fold): Add LVAL argument, pass it through to
1803 c_fully_fold_internal.
1804 (decl_constant_value_for_optimization): Removed.
1805
3ca0dc60
JM
18062017-11-15 Joseph Myers <joseph@codesourcery.com>
1807
1808 PR c/81156
1809 * c-parser.c (check_tgmath_function): New function.
1810 (enum tgmath_parm_kind): New enum.
1811 (c_parser_postfix_expression): Handle __builtin_tgmath.
1812
64a5912c
DM
18132017-10-31 David Malcolm <dmalcolm@redhat.com>
1814
1815 * c-decl.c (implicit_decl_warning): Update for renaming of
1816 pedwarn_at_rich_loc and warning_at_rich_loc.
1817 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1818 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1819 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1820 (c_parser_struct_or_union_specifier): Likewise for renaming of
1821 pedwarn_at_rich_loc.
1822 (c_parser_parameter_declaration): Likewise for renaming of
1823 error_at_rich_loc.
1824 * c-typeck.c (build_component_ref): Likewise.
1825 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1826 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1827 (set_init_label): Likewise for renaming of error_at_rich_loc.
1828
c1136864
RB
18292017-10-30 Richard Biener <rguenther@suse.de>
1830
1831 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1832 stmts.
1833
ee5fd23a
MM
18342017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1835
1836 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1837 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1838
1a59ccf2
DM
18392017-10-25 David Malcolm <dmalcolm@redhat.com>
1840
1841 PR c/7356
1842 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1843 semicolons.
1844
bc1a75dd
JJ
18452017-10-25 Jakub Jelinek <jakub@redhat.com>
1846
1847 PR libstdc++/81706
1848 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1849 newdecl to corresponding __builtin_ if any.
1850
ff1ff960
PC
18512017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1852
1853 PR c++/82466
1854 * c-decl.c (diagnose_mismatched_decls): Use
1855 OPT_Wbuiltin_declaration_mismatch.
1856
62e1c678
DM
18572017-10-12 David Malcolm <dmalcolm@redhat.com>
1858
1859 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1860 use it to guard calls to maybe_suggest_missing_token_insertion.
1861 (c_parser_parms_list_declarator): Override default value of new
1862 "type_is_unique" param to c_parser_require.
1863 (c_parser_asm_statement): Likewise.
1864 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1865 defaulting to true.
1866
a92f6726
NS
18672017-10-11 Nathan Sidwell <nathan@acm.org>
1868
1869 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1870
8e6cdc90
RS
18712017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1872
1873 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1874 operating on trees as wide_ints.
1875 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1876 (c_tree_equal): Likewise.
1877
8139a48e
DM
18782017-10-04 David Malcolm <dmalcolm@redhat.com>
1879
1880 * c-decl.c (push_parm_decl): Store c_parm's location into the
1881 PARAM_DECL.
1882 (build_c_parm): Add "loc" param and store it within the c_parm.
1883 * c-parser.c (struct c_parser): Add "last_token_location" field.
1884 (c_parser_consume_token): Store location of the token into the
1885 new field.
1886 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1887 when handling a FUNCTION_DECL, if it doesn't already have them.
1888 (c_parser_parameter_declaration): Generate a location for the
1889 parameter, and pass it to the call to build_c_parm.
1890 * c-tree.h (struct c_parm): Add field "loc".
1891 (build_c_parm): Add location_t param.
1892 * c-typeck.c (get_fndecl_argument_location): New function.
1893 (inform_for_arg): New function.
1894 (convert_for_assignment): Use inform_for_arg when dealing with
1895 ic_argpass.
1896
2a389958
JJ
18972017-09-29 Jakub Jelinek <jakub@redhat.com>
1898
7d386d45
JJ
1899 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1900 width is non-NULL.
1901 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1902 don't SET_DECL_C_BIT_FIELD here.
1903
2a389958
JJ
1904 PR c/82340
1905 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1906 instead of trying to set just TREE_READONLY manually.
1907
ebc6a85e
TV
19082017-09-16 Tom de Vries <tom@codesourcery.com>
1909
1910 PR c/81875
1911 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1912 cond itself.
1913
bb75facd
JM
19142017-09-15 Joseph Myers <joseph@codesourcery.com>
1915
1916 PR c/82071
1917 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1918 for C11.
1919 (build_conditional_expr): For C11, generate result with excess
1920 precision when one argument is an integer and the other is of a
1921 type using excess precision.
1922
1d933576
BE
19232017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1924
1925 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1926
267bbb6f
MP
19272017-09-13 Marek Polacek <polacek@redhat.com>
1928
1929 PR c/82167
1930 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1931 than expr.original_type.
1932
6836632e
NS
19332017-09-12 Nathan Sidwell <nathan@acm.org>
1934
1935 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1936 resort_sorted_fields): Moved from c-family/c-common.c.
1937 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1938
e035be33
JM
19392017-09-01 Joseph Myers <joseph@codesourcery.com>
1940
1941 PR c/82071
1942 * c-typeck.c (build_atomic_assign): Handle argument with excess
1943 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1944 argument passed to build_binary_op and convert_for_assignment but
1945 not for call to c_fully_fold.
1946 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1947 Ensure build_binary_op is called with argument with original
1948 semantic type. Avoid calling c_fully_fold with an
1949 EXCESS_PRECISION_EXPR from build_binary_op.
1950
d2e05fcb
JJ
19512017-09-01 Jakub Jelinek <jakub@redhat.com>
1952
1953 PR c/81887
1954 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1955
b397965c
RS
19562017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1957 Alan Hayward <alan.hayward@arm.com>
1958 David Sherwood <david.sherwood@arm.com>
1959
1960 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1961 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1962 m1 and m2 to the signed equivalent of a fixed-point
1963 SCALAR_TYPE_MODE.
1964
14e18d71
DM
19652017-08-24 David Malcolm <dmalcolm@redhat.com>
1966
1967 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1968 than CAN_HAVE_LOCATION_P when determining whether to use the
1969 location_t value within "value".
1970
7f204c0f
DM
19712017-08-21 David Malcolm <dmalcolm@redhat.com>
1972
1973 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1974 rather than peeking the location of the first token.
1975 * c-tree.h (c_expr::get_location): New method.
1976
2f687306
DM
19772017-08-21 David Malcolm <dmalcolm@redhat.com>
1978
1979 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1980 to check_function_arguments.
1981
3e7b80d7
MP
19822017-08-18 Marek Polacek <polacek@redhat.com>
1983
1984 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1985 commentary.
1986
00aa1fa2
L
19872017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1988
1989 PR c/53037
1990 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1991 (check_bitfield_type_and_width): Don't allow bit-field with
1992 warn_if_not_aligned type.
1993
da67acb9
MS
19942017-08-14 Martin Sebor <msebor@redhat.com>
1995
1996 PR c/81117
1997 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1998
bb85aa74
MP
19992017-08-11 Marek Polacek <polacek@redhat.com>
2000
2001 PR c/81795
2002 * c-decl.c (pushtag): Only print inform if the warning was printed.
2003 (grokdeclarator): Likewise.
2004
32129a17
DM
20052017-08-10 David Malcolm <dmalcolm@redhat.com>
2006
2007 * c-parser.c (c_parser_error): Rename to...
2008 (c_parser_error_richloc): ...this, making static, and adding
2009 "richloc" parameter, passing it to the c_parse_error call,
2010 rather than calling c_parser_set_source_position_from_token.
2011 (c_parser_error): Reintroduce, reimplementing in terms of the
2012 above, converting return type from void to bool.
2013 (class token_pair): New class.
2014 (struct matching_paren_traits): New struct.
2015 (matching_parens): New typedef.
2016 (struct matching_brace_traits): New struct.
2017 (matching_braces): New typedef.
2018 (get_matching_symbol): New function.
2019 (c_parser_require): Add param MATCHING_LOCATION, using it to
2020 highlight matching "opening" tokens for missing "closing" tokens.
2021 (c_parser_skip_until_found): Likewise.
2022 (c_parser_static_assert_declaration_no_semi): Convert explicit
2023 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2024 class matching_parens, so that the pertinent open parenthesis is
2025 highlighted when there are problems locating the close
2026 parenthesis.
2027 (c_parser_struct_or_union_specifier): Likewise.
2028 (c_parser_typeof_specifier): Likewise.
2029 (c_parser_alignas_specifier): Likewise.
2030 (c_parser_simple_asm_expr): Likewise.
2031 (c_parser_braced_init): Likewise, for matching_braces.
2032 (c_parser_paren_condition): Likewise, for matching_parens.
2033 (c_parser_switch_statement): Likewise.
2034 (c_parser_for_statement): Likewise.
2035 (c_parser_asm_statement): Likewise.
2036 (c_parser_asm_operands): Likewise.
2037 (c_parser_cast_expression): Likewise.
2038 (c_parser_sizeof_expression): Likewise.
2039 (c_parser_alignof_expression): Likewise.
2040 (c_parser_generic_selection): Likewise.
2041 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2042 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2043 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2044 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2045 c_parser_skip_until_found call.
2046 (c_parser_objc_class_definition): Use class matching_parens as
2047 above.
2048 (c_parser_objc_method_decl): Likewise.
2049 (c_parser_objc_try_catch_finally_statement): Likewise.
2050 (c_parser_objc_synchronized_statement): Likewise.
2051 (c_parser_objc_at_property_declaration): Likewise.
2052 (c_parser_oacc_wait_list): Likewise.
2053 (c_parser_omp_var_list_parens): Likewise.
2054 (c_parser_omp_clause_collapse): Likewise.
2055 (c_parser_omp_clause_default): Likewise.
2056 (c_parser_omp_clause_if): Likewise.
2057 (c_parser_omp_clause_num_threads): Likewise.
2058 (c_parser_omp_clause_num_tasks): Likewise.
2059 (c_parser_omp_clause_grainsize): Likewise.
2060 (c_parser_omp_clause_priority): Likewise.
2061 (c_parser_omp_clause_hint): Likewise.
2062 (c_parser_omp_clause_defaultmap): Likewise.
2063 (c_parser_oacc_single_int_clause): Likewise.
2064 (c_parser_omp_clause_ordered): Likewise.
2065 (c_parser_omp_clause_reduction): Likewise.
2066 (c_parser_omp_clause_schedule): Likewise.
2067 (c_parser_omp_clause_num_teams): Likewise.
2068 (c_parser_omp_clause_thread_limit): Likewise.
2069 (c_parser_omp_clause_aligned): Likewise.
2070 (c_parser_omp_clause_linear): Likewise.
2071 (c_parser_omp_clause_safelen): Likewise.
2072 (c_parser_omp_clause_simdlen): Likewise.
2073 (c_parser_omp_clause_depend): Likewise.
2074 (c_parser_omp_clause_map): Likewise.
2075 (c_parser_omp_clause_device): Likewise.
2076 (c_parser_omp_clause_dist_schedule): Likewise.
2077 (c_parser_omp_clause_proc_bind): Likewise.
2078 (c_parser_omp_clause_uniform): Likewise.
2079 (c_parser_omp_for_loop): Likewise.
2080 (c_parser_cilk_clause_vectorlength): Likewise.
2081 (c_parser_cilk_clause_linear): Likewise.
2082 (c_parser_transaction_expression): Likewise.
2083 * c-parser.h (c_parser_require): Add param matching_location with
2084 default UNKNOWN_LOCATION.
2085 (c_parser_error): Convert return type from void to bool.
2086 (c_parser_skip_until_found): Add param matching_location with
2087 default UNKNOWN_LOCATION.
2088
30af3a2b
MP
20892017-08-09 Marek Polacek <polacek@redhat.com>
2090
2091 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2092 * c-tree.h (build_external_ref): Update declaration.
2093 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2094 (build_external_ref): Change the type of a parameter to bool.
2095 (parser_build_binary_op): Use true/false instead of 1/0.
2096 (pointer_diff): Likewise.
2097 (build_modify_expr): Likewise.
2098 (set_designator): Change the type of a parameter to bool.
2099 (set_init_index): Use true/false instead of 1/0.
2100 (set_init_label): Likewise.
2101 (output_init_element): Change the type of a parameter to bool.
2102 (output_pending_init_elements): Use true/false instead of 1/0.
2103 (process_init_element): Likewise.
2104 (build_binary_op): Change the type of a parameter to bool.
2105
296c53ac
MP
21062017-08-09 Marek Polacek <polacek@redhat.com>
2107
2108 PR c/81233
2109 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2110 Call emit_diagnostic_valist instead of pedwarn.
2111 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2112 Print the relevant types in diagnostics.
2113
a32c8316
MP
21142017-08-09 Marek Polacek <polacek@redhat.com>
2115
2116 PR c/81417
2117 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2118 build_conditional_expr.
a32c8316
MP
2119 * c-parser.c (c_parser_conditional_expression): Create locations for
2120 EXP1 and EXP2 from their source ranges. Pass the locations down to
2121 build_conditional_expr.
2122 * c-tree.h (build_conditional_expr): Update declaration.
2123 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2124 For -Wsign-compare, also print the types.
2125
314e6352
ML
21262017-08-08 Martin Liska <mliska@suse.cz>
2127
2128 * c-convert.c: Include header files.
2129 * c-typeck.c: Likewise.
2130
577eec56
ML
21312017-08-07 Martin Liska <mliska@suse.cz>
2132
2133 * c-parser.c (c_parser_attributes): Canonicalize name of an
2134 attribute.
2135
f7b6353a
MP
21362017-08-02 Marek Polacek <polacek@redhat.com>
2137
2138 PR c/81289
2139 * c-parser.c (c_parser_unary_expression): Use set_error.
2140
8a6eab34
MP
2141 PR c/81448
2142 PR c/81306
2143 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2144 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2145
ab20d992 21462017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2147 Martin Liska <mliska@suse.cz>
2148
2149 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2150 statement.
7fef86d3 2151
f34ebeb2
ML
21522017-07-31 Martin Liska <mliska@suse.cz>
2153
2154 PR sanitize/81530
2155 * c-convert.c (convert): Guard condition with flag_sanitize_p
2156 also with current_function_decl non-null equality.
2157 * c-decl.c (grokdeclarator): Likewise.
2158 * c-typeck.c (build_binary_op): Likewise.
2159
8595f67b
MP
21602017-07-25 Marek Polacek <polacek@redhat.com>
2161
2162 * c-decl.c (grokfield): Remove local variable.
2163
d49718d6
MP
21642017-07-25 Marek Polacek <polacek@redhat.com>
2165
2166 PR c/81364
2167 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2168 macro expansion if the body is in { }.
2169 (c_parser_while_statement): Likewise.
2170 (c_parser_for_statement): Likewise.
2171
ff22eb12
NS
21722017-07-18 Nathan Sidwell <nathan@acm.org>
2173
2174 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2175
eea77d1f
DM
21762017-07-14 David Malcolm <dmalcolm@redhat.com>
2177
2178 * c-decl.c (implicitly_declare): When suggesting a missing
2179 #include, provide a fix-it hint.
2180
b6f43128
DM
21812017-07-06 David Malcolm <dmalcolm@redhat.com>
2182
2183 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2184 and call that instead.
2185 * c-tree.h (selftest::run_c_tests): New decl.
2186
3e2becc4
MP
21872017-06-26 Marek Polacek <polacek@redhat.com>
2188
2189 PR c/80116
2190 * c-parser.c (c_parser_if_body): Set the location of the
2191 body of the conditional after parsing all the labels. Call
2192 warn_for_multistatement_macros.
2193 (c_parser_else_body): Likewise.
2194 (c_parser_switch_statement): Likewise.
2195 (c_parser_while_statement): Likewise.
2196 (c_parser_for_statement): Likewise.
2197 (c_parser_statement): Add a default argument. Save the location
2198 after labels have been parsed.
2199 (c_parser_c99_block_statement): Likewise.
2200
343ae898
RB
22012017-06-19 Richard Biener <rguenther@suse.de>
2202
2203 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2204 negated _Literals to parse _Literal (int) -1.
2205
45b2222a
ML
22062017-06-13 Martin Liska <mliska@suse.cz>
2207
2208 PR sanitize/78204
2209 * c-convert.c (convert): Use sanitize_flags_p.
2210 * c-decl.c (grokdeclarator): Likewise.
2211 * c-typeck.c (convert_for_assignment): Likewise.
2212 (c_finish_return): Likewise.
2213 (build_binary_op): Likewise.
2214
8ab7005b
JJ
22152017-06-08 Jakub Jelinek <jakub@redhat.com>
2216
2217 PR c/81006
2218 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2219 to sizetype before size_binop.
2220
363dc72c
JJ
22212017-06-07 Jakub Jelinek <jakub@redhat.com>
2222
2223 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2224 of TDI_generic.
2225
dc949728
MP
22262017-06-06 Marek Polacek <polacek@redhat.com>
2227
2228 PR c/79983
2229 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2230 ref.
2231 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2232
40ffd95f
BE
22332017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2234
2235 * c-parser.c (c_parser_binary_expression): Implement the
2236 -Wsizeof_pointer_div warning.
2237 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2238 from a parenthesized expression.
2239 (c_parser_expr_list): Use c_last_sizeof_loc.
2240 * c-tree.h (c_last_sizeof_loc): New external.
2241 * c-typeck.c (c_last_sizeof_loc): New variable.
2242 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2243
9fc5e7a4
MM
22442017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2245
2246 PR testsuite/80580
2247 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2248
f012c8ef
DM
22492017-05-30 David Malcolm <dmalcolm@redhat.com>
2250
2251 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2252 parameters.
2253
3cd211af
MS
22542017-05-24 Martin Sebor <msebor@redhat.com>
2255
2256 PR c/80731
2257 * c-fold.c (c_fully_fold_internal): Adjust.
2258 * c-typeck.c (parser_build_unary_op): Adjust.
2259
fd71a9a2
TS
22602017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2261
2262 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2263 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2264 "VECTOR_LENGTH".
2265
92fa0f9e
MP
22662017-05-23 Marek Polacek <polacek@redhat.com>
2267
2268 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2269 quotes.
2270
d11c168a
JJ
22712017-05-22 Jakub Jelinek <jakub@redhat.com>
2272
2273 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2274 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2275 it returned invariant. Call tree_invariant_p unconditionally
2276 afterwards to decide whether to return expr or op0.
2277
58aca9d9
NS
22782017-05-22 Nathan Sidwell <nathan@acm.org>
2279
2280 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2281
7fd549d2
TS
22822017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2283
2284 * c-parser.c (c_parser_omp_clause_default): Handle
2285 "OMP_CLAUSE_DEFAULT_PRESENT".
2286
6ecd2339
BE
22872017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2288
2289 * config-lang.in (gtfiles): Add c-family/c-format.c.
2290
8a57ecff
NS
22912017-05-18 Nathan Sidwell <nathan@acm.org>
2292
2293 * c-decl.c (pushdecl_top_level): Delete unused function.
2294
6574d78e
MP
22952017-05-18 Marek Polacek <polacek@redhat.com>
2296
2297 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2298 (check_earlier_gotos): Likewise.
2299 (define_label): Likewise.
2300 (pending_xref_error): Likewise.
2301 (smallest_type_quals_location): Likewise.
2302 (grokdeclarator): Likewise.
2303 (grokparms): Likewise.
2304 (identifier_global_value): Likewise.
2305 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2306 (find_init_member): Likewise.
2307
e3455240
MP
23082017-05-18 Marek Polacek <polacek@redhat.com>
2309
2310 * c-decl.c (start_decl): Use false/true instead of 0/1.
2311 (grokdeclarator): Likewise.
2312 (finish_struct): Likewise.
2313 (start_function): Change the return type to bool. Use false/true
2314 instead of 0/1.
2315 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2316 * c-tree.h (start_function): Update.
2317 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2318 (set_designator): Change the return type to bool. Use false/true
2319 instead of 0/1.
2320
3fa8871b
MP
23212017-05-17 Marek Polacek <polacek@redhat.com>
2322
2323 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2324 * c-typeck.c: Likewise.
2325
142473df
MP
23262017-05-17 Marek Polacek <polacek@redhat.com>
2327
2328 PR sanitizer/80659
2329 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2330 DECL_IGNORED_P even for non-static compound literals.
2331
1a817418
ML
23322017-05-17 Martin Liska <mliska@suse.cz>
2333
2334 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2335 use it instead of int type.
2336
b2fa0a8b
MP
23372017-05-17 Marek Polacek <polacek@redhat.com>
2338
2339 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2340 call c_fully_fold.
2341 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2342 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2343 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2344 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2345 save_expr.
2346 (c_parser_conditional_expression): Likewise.
2347 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2348 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2349 (process_init_element): Likewise.
2350 (build_binary_op): Likewise.
2351 (handle_omp_array_sections_1): Likewise.
2352
1e47f02b
TS
23532017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2354
2355 * c-parser.c (c_parser_omp_clause_num_gangs)
2356 (c_parser_omp_clause_num_workers)
2357 (c_parser_omp_clause_vector_length): Merge functions into...
2358 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2359 all users.
2360
c24e924f
NS
23612017-05-11 Nathan Sidwell <nathan@acm.org>
2362
2363 * gimple-parser.c: Don't #include tree-dump.h.
2364
c587104e
MM
23652017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2366
2367 PR testsuite/80580
2368 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2369
67ac9a9d
MM
23702017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2371
2372 PR testsuite/80580
2373 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2374 incorrect __MEM syntax.
2375
ac4eb40f
MM
23762017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2377
2378 PR testsuite/80580
2379 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2380 type of unary '*'.
2381
641da50a
NS
23822017-05-09 Nathan Sidwell <nathan@acm.org>
2383
2384 * c-tree.h (pushdecl): Declare.
2385
56d35585
DM
23862017-05-05 David Malcolm <dmalcolm@redhat.com>
2387
2388 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2389 with diagnostic_report_diagnostic.
2390 * c-errors.c (pedwarn_c99): Likewise.
2391 (pedwarn_c90): Likewise.
2392
815d9cc6
XR
23932017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2394
92a285c1 2395 PR c++/80038
815d9cc6
XR
2396 * c-gimplify.c (c_gimplify_expr): Remove calls to
2397 cilk_gimplifY_call_params_in_spawned_fn.
2398
1c4ea66f
DM
23992017-04-25 David Malcolm <dmalcolm@redhat.com>
2400
2401 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2402 hint for removing extra semicolon.
2403
666f7903
JJ
24042017-04-21 Jakub Jelinek <jakub@redhat.com>
2405
2406 PR c/80468
2407 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2408 enabled, set specs->type to integer_type_node.
2409
5764ee3c
JW
24102017-04-03 Jonathan Wakely <jwakely@redhat.com>
2411
2412 * c-array-notation.c: Fix typo in comment.
2413
10fa8dfb
MP
24142017-03-29 Marek Polacek <polacek@redhat.com>
2415
2416 PR c/79730
2417 * c-decl.c (finish_decl): Check VAR_P.
2418
a9e4a1a5
JJ
24192017-03-27 Jakub Jelinek <jakub@redhat.com>
2420
2421 PR middle-end/80162
2422 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2423 * c-typeck.c (c_mark_addressable): Likewise. Look through
2424 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2425 to ARRAY_TYPE.
2426 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2427
ee3ff394
MP
24282017-03-23 Marek Polacek <polacek@redhat.com>
2429
2430 * c-tree.h: Remove a C_RID_YYCODE reference.
2431
4d1b8e70
JJ
24322017-03-21 Jakub Jelinek <jakub@redhat.com>
2433
2434 PR c/80097
2435 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2436 optional COMPOUND_EXPR with ubsan instrumentation.
2437
31dc71a8
MP
24382017-03-17 Marek Polacek <polacek@redhat.com>
2439
2440 * c-parser.c: Add C11 references.
2441
d579c385
MP
24422017-03-15 Marek Polacek <polacek@redhat.com>
2443
2444 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2445
85059a38
MP
24462017-03-11 Marek Polacek <polacek@redhat.com>
2447
2448 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2449
2f6f187a
DM
24502017-03-10 David Malcolm <dmalcolm@redhat.com>
2451
2452 PR translation/79848
2453 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2454 "%qs".
2455 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2456
36618428
MP
24572017-03-09 Marek Polacek <polacek@redhat.com>
2458
2459 PR sanitizer/79757
2460 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2461 parameter declarations with initializers.
2462
01e5af5a
JJ
24632017-03-09 Jakub Jelinek <jakub@redhat.com>
2464
2465 PR c/79969
2466 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2467 TYPE_STUB_DECL.
2468
a71dbc63
JJ
24692017-03-07 Jakub Jelinek <jakub@redhat.com>
2470
2471 PR c/79834
2472 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2473 for "may only be used in compound statements" diagnostics, change it
2474 such that the same translatable string is used for all pragmas. For
2475 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2476 diagnostics.
2477 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2478 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2479 "may only be used in compound statements" diagnostics, such that the
2480 same translatable string is used for all pragmas.
2481
1ff4bae6
MP
24822017-03-04 Marek Polacek <polacek@redhat.com>
2483
2484 PR c/79847
2485 * c-decl.c (implicit_decl_warning): Add missing space.
2486
7f5a7d78
MP
24872017-03-03 Marek Polacek <polacek@redhat.com>
2488
2489 PR c/79758
2490 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2491 current_function_prototype_arg_types is error_mark_node. Fix
2492 formatting. Use TREE_VALUE instead of TREE_TYPE.
2493
883c8f06
JJ
24942017-03-03 Jakub Jelinek <jakub@redhat.com>
2495
79c9b7a8
JJ
2496 PR c/79837
2497 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2498 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2499 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2500 diagnostics.
2501
883c8f06
JJ
2502 PR c/79836
2503 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2504 instead of %<_Generic>.
2505 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2506 (c_parser_omp_target_exit_data): Use %<release%> instead of
2507 %<release>.
2508
324ff1a0
JJ
25092017-02-28 Jakub Jelinek <jakub@redhat.com>
2510
2511 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2512 instead of just cond ? "..." : "...".
2513 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2514 for "enter"/"exit" keyword.
2515 (c_finish_oacc_routine): Don't use %s to supply portions of the
2516 message.
2517
4227c9ad
JJ
25182017-02-24 Jakub Jelinek <jakub@redhat.com>
2519
2520 PR c++/79588
2521 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2522 handle -Wrestrict here.
2523 * c-typeck.c (build_function_call_vec): Adjust
2524 check_function_arguments caller.
2525
5d972e66
RB
25262017-02-23 Richard Biener <rguenther@suse.de>
2527
2528 PR c/79684
2529 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2530 to initialize c_exprs to return.
2531 (c_parser_gimple_binary_expression): Likewise.
2532 (c_parser_gimple_unary_expression): Likewise.
2533 (c_parser_gimple_postfix_expression): Likewise.
2534
61ac5ebe
MP
25352017-02-22 Marek Polacek <polacek@redhat.com>
2536
2537 PR c/79662
2538 * c-typeck.c (convert_arguments): Handle error_mark_node.
2539
41d1b0b1
PK
25402017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2541
2542 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2543 value of c_parser_parse_ssa_name against error_mark_node and emit
2544 error if ssa name is anonymous and written as default definition.
2545
eab1f169
PK
25462017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2547
2548 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2549 FMA_EXPR.
2550
bcac0b4d
JJ
25512017-02-16 Jakub Jelinek <jakub@redhat.com>
2552
2553 PR c++/79512
2554 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2555 ignore #pragma omp target even when not followed by identifier.
2556
1be33173
PK
25572017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2558
2559 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2560 (c_parser_gimple_unary_expression): Likewise.
2561
aa326bfb
JJ
25622017-02-13 Jakub Jelinek <jakub@redhat.com>
2563
2564 * c-parser.c (c_parser_oacc_declare): Add missing space in
2565 diagnostics.
2566
8a398bc5
PK
25672017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2568
2569 PR c/79478
2570 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2571 set_c_expr_source_range when parsing ssa-name.
2572
3dcde5ef 25732017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2574 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2575
2576 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2577 building IL when arguments are error_mark_node.
2578 (c_parser_gimple_unary_expression): Likewise.
2579 (c_parser_gimple_if_stmt): Likewise.
2580 (c_parser_gimple_switch_stmt): Likewise.
2581 (c_parser_gimple_return_stmt): Likewise.
2582 (c_parser_parse_ssa_name): When name lookup fails do not build
2583 an SSA name. Use undeclared rather than not declared in error
2584 reporting.
2585
192b048b
MP
25862017-02-09 Marek Polacek <polacek@redhat.com>
2587
2588 PR c/79428
2589 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2590 instead of c_parser_skip_until_found.
2591
56f71478
JJ
25922017-02-09 Jakub Jelinek <jakub@redhat.com>
2593
2594 PR c/79431
2595 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2596 symtab_node::get on automatic variables.
2597
02889d23
CLT
25982016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2599 Chung-Lin Tang <cltang@codesourcery.com>
2600
2601 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2602 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2603 semantic checking.
2604 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2605
7af4b20d
RB
26062017-02-07 Richard Biener <rguenther@suse.de>
2607
2608 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2609 (c_parser_gimple_postfix_expression_after_primary):
2610 Do not use c_build_function_call_vec to avoid folding and promotion.
2611 Simplify.
2612
e5e391d6
MO
26132017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2614
2615 PR lto/79061
2616 * c-decl.c (pop_scope): Pass main_input_filename to
2617 build_translation_unit_decl.
2618
c2e84327
DM
26192017-01-24 David Malcolm <dmalcolm@redhat.com>
2620
2621 * c-parser.c: Include "read-rtl-function.h" and
2622 "run-rtl-passes.h".
2623 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2624 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2625 production. Update for renaming of field "gimple_pass" to
2626 "gimple_or_rtl_pass". If __RTL was seen, call
2627 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2628 to an auto_timevar, to cope with early exit.
2629 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2630 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2631 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2632 Handle RID_RTL.
2633 (c_parser_parse_rtl_body): New function.
2634 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2635 (struct c_declspecs): Rename field "gimple_pass" to
2636 "gimple_or_rtl_pass". Add field "rtl_p".
2637 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2638 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2639 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2640 (c_parser_gimple_or_rtl_pass_list): ...this.
2641
2ebd93e1
MP
26422017-01-20 Marek Polacek <polacek@redhat.com>
2643
2644 PR c/64279
2645 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2646
b1c95bb5
RB
26472017-01-13 Richard Biener <rguenther@suse.de>
2648
2649 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2650 nops.
2651
25329913
RB
26522017-01-13 Richard Biener <rguenther@suse.de>
2653
2654 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2655 _Literal ( type-name ) number.
2656
6bb4ea5c
RB
26572017-01-12 Richard Biener <rguenther@suse.de>
2658
2659 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2660 __MEM.
2661
6b5b4e9c
JJ
26622017-01-11 Jakub Jelinek <jakub@redhat.com>
2663
2664 PR c++/72813
2665 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2666 PCH file.
2667
e3252775
RB
26682017-01-11 Richard Biener <rguenther@suse.de>
2669
2670 PR bootstrap/79052
2671 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2672 returns on parse errors.
2673
a9342885
MP
26742017-01-04 Marek Polacek <polacek@redhat.com>
2675
2676 PR c++/64767
2677 * c-parser.c (c_parser_postfix_expression): Mark zero character
2678 constants by setting original_type in c_expr.
2679 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2680 with a zero character constant.
2681 (char_type_p): New function.
2682
5dd9a9d0
DM
26832017-01-04 David Malcolm <dmalcolm@redhat.com>
2684
2685 * c-parser.c (c_parser_declaration_or_fndef): Create a
2686 rich_location at init_loc and parse it to start_init.
2687 (last_init_list_comma): New global.
2688 (c_parser_braced_init): Update last_init_list_comma when parsing
2689 commas. Pass it to pop_init_level. Pass location of closing
2690 brace to pop_init_level.
2691 (c_parser_postfix_expression_after_paren_type): Create a
2692 rich_location at type_loc and parse it to start_init.
2693 (c_parser_omp_declare_reduction): Likewise for loc.
2694 * c-tree.h (start_init): Add rich_location * param.
2695 (pop_init_level): Add location_t param.
2696 * c-typeck.c (struct initializer_stack): Add field
2697 "missing_brace_richloc".
2698 (start_init): Add richloc param, use it to initialize
2699 the stack node's missing_brace_richloc.
2700 (last_init_list_comma): New decl.
2701 (finish_implicit_inits): Pass last_init_list_comma to
2702 pop_init_level.
2703 (push_init_level): When finding missing open braces, add fix-it
2704 hints to the richloc.
2705 (pop_init_level): Add "insert_before" param and pass it
2706 when calling pop_init_level. Add fixits about missing
2707 close braces to any richloc. Use the richloc for the
2708 -Wmissing-braces warning.
2709 (set_designator): Pass last_init_list_comma to pop_init_level.
2710 (process_init_element): Likewise.
2711
cbe34bb5
JJ
27122017-01-01 Jakub Jelinek <jakub@redhat.com>
2713
2714 Update copyright years.
2715
d17680f3
JJ
27162016-12-21 Jakub Jelinek <jakub@redhat.com>
2717
0dba7960
JJ
2718 PR bootstrap/78817
2719 * c-typeck.c (build_function_call_vec): If check_function_arguments
2720 returns true, set TREE_NO_WARNING on CALL_EXPR.
2721
d17680f3
JJ
2722 PR c/77767
2723 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2724 to *expr instead of overwriting it.
2725
aa90531e
RB
27262016-12-20 Richard Biener <rguenther@suse.de>
2727
2728 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2729 error recovery.
2730 (c_parser_gimple_statement): Only build assigns for non-error
2731 stmts.
2732 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2733
629b3d75
MJ
27342016-12-14 Martin Jambor <mjambor@suse.cz>
2735
2736 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2737 omp-low.h.
2738 (c_finish_oacc_routine): Adjusted call to
2739 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2740 to use their new names.
2741 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2742 use its new name.
2743 (c_parser_oacc_update): Likewise.
2744 (c_parser_omp_simd): Likewise.
2745 (c_parser_omp_target_update): Likewise.
2746 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2747 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2748 name.
2749 (c_finish_omp_cancellation_point): Likewise.
2750 * gimple-parser.c: Do not include omp-low.h
2751
c5af52eb
CP
27522016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2753 James Norris <jnorris@codesourcery.com>
2754
2755 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2756 EXIT_DATA,WAIT} are not used in compound statements.
2757 (c_parser_oacc_enter_exit_data): Update diagnostics.
2758
48330c93
BE
27592016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2760
2761 PR c++/71973
2762 * c-decl.c (diagnose_mismatched_decls): Use
2763 OPT_Wbuiltin_declaration_mismatch here too.
2764
899ca90e 27652016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2766 Alan Hayward <alan.hayward@arm.com>
2767 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2768
2769 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2770 (make_label, finish_struct): Likewise.
2771
1ee62b92 27722016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2773 Richard Biener <rguenther@suse.de>
22b15758 2774
8e745a17
JJ
2775 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2776 * config-lang.in (gtfiles): Add c/c-parser.h.
2777 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2778 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2779 * c-parser.c (enum c_id_kind, struct c_token,
2780 c_parser_next_token_is, c_parser_next_token_is_not,
2781 c_parser_next_token_is_keyword,
2782 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2783 Split out to ...
2784 * c-parser.h: ... new header.
2785 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2786 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2787 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2788 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2789 c_parser_error, c_parser_require, c_parser_skip_until_found,
2790 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2791 c_parser_type_name): Export.
2792 (c_parser_tokens_buf): New function.
2793 (c_parser_error): Likewise.
2794 (c_parser_set_error): Likewise.
2795 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2796 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2797 via c_parser_parse_gimple_body.
8e745a17
JJ
2798 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2799 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2800 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2801 c_parser_error, c_parser_require, c_parser_skip_until_found,
2802 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2803 c_parser_type_name): Declare.
1ee62b92
PG
2804 (struct c_parser): Declare forward.
2805 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2806 (c_parser_error): Likewise.
2807 (c_parser_set_error): Likewise.
2808 * gimple-parser.c: New file.
2809 * gimple-parser.h: Likewise.
1ee62b92 2810
22b15758
UB
28112016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2812
2813 PR c/35503
2814 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2815 warn_for_restrict.
2816
84ff4775
LCW
28172016-09-11 Le-Chun Wu <lcwu@google.com>
2818 Mark Wielaard <mjw@redhat.com>
2819
2820 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2821 to the given -Wshadow= variant.
2822
4d0cdd0c
TP
28232016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2824
2825 * c-typeck.c: Include memmodel.h.
2826
1202f33e
JJ
28272016-10-13 Jakub Jelinek <jakub@redhat.com>
2828
2829 PR target/77957
2830 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2831 instead of lhd_return_null_tree_v.
2832
8a14afd0
BS
28332016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2834
2835 PR c++/69733
2836 * c-decl.c (smallest_type_quals_location): New static function.
2837 (grokdeclarator): Try to find the correct location for an ignored
2838 qualifier.
2839
81fea426
MP
28402016-09-26 Marek Polacek <polacek@redhat.com>
2841
2842 PR c/7652
2843 * c-decl.c (pop_scope): Add gcc_fallthrough.
2844
28452016-09-26 Marek Polacek <polacek@redhat.com>
2846
2847 PR c/7652
2848 * c-parser.c (struct c_token): Add flags field.
2849 (c_lex_one_token): Pass it to c_lex_with_flags.
2850 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2851 into IFN_FALLTHROUGH.
2852 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2853 attribute fallthrough after a case label or default label.
2854 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2855
9a2300e9
MP
28562016-09-24 Marek Polacek <polacek@redhat.com>
2857
2858 PR c/77490
2859 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2860 have boolean value. Warn about ++/-- on booleans.
2861
7de76362
JJ
28622016-09-23 Jakub Jelinek <jakub@redhat.com>
2863
2864 * c-parser.c (incomplete_record_decls): Remove unnecessary
2865 = vNULL initialization of file scope vec.
2866
5b73d2ab
MP
28672016-09-16 Marek Polacek <polacek@redhat.com>
2868
2869 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2870
e51fbec3
MP
28712016-09-14 Marek Polacek <polacek@redhat.com>
2872
2873 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2874 (fix_array_notation_expr): Likewise.
2875 * c-decl.c (finish_decl): Likewise.
2876 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2877 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2878 (function_to_pointer_conversion): Use false instead of 0.
2879 (convert_lvalue_to_rvalue): Likewise.
2880 (parser_build_unary_op): Likewise.
2881 (build_atomic_assign): Likewise.
2882 (build_unary_op): Change nonconvert parameter type to bool, use
2883 true/false instead of 1/0.
2884 (build_binary_op): Use true instead of 1.
2885
254830ba
DM
28862016-09-13 David Malcolm <dmalcolm@redhat.com>
2887
2888 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2889 of add_fixit_insert to add_fixit_insert_before.
2890
4c13ba17
MP
28912016-09-13 Marek Polacek <polacek@redhat.com>
2892
2893 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2894 it.
2895
54dcdb88
BE
28962016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2897
2898 PR c++/77496
2899 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2900 COMPOUND_EXPR to warn_for_omitted_condop.
2901
e5106e27
DM
29022016-09-07 David Malcolm <dmalcolm@redhat.com>
2903
2904 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2905 c_get_substring_location for this new langhook.
2906
9dc5773f
JJ
29072016-09-02 Jakub Jelinek <jakub@redhat.com>
2908
2909 PR c/65467
2910 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2911 flag_openmp.
2912 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2913 instead of mark_exp_read on low_bound/length expression.
2914 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2915 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2916 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2917 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2918 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2919 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2920 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2921 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2922 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2923 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2924 instead of mark_expr_read.
2925 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2926 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2927 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2928 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2929 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2930 array section bases outside of depend clause, for depend clause
2931 use convert_lvalue_to_rvalue on the base.
2932 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2933 linear, aligned, map, to and from clauses.
2934 (c_omp_clause_copy_ctor): New function.
2935
295844f6
MP
29362016-09-01 Marek Polacek <polacek@redhat.com>
2937
2938 PR c/7652
2939 * c-typeck.c (composite_type): Add FALLTHRU comment.
2940
089af25c
DM
29412016-08-31 David Malcolm <dmalcolm@redhat.com>
2942
2943 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2944 to the insertion fixits for "struct", "union", and "enum".
2945
f9087798
DM
29462016-08-30 David Malcolm <dmalcolm@redhat.com>
2947
2948 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2949 rather than add_fixit_misspelled_id.
2950 (undeclared_variable): Likewise.
2951 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2952 now-redundant "here" params from add_fixit_insert method calls.
2953 (c_parser_parameter_declaration): Likewise.
2954 * c-typeck.c (build_component_ref): Remove now-redundant range
2955 param from add_fixit_replace method calls.
2956
ebef225f
MP
29572016-08-25 Marek Polacek <polacek@redhat.com>
2958
2959 * c-typeck.c (parser_build_binary_op): Pass LHS to
2960 warn_logical_not_parentheses.
2961
fe377a48
MP
29622016-08-25 Marek Polacek <polacek@redhat.com>
2963
2964 PR c/77323
2965 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2966 or _FloatN or _FloatNx is not supported.
2967 (finish_declspecs): Set type to integer_type_node when _FloatN or
2968 _FloatNx is not supported.
2969
c65699ef
JM
29702016-08-19 Joseph Myers <joseph@codesourcery.com>
2971
2972 PR c/32187
2973 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2974 (struct c_declspecs): Add field floatn_nx_idx.
2975 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2976 and _FloatNx type specifiers.
2977 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2978 (c_parser_declspecs, c_parser_attribute_any_word)
2979 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2980 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2981 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2982 narrower than double.
2983
2f1364c2
JJ
29842016-08-12 Jakub Jelinek <jakub@redhat.com>
2985 Martin Liska <mliska@suse.cz>
2986
2987 PR c/67410
2988 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2989 % to determine val element to change. Assert that
2990 wchar_bytes * charwidth fits into val array.
2991
191816a3
MP
29922016-08-12 Marek Polacek <polacek@redhat.com>
2993
2994 PR c/7652
2995 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2996 (c_parser_postfix_expression): Likewise.
2997 * c-typeck.c (build_unary_op): Adjust fall through comment.
2998 (c_mark_addressable): Likewise.
2999
b95a64bb
JJ
30002016-08-11 Jakub Jelinek <jakub@redhat.com>
3001
3002 PR c/72816
3003 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3004 array member through typedef, for orig_qual_indirect == 0 clear
3005 orig_qual_type.
3006
895aa8e1
DM
30072016-08-08 David Malcolm <dmalcolm@redhat.com>
3008
3009 PR c/64955
3010 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3011 this up to selftest::run_c_tests.
3012 (selftest::run_c_tests): New function.
3013
0b212d8c
TS
30142016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3015
ae9281fc
TS
3016 * c-parser.c (struct oacc_routine_data): Add error_seen and
3017 fndecl_seen members.
3018 (c_finish_oacc_routine): Use these.
3019 (c_parser_declaration_or_fndef): Adjust.
3020 (c_parser_oacc_routine): Likewise. Support more C language
3021 constructs, and improve diagnostics. Move pragma context
3022 checking...
3023 (c_parser_pragma): ... here.
3024
0b212d8c
TS
3025 * c-parser.c (struct oacc_routine_data): New.
3026 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3027 Simplify code.
3028 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3029 declare target" attribute.
3030
76e2c821
JB
30312016-08-01 Jan Beulich <jbeulich@suse.com>
3032
3033 * c-fold.c (c_fully_fold_internal): Also emit shift count
3034 warnings for vector types.
3035 * c-typeck.c (build_binary_op): Likewise.
3036
f618a472
MP
30372016-07-29 Marek Polacek <polacek@redhat.com>
3038
3039 PR c/71742
3040 * c-decl.c (finish_struct): Rephrase an error message.
3041
efd0786f
MP
3042 PR c/71853
3043 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3044 to error node for invalid code.
3045
e00dceaf
MP
3046 PR c/71573
3047 * c-decl.c (implicitly_declare): Return decl early not only for
3048 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3049
673a107a
JJ
30502016-07-29 Jakub Jelinek <jakub@redhat.com>
3051
3052 PR c/71969
3053 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3054 on GNU extern inline functions.
3055
a5b5c8b6
MP
30562016-07-29 Marek Polacek <polacek@redhat.com>
3057
3058 PR c/71583
3059 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3060 check expr.value.
3061
e3fe09c1
UB
30622016-07-22 Uros Bizjak <ubizjak@gmail.com>
3063
3064 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3065
7c8f7eaa
DM
30662016-07-20 David Malcolm <dmalcolm@redhat.com>
3067
3068 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3069 spellcheck-tree.h
3070 (best_macro_match): Likewise, converting from a typedef to a
3071 subclass.
3072 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3073 (lookup_name_fuzzy): Update for change of best_macro_match to a
3074 subclass with a ctor that calls cpp_forall_identifiers.
3075
de6a69ee
DM
30762016-07-20 David Malcolm <dmalcolm@redhat.com>
3077
3078 * c-decl.c (implicit_decl_warning): Update for conversion of
3079 return type of lookup_name_fuzzy to const char *.
3080 (undeclared_variable): Likewise.
3081 (lookup_name_fuzzy): Convert return type from tree to
3082 const char *.
3083 * c-parser.c (c_parser_declaration_or_fndef): Update for
3084 conversion of return type of lookup_name_fuzzy to const char *.
3085 (c_parser_parameter_declaration): Likewise.
3086
b1c9c068
CP
30872016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3088
3089 * c-parser.c (c_parser_oacc_declare): Don't scan for
3090 GOMP_MAP_POINTER.
3091 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3092 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3093 zero-length subarrays.
3094
ddbbcb19
JJ
30952016-07-15 Jakub Jelinek <jakub@redhat.com>
3096
3097 PR c/71858
3098 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3099 instead of FUZZY_LOOKUP_NAME.
3100 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3101 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3102
dd36b877
JJ
31032016-07-14 Jakub Jelinek <jakub@redhat.com>
3104
3105 PR c/71858
3106 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3107
8c681247
TS
31082016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3109
3110 * c-parser.c (c_parser_generic_selection): Make type of variable
3111 auto_vec.
3112 (c_parser_omp_declare_simd): Likewise.
3113
bf4fa671
TS
31142016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3115
3116 * c-decl.c (struct c_struct_parse_info): Change member types
3117 from vec to auto_vec.
3118 (start_struct): Adjust.
3119 (finish_struct): Likewise.
3120
557e8c49
JJ
31212016-07-02 Jakub Jelinek <jakub@redhat.com>
3122
3123 PR c/71719
3124 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3125
54d19c3b
TS
31262016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3127
3128 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3129 Move pragma context checking into...
3130 (c_parser_omp_cancellation_point): ... here, and improve
3131 diagnostic messages.
3132 * c-typeck.c (c_finish_omp_cancel)
3133 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3134
152ef731
JJ
31352016-06-29 Jakub Jelinek <jakub@redhat.com>
3136
3137 PR c/71685
3138 * c-typeck.c (c_build_qualified_type): Don't clear
3139 C_TYPE_INCOMPLETE_VARS for the main variant.
3140
31412016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3142
3143 PR c/71552
3144 * c-typeck.c (output_init_element): Diagnose incompatible types
3145 before non-constant initializers.
3146
e9ac1f86
JJ
31472016-06-28 Jakub Jelinek <jakub@redhat.com>
3148
3149 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3150
277d7ee0
AK
31512016-06-23 Andi Kleen <ak@linux.intel.com>
3152
3153 * Make-lang.in: Add support for autofdo.
3154
1a4f11c8
DM
31552016-06-22 David Malcolm <dmalcolm@redhat.com>
3156
3157 PR c/70339
3158 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3159 (implicit_decl_warning): When issuing warnings for implicit
3160 declarations, attempt to provide a suggestion via
3161 lookup_name_fuzzy.
3162 (undeclared_variable): Likewise when issuing errors.
3163 (lookup_name_in_scope): Likewise.
3164 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3165 (best_macro_match): New typedef.
3166 (find_closest_macro_cpp_cb): New function.
3167 (lookup_name_fuzzy): New function.
3168 * c-parser.c: Include gcc-rich-location.h.
3169 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3170 (c_keyword_starts_typename): ...this new function.
3171 (c_parser_declaration_or_fndef): When issuing errors about
3172 missing "struct" etc, add a fixit. For other kinds of errors,
3173 attempt to provide a suggestion via lookup_name_fuzzy.
3174 (c_parser_parms_declarator): When looking ahead to detect typos in
3175 type names, also reject CPP_KEYWORD.
3176 (c_parser_parameter_declaration): When issuing errors about
3177 unknown type names, attempt to provide a suggestion via
3178 lookup_name_fuzzy.
3179 * c-tree.h (c_keyword_starts_typename): New prototype.
3180
5a578671
JM
31812016-06-20 Joseph Myers <joseph@codesourcery.com>
3182
3183 PR c/71601
3184 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3185 c_common_type returns error_mark_node.
3186
3f8257db 31872016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3188
3189 PR c/69507
3190 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3191 __alignof__ (expression).
3192
6a3f203c
DM
31932016-06-14 David Malcolm <dmalcolm@redhat.com>
3194
3195 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3196
264757fb
DM
31972016-06-14 David Malcolm <dmalcolm@redhat.com>
3198
3199 * c-typeck.c (build_component_ref): Simplify fixit code by
3200 using gcc_rich_location::add_fixit_misspelled_id.
3201 (set_init_label): Likewise.
3202
f7e4f2e3
DM
32032016-06-13 David Malcolm <dmalcolm@redhat.com>
3204
3205 * c-parser.c (c_parser_initelt): Provide location of name for new
3206 location_t param of set_init_label.
3207 * c-tree.h (set_init_label): Add location_t param.
3208 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3209 param and use it when issuing error messages about unrecognized
3210 field names. Attempt to provide a fixit hint if appropriate,
3211 otherwise update the error message to provide the type name.
3212
4b1ffdb1
TS
32132016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3214
3215 PR c/71381
3216 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3217 Loosen checking.
3218
44a845ca
MS
32192016-06-08 Martin Sebor <msebor@redhat.com>
3220 Jakub Jelinek <jakub@redhat.com>
3221
3222 PR c++/70507
3223 PR c/68120
3224 * c-typeck.c (convert_arguments): Don't promote last argument
3225 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3226
92a5f2ba
MP
32272016-06-08 Marek Polacek <polacek@redhat.com>
3228
3229 PR c/71418
3230 * c-decl.c (grokdeclarator): Check TYPE_P.
3231
08203f73
MP
3232 PR c/71426
3233 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3234 code.
3235
6ffd47b7
DM
32362016-06-07 David Malcolm <dmalcolm@redhat.com>
3237
3238 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3239 and structure element reference, capture the location of the
3240 element name token and pass it to build_component_ref.
3241 (c_parser_postfix_expression_after_primary): Likewise for
3242 structure element dereference.
3243 (c_parser_omp_variable_list): Likewise for
3244 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3245 * c-tree.h (build_component_ref): Add location_t param.
3246 * c-typeck.c (build_component_ref): Add location_t param
3247 COMPONENT_LOC. Use it, if available, when issuing hints about
3248 mispelled member names to provide a fixit replacement hint.
3249
1f40cff3
MP
32502016-06-06 Marek Polacek <polacek@redhat.com>
3251
3252 PR c/71362
3253 * c-parser.c (c_parser_direct_declarator): Set location.
3254
5545a907
MP
32552016-06-06 Marek Polacek <polacek@redhat.com>
3256
3257 * c-typeck.c (comptypes_internal): Handle comparisons of
3258 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3259 TYPE_REF_CAN_ALIAS_ALL.
3260
b605f663
CLT
32612016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3262
3263 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3264 arguments as addressable when async clause exists.
3265
00631022
JJ
32662016-05-30 Jakub Jelinek <jakub@redhat.com>
3267
3268 PR c++/71349
3269 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3270 when combined with target construct.
3271
7211a097
JJ
32722016-05-26 Jakub Jelinek <jakub@redhat.com>
3273
3274 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3275 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3276
95efe6b6
MP
32772016-05-25 Marek Polacek <polacek@redhat.com>
3278
3279 PR c/71265
3280 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3281
a23faf7a
MP
3282 PR c/71266
3283 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3284
e46c7770
CP
32852016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3286
3287 * c-parser.c (c_parser_oacc_declare): Add support for
3288 GOMP_MAP_FIRSTPRIVATE_POINTER.
3289 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3290 argument with enum c_omp_region_type ort.
3291 (handle_omp_array_sections): Likewise. Update call to
3292 handle_omp_array_sections_1.
3293 (c_finish_omp_clauses): Add specific errors and warning messages for
3294 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3295 call to handle_omp_array_sections.
3296
a04e69c0
TS
32972016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3298
3299 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3300
f17a223d
RB
33012016-05-24 Richard Biener <rguenther@suse.de>
3302
3303 PR middle-end/70434
3304 PR c/69504
3305 * c-typeck.c (build_array_ref): Do not complain about indexing
3306 non-lvalue vectors. Adjust for function name change.
3307
79063edd
MS
33082016-05-20 Martin Sebor <msebor@redhat.com>
3309
3310 PR c/71115
3311 * c-typeck.c (error_init): Use
3312 expansion_point_location_if_in_system_header.
3313 (warning_init): Same.
3314
8a40fef3
DM
33152016-05-19 David Malcolm <dmalcolm@redhat.com>
3316
3317 PR c/71171
3318 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3319 in error-handling.
3320 (c_parser_postfix_expression): Likewise.
3321 * c-tree.h (c_expr::set_error): New method.
3322 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3323 that result's range is initialized.
3324
e9892350
JG
33252016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3326
3327 * c-typeck.c (parser_build_unary_op): Fix formatting.
3328
8fad45f5
MW
33292016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3330
3331 * c-decl.c (grokdeclarator): Remove errmsg and use of
3332 targetm.invalid_return_type.
3333 (grokparms): Remove errmsg and use of
3334 targetm.invalid_parameter_type.
3335
aa4b467b
JM
33362016-05-13 Joseph Myers <joseph@codesourcery.com>
3337
3338 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3339 function return type.
3340
4f2e1536
MP
33412016-05-12 Marek Polacek <polacek@redhat.com>
3342
3343 PR c/70756
3344 * c-decl.c (build_compound_literal): Pass LOC down to
3345 c_incomplete_type_error.
3346 * c-tree.h (require_complete_type): Adjust declaration.
3347 (c_incomplete_type_error): Likewise.
3348 * c-typeck.c (require_complete_type): Add location parameter, pass it
3349 down to c_incomplete_type_error.
3350 (c_incomplete_type_error): Add location parameter, pass it down to
3351 error_at.
3352 (build_component_ref): Pass location down to c_incomplete_type_error.
3353 (default_conversion): Pass location down to require_complete_type.
3354 (build_array_ref): Likewise.
3355 (build_function_call_vec): Likewise.
3356 (convert_arguments): Likewise.
3357 (build_unary_op): Likewise.
3358 (build_c_cast): Likewise.
3359 (build_modify_expr): Likewise.
3360 (convert_for_assignment): Likewise.
3361 (c_finish_omp_clauses): Likewise.
3362
d6e83a8d
MM
33632016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3364
3365 PR c/43651
3366 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3367 is enabled.
3368 * c-errors.c (pedwarn_c90): Return true if warned.
3369 * c-tree.h (pedwarn_c90): Change return type to bool.
3370 (enum c_declspec_word): Add new enumerator cdw_atomic.
3371
5c3a10fb
MP
33722016-05-11 Marek Polacek <polacek@redhat.com>
3373
3374 PR c++/71024
3375 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3376 diagnose_mismatched_attributes and call it.
3377
cf68d92c
MP
33782016-05-10 Marek Polacek <polacek@redhat.com>
3379
3380 PR c/70255
3381 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3382 on a declaration following the definition.
3383
351f85c5
JJ
33842016-05-05 Jakub Jelinek <jakub@redhat.com>
3385
3386 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3387 parse it through to c_parser_c99_block_statement.
3388 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3389 caller.
3390
deef7113
MP
33912016-05-04 Marek Polacek <polacek@redhat.com>
3392
3393 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3394 OPT_Wdangling_else.
3395
de55efd5
MP
33962016-05-04 Marek Polacek <polacek@redhat.com>
3397
3398 PR c/48778
3399 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3400 for macro expansions.
3401
79ce98bc
MP
34022016-05-03 Marek Polacek <polacek@redhat.com>
3403
3404 PR c/70859
3405 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3406 check_builtin_function_arguments.
3407
fb2647aa
RB
34082016-05-03 Richard Biener <rguenther@suse.de>
3409
3410 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3411 the checksum from the previous stage.
3412
77886428
CP
34132016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3414
3415 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3416 c_finish_omp_clauses.
3417 (c_parser_omp_all_clauses): Likewise.
3418 (c_parser_oacc_cache): Likewise.
3419 (c_parser_oacc_loop): Likewise.
3420 (omp_split_clauses): Likewise.
3421 (c_parser_omp_declare_target): Likewise.
3422 (c_parser_cilk_all_clauses): Likewise.
3423 (c_parser_cilk_for): Likewise.
3424 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3425 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3426
7176a4a0
MP
34272016-05-02 Marek Polacek <polacek@redhat.com>
3428
3429 PR c/70851
3430 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3431 incomplete type.
3432
e7ff0319
CP
34332016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3434
3435 PR middle-end/70626
3436 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3437 OACC_LOOP_CLAUSE_MASK.
3438 (c_parser_oacc_kernels_parallel): Update call to
3439 c_oacc_split_loop_clauses.
3440
9f405ce1
AM
34412016-04-28 Andrew MacLeod <amacleod@redhat.com>
3442
3443 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3444 argument to build_modify_expr in two cases.
3445
c1e1f433
BS
34462016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3447
3448 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3449 warn_for_memset instead of warning directly here.
3450
2448a956
MP
34512016-04-26 Marek Polacek <polacek@redhat.com>
3452
3453 PR c/67784
3454 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3455 out of ...
3456 (c_parser_for_statement): ... here.
3457 (c_parser_if_statement): Use it.
3458 (c_parser_switch_statement): Use it.
3459 (c_parser_while_statement): Use it.
3460
b02a5e26
MP
3461 PR c/70791
3462 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3463
477d4906
IV
34642016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3465
3466 PR c++/69363
3467 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3468 instead of c_finish_cilk_clauses.
3469 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3470 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3471 floating-point variables in the linear clause for Cilk Plus.
3472
fe37c7af
MM
34732016-04-18 Michael Matz <matz@suse.de>
3474
3475 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3476 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3477
949505a9
MP
34782016-04-15 Marek Polacek <polacek@redhat.com>
3479
3480 PR c/70671
3481 * c-typeck.c (build_unary_op): Pass location down to error and
3482 warning call.
3483
dda1bf61
JJ
34842016-04-15 Jakub Jelinek <jakub@redhat.com>
3485
3486 PR c/70436
3487 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3488 where needed.
3489 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3490 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3491 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3492 Adjust c_parser_pragma callers.
3493 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3494 caller.
3495 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3496 c_parser_statement.
3497 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3498 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3499 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3500 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3501 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3502 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3503 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3504 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3505 down where needed.
3506 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3507 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3508 calls.
3509
99cd9857
MP
35102016-04-13 Marek Polacek <polacek@redhat.com>
3511
3512 PR c/70436
3513 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3514 adjust callers.
3515 (c_parser_statement): Likewise.
3516 (c_parser_c99_block_statement): Likewise.
3517 (c_parser_while_statement): Likewise.
3518 (c_parser_for_statement): Likewise.
3519 (c_parser_if_body): Don't set IF_P here.
3520 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3521 about dangling else here.
3522 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3523 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3524 warn about dangling else here.
3525
f13355da
MP
35262016-04-04 Marek Polacek <polacek@redhat.com>
3527
3528 PR c/70307
3529 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3530
5fde6a45
MP
35312016-03-31 Marek Polacek <polacek@redhat.com>
3532
3533 PR c/70297
3534 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3535
4bbf545b
DM
35362016-03-18 David Malcolm <dmalcolm@redhat.com>
3537
3538 PR c/70281
3539 * c-parser.c (c_parser_postfix_expression): Set the source range
3540 for uses of "__builtin_types_compatible_p".
3541
fcc2b74f
JJ
35422016-03-17 Jakub Jelinek <jakub@redhat.com>
3543
3544 PR c/70280
3545 * c-typeck.c (composite_type): Don't count void_list_node
3546 into len, if the list is terminated by void_list_node, start
3547 with void_list_node instead of NULL for newargs. Stop
3548 at void_list_node.
3549
ab4c578f
MP
35502016-03-16 Marek Polacek <polacek@redhat.com>
3551
3552 PR c/70093
3553 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3554 nested functions returning VM types.
3555
96b3c82d
CP
35562016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3557
3558 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3559 when calling c_finish_omp_clauses.
3560
29b9828f
BS
35612016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3562
3563 PR c/69824
3564 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3565 for later.
3566
7ff6ca38
MP
35672016-03-04 Marek Polacek <polacek@redhat.com>
3568
3569 PR c/69798
3570 * c-parser.c (c_parser_postfix_expression): Call
3571 c_parser_cast_expression rather than c_parser_postfix_expression.
3572
686e2237
JJ
35732016-03-01 Jakub Jelinek <jakub@redhat.com>
3574
3575 PR c/69796
3576 PR c/69974
3577 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3578 of incomplete decls to error_mark_node.
3579
0b05329b
MP
35802016-02-24 Marek Polacek <polacek@redhat.com>
3581
3582 PR c/69819
3583 * c-decl.c (finish_decl): Don't update the copy of the type of a
3584 different decl type.
3585
067fbd8b
JJ
35862016-02-23 Jakub Jelinek <jakub@redhat.com>
3587
3588 PR objc/69844
3589 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3590 in id_kind reclassification.
3591
bf14eba2
JJ
35922016-02-16 Jakub Jelinek <jakub@redhat.com>
3593
3594 PR c/69835
3595 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3596
ba539195
JN
35972016-02-16 James Norris <jnorris@codesourcery.com>
3598
3599 PR c/64748
3600 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3601
16595a1f
BS
36022016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3603
f48dfe98
BS
3604 * c-decl.c (build_null_declspecs): Zero the entire struct.
3605
16595a1f
BS
3606 PR c/69522
3607 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3608 callers changed. If nested_p is true, use it to call
3609 finish_implicit_inits.
3610 * c-tree.h (finish_implicit_inits): Declare.
3611 * c-typeck.c (finish_implicit_inits): New function. Move code
3612 from ...
3613 (push_init_level): ... here.
3614 (set_designator, process_init_element): Call finish_implicit_inits.
3615
66756373
JJ
36162016-02-11 Jakub Jelinek <jakub@redhat.com>
3617
3618 PR c/69768
3619 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3620 arguments for -Waddress warning.
3621
1066e9b5
JJ
36222016-02-04 Jakub Jelinek <jakub@redhat.com>
3623
3624 PR c/69669
3625 * c-decl.c (finish_enum): When honoring mode attribute,
3626 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3627
3a5d2ba4
JJ
36282016-01-29 Jakub Jelinek <jakub@redhat.com>
3629
3630 PR debug/69518
3631 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3632 all type variants, not just TYPE_MAIN_VARIANT.
3633
cbdd8ae0
JJ
36342016-01-27 Jakub Jelinek <jakub@redhat.com>
3635
3636 PR debug/66869
3637 * c-decl.c (c_write_global_declarations_1): Warn with
3638 warn_unused_function if static prototype without definition
3639 is not C_DECL_USED.
3640
fa74a4bc
MP
36412016-01-27 Marek Polacek <polacek@redhat.com>
3642
3643 PR c/68062
3644 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3645 to unsigned, if needed. Add -Wsign-compare warning.
3646
13f92e8d
JJ
36472016-01-26 Jakub Jelinek <jakub@redhat.com>
3648
3649 PR tree-optimization/69483
3650 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3651
cd8e73dc 36522016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3653
3654 PR c/24293
3655 * c-tree.h (incomplete_record_decls): Declare.
3656 * c-parser.c (incomplete_record_decls): Define.
3657 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3658 report error if any decl has zero size.
3659 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3660 or enum type to incomplete_record_decls.
3661
e6d6ec9e
TV
36622016-01-14 Tom de Vries <tom@codesourcery.com>
3663
3664 PR tree-optimization/68773
3665 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3666 set force_output.
3667
00083992
MP
36682016-01-14 Marek Polacek <polacek@redhat.com>
3669
3670 PR c/69262
3671 * c-decl.c (grokdeclarator): Provide more information for invalid
3672 array declarations.
3673
7443cf13
DM
36742016-01-06 David Malcolm <dmalcolm@redhat.com>
3675
3676 * c-parser.c (c_parser_unary_expression): For dereferences, build
3677 a combined location before calling build_indirect_ref, so that
3678 error reports cover the full range, manually updating the c_expr
3679 src_range.
3680
6b131d5b
MP
36812016-01-06 Marek Polacek <polacek@redhat.com>
3682
3683 PR sanitizer/69099
3684 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3685 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3686 NULL.
3687
818ab71a
JJ
36882016-01-04 Jakub Jelinek <jakub@redhat.com>
3689
3690 Update copyright years.
3691
2fe0a208
MP
36922016-01-04 Marek Polacek <polacek@redhat.com>
3693
3694 PR c/68908
3695 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3696 optimization to use __atomic_fetch_* built-in if possible.
3697
c7b48c8a
TS
36982015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3699
3700 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3701 into...
3702 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3703 all users.
3704
fda5652f
MP
37052015-12-22 Marek Polacek <polacek@redhat.com>
3706
3707 PR c/69002
3708 * c-typeck.c (build_component_ref): Warn when acessing elements of
3709 atomic structures or unions.
3710
745e411d
DM
37112015-12-21 David Malcolm <dmalcolm@redhat.com>
3712
3713 * c-typeck.c: Include "gcc-rich-location.h".
3714 (build_binary_op): In the two places that call binary_op_error,
3715 create a gcc_rich_location and populate it with the location of
3716 the binary op and its two operands.
3717
94c40e19
DM
37182015-12-16 David Malcolm <dmalcolm@redhat.com>
3719
3720 * c-parser.c (c_parser_statement_after_labels): When calling
3721 c_finish_return, Use the return expression's location if it has
3722 one, falling back to the location of the first token within it.
3723 * c-typeck.c (c_finish_return): When issuing warnings about
3724 the incorrect presence/absence of a return value, issue a note
3725 showing the declaration of the function.
3726
de67c4c3
DM
37272015-12-16 David Malcolm <dmalcolm@redhat.com>
3728
3729 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3730 to 4.
3731 (c_parser_peek_nth_token): New function.
3732 (c_parser_peek_conflict_marker): New function.
3733 (c_parser_error): Detect conflict markers and report them as such.
3734
a10704e1
DM
37352015-12-16 David Malcolm <dmalcolm@redhat.com>
3736
3737 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3738 to preserve range information for the primary expression
3739 in the call to c_parser_postfix_expression_after_primary.
3740
8062bca6
DM
37412015-12-16 David Malcolm <dmalcolm@redhat.com>
3742
3743 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3744 expression location, falling back on the first token location,
3745 rather than always using the latter.
3746
d06f8b75
MP
37472015-12-16 Marek Polacek <polacek@redhat.com>
3748
3749 PR c/64637
3750 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3751 available.
3752
2994fb91
MP
37532015-12-15 Marek Polacek <polacek@redhat.com>
3754
3755 PR c/68907
3756 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3757 artificial decl.
3758
a1b93f8d
DM
37592015-12-08 David Malcolm <dmalcolm@redhat.com>
3760
3761 * c-parser.c (c_parser_alignof_expression): Capture location of
3762 closing parenthesis (if any), or of end of unary expression, and
3763 use it to build a src_range for the expression.
3764
46c6e1e2
DM
37652015-12-08 David Malcolm <dmalcolm@redhat.com>
3766
3767 PR c/68757
3768 * c-parser.c (c_parser_get_builtin_args): Add
3769 "out_close_paren_loc" param, and write back to it.
3770 (c_parser_postfix_expression): Capture the closing
3771 parenthesis location for RID_CHOOSE_EXPR,
3772 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3773 RID_BUILTIN_SHUFFLE and use it to set the source range
3774 for such expressions; within RID_BUILTIN_COMPLEX set
3775 the underlying location.
3776
66189108
MP
37772015-12-07 Marek Polacek <polacek@redhat.com>
3778
3779 PR c/68668
3780 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3781 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3782
f187980b
EB
37832015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3784
3785 * c-tree.h (c_build_va_arg): Adjust prototype.
3786 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3787 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3788 parameter, adjust throughout and issue an error if EXPR is a component
3789 with reverse storage order.
3790
4250754e
JM
37912015-12-02 Jason Merrill <jason@redhat.com>
3792
3793 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3794 (c_fully_fold_internal, decl_constant_value_for_optimization):
3795 Move from c-common.c.
3796 * c-tree.h: Declare decl_constant_value_for_optimization.
3797 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3798
e9e32ee6
JM
37992015-12-02 Joseph Myers <joseph@codesourcery.com>
3800
3801 PR c/68162
3802 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3803 following link from declarator to next declarator. Track original
3804 qualified type and pass it to c_build_qualified_type.
3805 * c-typeck.c (c_build_qualified_type): Add arguments
3806 orig_qual_type and orig_qual_indirect.
3807
ff7a55bf
TS
38082015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3809
3810 * c-parser.c (c_parser_omp_clause_name)
3811 (c_parser_oacc_all_clauses): Alphabetical sorting.
3812
657e4e47
JJ
38132015-12-02 Jakub Jelinek <jakub@redhat.com>
3814
3815 PR c/68533
3816 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3817 for diagnostics.
3818
37d5ad46
JB
38192015-12-01 Julian Brown <julian@codesourcery.com>
3820 Cesar Philippidis <cesar@codesourcery.com>
3821 James Norris <James_Norris@mentor.com>
3822
3823 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3824 (c_parser_oacc_clause_use_device): New function.
3825 (c_parser_oacc_all_clauses): Add use_device support.
3826 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3827 (c_parser_oacc_host_data): New function.
3828 (c_parser_omp_construct): Add host_data support.
3829 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3830 * c-typeck.c (c_finish_oacc_host_data): New function.
3831 (c_finish_omp_clauses): Add use_device support.
3832
a4850ce9
JH
38332015-11-29 Jan Hubicka <hubicka@ucw.cz>
3834
3835 PR c/67106
3836 * c-decl.c: Set TYPE_PACKED in variants.
3837
b58d3df2
ML
38382015-11-27 Martin Liska <mliska@suse.cz>
3839
3840 PR c++/68312
3841 * c-array-notation.c (fix_builtin_array_notation_fn):
3842 Use release_vec_vec instead of vec::release.
3843 (build_array_notation_expr): Likewise.
3844 (fix_conditional_array_notations_1): Likewise.
3845 (fix_array_notation_expr): Likewise.
3846 (fix_array_notation_call_expr): Likewise.
3847
aec17bfe
JJ
38482015-11-27 Jakub Jelinek <jakub@redhat.com>
3849
3850 PR c/63326
3851 * c-parser.c (c_parser_compound_statement_nostart): If
3852 last_label is true, use pragma_stmt instead of pragma_compound
3853 as second c_parser_pragma argument.
3854 (c_parser_omp_ordered, c_parser_omp_target_update,
3855 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3856 false as second argument to c_parser_skip_to_pragma_eol after
3857 diagnosing standalone directives used in pragma_stmt context.
3858
688c4de0
IV
38592015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3860
3861 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3862 with "if (ENABLE_OFFLOADING)".
3863
cbd03aee
DM
38642015-11-23 David Malcolm <dmalcolm@redhat.com>
3865
3866 PR objc/68438
3867 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3868 for various Objective-C constructs: Class.name syntax,
3869 @selector(), @protocol(), @encode(), and [] message syntax.
3870
a87a86e1
DM
38712015-11-20 David Malcolm <dmalcolm@redhat.com>
3872
3873 PR 62314
3874 * c-typeck.c (should_suggest_deref_p): New function.
3875 (build_component_ref): Special-case POINTER_TYPE when
3876 generating a "not a structure of union" error message, and
3877 suggest a "->" rather than a ".", providing a fix-it hint.
3878
8ece8dfb
DM
38792015-11-19 David Malcolm <dmalcolm@redhat.com>
3880
3881 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3882 candidate into a new function, find_closest_identifier.
3883
433068cc
MP
38842015-11-19 Marek Polacek <polacek@redhat.com>
3885
3886 PR c/68412
3887 * c-typeck.c (parser_build_binary_op): Properly handle
3888 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3889
bef08b71
DM
38902015-11-17 David Malcolm <dmalcolm@redhat.com>
3891
3892 * c-parser.c (set_c_expr_source_range): Bulletproof both
3893 overloaded implementations against NULL expr->value.
3894 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3895 values.
3896 (c_parser_unary_expression): Likewise when handling addresses of
3897 labels.
3898 (c_parser_postfix_expression): Likewise for statement expressions,
3899 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3900 __builtin_va_arg, and for __builtin_offset_of.
3901 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3902 src_range using the range of the braced initializer.
3903 (c_parser_transaction_expression): Set src_range for "ret" to a
3904 sane pair of values.
3905
fff77217
KY
39062015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3907
3908 * c-parser.c (c_finish_omp_declare_simd): Look for
3909 "simd" attribute as well. Update error message.
3910
1d899da2
TS
39112015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3912
3913 * c-parser.c (c_parser_omp_declare_target): Adjust.
3914
e4606348
JJ
39152015-11-14 Jakub Jelinek <jakub@redhat.com>
3916
3917 * c-typeck.c (c_finish_omp_clauses): Don't mark
3918 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3919
3e636daf
MP
39202015-11-14 Marek Polacek <polacek@redhat.com>
3921
3922 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3923 * c-typeck.c: Likewise.
3924
ebedc9a3
DM
39252015-11-13 David Malcolm <dmalcolm@redhat.com>
3926
3927 * c-decl.c (warn_defaults_to): Pass line_table to
3928 rich_location ctor.
3929 * c-errors.c (pedwarn_c99): Likewise.
3930 (pedwarn_c90): Likewise.
3931 * c-parser.c (set_c_expr_source_range): New functions.
3932 (c_token::get_range): New method.
3933 (c_token::get_finish): New method.
3934 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3935 based on the range from the start of the LHS to the end of the
3936 RHS.
3937 (c_parser_conditional_expression): Likewise, based on the range
3938 from the start of the cond.value to the end of exp2.value.
3939 (c_parser_binary_expression): Call set_c_expr_source_range on
3940 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3941 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3942 based on the cast_loc through to the end of the expr.
3943 (c_parser_unary_expression): Likewise, based on the
3944 op_loc through to the end of op.
3945 (c_parser_sizeof_expression) Likewise, based on the start of the
3946 sizeof token through to either the closing paren or the end of
3947 expr.
3948 (c_parser_postfix_expression): Likewise, using the token range,
3949 or from the open paren through to the close paren for
3950 parenthesized expressions.
3951 (c_parser_postfix_expression_after_primary): Likewise, for
3952 various kinds of expression.
3953 * c-tree.h (struct c_expr): Add field "src_range".
3954 (c_expr::get_start): New method.
3955 (c_expr::get_finish): New method.
3956 (set_c_expr_source_range): New decls.
3957 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3958 on ret for prefix unary ops.
3959 (parser_build_binary_op): Likewise, running from the start of
3960 arg1.value through to the end of arg2.value.
3961
ec8b536f
MP
39622015-11-13 Marek Polacek <polacek@redhat.com>
3963
3964 PR c/68320
3965 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3966
277fe616
DM
39672015-11-13 David Malcolm <dmalcolm@redhat.com>
3968
3969 * c-typeck.c: Include spellcheck.h.
3970 (lookup_field_fuzzy_find_candidates): New function.
3971 (lookup_field_fuzzy): New function.
3972 (build_component_ref): If the field was not found, try using
3973 lookup_field_fuzzy and potentially offer a suggestion.
3974
6e232ba4
JN
39752015-11-12 James Norris <jnorris@codesourcery.com>
3976 Joseph Myers <joseph@codesourcery.com>
3977
3978 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3979 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3980 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3981 and PRAGMA_OMP_CLAUSE_LINK.
3982 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3983 and PRAGMA_OACC_CLAUSE_LINK.
3984 (OACC_DECLARE_CLAUSE_MASK): New definition.
3985 (c_parser_oacc_declare): New function.
3986
9be4f715
MP
39872015-11-12 Marek Polacek <polacek@redhat.com>
3988
3989 PR c/67784
3990 * c-parser.c (c_parser_for_statement): Reclassify the token in
3991 a correct scope.
3992
e78bede6
MP
39932015-11-11 Marek Polacek <polacek@redhat.com>
3994
3995 PR c/68107
3996 PR c++/68266
3997 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3998 checking the size of an array.
3999
69f293c9
AM
40002015-11-11 Andrew MacLeod <amacleod@redhat.com>
4001
4002 * c-array-notation.c: Remove unused header files.
4003 * c-aux-info.c: Likewise.
4004 * c-convert.c: Likewise.
4005 * c-decl.c: Likewise.
4006 * c-errors.c: Likewise.
4007 * c-lang.c: Likewise.
4008 * c-objc-common.c: Likewise.
4009 * c-parser.c: Likewise.
4010 * c-typeck.c: Likewise.
4011 * gccspec.c: Likewise.
4012
3a40d81d
NS
40132015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4014 Cesar Philippidis <cesar@codesourcery.com>
4015 James Norris <jnorris@codesourcery.com>
4016 Julian Brown <julian@codesourcery.com>
4017 Nathan Sidwell <nathan@codesourcery.com>
4018
3a40d81d
NS
4019 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4020 routine arg.
4021 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4022 (c_parser_pragma): Parse 'acc routine'.
4023 (OACC_ROUTINE_CLAUSE_MARK): Define.
4024 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4025
fc402eec
AA
40262015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4027
4028 PR debug/67192
4029 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4030 location of the backward-goto to the start of the loop body.
4031
f6b0b3db
AA
40322015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4033
4034 PR debug/67192
4035 * c-parser.c (c_parser_while_statement): Finish the loop before
4036 parsing ahead for misleading indentation.
4037 (c_parser_for_statement): Likewise.
4038
ee45a32d
EB
40392015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4040
4041 * c-decl.c (finish_struct): If the structure has reverse storage
4042 order, rewrite the type of array fields with scalar component. Call
4043 maybe_apply_pragma_scalar_storage_order on entry.
4044 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4045 errors on bit-fields and reverse SSO here and not...
4046 (c_mark_addressable): ...here.
4047 (output_init_element): Adjust call to initializer_constant_valid_p.
4048 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4049
8a645150
DM
40502015-11-06 David Malcolm <dmalcolm@redhat.com>
4051
4052 * c-decl.c (warn_defaults_to): Update for change in signature
4053 of diagnostic_set_info.
4054 * c-errors.c (pedwarn_c99): Likewise.
4055 (pedwarn_c90): Likewise.
4056 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4057 for textinfo::set_location.
4058
7a5e4956
CP
40592015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4060 Thomas Schwinge <thomas@codesourcery.com>
4061 James Norris <jnorris@codesourcery.com>
4062
4063 * c-parser.c (c_parser_omp_clause_name): Add support for
4064 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4065 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4066 default(none) in OpenACC.
4067 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4068 arguments.
4069 (c_parser_oacc_clause_tile): New function.
4070 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4071 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4072 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4073 TILE}.
4074 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4075 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4076 FIRSTPRIVATE}.
4077 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4078 (c_parser_oacc_update): Update the error message for missing clauses.
4079 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4080 and OMP_CLAUSE_INDEPENDENT.
4081
bfcfbfa0
MP
40822015-11-05 Marek Polacek <polacek@redhat.com>
4083
4084 PR c/68090
4085 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4086 deal with pre-evaluation on invalid types.
4087
e01d41e5
JJ
40882015-11-05 Jakub Jelinek <jakub@redhat.com>
4089 Ilya Verbin <ilya.verbin@intel.com>
4090
4091 * c-parser.c: Include context.h and gimple-expr.h.
4092 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4093 monotonic together with nonmonotonic.
4094 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4095 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4096 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4097 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4098 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4099 expressions on combined target teams before the target.
4100 (c_parser_omp_declare_target): If decl has "omp declare target" or
4101 "omp declare target link" attribute, and cgraph or varpool node already
4102 exists, then set corresponding flags. Call c_finish_omp_clauses
4103 in the parenthesized extended-list syntax case.
4104 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4105 declare target.
4106 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4107 on OMP_CLAUSE_REDUCTION array sections.
4108 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4109 into the constant offset, or for variable low-bound using
4110 POINTER_PLUS_EXPR. For structure element based array sections use
4111 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4112 (c_finish_omp_clauses): Drop generic_field_head, structure
4113 elements are now always mapped even as array section bases,
4114 diagnose same var in data sharing and mapping clauses. Diagnose if
4115 linear step on declare simd is neither a constant nor a uniform
4116 parameter. Look through POINTER_PLUS_EXPR for array section
4117 reductions. Diagnose the same var or function appearing multiple
4118 times on the same directive. Fix up wording for the to clause if t
4119 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4120 modifier on kinds other than dynamic or guided or nonmonotonic
4121 modifier together with ordered clause.
4122
4bf9e5a8
TS
41232015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4124 Chung-Lin Tang <cltang@codesourcery.com>
4125
4126 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4127
2adfab87
AM
41282015-10-29 Andrew MacLeod <amacleod@redhat.com>
4129
4130 * c-array-notation.c: Reorder #include's and remove duplicates.
4131 * c-aux-info.c: Likewise.
4132 * c-convert.c: Likewise.
4133 * c-decl.c: Likewise.
4134 * c-errors.c: Likewise.
4135 * c-lang.c: Likewise.
4136 * c-objc-common.c: Likewise.
4137 * c-parser.c: Likewise.
4138 * c-typeck.c: Likewise.
4139
e922069e
JW
41402015-10-26 Jim Wilson <jim.wilson@linaro.org>
4141
4142 PR debug/66068
4143 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4144 after calling build_qualified_type.
4145
765dd391
CP
41462015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4147 Thomas Schwinge <thomas@codesourcery.com>
4148 James Norris <jnorris@codesourcery.com>
4149 Joseph Myers <joseph@codesourcery.com>
4150 Julian Brown <julian@codesourcery.com>
4151 Bernd Schmidt <bschmidt@redhat.com>
4152
4153 * c-parser.c (c_parser_oacc_shape_clause): New.
4154 (c_parser_oacc_simple_clause): New.
4155 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4156 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4157
88bae6f4
TS
41582015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4159 James Norris <jnorris@codesourcery.com>
4160 Cesar Philippidis <cesar@codesourcery.com>
4161
4162 PR c/64765
4163 PR c/64880
4164 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4165 parameters, and handle these. Adjust all users.
4166 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4167 into...
4168 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4169 all users.
4170 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4171 declare functions.
4172 (c_finish_omp_construct): Declare function.
4173 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4174 Merge functions into...
4175 (c_finish_omp_construct): ... this new function.
4176
a8fc2579
RB
41772015-10-22 Richard Biener <rguenther@suse.de>
4178
4179 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4180 before folding a MINUS_EXPR.
4181
e9122ef6
MP
41822015-10-21 Marek Polacek <polacek@redhat.com>
4183
4184 PR c/68024
4185 * c-decl.c (start_function): Warn about vararg functions without
4186 a prototype.
4187
9f47c7e5
IE
41882015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4189
4190 * c-typeck.c (build_conditional_expr): Use boolean vector
4191 type for vector comparison.
4192 (build_vec_cmp): New.
4193 (build_binary_op): Use build_vec_cmp for comparison.
4194
fa60eeb9
MP
41952015-10-20 Marek Polacek <polacek@redhat.com>
4196
4197 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4198
2c7020eb
MP
41992015-10-20 Marek Polacek <polacek@redhat.com>
4200
4201 PR c/67964
4202 * c-parser.c (c_parser_attributes): Break out of the loop if the
4203 token after an attribute isn't a comma.
4204
d9a6bd32
JJ
42052015-10-13 Jakub Jelinek <jakub@redhat.com>
4206 Aldy Hernandez <aldyh@redhat.com>
4207
4208 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4209 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4210 (c_parser_omp_variable_list): Handle structure elements for
4211 map, to and from clauses. Handle array sections in reduction
4212 clause. Formatting fixes.
4213 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4214 if clause modifiers.
4215 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4216 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4217 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4218 c_parser_omp_clause_is_device_ptr): New functions.
4219 (c_parser_omp_clause_ordered): Parse optional parameter.
4220 (c_parser_omp_clause_reduction): Handle array reductions.
4221 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4222 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4223 functions.
4224 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4225 (c_parser_omp_clause_depend_sink): New function.
4226 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4227 (c_parser_omp_clause_map): Parse release/delete map kinds and
4228 optional always modifier.
4229 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4230 and c_finish_omp_clauses callers.
4231 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4232 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4233 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4234 (OMP_CRITICAL_CLAUSE_MASK): Define.
4235 (c_parser_omp_critical): Parse critical clauses.
4236 (c_parser_omp_for_loop): Handle doacross loops, adjust
4237 c_finish_omp_for and c_finish_omp_clauses callers.
4238 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4239 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4240 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4241 (c_parser_omp_for): Disallow ordered clause when combined with
4242 distribute. Disallow linear clause when combined with distribute
4243 and not combined with simd.
4244 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4245 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4246 parse clauses and if depend clause is found, don't parse a body.
4247 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4248 Allow target parallel without for after it.
4249 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4250 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4251 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4252 invalid kinds.
4253 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4254 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4255 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4256 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4257 functions.
4258 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4259 defaultmap and is_device_ptr clauses.
4260 (c_parser_omp_target): Parse target parallel and target simd. Set
4261 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4262 and target exit data. Diagnose invalid map kinds.
4263 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4264 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4265 construct.
4266 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4267 &omp_priv.
4268 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4269 (c_parser_omp_taskloop): New function.
4270 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4271 handle PRAGMA_OMP_TASKLOOP.
4272 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4273 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4274 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4275 Add IS_OMP argument, handle structure element bases, diagnose
4276 bitfields, pass IS_OMP recursively, diagnose known zero length
4277 array sections in depend clauses, handle array sections in reduction
4278 clause, diagnose negative length even for pointers.
4279 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4280 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4281 array sections in reduction clause, set
4282 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4283 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4284 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4285 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4286
21ba0cea
MP
42872015-10-06 Marek Polacek <polacek@redhat.com>
4288
4289 * c-parser.c (c_parser_statement_after_labels): Use
4290 protected_set_expr_location.
4291 (c_parser_omp_clause_num_gangs): Likewise.
4292 (c_parser_omp_clause_num_threads): Likewise.
4293 (c_parser_omp_clause_num_workers): Likewise.
4294 (c_parser_omp_clause_vector_length): Likewise.
4295 (c_parser_omp_clause_num_teams): Likewise.
4296 (c_parser_omp_clause_thread_limit): Likewise.
4297 * c-typeck.c (build_c_cast): Likewise.
4298 (c_cast_expr): Likewise.
4299
624d31fe
RS
43002015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4301
4302 * c-typeck.c (c_tree_equal): Use real_equal instead of
4303 REAL_VALUES_EQUAL.
4304
b8fd7909
JM
43052015-10-04 Jason Merrill <jason@redhat.com>
4306
4307 * c-parser.c (c_lex_one_token): Handle @synchronized.
4308 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4309 can change whether the function is transaction_safe.
4310
1c7485af
MP
43112015-10-02 Marek Polacek <polacek@redhat.com>
4312
4313 PR c/67730
4314 * c-typeck.c (convert_for_assignment): Use the expansion point
4315 location throughout.
4316
3e3b8d63
MP
43172015-10-02 Marek Polacek <polacek@redhat.com>
4318
4319 PR c/64249
4320 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4321 and pass it down to c_parser_if_statement.
4322 (c_parser_else_body): Add CHAIN parameter and pass it down to
4323 c_parser_statement_after_labels.
4324 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4325 duplicated if-else-if conditions.
4326
aabef2de
MP
43272015-10-01 Marek Polacek <polacek@redhat.com>
4328
4329 * c-typeck.c (convert_for_assignment): Improve commentary.
4330
de8ddd5f
MP
43312015-09-30 Marek Polacek <polacek@redhat.com>
4332
4333 PR c/67730
4334 * c-typeck.c (c_finish_return): Use the expansion point location for
4335 certain "return with value" warnings.
4336
c4914de6
MLI
43372015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4338
4339 * c-parser.c (pragma_lex): Add loc argument.
4340
0e36f5c7
MP
43412015-09-15 Marek Polacek <polacek@redhat.com>
4342
4343 PR c/67580
4344 * c-decl.c (tag_exists_p): New function.
4345 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4346 struct/union/enum keywords are missing.
4347 * c-tree.h (tag_exists_p): Declare.
4348
2f3bb934
MP
43492015-09-15 Marek Polacek <polacek@redhat.com>
4350
4351 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4352 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4353 Return NULL_TREE instead of 0.
4354 (lookup_name): Return NULL_TREE instead of 0.
4355 (lookup_name_in_scope): Likewise.
4356 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4357 (parser_xref_tag): Use false instead of 0.
4358 (start_struct): Use true instead of 1.
4359 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4360
aa256c4a
MP
43612015-09-14 Marek Polacek <polacek@redhat.com>
4362
4363 * c-typeck.c (set_nonincremental_init_from_string): Use
4364 HOST_WIDE_INT_M1U when shifting a negative value.
4365
dbb68221
MW
43662015-09-09 Mark Wielaard <mjw@redhat.com>
4367
4368 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4369 parm against NULL.
4370
a8a098ac
JJ
43712015-09-10 Jakub Jelinek <jakub@redhat.com>
4372
4373 PR c/67502
4374 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4375 into OMP_FOR_PRE_BODY rather than before the loop.
4376
f4b189d5
JJ
43772015-09-09 Jakub Jelinek <jakub@redhat.com>
4378
0bb99c11
JJ
4379 PR c/67501
4380 * c-parser.c (c_parser_oacc_all_clauses,
4381 c_parser_omp_all_clauses): Remove invalid clause from
4382 list of clauses even if parser->error is set.
4383
fce5e5e3
JJ
4384 PR c/67500
4385 * c-parser.c (c_parser_omp_clause_aligned,
4386 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4387 test for errors.
4388 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4389 error_mark_node.
4390
f4b189d5
JJ
4391 PR c/67495
4392 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4393 instead of c_parser_unary_expression. If the result is !lvalue_p,
4394 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4395
b2aaf235
MP
43962015-09-04 Marek Polacek <polacek@redhat.com>
4397
4398 PR sanitizer/67279
4399 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4400
1807ffc1
MS
44012015-09-03 Martin Sebor <msebor@redhat.com>
4402
4403 PR c/66516
8b652e65
JJ
4404 * c-typeck.c (convert_arguments, parser_build_unary_op,
4405 build_conditional_expr, c_cast_expr, convert_for_assignment,
4406 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4407 reject_gcc_builtin.
4408 (c_decl_implicit): Define.
4409
d04ff417
MP
44102015-09-02 Marek Polacek <polacek@redhat.com>
4411
4412 PR c/67432
4413 * c-parser.c (c_parser_enum_specifier): Give a better error for
4414 an empty enum.
4415
a79683d5
TS
44162015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4417
4418 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4419
191a6b94
MP
44202015-08-12 Marek Polacek <polacek@redhat.com>
4421
4422 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4423 LOC to it.
4424
420a9d9b
MP
44252015-08-03 Marek Polacek <polacek@redhat.com>
4426
4427 PR c/67088
4428 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4429 Use it.
4430 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4431
992118a1
PP
44322015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4433
4434 * c-parser.c (c_parser_if_body): Take token_indent_info
4435 argument. Call warn_for_misleading_indentation even when the
4436 body is a semicolon. Extract token_indent_infos corresponding
4437 to the guard, body and next tokens. Adjust call to
4438 warn_for_misleading_indentation accordingly.
4439 (c_parser_else_body): Likewise.
4440 (c_parser_if_statement): Likewise.
4441 (c_parser_while_statement): Likewise.
4442 (c_parser_for_statement): Likewise.
4443
46308474
LFSM
44442015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4445 Manuel López-Ibáñez <manu@gcc.gnu.org>
4446
4447 * c-decl.c (get_parm_info): Remove static var. Update warning
4448 message.
4449
05b28fd6
MP
44502015-07-27 Marek Polacek <polacek@redhat.com>
4451
4452 PR c++/66555
4453 PR c/54979
4454 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4455
451b5e48
MP
44562015-07-20 Marek Polacek <polacek@redhat.com>
4457
4458 PR c++/55095
4459 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4460 (build_binary_op): Warn about left shift overflows.
4461
1916bcb5
AM
44622015-07-09 Andrew MacLeod <amacleod@redhat.com>
4463
4464 * c-array-notation.c: Adjust includes for flags.h changes.
4465 * c-objc-common.c: Likewise.
4466
c7131fb2
AM
44672015-07-07 Andrew MacLeod <amacleod@redhat.com>
4468
4469 * c-array-notation.c: Adjust includes.
4470 * c-aux-info.c: Likewise.
4471 * c-convert.c: Likewise.
4472 * c-decl.c: Likewise.
4473 * c-errors.c: Likewise.
4474 * c-lang.c: Likewise.
4475 * c-objc-common.c: Likewise.
4476 * c-parser.c: Likewise.
4477 * c-typeck.c: Likewise.
4478
da2e71c9
MLI
44792015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4480
4481 PR fortran/66605
4482 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4483
b155cfd9
MP
44842015-06-29 Marek Polacek <polacek@redhat.com>
4485
4486 PR c/66322
4487 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4488 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4489 about -Wswitch-bool here.
4490 (do_case): Update c_add_case_label call.
4491 (c_finish_case): Update c_do_switch_warnings call.
4492
31521951
MP
44932015-06-27 Marek Polacek <polacek@redhat.com>
4494
4495 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4496
22d03525
MP
44972015-06-26 Marek Polacek <polacek@redhat.com>
4498
4499 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4500 INDIRECT_REF_P.
4501 * c-typeck.c (array_to_pointer_conversion): Likewise.
4502 (build_unary_op): Likewise.
4503 (c_finish_return): Likewise.
4504
f0889939
AM
45052015-06-25 Andrew MacLeod <amacleod@redhat.com>
4506
4507 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4508 * c-parser.c: Likewise.
4509
8d67ee55
RS
45102015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4511
4512 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4513 instead of pointer_hash.
4514 (detect_field_duplicates): Likewise.
4515
0ae9bd27
MP
45162015-06-25 Marek Polacek <polacek@redhat.com>
4517
4518 * c-array-notation.c: Use VAR_P throughout.
4519 * c-decl.c: Likewise.
4520 * c-objc-common.c: Likewise.
4521 * c-parser.c: Likewise.
4522 * c-typeck.c: Likewise.
4523
62f9079a
MP
45242015-06-25 Marek Polacek <polacek@redhat.com>
4525
4526 * c-decl.c: Use is_global_var throughout.
4527 * c-parser.c: Likewise.
4528 * c-typeck.c: Likewise.
4529
abb226c9
AM
45302015-06-17 Andrew MacLeod <amacleod@redhat.com>
4531
4532 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4533 * c-aux-info.c: Likewise.
4534 * c-convert.c: Likewise.
4535 * c-decl.c: Likewise.
4536 * c-errors.c: Likewise.
4537 * c-lang.c: Likewise.
4538 * c-objc-common.c: Likewise.
4539 * c-parser.c: Likewise.
4540 * c-typeck.c: Likewise.
4541
8cbababc
JH
45422015-06-11 Jan Hubicka <hubicka@ucw.cz>
4543
4544 PR middle-end/66325
4545 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4546 variants.
4547
a0349665
PMR
45482015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4549
4550 * c-decl.c (pop_scope): Register the main translation unit
4551 through the new debug hook.
4552
13fdf2e2
AM
45532015-06-08 Andrew MacLeod <amacleod@redhat.com>
4554
4555 * c-array-notation.c : Adjust include files.
4556 * c-aux-info.c : Likewise.
4557 * c-convert.c : Likewise.
4558 * c-decl.c : Likewise.
4559 * c-errors.c : Likewise.
4560 * c-lang.c : Likewise.
4561 * c-lang.h : Likewise.
4562 * c-objc-common.c : Likewise.
4563 * c-parser.c : Likewise.
4564 * c-typeck.c : Likewise.
4565
d7438551
AH
45662015-06-05 Aldy Hernandez <aldyh@redhat.com>
4567
4568 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4569 immediately clobber it.
4570 (c_write_global_declarations_1): Remove call to
4571 check_global_declaration_1.
4572 (c_write_global_declarations_2): Remove.
4573 (c_write_final_cleanups): Rename from c_write_global_declarations.
4574 Remove call to finalize_compilation_unit.
4575 Remove calls to debugging hooks.
4576 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4577 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4578 * c-tree.h: Remove c_write_global_declarations.
4579
ecb9f223
AM
45802015-06-04 Andrew MacLeod <amacleod@redhat.com>
4581
4582 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4583 * c-aux-info.c: Likewise.
4584 * c-convert.c: Likewise.
4585 * c-decl.c: Likewise.
4586 * c-errors.c: Likewise.
4587 * c-lang.c: Likewise.
4588 * c-objc-common.c: Likewise.
4589 * c-parser.c: Likewise.
4590 * c-typeck.c: Likewise.
4591
9482b620
MP
45922015-06-04 Marek Polacek <polacek@redhat.com>
4593
4594 PR c/66341
4595 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4596 it is a lvalue.
4597
bc51ace3
PK
45982015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4599
4600 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4601 Warn for empty struct.
4602 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4603
ea5b45b6
AT
46042015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4605
4606 * c-decl.c (start_function): Call plugin before parsing.
4607 (finish_function): Call plugin after parsing.
4608
c2d47482
PK
46092015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4610
4611 PR c/49551
4612 * c-decl.c (merge_decls): Merge DECL_COMMON.
4613
a95492ab
JW
46142015-05-22 Jim Wilson <jim.wilson@linaro.org>
4615
4616 * Make-lang.in (check_gcc_pallelize): Define.
4617
fd5c817a
MP
46182015-05-22 Marek Polacek <polacek@redhat.com>
4619
4620 PR c/47043
4621 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4622 attributes.
4623
c7b70a3c
MP
46242015-05-21 Marek Polacek <polacek@redhat.com>
4625
4626 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4627 DECL_BUILT_IN.
4628
21b634ae
MP
46292015-05-20 Marek Polacek <polacek@redhat.com>
4630
4631 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4632 * c-typeck.c: Likewise.
4633
296a8c2f
MP
46342015-05-19 Marek Polacek <polacek@redhat.com>
4635
4636 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4637
41b37d5e
JJ
46382015-05-19 Jakub Jelinek <jakub@redhat.com>
4639
4640 PR middle-end/66199
4641 * c-parser.c (c_parser_omp_for_loop): Don't add
4642 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4643 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4644 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4645 constructs.
4646
fab27f52
MM
46472015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4648
4649 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4650 swaps.
fab27f52 4651
40de31cf
MLI
46522015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4653
4654 PR fortran/44054
4655 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4656 accessor function.
4657
3aa3c9fc
MP
46582015-05-14 Marek Polacek <polacek@redhat.com>
4659
4660 PR c/66066
4661 PR c/66127
4662 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4663 rather than with 0.
4664
c3388e62
DM
46652015-05-12 David Malcolm <dmalcolm@redhat.com>
4666
4667 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4668 to add a call to warn_for_misleading_indentation.
4669 (c_parser_else_body): Likewise, adding param "else_loc".
4670 (c_parser_if_statement): Check for misleading indentation.
4671 (c_parser_while_statement): Likewise.
4672 (c_parser_for_statement): Likewise.
4673
755e528f
MP
46742015-05-08 Marek Polacek <polacek@redhat.com>
4675
4676 PR c/64918
4677 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4678 (output_init_element): Likewise.
4679
0173bd2a
MP
46802015-05-07 Marek Polacek <polacek@redhat.com>
4681
4682 PR c/65179
4683 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4684 value.
4685
9babc352
MP
46862015-04-30 Marek Polacek <polacek@redhat.com>
4687
4688 * c-typeck.c (set_init_label): Call error_at instead of error and
4689 pass LOC to it.
4690
ac9f18db
MP
4691 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4692 the type of a decl.
4693
ec3fba51
MP
4694 * c-typeck.c (c_build_va_arg): Clarify the error message.
4695
b811915d
TS
46962015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4697
4698 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4699 OMP_STANDALONE_CLAUSES.
4700
f3075008
MP
47012015-04-28 Marek Polacek <polacek@redhat.com>
4702
4703 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4704
4e81b788
MP
47052015-04-28 Marek Polacek <polacek@redhat.com>
4706
4707 PR c/65901
4708 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4709
6c1db78e
MP
47102015-04-25 Marek Polacek <polacek@redhat.com>
4711
4712 PR c/52085
4713 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4714 attribute.
4715
5c4abbb8
MP
47162015-04-23 Marek Polacek <polacek@redhat.com>
4717
4718 PR c/65345
4719 * c-decl.c (set_labels_context_r): New function.
4720 (store_parm_decls): Call it via walk_tree_without_duplicates.
4721 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4722 instead of create_tmp_var. Build TARGET_EXPR instead of
4723 COMPOUND_EXPR.
4724 (build_atomic_assign): Use create_tmp_var_raw instead of
4725 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4726
06aca1d5
IV
47272015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4728
4729 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4730 (c_parser_omp_target_update): Add missed %> to error_at ().
4731
8fba1830
BRF
47322015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4733
4734 PR target/55143
4735 * c-decl.c (c_default_pointer_mode): Remove definition.
4736 * c-tree.h (c_default_pointer_mode): Remove declaration.
4737
62021f64
TB
47382015-03-27 Tobias Burnus <burnus@net-b.de>
4739
4740 PR c/65586
4741 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4742 error out.
4743 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4744 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4745 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4746
9b65e171
JJ
47472015-03-19 Jakub Jelinek <jakub@redhat.com>
4748
4749 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4750 attribute for DECL_EXTERNAL VAR_DECLs.
4751
17958621
JJ
47522015-03-11 Jakub Jelinek <jakub@redhat.com>
4753
4754 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4755 argument.
4756
7ccb1a11
JJ
47572015-03-10 Jakub Jelinek <jakub@redhat.com>
4758
4759 PR c/65120
4760 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4761 before preparing arguments to warn_logical_not_parentheses.
4762
01177669
JJ
47632015-03-09 Jakub Jelinek <jakub@redhat.com>
4764
4765 PR c/65120
4766 * c-typeck.c (parser_build_binary_op): Don't warn for
4767 !!x == y or !b == y where b is _Bool.
4768
802ac282
MP
47692015-03-09 Marek Polacek <polacek@redhat.com>
4770
4771 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4772 * c-decl.c (grokdeclarator): Likewise.
4773 * c-typeck.c (build_binary_op): Likewise.
4774
e5165b60
MP
47752015-02-27 Marek Polacek <polacek@redhat.com>
4776
4777 PR c/65228
4778 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4779
065d214c
MP
47802015-02-14 Marek Polacek <polacek@redhat.com>
4781
4782 PR c/64768
4783 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4784 declared through a typedef name.
4785
e5d9235b
MP
47862015-02-13 Marek Polacek <polacek@redhat.com>
4787
4788 PR c/65050
4789 * c-decl.c (grokdeclarator): Print also the type when giving
4790 the error message about array's incomplete element type.
4791
fa01ffcc
JJ
47922015-02-11 Jakub Jelinek <jakub@redhat.com>
4793
4794 PR c/64824
4795 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4796 check in the POP macro.
4797
c3e38a03
MP
47982015-02-09 Marek Polacek <polacek@redhat.com>
4799
4800 PR c/64856
4801 * c-typeck.c (process_init_element): Don't always wrap
4802 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4803 initializing a range of elements.
4804
4886ec8e
JJ
48052015-02-04 Jakub Jelinek <jakub@redhat.com>
4806
4807 PR c/64824
4808 PR c/64868
4809 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4810
c3e38a03 48112015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4812
4813 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4814 processing enum declaration.
4815
7b33f0c8
MP
48162015-01-29 Marek Polacek <polacek@redhat.com>
4817
4818 PR c/64709
4819 * c-typeck.c (pop_init_level): If constructor_elements has
4820 exactly one element with integer_zerop value, set constructor_zeroinit
4821 to 1. Remove braces around warning_init call.
4822
dea63e49
JJ
48232015-01-27 Jakub Jelinek <jakub@redhat.com>
4824
4825 PR c/64766
4826 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4827 of FUNCTION_DECLs with error_mark_node.
4828
d38f7dce
JJ
48292015-01-26 Jakub Jelinek <jakub@redhat.com>
4830
4831 PR c/64778
4832 * c-typeck.c (convert_arguments): Return -1 if there are
4833 error_args, even if we've diagnosed too many arguments.
4834
cbf5d0e7
RB
48352015-01-21 Richard Biener <rguenther@suse.de>
4836
4837 PR middle-end/64313
4838 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4839 for builtins the user declared correctly.
4840
41dbbb37
TS
48412015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4842 Bernd Schmidt <bernds@codesourcery.com>
4843 Cesar Philippidis <cesar@codesourcery.com>
4844 James Norris <jnorris@codesourcery.com>
4845 Jakub Jelinek <jakub@redhat.com>
4846 Ilmir Usmanov <i.usmanov@samsung.com>
4847
4848 * c-parser.c: Include "gomp-constants.h".
4849 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4850 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4851 Use OMP_CLAUSE_SET_MAP_KIND.
4852 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4853 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4854 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4855 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4856 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4857 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4858 "copyout", "create", "delete", "deviceptr", "gang", "host",
4859 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4860 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4861 "present_or_create", "pcreate", "seq", "self", "vector",
4862 "vector_length", "wait", "worker".
4863 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4864 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4865 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4866 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4867 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4868 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4869 (c_parser_oacc_data_clause_deviceptr)
4870 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4871 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4872 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4873 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4874 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4875 (c_parser_oacc_parallel, c_parser_oacc_update)
4876 (c_parser_oacc_wait): New functions.
4877 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4878 (c_finish_oacc_data): New prototypes.
4879 * c-typeck.c: Include "gomp-constants.h".
4880 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4881 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4882 OMP_CLAUSE_SET_MAP_KIND.
4883 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4884 (c_finish_oacc_data): New functions.
4885 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4886 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4887 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4888 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4889 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4890 GOMP_MAP_FORCE_DEVICEPTR.
4891
adfac8df
JJ
48922015-01-09 Michael Collison <michael.collison@linaro.org>
4893
4894 * c-array-notation.c: Include hash-set.h, machmode.h,
4895 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4896 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4897 * c-aux-info.c: Ditto.
4898 * c-convert.c: Ditto.
4899 * c-decl.c: Ditto.
4900 * c-errors.c: Ditto.
4901 * c-lang.c: Dittoxs.
4902 * c-objc-common.c: Ditto.
4903 * c-parser.c: Ditto.
4904 * c-typeck.c: Include hash-set.h, machmode.h,
4905 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4906 fold-const.h, wide-int.h, inchash.h, real.h and
4907 fixed-value.h due to flattening of tree.h.
4908
2cc901dc
MP
49092015-01-07 Marek Polacek <polacek@redhat.com>
4910
4911 PR c/64417
4912 * c-typeck.c (process_init_element): Disallow initialization of
4913 a flexible array member with a string constant if the structure
4914 is in an array.
4915
5624e564
JJ
49162015-01-05 Jakub Jelinek <jakub@redhat.com>
4917
e5341100
JJ
4918 PR sanitizer/64344
4919 * c-typeck.c (convert_for_assignment, c_finish_return): For
4920 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4921 types also set in_late_binary_op around convert call.
4922 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4923 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4924 result on expr as last argument to ubsan_instrument_float_cast,
4925 if in_late_binary_op, don't use c_save_expr but save_expr.
4926
5624e564
JJ
4927 Update copyright years.
4928
5bd012f8
MP
49292015-01-05 Marek Polacek <polacek@redhat.com>
4930
4931 PR c/64423
4932 * c-typeck.c (build_array_ref): Pass loc down to
4933 warn_array_subscript_with_type_char.
4934
3f8257db 49352014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4936
4937 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4938 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4939 element type.
8e745a17 4940 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4941 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4942 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4943 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4944 to PEDWARN_FOR_QUALIFIERS.
768952be 4945
8f94a8c4
JJ
49462014-12-17 Jakub Jelinek <jakub@redhat.com>
4947
4948 PR sanitizer/64289
4949 * c-convert.c: Include ubsan.h.
4950 (convert): For real -> integral casts and
4951 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4952 instead instrument the float cast directly.
4953
b731b390
JJ
49542014-11-29 Jakub Jelinek <jakub@redhat.com>
4955
4956 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4957 c_finish_stmt_expr): Remove NULL last argument from
4958 create_tmp_var_raw and create_tmp_var calls.
4959 * c-array-notation.c (fix_builtin_array_notation_fn,
4960 build_array_notation_expr, fix_conditional_array_notations_1,
4961 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4962
541e35a6
MP
49632014-11-28 Marek Polacek <polacek@redhat.com>
4964
4965 PR c/63862
4966 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4967 convert the right operand to integer type.
4968
b286be94
MP
49692014-11-25 Marek Polacek <polacek@redhat.com>
4970
4971 PR c/63877
4972 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4973 for inline functions.
4974
aa7da51a
JJ
49752014-11-21 Jakub Jelinek <jakub@redhat.com>
4976
4977 PR target/63764
4978 * c-typeck.c (build_array_ref): Adjust
4979 convert_vector_to_pointer_for_subscript caller. If it returns true,
4980 call non_lvalue_loc on the result.
4981
d876207f
RB
49822014-11-11 Richard Biener <rguenther@suse.de>
4983
4984 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4985 to true.
4986
e5e44252
AK
49872014-11-10 Andi Kleen <ak@linux.intel.com>
4988
4989 PR c/60804
4990 * c-parser.c (c_parser_statement_after_labels): Call
4991 check_no_cilk.
4992 (c_parser_if_statement): Dito.
4993 (c_parser_switch_statement): Dito.
4994 (c_parser_while_statement): Dito.
4995 (c_parser_do_statement): Dito.
4996 (c_parser_for_statement): Dito.
4997 * c-typeck.c (c_finish_loop): Dito.
4998
13c21655
PC
49992014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5000
5001 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5002 OPT_Wshift_count_overflow in the warnings.
5003
2d51fcef
MP
50042014-10-30 Marek Polacek <polacek@redhat.com>
5005
5006 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5007 print the stripped version as well, if they're not the same.
5008
ef4bddc2
RS
50092014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5010
5011 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5012 machine_mode.
5013
c582198b
AM
50142014-10-28 Andrew MacLeod <amacleod@redhat.com>
5015
5016 * c-decl.c: Adjust include files.
5017 * c-parser.c: Ditto.
5018
ddc8de03
PM
50192014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5020 Tom Tromey <tromey@redhat.com>
5021
5022 * c-tree.h (enum c_oracle_request): New.
5023 (c_binding_oracle_function): New typedef.
5024 (c_binding_oracle, c_pushtag, c_bind): Declare.
5025 * c-decl.c (c_binding_oracle): New global.
5026 (I_SYMBOL_CHECKED): New macro.
5027 (i_symbol_binding): New function.
5028 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5029 (I_TAG_CHECKED): New macro.
5030 (i_tag_binding): New function.
5031 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5032 (I_LABEL_CHECKED): New macro.
5033 (i_label_binding): New function.
5034 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5035 (c_print_identifier): Save and restore c_binding_oracle.
5036 (c_pushtag, c_bind): New functions.
5037
60393bbc
AM
50382014-10-27 Andrew MacLeod <amacleod@redhat.com>
5039
5040 * c-typeck.c: Adjust include files.
5041
d723bb7c
MLI
50422014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5043
5044 PR c++/53061
5045 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5046 initialization here...
5047 (c_initialize_diagnostics): ... but here. Set defaults after
5048 building pretty-printer.
5049
1bc5a451
MP
50502014-10-23 Marek Polacek <polacek@redhat.com>
5051
5052 PR c/63626
5053 * c-decl.c (pop_scope): Don't print warning in external_scope.
5054
4435bb92
MP
50552014-10-19 Marek Polacek <polacek@redhat.com>
5056
5057 PR c/63567
5058 * c-typeck.c (output_init_element): Allow initializing objects with
5059 static storage duration with compound literals even in C99 and add
5060 pedwarn for it.
5061
7278465e
MP
50622014-10-17 Marek Polacek <polacek@redhat.com>
5063
5064 PR c/63567
5065 * c-typeck.c (digest_init): Allow initializing objects with static
5066 storage duration with compound literals even in C99 and add pedwarn
5067 for it.
5068
d9b7be2e
MP
50692014-10-17 Marek Polacek <polacek@redhat.com>
5070
5071 PR c/63543
5072 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5073 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5074 error multiple times. Print the type.
5075
f406ae1f
MP
50762014-10-17 Marek Polacek <polacek@redhat.com>
5077
5078 PR c/63549
5079 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5080 type.
5081
92574c7c
MP
50822014-10-17 Marek Polacek <polacek@redhat.com>
5083
5084 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5085 (start_function): Use OPT_Wimplicit_int instead of 0.
5086 (store_parm_decls_oldstyle): Likewise.
5087
1bc4a978
MT
50882014-10-17 Alan Modra <amodra@gmail.com>
5089
5090 PR middle-end/61848
5091 * c-decl.c (merge_decls): Don't merge section name or tls model
5092 to newdecl symtab node, instead merge to olddecl. Override
5093 existing olddecl section name. Set tls_model for all thread-local
5094 vars, not just OMP thread-private ones. Remove incorrect comment.
5095
83685514
AM
50962014-10-16 Andrew MacLeod <amacleod@redhat.com>
5097
5098 * c-decl.c: Adjust include files.
5099
78a7c317
DD
51002014-10-14 DJ Delorie <dj@redhat.com>
5101
5102 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5103 (c_token_starts_typename): Check all __intN, not just __int128.
5104 (c_token_starts_declspecs): Likewise.
5105 (c_parser_declspecs): Likewise.
5106 (c_parser_attribute_any_word): Likewise.
5107 (c_parser_objc_selector): Likewise.
5108 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5109 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5110 is specified.
5111 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5112 __int128.
5113 (finish_declspecs): Likewise.
5114
74d98c1e
AB
51152014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5116
8e745a17 5117 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5118 the duplicate code.
8e745a17 5119 (c_parser_statement): Call the new function.
74d98c1e 5120
84937de2
MP
51212014-10-09 Marek Polacek <polacek@redhat.com>
5122
5123 PR c/63480
5124 * c-typeck.c (pop_init_level): Don't warn about initializing
5125 with { }.
5126
0382aaa0
MP
51272014-10-07 Marek Polacek <polacek@redhat.com>
5128
5129 PR c/59717
5130 * c-decl.c (header_for_builtin_fn): New function.
5131 (implicitly_declare): Suggest which header to include.
5132
7a0ca710
MP
51332014-10-07 Marek Polacek <polacek@redhat.com>
5134
5135 * c-convert.c (convert): Use error_operand_p.
5136 * c-typeck.c (require_complete_type): Likewise.
5137 (really_atomic_lvalue): Likewise.
5138 (digest_init): Likewise.
5139 (handle_omp_array_sections_1): Likewise.
5140
6bc8a126
MP
51412014-10-03 Marek Polacek <polacek@redhat.com>
5142
5143 PR c/63453
5144 * c-decl.c (pop_scope): Don't warn about "inline function declared
5145 but never defined" for functions marked with gnu_inline attribute.
5146
d90c0a59
JJ
51472014-09-25 Jakub Jelinek <jakub@redhat.com>
5148
5149 PR c++/63249
5150 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5151 on low_bound and length.
5152
083e891e
MP
51532014-09-24 Marek Polacek <polacek@redhat.com>
5154
5155 PR c/61405
5156 PR c/53874
5157 * c-parser.c: Don't define CPP_KEYWORD.
5158 (c_parser_switch_statement): Pass original type to c_finish_case.
5159 * c-tree.h (c_finish_case): Update declaration.
5160 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5161 conditionally to c_do_switch_warnings.
5162
8d95fe25
MP
51632014-09-03 Marek Polacek <polacek@redhat.com>
5164
5165 PR c/62024
5166 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5167 conversions.
5168
9a771876
JJ
51692014-09-02 Jakub Jelinek <jakub@redhat.com>
5170 Balaji V. Iyer <balaji.v.iyer@intel.com>
5171 Igor Zamyatin <igor.zamyatin@intel.com>
5172
5173 * c-parser.c (c_parser_cilk_for): New function.
5174 (c_parser_cilk_grainsize): Likewise.
5175 (c_get_temp_regvar): Likewise.
5176 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5177 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5178 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5179 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5180 case.
5181
b7679d96
CG
51822014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5183
5184 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5185 with using HOST_WIDE_INT without truncation to 'int'
5186
59ea0364
MP
51872014-08-22 Marek Polacek <polacek@redhat.com>
5188
5189 PR c++/62199
5190 * c-typeck.c (parser_build_binary_op): Adjust call to
5191 warn_logical_not_parentheses.
5192
671a475e
IZ
51932014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5194
5195 PR other/62008
5196 * c-parser.c (c_parser_array_notation): Check for correct
5197 type of an array added.
5198
04159acf
MP
51992014-08-19 Marek Polacek <polacek@redhat.com>
5200
5201 PR c++/62153
5202 * c-typeck.c (build_binary_op): If either operand of a comparison
5203 is a boolean expression, call maybe_warn_bool_compare.
5204
c77935ee
PP
52052014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5206
5207 PR c/45584
5208 * c-typeck.c (build_c_cast): Do a conversion even when the
5209 TYPE_MAIN_VARIANTs are the same.
5210
35aff4fb
MP
52112014-08-19 Marek Polacek <polacek@redhat.com>
5212
5213 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5214 pedwarn_c99 instead of pedwarn.
5215 (grokfield): Likewise.
5216 (warn_defaults_to): New function.
5217 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5218 Unconditionally call pedwarn_c99 instead of pedwarn.
5219 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5220 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5221 check flag_isoc11 before.
5222 * c-errors.c (pedwarn_c99): Change the return type to bool.
5223 Handle -Wc99-c11-compat.
5224 * c-parser.c (disable_extension_diagnostics): Handle
5225 warn_c99_c11_compat.
5226 (restore_extension_diagnostics): Likewise.
5227 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5228 instead of pedwarn, don't check flag_isoc11 before.
5229 (c_parser_declspecs): Likewise.
5230 (c_parser_alignas_specifier): Likewise.
5231 (c_parser_alignof_expression): Likewise.
5232 (c_parser_generic_selection): Likewise.
5233 * c-tree.h (pedwarn_c99): Update declaration.
5234 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5235 of pedwarn_c99.
5236
177cce46
MP
52372014-08-19 Marek Polacek <polacek@redhat.com>
5238
5239 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5240 to pedwarn_c90.
5241 * c-errors.c: Include "opts.h".
5242 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5243 * c-parser.c (disable_extension_diagnostics): Handle negative value
5244 of warn_c90_c99_compat, too.
5245 (restore_extension_diagnostics): Likewise.
5246 (c_parser_compound_statement_nostart): Pass
5247 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5248
6dc99c33
MP
52492014-08-12 Marek Polacek <polacek@redhat.com>
5250
5251 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5252 Add pedwarn.
5253 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5254 Likewise.
5255 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5256
3f8257db 52572014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5258
5259 PR c/51849
5260 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5261 Call pedwarn_c90 instead of pedwarn.
5262 (check_bitfield_type_and_width): Likewise.
5263 (declspecs_add_qual): Likewise.
5264 (declspecs_add_type): Likewise.
5265 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5266 Adjust to only call pedwarn_c90.
5267 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5268 pedwarn_c90 instead of pedwarn.
5269 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5270 * c-parser.c (disable_extension_diagnostics): Handle
5271 warn_c90_c99_compat.
5272 (restore_extension_diagnostics): Likewise.
5273 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5274 pedwarn_c90 instead of pedwarn.
5275 (c_parser_initelt): Likewise.
5276 (c_parser_postfix_expression): Likewise.
5277 (c_parser_postfix_expression_after_paren_type): Likewise.
5278 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5279 * c-tree.h: Fix formatting.
5280 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5281 pedwarn_c90 instead of pedwarn.
5282
9f25a338
TS
52832014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5284
5285 * c-typeck.c: Remove include of pointer-set.h.
5286
044331a8
MP
52872014-08-07 Marek Polacek <polacek@redhat.com>
5288
5289 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5290
b787e7a2
TS
52912014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5292
5293 * c-typeck.c: Use hash_map instead of pointer_map.
5294
6e2830c3
TS
52952014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5296
5297 * c-decl.c: Use hash_set instead of pointer_set.
5298
a7ee52fb
IZ
52992014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5300
5301 PR middle-end/61455
5302 * c-array-notation.c (expand_array_notations): Handling
5303 of DECL_EXPR added.
5304
b4dfdc11
MG
53052014-07-31 Marc Glisse <marc.glisse@inria.fr>
5306
5307 PR c++/60517
5308 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5309 a local variable.
5310
976d5a22
TT
53112014-07-30 Tom Tromey <tromey@redhat.com>
5312
5313 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5314 field.
5315 (really_start_incremental_init, push_init_level): Initialize
5316 designator_depth.
5317 (pop_init_level): Set global designator_depth.
5318 (process_init_element): Check for designated_init attribute.
5319
30281de2
MP
53202014-07-20 Marek Polacek <polacek@redhat.com>
5321
5322 PR c/61852
5323 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5324 (implicitly_declare): Pass location to implicit_decl_warning.
5325
b108f48f
JJ
53262014-07-14 Jakub Jelinek <jakub@redhat.com>
5327
5328 PR middle-end/61294
5329 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5330 If non-NULL, call c_parser_check_literal_zero.
5331 (c_parser_check_literal_zero): New function.
5332 (c_parser_postfix_expression_after_primary): Adjust
5333 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5334
773ec47f
MP
53352014-07-06 Marek Polacek <polacek@redhat.com>
5336
5337 PR c/6940
5338 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5339 * c-tree.h (C_ARRAY_PARAMETER): Define.
5340 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5341 function parameter.
5342
22e1cf1c 53432014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5344 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5345
5346 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5347 releasing symbol.
5348
52ec0ea3
MP
53492014-07-01 Marek Polacek <polacek@redhat.com>
5350
5351 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5352 instead of 0 to WARN_FOR_ASSIGNMENT.
5353
d5c3d343
MP
53542014-07-01 Marek Polacek <polacek@redhat.com>
5355
5356 PR c/58286
5357 * c-typeck.c (convert_for_assignment): Pass
5358 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5359
6a7253a4
MP
53602014-06-30 Marek Polacek <polacek@redhat.com>
5361
5362 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5363 has no_sanitize_undefined attribute.
5364
5e88a8f4
IZ
53652014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5366
5367 PR middle-end/57541
5368 * c-array-notation.c (fix_builtin_array_notation_fn):
5369 Check for 0 arguments in builtin call. Check that bultin argument is
5370 correct.
5371 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5372 index.
5373
9698b078
SH
53742014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5375
5376 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5377 qualifiers in __auto_type for atomic types.
5378 (c_parser_typeof_specifier): Discard all type qualifiers in
5379 __typeof__ for atomic types.
5380
6e07c515
MP
53812014-06-25 Marek Polacek <polacek@redhat.com>
5382
5383 PR c/61162
5384 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5385 the return expression to c_finish_return.
5386
da6f124d
JJ
53872014-06-25 Jakub Jelinek <jakub@redhat.com>
5388
5389 * c-typeck.c (c_finish_omp_clauses): Make sure
5390 OMP_CLAUSE_LINEAR_STEP has correct type.
5391
c203e8a7
TS
53922014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5393
5394 * c-decl.c: Adjust.
5395
56ad0e38
JJ
53962014-06-24 Jakub Jelinek <jakub@redhat.com>
5397
5398 * c-parser.c (c_parser_omp_for_loop): For
5399 #pragma omp parallel for simd move lastprivate clause from parallel
5400 to for rather than simd.
5401
47c2554f
MP
54022014-06-23 Marek Polacek <polacek@redhat.com>
5403
5404 * c-typeck.c (parser_build_binary_op): Don't call
5405 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5406
56363ffd
JH
54072014-06-15 Jan Hubicka <hubicka@ucw.cz>
5408
5409 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5410 * c-decl.c (merge_decls): Likewise.
5411
d7ff7ae5
MP
54122014-06-09 Marek Polacek <polacek@redhat.com>
5413
5414 PR c/36446
5415 * c-typeck.c (error_init): Call inform instead of error_at.
5416 (pedwarn_init): Call inform instead of pedwarn.
5417 (warning_init): Call inform instead of warning_at.
5418
24d047a3
JH
54192014-06-07 Jan Hubicka <hubicka@ucw.cz>
5420
5421 * c-decl.c (merge_decls): Use set_decl_section_name.
5422 (duplicate_decls): Remove node if it exists.
5423
9bac5cbb
G
54242014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5425
5426 PR c/53119
5427 * c-typeck.c (push_init_level, process_init_element,
5428 pop_init_level): Correct check for zero initialization, move
5429 missing brace warning to respect zero initialization.
5430
8ffcdea8
MP
54312014-06-05 Marek Polacek <polacek@redhat.com>
5432
5433 PR c/56724
5434 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5435
742938c9
MP
54362014-06-05 Marek Polacek <polacek@redhat.com>
5437
5438 PR c/49706
5439 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5440 on the left hand side operand of a comparison.
742938c9 5441
6447c55d
MP
54422014-06-05 Marek Polacek <polacek@redhat.com>
5443
5444 PR c/48062
5445 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5446 Print note only if the warning was printed.
5447
9dc7743c
IZ
54482014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5449
5450 PR c/58942
5451 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5452 with a pointer.
5453
fedfecef
MP
54542014-06-03 Marek Polacek <polacek@redhat.com>
5455
5456 PR c/60439
5457 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5458 c_start_case.
5459 * c-tree.h (c_start_case): Update.
5460 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5461 switch condition has boolean value.
5462
9b2b7279
AM
54632014-06-02 Andrew MacLeod <amacleod@redhat.com>
5464
5465 * c-decl.c: Include builtins.h.
5466 * c-parser.c: Likewise.
5467
5c1bc275
MP
54682014-05-27 Marek Polacek <polacek@redhat.com>
5469
5470 PR c/56724
5471 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5472 error and warning calls to error_at and warning_at. Pass location of
5473 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5474 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5475 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5476
97563bc8
IZ
54772014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5478
5479 PR c/61191
5480 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5481 function parameters.
5482
aede2c10
JH
54832014-05-23 Jan Hubicka <hubicka@ucw.cz>
5484
5485 * c-decl.c (merge_decls): Preserve symtab node pointers.
5486 (duplicate_decls): Free new decl.
5487
edbba2ce
TS
54882014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5489
f3316c6d
TS
5490 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5491 initialization.
5492
edbba2ce
TS
5493 * c-parser.c (c_parser_omp_target): Return bool values.
5494
68c81f24
TS
54952014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5496
5497 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5498 num_teams_loc variable to num_thread_limit_loc.
5499
632f2871
RS
55002014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5501
5502 * c-array-notation.c (expand_array_notations): Use void_node
5503 instead of void_zero_node.
5504
766090c2
TS
55052014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5506
5507 * c-decl.c (finish_struct): Adjust.
5508 (finish_enum): Likewise.
5509 (bind): Adjust.
5510 (record_inline_static): Likewise.
5511 (push_scope): Likewise.
5512 (make_label): Likewise.
5513 (lookup_label_for_goto): Likewise.
5514 (finish_struct): Likewise.
5515 (finish_enum): Likewise.
5516 (store_parm_decls): Likewise.
5517 (c_push_function_context): Likewise.
5518 * c-lang.h: Remove usage of variable_size gty attribute.
5519 * c-parser.c (c_parse_init): Adjust.
5520 (c_parse_file): Likewise.
5521
2b107f6b
MP
55222014-05-13 Marek Polacek <polacek@redhat.com>
5523
5524 PR c/61162
5525 * c-typeck.c (convert_for_assignment): Pass location to
5526 WARN_FOR_ASSIGNMENT instead of input_location.
5527
d033409e
MP
55282014-05-10 Marek Polacek <polacek@redhat.com>
5529
5530 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5531 maybe_warn_string_init.
5532 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5533 maybe_warn_string_init.
5534 * c-tree.h (maybe_warn_string_init): Update declaration.
5535 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5536 Call pedwarn_init with loc instead of with input_location.
5537 (digest_init): Pass init_loc to maybe_warn_string_init.
5538 (pop_init_level): Call pedwarn_init with loc instead of with
5539 input_location.
5540 (set_init_index): Likewise.
5541 (process_init_element): Likewise.
5542
ea58ef42
MP
55432014-05-09 Marek Polacek <polacek@redhat.com>
5544
5545 PR c/61096
5546 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5547 (c_parser_initelt): Pass location to set_init_label. Pass array index
5548 location to set_init_index.
5549 * c-tree.h (push_init_level): Update declaration.
5550 (pop_init_level): Likewise.
5551 (set_init_index): Likewise.
5552 (set_init_label): Likewise.
5553 * c-typeck.c (error_init): Add location parameter. Call error_at
5554 instead of error.
5555 (digest_init): Pass init_loc to error_init.
5556 (really_start_incremental_init):
5557 (push_init_level): Add location parameter. Pass loc to pop_init_level
5558 and error_init.
5559 (pop_init_level): Likewise.
5560 (set_designator): Add location parameter. Pass loc to pop_init_level,
5561 push_init_level, and error_init.
5562 (set_init_index): Add location parameter. Pass loc to error_init and
5563 set_designator.
5564 (set_init_label): Likewise.
5565 (output_init_element): Pass loc to error_init.
5566 (process_init_element): Pass loc to error_init, pop_init_level,
5567 pedwarn_init, and push_init_level.
5568
661a0813
MP
55692014-05-09 Marek Polacek <polacek@redhat.com>
5570
5571 PR c/50459
5572 * c-parser.c (c_parser_attributes): Parse the arguments as an
5573 expression-list if the attribute takes identifier.
5574
2793eeab
MP
55752014-05-08 Marek Polacek <polacek@redhat.com>
5576
5577 PR c/61053
5578 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5579 TYPE_ALIGN_UNIT.
5580
f827930a
MP
55812014-05-08 Marek Polacek <polacek@redhat.com>
5582
5583 PR c/61077
5584 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5585 of main.
5586
1d60af08
KZ
55872014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5588 Mike Stump <mikestump@comcast.net>
5589 Richard Sandiford <rdsandiford@googlemail.com>
5590
5591 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5592 (finish_enum): Use wide-int interfaces.
5593 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5594 * c-typeck.c (build_c_cast): Likewise.
5595 (set_nonincremental_init_from_string): Likewise.
5596 (c_tree_equal): Likewise.
5597
a0e24419
MP
55982014-05-02 Marek Polacek <polacek@redhat.com>
5599
5600 PR c/25801
5601 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5602 Return size_one_node when the type is not complete.
5603 (pointer_diff): Remove comment.
5604 (build_unary_op): Improve error messages.
5605
19fc9faa
MP
56062014-05-02 Marek Polacek <polacek@redhat.com>
5607
5608 * c-typeck.c (c_finish_return): Separate warning_at calls.
5609
63bc4e87
MP
56102014-05-02 Marek Polacek <polacek@redhat.com>
5611
5612 * c-tree.h (error_init): Remove declaration.
5613 (pedwarn_init): Likewise.
5614 * c-typeck.c (error_init): Make static and move above.
5615 (pedwarn_init): Likewise.
5616 (warning_init): Move above.
5617 (maybe_warn_string_init): Likewise.
5618
4bd2511b
JL
56192014-05-01 Jeff Law <law@redhat.com>
5620
5621 Revert:
5622
5623 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5624 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5625 avoid goto.
5626
6a358dcb
MP
56272014-05-02 Marek Polacek <polacek@redhat.com>
5628
5629 PR c/60784
5630 * c-typeck.c (push_init_level): Set constructor_designated to
5631 p->designated for structures.
5632
ae5ebda4
MP
56332014-05-01 Marek Polacek <polacek@redhat.com>
5634
5635 PR c/60915
5636 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5637 function-definition has an attribute after the declarator.
5638
96b40f8d
MP
56392014-05-01 Marek Polacek <polacek@redhat.com>
5640
5641 PR c/60257
5642 * c-typeck.c (warning_init): Add location_t parameter. Call
5643 warning_at instead of warning.
5644 (push_init_level): Pass input_location to warning_init.
5645 (add_pending_init): Add location_t parameter. Pass loc to
5646 warning_init.
5647 (set_nonincremental_init): Pass input_location to add_pending_init.
5648 (set_nonincremental_init_from_string): Likewise.
5649 (output_init_element): Pass loc to warning_init and to
5650 add_pending_init.
5651
32e00768
MP
56522014-05-01 Marek Polacek <polacek@redhat.com>
5653
5654 PR c/43395
5655 * c-typeck.c (c_finish_return): Distinguish between label and variable
5656 when warning about returning local address.
5657
c9379ce2
MP
56582014-05-01 Marek Polacek <polacek@redhat.com>
5659
5660 PR c/29467
5661 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5662 in C89 mode.
5663
d00887e8
MP
56642014-05-01 Marek Polacek <polacek@redhat.com>
5665
5666 PR c/43245
5667 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5668 instead of 0 to WARN_FOR_QUALIFIERS.
5669
5436fa2e
MP
56702014-05-01 Marek Polacek <polacek@redhat.com>
5671
5672 PR c/56989
5673 * c-typeck.c (default_conversion): Use better location for
5674 error call.
5675
f8ed5150
MP
56762014-04-30 Marek Polacek <polacek@redhat.com>
5677
5678 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5679 also when SANITIZE_FLOAT_DIVIDE is on.
5680
8337d1db
MP
56812014-04-30 Marek Polacek <polacek@redhat.com>
5682
5683 PR c/60139
5684 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5685 and pedwarn_init. Use loc insted of input_location.
5686
c4bdc42f
MP
56872014-04-30 Marek Polacek <polacek@redhat.com>
5688
5689 PR c/60351
5690 * c-typeck.c (build_binary_op): Use location when warning about
5691 shift count.
5692
45484dcf
MP
56932014-04-25 Marek Polacek <polacek@redhat.com>
5694
5695 PR c/18079
5696 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5697 always_inline/noinline and hot/cold attributes.
5698
34cf811f
MP
56992014-04-25 Marek Polacek <polacek@redhat.com>
5700
5701 PR c/60114
5702 * c-parser.c (c_parser_initelt): Pass input_location to
5703 process_init_element.
5704 (c_parser_initval): Pass loc to process_init_element.
5705 * c-tree.h (process_init_element): Adjust declaration.
5706 * c-typeck.c (push_init_level): Pass input_location to
5707 process_init_element.
5708 (pop_init_level): Likewise.
5709 (set_designator): Likewise.
5710 (output_init_element): Add location_t parameter. Pass loc to
5711 digest_init.
5712 (output_pending_init_elements): Pass input_location to
5713 output_init_element.
5714 (process_init_element): Add location_t parameter. Pass loc to
5715 output_init_element.
5716
42056eac
JJ
57172014-04-24 Jakub Jelinek <jakub@redhat.com>
5718
5719 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5720 atomic-clause, allow comma in between atomic-clause and
5721 seq_cst.
5722
e162a134
JJ
57232014-04-22 Jakub Jelinek <jakub@redhat.com>
5724
5725 PR c/59073
5726 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5727 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5728
2f6babac
IZ
57292014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5730
5731 PR middle-end/60469
5732 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5733 create_tmp_var instead build_decl for creating temps.
5734 (build_array_notation_expr): Likewise.
5735 (fix_conditional_array_notations_1): Likewise.
5736 (fix_array_notation_expr): Likewise.
5737 (fix_array_notation_call_expr): Likewise.
5738
8edbfaa6
JJ
57392014-03-28 Jakub Jelinek <jakub@redhat.com>
5740
5741 PR c++/60689
5742 * c-tree.h (c_build_function_call_vec): New prototype.
5743 * c-typeck.c (build_function_call_vec): Don't call
5744 resolve_overloaded_builtin here.
5745 (c_build_function_call_vec): New wrapper function around
5746 build_function_call_vec. Call resolve_overloaded_builtin here.
5747 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5748 Call c_build_function_call_vec instead of build_function_call_vec.
5749 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5750 * c-decl.c (finish_decl): Likewise.
5751
7485aeea
MLI
57522014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5753
5754 PR c/55383
5755 * c-typeck.c: Use correct format string in cast-qual warning
5756
b17a8b07
TS
57572014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5758
5759 * c-decl.c (c_decl_attributes): Use
5760 lang_hooks.types.omp_mappable_type.
5761 * c-typeck.c (c_finish_omp_clauses): Likewise.
5762
3af9c5e9
MP
57632014-03-06 Marek Polacek <polacek@redhat.com>
5764
5765 PR c/60197
5766 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5767 of checking tree code.
5768
1c9f5f33
PK
57692014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5770
5771 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5772 (c_parser_parameter_declaration): Likewise.
5773
cc28fc7f
MP
57742014-02-19 Marek Polacek <polacek@redhat.com>
5775
5776 PR c/60195
5777 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5778 Call mark_exp_read on exp.value.
5779 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5780 TREE_ADDRESSABLE on old instead of val.
5781 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5782
b581c05c
PK
57832014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5784
5785 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5786 C_EXPR_APPEND by vec_safe_push.
5787 * c-tree.h (C_EXPR_APPEND): Remove.
5788
81e5eca8
MP
57892014-01-31 Marek Polacek <polacek@redhat.com>
5790
5791 PR c/59963
5792 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5793 build_function_call_vec.
5794 (build_function_call): Likewise.
5795 (build_atomic_assign): Likewise.
5796 (build_function_call_vec): Add arg_loc parameter. Use it.
5797 (convert_arguments): Likewise.
5798 (convert_for_assignment): Rename rhs_loc to expr_loc.
5799 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5800 (c_parser_objc_keywordexpr): Likewise.
5801 (c_parser_postfix_expression_after_primary): Call
5802 build_function_call_vec with expr_loc rather than op_loc.
5803 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5804 build_function_call_vec.
5805 (c_parser_expr_list): Add locations parameter. Fill it with locations
5806 of function arguments.
5807 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5808
68fca595
MP
58092014-01-30 Marek Polacek <polacek@redhat.com>
5810
5811 PR c/59940
5812 * c-typeck.c (build_function_call_vec): Use loc parameter.
5813 (convert_arguments): Add location parameter. Use it.
5814 (ep_convert_and_check): Likewise.
5815 (build_atomic_assign): Adjust convert_for_assignment call.
5816 (build_modify_expr): Likewise.
5817 (digest_init): Likewise.
5818 (c_finish_return): Likewise.
5819 (build_conditional_expr): Adjust ep_convert_and_check calls.
5820 (convert_for_assignment): Add rhs_loc parameter. Use it.
5821 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5822 calls.
5823
fa337f3a
RB
58242014-01-30 Richard Biener <rguenther@suse.de>
5825
5826 PR c/59905
5827 * c-typeck.c (build_function_call_vec): Do not replace calls
5828 to a function via an incompatible type with a runtime abort.
5829
b72271b9
BI
58302014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5831
5832 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5833 flag_enable_cilkplus with flag_cilkplus.
5834 (c_parser_direct_declarator_inner): Likewise.
5835 (c_parser_attribute_any_word): Likewise.
5836 (c_parser_attributes): Likewise.
5837 (c_parser_compound_statement): Likewise.
5838 (c_parser_statement_after_labels): Likewise.
5839 (c_parser_if_statement): Likewise.
5840 (c_parser_switch_statement): Likewise.
5841 (c_parser_do_statement): Likewise.
5842 (c_parser_for_statement): Likewise.
5843 (c_parser_unary_expression): Likewise.
5844 (c_parser_postfix_expression): Likewise.
5845 (c_parser_postfix_expression_after_primary): Likewise.
5846 (c_parser_postfix_expression_after_primary): Likewise.
5847 (c_parser_omp_clause_name): Likewise.
5848 (c_finish_omp_declare_simd): Likewise.
5849 (c_parser_cilk_verify_simd): Likewise.
5850 * c-typeck.c (build_array_ref): Likewise.
5851 (build_function_call_vec): Likewise.
5852 (convert_arguments): Likewise.
5853 (build_compound_expr): Likewise.
5854 (c_finish_return): Likewise.
5855 (c_finish_if_stmt): Likewise.
5856 (c_finish_loop): Likewise.
5857 (build_binary_op): Likewise.
5858
393e8e8b
MP
58592014-01-23 Marek Polacek <polacek@redhat.com>
5860
5861 PR c/59846
5862 * c-typeck.c (parser_build_binary_op): Use location instead of
5863 input_location.
5864 (build_binary_op): Pass location to shorten_compare.
5865
f04dda30
MP
58662014-01-23 Marek Polacek <polacek@redhat.com>
5867
5868 PR c/58346
5869 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5870 an empty aggregate.
5871
789eadcd
MP
58722014-01-23 Marek Polacek <polacek@redhat.com>
5873
5874 PR c/59871
5875 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5876 of a comma expression.
5877 (emit_side_effect_warnings): Likewise.
5878
40f14e9f
BI
58792014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5880
5881 PR c/59825
5882 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5883 function to use walk_tree and moved a lot of its functionality to
5884 expand_array_notations.
5885 (expand_array_notations): New function.
5886
74558dd9
BI
58872014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5888
5889 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5890 attribute an attribute without value.
5891
652fea39
JJ
58922014-01-23 Jakub Jelinek <jakub@redhat.com>
5893
5894 PR middle-end/58809
5895 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5896 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5897
f34f1c87
MP
58982014-01-22 Marek Polacek <polacek@redhat.com>
5899
5900 PR c/59891
5901 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5902 of remove_c_maybe_const_expr on op1 and op2.
5903
241f845a
JJ
59042014-01-15 Jakub Jelinek <jakub@redhat.com>
5905
5906 PR c/58943
5907 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5908 effects, preevaluate rhs using SAVE_EXPR first.
5909
9a74f20c
BI
59102014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5911
5912 PR c++/59631
5913 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5914 statements with if-elseif statements.
5915
96066ce1
MP
59162014-01-06 Marek Polacek <polacek@redhat.com>
5917
5918 PR c/57773
5919 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5920 defined bit-field types only in ISO C.
5921
23a5b65a
RS
59222014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5923
5924 Update copyright years
5925
f9030485
RS
59262014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5927
5928 * c-array-notation.c: Use the standard form for the copyright notice.
5929
41958c28
BI
59302013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5931
5932 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5933 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5934 field in parser is not empty. If not-empty, call the function
5935 c_parser_finish_omp_declare_simd.
5936 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5937 between SIMD-enabled functions and #pragma simd. Added new parameter.
5938 (c_parser_cilk_all_clauses): Modified the usage of the function
5939 c_parser_cilk_clause_vectorlength as mentioned above.
5940 (c_parser_cilk_simd_fn_vector_attrs): New function.
5941 (c_finish_cilk_simd_fn_tokens): Likewise.
5942 (is_cilkplus_vector_p): Likewise.
5943 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5944 "nomask," and "mask" strings in clause name.
5945 (c_parser_omp_all_clauses): Added 3 new case statements:
5946 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5947 PRAGMA_CILK_CLAUSE_NOMASK.
5948 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5949 check for vector attribute and if so call the function
5950 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5951 called the function c_finish_cilk_simd_fn_tokens.
5952 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5953 parser field is non-empty. If so, parse them as you would parse
5954 the omp declare simd pragma.
5955 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5956 Added a check when step is a parameter and flag it as error.
5957 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5958 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5959 pragma_omp_clause.
5960
cef0fd0e
TS
59612013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5962
5963 * c-parser.c (c_parser_omp_parallel): Fix description.
5964
12893402
BI
59652013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5966
5967 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5968 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5969 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5970 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5971
296674db
JM
59722013-12-04 Joseph Myers <joseph@codesourcery.com>
5973
5974 PR c/52023
5975 * c-parser.c (c_parser_alignas_specifier): Use
5976 c_sizeof_or_alignof_type instead of c_alignof.
5977 (c_parser_alignof_expression): Likewise, with min_alignof
5978 parameter depending on alignof spelling used.
5979
edd28054
MP
59802013-12-04 Marek Polacek <polacek@redhat.com>
5981
5982 PR c/54113
5983 * c-decl.c (start_function): Don't warn for missing prototype for
5984 inline functions.
5985
da0fc454
MP
59862013-12-03 Marek Polacek <polacek@redhat.com>
5987
5988 PR c/59351
5989 * c-decl.c (build_compound_literal): Allow compound literals with
5990 empty initial value.
5991
4c2ecab0
JM
59922013-12-02 Joseph Myers <joseph@codesourcery.com>
5993
5994 PR c/58235
5995 * c-typeck.c (build_modify_expr): Diagnose assignment to
5996 expression with array type.
5997
340baef7
JM
59982013-11-29 Joseph Myers <joseph@codesourcery.com>
5999
6000 PR c/42262
6001 * c-typeck.c (process_init_element): Do not treat a string as
6002 initializing a whole array when used with a designator for an
6003 individual element.
6004
6763b9f7
JM
60052013-11-29 Joseph Myers <joseph@codesourcery.com>
6006
6007 PR c/57574
6008 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6009 an inline function following a static declaration.
6010
e7bd1de1
JJ
60112013-11-28 Jakub Jelinek <jakub@redhat.com>
6012
6013 PR c/59310
6014 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6015 to p_name before calling c_parser_omp_teams instead of after.
6016 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6017 argument. Remove unused p_name variable.
6018
0136f8f0
AH
60192013-11-27 Aldy Hernandez <aldyh@redhat.com>
6020 Jakub Jelinek <jakub@redhat.com>
6021
6022 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6023 external_scope is NULL.
6024
241b71bb
TV
60252013-11-27 Tom de Vries <tom@codesourcery.com>
6026 Marc Glisse <marc.glisse@inria.fr>
6027
6028 PR c++/59032
6029 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6030
2fb9a547
AM
60312013-11-22 Andrew MacLeod <amacleod@redhat.com>
6032
6033 * c-typeck.c: Add required include files from gimple.h.
6034
8400e75e
DM
60352013-11-22 David Malcolm <dmalcolm@redhat.com>
6036
6037 * c-decl.c (define_label, shadow_tag_warned)
6038 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6039 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6040 (declspecs_add_type): Remove use of in_system_header macro.
6041 * c-parser.c (c_parser_unary_expression): Likewise.
6042 * c-typeck.c (store_init_value, process_init_element)
6043 (c_start_case): Likewise.
6044
6045 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6046 macro.
6047
6048 * c-parser.c (c_parser_set_source_position_from_token): Remove
6049 reference to in_system_header from comment.
6050
386b1f1f
RS
60512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6052
6053 * c-decl.c (grokdeclarator): Update comment to refer to
6054 tree_to_[su]hwi rather than tree_low_cst.
6055
ae7e9ddd
RS
60562013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6057
6058 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6059 tree_to_uhwi throughout.
6060
9439e9a1
RS
60612013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6062
6063 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6064 throughout.
6065
9541ffee
RS
60662013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6067
6068 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6069 throughout.
6070
c02065fc
AH
60712013-11-15 Aldy Hernandez <aldyh@redhat.com>
6072
6073 * c-parser.c (c_parser_cilk_simd): New.
6074 (c_parser_cilk_verify_simd): New.
6075 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6076 (c_parser_omp_for_loop): Add case for NE_EXPR.
6077 Set c_break_label for CILK_SIMD.
6078 (c_parser_cilk_clause_vectorlength): New.
6079 (c_parser_cilk_clause_linear): New.
6080 (c_parser_cilk_clause_name): New.
6081 (c_parser_cilk_all_clauses): New.
6082 * c-typeck.c (build_unary_op): Pass location argument to
6083 readonly_error.
6084 (build_modify_expr): Same.
6085 (build_asm_expr): Same.
6086 (c_finish_bc_stmt): Error on break/continue in loops.
6087
18f429e2
AM
60882013-11-14 Andrew MacLeod <amacleod@redhat.com>
6089
6090 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6091
d8a2d370
DN
60922013-11-14 Diego Novillo <dnovillo@google.com>
6093
6094 * c-decl.c: Include print-tree.h.
6095 Include stor-layout.h.
6096 Include varasm.h.
6097 Include attribs.h.
6098 Include stringpool.h.
6099 * c-lang.c: Include fold-const.h.
6100 * c-parser.c: Include stringpool.h.
6101 Include attribs.h.
6102 Include stor-layout.h.
6103 Include varasm.h.
6104 Include trans-mem.h.
6105 * c-typeck.c: Include stor-layout.h.
6106 Include trans-mem.h.
6107 Include varasm.h.
6108 Include stmt.h.
6109
38b7bc7f
JM
61102013-11-13 Joseph Myers <joseph@codesourcery.com>
6111
6112 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6113 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6114 __auto_type.
6115 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6116 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6117 RID_AUTO_TYPE.
6118 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6119 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6120 (c_parser_declarator, c_parser_direct_declarator_inner)
6121 (c_parser_parameter_declaration, c_parser_type_name): All callers
6122 changed.
6123 (c_parser_declaration_or_fndef): Handle declarations with type
6124 determined from the initializer.
6125
45b0be94
AM
61262013-11-12 Andrew MacLeod <amacleod@redhat.com>
6127
18f429e2 6128 * c-typeck.c: Include gimplify.h.
45b0be94 6129
582d9b50
JM
61302013-11-12 Joseph Myers <joseph@codesourcery.com>
6131
6132 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6133 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6134 comment.
6135 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6136 or _Thread_local as appropriate in diagnostics.
6137 (build_null_declspecs): Initialize ret->thread_gnu_p.
6138 (declspecs_add_scspec): Handle either __thread or _Thread_local
6139 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6140 pedantic. Do not disallow _Thread_local extern and _Thread_local
6141 static.
6142
267bac10
JM
61432013-11-07 Joseph Myers <joseph@codesourcery.com>
6144 Andrew MacLeod <amacleod@redhat.com>
6145
6146 * c-aux-info.c (gen_type): Handle atomic qualifier.
6147 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6148 qualifiers when compating types.
6149 (shadow_tag_warned): Handle atomic_p in declspecs.
6150 (quals_from_declspecs): Likewise.
6151 (start_decl): Use c_type_promotes_to when promoting argument
6152 types.
6153 (grokdeclarator): Handle _Atomic.
6154 (get_parm_info): Diagnose any qualifier on "void" as only
6155 parameter.
6156 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6157 comparing types. Use c_type_promotes_to when promoting argument
6158 types.
6159 (finish_function): Use c_type_promotes_to when promoting argument
6160 types.
6161 (build_null_declspecs): Handle atomic_p in declspecs.
6162 (declspecs_add_qual): Handle RID_ATOMIC.
6163 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6164 (c_token_starts_declspecs): Handle RID_ATOMIC.
6165 (c_parser_declspecs): Handle atomic type specifiers and
6166 qualifiers.
6167 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6168 from types of expressions with atomic type.
6169 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6170 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6171 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6172 (c_parser_statement_after_labels, c_parser_switch_statement)
6173 (c_parser_for_statement, c_parser_expr_no_commas)
6174 (c_parser_conditional_expression, c_parser_binary_expression)
6175 (c_parser_cast_expression, c_parser_unary_expression)
6176 (c_parser_postfix_expression)
6177 (c_parser_postfix_expression_after_primary, c_parser_expression):
6178 Use convert_lvalue_to_rvalue.
6179 (c_parser_expression_conv, c_parser_expr_list): Document
6180 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6181 (c_parser_objc_synchronized_statement): Use
6182 convert_lvalue_to_rvalue.
6183 (c_parser_objc_selector): Handle RID_ATOMIC.
6184 (c_parser_objc_receiver, c_parser_array_notation): Use
6185 convert_lvalue_to_rvalue.
6186 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6187 _Atomic (type-name).
6188 (struct c_declspecs): Add atomic_p field.
6189 (convert_lvalue_to_rvalue): Declare.
6190 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6191 corresponding atomic types.
6192 (qualify_type): Don't add _Atomic qualifiers from second argument.
6193 (comp_target_types): Do not allow _Atomic mismatches.
6194 (type_lists_compatible_p): Do not remove atomic qualifiers when
6195 comparing types.
6196 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6197 (build_atomic_assign): New functions.
6198 (build_unary_op): Use build_atomic_assign for atomic increment and
6199 decrement.
6200 (build_conditional_expr): Do not treat _Atomic void as a qualified
6201 version of void.
6202 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6203 (find_anonymous_field_with_type, convert_to_anonymous_field)
6204 (convert_for_assignment): Do not remove atomic qualifiers when
6205 comparing types.
6206 (digest_init): Do not accept initialization of arrays of atomic
6207 elements by string constants.
6208 (build_asm_expr): Use convert_lvalue_to_rvalue.
6209 (build_binary_op): Do not treat _Atomic void as a qualified
6210 version of void.
6211
0c249d4b
DD
62122013-11-06 DJ Delorie <dj@redhat.com>
6213
6214 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6215 both explicit and builtin, print the location of the explicit one.
6216
6d7f7e0a
TB
62172013-11-05 Tobias Burnus <burnus@net-b.de>
6218
6219 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6220 c_parser_omp_distribute, c_parser_omp_teams,
6221 c_parser_omp_target, c_parser_omp_declare): Handle
6222 -fopenmp-simd.
6223
b906f4ca
MP
62242013-11-03 Marek Polacek <polacek@redhat.com>
6225
6226 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6227
ee1d5a02
JJ
62282013-11-01 Jakub Jelinek <jakub@redhat.com>
6229
6230 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6231 check_dup_generic at the end, unless remove is true.
6232 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6233 remove = true;.
6234 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6235
5a9785fb
JJ
62362013-10-31 Jakub Jelinek <jakub@redhat.com>
6237
6238 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6239 with decl that is not pointer nor array.
6240
939b37da
BI
62412013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6242
6243 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6244 a spawning function is found.
6245 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6246 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6247 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6248 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6249 case.
6250 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6251 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6252 expr.
6253 (c_finish_return): Added a check to reject _Cilk_spawn in return
6254 expression.
6255 (build_cilk_spawn): New function.
6256 (build_cilk_sync): Likewise.
6257 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6258
d4af74d4
TB
62592013-10-27 Tobias Burnus <burnus@net-b.de>
6260
6261 PR other/33426
6262 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6263 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6264 (c_parser_statement_after_labels): Update calls.
6265
d73749df 62662013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6267
6268 PR other/33426
6269 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6270 Handle PRAGMA_IVDEP.
6271 (c_parser_statement_after_labels): Update call.
6272
f28aa681
MP
62732013-10-24 Marek Polacek <polacek@redhat.com>
6274
6275 * c-parser.c (c_parser_struct_declaration): Add a comment.
6276 (c_parser_declarator): Don't allow _Alignas here.
6277
0645c1a2
AM
62782013-10-17 Andrew MacLeod <amacleod@redhat.com>
6279
6280 * c-parser.c: Include omp-low.h.
6281 * c-typeck.c: Likewise.
6282
568a31f2
MP
62832013-10-17 Marek Polacek <polacek@redhat.com>
6284
6285 PR c/58267
6286 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6287 Document syntax of the array-declarator.
6288 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6289 are not permitted.
6290 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6291 (c_parser_struct_declaration): Likewise.
6292 (c_parser_declarator): Likewise.
6293 (c_parser_direct_declarator_inner): Likewise.
6294 (c_parser_parameter_declaration): Likewise.
6295 (c_parser_type_name): Likewise.
6296
acf0174b
JJ
62972013-10-11 Jakub Jelinek <jakub@redhat.com>
6298
6299 * c-lang.h (current_omp_declare_target_attribute): New extern
6300 decl.
6301 * c-parser.c: Include c-lang.h.
6302 (struct c_parser): Change tokens to c_token *.
6303 Add tokens_buf field. Change tokens_avail type to unsigned int.
6304 (c_parser_consume_token): If parser->tokens isn't
6305 &parser->tokens_buf[0], increment parser->tokens.
6306 (c_parser_consume_pragma): Likewise.
6307 (enum pragma_context): Add pragma_struct and pragma_param.
6308 (c_parser_external_declaration): Adjust
6309 c_parser_declaration_or_fndef caller.
6310 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6311 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6312 Adjust recursive call.
6313 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6314 of pragma_external.
6315 (c_parser_parameter_declaration): Use pragma_param instead of
6316 pragma_external.
6317 (c_parser_compound_statement_nostart, c_parser_label,
6318 c_parser_for_statement): Adjust
6319 c_parser_declaration_or_fndef callers.
6320 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6321 it through to c_parser_conditional_expression.
6322 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6323 pass it through to c_parser_binary_expression. Adjust recursive
6324 call.
6325 (c_parser_binary_expression): Remove prec argument, add
6326 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6327 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6328 binop matches it, use build2 instead of parser_build_binary_op.
6329 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6330 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6331 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6332 Handle pragma_struct and pragma_param the same as pragma_external.
6333 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6334 (c_parser_omp_variable_list): Parse array sections for
6335 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6336 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6337 (c_parser_omp_clause_reduction): Handle user defined reductions.
6338 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6339 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6340 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6341 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6342 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6343 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6344 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6345 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6346 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6347 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6348 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6349 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6350 (c_parser_omp_for_loop): Add CODE argument, pass it through
6351 to c_finish_omp_for. Change last argument to cclauses,
6352 and adjust uses to grab parallel clauses from the array of all
6353 the split clauses. Adjust c_parser_binary_expression,
6354 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6355 (omp_split_clauses): New function.
6356 (c_parser_omp_simd): New function.
6357 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6358 Allow the function to be called also when parsing combined constructs,
6359 and call c_parser_omp_simd when parsing for simd.
6360 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6361 #pragma omp section, require exactly one structured-block instead of
6362 sequence of statements.
6363 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6364 Allow the function to be called also when parsing combined constructs.
6365 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6366 Allow the function to be called also when parsing combined
6367 constructs.
6368 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6369 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6370 c_parser_omp_teams, c_parser_omp_target_data,
6371 c_parser_omp_target_update, c_parser_omp_target,
6372 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6373 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6374 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6375 (c_parser_omp_construct): Add p_name and mask vars. Handle
6376 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6377 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6378 and c_parser_omp_sections callers.
6379 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6380 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6381 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6382 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6383 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6384 OMP_CLAUSE_DEPEND.
6385 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6386 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6387 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6388 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6389 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6390 * c-typeck.c: Include tree-inline.h.
6391 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6392 handle_omp_array_sections_1, handle_omp_array_sections,
6393 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6394 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6395 user defined reductions.
6396 (c_tree_equal): New function.
6397 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6398 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6399 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6400 c_check_omp_declare_reduction_r): New prototypes.
6401 * c-decl.c (current_omp_declare_target_attribute): New variable.
6402 (c_decl_attributes): New function.
6403 (start_decl, start_function): Use it instead of decl_attributes.
6404 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6405 c_omp_reduction_decl, c_omp_reduction_lookup,
6406 c_check_omp_declare_reduction_r): New functions.
6407
0a6c2227
TT
64082013-09-25 Tom Tromey <tromey@redhat.com>
6409
6410 * Make-lang.in (c/gccspec.o): Remove.
6411 (CFLAGS-c/gccspec.o): New variable.
6412 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6413 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6414 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6415
f3bc55f0
TT
64162013-09-25 Tom Tromey <tromey@redhat.com>
6417
6418 * Make-lang.in (c/gccspec.o): Don't use subshell.
6419
a24d975c
MP
64202013-09-18 Marek Polacek <polacek@redhat.com>
6421
6422 PR sanitize/58443
6423 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6424 Remove unnecessary check.
6425
ce6923c5
MP
64262013-09-18 Marek Polacek <polacek@redhat.com>
6427
6428 PR sanitizer/58411
6429 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6430 no_sanitize_undefined attribute.
6431
a1e51df9
KT
64322013-09-13 Kai Tietz <ktietz@redhat.com>
6433
6434 PR target/57848
6435 * c-decl.c (c_builtin_function_ext_scope): Remove
6436 wrong assumption that it is never called on prexisting
6437 symbol.
6438
0af94e6f
JR
64392013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6440
6441 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6442
20059c8b
GDR
64432013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6444
6445 * c-objc-common.c (c_tree_printer): Tidy.
6446
de5a5fa1
MP
64472013-08-30 Marek Polacek <polacek@redhat.com>
6448
6449 * c-typeck.c (build_binary_op): Add division by zero and shift
6450 instrumentation.
6451
2531a1d9 64522013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6453 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6454
6e2bcc98 6455 PR c/35649
2531a1d9
JR
6456 * c-typeck.c (c_common_type): Prefer double_type_node over
6457 other REAL_TYPE types with the same precision.
6458 (convert_arguments): Likewise.
6459
025311c4
GDR
64602013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6461
6462 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6463 (c_initialize_diagnostics): Call a destructor for the early printer.
6464
da6ca2b5
GDR
64652013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6466
6467 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6468 printer initialization.
6469
318cda85 64702013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6471
318cda85
BI
6472 PR c/57490
6473 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6474 check for truth values.
6475 (expand_array_notation_exprs): Added truth values case. Removed an
6476 unwanted else. Added for-loop to walk through subtrees in default
6477 case.
6478
b066401f
GDR
64792013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6480
6481 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6482
fb48aadc
JM
64832013-07-23 Joseph Myers <joseph@codesourcery.com>
6484
6485 * c-parser.c (struct c_generic_association): Fix typo.
6486
433cc7b0
TT
64872013-07-23 Tom Tromey <tromey@redhat.com>
6488 Joseph Myers <joseph@codesourcery.com>
6489
6490 * c-parser.c (struct c_generic_association): New.
6491 (c_generic_association_d): New typedef.
6492 (c_parser_generic_selection): New function.
6493 (c_parser_postfix_expression): Handle RID_GENERIC.
6494
26d40c3d
JM
64952013-07-13 Jason Merrill <jason@redhat.com>
6496
6497 PR c++/57793
6498 * c-decl.c (finish_struct): Check for too-large class.
6499
ecdbd01a 65002013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6501
6502 PR c/57821
6503 * c-typeck.c (set_init_index): When folding, check for index overflow.
6504
1141ed3f
BI
65052013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6506
6507 * c-parser.c (c_parser_array_notation): Removed rejection of array
6508 notations in an array of function pointers.
6509
713b46fa
BI
65102013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6511
6512 * c-array-notation.c (make_triplet_val_inv): New function.
6513 (create_cmp_incr): Likewise.
6514 (create_array_refs): Likewise.
6515 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6516 Also modularized common parts between functions and called the function.
6517 (build_array_notation_expr): Likewise.
6518 (fix_conditional_array_notations_1): Likewise.
6519 (fix_array_notation_expr): Likewise.
6520 (fix_array_notation_call_expr): Likewise.
6521
92f20202
MP
65222013-06-18 Marek Polacek <polacek@redhat.com>
6523
6524 PR c/57630
6525 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6526
73a23b06
BI
65272013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6528
6529 * c-array-notation.c (build_array_notation_expr): Reject array notation
6530 mismatch between LHS and RHS even inside a call_expr. Also, removed
6531 a couple while statements that were dead code.
6532
00b8517d
BI
65332013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6534
6535 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6536 excessive precision expressions in function parameters. Also removed
6537 couple unwanted while statements.
6538
1509bdda
BI
65392013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6540
6541 * c-array-notation.c (expand_array_notation_exprs): Added
6542 ARRAY_NOTATION_REF case.
ab20d992 6543
d60f1706
BI
65442013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6545
6546 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6547 function to c-family/array-notation-common.c.
6548 (is_cilkplus_reduce_builtin): Likewise.
6549 (find_rank): Likewise.
6550 (extract_array_notation_exprs): Likewise.
6551 (replace_array_notations): Likewise.
6552 (find_inv_trees): Likewise.
6553 (replace_inv_trees): Likewise.
6554 (contains_array_notation_expr): Likewise.
6555 (find_correct_array_notation_type): Likewise.
6556 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6557 (struct inv_list): Moved this to c-family/array-notation-common.c.
6558 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6559
6d6efbb3
BI
65602013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6561
6562 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6563 reduction functions outside the for-loop. Added a check if the fundecl
6564 is non-NULL. Finally, removed an unwanted if-statement, and made the
6565 body unconditional.
6566
25c22937
BI
65672013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6568
6569 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6570 condition of the if-statement matches the rank of else-block and then-
6571 block when array notations are used.
6572 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6573 expression after the entire function body is parsed.
6574 (c_parser_expr_no_commas): Delayed creating array notation expressions
6575 to the end of function parsing.
6576 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6577 whole if-statement instead of just the condition.
ab20d992 6578 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6579
edd25645
BI
65802013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6581
6582 PR c/57474
6583 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6584 array to NULL_TREE if they are unused. Also added a check for the
6585 field to be NULL before its fields are used in future.
ab20d992 6586
065ce7f1
RO
65872013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6588
6589 PR bootstrap/57450
6590 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6591 (build_array_notation_expr): Likewise.
6592
36536d79
BI
65932013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6594
6595 * c-typeck.c (build_array_ref): Added a check to see if array's
6596 index is greater than one. If true, then emit an error.
6597 (build_function_call_vec): Exclude error reporting and checking
6598 for builtin array-notation functions.
6599 (convert_arguments): Likewise.
6600 (c_finish_return): Added a check for array notations as a return
6601 expression. If true, then emit an error.
6602 (c_finish_loop): Added a check for array notations in a loop
6603 condition. If true then emit an error.
6604 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6605 (build_binary_op): Added a check for array notation expr inside
6606 op1 and op0. If present, we call another function to find correct
6607 type.
6608 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6609 * c-parser.c (c_parser_compound_statement): Check if array
6610 notation code is used in tree, if so, then transform them into
6611 appropriate C code.
6612 (c_parser_expr_no_commas): Check if array notation is used in LHS
6613 or RHS, if so, then build array notation expression instead of
6614 regular modify.
6615 (c_parser_postfix_expression_after_primary): Added a check for
6616 colon(s) after square braces, if so then handle it like an array
6617 notation. Also, break up array notations in unary op if found.
6618 (c_parser_direct_declarator_inner): Added a check for array
6619 notation.
6620 (c_parser_compound_statement): Added a check for array notation in
6621 a stmt. If one is present, then expand array notation expr.
6622 (c_parser_if_statement): Likewise.
6623 (c_parser_switch_statement): Added a check for array notations in
6624 a switch statement's condition. If true, then output an error.
6625 (c_parser_while_statement): Similarly, but for a while.
6626 (c_parser_do_statement): Similarly, but for a do-while.
6627 (c_parser_for_statement): Similarly, but for a for-loop.
6628 (c_parser_unary_expression): Check if array notation is used in a
6629 pre-increment or pre-decrement expression. If true, then expand
6630 them.
6631 (c_parser_array_notation): New function.
6632 * c-array-notation.c: New file.
6633 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 6634
cd192ccc
MS
66352013-05-23 Mike Stump <mikestump@comcast.net>
6636
6637 * c-typeck.c (convert_for_assignment): Handle references to memory
6638 spaces better.
6639
427b248d
JM
66402013-05-16 Jason Merrill <jason@redhat.com>
6641
6642 * Make-lang.in (cc1$(exeext)): Use link mutex.
6643
44d90fe1
PC
66442013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6645
6646 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6647 to simply use OPT_Wpointer_arith.
6648 (build_unary_op): Likewise.
6649
4e7d7b3d
JJ
66502013-04-03 Jakub Jelinek <jakub@redhat.com>
6651
6652 PR c/19449
6653 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6654 argument. If set, or it temporarily for parsing of the first
6655 argument into force_folding_builtin_constant_p.
6656 (c_parser_postfix_expression): Adjust callers.
6657
839b422f
RB
66582013-03-21 Richard Biener <rguenther@suse.de>
6659
6660 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6661 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6662
2ee028f1
MP
66632013-02-12 Marek Polacek <polacek@redhat.com>
6664
6665 PR c/44938
6666 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6667 origtypes to NULL.
6668
8824edff
JJ
66692013-01-24 Jakub Jelinek <jakub@redhat.com>
6670
6671 PR c/56078
6672 * c-typeck.c (set_nonincremental_init_from_string): If
6673 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6674 returned false.
6675 (process_init_element): Likewise.
6676
eadd3d0d
JJ
66772012-12-20 Jakub Jelinek <jakub@redhat.com>
6678
6679 PR c++/55619
6680 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6681 argument, don't call default_function_array_conversion
6682 nor c_fully_fold here.
6683 (c_parser_asm_statement): Adjust callers.
6684 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6685 and outputs here, and call default_function_array_conversion
6686 on inputs that don't need to be addressable.
6687
f8a93a2e
JJ
66882012-12-18 Jakub Jelinek <jakub@redhat.com>
6689
6690 PR c/39464
6691 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6692 warning require that both c_common_unsigned_type as well as
6693 c_common_signed_type is the same for both mvl and mvr types.
6694
9771b263
DN
66952012-11-16 Diego Novillo <dnovillo@google.com>
6696
6697 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6698
6699 * c-common.c: Use new vec API in vec.h.
6700 * c-common.h: Likewise.
6701 * c-gimplify.c: Likewise.
6702 * c-pragma.c: Likewise.
6703 * c-pretty-print.c: Likewise.
6704 * c-pretty-print.h: Likewise.
6705 * c-semantics.c: Likewise.
6706 * c-decl.c: Likewise.
6707 * c-parser.c: Likewise.
6708 * c-tree.h: Likewise.
6709 * c-typeck.c: Likewise.
6710
880661a4
JW
67112012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6712
6713 PR c++/54930
6714 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6715
077d1abe
MLI
67162012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6717
6718 PR c/53066
6719 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6720 shadows a function, unless the variable is a function or a
6721 pointer-to-function.
6722
3a785c97
JJ
67232012-10-12 Jakub Jelinek <jakub@redhat.com>
6724
6725 PR c/54381
6726 * c-parser.c (struct c_tree_loc_pair): Removed.
6727 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6728 add location_t * and tree * arguments, fill in array of 3
6729 sizeof_arg trees and corresponding locs.
6730 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6731 c_parser_expr_list callers.
6732 (c_parser_postfix_expression_after_primary): Likewise. Pass
6733 array of 3 sizeof_arg trees and locs (corresponding to first
6734 3 arguments) to sizeof_pointer_memaccess_warning.
6735
703c8606
LC
67362012-10-09 Lawrence Crowl <crowl@google.com>
6737
6738 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6739 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6740 hash table.
6741
5d9de0d0
PC
67422012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6743
6744 PR c++/54194
6745 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6746 call.
6747
a212e43f
MG
67482012-10-09 Marc Glisse <marc.glisse@inria.fr>
6749
6750 PR c++/54427
6751 * c-typeck.c: Include c-common.h.
6752 (enum stv_conv): Moved to c-common.h.
6753 (scalar_to_vector): Moved to c-common.c.
6754 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6755 * Make-lang.in: c-typeck.c depends on c-common.h.
6756
3b78de56
AC
67572012-10-04 Arnaud Charlet <charlet@adacore.com>
6758
6759 * c-decl.c (c_write_global_declarations): Fix handling of
6760 -fdump-ada-spec*.
6761
78c60e3d
SS
67622012-09-30 Sharad Singhai <singhai@google.com>
6763
6764 * c-decl.c (c_write_global_declarations): Use a different method
6765 to determine if the dump has ben initialized.
6766
9f33203d
JM
67672012-09-14 Joseph Myers <joseph@codesourcery.com>
6768
6769 PR c/54552
6770 * c-typeck.c (c_cast_expr): When casting to a type requiring
6771 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6772 c_fully_fold first.
6773
a27d595d
JM
67742012-09-14 Joseph Myers <joseph@codesourcery.com>
6775
6776 PR c/54103
6777 * c-typeck.c (build_unary_op): Pass original argument of
6778 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6779 any C_MAYBE_CONST_EXPR, if it has integer operands.
6780 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6781 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6782 to c_objc_common_truthvalue_conversion, then remove any
6783 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6784 c_objc_common_truthvalue_conversion not
6785 c_common_truthvalue_conversion.
6786 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6787 call note_integer_operands for arguments with integer operands
6788 that are not integer constants.
6789
9feb29df
JJ
67902012-09-13 Jakub Jelinek <jakub@redhat.com>
6791
6792 PR c/54559
6793 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6794 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6795
d409320c
JJ
67962012-08-31 Jakub Jelinek <jakub@redhat.com>
6797
6798 PR c/54428
6799 * c-convert.c (convert): Don't call fold_convert_loc if
6800 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6801 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6802 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6803
6265d07c
JJ
68042012-08-24 Jakub Jelinek <jakub@redhat.com>
6805
6806 PR c/54355
6807 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6808 for nested and empty_ok arguments in the call to
6809 c_parser_declaration_or_fndef.
6810
1a4049e7
JJ
68112012-08-17 Jakub Jelinek <jakub@redhat.com>
6812
6813 * c-tree.h (c_last_sizeof_arg): Declare.
6814 * c-parser.c (struct c_tree_loc_pair): New type.
6815 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6816 non-NULL.
6817 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6818 (c_parser_postfix_expression_after_primary): Likewise. Call
6819 sizeof_pointer_memaccess_warning if needed.
6820 (sizeof_ptr_memacc_comptypes): New function.
6821 * c-typeck.c (c_last_sizeof_arg): New global variable.
6822 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6823
0229aee9
UB
68242012-07-24 Uros Bizjak <ubizjak@gmail.com>
6825
6826 * c-lang.h (lang_decl): Add variable_size GTY option.
6827
7ee2468b
SB
68282012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6829
6830 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6831 * Make-lang.in: Fix dependencies.
6832
d4a10d0a
SB
68332012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6834
6835 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6836 and add language Makefile hooks.
6837 * config-lang.in: New file.
6838 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6839 add the required "normal" config-lang.in rules.
6840 * c-lang.h: Moved from gcc/ to here.
6841 * c-tree.h: Likewise.
6842 * c-objc-common.c: Likewise.
6843 * c-objc-common.h: Likewise.
6844 * c-typeck.c: Likewise.
6845 * c-convert.c: Likewise.
6846 * c-lang.c: Likewise.
6847 * c-aux-info.c: Likewise.
6848 * c-errors.c: Likewise.
6849 * gccspec.c: Likewise.
6850 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6851 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6852\f
a5544970 6853Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6854
6855Copying and distribution of this file, with or without modification,
6856are permitted in any medium without royalty provided the copyright
6857notice and this notice are preserved.