]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
OpenACC 2.6 deep copy: middle-end parts
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
a6163563
JB
12019-12-19 Julian Brown <julian@codesourcery.com>
2 Maciej W. Rozycki <macro@codesourcery.com>
3 Tobias Burnus <tobias@codesourcery.com>
4 Thomas Schwinge <thomas@codesourcery.com>
5
6 * c-parser.c (c_parser_omp_clause_name): Support no_create.
7 (c_parser_oacc_data_clause): Likewise.
8 (c_parser_oacc_all_clauses): Likewise.
9 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
10 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
11 PRAGMA_OACC_CLAUSE_NO_CREATE.
12 * c-typeck.c (handle_omp_array_sections): Support
13 GOMP_MAP_NO_ALLOC.
14
d68f5d45
DM
152019-12-09 David Malcolm <dmalcolm@redhat.com>
16
17 * c-objc-common.c (range_label_for_type_mismatch::get_text):
18 Replace label_text ctor calls.
19
4691bf46
JM
202019-12-04 Joseph Myers <joseph@codesourcery.com>
21
22 PR c/36941
23 PR c/88827
24 * c-typeck.c (convert_lvalue_to_rvalue): Call
25 require_complete_type for arguments not of void types.
26 (build_indirect_ref): Do not diagnose dereferencing pointers to
27 incomplete types.
28 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
29
85d11957
JM
302019-12-03 Joseph Myers <joseph@codesourcery.com>
31
32 PR c/88704
33 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
34 old-style parameter definitions.
35
4569f8b3
SL
362019-12-01 Sandra Loosemore <sandra@codesourcery.com>
37
38 PR target/92499
39
40 * c-decl.c (flexible_array_type_p): Move to common code.
41
65ef05d0
RS
422019-11-30 Richard Sandiford <richard.sandiford@arm.com>
43
44 * c-decl.c (start_decl): Allow initialization of variables whose
45 size is a POLY_INT_CST.
46 (finish_decl): Use verify_type_context to check whether the target
47 allows variables with a particular type to have static or thread-local
48 storage duration. Don't raise a second error if such variables do
49 not have a constant size.
50 (grokdeclarator): Use verify_type_context to check whether the
51 target allows fields or array elements to have a particular type.
52 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
53 the target allows pointer difference for the types involved.
54 (build_unary_op): Likewise for pointer increment and decrement.
55
34b43828
JM
562019-11-29 Joseph Myers <joseph@codesourcery.com>
57
58 * c-parser.c (struct c_parser): Add members raw_tokens and
59 raw_tokens_used.
60 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
61 using previously-lexed raw tokens.
62 (c_parser_peek_nth_token_raw)
63 (c_parser_check_balanced_raw_token_sequence): New functions.
64 (c_parser_nth_token_starts_std_attributes): Use
65 c_parser_check_balanced_raw_token_sequence for Objective-C.
66
5b8d9367
JM
672019-11-25 Joseph Myers <joseph@codesourcery.com>
68
69 PR c/91985
70 * c-decl.c (finish_declspecs): Use int instead of decimal
71 floating-point types if decimal floating-point not supported.
72
1723e1be
JM
732019-11-25 Joseph Myers <joseph@codesourcery.com>
74
75 * c-tree.h (struct c_declarator): Use a structure for id member.
76 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
77 declarators at the start, not when handling individual declarators
78 later. Use u.id.id instead of u.id.
79 (grokfield): Use u.id.id instead of u.id.
80 (build_id_declarator): Set u.id.id and u.id.attrs.
81 (finish_declspecs): Handle postfix attributes in case of typedef
82 name or typeof used.
83 * c-parser.c (c_parser_direct_declarator)
84 (c_parser_direct_declarator_inner): Place declarator for
85 attributes inside that for function or array, not outside. Set
86 u.id.attrs for identifiers.
87 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
88 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
89 instead of u.id.
90
bdaf8be1
JJ
912019-11-22 Jakub Jelinek <jakub@redhat.com>
92
93 PR c/90677
94 * c-decl.c (identifier_global_tag): Define.
95
3e00ba47
RB
962019-11-20 Richard Biener <rguenther@suse.de>
97
98 PR c/92088
99 * c-decl.c (grokdeclarator): Prevent inlining of nested
100 function with VLA arguments.
101
8c5b727a
JM
1022019-11-20 Joseph Myers <joseph@codesourcery.com>
103
104 * c-decl.c (c_warn_type_attributes): New function.
105 (groktypename, grokdeclarator, finish_declspecs): Call
106 c_warn_type_attributes before applying attributes to types.
107 * c-tree.h (c_warn_type_attributes): Declare.
108
192961ff
JM
1092019-11-19 Joseph Myers <joseph@codesourcery.com>
110
111 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
112 standard attributes.
113 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
114 pedwarn for unknown standard attributes and return error_mark_node
115 for them.
116
20a38017
MM
1172019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
118
119 * c-parser.c (c_parser_parse_rtl_body): Always call
120 run_rtl_passes, even if startwith pass is not provided.
121
d5fbe5e0
JM
1222019-11-15 Joseph Myers <joseph@codesourcery.com>
123
124 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
125 duplicate standard attributes.
126
97cc1187
JM
1272019-11-15 Joseph Myers <joseph@codesourcery.com>
128
129 * c-decl.c (std_attribute_table): Add maybe_unused.
130
f8aea5e3
JM
1312019-11-15 Joseph Myers <joseph@codesourcery.com>
132
133 * c-decl.c (std_attribute_table): Add fallthrough.
134 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
135 attribute at top level.
136
2cc94aa8
JM
1372019-11-15 Joseph Myers <joseph@codesourcery.com>
138
139 * c-decl.c (std_attribute_table): New.
140 (c_init_decl_processing): Register attributes from
141 std_attribute_table.
142 * c-parser.c (c_parser_attribute_arguments): Add arguments
143 require_string and allow_empty_args. All callers changed.
144 (c_parser_std_attribute): Set require_string argument for
145 "deprecated" attribute.
146
7c5890cc
JM
1472019-11-14 Joseph Myers <joseph@codesourcery.com>
148
149 * c-parser.c (c_parser_postfix_expression)
150 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
151 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
152
e8738f4e
RS
1532019-11-14 Richard Sandiford <richard.sandiford@arm.com>
154
155 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
156 of build_same_sized_truth_vector_type.
157 (build_vec_cmp): Likewise.
158
b2417b59
JJ
1592019-11-14 Jakub Jelinek <jakub@redhat.com>
160
bedb7f04
JJ
161 * c-parser.c (c_parser_omp_context_selector): Don't require score
162 argument to fit into shwi, just to be INTEGER_CST. Diagnose
163 negative score.
164
b2417b59
JJ
165 * c-parser.c (c_parser_omp_context_selector): Rename
166 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
167 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
168 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
169 and string literals.
170
4e03c3a7
JM
1712019-11-14 Joseph Myers <joseph@codesourcery.com>
172
173 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
174 ctsk_tagfirstref_attrs.
175 (struct c_declspecs): Update description of attrs. Add
176 postfix_attrs and non_std_attrs_seen_p. Increase size of
177 typespec_kind bit-field.
178 (c_warn_unused_attributes): New declaration.
179 (parser_xref_tag): Update prototype.
180 * c-decl.c (c_warn_unused_attributes): New function.
181 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
182 ctsk_tagref_attrs. Handle attribute declarations.
183 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
184 (grokdeclarator): Handle standard attributes.
185 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
186 attributes to incomplete type reference.
187 (xref_tag): Update call to parser_xref_tag.
188 (declspecs_add_addrspace, declspecs_add_type)
189 (declspecs_add_scspec, declspecs_add_attrs): Set
190 non_std_attrs_seen_p.
191 (finish_declspecs): Apply postfix standard attributes to type.
192 * c-parser.c (c_token_starts_declspecs)
193 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
194 (c_parser_next_tokens_start_declaration): Update comments.
195 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
196 parser->tokens[2] to parser->tokens[1].
197 (c_parser_nth_token_starts_std_attributes)
198 (c_parser_std_attribute_specifier_sequence): New functions.
199 (c_parser_declaration_or_fndef): Add arguments have_attrs and
200 attrs. All callers changed. Handle standard attributes.
201 (c_parser_parms_declarator, c_parser_parms_list_declarator)
202 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
203 All callers changed.
204 (c_parser_declspecs): Add arguments start_std_attr_ok and
205 end_std_attr_ok. All callers changed. Handle standard
206 attributes.
207 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
208 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
209 (c_parser_compound_statement_nostart, c_parser_all_labels)
210 (c_parser_label, c_parser_statement, c_parser_for_statement):
211 Handle standard attributes.
212 * c-parser.h (c_parser_declspecs): Update prototype.
213 * gimple-parser.c (c_parser_gimple_declaration): Update call to
214 c_parser_declspecs.
215
0c29cac4
ML
2162019-11-12 Martin Liska <mliska@suse.cz>
217
218 * gimple-parser.c: Do not include params.h.
219
028d4092
ML
2202019-11-12 Martin Liska <mliska@suse.cz>
221
222 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
223 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
224 macro.
225
62aee289
MR
2262019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
227 Frederik Harwath <frederik@codesourcery.com>
228
229 gcc/c/
230 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
231 (c_parser_oacc_kernels_parallel): Rename function to...
232 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
233 (c_parser_omp_construct): Update accordingly.
234
235
7cec9588
JJ
2362019-11-11 Jakub Jelinek <jakub@redhat.com>
237
238 * c-parser.c (c_parser_translation_unit): Diagnose declare target
239 without corresponding end declare target.
240
f486280c
RS
2412019-11-08 Richard Sandiford <richard.sandiford@arm.com>
242
243 * c-convert.c (convert): Only handle vector conversions if one of
244 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
245 allows it.
246 * c-typeck.c (build_array_ref): Only allow vector indexing if the
247 vectors satisfy gnu_vector_type_p.
248 (build_unary_op): Only allow unary operators to be applied to
249 vectors if they satisfy gnu_vector_type_p.
250 (digest_init): Only allow by-element initialization of vectors
251 if they satisfy gnu_vector_type_p.
252 (really_start_incremental_init): Likewise.
253 (push_init_level): Likewise.
254 (pop_init_level): Likewise.
255 (process_init_element): Likewise.
256 (build_binary_op): Only allow binary operators to be applied to
257 vectors if they satisfy gnu_vector_type_p.
258
017c6491
JM
2592019-11-08 Joseph Myers <joseph@codesourcery.com>
260
261 * c-decl.c (grokparms): Convert () in a function definition to
262 (void) for C2x.
263 (store_parm_decls_oldstyle): Pedwarn for C2x.
264 (store_parm_decls): Update comment about () not generating a
265 prototype.
266
c01bd174
JM
2672019-11-07 Joseph Myers <joseph@codesourcery.com>
268
269 * c-parser.c (c_parser_attribute_arguments): New function.
270 Factored out of c_parser_gnu_attribute.
271 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
272 (c_parser_balanced_token_sequence, c_parser_std_attribute)
273 (c_parser_std_attribute_specifier): New functions.
274 (c_parser_transaction_attributes): Use
275 c_parser_std_attribute_specifier.
276
471c5330
JM
2772019-11-07 Joseph Myers <joseph@codesourcery.com>
278
279 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
280 lex_joined_string and translate_strings_p.
281 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
282 c_lex_with_flags.
283 (c_parser_string_literal): New function.
284 (c_parser_static_assert_declaration_no_semi): Use
285 c_parser_string_literal. Do not set lex_untranslated_string.
286 (c_parser_asm_string_literal): Use c_parser_string_literal.
287 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
288 (c_parser_gnu_attributes): Set and restore translate_strings_p
289 instead of lex_untranslated_string.
290 (c_parser_asm_statement): Do not set lex_untranslated_string.
291 (c_parser_asm_operands): Likewise.
292 (c_parser_has_attribute_expression): Set and restore
293 translate_strings_p instead of lex_untranslated_string.
294 (c_parser_postfix_expression): Use c_parser_string_literal.
295 (pragma_lex): Likewise.
296 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
297 (c_parse_file): Set translate_strings_p.
298 * gimple-parser.c (c_parser_gimple_postfix_expression)
299 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
300 * c-parser.c (c_parser_string_literal): Declare function.
301
d0c464d2
JJ
3022019-11-02 Jakub Jelinek <jakub@redhat.com>
303
304 * c-parser.c (c_finish_omp_declare_variant): Use
305 omp_get_context_selector instead of c_omp_get_context_selector.
306
ac2cfa6c
RS
3072019-10-29 Richard Sandiford <richard.sandiford@arm.com>
308
309 * c-tree.h (c_simulate_enum_decl): Declare.
310 * c-decl.c (c_simulate_enum_decl): New function.
311 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
312
74078538
RS
3132019-10-29 Richard Sandiford <richard.sandiford@arm.com>
314
315 * c-tree.h (c_simulate_builtin_function_decl): Declare.
316 * c-decl.c (c_simulate_builtin_function_decl): New function.
317 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
318 to the above.
319
ad1539d5
MS
3202019-10-28 Martin Sebor <msebor@redhat.com>
321
322 PR c/66970
323 * c-decl.c (names_builtin_p): Define a new function.
324
cb73e4e7
RB
3252019-10-28 Richard Biener <rguenther@suse.de>
326
327 PR c/92249
328 * gimple-parser.c (c_parser_parse_gimple_body): Make
329 current_bb the entry block initially to easier recover
330 from errors.
331 (c_parser_gimple_compound_statement): Adjust.
332
135df52c
JJ
3332019-10-24 Jakub Jelinek <jakub@redhat.com>
334
335 * c-parser.c (c_finish_omp_declare_variant): Use
336 omp_context_selector_matches instead of
337 c_omp_context_selector_matches.
338 * c-decl.c (c_decl_attributes): Add "omp declare target block"
339 attribute in between declare target and end declare target
340 pragmas.
341
783bfe5e
JM
3422019-10-15 Joseph Myers <joseph@codesourcery.com>
343
344 * c-parser.c (c_parser_attribute_any_word): Rename to
345 c_parser_gnu_attribute_any_word. All callers changed.
346 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
347 callers changed.
348 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
349 callers changed.
350 (c_parser_declaration_or_fndef, c_parser_declspecs)
351 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
352 (c_parser_struct_declaration, c_parser_declarator)
353 (c_parser_gnu_attribute, c_parser_compound_statement)
354 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
355 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
356 attribute-related syntax productions.
357
56898e43
RS
3582019-10-14 Richard Sandiford <richard.sandiford@arm.com>
359
360 * c-objc-common.c (useful_aka_type_p): Replace with...
361 (get_aka_type): ...this new function. Given the original type,
362 decide which aka type to print (if any). Only look through typedefs
363 if user_facing_original_type_p.
364 (print_type): Update accordingly.
365
b9424661
JJ
3662019-10-14 Jakub Jelinek <jakub@redhat.com>
367
368 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
369 into int NESTED, if it is 2, diagnose missing commas in between
370 clauses.
371 (c_parser_omp_context_selector): Pass 2 as last argument to
372 c_parser_omp_all_clauses.
373
20de9568
JJ
3742019-10-12 Jakub Jelinek <jakub@redhat.com>
375
376 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
377 For simd properties, put them directly into TREE_VALUE.
378 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
379 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
380 add "omp declare variant base" attribute rather than
381 "omp declare variant".
382
fe2bc27c
JM
3832019-10-11 Joseph Myers <joseph@codesourcery.com>
384
385 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
386
94e7f906
JJ
3872019-10-10 Jakub Jelinek <jakub@redhat.com>
388
389 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
390 true, terminate processing on closing paren and don't skip to end of
391 pragma line.
392 (c_parser_omp_declare_simd): Handle also declare variant.
393 (omp_construct_selectors, omp_device_selectors,
394 omp_implementation_selectors, omp_user_selectors): New variables.
395 (c_parser_omp_context_selector,
396 c_parser_omp_context_selector_specification,
397 c_finish_omp_declare_variant): New functions.
398 (c_finish_omp_declare_simd): Handle both declare simd and
399 declare variant.
400 (c_parser_omp_declare): Handle declare variant.
401
93313b94
JM
4022019-10-02 Joseph Myers <joseph@codesourcery.com>
403
404 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
405 CPP_COLON tokens.
406
55879815
RS
4072019-10-01 Richard Sandiford <richard.sandiford@arm.com>
408
409 * c-objc-common.c (useful_aka_type_p): New function.
410 (print_type): Use it to decide whether an aka type is worth printing.
411
59bc434a
JJ
4122019-09-27 Jakub Jelinek <jakub@redhat.com>
413
414 PR c++/88203
415 * c-parser.c (c_parser_predefined_identifier): New function.
416 (c_parser_postfix_expression): Use it.
417 (c_parser_omp_variable_list): Parse predefined identifiers.
418 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
419 in shared and firstprivate clauses, even when they are predetermined
420 shared.
421
c6447c20
RS
4222019-09-27 Richard Sandiford <richard.sandiford@arm.com>
423
424 * c-typeck.c (build_function_call_vec): Take the original function
425 decl as an optional final parameter. Pass all built-in calls to
426 check_builtin_function_arguments.
427
522da4c2
EB
4282019-09-20 Eric Botcazou <ebotcazou@adacore.com>
429
430 PR c/91815
431 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
432 of identifiers in the external scope only for variables and functions.
433
68e2c199
PK
4342019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
435
436 PR c/78736
437 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
438
22f8849d
IS
4392019-08-23 Iain Sandoe <iain@sandoe.co.uk>
440
441 PR pch/61250
442 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
443 after determining that the first token is not
444 PRAGMA_GCC_PCH_PREPROCESS.
445
db376f45
EB
4462019-08-22 Eric Botcazou <ebotcazou@adacore.com>
447
448 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
449 FUNCTION_DECL to the right value in the presence of nested declarators.
450
4d732405
RS
4512019-08-13 Richard Sandiford <richard.sandiford@arm.com>
452
453 PR middle-end/91421
454 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
455
cb1180d5
RS
4562019-08-13 Richard Sandiford <richard.sandiford@arm.com>
457
458 PR middle-end/91421
459 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
460 of a built_in_function.
461 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
462
77eb117f
JJ
4632019-08-10 Jakub Jelinek <jakub@redhat.com>
464
465 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
466 (c_parser_omp_clause_device_type): New function.
467 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
468 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
469 (c_parser_omp_declare_target): Handle device_type clauses. Remove
470 diagnostics for declare target with clauses nested in clause-less
471 declare target declaration-definition-seq.
472 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
473
2c3b8bad
JJ
4742019-08-09 Jakub Jelinek <jakub@redhat.com>
475
bb522e2e
JJ
476 * c-parser.c (check_no_duplicate_clause): Simplify using
477 omp_find_clause.
478 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
479 directive name modifiers.
480 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
481
2c3b8bad
JJ
482 PR c/91401
483 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
484 check_no_duplicate_clause call. Comment it out, instead emit a
485 warning for duplicate dist_schedule clauses.
486
99769e7f
RS
4872019-08-08 Richard Sandiford <richard.sandiford@arm.com>
488
489 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
490
8860d270
JJ
4912019-08-08 Jakub Jelinek <jakub@redhat.com>
492
493 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
494 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
495 instead of generic_head to track duplicates.
496
398e3feb
JJ
4972019-08-07 Jakub Jelinek <jakub@redhat.com>
498
499 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
500 (c_parser_omp_clause_use_device_addr): New function.
501 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
502 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
503 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
504 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
505 map or use_device_* clauses.
506 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
507 in OpenMP, require pointer type rather than pointer or array type.
508 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
509
a28351e7
JJ
5102019-07-31 Jakub Jelinek <jakub@redhat.com>
511
512 PR c/91192
513 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
514 even if finish is UNKNOWN_LOCATION, just use start as finish in that
515 case.
516
6343b6bf
ML
5172019-07-25 Martin Liska <mliska@suse.cz>
518 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
519
520 PR c++/23383
521 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
522
cb50701e
ML
5232019-07-25 Martin Liska <mliska@suse.cz>
524
525 * c-decl.c (merge_decls): Use new macros
526 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
527
62e3e66f
RB
5282019-07-23 Richard Biener <rguenther@suse.de>
529
530 PR tree-optimization/83518
531 * gimple-parser.c (c_parser_parse_gimple_body): When we have
532 a CFG also rebuild cgraph edges.
533
554a530f
JJ
5342019-07-20 Jakub Jelinek <jakub@redhat.com>
535
536 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
537 (c_parser_omp_clause_bind): New function.
538 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
539 (OMP_LOOP_CLAUSE_MASK): Define.
540 (c_parser_omp_loop): New function.
541 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
542 loop combined with parallel or teams.
543 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
544 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
545
d119bf79
RS
5462019-07-18 Richard Sandiford <richard.sandiford@arm.com>
547
548 PR c/53633
549 * c-decl.c (finish_function): Check targetm.warn_func_return
550 before issuing a -Wreturn-type warning.
551
ab20d992 5522019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
553
554 * gimple-parser.c (c_parser_gimple_try_stmt): New.
555 (c_parser_compound_statement): Call it.
556
1fdd6f04
JJ
5572019-07-12 Jakub Jelinek <jakub@redhat.com>
558
559 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
560 (c_parser_omp_clause_order): New function.
561 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
562 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
563 PRAGMA_OMP_CLAUSE_ORDER.
564 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
565
8389386c
RB
5662019-07-10 Richard Biener <rguenther@suse.de>
567
568 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
569 _Literal (int *) &x for address literals.
570
99b1c316
MS
5712019-07-09 Martin Sebor <msebor@redhat.com>
572
573 PR c++/61339
574 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
575 to class.
576 (field_decl_cmp): Same.
577 * c-parser.c (c_parser_struct_or_union_specifier): Same.
578 * c-tree.h: Same.
579 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
580
6c1dae73
MS
5812019-07-09 Martin Sebor <msebor@redhat.com>
582
583 PR c++/61339
584 * c-decl.c: Change class-key from class to struct and vice versa
585 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
586 * gimple-parser.c: Same.
587
69b5279e
RB
5882019-07-01 Richard Biener <rguenther@suse.de>
589
590 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
591 _Literal (char *) &"foo" for address literals pointing to
592 STRING_CSTs.
593
ab20d992
JJ
5942019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
595
596 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
597 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
598 C incompatibility if alternate "__intN__" form is used.
599
1e3d475e
MS
6002019-06-24 Martin Sebor <msebor@redhat.com>
601
602 * c-typeck.c (build_binary_op): Hyphenate floating-point.
603
bf38f7e9
JJ
6042019-06-10 Jakub Jelinek <jakub@redhat.com>
605
606 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
607 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
608 (c_parser_omp_scan_loop_body): New function.
609 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
610 inscan reduction clauses.
611 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
612 non-inscan reductions on the same construct, or inscan reductions with
613 ordered or schedule clauses, or inscan array reductions.
614
65985d78
MS
6152019-06-05 Martin Sebor <msebor@redhat.com>
616
617 PR c/90737
618 * c-typeck.c (c_finish_return): Only consider functions returning
619 pointers as candidates for -Wreturn-local-addr.
620
0ecf545c
MS
6212019-06-05 Martin Sebor <msebor@redhat.com>
622
623 * c-decl.c (start_decl): Adjust quoting and hyphenation
624 in diagnostics.
625 (finish_decl): Same.
626 (finish_enum): Same.
627 (start_function): Same.
628 (declspecs_add_type): Same.
629 * c-parser.c (warn_for_abs): Same.
630 * c-typeck.c (build_binary_op): Same.
631
e03436e7
TS
6322019-05-17 Thomas Schwinge <thomas@codesourcery.com>
633
b48f44bf
TS
634 PR c/89433
635 * c-parser.c (c_finish_oacc_routine): Rework checking if already
636 marked with an OpenACC 'routine' directive.
637
5bf04509
TS
638 PR c/89433
639 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
640 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
641
e03436e7
TS
642 PR c/89433
643 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
644 clauses from "omp declare target" attribute.
645
a9c697b8
MS
6462019-05-16 Martin Sebor <msebor@redhat.com>
647
ab20d992
JJ
648 * c-decl.c (start_decl): Quote keywords, operators, and
649 types in diagnostics.
650 (finish_decl): Same.
651 * c-parser.c (c_parser_asm_statement): Same.
652 (c_parser_conditional_expression): Same.
653 (c_parser_transaction_cancel): Same.
654 * c-typeck.c (c_common_type): Same.
655 (build_conditional_expr): Same.
656 (digest_init): Same.
657 (process_init_element): Same.
658 (build_binary_op): Same.
a9c697b8 659
c4499192
RB
6602019-05-17 Richard Biener <rguenther@suse.de>
661
662 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
663 (c_parser_gimple_unary_expression): Likewise.
664 (c_parser_gimple_parentized_ternary_expression): New function.
665
adfe6e4b
RB
6662019-05-16 Richard Biener <rguenther@suse.de>
667
668 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
669 (c_parser_gimple_unary_expression): Likewise.
670
186dabf2
RB
6712019-05-15 Richard Biener <rguenther@suse.de>
672
673 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
674 __BIT_FIELD_REF.
675
1158c5b4
RB
6762019-05-14 Richard Biener <rguenther@suse.de>
677
678 * gimple-parser.c (c_parser_gimple_statement): Remove
679 questionable auto-promotion to VIEW_CONVERT_EXPR.
680 (c_parser_gimple_typespec): Split out from __MEM parsing.
681 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
682 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
683 as __VIEW_CONVERT with -gimple.
684
fd4485aa
ML
6852019-05-09 Martin Liska <mliska@suse.cz>
686
687 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
688 __MAX.
689 (c_parser_gimple_unary_expression): Parse also binary expression
690 __MIN and __MAX.
691 (c_parser_gimple_parentized_binary_expression): New function.
692
d276406a
ML
6932019-05-09 Martin Liska <mliska@suse.cz>
694
695 * gimple-parser.c (struct gimple_parser): Add probability.
696 for gimple_parser_edge.
697 (gimple_parser::push_edge): Add new argument probability.
698 (c_parser_gimple_parse_bb_spec): Parse also probability
699 if present.
700 (c_parser_parse_gimple_body): Set edge probability.
701 (c_parser_gimple_compound_statement): Consume token
702 before calling c_parser_gimple_goto_stmt.
703 Parse BB counts.
704 (c_parser_gimple_statement): Pass new argument.
705 (c_parser_gimple_goto_stmt): Likewise.
706 (c_parser_gimple_if_stmt): Likewise.
707 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
708 * c-parser.c (c_parser_declaration_or_fndef): Pass
709 hot_bb_threshold argument.
710 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
711 field.
712 (c_parser_gimple_parse_bb_spec_edge_probability): New.
713
f179b64e
JJ
7142019-04-26 Jakub Jelinek <jakub@redhat.com>
715
716 PR debug/90197
717 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
718 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
719 (c_parser_do_statement): Likewise.
720 (c_parser_for_statement): Likewise. Formatting fixes.
721 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
722 emit DEBUG_BEGIN_STMTs if needed.
723
e7178413
JJ
7242019-04-19 Jakub Jelinek <jakub@redhat.com>
725
c280b7ee
JJ
726 PR c/89888
727 * c-typeck.c (struct c_switch): Remove outside_range_p member.
728 (c_start_case): Don't clear it.
729 (do_case): Adjust c_add_case_label caller.
730 (c_finish_case): Adjust c_do_switch_warnings caller.
731
e7178413
JJ
732 PR c++/90108
733 * c-decl.c (merge_decls): If remove is main variant and
734 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
735 variant that has newdecl as TYPE_NAME if any.
736
60a2c645
JJ
7372019-04-12 Jakub Jelinek <jakub@redhat.com>
738
739 PR c/89933
740 * c-decl.c (merge_decls): When newdecl's type is its main variant,
741 don't try to remove it from the variant list, but instead assert
742 it has no variants.
743
2a82beaa
RB
7442019-04-01 Richard Biener <rguenther@suse.de>
745
746 PR c/71598
747 * c-tree.h (c_get_alias_set): Declare.
748 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
749 * c-objc-common.c (c_get_alias_set): Treat enumeral types
750 as the underlying integer type.
751
bec1da64
MS
7522019-03-19 Martin Sebor <msebor@redhat.com>
753
754 PR tree-optimization/89688
755 * c-decl.c (finish_decl): Call braced_lists_to_string for more
756 kinds of initializers.
757
855cd9b1
JJ
7582019-03-19 Jakub Jelinek <jakub@redhat.com>
759
760 PR c/89734
761 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
762 return type even if quals_used is 0. Formatting fixes.
763
baa09dc5
RB
7642019-03-14 Richard Biener <rguenther@suse.de>
765
766 * c-tree.h (enum c_declspec_il): New.
767 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
768 enum bitfield.
769 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
770 Pass start pass and declspec_il to c_parser_parse_gimple_body.
771 (c_parser_declspecs): Adjust.
772 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
773 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
774 and bitmap.h.
775 (struct gimple_parser): New.
776 (gimple_parser::push_edge): New method.
777 (c_parser_gimple_parse_bb_spec): New helper.
778 (c_parser_parse_gimple_body): Get start pass and IL specification.
779 Initialize SSA and CFG.
780 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
781 Build a gimple_parser parsing state and pass it along.
782 (c_parser_gimple_statement): Change intermittend __PHI internal
783 function argument for the edge.
784 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
785 (c_parser_gimple_goto_stmt): Record edges to build.
786 (c_parser_gimple_if_stmt): Likewise.
787 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
788 (c_parser_gimple_or_rtl_pass_list): Likewise.
789
a3f9f006
ML
7902019-03-11 Martin Liska <mliska@suse.cz>
791
792 * c-decl.c (check_for_loop_decls): Wrap an option name
793 in a string format message and fix GNU coding style.
794 * c-parser.c (c_parser_declspecs): Likewise.
795
1db01ff9
JJ
7962019-03-08 Jakub Jelinek <jakub@redhat.com>
797
798 PR tree-optimization/89550
799 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
800 returned true.
801 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
802 or warning returned true.
803
66dcb747
JJ
8042019-02-28 Jakub Jelinek <jakub@redhat.com>
805
806 PR c/89525
807 * c-typeck.c (convert_arguments): Call inform_declaration only if
808 the previous warning_at call returned true.
809
2263c9f2
TS
8102019-02-22 Thomas Schwinge <thomas@codesourcery.com>
811
812 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
813 parameter. Adjust all users.
814 (c_parser_oacc_simple_clause): Replace parser with loc formal
815 parameter. Adjust all users.
816
ab20d992 8172019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
818
819 PR c/87924
820 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
821 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
822
5f88ba10
JJ
8232019-02-15 Jakub Jelinek <jakub@redhat.com>
824
825 PR c/89340
826 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
827 before c_decl_attributes rather than after it.
828
cfc30fd1
JJ
8292019-02-06 Jakub Jelinek <jakub@redhat.com>
830
831 PR c/89211
832 * c-parser.c (c_parser_declaration_or_fndef): Don't update
833 DECL_ARGUMENTS of d if it has been defined already. Use a single if
834 instead of 3 nested ifs.
835
fbe83e6b
JM
8362019-02-06 Joseph Myers <joseph@codesourcery.com>
837
838 PR c/88584
839 * c-decl.c (finish_decl): Do not complete array types for arrays
840 with external linkage not at file scope.
841
f461f938
RB
8422019-02-05 Richard Biener <rguenther@suse.de>
843
844 PR c/88606
845 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
846 all type variants when not supported.
847
fe509359
JJ
8482019-01-30 Jakub Jelinek <jakub@redhat.com>
849
850 PR c/89061
851 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
852 * c-decl.c (decl_jump_unsafe): Return false for
853 C_DECL_COMPOUND_LITERAL_P decls.
854 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
855
6a335b96
JJ
8562019-01-29 Jakub Jelinek <jakub@redhat.com>
857
f4b7e754
JJ
858 PR c/89045
859 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
860 scope.
861
6a335b96
JJ
862 PR c/86125
863 * c-decl.c (last_fileptr_type): Remove.
864 (last_structptr_types): New variable.
865 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
866 {old,new}rettype instead of the types themselves. Assert
867 last_structptr_types array has the same number of elements
868 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
869 argument oldtype and newtype. Instead of handling
870 just fileptr_type_node specially, handle all builtin_structptr_types
871 pointer nodes. Formatting fix.
872
d8b5a1a0
MS
8732019-01-24 Martin Sebor <msebor@redhat.com>
874
875 PR c/86125
876 PR c/88886
877 PR middle-end/86308
878 * c-decl.c (match_builtin_function_types): Add arguments.
879 (diagnose_mismatched_decls): Diagnose mismatched declarations
880 of built-ins more strictly.
881
e21c4491
JJ
8822019-01-24 Jakub Jelinek <jakub@redhat.com>
883
884 PR c++/88976
885 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
886 on #pragma omp cancel with different modifiers.
887
420183d9
L
8882019-01-18 H.J. Lu <hongjiu.lu@intel.com>
889
890 PR c/51628
891 PR c/88664
892 * c-typeck.c (convert_for_assignment): Upate the
893 warn_for_address_or_pointer_of_packed_member call.
894
17ad43dd
TH
8952019-01-16 Tom Honermann <tom@honermann.net>
896 Jason Merrill <jason@redhat.com>
897
898 * c-typeck.c (digest_init): Revised the error message produced for
899 ill-formed cases of array initialization with a string literal.
900 (error_init): Make variadic.
901
5f07d78a
JJ
9022019-01-12 Jakub Jelinek <jakub@redhat.com>
903
904 * c-typeck.c (convert_for_assignment): Fix a comment typo.
905
c4581bbf
JJ
9062019-01-07 Jakub Jelinek <jakub@redhat.com>
907
908 PR c/88701
909 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
910 if current_function_decl is non-NULL.
911
65c5b1eb
JM
9122019-01-07 Joseph Myers <joseph@codesourcery.com>
913
914 PR c/88720
915 PR c/88726
916 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
917 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
918 functions declared but never defined only for external scope, not
919 for other scopes.
920
d8fcab68
JJ
9212019-01-07 Jakub Jelinek <jakub@redhat.com>
922
923 PR c++/85052
924 * c-parser.c (c_parser_postfix_expression): Parse
925 __builtin_convertvector.
926
a5544970
JJ
9272019-01-01 Jakub Jelinek <jakub@redhat.com>
928
929 Update copyright years.
930
da77eace
L
9312018-12-20 H.J. Lu <hongjiu.lu@intel.com>
932
933 PR c/51628
934 * c-typeck.c (convert_for_assignment): Call
935 warn_for_address_or_pointer_of_packed_member.
936
1edf8866
SB
9372018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
938
939 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
940 a more specific error message (instead of just falling through).
941
db4fd626
SB
9422018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
943
944 * c-parser.c (c_parser_asm_statement): Keep track of the location each
945 asm qualifier is first seen; use that to give nicer "duplicate asm
946 qualifier" messages. Delete 'quals" variable, instead pass the
947 "is_volatile_ flag to build_asm_stmt directly.
948 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
949 * c-typeck.c (build_asm_stmt): Ditto; adjust.
950
9c9cfcbb
SB
9512018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
952
953 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
954 "done" boolean variable.
955
a14feb3c
DM
9562018-12-19 David Malcolm <dmalcolm@redhat.com>
957
958 PR c++/87504
959 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
960 Move from here to gcc-rich-location.h and gcc-rich-location.c.
961 (build_binary_op): Use struct op_location_t and
962 class binary_op_rich_location.
963
6d939173
JJ
9642018-12-11 Jakub Jelinek <jakub@redhat.com>
965
966 PR sanitizer/88426
967 * c-convert.c (convert): Call c_fully_fold before calling
968 ubsan_instrument_float_cast.
969
b7055028
SB
9702018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
971
972 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
973 setting "quals".
974
5b76e75f
SB
9752018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
976
977 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
978 after asm. Pass a flag for it to build_asm_expr.
979 * c-tree.h (build_asm_expr): Update declaration.
980 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
981 set ASM_INLINE_P.
982
30bd42b9
SB
9832018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
984
985 PR inline-asm/55681
986 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
987 combination of volatile and goto, in any order, without repetitions.
988
9df6c0e4
JB
9892018-12-04 James Norris <jnorris@codesourcery.com>
990 Cesar Philippidis <cesar@codesourcery.com>
991 Julian Brown <julian@codesourcery.com>
992
993 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
994 code.
995
f44697b7
RB
9962018-11-30 Richard Biener <rguenther@suse.de>
997
998 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
999 _Literal (type) { ... } as empty aggregate or vector constructor.
1000
550dfbdc
MS
10012018-11-29 Martin Sebor <msebor@redhat.com>
1002
1003 PR c/88091
1004 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1005 (convert_arguments): Add comments. Pass additional argument to
1006 the function above.
1007
673670da
MS
10082018-11-29 Martin Sebor <msebor@redhat.com>
1009
1010 PR c/88172
1011 PR testsuite/88208
1012 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1013
db1d09b0
MS
10142018-11-23 Martin Sebor <msebor@redhat.com>
1015
1016 PR testsuite/88098
1017 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1018 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1019
98f08eb8
MS
10202018-11-20 Martin Sebor <msebor@redhat.com>
1021
1022 * c-parser.c (c_parser_has_attribute_expression): New function.
1023 (c_parser_attribute): New function.
1024 (c_parser_attributes): Move code into c_parser_attribute.
1025 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1026
cd5da983
MS
10272018-11-15 Martin Sebor <msebor@redhat.com>
1028
1029 PR c/83656
1030 * c-decl.c (header_for_builtin_fn): Declare.
1031 (diagnose_mismatched_decls): Diagnose declarations of built-in
1032 functions without a prototype.
1033 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1034 (convert_argument): Same.
1035 (convert_arguments): Factor code out into convert_argument.
1036 Detect mismatches between built-in formal arguments in calls
1037 to built-in without prototype.
1038 (build_conditional_expr): Same.
1039 (type_or_builtin_type): New function.
1040 (convert_for_assignment): Add argument. Conditionally issue
1041 warnings instead of errors for mismatches.
1042
620e594b
DM
10432018-11-13 David Malcolm <dmalcolm@redhat.com>
1044
1045 * c-decl.c: Replace "source_location" with "location_t".
1046 * c-tree.h: Likewise.
1047 * c-typeck.c: Likewise.
1048 * gimple-parser.c: Likewise.
1049
3179ebae
JJ
10502018-11-09 Jakub Jelinek <jakub@redhat.com>
1051
81a227c6
JJ
1052 * c-parser.c (c_parser_omp_clause_final): Use
1053 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1054 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1055 parsing instead of c_parser_paren_condition.
1056 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1057 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1058 c_fully_fold instead of c_parser_condition.
1059 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1060 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1061 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1062 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1063 c_parser_expr_no_commas instead of c_parser_expression.
1064
98c91c56
JJ
1065 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1066 reduction clause with inscan modifier.
1067
3179ebae
JJ
1068 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1069 clauses other than atomic_default_mem_order.
1070
28567c40
JJ
10712018-11-08 Jakub Jelinek <jakub@redhat.com>
1072
1073 * c-parser.c: Include memmode.h.
1074 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1075 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1076 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1077 task_reduction clauses.
1078 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1079 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1080 section, or lvalue assignment expression.
1081 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1082 (c_parser_omp_clause_lastprivate): Parse optional
1083 conditional: modifier.
1084 (c_parser_omp_clause_hint): Require constant integer expression rather
1085 than just integer expression.
1086 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1087 clause.
1088 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1089 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1090 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1091 functions.
1092 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1093 iterators. Parse mutexinoutset and depobj kinds.
1094 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1095 callers.
1096 (c_parser_omp_all_clauses): Likewise. Handle
1097 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1098 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1099 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1100 default memory order from requires directive if any. Adjust
1101 c_finish_omp_atomic caller.
1102 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1103 (c_parser_omp_flush): Parse flush with memory-order-clause.
1104 (c_parser_omp_for_loop): Allow NE_EXPR even in
1105 OpenMP loops, adjust c_finish_omp_for caller.
1106 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1107 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1108 Allow to be called while parsing combined parallel master.
1109 Parse combined master taskloop{, simd}.
1110 (c_parser_omp_parallel): Parse combined
1111 parallel master{, taskloop{, simd}} constructs.
1112 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1113 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1114 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1115 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1116 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1117 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1118 around teams body. Use SET_EXPR_LOCATION.
1119 (c_parser_omp_target_data): Allow target data
1120 with only use_device_ptr clauses.
1121 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1122 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1123 (c_parser_omp_requires): New function.
1124 (c_finish_taskloop_clauses): New function.
1125 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1126 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1127 declaration. Disallow in_reduction clause when combined with parallel
1128 master.
1129 (c_parser_omp_construct): Adjust c_parser_omp_master and
1130 c_parser_omp_taskgroup callers.
1131 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1132 other than cancel.
1133 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1134 like OMP_CLAUSE_REDUCTION.
1135 (handle_omp_array_sections): Likewise. Call save_expr on array
1136 reductions before calling build_index_type. Handle depend clauses
1137 with iterators.
1138 (struct c_find_omp_var_s): New type.
1139 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1140 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1141 with static, runtime or auto schedule kinds. Call save_expr for whole
1142 array reduction sizes. Diagnose reductions with zero sized elements
1143 or variable length structures. Diagnose nogroup clause used with
1144 reduction clause(s). Handle depend clause with
1145 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1146 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1147 some different type for other kinds. Use build_unary_op with
1148 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1149 Handle depend clauses with iterators. Remove no longer needed special
1150 case that predetermined const qualified vars may be specified in
1151 firstprivate clause. Complain if const qualified vars are mentioned
1152 in data-sharing clauses other than firstprivate or shared. Use
1153 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1154 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1155 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1156 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1157
7e2de6df
DM
11582018-10-29 David Malcolm <dmalcolm@redhat.com>
1159
1160 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1161 logic for change to name_hint::operator bool.
1162 (undeclared_variable): Likewise.
1163 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1164 (c_parser_parameter_declaration): Likewise.
1165
9f936c86
JM
11662018-10-17 Joseph Myers <joseph@codesourcery.com>
1167
1168 * c-errors.c (pedwarn_c11): New function.
1169 * c-parser.c (disable_extension_diagnostics): Save
1170 warn_c11_c2x_compat and set it to 0.
1171 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1172 (c_parser_static_assert_declaration_no_semi): Handle
1173 _Static_assert without string constant.
1174 * c-tree.h (pedwarn_c11): New prototype.
1175
033eb567
DM
11762018-10-17 David Malcolm <dmalcolm@redhat.com>
1177
1178 * Make-lang.in (selftest-c): New.
1179 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1180 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1181 from gcc/Makefile.in.
1182
0edf3afe
RB
11832018-10-02 Richard Biener <rguenther@suse.de>
1184
1185 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1186
8313a764
JM
11872018-09-26 Joseph Myers <joseph@codesourcery.com>
1188
1189 PR c/87390
1190 * c-typeck.c (build_binary_op): Use excess precision for
1191 comparisons of integers and floating-point for C11 and later.
1192
ce6f0888
MJ
11932018-09-26 Martin Jambor <mjambor@suse.cz>
1194
1195 PR c/87347
1196 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1197 comment.
ce6f0888 1198
9c4a4b3c
DM
11992018-09-17 David Malcolm <dmalcolm@redhat.com>
1200
1201 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1202 Update for new param.
1203 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1204 Likewise.
1205
80c6d1f4
MJ
12062018-09-17 Martin Jambor <mjambor@suse.cz>
1207
1208 PR c/63886
1209 * c-parser.c: (warn_for_abs): New function.
1210 (c_parser_postfix_expression_after_primary): Call it.
1211
4a426e36
BE
12122018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1213
1214 * c-typeck.c (digest_init): Shorten overlength strings.
1215
6d900107
BE
12162018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1217
1218 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1219
b5764229
BE
12202018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1221
1222 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1223 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1224
22eea6b2
AM
12252018-08-30 Alexander Monakov <amonakov@ispras.ru>
1226
1227 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1228 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1229
85204e23
DM
12302018-08-27 David Malcolm <dmalcolm@redhat.com>
1231
1232 PR 87091
1233 * c-decl.c (implicitly_declare): Update call to
1234 maybe_add_include_fixit to suggest overriding the location, as it
1235 is for a note.
1236 * c-objc-common.c (c_tree_printer): Update for conversion of
1237 show_caret_p to a tri-state.
1238
3d78e008
ML
12392018-08-27 Martin Liska <mliska@suse.cz>
1240
1241 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1242 fndecl_built_in_p and remove check for FUNCTION_DECL if
1243 possible.
3d78e008
ML
1244 (diagnose_mismatched_decls): Likewise.
1245 (merge_decls): Likewise.
1246 (warn_if_shadowing): Likewise.
1247 (pushdecl): Likewise.
1248 (implicitly_declare): Likewise.
1249 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1250 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1251 * c-typeck.c (build_function_call_vec): Likewise.
1252 (convert_arguments): Likewise.
1253
097f82ec
DM
12542018-08-20 David Malcolm <dmalcolm@redhat.com>
1255
1256 PR other/84889
1257 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1258 (diagnose_mismatched_decls): Likewise, in various places.
1259 (warn_if_shadowing): Likewise.
1260 (implicit_decl_warning): Likewise.
1261 (implicitly_declare): Likewise.
1262 (undeclared_variable): Likewise.
1263 (declare_label): Likewise.
1264 (grokdeclarator): Likewise.
1265 (start_function): Likewise.
1266 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1267 (c_parser_parameter_declaration): Likewise.
1268 (c_parser_binary_expression): Likewise.
1269 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1270 (parser_build_binary_op): Likewise.
1271 (build_unary_op): Likewise.
1272 (error_init): Likewise.
1273 (pedwarn_init): Likewise.
1274 (warning_init): Likewise.
1275 (convert_for_assignment): Likewise.
1276
96e6ae57
DM
12772018-08-15 David Malcolm <dmalcolm@redhat.com>
1278
1279 * c-objc-common.c: Include "gcc-rich-location.h".
1280 (c_tree_printer): Move implemenation of '%T' to...
1281 (print_type): ...this new function.
1282 (range_label_for_type_mismatch::get_text): New function.
1283 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1284 range for the various ic_argpass cases.
1285 (class maybe_range_label_for_tree_type_mismatch): New class.
1286 (build_binary_op): Use it when calling binary_op_error.
1287
0cd020ae 12882018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1289
0cd020ae
PK
1290 * c-decl.c (start_decl): Do not warn if variables is named as main
1291 and is a local variable.
1292
72733314
IS
12932018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1294
1295 PR c/19315
1296 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1297 objects of unknown size.
1298
23aa9f7c
MS
12992018-08-13 Martin Sebor <msebor@redhat.com>
1300
1301 PR tree-optimization/71625
1302 * c-parser.c (c_parser_declaration_or_fndef): Call
1303 braced_list_to_string.
1304
e5e7e50d
BH
13052018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1306
1307 PR c/86690
1308 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1309 errors.
1310
8a45b051
MS
13112018-08-01 Martin Sebor <msebor@redhat.com>
1312
1313 PR tree-optimization/86650
1314 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1315 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1316
5922dcb5
JJ
13172018-08-01 Jakub Jelinek <jakub@redhat.com>
1318
1319 PR c/85704
1320 * c-typeck.c (init_field_decl_cmp): New function.
1321 (output_pending_init_elements): Use it for field comparisons
1322 instead of pure bit_position comparisons.
1323
9b452033
JJ
13242018-07-12 Jakub Jelinek <jakub@redhat.com>
1325
1326 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1327 type here, instead add "omp declare target implicit" attribute.
1328 (finish_decl): Diagnose vars without mappable type here.
1329
ab20d992
JJ
13302018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1331 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1332 Cesar Philippidis <cesar@codesourcery.com>
1333
1334 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1335 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1336 to their non-present_or_* counterparts. Make 'self' an alias to
1337 PRAGMA_OACC_CLAUSE_HOST.
1338 (c_parser_oacc_data_clause): Update GOMP mappings for
1339 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1340 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1341 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1342 Remove support for present_or_* clauses.
1343 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1344 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1345 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1346 (OACC_DATA_CLAUSE_MASK): Likewise.
1347 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1348 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1349 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1350 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1351 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1352
e197e64e
KV
13532018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1354
1355 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1356 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1357 (c_parser_gimple_unary_expression): Likewise.
1358
487f2f61
JJ
13592018-06-15 Jakub Jelinek <jakub@redhat.com>
1360
1361 PR c/86093
1362 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1363 before doing POINTER_DIFF_EXPR.
1364
e4d44a37
MP
13652018-06-07 Marek Polacek <polacek@redhat.com>
1366
1367 PR c/85318
1368 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1369 for loop initial declarations.
1370
b67b9225
DP
13712018-05-30 David Pagan <dave.pagan@oracle.com>
1372
1373 PR c/55976
1374 * c-decl.c (grokdeclarator): Update check for return type warnings.
1375 (start_function): Likewise.
1376 (finish_function): Likewise.
1377 * c-typeck.c (c_finish_return): Update check for return type warnings.
1378 Pass OPT_Wreturn_type to pedwarn when appropriate.
1379
c566cc9f
RS
13802018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1381
1382 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1383 __FMA_EXPR handlng.
1384
e4f81565
RS
13852018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1386
1387 * gimple-parser.c: Include internal-fn.h.
1388 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1389 (c_parser_gimple_call_internal): New function.
1390 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1391 Fix typos in comment.
1392
79e7b1fe
JJ
13932018-05-10 Jakub Jelinek <jakub@redhat.com>
1394
1395 PR c++/85662
1396 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1397 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1398 fold_convert_loc.
1399 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1400 fold_offsetof_1, pass argtype as TYPE to it and drop the
1401 fold_convert_loc.
1402
f7584c81
DP
14032018-05-02 David Pagan <dave.pagan@oracle.com>
1404
1405 PR c/30552
1406 * c-decl.c (old_style_parameter_scope): New function.
1407 * c-parser.c (c_parser_postfix_expression): Check for statement
1408 expressions in old-style function parameter list declarations.
1409 * c-parser.h (old_style_parameter_scope): New extern declaration.
1410
b33a0cb3
JJ
14112018-04-25 Jakub Jelinek <jakub@redhat.com>
1412
1413 PR sanitizer/84307
1414 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1415 it is not TREE_STATIC.
1416 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1417 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1418 its COMPOUND_LITERAL_EXPR_DECL.
1419
c5c5822a
JM
14202018-03-21 Joseph Myers <joseph@codesourcery.com>
1421
1422 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1423 where all functions return the same _FloatN or _FloatNx type,
1424 treat integer types as _Float64 instead of double.
1425
aa1c9429
JJ
14262018-03-21 Jakub Jelinek <jakub@redhat.com>
1427
1428 PR c/84999
1429 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1430 building vector comparison, diagnose it and return error_mark_node.
1431
9bb45a95
JJ
14322018-03-15 Jakub Jelinek <jakub@redhat.com>
1433
1434 PR c/84853
1435 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1436 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1437 INTEGER_TYPE element type.
1438
ada6bad9
DP
14392018-03-13 David Pagan <dave.pagan@oracle.com>
1440
1441 PR c/46921
1442 * c-typeck.c (output_init_element): Ensure field initializer
1443 expression is always evaluated if there are side effects.
1444
849bbdb9
JJ
14452018-03-06 Jakub Jelinek <jakub@redhat.com>
1446
1447 PR c/84721
1448 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1449 !building_stmt_list_p ().
1450
d74641bd
RS
14512018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1452
1453 PR c/84305
1454 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1455 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1456 and include the BIND_EXPR in the list of things that need to be
1457 pre-evaluated.
1458
0444aa9c
NS
14592018-02-09 Nathan Sidwell <nathan@acm.org>
1460
1461 PR c/84293
1462 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1463 to strict_aliasing_warning.
1464
7c30b12a
PC
14652018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1466
1467 * c-typeck.c (really_start_incremental_init, push_init_level,
1468 set_nonincremental_init, output_init_element, process_init_element):
1469 Use DECL_UNNAMED_BIT_FIELD.
1470
2be4dfcb
MP
14712018-01-31 Marek Polacek <polacek@redhat.com>
1472
1473 PR c/81779
1474 * c-parser.c (c_parser_compound_statement_nostart): Call
1475 expansion_point_location_if_in_system_header.
1476
bb9869d5
DM
14772018-01-17 David Malcolm <dmalcolm@redhat.com>
1478
1479 PR c++/83814
1480 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1481 the C part.
1482
b4923738
JJ
14832018-01-13 Jakub Jelinek <jakub@redhat.com>
1484
1485 PR c/83801
1486 * c-tree.h (decl_constant_value_1): Add a bool argument.
1487 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1488 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1489 (decl_constant_value): Adjust caller.
1490 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1491 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1492 decl_constant_value returns initializer that has BLKmode or
1493 array type.
1494 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1495
928686b1
RS
14962018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1497 Alan Hayward <alan.hayward@arm.com>
1498 David Sherwood <david.sherwood@arm.com>
1499
1500 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1501 TYPE_VECTOR_SUBPARTS.
1502
85ec4feb
JJ
15032018-01-03 Jakub Jelinek <jakub@redhat.com>
1504
1505 Update copyright years.
1506
913884f7
JJ
15072018-01-01 Jakub Jelinek <jakub@redhat.com>
1508
1509 PR c/83595
1510 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1511 c_parser_conditional_expression, c_parser_cast_expression,
1512 c_parser_sizeof_expression, c_parser_alignof_expression,
1513 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1514 c_parser_transaction_expression): Use set_error () method instead
1515 of setting value member to error_mark_node.
1516
c6cfa2bf
MM
15172017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1518
1519 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1520 and _Float<N>X built-in functions.
1521
11d29d63
JJ
15222017-12-22 Jakub Jelinek <jakub@redhat.com>
1523
14ec014e
JJ
1524 PR debug/83550
1525 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1526 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1527 incomplete vars rather than after it.
1528
11d29d63
JJ
1529 PR debug/83547
1530 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1531 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1532 and consider empty ones if there are no other stmts. For
1533 -Wunused-value walk all statements before the one only followed by
1534 DEBUG_BEGIN_STMTs.
1535
170a8bd6 15362017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1537 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1538
1539 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1540 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1541 (c_parser_do_statement): Likewise.
1542 (c_parser_for_statement): Likewise.
1543 (c_parser_statement_after_labels): Adjust calls to above.
1544 (c_parse_pragma_ivdep): New static function.
1545 (c_parser_pragma_unroll): Likewise.
1546 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1547 <PRAGMA_UNROLL>: New case.
1548
01512446
JJ
15492017-12-19 Jakub Jelinek <jakub@redhat.com>
1550
1551 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1552 perform_integral_promotions, digest_init): Replace Yoda conditions
1553 with typical order conditions.
1554 * c-decl.c (check_bitfield_type_and_width): Likewise.
1555
c65e18d3
BE
15562017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1557
1558 * c-typeck.c (c_safe_arg_type_equiv_p,
1559 c_safe_function_type_cast_p): New function.
1560 (build_c_cast): Implement -Wcast-function-type.
1561
b7280579
RB
15622017-12-14 Richard Biener <rguenther@suse.de>
1563
1564 PR c/83415
1565 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1566 like REALPART_EXPR for the behavior of whether its operand
1567 is an lvalue.
1568
49e6a6c0
MP
15692017-12-12 Marek Polacek <polacek@redhat.com>
1570
1571 PR c/82679
1572 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1573
ab20d992 15742017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1575
1576 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1577 * c-parser.c (add_debug_begin_stmt): New.
1578 (c_parser_declaration_or_fndef): Call it.
1579 (c_parser_compound_statement_nostart): Likewise.
1580 (c_parser_statement_after_labels): Likewise.
1581 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1582
4b2b493f
JM
15832017-12-07 Joseph Myers <joseph@codesourcery.com>
1584
1585 * c-decl.c (build_compound_literal): Add parameter alignas_align
1586 and set alignment of decl if nonzero.
1587 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1588 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1589 qualifier.
1590 (c_parser_struct_declaration): Update syntax comment.
1591 (c_parser_type_name): Add alignas_ok argument and pass it to
1592 c_parser_declspecs.
1593 (c_parser_cast_expression): Pass true to c_parser_type_name and
1594 give error if a cast used an _Alignas specifier.
1595 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1596 give error if sizeof (type-name) used an _Alignas specifier.
1597 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1598 give error if _Alignof (type-name) used an _Alignas specifier.
1599 (c_parser_postfix_expression_after_paren_type): Check specified
1600 alignment for a compound literal and pass it to
1601 build_compound_literal.
1602 * c-parser.h (c_parser_type_name): Update prototype.
1603 * c-tree.h (build_compound_literal): Update prototype.
1604
5d9ae53d
MS
16052017-12-07 Martin Sebor <msebor@redhat.com>
1606
1607 PR c/81544
1608 * c-decl.c (c_decl_attributes): Look up existing declaration and
1609 pass it to decl_attributes.
1610
c79144f8
DM
16112017-12-06 David Malcolm <dmalcolm@redhat.com>
1612
1613 PR c/83236
1614 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1615 reserved for use by the implementation.
1616
613bc14f
DM
16172017-12-06 David Malcolm <dmalcolm@redhat.com>
1618
1619 * c-decl.c: Include "c-family/c-spellcheck.h".
1620
05abad4c
ML
16212017-12-05 Martin Liska <mliska@suse.cz>
1622 Jakub Jelinek <jakub@redhat.com>
1623
1624 * c-typeck.c (pointer_diff): Add new argument and instrument
1625 pointer subtraction.
1626 (build_binary_op): Similar for pointer comparison.
1627
cc6534d4
JJ
16282017-12-01 Jakub Jelinek <jakub@redhat.com>
1629
65791f42
JJ
1630 PR c/79153
1631 * c-parser.c: Include tree-iterator.h.
1632 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1633 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1634 on it.
1635
cc6534d4
JJ
1636 PR c/83222
1637 * c-tree.h (decl_constant_value_1): Declare.
1638 * c-typeck.c (decl_constant_value_1): New function.
1639 (decl_constant_value): Use it.
1640 * c-fold.c (c_fully_fold_internal): If in_init, use
1641 decl_constant_value_1 instead of decl_constant_value.
1642
5de73c05
JJ
16432017-11-30 Jakub Jelinek <jakub@redhat.com>
1644
1645 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1646
058f0b9e
JJ
16472017-11-28 Jakub Jelinek <jakub@redhat.com>
1648
1649 PR sanitizer/81275
1650 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1651 c_switch_covers_all_cases_p returns true.
1652
5e9d6aa4 16532017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1654 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1655
1656 * Make-lang.in (c/c-array-notation.o): Remove.
1657 * c-array-notation.c: Delete.
1658 * c-decl.c: Remove cilkplus condition.
1659 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1660 c_parser_cilk_verify_simd, c_parser_array_notation,
1661 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1662 c_parser_cilk_simd_fn_vector_attrs,
1663 c_finish_cilk_simd_fn_tokens): Delete.
1664 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1665 (c_parser_direct_declarator_inner): Ditto.
1666 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1667 (c_parser_attributes, c_parser_compound_statement,
1668 c_parser_statement_after_labels, c_parser_if_statement,
1669 c_parser_switch_statement, c_parser_while_statement,
1670 c_parser_do_statement, c_parser_for_statement,
1671 c_parser_unary_expression, c_parser_postfix_expression,
1672 c_parser_postfix_expression_after_primary,
1673 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1674 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1675 support.
1676 * c-typeck.c (build_array_ref, build_function_call_vec,
1677 convert_arguments,
1678 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1679 c_finish_loop, build_binary_op): Remove cilkplus support.
1680
9e851845
JJ
16812017-11-28 Jakub Jelinek <jakub@redhat.com>
1682
1683 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1684 of build3.
1685
ab20d992 16862017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
1687
1688 * Make-lang.in (c.install-plugin): Install backend import library.
1689
41521dee
JJ
16902017-11-23 Jakub Jelinek <jakub@redhat.com>
1691
1692 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1693 pragma_stmt context.
1694
ac9effed
EB
16952017-11-23 Mike Stump <mikestump@comcast.net>
1696 Eric Botcazou <ebotcazou@adacore.com>
1697
1698 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1699 ANNOTATE_EXPR.
1700 (c_parser_do_statement): Likewise.
1701 (c_parser_for_statement): Likewise.
1702
ce95abc4
DM
17032017-11-22 David Malcolm <dmalcolm@redhat.com>
1704
1705 PR c++/62170
1706 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1707 bool to bool *. Within '%T' handling, if showing an "aka", use
1708 "quoted" param to add appropriate quoting.
1709
974aedcc
MP
17102017-11-22 Marek Polacek <polacek@redhat.com>
1711
1712 PR c++/60336
1713 PR middle-end/67239
1714 PR target/68355
1715 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1716
d4300cc6
DM
17172017-11-21 David Malcolm <dmalcolm@redhat.com>
1718
1719 PR c/83056
1720 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1721 earlier failed lookups.
1722
1af4ebf5
MG
17232017-11-21 Marc Glisse <marc.glisse@inria.fr>
1724
1725 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1726 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1727
26edace6
DM
17282017-11-20 David Malcolm <dmalcolm@redhat.com>
1729
1730 PR c/81404
1731 * c-decl.c: Include "c-family/known-headers.h".
1732 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1733 to known-headers.cc.
1734 (class suggest_missing_header): Move to known-header.h.
1735 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1736 than get_c_name_hint.
1737
b1212255
DM
17382017-11-20 David Malcolm <dmalcolm@redhat.com>
1739
1740 * c-decl.c (get_c_name_hint): New function.
1741 (class suggest_missing_header): New class.
1742 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1743 suggest missing headers to the user.
1744
6c7a259b
DM
17452017-11-20 David Malcolm <dmalcolm@redhat.com>
1746
1747 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1748 Include "c-family/name-hint.h"
1749 (implicit_decl_warning): Convert "hint" from
1750 const char * to name_hint. Pass location to
1751 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1752 warning was not printed.
1753 (undeclared_variable): Likewise for "guessed_id".
1754 (lookup_name_fuzzy): Convert return type from const char *
1755 to name_hint. Add location_t param.
1756 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1757 Include "c-family/name-hint.h"
1758 (c_parser_declaration_or_fndef): Convert "hint" from
1759 const char * to name_hint. Pass location to lookup_name_fuzzy.
1760 (c_parser_parameter_declaration): Likewise.
1761
f9c59f7e
JJ
17622017-11-19 Jakub Jelinek <jakub@redhat.com>
1763
1764 PR c/66618
1765 PR c/69960
1766 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1767 where needed.
1768 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1769 handle_omp_array_sections): Likewise.
1770 (digest_init): Don't call decl_constant_value_for_optimization.
1771 * c-tree.h (decl_constant_value_for_optimization): Removed.
1772 * c-fold.c (c_fold_array_ref): New function.
1773 (c_fully_fold_internal): Add LVAL argument, propagate it through
1774 recursive calls. For VAR_P call decl_constant_value and
1775 unshare if not LVAL and either optimizing or IN_INIT. Remove
1776 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1777 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1778 (c_fully_fold): Add LVAL argument, pass it through to
1779 c_fully_fold_internal.
1780 (decl_constant_value_for_optimization): Removed.
1781
3ca0dc60
JM
17822017-11-15 Joseph Myers <joseph@codesourcery.com>
1783
1784 PR c/81156
1785 * c-parser.c (check_tgmath_function): New function.
1786 (enum tgmath_parm_kind): New enum.
1787 (c_parser_postfix_expression): Handle __builtin_tgmath.
1788
64a5912c
DM
17892017-10-31 David Malcolm <dmalcolm@redhat.com>
1790
1791 * c-decl.c (implicit_decl_warning): Update for renaming of
1792 pedwarn_at_rich_loc and warning_at_rich_loc.
1793 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1794 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1795 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1796 (c_parser_struct_or_union_specifier): Likewise for renaming of
1797 pedwarn_at_rich_loc.
1798 (c_parser_parameter_declaration): Likewise for renaming of
1799 error_at_rich_loc.
1800 * c-typeck.c (build_component_ref): Likewise.
1801 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1802 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1803 (set_init_label): Likewise for renaming of error_at_rich_loc.
1804
c1136864
RB
18052017-10-30 Richard Biener <rguenther@suse.de>
1806
1807 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1808 stmts.
1809
ee5fd23a
MM
18102017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1811
1812 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1813 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1814
1a59ccf2
DM
18152017-10-25 David Malcolm <dmalcolm@redhat.com>
1816
1817 PR c/7356
1818 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1819 semicolons.
1820
bc1a75dd
JJ
18212017-10-25 Jakub Jelinek <jakub@redhat.com>
1822
1823 PR libstdc++/81706
1824 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1825 newdecl to corresponding __builtin_ if any.
1826
ff1ff960
PC
18272017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1828
1829 PR c++/82466
1830 * c-decl.c (diagnose_mismatched_decls): Use
1831 OPT_Wbuiltin_declaration_mismatch.
1832
62e1c678
DM
18332017-10-12 David Malcolm <dmalcolm@redhat.com>
1834
1835 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1836 use it to guard calls to maybe_suggest_missing_token_insertion.
1837 (c_parser_parms_list_declarator): Override default value of new
1838 "type_is_unique" param to c_parser_require.
1839 (c_parser_asm_statement): Likewise.
1840 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1841 defaulting to true.
1842
a92f6726
NS
18432017-10-11 Nathan Sidwell <nathan@acm.org>
1844
1845 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1846
8e6cdc90
RS
18472017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1848
1849 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1850 operating on trees as wide_ints.
1851 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1852 (c_tree_equal): Likewise.
1853
8139a48e
DM
18542017-10-04 David Malcolm <dmalcolm@redhat.com>
1855
1856 * c-decl.c (push_parm_decl): Store c_parm's location into the
1857 PARAM_DECL.
1858 (build_c_parm): Add "loc" param and store it within the c_parm.
1859 * c-parser.c (struct c_parser): Add "last_token_location" field.
1860 (c_parser_consume_token): Store location of the token into the
1861 new field.
1862 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1863 when handling a FUNCTION_DECL, if it doesn't already have them.
1864 (c_parser_parameter_declaration): Generate a location for the
1865 parameter, and pass it to the call to build_c_parm.
1866 * c-tree.h (struct c_parm): Add field "loc".
1867 (build_c_parm): Add location_t param.
1868 * c-typeck.c (get_fndecl_argument_location): New function.
1869 (inform_for_arg): New function.
1870 (convert_for_assignment): Use inform_for_arg when dealing with
1871 ic_argpass.
1872
2a389958
JJ
18732017-09-29 Jakub Jelinek <jakub@redhat.com>
1874
7d386d45
JJ
1875 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1876 width is non-NULL.
1877 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1878 don't SET_DECL_C_BIT_FIELD here.
1879
2a389958
JJ
1880 PR c/82340
1881 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1882 instead of trying to set just TREE_READONLY manually.
1883
ebc6a85e
TV
18842017-09-16 Tom de Vries <tom@codesourcery.com>
1885
1886 PR c/81875
1887 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1888 cond itself.
1889
bb75facd
JM
18902017-09-15 Joseph Myers <joseph@codesourcery.com>
1891
1892 PR c/82071
1893 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1894 for C11.
1895 (build_conditional_expr): For C11, generate result with excess
1896 precision when one argument is an integer and the other is of a
1897 type using excess precision.
1898
1d933576
BE
18992017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1900
1901 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1902
267bbb6f
MP
19032017-09-13 Marek Polacek <polacek@redhat.com>
1904
1905 PR c/82167
1906 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1907 than expr.original_type.
1908
6836632e
NS
19092017-09-12 Nathan Sidwell <nathan@acm.org>
1910
1911 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1912 resort_sorted_fields): Moved from c-family/c-common.c.
1913 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1914
e035be33
JM
19152017-09-01 Joseph Myers <joseph@codesourcery.com>
1916
1917 PR c/82071
1918 * c-typeck.c (build_atomic_assign): Handle argument with excess
1919 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1920 argument passed to build_binary_op and convert_for_assignment but
1921 not for call to c_fully_fold.
1922 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1923 Ensure build_binary_op is called with argument with original
1924 semantic type. Avoid calling c_fully_fold with an
1925 EXCESS_PRECISION_EXPR from build_binary_op.
1926
d2e05fcb
JJ
19272017-09-01 Jakub Jelinek <jakub@redhat.com>
1928
1929 PR c/81887
1930 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1931
b397965c
RS
19322017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1933 Alan Hayward <alan.hayward@arm.com>
1934 David Sherwood <david.sherwood@arm.com>
1935
1936 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
1937 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
1938 m1 and m2 to the signed equivalent of a fixed-point
1939 SCALAR_TYPE_MODE.
1940
14e18d71
DM
19412017-08-24 David Malcolm <dmalcolm@redhat.com>
1942
1943 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
1944 than CAN_HAVE_LOCATION_P when determining whether to use the
1945 location_t value within "value".
1946
7f204c0f
DM
19472017-08-21 David Malcolm <dmalcolm@redhat.com>
1948
1949 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
1950 rather than peeking the location of the first token.
1951 * c-tree.h (c_expr::get_location): New method.
1952
2f687306
DM
19532017-08-21 David Malcolm <dmalcolm@redhat.com>
1954
1955 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
1956 to check_function_arguments.
1957
3e7b80d7
MP
19582017-08-18 Marek Polacek <polacek@redhat.com>
1959
1960 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
1961 commentary.
1962
00aa1fa2
L
19632017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1964
1965 PR c/53037
1966 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
1967 (check_bitfield_type_and_width): Don't allow bit-field with
1968 warn_if_not_aligned type.
1969
da67acb9
MS
19702017-08-14 Martin Sebor <msebor@redhat.com>
1971
1972 PR c/81117
1973 * c-objc-common.c (c_objc_common_init): Handle 'G'.
1974
bb85aa74
MP
19752017-08-11 Marek Polacek <polacek@redhat.com>
1976
1977 PR c/81795
1978 * c-decl.c (pushtag): Only print inform if the warning was printed.
1979 (grokdeclarator): Likewise.
1980
32129a17
DM
19812017-08-10 David Malcolm <dmalcolm@redhat.com>
1982
1983 * c-parser.c (c_parser_error): Rename to...
1984 (c_parser_error_richloc): ...this, making static, and adding
1985 "richloc" parameter, passing it to the c_parse_error call,
1986 rather than calling c_parser_set_source_position_from_token.
1987 (c_parser_error): Reintroduce, reimplementing in terms of the
1988 above, converting return type from void to bool.
1989 (class token_pair): New class.
1990 (struct matching_paren_traits): New struct.
1991 (matching_parens): New typedef.
1992 (struct matching_brace_traits): New struct.
1993 (matching_braces): New typedef.
1994 (get_matching_symbol): New function.
1995 (c_parser_require): Add param MATCHING_LOCATION, using it to
1996 highlight matching "opening" tokens for missing "closing" tokens.
1997 (c_parser_skip_until_found): Likewise.
1998 (c_parser_static_assert_declaration_no_semi): Convert explicit
1999 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2000 class matching_parens, so that the pertinent open parenthesis is
2001 highlighted when there are problems locating the close
2002 parenthesis.
2003 (c_parser_struct_or_union_specifier): Likewise.
2004 (c_parser_typeof_specifier): Likewise.
2005 (c_parser_alignas_specifier): Likewise.
2006 (c_parser_simple_asm_expr): Likewise.
2007 (c_parser_braced_init): Likewise, for matching_braces.
2008 (c_parser_paren_condition): Likewise, for matching_parens.
2009 (c_parser_switch_statement): Likewise.
2010 (c_parser_for_statement): Likewise.
2011 (c_parser_asm_statement): Likewise.
2012 (c_parser_asm_operands): Likewise.
2013 (c_parser_cast_expression): Likewise.
2014 (c_parser_sizeof_expression): Likewise.
2015 (c_parser_alignof_expression): Likewise.
2016 (c_parser_generic_selection): Likewise.
2017 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2018 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2019 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2020 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2021 c_parser_skip_until_found call.
2022 (c_parser_objc_class_definition): Use class matching_parens as
2023 above.
2024 (c_parser_objc_method_decl): Likewise.
2025 (c_parser_objc_try_catch_finally_statement): Likewise.
2026 (c_parser_objc_synchronized_statement): Likewise.
2027 (c_parser_objc_at_property_declaration): Likewise.
2028 (c_parser_oacc_wait_list): Likewise.
2029 (c_parser_omp_var_list_parens): Likewise.
2030 (c_parser_omp_clause_collapse): Likewise.
2031 (c_parser_omp_clause_default): Likewise.
2032 (c_parser_omp_clause_if): Likewise.
2033 (c_parser_omp_clause_num_threads): Likewise.
2034 (c_parser_omp_clause_num_tasks): Likewise.
2035 (c_parser_omp_clause_grainsize): Likewise.
2036 (c_parser_omp_clause_priority): Likewise.
2037 (c_parser_omp_clause_hint): Likewise.
2038 (c_parser_omp_clause_defaultmap): Likewise.
2039 (c_parser_oacc_single_int_clause): Likewise.
2040 (c_parser_omp_clause_ordered): Likewise.
2041 (c_parser_omp_clause_reduction): Likewise.
2042 (c_parser_omp_clause_schedule): Likewise.
2043 (c_parser_omp_clause_num_teams): Likewise.
2044 (c_parser_omp_clause_thread_limit): Likewise.
2045 (c_parser_omp_clause_aligned): Likewise.
2046 (c_parser_omp_clause_linear): Likewise.
2047 (c_parser_omp_clause_safelen): Likewise.
2048 (c_parser_omp_clause_simdlen): Likewise.
2049 (c_parser_omp_clause_depend): Likewise.
2050 (c_parser_omp_clause_map): Likewise.
2051 (c_parser_omp_clause_device): Likewise.
2052 (c_parser_omp_clause_dist_schedule): Likewise.
2053 (c_parser_omp_clause_proc_bind): Likewise.
2054 (c_parser_omp_clause_uniform): Likewise.
2055 (c_parser_omp_for_loop): Likewise.
2056 (c_parser_cilk_clause_vectorlength): Likewise.
2057 (c_parser_cilk_clause_linear): Likewise.
2058 (c_parser_transaction_expression): Likewise.
2059 * c-parser.h (c_parser_require): Add param matching_location with
2060 default UNKNOWN_LOCATION.
2061 (c_parser_error): Convert return type from void to bool.
2062 (c_parser_skip_until_found): Add param matching_location with
2063 default UNKNOWN_LOCATION.
2064
30af3a2b
MP
20652017-08-09 Marek Polacek <polacek@redhat.com>
2066
2067 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2068 * c-tree.h (build_external_ref): Update declaration.
2069 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2070 (build_external_ref): Change the type of a parameter to bool.
2071 (parser_build_binary_op): Use true/false instead of 1/0.
2072 (pointer_diff): Likewise.
2073 (build_modify_expr): Likewise.
2074 (set_designator): Change the type of a parameter to bool.
2075 (set_init_index): Use true/false instead of 1/0.
2076 (set_init_label): Likewise.
2077 (output_init_element): Change the type of a parameter to bool.
2078 (output_pending_init_elements): Use true/false instead of 1/0.
2079 (process_init_element): Likewise.
2080 (build_binary_op): Change the type of a parameter to bool.
2081
296c53ac
MP
20822017-08-09 Marek Polacek <polacek@redhat.com>
2083
2084 PR c/81233
2085 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2086 Call emit_diagnostic_valist instead of pedwarn.
2087 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2088 Print the relevant types in diagnostics.
2089
a32c8316
MP
20902017-08-09 Marek Polacek <polacek@redhat.com>
2091
2092 PR c/81417
2093 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2094 build_conditional_expr.
a32c8316
MP
2095 * c-parser.c (c_parser_conditional_expression): Create locations for
2096 EXP1 and EXP2 from their source ranges. Pass the locations down to
2097 build_conditional_expr.
2098 * c-tree.h (build_conditional_expr): Update declaration.
2099 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2100 For -Wsign-compare, also print the types.
2101
314e6352
ML
21022017-08-08 Martin Liska <mliska@suse.cz>
2103
2104 * c-convert.c: Include header files.
2105 * c-typeck.c: Likewise.
2106
577eec56
ML
21072017-08-07 Martin Liska <mliska@suse.cz>
2108
2109 * c-parser.c (c_parser_attributes): Canonicalize name of an
2110 attribute.
2111
f7b6353a
MP
21122017-08-02 Marek Polacek <polacek@redhat.com>
2113
2114 PR c/81289
2115 * c-parser.c (c_parser_unary_expression): Use set_error.
2116
8a6eab34
MP
2117 PR c/81448
2118 PR c/81306
2119 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2120 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2121
ab20d992 21222017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2123 Martin Liska <mliska@suse.cz>
2124
2125 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2126 statement.
7fef86d3 2127
f34ebeb2
ML
21282017-07-31 Martin Liska <mliska@suse.cz>
2129
2130 PR sanitize/81530
2131 * c-convert.c (convert): Guard condition with flag_sanitize_p
2132 also with current_function_decl non-null equality.
2133 * c-decl.c (grokdeclarator): Likewise.
2134 * c-typeck.c (build_binary_op): Likewise.
2135
8595f67b
MP
21362017-07-25 Marek Polacek <polacek@redhat.com>
2137
2138 * c-decl.c (grokfield): Remove local variable.
2139
d49718d6
MP
21402017-07-25 Marek Polacek <polacek@redhat.com>
2141
2142 PR c/81364
2143 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2144 macro expansion if the body is in { }.
2145 (c_parser_while_statement): Likewise.
2146 (c_parser_for_statement): Likewise.
2147
ff22eb12
NS
21482017-07-18 Nathan Sidwell <nathan@acm.org>
2149
2150 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2151
eea77d1f
DM
21522017-07-14 David Malcolm <dmalcolm@redhat.com>
2153
2154 * c-decl.c (implicitly_declare): When suggesting a missing
2155 #include, provide a fix-it hint.
2156
b6f43128
DM
21572017-07-06 David Malcolm <dmalcolm@redhat.com>
2158
2159 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2160 and call that instead.
2161 * c-tree.h (selftest::run_c_tests): New decl.
2162
3e2becc4
MP
21632017-06-26 Marek Polacek <polacek@redhat.com>
2164
2165 PR c/80116
2166 * c-parser.c (c_parser_if_body): Set the location of the
2167 body of the conditional after parsing all the labels. Call
2168 warn_for_multistatement_macros.
2169 (c_parser_else_body): Likewise.
2170 (c_parser_switch_statement): Likewise.
2171 (c_parser_while_statement): Likewise.
2172 (c_parser_for_statement): Likewise.
2173 (c_parser_statement): Add a default argument. Save the location
2174 after labels have been parsed.
2175 (c_parser_c99_block_statement): Likewise.
2176
343ae898
RB
21772017-06-19 Richard Biener <rguenther@suse.de>
2178
2179 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2180 negated _Literals to parse _Literal (int) -1.
2181
45b2222a
ML
21822017-06-13 Martin Liska <mliska@suse.cz>
2183
2184 PR sanitize/78204
2185 * c-convert.c (convert): Use sanitize_flags_p.
2186 * c-decl.c (grokdeclarator): Likewise.
2187 * c-typeck.c (convert_for_assignment): Likewise.
2188 (c_finish_return): Likewise.
2189 (build_binary_op): Likewise.
2190
8ab7005b
JJ
21912017-06-08 Jakub Jelinek <jakub@redhat.com>
2192
2193 PR c/81006
2194 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2195 to sizetype before size_binop.
2196
363dc72c
JJ
21972017-06-07 Jakub Jelinek <jakub@redhat.com>
2198
2199 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2200 of TDI_generic.
2201
dc949728
MP
22022017-06-06 Marek Polacek <polacek@redhat.com>
2203
2204 PR c/79983
2205 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2206 ref.
2207 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2208
40ffd95f
BE
22092017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2210
2211 * c-parser.c (c_parser_binary_expression): Implement the
2212 -Wsizeof_pointer_div warning.
2213 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2214 from a parenthesized expression.
2215 (c_parser_expr_list): Use c_last_sizeof_loc.
2216 * c-tree.h (c_last_sizeof_loc): New external.
2217 * c-typeck.c (c_last_sizeof_loc): New variable.
2218 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2219
9fc5e7a4
MM
22202017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2221
2222 PR testsuite/80580
2223 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2224
f012c8ef
DM
22252017-05-30 David Malcolm <dmalcolm@redhat.com>
2226
2227 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2228 parameters.
2229
3cd211af
MS
22302017-05-24 Martin Sebor <msebor@redhat.com>
2231
2232 PR c/80731
2233 * c-fold.c (c_fully_fold_internal): Adjust.
2234 * c-typeck.c (parser_build_unary_op): Adjust.
2235
fd71a9a2
TS
22362017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2237
2238 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2239 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2240 "VECTOR_LENGTH".
2241
92fa0f9e
MP
22422017-05-23 Marek Polacek <polacek@redhat.com>
2243
2244 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2245 quotes.
2246
d11c168a
JJ
22472017-05-22 Jakub Jelinek <jakub@redhat.com>
2248
2249 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2250 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2251 it returned invariant. Call tree_invariant_p unconditionally
2252 afterwards to decide whether to return expr or op0.
2253
58aca9d9
NS
22542017-05-22 Nathan Sidwell <nathan@acm.org>
2255
2256 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2257
7fd549d2
TS
22582017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2259
2260 * c-parser.c (c_parser_omp_clause_default): Handle
2261 "OMP_CLAUSE_DEFAULT_PRESENT".
2262
6ecd2339
BE
22632017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2264
2265 * config-lang.in (gtfiles): Add c-family/c-format.c.
2266
8a57ecff
NS
22672017-05-18 Nathan Sidwell <nathan@acm.org>
2268
2269 * c-decl.c (pushdecl_top_level): Delete unused function.
2270
6574d78e
MP
22712017-05-18 Marek Polacek <polacek@redhat.com>
2272
2273 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2274 (check_earlier_gotos): Likewise.
2275 (define_label): Likewise.
2276 (pending_xref_error): Likewise.
2277 (smallest_type_quals_location): Likewise.
2278 (grokdeclarator): Likewise.
2279 (grokparms): Likewise.
2280 (identifier_global_value): Likewise.
2281 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2282 (find_init_member): Likewise.
2283
e3455240
MP
22842017-05-18 Marek Polacek <polacek@redhat.com>
2285
2286 * c-decl.c (start_decl): Use false/true instead of 0/1.
2287 (grokdeclarator): Likewise.
2288 (finish_struct): Likewise.
2289 (start_function): Change the return type to bool. Use false/true
2290 instead of 0/1.
2291 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2292 * c-tree.h (start_function): Update.
2293 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2294 (set_designator): Change the return type to bool. Use false/true
2295 instead of 0/1.
2296
3fa8871b
MP
22972017-05-17 Marek Polacek <polacek@redhat.com>
2298
2299 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2300 * c-typeck.c: Likewise.
2301
142473df
MP
23022017-05-17 Marek Polacek <polacek@redhat.com>
2303
2304 PR sanitizer/80659
2305 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2306 DECL_IGNORED_P even for non-static compound literals.
2307
1a817418
ML
23082017-05-17 Martin Liska <mliska@suse.cz>
2309
2310 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2311 use it instead of int type.
2312
b2fa0a8b
MP
23132017-05-17 Marek Polacek <polacek@redhat.com>
2314
2315 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2316 call c_fully_fold.
2317 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2318 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2319 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2320 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2321 save_expr.
2322 (c_parser_conditional_expression): Likewise.
2323 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2324 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2325 (process_init_element): Likewise.
2326 (build_binary_op): Likewise.
2327 (handle_omp_array_sections_1): Likewise.
2328
1e47f02b
TS
23292017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2330
2331 * c-parser.c (c_parser_omp_clause_num_gangs)
2332 (c_parser_omp_clause_num_workers)
2333 (c_parser_omp_clause_vector_length): Merge functions into...
2334 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2335 all users.
2336
c24e924f
NS
23372017-05-11 Nathan Sidwell <nathan@acm.org>
2338
2339 * gimple-parser.c: Don't #include tree-dump.h.
2340
c587104e
MM
23412017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2342
2343 PR testsuite/80580
2344 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2345
67ac9a9d
MM
23462017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2347
2348 PR testsuite/80580
2349 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2350 incorrect __MEM syntax.
2351
ac4eb40f
MM
23522017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2353
2354 PR testsuite/80580
2355 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2356 type of unary '*'.
2357
641da50a
NS
23582017-05-09 Nathan Sidwell <nathan@acm.org>
2359
2360 * c-tree.h (pushdecl): Declare.
2361
56d35585
DM
23622017-05-05 David Malcolm <dmalcolm@redhat.com>
2363
2364 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2365 with diagnostic_report_diagnostic.
2366 * c-errors.c (pedwarn_c99): Likewise.
2367 (pedwarn_c90): Likewise.
2368
815d9cc6
XR
23692017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2370
92a285c1 2371 PR c++/80038
815d9cc6
XR
2372 * c-gimplify.c (c_gimplify_expr): Remove calls to
2373 cilk_gimplifY_call_params_in_spawned_fn.
2374
1c4ea66f
DM
23752017-04-25 David Malcolm <dmalcolm@redhat.com>
2376
2377 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2378 hint for removing extra semicolon.
2379
666f7903
JJ
23802017-04-21 Jakub Jelinek <jakub@redhat.com>
2381
2382 PR c/80468
2383 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2384 enabled, set specs->type to integer_type_node.
2385
5764ee3c
JW
23862017-04-03 Jonathan Wakely <jwakely@redhat.com>
2387
2388 * c-array-notation.c: Fix typo in comment.
2389
10fa8dfb
MP
23902017-03-29 Marek Polacek <polacek@redhat.com>
2391
2392 PR c/79730
2393 * c-decl.c (finish_decl): Check VAR_P.
2394
a9e4a1a5
JJ
23952017-03-27 Jakub Jelinek <jakub@redhat.com>
2396
2397 PR middle-end/80162
2398 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2399 * c-typeck.c (c_mark_addressable): Likewise. Look through
2400 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2401 to ARRAY_TYPE.
2402 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2403
ee3ff394
MP
24042017-03-23 Marek Polacek <polacek@redhat.com>
2405
2406 * c-tree.h: Remove a C_RID_YYCODE reference.
2407
4d1b8e70
JJ
24082017-03-21 Jakub Jelinek <jakub@redhat.com>
2409
2410 PR c/80097
2411 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2412 optional COMPOUND_EXPR with ubsan instrumentation.
2413
31dc71a8
MP
24142017-03-17 Marek Polacek <polacek@redhat.com>
2415
2416 * c-parser.c: Add C11 references.
2417
d579c385
MP
24182017-03-15 Marek Polacek <polacek@redhat.com>
2419
2420 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2421
85059a38
MP
24222017-03-11 Marek Polacek <polacek@redhat.com>
2423
2424 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2425
2f6f187a
DM
24262017-03-10 David Malcolm <dmalcolm@redhat.com>
2427
2428 PR translation/79848
2429 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2430 "%qs".
2431 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2432
36618428
MP
24332017-03-09 Marek Polacek <polacek@redhat.com>
2434
2435 PR sanitizer/79757
2436 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2437 parameter declarations with initializers.
2438
01e5af5a
JJ
24392017-03-09 Jakub Jelinek <jakub@redhat.com>
2440
2441 PR c/79969
2442 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2443 TYPE_STUB_DECL.
2444
a71dbc63
JJ
24452017-03-07 Jakub Jelinek <jakub@redhat.com>
2446
2447 PR c/79834
2448 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2449 for "may only be used in compound statements" diagnostics, change it
2450 such that the same translatable string is used for all pragmas. For
2451 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2452 diagnostics.
2453 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2454 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2455 "may only be used in compound statements" diagnostics, such that the
2456 same translatable string is used for all pragmas.
2457
1ff4bae6
MP
24582017-03-04 Marek Polacek <polacek@redhat.com>
2459
2460 PR c/79847
2461 * c-decl.c (implicit_decl_warning): Add missing space.
2462
7f5a7d78
MP
24632017-03-03 Marek Polacek <polacek@redhat.com>
2464
2465 PR c/79758
2466 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2467 current_function_prototype_arg_types is error_mark_node. Fix
2468 formatting. Use TREE_VALUE instead of TREE_TYPE.
2469
883c8f06
JJ
24702017-03-03 Jakub Jelinek <jakub@redhat.com>
2471
79c9b7a8
JJ
2472 PR c/79837
2473 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2474 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2475 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2476 diagnostics.
2477
883c8f06
JJ
2478 PR c/79836
2479 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2480 instead of %<_Generic>.
2481 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2482 (c_parser_omp_target_exit_data): Use %<release%> instead of
2483 %<release>.
2484
324ff1a0
JJ
24852017-02-28 Jakub Jelinek <jakub@redhat.com>
2486
2487 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2488 instead of just cond ? "..." : "...".
2489 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2490 for "enter"/"exit" keyword.
2491 (c_finish_oacc_routine): Don't use %s to supply portions of the
2492 message.
2493
4227c9ad
JJ
24942017-02-24 Jakub Jelinek <jakub@redhat.com>
2495
2496 PR c++/79588
2497 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2498 handle -Wrestrict here.
2499 * c-typeck.c (build_function_call_vec): Adjust
2500 check_function_arguments caller.
2501
5d972e66
RB
25022017-02-23 Richard Biener <rguenther@suse.de>
2503
2504 PR c/79684
2505 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2506 to initialize c_exprs to return.
2507 (c_parser_gimple_binary_expression): Likewise.
2508 (c_parser_gimple_unary_expression): Likewise.
2509 (c_parser_gimple_postfix_expression): Likewise.
2510
61ac5ebe
MP
25112017-02-22 Marek Polacek <polacek@redhat.com>
2512
2513 PR c/79662
2514 * c-typeck.c (convert_arguments): Handle error_mark_node.
2515
41d1b0b1
PK
25162017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2517
2518 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2519 value of c_parser_parse_ssa_name against error_mark_node and emit
2520 error if ssa name is anonymous and written as default definition.
2521
eab1f169
PK
25222017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2523
2524 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2525 FMA_EXPR.
2526
bcac0b4d
JJ
25272017-02-16 Jakub Jelinek <jakub@redhat.com>
2528
2529 PR c++/79512
2530 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2531 ignore #pragma omp target even when not followed by identifier.
2532
1be33173
PK
25332017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2534
2535 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2536 (c_parser_gimple_unary_expression): Likewise.
2537
aa326bfb
JJ
25382017-02-13 Jakub Jelinek <jakub@redhat.com>
2539
2540 * c-parser.c (c_parser_oacc_declare): Add missing space in
2541 diagnostics.
2542
8a398bc5
PK
25432017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2544
2545 PR c/79478
2546 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2547 set_c_expr_source_range when parsing ssa-name.
2548
3dcde5ef 25492017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2550 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2551
2552 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2553 building IL when arguments are error_mark_node.
2554 (c_parser_gimple_unary_expression): Likewise.
2555 (c_parser_gimple_if_stmt): Likewise.
2556 (c_parser_gimple_switch_stmt): Likewise.
2557 (c_parser_gimple_return_stmt): Likewise.
2558 (c_parser_parse_ssa_name): When name lookup fails do not build
2559 an SSA name. Use undeclared rather than not declared in error
2560 reporting.
2561
192b048b
MP
25622017-02-09 Marek Polacek <polacek@redhat.com>
2563
2564 PR c/79428
2565 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2566 instead of c_parser_skip_until_found.
2567
56f71478
JJ
25682017-02-09 Jakub Jelinek <jakub@redhat.com>
2569
2570 PR c/79431
2571 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2572 symtab_node::get on automatic variables.
2573
02889d23
CLT
25742016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2575 Chung-Lin Tang <cltang@codesourcery.com>
2576
2577 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2578 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2579 semantic checking.
2580 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2581
7af4b20d
RB
25822017-02-07 Richard Biener <rguenther@suse.de>
2583
2584 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2585 (c_parser_gimple_postfix_expression_after_primary):
2586 Do not use c_build_function_call_vec to avoid folding and promotion.
2587 Simplify.
2588
e5e391d6
MO
25892017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2590
2591 PR lto/79061
2592 * c-decl.c (pop_scope): Pass main_input_filename to
2593 build_translation_unit_decl.
2594
c2e84327
DM
25952017-01-24 David Malcolm <dmalcolm@redhat.com>
2596
2597 * c-parser.c: Include "read-rtl-function.h" and
2598 "run-rtl-passes.h".
2599 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2600 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2601 production. Update for renaming of field "gimple_pass" to
2602 "gimple_or_rtl_pass". If __RTL was seen, call
2603 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2604 to an auto_timevar, to cope with early exit.
2605 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2606 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2607 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2608 Handle RID_RTL.
2609 (c_parser_parse_rtl_body): New function.
2610 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2611 (struct c_declspecs): Rename field "gimple_pass" to
2612 "gimple_or_rtl_pass". Add field "rtl_p".
2613 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2614 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2615 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2616 (c_parser_gimple_or_rtl_pass_list): ...this.
2617
2ebd93e1
MP
26182017-01-20 Marek Polacek <polacek@redhat.com>
2619
2620 PR c/64279
2621 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2622
b1c95bb5
RB
26232017-01-13 Richard Biener <rguenther@suse.de>
2624
2625 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2626 nops.
2627
25329913
RB
26282017-01-13 Richard Biener <rguenther@suse.de>
2629
2630 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2631 _Literal ( type-name ) number.
2632
6bb4ea5c
RB
26332017-01-12 Richard Biener <rguenther@suse.de>
2634
2635 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2636 __MEM.
2637
6b5b4e9c
JJ
26382017-01-11 Jakub Jelinek <jakub@redhat.com>
2639
2640 PR c++/72813
2641 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2642 PCH file.
2643
e3252775
RB
26442017-01-11 Richard Biener <rguenther@suse.de>
2645
2646 PR bootstrap/79052
2647 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2648 returns on parse errors.
2649
a9342885
MP
26502017-01-04 Marek Polacek <polacek@redhat.com>
2651
2652 PR c++/64767
2653 * c-parser.c (c_parser_postfix_expression): Mark zero character
2654 constants by setting original_type in c_expr.
2655 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2656 with a zero character constant.
2657 (char_type_p): New function.
2658
5dd9a9d0
DM
26592017-01-04 David Malcolm <dmalcolm@redhat.com>
2660
2661 * c-parser.c (c_parser_declaration_or_fndef): Create a
2662 rich_location at init_loc and parse it to start_init.
2663 (last_init_list_comma): New global.
2664 (c_parser_braced_init): Update last_init_list_comma when parsing
2665 commas. Pass it to pop_init_level. Pass location of closing
2666 brace to pop_init_level.
2667 (c_parser_postfix_expression_after_paren_type): Create a
2668 rich_location at type_loc and parse it to start_init.
2669 (c_parser_omp_declare_reduction): Likewise for loc.
2670 * c-tree.h (start_init): Add rich_location * param.
2671 (pop_init_level): Add location_t param.
2672 * c-typeck.c (struct initializer_stack): Add field
2673 "missing_brace_richloc".
2674 (start_init): Add richloc param, use it to initialize
2675 the stack node's missing_brace_richloc.
2676 (last_init_list_comma): New decl.
2677 (finish_implicit_inits): Pass last_init_list_comma to
2678 pop_init_level.
2679 (push_init_level): When finding missing open braces, add fix-it
2680 hints to the richloc.
2681 (pop_init_level): Add "insert_before" param and pass it
2682 when calling pop_init_level. Add fixits about missing
2683 close braces to any richloc. Use the richloc for the
2684 -Wmissing-braces warning.
2685 (set_designator): Pass last_init_list_comma to pop_init_level.
2686 (process_init_element): Likewise.
2687
cbe34bb5
JJ
26882017-01-01 Jakub Jelinek <jakub@redhat.com>
2689
2690 Update copyright years.
2691
d17680f3
JJ
26922016-12-21 Jakub Jelinek <jakub@redhat.com>
2693
0dba7960
JJ
2694 PR bootstrap/78817
2695 * c-typeck.c (build_function_call_vec): If check_function_arguments
2696 returns true, set TREE_NO_WARNING on CALL_EXPR.
2697
d17680f3
JJ
2698 PR c/77767
2699 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2700 to *expr instead of overwriting it.
2701
aa90531e
RB
27022016-12-20 Richard Biener <rguenther@suse.de>
2703
2704 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2705 error recovery.
2706 (c_parser_gimple_statement): Only build assigns for non-error
2707 stmts.
2708 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2709
629b3d75
MJ
27102016-12-14 Martin Jambor <mjambor@suse.cz>
2711
2712 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2713 omp-low.h.
2714 (c_finish_oacc_routine): Adjusted call to
2715 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2716 to use their new names.
2717 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2718 use its new name.
2719 (c_parser_oacc_update): Likewise.
2720 (c_parser_omp_simd): Likewise.
2721 (c_parser_omp_target_update): Likewise.
2722 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2723 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2724 name.
2725 (c_finish_omp_cancellation_point): Likewise.
2726 * gimple-parser.c: Do not include omp-low.h
2727
c5af52eb
CP
27282016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2729 James Norris <jnorris@codesourcery.com>
2730
2731 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2732 EXIT_DATA,WAIT} are not used in compound statements.
2733 (c_parser_oacc_enter_exit_data): Update diagnostics.
2734
48330c93
BE
27352016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2736
2737 PR c++/71973
2738 * c-decl.c (diagnose_mismatched_decls): Use
2739 OPT_Wbuiltin_declaration_mismatch here too.
2740
899ca90e 27412016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2742 Alan Hayward <alan.hayward@arm.com>
2743 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2744
2745 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2746 (make_label, finish_struct): Likewise.
2747
1ee62b92 27482016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2749 Richard Biener <rguenther@suse.de>
22b15758 2750
8e745a17
JJ
2751 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2752 * config-lang.in (gtfiles): Add c/c-parser.h.
2753 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2754 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2755 * c-parser.c (enum c_id_kind, struct c_token,
2756 c_parser_next_token_is, c_parser_next_token_is_not,
2757 c_parser_next_token_is_keyword,
2758 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2759 Split out to ...
2760 * c-parser.h: ... new header.
2761 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2762 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2763 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2764 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2765 c_parser_error, c_parser_require, c_parser_skip_until_found,
2766 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2767 c_parser_type_name): Export.
2768 (c_parser_tokens_buf): New function.
2769 (c_parser_error): Likewise.
2770 (c_parser_set_error): Likewise.
2771 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2772 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2773 via c_parser_parse_gimple_body.
8e745a17
JJ
2774 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2775 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2776 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2777 c_parser_error, c_parser_require, c_parser_skip_until_found,
2778 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2779 c_parser_type_name): Declare.
1ee62b92
PG
2780 (struct c_parser): Declare forward.
2781 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2782 (c_parser_error): Likewise.
2783 (c_parser_set_error): Likewise.
2784 * gimple-parser.c: New file.
2785 * gimple-parser.h: Likewise.
1ee62b92 2786
22b15758
UB
27872016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2788
2789 PR c/35503
2790 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2791 warn_for_restrict.
2792
84ff4775
LCW
27932016-09-11 Le-Chun Wu <lcwu@google.com>
2794 Mark Wielaard <mjw@redhat.com>
2795
2796 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2797 to the given -Wshadow= variant.
2798
4d0cdd0c
TP
27992016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2800
2801 * c-typeck.c: Include memmodel.h.
2802
1202f33e
JJ
28032016-10-13 Jakub Jelinek <jakub@redhat.com>
2804
2805 PR target/77957
2806 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2807 instead of lhd_return_null_tree_v.
2808
8a14afd0
BS
28092016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2810
2811 PR c++/69733
2812 * c-decl.c (smallest_type_quals_location): New static function.
2813 (grokdeclarator): Try to find the correct location for an ignored
2814 qualifier.
2815
81fea426
MP
28162016-09-26 Marek Polacek <polacek@redhat.com>
2817
2818 PR c/7652
2819 * c-decl.c (pop_scope): Add gcc_fallthrough.
2820
28212016-09-26 Marek Polacek <polacek@redhat.com>
2822
2823 PR c/7652
2824 * c-parser.c (struct c_token): Add flags field.
2825 (c_lex_one_token): Pass it to c_lex_with_flags.
2826 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2827 into IFN_FALLTHROUGH.
2828 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2829 attribute fallthrough after a case label or default label.
2830 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2831
9a2300e9
MP
28322016-09-24 Marek Polacek <polacek@redhat.com>
2833
2834 PR c/77490
2835 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2836 have boolean value. Warn about ++/-- on booleans.
2837
7de76362
JJ
28382016-09-23 Jakub Jelinek <jakub@redhat.com>
2839
2840 * c-parser.c (incomplete_record_decls): Remove unnecessary
2841 = vNULL initialization of file scope vec.
2842
5b73d2ab
MP
28432016-09-16 Marek Polacek <polacek@redhat.com>
2844
2845 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2846
e51fbec3
MP
28472016-09-14 Marek Polacek <polacek@redhat.com>
2848
2849 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2850 (fix_array_notation_expr): Likewise.
2851 * c-decl.c (finish_decl): Likewise.
2852 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2853 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2854 (function_to_pointer_conversion): Use false instead of 0.
2855 (convert_lvalue_to_rvalue): Likewise.
2856 (parser_build_unary_op): Likewise.
2857 (build_atomic_assign): Likewise.
2858 (build_unary_op): Change nonconvert parameter type to bool, use
2859 true/false instead of 1/0.
2860 (build_binary_op): Use true instead of 1.
2861
254830ba
DM
28622016-09-13 David Malcolm <dmalcolm@redhat.com>
2863
2864 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2865 of add_fixit_insert to add_fixit_insert_before.
2866
4c13ba17
MP
28672016-09-13 Marek Polacek <polacek@redhat.com>
2868
2869 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2870 it.
2871
54dcdb88
BE
28722016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2873
2874 PR c++/77496
2875 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2876 COMPOUND_EXPR to warn_for_omitted_condop.
2877
e5106e27
DM
28782016-09-07 David Malcolm <dmalcolm@redhat.com>
2879
2880 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2881 c_get_substring_location for this new langhook.
2882
9dc5773f
JJ
28832016-09-02 Jakub Jelinek <jakub@redhat.com>
2884
2885 PR c/65467
2886 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2887 flag_openmp.
2888 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2889 instead of mark_exp_read on low_bound/length expression.
2890 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2891 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2892 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2893 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2894 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2895 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2896 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2897 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2898 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2899 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2900 instead of mark_expr_read.
2901 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2902 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2903 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2904 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2905 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2906 array section bases outside of depend clause, for depend clause
2907 use convert_lvalue_to_rvalue on the base.
2908 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2909 linear, aligned, map, to and from clauses.
2910 (c_omp_clause_copy_ctor): New function.
2911
295844f6
MP
29122016-09-01 Marek Polacek <polacek@redhat.com>
2913
2914 PR c/7652
2915 * c-typeck.c (composite_type): Add FALLTHRU comment.
2916
089af25c
DM
29172016-08-31 David Malcolm <dmalcolm@redhat.com>
2918
2919 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2920 to the insertion fixits for "struct", "union", and "enum".
2921
f9087798
DM
29222016-08-30 David Malcolm <dmalcolm@redhat.com>
2923
2924 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2925 rather than add_fixit_misspelled_id.
2926 (undeclared_variable): Likewise.
2927 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2928 now-redundant "here" params from add_fixit_insert method calls.
2929 (c_parser_parameter_declaration): Likewise.
2930 * c-typeck.c (build_component_ref): Remove now-redundant range
2931 param from add_fixit_replace method calls.
2932
ebef225f
MP
29332016-08-25 Marek Polacek <polacek@redhat.com>
2934
2935 * c-typeck.c (parser_build_binary_op): Pass LHS to
2936 warn_logical_not_parentheses.
2937
fe377a48
MP
29382016-08-25 Marek Polacek <polacek@redhat.com>
2939
2940 PR c/77323
2941 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
2942 or _FloatN or _FloatNx is not supported.
2943 (finish_declspecs): Set type to integer_type_node when _FloatN or
2944 _FloatNx is not supported.
2945
c65699ef
JM
29462016-08-19 Joseph Myers <joseph@codesourcery.com>
2947
2948 PR c/32187
2949 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
2950 (struct c_declspecs): Add field floatn_nx_idx.
2951 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
2952 and _FloatNx type specifiers.
2953 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
2954 (c_parser_declspecs, c_parser_attribute_any_word)
2955 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
2956 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
2957 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
2958 narrower than double.
2959
2f1364c2
JJ
29602016-08-12 Jakub Jelinek <jakub@redhat.com>
2961 Martin Liska <mliska@suse.cz>
2962
2963 PR c/67410
2964 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
2965 % to determine val element to change. Assert that
2966 wchar_bytes * charwidth fits into val array.
2967
191816a3
MP
29682016-08-12 Marek Polacek <polacek@redhat.com>
2969
2970 PR c/7652
2971 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
2972 (c_parser_postfix_expression): Likewise.
2973 * c-typeck.c (build_unary_op): Adjust fall through comment.
2974 (c_mark_addressable): Likewise.
2975
b95a64bb
JJ
29762016-08-11 Jakub Jelinek <jakub@redhat.com>
2977
2978 PR c/72816
2979 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
2980 array member through typedef, for orig_qual_indirect == 0 clear
2981 orig_qual_type.
2982
895aa8e1
DM
29832016-08-08 David Malcolm <dmalcolm@redhat.com>
2984
2985 PR c/64955
2986 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
2987 this up to selftest::run_c_tests.
2988 (selftest::run_c_tests): New function.
2989
0b212d8c
TS
29902016-08-04 Thomas Schwinge <thomas@codesourcery.com>
2991
ae9281fc
TS
2992 * c-parser.c (struct oacc_routine_data): Add error_seen and
2993 fndecl_seen members.
2994 (c_finish_oacc_routine): Use these.
2995 (c_parser_declaration_or_fndef): Adjust.
2996 (c_parser_oacc_routine): Likewise. Support more C language
2997 constructs, and improve diagnostics. Move pragma context
2998 checking...
2999 (c_parser_pragma): ... here.
3000
0b212d8c
TS
3001 * c-parser.c (struct oacc_routine_data): New.
3002 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3003 Simplify code.
3004 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3005 declare target" attribute.
3006
76e2c821
JB
30072016-08-01 Jan Beulich <jbeulich@suse.com>
3008
3009 * c-fold.c (c_fully_fold_internal): Also emit shift count
3010 warnings for vector types.
3011 * c-typeck.c (build_binary_op): Likewise.
3012
f618a472
MP
30132016-07-29 Marek Polacek <polacek@redhat.com>
3014
3015 PR c/71742
3016 * c-decl.c (finish_struct): Rephrase an error message.
3017
efd0786f
MP
3018 PR c/71853
3019 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3020 to error node for invalid code.
3021
e00dceaf
MP
3022 PR c/71573
3023 * c-decl.c (implicitly_declare): Return decl early not only for
3024 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3025
673a107a
JJ
30262016-07-29 Jakub Jelinek <jakub@redhat.com>
3027
3028 PR c/71969
3029 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3030 on GNU extern inline functions.
3031
a5b5c8b6
MP
30322016-07-29 Marek Polacek <polacek@redhat.com>
3033
3034 PR c/71583
3035 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3036 check expr.value.
3037
e3fe09c1
UB
30382016-07-22 Uros Bizjak <ubizjak@gmail.com>
3039
3040 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3041
7c8f7eaa
DM
30422016-07-20 David Malcolm <dmalcolm@redhat.com>
3043
3044 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3045 spellcheck-tree.h
3046 (best_macro_match): Likewise, converting from a typedef to a
3047 subclass.
3048 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3049 (lookup_name_fuzzy): Update for change of best_macro_match to a
3050 subclass with a ctor that calls cpp_forall_identifiers.
3051
de6a69ee
DM
30522016-07-20 David Malcolm <dmalcolm@redhat.com>
3053
3054 * c-decl.c (implicit_decl_warning): Update for conversion of
3055 return type of lookup_name_fuzzy to const char *.
3056 (undeclared_variable): Likewise.
3057 (lookup_name_fuzzy): Convert return type from tree to
3058 const char *.
3059 * c-parser.c (c_parser_declaration_or_fndef): Update for
3060 conversion of return type of lookup_name_fuzzy to const char *.
3061 (c_parser_parameter_declaration): Likewise.
3062
b1c9c068
CP
30632016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3064
3065 * c-parser.c (c_parser_oacc_declare): Don't scan for
3066 GOMP_MAP_POINTER.
3067 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3068 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3069 zero-length subarrays.
3070
ddbbcb19
JJ
30712016-07-15 Jakub Jelinek <jakub@redhat.com>
3072
3073 PR c/71858
3074 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3075 instead of FUZZY_LOOKUP_NAME.
3076 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3077 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3078
dd36b877
JJ
30792016-07-14 Jakub Jelinek <jakub@redhat.com>
3080
3081 PR c/71858
3082 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3083
8c681247
TS
30842016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3085
3086 * c-parser.c (c_parser_generic_selection): Make type of variable
3087 auto_vec.
3088 (c_parser_omp_declare_simd): Likewise.
3089
bf4fa671
TS
30902016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3091
3092 * c-decl.c (struct c_struct_parse_info): Change member types
3093 from vec to auto_vec.
3094 (start_struct): Adjust.
3095 (finish_struct): Likewise.
3096
557e8c49
JJ
30972016-07-02 Jakub Jelinek <jakub@redhat.com>
3098
3099 PR c/71719
3100 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3101
54d19c3b
TS
31022016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3103
3104 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3105 Move pragma context checking into...
3106 (c_parser_omp_cancellation_point): ... here, and improve
3107 diagnostic messages.
3108 * c-typeck.c (c_finish_omp_cancel)
3109 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3110
152ef731
JJ
31112016-06-29 Jakub Jelinek <jakub@redhat.com>
3112
3113 PR c/71685
3114 * c-typeck.c (c_build_qualified_type): Don't clear
3115 C_TYPE_INCOMPLETE_VARS for the main variant.
3116
31172016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3118
3119 PR c/71552
3120 * c-typeck.c (output_init_element): Diagnose incompatible types
3121 before non-constant initializers.
3122
e9ac1f86
JJ
31232016-06-28 Jakub Jelinek <jakub@redhat.com>
3124
3125 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3126
277d7ee0
AK
31272016-06-23 Andi Kleen <ak@linux.intel.com>
3128
3129 * Make-lang.in: Add support for autofdo.
3130
1a4f11c8
DM
31312016-06-22 David Malcolm <dmalcolm@redhat.com>
3132
3133 PR c/70339
3134 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3135 (implicit_decl_warning): When issuing warnings for implicit
3136 declarations, attempt to provide a suggestion via
3137 lookup_name_fuzzy.
3138 (undeclared_variable): Likewise when issuing errors.
3139 (lookup_name_in_scope): Likewise.
3140 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3141 (best_macro_match): New typedef.
3142 (find_closest_macro_cpp_cb): New function.
3143 (lookup_name_fuzzy): New function.
3144 * c-parser.c: Include gcc-rich-location.h.
3145 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3146 (c_keyword_starts_typename): ...this new function.
3147 (c_parser_declaration_or_fndef): When issuing errors about
3148 missing "struct" etc, add a fixit. For other kinds of errors,
3149 attempt to provide a suggestion via lookup_name_fuzzy.
3150 (c_parser_parms_declarator): When looking ahead to detect typos in
3151 type names, also reject CPP_KEYWORD.
3152 (c_parser_parameter_declaration): When issuing errors about
3153 unknown type names, attempt to provide a suggestion via
3154 lookup_name_fuzzy.
3155 * c-tree.h (c_keyword_starts_typename): New prototype.
3156
5a578671
JM
31572016-06-20 Joseph Myers <joseph@codesourcery.com>
3158
3159 PR c/71601
3160 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3161 c_common_type returns error_mark_node.
3162
3f8257db 31632016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3164
3165 PR c/69507
3166 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3167 __alignof__ (expression).
3168
6a3f203c
DM
31692016-06-14 David Malcolm <dmalcolm@redhat.com>
3170
3171 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3172
264757fb
DM
31732016-06-14 David Malcolm <dmalcolm@redhat.com>
3174
3175 * c-typeck.c (build_component_ref): Simplify fixit code by
3176 using gcc_rich_location::add_fixit_misspelled_id.
3177 (set_init_label): Likewise.
3178
f7e4f2e3
DM
31792016-06-13 David Malcolm <dmalcolm@redhat.com>
3180
3181 * c-parser.c (c_parser_initelt): Provide location of name for new
3182 location_t param of set_init_label.
3183 * c-tree.h (set_init_label): Add location_t param.
3184 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3185 param and use it when issuing error messages about unrecognized
3186 field names. Attempt to provide a fixit hint if appropriate,
3187 otherwise update the error message to provide the type name.
3188
4b1ffdb1
TS
31892016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3190
3191 PR c/71381
3192 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3193 Loosen checking.
3194
44a845ca
MS
31952016-06-08 Martin Sebor <msebor@redhat.com>
3196 Jakub Jelinek <jakub@redhat.com>
3197
3198 PR c++/70507
3199 PR c/68120
3200 * c-typeck.c (convert_arguments): Don't promote last argument
3201 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3202
92a5f2ba
MP
32032016-06-08 Marek Polacek <polacek@redhat.com>
3204
3205 PR c/71418
3206 * c-decl.c (grokdeclarator): Check TYPE_P.
3207
08203f73
MP
3208 PR c/71426
3209 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3210 code.
3211
6ffd47b7
DM
32122016-06-07 David Malcolm <dmalcolm@redhat.com>
3213
3214 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3215 and structure element reference, capture the location of the
3216 element name token and pass it to build_component_ref.
3217 (c_parser_postfix_expression_after_primary): Likewise for
3218 structure element dereference.
3219 (c_parser_omp_variable_list): Likewise for
3220 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3221 * c-tree.h (build_component_ref): Add location_t param.
3222 * c-typeck.c (build_component_ref): Add location_t param
3223 COMPONENT_LOC. Use it, if available, when issuing hints about
3224 mispelled member names to provide a fixit replacement hint.
3225
1f40cff3
MP
32262016-06-06 Marek Polacek <polacek@redhat.com>
3227
3228 PR c/71362
3229 * c-parser.c (c_parser_direct_declarator): Set location.
3230
5545a907
MP
32312016-06-06 Marek Polacek <polacek@redhat.com>
3232
3233 * c-typeck.c (comptypes_internal): Handle comparisons of
3234 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3235 TYPE_REF_CAN_ALIAS_ALL.
3236
b605f663
CLT
32372016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3238
3239 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3240 arguments as addressable when async clause exists.
3241
00631022
JJ
32422016-05-30 Jakub Jelinek <jakub@redhat.com>
3243
3244 PR c++/71349
3245 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3246 when combined with target construct.
3247
7211a097
JJ
32482016-05-26 Jakub Jelinek <jakub@redhat.com>
3249
3250 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3251 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3252
95efe6b6
MP
32532016-05-25 Marek Polacek <polacek@redhat.com>
3254
3255 PR c/71265
3256 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3257
a23faf7a
MP
3258 PR c/71266
3259 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3260
e46c7770
CP
32612016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3262
3263 * c-parser.c (c_parser_oacc_declare): Add support for
3264 GOMP_MAP_FIRSTPRIVATE_POINTER.
3265 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3266 argument with enum c_omp_region_type ort.
3267 (handle_omp_array_sections): Likewise. Update call to
3268 handle_omp_array_sections_1.
3269 (c_finish_omp_clauses): Add specific errors and warning messages for
3270 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3271 call to handle_omp_array_sections.
3272
a04e69c0
TS
32732016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3274
3275 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3276
f17a223d
RB
32772016-05-24 Richard Biener <rguenther@suse.de>
3278
3279 PR middle-end/70434
3280 PR c/69504
3281 * c-typeck.c (build_array_ref): Do not complain about indexing
3282 non-lvalue vectors. Adjust for function name change.
3283
79063edd
MS
32842016-05-20 Martin Sebor <msebor@redhat.com>
3285
3286 PR c/71115
3287 * c-typeck.c (error_init): Use
3288 expansion_point_location_if_in_system_header.
3289 (warning_init): Same.
3290
8a40fef3
DM
32912016-05-19 David Malcolm <dmalcolm@redhat.com>
3292
3293 PR c/71171
3294 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3295 in error-handling.
3296 (c_parser_postfix_expression): Likewise.
3297 * c-tree.h (c_expr::set_error): New method.
3298 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3299 that result's range is initialized.
3300
e9892350
JG
33012016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3302
3303 * c-typeck.c (parser_build_unary_op): Fix formatting.
3304
8fad45f5
MW
33052016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3306
3307 * c-decl.c (grokdeclarator): Remove errmsg and use of
3308 targetm.invalid_return_type.
3309 (grokparms): Remove errmsg and use of
3310 targetm.invalid_parameter_type.
3311
aa4b467b
JM
33122016-05-13 Joseph Myers <joseph@codesourcery.com>
3313
3314 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3315 function return type.
3316
4f2e1536
MP
33172016-05-12 Marek Polacek <polacek@redhat.com>
3318
3319 PR c/70756
3320 * c-decl.c (build_compound_literal): Pass LOC down to
3321 c_incomplete_type_error.
3322 * c-tree.h (require_complete_type): Adjust declaration.
3323 (c_incomplete_type_error): Likewise.
3324 * c-typeck.c (require_complete_type): Add location parameter, pass it
3325 down to c_incomplete_type_error.
3326 (c_incomplete_type_error): Add location parameter, pass it down to
3327 error_at.
3328 (build_component_ref): Pass location down to c_incomplete_type_error.
3329 (default_conversion): Pass location down to require_complete_type.
3330 (build_array_ref): Likewise.
3331 (build_function_call_vec): Likewise.
3332 (convert_arguments): Likewise.
3333 (build_unary_op): Likewise.
3334 (build_c_cast): Likewise.
3335 (build_modify_expr): Likewise.
3336 (convert_for_assignment): Likewise.
3337 (c_finish_omp_clauses): Likewise.
3338
d6e83a8d
MM
33392016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3340
3341 PR c/43651
3342 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3343 is enabled.
3344 * c-errors.c (pedwarn_c90): Return true if warned.
3345 * c-tree.h (pedwarn_c90): Change return type to bool.
3346 (enum c_declspec_word): Add new enumerator cdw_atomic.
3347
5c3a10fb
MP
33482016-05-11 Marek Polacek <polacek@redhat.com>
3349
3350 PR c++/71024
3351 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3352 diagnose_mismatched_attributes and call it.
3353
cf68d92c
MP
33542016-05-10 Marek Polacek <polacek@redhat.com>
3355
3356 PR c/70255
3357 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3358 on a declaration following the definition.
3359
351f85c5
JJ
33602016-05-05 Jakub Jelinek <jakub@redhat.com>
3361
3362 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3363 parse it through to c_parser_c99_block_statement.
3364 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3365 caller.
3366
deef7113
MP
33672016-05-04 Marek Polacek <polacek@redhat.com>
3368
3369 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3370 OPT_Wdangling_else.
3371
de55efd5
MP
33722016-05-04 Marek Polacek <polacek@redhat.com>
3373
3374 PR c/48778
3375 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3376 for macro expansions.
3377
79ce98bc
MP
33782016-05-03 Marek Polacek <polacek@redhat.com>
3379
3380 PR c/70859
3381 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3382 check_builtin_function_arguments.
3383
fb2647aa
RB
33842016-05-03 Richard Biener <rguenther@suse.de>
3385
3386 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3387 the checksum from the previous stage.
3388
77886428
CP
33892016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3390
3391 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3392 c_finish_omp_clauses.
3393 (c_parser_omp_all_clauses): Likewise.
3394 (c_parser_oacc_cache): Likewise.
3395 (c_parser_oacc_loop): Likewise.
3396 (omp_split_clauses): Likewise.
3397 (c_parser_omp_declare_target): Likewise.
3398 (c_parser_cilk_all_clauses): Likewise.
3399 (c_parser_cilk_for): Likewise.
3400 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3401 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3402
7176a4a0
MP
34032016-05-02 Marek Polacek <polacek@redhat.com>
3404
3405 PR c/70851
3406 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3407 incomplete type.
3408
e7ff0319
CP
34092016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3410
3411 PR middle-end/70626
3412 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3413 OACC_LOOP_CLAUSE_MASK.
3414 (c_parser_oacc_kernels_parallel): Update call to
3415 c_oacc_split_loop_clauses.
3416
9f405ce1
AM
34172016-04-28 Andrew MacLeod <amacleod@redhat.com>
3418
3419 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3420 argument to build_modify_expr in two cases.
3421
c1e1f433
BS
34222016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3423
3424 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3425 warn_for_memset instead of warning directly here.
3426
2448a956
MP
34272016-04-26 Marek Polacek <polacek@redhat.com>
3428
3429 PR c/67784
3430 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3431 out of ...
3432 (c_parser_for_statement): ... here.
3433 (c_parser_if_statement): Use it.
3434 (c_parser_switch_statement): Use it.
3435 (c_parser_while_statement): Use it.
3436
b02a5e26
MP
3437 PR c/70791
3438 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3439
477d4906
IV
34402016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3441
3442 PR c++/69363
3443 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3444 instead of c_finish_cilk_clauses.
3445 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3446 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3447 floating-point variables in the linear clause for Cilk Plus.
3448
fe37c7af
MM
34492016-04-18 Michael Matz <matz@suse.de>
3450
3451 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3452 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3453
949505a9
MP
34542016-04-15 Marek Polacek <polacek@redhat.com>
3455
3456 PR c/70671
3457 * c-typeck.c (build_unary_op): Pass location down to error and
3458 warning call.
3459
dda1bf61
JJ
34602016-04-15 Jakub Jelinek <jakub@redhat.com>
3461
3462 PR c/70436
3463 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3464 where needed.
3465 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3466 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3467 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3468 Adjust c_parser_pragma callers.
3469 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3470 caller.
3471 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3472 c_parser_statement.
3473 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3474 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3475 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3476 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3477 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3478 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3479 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3480 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3481 down where needed.
3482 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3483 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3484 calls.
3485
99cd9857
MP
34862016-04-13 Marek Polacek <polacek@redhat.com>
3487
3488 PR c/70436
3489 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3490 adjust callers.
3491 (c_parser_statement): Likewise.
3492 (c_parser_c99_block_statement): Likewise.
3493 (c_parser_while_statement): Likewise.
3494 (c_parser_for_statement): Likewise.
3495 (c_parser_if_body): Don't set IF_P here.
3496 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3497 about dangling else here.
3498 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3499 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3500 warn about dangling else here.
3501
f13355da
MP
35022016-04-04 Marek Polacek <polacek@redhat.com>
3503
3504 PR c/70307
3505 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3506
5fde6a45
MP
35072016-03-31 Marek Polacek <polacek@redhat.com>
3508
3509 PR c/70297
3510 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3511
4bbf545b
DM
35122016-03-18 David Malcolm <dmalcolm@redhat.com>
3513
3514 PR c/70281
3515 * c-parser.c (c_parser_postfix_expression): Set the source range
3516 for uses of "__builtin_types_compatible_p".
3517
fcc2b74f
JJ
35182016-03-17 Jakub Jelinek <jakub@redhat.com>
3519
3520 PR c/70280
3521 * c-typeck.c (composite_type): Don't count void_list_node
3522 into len, if the list is terminated by void_list_node, start
3523 with void_list_node instead of NULL for newargs. Stop
3524 at void_list_node.
3525
ab4c578f
MP
35262016-03-16 Marek Polacek <polacek@redhat.com>
3527
3528 PR c/70093
3529 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3530 nested functions returning VM types.
3531
96b3c82d
CP
35322016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3533
3534 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3535 when calling c_finish_omp_clauses.
3536
29b9828f
BS
35372016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3538
3539 PR c/69824
3540 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3541 for later.
3542
7ff6ca38
MP
35432016-03-04 Marek Polacek <polacek@redhat.com>
3544
3545 PR c/69798
3546 * c-parser.c (c_parser_postfix_expression): Call
3547 c_parser_cast_expression rather than c_parser_postfix_expression.
3548
686e2237
JJ
35492016-03-01 Jakub Jelinek <jakub@redhat.com>
3550
3551 PR c/69796
3552 PR c/69974
3553 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3554 of incomplete decls to error_mark_node.
3555
0b05329b
MP
35562016-02-24 Marek Polacek <polacek@redhat.com>
3557
3558 PR c/69819
3559 * c-decl.c (finish_decl): Don't update the copy of the type of a
3560 different decl type.
3561
067fbd8b
JJ
35622016-02-23 Jakub Jelinek <jakub@redhat.com>
3563
3564 PR objc/69844
3565 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3566 in id_kind reclassification.
3567
bf14eba2
JJ
35682016-02-16 Jakub Jelinek <jakub@redhat.com>
3569
3570 PR c/69835
3571 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3572
ba539195
JN
35732016-02-16 James Norris <jnorris@codesourcery.com>
3574
3575 PR c/64748
3576 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3577
16595a1f
BS
35782016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3579
f48dfe98
BS
3580 * c-decl.c (build_null_declspecs): Zero the entire struct.
3581
16595a1f
BS
3582 PR c/69522
3583 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3584 callers changed. If nested_p is true, use it to call
3585 finish_implicit_inits.
3586 * c-tree.h (finish_implicit_inits): Declare.
3587 * c-typeck.c (finish_implicit_inits): New function. Move code
3588 from ...
3589 (push_init_level): ... here.
3590 (set_designator, process_init_element): Call finish_implicit_inits.
3591
66756373
JJ
35922016-02-11 Jakub Jelinek <jakub@redhat.com>
3593
3594 PR c/69768
3595 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3596 arguments for -Waddress warning.
3597
1066e9b5
JJ
35982016-02-04 Jakub Jelinek <jakub@redhat.com>
3599
3600 PR c/69669
3601 * c-decl.c (finish_enum): When honoring mode attribute,
3602 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3603
3a5d2ba4
JJ
36042016-01-29 Jakub Jelinek <jakub@redhat.com>
3605
3606 PR debug/69518
3607 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3608 all type variants, not just TYPE_MAIN_VARIANT.
3609
cbdd8ae0
JJ
36102016-01-27 Jakub Jelinek <jakub@redhat.com>
3611
3612 PR debug/66869
3613 * c-decl.c (c_write_global_declarations_1): Warn with
3614 warn_unused_function if static prototype without definition
3615 is not C_DECL_USED.
3616
fa74a4bc
MP
36172016-01-27 Marek Polacek <polacek@redhat.com>
3618
3619 PR c/68062
3620 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3621 to unsigned, if needed. Add -Wsign-compare warning.
3622
13f92e8d
JJ
36232016-01-26 Jakub Jelinek <jakub@redhat.com>
3624
3625 PR tree-optimization/69483
3626 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3627
cd8e73dc 36282016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3629
3630 PR c/24293
3631 * c-tree.h (incomplete_record_decls): Declare.
3632 * c-parser.c (incomplete_record_decls): Define.
3633 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3634 report error if any decl has zero size.
3635 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3636 or enum type to incomplete_record_decls.
3637
e6d6ec9e
TV
36382016-01-14 Tom de Vries <tom@codesourcery.com>
3639
3640 PR tree-optimization/68773
3641 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3642 set force_output.
3643
00083992
MP
36442016-01-14 Marek Polacek <polacek@redhat.com>
3645
3646 PR c/69262
3647 * c-decl.c (grokdeclarator): Provide more information for invalid
3648 array declarations.
3649
7443cf13
DM
36502016-01-06 David Malcolm <dmalcolm@redhat.com>
3651
3652 * c-parser.c (c_parser_unary_expression): For dereferences, build
3653 a combined location before calling build_indirect_ref, so that
3654 error reports cover the full range, manually updating the c_expr
3655 src_range.
3656
6b131d5b
MP
36572016-01-06 Marek Polacek <polacek@redhat.com>
3658
3659 PR sanitizer/69099
3660 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3661 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3662 NULL.
3663
818ab71a
JJ
36642016-01-04 Jakub Jelinek <jakub@redhat.com>
3665
3666 Update copyright years.
3667
2fe0a208
MP
36682016-01-04 Marek Polacek <polacek@redhat.com>
3669
3670 PR c/68908
3671 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3672 optimization to use __atomic_fetch_* built-in if possible.
3673
c7b48c8a
TS
36742015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3675
3676 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3677 into...
3678 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3679 all users.
3680
fda5652f
MP
36812015-12-22 Marek Polacek <polacek@redhat.com>
3682
3683 PR c/69002
3684 * c-typeck.c (build_component_ref): Warn when acessing elements of
3685 atomic structures or unions.
3686
745e411d
DM
36872015-12-21 David Malcolm <dmalcolm@redhat.com>
3688
3689 * c-typeck.c: Include "gcc-rich-location.h".
3690 (build_binary_op): In the two places that call binary_op_error,
3691 create a gcc_rich_location and populate it with the location of
3692 the binary op and its two operands.
3693
94c40e19
DM
36942015-12-16 David Malcolm <dmalcolm@redhat.com>
3695
3696 * c-parser.c (c_parser_statement_after_labels): When calling
3697 c_finish_return, Use the return expression's location if it has
3698 one, falling back to the location of the first token within it.
3699 * c-typeck.c (c_finish_return): When issuing warnings about
3700 the incorrect presence/absence of a return value, issue a note
3701 showing the declaration of the function.
3702
de67c4c3
DM
37032015-12-16 David Malcolm <dmalcolm@redhat.com>
3704
3705 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3706 to 4.
3707 (c_parser_peek_nth_token): New function.
3708 (c_parser_peek_conflict_marker): New function.
3709 (c_parser_error): Detect conflict markers and report them as such.
3710
a10704e1
DM
37112015-12-16 David Malcolm <dmalcolm@redhat.com>
3712
3713 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3714 to preserve range information for the primary expression
3715 in the call to c_parser_postfix_expression_after_primary.
3716
8062bca6
DM
37172015-12-16 David Malcolm <dmalcolm@redhat.com>
3718
3719 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3720 expression location, falling back on the first token location,
3721 rather than always using the latter.
3722
d06f8b75
MP
37232015-12-16 Marek Polacek <polacek@redhat.com>
3724
3725 PR c/64637
3726 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3727 available.
3728
2994fb91
MP
37292015-12-15 Marek Polacek <polacek@redhat.com>
3730
3731 PR c/68907
3732 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3733 artificial decl.
3734
a1b93f8d
DM
37352015-12-08 David Malcolm <dmalcolm@redhat.com>
3736
3737 * c-parser.c (c_parser_alignof_expression): Capture location of
3738 closing parenthesis (if any), or of end of unary expression, and
3739 use it to build a src_range for the expression.
3740
46c6e1e2
DM
37412015-12-08 David Malcolm <dmalcolm@redhat.com>
3742
3743 PR c/68757
3744 * c-parser.c (c_parser_get_builtin_args): Add
3745 "out_close_paren_loc" param, and write back to it.
3746 (c_parser_postfix_expression): Capture the closing
3747 parenthesis location for RID_CHOOSE_EXPR,
3748 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3749 RID_BUILTIN_SHUFFLE and use it to set the source range
3750 for such expressions; within RID_BUILTIN_COMPLEX set
3751 the underlying location.
3752
66189108
MP
37532015-12-07 Marek Polacek <polacek@redhat.com>
3754
3755 PR c/68668
3756 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3757 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3758
f187980b
EB
37592015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3760
3761 * c-tree.h (c_build_va_arg): Adjust prototype.
3762 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3763 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3764 parameter, adjust throughout and issue an error if EXPR is a component
3765 with reverse storage order.
3766
4250754e
JM
37672015-12-02 Jason Merrill <jason@redhat.com>
3768
3769 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3770 (c_fully_fold_internal, decl_constant_value_for_optimization):
3771 Move from c-common.c.
3772 * c-tree.h: Declare decl_constant_value_for_optimization.
3773 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3774
e9e32ee6
JM
37752015-12-02 Joseph Myers <joseph@codesourcery.com>
3776
3777 PR c/68162
3778 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3779 following link from declarator to next declarator. Track original
3780 qualified type and pass it to c_build_qualified_type.
3781 * c-typeck.c (c_build_qualified_type): Add arguments
3782 orig_qual_type and orig_qual_indirect.
3783
ff7a55bf
TS
37842015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3785
3786 * c-parser.c (c_parser_omp_clause_name)
3787 (c_parser_oacc_all_clauses): Alphabetical sorting.
3788
657e4e47
JJ
37892015-12-02 Jakub Jelinek <jakub@redhat.com>
3790
3791 PR c/68533
3792 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3793 for diagnostics.
3794
37d5ad46
JB
37952015-12-01 Julian Brown <julian@codesourcery.com>
3796 Cesar Philippidis <cesar@codesourcery.com>
3797 James Norris <James_Norris@mentor.com>
3798
3799 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3800 (c_parser_oacc_clause_use_device): New function.
3801 (c_parser_oacc_all_clauses): Add use_device support.
3802 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3803 (c_parser_oacc_host_data): New function.
3804 (c_parser_omp_construct): Add host_data support.
3805 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3806 * c-typeck.c (c_finish_oacc_host_data): New function.
3807 (c_finish_omp_clauses): Add use_device support.
3808
a4850ce9
JH
38092015-11-29 Jan Hubicka <hubicka@ucw.cz>
3810
3811 PR c/67106
3812 * c-decl.c: Set TYPE_PACKED in variants.
3813
b58d3df2
ML
38142015-11-27 Martin Liska <mliska@suse.cz>
3815
3816 PR c++/68312
3817 * c-array-notation.c (fix_builtin_array_notation_fn):
3818 Use release_vec_vec instead of vec::release.
3819 (build_array_notation_expr): Likewise.
3820 (fix_conditional_array_notations_1): Likewise.
3821 (fix_array_notation_expr): Likewise.
3822 (fix_array_notation_call_expr): Likewise.
3823
aec17bfe
JJ
38242015-11-27 Jakub Jelinek <jakub@redhat.com>
3825
3826 PR c/63326
3827 * c-parser.c (c_parser_compound_statement_nostart): If
3828 last_label is true, use pragma_stmt instead of pragma_compound
3829 as second c_parser_pragma argument.
3830 (c_parser_omp_ordered, c_parser_omp_target_update,
3831 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3832 false as second argument to c_parser_skip_to_pragma_eol after
3833 diagnosing standalone directives used in pragma_stmt context.
3834
688c4de0
IV
38352015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3836
3837 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3838 with "if (ENABLE_OFFLOADING)".
3839
cbd03aee
DM
38402015-11-23 David Malcolm <dmalcolm@redhat.com>
3841
3842 PR objc/68438
3843 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3844 for various Objective-C constructs: Class.name syntax,
3845 @selector(), @protocol(), @encode(), and [] message syntax.
3846
a87a86e1
DM
38472015-11-20 David Malcolm <dmalcolm@redhat.com>
3848
3849 PR 62314
3850 * c-typeck.c (should_suggest_deref_p): New function.
3851 (build_component_ref): Special-case POINTER_TYPE when
3852 generating a "not a structure of union" error message, and
3853 suggest a "->" rather than a ".", providing a fix-it hint.
3854
8ece8dfb
DM
38552015-11-19 David Malcolm <dmalcolm@redhat.com>
3856
3857 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3858 candidate into a new function, find_closest_identifier.
3859
433068cc
MP
38602015-11-19 Marek Polacek <polacek@redhat.com>
3861
3862 PR c/68412
3863 * c-typeck.c (parser_build_binary_op): Properly handle
3864 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3865
bef08b71
DM
38662015-11-17 David Malcolm <dmalcolm@redhat.com>
3867
3868 * c-parser.c (set_c_expr_source_range): Bulletproof both
3869 overloaded implementations against NULL expr->value.
3870 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3871 values.
3872 (c_parser_unary_expression): Likewise when handling addresses of
3873 labels.
3874 (c_parser_postfix_expression): Likewise for statement expressions,
3875 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3876 __builtin_va_arg, and for __builtin_offset_of.
3877 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3878 src_range using the range of the braced initializer.
3879 (c_parser_transaction_expression): Set src_range for "ret" to a
3880 sane pair of values.
3881
fff77217
KY
38822015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3883
3884 * c-parser.c (c_finish_omp_declare_simd): Look for
3885 "simd" attribute as well. Update error message.
3886
1d899da2
TS
38872015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3888
3889 * c-parser.c (c_parser_omp_declare_target): Adjust.
3890
e4606348
JJ
38912015-11-14 Jakub Jelinek <jakub@redhat.com>
3892
3893 * c-typeck.c (c_finish_omp_clauses): Don't mark
3894 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3895
3e636daf
MP
38962015-11-14 Marek Polacek <polacek@redhat.com>
3897
3898 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3899 * c-typeck.c: Likewise.
3900
ebedc9a3
DM
39012015-11-13 David Malcolm <dmalcolm@redhat.com>
3902
3903 * c-decl.c (warn_defaults_to): Pass line_table to
3904 rich_location ctor.
3905 * c-errors.c (pedwarn_c99): Likewise.
3906 (pedwarn_c90): Likewise.
3907 * c-parser.c (set_c_expr_source_range): New functions.
3908 (c_token::get_range): New method.
3909 (c_token::get_finish): New method.
3910 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3911 based on the range from the start of the LHS to the end of the
3912 RHS.
3913 (c_parser_conditional_expression): Likewise, based on the range
3914 from the start of the cond.value to the end of exp2.value.
3915 (c_parser_binary_expression): Call set_c_expr_source_range on
3916 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3917 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3918 based on the cast_loc through to the end of the expr.
3919 (c_parser_unary_expression): Likewise, based on the
3920 op_loc through to the end of op.
3921 (c_parser_sizeof_expression) Likewise, based on the start of the
3922 sizeof token through to either the closing paren or the end of
3923 expr.
3924 (c_parser_postfix_expression): Likewise, using the token range,
3925 or from the open paren through to the close paren for
3926 parenthesized expressions.
3927 (c_parser_postfix_expression_after_primary): Likewise, for
3928 various kinds of expression.
3929 * c-tree.h (struct c_expr): Add field "src_range".
3930 (c_expr::get_start): New method.
3931 (c_expr::get_finish): New method.
3932 (set_c_expr_source_range): New decls.
3933 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
3934 on ret for prefix unary ops.
3935 (parser_build_binary_op): Likewise, running from the start of
3936 arg1.value through to the end of arg2.value.
3937
ec8b536f
MP
39382015-11-13 Marek Polacek <polacek@redhat.com>
3939
3940 PR c/68320
3941 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
3942
277fe616
DM
39432015-11-13 David Malcolm <dmalcolm@redhat.com>
3944
3945 * c-typeck.c: Include spellcheck.h.
3946 (lookup_field_fuzzy_find_candidates): New function.
3947 (lookup_field_fuzzy): New function.
3948 (build_component_ref): If the field was not found, try using
3949 lookup_field_fuzzy and potentially offer a suggestion.
3950
6e232ba4
JN
39512015-11-12 James Norris <jnorris@codesourcery.com>
3952 Joseph Myers <joseph@codesourcery.com>
3953
3954 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
3955 (c_parser_omp_clause_name): Handle 'device_resident' clause.
3956 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3957 and PRAGMA_OMP_CLAUSE_LINK.
3958 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
3959 and PRAGMA_OACC_CLAUSE_LINK.
3960 (OACC_DECLARE_CLAUSE_MASK): New definition.
3961 (c_parser_oacc_declare): New function.
3962
9be4f715
MP
39632015-11-12 Marek Polacek <polacek@redhat.com>
3964
3965 PR c/67784
3966 * c-parser.c (c_parser_for_statement): Reclassify the token in
3967 a correct scope.
3968
e78bede6
MP
39692015-11-11 Marek Polacek <polacek@redhat.com>
3970
3971 PR c/68107
3972 PR c++/68266
3973 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
3974 checking the size of an array.
3975
69f293c9
AM
39762015-11-11 Andrew MacLeod <amacleod@redhat.com>
3977
3978 * c-array-notation.c: Remove unused header files.
3979 * c-aux-info.c: Likewise.
3980 * c-convert.c: Likewise.
3981 * c-decl.c: Likewise.
3982 * c-errors.c: Likewise.
3983 * c-lang.c: Likewise.
3984 * c-objc-common.c: Likewise.
3985 * c-parser.c: Likewise.
3986 * c-typeck.c: Likewise.
3987 * gccspec.c: Likewise.
3988
3a40d81d
NS
39892015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3990 Cesar Philippidis <cesar@codesourcery.com>
3991 James Norris <jnorris@codesourcery.com>
3992 Julian Brown <julian@codesourcery.com>
3993 Nathan Sidwell <nathan@codesourcery.com>
3994
3a40d81d
NS
3995 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
3996 routine arg.
3997 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
3998 (c_parser_pragma): Parse 'acc routine'.
3999 (OACC_ROUTINE_CLAUSE_MARK): Define.
4000 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4001
fc402eec
AA
40022015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4003
4004 PR debug/67192
4005 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4006 location of the backward-goto to the start of the loop body.
4007
f6b0b3db
AA
40082015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4009
4010 PR debug/67192
4011 * c-parser.c (c_parser_while_statement): Finish the loop before
4012 parsing ahead for misleading indentation.
4013 (c_parser_for_statement): Likewise.
4014
ee45a32d
EB
40152015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4016
4017 * c-decl.c (finish_struct): If the structure has reverse storage
4018 order, rewrite the type of array fields with scalar component. Call
4019 maybe_apply_pragma_scalar_storage_order on entry.
4020 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4021 errors on bit-fields and reverse SSO here and not...
4022 (c_mark_addressable): ...here.
4023 (output_init_element): Adjust call to initializer_constant_valid_p.
4024 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4025
8a645150
DM
40262015-11-06 David Malcolm <dmalcolm@redhat.com>
4027
4028 * c-decl.c (warn_defaults_to): Update for change in signature
4029 of diagnostic_set_info.
4030 * c-errors.c (pedwarn_c99): Likewise.
4031 (pedwarn_c90): Likewise.
4032 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4033 for textinfo::set_location.
4034
7a5e4956
CP
40352015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4036 Thomas Schwinge <thomas@codesourcery.com>
4037 James Norris <jnorris@codesourcery.com>
4038
4039 * c-parser.c (c_parser_omp_clause_name): Add support for
4040 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4041 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4042 default(none) in OpenACC.
4043 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4044 arguments.
4045 (c_parser_oacc_clause_tile): New function.
4046 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4047 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4048 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4049 TILE}.
4050 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4051 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4052 FIRSTPRIVATE}.
4053 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4054 (c_parser_oacc_update): Update the error message for missing clauses.
4055 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4056 and OMP_CLAUSE_INDEPENDENT.
4057
bfcfbfa0
MP
40582015-11-05 Marek Polacek <polacek@redhat.com>
4059
4060 PR c/68090
4061 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4062 deal with pre-evaluation on invalid types.
4063
e01d41e5
JJ
40642015-11-05 Jakub Jelinek <jakub@redhat.com>
4065 Ilya Verbin <ilya.verbin@intel.com>
4066
4067 * c-parser.c: Include context.h and gimple-expr.h.
4068 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4069 monotonic together with nonmonotonic.
4070 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4071 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4072 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4073 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4074 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4075 expressions on combined target teams before the target.
4076 (c_parser_omp_declare_target): If decl has "omp declare target" or
4077 "omp declare target link" attribute, and cgraph or varpool node already
4078 exists, then set corresponding flags. Call c_finish_omp_clauses
4079 in the parenthesized extended-list syntax case.
4080 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4081 declare target.
4082 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4083 on OMP_CLAUSE_REDUCTION array sections.
4084 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4085 into the constant offset, or for variable low-bound using
4086 POINTER_PLUS_EXPR. For structure element based array sections use
4087 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4088 (c_finish_omp_clauses): Drop generic_field_head, structure
4089 elements are now always mapped even as array section bases,
4090 diagnose same var in data sharing and mapping clauses. Diagnose if
4091 linear step on declare simd is neither a constant nor a uniform
4092 parameter. Look through POINTER_PLUS_EXPR for array section
4093 reductions. Diagnose the same var or function appearing multiple
4094 times on the same directive. Fix up wording for the to clause if t
4095 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4096 modifier on kinds other than dynamic or guided or nonmonotonic
4097 modifier together with ordered clause.
4098
4bf9e5a8
TS
40992015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4100 Chung-Lin Tang <cltang@codesourcery.com>
4101
4102 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4103
2adfab87
AM
41042015-10-29 Andrew MacLeod <amacleod@redhat.com>
4105
4106 * c-array-notation.c: Reorder #include's and remove duplicates.
4107 * c-aux-info.c: Likewise.
4108 * c-convert.c: Likewise.
4109 * c-decl.c: Likewise.
4110 * c-errors.c: Likewise.
4111 * c-lang.c: Likewise.
4112 * c-objc-common.c: Likewise.
4113 * c-parser.c: Likewise.
4114 * c-typeck.c: Likewise.
4115
e922069e
JW
41162015-10-26 Jim Wilson <jim.wilson@linaro.org>
4117
4118 PR debug/66068
4119 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4120 after calling build_qualified_type.
4121
765dd391
CP
41222015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4123 Thomas Schwinge <thomas@codesourcery.com>
4124 James Norris <jnorris@codesourcery.com>
4125 Joseph Myers <joseph@codesourcery.com>
4126 Julian Brown <julian@codesourcery.com>
4127 Bernd Schmidt <bschmidt@redhat.com>
4128
4129 * c-parser.c (c_parser_oacc_shape_clause): New.
4130 (c_parser_oacc_simple_clause): New.
4131 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4132 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4133
88bae6f4
TS
41342015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4135 James Norris <jnorris@codesourcery.com>
4136 Cesar Philippidis <cesar@codesourcery.com>
4137
4138 PR c/64765
4139 PR c/64880
4140 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4141 parameters, and handle these. Adjust all users.
4142 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4143 into...
4144 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4145 all users.
4146 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4147 declare functions.
4148 (c_finish_omp_construct): Declare function.
4149 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4150 Merge functions into...
4151 (c_finish_omp_construct): ... this new function.
4152
a8fc2579
RB
41532015-10-22 Richard Biener <rguenther@suse.de>
4154
4155 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4156 before folding a MINUS_EXPR.
4157
e9122ef6
MP
41582015-10-21 Marek Polacek <polacek@redhat.com>
4159
4160 PR c/68024
4161 * c-decl.c (start_function): Warn about vararg functions without
4162 a prototype.
4163
9f47c7e5
IE
41642015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4165
4166 * c-typeck.c (build_conditional_expr): Use boolean vector
4167 type for vector comparison.
4168 (build_vec_cmp): New.
4169 (build_binary_op): Use build_vec_cmp for comparison.
4170
fa60eeb9
MP
41712015-10-20 Marek Polacek <polacek@redhat.com>
4172
4173 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4174
2c7020eb
MP
41752015-10-20 Marek Polacek <polacek@redhat.com>
4176
4177 PR c/67964
4178 * c-parser.c (c_parser_attributes): Break out of the loop if the
4179 token after an attribute isn't a comma.
4180
d9a6bd32
JJ
41812015-10-13 Jakub Jelinek <jakub@redhat.com>
4182 Aldy Hernandez <aldyh@redhat.com>
4183
4184 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4185 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4186 (c_parser_omp_variable_list): Handle structure elements for
4187 map, to and from clauses. Handle array sections in reduction
4188 clause. Formatting fixes.
4189 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4190 if clause modifiers.
4191 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4192 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4193 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4194 c_parser_omp_clause_is_device_ptr): New functions.
4195 (c_parser_omp_clause_ordered): Parse optional parameter.
4196 (c_parser_omp_clause_reduction): Handle array reductions.
4197 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4198 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4199 functions.
4200 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4201 (c_parser_omp_clause_depend_sink): New function.
4202 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4203 (c_parser_omp_clause_map): Parse release/delete map kinds and
4204 optional always modifier.
4205 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4206 and c_finish_omp_clauses callers.
4207 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4208 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4209 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4210 (OMP_CRITICAL_CLAUSE_MASK): Define.
4211 (c_parser_omp_critical): Parse critical clauses.
4212 (c_parser_omp_for_loop): Handle doacross loops, adjust
4213 c_finish_omp_for and c_finish_omp_clauses callers.
4214 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4215 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4216 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4217 (c_parser_omp_for): Disallow ordered clause when combined with
4218 distribute. Disallow linear clause when combined with distribute
4219 and not combined with simd.
4220 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4221 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4222 parse clauses and if depend clause is found, don't parse a body.
4223 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4224 Allow target parallel without for after it.
4225 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4226 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4227 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4228 invalid kinds.
4229 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4230 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4231 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4232 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4233 functions.
4234 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4235 defaultmap and is_device_ptr clauses.
4236 (c_parser_omp_target): Parse target parallel and target simd. Set
4237 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4238 and target exit data. Diagnose invalid map kinds.
4239 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4240 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4241 construct.
4242 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4243 &omp_priv.
4244 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4245 (c_parser_omp_taskloop): New function.
4246 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4247 handle PRAGMA_OMP_TASKLOOP.
4248 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4249 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4250 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4251 Add IS_OMP argument, handle structure element bases, diagnose
4252 bitfields, pass IS_OMP recursively, diagnose known zero length
4253 array sections in depend clauses, handle array sections in reduction
4254 clause, diagnose negative length even for pointers.
4255 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4256 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4257 array sections in reduction clause, set
4258 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4259 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4260 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4261 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4262
21ba0cea
MP
42632015-10-06 Marek Polacek <polacek@redhat.com>
4264
4265 * c-parser.c (c_parser_statement_after_labels): Use
4266 protected_set_expr_location.
4267 (c_parser_omp_clause_num_gangs): Likewise.
4268 (c_parser_omp_clause_num_threads): Likewise.
4269 (c_parser_omp_clause_num_workers): Likewise.
4270 (c_parser_omp_clause_vector_length): Likewise.
4271 (c_parser_omp_clause_num_teams): Likewise.
4272 (c_parser_omp_clause_thread_limit): Likewise.
4273 * c-typeck.c (build_c_cast): Likewise.
4274 (c_cast_expr): Likewise.
4275
624d31fe
RS
42762015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4277
4278 * c-typeck.c (c_tree_equal): Use real_equal instead of
4279 REAL_VALUES_EQUAL.
4280
b8fd7909
JM
42812015-10-04 Jason Merrill <jason@redhat.com>
4282
4283 * c-parser.c (c_lex_one_token): Handle @synchronized.
4284 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4285 can change whether the function is transaction_safe.
4286
1c7485af
MP
42872015-10-02 Marek Polacek <polacek@redhat.com>
4288
4289 PR c/67730
4290 * c-typeck.c (convert_for_assignment): Use the expansion point
4291 location throughout.
4292
3e3b8d63
MP
42932015-10-02 Marek Polacek <polacek@redhat.com>
4294
4295 PR c/64249
4296 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4297 and pass it down to c_parser_if_statement.
4298 (c_parser_else_body): Add CHAIN parameter and pass it down to
4299 c_parser_statement_after_labels.
4300 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4301 duplicated if-else-if conditions.
4302
aabef2de
MP
43032015-10-01 Marek Polacek <polacek@redhat.com>
4304
4305 * c-typeck.c (convert_for_assignment): Improve commentary.
4306
de8ddd5f
MP
43072015-09-30 Marek Polacek <polacek@redhat.com>
4308
4309 PR c/67730
4310 * c-typeck.c (c_finish_return): Use the expansion point location for
4311 certain "return with value" warnings.
4312
c4914de6
MLI
43132015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4314
4315 * c-parser.c (pragma_lex): Add loc argument.
4316
0e36f5c7
MP
43172015-09-15 Marek Polacek <polacek@redhat.com>
4318
4319 PR c/67580
4320 * c-decl.c (tag_exists_p): New function.
4321 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4322 struct/union/enum keywords are missing.
4323 * c-tree.h (tag_exists_p): Declare.
4324
2f3bb934
MP
43252015-09-15 Marek Polacek <polacek@redhat.com>
4326
4327 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4328 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4329 Return NULL_TREE instead of 0.
4330 (lookup_name): Return NULL_TREE instead of 0.
4331 (lookup_name_in_scope): Likewise.
4332 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4333 (parser_xref_tag): Use false instead of 0.
4334 (start_struct): Use true instead of 1.
4335 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4336
aa256c4a
MP
43372015-09-14 Marek Polacek <polacek@redhat.com>
4338
4339 * c-typeck.c (set_nonincremental_init_from_string): Use
4340 HOST_WIDE_INT_M1U when shifting a negative value.
4341
dbb68221
MW
43422015-09-09 Mark Wielaard <mjw@redhat.com>
4343
4344 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4345 parm against NULL.
4346
a8a098ac
JJ
43472015-09-10 Jakub Jelinek <jakub@redhat.com>
4348
4349 PR c/67502
4350 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4351 into OMP_FOR_PRE_BODY rather than before the loop.
4352
f4b189d5
JJ
43532015-09-09 Jakub Jelinek <jakub@redhat.com>
4354
0bb99c11
JJ
4355 PR c/67501
4356 * c-parser.c (c_parser_oacc_all_clauses,
4357 c_parser_omp_all_clauses): Remove invalid clause from
4358 list of clauses even if parser->error is set.
4359
fce5e5e3
JJ
4360 PR c/67500
4361 * c-parser.c (c_parser_omp_clause_aligned,
4362 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4363 test for errors.
4364 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4365 error_mark_node.
4366
f4b189d5
JJ
4367 PR c/67495
4368 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4369 instead of c_parser_unary_expression. If the result is !lvalue_p,
4370 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4371
b2aaf235
MP
43722015-09-04 Marek Polacek <polacek@redhat.com>
4373
4374 PR sanitizer/67279
4375 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4376
1807ffc1
MS
43772015-09-03 Martin Sebor <msebor@redhat.com>
4378
4379 PR c/66516
8b652e65
JJ
4380 * c-typeck.c (convert_arguments, parser_build_unary_op,
4381 build_conditional_expr, c_cast_expr, convert_for_assignment,
4382 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4383 reject_gcc_builtin.
4384 (c_decl_implicit): Define.
4385
d04ff417
MP
43862015-09-02 Marek Polacek <polacek@redhat.com>
4387
4388 PR c/67432
4389 * c-parser.c (c_parser_enum_specifier): Give a better error for
4390 an empty enum.
4391
a79683d5
TS
43922015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4393
4394 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4395
191a6b94
MP
43962015-08-12 Marek Polacek <polacek@redhat.com>
4397
4398 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4399 LOC to it.
4400
420a9d9b
MP
44012015-08-03 Marek Polacek <polacek@redhat.com>
4402
4403 PR c/67088
4404 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4405 Use it.
4406 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4407
992118a1
PP
44082015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4409
4410 * c-parser.c (c_parser_if_body): Take token_indent_info
4411 argument. Call warn_for_misleading_indentation even when the
4412 body is a semicolon. Extract token_indent_infos corresponding
4413 to the guard, body and next tokens. Adjust call to
4414 warn_for_misleading_indentation accordingly.
4415 (c_parser_else_body): Likewise.
4416 (c_parser_if_statement): Likewise.
4417 (c_parser_while_statement): Likewise.
4418 (c_parser_for_statement): Likewise.
4419
46308474
LFSM
44202015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4421 Manuel López-Ibáñez <manu@gcc.gnu.org>
4422
4423 * c-decl.c (get_parm_info): Remove static var. Update warning
4424 message.
4425
05b28fd6
MP
44262015-07-27 Marek Polacek <polacek@redhat.com>
4427
4428 PR c++/66555
4429 PR c/54979
4430 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4431
451b5e48
MP
44322015-07-20 Marek Polacek <polacek@redhat.com>
4433
4434 PR c++/55095
4435 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4436 (build_binary_op): Warn about left shift overflows.
4437
1916bcb5
AM
44382015-07-09 Andrew MacLeod <amacleod@redhat.com>
4439
4440 * c-array-notation.c: Adjust includes for flags.h changes.
4441 * c-objc-common.c: Likewise.
4442
c7131fb2
AM
44432015-07-07 Andrew MacLeod <amacleod@redhat.com>
4444
4445 * c-array-notation.c: Adjust includes.
4446 * c-aux-info.c: Likewise.
4447 * c-convert.c: Likewise.
4448 * c-decl.c: Likewise.
4449 * c-errors.c: Likewise.
4450 * c-lang.c: Likewise.
4451 * c-objc-common.c: Likewise.
4452 * c-parser.c: Likewise.
4453 * c-typeck.c: Likewise.
4454
da2e71c9
MLI
44552015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4456
4457 PR fortran/66605
4458 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4459
b155cfd9
MP
44602015-06-29 Marek Polacek <polacek@redhat.com>
4461
4462 PR c/66322
4463 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4464 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4465 about -Wswitch-bool here.
4466 (do_case): Update c_add_case_label call.
4467 (c_finish_case): Update c_do_switch_warnings call.
4468
31521951
MP
44692015-06-27 Marek Polacek <polacek@redhat.com>
4470
4471 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4472
22d03525
MP
44732015-06-26 Marek Polacek <polacek@redhat.com>
4474
4475 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4476 INDIRECT_REF_P.
4477 * c-typeck.c (array_to_pointer_conversion): Likewise.
4478 (build_unary_op): Likewise.
4479 (c_finish_return): Likewise.
4480
f0889939
AM
44812015-06-25 Andrew MacLeod <amacleod@redhat.com>
4482
4483 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4484 * c-parser.c: Likewise.
4485
8d67ee55
RS
44862015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4487
4488 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4489 instead of pointer_hash.
4490 (detect_field_duplicates): Likewise.
4491
0ae9bd27
MP
44922015-06-25 Marek Polacek <polacek@redhat.com>
4493
4494 * c-array-notation.c: Use VAR_P throughout.
4495 * c-decl.c: Likewise.
4496 * c-objc-common.c: Likewise.
4497 * c-parser.c: Likewise.
4498 * c-typeck.c: Likewise.
4499
62f9079a
MP
45002015-06-25 Marek Polacek <polacek@redhat.com>
4501
4502 * c-decl.c: Use is_global_var throughout.
4503 * c-parser.c: Likewise.
4504 * c-typeck.c: Likewise.
4505
abb226c9
AM
45062015-06-17 Andrew MacLeod <amacleod@redhat.com>
4507
4508 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4509 * c-aux-info.c: Likewise.
4510 * c-convert.c: Likewise.
4511 * c-decl.c: Likewise.
4512 * c-errors.c: Likewise.
4513 * c-lang.c: Likewise.
4514 * c-objc-common.c: Likewise.
4515 * c-parser.c: Likewise.
4516 * c-typeck.c: Likewise.
4517
8cbababc
JH
45182015-06-11 Jan Hubicka <hubicka@ucw.cz>
4519
4520 PR middle-end/66325
4521 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4522 variants.
4523
a0349665
PMR
45242015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4525
4526 * c-decl.c (pop_scope): Register the main translation unit
4527 through the new debug hook.
4528
13fdf2e2
AM
45292015-06-08 Andrew MacLeod <amacleod@redhat.com>
4530
4531 * c-array-notation.c : Adjust include files.
4532 * c-aux-info.c : Likewise.
4533 * c-convert.c : Likewise.
4534 * c-decl.c : Likewise.
4535 * c-errors.c : Likewise.
4536 * c-lang.c : Likewise.
4537 * c-lang.h : Likewise.
4538 * c-objc-common.c : Likewise.
4539 * c-parser.c : Likewise.
4540 * c-typeck.c : Likewise.
4541
d7438551
AH
45422015-06-05 Aldy Hernandez <aldyh@redhat.com>
4543
4544 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4545 immediately clobber it.
4546 (c_write_global_declarations_1): Remove call to
4547 check_global_declaration_1.
4548 (c_write_global_declarations_2): Remove.
4549 (c_write_final_cleanups): Rename from c_write_global_declarations.
4550 Remove call to finalize_compilation_unit.
4551 Remove calls to debugging hooks.
4552 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4553 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4554 * c-tree.h: Remove c_write_global_declarations.
4555
ecb9f223
AM
45562015-06-04 Andrew MacLeod <amacleod@redhat.com>
4557
4558 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4559 * c-aux-info.c: Likewise.
4560 * c-convert.c: Likewise.
4561 * c-decl.c: Likewise.
4562 * c-errors.c: Likewise.
4563 * c-lang.c: Likewise.
4564 * c-objc-common.c: Likewise.
4565 * c-parser.c: Likewise.
4566 * c-typeck.c: Likewise.
4567
9482b620
MP
45682015-06-04 Marek Polacek <polacek@redhat.com>
4569
4570 PR c/66341
4571 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4572 it is a lvalue.
4573
bc51ace3
PK
45742015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4575
4576 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4577 Warn for empty struct.
4578 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4579
ea5b45b6
AT
45802015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4581
4582 * c-decl.c (start_function): Call plugin before parsing.
4583 (finish_function): Call plugin after parsing.
4584
c2d47482
PK
45852015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4586
4587 PR c/49551
4588 * c-decl.c (merge_decls): Merge DECL_COMMON.
4589
a95492ab
JW
45902015-05-22 Jim Wilson <jim.wilson@linaro.org>
4591
4592 * Make-lang.in (check_gcc_pallelize): Define.
4593
fd5c817a
MP
45942015-05-22 Marek Polacek <polacek@redhat.com>
4595
4596 PR c/47043
4597 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4598 attributes.
4599
c7b70a3c
MP
46002015-05-21 Marek Polacek <polacek@redhat.com>
4601
4602 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4603 DECL_BUILT_IN.
4604
21b634ae
MP
46052015-05-20 Marek Polacek <polacek@redhat.com>
4606
4607 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4608 * c-typeck.c: Likewise.
4609
296a8c2f
MP
46102015-05-19 Marek Polacek <polacek@redhat.com>
4611
4612 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4613
41b37d5e
JJ
46142015-05-19 Jakub Jelinek <jakub@redhat.com>
4615
4616 PR middle-end/66199
4617 * c-parser.c (c_parser_omp_for_loop): Don't add
4618 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4619 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4620 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4621 constructs.
4622
fab27f52
MM
46232015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4624
4625 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4626 swaps.
fab27f52 4627
40de31cf
MLI
46282015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4629
4630 PR fortran/44054
4631 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4632 accessor function.
4633
3aa3c9fc
MP
46342015-05-14 Marek Polacek <polacek@redhat.com>
4635
4636 PR c/66066
4637 PR c/66127
4638 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4639 rather than with 0.
4640
c3388e62
DM
46412015-05-12 David Malcolm <dmalcolm@redhat.com>
4642
4643 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4644 to add a call to warn_for_misleading_indentation.
4645 (c_parser_else_body): Likewise, adding param "else_loc".
4646 (c_parser_if_statement): Check for misleading indentation.
4647 (c_parser_while_statement): Likewise.
4648 (c_parser_for_statement): Likewise.
4649
755e528f
MP
46502015-05-08 Marek Polacek <polacek@redhat.com>
4651
4652 PR c/64918
4653 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4654 (output_init_element): Likewise.
4655
0173bd2a
MP
46562015-05-07 Marek Polacek <polacek@redhat.com>
4657
4658 PR c/65179
4659 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4660 value.
4661
9babc352
MP
46622015-04-30 Marek Polacek <polacek@redhat.com>
4663
4664 * c-typeck.c (set_init_label): Call error_at instead of error and
4665 pass LOC to it.
4666
ac9f18db
MP
4667 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4668 the type of a decl.
4669
ec3fba51
MP
4670 * c-typeck.c (c_build_va_arg): Clarify the error message.
4671
b811915d
TS
46722015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4673
4674 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4675 OMP_STANDALONE_CLAUSES.
4676
f3075008
MP
46772015-04-28 Marek Polacek <polacek@redhat.com>
4678
4679 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4680
4e81b788
MP
46812015-04-28 Marek Polacek <polacek@redhat.com>
4682
4683 PR c/65901
4684 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4685
6c1db78e
MP
46862015-04-25 Marek Polacek <polacek@redhat.com>
4687
4688 PR c/52085
4689 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4690 attribute.
4691
5c4abbb8
MP
46922015-04-23 Marek Polacek <polacek@redhat.com>
4693
4694 PR c/65345
4695 * c-decl.c (set_labels_context_r): New function.
4696 (store_parm_decls): Call it via walk_tree_without_duplicates.
4697 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4698 instead of create_tmp_var. Build TARGET_EXPR instead of
4699 COMPOUND_EXPR.
4700 (build_atomic_assign): Use create_tmp_var_raw instead of
4701 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4702
06aca1d5
IV
47032015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4704
4705 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4706 (c_parser_omp_target_update): Add missed %> to error_at ().
4707
8fba1830
BRF
47082015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4709
4710 PR target/55143
4711 * c-decl.c (c_default_pointer_mode): Remove definition.
4712 * c-tree.h (c_default_pointer_mode): Remove declaration.
4713
62021f64
TB
47142015-03-27 Tobias Burnus <burnus@net-b.de>
4715
4716 PR c/65586
4717 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4718 error out.
4719 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4720 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4721 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4722
9b65e171
JJ
47232015-03-19 Jakub Jelinek <jakub@redhat.com>
4724
4725 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4726 attribute for DECL_EXTERNAL VAR_DECLs.
4727
17958621
JJ
47282015-03-11 Jakub Jelinek <jakub@redhat.com>
4729
4730 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4731 argument.
4732
7ccb1a11
JJ
47332015-03-10 Jakub Jelinek <jakub@redhat.com>
4734
4735 PR c/65120
4736 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4737 before preparing arguments to warn_logical_not_parentheses.
4738
01177669
JJ
47392015-03-09 Jakub Jelinek <jakub@redhat.com>
4740
4741 PR c/65120
4742 * c-typeck.c (parser_build_binary_op): Don't warn for
4743 !!x == y or !b == y where b is _Bool.
4744
802ac282
MP
47452015-03-09 Marek Polacek <polacek@redhat.com>
4746
4747 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4748 * c-decl.c (grokdeclarator): Likewise.
4749 * c-typeck.c (build_binary_op): Likewise.
4750
e5165b60
MP
47512015-02-27 Marek Polacek <polacek@redhat.com>
4752
4753 PR c/65228
4754 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4755
065d214c
MP
47562015-02-14 Marek Polacek <polacek@redhat.com>
4757
4758 PR c/64768
4759 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4760 declared through a typedef name.
4761
e5d9235b
MP
47622015-02-13 Marek Polacek <polacek@redhat.com>
4763
4764 PR c/65050
4765 * c-decl.c (grokdeclarator): Print also the type when giving
4766 the error message about array's incomplete element type.
4767
fa01ffcc
JJ
47682015-02-11 Jakub Jelinek <jakub@redhat.com>
4769
4770 PR c/64824
4771 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4772 check in the POP macro.
4773
c3e38a03
MP
47742015-02-09 Marek Polacek <polacek@redhat.com>
4775
4776 PR c/64856
4777 * c-typeck.c (process_init_element): Don't always wrap
4778 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4779 initializing a range of elements.
4780
4886ec8e
JJ
47812015-02-04 Jakub Jelinek <jakub@redhat.com>
4782
4783 PR c/64824
4784 PR c/64868
4785 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4786
c3e38a03 47872015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4788
4789 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4790 processing enum declaration.
4791
7b33f0c8
MP
47922015-01-29 Marek Polacek <polacek@redhat.com>
4793
4794 PR c/64709
4795 * c-typeck.c (pop_init_level): If constructor_elements has
4796 exactly one element with integer_zerop value, set constructor_zeroinit
4797 to 1. Remove braces around warning_init call.
4798
dea63e49
JJ
47992015-01-27 Jakub Jelinek <jakub@redhat.com>
4800
4801 PR c/64766
4802 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4803 of FUNCTION_DECLs with error_mark_node.
4804
d38f7dce
JJ
48052015-01-26 Jakub Jelinek <jakub@redhat.com>
4806
4807 PR c/64778
4808 * c-typeck.c (convert_arguments): Return -1 if there are
4809 error_args, even if we've diagnosed too many arguments.
4810
cbf5d0e7
RB
48112015-01-21 Richard Biener <rguenther@suse.de>
4812
4813 PR middle-end/64313
4814 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4815 for builtins the user declared correctly.
4816
41dbbb37
TS
48172015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4818 Bernd Schmidt <bernds@codesourcery.com>
4819 Cesar Philippidis <cesar@codesourcery.com>
4820 James Norris <jnorris@codesourcery.com>
4821 Jakub Jelinek <jakub@redhat.com>
4822 Ilmir Usmanov <i.usmanov@samsung.com>
4823
4824 * c-parser.c: Include "gomp-constants.h".
4825 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4826 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4827 Use OMP_CLAUSE_SET_MAP_KIND.
4828 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4829 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4830 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4831 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4832 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4833 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4834 "copyout", "create", "delete", "deviceptr", "gang", "host",
4835 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4836 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4837 "present_or_create", "pcreate", "seq", "self", "vector",
4838 "vector_length", "wait", "worker".
4839 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4840 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4841 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4842 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4843 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4844 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4845 (c_parser_oacc_data_clause_deviceptr)
4846 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4847 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4848 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4849 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4850 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4851 (c_parser_oacc_parallel, c_parser_oacc_update)
4852 (c_parser_oacc_wait): New functions.
4853 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4854 (c_finish_oacc_data): New prototypes.
4855 * c-typeck.c: Include "gomp-constants.h".
4856 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4857 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4858 OMP_CLAUSE_SET_MAP_KIND.
4859 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4860 (c_finish_oacc_data): New functions.
4861 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4862 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4863 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4864 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4865 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4866 GOMP_MAP_FORCE_DEVICEPTR.
4867
adfac8df
JJ
48682015-01-09 Michael Collison <michael.collison@linaro.org>
4869
4870 * c-array-notation.c: Include hash-set.h, machmode.h,
4871 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4872 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4873 * c-aux-info.c: Ditto.
4874 * c-convert.c: Ditto.
4875 * c-decl.c: Ditto.
4876 * c-errors.c: Ditto.
4877 * c-lang.c: Dittoxs.
4878 * c-objc-common.c: Ditto.
4879 * c-parser.c: Ditto.
4880 * c-typeck.c: Include hash-set.h, machmode.h,
4881 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4882 fold-const.h, wide-int.h, inchash.h, real.h and
4883 fixed-value.h due to flattening of tree.h.
4884
2cc901dc
MP
48852015-01-07 Marek Polacek <polacek@redhat.com>
4886
4887 PR c/64417
4888 * c-typeck.c (process_init_element): Disallow initialization of
4889 a flexible array member with a string constant if the structure
4890 is in an array.
4891
5624e564
JJ
48922015-01-05 Jakub Jelinek <jakub@redhat.com>
4893
e5341100
JJ
4894 PR sanitizer/64344
4895 * c-typeck.c (convert_for_assignment, c_finish_return): For
4896 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4897 types also set in_late_binary_op around convert call.
4898 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4899 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4900 result on expr as last argument to ubsan_instrument_float_cast,
4901 if in_late_binary_op, don't use c_save_expr but save_expr.
4902
5624e564
JJ
4903 Update copyright years.
4904
5bd012f8
MP
49052015-01-05 Marek Polacek <polacek@redhat.com>
4906
4907 PR c/64423
4908 * c-typeck.c (build_array_ref): Pass loc down to
4909 warn_array_subscript_with_type_char.
4910
3f8257db 49112014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4912
4913 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 4914 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 4915 element type.
8e745a17 4916 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 4917 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 4918 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 4919 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 4920 to PEDWARN_FOR_QUALIFIERS.
768952be 4921
8f94a8c4
JJ
49222014-12-17 Jakub Jelinek <jakub@redhat.com>
4923
4924 PR sanitizer/64289
4925 * c-convert.c: Include ubsan.h.
4926 (convert): For real -> integral casts and
4927 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4928 instead instrument the float cast directly.
4929
b731b390
JJ
49302014-11-29 Jakub Jelinek <jakub@redhat.com>
4931
4932 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
4933 c_finish_stmt_expr): Remove NULL last argument from
4934 create_tmp_var_raw and create_tmp_var calls.
4935 * c-array-notation.c (fix_builtin_array_notation_fn,
4936 build_array_notation_expr, fix_conditional_array_notations_1,
4937 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
4938
541e35a6
MP
49392014-11-28 Marek Polacek <polacek@redhat.com>
4940
4941 PR c/63862
4942 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
4943 convert the right operand to integer type.
4944
b286be94
MP
49452014-11-25 Marek Polacek <polacek@redhat.com>
4946
4947 PR c/63877
4948 * c-decl.c (start_function): Disable -Wmissing-declarations warning
4949 for inline functions.
4950
aa7da51a
JJ
49512014-11-21 Jakub Jelinek <jakub@redhat.com>
4952
4953 PR target/63764
4954 * c-typeck.c (build_array_ref): Adjust
4955 convert_vector_to_pointer_for_subscript caller. If it returns true,
4956 call non_lvalue_loc on the result.
4957
d876207f
RB
49582014-11-11 Richard Biener <rguenther@suse.de>
4959
4960 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
4961 to true.
4962
e5e44252
AK
49632014-11-10 Andi Kleen <ak@linux.intel.com>
4964
4965 PR c/60804
4966 * c-parser.c (c_parser_statement_after_labels): Call
4967 check_no_cilk.
4968 (c_parser_if_statement): Dito.
4969 (c_parser_switch_statement): Dito.
4970 (c_parser_while_statement): Dito.
4971 (c_parser_do_statement): Dito.
4972 (c_parser_for_statement): Dito.
4973 * c-typeck.c (c_finish_loop): Dito.
4974
13c21655
PC
49752014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4976
4977 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
4978 OPT_Wshift_count_overflow in the warnings.
4979
2d51fcef
MP
49802014-10-30 Marek Polacek <polacek@redhat.com>
4981
4982 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
4983 print the stripped version as well, if they're not the same.
4984
ef4bddc2
RS
49852014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4986
4987 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4988 machine_mode.
4989
c582198b
AM
49902014-10-28 Andrew MacLeod <amacleod@redhat.com>
4991
4992 * c-decl.c: Adjust include files.
4993 * c-parser.c: Ditto.
4994
ddc8de03
PM
49952014-10-27 Phil Muldoon <pmuldoon@redhat.com>
4996 Tom Tromey <tromey@redhat.com>
4997
4998 * c-tree.h (enum c_oracle_request): New.
4999 (c_binding_oracle_function): New typedef.
5000 (c_binding_oracle, c_pushtag, c_bind): Declare.
5001 * c-decl.c (c_binding_oracle): New global.
5002 (I_SYMBOL_CHECKED): New macro.
5003 (i_symbol_binding): New function.
5004 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5005 (I_TAG_CHECKED): New macro.
5006 (i_tag_binding): New function.
5007 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5008 (I_LABEL_CHECKED): New macro.
5009 (i_label_binding): New function.
5010 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5011 (c_print_identifier): Save and restore c_binding_oracle.
5012 (c_pushtag, c_bind): New functions.
5013
60393bbc
AM
50142014-10-27 Andrew MacLeod <amacleod@redhat.com>
5015
5016 * c-typeck.c: Adjust include files.
5017
d723bb7c
MLI
50182014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5019
5020 PR c++/53061
5021 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5022 initialization here...
5023 (c_initialize_diagnostics): ... but here. Set defaults after
5024 building pretty-printer.
5025
1bc5a451
MP
50262014-10-23 Marek Polacek <polacek@redhat.com>
5027
5028 PR c/63626
5029 * c-decl.c (pop_scope): Don't print warning in external_scope.
5030
4435bb92
MP
50312014-10-19 Marek Polacek <polacek@redhat.com>
5032
5033 PR c/63567
5034 * c-typeck.c (output_init_element): Allow initializing objects with
5035 static storage duration with compound literals even in C99 and add
5036 pedwarn for it.
5037
7278465e
MP
50382014-10-17 Marek Polacek <polacek@redhat.com>
5039
5040 PR c/63567
5041 * c-typeck.c (digest_init): Allow initializing objects with static
5042 storage duration with compound literals even in C99 and add pedwarn
5043 for it.
5044
d9b7be2e
MP
50452014-10-17 Marek Polacek <polacek@redhat.com>
5046
5047 PR c/63543
5048 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5049 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5050 error multiple times. Print the type.
5051
f406ae1f
MP
50522014-10-17 Marek Polacek <polacek@redhat.com>
5053
5054 PR c/63549
5055 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5056 type.
5057
92574c7c
MP
50582014-10-17 Marek Polacek <polacek@redhat.com>
5059
5060 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5061 (start_function): Use OPT_Wimplicit_int instead of 0.
5062 (store_parm_decls_oldstyle): Likewise.
5063
1bc4a978
MT
50642014-10-17 Alan Modra <amodra@gmail.com>
5065
5066 PR middle-end/61848
5067 * c-decl.c (merge_decls): Don't merge section name or tls model
5068 to newdecl symtab node, instead merge to olddecl. Override
5069 existing olddecl section name. Set tls_model for all thread-local
5070 vars, not just OMP thread-private ones. Remove incorrect comment.
5071
83685514
AM
50722014-10-16 Andrew MacLeod <amacleod@redhat.com>
5073
5074 * c-decl.c: Adjust include files.
5075
78a7c317
DD
50762014-10-14 DJ Delorie <dj@redhat.com>
5077
5078 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5079 (c_token_starts_typename): Check all __intN, not just __int128.
5080 (c_token_starts_declspecs): Likewise.
5081 (c_parser_declspecs): Likewise.
5082 (c_parser_attribute_any_word): Likewise.
5083 (c_parser_objc_selector): Likewise.
5084 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5085 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5086 is specified.
5087 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5088 __int128.
5089 (finish_declspecs): Likewise.
5090
74d98c1e
AB
50912014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5092
8e745a17 5093 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5094 the duplicate code.
8e745a17 5095 (c_parser_statement): Call the new function.
74d98c1e 5096
84937de2
MP
50972014-10-09 Marek Polacek <polacek@redhat.com>
5098
5099 PR c/63480
5100 * c-typeck.c (pop_init_level): Don't warn about initializing
5101 with { }.
5102
0382aaa0
MP
51032014-10-07 Marek Polacek <polacek@redhat.com>
5104
5105 PR c/59717
5106 * c-decl.c (header_for_builtin_fn): New function.
5107 (implicitly_declare): Suggest which header to include.
5108
7a0ca710
MP
51092014-10-07 Marek Polacek <polacek@redhat.com>
5110
5111 * c-convert.c (convert): Use error_operand_p.
5112 * c-typeck.c (require_complete_type): Likewise.
5113 (really_atomic_lvalue): Likewise.
5114 (digest_init): Likewise.
5115 (handle_omp_array_sections_1): Likewise.
5116
6bc8a126
MP
51172014-10-03 Marek Polacek <polacek@redhat.com>
5118
5119 PR c/63453
5120 * c-decl.c (pop_scope): Don't warn about "inline function declared
5121 but never defined" for functions marked with gnu_inline attribute.
5122
d90c0a59
JJ
51232014-09-25 Jakub Jelinek <jakub@redhat.com>
5124
5125 PR c++/63249
5126 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5127 on low_bound and length.
5128
083e891e
MP
51292014-09-24 Marek Polacek <polacek@redhat.com>
5130
5131 PR c/61405
5132 PR c/53874
5133 * c-parser.c: Don't define CPP_KEYWORD.
5134 (c_parser_switch_statement): Pass original type to c_finish_case.
5135 * c-tree.h (c_finish_case): Update declaration.
5136 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5137 conditionally to c_do_switch_warnings.
5138
8d95fe25
MP
51392014-09-03 Marek Polacek <polacek@redhat.com>
5140
5141 PR c/62024
5142 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5143 conversions.
5144
9a771876
JJ
51452014-09-02 Jakub Jelinek <jakub@redhat.com>
5146 Balaji V. Iyer <balaji.v.iyer@intel.com>
5147 Igor Zamyatin <igor.zamyatin@intel.com>
5148
5149 * c-parser.c (c_parser_cilk_for): New function.
5150 (c_parser_cilk_grainsize): Likewise.
5151 (c_get_temp_regvar): Likewise.
5152 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5153 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5154 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5155 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5156 case.
5157
b7679d96
CG
51582014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5159
5160 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5161 with using HOST_WIDE_INT without truncation to 'int'
5162
59ea0364
MP
51632014-08-22 Marek Polacek <polacek@redhat.com>
5164
5165 PR c++/62199
5166 * c-typeck.c (parser_build_binary_op): Adjust call to
5167 warn_logical_not_parentheses.
5168
671a475e
IZ
51692014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5170
5171 PR other/62008
5172 * c-parser.c (c_parser_array_notation): Check for correct
5173 type of an array added.
5174
04159acf
MP
51752014-08-19 Marek Polacek <polacek@redhat.com>
5176
5177 PR c++/62153
5178 * c-typeck.c (build_binary_op): If either operand of a comparison
5179 is a boolean expression, call maybe_warn_bool_compare.
5180
c77935ee
PP
51812014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5182
5183 PR c/45584
5184 * c-typeck.c (build_c_cast): Do a conversion even when the
5185 TYPE_MAIN_VARIANTs are the same.
5186
35aff4fb
MP
51872014-08-19 Marek Polacek <polacek@redhat.com>
5188
5189 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5190 pedwarn_c99 instead of pedwarn.
5191 (grokfield): Likewise.
5192 (warn_defaults_to): New function.
5193 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5194 Unconditionally call pedwarn_c99 instead of pedwarn.
5195 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5196 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5197 check flag_isoc11 before.
5198 * c-errors.c (pedwarn_c99): Change the return type to bool.
5199 Handle -Wc99-c11-compat.
5200 * c-parser.c (disable_extension_diagnostics): Handle
5201 warn_c99_c11_compat.
5202 (restore_extension_diagnostics): Likewise.
5203 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5204 instead of pedwarn, don't check flag_isoc11 before.
5205 (c_parser_declspecs): Likewise.
5206 (c_parser_alignas_specifier): Likewise.
5207 (c_parser_alignof_expression): Likewise.
5208 (c_parser_generic_selection): Likewise.
5209 * c-tree.h (pedwarn_c99): Update declaration.
5210 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5211 of pedwarn_c99.
5212
177cce46
MP
52132014-08-19 Marek Polacek <polacek@redhat.com>
5214
5215 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5216 to pedwarn_c90.
5217 * c-errors.c: Include "opts.h".
5218 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5219 * c-parser.c (disable_extension_diagnostics): Handle negative value
5220 of warn_c90_c99_compat, too.
5221 (restore_extension_diagnostics): Likewise.
5222 (c_parser_compound_statement_nostart): Pass
5223 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5224
6dc99c33
MP
52252014-08-12 Marek Polacek <polacek@redhat.com>
5226
5227 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5228 Add pedwarn.
5229 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5230 Likewise.
5231 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5232
3f8257db 52332014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5234
5235 PR c/51849
5236 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5237 Call pedwarn_c90 instead of pedwarn.
5238 (check_bitfield_type_and_width): Likewise.
5239 (declspecs_add_qual): Likewise.
5240 (declspecs_add_type): Likewise.
5241 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5242 Adjust to only call pedwarn_c90.
5243 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5244 pedwarn_c90 instead of pedwarn.
5245 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5246 * c-parser.c (disable_extension_diagnostics): Handle
5247 warn_c90_c99_compat.
5248 (restore_extension_diagnostics): Likewise.
5249 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5250 pedwarn_c90 instead of pedwarn.
5251 (c_parser_initelt): Likewise.
5252 (c_parser_postfix_expression): Likewise.
5253 (c_parser_postfix_expression_after_paren_type): Likewise.
5254 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5255 * c-tree.h: Fix formatting.
5256 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5257 pedwarn_c90 instead of pedwarn.
5258
9f25a338
TS
52592014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5260
5261 * c-typeck.c: Remove include of pointer-set.h.
5262
044331a8
MP
52632014-08-07 Marek Polacek <polacek@redhat.com>
5264
5265 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5266
b787e7a2
TS
52672014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5268
5269 * c-typeck.c: Use hash_map instead of pointer_map.
5270
6e2830c3
TS
52712014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5272
5273 * c-decl.c: Use hash_set instead of pointer_set.
5274
a7ee52fb
IZ
52752014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5276
5277 PR middle-end/61455
5278 * c-array-notation.c (expand_array_notations): Handling
5279 of DECL_EXPR added.
5280
b4dfdc11
MG
52812014-07-31 Marc Glisse <marc.glisse@inria.fr>
5282
5283 PR c++/60517
5284 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5285 a local variable.
5286
976d5a22
TT
52872014-07-30 Tom Tromey <tromey@redhat.com>
5288
5289 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5290 field.
5291 (really_start_incremental_init, push_init_level): Initialize
5292 designator_depth.
5293 (pop_init_level): Set global designator_depth.
5294 (process_init_element): Check for designated_init attribute.
5295
30281de2
MP
52962014-07-20 Marek Polacek <polacek@redhat.com>
5297
5298 PR c/61852
5299 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5300 (implicitly_declare): Pass location to implicit_decl_warning.
5301
b108f48f
JJ
53022014-07-14 Jakub Jelinek <jakub@redhat.com>
5303
5304 PR middle-end/61294
5305 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5306 If non-NULL, call c_parser_check_literal_zero.
5307 (c_parser_check_literal_zero): New function.
5308 (c_parser_postfix_expression_after_primary): Adjust
5309 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5310
773ec47f
MP
53112014-07-06 Marek Polacek <polacek@redhat.com>
5312
5313 PR c/6940
5314 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5315 * c-tree.h (C_ARRAY_PARAMETER): Define.
5316 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5317 function parameter.
5318
22e1cf1c 53192014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5320 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5321
5322 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5323 releasing symbol.
5324
52ec0ea3
MP
53252014-07-01 Marek Polacek <polacek@redhat.com>
5326
5327 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5328 instead of 0 to WARN_FOR_ASSIGNMENT.
5329
d5c3d343
MP
53302014-07-01 Marek Polacek <polacek@redhat.com>
5331
5332 PR c/58286
5333 * c-typeck.c (convert_for_assignment): Pass
5334 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5335
6a7253a4
MP
53362014-06-30 Marek Polacek <polacek@redhat.com>
5337
5338 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5339 has no_sanitize_undefined attribute.
5340
5e88a8f4
IZ
53412014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5342
5343 PR middle-end/57541
5344 * c-array-notation.c (fix_builtin_array_notation_fn):
5345 Check for 0 arguments in builtin call. Check that bultin argument is
5346 correct.
5347 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5348 index.
5349
9698b078
SH
53502014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5351
5352 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5353 qualifiers in __auto_type for atomic types.
5354 (c_parser_typeof_specifier): Discard all type qualifiers in
5355 __typeof__ for atomic types.
5356
6e07c515
MP
53572014-06-25 Marek Polacek <polacek@redhat.com>
5358
5359 PR c/61162
5360 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5361 the return expression to c_finish_return.
5362
da6f124d
JJ
53632014-06-25 Jakub Jelinek <jakub@redhat.com>
5364
5365 * c-typeck.c (c_finish_omp_clauses): Make sure
5366 OMP_CLAUSE_LINEAR_STEP has correct type.
5367
c203e8a7
TS
53682014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5369
5370 * c-decl.c: Adjust.
5371
56ad0e38
JJ
53722014-06-24 Jakub Jelinek <jakub@redhat.com>
5373
5374 * c-parser.c (c_parser_omp_for_loop): For
5375 #pragma omp parallel for simd move lastprivate clause from parallel
5376 to for rather than simd.
5377
47c2554f
MP
53782014-06-23 Marek Polacek <polacek@redhat.com>
5379
5380 * c-typeck.c (parser_build_binary_op): Don't call
5381 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5382
56363ffd
JH
53832014-06-15 Jan Hubicka <hubicka@ucw.cz>
5384
5385 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5386 * c-decl.c (merge_decls): Likewise.
5387
d7ff7ae5
MP
53882014-06-09 Marek Polacek <polacek@redhat.com>
5389
5390 PR c/36446
5391 * c-typeck.c (error_init): Call inform instead of error_at.
5392 (pedwarn_init): Call inform instead of pedwarn.
5393 (warning_init): Call inform instead of warning_at.
5394
24d047a3
JH
53952014-06-07 Jan Hubicka <hubicka@ucw.cz>
5396
5397 * c-decl.c (merge_decls): Use set_decl_section_name.
5398 (duplicate_decls): Remove node if it exists.
5399
9bac5cbb
G
54002014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5401
5402 PR c/53119
5403 * c-typeck.c (push_init_level, process_init_element,
5404 pop_init_level): Correct check for zero initialization, move
5405 missing brace warning to respect zero initialization.
5406
8ffcdea8
MP
54072014-06-05 Marek Polacek <polacek@redhat.com>
5408
5409 PR c/56724
5410 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5411
742938c9
MP
54122014-06-05 Marek Polacek <polacek@redhat.com>
5413
5414 PR c/49706
5415 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5416 on the left hand side operand of a comparison.
742938c9 5417
6447c55d
MP
54182014-06-05 Marek Polacek <polacek@redhat.com>
5419
5420 PR c/48062
5421 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5422 Print note only if the warning was printed.
5423
9dc7743c
IZ
54242014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5425
5426 PR c/58942
5427 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5428 with a pointer.
5429
fedfecef
MP
54302014-06-03 Marek Polacek <polacek@redhat.com>
5431
5432 PR c/60439
5433 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5434 c_start_case.
5435 * c-tree.h (c_start_case): Update.
5436 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5437 switch condition has boolean value.
5438
9b2b7279
AM
54392014-06-02 Andrew MacLeod <amacleod@redhat.com>
5440
5441 * c-decl.c: Include builtins.h.
5442 * c-parser.c: Likewise.
5443
5c1bc275
MP
54442014-05-27 Marek Polacek <polacek@redhat.com>
5445
5446 PR c/56724
5447 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5448 error and warning calls to error_at and warning_at. Pass location of
5449 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5450 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5451 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5452
97563bc8
IZ
54532014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5454
5455 PR c/61191
5456 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5457 function parameters.
5458
aede2c10
JH
54592014-05-23 Jan Hubicka <hubicka@ucw.cz>
5460
5461 * c-decl.c (merge_decls): Preserve symtab node pointers.
5462 (duplicate_decls): Free new decl.
5463
edbba2ce
TS
54642014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5465
f3316c6d
TS
5466 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5467 initialization.
5468
edbba2ce
TS
5469 * c-parser.c (c_parser_omp_target): Return bool values.
5470
68c81f24
TS
54712014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5472
5473 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5474 num_teams_loc variable to num_thread_limit_loc.
5475
632f2871
RS
54762014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5477
5478 * c-array-notation.c (expand_array_notations): Use void_node
5479 instead of void_zero_node.
5480
766090c2
TS
54812014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5482
5483 * c-decl.c (finish_struct): Adjust.
5484 (finish_enum): Likewise.
5485 (bind): Adjust.
5486 (record_inline_static): Likewise.
5487 (push_scope): Likewise.
5488 (make_label): Likewise.
5489 (lookup_label_for_goto): Likewise.
5490 (finish_struct): Likewise.
5491 (finish_enum): Likewise.
5492 (store_parm_decls): Likewise.
5493 (c_push_function_context): Likewise.
5494 * c-lang.h: Remove usage of variable_size gty attribute.
5495 * c-parser.c (c_parse_init): Adjust.
5496 (c_parse_file): Likewise.
5497
2b107f6b
MP
54982014-05-13 Marek Polacek <polacek@redhat.com>
5499
5500 PR c/61162
5501 * c-typeck.c (convert_for_assignment): Pass location to
5502 WARN_FOR_ASSIGNMENT instead of input_location.
5503
d033409e
MP
55042014-05-10 Marek Polacek <polacek@redhat.com>
5505
5506 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5507 maybe_warn_string_init.
5508 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5509 maybe_warn_string_init.
5510 * c-tree.h (maybe_warn_string_init): Update declaration.
5511 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5512 Call pedwarn_init with loc instead of with input_location.
5513 (digest_init): Pass init_loc to maybe_warn_string_init.
5514 (pop_init_level): Call pedwarn_init with loc instead of with
5515 input_location.
5516 (set_init_index): Likewise.
5517 (process_init_element): Likewise.
5518
ea58ef42
MP
55192014-05-09 Marek Polacek <polacek@redhat.com>
5520
5521 PR c/61096
5522 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5523 (c_parser_initelt): Pass location to set_init_label. Pass array index
5524 location to set_init_index.
5525 * c-tree.h (push_init_level): Update declaration.
5526 (pop_init_level): Likewise.
5527 (set_init_index): Likewise.
5528 (set_init_label): Likewise.
5529 * c-typeck.c (error_init): Add location parameter. Call error_at
5530 instead of error.
5531 (digest_init): Pass init_loc to error_init.
5532 (really_start_incremental_init):
5533 (push_init_level): Add location parameter. Pass loc to pop_init_level
5534 and error_init.
5535 (pop_init_level): Likewise.
5536 (set_designator): Add location parameter. Pass loc to pop_init_level,
5537 push_init_level, and error_init.
5538 (set_init_index): Add location parameter. Pass loc to error_init and
5539 set_designator.
5540 (set_init_label): Likewise.
5541 (output_init_element): Pass loc to error_init.
5542 (process_init_element): Pass loc to error_init, pop_init_level,
5543 pedwarn_init, and push_init_level.
5544
661a0813
MP
55452014-05-09 Marek Polacek <polacek@redhat.com>
5546
5547 PR c/50459
5548 * c-parser.c (c_parser_attributes): Parse the arguments as an
5549 expression-list if the attribute takes identifier.
5550
2793eeab
MP
55512014-05-08 Marek Polacek <polacek@redhat.com>
5552
5553 PR c/61053
5554 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5555 TYPE_ALIGN_UNIT.
5556
f827930a
MP
55572014-05-08 Marek Polacek <polacek@redhat.com>
5558
5559 PR c/61077
5560 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5561 of main.
5562
1d60af08
KZ
55632014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5564 Mike Stump <mikestump@comcast.net>
5565 Richard Sandiford <rdsandiford@googlemail.com>
5566
5567 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5568 (finish_enum): Use wide-int interfaces.
5569 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5570 * c-typeck.c (build_c_cast): Likewise.
5571 (set_nonincremental_init_from_string): Likewise.
5572 (c_tree_equal): Likewise.
5573
a0e24419
MP
55742014-05-02 Marek Polacek <polacek@redhat.com>
5575
5576 PR c/25801
5577 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5578 Return size_one_node when the type is not complete.
5579 (pointer_diff): Remove comment.
5580 (build_unary_op): Improve error messages.
5581
19fc9faa
MP
55822014-05-02 Marek Polacek <polacek@redhat.com>
5583
5584 * c-typeck.c (c_finish_return): Separate warning_at calls.
5585
63bc4e87
MP
55862014-05-02 Marek Polacek <polacek@redhat.com>
5587
5588 * c-tree.h (error_init): Remove declaration.
5589 (pedwarn_init): Likewise.
5590 * c-typeck.c (error_init): Make static and move above.
5591 (pedwarn_init): Likewise.
5592 (warning_init): Move above.
5593 (maybe_warn_string_init): Likewise.
5594
4bd2511b
JL
55952014-05-01 Jeff Law <law@redhat.com>
5596
5597 Revert:
5598
5599 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5600 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5601 avoid goto.
5602
6a358dcb
MP
56032014-05-02 Marek Polacek <polacek@redhat.com>
5604
5605 PR c/60784
5606 * c-typeck.c (push_init_level): Set constructor_designated to
5607 p->designated for structures.
5608
ae5ebda4
MP
56092014-05-01 Marek Polacek <polacek@redhat.com>
5610
5611 PR c/60915
5612 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5613 function-definition has an attribute after the declarator.
5614
96b40f8d
MP
56152014-05-01 Marek Polacek <polacek@redhat.com>
5616
5617 PR c/60257
5618 * c-typeck.c (warning_init): Add location_t parameter. Call
5619 warning_at instead of warning.
5620 (push_init_level): Pass input_location to warning_init.
5621 (add_pending_init): Add location_t parameter. Pass loc to
5622 warning_init.
5623 (set_nonincremental_init): Pass input_location to add_pending_init.
5624 (set_nonincremental_init_from_string): Likewise.
5625 (output_init_element): Pass loc to warning_init and to
5626 add_pending_init.
5627
32e00768
MP
56282014-05-01 Marek Polacek <polacek@redhat.com>
5629
5630 PR c/43395
5631 * c-typeck.c (c_finish_return): Distinguish between label and variable
5632 when warning about returning local address.
5633
c9379ce2
MP
56342014-05-01 Marek Polacek <polacek@redhat.com>
5635
5636 PR c/29467
5637 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5638 in C89 mode.
5639
d00887e8
MP
56402014-05-01 Marek Polacek <polacek@redhat.com>
5641
5642 PR c/43245
5643 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5644 instead of 0 to WARN_FOR_QUALIFIERS.
5645
5436fa2e
MP
56462014-05-01 Marek Polacek <polacek@redhat.com>
5647
5648 PR c/56989
5649 * c-typeck.c (default_conversion): Use better location for
5650 error call.
5651
f8ed5150
MP
56522014-04-30 Marek Polacek <polacek@redhat.com>
5653
5654 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5655 also when SANITIZE_FLOAT_DIVIDE is on.
5656
8337d1db
MP
56572014-04-30 Marek Polacek <polacek@redhat.com>
5658
5659 PR c/60139
5660 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5661 and pedwarn_init. Use loc insted of input_location.
5662
c4bdc42f
MP
56632014-04-30 Marek Polacek <polacek@redhat.com>
5664
5665 PR c/60351
5666 * c-typeck.c (build_binary_op): Use location when warning about
5667 shift count.
5668
45484dcf
MP
56692014-04-25 Marek Polacek <polacek@redhat.com>
5670
5671 PR c/18079
5672 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5673 always_inline/noinline and hot/cold attributes.
5674
34cf811f
MP
56752014-04-25 Marek Polacek <polacek@redhat.com>
5676
5677 PR c/60114
5678 * c-parser.c (c_parser_initelt): Pass input_location to
5679 process_init_element.
5680 (c_parser_initval): Pass loc to process_init_element.
5681 * c-tree.h (process_init_element): Adjust declaration.
5682 * c-typeck.c (push_init_level): Pass input_location to
5683 process_init_element.
5684 (pop_init_level): Likewise.
5685 (set_designator): Likewise.
5686 (output_init_element): Add location_t parameter. Pass loc to
5687 digest_init.
5688 (output_pending_init_elements): Pass input_location to
5689 output_init_element.
5690 (process_init_element): Add location_t parameter. Pass loc to
5691 output_init_element.
5692
42056eac
JJ
56932014-04-24 Jakub Jelinek <jakub@redhat.com>
5694
5695 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5696 atomic-clause, allow comma in between atomic-clause and
5697 seq_cst.
5698
e162a134
JJ
56992014-04-22 Jakub Jelinek <jakub@redhat.com>
5700
5701 PR c/59073
5702 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5703 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5704
2f6babac
IZ
57052014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5706
5707 PR middle-end/60469
5708 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5709 create_tmp_var instead build_decl for creating temps.
5710 (build_array_notation_expr): Likewise.
5711 (fix_conditional_array_notations_1): Likewise.
5712 (fix_array_notation_expr): Likewise.
5713 (fix_array_notation_call_expr): Likewise.
5714
8edbfaa6
JJ
57152014-03-28 Jakub Jelinek <jakub@redhat.com>
5716
5717 PR c++/60689
5718 * c-tree.h (c_build_function_call_vec): New prototype.
5719 * c-typeck.c (build_function_call_vec): Don't call
5720 resolve_overloaded_builtin here.
5721 (c_build_function_call_vec): New wrapper function around
5722 build_function_call_vec. Call resolve_overloaded_builtin here.
5723 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5724 Call c_build_function_call_vec instead of build_function_call_vec.
5725 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5726 * c-decl.c (finish_decl): Likewise.
5727
7485aeea
MLI
57282014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5729
5730 PR c/55383
5731 * c-typeck.c: Use correct format string in cast-qual warning
5732
b17a8b07
TS
57332014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5734
5735 * c-decl.c (c_decl_attributes): Use
5736 lang_hooks.types.omp_mappable_type.
5737 * c-typeck.c (c_finish_omp_clauses): Likewise.
5738
3af9c5e9
MP
57392014-03-06 Marek Polacek <polacek@redhat.com>
5740
5741 PR c/60197
5742 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5743 of checking tree code.
5744
1c9f5f33
PK
57452014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5746
5747 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5748 (c_parser_parameter_declaration): Likewise.
5749
cc28fc7f
MP
57502014-02-19 Marek Polacek <polacek@redhat.com>
5751
5752 PR c/60195
5753 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5754 Call mark_exp_read on exp.value.
5755 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5756 TREE_ADDRESSABLE on old instead of val.
5757 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5758
b581c05c
PK
57592014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5760
5761 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5762 C_EXPR_APPEND by vec_safe_push.
5763 * c-tree.h (C_EXPR_APPEND): Remove.
5764
81e5eca8
MP
57652014-01-31 Marek Polacek <polacek@redhat.com>
5766
5767 PR c/59963
5768 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5769 build_function_call_vec.
5770 (build_function_call): Likewise.
5771 (build_atomic_assign): Likewise.
5772 (build_function_call_vec): Add arg_loc parameter. Use it.
5773 (convert_arguments): Likewise.
5774 (convert_for_assignment): Rename rhs_loc to expr_loc.
5775 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5776 (c_parser_objc_keywordexpr): Likewise.
5777 (c_parser_postfix_expression_after_primary): Call
5778 build_function_call_vec with expr_loc rather than op_loc.
5779 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5780 build_function_call_vec.
5781 (c_parser_expr_list): Add locations parameter. Fill it with locations
5782 of function arguments.
5783 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5784
68fca595
MP
57852014-01-30 Marek Polacek <polacek@redhat.com>
5786
5787 PR c/59940
5788 * c-typeck.c (build_function_call_vec): Use loc parameter.
5789 (convert_arguments): Add location parameter. Use it.
5790 (ep_convert_and_check): Likewise.
5791 (build_atomic_assign): Adjust convert_for_assignment call.
5792 (build_modify_expr): Likewise.
5793 (digest_init): Likewise.
5794 (c_finish_return): Likewise.
5795 (build_conditional_expr): Adjust ep_convert_and_check calls.
5796 (convert_for_assignment): Add rhs_loc parameter. Use it.
5797 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5798 calls.
5799
fa337f3a
RB
58002014-01-30 Richard Biener <rguenther@suse.de>
5801
5802 PR c/59905
5803 * c-typeck.c (build_function_call_vec): Do not replace calls
5804 to a function via an incompatible type with a runtime abort.
5805
b72271b9
BI
58062014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5807
5808 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5809 flag_enable_cilkplus with flag_cilkplus.
5810 (c_parser_direct_declarator_inner): Likewise.
5811 (c_parser_attribute_any_word): Likewise.
5812 (c_parser_attributes): Likewise.
5813 (c_parser_compound_statement): Likewise.
5814 (c_parser_statement_after_labels): Likewise.
5815 (c_parser_if_statement): Likewise.
5816 (c_parser_switch_statement): Likewise.
5817 (c_parser_do_statement): Likewise.
5818 (c_parser_for_statement): Likewise.
5819 (c_parser_unary_expression): Likewise.
5820 (c_parser_postfix_expression): Likewise.
5821 (c_parser_postfix_expression_after_primary): Likewise.
5822 (c_parser_postfix_expression_after_primary): Likewise.
5823 (c_parser_omp_clause_name): Likewise.
5824 (c_finish_omp_declare_simd): Likewise.
5825 (c_parser_cilk_verify_simd): Likewise.
5826 * c-typeck.c (build_array_ref): Likewise.
5827 (build_function_call_vec): Likewise.
5828 (convert_arguments): Likewise.
5829 (build_compound_expr): Likewise.
5830 (c_finish_return): Likewise.
5831 (c_finish_if_stmt): Likewise.
5832 (c_finish_loop): Likewise.
5833 (build_binary_op): Likewise.
5834
393e8e8b
MP
58352014-01-23 Marek Polacek <polacek@redhat.com>
5836
5837 PR c/59846
5838 * c-typeck.c (parser_build_binary_op): Use location instead of
5839 input_location.
5840 (build_binary_op): Pass location to shorten_compare.
5841
f04dda30
MP
58422014-01-23 Marek Polacek <polacek@redhat.com>
5843
5844 PR c/58346
5845 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5846 an empty aggregate.
5847
789eadcd
MP
58482014-01-23 Marek Polacek <polacek@redhat.com>
5849
5850 PR c/59871
5851 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5852 of a comma expression.
5853 (emit_side_effect_warnings): Likewise.
5854
40f14e9f
BI
58552014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5856
5857 PR c/59825
5858 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5859 function to use walk_tree and moved a lot of its functionality to
5860 expand_array_notations.
5861 (expand_array_notations): New function.
5862
74558dd9
BI
58632014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5864
5865 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5866 attribute an attribute without value.
5867
652fea39
JJ
58682014-01-23 Jakub Jelinek <jakub@redhat.com>
5869
5870 PR middle-end/58809
5871 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5872 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5873
f34f1c87
MP
58742014-01-22 Marek Polacek <polacek@redhat.com>
5875
5876 PR c/59891
5877 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5878 of remove_c_maybe_const_expr on op1 and op2.
5879
241f845a
JJ
58802014-01-15 Jakub Jelinek <jakub@redhat.com>
5881
5882 PR c/58943
5883 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5884 effects, preevaluate rhs using SAVE_EXPR first.
5885
9a74f20c
BI
58862014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5887
5888 PR c++/59631
5889 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5890 statements with if-elseif statements.
5891
96066ce1
MP
58922014-01-06 Marek Polacek <polacek@redhat.com>
5893
5894 PR c/57773
5895 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5896 defined bit-field types only in ISO C.
5897
23a5b65a
RS
58982014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5899
5900 Update copyright years
5901
f9030485
RS
59022014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5903
5904 * c-array-notation.c: Use the standard form for the copyright notice.
5905
41958c28
BI
59062013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5907
5908 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5909 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5910 field in parser is not empty. If not-empty, call the function
5911 c_parser_finish_omp_declare_simd.
5912 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5913 between SIMD-enabled functions and #pragma simd. Added new parameter.
5914 (c_parser_cilk_all_clauses): Modified the usage of the function
5915 c_parser_cilk_clause_vectorlength as mentioned above.
5916 (c_parser_cilk_simd_fn_vector_attrs): New function.
5917 (c_finish_cilk_simd_fn_tokens): Likewise.
5918 (is_cilkplus_vector_p): Likewise.
5919 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5920 "nomask," and "mask" strings in clause name.
5921 (c_parser_omp_all_clauses): Added 3 new case statements:
5922 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5923 PRAGMA_CILK_CLAUSE_NOMASK.
5924 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5925 check for vector attribute and if so call the function
5926 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5927 called the function c_finish_cilk_simd_fn_tokens.
5928 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5929 parser field is non-empty. If so, parse them as you would parse
5930 the omp declare simd pragma.
5931 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5932 Added a check when step is a parameter and flag it as error.
5933 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
5934 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
5935 pragma_omp_clause.
5936
cef0fd0e
TS
59372013-12-17 Thomas Schwinge <thomas@codesourcery.com>
5938
5939 * c-parser.c (c_parser_omp_parallel): Fix description.
5940
12893402
BI
59412013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5942
5943 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
5944 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
5945 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
5946 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
5947
296674db
JM
59482013-12-04 Joseph Myers <joseph@codesourcery.com>
5949
5950 PR c/52023
5951 * c-parser.c (c_parser_alignas_specifier): Use
5952 c_sizeof_or_alignof_type instead of c_alignof.
5953 (c_parser_alignof_expression): Likewise, with min_alignof
5954 parameter depending on alignof spelling used.
5955
edd28054
MP
59562013-12-04 Marek Polacek <polacek@redhat.com>
5957
5958 PR c/54113
5959 * c-decl.c (start_function): Don't warn for missing prototype for
5960 inline functions.
5961
da0fc454
MP
59622013-12-03 Marek Polacek <polacek@redhat.com>
5963
5964 PR c/59351
5965 * c-decl.c (build_compound_literal): Allow compound literals with
5966 empty initial value.
5967
4c2ecab0
JM
59682013-12-02 Joseph Myers <joseph@codesourcery.com>
5969
5970 PR c/58235
5971 * c-typeck.c (build_modify_expr): Diagnose assignment to
5972 expression with array type.
5973
340baef7
JM
59742013-11-29 Joseph Myers <joseph@codesourcery.com>
5975
5976 PR c/42262
5977 * c-typeck.c (process_init_element): Do not treat a string as
5978 initializing a whole array when used with a designator for an
5979 individual element.
5980
6763b9f7
JM
59812013-11-29 Joseph Myers <joseph@codesourcery.com>
5982
5983 PR c/57574
5984 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
5985 an inline function following a static declaration.
5986
e7bd1de1
JJ
59872013-11-28 Jakub Jelinek <jakub@redhat.com>
5988
5989 PR c/59310
5990 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
5991 to p_name before calling c_parser_omp_teams instead of after.
5992 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
5993 argument. Remove unused p_name variable.
5994
0136f8f0
AH
59952013-11-27 Aldy Hernandez <aldyh@redhat.com>
5996 Jakub Jelinek <jakub@redhat.com>
5997
5998 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
5999 external_scope is NULL.
6000
241b71bb
TV
60012013-11-27 Tom de Vries <tom@codesourcery.com>
6002 Marc Glisse <marc.glisse@inria.fr>
6003
6004 PR c++/59032
6005 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6006
2fb9a547
AM
60072013-11-22 Andrew MacLeod <amacleod@redhat.com>
6008
6009 * c-typeck.c: Add required include files from gimple.h.
6010
8400e75e
DM
60112013-11-22 David Malcolm <dmalcolm@redhat.com>
6012
6013 * c-decl.c (define_label, shadow_tag_warned)
6014 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6015 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6016 (declspecs_add_type): Remove use of in_system_header macro.
6017 * c-parser.c (c_parser_unary_expression): Likewise.
6018 * c-typeck.c (store_init_value, process_init_element)
6019 (c_start_case): Likewise.
6020
6021 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6022 macro.
6023
6024 * c-parser.c (c_parser_set_source_position_from_token): Remove
6025 reference to in_system_header from comment.
6026
386b1f1f
RS
60272013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6028
6029 * c-decl.c (grokdeclarator): Update comment to refer to
6030 tree_to_[su]hwi rather than tree_low_cst.
6031
ae7e9ddd
RS
60322013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6033
6034 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6035 tree_to_uhwi throughout.
6036
9439e9a1
RS
60372013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6038
6039 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6040 throughout.
6041
9541ffee
RS
60422013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6043
6044 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6045 throughout.
6046
c02065fc
AH
60472013-11-15 Aldy Hernandez <aldyh@redhat.com>
6048
6049 * c-parser.c (c_parser_cilk_simd): New.
6050 (c_parser_cilk_verify_simd): New.
6051 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6052 (c_parser_omp_for_loop): Add case for NE_EXPR.
6053 Set c_break_label for CILK_SIMD.
6054 (c_parser_cilk_clause_vectorlength): New.
6055 (c_parser_cilk_clause_linear): New.
6056 (c_parser_cilk_clause_name): New.
6057 (c_parser_cilk_all_clauses): New.
6058 * c-typeck.c (build_unary_op): Pass location argument to
6059 readonly_error.
6060 (build_modify_expr): Same.
6061 (build_asm_expr): Same.
6062 (c_finish_bc_stmt): Error on break/continue in loops.
6063
18f429e2
AM
60642013-11-14 Andrew MacLeod <amacleod@redhat.com>
6065
6066 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6067
d8a2d370
DN
60682013-11-14 Diego Novillo <dnovillo@google.com>
6069
6070 * c-decl.c: Include print-tree.h.
6071 Include stor-layout.h.
6072 Include varasm.h.
6073 Include attribs.h.
6074 Include stringpool.h.
6075 * c-lang.c: Include fold-const.h.
6076 * c-parser.c: Include stringpool.h.
6077 Include attribs.h.
6078 Include stor-layout.h.
6079 Include varasm.h.
6080 Include trans-mem.h.
6081 * c-typeck.c: Include stor-layout.h.
6082 Include trans-mem.h.
6083 Include varasm.h.
6084 Include stmt.h.
6085
38b7bc7f
JM
60862013-11-13 Joseph Myers <joseph@codesourcery.com>
6087
6088 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6089 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6090 __auto_type.
6091 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6092 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6093 RID_AUTO_TYPE.
6094 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6095 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6096 (c_parser_declarator, c_parser_direct_declarator_inner)
6097 (c_parser_parameter_declaration, c_parser_type_name): All callers
6098 changed.
6099 (c_parser_declaration_or_fndef): Handle declarations with type
6100 determined from the initializer.
6101
45b0be94
AM
61022013-11-12 Andrew MacLeod <amacleod@redhat.com>
6103
18f429e2 6104 * c-typeck.c: Include gimplify.h.
45b0be94 6105
582d9b50
JM
61062013-11-12 Joseph Myers <joseph@codesourcery.com>
6107
6108 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6109 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6110 comment.
6111 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6112 or _Thread_local as appropriate in diagnostics.
6113 (build_null_declspecs): Initialize ret->thread_gnu_p.
6114 (declspecs_add_scspec): Handle either __thread or _Thread_local
6115 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6116 pedantic. Do not disallow _Thread_local extern and _Thread_local
6117 static.
6118
267bac10
JM
61192013-11-07 Joseph Myers <joseph@codesourcery.com>
6120 Andrew MacLeod <amacleod@redhat.com>
6121
6122 * c-aux-info.c (gen_type): Handle atomic qualifier.
6123 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6124 qualifiers when compating types.
6125 (shadow_tag_warned): Handle atomic_p in declspecs.
6126 (quals_from_declspecs): Likewise.
6127 (start_decl): Use c_type_promotes_to when promoting argument
6128 types.
6129 (grokdeclarator): Handle _Atomic.
6130 (get_parm_info): Diagnose any qualifier on "void" as only
6131 parameter.
6132 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6133 comparing types. Use c_type_promotes_to when promoting argument
6134 types.
6135 (finish_function): Use c_type_promotes_to when promoting argument
6136 types.
6137 (build_null_declspecs): Handle atomic_p in declspecs.
6138 (declspecs_add_qual): Handle RID_ATOMIC.
6139 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6140 (c_token_starts_declspecs): Handle RID_ATOMIC.
6141 (c_parser_declspecs): Handle atomic type specifiers and
6142 qualifiers.
6143 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6144 from types of expressions with atomic type.
6145 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6146 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6147 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6148 (c_parser_statement_after_labels, c_parser_switch_statement)
6149 (c_parser_for_statement, c_parser_expr_no_commas)
6150 (c_parser_conditional_expression, c_parser_binary_expression)
6151 (c_parser_cast_expression, c_parser_unary_expression)
6152 (c_parser_postfix_expression)
6153 (c_parser_postfix_expression_after_primary, c_parser_expression):
6154 Use convert_lvalue_to_rvalue.
6155 (c_parser_expression_conv, c_parser_expr_list): Document
6156 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6157 (c_parser_objc_synchronized_statement): Use
6158 convert_lvalue_to_rvalue.
6159 (c_parser_objc_selector): Handle RID_ATOMIC.
6160 (c_parser_objc_receiver, c_parser_array_notation): Use
6161 convert_lvalue_to_rvalue.
6162 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6163 _Atomic (type-name).
6164 (struct c_declspecs): Add atomic_p field.
6165 (convert_lvalue_to_rvalue): Declare.
6166 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6167 corresponding atomic types.
6168 (qualify_type): Don't add _Atomic qualifiers from second argument.
6169 (comp_target_types): Do not allow _Atomic mismatches.
6170 (type_lists_compatible_p): Do not remove atomic qualifiers when
6171 comparing types.
6172 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6173 (build_atomic_assign): New functions.
6174 (build_unary_op): Use build_atomic_assign for atomic increment and
6175 decrement.
6176 (build_conditional_expr): Do not treat _Atomic void as a qualified
6177 version of void.
6178 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6179 (find_anonymous_field_with_type, convert_to_anonymous_field)
6180 (convert_for_assignment): Do not remove atomic qualifiers when
6181 comparing types.
6182 (digest_init): Do not accept initialization of arrays of atomic
6183 elements by string constants.
6184 (build_asm_expr): Use convert_lvalue_to_rvalue.
6185 (build_binary_op): Do not treat _Atomic void as a qualified
6186 version of void.
6187
0c249d4b
DD
61882013-11-06 DJ Delorie <dj@redhat.com>
6189
6190 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6191 both explicit and builtin, print the location of the explicit one.
6192
6d7f7e0a
TB
61932013-11-05 Tobias Burnus <burnus@net-b.de>
6194
6195 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6196 c_parser_omp_distribute, c_parser_omp_teams,
6197 c_parser_omp_target, c_parser_omp_declare): Handle
6198 -fopenmp-simd.
6199
b906f4ca
MP
62002013-11-03 Marek Polacek <polacek@redhat.com>
6201
6202 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6203
ee1d5a02
JJ
62042013-11-01 Jakub Jelinek <jakub@redhat.com>
6205
6206 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6207 check_dup_generic at the end, unless remove is true.
6208 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6209 remove = true;.
6210 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6211
5a9785fb
JJ
62122013-10-31 Jakub Jelinek <jakub@redhat.com>
6213
6214 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6215 with decl that is not pointer nor array.
6216
939b37da
BI
62172013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6218
6219 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6220 a spawning function is found.
6221 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6222 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6223 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6224 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6225 case.
6226 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6227 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6228 expr.
6229 (c_finish_return): Added a check to reject _Cilk_spawn in return
6230 expression.
6231 (build_cilk_spawn): New function.
6232 (build_cilk_sync): Likewise.
6233 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6234
d4af74d4
TB
62352013-10-27 Tobias Burnus <burnus@net-b.de>
6236
6237 PR other/33426
6238 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6239 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6240 (c_parser_statement_after_labels): Update calls.
6241
d73749df 62422013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6243
6244 PR other/33426
6245 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6246 Handle PRAGMA_IVDEP.
6247 (c_parser_statement_after_labels): Update call.
6248
f28aa681
MP
62492013-10-24 Marek Polacek <polacek@redhat.com>
6250
6251 * c-parser.c (c_parser_struct_declaration): Add a comment.
6252 (c_parser_declarator): Don't allow _Alignas here.
6253
0645c1a2
AM
62542013-10-17 Andrew MacLeod <amacleod@redhat.com>
6255
6256 * c-parser.c: Include omp-low.h.
6257 * c-typeck.c: Likewise.
6258
568a31f2
MP
62592013-10-17 Marek Polacek <polacek@redhat.com>
6260
6261 PR c/58267
6262 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6263 Document syntax of the array-declarator.
6264 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6265 are not permitted.
6266 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6267 (c_parser_struct_declaration): Likewise.
6268 (c_parser_declarator): Likewise.
6269 (c_parser_direct_declarator_inner): Likewise.
6270 (c_parser_parameter_declaration): Likewise.
6271 (c_parser_type_name): Likewise.
6272
acf0174b
JJ
62732013-10-11 Jakub Jelinek <jakub@redhat.com>
6274
6275 * c-lang.h (current_omp_declare_target_attribute): New extern
6276 decl.
6277 * c-parser.c: Include c-lang.h.
6278 (struct c_parser): Change tokens to c_token *.
6279 Add tokens_buf field. Change tokens_avail type to unsigned int.
6280 (c_parser_consume_token): If parser->tokens isn't
6281 &parser->tokens_buf[0], increment parser->tokens.
6282 (c_parser_consume_pragma): Likewise.
6283 (enum pragma_context): Add pragma_struct and pragma_param.
6284 (c_parser_external_declaration): Adjust
6285 c_parser_declaration_or_fndef caller.
6286 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6287 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6288 Adjust recursive call.
6289 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6290 of pragma_external.
6291 (c_parser_parameter_declaration): Use pragma_param instead of
6292 pragma_external.
6293 (c_parser_compound_statement_nostart, c_parser_label,
6294 c_parser_for_statement): Adjust
6295 c_parser_declaration_or_fndef callers.
6296 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6297 it through to c_parser_conditional_expression.
6298 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6299 pass it through to c_parser_binary_expression. Adjust recursive
6300 call.
6301 (c_parser_binary_expression): Remove prec argument, add
6302 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6303 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6304 binop matches it, use build2 instead of parser_build_binary_op.
6305 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6306 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6307 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6308 Handle pragma_struct and pragma_param the same as pragma_external.
6309 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6310 (c_parser_omp_variable_list): Parse array sections for
6311 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6312 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6313 (c_parser_omp_clause_reduction): Handle user defined reductions.
6314 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6315 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6316 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6317 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6318 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6319 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6320 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6321 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6322 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6323 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6324 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6325 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6326 (c_parser_omp_for_loop): Add CODE argument, pass it through
6327 to c_finish_omp_for. Change last argument to cclauses,
6328 and adjust uses to grab parallel clauses from the array of all
6329 the split clauses. Adjust c_parser_binary_expression,
6330 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6331 (omp_split_clauses): New function.
6332 (c_parser_omp_simd): New function.
6333 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6334 Allow the function to be called also when parsing combined constructs,
6335 and call c_parser_omp_simd when parsing for simd.
6336 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6337 #pragma omp section, require exactly one structured-block instead of
6338 sequence of statements.
6339 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6340 Allow the function to be called also when parsing combined constructs.
6341 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6342 Allow the function to be called also when parsing combined
6343 constructs.
6344 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6345 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6346 c_parser_omp_teams, c_parser_omp_target_data,
6347 c_parser_omp_target_update, c_parser_omp_target,
6348 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6349 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6350 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6351 (c_parser_omp_construct): Add p_name and mask vars. Handle
6352 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6353 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6354 and c_parser_omp_sections callers.
6355 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6356 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6357 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6358 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6359 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6360 OMP_CLAUSE_DEPEND.
6361 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6362 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6363 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6364 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6365 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6366 * c-typeck.c: Include tree-inline.h.
6367 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6368 handle_omp_array_sections_1, handle_omp_array_sections,
6369 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6370 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6371 user defined reductions.
6372 (c_tree_equal): New function.
6373 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6374 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6375 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6376 c_check_omp_declare_reduction_r): New prototypes.
6377 * c-decl.c (current_omp_declare_target_attribute): New variable.
6378 (c_decl_attributes): New function.
6379 (start_decl, start_function): Use it instead of decl_attributes.
6380 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6381 c_omp_reduction_decl, c_omp_reduction_lookup,
6382 c_check_omp_declare_reduction_r): New functions.
6383
0a6c2227
TT
63842013-09-25 Tom Tromey <tromey@redhat.com>
6385
6386 * Make-lang.in (c/gccspec.o): Remove.
6387 (CFLAGS-c/gccspec.o): New variable.
6388 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6389 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6390 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6391
f3bc55f0
TT
63922013-09-25 Tom Tromey <tromey@redhat.com>
6393
6394 * Make-lang.in (c/gccspec.o): Don't use subshell.
6395
a24d975c
MP
63962013-09-18 Marek Polacek <polacek@redhat.com>
6397
6398 PR sanitize/58443
6399 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6400 Remove unnecessary check.
6401
ce6923c5
MP
64022013-09-18 Marek Polacek <polacek@redhat.com>
6403
6404 PR sanitizer/58411
6405 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6406 no_sanitize_undefined attribute.
6407
a1e51df9
KT
64082013-09-13 Kai Tietz <ktietz@redhat.com>
6409
6410 PR target/57848
6411 * c-decl.c (c_builtin_function_ext_scope): Remove
6412 wrong assumption that it is never called on prexisting
6413 symbol.
6414
0af94e6f
JR
64152013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6416
6417 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6418
20059c8b
GDR
64192013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6420
6421 * c-objc-common.c (c_tree_printer): Tidy.
6422
de5a5fa1
MP
64232013-08-30 Marek Polacek <polacek@redhat.com>
6424
6425 * c-typeck.c (build_binary_op): Add division by zero and shift
6426 instrumentation.
6427
2531a1d9 64282013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6429 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6430
6e2bcc98 6431 PR c/35649
2531a1d9
JR
6432 * c-typeck.c (c_common_type): Prefer double_type_node over
6433 other REAL_TYPE types with the same precision.
6434 (convert_arguments): Likewise.
6435
025311c4
GDR
64362013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6437
6438 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6439 (c_initialize_diagnostics): Call a destructor for the early printer.
6440
da6ca2b5
GDR
64412013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6442
6443 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6444 printer initialization.
6445
318cda85 64462013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6447
318cda85
BI
6448 PR c/57490
6449 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6450 check for truth values.
6451 (expand_array_notation_exprs): Added truth values case. Removed an
6452 unwanted else. Added for-loop to walk through subtrees in default
6453 case.
6454
b066401f
GDR
64552013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6456
6457 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6458
fb48aadc
JM
64592013-07-23 Joseph Myers <joseph@codesourcery.com>
6460
6461 * c-parser.c (struct c_generic_association): Fix typo.
6462
433cc7b0
TT
64632013-07-23 Tom Tromey <tromey@redhat.com>
6464 Joseph Myers <joseph@codesourcery.com>
6465
6466 * c-parser.c (struct c_generic_association): New.
6467 (c_generic_association_d): New typedef.
6468 (c_parser_generic_selection): New function.
6469 (c_parser_postfix_expression): Handle RID_GENERIC.
6470
26d40c3d
JM
64712013-07-13 Jason Merrill <jason@redhat.com>
6472
6473 PR c++/57793
6474 * c-decl.c (finish_struct): Check for too-large class.
6475
ecdbd01a 64762013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6477
6478 PR c/57821
6479 * c-typeck.c (set_init_index): When folding, check for index overflow.
6480
1141ed3f
BI
64812013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6482
6483 * c-parser.c (c_parser_array_notation): Removed rejection of array
6484 notations in an array of function pointers.
6485
713b46fa
BI
64862013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6487
6488 * c-array-notation.c (make_triplet_val_inv): New function.
6489 (create_cmp_incr): Likewise.
6490 (create_array_refs): Likewise.
6491 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6492 Also modularized common parts between functions and called the function.
6493 (build_array_notation_expr): Likewise.
6494 (fix_conditional_array_notations_1): Likewise.
6495 (fix_array_notation_expr): Likewise.
6496 (fix_array_notation_call_expr): Likewise.
6497
92f20202
MP
64982013-06-18 Marek Polacek <polacek@redhat.com>
6499
6500 PR c/57630
6501 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6502
73a23b06
BI
65032013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6504
6505 * c-array-notation.c (build_array_notation_expr): Reject array notation
6506 mismatch between LHS and RHS even inside a call_expr. Also, removed
6507 a couple while statements that were dead code.
6508
00b8517d
BI
65092013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6510
6511 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6512 excessive precision expressions in function parameters. Also removed
6513 couple unwanted while statements.
6514
1509bdda
BI
65152013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6516
6517 * c-array-notation.c (expand_array_notation_exprs): Added
6518 ARRAY_NOTATION_REF case.
ab20d992 6519
d60f1706
BI
65202013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6521
6522 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6523 function to c-family/array-notation-common.c.
6524 (is_cilkplus_reduce_builtin): Likewise.
6525 (find_rank): Likewise.
6526 (extract_array_notation_exprs): Likewise.
6527 (replace_array_notations): Likewise.
6528 (find_inv_trees): Likewise.
6529 (replace_inv_trees): Likewise.
6530 (contains_array_notation_expr): Likewise.
6531 (find_correct_array_notation_type): Likewise.
6532 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6533 (struct inv_list): Moved this to c-family/array-notation-common.c.
6534 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6535
6d6efbb3
BI
65362013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6537
6538 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6539 reduction functions outside the for-loop. Added a check if the fundecl
6540 is non-NULL. Finally, removed an unwanted if-statement, and made the
6541 body unconditional.
6542
25c22937
BI
65432013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6544
6545 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6546 condition of the if-statement matches the rank of else-block and then-
6547 block when array notations are used.
6548 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6549 expression after the entire function body is parsed.
6550 (c_parser_expr_no_commas): Delayed creating array notation expressions
6551 to the end of function parsing.
6552 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6553 whole if-statement instead of just the condition.
ab20d992 6554 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6555
edd25645
BI
65562013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6557
6558 PR c/57474
6559 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6560 array to NULL_TREE if they are unused. Also added a check for the
6561 field to be NULL before its fields are used in future.
ab20d992 6562
065ce7f1
RO
65632013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6564
6565 PR bootstrap/57450
6566 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6567 (build_array_notation_expr): Likewise.
6568
36536d79
BI
65692013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6570
6571 * c-typeck.c (build_array_ref): Added a check to see if array's
6572 index is greater than one. If true, then emit an error.
6573 (build_function_call_vec): Exclude error reporting and checking
6574 for builtin array-notation functions.
6575 (convert_arguments): Likewise.
6576 (c_finish_return): Added a check for array notations as a return
6577 expression. If true, then emit an error.
6578 (c_finish_loop): Added a check for array notations in a loop
6579 condition. If true then emit an error.
6580 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6581 (build_binary_op): Added a check for array notation expr inside
6582 op1 and op0. If present, we call another function to find correct
6583 type.
6584 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6585 * c-parser.c (c_parser_compound_statement): Check if array
6586 notation code is used in tree, if so, then transform them into
6587 appropriate C code.
6588 (c_parser_expr_no_commas): Check if array notation is used in LHS
6589 or RHS, if so, then build array notation expression instead of
6590 regular modify.
6591 (c_parser_postfix_expression_after_primary): Added a check for
6592 colon(s) after square braces, if so then handle it like an array
6593 notation. Also, break up array notations in unary op if found.
6594 (c_parser_direct_declarator_inner): Added a check for array
6595 notation.
6596 (c_parser_compound_statement): Added a check for array notation in
6597 a stmt. If one is present, then expand array notation expr.
6598 (c_parser_if_statement): Likewise.
6599 (c_parser_switch_statement): Added a check for array notations in
6600 a switch statement's condition. If true, then output an error.
6601 (c_parser_while_statement): Similarly, but for a while.
6602 (c_parser_do_statement): Similarly, but for a do-while.
6603 (c_parser_for_statement): Similarly, but for a for-loop.
6604 (c_parser_unary_expression): Check if array notation is used in a
6605 pre-increment or pre-decrement expression. If true, then expand
6606 them.
6607 (c_parser_array_notation): New function.
6608 * c-array-notation.c: New file.
6609 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 6610
cd192ccc
MS
66112013-05-23 Mike Stump <mikestump@comcast.net>
6612
6613 * c-typeck.c (convert_for_assignment): Handle references to memory
6614 spaces better.
6615
427b248d
JM
66162013-05-16 Jason Merrill <jason@redhat.com>
6617
6618 * Make-lang.in (cc1$(exeext)): Use link mutex.
6619
44d90fe1
PC
66202013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6621
6622 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6623 to simply use OPT_Wpointer_arith.
6624 (build_unary_op): Likewise.
6625
4e7d7b3d
JJ
66262013-04-03 Jakub Jelinek <jakub@redhat.com>
6627
6628 PR c/19449
6629 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6630 argument. If set, or it temporarily for parsing of the first
6631 argument into force_folding_builtin_constant_p.
6632 (c_parser_postfix_expression): Adjust callers.
6633
839b422f
RB
66342013-03-21 Richard Biener <rguenther@suse.de>
6635
6636 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6637 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6638
2ee028f1
MP
66392013-02-12 Marek Polacek <polacek@redhat.com>
6640
6641 PR c/44938
6642 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6643 origtypes to NULL.
6644
8824edff
JJ
66452013-01-24 Jakub Jelinek <jakub@redhat.com>
6646
6647 PR c/56078
6648 * c-typeck.c (set_nonincremental_init_from_string): If
6649 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6650 returned false.
6651 (process_init_element): Likewise.
6652
eadd3d0d
JJ
66532012-12-20 Jakub Jelinek <jakub@redhat.com>
6654
6655 PR c++/55619
6656 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6657 argument, don't call default_function_array_conversion
6658 nor c_fully_fold here.
6659 (c_parser_asm_statement): Adjust callers.
6660 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6661 and outputs here, and call default_function_array_conversion
6662 on inputs that don't need to be addressable.
6663
f8a93a2e
JJ
66642012-12-18 Jakub Jelinek <jakub@redhat.com>
6665
6666 PR c/39464
6667 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6668 warning require that both c_common_unsigned_type as well as
6669 c_common_signed_type is the same for both mvl and mvr types.
6670
9771b263
DN
66712012-11-16 Diego Novillo <dnovillo@google.com>
6672
6673 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6674
6675 * c-common.c: Use new vec API in vec.h.
6676 * c-common.h: Likewise.
6677 * c-gimplify.c: Likewise.
6678 * c-pragma.c: Likewise.
6679 * c-pretty-print.c: Likewise.
6680 * c-pretty-print.h: Likewise.
6681 * c-semantics.c: Likewise.
6682 * c-decl.c: Likewise.
6683 * c-parser.c: Likewise.
6684 * c-tree.h: Likewise.
6685 * c-typeck.c: Likewise.
6686
880661a4
JW
66872012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6688
6689 PR c++/54930
6690 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6691
077d1abe
MLI
66922012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6693
6694 PR c/53066
6695 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6696 shadows a function, unless the variable is a function or a
6697 pointer-to-function.
6698
3a785c97
JJ
66992012-10-12 Jakub Jelinek <jakub@redhat.com>
6700
6701 PR c/54381
6702 * c-parser.c (struct c_tree_loc_pair): Removed.
6703 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6704 add location_t * and tree * arguments, fill in array of 3
6705 sizeof_arg trees and corresponding locs.
6706 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6707 c_parser_expr_list callers.
6708 (c_parser_postfix_expression_after_primary): Likewise. Pass
6709 array of 3 sizeof_arg trees and locs (corresponding to first
6710 3 arguments) to sizeof_pointer_memaccess_warning.
6711
703c8606
LC
67122012-10-09 Lawrence Crowl <crowl@google.com>
6713
6714 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6715 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6716 hash table.
6717
5d9de0d0
PC
67182012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6719
6720 PR c++/54194
6721 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6722 call.
6723
a212e43f
MG
67242012-10-09 Marc Glisse <marc.glisse@inria.fr>
6725
6726 PR c++/54427
6727 * c-typeck.c: Include c-common.h.
6728 (enum stv_conv): Moved to c-common.h.
6729 (scalar_to_vector): Moved to c-common.c.
6730 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6731 * Make-lang.in: c-typeck.c depends on c-common.h.
6732
3b78de56
AC
67332012-10-04 Arnaud Charlet <charlet@adacore.com>
6734
6735 * c-decl.c (c_write_global_declarations): Fix handling of
6736 -fdump-ada-spec*.
6737
78c60e3d
SS
67382012-09-30 Sharad Singhai <singhai@google.com>
6739
6740 * c-decl.c (c_write_global_declarations): Use a different method
6741 to determine if the dump has ben initialized.
6742
9f33203d
JM
67432012-09-14 Joseph Myers <joseph@codesourcery.com>
6744
6745 PR c/54552
6746 * c-typeck.c (c_cast_expr): When casting to a type requiring
6747 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6748 c_fully_fold first.
6749
a27d595d
JM
67502012-09-14 Joseph Myers <joseph@codesourcery.com>
6751
6752 PR c/54103
6753 * c-typeck.c (build_unary_op): Pass original argument of
6754 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6755 any C_MAYBE_CONST_EXPR, if it has integer operands.
6756 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6757 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6758 to c_objc_common_truthvalue_conversion, then remove any
6759 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6760 c_objc_common_truthvalue_conversion not
6761 c_common_truthvalue_conversion.
6762 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6763 call note_integer_operands for arguments with integer operands
6764 that are not integer constants.
6765
9feb29df
JJ
67662012-09-13 Jakub Jelinek <jakub@redhat.com>
6767
6768 PR c/54559
6769 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6770 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6771
d409320c
JJ
67722012-08-31 Jakub Jelinek <jakub@redhat.com>
6773
6774 PR c/54428
6775 * c-convert.c (convert): Don't call fold_convert_loc if
6776 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6777 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6778 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6779
6265d07c
JJ
67802012-08-24 Jakub Jelinek <jakub@redhat.com>
6781
6782 PR c/54355
6783 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6784 for nested and empty_ok arguments in the call to
6785 c_parser_declaration_or_fndef.
6786
1a4049e7
JJ
67872012-08-17 Jakub Jelinek <jakub@redhat.com>
6788
6789 * c-tree.h (c_last_sizeof_arg): Declare.
6790 * c-parser.c (struct c_tree_loc_pair): New type.
6791 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6792 non-NULL.
6793 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6794 (c_parser_postfix_expression_after_primary): Likewise. Call
6795 sizeof_pointer_memaccess_warning if needed.
6796 (sizeof_ptr_memacc_comptypes): New function.
6797 * c-typeck.c (c_last_sizeof_arg): New global variable.
6798 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6799
0229aee9
UB
68002012-07-24 Uros Bizjak <ubizjak@gmail.com>
6801
6802 * c-lang.h (lang_decl): Add variable_size GTY option.
6803
7ee2468b
SB
68042012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6805
6806 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6807 * Make-lang.in: Fix dependencies.
6808
d4a10d0a
SB
68092012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6810
6811 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6812 and add language Makefile hooks.
6813 * config-lang.in: New file.
6814 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6815 add the required "normal" config-lang.in rules.
6816 * c-lang.h: Moved from gcc/ to here.
6817 * c-tree.h: Likewise.
6818 * c-objc-common.c: Likewise.
6819 * c-objc-common.h: Likewise.
6820 * c-typeck.c: Likewise.
6821 * c-convert.c: Likewise.
6822 * c-lang.c: Likewise.
6823 * c-aux-info.c: Likewise.
6824 * c-errors.c: Likewise.
6825 * gccspec.c: Likewise.
6826 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6827 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6828\f
a5544970 6829Copyright (C) 2012-2019 Free Software Foundation, Inc.
d4a10d0a
SB
6830
6831Copying and distribution of this file, with or without modification,
6832are permitted in any medium without royalty provided the copyright
6833notice and this notice are preserved.