]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/c/ChangeLog
9497365a5696e609707a49c294fb2e700f8fd1c6
[thirdparty/gcc.git] / gcc / c / ChangeLog
1 2020-01-22 Joseph Myers <joseph@codesourcery.com>
2
3 PR c/93348
4 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
5 argument with integer operands.
6
7 2020-01-16 Kerem Kat <keremkat@gmail.com>
8
9 PR c/92833
10 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
11 to support 4 available tokens.
12
13 2020-01-15 Joseph Myers <joseph@codesourcery.com>
14
15 PR c/93072
16 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
17 determine whether to set DECL_CONTEXT.
18
19 2020-01-13 Joseph Myers <joseph@codesourcery.com>
20
21 PR c/93241
22 * c-typeck.c (build_c_cast): Check for expressions with integer
23 operands that can occur in an unevaluated part of an integer
24 constant expression and call note_integer_operands as needed.
25
26 2019-01-08 Richard Biener <rguenther@suse.de>
27
28 PR middle-end/93199
29 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
30 permanently.
31
32 2020-01-01 Jakub Jelinek <jakub@redhat.com>
33
34 Update copyright years.
35
36 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
37
38 * c-decl.c (collect_source_ref_cb): Delete.
39 (for_each_global_decl): Rename into...
40 (collect_source_refs): ...this. Call collect_source_ref directly.
41 (c_parse_final_cleanups): Always call collect_source_ref on the main
42 input filename.
43
44 2019-12-19 Julian Brown <julian@codesourcery.com>
45 Cesar Philippidis <cesar@codesourcery.com>
46
47 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
48 detach clauses.
49 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
50 Allow deref (->) in variable lists if true.
51 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
52 Pass to c_parser_omp_variable_list.
53 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
54 call to c_parser_omp_variable_list.
55 (c_parser_oacc_all_clauses): Support attach and detach clauses.
56 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
57 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
58 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
59 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
60 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
61 and detach. Support deref.
62 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
63 GOMP_MAP_ALWAYS_POINTER for OpenACC.
64 (c_oacc_check_attachments): New function.
65 (c_finish_omp_clauses): Check attach/detach arguments for being
66 pointers using above. Support deref.
67
68 2019-12-19 Julian Brown <julian@codesourcery.com>
69 Maciej W. Rozycki <macro@codesourcery.com>
70 Tobias Burnus <tobias@codesourcery.com>
71 Thomas Schwinge <thomas@codesourcery.com>
72
73 * c-parser.c (c_parser_omp_clause_name): Support no_create.
74 (c_parser_oacc_data_clause): Likewise.
75 (c_parser_oacc_all_clauses): Likewise.
76 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
77 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
78 PRAGMA_OACC_CLAUSE_NO_CREATE.
79 * c-typeck.c (handle_omp_array_sections): Support
80 GOMP_MAP_NO_ALLOC.
81
82 2019-12-09 David Malcolm <dmalcolm@redhat.com>
83
84 * c-objc-common.c (range_label_for_type_mismatch::get_text):
85 Replace label_text ctor calls.
86
87 2019-12-04 Joseph Myers <joseph@codesourcery.com>
88
89 PR c/36941
90 PR c/88827
91 * c-typeck.c (convert_lvalue_to_rvalue): Call
92 require_complete_type for arguments not of void types.
93 (build_indirect_ref): Do not diagnose dereferencing pointers to
94 incomplete types.
95 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
96
97 2019-12-03 Joseph Myers <joseph@codesourcery.com>
98
99 PR c/88704
100 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
101 old-style parameter definitions.
102
103 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
104
105 PR target/92499
106
107 * c-decl.c (flexible_array_type_p): Move to common code.
108
109 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
110
111 * c-decl.c (start_decl): Allow initialization of variables whose
112 size is a POLY_INT_CST.
113 (finish_decl): Use verify_type_context to check whether the target
114 allows variables with a particular type to have static or thread-local
115 storage duration. Don't raise a second error if such variables do
116 not have a constant size.
117 (grokdeclarator): Use verify_type_context to check whether the
118 target allows fields or array elements to have a particular type.
119 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
120 the target allows pointer difference for the types involved.
121 (build_unary_op): Likewise for pointer increment and decrement.
122
123 2019-11-29 Joseph Myers <joseph@codesourcery.com>
124
125 * c-parser.c (struct c_parser): Add members raw_tokens and
126 raw_tokens_used.
127 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
128 using previously-lexed raw tokens.
129 (c_parser_peek_nth_token_raw)
130 (c_parser_check_balanced_raw_token_sequence): New functions.
131 (c_parser_nth_token_starts_std_attributes): Use
132 c_parser_check_balanced_raw_token_sequence for Objective-C.
133
134 2019-11-25 Joseph Myers <joseph@codesourcery.com>
135
136 PR c/91985
137 * c-decl.c (finish_declspecs): Use int instead of decimal
138 floating-point types if decimal floating-point not supported.
139
140 2019-11-25 Joseph Myers <joseph@codesourcery.com>
141
142 * c-tree.h (struct c_declarator): Use a structure for id member.
143 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
144 declarators at the start, not when handling individual declarators
145 later. Use u.id.id instead of u.id.
146 (grokfield): Use u.id.id instead of u.id.
147 (build_id_declarator): Set u.id.id and u.id.attrs.
148 (finish_declspecs): Handle postfix attributes in case of typedef
149 name or typeof used.
150 * c-parser.c (c_parser_direct_declarator)
151 (c_parser_direct_declarator_inner): Place declarator for
152 attributes inside that for function or array, not outside. Set
153 u.id.attrs for identifiers.
154 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
155 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
156 instead of u.id.
157
158 2019-11-22 Jakub Jelinek <jakub@redhat.com>
159
160 PR c/90677
161 * c-decl.c (identifier_global_tag): Define.
162
163 2019-11-20 Richard Biener <rguenther@suse.de>
164
165 PR c/92088
166 * c-decl.c (grokdeclarator): Prevent inlining of nested
167 function with VLA arguments.
168
169 2019-11-20 Joseph Myers <joseph@codesourcery.com>
170
171 * c-decl.c (c_warn_type_attributes): New function.
172 (groktypename, grokdeclarator, finish_declspecs): Call
173 c_warn_type_attributes before applying attributes to types.
174 * c-tree.h (c_warn_type_attributes): Declare.
175
176 2019-11-19 Joseph Myers <joseph@codesourcery.com>
177
178 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
179 standard attributes.
180 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
181 pedwarn for unknown standard attributes and return error_mark_node
182 for them.
183
184 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
185
186 * c-parser.c (c_parser_parse_rtl_body): Always call
187 run_rtl_passes, even if startwith pass is not provided.
188
189 2019-11-15 Joseph Myers <joseph@codesourcery.com>
190
191 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
192 duplicate standard attributes.
193
194 2019-11-15 Joseph Myers <joseph@codesourcery.com>
195
196 * c-decl.c (std_attribute_table): Add maybe_unused.
197
198 2019-11-15 Joseph Myers <joseph@codesourcery.com>
199
200 * c-decl.c (std_attribute_table): Add fallthrough.
201 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
202 attribute at top level.
203
204 2019-11-15 Joseph Myers <joseph@codesourcery.com>
205
206 * c-decl.c (std_attribute_table): New.
207 (c_init_decl_processing): Register attributes from
208 std_attribute_table.
209 * c-parser.c (c_parser_attribute_arguments): Add arguments
210 require_string and allow_empty_args. All callers changed.
211 (c_parser_std_attribute): Set require_string argument for
212 "deprecated" attribute.
213
214 2019-11-14 Joseph Myers <joseph@codesourcery.com>
215
216 * c-parser.c (c_parser_postfix_expression)
217 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
218 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
219
220 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
221
222 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
223 of build_same_sized_truth_vector_type.
224 (build_vec_cmp): Likewise.
225
226 2019-11-14 Jakub Jelinek <jakub@redhat.com>
227
228 * c-parser.c (c_parser_omp_context_selector): Don't require score
229 argument to fit into shwi, just to be INTEGER_CST. Diagnose
230 negative score.
231
232 * c-parser.c (c_parser_omp_context_selector): Rename
233 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
234 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
235 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
236 and string literals.
237
238 2019-11-14 Joseph Myers <joseph@codesourcery.com>
239
240 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
241 ctsk_tagfirstref_attrs.
242 (struct c_declspecs): Update description of attrs. Add
243 postfix_attrs and non_std_attrs_seen_p. Increase size of
244 typespec_kind bit-field.
245 (c_warn_unused_attributes): New declaration.
246 (parser_xref_tag): Update prototype.
247 * c-decl.c (c_warn_unused_attributes): New function.
248 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
249 ctsk_tagref_attrs. Handle attribute declarations.
250 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
251 (grokdeclarator): Handle standard attributes.
252 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
253 attributes to incomplete type reference.
254 (xref_tag): Update call to parser_xref_tag.
255 (declspecs_add_addrspace, declspecs_add_type)
256 (declspecs_add_scspec, declspecs_add_attrs): Set
257 non_std_attrs_seen_p.
258 (finish_declspecs): Apply postfix standard attributes to type.
259 * c-parser.c (c_token_starts_declspecs)
260 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
261 (c_parser_next_tokens_start_declaration): Update comments.
262 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
263 parser->tokens[2] to parser->tokens[1].
264 (c_parser_nth_token_starts_std_attributes)
265 (c_parser_std_attribute_specifier_sequence): New functions.
266 (c_parser_declaration_or_fndef): Add arguments have_attrs and
267 attrs. All callers changed. Handle standard attributes.
268 (c_parser_parms_declarator, c_parser_parms_list_declarator)
269 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
270 All callers changed.
271 (c_parser_declspecs): Add arguments start_std_attr_ok and
272 end_std_attr_ok. All callers changed. Handle standard
273 attributes.
274 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
275 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
276 (c_parser_compound_statement_nostart, c_parser_all_labels)
277 (c_parser_label, c_parser_statement, c_parser_for_statement):
278 Handle standard attributes.
279 * c-parser.h (c_parser_declspecs): Update prototype.
280 * gimple-parser.c (c_parser_gimple_declaration): Update call to
281 c_parser_declspecs.
282
283 2019-11-12 Martin Liska <mliska@suse.cz>
284
285 * gimple-parser.c: Do not include params.h.
286
287 2019-11-12 Martin Liska <mliska@suse.cz>
288
289 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
290 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
291 macro.
292
293 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
294 Frederik Harwath <frederik@codesourcery.com>
295
296 gcc/c/
297 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
298 (c_parser_oacc_kernels_parallel): Rename function to...
299 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
300 (c_parser_omp_construct): Update accordingly.
301
302
303 2019-11-11 Jakub Jelinek <jakub@redhat.com>
304
305 * c-parser.c (c_parser_translation_unit): Diagnose declare target
306 without corresponding end declare target.
307
308 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
309
310 * c-convert.c (convert): Only handle vector conversions if one of
311 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
312 allows it.
313 * c-typeck.c (build_array_ref): Only allow vector indexing if the
314 vectors satisfy gnu_vector_type_p.
315 (build_unary_op): Only allow unary operators to be applied to
316 vectors if they satisfy gnu_vector_type_p.
317 (digest_init): Only allow by-element initialization of vectors
318 if they satisfy gnu_vector_type_p.
319 (really_start_incremental_init): Likewise.
320 (push_init_level): Likewise.
321 (pop_init_level): Likewise.
322 (process_init_element): Likewise.
323 (build_binary_op): Only allow binary operators to be applied to
324 vectors if they satisfy gnu_vector_type_p.
325
326 2019-11-08 Joseph Myers <joseph@codesourcery.com>
327
328 * c-decl.c (grokparms): Convert () in a function definition to
329 (void) for C2x.
330 (store_parm_decls_oldstyle): Pedwarn for C2x.
331 (store_parm_decls): Update comment about () not generating a
332 prototype.
333
334 2019-11-07 Joseph Myers <joseph@codesourcery.com>
335
336 * c-parser.c (c_parser_attribute_arguments): New function.
337 Factored out of c_parser_gnu_attribute.
338 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
339 (c_parser_balanced_token_sequence, c_parser_std_attribute)
340 (c_parser_std_attribute_specifier): New functions.
341 (c_parser_transaction_attributes): Use
342 c_parser_std_attribute_specifier.
343
344 2019-11-07 Joseph Myers <joseph@codesourcery.com>
345
346 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
347 lex_joined_string and translate_strings_p.
348 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
349 c_lex_with_flags.
350 (c_parser_string_literal): New function.
351 (c_parser_static_assert_declaration_no_semi): Use
352 c_parser_string_literal. Do not set lex_untranslated_string.
353 (c_parser_asm_string_literal): Use c_parser_string_literal.
354 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
355 (c_parser_gnu_attributes): Set and restore translate_strings_p
356 instead of lex_untranslated_string.
357 (c_parser_asm_statement): Do not set lex_untranslated_string.
358 (c_parser_asm_operands): Likewise.
359 (c_parser_has_attribute_expression): Set and restore
360 translate_strings_p instead of lex_untranslated_string.
361 (c_parser_postfix_expression): Use c_parser_string_literal.
362 (pragma_lex): Likewise.
363 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
364 (c_parse_file): Set translate_strings_p.
365 * gimple-parser.c (c_parser_gimple_postfix_expression)
366 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
367 * c-parser.c (c_parser_string_literal): Declare function.
368
369 2019-11-02 Jakub Jelinek <jakub@redhat.com>
370
371 * c-parser.c (c_finish_omp_declare_variant): Use
372 omp_get_context_selector instead of c_omp_get_context_selector.
373
374 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
375
376 * c-tree.h (c_simulate_enum_decl): Declare.
377 * c-decl.c (c_simulate_enum_decl): New function.
378 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
379
380 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
381
382 * c-tree.h (c_simulate_builtin_function_decl): Declare.
383 * c-decl.c (c_simulate_builtin_function_decl): New function.
384 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
385 to the above.
386
387 2019-10-28 Martin Sebor <msebor@redhat.com>
388
389 PR c/66970
390 * c-decl.c (names_builtin_p): Define a new function.
391
392 2019-10-28 Richard Biener <rguenther@suse.de>
393
394 PR c/92249
395 * gimple-parser.c (c_parser_parse_gimple_body): Make
396 current_bb the entry block initially to easier recover
397 from errors.
398 (c_parser_gimple_compound_statement): Adjust.
399
400 2019-10-24 Jakub Jelinek <jakub@redhat.com>
401
402 * c-parser.c (c_finish_omp_declare_variant): Use
403 omp_context_selector_matches instead of
404 c_omp_context_selector_matches.
405 * c-decl.c (c_decl_attributes): Add "omp declare target block"
406 attribute in between declare target and end declare target
407 pragmas.
408
409 2019-10-15 Joseph Myers <joseph@codesourcery.com>
410
411 * c-parser.c (c_parser_attribute_any_word): Rename to
412 c_parser_gnu_attribute_any_word. All callers changed.
413 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
414 callers changed.
415 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
416 callers changed.
417 (c_parser_declaration_or_fndef, c_parser_declspecs)
418 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
419 (c_parser_struct_declaration, c_parser_declarator)
420 (c_parser_gnu_attribute, c_parser_compound_statement)
421 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
422 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
423 attribute-related syntax productions.
424
425 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
426
427 * c-objc-common.c (useful_aka_type_p): Replace with...
428 (get_aka_type): ...this new function. Given the original type,
429 decide which aka type to print (if any). Only look through typedefs
430 if user_facing_original_type_p.
431 (print_type): Update accordingly.
432
433 2019-10-14 Jakub Jelinek <jakub@redhat.com>
434
435 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
436 into int NESTED, if it is 2, diagnose missing commas in between
437 clauses.
438 (c_parser_omp_context_selector): Pass 2 as last argument to
439 c_parser_omp_all_clauses.
440
441 2019-10-12 Jakub Jelinek <jakub@redhat.com>
442
443 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
444 For simd properties, put them directly into TREE_VALUE.
445 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
446 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
447 add "omp declare variant base" attribute rather than
448 "omp declare variant".
449
450 2019-10-11 Joseph Myers <joseph@codesourcery.com>
451
452 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
453
454 2019-10-10 Jakub Jelinek <jakub@redhat.com>
455
456 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
457 true, terminate processing on closing paren and don't skip to end of
458 pragma line.
459 (c_parser_omp_declare_simd): Handle also declare variant.
460 (omp_construct_selectors, omp_device_selectors,
461 omp_implementation_selectors, omp_user_selectors): New variables.
462 (c_parser_omp_context_selector,
463 c_parser_omp_context_selector_specification,
464 c_finish_omp_declare_variant): New functions.
465 (c_finish_omp_declare_simd): Handle both declare simd and
466 declare variant.
467 (c_parser_omp_declare): Handle declare variant.
468
469 2019-10-02 Joseph Myers <joseph@codesourcery.com>
470
471 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
472 CPP_COLON tokens.
473
474 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
475
476 * c-objc-common.c (useful_aka_type_p): New function.
477 (print_type): Use it to decide whether an aka type is worth printing.
478
479 2019-09-27 Jakub Jelinek <jakub@redhat.com>
480
481 PR c++/88203
482 * c-parser.c (c_parser_predefined_identifier): New function.
483 (c_parser_postfix_expression): Use it.
484 (c_parser_omp_variable_list): Parse predefined identifiers.
485 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
486 in shared and firstprivate clauses, even when they are predetermined
487 shared.
488
489 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
490
491 * c-typeck.c (build_function_call_vec): Take the original function
492 decl as an optional final parameter. Pass all built-in calls to
493 check_builtin_function_arguments.
494
495 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
496
497 PR c/91815
498 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
499 of identifiers in the external scope only for variables and functions.
500
501 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
502
503 PR c/78736
504 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
505
506 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
507
508 PR pch/61250
509 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
510 after determining that the first token is not
511 PRAGMA_GCC_PCH_PREPROCESS.
512
513 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
514
515 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
516 FUNCTION_DECL to the right value in the presence of nested declarators.
517
518 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
519
520 PR middle-end/91421
521 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
522
523 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
524
525 PR middle-end/91421
526 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
527 of a built_in_function.
528 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
529
530 2019-08-10 Jakub Jelinek <jakub@redhat.com>
531
532 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
533 (c_parser_omp_clause_device_type): New function.
534 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
535 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
536 (c_parser_omp_declare_target): Handle device_type clauses. Remove
537 diagnostics for declare target with clauses nested in clause-less
538 declare target declaration-definition-seq.
539 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
540
541 2019-08-09 Jakub Jelinek <jakub@redhat.com>
542
543 * c-parser.c (check_no_duplicate_clause): Simplify using
544 omp_find_clause.
545 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
546 directive name modifiers.
547 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
548
549 PR c/91401
550 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
551 check_no_duplicate_clause call. Comment it out, instead emit a
552 warning for duplicate dist_schedule clauses.
553
554 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
555
556 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
557
558 2019-08-08 Jakub Jelinek <jakub@redhat.com>
559
560 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
561 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
562 instead of generic_head to track duplicates.
563
564 2019-08-07 Jakub Jelinek <jakub@redhat.com>
565
566 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
567 (c_parser_omp_clause_use_device_addr): New function.
568 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
569 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
570 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
571 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
572 map or use_device_* clauses.
573 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
574 in OpenMP, require pointer type rather than pointer or array type.
575 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
576
577 2019-07-31 Jakub Jelinek <jakub@redhat.com>
578
579 PR c/91192
580 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
581 even if finish is UNKNOWN_LOCATION, just use start as finish in that
582 case.
583
584 2019-07-25 Martin Liska <mliska@suse.cz>
585 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
586
587 PR c++/23383
588 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
589
590 2019-07-25 Martin Liska <mliska@suse.cz>
591
592 * c-decl.c (merge_decls): Use new macros
593 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
594
595 2019-07-23 Richard Biener <rguenther@suse.de>
596
597 PR tree-optimization/83518
598 * gimple-parser.c (c_parser_parse_gimple_body): When we have
599 a CFG also rebuild cgraph edges.
600
601 2019-07-20 Jakub Jelinek <jakub@redhat.com>
602
603 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
604 (c_parser_omp_clause_bind): New function.
605 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
606 (OMP_LOOP_CLAUSE_MASK): Define.
607 (c_parser_omp_loop): New function.
608 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
609 loop combined with parallel or teams.
610 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
611 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
612
613 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
614
615 PR c/53633
616 * c-decl.c (finish_function): Check targetm.warn_func_return
617 before issuing a -Wreturn-type warning.
618
619 2019-07-12 Alexandre Oliva <oliva@adacore.com>
620
621 * gimple-parser.c (c_parser_gimple_try_stmt): New.
622 (c_parser_compound_statement): Call it.
623
624 2019-07-12 Jakub Jelinek <jakub@redhat.com>
625
626 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
627 (c_parser_omp_clause_order): New function.
628 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
629 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
630 PRAGMA_OMP_CLAUSE_ORDER.
631 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
632
633 2019-07-10 Richard Biener <rguenther@suse.de>
634
635 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
636 _Literal (int *) &x for address literals.
637
638 2019-07-09 Martin Sebor <msebor@redhat.com>
639
640 PR c++/61339
641 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
642 to class.
643 (field_decl_cmp): Same.
644 * c-parser.c (c_parser_struct_or_union_specifier): Same.
645 * c-tree.h: Same.
646 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
647
648 2019-07-09 Martin Sebor <msebor@redhat.com>
649
650 PR c++/61339
651 * c-decl.c: Change class-key from class to struct and vice versa
652 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
653 * gimple-parser.c: Same.
654
655 2019-07-01 Richard Biener <rguenther@suse.de>
656
657 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
658 _Literal (char *) &"foo" for address literals pointing to
659 STRING_CSTs.
660
661 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
662
663 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
664 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
665 C incompatibility if alternate "__intN__" form is used.
666
667 2019-06-24 Martin Sebor <msebor@redhat.com>
668
669 * c-typeck.c (build_binary_op): Hyphenate floating-point.
670
671 2019-06-10 Jakub Jelinek <jakub@redhat.com>
672
673 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
674 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
675 (c_parser_omp_scan_loop_body): New function.
676 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
677 inscan reduction clauses.
678 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
679 non-inscan reductions on the same construct, or inscan reductions with
680 ordered or schedule clauses, or inscan array reductions.
681
682 2019-06-05 Martin Sebor <msebor@redhat.com>
683
684 PR c/90737
685 * c-typeck.c (c_finish_return): Only consider functions returning
686 pointers as candidates for -Wreturn-local-addr.
687
688 2019-06-05 Martin Sebor <msebor@redhat.com>
689
690 * c-decl.c (start_decl): Adjust quoting and hyphenation
691 in diagnostics.
692 (finish_decl): Same.
693 (finish_enum): Same.
694 (start_function): Same.
695 (declspecs_add_type): Same.
696 * c-parser.c (warn_for_abs): Same.
697 * c-typeck.c (build_binary_op): Same.
698
699 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
700
701 PR c/89433
702 * c-parser.c (c_finish_oacc_routine): Rework checking if already
703 marked with an OpenACC 'routine' directive.
704
705 PR c/89433
706 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
707 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
708
709 PR c/89433
710 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
711 clauses from "omp declare target" attribute.
712
713 2019-05-16 Martin Sebor <msebor@redhat.com>
714
715 * c-decl.c (start_decl): Quote keywords, operators, and
716 types in diagnostics.
717 (finish_decl): Same.
718 * c-parser.c (c_parser_asm_statement): Same.
719 (c_parser_conditional_expression): Same.
720 (c_parser_transaction_cancel): Same.
721 * c-typeck.c (c_common_type): Same.
722 (build_conditional_expr): Same.
723 (digest_init): Same.
724 (process_init_element): Same.
725 (build_binary_op): Same.
726
727 2019-05-17 Richard Biener <rguenther@suse.de>
728
729 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
730 (c_parser_gimple_unary_expression): Likewise.
731 (c_parser_gimple_parentized_ternary_expression): New function.
732
733 2019-05-16 Richard Biener <rguenther@suse.de>
734
735 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
736 (c_parser_gimple_unary_expression): Likewise.
737
738 2019-05-15 Richard Biener <rguenther@suse.de>
739
740 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
741 __BIT_FIELD_REF.
742
743 2019-05-14 Richard Biener <rguenther@suse.de>
744
745 * gimple-parser.c (c_parser_gimple_statement): Remove
746 questionable auto-promotion to VIEW_CONVERT_EXPR.
747 (c_parser_gimple_typespec): Split out from __MEM parsing.
748 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
749 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
750 as __VIEW_CONVERT with -gimple.
751
752 2019-05-09 Martin Liska <mliska@suse.cz>
753
754 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
755 __MAX.
756 (c_parser_gimple_unary_expression): Parse also binary expression
757 __MIN and __MAX.
758 (c_parser_gimple_parentized_binary_expression): New function.
759
760 2019-05-09 Martin Liska <mliska@suse.cz>
761
762 * gimple-parser.c (struct gimple_parser): Add probability.
763 for gimple_parser_edge.
764 (gimple_parser::push_edge): Add new argument probability.
765 (c_parser_gimple_parse_bb_spec): Parse also probability
766 if present.
767 (c_parser_parse_gimple_body): Set edge probability.
768 (c_parser_gimple_compound_statement): Consume token
769 before calling c_parser_gimple_goto_stmt.
770 Parse BB counts.
771 (c_parser_gimple_statement): Pass new argument.
772 (c_parser_gimple_goto_stmt): Likewise.
773 (c_parser_gimple_if_stmt): Likewise.
774 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
775 * c-parser.c (c_parser_declaration_or_fndef): Pass
776 hot_bb_threshold argument.
777 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
778 field.
779 (c_parser_gimple_parse_bb_spec_edge_probability): New.
780
781 2019-04-26 Jakub Jelinek <jakub@redhat.com>
782
783 PR debug/90197
784 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
785 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
786 (c_parser_do_statement): Likewise.
787 (c_parser_for_statement): Likewise. Formatting fixes.
788 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
789 emit DEBUG_BEGIN_STMTs if needed.
790
791 2019-04-19 Jakub Jelinek <jakub@redhat.com>
792
793 PR c/89888
794 * c-typeck.c (struct c_switch): Remove outside_range_p member.
795 (c_start_case): Don't clear it.
796 (do_case): Adjust c_add_case_label caller.
797 (c_finish_case): Adjust c_do_switch_warnings caller.
798
799 PR c++/90108
800 * c-decl.c (merge_decls): If remove is main variant and
801 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
802 variant that has newdecl as TYPE_NAME if any.
803
804 2019-04-12 Jakub Jelinek <jakub@redhat.com>
805
806 PR c/89933
807 * c-decl.c (merge_decls): When newdecl's type is its main variant,
808 don't try to remove it from the variant list, but instead assert
809 it has no variants.
810
811 2019-04-01 Richard Biener <rguenther@suse.de>
812
813 PR c/71598
814 * c-tree.h (c_get_alias_set): Declare.
815 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
816 * c-objc-common.c (c_get_alias_set): Treat enumeral types
817 as the underlying integer type.
818
819 2019-03-19 Martin Sebor <msebor@redhat.com>
820
821 PR tree-optimization/89688
822 * c-decl.c (finish_decl): Call braced_lists_to_string for more
823 kinds of initializers.
824
825 2019-03-19 Jakub Jelinek <jakub@redhat.com>
826
827 PR c/89734
828 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
829 return type even if quals_used is 0. Formatting fixes.
830
831 2019-03-14 Richard Biener <rguenther@suse.de>
832
833 * c-tree.h (enum c_declspec_il): New.
834 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
835 enum bitfield.
836 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
837 Pass start pass and declspec_il to c_parser_parse_gimple_body.
838 (c_parser_declspecs): Adjust.
839 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
840 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
841 and bitmap.h.
842 (struct gimple_parser): New.
843 (gimple_parser::push_edge): New method.
844 (c_parser_gimple_parse_bb_spec): New helper.
845 (c_parser_parse_gimple_body): Get start pass and IL specification.
846 Initialize SSA and CFG.
847 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
848 Build a gimple_parser parsing state and pass it along.
849 (c_parser_gimple_statement): Change intermittend __PHI internal
850 function argument for the edge.
851 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
852 (c_parser_gimple_goto_stmt): Record edges to build.
853 (c_parser_gimple_if_stmt): Likewise.
854 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
855 (c_parser_gimple_or_rtl_pass_list): Likewise.
856
857 2019-03-11 Martin Liska <mliska@suse.cz>
858
859 * c-decl.c (check_for_loop_decls): Wrap an option name
860 in a string format message and fix GNU coding style.
861 * c-parser.c (c_parser_declspecs): Likewise.
862
863 2019-03-08 Jakub Jelinek <jakub@redhat.com>
864
865 PR tree-optimization/89550
866 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
867 returned true.
868 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
869 or warning returned true.
870
871 2019-02-28 Jakub Jelinek <jakub@redhat.com>
872
873 PR c/89525
874 * c-typeck.c (convert_arguments): Call inform_declaration only if
875 the previous warning_at call returned true.
876
877 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
878
879 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
880 parameter. Adjust all users.
881 (c_parser_oacc_simple_clause): Replace parser with loc formal
882 parameter. Adjust all users.
883
884 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
885
886 PR c/87924
887 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
888 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
889
890 2019-02-15 Jakub Jelinek <jakub@redhat.com>
891
892 PR c/89340
893 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
894 before c_decl_attributes rather than after it.
895
896 2019-02-06 Jakub Jelinek <jakub@redhat.com>
897
898 PR c/89211
899 * c-parser.c (c_parser_declaration_or_fndef): Don't update
900 DECL_ARGUMENTS of d if it has been defined already. Use a single if
901 instead of 3 nested ifs.
902
903 2019-02-06 Joseph Myers <joseph@codesourcery.com>
904
905 PR c/88584
906 * c-decl.c (finish_decl): Do not complete array types for arrays
907 with external linkage not at file scope.
908
909 2019-02-05 Richard Biener <rguenther@suse.de>
910
911 PR c/88606
912 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
913 all type variants when not supported.
914
915 2019-01-30 Jakub Jelinek <jakub@redhat.com>
916
917 PR c/89061
918 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
919 * c-decl.c (decl_jump_unsafe): Return false for
920 C_DECL_COMPOUND_LITERAL_P decls.
921 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
922
923 2019-01-29 Jakub Jelinek <jakub@redhat.com>
924
925 PR c/89045
926 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
927 scope.
928
929 PR c/86125
930 * c-decl.c (last_fileptr_type): Remove.
931 (last_structptr_types): New variable.
932 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
933 {old,new}rettype instead of the types themselves. Assert
934 last_structptr_types array has the same number of elements
935 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
936 argument oldtype and newtype. Instead of handling
937 just fileptr_type_node specially, handle all builtin_structptr_types
938 pointer nodes. Formatting fix.
939
940 2019-01-24 Martin Sebor <msebor@redhat.com>
941
942 PR c/86125
943 PR c/88886
944 PR middle-end/86308
945 * c-decl.c (match_builtin_function_types): Add arguments.
946 (diagnose_mismatched_decls): Diagnose mismatched declarations
947 of built-ins more strictly.
948
949 2019-01-24 Jakub Jelinek <jakub@redhat.com>
950
951 PR c++/88976
952 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
953 on #pragma omp cancel with different modifiers.
954
955 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
956
957 PR c/51628
958 PR c/88664
959 * c-typeck.c (convert_for_assignment): Upate the
960 warn_for_address_or_pointer_of_packed_member call.
961
962 2019-01-16 Tom Honermann <tom@honermann.net>
963 Jason Merrill <jason@redhat.com>
964
965 * c-typeck.c (digest_init): Revised the error message produced for
966 ill-formed cases of array initialization with a string literal.
967 (error_init): Make variadic.
968
969 2019-01-12 Jakub Jelinek <jakub@redhat.com>
970
971 * c-typeck.c (convert_for_assignment): Fix a comment typo.
972
973 2019-01-07 Jakub Jelinek <jakub@redhat.com>
974
975 PR c/88701
976 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
977 if current_function_decl is non-NULL.
978
979 2019-01-07 Joseph Myers <joseph@codesourcery.com>
980
981 PR c/88720
982 PR c/88726
983 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
984 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
985 functions declared but never defined only for external scope, not
986 for other scopes.
987
988 2019-01-07 Jakub Jelinek <jakub@redhat.com>
989
990 PR c++/85052
991 * c-parser.c (c_parser_postfix_expression): Parse
992 __builtin_convertvector.
993
994 2019-01-01 Jakub Jelinek <jakub@redhat.com>
995
996 Update copyright years.
997
998 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
999
1000 PR c/51628
1001 * c-typeck.c (convert_for_assignment): Call
1002 warn_for_address_or_pointer_of_packed_member.
1003
1004 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1005
1006 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1007 a more specific error message (instead of just falling through).
1008
1009 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1010
1011 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1012 asm qualifier is first seen; use that to give nicer "duplicate asm
1013 qualifier" messages. Delete 'quals" variable, instead pass the
1014 "is_volatile_ flag to build_asm_stmt directly.
1015 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1016 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1017
1018 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1019
1020 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1021 "done" boolean variable.
1022
1023 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1024
1025 PR c++/87504
1026 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1027 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1028 (build_binary_op): Use struct op_location_t and
1029 class binary_op_rich_location.
1030
1031 2018-12-11 Jakub Jelinek <jakub@redhat.com>
1032
1033 PR sanitizer/88426
1034 * c-convert.c (convert): Call c_fully_fold before calling
1035 ubsan_instrument_float_cast.
1036
1037 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1038
1039 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1040 setting "quals".
1041
1042 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1043
1044 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1045 after asm. Pass a flag for it to build_asm_expr.
1046 * c-tree.h (build_asm_expr): Update declaration.
1047 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1048 set ASM_INLINE_P.
1049
1050 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1051
1052 PR inline-asm/55681
1053 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1054 combination of volatile and goto, in any order, without repetitions.
1055
1056 2018-12-04 James Norris <jnorris@codesourcery.com>
1057 Cesar Philippidis <cesar@codesourcery.com>
1058 Julian Brown <julian@codesourcery.com>
1059
1060 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1061 code.
1062
1063 2018-11-30 Richard Biener <rguenther@suse.de>
1064
1065 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1066 _Literal (type) { ... } as empty aggregate or vector constructor.
1067
1068 2018-11-29 Martin Sebor <msebor@redhat.com>
1069
1070 PR c/88091
1071 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1072 (convert_arguments): Add comments. Pass additional argument to
1073 the function above.
1074
1075 2018-11-29 Martin Sebor <msebor@redhat.com>
1076
1077 PR c/88172
1078 PR testsuite/88208
1079 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1080
1081 2018-11-23 Martin Sebor <msebor@redhat.com>
1082
1083 PR testsuite/88098
1084 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1085 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1086
1087 2018-11-20 Martin Sebor <msebor@redhat.com>
1088
1089 * c-parser.c (c_parser_has_attribute_expression): New function.
1090 (c_parser_attribute): New function.
1091 (c_parser_attributes): Move code into c_parser_attribute.
1092 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1093
1094 2018-11-15 Martin Sebor <msebor@redhat.com>
1095
1096 PR c/83656
1097 * c-decl.c (header_for_builtin_fn): Declare.
1098 (diagnose_mismatched_decls): Diagnose declarations of built-in
1099 functions without a prototype.
1100 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1101 (convert_argument): Same.
1102 (convert_arguments): Factor code out into convert_argument.
1103 Detect mismatches between built-in formal arguments in calls
1104 to built-in without prototype.
1105 (build_conditional_expr): Same.
1106 (type_or_builtin_type): New function.
1107 (convert_for_assignment): Add argument. Conditionally issue
1108 warnings instead of errors for mismatches.
1109
1110 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1111
1112 * c-decl.c: Replace "source_location" with "location_t".
1113 * c-tree.h: Likewise.
1114 * c-typeck.c: Likewise.
1115 * gimple-parser.c: Likewise.
1116
1117 2018-11-09 Jakub Jelinek <jakub@redhat.com>
1118
1119 * c-parser.c (c_parser_omp_clause_final): Use
1120 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1121 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1122 parsing instead of c_parser_paren_condition.
1123 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1124 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1125 c_fully_fold instead of c_parser_condition.
1126 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1127 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1128 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1129 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1130 c_parser_expr_no_commas instead of c_parser_expression.
1131
1132 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1133 reduction clause with inscan modifier.
1134
1135 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1136 clauses other than atomic_default_mem_order.
1137
1138 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1139
1140 * c-parser.c: Include memmode.h.
1141 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1142 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1143 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1144 task_reduction clauses.
1145 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1146 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1147 section, or lvalue assignment expression.
1148 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1149 (c_parser_omp_clause_lastprivate): Parse optional
1150 conditional: modifier.
1151 (c_parser_omp_clause_hint): Require constant integer expression rather
1152 than just integer expression.
1153 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1154 clause.
1155 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1156 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1157 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1158 functions.
1159 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1160 iterators. Parse mutexinoutset and depobj kinds.
1161 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1162 callers.
1163 (c_parser_omp_all_clauses): Likewise. Handle
1164 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1165 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1166 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1167 default memory order from requires directive if any. Adjust
1168 c_finish_omp_atomic caller.
1169 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1170 (c_parser_omp_flush): Parse flush with memory-order-clause.
1171 (c_parser_omp_for_loop): Allow NE_EXPR even in
1172 OpenMP loops, adjust c_finish_omp_for caller.
1173 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1174 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1175 Allow to be called while parsing combined parallel master.
1176 Parse combined master taskloop{, simd}.
1177 (c_parser_omp_parallel): Parse combined
1178 parallel master{, taskloop{, simd}} constructs.
1179 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1180 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1181 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1182 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1183 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1184 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1185 around teams body. Use SET_EXPR_LOCATION.
1186 (c_parser_omp_target_data): Allow target data
1187 with only use_device_ptr clauses.
1188 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1189 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1190 (c_parser_omp_requires): New function.
1191 (c_finish_taskloop_clauses): New function.
1192 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1193 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1194 declaration. Disallow in_reduction clause when combined with parallel
1195 master.
1196 (c_parser_omp_construct): Adjust c_parser_omp_master and
1197 c_parser_omp_taskgroup callers.
1198 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1199 other than cancel.
1200 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1201 like OMP_CLAUSE_REDUCTION.
1202 (handle_omp_array_sections): Likewise. Call save_expr on array
1203 reductions before calling build_index_type. Handle depend clauses
1204 with iterators.
1205 (struct c_find_omp_var_s): New type.
1206 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1207 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1208 with static, runtime or auto schedule kinds. Call save_expr for whole
1209 array reduction sizes. Diagnose reductions with zero sized elements
1210 or variable length structures. Diagnose nogroup clause used with
1211 reduction clause(s). Handle depend clause with
1212 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1213 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1214 some different type for other kinds. Use build_unary_op with
1215 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1216 Handle depend clauses with iterators. Remove no longer needed special
1217 case that predetermined const qualified vars may be specified in
1218 firstprivate clause. Complain if const qualified vars are mentioned
1219 in data-sharing clauses other than firstprivate or shared. Use
1220 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1221 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1222 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1223 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1224
1225 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1226
1227 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1228 logic for change to name_hint::operator bool.
1229 (undeclared_variable): Likewise.
1230 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1231 (c_parser_parameter_declaration): Likewise.
1232
1233 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1234
1235 * c-errors.c (pedwarn_c11): New function.
1236 * c-parser.c (disable_extension_diagnostics): Save
1237 warn_c11_c2x_compat and set it to 0.
1238 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1239 (c_parser_static_assert_declaration_no_semi): Handle
1240 _Static_assert without string constant.
1241 * c-tree.h (pedwarn_c11): New prototype.
1242
1243 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1244
1245 * Make-lang.in (selftest-c): New.
1246 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1247 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1248 from gcc/Makefile.in.
1249
1250 2018-10-02 Richard Biener <rguenther@suse.de>
1251
1252 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1253
1254 2018-09-26 Joseph Myers <joseph@codesourcery.com>
1255
1256 PR c/87390
1257 * c-typeck.c (build_binary_op): Use excess precision for
1258 comparisons of integers and floating-point for C11 and later.
1259
1260 2018-09-26 Martin Jambor <mjambor@suse.cz>
1261
1262 PR c/87347
1263 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
1264 comment.
1265
1266 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1267
1268 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1269 Update for new param.
1270 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1271 Likewise.
1272
1273 2018-09-17 Martin Jambor <mjambor@suse.cz>
1274
1275 PR c/63886
1276 * c-parser.c: (warn_for_abs): New function.
1277 (c_parser_postfix_expression_after_primary): Call it.
1278
1279 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1280
1281 * c-typeck.c (digest_init): Shorten overlength strings.
1282
1283 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1284
1285 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1286
1287 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1288
1289 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1290 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1291
1292 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
1293
1294 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1295 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1296
1297 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1298
1299 PR 87091
1300 * c-decl.c (implicitly_declare): Update call to
1301 maybe_add_include_fixit to suggest overriding the location, as it
1302 is for a note.
1303 * c-objc-common.c (c_tree_printer): Update for conversion of
1304 show_caret_p to a tri-state.
1305
1306 2018-08-27 Martin Liska <mliska@suse.cz>
1307
1308 * c-decl.c (locate_old_decl): Use new function
1309 fndecl_built_in_p and remove check for FUNCTION_DECL if
1310 possible.
1311 (diagnose_mismatched_decls): Likewise.
1312 (merge_decls): Likewise.
1313 (warn_if_shadowing): Likewise.
1314 (pushdecl): Likewise.
1315 (implicitly_declare): Likewise.
1316 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1317 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1318 * c-typeck.c (build_function_call_vec): Likewise.
1319 (convert_arguments): Likewise.
1320
1321 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1322
1323 PR other/84889
1324 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1325 (diagnose_mismatched_decls): Likewise, in various places.
1326 (warn_if_shadowing): Likewise.
1327 (implicit_decl_warning): Likewise.
1328 (implicitly_declare): Likewise.
1329 (undeclared_variable): Likewise.
1330 (declare_label): Likewise.
1331 (grokdeclarator): Likewise.
1332 (start_function): Likewise.
1333 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1334 (c_parser_parameter_declaration): Likewise.
1335 (c_parser_binary_expression): Likewise.
1336 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1337 (parser_build_binary_op): Likewise.
1338 (build_unary_op): Likewise.
1339 (error_init): Likewise.
1340 (pedwarn_init): Likewise.
1341 (warning_init): Likewise.
1342 (convert_for_assignment): Likewise.
1343
1344 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1345
1346 * c-objc-common.c: Include "gcc-rich-location.h".
1347 (c_tree_printer): Move implemenation of '%T' to...
1348 (print_type): ...this new function.
1349 (range_label_for_type_mismatch::get_text): New function.
1350 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1351 range for the various ic_argpass cases.
1352 (class maybe_range_label_for_tree_type_mismatch): New class.
1353 (build_binary_op): Use it when calling binary_op_error.
1354
1355 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1356
1357 * c-decl.c (start_decl): Do not warn if variables is named as main
1358 and is a local variable.
1359
1360 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1361
1362 PR c/19315
1363 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1364 objects of unknown size.
1365
1366 2018-08-13 Martin Sebor <msebor@redhat.com>
1367
1368 PR tree-optimization/71625
1369 * c-parser.c (c_parser_declaration_or_fndef): Call
1370 braced_list_to_string.
1371
1372 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1373
1374 PR c/86690
1375 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1376 errors.
1377
1378 2018-08-01 Martin Sebor <msebor@redhat.com>
1379
1380 PR tree-optimization/86650
1381 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1382 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1383
1384 2018-08-01 Jakub Jelinek <jakub@redhat.com>
1385
1386 PR c/85704
1387 * c-typeck.c (init_field_decl_cmp): New function.
1388 (output_pending_init_elements): Use it for field comparisons
1389 instead of pure bit_position comparisons.
1390
1391 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1392
1393 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1394 type here, instead add "omp declare target implicit" attribute.
1395 (finish_decl): Diagnose vars without mappable type here.
1396
1397 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1398 Thomas Schwinge <thomas@codesourcery.com>
1399 Cesar Philippidis <cesar@codesourcery.com>
1400
1401 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1402 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1403 to their non-present_or_* counterparts. Make 'self' an alias to
1404 PRAGMA_OACC_CLAUSE_HOST.
1405 (c_parser_oacc_data_clause): Update GOMP mappings for
1406 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1407 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1408 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1409 Remove support for present_or_* clauses.
1410 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1411 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1412 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1413 (OACC_DATA_CLAUSE_MASK): Likewise.
1414 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1415 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1416 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1417 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1418 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1419
1420 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1421
1422 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1423 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1424 (c_parser_gimple_unary_expression): Likewise.
1425
1426 2018-06-15 Jakub Jelinek <jakub@redhat.com>
1427
1428 PR c/86093
1429 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1430 before doing POINTER_DIFF_EXPR.
1431
1432 2018-06-07 Marek Polacek <polacek@redhat.com>
1433
1434 PR c/85318
1435 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1436 for loop initial declarations.
1437
1438 2018-05-30 David Pagan <dave.pagan@oracle.com>
1439
1440 PR c/55976
1441 * c-decl.c (grokdeclarator): Update check for return type warnings.
1442 (start_function): Likewise.
1443 (finish_function): Likewise.
1444 * c-typeck.c (c_finish_return): Update check for return type warnings.
1445 Pass OPT_Wreturn_type to pedwarn when appropriate.
1446
1447 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1448
1449 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1450 __FMA_EXPR handlng.
1451
1452 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1453
1454 * gimple-parser.c: Include internal-fn.h.
1455 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1456 (c_parser_gimple_call_internal): New function.
1457 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1458 Fix typos in comment.
1459
1460 2018-05-10 Jakub Jelinek <jakub@redhat.com>
1461
1462 PR c++/85662
1463 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1464 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1465 fold_convert_loc.
1466 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1467 fold_offsetof_1, pass argtype as TYPE to it and drop the
1468 fold_convert_loc.
1469
1470 2018-05-02 David Pagan <dave.pagan@oracle.com>
1471
1472 PR c/30552
1473 * c-decl.c (old_style_parameter_scope): New function.
1474 * c-parser.c (c_parser_postfix_expression): Check for statement
1475 expressions in old-style function parameter list declarations.
1476 * c-parser.h (old_style_parameter_scope): New extern declaration.
1477
1478 2018-04-25 Jakub Jelinek <jakub@redhat.com>
1479
1480 PR sanitizer/84307
1481 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1482 it is not TREE_STATIC.
1483 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1484 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1485 its COMPOUND_LITERAL_EXPR_DECL.
1486
1487 2018-03-21 Joseph Myers <joseph@codesourcery.com>
1488
1489 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1490 where all functions return the same _FloatN or _FloatNx type,
1491 treat integer types as _Float64 instead of double.
1492
1493 2018-03-21 Jakub Jelinek <jakub@redhat.com>
1494
1495 PR c/84999
1496 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1497 building vector comparison, diagnose it and return error_mark_node.
1498
1499 2018-03-15 Jakub Jelinek <jakub@redhat.com>
1500
1501 PR c/84853
1502 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1503 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1504 INTEGER_TYPE element type.
1505
1506 2018-03-13 David Pagan <dave.pagan@oracle.com>
1507
1508 PR c/46921
1509 * c-typeck.c (output_init_element): Ensure field initializer
1510 expression is always evaluated if there are side effects.
1511
1512 2018-03-06 Jakub Jelinek <jakub@redhat.com>
1513
1514 PR c/84721
1515 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1516 !building_stmt_list_p ().
1517
1518 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1519
1520 PR c/84305
1521 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1522 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1523 and include the BIND_EXPR in the list of things that need to be
1524 pre-evaluated.
1525
1526 2018-02-09 Nathan Sidwell <nathan@acm.org>
1527
1528 PR c/84293
1529 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1530 to strict_aliasing_warning.
1531
1532 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1533
1534 * c-typeck.c (really_start_incremental_init, push_init_level,
1535 set_nonincremental_init, output_init_element, process_init_element):
1536 Use DECL_UNNAMED_BIT_FIELD.
1537
1538 2018-01-31 Marek Polacek <polacek@redhat.com>
1539
1540 PR c/81779
1541 * c-parser.c (c_parser_compound_statement_nostart): Call
1542 expansion_point_location_if_in_system_header.
1543
1544 2018-01-17 David Malcolm <dmalcolm@redhat.com>
1545
1546 PR c++/83814
1547 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1548 the C part.
1549
1550 2018-01-13 Jakub Jelinek <jakub@redhat.com>
1551
1552 PR c/83801
1553 * c-tree.h (decl_constant_value_1): Add a bool argument.
1554 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1555 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1556 (decl_constant_value): Adjust caller.
1557 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1558 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1559 decl_constant_value returns initializer that has BLKmode or
1560 array type.
1561 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1562
1563 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1564 Alan Hayward <alan.hayward@arm.com>
1565 David Sherwood <david.sherwood@arm.com>
1566
1567 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1568 TYPE_VECTOR_SUBPARTS.
1569
1570 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1571
1572 Update copyright years.
1573
1574 2018-01-01 Jakub Jelinek <jakub@redhat.com>
1575
1576 PR c/83595
1577 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1578 c_parser_conditional_expression, c_parser_cast_expression,
1579 c_parser_sizeof_expression, c_parser_alignof_expression,
1580 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1581 c_parser_transaction_expression): Use set_error () method instead
1582 of setting value member to error_mark_node.
1583
1584 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1585
1586 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1587 and _Float<N>X built-in functions.
1588
1589 2017-12-22 Jakub Jelinek <jakub@redhat.com>
1590
1591 PR debug/83550
1592 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1593 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1594 incomplete vars rather than after it.
1595
1596 PR debug/83547
1597 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1598 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1599 and consider empty ones if there are no other stmts. For
1600 -Wunused-value walk all statements before the one only followed by
1601 DEBUG_BEGIN_STMTs.
1602
1603 2017-12-22 Mike Stump <mikestump@comcast.net>
1604 Eric Botcazou <ebotcazou@adacore.com>
1605
1606 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1607 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1608 (c_parser_do_statement): Likewise.
1609 (c_parser_for_statement): Likewise.
1610 (c_parser_statement_after_labels): Adjust calls to above.
1611 (c_parse_pragma_ivdep): New static function.
1612 (c_parser_pragma_unroll): Likewise.
1613 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1614 <PRAGMA_UNROLL>: New case.
1615
1616 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1617
1618 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1619 perform_integral_promotions, digest_init): Replace Yoda conditions
1620 with typical order conditions.
1621 * c-decl.c (check_bitfield_type_and_width): Likewise.
1622
1623 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1624
1625 * c-typeck.c (c_safe_arg_type_equiv_p,
1626 c_safe_function_type_cast_p): New function.
1627 (build_c_cast): Implement -Wcast-function-type.
1628
1629 2017-12-14 Richard Biener <rguenther@suse.de>
1630
1631 PR c/83415
1632 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1633 like REALPART_EXPR for the behavior of whether its operand
1634 is an lvalue.
1635
1636 2017-12-12 Marek Polacek <polacek@redhat.com>
1637
1638 PR c/82679
1639 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1640
1641 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
1642
1643 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1644 * c-parser.c (add_debug_begin_stmt): New.
1645 (c_parser_declaration_or_fndef): Call it.
1646 (c_parser_compound_statement_nostart): Likewise.
1647 (c_parser_statement_after_labels): Likewise.
1648 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1649
1650 2017-12-07 Joseph Myers <joseph@codesourcery.com>
1651
1652 * c-decl.c (build_compound_literal): Add parameter alignas_align
1653 and set alignment of decl if nonzero.
1654 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1655 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1656 qualifier.
1657 (c_parser_struct_declaration): Update syntax comment.
1658 (c_parser_type_name): Add alignas_ok argument and pass it to
1659 c_parser_declspecs.
1660 (c_parser_cast_expression): Pass true to c_parser_type_name and
1661 give error if a cast used an _Alignas specifier.
1662 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1663 give error if sizeof (type-name) used an _Alignas specifier.
1664 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1665 give error if _Alignof (type-name) used an _Alignas specifier.
1666 (c_parser_postfix_expression_after_paren_type): Check specified
1667 alignment for a compound literal and pass it to
1668 build_compound_literal.
1669 * c-parser.h (c_parser_type_name): Update prototype.
1670 * c-tree.h (build_compound_literal): Update prototype.
1671
1672 2017-12-07 Martin Sebor <msebor@redhat.com>
1673
1674 PR c/81544
1675 * c-decl.c (c_decl_attributes): Look up existing declaration and
1676 pass it to decl_attributes.
1677
1678 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1679
1680 PR c/83236
1681 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1682 reserved for use by the implementation.
1683
1684 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1685
1686 * c-decl.c: Include "c-family/c-spellcheck.h".
1687
1688 2017-12-05 Martin Liska <mliska@suse.cz>
1689 Jakub Jelinek <jakub@redhat.com>
1690
1691 * c-typeck.c (pointer_diff): Add new argument and instrument
1692 pointer subtraction.
1693 (build_binary_op): Similar for pointer comparison.
1694
1695 2017-12-01 Jakub Jelinek <jakub@redhat.com>
1696
1697 PR c/79153
1698 * c-parser.c: Include tree-iterator.h.
1699 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1700 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1701 on it.
1702
1703 PR c/83222
1704 * c-tree.h (decl_constant_value_1): Declare.
1705 * c-typeck.c (decl_constant_value_1): New function.
1706 (decl_constant_value): Use it.
1707 * c-fold.c (c_fully_fold_internal): If in_init, use
1708 decl_constant_value_1 instead of decl_constant_value.
1709
1710 2017-11-30 Jakub Jelinek <jakub@redhat.com>
1711
1712 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1713
1714 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1715
1716 PR sanitizer/81275
1717 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1718 c_switch_covers_all_cases_p returns true.
1719
1720 2017-11-28 Julia Koval <julia.koval@intel.com>
1721 Sebastian Peryt <sebastian.peryt@intel.com>
1722
1723 * Make-lang.in (c/c-array-notation.o): Remove.
1724 * c-array-notation.c: Delete.
1725 * c-decl.c: Remove cilkplus condition.
1726 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1727 c_parser_cilk_verify_simd, c_parser_array_notation,
1728 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1729 c_parser_cilk_simd_fn_vector_attrs,
1730 c_finish_cilk_simd_fn_tokens): Delete.
1731 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1732 (c_parser_direct_declarator_inner): Ditto.
1733 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1734 (c_parser_attributes, c_parser_compound_statement,
1735 c_parser_statement_after_labels, c_parser_if_statement,
1736 c_parser_switch_statement, c_parser_while_statement,
1737 c_parser_do_statement, c_parser_for_statement,
1738 c_parser_unary_expression, c_parser_postfix_expression,
1739 c_parser_postfix_expression_after_primary,
1740 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1741 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1742 support.
1743 * c-typeck.c (build_array_ref, build_function_call_vec,
1744 convert_arguments,
1745 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1746 c_finish_loop, build_binary_op): Remove cilkplus support.
1747
1748 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1749
1750 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1751 of build3.
1752
1753 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
1754
1755 * Make-lang.in (c.install-plugin): Install backend import library.
1756
1757 2017-11-23 Jakub Jelinek <jakub@redhat.com>
1758
1759 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1760 pragma_stmt context.
1761
1762 2017-11-23 Mike Stump <mikestump@comcast.net>
1763 Eric Botcazou <ebotcazou@adacore.com>
1764
1765 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1766 ANNOTATE_EXPR.
1767 (c_parser_do_statement): Likewise.
1768 (c_parser_for_statement): Likewise.
1769
1770 2017-11-22 David Malcolm <dmalcolm@redhat.com>
1771
1772 PR c++/62170
1773 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1774 bool to bool *. Within '%T' handling, if showing an "aka", use
1775 "quoted" param to add appropriate quoting.
1776
1777 2017-11-22 Marek Polacek <polacek@redhat.com>
1778
1779 PR c++/60336
1780 PR middle-end/67239
1781 PR target/68355
1782 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1783
1784 2017-11-21 David Malcolm <dmalcolm@redhat.com>
1785
1786 PR c/83056
1787 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1788 earlier failed lookups.
1789
1790 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
1791
1792 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1793 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1794
1795 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1796
1797 PR c/81404
1798 * c-decl.c: Include "c-family/known-headers.h".
1799 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1800 to known-headers.cc.
1801 (class suggest_missing_header): Move to known-header.h.
1802 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1803 than get_c_name_hint.
1804
1805 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1806
1807 * c-decl.c (get_c_name_hint): New function.
1808 (class suggest_missing_header): New class.
1809 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1810 suggest missing headers to the user.
1811
1812 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1813
1814 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1815 Include "c-family/name-hint.h"
1816 (implicit_decl_warning): Convert "hint" from
1817 const char * to name_hint. Pass location to
1818 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1819 warning was not printed.
1820 (undeclared_variable): Likewise for "guessed_id".
1821 (lookup_name_fuzzy): Convert return type from const char *
1822 to name_hint. Add location_t param.
1823 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1824 Include "c-family/name-hint.h"
1825 (c_parser_declaration_or_fndef): Convert "hint" from
1826 const char * to name_hint. Pass location to lookup_name_fuzzy.
1827 (c_parser_parameter_declaration): Likewise.
1828
1829 2017-11-19 Jakub Jelinek <jakub@redhat.com>
1830
1831 PR c/66618
1832 PR c/69960
1833 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1834 where needed.
1835 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1836 handle_omp_array_sections): Likewise.
1837 (digest_init): Don't call decl_constant_value_for_optimization.
1838 * c-tree.h (decl_constant_value_for_optimization): Removed.
1839 * c-fold.c (c_fold_array_ref): New function.
1840 (c_fully_fold_internal): Add LVAL argument, propagate it through
1841 recursive calls. For VAR_P call decl_constant_value and
1842 unshare if not LVAL and either optimizing or IN_INIT. Remove
1843 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1844 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1845 (c_fully_fold): Add LVAL argument, pass it through to
1846 c_fully_fold_internal.
1847 (decl_constant_value_for_optimization): Removed.
1848
1849 2017-11-15 Joseph Myers <joseph@codesourcery.com>
1850
1851 PR c/81156
1852 * c-parser.c (check_tgmath_function): New function.
1853 (enum tgmath_parm_kind): New enum.
1854 (c_parser_postfix_expression): Handle __builtin_tgmath.
1855
1856 2017-10-31 David Malcolm <dmalcolm@redhat.com>
1857
1858 * c-decl.c (implicit_decl_warning): Update for renaming of
1859 pedwarn_at_rich_loc and warning_at_rich_loc.
1860 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1861 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1862 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1863 (c_parser_struct_or_union_specifier): Likewise for renaming of
1864 pedwarn_at_rich_loc.
1865 (c_parser_parameter_declaration): Likewise for renaming of
1866 error_at_rich_loc.
1867 * c-typeck.c (build_component_ref): Likewise.
1868 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1869 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1870 (set_init_label): Likewise for renaming of error_at_rich_loc.
1871
1872 2017-10-30 Richard Biener <rguenther@suse.de>
1873
1874 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1875 stmts.
1876
1877 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1878
1879 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
1880 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
1881
1882 2017-10-25 David Malcolm <dmalcolm@redhat.com>
1883
1884 PR c/7356
1885 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
1886 semicolons.
1887
1888 2017-10-25 Jakub Jelinek <jakub@redhat.com>
1889
1890 PR libstdc++/81706
1891 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
1892 newdecl to corresponding __builtin_ if any.
1893
1894 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
1895
1896 PR c++/82466
1897 * c-decl.c (diagnose_mismatched_decls): Use
1898 OPT_Wbuiltin_declaration_mismatch.
1899
1900 2017-10-12 David Malcolm <dmalcolm@redhat.com>
1901
1902 * c-parser.c (c_parser_require): Add "type_is_unique" param and
1903 use it to guard calls to maybe_suggest_missing_token_insertion.
1904 (c_parser_parms_list_declarator): Override default value of new
1905 "type_is_unique" param to c_parser_require.
1906 (c_parser_asm_statement): Likewise.
1907 * c-parser.h (c_parser_require): Add "type_is_unique" param,
1908 defaulting to true.
1909
1910 2017-10-11 Nathan Sidwell <nathan@acm.org>
1911
1912 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
1913
1914 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1915
1916 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
1917 operating on trees as wide_ints.
1918 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
1919 (c_tree_equal): Likewise.
1920
1921 2017-10-04 David Malcolm <dmalcolm@redhat.com>
1922
1923 * c-decl.c (push_parm_decl): Store c_parm's location into the
1924 PARAM_DECL.
1925 (build_c_parm): Add "loc" param and store it within the c_parm.
1926 * c-parser.c (struct c_parser): Add "last_token_location" field.
1927 (c_parser_consume_token): Store location of the token into the
1928 new field.
1929 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
1930 when handling a FUNCTION_DECL, if it doesn't already have them.
1931 (c_parser_parameter_declaration): Generate a location for the
1932 parameter, and pass it to the call to build_c_parm.
1933 * c-tree.h (struct c_parm): Add field "loc".
1934 (build_c_parm): Add location_t param.
1935 * c-typeck.c (get_fndecl_argument_location): New function.
1936 (inform_for_arg): New function.
1937 (convert_for_assignment): Use inform_for_arg when dealing with
1938 ic_argpass.
1939
1940 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1941
1942 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
1943 width is non-NULL.
1944 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
1945 don't SET_DECL_C_BIT_FIELD here.
1946
1947 PR c/82340
1948 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
1949 instead of trying to set just TREE_READONLY manually.
1950
1951 2017-09-16 Tom de Vries <tom@codesourcery.com>
1952
1953 PR c/81875
1954 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
1955 cond itself.
1956
1957 2017-09-15 Joseph Myers <joseph@codesourcery.com>
1958
1959 PR c/82071
1960 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
1961 for C11.
1962 (build_conditional_expr): For C11, generate result with excess
1963 precision when one argument is an integer and the other is of a
1964 type using excess precision.
1965
1966 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1967
1968 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
1969
1970 2017-09-13 Marek Polacek <polacek@redhat.com>
1971
1972 PR c/82167
1973 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
1974 than expr.original_type.
1975
1976 2017-09-12 Nathan Sidwell <nathan@acm.org>
1977
1978 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1979 resort_sorted_fields): Moved from c-family/c-common.c.
1980 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
1981
1982 2017-09-01 Joseph Myers <joseph@codesourcery.com>
1983
1984 PR c/82071
1985 * c-typeck.c (build_atomic_assign): Handle argument with excess
1986 precision. Ensure any EXCESS_PRECISION_EXPR is present in
1987 argument passed to build_binary_op and convert_for_assignment but
1988 not for call to c_fully_fold.
1989 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
1990 Ensure build_binary_op is called with argument with original
1991 semantic type. Avoid calling c_fully_fold with an
1992 EXCESS_PRECISION_EXPR from build_binary_op.
1993
1994 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1995
1996 PR c/81887
1997 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
1998
1999 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2000 Alan Hayward <alan.hayward@arm.com>
2001 David Sherwood <david.sherwood@arm.com>
2002
2003 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2004 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2005 m1 and m2 to the signed equivalent of a fixed-point
2006 SCALAR_TYPE_MODE.
2007
2008 2017-08-24 David Malcolm <dmalcolm@redhat.com>
2009
2010 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2011 than CAN_HAVE_LOCATION_P when determining whether to use the
2012 location_t value within "value".
2013
2014 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2015
2016 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2017 rather than peeking the location of the first token.
2018 * c-tree.h (c_expr::get_location): New method.
2019
2020 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2021
2022 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2023 to check_function_arguments.
2024
2025 2017-08-18 Marek Polacek <polacek@redhat.com>
2026
2027 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2028 commentary.
2029
2030 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2031
2032 PR c/53037
2033 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2034 (check_bitfield_type_and_width): Don't allow bit-field with
2035 warn_if_not_aligned type.
2036
2037 2017-08-14 Martin Sebor <msebor@redhat.com>
2038
2039 PR c/81117
2040 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2041
2042 2017-08-11 Marek Polacek <polacek@redhat.com>
2043
2044 PR c/81795
2045 * c-decl.c (pushtag): Only print inform if the warning was printed.
2046 (grokdeclarator): Likewise.
2047
2048 2017-08-10 David Malcolm <dmalcolm@redhat.com>
2049
2050 * c-parser.c (c_parser_error): Rename to...
2051 (c_parser_error_richloc): ...this, making static, and adding
2052 "richloc" parameter, passing it to the c_parse_error call,
2053 rather than calling c_parser_set_source_position_from_token.
2054 (c_parser_error): Reintroduce, reimplementing in terms of the
2055 above, converting return type from void to bool.
2056 (class token_pair): New class.
2057 (struct matching_paren_traits): New struct.
2058 (matching_parens): New typedef.
2059 (struct matching_brace_traits): New struct.
2060 (matching_braces): New typedef.
2061 (get_matching_symbol): New function.
2062 (c_parser_require): Add param MATCHING_LOCATION, using it to
2063 highlight matching "opening" tokens for missing "closing" tokens.
2064 (c_parser_skip_until_found): Likewise.
2065 (c_parser_static_assert_declaration_no_semi): Convert explicit
2066 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2067 class matching_parens, so that the pertinent open parenthesis is
2068 highlighted when there are problems locating the close
2069 parenthesis.
2070 (c_parser_struct_or_union_specifier): Likewise.
2071 (c_parser_typeof_specifier): Likewise.
2072 (c_parser_alignas_specifier): Likewise.
2073 (c_parser_simple_asm_expr): Likewise.
2074 (c_parser_braced_init): Likewise, for matching_braces.
2075 (c_parser_paren_condition): Likewise, for matching_parens.
2076 (c_parser_switch_statement): Likewise.
2077 (c_parser_for_statement): Likewise.
2078 (c_parser_asm_statement): Likewise.
2079 (c_parser_asm_operands): Likewise.
2080 (c_parser_cast_expression): Likewise.
2081 (c_parser_sizeof_expression): Likewise.
2082 (c_parser_alignof_expression): Likewise.
2083 (c_parser_generic_selection): Likewise.
2084 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2085 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2086 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2087 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2088 c_parser_skip_until_found call.
2089 (c_parser_objc_class_definition): Use class matching_parens as
2090 above.
2091 (c_parser_objc_method_decl): Likewise.
2092 (c_parser_objc_try_catch_finally_statement): Likewise.
2093 (c_parser_objc_synchronized_statement): Likewise.
2094 (c_parser_objc_at_property_declaration): Likewise.
2095 (c_parser_oacc_wait_list): Likewise.
2096 (c_parser_omp_var_list_parens): Likewise.
2097 (c_parser_omp_clause_collapse): Likewise.
2098 (c_parser_omp_clause_default): Likewise.
2099 (c_parser_omp_clause_if): Likewise.
2100 (c_parser_omp_clause_num_threads): Likewise.
2101 (c_parser_omp_clause_num_tasks): Likewise.
2102 (c_parser_omp_clause_grainsize): Likewise.
2103 (c_parser_omp_clause_priority): Likewise.
2104 (c_parser_omp_clause_hint): Likewise.
2105 (c_parser_omp_clause_defaultmap): Likewise.
2106 (c_parser_oacc_single_int_clause): Likewise.
2107 (c_parser_omp_clause_ordered): Likewise.
2108 (c_parser_omp_clause_reduction): Likewise.
2109 (c_parser_omp_clause_schedule): Likewise.
2110 (c_parser_omp_clause_num_teams): Likewise.
2111 (c_parser_omp_clause_thread_limit): Likewise.
2112 (c_parser_omp_clause_aligned): Likewise.
2113 (c_parser_omp_clause_linear): Likewise.
2114 (c_parser_omp_clause_safelen): Likewise.
2115 (c_parser_omp_clause_simdlen): Likewise.
2116 (c_parser_omp_clause_depend): Likewise.
2117 (c_parser_omp_clause_map): Likewise.
2118 (c_parser_omp_clause_device): Likewise.
2119 (c_parser_omp_clause_dist_schedule): Likewise.
2120 (c_parser_omp_clause_proc_bind): Likewise.
2121 (c_parser_omp_clause_uniform): Likewise.
2122 (c_parser_omp_for_loop): Likewise.
2123 (c_parser_cilk_clause_vectorlength): Likewise.
2124 (c_parser_cilk_clause_linear): Likewise.
2125 (c_parser_transaction_expression): Likewise.
2126 * c-parser.h (c_parser_require): Add param matching_location with
2127 default UNKNOWN_LOCATION.
2128 (c_parser_error): Convert return type from void to bool.
2129 (c_parser_skip_until_found): Add param matching_location with
2130 default UNKNOWN_LOCATION.
2131
2132 2017-08-09 Marek Polacek <polacek@redhat.com>
2133
2134 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2135 * c-tree.h (build_external_ref): Update declaration.
2136 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2137 (build_external_ref): Change the type of a parameter to bool.
2138 (parser_build_binary_op): Use true/false instead of 1/0.
2139 (pointer_diff): Likewise.
2140 (build_modify_expr): Likewise.
2141 (set_designator): Change the type of a parameter to bool.
2142 (set_init_index): Use true/false instead of 1/0.
2143 (set_init_label): Likewise.
2144 (output_init_element): Change the type of a parameter to bool.
2145 (output_pending_init_elements): Use true/false instead of 1/0.
2146 (process_init_element): Likewise.
2147 (build_binary_op): Change the type of a parameter to bool.
2148
2149 2017-08-09 Marek Polacek <polacek@redhat.com>
2150
2151 PR c/81233
2152 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2153 Call emit_diagnostic_valist instead of pedwarn.
2154 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2155 Print the relevant types in diagnostics.
2156
2157 2017-08-09 Marek Polacek <polacek@redhat.com>
2158
2159 PR c/81417
2160 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
2161 build_conditional_expr.
2162 * c-parser.c (c_parser_conditional_expression): Create locations for
2163 EXP1 and EXP2 from their source ranges. Pass the locations down to
2164 build_conditional_expr.
2165 * c-tree.h (build_conditional_expr): Update declaration.
2166 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2167 For -Wsign-compare, also print the types.
2168
2169 2017-08-08 Martin Liska <mliska@suse.cz>
2170
2171 * c-convert.c: Include header files.
2172 * c-typeck.c: Likewise.
2173
2174 2017-08-07 Martin Liska <mliska@suse.cz>
2175
2176 * c-parser.c (c_parser_attributes): Canonicalize name of an
2177 attribute.
2178
2179 2017-08-02 Marek Polacek <polacek@redhat.com>
2180
2181 PR c/81289
2182 * c-parser.c (c_parser_unary_expression): Use set_error.
2183
2184 PR c/81448
2185 PR c/81306
2186 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2187 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2188
2189 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
2190 Martin Liska <mliska@suse.cz>
2191
2192 * c-typeck.c (c_finish_goto_label): Build gimple predict
2193 statement.
2194
2195 2017-07-31 Martin Liska <mliska@suse.cz>
2196
2197 PR sanitize/81530
2198 * c-convert.c (convert): Guard condition with flag_sanitize_p
2199 also with current_function_decl non-null equality.
2200 * c-decl.c (grokdeclarator): Likewise.
2201 * c-typeck.c (build_binary_op): Likewise.
2202
2203 2017-07-25 Marek Polacek <polacek@redhat.com>
2204
2205 * c-decl.c (grokfield): Remove local variable.
2206
2207 2017-07-25 Marek Polacek <polacek@redhat.com>
2208
2209 PR c/81364
2210 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2211 macro expansion if the body is in { }.
2212 (c_parser_while_statement): Likewise.
2213 (c_parser_for_statement): Likewise.
2214
2215 2017-07-18 Nathan Sidwell <nathan@acm.org>
2216
2217 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2218
2219 2017-07-14 David Malcolm <dmalcolm@redhat.com>
2220
2221 * c-decl.c (implicitly_declare): When suggesting a missing
2222 #include, provide a fix-it hint.
2223
2224 2017-07-06 David Malcolm <dmalcolm@redhat.com>
2225
2226 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2227 and call that instead.
2228 * c-tree.h (selftest::run_c_tests): New decl.
2229
2230 2017-06-26 Marek Polacek <polacek@redhat.com>
2231
2232 PR c/80116
2233 * c-parser.c (c_parser_if_body): Set the location of the
2234 body of the conditional after parsing all the labels. Call
2235 warn_for_multistatement_macros.
2236 (c_parser_else_body): Likewise.
2237 (c_parser_switch_statement): Likewise.
2238 (c_parser_while_statement): Likewise.
2239 (c_parser_for_statement): Likewise.
2240 (c_parser_statement): Add a default argument. Save the location
2241 after labels have been parsed.
2242 (c_parser_c99_block_statement): Likewise.
2243
2244 2017-06-19 Richard Biener <rguenther@suse.de>
2245
2246 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2247 negated _Literals to parse _Literal (int) -1.
2248
2249 2017-06-13 Martin Liska <mliska@suse.cz>
2250
2251 PR sanitize/78204
2252 * c-convert.c (convert): Use sanitize_flags_p.
2253 * c-decl.c (grokdeclarator): Likewise.
2254 * c-typeck.c (convert_for_assignment): Likewise.
2255 (c_finish_return): Likewise.
2256 (build_binary_op): Likewise.
2257
2258 2017-06-08 Jakub Jelinek <jakub@redhat.com>
2259
2260 PR c/81006
2261 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2262 to sizetype before size_binop.
2263
2264 2017-06-07 Jakub Jelinek <jakub@redhat.com>
2265
2266 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2267 of TDI_generic.
2268
2269 2017-06-06 Marek Polacek <polacek@redhat.com>
2270
2271 PR c/79983
2272 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2273 ref.
2274 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2275
2276 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2277
2278 * c-parser.c (c_parser_binary_expression): Implement the
2279 -Wsizeof_pointer_div warning.
2280 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2281 from a parenthesized expression.
2282 (c_parser_expr_list): Use c_last_sizeof_loc.
2283 * c-tree.h (c_last_sizeof_loc): New external.
2284 * c-typeck.c (c_last_sizeof_loc): New variable.
2285 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2286
2287 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2288
2289 PR testsuite/80580
2290 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2291
2292 2017-05-30 David Malcolm <dmalcolm@redhat.com>
2293
2294 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2295 parameters.
2296
2297 2017-05-24 Martin Sebor <msebor@redhat.com>
2298
2299 PR c/80731
2300 * c-fold.c (c_fully_fold_internal): Adjust.
2301 * c-typeck.c (parser_build_unary_op): Adjust.
2302
2303 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2304
2305 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2306 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2307 "VECTOR_LENGTH".
2308
2309 2017-05-23 Marek Polacek <polacek@redhat.com>
2310
2311 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2312 quotes.
2313
2314 2017-05-22 Jakub Jelinek <jakub@redhat.com>
2315
2316 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2317 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2318 it returned invariant. Call tree_invariant_p unconditionally
2319 afterwards to decide whether to return expr or op0.
2320
2321 2017-05-22 Nathan Sidwell <nathan@acm.org>
2322
2323 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2324
2325 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2326
2327 * c-parser.c (c_parser_omp_clause_default): Handle
2328 "OMP_CLAUSE_DEFAULT_PRESENT".
2329
2330 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2331
2332 * config-lang.in (gtfiles): Add c-family/c-format.c.
2333
2334 2017-05-18 Nathan Sidwell <nathan@acm.org>
2335
2336 * c-decl.c (pushdecl_top_level): Delete unused function.
2337
2338 2017-05-18 Marek Polacek <polacek@redhat.com>
2339
2340 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2341 (check_earlier_gotos): Likewise.
2342 (define_label): Likewise.
2343 (pending_xref_error): Likewise.
2344 (smallest_type_quals_location): Likewise.
2345 (grokdeclarator): Likewise.
2346 (grokparms): Likewise.
2347 (identifier_global_value): Likewise.
2348 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2349 (find_init_member): Likewise.
2350
2351 2017-05-18 Marek Polacek <polacek@redhat.com>
2352
2353 * c-decl.c (start_decl): Use false/true instead of 0/1.
2354 (grokdeclarator): Likewise.
2355 (finish_struct): Likewise.
2356 (start_function): Change the return type to bool. Use false/true
2357 instead of 0/1.
2358 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2359 * c-tree.h (start_function): Update.
2360 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2361 (set_designator): Change the return type to bool. Use false/true
2362 instead of 0/1.
2363
2364 2017-05-17 Marek Polacek <polacek@redhat.com>
2365
2366 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2367 * c-typeck.c: Likewise.
2368
2369 2017-05-17 Marek Polacek <polacek@redhat.com>
2370
2371 PR sanitizer/80659
2372 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2373 DECL_IGNORED_P even for non-static compound literals.
2374
2375 2017-05-17 Martin Liska <mliska@suse.cz>
2376
2377 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2378 use it instead of int type.
2379
2380 2017-05-17 Marek Polacek <polacek@redhat.com>
2381
2382 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2383 call c_fully_fold.
2384 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
2385 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
2386 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2387 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2388 save_expr.
2389 (c_parser_conditional_expression): Likewise.
2390 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2391 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2392 (process_init_element): Likewise.
2393 (build_binary_op): Likewise.
2394 (handle_omp_array_sections_1): Likewise.
2395
2396 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2397
2398 * c-parser.c (c_parser_omp_clause_num_gangs)
2399 (c_parser_omp_clause_num_workers)
2400 (c_parser_omp_clause_vector_length): Merge functions into...
2401 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2402 all users.
2403
2404 2017-05-11 Nathan Sidwell <nathan@acm.org>
2405
2406 * gimple-parser.c: Don't #include tree-dump.h.
2407
2408 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2409
2410 PR testsuite/80580
2411 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2412
2413 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2414
2415 PR testsuite/80580
2416 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2417 incorrect __MEM syntax.
2418
2419 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2420
2421 PR testsuite/80580
2422 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2423 type of unary '*'.
2424
2425 2017-05-09 Nathan Sidwell <nathan@acm.org>
2426
2427 * c-tree.h (pushdecl): Declare.
2428
2429 2017-05-05 David Malcolm <dmalcolm@redhat.com>
2430
2431 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2432 with diagnostic_report_diagnostic.
2433 * c-errors.c (pedwarn_c99): Likewise.
2434 (pedwarn_c90): Likewise.
2435
2436 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2437
2438 PR c++/80038
2439 * c-gimplify.c (c_gimplify_expr): Remove calls to
2440 cilk_gimplifY_call_params_in_spawned_fn.
2441
2442 2017-04-25 David Malcolm <dmalcolm@redhat.com>
2443
2444 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2445 hint for removing extra semicolon.
2446
2447 2017-04-21 Jakub Jelinek <jakub@redhat.com>
2448
2449 PR c/80468
2450 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2451 enabled, set specs->type to integer_type_node.
2452
2453 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
2454
2455 * c-array-notation.c: Fix typo in comment.
2456
2457 2017-03-29 Marek Polacek <polacek@redhat.com>
2458
2459 PR c/79730
2460 * c-decl.c (finish_decl): Check VAR_P.
2461
2462 2017-03-27 Jakub Jelinek <jakub@redhat.com>
2463
2464 PR middle-end/80162
2465 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2466 * c-typeck.c (c_mark_addressable): Likewise. Look through
2467 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2468 to ARRAY_TYPE.
2469 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2470
2471 2017-03-23 Marek Polacek <polacek@redhat.com>
2472
2473 * c-tree.h: Remove a C_RID_YYCODE reference.
2474
2475 2017-03-21 Jakub Jelinek <jakub@redhat.com>
2476
2477 PR c/80097
2478 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2479 optional COMPOUND_EXPR with ubsan instrumentation.
2480
2481 2017-03-17 Marek Polacek <polacek@redhat.com>
2482
2483 * c-parser.c: Add C11 references.
2484
2485 2017-03-15 Marek Polacek <polacek@redhat.com>
2486
2487 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2488
2489 2017-03-11 Marek Polacek <polacek@redhat.com>
2490
2491 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2492
2493 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2494
2495 PR translation/79848
2496 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2497 "%qs".
2498 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2499
2500 2017-03-09 Marek Polacek <polacek@redhat.com>
2501
2502 PR sanitizer/79757
2503 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2504 parameter declarations with initializers.
2505
2506 2017-03-09 Jakub Jelinek <jakub@redhat.com>
2507
2508 PR c/79969
2509 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2510 TYPE_STUB_DECL.
2511
2512 2017-03-07 Jakub Jelinek <jakub@redhat.com>
2513
2514 PR c/79834
2515 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2516 for "may only be used in compound statements" diagnostics, change it
2517 such that the same translatable string is used for all pragmas. For
2518 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2519 diagnostics.
2520 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2521 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2522 "may only be used in compound statements" diagnostics, such that the
2523 same translatable string is used for all pragmas.
2524
2525 2017-03-04 Marek Polacek <polacek@redhat.com>
2526
2527 PR c/79847
2528 * c-decl.c (implicit_decl_warning): Add missing space.
2529
2530 2017-03-03 Marek Polacek <polacek@redhat.com>
2531
2532 PR c/79758
2533 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2534 current_function_prototype_arg_types is error_mark_node. Fix
2535 formatting. Use TREE_VALUE instead of TREE_TYPE.
2536
2537 2017-03-03 Jakub Jelinek <jakub@redhat.com>
2538
2539 PR c/79837
2540 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2541 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2542 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2543 diagnostics.
2544
2545 PR c/79836
2546 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2547 instead of %<_Generic>.
2548 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2549 (c_parser_omp_target_exit_data): Use %<release%> instead of
2550 %<release>.
2551
2552 2017-02-28 Jakub Jelinek <jakub@redhat.com>
2553
2554 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2555 instead of just cond ? "..." : "...".
2556 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2557 for "enter"/"exit" keyword.
2558 (c_finish_oacc_routine): Don't use %s to supply portions of the
2559 message.
2560
2561 2017-02-24 Jakub Jelinek <jakub@redhat.com>
2562
2563 PR c++/79588
2564 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2565 handle -Wrestrict here.
2566 * c-typeck.c (build_function_call_vec): Adjust
2567 check_function_arguments caller.
2568
2569 2017-02-23 Richard Biener <rguenther@suse.de>
2570
2571 PR c/79684
2572 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2573 to initialize c_exprs to return.
2574 (c_parser_gimple_binary_expression): Likewise.
2575 (c_parser_gimple_unary_expression): Likewise.
2576 (c_parser_gimple_postfix_expression): Likewise.
2577
2578 2017-02-22 Marek Polacek <polacek@redhat.com>
2579
2580 PR c/79662
2581 * c-typeck.c (convert_arguments): Handle error_mark_node.
2582
2583 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2584
2585 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2586 value of c_parser_parse_ssa_name against error_mark_node and emit
2587 error if ssa name is anonymous and written as default definition.
2588
2589 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2590
2591 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2592 FMA_EXPR.
2593
2594 2017-02-16 Jakub Jelinek <jakub@redhat.com>
2595
2596 PR c++/79512
2597 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2598 ignore #pragma omp target even when not followed by identifier.
2599
2600 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2601
2602 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2603 (c_parser_gimple_unary_expression): Likewise.
2604
2605 2017-02-13 Jakub Jelinek <jakub@redhat.com>
2606
2607 * c-parser.c (c_parser_oacc_declare): Add missing space in
2608 diagnostics.
2609
2610 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2611
2612 PR c/79478
2613 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2614 set_c_expr_source_range when parsing ssa-name.
2615
2616 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
2617 Richard Biener <rguenther@suse.de>
2618
2619 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2620 building IL when arguments are error_mark_node.
2621 (c_parser_gimple_unary_expression): Likewise.
2622 (c_parser_gimple_if_stmt): Likewise.
2623 (c_parser_gimple_switch_stmt): Likewise.
2624 (c_parser_gimple_return_stmt): Likewise.
2625 (c_parser_parse_ssa_name): When name lookup fails do not build
2626 an SSA name. Use undeclared rather than not declared in error
2627 reporting.
2628
2629 2017-02-09 Marek Polacek <polacek@redhat.com>
2630
2631 PR c/79428
2632 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2633 instead of c_parser_skip_until_found.
2634
2635 2017-02-09 Jakub Jelinek <jakub@redhat.com>
2636
2637 PR c/79431
2638 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2639 symtab_node::get on automatic variables.
2640
2641 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2642 Chung-Lin Tang <cltang@codesourcery.com>
2643
2644 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2645 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2646 semantic checking.
2647 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2648
2649 2017-02-07 Richard Biener <rguenther@suse.de>
2650
2651 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2652 (c_parser_gimple_postfix_expression_after_primary):
2653 Do not use c_build_function_call_vec to avoid folding and promotion.
2654 Simplify.
2655
2656 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2657
2658 PR lto/79061
2659 * c-decl.c (pop_scope): Pass main_input_filename to
2660 build_translation_unit_decl.
2661
2662 2017-01-24 David Malcolm <dmalcolm@redhat.com>
2663
2664 * c-parser.c: Include "read-rtl-function.h" and
2665 "run-rtl-passes.h".
2666 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2667 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2668 production. Update for renaming of field "gimple_pass" to
2669 "gimple_or_rtl_pass". If __RTL was seen, call
2670 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2671 to an auto_timevar, to cope with early exit.
2672 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2673 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2674 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2675 Handle RID_RTL.
2676 (c_parser_parse_rtl_body): New function.
2677 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2678 (struct c_declspecs): Rename field "gimple_pass" to
2679 "gimple_or_rtl_pass". Add field "rtl_p".
2680 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2681 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2682 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2683 (c_parser_gimple_or_rtl_pass_list): ...this.
2684
2685 2017-01-20 Marek Polacek <polacek@redhat.com>
2686
2687 PR c/64279
2688 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2689
2690 2017-01-13 Richard Biener <rguenther@suse.de>
2691
2692 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2693 nops.
2694
2695 2017-01-13 Richard Biener <rguenther@suse.de>
2696
2697 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2698 _Literal ( type-name ) number.
2699
2700 2017-01-12 Richard Biener <rguenther@suse.de>
2701
2702 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2703 __MEM.
2704
2705 2017-01-11 Jakub Jelinek <jakub@redhat.com>
2706
2707 PR c++/72813
2708 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2709 PCH file.
2710
2711 2017-01-11 Richard Biener <rguenther@suse.de>
2712
2713 PR bootstrap/79052
2714 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2715 returns on parse errors.
2716
2717 2017-01-04 Marek Polacek <polacek@redhat.com>
2718
2719 PR c++/64767
2720 * c-parser.c (c_parser_postfix_expression): Mark zero character
2721 constants by setting original_type in c_expr.
2722 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2723 with a zero character constant.
2724 (char_type_p): New function.
2725
2726 2017-01-04 David Malcolm <dmalcolm@redhat.com>
2727
2728 * c-parser.c (c_parser_declaration_or_fndef): Create a
2729 rich_location at init_loc and parse it to start_init.
2730 (last_init_list_comma): New global.
2731 (c_parser_braced_init): Update last_init_list_comma when parsing
2732 commas. Pass it to pop_init_level. Pass location of closing
2733 brace to pop_init_level.
2734 (c_parser_postfix_expression_after_paren_type): Create a
2735 rich_location at type_loc and parse it to start_init.
2736 (c_parser_omp_declare_reduction): Likewise for loc.
2737 * c-tree.h (start_init): Add rich_location * param.
2738 (pop_init_level): Add location_t param.
2739 * c-typeck.c (struct initializer_stack): Add field
2740 "missing_brace_richloc".
2741 (start_init): Add richloc param, use it to initialize
2742 the stack node's missing_brace_richloc.
2743 (last_init_list_comma): New decl.
2744 (finish_implicit_inits): Pass last_init_list_comma to
2745 pop_init_level.
2746 (push_init_level): When finding missing open braces, add fix-it
2747 hints to the richloc.
2748 (pop_init_level): Add "insert_before" param and pass it
2749 when calling pop_init_level. Add fixits about missing
2750 close braces to any richloc. Use the richloc for the
2751 -Wmissing-braces warning.
2752 (set_designator): Pass last_init_list_comma to pop_init_level.
2753 (process_init_element): Likewise.
2754
2755 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2756
2757 Update copyright years.
2758
2759 2016-12-21 Jakub Jelinek <jakub@redhat.com>
2760
2761 PR bootstrap/78817
2762 * c-typeck.c (build_function_call_vec): If check_function_arguments
2763 returns true, set TREE_NO_WARNING on CALL_EXPR.
2764
2765 PR c/77767
2766 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2767 to *expr instead of overwriting it.
2768
2769 2016-12-20 Richard Biener <rguenther@suse.de>
2770
2771 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2772 error recovery.
2773 (c_parser_gimple_statement): Only build assigns for non-error
2774 stmts.
2775 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2776
2777 2016-12-14 Martin Jambor <mjambor@suse.cz>
2778
2779 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2780 omp-low.h.
2781 (c_finish_oacc_routine): Adjusted call to
2782 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2783 to use their new names.
2784 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2785 use its new name.
2786 (c_parser_oacc_update): Likewise.
2787 (c_parser_omp_simd): Likewise.
2788 (c_parser_omp_target_update): Likewise.
2789 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2790 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2791 name.
2792 (c_finish_omp_cancellation_point): Likewise.
2793 * gimple-parser.c: Do not include omp-low.h
2794
2795 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2796 James Norris <jnorris@codesourcery.com>
2797
2798 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2799 EXIT_DATA,WAIT} are not used in compound statements.
2800 (c_parser_oacc_enter_exit_data): Update diagnostics.
2801
2802 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2803
2804 PR c++/71973
2805 * c-decl.c (diagnose_mismatched_decls): Use
2806 OPT_Wbuiltin_declaration_mismatch here too.
2807
2808 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
2809 Alan Hayward <alan.hayward@arm.com>
2810 David Sherwood <david.sherwood@arm.com>
2811
2812 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2813 (make_label, finish_struct): Likewise.
2814
2815 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2816 Richard Biener <rguenther@suse.de>
2817
2818 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2819 * config-lang.in (gtfiles): Add c/c-parser.h.
2820 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2821 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2822 * c-parser.c (enum c_id_kind, struct c_token,
2823 c_parser_next_token_is, c_parser_next_token_is_not,
2824 c_parser_next_token_is_keyword,
2825 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2826 Split out to ...
2827 * c-parser.h: ... new header.
2828 * c-parser.c: Include c-parser.h and gimple-parser.h.
2829 (c_parser_peek_token, c_parser_peek_2nd_token,
2830 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2831 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2832 c_parser_error, c_parser_require, c_parser_skip_until_found,
2833 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2834 c_parser_type_name): Export.
2835 (c_parser_tokens_buf): New function.
2836 (c_parser_error): Likewise.
2837 (c_parser_set_error): Likewise.
2838 (c_parser_declspecs): Handle RID_GIMPLE.
2839 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2840 via c_parser_parse_gimple_body.
2841 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2842 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2843 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2844 c_parser_error, c_parser_require, c_parser_skip_until_found,
2845 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2846 c_parser_type_name): Declare.
2847 (struct c_parser): Declare forward.
2848 (c_parser_tokens_buf): Declare.
2849 (c_parser_error): Likewise.
2850 (c_parser_set_error): Likewise.
2851 * gimple-parser.c: New file.
2852 * gimple-parser.h: Likewise.
2853
2854 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2855
2856 PR c/35503
2857 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2858 warn_for_restrict.
2859
2860 2016-09-11 Le-Chun Wu <lcwu@google.com>
2861 Mark Wielaard <mjw@redhat.com>
2862
2863 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2864 to the given -Wshadow= variant.
2865
2866 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2867
2868 * c-typeck.c: Include memmodel.h.
2869
2870 2016-10-13 Jakub Jelinek <jakub@redhat.com>
2871
2872 PR target/77957
2873 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2874 instead of lhd_return_null_tree_v.
2875
2876 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
2877
2878 PR c++/69733
2879 * c-decl.c (smallest_type_quals_location): New static function.
2880 (grokdeclarator): Try to find the correct location for an ignored
2881 qualifier.
2882
2883 2016-09-26 Marek Polacek <polacek@redhat.com>
2884
2885 PR c/7652
2886 * c-decl.c (pop_scope): Add gcc_fallthrough.
2887
2888 2016-09-26 Marek Polacek <polacek@redhat.com>
2889
2890 PR c/7652
2891 * c-parser.c (struct c_token): Add flags field.
2892 (c_lex_one_token): Pass it to c_lex_with_flags.
2893 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
2894 into IFN_FALLTHROUGH.
2895 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
2896 attribute fallthrough after a case label or default label.
2897 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
2898
2899 2016-09-24 Marek Polacek <polacek@redhat.com>
2900
2901 PR c/77490
2902 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
2903 have boolean value. Warn about ++/-- on booleans.
2904
2905 2016-09-23 Jakub Jelinek <jakub@redhat.com>
2906
2907 * c-parser.c (incomplete_record_decls): Remove unnecessary
2908 = vNULL initialization of file scope vec.
2909
2910 2016-09-16 Marek Polacek <polacek@redhat.com>
2911
2912 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
2913
2914 2016-09-14 Marek Polacek <polacek@redhat.com>
2915
2916 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
2917 (fix_array_notation_expr): Likewise.
2918 * c-decl.c (finish_decl): Likewise.
2919 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2920 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
2921 (function_to_pointer_conversion): Use false instead of 0.
2922 (convert_lvalue_to_rvalue): Likewise.
2923 (parser_build_unary_op): Likewise.
2924 (build_atomic_assign): Likewise.
2925 (build_unary_op): Change nonconvert parameter type to bool, use
2926 true/false instead of 1/0.
2927 (build_binary_op): Use true instead of 1.
2928
2929 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2930
2931 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
2932 of add_fixit_insert to add_fixit_insert_before.
2933
2934 2016-09-13 Marek Polacek <polacek@redhat.com>
2935
2936 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
2937 it.
2938
2939 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2940
2941 PR c++/77496
2942 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
2943 COMPOUND_EXPR to warn_for_omitted_condop.
2944
2945 2016-09-07 David Malcolm <dmalcolm@redhat.com>
2946
2947 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
2948 c_get_substring_location for this new langhook.
2949
2950 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2951
2952 PR c/65467
2953 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
2954 flag_openmp.
2955 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
2956 instead of mark_exp_read on low_bound/length expression.
2957 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
2958 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2959 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2960 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
2961 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
2962 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
2963 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
2964 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
2965 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
2966 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
2967 instead of mark_expr_read.
2968 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
2969 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2970 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
2971 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
2972 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
2973 array section bases outside of depend clause, for depend clause
2974 use convert_lvalue_to_rvalue on the base.
2975 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
2976 linear, aligned, map, to and from clauses.
2977 (c_omp_clause_copy_ctor): New function.
2978
2979 2016-09-01 Marek Polacek <polacek@redhat.com>
2980
2981 PR c/7652
2982 * c-typeck.c (composite_type): Add FALLTHRU comment.
2983
2984 2016-08-31 David Malcolm <dmalcolm@redhat.com>
2985
2986 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
2987 to the insertion fixits for "struct", "union", and "enum".
2988
2989 2016-08-30 David Malcolm <dmalcolm@redhat.com>
2990
2991 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
2992 rather than add_fixit_misspelled_id.
2993 (undeclared_variable): Likewise.
2994 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
2995 now-redundant "here" params from add_fixit_insert method calls.
2996 (c_parser_parameter_declaration): Likewise.
2997 * c-typeck.c (build_component_ref): Remove now-redundant range
2998 param from add_fixit_replace method calls.
2999
3000 2016-08-25 Marek Polacek <polacek@redhat.com>
3001
3002 * c-typeck.c (parser_build_binary_op): Pass LHS to
3003 warn_logical_not_parentheses.
3004
3005 2016-08-25 Marek Polacek <polacek@redhat.com>
3006
3007 PR c/77323
3008 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3009 or _FloatN or _FloatNx is not supported.
3010 (finish_declspecs): Set type to integer_type_node when _FloatN or
3011 _FloatNx is not supported.
3012
3013 2016-08-19 Joseph Myers <joseph@codesourcery.com>
3014
3015 PR c/32187
3016 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3017 (struct c_declspecs): Add field floatn_nx_idx.
3018 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3019 and _FloatNx type specifiers.
3020 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3021 (c_parser_declspecs, c_parser_attribute_any_word)
3022 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3023 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3024 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3025 narrower than double.
3026
3027 2016-08-12 Jakub Jelinek <jakub@redhat.com>
3028 Martin Liska <mliska@suse.cz>
3029
3030 PR c/67410
3031 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3032 % to determine val element to change. Assert that
3033 wchar_bytes * charwidth fits into val array.
3034
3035 2016-08-12 Marek Polacek <polacek@redhat.com>
3036
3037 PR c/7652
3038 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3039 (c_parser_postfix_expression): Likewise.
3040 * c-typeck.c (build_unary_op): Adjust fall through comment.
3041 (c_mark_addressable): Likewise.
3042
3043 2016-08-11 Jakub Jelinek <jakub@redhat.com>
3044
3045 PR c/72816
3046 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3047 array member through typedef, for orig_qual_indirect == 0 clear
3048 orig_qual_type.
3049
3050 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3051
3052 PR c/64955
3053 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3054 this up to selftest::run_c_tests.
3055 (selftest::run_c_tests): New function.
3056
3057 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3058
3059 * c-parser.c (struct oacc_routine_data): Add error_seen and
3060 fndecl_seen members.
3061 (c_finish_oacc_routine): Use these.
3062 (c_parser_declaration_or_fndef): Adjust.
3063 (c_parser_oacc_routine): Likewise. Support more C language
3064 constructs, and improve diagnostics. Move pragma context
3065 checking...
3066 (c_parser_pragma): ... here.
3067
3068 * c-parser.c (struct oacc_routine_data): New.
3069 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3070 Simplify code.
3071 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3072 declare target" attribute.
3073
3074 2016-08-01 Jan Beulich <jbeulich@suse.com>
3075
3076 * c-fold.c (c_fully_fold_internal): Also emit shift count
3077 warnings for vector types.
3078 * c-typeck.c (build_binary_op): Likewise.
3079
3080 2016-07-29 Marek Polacek <polacek@redhat.com>
3081
3082 PR c/71742
3083 * c-decl.c (finish_struct): Rephrase an error message.
3084
3085 PR c/71853
3086 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3087 to error node for invalid code.
3088
3089 PR c/71573
3090 * c-decl.c (implicitly_declare): Return decl early not only for
3091 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3092
3093 2016-07-29 Jakub Jelinek <jakub@redhat.com>
3094
3095 PR c/71969
3096 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3097 on GNU extern inline functions.
3098
3099 2016-07-29 Marek Polacek <polacek@redhat.com>
3100
3101 PR c/71583
3102 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3103 check expr.value.
3104
3105 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
3106
3107 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3108
3109 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3110
3111 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3112 spellcheck-tree.h
3113 (best_macro_match): Likewise, converting from a typedef to a
3114 subclass.
3115 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3116 (lookup_name_fuzzy): Update for change of best_macro_match to a
3117 subclass with a ctor that calls cpp_forall_identifiers.
3118
3119 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3120
3121 * c-decl.c (implicit_decl_warning): Update for conversion of
3122 return type of lookup_name_fuzzy to const char *.
3123 (undeclared_variable): Likewise.
3124 (lookup_name_fuzzy): Convert return type from tree to
3125 const char *.
3126 * c-parser.c (c_parser_declaration_or_fndef): Update for
3127 conversion of return type of lookup_name_fuzzy to const char *.
3128 (c_parser_parameter_declaration): Likewise.
3129
3130 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3131
3132 * c-parser.c (c_parser_oacc_declare): Don't scan for
3133 GOMP_MAP_POINTER.
3134 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3135 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3136 zero-length subarrays.
3137
3138 2016-07-15 Jakub Jelinek <jakub@redhat.com>
3139
3140 PR c/71858
3141 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3142 instead of FUZZY_LOOKUP_NAME.
3143 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3144 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3145
3146 2016-07-14 Jakub Jelinek <jakub@redhat.com>
3147
3148 PR c/71858
3149 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3150
3151 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3152
3153 * c-parser.c (c_parser_generic_selection): Make type of variable
3154 auto_vec.
3155 (c_parser_omp_declare_simd): Likewise.
3156
3157 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3158
3159 * c-decl.c (struct c_struct_parse_info): Change member types
3160 from vec to auto_vec.
3161 (start_struct): Adjust.
3162 (finish_struct): Likewise.
3163
3164 2016-07-02 Jakub Jelinek <jakub@redhat.com>
3165
3166 PR c/71719
3167 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3168
3169 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3170
3171 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3172 Move pragma context checking into...
3173 (c_parser_omp_cancellation_point): ... here, and improve
3174 diagnostic messages.
3175 * c-typeck.c (c_finish_omp_cancel)
3176 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3177
3178 2016-06-29 Jakub Jelinek <jakub@redhat.com>
3179
3180 PR c/71685
3181 * c-typeck.c (c_build_qualified_type): Don't clear
3182 C_TYPE_INCOMPLETE_VARS for the main variant.
3183
3184 2016-06-28 Martin Sebor <msebor@redhat.com>
3185
3186 PR c/71552
3187 * c-typeck.c (output_init_element): Diagnose incompatible types
3188 before non-constant initializers.
3189
3190 2016-06-28 Jakub Jelinek <jakub@redhat.com>
3191
3192 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3193
3194 2016-06-23 Andi Kleen <ak@linux.intel.com>
3195
3196 * Make-lang.in: Add support for autofdo.
3197
3198 2016-06-22 David Malcolm <dmalcolm@redhat.com>
3199
3200 PR c/70339
3201 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3202 (implicit_decl_warning): When issuing warnings for implicit
3203 declarations, attempt to provide a suggestion via
3204 lookup_name_fuzzy.
3205 (undeclared_variable): Likewise when issuing errors.
3206 (lookup_name_in_scope): Likewise.
3207 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3208 (best_macro_match): New typedef.
3209 (find_closest_macro_cpp_cb): New function.
3210 (lookup_name_fuzzy): New function.
3211 * c-parser.c: Include gcc-rich-location.h.
3212 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3213 (c_keyword_starts_typename): ...this new function.
3214 (c_parser_declaration_or_fndef): When issuing errors about
3215 missing "struct" etc, add a fixit. For other kinds of errors,
3216 attempt to provide a suggestion via lookup_name_fuzzy.
3217 (c_parser_parms_declarator): When looking ahead to detect typos in
3218 type names, also reject CPP_KEYWORD.
3219 (c_parser_parameter_declaration): When issuing errors about
3220 unknown type names, attempt to provide a suggestion via
3221 lookup_name_fuzzy.
3222 * c-tree.h (c_keyword_starts_typename): New prototype.
3223
3224 2016-06-20 Joseph Myers <joseph@codesourcery.com>
3225
3226 PR c/71601
3227 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3228 c_common_type returns error_mark_node.
3229
3230 2016-06-19 Martin Sebor <msebor@redhat.com>
3231
3232 PR c/69507
3233 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3234 __alignof__ (expression).
3235
3236 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3237
3238 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3239
3240 2016-06-14 David Malcolm <dmalcolm@redhat.com>
3241
3242 * c-typeck.c (build_component_ref): Simplify fixit code by
3243 using gcc_rich_location::add_fixit_misspelled_id.
3244 (set_init_label): Likewise.
3245
3246 2016-06-13 David Malcolm <dmalcolm@redhat.com>
3247
3248 * c-parser.c (c_parser_initelt): Provide location of name for new
3249 location_t param of set_init_label.
3250 * c-tree.h (set_init_label): Add location_t param.
3251 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3252 param and use it when issuing error messages about unrecognized
3253 field names. Attempt to provide a fixit hint if appropriate,
3254 otherwise update the error message to provide the type name.
3255
3256 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3257
3258 PR c/71381
3259 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3260 Loosen checking.
3261
3262 2016-06-08 Martin Sebor <msebor@redhat.com>
3263 Jakub Jelinek <jakub@redhat.com>
3264
3265 PR c++/70507
3266 PR c/68120
3267 * c-typeck.c (convert_arguments): Don't promote last argument
3268 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3269
3270 2016-06-08 Marek Polacek <polacek@redhat.com>
3271
3272 PR c/71418
3273 * c-decl.c (grokdeclarator): Check TYPE_P.
3274
3275 PR c/71426
3276 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3277 code.
3278
3279 2016-06-07 David Malcolm <dmalcolm@redhat.com>
3280
3281 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3282 and structure element reference, capture the location of the
3283 element name token and pass it to build_component_ref.
3284 (c_parser_postfix_expression_after_primary): Likewise for
3285 structure element dereference.
3286 (c_parser_omp_variable_list): Likewise for
3287 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3288 * c-tree.h (build_component_ref): Add location_t param.
3289 * c-typeck.c (build_component_ref): Add location_t param
3290 COMPONENT_LOC. Use it, if available, when issuing hints about
3291 mispelled member names to provide a fixit replacement hint.
3292
3293 2016-06-06 Marek Polacek <polacek@redhat.com>
3294
3295 PR c/71362
3296 * c-parser.c (c_parser_direct_declarator): Set location.
3297
3298 2016-06-06 Marek Polacek <polacek@redhat.com>
3299
3300 * c-typeck.c (comptypes_internal): Handle comparisons of
3301 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3302 TYPE_REF_CAN_ALIAS_ALL.
3303
3304 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3305
3306 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3307 arguments as addressable when async clause exists.
3308
3309 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3310
3311 PR c++/71349
3312 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3313 when combined with target construct.
3314
3315 2016-05-26 Jakub Jelinek <jakub@redhat.com>
3316
3317 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3318 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3319
3320 2016-05-25 Marek Polacek <polacek@redhat.com>
3321
3322 PR c/71265
3323 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3324
3325 PR c/71266
3326 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3327
3328 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3329
3330 * c-parser.c (c_parser_oacc_declare): Add support for
3331 GOMP_MAP_FIRSTPRIVATE_POINTER.
3332 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3333 argument with enum c_omp_region_type ort.
3334 (handle_omp_array_sections): Likewise. Update call to
3335 handle_omp_array_sections_1.
3336 (c_finish_omp_clauses): Add specific errors and warning messages for
3337 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3338 call to handle_omp_array_sections.
3339
3340 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3341
3342 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3343
3344 2016-05-24 Richard Biener <rguenther@suse.de>
3345
3346 PR middle-end/70434
3347 PR c/69504
3348 * c-typeck.c (build_array_ref): Do not complain about indexing
3349 non-lvalue vectors. Adjust for function name change.
3350
3351 2016-05-20 Martin Sebor <msebor@redhat.com>
3352
3353 PR c/71115
3354 * c-typeck.c (error_init): Use
3355 expansion_point_location_if_in_system_header.
3356 (warning_init): Same.
3357
3358 2016-05-19 David Malcolm <dmalcolm@redhat.com>
3359
3360 PR c/71171
3361 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3362 in error-handling.
3363 (c_parser_postfix_expression): Likewise.
3364 * c-tree.h (c_expr::set_error): New method.
3365 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3366 that result's range is initialized.
3367
3368 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3369
3370 * c-typeck.c (parser_build_unary_op): Fix formatting.
3371
3372 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3373
3374 * c-decl.c (grokdeclarator): Remove errmsg and use of
3375 targetm.invalid_return_type.
3376 (grokparms): Remove errmsg and use of
3377 targetm.invalid_parameter_type.
3378
3379 2016-05-13 Joseph Myers <joseph@codesourcery.com>
3380
3381 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3382 function return type.
3383
3384 2016-05-12 Marek Polacek <polacek@redhat.com>
3385
3386 PR c/70756
3387 * c-decl.c (build_compound_literal): Pass LOC down to
3388 c_incomplete_type_error.
3389 * c-tree.h (require_complete_type): Adjust declaration.
3390 (c_incomplete_type_error): Likewise.
3391 * c-typeck.c (require_complete_type): Add location parameter, pass it
3392 down to c_incomplete_type_error.
3393 (c_incomplete_type_error): Add location parameter, pass it down to
3394 error_at.
3395 (build_component_ref): Pass location down to c_incomplete_type_error.
3396 (default_conversion): Pass location down to require_complete_type.
3397 (build_array_ref): Likewise.
3398 (build_function_call_vec): Likewise.
3399 (convert_arguments): Likewise.
3400 (build_unary_op): Likewise.
3401 (build_c_cast): Likewise.
3402 (build_modify_expr): Likewise.
3403 (convert_for_assignment): Likewise.
3404 (c_finish_omp_clauses): Likewise.
3405
3406 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3407
3408 PR c/43651
3409 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3410 is enabled.
3411 * c-errors.c (pedwarn_c90): Return true if warned.
3412 * c-tree.h (pedwarn_c90): Change return type to bool.
3413 (enum c_declspec_word): Add new enumerator cdw_atomic.
3414
3415 2016-05-11 Marek Polacek <polacek@redhat.com>
3416
3417 PR c++/71024
3418 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3419 diagnose_mismatched_attributes and call it.
3420
3421 2016-05-10 Marek Polacek <polacek@redhat.com>
3422
3423 PR c/70255
3424 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3425 on a declaration following the definition.
3426
3427 2016-05-05 Jakub Jelinek <jakub@redhat.com>
3428
3429 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3430 parse it through to c_parser_c99_block_statement.
3431 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3432 caller.
3433
3434 2016-05-04 Marek Polacek <polacek@redhat.com>
3435
3436 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3437 OPT_Wdangling_else.
3438
3439 2016-05-04 Marek Polacek <polacek@redhat.com>
3440
3441 PR c/48778
3442 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3443 for macro expansions.
3444
3445 2016-05-03 Marek Polacek <polacek@redhat.com>
3446
3447 PR c/70859
3448 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3449 check_builtin_function_arguments.
3450
3451 2016-05-03 Richard Biener <rguenther@suse.de>
3452
3453 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3454 the checksum from the previous stage.
3455
3456 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3457
3458 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3459 c_finish_omp_clauses.
3460 (c_parser_omp_all_clauses): Likewise.
3461 (c_parser_oacc_cache): Likewise.
3462 (c_parser_oacc_loop): Likewise.
3463 (omp_split_clauses): Likewise.
3464 (c_parser_omp_declare_target): Likewise.
3465 (c_parser_cilk_all_clauses): Likewise.
3466 (c_parser_cilk_for): Likewise.
3467 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3468 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3469
3470 2016-05-02 Marek Polacek <polacek@redhat.com>
3471
3472 PR c/70851
3473 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3474 incomplete type.
3475
3476 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3477
3478 PR middle-end/70626
3479 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3480 OACC_LOOP_CLAUSE_MASK.
3481 (c_parser_oacc_kernels_parallel): Update call to
3482 c_oacc_split_loop_clauses.
3483
3484 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
3485
3486 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3487 argument to build_modify_expr in two cases.
3488
3489 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3490
3491 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3492 warn_for_memset instead of warning directly here.
3493
3494 2016-04-26 Marek Polacek <polacek@redhat.com>
3495
3496 PR c/67784
3497 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3498 out of ...
3499 (c_parser_for_statement): ... here.
3500 (c_parser_if_statement): Use it.
3501 (c_parser_switch_statement): Use it.
3502 (c_parser_while_statement): Use it.
3503
3504 PR c/70791
3505 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3506
3507 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3508
3509 PR c++/69363
3510 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3511 instead of c_finish_cilk_clauses.
3512 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3513 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3514 floating-point variables in the linear clause for Cilk Plus.
3515
3516 2016-04-18 Michael Matz <matz@suse.de>
3517
3518 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3519 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3520
3521 2016-04-15 Marek Polacek <polacek@redhat.com>
3522
3523 PR c/70671
3524 * c-typeck.c (build_unary_op): Pass location down to error and
3525 warning call.
3526
3527 2016-04-15 Jakub Jelinek <jakub@redhat.com>
3528
3529 PR c/70436
3530 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3531 where needed.
3532 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3533 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3534 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3535 Adjust c_parser_pragma callers.
3536 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3537 caller.
3538 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3539 c_parser_statement.
3540 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3541 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3542 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3543 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3544 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3545 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3546 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3547 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3548 down where needed.
3549 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3550 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3551 calls.
3552
3553 2016-04-13 Marek Polacek <polacek@redhat.com>
3554
3555 PR c/70436
3556 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3557 adjust callers.
3558 (c_parser_statement): Likewise.
3559 (c_parser_c99_block_statement): Likewise.
3560 (c_parser_while_statement): Likewise.
3561 (c_parser_for_statement): Likewise.
3562 (c_parser_if_body): Don't set IF_P here.
3563 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3564 about dangling else here.
3565 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3566 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3567 warn about dangling else here.
3568
3569 2016-04-04 Marek Polacek <polacek@redhat.com>
3570
3571 PR c/70307
3572 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3573
3574 2016-03-31 Marek Polacek <polacek@redhat.com>
3575
3576 PR c/70297
3577 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3578
3579 2016-03-18 David Malcolm <dmalcolm@redhat.com>
3580
3581 PR c/70281
3582 * c-parser.c (c_parser_postfix_expression): Set the source range
3583 for uses of "__builtin_types_compatible_p".
3584
3585 2016-03-17 Jakub Jelinek <jakub@redhat.com>
3586
3587 PR c/70280
3588 * c-typeck.c (composite_type): Don't count void_list_node
3589 into len, if the list is terminated by void_list_node, start
3590 with void_list_node instead of NULL for newargs. Stop
3591 at void_list_node.
3592
3593 2016-03-16 Marek Polacek <polacek@redhat.com>
3594
3595 PR c/70093
3596 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3597 nested functions returning VM types.
3598
3599 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3600
3601 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3602 when calling c_finish_omp_clauses.
3603
3604 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3605
3606 PR c/69824
3607 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3608 for later.
3609
3610 2016-03-04 Marek Polacek <polacek@redhat.com>
3611
3612 PR c/69798
3613 * c-parser.c (c_parser_postfix_expression): Call
3614 c_parser_cast_expression rather than c_parser_postfix_expression.
3615
3616 2016-03-01 Jakub Jelinek <jakub@redhat.com>
3617
3618 PR c/69796
3619 PR c/69974
3620 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3621 of incomplete decls to error_mark_node.
3622
3623 2016-02-24 Marek Polacek <polacek@redhat.com>
3624
3625 PR c/69819
3626 * c-decl.c (finish_decl): Don't update the copy of the type of a
3627 different decl type.
3628
3629 2016-02-23 Jakub Jelinek <jakub@redhat.com>
3630
3631 PR objc/69844
3632 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3633 in id_kind reclassification.
3634
3635 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3636
3637 PR c/69835
3638 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3639
3640 2016-02-16 James Norris <jnorris@codesourcery.com>
3641
3642 PR c/64748
3643 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3644
3645 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3646
3647 * c-decl.c (build_null_declspecs): Zero the entire struct.
3648
3649 PR c/69522
3650 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3651 callers changed. If nested_p is true, use it to call
3652 finish_implicit_inits.
3653 * c-tree.h (finish_implicit_inits): Declare.
3654 * c-typeck.c (finish_implicit_inits): New function. Move code
3655 from ...
3656 (push_init_level): ... here.
3657 (set_designator, process_init_element): Call finish_implicit_inits.
3658
3659 2016-02-11 Jakub Jelinek <jakub@redhat.com>
3660
3661 PR c/69768
3662 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3663 arguments for -Waddress warning.
3664
3665 2016-02-04 Jakub Jelinek <jakub@redhat.com>
3666
3667 PR c/69669
3668 * c-decl.c (finish_enum): When honoring mode attribute,
3669 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3670
3671 2016-01-29 Jakub Jelinek <jakub@redhat.com>
3672
3673 PR debug/69518
3674 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3675 all type variants, not just TYPE_MAIN_VARIANT.
3676
3677 2016-01-27 Jakub Jelinek <jakub@redhat.com>
3678
3679 PR debug/66869
3680 * c-decl.c (c_write_global_declarations_1): Warn with
3681 warn_unused_function if static prototype without definition
3682 is not C_DECL_USED.
3683
3684 2016-01-27 Marek Polacek <polacek@redhat.com>
3685
3686 PR c/68062
3687 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3688 to unsigned, if needed. Add -Wsign-compare warning.
3689
3690 2016-01-26 Jakub Jelinek <jakub@redhat.com>
3691
3692 PR tree-optimization/69483
3693 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3694
3695 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3696
3697 PR c/24293
3698 * c-tree.h (incomplete_record_decls): Declare.
3699 * c-parser.c (incomplete_record_decls): Define.
3700 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3701 report error if any decl has zero size.
3702 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3703 or enum type to incomplete_record_decls.
3704
3705 2016-01-14 Tom de Vries <tom@codesourcery.com>
3706
3707 PR tree-optimization/68773
3708 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3709 set force_output.
3710
3711 2016-01-14 Marek Polacek <polacek@redhat.com>
3712
3713 PR c/69262
3714 * c-decl.c (grokdeclarator): Provide more information for invalid
3715 array declarations.
3716
3717 2016-01-06 David Malcolm <dmalcolm@redhat.com>
3718
3719 * c-parser.c (c_parser_unary_expression): For dereferences, build
3720 a combined location before calling build_indirect_ref, so that
3721 error reports cover the full range, manually updating the c_expr
3722 src_range.
3723
3724 2016-01-06 Marek Polacek <polacek@redhat.com>
3725
3726 PR sanitizer/69099
3727 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3728 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3729 NULL.
3730
3731 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3732
3733 Update copyright years.
3734
3735 2016-01-04 Marek Polacek <polacek@redhat.com>
3736
3737 PR c/68908
3738 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3739 optimization to use __atomic_fetch_* built-in if possible.
3740
3741 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3742
3743 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3744 into...
3745 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3746 all users.
3747
3748 2015-12-22 Marek Polacek <polacek@redhat.com>
3749
3750 PR c/69002
3751 * c-typeck.c (build_component_ref): Warn when acessing elements of
3752 atomic structures or unions.
3753
3754 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3755
3756 * c-typeck.c: Include "gcc-rich-location.h".
3757 (build_binary_op): In the two places that call binary_op_error,
3758 create a gcc_rich_location and populate it with the location of
3759 the binary op and its two operands.
3760
3761 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3762
3763 * c-parser.c (c_parser_statement_after_labels): When calling
3764 c_finish_return, Use the return expression's location if it has
3765 one, falling back to the location of the first token within it.
3766 * c-typeck.c (c_finish_return): When issuing warnings about
3767 the incorrect presence/absence of a return value, issue a note
3768 showing the declaration of the function.
3769
3770 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3771
3772 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3773 to 4.
3774 (c_parser_peek_nth_token): New function.
3775 (c_parser_peek_conflict_marker): New function.
3776 (c_parser_error): Detect conflict markers and report them as such.
3777
3778 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3779
3780 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3781 to preserve range information for the primary expression
3782 in the call to c_parser_postfix_expression_after_primary.
3783
3784 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3785
3786 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3787 expression location, falling back on the first token location,
3788 rather than always using the latter.
3789
3790 2015-12-16 Marek Polacek <polacek@redhat.com>
3791
3792 PR c/64637
3793 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3794 available.
3795
3796 2015-12-15 Marek Polacek <polacek@redhat.com>
3797
3798 PR c/68907
3799 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3800 artificial decl.
3801
3802 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3803
3804 * c-parser.c (c_parser_alignof_expression): Capture location of
3805 closing parenthesis (if any), or of end of unary expression, and
3806 use it to build a src_range for the expression.
3807
3808 2015-12-08 David Malcolm <dmalcolm@redhat.com>
3809
3810 PR c/68757
3811 * c-parser.c (c_parser_get_builtin_args): Add
3812 "out_close_paren_loc" param, and write back to it.
3813 (c_parser_postfix_expression): Capture the closing
3814 parenthesis location for RID_CHOOSE_EXPR,
3815 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3816 RID_BUILTIN_SHUFFLE and use it to set the source range
3817 for such expressions; within RID_BUILTIN_COMPLEX set
3818 the underlying location.
3819
3820 2015-12-07 Marek Polacek <polacek@redhat.com>
3821
3822 PR c/68668
3823 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3824 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3825
3826 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3827
3828 * c-tree.h (c_build_va_arg): Adjust prototype.
3829 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3830 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3831 parameter, adjust throughout and issue an error if EXPR is a component
3832 with reverse storage order.
3833
3834 2015-12-02 Jason Merrill <jason@redhat.com>
3835
3836 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3837 (c_fully_fold_internal, decl_constant_value_for_optimization):
3838 Move from c-common.c.
3839 * c-tree.h: Declare decl_constant_value_for_optimization.
3840 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3841
3842 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3843
3844 PR c/68162
3845 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3846 following link from declarator to next declarator. Track original
3847 qualified type and pass it to c_build_qualified_type.
3848 * c-typeck.c (c_build_qualified_type): Add arguments
3849 orig_qual_type and orig_qual_indirect.
3850
3851 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3852
3853 * c-parser.c (c_parser_omp_clause_name)
3854 (c_parser_oacc_all_clauses): Alphabetical sorting.
3855
3856 2015-12-02 Jakub Jelinek <jakub@redhat.com>
3857
3858 PR c/68533
3859 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3860 for diagnostics.
3861
3862 2015-12-01 Julian Brown <julian@codesourcery.com>
3863 Cesar Philippidis <cesar@codesourcery.com>
3864 James Norris <James_Norris@mentor.com>
3865
3866 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3867 (c_parser_oacc_clause_use_device): New function.
3868 (c_parser_oacc_all_clauses): Add use_device support.
3869 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3870 (c_parser_oacc_host_data): New function.
3871 (c_parser_omp_construct): Add host_data support.
3872 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3873 * c-typeck.c (c_finish_oacc_host_data): New function.
3874 (c_finish_omp_clauses): Add use_device support.
3875
3876 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
3877
3878 PR c/67106
3879 * c-decl.c: Set TYPE_PACKED in variants.
3880
3881 2015-11-27 Martin Liska <mliska@suse.cz>
3882
3883 PR c++/68312
3884 * c-array-notation.c (fix_builtin_array_notation_fn):
3885 Use release_vec_vec instead of vec::release.
3886 (build_array_notation_expr): Likewise.
3887 (fix_conditional_array_notations_1): Likewise.
3888 (fix_array_notation_expr): Likewise.
3889 (fix_array_notation_call_expr): Likewise.
3890
3891 2015-11-27 Jakub Jelinek <jakub@redhat.com>
3892
3893 PR c/63326
3894 * c-parser.c (c_parser_compound_statement_nostart): If
3895 last_label is true, use pragma_stmt instead of pragma_compound
3896 as second c_parser_pragma argument.
3897 (c_parser_omp_ordered, c_parser_omp_target_update,
3898 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
3899 false as second argument to c_parser_skip_to_pragma_eol after
3900 diagnosing standalone directives used in pragma_stmt context.
3901
3902 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
3903
3904 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
3905 with "if (ENABLE_OFFLOADING)".
3906
3907 2015-11-23 David Malcolm <dmalcolm@redhat.com>
3908
3909 PR objc/68438
3910 * c-parser.c (c_parser_postfix_expression): Set up source ranges
3911 for various Objective-C constructs: Class.name syntax,
3912 @selector(), @protocol(), @encode(), and [] message syntax.
3913
3914 2015-11-20 David Malcolm <dmalcolm@redhat.com>
3915
3916 PR 62314
3917 * c-typeck.c (should_suggest_deref_p): New function.
3918 (build_component_ref): Special-case POINTER_TYPE when
3919 generating a "not a structure of union" error message, and
3920 suggest a "->" rather than a ".", providing a fix-it hint.
3921
3922 2015-11-19 David Malcolm <dmalcolm@redhat.com>
3923
3924 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
3925 candidate into a new function, find_closest_identifier.
3926
3927 2015-11-19 Marek Polacek <polacek@redhat.com>
3928
3929 PR c/68412
3930 * c-typeck.c (parser_build_binary_op): Properly handle
3931 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
3932
3933 2015-11-17 David Malcolm <dmalcolm@redhat.com>
3934
3935 * c-parser.c (set_c_expr_source_range): Bulletproof both
3936 overloaded implementations against NULL expr->value.
3937 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
3938 values.
3939 (c_parser_unary_expression): Likewise when handling addresses of
3940 labels.
3941 (c_parser_postfix_expression): Likewise for statement expressions,
3942 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
3943 __builtin_va_arg, and for __builtin_offset_of.
3944 (c_parser_postfix_expression_after_paren_type): Initialize expr's
3945 src_range using the range of the braced initializer.
3946 (c_parser_transaction_expression): Set src_range for "ret" to a
3947 sane pair of values.
3948
3949 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3950
3951 * c-parser.c (c_finish_omp_declare_simd): Look for
3952 "simd" attribute as well. Update error message.
3953
3954 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3955
3956 * c-parser.c (c_parser_omp_declare_target): Adjust.
3957
3958 2015-11-14 Jakub Jelinek <jakub@redhat.com>
3959
3960 * c-typeck.c (c_finish_omp_clauses): Don't mark
3961 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
3962
3963 2015-11-14 Marek Polacek <polacek@redhat.com>
3964
3965 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
3966 * c-typeck.c: Likewise.
3967
3968 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3969
3970 * c-decl.c (warn_defaults_to): Pass line_table to
3971 rich_location ctor.
3972 * c-errors.c (pedwarn_c99): Likewise.
3973 (pedwarn_c90): Likewise.
3974 * c-parser.c (set_c_expr_source_range): New functions.
3975 (c_token::get_range): New method.
3976 (c_token::get_finish): New method.
3977 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
3978 based on the range from the start of the LHS to the end of the
3979 RHS.
3980 (c_parser_conditional_expression): Likewise, based on the range
3981 from the start of the cond.value to the end of exp2.value.
3982 (c_parser_binary_expression): Call set_c_expr_source_range on
3983 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
3984 (c_parser_cast_expression): Call set_c_expr_source_range on ret
3985 based on the cast_loc through to the end of the expr.
3986 (c_parser_unary_expression): Likewise, based on the
3987 op_loc through to the end of op.
3988 (c_parser_sizeof_expression) Likewise, based on the start of the
3989 sizeof token through to either the closing paren or the end of
3990 expr.
3991 (c_parser_postfix_expression): Likewise, using the token range,
3992 or from the open paren through to the close paren for
3993 parenthesized expressions.
3994 (c_parser_postfix_expression_after_primary): Likewise, for
3995 various kinds of expression.
3996 * c-tree.h (struct c_expr): Add field "src_range".
3997 (c_expr::get_start): New method.
3998 (c_expr::get_finish): New method.
3999 (set_c_expr_source_range): New decls.
4000 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4001 on ret for prefix unary ops.
4002 (parser_build_binary_op): Likewise, running from the start of
4003 arg1.value through to the end of arg2.value.
4004
4005 2015-11-13 Marek Polacek <polacek@redhat.com>
4006
4007 PR c/68320
4008 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4009
4010 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4011
4012 * c-typeck.c: Include spellcheck.h.
4013 (lookup_field_fuzzy_find_candidates): New function.
4014 (lookup_field_fuzzy): New function.
4015 (build_component_ref): If the field was not found, try using
4016 lookup_field_fuzzy and potentially offer a suggestion.
4017
4018 2015-11-12 James Norris <jnorris@codesourcery.com>
4019 Joseph Myers <joseph@codesourcery.com>
4020
4021 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4022 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4023 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4024 and PRAGMA_OMP_CLAUSE_LINK.
4025 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4026 and PRAGMA_OACC_CLAUSE_LINK.
4027 (OACC_DECLARE_CLAUSE_MASK): New definition.
4028 (c_parser_oacc_declare): New function.
4029
4030 2015-11-12 Marek Polacek <polacek@redhat.com>
4031
4032 PR c/67784
4033 * c-parser.c (c_parser_for_statement): Reclassify the token in
4034 a correct scope.
4035
4036 2015-11-11 Marek Polacek <polacek@redhat.com>
4037
4038 PR c/68107
4039 PR c++/68266
4040 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4041 checking the size of an array.
4042
4043 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
4044
4045 * c-array-notation.c: Remove unused header files.
4046 * c-aux-info.c: Likewise.
4047 * c-convert.c: Likewise.
4048 * c-decl.c: Likewise.
4049 * c-errors.c: Likewise.
4050 * c-lang.c: Likewise.
4051 * c-objc-common.c: Likewise.
4052 * c-parser.c: Likewise.
4053 * c-typeck.c: Likewise.
4054 * gccspec.c: Likewise.
4055
4056 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4057 Cesar Philippidis <cesar@codesourcery.com>
4058 James Norris <jnorris@codesourcery.com>
4059 Julian Brown <julian@codesourcery.com>
4060 Nathan Sidwell <nathan@codesourcery.com>
4061
4062 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4063 routine arg.
4064 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4065 (c_parser_pragma): Parse 'acc routine'.
4066 (OACC_ROUTINE_CLAUSE_MARK): Define.
4067 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4068
4069 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4070
4071 PR debug/67192
4072 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4073 location of the backward-goto to the start of the loop body.
4074
4075 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4076
4077 PR debug/67192
4078 * c-parser.c (c_parser_while_statement): Finish the loop before
4079 parsing ahead for misleading indentation.
4080 (c_parser_for_statement): Likewise.
4081
4082 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4083
4084 * c-decl.c (finish_struct): If the structure has reverse storage
4085 order, rewrite the type of array fields with scalar component. Call
4086 maybe_apply_pragma_scalar_storage_order on entry.
4087 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4088 errors on bit-fields and reverse SSO here and not...
4089 (c_mark_addressable): ...here.
4090 (output_init_element): Adjust call to initializer_constant_valid_p.
4091 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4092
4093 2015-11-06 David Malcolm <dmalcolm@redhat.com>
4094
4095 * c-decl.c (warn_defaults_to): Update for change in signature
4096 of diagnostic_set_info.
4097 * c-errors.c (pedwarn_c99): Likewise.
4098 (pedwarn_c90): Likewise.
4099 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4100 for textinfo::set_location.
4101
4102 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4103 Thomas Schwinge <thomas@codesourcery.com>
4104 James Norris <jnorris@codesourcery.com>
4105
4106 * c-parser.c (c_parser_omp_clause_name): Add support for
4107 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4108 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4109 default(none) in OpenACC.
4110 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4111 arguments.
4112 (c_parser_oacc_clause_tile): New function.
4113 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4114 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4115 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4116 TILE}.
4117 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4118 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4119 FIRSTPRIVATE}.
4120 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4121 (c_parser_oacc_update): Update the error message for missing clauses.
4122 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4123 and OMP_CLAUSE_INDEPENDENT.
4124
4125 2015-11-05 Marek Polacek <polacek@redhat.com>
4126
4127 PR c/68090
4128 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4129 deal with pre-evaluation on invalid types.
4130
4131 2015-11-05 Jakub Jelinek <jakub@redhat.com>
4132 Ilya Verbin <ilya.verbin@intel.com>
4133
4134 * c-parser.c: Include context.h and gimple-expr.h.
4135 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4136 monotonic together with nonmonotonic.
4137 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4138 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4139 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4140 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4141 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4142 expressions on combined target teams before the target.
4143 (c_parser_omp_declare_target): If decl has "omp declare target" or
4144 "omp declare target link" attribute, and cgraph or varpool node already
4145 exists, then set corresponding flags. Call c_finish_omp_clauses
4146 in the parenthesized extended-list syntax case.
4147 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4148 declare target.
4149 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4150 on OMP_CLAUSE_REDUCTION array sections.
4151 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4152 into the constant offset, or for variable low-bound using
4153 POINTER_PLUS_EXPR. For structure element based array sections use
4154 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4155 (c_finish_omp_clauses): Drop generic_field_head, structure
4156 elements are now always mapped even as array section bases,
4157 diagnose same var in data sharing and mapping clauses. Diagnose if
4158 linear step on declare simd is neither a constant nor a uniform
4159 parameter. Look through POINTER_PLUS_EXPR for array section
4160 reductions. Diagnose the same var or function appearing multiple
4161 times on the same directive. Fix up wording for the to clause if t
4162 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4163 modifier on kinds other than dynamic or guided or nonmonotonic
4164 modifier together with ordered clause.
4165
4166 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4167 Chung-Lin Tang <cltang@codesourcery.com>
4168
4169 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4170
4171 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
4172
4173 * c-array-notation.c: Reorder #include's and remove duplicates.
4174 * c-aux-info.c: Likewise.
4175 * c-convert.c: Likewise.
4176 * c-decl.c: Likewise.
4177 * c-errors.c: Likewise.
4178 * c-lang.c: Likewise.
4179 * c-objc-common.c: Likewise.
4180 * c-parser.c: Likewise.
4181 * c-typeck.c: Likewise.
4182
4183 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
4184
4185 PR debug/66068
4186 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4187 after calling build_qualified_type.
4188
4189 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4190 Thomas Schwinge <thomas@codesourcery.com>
4191 James Norris <jnorris@codesourcery.com>
4192 Joseph Myers <joseph@codesourcery.com>
4193 Julian Brown <julian@codesourcery.com>
4194 Bernd Schmidt <bschmidt@redhat.com>
4195
4196 * c-parser.c (c_parser_oacc_shape_clause): New.
4197 (c_parser_oacc_simple_clause): New.
4198 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4199 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4200
4201 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4202 James Norris <jnorris@codesourcery.com>
4203 Cesar Philippidis <cesar@codesourcery.com>
4204
4205 PR c/64765
4206 PR c/64880
4207 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4208 parameters, and handle these. Adjust all users.
4209 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4210 into...
4211 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4212 all users.
4213 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4214 declare functions.
4215 (c_finish_omp_construct): Declare function.
4216 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4217 Merge functions into...
4218 (c_finish_omp_construct): ... this new function.
4219
4220 2015-10-22 Richard Biener <rguenther@suse.de>
4221
4222 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4223 before folding a MINUS_EXPR.
4224
4225 2015-10-21 Marek Polacek <polacek@redhat.com>
4226
4227 PR c/68024
4228 * c-decl.c (start_function): Warn about vararg functions without
4229 a prototype.
4230
4231 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4232
4233 * c-typeck.c (build_conditional_expr): Use boolean vector
4234 type for vector comparison.
4235 (build_vec_cmp): New.
4236 (build_binary_op): Use build_vec_cmp for comparison.
4237
4238 2015-10-20 Marek Polacek <polacek@redhat.com>
4239
4240 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4241
4242 2015-10-20 Marek Polacek <polacek@redhat.com>
4243
4244 PR c/67964
4245 * c-parser.c (c_parser_attributes): Break out of the loop if the
4246 token after an attribute isn't a comma.
4247
4248 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4249 Aldy Hernandez <aldyh@redhat.com>
4250
4251 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4252 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4253 (c_parser_omp_variable_list): Handle structure elements for
4254 map, to and from clauses. Handle array sections in reduction
4255 clause. Formatting fixes.
4256 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4257 if clause modifiers.
4258 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4259 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4260 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4261 c_parser_omp_clause_is_device_ptr): New functions.
4262 (c_parser_omp_clause_ordered): Parse optional parameter.
4263 (c_parser_omp_clause_reduction): Handle array reductions.
4264 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4265 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4266 functions.
4267 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4268 (c_parser_omp_clause_depend_sink): New function.
4269 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4270 (c_parser_omp_clause_map): Parse release/delete map kinds and
4271 optional always modifier.
4272 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4273 and c_finish_omp_clauses callers.
4274 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4275 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4276 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4277 (OMP_CRITICAL_CLAUSE_MASK): Define.
4278 (c_parser_omp_critical): Parse critical clauses.
4279 (c_parser_omp_for_loop): Handle doacross loops, adjust
4280 c_finish_omp_for and c_finish_omp_clauses callers.
4281 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4282 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4283 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4284 (c_parser_omp_for): Disallow ordered clause when combined with
4285 distribute. Disallow linear clause when combined with distribute
4286 and not combined with simd.
4287 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4288 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4289 parse clauses and if depend clause is found, don't parse a body.
4290 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4291 Allow target parallel without for after it.
4292 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4293 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4294 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4295 invalid kinds.
4296 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4297 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4298 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4299 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4300 functions.
4301 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4302 defaultmap and is_device_ptr clauses.
4303 (c_parser_omp_target): Parse target parallel and target simd. Set
4304 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4305 and target exit data. Diagnose invalid map kinds.
4306 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4307 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4308 construct.
4309 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4310 &omp_priv.
4311 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4312 (c_parser_omp_taskloop): New function.
4313 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4314 handle PRAGMA_OMP_TASKLOOP.
4315 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4316 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4317 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4318 Add IS_OMP argument, handle structure element bases, diagnose
4319 bitfields, pass IS_OMP recursively, diagnose known zero length
4320 array sections in depend clauses, handle array sections in reduction
4321 clause, diagnose negative length even for pointers.
4322 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4323 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4324 array sections in reduction clause, set
4325 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4326 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4327 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4328 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4329
4330 2015-10-06 Marek Polacek <polacek@redhat.com>
4331
4332 * c-parser.c (c_parser_statement_after_labels): Use
4333 protected_set_expr_location.
4334 (c_parser_omp_clause_num_gangs): Likewise.
4335 (c_parser_omp_clause_num_threads): Likewise.
4336 (c_parser_omp_clause_num_workers): Likewise.
4337 (c_parser_omp_clause_vector_length): Likewise.
4338 (c_parser_omp_clause_num_teams): Likewise.
4339 (c_parser_omp_clause_thread_limit): Likewise.
4340 * c-typeck.c (build_c_cast): Likewise.
4341 (c_cast_expr): Likewise.
4342
4343 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4344
4345 * c-typeck.c (c_tree_equal): Use real_equal instead of
4346 REAL_VALUES_EQUAL.
4347
4348 2015-10-04 Jason Merrill <jason@redhat.com>
4349
4350 * c-parser.c (c_lex_one_token): Handle @synchronized.
4351 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4352 can change whether the function is transaction_safe.
4353
4354 2015-10-02 Marek Polacek <polacek@redhat.com>
4355
4356 PR c/67730
4357 * c-typeck.c (convert_for_assignment): Use the expansion point
4358 location throughout.
4359
4360 2015-10-02 Marek Polacek <polacek@redhat.com>
4361
4362 PR c/64249
4363 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4364 and pass it down to c_parser_if_statement.
4365 (c_parser_else_body): Add CHAIN parameter and pass it down to
4366 c_parser_statement_after_labels.
4367 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4368 duplicated if-else-if conditions.
4369
4370 2015-10-01 Marek Polacek <polacek@redhat.com>
4371
4372 * c-typeck.c (convert_for_assignment): Improve commentary.
4373
4374 2015-09-30 Marek Polacek <polacek@redhat.com>
4375
4376 PR c/67730
4377 * c-typeck.c (c_finish_return): Use the expansion point location for
4378 certain "return with value" warnings.
4379
4380 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4381
4382 * c-parser.c (pragma_lex): Add loc argument.
4383
4384 2015-09-15 Marek Polacek <polacek@redhat.com>
4385
4386 PR c/67580
4387 * c-decl.c (tag_exists_p): New function.
4388 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4389 struct/union/enum keywords are missing.
4390 * c-tree.h (tag_exists_p): Declare.
4391
4392 2015-09-15 Marek Polacek <polacek@redhat.com>
4393
4394 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4395 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4396 Return NULL_TREE instead of 0.
4397 (lookup_name): Return NULL_TREE instead of 0.
4398 (lookup_name_in_scope): Likewise.
4399 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4400 (parser_xref_tag): Use false instead of 0.
4401 (start_struct): Use true instead of 1.
4402 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4403
4404 2015-09-14 Marek Polacek <polacek@redhat.com>
4405
4406 * c-typeck.c (set_nonincremental_init_from_string): Use
4407 HOST_WIDE_INT_M1U when shifting a negative value.
4408
4409 2015-09-09 Mark Wielaard <mjw@redhat.com>
4410
4411 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4412 parm against NULL.
4413
4414 2015-09-10 Jakub Jelinek <jakub@redhat.com>
4415
4416 PR c/67502
4417 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4418 into OMP_FOR_PRE_BODY rather than before the loop.
4419
4420 2015-09-09 Jakub Jelinek <jakub@redhat.com>
4421
4422 PR c/67501
4423 * c-parser.c (c_parser_oacc_all_clauses,
4424 c_parser_omp_all_clauses): Remove invalid clause from
4425 list of clauses even if parser->error is set.
4426
4427 PR c/67500
4428 * c-parser.c (c_parser_omp_clause_aligned,
4429 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4430 test for errors.
4431 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4432 error_mark_node.
4433
4434 PR c/67495
4435 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4436 instead of c_parser_unary_expression. If the result is !lvalue_p,
4437 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4438
4439 2015-09-04 Marek Polacek <polacek@redhat.com>
4440
4441 PR sanitizer/67279
4442 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4443
4444 2015-09-03 Martin Sebor <msebor@redhat.com>
4445
4446 PR c/66516
4447 * c-typeck.c (convert_arguments, parser_build_unary_op,
4448 build_conditional_expr, c_cast_expr, convert_for_assignment,
4449 build_binary_op, _objc_common_truthvalue_conversion): Call
4450 reject_gcc_builtin.
4451 (c_decl_implicit): Define.
4452
4453 2015-09-02 Marek Polacek <polacek@redhat.com>
4454
4455 PR c/67432
4456 * c-parser.c (c_parser_enum_specifier): Give a better error for
4457 an empty enum.
4458
4459 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4460
4461 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4462
4463 2015-08-12 Marek Polacek <polacek@redhat.com>
4464
4465 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4466 LOC to it.
4467
4468 2015-08-03 Marek Polacek <polacek@redhat.com>
4469
4470 PR c/67088
4471 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4472 Use it.
4473 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4474
4475 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4476
4477 * c-parser.c (c_parser_if_body): Take token_indent_info
4478 argument. Call warn_for_misleading_indentation even when the
4479 body is a semicolon. Extract token_indent_infos corresponding
4480 to the guard, body and next tokens. Adjust call to
4481 warn_for_misleading_indentation accordingly.
4482 (c_parser_else_body): Likewise.
4483 (c_parser_if_statement): Likewise.
4484 (c_parser_while_statement): Likewise.
4485 (c_parser_for_statement): Likewise.
4486
4487 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4488 Manuel López-Ibáñez <manu@gcc.gnu.org>
4489
4490 * c-decl.c (get_parm_info): Remove static var. Update warning
4491 message.
4492
4493 2015-07-27 Marek Polacek <polacek@redhat.com>
4494
4495 PR c++/66555
4496 PR c/54979
4497 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4498
4499 2015-07-20 Marek Polacek <polacek@redhat.com>
4500
4501 PR c++/55095
4502 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4503 (build_binary_op): Warn about left shift overflows.
4504
4505 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4506
4507 * c-array-notation.c: Adjust includes for flags.h changes.
4508 * c-objc-common.c: Likewise.
4509
4510 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4511
4512 * c-array-notation.c: Adjust includes.
4513 * c-aux-info.c: Likewise.
4514 * c-convert.c: Likewise.
4515 * c-decl.c: Likewise.
4516 * c-errors.c: Likewise.
4517 * c-lang.c: Likewise.
4518 * c-objc-common.c: Likewise.
4519 * c-parser.c: Likewise.
4520 * c-typeck.c: Likewise.
4521
4522 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4523
4524 PR fortran/66605
4525 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4526
4527 2015-06-29 Marek Polacek <polacek@redhat.com>
4528
4529 PR c/66322
4530 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4531 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4532 about -Wswitch-bool here.
4533 (do_case): Update c_add_case_label call.
4534 (c_finish_case): Update c_do_switch_warnings call.
4535
4536 2015-06-27 Marek Polacek <polacek@redhat.com>
4537
4538 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4539
4540 2015-06-26 Marek Polacek <polacek@redhat.com>
4541
4542 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4543 INDIRECT_REF_P.
4544 * c-typeck.c (array_to_pointer_conversion): Likewise.
4545 (build_unary_op): Likewise.
4546 (c_finish_return): Likewise.
4547
4548 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4549
4550 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4551 * c-parser.c: Likewise.
4552
4553 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4554
4555 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4556 instead of pointer_hash.
4557 (detect_field_duplicates): Likewise.
4558
4559 2015-06-25 Marek Polacek <polacek@redhat.com>
4560
4561 * c-array-notation.c: Use VAR_P throughout.
4562 * c-decl.c: Likewise.
4563 * c-objc-common.c: Likewise.
4564 * c-parser.c: Likewise.
4565 * c-typeck.c: Likewise.
4566
4567 2015-06-25 Marek Polacek <polacek@redhat.com>
4568
4569 * c-decl.c: Use is_global_var throughout.
4570 * c-parser.c: Likewise.
4571 * c-typeck.c: Likewise.
4572
4573 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4574
4575 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4576 * c-aux-info.c: Likewise.
4577 * c-convert.c: Likewise.
4578 * c-decl.c: Likewise.
4579 * c-errors.c: Likewise.
4580 * c-lang.c: Likewise.
4581 * c-objc-common.c: Likewise.
4582 * c-parser.c: Likewise.
4583 * c-typeck.c: Likewise.
4584
4585 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
4586
4587 PR middle-end/66325
4588 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4589 variants.
4590
4591 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4592
4593 * c-decl.c (pop_scope): Register the main translation unit
4594 through the new debug hook.
4595
4596 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4597
4598 * c-array-notation.c : Adjust include files.
4599 * c-aux-info.c : Likewise.
4600 * c-convert.c : Likewise.
4601 * c-decl.c : Likewise.
4602 * c-errors.c : Likewise.
4603 * c-lang.c : Likewise.
4604 * c-lang.h : Likewise.
4605 * c-objc-common.c : Likewise.
4606 * c-parser.c : Likewise.
4607 * c-typeck.c : Likewise.
4608
4609 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4610
4611 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4612 immediately clobber it.
4613 (c_write_global_declarations_1): Remove call to
4614 check_global_declaration_1.
4615 (c_write_global_declarations_2): Remove.
4616 (c_write_final_cleanups): Rename from c_write_global_declarations.
4617 Remove call to finalize_compilation_unit.
4618 Remove calls to debugging hooks.
4619 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4620 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4621 * c-tree.h: Remove c_write_global_declarations.
4622
4623 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4624
4625 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4626 * c-aux-info.c: Likewise.
4627 * c-convert.c: Likewise.
4628 * c-decl.c: Likewise.
4629 * c-errors.c: Likewise.
4630 * c-lang.c: Likewise.
4631 * c-objc-common.c: Likewise.
4632 * c-parser.c: Likewise.
4633 * c-typeck.c: Likewise.
4634
4635 2015-06-04 Marek Polacek <polacek@redhat.com>
4636
4637 PR c/66341
4638 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4639 it is a lvalue.
4640
4641 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4642
4643 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4644 Warn for empty struct.
4645 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4646
4647 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4648
4649 * c-decl.c (start_function): Call plugin before parsing.
4650 (finish_function): Call plugin after parsing.
4651
4652 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4653
4654 PR c/49551
4655 * c-decl.c (merge_decls): Merge DECL_COMMON.
4656
4657 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
4658
4659 * Make-lang.in (check_gcc_pallelize): Define.
4660
4661 2015-05-22 Marek Polacek <polacek@redhat.com>
4662
4663 PR c/47043
4664 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4665 attributes.
4666
4667 2015-05-21 Marek Polacek <polacek@redhat.com>
4668
4669 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4670 DECL_BUILT_IN.
4671
4672 2015-05-20 Marek Polacek <polacek@redhat.com>
4673
4674 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4675 * c-typeck.c: Likewise.
4676
4677 2015-05-19 Marek Polacek <polacek@redhat.com>
4678
4679 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4680
4681 2015-05-19 Jakub Jelinek <jakub@redhat.com>
4682
4683 PR middle-end/66199
4684 * c-parser.c (c_parser_omp_for_loop): Don't add
4685 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4686 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4687 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4688 constructs.
4689
4690 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4691
4692 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
4693 swaps.
4694
4695 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4696
4697 PR fortran/44054
4698 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4699 accessor function.
4700
4701 2015-05-14 Marek Polacek <polacek@redhat.com>
4702
4703 PR c/66066
4704 PR c/66127
4705 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4706 rather than with 0.
4707
4708 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4709
4710 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4711 to add a call to warn_for_misleading_indentation.
4712 (c_parser_else_body): Likewise, adding param "else_loc".
4713 (c_parser_if_statement): Check for misleading indentation.
4714 (c_parser_while_statement): Likewise.
4715 (c_parser_for_statement): Likewise.
4716
4717 2015-05-08 Marek Polacek <polacek@redhat.com>
4718
4719 PR c/64918
4720 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4721 (output_init_element): Likewise.
4722
4723 2015-05-07 Marek Polacek <polacek@redhat.com>
4724
4725 PR c/65179
4726 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4727 value.
4728
4729 2015-04-30 Marek Polacek <polacek@redhat.com>
4730
4731 * c-typeck.c (set_init_label): Call error_at instead of error and
4732 pass LOC to it.
4733
4734 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4735 the type of a decl.
4736
4737 * c-typeck.c (c_build_va_arg): Clarify the error message.
4738
4739 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4740
4741 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4742 OMP_STANDALONE_CLAUSES.
4743
4744 2015-04-28 Marek Polacek <polacek@redhat.com>
4745
4746 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4747
4748 2015-04-28 Marek Polacek <polacek@redhat.com>
4749
4750 PR c/65901
4751 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4752
4753 2015-04-25 Marek Polacek <polacek@redhat.com>
4754
4755 PR c/52085
4756 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4757 attribute.
4758
4759 2015-04-23 Marek Polacek <polacek@redhat.com>
4760
4761 PR c/65345
4762 * c-decl.c (set_labels_context_r): New function.
4763 (store_parm_decls): Call it via walk_tree_without_duplicates.
4764 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4765 instead of create_tmp_var. Build TARGET_EXPR instead of
4766 COMPOUND_EXPR.
4767 (build_atomic_assign): Use create_tmp_var_raw instead of
4768 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4769
4770 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4771
4772 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4773 (c_parser_omp_target_update): Add missed %> to error_at ().
4774
4775 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4776
4777 PR target/55143
4778 * c-decl.c (c_default_pointer_mode): Remove definition.
4779 * c-tree.h (c_default_pointer_mode): Remove declaration.
4780
4781 2015-03-27 Tobias Burnus <burnus@net-b.de>
4782
4783 PR c/65586
4784 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4785 error out.
4786 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4787 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4788 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4789
4790 2015-03-19 Jakub Jelinek <jakub@redhat.com>
4791
4792 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4793 attribute for DECL_EXTERNAL VAR_DECLs.
4794
4795 2015-03-11 Jakub Jelinek <jakub@redhat.com>
4796
4797 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4798 argument.
4799
4800 2015-03-10 Jakub Jelinek <jakub@redhat.com>
4801
4802 PR c/65120
4803 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4804 before preparing arguments to warn_logical_not_parentheses.
4805
4806 2015-03-09 Jakub Jelinek <jakub@redhat.com>
4807
4808 PR c/65120
4809 * c-typeck.c (parser_build_binary_op): Don't warn for
4810 !!x == y or !b == y where b is _Bool.
4811
4812 2015-03-09 Marek Polacek <polacek@redhat.com>
4813
4814 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4815 * c-decl.c (grokdeclarator): Likewise.
4816 * c-typeck.c (build_binary_op): Likewise.
4817
4818 2015-02-27 Marek Polacek <polacek@redhat.com>
4819
4820 PR c/65228
4821 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4822
4823 2015-02-14 Marek Polacek <polacek@redhat.com>
4824
4825 PR c/64768
4826 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4827 declared through a typedef name.
4828
4829 2015-02-13 Marek Polacek <polacek@redhat.com>
4830
4831 PR c/65050
4832 * c-decl.c (grokdeclarator): Print also the type when giving
4833 the error message about array's incomplete element type.
4834
4835 2015-02-11 Jakub Jelinek <jakub@redhat.com>
4836
4837 PR c/64824
4838 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4839 check in the POP macro.
4840
4841 2015-02-09 Marek Polacek <polacek@redhat.com>
4842
4843 PR c/64856
4844 * c-typeck.c (process_init_element): Don't always wrap
4845 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4846 initializing a range of elements.
4847
4848 2015-02-04 Jakub Jelinek <jakub@redhat.com>
4849
4850 PR c/64824
4851 PR c/64868
4852 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4853
4854 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
4855
4856 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4857 processing enum declaration.
4858
4859 2015-01-29 Marek Polacek <polacek@redhat.com>
4860
4861 PR c/64709
4862 * c-typeck.c (pop_init_level): If constructor_elements has
4863 exactly one element with integer_zerop value, set constructor_zeroinit
4864 to 1. Remove braces around warning_init call.
4865
4866 2015-01-27 Jakub Jelinek <jakub@redhat.com>
4867
4868 PR c/64766
4869 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4870 of FUNCTION_DECLs with error_mark_node.
4871
4872 2015-01-26 Jakub Jelinek <jakub@redhat.com>
4873
4874 PR c/64778
4875 * c-typeck.c (convert_arguments): Return -1 if there are
4876 error_args, even if we've diagnosed too many arguments.
4877
4878 2015-01-21 Richard Biener <rguenther@suse.de>
4879
4880 PR middle-end/64313
4881 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
4882 for builtins the user declared correctly.
4883
4884 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4885 Bernd Schmidt <bernds@codesourcery.com>
4886 Cesar Philippidis <cesar@codesourcery.com>
4887 James Norris <jnorris@codesourcery.com>
4888 Jakub Jelinek <jakub@redhat.com>
4889 Ilmir Usmanov <i.usmanov@samsung.com>
4890
4891 * c-parser.c: Include "gomp-constants.h".
4892 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
4893 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
4894 Use OMP_CLAUSE_SET_MAP_KIND.
4895 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
4896 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
4897 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
4898 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
4899 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
4900 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
4901 "copyout", "create", "delete", "deviceptr", "gang", "host",
4902 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
4903 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
4904 "present_or_create", "pcreate", "seq", "self", "vector",
4905 "vector_length", "wait", "worker".
4906 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
4907 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
4908 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
4909 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
4910 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
4911 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
4912 (c_parser_oacc_data_clause_deviceptr)
4913 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
4914 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
4915 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
4916 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
4917 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
4918 (c_parser_oacc_parallel, c_parser_oacc_update)
4919 (c_parser_oacc_wait): New functions.
4920 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
4921 (c_finish_oacc_data): New prototypes.
4922 * c-typeck.c: Include "gomp-constants.h".
4923 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
4924 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
4925 OMP_CLAUSE_SET_MAP_KIND.
4926 (c_finish_oacc_parallel, c_finish_oacc_kernels)
4927 (c_finish_oacc_data): New functions.
4928 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
4929 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
4930 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
4931 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
4932 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
4933 GOMP_MAP_FORCE_DEVICEPTR.
4934
4935 2015-01-09 Michael Collison <michael.collison@linaro.org>
4936
4937 * c-array-notation.c: Include hash-set.h, machmode.h,
4938 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4939 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4940 * c-aux-info.c: Ditto.
4941 * c-convert.c: Ditto.
4942 * c-decl.c: Ditto.
4943 * c-errors.c: Ditto.
4944 * c-lang.c: Dittoxs.
4945 * c-objc-common.c: Ditto.
4946 * c-parser.c: Ditto.
4947 * c-typeck.c: Include hash-set.h, machmode.h,
4948 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4949 fold-const.h, wide-int.h, inchash.h, real.h and
4950 fixed-value.h due to flattening of tree.h.
4951
4952 2015-01-07 Marek Polacek <polacek@redhat.com>
4953
4954 PR c/64417
4955 * c-typeck.c (process_init_element): Disallow initialization of
4956 a flexible array member with a string constant if the structure
4957 is in an array.
4958
4959 2015-01-05 Jakub Jelinek <jakub@redhat.com>
4960
4961 PR sanitizer/64344
4962 * c-typeck.c (convert_for_assignment, c_finish_return): For
4963 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
4964 types also set in_late_binary_op around convert call.
4965 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
4966 to integral type casts, if not in_late_binary_op, pass c_fully_fold
4967 result on expr as last argument to ubsan_instrument_float_cast,
4968 if in_late_binary_op, don't use c_save_expr but save_expr.
4969
4970 Update copyright years.
4971
4972 2015-01-05 Marek Polacek <polacek@redhat.com>
4973
4974 PR c/64423
4975 * c-typeck.c (build_array_ref): Pass loc down to
4976 warn_array_subscript_with_type_char.
4977
4978 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
4979
4980 * c-typeck.c: New behavious for pointers to arrays with qualifiers
4981 (common-pointer-type): For pointers to arrays take qualifiers from
4982 element type.
4983 (build_conditional_expr): Add warnings for lost qualifiers.
4984 (comp-target-types): Allow pointers to arrays with different qualifiers.
4985 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
4986 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
4987 to PEDWARN_FOR_QUALIFIERS.
4988
4989 2014-12-17 Jakub Jelinek <jakub@redhat.com>
4990
4991 PR sanitizer/64289
4992 * c-convert.c: Include ubsan.h.
4993 (convert): For real -> integral casts and
4994 -fsanitize=float-cast-overflow don't call convert_to_integer, but
4995 instead instrument the float cast directly.
4996
4997 2014-11-29 Jakub Jelinek <jakub@redhat.com>
4998
4999 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5000 c_finish_stmt_expr): Remove NULL last argument from
5001 create_tmp_var_raw and create_tmp_var calls.
5002 * c-array-notation.c (fix_builtin_array_notation_fn,
5003 build_array_notation_expr, fix_conditional_array_notations_1,
5004 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5005
5006 2014-11-28 Marek Polacek <polacek@redhat.com>
5007
5008 PR c/63862
5009 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5010 convert the right operand to integer type.
5011
5012 2014-11-25 Marek Polacek <polacek@redhat.com>
5013
5014 PR c/63877
5015 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5016 for inline functions.
5017
5018 2014-11-21 Jakub Jelinek <jakub@redhat.com>
5019
5020 PR target/63764
5021 * c-typeck.c (build_array_ref): Adjust
5022 convert_vector_to_pointer_for_subscript caller. If it returns true,
5023 call non_lvalue_loc on the result.
5024
5025 2014-11-11 Richard Biener <rguenther@suse.de>
5026
5027 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5028 to true.
5029
5030 2014-11-10 Andi Kleen <ak@linux.intel.com>
5031
5032 PR c/60804
5033 * c-parser.c (c_parser_statement_after_labels): Call
5034 check_no_cilk.
5035 (c_parser_if_statement): Dito.
5036 (c_parser_switch_statement): Dito.
5037 (c_parser_while_statement): Dito.
5038 (c_parser_do_statement): Dito.
5039 (c_parser_for_statement): Dito.
5040 * c-typeck.c (c_finish_loop): Dito.
5041
5042 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5043
5044 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5045 OPT_Wshift_count_overflow in the warnings.
5046
5047 2014-10-30 Marek Polacek <polacek@redhat.com>
5048
5049 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5050 print the stripped version as well, if they're not the same.
5051
5052 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5053
5054 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5055 machine_mode.
5056
5057 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5058
5059 * c-decl.c: Adjust include files.
5060 * c-parser.c: Ditto.
5061
5062 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5063 Tom Tromey <tromey@redhat.com>
5064
5065 * c-tree.h (enum c_oracle_request): New.
5066 (c_binding_oracle_function): New typedef.
5067 (c_binding_oracle, c_pushtag, c_bind): Declare.
5068 * c-decl.c (c_binding_oracle): New global.
5069 (I_SYMBOL_CHECKED): New macro.
5070 (i_symbol_binding): New function.
5071 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5072 (I_TAG_CHECKED): New macro.
5073 (i_tag_binding): New function.
5074 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5075 (I_LABEL_CHECKED): New macro.
5076 (i_label_binding): New function.
5077 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5078 (c_print_identifier): Save and restore c_binding_oracle.
5079 (c_pushtag, c_bind): New functions.
5080
5081 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5082
5083 * c-typeck.c: Adjust include files.
5084
5085 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5086
5087 PR c++/53061
5088 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5089 initialization here...
5090 (c_initialize_diagnostics): ... but here. Set defaults after
5091 building pretty-printer.
5092
5093 2014-10-23 Marek Polacek <polacek@redhat.com>
5094
5095 PR c/63626
5096 * c-decl.c (pop_scope): Don't print warning in external_scope.
5097
5098 2014-10-19 Marek Polacek <polacek@redhat.com>
5099
5100 PR c/63567
5101 * c-typeck.c (output_init_element): Allow initializing objects with
5102 static storage duration with compound literals even in C99 and add
5103 pedwarn for it.
5104
5105 2014-10-17 Marek Polacek <polacek@redhat.com>
5106
5107 PR c/63567
5108 * c-typeck.c (digest_init): Allow initializing objects with static
5109 storage duration with compound literals even in C99 and add pedwarn
5110 for it.
5111
5112 2014-10-17 Marek Polacek <polacek@redhat.com>
5113
5114 PR c/63543
5115 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5116 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5117 error multiple times. Print the type.
5118
5119 2014-10-17 Marek Polacek <polacek@redhat.com>
5120
5121 PR c/63549
5122 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5123 type.
5124
5125 2014-10-17 Marek Polacek <polacek@redhat.com>
5126
5127 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5128 (start_function): Use OPT_Wimplicit_int instead of 0.
5129 (store_parm_decls_oldstyle): Likewise.
5130
5131 2014-10-17 Alan Modra <amodra@gmail.com>
5132
5133 PR middle-end/61848
5134 * c-decl.c (merge_decls): Don't merge section name or tls model
5135 to newdecl symtab node, instead merge to olddecl. Override
5136 existing olddecl section name. Set tls_model for all thread-local
5137 vars, not just OMP thread-private ones. Remove incorrect comment.
5138
5139 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5140
5141 * c-decl.c: Adjust include files.
5142
5143 2014-10-14 DJ Delorie <dj@redhat.com>
5144
5145 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5146 (c_token_starts_typename): Check all __intN, not just __int128.
5147 (c_token_starts_declspecs): Likewise.
5148 (c_parser_declspecs): Likewise.
5149 (c_parser_attribute_any_word): Likewise.
5150 (c_parser_objc_selector): Likewise.
5151 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5152 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5153 is specified.
5154 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5155 __int128.
5156 (finish_declspecs): Likewise.
5157
5158 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5159
5160 * c-parser.c (c_parser_all_labels): New function to replace
5161 the duplicate code.
5162 (c_parser_statement): Call the new function.
5163
5164 2014-10-09 Marek Polacek <polacek@redhat.com>
5165
5166 PR c/63480
5167 * c-typeck.c (pop_init_level): Don't warn about initializing
5168 with { }.
5169
5170 2014-10-07 Marek Polacek <polacek@redhat.com>
5171
5172 PR c/59717
5173 * c-decl.c (header_for_builtin_fn): New function.
5174 (implicitly_declare): Suggest which header to include.
5175
5176 2014-10-07 Marek Polacek <polacek@redhat.com>
5177
5178 * c-convert.c (convert): Use error_operand_p.
5179 * c-typeck.c (require_complete_type): Likewise.
5180 (really_atomic_lvalue): Likewise.
5181 (digest_init): Likewise.
5182 (handle_omp_array_sections_1): Likewise.
5183
5184 2014-10-03 Marek Polacek <polacek@redhat.com>
5185
5186 PR c/63453
5187 * c-decl.c (pop_scope): Don't warn about "inline function declared
5188 but never defined" for functions marked with gnu_inline attribute.
5189
5190 2014-09-25 Jakub Jelinek <jakub@redhat.com>
5191
5192 PR c++/63249
5193 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5194 on low_bound and length.
5195
5196 2014-09-24 Marek Polacek <polacek@redhat.com>
5197
5198 PR c/61405
5199 PR c/53874
5200 * c-parser.c: Don't define CPP_KEYWORD.
5201 (c_parser_switch_statement): Pass original type to c_finish_case.
5202 * c-tree.h (c_finish_case): Update declaration.
5203 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5204 conditionally to c_do_switch_warnings.
5205
5206 2014-09-03 Marek Polacek <polacek@redhat.com>
5207
5208 PR c/62024
5209 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5210 conversions.
5211
5212 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5213 Balaji V. Iyer <balaji.v.iyer@intel.com>
5214 Igor Zamyatin <igor.zamyatin@intel.com>
5215
5216 * c-parser.c (c_parser_cilk_for): New function.
5217 (c_parser_cilk_grainsize): Likewise.
5218 (c_get_temp_regvar): Likewise.
5219 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5220 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5221 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5222 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5223 case.
5224
5225 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5226
5227 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5228 with using HOST_WIDE_INT without truncation to 'int'
5229
5230 2014-08-22 Marek Polacek <polacek@redhat.com>
5231
5232 PR c++/62199
5233 * c-typeck.c (parser_build_binary_op): Adjust call to
5234 warn_logical_not_parentheses.
5235
5236 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5237
5238 PR other/62008
5239 * c-parser.c (c_parser_array_notation): Check for correct
5240 type of an array added.
5241
5242 2014-08-19 Marek Polacek <polacek@redhat.com>
5243
5244 PR c++/62153
5245 * c-typeck.c (build_binary_op): If either operand of a comparison
5246 is a boolean expression, call maybe_warn_bool_compare.
5247
5248 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5249
5250 PR c/45584
5251 * c-typeck.c (build_c_cast): Do a conversion even when the
5252 TYPE_MAIN_VARIANTs are the same.
5253
5254 2014-08-19 Marek Polacek <polacek@redhat.com>
5255
5256 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5257 pedwarn_c99 instead of pedwarn.
5258 (grokfield): Likewise.
5259 (warn_defaults_to): New function.
5260 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5261 Unconditionally call pedwarn_c99 instead of pedwarn.
5262 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5263 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5264 check flag_isoc11 before.
5265 * c-errors.c (pedwarn_c99): Change the return type to bool.
5266 Handle -Wc99-c11-compat.
5267 * c-parser.c (disable_extension_diagnostics): Handle
5268 warn_c99_c11_compat.
5269 (restore_extension_diagnostics): Likewise.
5270 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5271 instead of pedwarn, don't check flag_isoc11 before.
5272 (c_parser_declspecs): Likewise.
5273 (c_parser_alignas_specifier): Likewise.
5274 (c_parser_alignof_expression): Likewise.
5275 (c_parser_generic_selection): Likewise.
5276 * c-tree.h (pedwarn_c99): Update declaration.
5277 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5278 of pedwarn_c99.
5279
5280 2014-08-19 Marek Polacek <polacek@redhat.com>
5281
5282 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5283 to pedwarn_c90.
5284 * c-errors.c: Include "opts.h".
5285 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5286 * c-parser.c (disable_extension_diagnostics): Handle negative value
5287 of warn_c90_c99_compat, too.
5288 (restore_extension_diagnostics): Likewise.
5289 (c_parser_compound_statement_nostart): Pass
5290 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5291
5292 2014-08-12 Marek Polacek <polacek@redhat.com>
5293
5294 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5295 Add pedwarn.
5296 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5297 Likewise.
5298 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5299
5300 2014-08-10 Marek Polacek <polacek@redhat.com>
5301
5302 PR c/51849
5303 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5304 Call pedwarn_c90 instead of pedwarn.
5305 (check_bitfield_type_and_width): Likewise.
5306 (declspecs_add_qual): Likewise.
5307 (declspecs_add_type): Likewise.
5308 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5309 Adjust to only call pedwarn_c90.
5310 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5311 pedwarn_c90 instead of pedwarn.
5312 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5313 * c-parser.c (disable_extension_diagnostics): Handle
5314 warn_c90_c99_compat.
5315 (restore_extension_diagnostics): Likewise.
5316 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5317 pedwarn_c90 instead of pedwarn.
5318 (c_parser_initelt): Likewise.
5319 (c_parser_postfix_expression): Likewise.
5320 (c_parser_postfix_expression_after_paren_type): Likewise.
5321 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5322 * c-tree.h: Fix formatting.
5323 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5324 pedwarn_c90 instead of pedwarn.
5325
5326 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5327
5328 * c-typeck.c: Remove include of pointer-set.h.
5329
5330 2014-08-07 Marek Polacek <polacek@redhat.com>
5331
5332 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5333
5334 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5335
5336 * c-typeck.c: Use hash_map instead of pointer_map.
5337
5338 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5339
5340 * c-decl.c: Use hash_set instead of pointer_set.
5341
5342 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5343
5344 PR middle-end/61455
5345 * c-array-notation.c (expand_array_notations): Handling
5346 of DECL_EXPR added.
5347
5348 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5349
5350 PR c++/60517
5351 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5352 a local variable.
5353
5354 2014-07-30 Tom Tromey <tromey@redhat.com>
5355
5356 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5357 field.
5358 (really_start_incremental_init, push_init_level): Initialize
5359 designator_depth.
5360 (pop_init_level): Set global designator_depth.
5361 (process_init_element): Check for designated_init attribute.
5362
5363 2014-07-20 Marek Polacek <polacek@redhat.com>
5364
5365 PR c/61852
5366 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5367 (implicitly_declare): Pass location to implicit_decl_warning.
5368
5369 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5370
5371 PR middle-end/61294
5372 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5373 If non-NULL, call c_parser_check_literal_zero.
5374 (c_parser_check_literal_zero): New function.
5375 (c_parser_postfix_expression_after_primary): Adjust
5376 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5377
5378 2014-07-06 Marek Polacek <polacek@redhat.com>
5379
5380 PR c/6940
5381 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5382 * c-tree.h (C_ARRAY_PARAMETER): Define.
5383 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5384 function parameter.
5385
5386 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
5387 Chen Gang <gang.chen.5i5j@gmail.com>
5388
5389 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5390 releasing symbol.
5391
5392 2014-07-01 Marek Polacek <polacek@redhat.com>
5393
5394 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5395 instead of 0 to WARN_FOR_ASSIGNMENT.
5396
5397 2014-07-01 Marek Polacek <polacek@redhat.com>
5398
5399 PR c/58286
5400 * c-typeck.c (convert_for_assignment): Pass
5401 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5402
5403 2014-06-30 Marek Polacek <polacek@redhat.com>
5404
5405 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5406 has no_sanitize_undefined attribute.
5407
5408 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5409
5410 PR middle-end/57541
5411 * c-array-notation.c (fix_builtin_array_notation_fn):
5412 Check for 0 arguments in builtin call. Check that bultin argument is
5413 correct.
5414 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5415 index.
5416
5417 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5418
5419 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5420 qualifiers in __auto_type for atomic types.
5421 (c_parser_typeof_specifier): Discard all type qualifiers in
5422 __typeof__ for atomic types.
5423
5424 2014-06-25 Marek Polacek <polacek@redhat.com>
5425
5426 PR c/61162
5427 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5428 the return expression to c_finish_return.
5429
5430 2014-06-25 Jakub Jelinek <jakub@redhat.com>
5431
5432 * c-typeck.c (c_finish_omp_clauses): Make sure
5433 OMP_CLAUSE_LINEAR_STEP has correct type.
5434
5435 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5436
5437 * c-decl.c: Adjust.
5438
5439 2014-06-24 Jakub Jelinek <jakub@redhat.com>
5440
5441 * c-parser.c (c_parser_omp_for_loop): For
5442 #pragma omp parallel for simd move lastprivate clause from parallel
5443 to for rather than simd.
5444
5445 2014-06-23 Marek Polacek <polacek@redhat.com>
5446
5447 * c-typeck.c (parser_build_binary_op): Don't call
5448 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5449
5450 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
5451
5452 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5453 * c-decl.c (merge_decls): Likewise.
5454
5455 2014-06-09 Marek Polacek <polacek@redhat.com>
5456
5457 PR c/36446
5458 * c-typeck.c (error_init): Call inform instead of error_at.
5459 (pedwarn_init): Call inform instead of pedwarn.
5460 (warning_init): Call inform instead of warning_at.
5461
5462 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
5463
5464 * c-decl.c (merge_decls): Use set_decl_section_name.
5465 (duplicate_decls): Remove node if it exists.
5466
5467 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5468
5469 PR c/53119
5470 * c-typeck.c (push_init_level, process_init_element,
5471 pop_init_level): Correct check for zero initialization, move
5472 missing brace warning to respect zero initialization.
5473
5474 2014-06-05 Marek Polacek <polacek@redhat.com>
5475
5476 PR c/56724
5477 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5478
5479 2014-06-05 Marek Polacek <polacek@redhat.com>
5480
5481 PR c/49706
5482 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
5483 on the left hand side operand of a comparison.
5484
5485 2014-06-05 Marek Polacek <polacek@redhat.com>
5486
5487 PR c/48062
5488 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5489 Print note only if the warning was printed.
5490
5491 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5492
5493 PR c/58942
5494 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5495 with a pointer.
5496
5497 2014-06-03 Marek Polacek <polacek@redhat.com>
5498
5499 PR c/60439
5500 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5501 c_start_case.
5502 * c-tree.h (c_start_case): Update.
5503 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5504 switch condition has boolean value.
5505
5506 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
5507
5508 * c-decl.c: Include builtins.h.
5509 * c-parser.c: Likewise.
5510
5511 2014-05-27 Marek Polacek <polacek@redhat.com>
5512
5513 PR c/56724
5514 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5515 error and warning calls to error_at and warning_at. Pass location of
5516 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5517 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5518 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5519
5520 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5521
5522 PR c/61191
5523 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5524 function parameters.
5525
5526 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
5527
5528 * c-decl.c (merge_decls): Preserve symtab node pointers.
5529 (duplicate_decls): Free new decl.
5530
5531 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5532
5533 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5534 initialization.
5535
5536 * c-parser.c (c_parser_omp_target): Return bool values.
5537
5538 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5539
5540 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5541 num_teams_loc variable to num_thread_limit_loc.
5542
5543 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5544
5545 * c-array-notation.c (expand_array_notations): Use void_node
5546 instead of void_zero_node.
5547
5548 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5549
5550 * c-decl.c (finish_struct): Adjust.
5551 (finish_enum): Likewise.
5552 (bind): Adjust.
5553 (record_inline_static): Likewise.
5554 (push_scope): Likewise.
5555 (make_label): Likewise.
5556 (lookup_label_for_goto): Likewise.
5557 (finish_struct): Likewise.
5558 (finish_enum): Likewise.
5559 (store_parm_decls): Likewise.
5560 (c_push_function_context): Likewise.
5561 * c-lang.h: Remove usage of variable_size gty attribute.
5562 * c-parser.c (c_parse_init): Adjust.
5563 (c_parse_file): Likewise.
5564
5565 2014-05-13 Marek Polacek <polacek@redhat.com>
5566
5567 PR c/61162
5568 * c-typeck.c (convert_for_assignment): Pass location to
5569 WARN_FOR_ASSIGNMENT instead of input_location.
5570
5571 2014-05-10 Marek Polacek <polacek@redhat.com>
5572
5573 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5574 maybe_warn_string_init.
5575 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5576 maybe_warn_string_init.
5577 * c-tree.h (maybe_warn_string_init): Update declaration.
5578 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5579 Call pedwarn_init with loc instead of with input_location.
5580 (digest_init): Pass init_loc to maybe_warn_string_init.
5581 (pop_init_level): Call pedwarn_init with loc instead of with
5582 input_location.
5583 (set_init_index): Likewise.
5584 (process_init_element): Likewise.
5585
5586 2014-05-09 Marek Polacek <polacek@redhat.com>
5587
5588 PR c/61096
5589 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5590 (c_parser_initelt): Pass location to set_init_label. Pass array index
5591 location to set_init_index.
5592 * c-tree.h (push_init_level): Update declaration.
5593 (pop_init_level): Likewise.
5594 (set_init_index): Likewise.
5595 (set_init_label): Likewise.
5596 * c-typeck.c (error_init): Add location parameter. Call error_at
5597 instead of error.
5598 (digest_init): Pass init_loc to error_init.
5599 (really_start_incremental_init):
5600 (push_init_level): Add location parameter. Pass loc to pop_init_level
5601 and error_init.
5602 (pop_init_level): Likewise.
5603 (set_designator): Add location parameter. Pass loc to pop_init_level,
5604 push_init_level, and error_init.
5605 (set_init_index): Add location parameter. Pass loc to error_init and
5606 set_designator.
5607 (set_init_label): Likewise.
5608 (output_init_element): Pass loc to error_init.
5609 (process_init_element): Pass loc to error_init, pop_init_level,
5610 pedwarn_init, and push_init_level.
5611
5612 2014-05-09 Marek Polacek <polacek@redhat.com>
5613
5614 PR c/50459
5615 * c-parser.c (c_parser_attributes): Parse the arguments as an
5616 expression-list if the attribute takes identifier.
5617
5618 2014-05-08 Marek Polacek <polacek@redhat.com>
5619
5620 PR c/61053
5621 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5622 TYPE_ALIGN_UNIT.
5623
5624 2014-05-08 Marek Polacek <polacek@redhat.com>
5625
5626 PR c/61077
5627 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5628 of main.
5629
5630 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5631 Mike Stump <mikestump@comcast.net>
5632 Richard Sandiford <rdsandiford@googlemail.com>
5633
5634 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5635 (finish_enum): Use wide-int interfaces.
5636 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5637 * c-typeck.c (build_c_cast): Likewise.
5638 (set_nonincremental_init_from_string): Likewise.
5639 (c_tree_equal): Likewise.
5640
5641 2014-05-02 Marek Polacek <polacek@redhat.com>
5642
5643 PR c/25801
5644 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5645 Return size_one_node when the type is not complete.
5646 (pointer_diff): Remove comment.
5647 (build_unary_op): Improve error messages.
5648
5649 2014-05-02 Marek Polacek <polacek@redhat.com>
5650
5651 * c-typeck.c (c_finish_return): Separate warning_at calls.
5652
5653 2014-05-02 Marek Polacek <polacek@redhat.com>
5654
5655 * c-tree.h (error_init): Remove declaration.
5656 (pedwarn_init): Likewise.
5657 * c-typeck.c (error_init): Make static and move above.
5658 (pedwarn_init): Likewise.
5659 (warning_init): Move above.
5660 (maybe_warn_string_init): Likewise.
5661
5662 2014-05-01 Jeff Law <law@redhat.com>
5663
5664 Revert:
5665
5666 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5667 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5668 avoid goto.
5669
5670 2014-05-02 Marek Polacek <polacek@redhat.com>
5671
5672 PR c/60784
5673 * c-typeck.c (push_init_level): Set constructor_designated to
5674 p->designated for structures.
5675
5676 2014-05-01 Marek Polacek <polacek@redhat.com>
5677
5678 PR c/60915
5679 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5680 function-definition has an attribute after the declarator.
5681
5682 2014-05-01 Marek Polacek <polacek@redhat.com>
5683
5684 PR c/60257
5685 * c-typeck.c (warning_init): Add location_t parameter. Call
5686 warning_at instead of warning.
5687 (push_init_level): Pass input_location to warning_init.
5688 (add_pending_init): Add location_t parameter. Pass loc to
5689 warning_init.
5690 (set_nonincremental_init): Pass input_location to add_pending_init.
5691 (set_nonincremental_init_from_string): Likewise.
5692 (output_init_element): Pass loc to warning_init and to
5693 add_pending_init.
5694
5695 2014-05-01 Marek Polacek <polacek@redhat.com>
5696
5697 PR c/43395
5698 * c-typeck.c (c_finish_return): Distinguish between label and variable
5699 when warning about returning local address.
5700
5701 2014-05-01 Marek Polacek <polacek@redhat.com>
5702
5703 PR c/29467
5704 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5705 in C89 mode.
5706
5707 2014-05-01 Marek Polacek <polacek@redhat.com>
5708
5709 PR c/43245
5710 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5711 instead of 0 to WARN_FOR_QUALIFIERS.
5712
5713 2014-05-01 Marek Polacek <polacek@redhat.com>
5714
5715 PR c/56989
5716 * c-typeck.c (default_conversion): Use better location for
5717 error call.
5718
5719 2014-04-30 Marek Polacek <polacek@redhat.com>
5720
5721 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5722 also when SANITIZE_FLOAT_DIVIDE is on.
5723
5724 2014-04-30 Marek Polacek <polacek@redhat.com>
5725
5726 PR c/60139
5727 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5728 and pedwarn_init. Use loc insted of input_location.
5729
5730 2014-04-30 Marek Polacek <polacek@redhat.com>
5731
5732 PR c/60351
5733 * c-typeck.c (build_binary_op): Use location when warning about
5734 shift count.
5735
5736 2014-04-25 Marek Polacek <polacek@redhat.com>
5737
5738 PR c/18079
5739 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5740 always_inline/noinline and hot/cold attributes.
5741
5742 2014-04-25 Marek Polacek <polacek@redhat.com>
5743
5744 PR c/60114
5745 * c-parser.c (c_parser_initelt): Pass input_location to
5746 process_init_element.
5747 (c_parser_initval): Pass loc to process_init_element.
5748 * c-tree.h (process_init_element): Adjust declaration.
5749 * c-typeck.c (push_init_level): Pass input_location to
5750 process_init_element.
5751 (pop_init_level): Likewise.
5752 (set_designator): Likewise.
5753 (output_init_element): Add location_t parameter. Pass loc to
5754 digest_init.
5755 (output_pending_init_elements): Pass input_location to
5756 output_init_element.
5757 (process_init_element): Add location_t parameter. Pass loc to
5758 output_init_element.
5759
5760 2014-04-24 Jakub Jelinek <jakub@redhat.com>
5761
5762 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5763 atomic-clause, allow comma in between atomic-clause and
5764 seq_cst.
5765
5766 2014-04-22 Jakub Jelinek <jakub@redhat.com>
5767
5768 PR c/59073
5769 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5770 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5771
5772 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5773
5774 PR middle-end/60469
5775 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5776 create_tmp_var instead build_decl for creating temps.
5777 (build_array_notation_expr): Likewise.
5778 (fix_conditional_array_notations_1): Likewise.
5779 (fix_array_notation_expr): Likewise.
5780 (fix_array_notation_call_expr): Likewise.
5781
5782 2014-03-28 Jakub Jelinek <jakub@redhat.com>
5783
5784 PR c++/60689
5785 * c-tree.h (c_build_function_call_vec): New prototype.
5786 * c-typeck.c (build_function_call_vec): Don't call
5787 resolve_overloaded_builtin here.
5788 (c_build_function_call_vec): New wrapper function around
5789 build_function_call_vec. Call resolve_overloaded_builtin here.
5790 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5791 Call c_build_function_call_vec instead of build_function_call_vec.
5792 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5793 * c-decl.c (finish_decl): Likewise.
5794
5795 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5796
5797 PR c/55383
5798 * c-typeck.c: Use correct format string in cast-qual warning
5799
5800 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5801
5802 * c-decl.c (c_decl_attributes): Use
5803 lang_hooks.types.omp_mappable_type.
5804 * c-typeck.c (c_finish_omp_clauses): Likewise.
5805
5806 2014-03-06 Marek Polacek <polacek@redhat.com>
5807
5808 PR c/60197
5809 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5810 of checking tree code.
5811
5812 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5813
5814 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5815 (c_parser_parameter_declaration): Likewise.
5816
5817 2014-02-19 Marek Polacek <polacek@redhat.com>
5818
5819 PR c/60195
5820 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5821 Call mark_exp_read on exp.value.
5822 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5823 TREE_ADDRESSABLE on old instead of val.
5824 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5825
5826 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5827
5828 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5829 C_EXPR_APPEND by vec_safe_push.
5830 * c-tree.h (C_EXPR_APPEND): Remove.
5831
5832 2014-01-31 Marek Polacek <polacek@redhat.com>
5833
5834 PR c/59963
5835 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5836 build_function_call_vec.
5837 (build_function_call): Likewise.
5838 (build_atomic_assign): Likewise.
5839 (build_function_call_vec): Add arg_loc parameter. Use it.
5840 (convert_arguments): Likewise.
5841 (convert_for_assignment): Rename rhs_loc to expr_loc.
5842 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5843 (c_parser_objc_keywordexpr): Likewise.
5844 (c_parser_postfix_expression_after_primary): Call
5845 build_function_call_vec with expr_loc rather than op_loc.
5846 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5847 build_function_call_vec.
5848 (c_parser_expr_list): Add locations parameter. Fill it with locations
5849 of function arguments.
5850 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5851
5852 2014-01-30 Marek Polacek <polacek@redhat.com>
5853
5854 PR c/59940
5855 * c-typeck.c (build_function_call_vec): Use loc parameter.
5856 (convert_arguments): Add location parameter. Use it.
5857 (ep_convert_and_check): Likewise.
5858 (build_atomic_assign): Adjust convert_for_assignment call.
5859 (build_modify_expr): Likewise.
5860 (digest_init): Likewise.
5861 (c_finish_return): Likewise.
5862 (build_conditional_expr): Adjust ep_convert_and_check calls.
5863 (convert_for_assignment): Add rhs_loc parameter. Use it.
5864 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5865 calls.
5866
5867 2014-01-30 Richard Biener <rguenther@suse.de>
5868
5869 PR c/59905
5870 * c-typeck.c (build_function_call_vec): Do not replace calls
5871 to a function via an incompatible type with a runtime abort.
5872
5873 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5874
5875 * c-parser.c (c_parser_declaration_or_fndef): Replaced
5876 flag_enable_cilkplus with flag_cilkplus.
5877 (c_parser_direct_declarator_inner): Likewise.
5878 (c_parser_attribute_any_word): Likewise.
5879 (c_parser_attributes): Likewise.
5880 (c_parser_compound_statement): Likewise.
5881 (c_parser_statement_after_labels): Likewise.
5882 (c_parser_if_statement): Likewise.
5883 (c_parser_switch_statement): Likewise.
5884 (c_parser_do_statement): Likewise.
5885 (c_parser_for_statement): Likewise.
5886 (c_parser_unary_expression): Likewise.
5887 (c_parser_postfix_expression): Likewise.
5888 (c_parser_postfix_expression_after_primary): Likewise.
5889 (c_parser_postfix_expression_after_primary): Likewise.
5890 (c_parser_omp_clause_name): Likewise.
5891 (c_finish_omp_declare_simd): Likewise.
5892 (c_parser_cilk_verify_simd): Likewise.
5893 * c-typeck.c (build_array_ref): Likewise.
5894 (build_function_call_vec): Likewise.
5895 (convert_arguments): Likewise.
5896 (build_compound_expr): Likewise.
5897 (c_finish_return): Likewise.
5898 (c_finish_if_stmt): Likewise.
5899 (c_finish_loop): Likewise.
5900 (build_binary_op): Likewise.
5901
5902 2014-01-23 Marek Polacek <polacek@redhat.com>
5903
5904 PR c/59846
5905 * c-typeck.c (parser_build_binary_op): Use location instead of
5906 input_location.
5907 (build_binary_op): Pass location to shorten_compare.
5908
5909 2014-01-23 Marek Polacek <polacek@redhat.com>
5910
5911 PR c/58346
5912 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
5913 an empty aggregate.
5914
5915 2014-01-23 Marek Polacek <polacek@redhat.com>
5916
5917 PR c/59871
5918 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
5919 of a comma expression.
5920 (emit_side_effect_warnings): Likewise.
5921
5922 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5923
5924 PR c/59825
5925 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
5926 function to use walk_tree and moved a lot of its functionality to
5927 expand_array_notations.
5928 (expand_array_notations): New function.
5929
5930 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
5931
5932 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
5933 attribute an attribute without value.
5934
5935 2014-01-23 Jakub Jelinek <jakub@redhat.com>
5936
5937 PR middle-end/58809
5938 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
5939 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
5940
5941 2014-01-22 Marek Polacek <polacek@redhat.com>
5942
5943 PR c/59891
5944 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
5945 of remove_c_maybe_const_expr on op1 and op2.
5946
5947 2014-01-15 Jakub Jelinek <jakub@redhat.com>
5948
5949 PR c/58943
5950 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
5951 effects, preevaluate rhs using SAVE_EXPR first.
5952
5953 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
5954
5955 PR c++/59631
5956 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
5957 statements with if-elseif statements.
5958
5959 2014-01-06 Marek Polacek <polacek@redhat.com>
5960
5961 PR c/57773
5962 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
5963 defined bit-field types only in ISO C.
5964
5965 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5966
5967 Update copyright years
5968
5969 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5970
5971 * c-array-notation.c: Use the standard form for the copyright notice.
5972
5973 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5974
5975 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
5976 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
5977 field in parser is not empty. If not-empty, call the function
5978 c_parser_finish_omp_declare_simd.
5979 (c_parser_cilk_clause_vectorlength): Modified function to be shared
5980 between SIMD-enabled functions and #pragma simd. Added new parameter.
5981 (c_parser_cilk_all_clauses): Modified the usage of the function
5982 c_parser_cilk_clause_vectorlength as mentioned above.
5983 (c_parser_cilk_simd_fn_vector_attrs): New function.
5984 (c_finish_cilk_simd_fn_tokens): Likewise.
5985 (is_cilkplus_vector_p): Likewise.
5986 (c_parser_omp_clause_name): Added checking for "vectorlength,"
5987 "nomask," and "mask" strings in clause name.
5988 (c_parser_omp_all_clauses): Added 3 new case statements:
5989 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
5990 PRAGMA_CILK_CLAUSE_NOMASK.
5991 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
5992 check for vector attribute and if so call the function
5993 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
5994 called the function c_finish_cilk_simd_fn_tokens.
5995 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
5996 parser field is non-empty. If so, parse them as you would parse
5997 the omp declare simd pragma.
5998 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
5999 Added a check when step is a parameter and flag it as error.
6000 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6001 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6002 pragma_omp_clause.
6003
6004 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6005
6006 * c-parser.c (c_parser_omp_parallel): Fix description.
6007
6008 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6009
6010 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6011 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6012 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6013 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6014
6015 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6016
6017 PR c/52023
6018 * c-parser.c (c_parser_alignas_specifier): Use
6019 c_sizeof_or_alignof_type instead of c_alignof.
6020 (c_parser_alignof_expression): Likewise, with min_alignof
6021 parameter depending on alignof spelling used.
6022
6023 2013-12-04 Marek Polacek <polacek@redhat.com>
6024
6025 PR c/54113
6026 * c-decl.c (start_function): Don't warn for missing prototype for
6027 inline functions.
6028
6029 2013-12-03 Marek Polacek <polacek@redhat.com>
6030
6031 PR c/59351
6032 * c-decl.c (build_compound_literal): Allow compound literals with
6033 empty initial value.
6034
6035 2013-12-02 Joseph Myers <joseph@codesourcery.com>
6036
6037 PR c/58235
6038 * c-typeck.c (build_modify_expr): Diagnose assignment to
6039 expression with array type.
6040
6041 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6042
6043 PR c/42262
6044 * c-typeck.c (process_init_element): Do not treat a string as
6045 initializing a whole array when used with a designator for an
6046 individual element.
6047
6048 2013-11-29 Joseph Myers <joseph@codesourcery.com>
6049
6050 PR c/57574
6051 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6052 an inline function following a static declaration.
6053
6054 2013-11-28 Jakub Jelinek <jakub@redhat.com>
6055
6056 PR c/59310
6057 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6058 to p_name before calling c_parser_omp_teams instead of after.
6059 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6060 argument. Remove unused p_name variable.
6061
6062 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
6063 Jakub Jelinek <jakub@redhat.com>
6064
6065 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6066 external_scope is NULL.
6067
6068 2013-11-27 Tom de Vries <tom@codesourcery.com>
6069 Marc Glisse <marc.glisse@inria.fr>
6070
6071 PR c++/59032
6072 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6073
6074 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6075
6076 * c-typeck.c: Add required include files from gimple.h.
6077
6078 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6079
6080 * c-decl.c (define_label, shadow_tag_warned)
6081 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6082 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6083 (declspecs_add_type): Remove use of in_system_header macro.
6084 * c-parser.c (c_parser_unary_expression): Likewise.
6085 * c-typeck.c (store_init_value, process_init_element)
6086 (c_start_case): Likewise.
6087
6088 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6089 macro.
6090
6091 * c-parser.c (c_parser_set_source_position_from_token): Remove
6092 reference to in_system_header from comment.
6093
6094 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6095
6096 * c-decl.c (grokdeclarator): Update comment to refer to
6097 tree_to_[su]hwi rather than tree_low_cst.
6098
6099 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6100
6101 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6102 tree_to_uhwi throughout.
6103
6104 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6105
6106 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6107 throughout.
6108
6109 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6110
6111 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6112 throughout.
6113
6114 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6115
6116 * c-parser.c (c_parser_cilk_simd): New.
6117 (c_parser_cilk_verify_simd): New.
6118 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6119 (c_parser_omp_for_loop): Add case for NE_EXPR.
6120 Set c_break_label for CILK_SIMD.
6121 (c_parser_cilk_clause_vectorlength): New.
6122 (c_parser_cilk_clause_linear): New.
6123 (c_parser_cilk_clause_name): New.
6124 (c_parser_cilk_all_clauses): New.
6125 * c-typeck.c (build_unary_op): Pass location argument to
6126 readonly_error.
6127 (build_modify_expr): Same.
6128 (build_asm_expr): Same.
6129 (c_finish_bc_stmt): Error on break/continue in loops.
6130
6131 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6132
6133 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6134
6135 2013-11-14 Diego Novillo <dnovillo@google.com>
6136
6137 * c-decl.c: Include print-tree.h.
6138 Include stor-layout.h.
6139 Include varasm.h.
6140 Include attribs.h.
6141 Include stringpool.h.
6142 * c-lang.c: Include fold-const.h.
6143 * c-parser.c: Include stringpool.h.
6144 Include attribs.h.
6145 Include stor-layout.h.
6146 Include varasm.h.
6147 Include trans-mem.h.
6148 * c-typeck.c: Include stor-layout.h.
6149 Include trans-mem.h.
6150 Include varasm.h.
6151 Include stmt.h.
6152
6153 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6154
6155 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6156 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6157 __auto_type.
6158 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6159 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6160 RID_AUTO_TYPE.
6161 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6162 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6163 (c_parser_declarator, c_parser_direct_declarator_inner)
6164 (c_parser_parameter_declaration, c_parser_type_name): All callers
6165 changed.
6166 (c_parser_declaration_or_fndef): Handle declarations with type
6167 determined from the initializer.
6168
6169 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6170
6171 * c-typeck.c: Include gimplify.h.
6172
6173 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6174
6175 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6176 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6177 comment.
6178 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6179 or _Thread_local as appropriate in diagnostics.
6180 (build_null_declspecs): Initialize ret->thread_gnu_p.
6181 (declspecs_add_scspec): Handle either __thread or _Thread_local
6182 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6183 pedantic. Do not disallow _Thread_local extern and _Thread_local
6184 static.
6185
6186 2013-11-07 Joseph Myers <joseph@codesourcery.com>
6187 Andrew MacLeod <amacleod@redhat.com>
6188
6189 * c-aux-info.c (gen_type): Handle atomic qualifier.
6190 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6191 qualifiers when compating types.
6192 (shadow_tag_warned): Handle atomic_p in declspecs.
6193 (quals_from_declspecs): Likewise.
6194 (start_decl): Use c_type_promotes_to when promoting argument
6195 types.
6196 (grokdeclarator): Handle _Atomic.
6197 (get_parm_info): Diagnose any qualifier on "void" as only
6198 parameter.
6199 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6200 comparing types. Use c_type_promotes_to when promoting argument
6201 types.
6202 (finish_function): Use c_type_promotes_to when promoting argument
6203 types.
6204 (build_null_declspecs): Handle atomic_p in declspecs.
6205 (declspecs_add_qual): Handle RID_ATOMIC.
6206 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6207 (c_token_starts_declspecs): Handle RID_ATOMIC.
6208 (c_parser_declspecs): Handle atomic type specifiers and
6209 qualifiers.
6210 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6211 from types of expressions with atomic type.
6212 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6213 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6214 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6215 (c_parser_statement_after_labels, c_parser_switch_statement)
6216 (c_parser_for_statement, c_parser_expr_no_commas)
6217 (c_parser_conditional_expression, c_parser_binary_expression)
6218 (c_parser_cast_expression, c_parser_unary_expression)
6219 (c_parser_postfix_expression)
6220 (c_parser_postfix_expression_after_primary, c_parser_expression):
6221 Use convert_lvalue_to_rvalue.
6222 (c_parser_expression_conv, c_parser_expr_list): Document
6223 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6224 (c_parser_objc_synchronized_statement): Use
6225 convert_lvalue_to_rvalue.
6226 (c_parser_objc_selector): Handle RID_ATOMIC.
6227 (c_parser_objc_receiver, c_parser_array_notation): Use
6228 convert_lvalue_to_rvalue.
6229 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6230 _Atomic (type-name).
6231 (struct c_declspecs): Add atomic_p field.
6232 (convert_lvalue_to_rvalue): Declare.
6233 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6234 corresponding atomic types.
6235 (qualify_type): Don't add _Atomic qualifiers from second argument.
6236 (comp_target_types): Do not allow _Atomic mismatches.
6237 (type_lists_compatible_p): Do not remove atomic qualifiers when
6238 comparing types.
6239 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6240 (build_atomic_assign): New functions.
6241 (build_unary_op): Use build_atomic_assign for atomic increment and
6242 decrement.
6243 (build_conditional_expr): Do not treat _Atomic void as a qualified
6244 version of void.
6245 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6246 (find_anonymous_field_with_type, convert_to_anonymous_field)
6247 (convert_for_assignment): Do not remove atomic qualifiers when
6248 comparing types.
6249 (digest_init): Do not accept initialization of arrays of atomic
6250 elements by string constants.
6251 (build_asm_expr): Use convert_lvalue_to_rvalue.
6252 (build_binary_op): Do not treat _Atomic void as a qualified
6253 version of void.
6254
6255 2013-11-06 DJ Delorie <dj@redhat.com>
6256
6257 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6258 both explicit and builtin, print the location of the explicit one.
6259
6260 2013-11-05 Tobias Burnus <burnus@net-b.de>
6261
6262 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6263 c_parser_omp_distribute, c_parser_omp_teams,
6264 c_parser_omp_target, c_parser_omp_declare): Handle
6265 -fopenmp-simd.
6266
6267 2013-11-03 Marek Polacek <polacek@redhat.com>
6268
6269 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6270
6271 2013-11-01 Jakub Jelinek <jakub@redhat.com>
6272
6273 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6274 check_dup_generic at the end, unless remove is true.
6275 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6276 remove = true;.
6277 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6278
6279 2013-10-31 Jakub Jelinek <jakub@redhat.com>
6280
6281 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6282 with decl that is not pointer nor array.
6283
6284 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6285
6286 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6287 a spawning function is found.
6288 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6289 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6290 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6291 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6292 case.
6293 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6294 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6295 expr.
6296 (c_finish_return): Added a check to reject _Cilk_spawn in return
6297 expression.
6298 (build_cilk_spawn): New function.
6299 (build_cilk_sync): Likewise.
6300 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
6301
6302 2013-10-27 Tobias Burnus <burnus@net-b.de>
6303
6304 PR other/33426
6305 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6306 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6307 (c_parser_statement_after_labels): Update calls.
6308
6309 2013-10-24 Tobias Burnus <burnus@net-b.de>
6310
6311 PR other/33426
6312 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6313 Handle PRAGMA_IVDEP.
6314 (c_parser_statement_after_labels): Update call.
6315
6316 2013-10-24 Marek Polacek <polacek@redhat.com>
6317
6318 * c-parser.c (c_parser_struct_declaration): Add a comment.
6319 (c_parser_declarator): Don't allow _Alignas here.
6320
6321 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
6322
6323 * c-parser.c: Include omp-low.h.
6324 * c-typeck.c: Likewise.
6325
6326 2013-10-17 Marek Polacek <polacek@redhat.com>
6327
6328 PR c/58267
6329 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6330 Document syntax of the array-declarator.
6331 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6332 are not permitted.
6333 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6334 (c_parser_struct_declaration): Likewise.
6335 (c_parser_declarator): Likewise.
6336 (c_parser_direct_declarator_inner): Likewise.
6337 (c_parser_parameter_declaration): Likewise.
6338 (c_parser_type_name): Likewise.
6339
6340 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6341
6342 * c-lang.h (current_omp_declare_target_attribute): New extern
6343 decl.
6344 * c-parser.c: Include c-lang.h.
6345 (struct c_parser): Change tokens to c_token *.
6346 Add tokens_buf field. Change tokens_avail type to unsigned int.
6347 (c_parser_consume_token): If parser->tokens isn't
6348 &parser->tokens_buf[0], increment parser->tokens.
6349 (c_parser_consume_pragma): Likewise.
6350 (enum pragma_context): Add pragma_struct and pragma_param.
6351 (c_parser_external_declaration): Adjust
6352 c_parser_declaration_or_fndef caller.
6353 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6354 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6355 Adjust recursive call.
6356 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6357 of pragma_external.
6358 (c_parser_parameter_declaration): Use pragma_param instead of
6359 pragma_external.
6360 (c_parser_compound_statement_nostart, c_parser_label,
6361 c_parser_for_statement): Adjust
6362 c_parser_declaration_or_fndef callers.
6363 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6364 it through to c_parser_conditional_expression.
6365 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6366 pass it through to c_parser_binary_expression. Adjust recursive
6367 call.
6368 (c_parser_binary_expression): Remove prec argument, add
6369 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6370 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6371 binop matches it, use build2 instead of parser_build_binary_op.
6372 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6373 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6374 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6375 Handle pragma_struct and pragma_param the same as pragma_external.
6376 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6377 (c_parser_omp_variable_list): Parse array sections for
6378 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6379 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6380 (c_parser_omp_clause_reduction): Handle user defined reductions.
6381 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6382 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6383 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6384 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6385 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6386 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6387 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6388 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6389 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6390 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6391 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6392 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6393 (c_parser_omp_for_loop): Add CODE argument, pass it through
6394 to c_finish_omp_for. Change last argument to cclauses,
6395 and adjust uses to grab parallel clauses from the array of all
6396 the split clauses. Adjust c_parser_binary_expression,
6397 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6398 (omp_split_clauses): New function.
6399 (c_parser_omp_simd): New function.
6400 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6401 Allow the function to be called also when parsing combined constructs,
6402 and call c_parser_omp_simd when parsing for simd.
6403 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6404 #pragma omp section, require exactly one structured-block instead of
6405 sequence of statements.
6406 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6407 Allow the function to be called also when parsing combined constructs.
6408 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6409 Allow the function to be called also when parsing combined
6410 constructs.
6411 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6412 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6413 c_parser_omp_teams, c_parser_omp_target_data,
6414 c_parser_omp_target_update, c_parser_omp_target,
6415 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6416 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6417 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6418 (c_parser_omp_construct): Add p_name and mask vars. Handle
6419 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6420 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6421 and c_parser_omp_sections callers.
6422 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6423 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6424 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6425 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6426 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6427 OMP_CLAUSE_DEPEND.
6428 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6429 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6430 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6431 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6432 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6433 * c-typeck.c: Include tree-inline.h.
6434 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6435 handle_omp_array_sections_1, handle_omp_array_sections,
6436 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6437 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6438 user defined reductions.
6439 (c_tree_equal): New function.
6440 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6441 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6442 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6443 c_check_omp_declare_reduction_r): New prototypes.
6444 * c-decl.c (current_omp_declare_target_attribute): New variable.
6445 (c_decl_attributes): New function.
6446 (start_decl, start_function): Use it instead of decl_attributes.
6447 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6448 c_omp_reduction_decl, c_omp_reduction_lookup,
6449 c_check_omp_declare_reduction_r): New functions.
6450
6451 2013-09-25 Tom Tromey <tromey@redhat.com>
6452
6453 * Make-lang.in (c/gccspec.o): Remove.
6454 (CFLAGS-c/gccspec.o): New variable.
6455 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6456 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6457 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6458
6459 2013-09-25 Tom Tromey <tromey@redhat.com>
6460
6461 * Make-lang.in (c/gccspec.o): Don't use subshell.
6462
6463 2013-09-18 Marek Polacek <polacek@redhat.com>
6464
6465 PR sanitize/58443
6466 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6467 Remove unnecessary check.
6468
6469 2013-09-18 Marek Polacek <polacek@redhat.com>
6470
6471 PR sanitizer/58411
6472 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6473 no_sanitize_undefined attribute.
6474
6475 2013-09-13 Kai Tietz <ktietz@redhat.com>
6476
6477 PR target/57848
6478 * c-decl.c (c_builtin_function_ext_scope): Remove
6479 wrong assumption that it is never called on prexisting
6480 symbol.
6481
6482 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6483
6484 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6485
6486 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6487
6488 * c-objc-common.c (c_tree_printer): Tidy.
6489
6490 2013-08-30 Marek Polacek <polacek@redhat.com>
6491
6492 * c-typeck.c (build_binary_op): Add division by zero and shift
6493 instrumentation.
6494
6495 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
6496 Joseph Myers <joseph@codesourcery.com>
6497
6498 PR c/35649
6499 * c-typeck.c (c_common_type): Prefer double_type_node over
6500 other REAL_TYPE types with the same precision.
6501 (convert_arguments): Likewise.
6502
6503 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6504
6505 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6506 (c_initialize_diagnostics): Call a destructor for the early printer.
6507
6508 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6509
6510 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6511 printer initialization.
6512
6513 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
6514
6515 PR c/57490
6516 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6517 check for truth values.
6518 (expand_array_notation_exprs): Added truth values case. Removed an
6519 unwanted else. Added for-loop to walk through subtrees in default
6520 case.
6521
6522 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6523
6524 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6525
6526 2013-07-23 Joseph Myers <joseph@codesourcery.com>
6527
6528 * c-parser.c (struct c_generic_association): Fix typo.
6529
6530 2013-07-23 Tom Tromey <tromey@redhat.com>
6531 Joseph Myers <joseph@codesourcery.com>
6532
6533 * c-parser.c (struct c_generic_association): New.
6534 (c_generic_association_d): New typedef.
6535 (c_parser_generic_selection): New function.
6536 (c_parser_postfix_expression): Handle RID_GENERIC.
6537
6538 2013-07-13 Jason Merrill <jason@redhat.com>
6539
6540 PR c++/57793
6541 * c-decl.c (finish_struct): Check for too-large class.
6542
6543 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
6544
6545 PR c/57821
6546 * c-typeck.c (set_init_index): When folding, check for index overflow.
6547
6548 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6549
6550 * c-parser.c (c_parser_array_notation): Removed rejection of array
6551 notations in an array of function pointers.
6552
6553 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6554
6555 * c-array-notation.c (make_triplet_val_inv): New function.
6556 (create_cmp_incr): Likewise.
6557 (create_array_refs): Likewise.
6558 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6559 Also modularized common parts between functions and called the function.
6560 (build_array_notation_expr): Likewise.
6561 (fix_conditional_array_notations_1): Likewise.
6562 (fix_array_notation_expr): Likewise.
6563 (fix_array_notation_call_expr): Likewise.
6564
6565 2013-06-18 Marek Polacek <polacek@redhat.com>
6566
6567 PR c/57630
6568 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6569
6570 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6571
6572 * c-array-notation.c (build_array_notation_expr): Reject array notation
6573 mismatch between LHS and RHS even inside a call_expr. Also, removed
6574 a couple while statements that were dead code.
6575
6576 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6577
6578 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6579 excessive precision expressions in function parameters. Also removed
6580 couple unwanted while statements.
6581
6582 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6583
6584 * c-array-notation.c (expand_array_notation_exprs): Added
6585 ARRAY_NOTATION_REF case.
6586
6587 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6588
6589 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6590 function to c-family/array-notation-common.c.
6591 (is_cilkplus_reduce_builtin): Likewise.
6592 (find_rank): Likewise.
6593 (extract_array_notation_exprs): Likewise.
6594 (replace_array_notations): Likewise.
6595 (find_inv_trees): Likewise.
6596 (replace_inv_trees): Likewise.
6597 (contains_array_notation_expr): Likewise.
6598 (find_correct_array_notation_type): Likewise.
6599 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6600 (struct inv_list): Moved this to c-family/array-notation-common.c.
6601 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
6602
6603 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6604
6605 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6606 reduction functions outside the for-loop. Added a check if the fundecl
6607 is non-NULL. Finally, removed an unwanted if-statement, and made the
6608 body unconditional.
6609
6610 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6611
6612 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6613 condition of the if-statement matches the rank of else-block and then-
6614 block when array notations are used.
6615 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6616 expression after the entire function body is parsed.
6617 (c_parser_expr_no_commas): Delayed creating array notation expressions
6618 to the end of function parsing.
6619 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6620 whole if-statement instead of just the condition.
6621 (expand_array_notation_exprs): Added MODIFY_EXPR case.
6622
6623 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6624
6625 PR c/57474
6626 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6627 array to NULL_TREE if they are unused. Also added a check for the
6628 field to be NULL before its fields are used in future.
6629
6630 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6631
6632 PR bootstrap/57450
6633 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6634 (build_array_notation_expr): Likewise.
6635
6636 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6637
6638 * c-typeck.c (build_array_ref): Added a check to see if array's
6639 index is greater than one. If true, then emit an error.
6640 (build_function_call_vec): Exclude error reporting and checking
6641 for builtin array-notation functions.
6642 (convert_arguments): Likewise.
6643 (c_finish_return): Added a check for array notations as a return
6644 expression. If true, then emit an error.
6645 (c_finish_loop): Added a check for array notations in a loop
6646 condition. If true then emit an error.
6647 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6648 (build_binary_op): Added a check for array notation expr inside
6649 op1 and op0. If present, we call another function to find correct
6650 type.
6651 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6652 * c-parser.c (c_parser_compound_statement): Check if array
6653 notation code is used in tree, if so, then transform them into
6654 appropriate C code.
6655 (c_parser_expr_no_commas): Check if array notation is used in LHS
6656 or RHS, if so, then build array notation expression instead of
6657 regular modify.
6658 (c_parser_postfix_expression_after_primary): Added a check for
6659 colon(s) after square braces, if so then handle it like an array
6660 notation. Also, break up array notations in unary op if found.
6661 (c_parser_direct_declarator_inner): Added a check for array
6662 notation.
6663 (c_parser_compound_statement): Added a check for array notation in
6664 a stmt. If one is present, then expand array notation expr.
6665 (c_parser_if_statement): Likewise.
6666 (c_parser_switch_statement): Added a check for array notations in
6667 a switch statement's condition. If true, then output an error.
6668 (c_parser_while_statement): Similarly, but for a while.
6669 (c_parser_do_statement): Similarly, but for a do-while.
6670 (c_parser_for_statement): Similarly, but for a for-loop.
6671 (c_parser_unary_expression): Check if array notation is used in a
6672 pre-increment or pre-decrement expression. If true, then expand
6673 them.
6674 (c_parser_array_notation): New function.
6675 * c-array-notation.c: New file.
6676 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
6677
6678 2013-05-23 Mike Stump <mikestump@comcast.net>
6679
6680 * c-typeck.c (convert_for_assignment): Handle references to memory
6681 spaces better.
6682
6683 2013-05-16 Jason Merrill <jason@redhat.com>
6684
6685 * Make-lang.in (cc1$(exeext)): Use link mutex.
6686
6687 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6688
6689 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6690 to simply use OPT_Wpointer_arith.
6691 (build_unary_op): Likewise.
6692
6693 2013-04-03 Jakub Jelinek <jakub@redhat.com>
6694
6695 PR c/19449
6696 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6697 argument. If set, or it temporarily for parsing of the first
6698 argument into force_folding_builtin_constant_p.
6699 (c_parser_postfix_expression): Adjust callers.
6700
6701 2013-03-21 Richard Biener <rguenther@suse.de>
6702
6703 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6704 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6705
6706 2013-02-12 Marek Polacek <polacek@redhat.com>
6707
6708 PR c/44938
6709 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6710 origtypes to NULL.
6711
6712 2013-01-24 Jakub Jelinek <jakub@redhat.com>
6713
6714 PR c/56078
6715 * c-typeck.c (set_nonincremental_init_from_string): If
6716 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6717 returned false.
6718 (process_init_element): Likewise.
6719
6720 2012-12-20 Jakub Jelinek <jakub@redhat.com>
6721
6722 PR c++/55619
6723 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6724 argument, don't call default_function_array_conversion
6725 nor c_fully_fold here.
6726 (c_parser_asm_statement): Adjust callers.
6727 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6728 and outputs here, and call default_function_array_conversion
6729 on inputs that don't need to be addressable.
6730
6731 2012-12-18 Jakub Jelinek <jakub@redhat.com>
6732
6733 PR c/39464
6734 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6735 warning require that both c_common_unsigned_type as well as
6736 c_common_signed_type is the same for both mvl and mvr types.
6737
6738 2012-11-16 Diego Novillo <dnovillo@google.com>
6739
6740 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6741
6742 * c-common.c: Use new vec API in vec.h.
6743 * c-common.h: Likewise.
6744 * c-gimplify.c: Likewise.
6745 * c-pragma.c: Likewise.
6746 * c-pretty-print.c: Likewise.
6747 * c-pretty-print.h: Likewise.
6748 * c-semantics.c: Likewise.
6749 * c-decl.c: Likewise.
6750 * c-parser.c: Likewise.
6751 * c-tree.h: Likewise.
6752 * c-typeck.c: Likewise.
6753
6754 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6755
6756 PR c++/54930
6757 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6758
6759 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6760
6761 PR c/53066
6762 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6763 shadows a function, unless the variable is a function or a
6764 pointer-to-function.
6765
6766 2012-10-12 Jakub Jelinek <jakub@redhat.com>
6767
6768 PR c/54381
6769 * c-parser.c (struct c_tree_loc_pair): Removed.
6770 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6771 add location_t * and tree * arguments, fill in array of 3
6772 sizeof_arg trees and corresponding locs.
6773 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6774 c_parser_expr_list callers.
6775 (c_parser_postfix_expression_after_primary): Likewise. Pass
6776 array of 3 sizeof_arg trees and locs (corresponding to first
6777 3 arguments) to sizeof_pointer_memaccess_warning.
6778
6779 2012-10-09 Lawrence Crowl <crowl@google.com>
6780
6781 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6782 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6783 hash table.
6784
6785 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6786
6787 PR c++/54194
6788 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6789 call.
6790
6791 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
6792
6793 PR c++/54427
6794 * c-typeck.c: Include c-common.h.
6795 (enum stv_conv): Moved to c-common.h.
6796 (scalar_to_vector): Moved to c-common.c.
6797 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6798 * Make-lang.in: c-typeck.c depends on c-common.h.
6799
6800 2012-10-04 Arnaud Charlet <charlet@adacore.com>
6801
6802 * c-decl.c (c_write_global_declarations): Fix handling of
6803 -fdump-ada-spec*.
6804
6805 2012-09-30 Sharad Singhai <singhai@google.com>
6806
6807 * c-decl.c (c_write_global_declarations): Use a different method
6808 to determine if the dump has ben initialized.
6809
6810 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6811
6812 PR c/54552
6813 * c-typeck.c (c_cast_expr): When casting to a type requiring
6814 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6815 c_fully_fold first.
6816
6817 2012-09-14 Joseph Myers <joseph@codesourcery.com>
6818
6819 PR c/54103
6820 * c-typeck.c (build_unary_op): Pass original argument of
6821 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6822 any C_MAYBE_CONST_EXPR, if it has integer operands.
6823 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6824 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6825 to c_objc_common_truthvalue_conversion, then remove any
6826 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6827 c_objc_common_truthvalue_conversion not
6828 c_common_truthvalue_conversion.
6829 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6830 call note_integer_operands for arguments with integer operands
6831 that are not integer constants.
6832
6833 2012-09-13 Jakub Jelinek <jakub@redhat.com>
6834
6835 PR c/54559
6836 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6837 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6838
6839 2012-08-31 Jakub Jelinek <jakub@redhat.com>
6840
6841 PR c/54428
6842 * c-convert.c (convert): Don't call fold_convert_loc if
6843 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6844 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6845 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6846
6847 2012-08-24 Jakub Jelinek <jakub@redhat.com>
6848
6849 PR c/54355
6850 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6851 for nested and empty_ok arguments in the call to
6852 c_parser_declaration_or_fndef.
6853
6854 2012-08-17 Jakub Jelinek <jakub@redhat.com>
6855
6856 * c-tree.h (c_last_sizeof_arg): Declare.
6857 * c-parser.c (struct c_tree_loc_pair): New type.
6858 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6859 non-NULL.
6860 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6861 (c_parser_postfix_expression_after_primary): Likewise. Call
6862 sizeof_pointer_memaccess_warning if needed.
6863 (sizeof_ptr_memacc_comptypes): New function.
6864 * c-typeck.c (c_last_sizeof_arg): New global variable.
6865 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6866
6867 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
6868
6869 * c-lang.h (lang_decl): Add variable_size GTY option.
6870
6871 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6872
6873 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6874 * Make-lang.in: Fix dependencies.
6875
6876 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6877
6878 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
6879 and add language Makefile hooks.
6880 * config-lang.in: New file.
6881 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
6882 add the required "normal" config-lang.in rules.
6883 * c-lang.h: Moved from gcc/ to here.
6884 * c-tree.h: Likewise.
6885 * c-objc-common.c: Likewise.
6886 * c-objc-common.h: Likewise.
6887 * c-typeck.c: Likewise.
6888 * c-convert.c: Likewise.
6889 * c-lang.c: Likewise.
6890 * c-aux-info.c: Likewise.
6891 * c-errors.c: Likewise.
6892 * gccspec.c: Likewise.
6893 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
6894 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
6895 \f
6896 Copyright (C) 2012-2020 Free Software Foundation, Inc.
6897
6898 Copying and distribution of this file, with or without modification,
6899 are permitted in any medium without royalty provided the copyright
6900 notice and this notice are preserved.